Esempio n. 1
0
        public async override Task LaunchSpell()
        {
            await base.LaunchSpell();

            Player enemy = Player.Game.GetMyEnemy(Player);

            if (enemy.MinionsOnField.Count == 0)
            {
                // output something
            }
            else
            {
                Minion minion;
                while (!enemy.MinionsOnField.Contains(minion = await Player.ChooseEnemyMinionOnField(enemy)))
                {
                    GameIO.GameOut.SendChoiceResponse(Player, minion, ChoiceResponse.NotCardOnEnemyField);
                }
                GameIO.GameOut.SendChoiceResponse(Player, minion, ChoiceResponse.Success);
                minion.Hp -= 5;
                if (minion.IsDead)
                {
                    enemy.MinionsOnField.Remove(minion);
                    minion.Die();
                }
            }
        }
Esempio n. 2
0
        public async override Task GoOnField()
        {
            await base.GoOnField();

            Player enemy = Player.Game.GetMyEnemy(Player);

            if (!(Player.IsFieldFull || enemy.MinionsOnField.Count == 0))
            {
                Minion minion;
                while (!enemy.MinionsOnField.Contains(minion = await Player.ChooseEnemyMinionOnField(enemy)))
                {
                    GameIO.GameOut.SendChoiceResponse(Player, minion, ChoiceResponse.NotCardOnEnemyField);
                }
                GameIO.GameOut.SendChoiceResponse(Player, minion, ChoiceResponse.Success);
                enemy.MinionsOnField.Remove(minion);
                minion.RemoveFromField();
                minion.Player = Player;
                Player.MinionsOnField.Add(minion);
                await minion.GoOnField();
            }
        }