private void AttachCaughtInAWebToHero(IGame game, IEffectHandle handle, IPlayer player, IAttachableCard attachable, IHeroInPlay hero) { var attachmentHost = hero as IAttachmentHostInPlay; attachmentHost.AddAttachment(new AttachableInPlay(game, attachable, attachmentHost)); handle.Resolve(string.Format("{0} chose to attach '{1}' to '{2}'", player.Name, CardSource.Title, hero.Title)); }
private IEnumerable<IHeroInPlay> GetAttachableHeros(IGame game, IPlayer player, IAttachableCard attachable) { return player.CardsInPlay.OfType<IHeroInPlay>().Where(x => x.Card.IsValidAttachment(attachable) && attachable.CanBeAttachedTo(game, x.Card)).ToList(); }
public virtual bool IsValidAttachment(IAttachableCard card) { return(true); }
public virtual bool IsValidAttachment(IAttachableCard card) { return true; }
private void AttachCaughtInAWebToHero(IGame game, IEffectHandle handle, IPlayer player, IAttachableCard attachable, IHeroInPlay hero) { var attachmentHost = hero as IAttachmentHostInPlay; attachmentHost.AddAttachment(new AttachableInPlay(game, attachable, attachmentHost)); handle.Resolve(string.Format("{0} chose to attach '{1}' to '{2}'", player.Name, CardSource.Title, hero.Title)); }
private IEnumerable <IHeroInPlay> GetAttachableHeros(IGame game, IPlayer player, IAttachableCard attachable) { return(player.CardsInPlay.OfType <IHeroInPlay>().Where(x => x.Card.IsValidAttachment(attachable) && attachable.CanBeAttachedTo(game, x.Card)).ToList()); }