19 }
else if (level < 20) {
21 }
else if (level < 40) {
41 values = stats->
stats;
44 }
else if (level < 20) {
46 }
else if (level < 40) {
48 }
else if (level < 60) {
50 }
else if (level < 80) {
55 for (i = 0; i < 6; i++) {
58 values[6 + i] += gain;
59 if (values[6 + i] >= 1000) {
64 for (i = 0; i < 7; i++) {
67 values[12 + i] += gain;
68 if (values[12 + i] >= 1000) {
86 if (stats->
exp > 999999) {
97 }
else if (level < 20) {
99 }
else if (level < 40) {
101 }
else if (level < 100) {
142 for (n = 0; n < 44; n++) {
147 for (i = 0; i < 2; i++) {
148 if (list[n].needs[i].digimon != 0) {
159 if (list[n].stat != 0) {
163 if (list[n].stat < 7) {
167 }
else if (list[n].stat == 7) {
171 }
else if (list[n].stat >= 8) {
182 for (j = 0; j < 3; j++) {
206 if (entry.
exp > 9999999) {
209 if (entry.
level >= 99) {
216 need = entry.
level * 10;
219 need = n * 10 + (entry.
level - n) * 50;
222 if (entry.
exp >= need) {
225 up = entry.
level < 99;
240 for (i = 0; i < 6; i++) {
241 if (entry.
skills[i] == 0) {
249 return digimon->
skills[i + 1];
265 for (i = 0; i < 5; i++) {
314 }
else if (share > 50) {
DigimonData DIGIMON_DATA[55]
55 entries: the 52 Digimon, then three placeholders (0x1D4-0x1D6)
GameState GAME
The save data, the game mode and the methods.
#define STAT_TP
what the training's intensities cost
#define STAT_LEVEL
Indices of a partner's stats (PartnerStats.stats, computeStats, setStat)
#define SKILL_LAST
the sixth skill
#define SKILL_ID
PartnerEntry.skills.
DigimonData *(* GET_DIGIMON)(s32 id)
getDigimon for the overlays, in the small data (.sdata) between game/items.c's and file/file_table....
s32 STFGTREP_addDigimonExp(s32 partner, s32 id, s32 exp)
Adds exp to one of a partner's Digimon and raises its level as far as the exp reaches,...
void STFGTREP_raiseStats(s32 partner, s32 level)
Raises a partner's max HP, max MP, battle stats and, up to level 40, its resistances for a new level,...
s32 STFGTREP_learnSkill(s32 partner, s32 id)
Marks known (SKILL_KNOWN) the first skill of one of a partner's Digimon whose level it has reached (D...
s32 STFGTREP_addSkill(s32 partner, s32 id)
Gives one of a partner's Digimon the first skill whose level it has reached and that it hasn't yet (D...
s32 STFGTREP_getDigimonExp(s32 partner, s32 id, s32 exp, s32 used)
The exp one of a partner's Digimon gets of a battle's: less as the partner goes up in level,...
s32 STFGTREP_learnDigimon(s32 partner)
Gives a partner the first Digimon of its evolution list (STFGTREP_evolutions) it hasn't yet and whose...
s32 STFGTREP_addExp(s32 partner, s32 exp)
Adds exp to a partner and raises its level, and its stats with it, as far as the exp reaches; whether...
STFGTREP.PRO: mode 0x1400, the report after a battle.
Evolution * STFGTREP_evolutions[]
each partner's (STFGTREP_learnDigimon)
s32 STFGTREP_resistGains[]
A resistance's gain, from its growth plus 0-3 at random.
s32 STFGTREP_statGains[][9]
A battle stat's gain by tier, from its growth plus 0-4 at random.
s32 STFGTREP_levelExp[]
What a level adds to the exp the next one needs, by tier.
s32 STFGTREP_vitalRandom[]
s32 STFGTREP_vitalCuts[]
What is taken from the HP and MP growth, by tier, and added at random.
Digimon definition (DIGIMON_DATA, 52 of them; the first 8 are the partners)
u8 resistGrowth[7]
1-5: how fast the gyms raise them
u16 skills[7]
[1]-[6] are learnt at skillLevels
u8 expLevel
the level after which its exp grows faster
u8 expRate
a partner's exp per level, in tenths
u8 hpGrowth
what a partner's max HP grows by a level
u8 statGrowth[6]
columns of the growth tables
u8 knownLevels[5]
the levels that mark an entry's skills[0]-[4] known
A Digimon a partner can learn, once the conditions are met.
struct Evolution::@5 needs[2]
s16 value
the least the stat must be
s16 stat
1-6 battle stats, 7 level, 8-14 resistances
s32 digimon
DIGIMON_DATA index + 1.
s32(* getPartnerEntry)()
-1 if it hasn't the Digimon
struct PartnerStats *(* getPartnerStats)(s32 partner)
s32(* addPartnerEntry)()
(partner, id): 0 if it has it or has no room
void(* setPartnerSlots)()
s32(* getPartnerSlots)()
(partner, s16 *out): the count
One of a partner's Digimon (getPartnerEntry, setPartnerEntry)
s8 level
shown in the lab; 1 when added
s16 skills[6]
SKILL_ID and the flags below, 0 for none.
A partner Digimon from its name on (Partner.info), as getPartnerStats gives it.
s32(* next)(void)
0 to RANDOM_COUNT - 1