mirror of
https://github.com/thornAvery/kep-hack.git
synced 2026-02-21 06:38:40 +13:00
Merge branch 'mistress' into renewables
This commit is contained in:
commit
8ccfe3e992
47 changed files with 544 additions and 452 deletions
|
|
@ -109,14 +109,7 @@ FightingDojoText1: ; gym scaling can be removed to make space
|
|||
text_asm
|
||||
CheckEvent EVENT_POST_GAME_ATTAINED ; No need to view previous stuff, technically you can skip Bide this way but I think that's hilarious
|
||||
jp z, .normalProcessing
|
||||
CheckEvent EVENT_GOT_HITMON ; failsafe
|
||||
jp nz, .continue2
|
||||
CheckEvent EVENT_DEFEATED_FIGHTING_DOJO
|
||||
jp nz, .continue1
|
||||
CheckEventReuseA EVENT_BEAT_KARATE_MASTER
|
||||
jp nz, .continue2
|
||||
.rematchMode ; Rematch functionality. Just loads pre-battle text and his trainer.
|
||||
ld hl, KoichiRematchPreBattleText
|
||||
ld hl, KoichiRematchPreBattleText ; Rematch functionality. Just loads pre-battle text and his trainer.
|
||||
call PrintText
|
||||
ld c, BANK(Music_MeetMaleTrainer)
|
||||
ld a, MUSIC_MEET_MALE_TRAINER
|
||||
|
|
@ -129,7 +122,7 @@ FightingDojoText1: ; gym scaling can be removed to make space
|
|||
ld de, KoichiRematchDefeatedText
|
||||
call SaveEndBattleTextPointers
|
||||
call EngageMapTrainer
|
||||
ld a, OPP_BLACKBELT
|
||||
ld a, OPP_KOICHI
|
||||
ld [wCurOpponent], a
|
||||
ld a, 10 ; Silph Gauntlet lineup.
|
||||
ld [wTrainerNo], a
|
||||
|
|
@ -139,6 +132,12 @@ FightingDojoText1: ; gym scaling can be removed to make space
|
|||
ld [wGymLeaderNo], a
|
||||
jr .asm_9dba4
|
||||
.normalProcessing
|
||||
CheckEvent EVENT_DEFEATED_FIGHTING_DOJO
|
||||
jp nz, .continue1
|
||||
CheckEventReuseA EVENT_BEAT_KARATE_MASTER
|
||||
jp nz, .continue2
|
||||
CheckEvent EVENT_GOT_HITMON ; failsafe
|
||||
jp nz, .continue2
|
||||
ld hl, FightingDojoText_5ce8e
|
||||
call PrintText
|
||||
ld hl, wd72d
|
||||
|
|
@ -153,7 +152,7 @@ FightingDojoText1: ; gym scaling can be removed to make space
|
|||
; call InitBattleEnemyParameters ; put this back if you mess up
|
||||
|
||||
; gym scaling spaghetti code begins here - remove initial parameters as we're making our own
|
||||
ld a, OPP_BLACKBELT
|
||||
ld a, OPP_KOICHI
|
||||
ld [wCurOpponent], a
|
||||
|
||||
ld hl, wObtainedBadges ; Picking the team based on badge count. Need +1 so it loads the right team: remember, you're fighting for the badge! Thanks to Chatot4444 for the help.
|
||||
|
|
|
|||
|
|
@ -285,25 +285,31 @@ OaksLabScript8:
|
|||
ld de, .PikachuMovement1
|
||||
jr z, .moveBlue
|
||||
.PikachuMovement1
|
||||
db NPC_MOVEMENT_LEFT
|
||||
db NPC_MOVEMENT_RIGHT
|
||||
db NPC_MOVEMENT_RIGHT
|
||||
db NPC_MOVEMENT_RIGHT
|
||||
db NPC_MOVEMENT_DOWN
|
||||
db -1 ; end
|
||||
|
||||
.Eevee
|
||||
ld de, .EeveeMovement1
|
||||
ld a, [wYCoord]
|
||||
cp 4 ; is the player standing below the table?
|
||||
jr z, .moveBlue
|
||||
ld de, .EeveeMovement2
|
||||
; ld a, [wYCoord]
|
||||
; cp 4 ; is the player standing below the table?
|
||||
; jr z, .moveBlue
|
||||
; ld de, .EeveeMovement2
|
||||
jp .moveBlue
|
||||
.EeveeMovement1
|
||||
; db NPC_MOVEMENT_DOWN
|
||||
; db NPC_MOVEMENT_LEFT
|
||||
; db NPC_MOVEMENT_LEFT
|
||||
; db NPC_MOVEMENT_UP
|
||||
db NPC_MOVEMENT_RIGHT
|
||||
db NPC_MOVEMENT_RIGHT
|
||||
db NPC_MOVEMENT_DOWN
|
||||
db NPC_MOVEMENT_LEFT
|
||||
db NPC_MOVEMENT_LEFT
|
||||
db NPC_MOVEMENT_UP
|
||||
db -1 ; end
|
||||
.EeveeMovement2
|
||||
db NPC_MOVEMENT_LEFT
|
||||
db NPC_MOVEMENT_LEFT
|
||||
;.EeveeMovement2
|
||||
; db NPC_MOVEMENT_LEFT
|
||||
; db NPC_MOVEMENT_LEFT
|
||||
db -1 ; end
|
||||
|
||||
.moveBlue
|
||||
|
|
@ -323,9 +329,20 @@ OaksLabScript9: ; This is where Blue picks up the ball and removes the sprite.
|
|||
ld [wJoyIgnore], a
|
||||
ld a, $1
|
||||
ldh [hSpriteIndex], a
|
||||
|
||||
; So when using this new table system, we actually need to add cases for when you have the new starters...
|
||||
|
||||
ld a, [wPlayerStarter]
|
||||
cp STARTER4
|
||||
jr z, .skip
|
||||
cp STARTER5
|
||||
jr z, .skip
|
||||
; Since he's just moved down, we just need to skip this process. It's actually harder for him to pick up the regular starters!
|
||||
ld a, SPRITE_FACING_UP
|
||||
ldh [hSpriteFacingDirection], a
|
||||
call SetSpriteFacingDirectionAndDelay
|
||||
.skip
|
||||
|
||||
ld a, $d
|
||||
ldh [hSpriteIndexOrTextID], a
|
||||
call DisplayTextID
|
||||
|
|
@ -361,11 +378,21 @@ OaksLabScript9: ; This is where Blue picks up the ball and removes the sprite.
|
|||
ld [wcf91], a
|
||||
ld [wd11e], a
|
||||
call GetMonName
|
||||
|
||||
; why does he do this twice why does he do this twice why does he do this twice
|
||||
ld a, [wPlayerStarter]
|
||||
cp STARTER4
|
||||
jr z, .skip2
|
||||
cp STARTER5
|
||||
jr z, .skip2
|
||||
|
||||
ld a, $1
|
||||
ldh [hSpriteIndex], a
|
||||
ld a, SPRITE_FACING_UP
|
||||
ldh [hSpriteFacingDirection], a
|
||||
call SetSpriteFacingDirectionAndDelay
|
||||
|
||||
.skip2
|
||||
ld a, $e
|
||||
ldh [hSpriteIndexOrTextID], a
|
||||
call DisplayTextID
|
||||
|
|
@ -803,6 +830,7 @@ OaksLab_TextPointers:
|
|||
dw OaksLabText27
|
||||
dw OaksLabTextPikachu
|
||||
dw OaksLabTextEevee
|
||||
dw OakLabEmailText
|
||||
|
||||
OaksLab_TextPointers2:
|
||||
dw OaksLabText1
|
||||
|
|
@ -1368,3 +1396,15 @@ PikachuEeveeShows:
|
|||
db HS_DAMIEN ; Charmander guy
|
||||
db HS_VERMILION_JENNY ; Squirtle
|
||||
db -1 ; end
|
||||
|
||||
; Moved here to turn into a new bg event
|
||||
OakLabEmailText:
|
||||
text_asm
|
||||
call EnableAutoTextBoxDrawing
|
||||
ld hl, OakLabEmailTextGet
|
||||
call PrintText
|
||||
jp TextScriptEnd
|
||||
|
||||
OakLabEmailTextGet:
|
||||
text_far _OakLabEmailText
|
||||
text_end
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ SilphCo1F_ScriptPointers:
|
|||
dw SilphCo1FScript1
|
||||
|
||||
SilphCo1FScript0:
|
||||
ResetEvent EVENT_BEAT_CHIEF ; Used so you can rematch Chief and later the gauntlet, without him being reset alongside everything else. An absolutely tragic way to fix a bug, but it works. If you enter his room, you have to fight him, so this all works under the hood without infringing on design.
|
||||
ld b, SILPHLETTER
|
||||
call IsItemInBag
|
||||
ret nz
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ ChiefScript3:
|
|||
xor a
|
||||
ld [wIsTrainerBattle], a
|
||||
call UpdateSprites
|
||||
SetEvent EVENT_BEAT_CHIEF
|
||||
SetEvent EVENT_BEAT_CHIEF ; Ensures Chief cannot be rematched in the room.
|
||||
ld a, $f0
|
||||
ld [wJoyIgnore], a
|
||||
ld a, $1
|
||||
|
|
@ -95,7 +95,7 @@ ChiefScript4:
|
|||
ld a, HS_CERULEAN_CAVE_GUY
|
||||
ld [wMissableObjectIndex], a
|
||||
predef HideObject
|
||||
; ResetEventRange SILPH_GAUNTLET_EVENTS_START, SILPH_GAUNTLET_EVENTS_END, 1 ; I want this to reset the trainers so you can refight them, but I'm very unsure how this works...
|
||||
ResetEventRange SILPH_GAUNTLET_EVENTS_START, SILPH_GAUNTLET_EVENTS_END, 1
|
||||
|
||||
ld a, $0
|
||||
ld [wSilphGauntlet7FCurScript], a
|
||||
|
|
|
|||
|
|
@ -26,13 +26,12 @@ ViridianGymYujirouPostBattle:
|
|||
jp z, ViridianGymResetScripts
|
||||
ld a, $f0
|
||||
ld [wJoyIgnore], a
|
||||
|
||||
SetEvents EVENT_BEAT_YUJIROU, EVENT_BEAT_VIRIDIAN_PREGYM_TRAINER_0, EVENT_BEAT_VIRIDIAN_PREGYM_TRAINER_1 ; Needs to be set here for the correct text to pop up.
|
||||
ld a, $3
|
||||
ld [hSpriteIndex], a
|
||||
call DisplayTextID
|
||||
|
||||
jp ViridianPreGymResetScripts
|
||||
; SetEvents EVENT_BEAT_YUJIROU, EVENT_BEAT_VIRIDIAN_PREGYM_TRAINER_0, EVENT_BEAT_VIRIDIAN_PREGYM_TRAINER_1 ; Needs to be set here for the correct text to pop up.
|
||||
; ld a, $3
|
||||
; ld [hSpriteIndex], a
|
||||
; call DisplayTextID
|
||||
; xor a
|
||||
; ld [wViridianPreGymCurScript], a
|
||||
|
||||
ViridianPreGym_TextPointers:
|
||||
dw ViridianPreGymText1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue