summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-11-03 10:12:54 -0500
committerRangi <remy.oukaour+rangi42@gmail.com>2020-11-03 10:12:54 -0500
commitb56c1b6351f51742903250ee0c4eae9d22e2b6a5 (patch)
treee288ee3655a5c4c9d383370c4eb4102f1ad8f9a0
parent980153ac472870602a51779dbff623ea0072ed98 (diff)
More syncing with pokecrystal
-rw-r--r--constants/mart_constants.asm1
-rw-r--r--data/items/marts.asm1
-rw-r--r--engine/battle/core.asm2
-rw-r--r--engine/battle/effect_commands.asm10
-rw-r--r--engine/battle/move_effects/belly_drum.asm2
-rw-r--r--engine/battle/move_effects/present.asm2
-rw-r--r--engine/battle/used_move_text.asm2
-rw-r--r--engine/events/specials.asm5
-rw-r--r--engine/items/item_effects.asm2
-rw-r--r--engine/items/mart.asm2
-rw-r--r--maps/Route15.asm2
11 files changed, 15 insertions, 16 deletions
diff --git a/constants/mart_constants.asm b/constants/mart_constants.asm
index cffdfae0..fcef8bda 100644
--- a/constants/mart_constants.asm
+++ b/constants/mart_constants.asm
@@ -41,3 +41,4 @@
const MART_MT_MOON
const MART_INDIGO_PLATEAU
const MART_UNDERGROUND
+NUM_MARTS EQU const_value
diff --git a/data/items/marts.asm b/data/items/marts.asm
index 1d48ea53..37bf846b 100644
--- a/data/items/marts.asm
+++ b/data/items/marts.asm
@@ -34,7 +34,6 @@ Marts:
dw MartMtMoon
dw MartIndigoPlateau
dw MartUnderground
-.End
MartCherrygrove:
db 4 ; # items
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 21da8405..ca8ac21e 100644
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -7006,7 +7006,7 @@ GiveExperiencePoints:
.skip_active_mon_update
; level up happiness mod
- ld c, 1
+ ld c, HAPPINESS_GAINLEVEL
callfar ChangeHappiness
ld a, [wCurBattleMon]
ld b, a
diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm
index 12f7a101..2560c33d 100644
--- a/engine/battle/effect_commands.asm
+++ b/engine/battle/effect_commands.asm
@@ -3632,9 +3632,9 @@ BattleCommand_SleepTarget:
.random_loop
call BattleRandom
- and 7
+ and SLP
jr z, .random_loop
- cp 7
+ cp SLP
jr z, .random_loop
inc a
ld [de], a
@@ -4667,7 +4667,7 @@ GetStatName:
.Copy:
ld de, wStringBuffer2
- ld bc, 10
+ ld bc, NAME_LENGTH - 1
jp CopyBytes
INCLUDE "data/battle/stat_names.asm"
@@ -5669,7 +5669,7 @@ BattleCommand_Charge:
text_end
BattleCommand_Unused3C:
-; unused
+; effect0x3c
ret
BattleCommand_TrapTarget:
@@ -6440,7 +6440,7 @@ INCLUDE "engine/battle/move_effects/sandstorm.asm"
INCLUDE "engine/battle/move_effects/rollout.asm"
BattleCommand_Unused5D:
-; unused
+; effect0x5d
ret
INCLUDE "engine/battle/move_effects/fury_cutter.asm"
diff --git a/engine/battle/move_effects/belly_drum.asm b/engine/battle/move_effects/belly_drum.asm
index 5b1361f2..847eaff0 100644
--- a/engine/battle/move_effects/belly_drum.asm
+++ b/engine/battle/move_effects/belly_drum.asm
@@ -18,7 +18,7 @@ BattleCommand_BellyDrum:
callfar SubtractHPFromUser
call UpdateUserInParty
-rept 5
+rept MAX_STAT_LEVEL - BASE_STAT_LEVEL - 1
call BattleCommand_AttackUp2
endr
diff --git a/engine/battle/move_effects/present.asm b/engine/battle/move_effects/present.asm
index 0577e76b..ad13c0a9 100644
--- a/engine/battle/move_effects/present.asm
+++ b/engine/battle/move_effects/present.asm
@@ -34,7 +34,7 @@ BattleCommand_Present:
.heal_effect
pop bc
- ld a, 3
+ ld a, $3 ; heal animation
ld [wBattleAnimParam], a
call AnimateCurrentMove
call BattleCommand_SwitchTurn
diff --git a/engine/battle/used_move_text.asm b/engine/battle/used_move_text.asm
index afc735f9..2fb53901 100644
--- a/engine/battle/used_move_text.asm
+++ b/engine/battle/used_move_text.asm
@@ -1,5 +1,5 @@
BattleCommand_UsedMoveText:
-; battle command 03
+; usedmovetext
ld hl, UsedMoveText
call PrintText
jp WaitBGMap
diff --git a/engine/events/specials.asm b/engine/events/specials.asm
index 0b3e3560..7a176a1b 100644
--- a/engine/events/specials.asm
+++ b/engine/events/specials.asm
@@ -81,13 +81,12 @@ NameRival:
ld b, NAME_RIVAL
ld de, wRivalName
farcall _NamingScreen
- ; default to "SILVER"
ld hl, wRivalName
- ld de, .default
+ ld de, .DefaultName
call InitName
ret
-.default
+.DefaultName:
IF DEF(_GOLD)
db "SILVER@"
ELIF DEF(_SILVER)
diff --git a/engine/items/item_effects.asm b/engine/items/item_effects.asm
index 7b43eb82..721819a7 100644
--- a/engine/items/item_effects.asm
+++ b/engine/items/item_effects.asm
@@ -1304,7 +1304,7 @@ RareCandyEffect:
ld a, [hl]
adc b
ld [hl], a
- ld c, 1
+ ld c, HAPPINESS_GAINLEVEL
farcall ChangeHappiness
ld a, PARTYMENUTEXT_LEVEL_UP
diff --git a/engine/items/mart.asm b/engine/items/mart.asm
index 16bb9c33..2ab56231 100644
--- a/engine/items/mart.asm
+++ b/engine/items/mart.asm
@@ -8,7 +8,7 @@
GetMart:
ld a, e
- cp (Marts.End - Marts) / 2
+ cp NUM_MARTS
jr c, .IsAMart
ld b, BANK(DefaultMart)
ld de, DefaultMart
diff --git a/maps/Route15.asm b/maps/Route15.asm
index 7740957a..88d66e01 100644
--- a/maps/Route15.asm
+++ b/maps/Route15.asm
@@ -193,7 +193,7 @@ SchoolboyBillyAfterBattleText:
done
Route15SignText:
- text "Route 15"
+ text "Route 15" ; should be "ROUTE 15"
para "FUCHSIA CITY -"
line "LAVENDER TOWN"