示例#1
0
 public CharactersAttack(IGame game, IPlayer attackingPlayer, IEnemyInPlay enemy, IEnumerable <IAttackingInPlay> attackers)
     : base(game)
 {
     this.AttackingPlayer = attackingPlayer;
     this.Enemy           = enemy;
     this.attackers       = new ObservableCollection <IAttackingInPlay>(attackers);
 }
示例#2
0
 public EnemyAttack(IGame game, IPlayer defendingPlayer, IEnemyInPlay enemy, IEnumerable <IDefendingInPlay> defenders)
     : base(game)
 {
     this.DefendingPlayer = defendingPlayer;
     this.Enemy           = enemy;
     this.defenders       = new ObservableCollection <IDefendingInPlay>(defenders);
     this.attack          = enemy.Card.PrintedAttack;
 }
示例#3
0
 public EnemyAttack(IGame game, IPlayer defendingPlayer, IEnemyInPlay enemy, IEnumerable<IDefendingInPlay> defenders)
     : base(game)
 {
     this.DefendingPlayer = defendingPlayer;
     this.Enemy = enemy;
     this.defenders = new ObservableCollection<IDefendingInPlay>(defenders);
     this.attack = enemy.Card.PrintedAttack;
 }
        public void RemoveEnemy(IEnemyInPlay enemy)
        {
            if (enemy == null)
                throw new ArgumentNullException("enemy");

            if (!enemies.Contains(enemy))
                return;

            enemies.Remove(enemy);
        }
        public EnemyDefeated(IGame game, IEnemyInPlay enemy, IEnumerable<IAttackingInPlay> attackers)
            : base(game)
        {
            if (enemy == null)
                throw new ArgumentNullException("enemy");
            if (attackers == null)
                throw new ArgumentNullException("attackers");

            this.Enemy = enemy;
            this.Attackers = attackers;
        }
        public void RemoveEnemy(IEnemyInPlay enemy)
        {
            if (enemy == null)
            {
                throw new ArgumentNullException("enemy");
            }

            if (!enemies.Contains(enemy))
            {
                return;
            }

            enemies.Remove(enemy);
        }
示例#7
0
        public void AddEngagedEnemy(IEnemyInPlay enemy)
        {
            if (enemy == null)
            {
                throw new ArgumentNullException("enemy");
            }

            if (engagedEnemies.Contains(enemy))
            {
                return;
            }

            engagedEnemies.Add(enemy);
        }
        public EnemyDefeated(IGame game, IEnemyInPlay enemy, IEnumerable <IAttackingInPlay> attackers)
            : base(game)
        {
            if (enemy == null)
            {
                throw new ArgumentNullException("enemy");
            }
            if (attackers == null)
            {
                throw new ArgumentNullException("attackers");
            }

            this.Enemy     = enemy;
            this.Attackers = attackers;
        }
示例#9
0
            public override void Trigger(IGame game, IEffectHandle handle)
            {
                IEnemyInPlay enemy = null;

                foreach (var player in game.Players)
                {
                    enemy = player.EngagedEnemies.Where(x => x.Card.Id == source.Id).FirstOrDefault();
                    if (enemy != null)
                    {
                        break;
                    }
                }

                if (enemy == null)
                {
                    handle.Cancel(GetCancelledString()); return;
                }

                game.AddEffect(new AttackModifier(game.CurrentPhase.Code, source, enemy, TimeScope.Round, 1));

                handle.Resolve(GetCompletedStatus());
            }
 private static string GetDescription(IEnemyInPlay enemy)
 {
     return string.Format("{0} has been defeated", enemy.Title);
 }
 public EnemyDefeatedEffect(IGame game, IEnemyInPlay enemy, IEnumerable<IAttackingInPlay> attackers)
     : base("Enemy Defeated", GetDescription(enemy), game)
 {
     this.enemy = enemy;
     this.attackers = attackers;
 }
 private static string GetDescription(IEnemyInPlay enemy)
 {
     return(string.Format("{0} has been defeated", enemy.Title));
 }
示例#13
0
 public EngagamentCheckEffect(IGame game, IPlayer player, IEnemyInPlay enemy)
     : base("Engagement Check", string.Format("{0} must check to see if '{1}' engages them", player.Name, enemy.Title), game)
 {
     this.player = player;
     this.enemy  = enemy;
 }
示例#14
0
        public void AddEngagedEnemy(IEnemyInPlay enemy)
        {
            if (enemy == null)
                throw new ArgumentNullException("enemy");

            if (engagedEnemies.Contains(enemy))
                return;

            engagedEnemies.Add(enemy);
        }
 public EnemyDefeatedEffect(IGame game, IEnemyInPlay enemy, IEnumerable <IAttackingInPlay> attackers)
     : base("Enemy Defeated", GetDescription(enemy), game)
 {
     this.enemy     = enemy;
     this.attackers = attackers;
 }
示例#16
0
 public EnemyEngaged(IGame game, IPlayer defendingPlayer, IEnemyInPlay enemy)
     : base(game)
 {
     this.DefendingPlayer = defendingPlayer;
     this.Enemy           = enemy;
 }
示例#17
0
            private void DealFourDamageToEnemyInPlay(IGame game, IEffectHandle handle, IPlayer player, IEnemyInPlay enemy)
            {
                enemy.Damage += 4;

                handle.Resolve(string.Format("{0} chose to have '{1}' deal 4 damage to '{2}'", player.Name, CardSource.Title, enemy.Title));
            }
示例#18
0
 public EnemyEngaged(IGame game, IPlayer defendingPlayer, IEnemyInPlay enemy)
     : base(game)
 {
     this.DefendingPlayer = defendingPlayer;
     this.Enemy = enemy;
 }
 public EngagamentCheckEffect(IGame game, IPlayer player, IEnemyInPlay enemy)
     : base("Engagement Check", string.Format("{0} must check to see if '{1}' engages them", player.Name, enemy.Title), game)
 {
     this.player = player;
     this.enemy = enemy;
 }
示例#20
0
            private void DealFourDamageToEnemyInPlay(IGame game, IEffectHandle handle, IPlayer player, IEnemyInPlay enemy)
            {
                enemy.Damage += 4;

                handle.Resolve(string.Format("{0} chose to have '{1}' deal 4 damage to '{2}'", player.Name, CardSource.Title, enemy.Title));
            }