Digimon World 3 decomp
The European version, SLES_039.36
Loading...
Searching...
No Matches
damage.c File Reference

FIGHTSTG's damage and healing. More...

Include dependency graph for damage.c:

Go to the source code of this file.

Functions

s32 FIGHTSTG_getElementBoost (s32 value, s32 element)
 What the battle's element boost adds to value for a technique of the given element: the boost's amount in 128ths of value for the boosted element, half as much taken off for the element it weakens, nothing otherwise.
 
s32 FIGHTSTG_adjustDamage (u8 side, s32 id, s32 value)
 A hit's damage from its base value: the element boost, half again against the target's family, the user's damage bonus, the element against the target's resistance, the triple hit's 0.4, a critical hit and the target's damage cut; at most 5 times value.
 
s32 FIGHTSTG_computeDamage (u8 side, s32 id)
 A technique's power from the user's attack against the target's defense (an enemy's scaled by its unkA / 16), passed on to FIGHTSTG_adjustDamage.
 
s32 FIGHTSTG_computeMagicDamage (u8 side, s32 id)
 A magic technique's damage: its power by the user's spirit against the target's (half to twice as much), the element boost and resistance, half again against the target's family, a critical hit and the target's damage cut; at most 5 times the power.
 
s32 FIGHTSTG_getDamage (s32 *args)
 getDamage: the damage of an event (args: the side, the fighter and the base damage) to the fighter if it is its side's active one, less a tenth of its resist[1] and resist[RESIST_POISON], as a part of its max HP: at least 1, at most half the max HP.
 
s32 FIGHTSTG_computeCounterDamage (u8 side, s32 id, s32 value)
 The damage of a counterattack on value: the partner's first skill deals it as one hit (the triple hit set aside), another technique its power in 64ths of value (32nds when the fighter is special)
 
s32 FIGHTSTG_computeHeal (u8 side, s32 id)
 The HP a healing technique restores: 64 times its power, and an eighth of it per point of the user's wisdom.
 
s32 FIGHTSTG_getHeal (u8 side, s32 index, s32 big)
 The HP a fighter regains: 8 to 16 128ths of its max HP when big, 4 to 8 otherwise.
 

Variables

s32 FIGHTSTG_opposedElements []
 the element whose boost (FIGHTSTG_getElementBoost) weakens each one
 

Detailed Description

FIGHTSTG's damage and healing.

Definition in file damage.c.

Function Documentation

◆ FIGHTSTG_getElementBoost()

s32 FIGHTSTG_getElementBoost ( s32  value,
s32  element 
)

What the battle's element boost adds to value for a technique of the given element: the boost's amount in 128ths of value for the boosted element, half as much taken off for the element it weakens, nothing otherwise.

Definition at line 16 of file damage.c.

Referenced by FIGHTSTG_adjustDamage(), and FIGHTSTG_computeMagicDamage().

Here is the caller graph for this function:

◆ FIGHTSTG_adjustDamage()

s32 FIGHTSTG_adjustDamage ( u8  side,
s32  id,
s32  value 
)

A hit's damage from its base value: the element boost, half again against the target's family, the user's damage bonus, the element against the target's resistance, the triple hit's 0.4, a critical hit and the target's damage cut; at most 5 times value.

< under it, the technique has none

Definition at line 35 of file damage.c.

Referenced by FIGHTSTG_computeCounterDamage(), and FIGHTSTG_computeDamage().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FIGHTSTG_computeDamage()

s32 FIGHTSTG_computeDamage ( u8  side,
s32  id 
)

A technique's power from the user's attack against the target's defense (an enemy's scaled by its unkA / 16), passed on to FIGHTSTG_adjustDamage.

The match depends on the division in each branch.

< physical damage

< against it

< physical damage

< against it

Definition at line 89 of file damage.c.

Here is the call graph for this function:

◆ FIGHTSTG_computeMagicDamage()

s32 FIGHTSTG_computeMagicDamage ( u8  side,
s32  id 
)

A magic technique's damage: its power by the user's spirit against the target's (half to twice as much), the element boost and resistance, half again against the target's family, a critical hit and the target's damage cut; at most 5 times the power.

< magic damage, and against it

< magic damage, and against it

Definition at line 122 of file damage.c.

Here is the call graph for this function:

◆ FIGHTSTG_getDamage()

s32 FIGHTSTG_getDamage ( s32 *  args)

getDamage: the damage of an event (args: the side, the fighter and the base damage) to the fighter if it is its side's active one, less a tenth of its resist[1] and resist[RESIST_POISON], as a part of its max HP: at least 1, at most half the max HP.

The match depends on the fighter pointer.

Definition at line 196 of file damage.c.

Here is the call graph for this function:

◆ FIGHTSTG_computeCounterDamage()

s32 FIGHTSTG_computeCounterDamage ( u8  side,
s32  id,
s32  value 
)

The damage of a counterattack on value: the partner's first skill deals it as one hit (the triple hit set aside), another technique its power in 64ths of value (32nds when the fighter is special)

Definition at line 232 of file damage.c.

Here is the call graph for this function:

◆ FIGHTSTG_computeHeal()

s32 FIGHTSTG_computeHeal ( u8  side,
s32  id 
)

The HP a healing technique restores: 64 times its power, and an eighth of it per point of the user's wisdom.

< magic accuracy, statuses and heals

Definition at line 272 of file damage.c.

Here is the call graph for this function:

◆ FIGHTSTG_getHeal()

s32 FIGHTSTG_getHeal ( u8  side,
s32  index,
s32  big 
)

The HP a fighter regains: 8 to 16 128ths of its max HP when big, 4 to 8 otherwise.

Definition at line 306 of file damage.c.

Variable Documentation

◆ FIGHTSTG_opposedElements

s32 FIGHTSTG_opposedElements[]
Initial value:
= {
0, 0, 4, 2,
5, 3, 7, 8,
6,
}

the element whose boost (FIGHTSTG_getElementBoost) weakens each one

Definition at line 6 of file damage.c.

Referenced by FIGHTSTG_getElementBoost().