Ejemplo n.º 1
0
            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));
            }
Ejemplo n.º 2
0
 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();
 }
Ejemplo n.º 3
0
 public virtual bool IsValidAttachment(IAttachableCard card)
 {
     return(true);
 }
 public virtual bool IsValidAttachment(IAttachableCard card)
 {
     return true;
 }
Ejemplo n.º 5
0
            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));
            }
Ejemplo n.º 6
0
 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());
 }