예제 #1
0
        /// <summary>
        /// Calculates a level given the number of Exp Points and growth rate.
        /// </summary>
        /// <param name="levelingRate">Growth rate.</param>
        /// <param name="experiencePoints">Current Experience Points</param>
        /// <returns></returns>
        public static byte GetLevelFromExperience(LevelingRate levelingRate, int experiencePoints)
        {
            if (experiencePoints <= 0)
            {
                return(1);
            }
            int maxexp = GetExperience(levelingRate, Core.MAXIMUMLEVEL);

            if (experiencePoints > maxexp)
            {
                experiencePoints = maxexp;
            }
            for (int i = 0; i < Core.MAXIMUMLEVEL; i++)
            {
                if (GetExperience(levelingRate, Core.MAXIMUMLEVEL) == experiencePoints)
                {
                    return(Core.MAXIMUMLEVEL);
                }
                if (GetExperience(levelingRate, Core.MAXIMUMLEVEL) < experiencePoints)
                {
                    return(Core.MAXIMUMLEVEL);
                }
                if (GetExperience(levelingRate, i) > experiencePoints)
                {
                    return((byte)(i - 1));
                }
            }
            return(0);
        }
예제 #2
0
    public PokemonData(int Id, int[] regionalDex /*, string name*/, Type?type1, Type?type2, eAbility.Ability[] abilities,  //eAbility.Ability? ability1, eAbility.Ability? ability2, eAbility.Ability? hiddenAbility,
                       /*float maleRatio,*/ int catchRate, EggGroup eggGroup1, EggGroup eggGroup2, int hatchTime,
                       float height, float weight, int baseExpYield, int levelingRate,
                       /*int? evYieldHP, int? evYieldATK, int? evYieldDEF, int? evYieldSPA, int? evYieldSPD, int? evYieldSPE,*/
                       PokedexColor pokedexColor,  /*int baseFriendship,* / string species, string pokedexEntry,*/
                       int baseStatsHP, int baseStatsATK, int baseStatsDEF, int baseStatsSPA, int baseStatsSPD, int baseStatsSPE,
                       float luminance, /*Color lightColor,*/ int[] movesetLevels, eMoves.Move[] movesetMoves, int[] tmList,
                       int[] evolutionID, int[] evolutionLevel, int[] evolutionMethod, /*string[] evolutionRequirements,* /*int? forms,*/ int[,] heldItem = null)
    {//new PokemonData(1,1,"Bulbasaur",12,4,65,null,34,45,1,7,20,7f,69f,64,4,PokemonData.PokedexColor.GREEN,"Seed","\"Bulbasaur can be seen napping in bright sunlight. There is a seed on its back. By soaking up the sun’s rays, the seed grows progressively larger.\"",45,49,49,65,65,45,0f,new int[]{1,3,7,9,13,13,15,19,21,25,27,31,33,37},new int[]{33,45,73,22,77,79,36,75,230,74,38,388,235,402},new int[]{14,15,70,76,92,104,113,148,156,164,182,188,207,213,214,216,218,219,237,241,249,263,267,290,412,447,474,496,497,590},new int[]{2},new int[]{16},new int[]{1})
        PokedexTranslation translation = PokemonDatabase.GetPokedexTranslation(Id);

        this.ID = Id;
        this.regionalPokedex = regionalDex;
        this.Name            = translation.Name;
        this.Species         = translation.Species;
        this.pokedexEntry    = translation.PokedexEntry;
        //this.forms = forms; //ToDo: need new mechanic for how this should work

        this.type1     = type1 != null ? (PokemonData.Type)type1 : PokemonData.Type.NONE;
        this.type2     = type2 != null ? (PokemonData.Type)type2 : PokemonData.Type.NONE;
        this.Abilities = abilities;
        //this.ability1Id = (eAbility.Ability)ability1;
        //this.ability2Id = (eAbility.Ability)ability2;
        //this.hiddenAbilityId = (eAbility.Ability)hiddenAbility;

        //this.maleRatio = maleRatio; //ToDo
        this.catchRate = catchRate;
        this.eggGroup1 = eggGroup1;
        this.eggGroup2 = eggGroup2;
        this.hatchTime = hatchTime;

        this.height       = height;
        this.weight       = weight;
        this.baseExpYield = baseExpYield;
        this.levelingRate = (LevelingRate)levelingRate; //== null ? (PokemonData.LevelingRate)levelingRate : PokemonData.LevelingRate.NONE;

        this.baseStatsHP  = baseStatsHP;
        this.baseStatsATK = baseStatsATK;
        this.baseStatsDEF = baseStatsDEF;
        this.baseStatsSPA = baseStatsSPA;
        this.baseStatsSPD = baseStatsSPD;
        this.baseStatsSPE = baseStatsSPE;
        //this.baseFriendship = baseFriendship; //ToDo: forgot to implement when transfering database

        this.luminance = luminance;
        //this.lightColor = lightColor;
        this.pokedexColor = pokedexColor | PokemonData.PokedexColor.NONE;

        //ToDo: wild pokemon held items not yet implemented
        this.heldItem = heldItem; //[item id,% chance]

        this.movesetLevels = movesetLevels;
        this.movesetMoves  = movesetMoves; //ToDo: Array Cast conversion
        //this.tmList = tmList; //ToDo: Need new item database array/enum for this; one that's regional/generation dependant

        this.evolutionID = evolutionID;
        //this.evolutionRequirements = evolutionRequirements;
    }
예제 #3
0
 /// <summary>
 /// Gets the number of Exp Points needed to reach the given
 /// level with the given growth rate.
 /// </summary>
 /// <param name="levelingRate"></param>
 /// <param name="currentLevel"></param>
 /// <returns></returns>
 public static int GetStartExperience(LevelingRate levelingRate, int currentLevel)
 {
     if (currentLevel < 0)
     {
         currentLevel = 1;
     }
     if (currentLevel > Core.MAXIMUMLEVEL)
     {
         currentLevel = Core.MAXIMUMLEVEL;
     }
     return(GetExperience(levelingRate, currentLevel));
 }
예제 #4
0
        /*public static int GetLevelExperiencePoints(LevelingRate levelingRate, int currentLevel)
         * {
         *      int exp = 0;
         *      if (currentLevel > 100)
         *      {
         *              currentLevel = 100;
         *      }
         *      if (levelingRate == LevelingRate.ERRATIC)
         *      {
         *              if (currentLevel > 100)
         *              {
         *                      exp = (int)Mathf.Floor((Mathf.Pow(currentLevel, 3)) * (160 - currentLevel) / 100);
         *              }
         *              else exp = expTableErratic[currentLevel - 1]; //Because the array starts at 0, not 1.
         *      }
         *      else if (levelingRate == LevelingRate.FAST)
         *      {
         *              if (currentLevel > 100)
         *              {
         *                      exp = (int)Mathf.Floor(Mathf.Pow(currentLevel, 3) * (4 / 5));
         *              }
         *              else exp = expTableFast[currentLevel - 1];
         *      }
         *      else if (levelingRate == LevelingRate.MEDIUMFAST)
         *      {
         *              if (currentLevel > 100)
         *              {
         *                      exp = (int)Mathf.Floor(Mathf.Pow(currentLevel, 3));
         *              }
         *              else exp = expTableMediumFast[currentLevel - 1];
         *      }
         *      else if (levelingRate == LevelingRate.MEDIUMSLOW)
         *      {
         *              if (currentLevel > 100)
         *              {
         *                      exp = (int)Mathf.Floor(((6 / 5) * Mathf.Pow(currentLevel - 1, 3)) - (15 * Mathf.Pow(currentLevel - 1, 3)) + (100 * (currentLevel - 1)) - 140);
         *              }
         *              else exp = expTableMediumSlow[currentLevel - 1];
         *      }
         *      else if (levelingRate == LevelingRate.SLOW)
         *      {
         *              if (currentLevel > 100)
         *              {
         *                      exp = (int)Mathf.Floor(Mathf.Pow(currentLevel, 3) * (5 / 4));
         *              }
         *              else exp = expTableSlow[currentLevel - 1];
         *      }
         *      else if (levelingRate == LevelingRate.FLUCTUATING)
         *      {
         *              if (currentLevel > 100)
         *              {
         *                      exp = (int)Mathf.Floor(Mathf.Pow(currentLevel, 3) * ((Mathf.Floor(Mathf.Pow(currentLevel, 3) / 2) + 32) / 50));
         *              }
         *              else exp = expTableFluctuating[currentLevel - 1];
         *      }
         *
         *      return exp;
         * }*/

        /// <summary>
        /// Adds experience points ensuring that the new total doesn't
        /// exceed the maximum Exp. Points for the given growth rate.
        /// </summary>
        /// <param name="currexp">Current Exp Points.</param>
        /// <param name="expgain">Exp. Points to add</param>
        /// <param name="growth">Growth rate.</param>
        /// <returns></returns>
        public static int pbAddExperience(int currexp, int expgain, LevelingRate growth)
        {
            //if (growth >= 6 || growth < 0)
            //{
            //	return GameDebug.LogError("The growth rate is invalid.");
            //}
            int exp = currexp + expgain;
            //int maxexp = pbGetExpInternal(Core.MAXIMUMLEVEL, growth);
            int maxexp = GetMaxExperience(growth);

            if (exp > maxexp)
            {
                exp = maxexp;
            }
            return(exp);
        }
