Skip to content

Commit

Permalink
Rename event constants for Jessie/James battles
Browse files Browse the repository at this point in the history
  • Loading branch information
Rangi42 committed Jul 24, 2024
1 parent 4709eb3 commit c1d6510
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 32 deletions.
15 changes: 7 additions & 8 deletions constants/event_constants.asm
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,9 @@
const_skip 3
const EVENT_BEAT_GHOST_MAROWAK
const_skip
const EVENT_BEAT_POKEMONTOWER_7_TRAINER_0
const EVENT_BEAT_POKEMONTOWER_7_TRAINER_1
const EVENT_BEAT_POKEMONTOWER_7_TRAINER_2
const_skip 3
const EVENT_BEAT_POKEMONTOWER_7_JESSIE_JAMES
const EVENT_POKEMONTOWER_7_JESSIE_JAMES_ON_LEFT
const_skip 4
const EVENT_RESCUED_MR_FUJI_2
const_skip 16
const EVENT_GOT_POKE_FLUTE
Expand Down Expand Up @@ -555,10 +554,10 @@
const EVENT_BEAT_MT_MOON_1_TRAINER_6
const EVENT_GOT_DOME_FOSSIL
const EVENT_BEAT_MT_MOON_EXIT_SUPER_NERD
const EVENT_BEAT_MT_MOON_3_JESSIE_JAMES
const EVENT_BEAT_MT_MOON_3_TRAINER_0
const EVENT_BEAT_MT_MOON_3_TRAINER_1
const EVENT_BEAT_MT_MOON_3_TRAINER_2
const EVENT_BEAT_MT_MOON_3_TRAINER_3
const EVENT_57E
const EVENT_GOT_HELIX_FOSSIL

Expand Down Expand Up @@ -622,8 +621,8 @@
const_skip 13
const EVENT_6A0
const_skip
const EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_0
const EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_1
const EVENT_BEAT_ROCKET_HIDEOUT_4_JESSIE_JAMES
const EVENT_ROCKET_HIDEOUT_4_JESSIE_JAMES_ON_LEFT
const EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2
const EVENT_ROCKET_HIDEOUT_4_DOOR_UNLOCKED
const EVENT_ROCKET_DROPPED_LIFT_KEY
Expand Down Expand Up @@ -703,8 +702,8 @@
const EVENT_781
const EVENT_782
const_skip
const EVENT_BEAT_SILPH_CO_11F_JESSIE_JAMES
const EVENT_BEAT_SILPH_CO_11F_TRAINER_0
const EVENT_BEAT_SILPH_CO_11F_TRAINER_1
const_skip 2
const EVENT_SILPH_CO_11_UNLOCKED_DOOR
const_skip 4
Expand Down
10 changes: 5 additions & 5 deletions scripts/MtMoonB2F.asm
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ IF DEF(_DEBUG)
ENDC
CheckEitherEventSet EVENT_GOT_DOME_FOSSIL, EVENT_GOT_HELIX_FOSSIL
call z, MtMoonB2FScript_49d28
CheckEvent EVENT_BEAT_MT_MOON_3_TRAINER_0
CheckEvent EVENT_BEAT_MT_MOON_3_JESSIE_JAMES
call z, MtMoonB2FScript_49e15
ret

Expand Down Expand Up @@ -395,7 +395,7 @@ MtMoonB2FScript15:
xor a
ldh [hJoyHeld], a
ld [wJoyIgnore], a
SetEvent EVENT_BEAT_MT_MOON_3_TRAINER_0
SetEvent EVENT_BEAT_MT_MOON_3_JESSIE_JAMES
ResetEventReuseHL EVENT_57E
ld a, SCRIPT_MTMOONB2F_DEFAULT
call MtMoonB2FSetScript
Expand Down Expand Up @@ -433,11 +433,11 @@ MtMoonB2F_TextPointers:
MtMoon3TrainerHeaders:
def_trainers 3
MtMoon3TrainerHeader0:
trainer EVENT_BEAT_MT_MOON_3_TRAINER_1, 4, MtMoonB2FRocket2BattleText, MtMoonB2FRocket2EndBattleText, MtMoonB2FRocket2AfterBattleText
trainer EVENT_BEAT_MT_MOON_3_TRAINER_0, 4, MtMoonB2FRocket2BattleText, MtMoonB2FRocket2EndBattleText, MtMoonB2FRocket2AfterBattleText
MtMoon3TrainerHeader1:
trainer EVENT_BEAT_MT_MOON_3_TRAINER_2, 4, MtMoonB2FRocket3BattleText, MtMoonB2FRocket3EndBattleText, MtMoonB2FRocket3AfterBattleText
trainer EVENT_BEAT_MT_MOON_3_TRAINER_1, 4, MtMoonB2FRocket3BattleText, MtMoonB2FRocket3EndBattleText, MtMoonB2FRocket3AfterBattleText
MtMoon3TrainerHeader2:
trainer EVENT_BEAT_MT_MOON_3_TRAINER_3, 4, MtMoonB2FRocket4BattleText, MtMoonB2FRocket4EndBattleText, MtMoonB2FRocket4AfterBattleText
trainer EVENT_BEAT_MT_MOON_3_TRAINER_2, 4, MtMoonB2FRocket4BattleText, MtMoonB2FRocket4EndBattleText, MtMoonB2FRocket4AfterBattleText
db -1 ; end

