pokered/scripts/PokemonFanClub.asm

170 lines
3.3 KiB
NASM
Raw Normal View History

PokemonFanClub_Script:
2014-05-18 18:19:10 +00:00
jp EnableAutoTextBoxDrawing
PokemonFanClub_CheckBikeInBag:
2014-05-18 18:19:10 +00:00
; check if any bike paraphernalia in bag
2015-07-21 01:32:02 +00:00
CheckEvent EVENT_GOT_BIKE_VOUCHER
2014-05-18 18:19:10 +00:00
ret nz
ld b, BICYCLE
call IsItemInBag
ret nz
ld b, BIKE_VOUCHER
jp IsItemInBag
PokemonFanClub_TextPointers:
def_text_pointers
dw_const PokemonFanClubPikachuFanText, TEXT_POKEMONFANCLUB_PIKACHU_FAN
dw_const PokemonFanClubSeelFanText, TEXT_POKEMONFANCLUB_SEEL_FAN
dw_const PokemonFanClubPikachuText, TEXT_POKEMONFANCLUB_PIKACHU
dw_const PokemonFanClubSeelText, TEXT_POKEMONFANCLUB_SEEL
dw_const PokemonFanClubChairmanText, TEXT_POKEMONFANCLUB_CHAIRMAN
dw_const PokemonFanClubReceptionistText, TEXT_POKEMONFANCLUB_RECEPTIONIST
dw_const PokemonFanClubSign1Text, TEXT_POKEMONFANCLUB_SIGN_1
dw_const PokemonFanClubSign2Text, TEXT_POKEMONFANCLUB_SIGN_2
PokemonFanClubPikachuFanText:
text_asm
2015-07-21 17:36:03 +00:00
CheckEvent EVENT_PIKACHU_FAN_BOAST
2014-05-18 18:19:10 +00:00
jr nz, .mineisbetter
ld hl, .NormalText
2014-05-18 18:19:10 +00:00
call PrintText
2015-07-21 17:36:03 +00:00
SetEvent EVENT_SEEL_FAN_BOAST
2014-05-18 18:19:10 +00:00
jr .done
.mineisbetter
ld hl, .BetterText
2014-05-18 18:19:10 +00:00
call PrintText
2015-07-21 17:36:03 +00:00
ResetEvent EVENT_PIKACHU_FAN_BOAST
2014-05-18 18:19:10 +00:00
.done
jp TextScriptEnd
.NormalText:
text_far _PokemonFanClubPikachuFanNormalText
text_end
2014-05-18 18:19:10 +00:00
.BetterText:
text_far _PokemonFanClubPikachuFanBetterText
text_end
2014-05-18 18:19:10 +00:00
PokemonFanClubSeelFanText:
text_asm
2015-07-21 17:36:03 +00:00
CheckEvent EVENT_SEEL_FAN_BOAST
2014-05-18 18:19:10 +00:00
jr nz, .mineisbetter
ld hl, .NormalText
2014-05-18 18:19:10 +00:00
call PrintText
2015-07-21 17:36:03 +00:00
SetEvent EVENT_PIKACHU_FAN_BOAST
2014-05-18 18:19:10 +00:00
jr .done
.mineisbetter
ld hl, .BetterText
2014-05-18 18:19:10 +00:00
call PrintText
2015-07-21 17:36:03 +00:00
ResetEvent EVENT_SEEL_FAN_BOAST
2014-05-18 18:19:10 +00:00
.done
jp TextScriptEnd
.NormalText:
text_far _PokemonFanClubSeelFanNormalText
text_end
2014-05-18 18:19:10 +00:00
.BetterText:
text_far _PokemonFanClubSeelFanBetterText
text_end
2014-05-18 18:19:10 +00:00
PokemonFanClubPikachuText:
text_asm
ld hl, .Text
2014-05-18 18:19:10 +00:00
call PrintText
ld a, PIKACHU
call PlayCry
call WaitForSoundToFinish
jp TextScriptEnd
.Text
text_far _PokemonFanClubPikachuText
text_end
2014-05-18 18:19:10 +00:00
PokemonFanClubSeelText:
text_asm
ld hl, .Text
2014-05-18 18:19:10 +00:00
call PrintText
ld a, SEEL
call PlayCry
call WaitForSoundToFinish
jp TextScriptEnd
.Text:
text_far _PokemonFanClubSeelText
text_end
2014-05-18 18:19:10 +00:00
PokemonFanClubChairmanText:
text_asm
call PokemonFanClub_CheckBikeInBag
2014-05-18 18:19:10 +00:00
jr nz, .nothingleft
ld hl, .IntroText
2014-05-18 18:19:10 +00:00
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
2014-05-18 18:19:10 +00:00
and a
jr nz, .nothanks
; tell the story
ld hl, .StoryText
2014-05-18 18:19:10 +00:00
call PrintText
2015-08-05 21:20:29 +00:00
lb bc, BIKE_VOUCHER, 1
2014-05-18 18:19:10 +00:00
call GiveItem
jr nc, .bag_full
ld hl, .BikeVoucherText
2014-05-18 18:19:10 +00:00
call PrintText
2015-07-21 01:32:02 +00:00
SetEvent EVENT_GOT_BIKE_VOUCHER
2014-05-18 18:19:10 +00:00
jr .done
.bag_full
ld hl, .BagFullText
2014-05-18 18:19:10 +00:00
call PrintText
jr .done
.nothanks
ld hl, .NoStoryText
2014-05-18 18:19:10 +00:00
call PrintText
jr .done
.nothingleft
ld hl, .FinalText
2014-05-18 18:19:10 +00:00
call PrintText
.done
jp TextScriptEnd
.IntroText:
text_far _PokemonFanClubChairmanIntroText
text_end
2014-05-18 18:19:10 +00:00
.StoryText:
text_far _PokemonFanClubChairmanStoryText
text_end
2014-05-18 18:19:10 +00:00
.BikeVoucherText:
text_far _PokemonFanClubReceivedBikeVoucherText
sound_get_key_item
text_far _PokemonFanClubExplainBikeVoucherText
text_end
2014-05-18 18:19:10 +00:00
.NoStoryText:
text_far _PokemonFanClubNoStoryText
text_end
2014-05-18 18:19:10 +00:00
.FinalText:
text_far _PokemonFanClubChairFinalText
text_end
2014-05-18 18:19:10 +00:00
.BagFullText:
text_far _PokemonFanClubBagFullText
text_end
2014-05-18 18:19:10 +00:00
PokemonFanClubReceptionistText:
text_far _PokemonFanClubReceptionistText
text_end
2014-05-18 18:19:10 +00:00
PokemonFanClubSign1Text:
text_far _PokemonFanClubSign1Text
text_end
2014-05-18 18:19:10 +00:00
PokemonFanClubSign2Text:
text_far _PokemonFanClubSign2Text
text_end