Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
stats.c File Reference
#include "engine/game.h"
#include "field/field_map.h"
Include dependency graph for stats.c:

Go to the source code of this file.

Functions

s32 getPartyPartner (u32 index)
 The partner id of party member index (its unlocked value - 3), or -1.
 
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.
 
void addStat (s32 partner, u32 stat, s32 delta)
 Adds to a partner's stat, kept within the same limits as setStat.
 
void computeStats (s32 partner, PartnerTotals *out)
 A partner's stats with its equipment (and its equipment set bonus) added.
 
void addStatBonus (s16 *p, s32 stat, s32 delta)
 Adds an equipment bonus to a stat of computeStats' result (7 raises every battle stat)
 

Variables

EquipSet EQUIP_SETS []
 Each partner's equipment set and what wearing it whole adds (computeStats)
 
s16 EQUIP_SET_BONUSES [][6]
 

Function Documentation

◆ getPartyPartner()

s32 getPartyPartner ( u32  index)

The partner id of party member index (its unlocked value - 3), or -1.

Definition at line 5 of file stats.c.

◆ setStat()

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.

Definition at line 13 of file stats.c.

◆ addStat()

void addStat ( s32  partner,
u32  stat,
s32  delta 
)

Adds to a partner's stat, kept within the same limits as setStat.

Definition at line 39 of file stats.c.

◆ computeStats()

void computeStats ( s32  partner,
PartnerTotals *  out 
)

A partner's stats with its equipment (and its equipment set bonus) added.

Definition at line 65 of file stats.c.

Here is the call graph for this function:

◆ addStatBonus()

void addStatBonus ( s16 *  p,
s32  stat,
s32  delta 
)

Adds an equipment bonus to a stat of computeStats' result (7 raises every battle stat)

Definition at line 146 of file stats.c.

Referenced by computeStats().

Here is the caller graph for this function:

Variable Documentation

◆ EQUIP_SETS

EquipSet EQUIP_SETS[]
Initial value:
= {
{ { 0x00F3, 0x010D, 0x0062, 0x011C } }, { { 0x00F2, 0x0102, 0x0070, 0x011D } },
{ { 0x00DE, 0x0100, 0x007C, 0x011A } }, { { 0x00F4, 0x010F, 0x00A3, 0x011E } },
{ { 0x00D3, 0x010C, 0x00CB, 0x0120 } }, { { 0x00F5, 0x010E, 0x0095, 0x011F } },
{ { 0x00DD, 0x0101, 0x0089, 0x011B } }, { { 0x00E8, 0x00FF, 0x0088, 0x0119 } },
}

Each partner's equipment set and what wearing it whole adds (computeStats)

Definition at line 174 of file stats.c.

Referenced by computeStats().

◆ EQUIP_SET_BONUSES

s16 EQUIP_SET_BONUSES[][6]
Initial value:
= {
{ 4, 4, 4, 4, 4, 20 }, { 10, 10, 0, 0, 0, 20 }, { 10, 0, 0, 0, 10, 20 }, { 0, 10, 10, 0, 0, 20 },
{ 10, 0, 0, 10, 0, 20 }, { 0, 0, 0, 10, 10, 20 }, { 10, 0, 10, 0, 0, 20 }, { 0, 10, 0, 10, 0, 20 },
}

Definition at line 180 of file stats.c.

Referenced by computeStats().