public int CalculateStat(PokemonStatID stat) { //Calculates the pokemon's current stat //If it's maxHP, use the HP formula if (stat == PokemonStatID.maxHP) { return(CalculateMaxHP(speciesBaseStats.maxHP, individualValues.maxHP, effortValues.maxHP, level)); } //Use the normal formula //TODO: Determine nature multiplier float natureMult = 1f; return(CalculateNonHPStat(speciesBaseStats[stat], individualValues[stat], effortValues[stat], natureMult, level)); }
public int this[PokemonStatID stat] { get { switch (stat) { case PokemonStatID.attack: return(attack); break; case PokemonStatID.defense: return(defense); break; case PokemonStatID.spAttack: return(spAttack); break; case PokemonStatID.spDefense: return(spDefense); break; case PokemonStatID.speed: return(speed); break; case PokemonStatID.maxHP: return(maxHP); break; } //Shouldn't reach here throw new System.Exception("Bad PokemonStatID"); } set { switch (stat) { case PokemonStatID.attack: attack = value; break; case PokemonStatID.defense: defense = value; break; case PokemonStatID.spAttack: spAttack = value; break; case PokemonStatID.spDefense: spDefense = value; break; case PokemonStatID.speed: speed = value; break; case PokemonStatID.maxHP: maxHP = value; break; } } }