int CalculateExperienceYield(int generation, ushort baseExperience, byte enemyLevel, byte ownLevel, byte participated, bool isWild, TradeState tradeState, bool holdsLuckyEgg, byte expShareCount, bool holdsExpShare, ExpPower expPower)
        {
            bool isTraded = tradeState == TradeState.TradedNational;

            switch (generation)
            {
            case 2:
                return(_experienceCalculator.CalculateExperienceForSecondGen(baseExperience, enemyLevel, participated, isWild, isTraded, holdsLuckyEgg, expShareCount, holdsExpShare));

            case 3:
                return(_experienceCalculator.CalculateExperienceForThirdGen(baseExperience, enemyLevel, participated, isWild, isTraded, holdsLuckyEgg, expShareCount, holdsExpShare));

            case 4:
                return(_experienceCalculator.CalculateExperienceForFourthGen(baseExperience, enemyLevel, participated, isWild, tradeState, holdsLuckyEgg, expShareCount, holdsExpShare));

            case 5:
                return(_experienceCalculator.CalculateExperienceForFifthGen(baseExperience, enemyLevel, ownLevel, participated, isWild, tradeState, holdsLuckyEgg, expShareCount, holdsExpShare, expPower));
            }

            return(0);
        }
Exemplo n.º 2
0
 //[TestCase((ushort)177, 23, 1, true, TradeState.Original, false, 0, false, ExpectedResult = 384, Description = "Wild Nidorina Level 23 defeated by one Pokémon")]
 public int ShouldCalculateExperienceForGen4(ushort baseExperience, byte enemyLevel, byte participatedPokemon, bool isWild, TradeState tradeState, bool holdsLuckyEgg, byte expShareCount, bool holdsExpShare)
 {
     return(_service.CalculateExperienceForFourthGen(baseExperience, enemyLevel, participatedPokemon, isWild, tradeState, holdsLuckyEgg, expShareCount, holdsExpShare));
 }