Renamed gBaseStats to gSpeciesInfo
This commit is contained in:
+25
-25
@@ -2348,8 +2348,8 @@ static void InitDomeTrainers(void)
|
||||
rankingScores[0] += GetMonData(&gPlayerParty[trainerId], MON_DATA_SPDEF, NULL);
|
||||
rankingScores[0] += GetMonData(&gPlayerParty[trainerId], MON_DATA_SPEED, NULL);
|
||||
rankingScores[0] += GetMonData(&gPlayerParty[trainerId], MON_DATA_MAX_HP, NULL);
|
||||
monTypesBits |= gBitTable[gBaseStats[GetMonData(&gPlayerParty[trainerId], MON_DATA_SPECIES, NULL)].type1];
|
||||
monTypesBits |= gBitTable[gBaseStats[GetMonData(&gPlayerParty[trainerId], MON_DATA_SPECIES, NULL)].type2];
|
||||
monTypesBits |= gBitTable[gSpeciesInfo[GetMonData(&gPlayerParty[trainerId], MON_DATA_SPECIES, NULL)].type1];
|
||||
monTypesBits |= gBitTable[gSpeciesInfo[GetMonData(&gPlayerParty[trainerId], MON_DATA_SPECIES, NULL)].type2];
|
||||
}
|
||||
|
||||
// Count the number of types in the players party, to factor into the ranking
|
||||
@@ -2383,8 +2383,8 @@ static void InitDomeTrainers(void)
|
||||
rankingScores[i] += statValues[STAT_SPDEF];
|
||||
rankingScores[i] += statValues[STAT_SPEED];
|
||||
rankingScores[i] += statValues[STAT_HP];
|
||||
monTypesBits |= gBitTable[gBaseStats[gFacilityTrainerMons[DOME_MONS[i][j]].species].type1];
|
||||
monTypesBits |= gBitTable[gBaseStats[gFacilityTrainerMons[DOME_MONS[i][j]].species].type2];
|
||||
monTypesBits |= gBitTable[gSpeciesInfo[gFacilityTrainerMons[DOME_MONS[i][j]].species].type1];
|
||||
monTypesBits |= gBitTable[gSpeciesInfo[gFacilityTrainerMons[DOME_MONS[i][j]].species].type2];
|
||||
}
|
||||
|
||||
for (monTypesCount = 0, j = 0; j < 32; j++)
|
||||
@@ -2448,7 +2448,7 @@ static void InitDomeTrainers(void)
|
||||
|
||||
#define CALC_STAT(base, statIndex) \
|
||||
{ \
|
||||
u8 baseStat = gBaseStats[species].base; \
|
||||
u8 baseStat = gSpeciesInfo[species].base; \
|
||||
stats[statIndex] = (((2 * baseStat + ivs + evs[statIndex] / 4) * level) / 100) + 5; \
|
||||
stats[statIndex] = (u8) ModifyStatByNature(nature, stats[statIndex], statIndex); \
|
||||
}
|
||||
@@ -2481,7 +2481,7 @@ static void CalcDomeMonStats(u16 species, int level, int ivs, u8 evBits, u8 natu
|
||||
}
|
||||
else
|
||||
{
|
||||
int n = 2 * gBaseStats[species].baseHP;
|
||||
int n = 2 * gSpeciesInfo[species].baseHP;
|
||||
stats[STAT_HP] = (((n + ivs + evs[STAT_HP] / 4) * level) / 100) + level + 10;
|
||||
}
|
||||
|
||||
@@ -2750,9 +2750,9 @@ static int GetTypeEffectivenessPoints(int move, int targetSpecies, int mode)
|
||||
if (move == MOVE_NONE || move == MOVE_UNAVAILABLE || gBattleMoves[move].power == 0)
|
||||
return 0;
|
||||
|
||||
defType1 = gBaseStats[targetSpecies].type1;
|
||||
defType2 = gBaseStats[targetSpecies].type2;
|
||||
defAbility = gBaseStats[targetSpecies].abilities[0];
|
||||
defType1 = gSpeciesInfo[targetSpecies].type1;
|
||||
defType2 = gSpeciesInfo[targetSpecies].type2;
|
||||
defAbility = gSpeciesInfo[targetSpecies].abilities[0];
|
||||
moveType = gBattleMoves[move].type;
|
||||
|
||||
if (defAbility == ABILITY_LEVITATE && moveType == TYPE_GROUND)
|
||||
@@ -5204,9 +5204,9 @@ static u16 GetWinningMove(int winnerTournamentId, int loserTournamentId, u8 roun
|
||||
|
||||
targetSpecies = gFacilityTrainerMons[DOME_MONS[loserTournamentId][k]].species;
|
||||
if (var & 1)
|
||||
targetAbility = gBaseStats[targetSpecies].abilities[1];
|
||||
targetAbility = gSpeciesInfo[targetSpecies].abilities[1];
|
||||
else
|
||||
targetAbility = gBaseStats[targetSpecies].abilities[0];
|
||||
targetAbility = gSpeciesInfo[targetSpecies].abilities[0];
|
||||
|
||||
var = AI_TypeCalc(moveIds[i * MAX_MON_MOVES + j], targetSpecies, targetAbility);
|
||||
if (var & MOVE_RESULT_NOT_VERY_EFFECTIVE && var & MOVE_RESULT_SUPER_EFFECTIVE)
|
||||
@@ -5883,8 +5883,8 @@ static void InitRandomTourneyTreeResults(void)
|
||||
statSums[i] += statValues[STAT_SPDEF];
|
||||
statSums[i] += statValues[STAT_SPEED];
|
||||
statSums[i] += statValues[STAT_HP];
|
||||
monTypesBits |= gBitTable[gBaseStats[gFacilityTrainerMons[DOME_MONS[i][j]].species].type1];
|
||||
monTypesBits |= gBitTable[gBaseStats[gFacilityTrainerMons[DOME_MONS[i][j]].species].type2];
|
||||
monTypesBits |= gBitTable[gSpeciesInfo[gFacilityTrainerMons[DOME_MONS[i][j]].species].type1];
|
||||
monTypesBits |= gBitTable[gSpeciesInfo[gFacilityTrainerMons[DOME_MONS[i][j]].species].type2];
|
||||
}
|
||||
|
||||
// Because GF hates temporary vars, trainerId acts like monTypesCount here.
|
||||
@@ -6010,12 +6010,12 @@ static void DecideRoundWinners(u8 roundId)
|
||||
}
|
||||
}
|
||||
species = gFacilityTrainerMons[DOME_MONS[tournamentId1][monId1]].species;
|
||||
points1 += ( gBaseStats[species].baseHP
|
||||
+ gBaseStats[species].baseAttack
|
||||
+ gBaseStats[species].baseDefense
|
||||
+ gBaseStats[species].baseSpeed
|
||||
+ gBaseStats[species].baseSpAttack
|
||||
+ gBaseStats[species].baseSpDefense) / 10;
|
||||
points1 += ( gSpeciesInfo[species].baseHP
|
||||
+ gSpeciesInfo[species].baseAttack
|
||||
+ gSpeciesInfo[species].baseDefense
|
||||
+ gSpeciesInfo[species].baseSpeed
|
||||
+ gSpeciesInfo[species].baseSpAttack
|
||||
+ gSpeciesInfo[species].baseSpDefense) / 10;
|
||||
}
|
||||
// Random part of the formula.
|
||||
points1 += (Random() & 0x1F);
|
||||
@@ -6033,12 +6033,12 @@ static void DecideRoundWinners(u8 roundId)
|
||||
}
|
||||
}
|
||||
species = gFacilityTrainerMons[DOME_MONS[tournamentId2][monId1]].species;
|
||||
points2 += ( gBaseStats[species].baseHP
|
||||
+ gBaseStats[species].baseAttack
|
||||
+ gBaseStats[species].baseDefense
|
||||
+ gBaseStats[species].baseSpeed
|
||||
+ gBaseStats[species].baseSpAttack
|
||||
+ gBaseStats[species].baseSpDefense) / 10;
|
||||
points2 += ( gSpeciesInfo[species].baseHP
|
||||
+ gSpeciesInfo[species].baseAttack
|
||||
+ gSpeciesInfo[species].baseDefense
|
||||
+ gSpeciesInfo[species].baseSpeed
|
||||
+ gSpeciesInfo[species].baseSpAttack
|
||||
+ gSpeciesInfo[species].baseSpDefense) / 10;
|
||||
}
|
||||
// Random part of the formula.
|
||||
points2 += (Random() & 0x1F);
|
||||
|
||||
Reference in New Issue
Block a user