예제 #5
0
        public static int LvlAtXP(int xp, LevelingRate category, int startLevel = 0)
        {
            if (startLevel != 0 && xpTable[startLevel, (int)category] > xp)
            {
                return(0);
            }


            for (int i = startLevel + 1; i <= 100; i++)
            {
                if (xpTable[i, (int)category] > xp)
                {
                    return(i - 1);
                }
            }

            return(0);
        }
예제 #6
0
    //E.G.	Poliwhirl(61)
    //		new int[]{62,186},
    //		new string[]{"Stone,Water Stone","Trade\Item,King's Rock"}),
    //
    //E.G. to evolve to sylveon
    //		new int[]{..., 700},
    //		new string[]{..., "Amie\Move,2\Fairy"}),
    //
    //
    //Level,int level
    //	if pokemon's level is greater or equal to int level
    //Stone,string itemName
    //	if name of stone is equal to string itemName
    //Trade
    //	if currently trading pokemon
    //Friendship
    //	if pokemon's friendship is greater or equal to 220
    //Item,string itemName
    //	if pokemon's heldItem is equal to string itemName
    //Gender,Pokemon.Gender
    //  if pokemon's gender is equal to Pokemon.Gender
    //Move,string moveName
    //	if pokemon has a move thats name or typing is equal to string moveName
    //Map,string mapName
    //  if currentMap is equal to string mapName
    //Time,string dayNight
    //	if time is between 9PM and 4AM time is "Night". else time is "Day".
    //	if time is equal to string dayNight (either Day, or Night)
    //
    //		Unique evolution methods:
    //Mantine
    //	if party contains a Remoraid
    //Pangoro
    //	if party contains a dark pokemon
    //Goodra
    //	if currentMap's weather is rain
    //Hitmonlee
    //	if pokemon's ATK is greater than DEF
    //Hitmonchan
    //	if pokemon's ATK is lower than DEF
    //Hitmontop
    //  if pokemon's ATK is equal to DEF
    //Silcoon
    //  if pokemon's shinyValue divided by 2's remainder is equal to 0
    //Cascoon
    //	if pokemon's shinyValue divided by 2's remainder is equal to 1


    public PokemonData(int ID, string name, Type type1, Type type2, string ability1, string ability2, string hiddenAbility,
                       float maleRatio, int catchRate, EggGroup eggGroup1, EggGroup eggGroup2, int hatchTime,
                       float height, float weight, int baseExpYield, LevelingRate levelingRate,
                       int evYieldHP, int evYieldATK, int evYieldDEF, int evYieldSPA, int evYieldSPD, int evYieldSPE,
                       PokedexColor pokedexColor, int baseFriendship,
                       string species, string pokedexEntry,
                       int baseStatsHP, int baseStatsATK, int baseStatsDEF, int baseStatsSPA, int baseStatsSPD, int baseStatsSPE,
                       float luminance, Color lightColor,      //string[] heldItem,
                       int[] movesetLevels, string[] movesetMoves, string[] tmList,
                       int[] evolutionID, string[] evolutionRequirements)
    {
        this.ID            = ID;
        this.name          = name;
        this.type1         = type1;
        this.type2         = type2;
        this.ability1      = ability1;
        this.ability2      = ability2;
        this.hiddenAbility = hiddenAbility;

        this.maleRatio = maleRatio;
        this.catchRate = catchRate;
        this.eggGroup1 = eggGroup1;
        this.eggGroup2 = eggGroup2;
        this.hatchTime = hatchTime;

        this.height       = height;
        this.weight       = weight;
        this.baseExpYield = baseExpYield;
        this.levelingRate = levelingRate;

        this.evYieldHP  = evYieldHP;
        this.evYieldATK = evYieldATK;
        this.evYieldDEF = evYieldDEF;
        this.evYieldSPA = evYieldSPA;
        this.evYieldSPD = evYieldSPD;
        this.evYieldSPE = evYieldSPE;

        this.pokedexColor   = pokedexColor;
        this.baseFriendship = baseFriendship;

        this.species      = species;
        this.pokedexEntry = pokedexEntry;

        this.baseStatsHP  = baseStatsHP;
        this.baseStatsATK = baseStatsATK;
        this.baseStatsDEF = baseStatsDEF;
        this.baseStatsSPA = baseStatsSPA;
        this.baseStatsSPD = baseStatsSPD;
        this.baseStatsSPE = baseStatsSPE;

        this.luminance  = luminance;
        this.lightColor = lightColor;

        //wild pokemon held items not yet implemented
        //this.heldItem = heldItem;

        this.movesetLevels = movesetLevels;
        this.movesetMoves  = movesetMoves;
        this.tmList        = tmList;

        this.evolutionID           = evolutionID;
        this.evolutionRequirements = evolutionRequirements;
    }
