28 }
else if (stat -
STAT_HP < 4) {
32 }
else if (value >= 1000) {
46 value = *stats + delta;
54 }
else if (stat -
STAT_HP < 4) {
58 }
else if (value >= 1000) {
81 for (i = 0; i < 6; i++) {
91 for (j = 0; j < 2; j++) {
103 for (j = 0; j < 2; j++) {
139 for (i = 0; i < 6; i++) {
151 for (i = 0; i < 6; i++) {
152 value = p[i + 6] + delta;
158 }
else if (stat - 1 < 6U) {
159 value = p[stat + 5] + delta;
164 }
else if (stat - 8 < 7U) {
165 value = p[stat + 4] + delta;
175 { { 0x00F3, 0x010D, 0x0062, 0x011C } }, { { 0x00F2, 0x0102, 0x0070, 0x011D } },
176 { { 0x00DE, 0x0100, 0x007C, 0x011A } }, { { 0x00F4, 0x010F, 0x00A3, 0x011E } },
177 { { 0x00D3, 0x010C, 0x00CB, 0x0120 } }, { { 0x00F5, 0x010E, 0x0095, 0x011F } },
178 { { 0x00DD, 0x0101, 0x0089, 0x011B } }, { { 0x00E8, 0x00FF, 0x0088, 0x0119 } },
181 { 4, 4, 4, 4, 4, 20 }, { 10, 10, 0, 0, 0, 20 }, { 10, 0, 0, 0, 10, 20 }, { 0, 10, 10, 0, 0, 20 },
182 { 10, 0, 0, 10, 0, 20 }, { 0, 0, 0, 10, 10, 20 }, { 10, 0, 10, 0, 0, 20 }, { 0, 10, 0, 10, 0, 20 },
GameState GAME
The save data, the game mode and the methods.
s32 getPartyPartner(u32 index)
The partner id of party member index (its unlocked value - 3), or -1.
void computeStats(s32 partner, PartnerTotals *out)
A partner's stats with its equipment (and its equipment set bonus) added.
s16 EQUIP_SET_BONUSES[][6]
void addStat(s32 partner, u32 stat, s32 delta)
Adds to a partner's stat, kept within the same limits as setStat.
EquipSet EQUIP_SETS[]
Each partner's equipment set and what wearing it whole adds (computeStats)
void addStatBonus(s16 *p, s32 stat, s32 delta)
Adds an equipment bonus to a stat of computeStats' result (7 raises every battle stat)
void setStat(s32 partner, u32 stat, s16 value)
Sets a partner's stat, kept within 0-99 (level, TP), 0-9999 (HP, MP) or 0-999.
What the stage overlays and the executable use of FIELDSTG (fieldstg.h has the rest): its layers and ...
#define IS_WEAPON_TYPE(type)
ItemInfo.type's ranges: 2-14 weapons, 15-20 armour, 21-24 accessories, each tested as one unsigned by...
#define PARTY_SIZE
How many partners the party holds.
#define IS_ARMOR_TYPE(type)
#define IS_ACCESSORY_TYPE(type)
A partner's equipment set: the four items computeStats compares with equip[0-3].
The game state (GAME): the first 0x26BC bytes are what newGame clears (the save data),...
Partner partners[PARTNER_COUNT]
s32 party[3]
partner indices
struct ItemInfo *(* get)(s32 item)
getItem
An item (ITEMS, ITEM_FUNCS)
u8 type
2-14 weapons, 15-20 armour, 21-24 accessories
ItemRecord data
the type's record, or the usable items' effect
A partner Digimon from its name on (Partner.info), as getPartnerStats gives it.
s32 unlocked
partner id + 3, 0 while locked
PartnerStats' stats[] and the status[] after them as one block, which computeStats and STITSHOP_compu...
u16 amounts[2]
what it adds to stats[]
s16 charisma
what it adds to STAT_CHARISMA (computeStats); armour and accessories too
ItemInfo.data's record, by ItemInfo.type.
computeStats' result: the stats with the equipment added, by STAT_* or by name.
StatBlock block
the first 0x2C bytes, which computeStats copies whole
s16 lowered[3]
taken from battle[0], [1] and [4]
s16 battle[6]
strength (raised by weapons), defense (by armour), spirit, wisdom, speed and charisma (by all equipme...
struct PartnerTotals::@10 fields