Skip to content

Commit

Permalink
Consolidate the duplicate stat level data files
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 committed Jun 12, 2024
1 parent 8819f7b commit 4f57e96
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 24 deletions.
6 changes: 3 additions & 3 deletions data/battle/stat_multipliers.asm
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
; Multiplier ratios for all stats from modifier -6 to +6
; (except accuracy, see data/battle/accuracy_multipliers.asm).

; This table is identical to data/battle/stat_multipliers_2.asm.
; This one is used by CalcBattleStats.
; This table is INCLUDEd twice in different ROM banks:
; once for CalcBattleStats (see engine/battle/effect_commands.asm),
; and once for ApplyStatLevelMultiplier (see engine/battle/core.asm).

StatLevelMultipliers:
db 25, 100 ; -6 = 25%
db 28, 100 ; -5 = 28%
db 33, 100 ; -4 = 33%
Expand Down
20 changes: 0 additions & 20 deletions data/battle/stat_multipliers_2.asm

This file was deleted.

3 changes: 2 additions & 1 deletion engine/battle/core.asm
Original file line number Diff line number Diff line change
Expand Up @@ -6756,7 +6756,8 @@ ApplyStatLevelMultiplier:
pop bc
ret

INCLUDE "data/battle/stat_multipliers_2.asm"
StatLevelMultipliers_Applied:
INCLUDE "data/battle/stat_multipliers.asm"

BadgeStatBoosts:
; Raise the stats of the battle mon in wBattleMon
Expand Down
1 change: 1 addition & 0 deletions engine/battle/effect_commands.asm
Original file line number Diff line number Diff line change
Expand Up @@ -4622,6 +4622,7 @@ GetStatName:

INCLUDE "data/battle/stat_names.asm"

StatLevelMultipliers:
INCLUDE "data/battle/stat_multipliers.asm"

BattleCommand_AllStatsUp:
Expand Down

0 comments on commit 4f57e96

Please sign in to comment.