예제 #7
0
 public static int XPAtLvl(int lvl, LevelingRate category)
 {
     return(xpTable[lvl, (int)category]);
 }
예제 #8
0
    public PokemonData(int ID, string name, Type type1, Type type2, int?ability1, int?ability2, int?hiddenAbility,
                       float maleRatio, int catchRate, EggGroup eggGroup1, EggGroup eggGroup2, int hatchTime,
                       float height, float weight, int baseExpYield, LevelingRate levelingRate,
                       int evYieldHP, int evYieldATK, int evYieldDEF, int evYieldSPA, int evYieldSPD, int evYieldSPE,
                       PokedexColor pokedexColor, int baseFriendship, int species, string pokedexEntry,
                       int baseStatsHP, int baseStatsATK, int baseStatsDEF, int baseStatsSPA, int baseStatsSPD, int baseStatsSPE,
                       float luminance, Color lightColor, int[] movesetLevels, int[] movesetMoves, int[] tmList,
                       int[] evolutionID, string[] evolutionRequirements, int?forms, System.Collections.Generic.Dictionary <int, float> heldItem = null /*new int[1][] { new int[2]{-1,100} }*/)
    {
        this.ID            = ID;
        this.Species       = name;
        this.type1         = type1;
        this.type2         = type2;
        this.ability1      = (string)ability1.ToString();
        this.ability2      = (string)ability2.ToString();
        this.hiddenAbility = (string)hiddenAbility.ToString();

        this.maleRatio = maleRatio;
        this.catchRate = catchRate;
        this.eggGroup1 = eggGroup1;
        this.eggGroup2 = eggGroup2;
        this.hatchTime = hatchTime;

        this.height       = height;
        this.weight       = weight;
        this.baseExpYield = baseExpYield;
        this.levelingRate = levelingRate;

        this.evYieldHP  = evYieldHP;
        this.evYieldATK = evYieldATK;
        this.evYieldDEF = evYieldDEF;
        this.evYieldSPA = evYieldSPA;
        this.evYieldSPD = evYieldSPD;
        this.evYieldSPE = evYieldSPE;

        this.pokedexColor   = pokedexColor;
        this.baseFriendship = baseFriendship;

        //this.Species = species;
        this.pokedexEntry = pokedexEntry;

        this.baseStatsHP  = baseStatsHP;
        this.baseStatsATK = baseStatsATK;
        this.baseStatsDEF = baseStatsDEF;
        this.baseStatsSPA = baseStatsSPA;
        this.baseStatsSPD = baseStatsSPD;
        this.baseStatsSPE = baseStatsSPE;

        this.luminance  = luminance;
        this.lightColor = lightColor;

        //wild pokemon held items not yet implemented
        //this.heldItem = heldItem; //[item id,% chance]

        this.movesetLevels = movesetLevels;
        //this.movesetMoves = movesetMoves;
        //this.tmList = tmList;

        this.evolutionID           = evolutionID;
        this.evolutionRequirements = evolutionRequirements;
    }
