pokecrystal-board/engine/events/whiteout.asm

75 lines
1.2 KiB
NASM
Raw Normal View History

Script_BattleWhiteout::
2015-11-11 13:11:08 -08:00
callasm BattleBGMap
jump Script_Whiteout
Script_OverworldWhiteout::
2018-01-11 22:40:20 -08:00
refreshscreen
2015-11-11 13:11:08 -08:00
callasm OverworldBGMap
Script_Whiteout:
2015-11-11 13:11:08 -08:00
writetext .WhitedOutText
2015-11-25 07:16:29 -08:00
waitbutton
special FadeOutPalettes
2015-11-11 13:11:08 -08:00
pause 40
special HealParty
checkflag ENGINE_BUG_CONTEST_TIMER
iftrue .bug_contest
callasm HalveMoney
callasm GetWhiteoutSpawn
farscall Script_AbortBugContest
special WarpToSpawnPoint
2015-11-11 13:11:08 -08:00
newloadmap MAPSETUP_WARP
2018-02-02 18:09:17 -08:00
endall
2015-11-11 13:11:08 -08:00
.bug_contest
jumpstd bugcontestresultswarp
.WhitedOutText:
2015-11-11 13:11:08 -08:00
; is out of useable #MON! whited out!
text_jump UnknownText_0x1c0a4e
db "@"
2018-06-24 07:09:41 -07:00
OverworldBGMap:
2015-11-11 13:11:08 -08:00
call ClearPalettes
call ClearScreen
2015-12-11 13:59:40 -08:00
call WaitBGMap2
2015-11-11 13:11:08 -08:00
call HideSprites
2015-11-20 08:47:52 -08:00
call RotateThreePalettesLeft
2015-11-11 13:11:08 -08:00
ret
2018-06-24 07:09:41 -07:00
BattleBGMap:
2015-12-28 07:57:04 -08:00
ld b, SCGB_BATTLE_GRAYSCALE
2015-11-11 13:11:08 -08:00
call GetSGBLayout
call SetPalettes
ret
2018-06-24 07:09:41 -07:00
HalveMoney:
farcall StubbedTrainerRankings_WhiteOuts
2015-11-11 13:11:08 -08:00
; Halve the player's money.
2018-01-23 14:39:09 -08:00
ld hl, wMoney
2015-11-11 13:11:08 -08:00
ld a, [hl]
srl a
ld [hli], a
ld a, [hl]
rra
ld [hli], a
ld a, [hl]
rra
ld [hl], a
ret
2018-06-24 07:09:41 -07:00
GetWhiteoutSpawn:
2015-11-11 13:11:08 -08:00
ld a, [wLastSpawnMapGroup]
ld d, a
ld a, [wLastSpawnMapNumber]
ld e, a
2017-12-24 09:47:30 -08:00
farcall IsSpawnPoint
2015-11-11 13:11:08 -08:00
ld a, c
jr c, .yes
xor a ; SPAWN_HOME
.yes
2018-01-23 14:39:09 -08:00
ld [wDefaultSpawnpoint], a
2015-11-11 13:11:08 -08:00
ret