pokered/scripts/pokemontower6.asm

213 lines
4.4 KiB
NASM
Raw Normal View History

2016-06-12 00:24:04 +00:00
PokemonTower6Script:
2014-05-18 18:19:10 +00:00
call EnableAutoTextBoxDrawing
ld hl, PokemonTower6TrainerHeader0
2014-05-18 18:19:10 +00:00
ld de, PokemonTower6ScriptPointers
2015-08-31 02:38:41 +00:00
ld a, [wPokemonTower6CurScript]
2014-05-18 18:19:10 +00:00
call ExecuteCurMapScriptInTable
2015-08-31 02:38:41 +00:00
ld [wPokemonTower6CurScript], a
2014-05-18 18:19:10 +00:00
ret
2016-06-12 00:24:04 +00:00
PokemonTower6Script_60b02:
2014-05-18 18:19:10 +00:00
xor a
2014-05-25 17:51:53 +00:00
ld [wJoyIgnore], a
2015-08-31 02:38:41 +00:00
ld [wPokemonTower6CurScript], a
ld [wCurMapScript], a
2014-05-18 18:19:10 +00:00
ret
2016-06-12 00:24:04 +00:00
PokemonTower6ScriptPointers:
2014-05-18 18:19:10 +00:00
dw PokemonTower6Script0
2014-09-14 18:29:18 +00:00
dw DisplayEnemyTrainerTextAndStartBattle
2014-05-18 18:19:10 +00:00
dw EndTrainerBattle
dw PokemonTower6Script3
dw PokemonTower6Script4
2016-06-12 00:24:04 +00:00
PokemonTower6Script0:
2015-07-21 17:36:03 +00:00
CheckEvent EVENT_BEAT_GHOST_MAROWAK
2014-05-18 18:19:10 +00:00
jp nz, CheckFightingMapTrainers
ld hl, CoordsData_60b45
2014-05-18 18:19:10 +00:00
call ArePlayerCoordsInArray
jp nc, CheckFightingMapTrainers
xor a
2014-05-25 17:51:53 +00:00
ld [hJoyHeld], a
2014-05-18 18:19:10 +00:00
ld a, $6
2015-07-18 15:17:29 +00:00
ld [hSpriteIndexOrTextID], a
2014-05-18 18:19:10 +00:00
call DisplayTextID
ld a, MAROWAK
2015-08-31 02:38:41 +00:00
ld [wCurOpponent], a
2014-05-18 18:19:10 +00:00
ld a, 30
2015-08-31 02:38:41 +00:00
ld [wCurEnemyLVL], a
2014-05-18 18:19:10 +00:00
ld a, $4
2015-08-31 02:38:41 +00:00
ld [wPokemonTower6CurScript], a
ld [wCurMapScript], a
2014-05-18 18:19:10 +00:00
ret
2016-06-12 00:24:04 +00:00
CoordsData_60b45:
2014-05-18 18:19:10 +00:00
db $10,$0A,$FF
2016-06-12 00:24:04 +00:00
PokemonTower6Script4:
2015-08-31 02:38:41 +00:00
ld a, [wIsInBattle]
2014-05-18 18:19:10 +00:00
cp $ff
jp z, PokemonTower6Script_60b02
2014-05-18 18:19:10 +00:00
ld a, $ff
2014-05-25 17:51:53 +00:00
ld [wJoyIgnore], a
ld a, [wd72d]
2014-05-18 18:19:10 +00:00
bit 6, a
ret nz
call UpdateSprites
ld a, $f0
2014-05-25 17:51:53 +00:00
ld [wJoyIgnore], a
2014-08-09 05:39:13 +00:00
ld a, [wBattleResult]
2014-05-18 18:19:10 +00:00
and a
jr nz, .asm_60b82
2015-07-21 17:36:03 +00:00
SetEvent EVENT_BEAT_GHOST_MAROWAK
2014-05-18 18:19:10 +00:00
ld a, $7
2015-07-18 15:17:29 +00:00
ld [hSpriteIndexOrTextID], a
2014-05-18 18:19:10 +00:00
call DisplayTextID
xor a
2014-05-25 17:51:53 +00:00
ld [wJoyIgnore], a
2014-05-18 18:19:10 +00:00
ld a, $0
2015-08-31 02:38:41 +00:00
ld [wPokemonTower6CurScript], a
ld [wCurMapScript], a
2014-05-18 18:19:10 +00:00
ret
.asm_60b82
ld a, $1
ld [wSimulatedJoypadStatesIndex], a
2014-05-18 18:19:10 +00:00
ld a, $10
ld [wSimulatedJoypadStatesEnd], a
2014-05-18 18:19:10 +00:00
xor a
ld [wSpriteStateData2 + $06], a
ld [wOverrideSimulatedJoypadStatesMask], a
ld hl, wd730
2014-05-18 18:19:10 +00:00
set 7, [hl]
ld a, $3
2015-08-31 02:38:41 +00:00
ld [wPokemonTower6CurScript], a
ld [wCurMapScript], a
2014-05-18 18:19:10 +00:00
ret
2016-06-12 00:24:04 +00:00
PokemonTower6Script3:
ld a, [wSimulatedJoypadStatesIndex]
2014-05-18 18:19:10 +00:00
and a
ret nz
call Delay3
xor a
2015-08-31 02:38:41 +00:00
ld [wPokemonTower6CurScript], a
ld [wCurMapScript], a
2014-05-18 18:19:10 +00:00
ret
2016-06-12 00:24:04 +00:00
PokemonTower6TextPointers:
2014-05-18 18:19:10 +00:00
dw PokemonTower6Text1
dw PokemonTower6Text2
dw PokemonTower6Text3
2015-07-18 15:17:29 +00:00
dw PickUpItemText
dw PickUpItemText
2014-05-18 18:19:10 +00:00
dw PokemonTower6Text6
dw PokemonTower6Text7
2016-06-12 00:24:04 +00:00
PokemonTower6TrainerHeader0:
2015-07-21 01:32:02 +00:00
dbEventFlagBit EVENT_BEAT_POKEMONTOWER_6_TRAINER_0
2014-05-18 18:19:10 +00:00
db ($3 << 4) ; trainer's view range
2015-07-21 01:32:02 +00:00
dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_6_TRAINER_0
dw PokemonTower6BattleText1 ; TextBeforeBattle
dw PokemonTower6AfterBattleText1 ; TextAfterBattle
dw PokemonTower6EndBattleText1 ; TextEndBattle
dw PokemonTower6EndBattleText1 ; TextEndBattle
2014-05-18 18:19:10 +00:00
2016-06-12 00:24:04 +00:00
PokemonTower6TrainerHeader1:
2015-07-21 01:32:02 +00:00
dbEventFlagBit EVENT_BEAT_POKEMONTOWER_6_TRAINER_1
2014-05-18 18:19:10 +00:00
db ($3 << 4) ; trainer's view range
2015-07-21 01:32:02 +00:00
dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_6_TRAINER_1
dw PokemonTower6BattleText2 ; TextBeforeBattle
dw PokemonTower6AfterBattleText2 ; TextAfterBattle
dw PokemonTower6EndBattleText2 ; TextEndBattle
dw PokemonTower6EndBattleText2 ; TextEndBattle
2014-05-18 18:19:10 +00:00
2016-06-12 00:24:04 +00:00
PokemonTower6TrainerHeader2:
2015-07-21 01:32:02 +00:00
dbEventFlagBit EVENT_BEAT_POKEMONTOWER_6_TRAINER_2
2014-05-18 18:19:10 +00:00
db ($2 << 4) ; trainer's view range
2015-07-21 01:32:02 +00:00
dwEventFlagAddress EVENT_BEAT_POKEMONTOWER_6_TRAINER_2
dw PokemonTower6BattleText3 ; TextBeforeBattle
dw PokemonTower6AfterBattleText3 ; TextAfterBattle
dw PokemonTower6EndBattleText3 ; TextEndBattle
dw PokemonTower6EndBattleText3 ; TextEndBattle
2014-05-18 18:19:10 +00:00
db $ff
2016-06-12 00:24:04 +00:00
PokemonTower6Text1:
2015-07-03 19:58:50 +00:00
TX_ASM
2014-05-18 18:19:10 +00:00
ld hl, PokemonTower6TrainerHeader0
call TalkToTrainer
jp TextScriptEnd
2016-06-12 00:24:04 +00:00
PokemonTower6Text2:
2015-07-03 19:58:50 +00:00
TX_ASM
2014-05-18 18:19:10 +00:00
ld hl, PokemonTower6TrainerHeader1
call TalkToTrainer
jp TextScriptEnd
2016-06-12 00:24:04 +00:00
PokemonTower6Text3:
2015-07-03 19:58:50 +00:00
TX_ASM
2014-05-18 18:19:10 +00:00
ld hl, PokemonTower6TrainerHeader2
call TalkToTrainer
jp TextScriptEnd
2016-06-12 00:24:04 +00:00
PokemonTower6Text7:
2015-07-03 19:58:50 +00:00
TX_ASM
2014-05-18 18:19:10 +00:00
ld hl, PokemonTower2Text_60c1f
call PrintText
ld a, MAROWAK
call PlayCry
call WaitForSoundToFinish
ld c, 30
2014-05-18 18:19:10 +00:00
call DelayFrames
ld hl, PokemonTower2Text_60c24
call PrintText
jp TextScriptEnd
2016-06-12 00:24:04 +00:00
PokemonTower2Text_60c1f:
2014-05-18 18:19:10 +00:00
TX_FAR _PokemonTower2Text_60c1f
db "@"
2016-06-12 00:24:04 +00:00
PokemonTower2Text_60c24:
2014-05-18 18:19:10 +00:00
TX_FAR _PokemonTower2Text_60c24
db "@"
2016-06-12 00:24:04 +00:00
PokemonTower6BattleText1:
2014-05-18 18:19:10 +00:00
TX_FAR _PokemonTower6BattleText1
db "@"
2016-06-12 00:24:04 +00:00
PokemonTower6EndBattleText1:
2014-05-18 18:19:10 +00:00
TX_FAR _PokemonTower6EndBattleText1
db "@"
2016-06-12 00:24:04 +00:00
PokemonTower6AfterBattleText1:
2014-05-18 18:19:10 +00:00
TX_FAR _PokemonTower6AfterBattleText1
db "@"
2016-06-12 00:24:04 +00:00
PokemonTower6BattleText2:
2014-05-18 18:19:10 +00:00
TX_FAR _PokemonTower6BattleText2
db "@"
2016-06-12 00:24:04 +00:00
PokemonTower6EndBattleText2:
2014-05-18 18:19:10 +00:00
TX_FAR _PokemonTower6EndBattleText2
db "@"
2016-06-12 00:24:04 +00:00
PokemonTower6AfterBattleText2:
2014-05-18 18:19:10 +00:00
TX_FAR _PokemonTower6AfterBattleText2
db "@"
2016-06-12 00:24:04 +00:00
PokemonTower6BattleText3:
2014-05-18 18:19:10 +00:00
TX_FAR _PokemonTower6BattleText3
db "@"
2016-06-12 00:24:04 +00:00
PokemonTower6EndBattleText3:
2014-05-18 18:19:10 +00:00
TX_FAR _PokemonTower6EndBattleText3
db "@"
2016-06-12 00:24:04 +00:00
PokemonTower6AfterBattleText3:
2014-05-18 18:19:10 +00:00
TX_FAR _PokemonTower6AfterBattleText3
db "@"
2016-06-12 00:24:04 +00:00
PokemonTower6Text6:
2014-05-18 18:19:10 +00:00
TX_FAR _PokemonTower6Text6
db "@"