Ejemplo n.º 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);
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 5
0
        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;
        }
Ejemplo n.º 6
0
        public void RemoveEnemy(IEnemyInPlay enemy)
        {
            if (enemy == null)
            {
                throw new ArgumentNullException("enemy");
            }

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

            enemies.Remove(enemy);
        }
Ejemplo n.º 7
0
        public void AddEngagedEnemy(IEnemyInPlay enemy)
        {
            if (enemy == null)
            {
                throw new ArgumentNullException("enemy");
            }

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

            engagedEnemies.Add(enemy);
        }
Ejemplo n.º 8
0
        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;
        }
Ejemplo n.º 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));
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 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;
 }
Ejemplo n.º 16
0
 public EnemyEngaged(IGame game, IPlayer defendingPlayer, IEnemyInPlay enemy)
     : base(game)
 {
     this.DefendingPlayer = defendingPlayer;
     this.Enemy           = enemy;
 }
Ejemplo n.º 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));
            }
Ejemplo n.º 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;
 }
Ejemplo n.º 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));
            }