Phone scripts and specials

This commit is contained in:
PikalaxALT 2015-11-17 12:29:37 -05:00
parent 0b8fe4bac3
commit 4bfe086ef6
14 changed files with 798 additions and 792 deletions

View File

@ -1,168 +1,170 @@
BuenaPhoneScript1:
checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
iftrue UnknownScript_0xa0b73
iftrue BuenaPhoneScript_Rocket
checkcode VAR_HOUR
if_greater_than 17, UnknownScript_0xa0b4b
scall UnknownScript_0xa0b32
jump UnknownScript_0xa0c0e
if_greater_than 17, BuenaPhoneScript_AfterMidnight1
scall BuenaPhoneScript_CheckTimeOfDay1
jump BuenaPhoneScript_Random1
BuenaPhoneScript2:
checkflag ENGINE_ROCKETS_IN_RADIO_TOWER
iftrue UnknownScript_0xa0b73
scall UnknownScript_0xa0b4f
jump UnknownScript_0xa0b77
iftrue BuenaPhoneScript_Rocket
scall BuenaPhoneScript_CheckTimeOfDay2
jump BuenaPhoneScript_Random2
UnknownScript_0xa0b32:
BuenaPhoneScript_CheckTimeOfDay1:
checkmorn
iftrue UnknownScript_0xa0b41
iftrue .morn
checkday
iftrue UnknownScript_0xa0b46
iftrue .day
writetext UnknownText_0xa0d42
keeptextopen
end
UnknownScript_0xa0b41:
.morn:
writetext UnknownText_0xa0c28
keeptextopen
end
UnknownScript_0xa0b46:
.day:
writetext UnknownText_0xa0c72
keeptextopen
end
UnknownScript_0xa0b4b:
BuenaPhoneScript_AfterMidnight1:
writetext UnknownText_0xa0caf
end
UnknownScript_0xa0b4f:
BuenaPhoneScript_CheckTimeOfDay2:
checkcode VAR_HOUR
if_greater_than 17, UnknownScript_0xa0b6e
if_greater_than 17, BuenaPhoneScript_AfterMidnight2
checkmorn
iftrue UnknownScript_0xa0b64
iftrue .morn
checkday
iftrue UnknownScript_0xa0b69
iftrue .day
writetext UnknownText_0xa0e29
keeptextopen
end
UnknownScript_0xa0b64:
.morn:
writetext UnknownText_0xa0d96
keeptextopen
end
UnknownScript_0xa0b69:
.day:
writetext UnknownText_0xa0dcf
keeptextopen
end
UnknownScript_0xa0b6e:
BuenaPhoneScript_AfterMidnight2:
writetext UnknownText_0xa0e01
keeptextopen
end
UnknownScript_0xa0b73:
BuenaPhoneScript_Rocket:
writetext UnknownText_0xa0e5e
end
UnknownScript_0xa0b77:
BuenaPhoneScript_Random2:
checkevent EVENT_BEAT_ELITE_FOUR
iftrue UnknownScript_0xa0b82
iftrue .PostE4
random 11
jump UnknownScript_0xa0b84
jump .Jumptable
UnknownScript_0xa0b82:
.PostE4:
random 14
UnknownScript_0xa0b84:
if_equal 0, UnknownScript_0xa0bbc
if_equal 1, UnknownScript_0xa0bc2
if_equal 2, UnknownScript_0xa0bc8
if_equal 3, UnknownScript_0xa0bce
if_equal 4, UnknownScript_0xa0bd4
if_equal 5, UnknownScript_0xa0bda
if_equal 6, UnknownScript_0xa0be0
if_equal 7, UnknownScript_0xa0be6
if_equal 8, UnknownScript_0xa0bec
if_equal 9, UnknownScript_0xa0bf2
if_equal 10, UnknownScript_0xa0bf8
if_equal 11, UnknownScript_0xa0bfe
if_equal 12, UnknownScript_0xa0c04
if_equal 13, UnknownScript_0xa0c0a
.Jumptable:
if_equal 0, .zero
if_equal 1, .one
if_equal 2, .two
if_equal 3, .three
if_equal 4, .four
if_equal 5, .five
if_equal 6, .six
if_equal 7, .seven
if_equal 8, .eight
if_equal 9, .nine
if_equal 10, .ten
if_equal 11, .eleven
if_equal 12, .twelve
if_equal 13, .thirteen
UnknownScript_0xa0bbc:
.zero:
writetext UnknownText_0xa0efb
jump UnknownScript_0xa0c0d
jump .finish
UnknownScript_0xa0bc2:
.one:
writetext UnknownText_0xa0fcf
jump UnknownScript_0xa0c0d
jump .finish
UnknownScript_0xa0bc8:
.two:
writetext UnknownText_0xa109d
jump UnknownScript_0xa0c0d
jump .finish
UnknownScript_0xa0bce:
.three:
writetext UnknownText_0xa1143
jump UnknownScript_0xa0c0d
jump .finish
UnknownScript_0xa0bd4:
.four:
writetext UnknownText_0xa1244
jump UnknownScript_0xa0c0d
jump .finish
UnknownScript_0xa0bda:
.five:
writetext UnknownText_0xa1318
jump UnknownScript_0xa0c0d
jump .finish
UnknownScript_0xa0be0:
.six:
writetext UnknownText_0xa13d8
jump UnknownScript_0xa0c0d
jump .finish
UnknownScript_0xa0be6:
.seven:
writetext UnknownText_0xa1488
jump UnknownScript_0xa0c0d
jump .finish
UnknownScript_0xa0bec:
.eight:
writetext UnknownText_0xa15de
jump UnknownScript_0xa0c0d
jump .finish
UnknownScript_0xa0bf2:
.nine:
writetext UnknownText_0xa1717
jump UnknownScript_0xa0c0d
jump .finish
UnknownScript_0xa0bf8:
.ten:
writetext UnknownText_0xa183d
jump UnknownScript_0xa0c0d
jump .finish
UnknownScript_0xa0bfe:
.eleven:
writetext UnknownText_0xa19b1
jump UnknownScript_0xa0c0d
jump .finish
UnknownScript_0xa0c04:
.twelve:
writetext UnknownText_0xa1ac0
jump UnknownScript_0xa0c0d
jump .finish
UnknownScript_0xa0c0a:
.thirteen:
writetext UnknownText_0xa1bed
UnknownScript_0xa0c0d:
.finish:
end
UnknownScript_0xa0c0e:
BuenaPhoneScript_Random1:
random 3
if_equal 0, UnknownScript_0xa0c1c
if_equal 1, UnknownScript_0xa0c20
if_equal 2, UnknownScript_0xa0c24
if_equal 0, .zero
if_equal 1, .one
if_equal 2, .two
UnknownScript_0xa0c1c:
.zero:
writetext UnknownText_0xa1c88
end
UnknownScript_0xa0c20:
.one:
writetext UnknownText_0xa1d5f
end
UnknownScript_0xa0c24:
.two:
writetext UnknownText_0xa1e2f
end
; a0c28
INCLUDE "text/phone/buena.asm"