예제 #9
0
        //public string Name { get { return ToString(TextScripts.Name); } }
        //public string Description { get { return ToString(TextScripts.Description); } }
        #endregion

        #region Constructors
        public PokemonData(Pokemons Id             = Pokemons.NONE, int[] regionalDex = null,
                           Types type1             = Types.NONE, Types type2          = Types.NONE, Abilities ability1 = Abilities.NONE, Abilities ability2 = Abilities.NONE, Abilities hiddenAbility = Abilities.NONE,        //Abilities[] abilities,
                           GenderRatio?genderRatio = GenderRatio.Genderless, float?maleRatio = null, int catchRate = 1, EggGroups eggGroup1                 = EggGroups.NONE, EggGroups eggGroup2     = EggGroups.NONE, int hatchTime = 0,
                           float height            = 0f, float weight = 0f, int baseExpYield = 0, LevelingRate levelingRate = LevelingRate.MEDIUMFAST,
                           int evHP           = 0, int evATK          = 0, int evDEF = 0, int evSPA = 0, int evSPD = 0, int evSPE = 0,
                           Color pokedexColor = Color.NONE, int baseFriendship = 0,
                           int baseStatsHP    = 0, int baseStatsATK = 0, int baseStatsDEF = 0, int baseStatsSPA = 0, int baseStatsSPD = 0, int baseStatsSPE = 0,
                           Rarity rarity      = Rarity.Common, //float luminance = 0f,
                                                               //PokemonMoveset[] movesetmoves = null,
                                                               //int[] movesetLevels = null, Moves[] movesetMoves = null, int[] tmList = null,
                                                               //IPokemonEvolution[] evolution = null,
                                                               //int[] evolutionID = null, int[] evolutionLevel = null, int[] evolutionMethod = null, //string[] evolutionRequirements,
                                                               //Pokemons evolutionFROM = Pokemons.NONE, List<int> evolutionTO = null,
                           Items incense     = Items.NONE,
                           int evoChainId    = 0, byte generationId        = 0, bool isDefault = false, bool isBaby = false, bool formSwitchable = false, bool hasGenderDiff = false,
                           Habitat habitatId = Habitat.RARE, Shape shapeId = Shape.BLOB, int order = -1,
                           Forms baseForm    = Forms.NONE,                      //int forms = 0,
                           int[,] heldItem   = null)                            //: this(Id)
        {
            this.ID       = Id;
            this.BaseForm = baseForm;
            //this.RegionalPokedex = regionalDex;

            this.type1 = type1;             //!= null ? (Types)type1 : Types.NONE;
            this.type2 = type2;             //!= null ? (Types)type2 : Types.NONE;
            //this.ability = abilities;
            this.ability1 = (Abilities)ability1;
            this.ability2 = (Abilities)ability2;
            this.abilityh = (Abilities)hiddenAbility;

            this.CatchRate = catchRate;
            this.eggGroup1 = eggGroup1;
            this.eggGroup2 = eggGroup2;
            this.HatchTime = hatchTime;

            this.Height       = height;
            this.Weight       = weight;
            this.BaseExpYield = baseExpYield;
            this.GrowthRate   = (LevelingRate)levelingRate;           //== null ? (LevelingRate)levelingRate : LevelingRate.NONE;

            this.evYieldHP  = evHP;
            this.evYieldATK = evATK;
            this.evYieldDEF = evDEF;
            this.evYieldSPA = evSPA;
            this.evYieldSPD = evSPD;
            this.evYieldSPE = evSPE;

            this.BaseStatsHP    = baseStatsHP;
            this.BaseStatsATK   = baseStatsATK;
            this.BaseStatsDEF   = baseStatsDEF;
            this.BaseStatsSPA   = baseStatsSPA;
            this.BaseStatsSPD   = baseStatsSPD;
            this.BaseStatsSPE   = baseStatsSPE;
            this.BaseFriendship = baseFriendship;

            this.Rarity = rarity;
            //this.lightColor = lightColor;
            this.PokedexColor = pokedexColor | Color.NONE;

            //ToDo: wild pokemon held items not yet implemented
            this.HeldItem = heldItem;             //[item id,% chance]

            /*this.Luminance = luminance;
             * //if(movesetmoves != null)
             * this.MoveTree = new PokemonMoveTree(movesetmoves);
             * //this.MovesetLevels = movesetLevels;
             * //this.MovesetMoves = movesetMoves;
             * //this.tmList = tmList;
             *
             * this.Evolutions = evolution ?? new IPokemonEvolution[0];
             * //this.EvolutionID = evolutionID;
             * //this.evolutionMethod = evolutionMethod;
             * //this.evolutionRequirements = evolutionRequirements;*/

            this.Order          = order;
            this.ShinyChance    = 0;
            this.IsDefault      = isDefault;
            this.IsBaby         = isBaby;
            this.FormSwitchable = formSwitchable;
            this.HasGenderDiff  = hasGenderDiff;
            //this.EvolutionFROM= evolutionFROM ;
            //this.EvolutionTO  = evolutionTO   ;
            this.Incense      = incense;
            this.EvoChainId   = evoChainId;
            this.GenerationId = generationId;
            this.HabitatId    = habitatId;
            this.ShapeId      = shapeId;

            this.GenderEnum = GenderRatio.Genderless;
            if (genderRatio.HasValue)
            {
                this.GenderEnum = genderRatio.Value;
            }
            else
            {
                this.GenderEnum = maleRatio.HasValue ? getGenderRatio(maleRatio.Value) : GenderEnum;                 //genderRatio.Value;
            }
        }
