mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-09-17 02:40:50 +12:00

This was hell to do. There is still one bug in there, and that's the item pickups don't work for some reason. I don't know how these work honestly so if anyone wants to sort that go ahead. Anyway, some stuff on the map; - Currently, a warp from B1F leads there, which is intentionally non-returnable. The player walks through the whole map to get to the warp panel. A walk of humanity's shame, if you will. A warp for where the player is meant to go will be necessary later. - Lore from Japanese media, particularly the first movie's interpretation of Mewtwo, is included. This is based on context clues on its canonicity from LGPE and other bits. - A clue on how to get the Old Sea Chart is not-so-subtly included. The MissingNo. event is unfinished, I intend for Martha to deal with that. The text intentionally lacks a "done" bit to force an unpredictable error; I believe this is inconsequential gameplay-wise and should make for a good opening quote when fighting it. Oh, and Faraway Island has Mankey, Butterfree, and Primeape as find-able Pokemon now. This should be expanded upon later.
140 lines
2.6 KiB
NASM
140 lines
2.6 KiB
NASM
PokemonMansion3F_Script:
|
|
call Mansion3Script_52204
|
|
call EnableAutoTextBoxDrawing
|
|
ld hl, Mansion3TrainerHeaders
|
|
ld de, PokemonMansion3F_ScriptPointers
|
|
ld a, [wPokemonMansion3FCurScript]
|
|
call ExecuteCurMapScriptInTable
|
|
ld [wPokemonMansion3FCurScript], a
|
|
ret
|
|
|
|
Mansion3Script_52204:
|
|
ld hl, wCurrentMapScriptFlags
|
|
bit 5, [hl]
|
|
res 5, [hl]
|
|
ret z
|
|
CheckEvent EVENT_MANSION_SWITCH_ON
|
|
jr nz, .asm_52224
|
|
ld a, $e
|
|
lb bc, 2, 7
|
|
call Mansion2Script_5202f
|
|
ld a, $5f
|
|
lb bc, 5, 7
|
|
call Mansion2Script_5202f
|
|
ret
|
|
.asm_52224
|
|
ld a, $5f
|
|
lb bc, 2, 7
|
|
call Mansion2Script_5202f
|
|
ld a, $e
|
|
lb bc, 5, 7
|
|
call Mansion2Script_5202f
|
|
ret
|
|
|
|
PokemonMansion3F_ScriptPointers:
|
|
dw Mansion3Script0
|
|
dw DisplayEnemyTrainerTextAndStartBattle
|
|
dw EndTrainerBattle
|
|
|
|
Mansion3Script0:
|
|
ld hl, CoordsData_52254
|
|
call Mansion3Script_5225b
|
|
ld a, [wWhichDungeonWarp]
|
|
and a
|
|
jp z, CheckFightingMapTrainers
|
|
cp $3
|
|
ld a, POKEMON_MANSION_1F
|
|
jr nz, .asm_52250
|
|
ld a, POKEMON_MANSION_2F
|
|
.asm_52250
|
|
ld [wDungeonWarpDestinationMap], a
|
|
ret
|
|
|
|
CoordsData_52254:
|
|
dbmapcoord 16, 14
|
|
dbmapcoord 17, 14
|
|
dbmapcoord 19, 14 ; this one kicks you out i think
|
|
db -1 ; end
|
|
|
|
Mansion3Script_5225b:
|
|
xor a
|
|
ld [wWhichDungeonWarp], a
|
|
ld a, [wd72d]
|
|
bit 4, a
|
|
ret nz
|
|
call ArePlayerCoordsInArray
|
|
ret nc
|
|
ld a, [wCoordIndex]
|
|
ld [wWhichDungeonWarp], a
|
|
ld hl, wd72d
|
|
set 4, [hl]
|
|
ld hl, wd732
|
|
set 4, [hl]
|
|
ret
|
|
|
|
Mansion3Script_Switches::
|
|
ld a, [wSpritePlayerStateData1FacingDirection]
|
|
cp SPRITE_FACING_UP
|
|
ret nz
|
|
xor a
|
|
ldh [hJoyHeld], a
|
|
ld a, $6
|
|
ldh [hSpriteIndexOrTextID], a
|
|
jp DisplayTextID
|
|
|
|
PokemonMansion3F_TextPointers:
|
|
dw Mansion3Text1
|
|
dw Mansion3Text2
|
|
dw PickUpItemText
|
|
dw PickUpItemText
|
|
dw Mansion3Text5
|
|
dw Mansion3Text6
|
|
|
|
Mansion3TrainerHeaders:
|
|
def_trainers
|
|
Mansion3TrainerHeader0:
|
|
trainer EVENT_BEAT_MANSION_3_TRAINER_0, 0, Mansion3BattleText1, Mansion3EndBattleText1, Mansion3AfterBattleText1
|
|
Mansion3TrainerHeader1:
|
|
trainer EVENT_BEAT_MANSION_3_TRAINER_1, 2, Mansion3BattleText2, Mansion3EndBattleText2, Mansion3AfterBattleText2
|
|
db -1 ; end
|
|
|
|
Mansion3Text1:
|
|
text_asm
|
|
ld hl, Mansion3TrainerHeader0
|
|
call TalkToTrainer
|
|
jp TextScriptEnd
|
|
|
|
Mansion3Text2:
|
|
text_asm
|
|
ld hl, Mansion3TrainerHeader1
|
|
call TalkToTrainer
|
|
jp TextScriptEnd
|
|
|
|
Mansion3BattleText1:
|
|
text_far _Mansion3BattleText1
|
|
text_end
|
|
|
|
Mansion3EndBattleText1:
|
|
text_far _Mansion3EndBattleText1
|
|
text_end
|
|
|
|
Mansion3AfterBattleText1:
|
|
text_far _Mansion3AfterBattleText1
|
|
text_end
|
|
|
|
Mansion3BattleText2:
|
|
text_far _Mansion3BattleText2
|
|
text_end
|
|
|
|
Mansion3EndBattleText2:
|
|
text_far _Mansion3EndBattleText2
|
|
text_end
|
|
|
|
Mansion3AfterBattleText2:
|
|
text_far _Mansion3AfterBattleText2
|
|
text_end
|
|
|
|
Mansion3Text5:
|
|
text_far _Mansion3Text5
|
|
text_end
|