View File

@ -1916,7 +1916,7 @@ Function28b87: ; 28b87
ld de, TempMonSpecies
ld bc, PARTYMON_STRUCT_LENGTH
call CopyBytes
predef Functionda96
predef AddTempmonToParty
ld a, [PartyCount]
dec a
ld [CurPartyMon], a

View File

@ -3078,16 +3078,18 @@ ContinueSpawnFacing: ; 57db
ret
; 57e2
Function57e2: ; 57e2
SetPlayerPalette: ; 57e2
ld a, d
and %10000000
ret z
ld bc, 0 ; debug?
ld hl, OBJECT_FACING
add hl, bc
ld a, [hl]
or d
ld [hl], a
ld a, d
swap a
and %00000111

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -37,7 +37,7 @@ PredefPointers:: ; 856b
add_predef DrawPartyMenuHPBar
add_predef FillPP
add_predef TryAddMonToParty
add_predef Functionda96
add_predef AddTempmonToParty
add_predef SentGetPkmnIntoFromBox
add_predef SentPkmnIntoBox
add_predef GiveEgg

View File

@ -166,7 +166,7 @@ SpecialsPointers:: ; c029
add_special SpecialHoOhChamber
add_special Function102142
add_special Special_CelebiShrineEvent
add_special Function49bf9
add_special CheckCaughtCelebi
add_special SpecialPokeSeer
add_special SpecialBuenasPassword
add_special SpecialBuenaPrize
@ -174,7 +174,7 @@ SpecialsPointers:: ; c029
add_special Special_SampleKenjiBreakCountdown
add_special SpecialBeastsCheck
add_special SpecialMonCheck
add_special Functionc225
add_special Special_SetPlayerPalette
add_special Function170bd2
add_special Mobile_SelectThreeMons
add_special Function1037eb
@ -185,9 +185,9 @@ SpecialsPointers:: ; c029
add_special Mobile_DummyReturnFalse
add_special Function103780
add_special Function10387b
add_special Function4ae12
add_special AskRememberPassword
add_special LoadMapPalettes
add_special Function4a927
add_special FindItemInPCOrBag
add_special Special_InitialSetDSTFlag
add_special Special_InitialClearDSTFlag
add_special SpecialNone
@ -197,10 +197,10 @@ SpecialNone: ; c224
ret
; c225
Functionc225: ; c225
Special_SetPlayerPalette: ; c225
ld a, [ScriptVar]
ld d, a
callba Function57e2
callba SetPlayerPalette
ret
; c230