예제 #10
0
 public Experience(LevelingRate rate, int initialValue) : this(rate)
 {
     Total = initialValue;
 }
예제 #11
0
 public Experience(LevelingRate rate)
 {
     Growth = rate;
     Total  = 0;
 }
예제 #12
0
 /// <summary>
 /// Gets the maximum Exp Points possible for the given growth rate.
 /// </summary>
 /// <param name="levelingRate"></param>
 /// <returns></returns>
 public static int GetMaxExperience(LevelingRate levelingRate)
 {
     return(GetExperience(levelingRate, Core.MAXIMUMLEVEL));
 }
예제 #13
0
        private static int GetExperience(LevelingRate levelingRate, int currentLevel)
        {
            int exp = 0;

            currentLevel = currentLevel < 1 ? 0 : currentLevel - 1;
            //if (currentLevel > 100) currentLevel = 100;
            //if (currentLevel > Core.MAXIMUMLEVEL) currentLevel = Core.MAXIMUMLEVEL;
            if (levelingRate == LevelingRate.ERRATIC)
            {
                if (currentLevel > 99)
                {
                    //exp = (int)System.Math.Floor((System.Math.Pow(currentLevel, 3)) * (160 - currentLevel) / 100);
                    exp = (int)System.Math.Floor((System.Math.Pow(currentLevel, 3)) * (currentLevel * 6 / 10) / 100);
                }
                else
                {
                    exp = expTableErratic[currentLevel];                  //Because the array starts at 0, not 1.
                }
            }
            else if (levelingRate == LevelingRate.FAST)
            {
                if (currentLevel > 99)
                {
                    exp = (int)System.Math.Floor(System.Math.Pow(currentLevel, 3) * (4 / 5));
                }
                else
                {
                    exp = expTableFast[currentLevel];
                }
            }
            else if (levelingRate == LevelingRate.MEDIUMFAST)
            {
                if (currentLevel > 99)
                {
                    exp = (int)System.Math.Floor(System.Math.Pow(currentLevel, 3));
                }
                else
                {
                    exp = expTableMediumFast[currentLevel];
                }
            }
            else if (levelingRate == LevelingRate.MEDIUMSLOW)
            {
                if (currentLevel > 99)
                {
                    //Dont remember why currentlevel minus 1 is in formula...
                    //I think it has to deal with formula table glitch for lvl 1-2 pokemons...
                    //exp = (int)System.Math.Floor(((6 / 5) * System.Math.Pow(currentLevel - 1, 3)) - (15 * System.Math.Pow(currentLevel - 1, 3)) + (100 * (currentLevel - 1)) - 140);
                    exp = (int)System.Math.Floor((6 * System.Math.Pow(currentLevel - 1, 3) / 5) - 15 * System.Math.Pow(currentLevel - 1, 2) + 100 * (currentLevel - 1) - 140);
                }
                else
                {
                    exp = expTableMediumSlow[currentLevel];
                }
            }
            else if (levelingRate == LevelingRate.SLOW)
            {
                if (currentLevel > 99)
                {
                    exp = (int)System.Math.Floor(System.Math.Pow(currentLevel, 3) * (5 / 4));
                }
                else
                {
                    exp = expTableSlow[currentLevel];
                }
            }
            else if (levelingRate == LevelingRate.FLUCTUATING)
            {
                if (currentLevel > 99)
                {
                    int rate = 82;
                    //Slow rate with increasing level
                    rate -= (currentLevel - 100) / 2;
                    if (rate < 40)
                    {
                        rate = 40;
                    }

                    //exp = (int)System.Math.Floor(System.Math.Pow(currentLevel, 3) * ((System.Math.Floor(System.Math.Pow(currentLevel, 3) / 2) + 32) / 50));
                    exp = (int)System.Math.Floor(System.Math.Pow(currentLevel, 3) * (((currentLevel * rate / 100) / 50)));
                }
                else
                {
                    exp = expTableFluctuating[currentLevel];
                }
            }

            return(exp);
        }