summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authordannye <33dannye@gmail.com>2021-03-25 17:39:44 -0500
committerdannye <33dannye@gmail.com>2021-03-25 17:39:44 -0500
commiteb47bda8ee5c1f002236200df36012de9e243a97 (patch)
treefc69fc5435582efebd36fc54414673dd8ac7f646 /engine
parentd07a66662728225c1422fed1072281dee71a2c9e (diff)
parent95ec2cf039f0efdc6dadfb6fe766ace231a1b6b1 (diff)
Merge branch 'master' of https://github.com/pret/pokered
Diffstat (limited to 'engine')
-rw-r--r--engine/battle/core.asm10
-rw-r--r--engine/battle/effects.asm4
-rw-r--r--engine/battle/trainer_ai.asm2
-rw-r--r--engine/debug/debug_menu.asm6
-rw-r--r--engine/events/heal_party.asm2
-rw-r--r--engine/items/item_effects.asm11
-rw-r--r--engine/pokemon/add_mon.asm2
-rw-r--r--engine/pokemon/evos_moves.asm4
-rw-r--r--engine/pokemon/learn_move.asm2
9 files changed, 19 insertions, 24 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 79defa33..45dfdc6f 100644
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -1674,7 +1674,7 @@ LoadBattleMonFromParty:
ld bc, wPartyMon1DVs - wPartyMon1OTID
add hl, bc
ld de, wBattleMonDVs
- ld bc, NUM_DVS
+ ld bc, wPartyMon1PP - wPartyMon1DVs
call CopyData
ld de, wBattleMonPP
ld bc, NUM_MOVES
@@ -1718,7 +1718,7 @@ LoadEnemyMonFromParty:
ld bc, wEnemyMon1DVs - wEnemyMon1OTID
add hl, bc
ld de, wEnemyMonDVs
- ld bc, NUM_DVS
+ ld bc, wEnemyMon1PP - wEnemyMon1DVs
call CopyData
ld de, wEnemyMonPP
ld bc, NUM_MOVES
@@ -5270,7 +5270,7 @@ ReloadMoveData:
ld [wd11e], a
dec a
ld hl, Moves
- ld bc, MoveEnd - Moves
+ ld bc, MOVE_LENGTH
call AddNTimes
ld a, BANK(Moves)
call FarCopyData ; copy the move's stats
@@ -5302,7 +5302,7 @@ MetronomePickMove:
call BattleRandom
and a
jr z, .pickMoveLoop
- cp NUM_ATTACKS + 1 ; max normal move number + 1 (this is Struggle's move number)
+ cp NUM_ATTACKS ; max move number (including Struggle)
jr nc, .pickMoveLoop
cp METRONOME
jr z, .pickMoveLoop
@@ -6257,7 +6257,7 @@ GetCurrentMove:
ld [wd0b5], a
dec a
ld hl, Moves
- ld bc, MoveEnd - Moves
+ ld bc, MOVE_LENGTH
call AddNTimes
ld a, BANK(Moves)
call FarCopyData
diff --git a/engine/battle/effects.asm b/engine/battle/effects.asm
index 3762caea..6f860cd2 100644
--- a/engine/battle/effects.asm
+++ b/engine/battle/effects.asm
@@ -776,7 +776,7 @@ FellText:
text_end
PrintStatText:
- ld hl, StatsTextStrings
+ ld hl, StatModTextStrings
ld c, "@"
.findStatName_outer
dec b
@@ -791,7 +791,7 @@ PrintStatText:
ld bc, $a
jp CopyData
-INCLUDE "data/battle/stat_names.asm"
+INCLUDE "data/battle/stat_mod_names.asm"
INCLUDE "data/battle/stat_modifiers.asm"
diff --git a/engine/battle/trainer_ai.asm b/engine/battle/trainer_ai.asm
index a2c5e5fb..3efbeeda 100644
--- a/engine/battle/trainer_ai.asm
+++ b/engine/battle/trainer_ai.asm
@@ -264,7 +264,7 @@ ReadMove:
push bc
dec a
ld hl, Moves
- ld bc, MoveEnd - Moves
+ ld bc, MOVE_LENGTH
call AddNTimes
ld de, wEnemyMoveNum
call CopyData
diff --git a/engine/debug/debug_menu.asm b/engine/debug/debug_menu.asm
index e0e2d511..43638be3 100644
--- a/engine/debug/debug_menu.asm
+++ b/engine/debug/debug_menu.asm
@@ -1048,7 +1048,7 @@ Func_feeef:
ld [wd11e], a
ld hl, BaseStats + 15
dec a
- ld bc, MonBaseStatsEnd - MonBaseStats
+ ld bc, BASE_DATA_SIZE
call AddNTimes
ld de, wMoves
ld bc, NUM_MOVES
@@ -1122,7 +1122,7 @@ Func_fef92:
ld a, [de]
inc a
ld [de], a
- cp NUM_ATTACKS + 1
+ cp NUM_ATTACKS
jr c, Func_fef68
ld a, 1
ld [de], a
@@ -1133,7 +1133,7 @@ Func_fef9e:
dec a
ld [de], a
jr nz, Func_fef68
- ld a, NUM_ATTACKS
+ ld a, NUM_ATTACKS - 1
ld [de], a
jr Func_fef68
diff --git a/engine/events/heal_party.asm b/engine/events/heal_party.asm
index 7aaa1bd1..b26bc90f 100644
--- a/engine/events/heal_party.asm
+++ b/engine/events/heal_party.asm
@@ -35,7 +35,7 @@ HealParty:
push bc
ld hl, Moves
- ld bc, MoveEnd - Moves
+ ld bc, MOVE_LENGTH
call AddNTimes
ld de, wcd6d
ld a, BANK(Moves)
diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm
index 9b584e9b..9d6a3c06 100644
--- a/engine/items/item_effects.asm
+++ b/engine/items/item_effects.asm
@@ -1417,7 +1417,7 @@ ItemUseMedicine:
ld [hl], a
pop hl
call .recalculateStats
- ld hl, VitaminText
+ ld hl, VitaminStats
ld a, [wcf91]
sub HP_UP - 1
ld c, a
@@ -1563,12 +1563,7 @@ VitaminNoEffectText:
text_far _VitaminNoEffectText
text_end
-VitaminText:
- db "HEALTH@"
- db "ATTACK@"
- db "DEFENSE@"
- db "SPEED@"
- db "SPECIAL@"
+INCLUDE "data/battle/stat_names.asm"
ItemUseBait:
ld hl, ThrewBaitText
@@ -2772,7 +2767,7 @@ GetMaxPP:
dec a
push hl
ld hl, Moves
- ld bc, MoveEnd - Moves
+ ld bc, MOVE_LENGTH
call AddNTimes
ld de, wcd6d
ld a, BANK(Moves)
diff --git a/engine/pokemon/add_mon.asm b/engine/pokemon/add_mon.asm
index 54d7b4de..e86b7b61 100644
--- a/engine/pokemon/add_mon.asm
+++ b/engine/pokemon/add_mon.asm
@@ -265,7 +265,7 @@ AddPartyMon_WriteMovePP:
push de
push bc
ld hl, Moves
- ld bc, MoveEnd - Moves
+ ld bc, MOVE_LENGTH
call AddNTimes
ld de, wcd6d
ld a, BANK(Moves)
diff --git a/engine/pokemon/evos_moves.asm b/engine/pokemon/evos_moves.asm
index 7c1476d3..165ae02d 100644
--- a/engine/pokemon/evos_moves.asm
+++ b/engine/pokemon/evos_moves.asm
@@ -166,7 +166,7 @@ Evolution_PartyMonLoop: ; loop over party mons
ld a, [wd11e]
dec a
ld hl, BaseStats
- ld bc, MonBaseStatsEnd - MonBaseStats
+ ld bc, BASE_DATA_SIZE
call AddNTimes
ld de, wMonHeader
call CopyData
@@ -584,7 +584,7 @@ WriteMonMoves:
push hl
dec a
ld hl, Moves
- ld bc, MoveEnd - Moves
+ ld bc, MOVE_LENGTH
call AddNTimes
ld de, wBuffer
ld a, BANK(Moves)
diff --git a/engine/pokemon/learn_move.asm b/engine/pokemon/learn_move.asm
index ff704003..9f4ac2d2 100644
--- a/engine/pokemon/learn_move.asm
+++ b/engine/pokemon/learn_move.asm
@@ -44,7 +44,7 @@ DontAbandonLearning:
push de
dec a
ld hl, Moves
- ld bc, MoveEnd - Moves
+ ld bc, MOVE_LENGTH
call AddNTimes
ld de, wBuffer
ld a, BANK(Moves)