MtMoonB2FJessieJamesText:
Expand Down
16 changes: 8 additions & 8 deletions scripts/PokemonTower7F.asm
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,22 @@ IF DEF(_DEBUG)
call DebugPressedOrHeldB
ret nz
ENDC
CheckEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_0
CheckEvent EVENT_BEAT_POKEMONTOWER_7_JESSIE_JAMES
call z, PokemonTower7FScript_60d2a
ret

PokemonTower7FScript_60d2a:
ld a, [wYCoord]
cp $c
ret nz
ResetEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_1
ResetEvent EVENT_POKEMONTOWER_7_JESSIE_JAMES_ON_LEFT
ld a, [wXCoord]
cp $a
jr z, .asm_60d47
ld a, [wXCoord] ; why?
cp $b
ret nz
SetEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_1
SetEvent EVENT_POKEMONTOWER_7_JESSIE_JAMES_ON_LEFT
.asm_60d47
call StopAllMusic
ld c, BANK(Music_MeetJessieJames)
Expand Down Expand Up @@ -82,7 +82,7 @@ PokemonTower7FMovementData_60d7b:

PokemonTower7FScript1:
ld de, PokemonTower7FMovementData_60d7b
CheckEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_1
CheckEvent EVENT_POKEMONTOWER_7_JESSIE_JAMES_ON_LEFT
jr z, .asm_60d8c
ld de, PokemonTower7FMovementData_60d7a
.asm_60d8c
Expand All @@ -104,7 +104,7 @@ PokemonTower7FScript2:
PokemonTower7FScript3:
ld a, SPRITE_FACING_DOWN
ld [wSprite01StateData1FacingDirection], a
CheckEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_1
CheckEvent EVENT_POKEMONTOWER_7_JESSIE_JAMES_ON_LEFT
jr z, .asm_60dba
ld a, SPRITE_FACING_RIGHT
ld [wSprite01StateData1FacingDirection], a
Expand All @@ -113,7 +113,7 @@ PokemonTower7FScript3:
ld [wSprite01StateData1MovementStatus], a
PokemonTower7FScript4:
ld de, PokemonTower7FMovementData_60d7a
CheckEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_1
CheckEvent EVENT_POKEMONTOWER_7_JESSIE_JAMES_ON_LEFT
jr z, .asm_60dcc
ld de, PokemonTower7FMovementData_60d7b
.asm_60dcc
Expand All @@ -137,7 +137,7 @@ PokemonTower7FScript6:
ld [wSprite02StateData1MovementStatus], a
ld a, SPRITE_FACING_LEFT
ld [wSprite02StateData1FacingDirection], a
CheckEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_1
CheckEvent EVENT_POKEMONTOWER_7_JESSIE_JAMES_ON_LEFT
jr z, .asm_60dff
ld a, SPRITE_FACING_DOWN
ld [wSprite02StateData1FacingDirection], a
Expand Down Expand Up @@ -217,7 +217,7 @@ PokemonTower7FScript10:
xor a
ldh [hJoyHeld], a
ld [wJoyIgnore], a
SetEvent EVENT_BEAT_POKEMONTOWER_7_TRAINER_0
SetEvent EVENT_BEAT_POKEMONTOWER_7_JESSIE_JAMES
ld a, SCRIPT_POKEMONTOWER7F_SCRIPT0
call PokemonTower7FSetScript
ret
Expand Down
16 changes: 8 additions & 8 deletions scripts/RocketHideoutB4F.asm
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ IF DEF(_DEBUG)
call DebugPressedOrHeldB
ret nz
ENDC
CheckEvent EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_0
CheckEvent EVENT_BEAT_ROCKET_HIDEOUT_4_JESSIE_JAMES
call z, RocketHideoutB4FScript_455a5
CheckEvent EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_2
call z, CheckFightingMapTrainers
Expand All @@ -84,14 +84,14 @@ RocketHideoutB4FScript_455a5:
ld a, [wYCoord]
cp $e
ret nz
ResetEvent EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_1
ResetEvent EVENT_ROCKET_HIDEOUT_4_JESSIE_JAMES_ON_LEFT
ld a, [wXCoord]
cp $18
jr z, .asm_455c2
ld a, [wXCoord]
cp $19
ret nz
SetEvent EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_1
SetEvent EVENT_ROCKET_HIDEOUT_4_JESSIE_JAMES_ON_LEFT
.asm_455c2
xor a
ldh [hJoyHeld], a
Expand Down Expand Up @@ -132,7 +132,7 @@ RocketHideoutB4FJessieJamesMovementData_45606:

