summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2020-11-03 10:13:06 -0500
committerRangi <remy.oukaour+rangi42@gmail.com>2020-11-03 10:13:06 -0500
commit826e070f0443b50ff31a49b4faf7c66577f1e26e (patch)
tree5a466635490c15e6a9e78e037507a22fceb1da9f /engine
parent01d6e6c75843fdc0035499ce0214c19be74a9bda (diff)
More syncing with pokegold
Diffstat (limited to 'engine')
-rw-r--r--engine/battle/effect_commands.asm12
-rw-r--r--engine/battle/move_effects/belly_drum.asm2
-rw-r--r--engine/battle/used_move_text.asm1
-rw-r--r--engine/events/shuckle.asm2
-rw-r--r--engine/events/specials.asm5
-rw-r--r--engine/games/slot_machine.asm4
-rw-r--r--engine/items/mart.asm2
-rw-r--r--engine/pokemon/level_up_happiness.asm2
8 files changed, 15 insertions, 15 deletions
diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm
index 14f1afd82..53d1d9ff0 100644
--- a/engine/battle/effect_commands.asm
+++ b/engine/battle/effect_commands.asm
@@ -3652,17 +3652,17 @@ BattleCommand_SleepTarget:
jr nz, .fail
call AnimateCurrentMove
- ld b, $7
+ ld b, SLP
ld a, [wInBattleTowerBattle]
and a
jr z, .random_loop
- ld b, $3
+ ld b, %011
.random_loop
call BattleRandom
and b
jr z, .random_loop
- cp 7
+ cp SLP
jr z, .random_loop
inc a
ld [de], a
@@ -5714,7 +5714,8 @@ BattleCommand_Charge:
text_far _BattleDugText
text_end
-BattleCommand_Unused3C: ; unreferenced
+BattleCommand_Unused3C:
+; effect0x3c
ret
BattleCommand_TrapTarget:
@@ -6488,7 +6489,8 @@ INCLUDE "engine/battle/move_effects/sandstorm.asm"
INCLUDE "engine/battle/move_effects/rollout.asm"
-BattleCommand_Unused5D: ; unreferenced
+BattleCommand_Unused5D:
+; 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 ac415f576..912f702bd 100644
--- a/engine/battle/move_effects/belly_drum.asm
+++ b/engine/battle/move_effects/belly_drum.asm
@@ -17,7 +17,7 @@ BattleCommand_BellyDrum:
pop bc
callfar SubtractHPFromUser
call UpdateUserInParty
- ld a, 5
+ ld a, MAX_STAT_LEVEL - BASE_STAT_LEVEL - 1
.max_attack_loop
push af
diff --git a/engine/battle/used_move_text.asm b/engine/battle/used_move_text.asm
index 605c48e30..c53378907 100644
--- a/engine/battle/used_move_text.asm
+++ b/engine/battle/used_move_text.asm
@@ -1,5 +1,4 @@
DisplayUsedMoveText:
-; battle command 03
ld hl, UsedMoveText
call BattleTextbox
jp WaitBGMap
diff --git a/engine/events/shuckle.asm b/engine/events/shuckle.asm
index 85bcce629..3a5f872e2 100644
--- a/engine/events/shuckle.asm
+++ b/engine/events/shuckle.asm
@@ -15,7 +15,7 @@ GiveShuckle:
jr nc, .NotGiven
; Caught data.
- ld b, 0
+ ld b, CAUGHT_BY_UNKNOWN
farcall SetGiftPartyMonCaughtData
; Holding a Berry.
diff --git a/engine/events/specials.asm b/engine/events/specials.asm
index 1333f27ce..f49d358f4 100644
--- a/engine/events/specials.asm
+++ b/engine/events/specials.asm
@@ -87,13 +87,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:
db "SILVER@"
NameRater:
diff --git a/engine/games/slot_machine.asm b/engine/games/slot_machine.asm
index 2688995b4..8962f4424 100644
--- a/engine/games/slot_machine.asm
+++ b/engine/games/slot_machine.asm
@@ -206,7 +206,7 @@ SlotsLoop:
ld a, [wFirstTwoReelsMatchingSevens]
and a
jr nz, .matching_sevens
- ld a, %11100100 ; alternates two palettes
+ ld a, %11100100
call DmgToCgbBGPals
ret
@@ -215,7 +215,7 @@ SlotsLoop:
and $7
ret nz
ldh a, [rBGP]
- xor %00001100
+ xor %00001100 ; alternates two palettes
call DmgToCgbBGPals
ret
diff --git a/engine/items/mart.asm b/engine/items/mart.asm
index b74fa79a6..875e6d5cc 100644
--- a/engine/items/mart.asm
+++ b/engine/items/mart.asm
@@ -113,7 +113,7 @@ LoadMartPointer:
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/engine/pokemon/level_up_happiness.asm b/engine/pokemon/level_up_happiness.asm
index 533399d9f..3dac4e671 100644
--- a/engine/pokemon/level_up_happiness.asm
+++ b/engine/pokemon/level_up_happiness.asm
@@ -3,7 +3,7 @@ LevelUpHappinessMod:
ld hl, wPartyMon1CaughtLocation
call GetPartyLocation
ld a, [hl]
- and $7f
+ and CAUGHT_LOCATION_MASK
ld d, a
ld a, [wMapGroup]
ld b, a