Esempio n. 1
0
        public FightData(List<AIHeroClient> players)
        {
            Enemys = players.GetEnemys<AIHeroClient>();
            Allies = players.GetAllies<AIHeroClient>();

            MoreEnemies = players.CountAllies() < players.CountEnemies();
            MoreAllies = !MoreEnemies;

            TotalEnemyHealth = players.GetEnemys<AIHeroClient>().Sum(x => x.Health + x.AllShield);
            TotalEnemyMana = players.GetEnemys<AIHeroClient>().Sum(x => x.Mana);
            TotalEnemyLevel = players.GetEnemys<AIHeroClient>().Sum(x => x.Level);
            TotalEnemyDamage = players.GetEnemys<AIHeroClient>().Sum(x => x.TotalAttackDamage + x.TotalMagicalDamage);
            
            TotalAllyHealth = players.GetAllies<AIHeroClient>().Sum(x => x.Health + x.AllShield);
            TotalAllyMana = players.GetAllies<AIHeroClient>().Sum(x => x.Mana);
            TotalAllyLevel = players.GetAllies<AIHeroClient>().Sum(x => x.Level);
            TotalAllyDamage = players.GetAllies<AIHeroClient>().Sum(x => x.TotalAttackDamage + x.TotalMagicalDamage);

            TotalHealthDifference = TotalAllyHealth - TotalEnemyHealth;
            TotalManaDifference = TotalAllyMana - TotalEnemyMana;
            TotalLevelDifference = TotalAllyLevel - TotalEnemyLevel;
            TotalDamageDifference = TotalAllyDamage - TotalEnemyDamage;
        }