RocketHideoutB4FScript4:
ld de, RocketHideoutB4FJessieJamesMovementData_45605
CheckEvent EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_1
CheckEvent EVENT_ROCKET_HIDEOUT_4_JESSIE_JAMES_ON_LEFT
jr z, .asm_45617
ld de, RocketHideoutB4FJessieJamesMovementData_45606
.asm_45617
Expand All @@ -156,7 +156,7 @@ RocketHideoutB4FScript6:
ld [wSprite02StateData1MovementStatus], a
ld a, SPRITE_FACING_LEFT
ld [wSprite02StateData1FacingDirection], a
CheckEvent EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_1
CheckEvent EVENT_ROCKET_HIDEOUT_4_JESSIE_JAMES_ON_LEFT
jr z, .asm_4564a
ld a, SPRITE_FACING_DOWN
ld [wSprite02StateData1FacingDirection], a
Expand All @@ -166,7 +166,7 @@ RocketHideoutB4FScript6:
ld [wJoyIgnore], a
RocketHideoutB4FScript7:
ld de, RocketHideoutB4FJessieJamesMovementData_45606
CheckEvent EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_1
CheckEvent EVENT_ROCKET_HIDEOUT_4_JESSIE_JAMES_ON_LEFT
jr z, .asm_4565f
ld de, RocketHideoutB4FJessieJamesMovementData_45605
.asm_4565f
Expand All @@ -192,7 +192,7 @@ RocketHideoutB4FScript9:
ld [wSprite03StateData1MovementStatus], a
ld a, SPRITE_FACING_DOWN
ld [wSprite03StateData1FacingDirection], a
CheckEvent EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_1
CheckEvent EVENT_ROCKET_HIDEOUT_4_JESSIE_JAMES_ON_LEFT
jr z, .asm_45697
ld a, SPRITE_FACING_RIGHT
ld [wSprite03StateData1FacingDirection], a
Expand Down Expand Up @@ -271,7 +271,7 @@ RocketHideoutB4FScript13:
xor a
ldh [hJoyHeld], a
ld [wJoyIgnore], a
SetEvent EVENT_BEAT_ROCKET_HIDEOUT_4_TRAINER_0
SetEvent EVENT_BEAT_ROCKET_HIDEOUT_4_JESSIE_JAMES
ld a, SCRIPT_ROCKETHIDEOUTB4F_DEFAULT
call RocketHideoutB4FSetScript
ret
Expand Down
6 changes: 3 additions & 3 deletions scripts/SilphCo11F.asm
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ IF DEF(_DEBUG)
call DebugPressedOrHeldB
ret nz
ENDC
CheckEvent EVENT_BEAT_SILPH_CO_11F_TRAINER_0
CheckEvent EVENT_BEAT_SILPH_CO_11F_JESSIE_JAMES
call z, SilphCo11FScript_6229c
CheckEvent EVENT_782
ret nz
Expand Down Expand Up @@ -452,7 +452,7 @@ SilphCo11FScript14:
ldh [hJoyHeld], a
ld [wJoyIgnore], a
ResetEvent EVENT_782
SetEventReuseHL EVENT_BEAT_SILPH_CO_11F_TRAINER_0
SetEventReuseHL EVENT_BEAT_SILPH_CO_11F_JESSIE_JAMES
ld a, SCRIPT_SILPHCO11F_DEFAULT
call SilphCo11FSetCurScript
ret
Expand Down Expand Up @@ -485,7 +485,7 @@ SilphCo11F_TextPointers:
SilphCo11TrainerHeaders:
def_trainers 5
SilphCo11TrainerHeader0:
trainer EVENT_BEAT_SILPH_CO_11F_TRAINER_1, 3, SilphCo11FRocketBattleText, SilphCo11FRocketEndBattleText, SilphCo11FRocketAfterBattleText
trainer EVENT_BEAT_SILPH_CO_11F_TRAINER_0, 3, SilphCo11FRocketBattleText, SilphCo11FRocketEndBattleText, SilphCo11FRocketAfterBattleText
db -1 ; end

SilphCo11FJessieJamesText:
Expand Down

0 comments on commit c1d6510

Please sign in to comment.