View File

@ -12,7 +12,7 @@ SpecialBuenasPassword: ; 8af6b
ld [wMenuBorderRightCoord], a
call BackUpTiles
call DoNthMenu ; menu
callba Function4ae5e
callba Buena_ExitMenu
ld b, $0
ld a, [MenuSelection]
ld c, a

View File

@ -337,18 +337,18 @@ Function49bf3: ; 49bf3
ret
; 49bf9
Function49bf9: ; 49bf9
CheckCaughtCelebi: ; 49bf9
ld a, [wBattleResult]
bit 6, a
jr z, .asm_49c07
jr z, .false
ld a, $1
ld [ScriptVar], a
jr .asm_49c0b
jr .done
.asm_49c07
.false
xor a
ld [ScriptVar], a
.asm_49c0b
.done
ret
; 49c0c

View File

@ -8347,7 +8347,7 @@ FillPP: ; da6d
ret
; da96
Functionda96: ; da96
AddTempmonToParty: ; da96
ld hl, PartyCount
ld a, [hl]
cp PARTY_LENGTH
@ -8362,6 +8362,7 @@ Functionda96: ; da96
ld a, [CurPartySpecies]
ld [hli], a
ld [hl], $ff
ld hl, PartyMon1Species
ld a, [PartyCount]
dec a
@ -8371,6 +8372,7 @@ Functionda96: ; da96
ld d, h
ld hl, TempMonSpecies
call CopyBytes
ld hl, PartyMonOT
ld a, [PartyCount]
dec a
@ -8382,6 +8384,7 @@ Functionda96: ; da96
call SkipNames
ld bc, NAME_LENGTH
call CopyBytes
ld hl, PartyMonNicknames
ld a, [PartyCount]
dec a
@ -8397,7 +8400,7 @@ Functionda96: ; da96
ld a, [CurPartySpecies]
ld [wNamedObjectIndexBuffer], a
cp EGG
jr z, .owned
jr z, .egg
dec a
call SetSeenAndCaughtMon
ld hl, PartyMon1Happiness
@ -8406,7 +8409,7 @@ Functionda96: ; da96
ld bc, PARTYMON_STRUCT_LENGTH
call AddNTimes
ld [hl], BASE_HAPPINESS
.owned
.egg
ld a, [CurPartySpecies]
cp UNOWN
@ -21858,24 +21861,24 @@ Function4a91e: ; 4a91e
; 4a927
Function4a927: ; 4a927
FindItemInPCOrBag: ; 4a927
ld a, [ScriptVar]
ld [CurItem], a
ld hl, PCItems
call CheckItem
jr c, .asm_4a948
jr c, .found
ld a, [ScriptVar]
ld [CurItem], a
ld hl, NumItems
call CheckItem
jr c, .asm_4a948
jr c, .found
xor a
ld [ScriptVar], a
ret
.asm_4a948
.found
ld a, 1
ld [ScriptVar], a
ret
@ -22593,22 +22596,22 @@ Function4adb2: ; 4adb2
Function4adc2: ; 4adc2
ld a, [wd002]
cp $ff
jr nz, .asm_4ade5
jr nz, .skip
ld a, [wd003]
cp $ff
jr nz, .asm_4addd
jr nz, .skip2
ld a, [wd004]
ld [wd002], a
ld a, $ff
ld [wd004], a
jr .asm_4ade5
jr .skip
.asm_4addd
.skip2
ld [wd002], a
ld a, $ff
ld [wd003], a
.asm_4ade5
.skip
ld a, [wd003]
cp $ff
ret nz
@ -22635,18 +22638,18 @@ Function4adf7: ; 4adf7
ret
; 4ae12
Function4ae12: ; 4ae12
call Function4ae1f
AskRememberPassword: ; 4ae12
call .DoMenu
ld a, $0
jr c, .asm_4ae1b
jr c, .okay
ld a, $1
.asm_4ae1b
.okay
ld [ScriptVar], a
ret
; 4ae1f
Function4ae1f: ; 4ae1f
.DoMenu: ; 4ae1f
lb bc, 14, 7
push bc
ld hl, YesNoMenuDataHeader
@ -22665,23 +22668,23 @@ Function4ae1f: ; 4ae1f
push af
ld c, 15
call DelayFrames
call Function4ae5e
call Buena_ExitMenu
pop af
jr c, .asm_4ae57
jr c, .refused
ld a, [MenuSelection2]
cp $2
jr z, .asm_4ae57
jr z, .refused
and a
ret
.asm_4ae57
.refused
ld a, $2
ld [MenuSelection2], a
scf
ret
; 4ae5e
Function4ae5e: ; 4ae5e
Buena_ExitMenu: ; 4ae5e
ld a, [hOAMUpdate]
push af
call ExitMenu
@ -33360,7 +33363,6 @@ SECTION "Phone Engine", ROMX, BANK[$28]
INCLUDE "engine/more_phone_scripts.asm"
INCLUDE "engine/buena_phone_scripts.asm"
INCLUDE "text/phone/buena.asm"
SECTION "Phone Text", ROMX, BANK[$29]

