2019-01-01 20:06:23 +00:00
|
|
|
SilphCo3F_Script:
|
2023-07-14 01:27:56 +00:00
|
|
|
call SilphCo3FGateCallbackScript
|
2014-05-18 18:19:10 +00:00
|
|
|
call EnableAutoTextBoxDrawing
|
2021-04-13 22:24:37 +00:00
|
|
|
ld hl, SilphCo3TrainerHeaders
|
2019-01-01 20:06:23 +00:00
|
|
|
ld de, SilphCo3F_ScriptPointers
|
|
|
|
ld a, [wSilphCo3FCurScript]
|
2014-05-18 18:19:10 +00:00
|
|
|
call ExecuteCurMapScriptInTable
|
2019-01-01 20:06:23 +00:00
|
|
|
ld [wSilphCo3FCurScript], a
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
SilphCo3FGateCallbackScript:
|
2016-01-03 19:17:10 +00:00
|
|
|
ld hl, wCurrentMapScriptFlags
|
2024-09-24 15:39:44 +00:00
|
|
|
bit BIT_CUR_MAP_LOADED_1, [hl]
|
|
|
|
res BIT_CUR_MAP_LOADED_1, [hl]
|
2014-05-18 18:19:10 +00:00
|
|
|
ret z
|
2023-07-14 01:27:56 +00:00
|
|
|
ld hl, .GateCoordinates
|
|
|
|
call SilphCo2F_SetCardKeyDoorYScript
|
|
|
|
call SilphCo3F_UnlockedDoorEventScript
|
2015-07-21 17:36:03 +00:00
|
|
|
CheckEvent EVENT_SILPH_CO_3_UNLOCKED_DOOR1
|
2023-07-14 01:27:56 +00:00
|
|
|
jr nz, .unlock_door1
|
2014-05-18 18:19:10 +00:00
|
|
|
push af
|
|
|
|
ld a, $5f
|
2015-07-24 21:39:45 +00:00
|
|
|
ld [wNewTileBlockID], a
|
2015-08-05 21:20:29 +00:00
|
|
|
lb bc, 4, 4
|
2014-09-14 18:29:18 +00:00
|
|
|
predef ReplaceTileBlock
|
2014-05-18 18:19:10 +00:00
|
|
|
pop af
|
2023-07-14 01:27:56 +00:00
|
|
|
.unlock_door1
|
2015-07-21 17:36:03 +00:00
|
|
|
CheckEventAfterBranchReuseA EVENT_SILPH_CO_3_UNLOCKED_DOOR2, EVENT_SILPH_CO_3_UNLOCKED_DOOR1
|
2014-05-18 18:19:10 +00:00
|
|
|
ret nz
|
|
|
|
ld a, $5f
|
2015-07-24 21:39:45 +00:00
|
|
|
ld [wNewTileBlockID], a
|
2015-08-05 21:20:29 +00:00
|
|
|
lb bc, 4, 8
|
2014-09-14 18:29:18 +00:00
|
|
|
predef_jump ReplaceTileBlock
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.GateCoordinates:
|
2020-07-16 16:32:19 +00:00
|
|
|
dbmapcoord 4, 4
|
|
|
|
dbmapcoord 8, 4
|
|
|
|
db -1 ; end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
SilphCo3F_UnlockedDoorEventScript:
|
2015-07-21 17:36:03 +00:00
|
|
|
EventFlagAddress hl, EVENT_SILPH_CO_3_UNLOCKED_DOOR1
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh a, [hUnlockedSilphCoDoors]
|
2014-05-18 18:19:10 +00:00
|
|
|
and a
|
|
|
|
ret z
|
|
|
|
cp $1
|
2023-07-14 01:27:56 +00:00
|
|
|
jr nz, .unlock_door1
|
2015-07-21 17:36:03 +00:00
|
|
|
SetEventReuseHL EVENT_SILPH_CO_3_UNLOCKED_DOOR1
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
2023-07-14 01:27:56 +00:00
|
|
|
.unlock_door1
|
2015-07-21 17:36:03 +00:00
|
|
|
SetEventAfterBranchReuseHL EVENT_SILPH_CO_3_UNLOCKED_DOOR2, EVENT_SILPH_CO_3_UNLOCKED_DOOR1
|
2014-05-18 18:19:10 +00:00
|
|
|
ret
|
|
|
|
|
2019-01-01 20:06:23 +00:00
|
|
|
SilphCo3F_ScriptPointers:
|
2023-07-14 01:27:56 +00:00
|
|
|
def_script_pointers
|
|
|
|
dw_const CheckFightingMapTrainers, SCRIPT_SILPHCO3F_DEFAULT
|
|
|
|
dw_const DisplayEnemyTrainerTextAndStartBattle, SCRIPT_SILPHCO3F_START_BATTLE
|
|
|
|
dw_const EndTrainerBattle, SCRIPT_SILPHCO3F_END_BATTLE
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2019-01-01 20:06:23 +00:00
|
|
|
SilphCo3F_TextPointers:
|
2023-07-14 01:27:56 +00:00
|
|
|
def_text_pointers
|
|
|
|
dw_const SilphCo3FSilphWorkerMText, TEXT_SILPHCO3F_SILPH_WORKER_M
|
|
|
|
dw_const SilphCo3FRocketText, TEXT_SILPHCO3F_ROCKET
|
|
|
|
dw_const SilphCo3FScientistText, TEXT_SILPHCO3F_SCIENTIST
|
|
|
|
dw_const PickUpItemText, TEXT_SILPHCO3F_HYPER_POTION
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2021-04-13 22:24:37 +00:00
|
|
|
SilphCo3TrainerHeaders:
|
|
|
|
def_trainers 2
|
2016-06-12 00:24:04 +00:00
|
|
|
SilphCo3TrainerHeader0:
|
2023-07-14 01:27:56 +00:00
|
|
|
trainer EVENT_BEAT_SILPH_CO_3F_TRAINER_0, 2, SilphCo3FRocketBattleText, SilphCo3FRocketEndBattleText, SilphCo3FRocketAfterBattleText
|
2016-06-12 00:24:04 +00:00
|
|
|
SilphCo3TrainerHeader1:
|
2023-07-14 01:27:56 +00:00
|
|
|
trainer EVENT_BEAT_SILPH_CO_3F_TRAINER_1, 3, SilphCo3FScientistBattleText, SilphCo3FScientistEndBattleText, SilphCo3FScientistAfterBattleText
|
2020-07-14 19:45:36 +00:00
|
|
|
db -1 ; end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
SilphCo3FSilphWorkerMText:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2015-07-21 17:36:03 +00:00
|
|
|
CheckEvent EVENT_BEAT_SILPH_CO_GIOVANNI
|
2023-07-14 01:27:56 +00:00
|
|
|
ld hl, .YouSavedUsText
|
|
|
|
jr nz, .beat_giovanni
|
|
|
|
ld hl, .WhatShouldIDoText
|
|
|
|
.beat_giovanni
|
2014-05-18 18:19:10 +00:00
|
|
|
call PrintText
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.WhatShouldIDoText:
|
|
|
|
text_far _SilphCo3FSilphWorkerMWhatShouldIDoText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
.YouSavedUsText:
|
|
|
|
text_far _SilphCo3FSilphWorkerMYouSavedUsText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
SilphCo3FRocketText:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, SilphCo3TrainerHeader0
|
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
SilphCo3FRocketBattleText:
|
|
|
|
text_far _SilphCo3FRocketBattleText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
SilphCo3FRocketEndBattleText:
|
|
|
|
text_far _SilphCo3FRocketEndBattleText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
SilphCo3FRocketAfterBattleText:
|
|
|
|
text_far _SilphCo3FRocketAfterBattleText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
SilphCo3FScientistText:
|
2020-07-04 21:09:35 +00:00
|
|
|
text_asm
|
2014-05-18 18:19:10 +00:00
|
|
|
ld hl, SilphCo3TrainerHeader1
|
|
|
|
call TalkToTrainer
|
|
|
|
jp TextScriptEnd
|
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
SilphCo3FScientistBattleText:
|
|
|
|
text_far _SilphCo3FScientistBattleText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
SilphCo3FScientistEndBattleText:
|
|
|
|
text_far _SilphCo3FScientistEndBattleText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|
2014-05-18 18:19:10 +00:00
|
|
|
|
2023-07-14 01:27:56 +00:00
|
|
|
SilphCo3FScientistAfterBattleText:
|
|
|
|
text_far _SilphCo3FScientistAfterBattleText
|
2020-07-04 21:09:35 +00:00
|
|
|
text_end
|