Beispiel #1
0
        private static void HeroCombat(Team attackers, Team defenders)
        {
            if (attackers.Powers.Count > 0)
            {
                int affected = Samjokgo.Library.HeroCombat.Fight(attackers.CurrentHeroPower, attackers.CurrentHero, defenders.CurrentHero, defenders.Units);
                defenders.BuryDeadUnits(affected);

                if (attackers.CurrentHero != null && attackers.CurrentHero.Life <= 0)
                    attackers.RemoveHeroPowersFromList(attackers.CurrentHero);

                if (defenders.CurrentHero != null && defenders.CurrentHero.Life <= 0)
                    defenders.RemoveHeroPowersFromList(defenders.CurrentHero);
            }
        }