View File

@ -7,9 +7,9 @@ CeladonDeptStore6F_MapScriptHeader:
; callbacks
dbw 1, UnknownScript_0x71175
dbw 1, .Callback
UnknownScript_0x71175:
.Callback:
changeblock $c, $0, $3
return

View File

@ -460,7 +460,7 @@ UnknownScript_0x6ee42:
startbattle
returnafterbattle
pause 20
special Function49bf9
special CheckCaughtCelebi
iffalse UnknownScript_0x6ee8e
appear $7
applymovement $7, MovementData_0x6ef4e

View File

@ -431,8 +431,8 @@ PokeCenter2F_CheckGender:
loadmovesprites
playsound SFX_TINGLE
applymovement PLAYER, MovementData_0x192d17
writebyte $80
special Functionc225
writebyte (1 << 7) | (PAL_OW_RED << 4)
special Special_SetPlayerPalette
applymovement PLAYER, MovementData_0x192d1c
setflag ENGINE_KRIS_IN_CABLE_CLUB
special ReplaceKrisSprite
@ -458,8 +458,8 @@ Script_CleanUpFemaleFlagAfterTrade:
clearflag ENGINE_KRIS_IN_CABLE_CLUB
playsound SFX_TINGLE
applymovement PLAYER, MovementData_0x192d17
writebyte $90
special Functionc225
writebyte (1 << 7) | (PAL_OW_BLUE << 4)
special Special_SetPlayerPalette
applymovement PLAYER, MovementData_0x192d1c
special ReplaceKrisSprite
applymovement PLAYER, MovementData_0x192d2a
@ -480,8 +480,8 @@ Script_CleanUpFemaleFlagAfterBattle:
clearflag ENGINE_KRIS_IN_CABLE_CLUB
playsound SFX_TINGLE
applymovement PLAYER, MovementData_0x192d17
writebyte $90
special Functionc225
writebyte (1 << 7) | (PAL_OW_BLUE << 4)
special Special_SetPlayerPalette
applymovement PLAYER, MovementData_0x192d1c
special ReplaceKrisSprite
applymovement PLAYER, MovementData_0x192d2a
@ -539,8 +539,8 @@ TimeCapsuleScript_CheckPlayerGender:
loadmovesprites
playsound SFX_TINGLE
applymovement PLAYER, MovementData_0x192d17
writebyte $80
special Functionc225
writebyte (1 << 7) | (PAL_OW_RED << 4)
special Special_SetPlayerPalette
applymovement PLAYER, MovementData_0x192d22
faceperson PLAYER, $4
setflag ENGINE_KRIS_IN_CABLE_CLUB
@ -568,8 +568,8 @@ Script_LeftTimeCapsule:
clearflag ENGINE_KRIS_IN_CABLE_CLUB
playsound SFX_TINGLE
applymovement PLAYER, MovementData_0x192d17
writebyte $90
special Functionc225
writebyte (1 << 7) | (PAL_OW_BLUE << 4)
special Special_SetPlayerPalette
applymovement PLAYER, MovementData_0x192d1c
special ReplaceKrisSprite
applymovement PLAYER, MovementData_0x192cfc

View File

@ -104,7 +104,7 @@ Buena:
if_equal 30, UnknownScript_0x5d87f
playmusic MUSIC_BUENAS_PASSWORD
writetext UnknownText_0x5de35
special Function4ae12
special AskRememberPassword
iffalse UnknownScript_0x5d81e
writetext UnknownText_0x5de84
closetext