mirror of
https://github.com/pret/pokeheartgold.git
synced 2024-11-24 21:59:54 +00:00
Decomp scrcmd_15 -> scrcmd_party
This commit is contained in:
parent
4ffad4a5fc
commit
f94b3b7033
@ -1406,12 +1406,12 @@
|
||||
.short 237
|
||||
.endm
|
||||
|
||||
.macro scrcmd_238 arg0
|
||||
.macro party_has_pokerus arg0
|
||||
.short 238
|
||||
.short \arg0
|
||||
.endm
|
||||
|
||||
.macro scrcmd_239 arg0, arg1
|
||||
.macro mon_get_gender arg0, arg1
|
||||
.short 239
|
||||
.short \arg0
|
||||
.short \arg1
|
||||
@ -2030,12 +2030,12 @@
|
||||
.short \except
|
||||
.endm
|
||||
|
||||
.macro pokeathlon_party_count arg0
|
||||
.macro count_alive_mons_and_pc arg0
|
||||
.short 358
|
||||
.short \arg0
|
||||
.endm
|
||||
|
||||
.macro scrcmd_359 arg0
|
||||
.macro party_count_egg arg0
|
||||
.short 359
|
||||
.short \arg0
|
||||
.endm
|
||||
@ -2157,19 +2157,19 @@
|
||||
.short \arg1
|
||||
.endm
|
||||
|
||||
.macro scrcmd_382 arg0, arg1
|
||||
.macro mon_get_friendship arg0, arg1
|
||||
.short 382
|
||||
.short \arg0
|
||||
.short \arg1
|
||||
.endm
|
||||
|
||||
.macro scrcmd_383 arg0, arg1
|
||||
.macro mon_add_friendship arg0, arg1
|
||||
.short 383
|
||||
.short \arg0
|
||||
.short \arg1
|
||||
.endm
|
||||
|
||||
.macro scrcmd_384 arg0, arg1
|
||||
.macro mon_subtract_friendship arg0, arg1
|
||||
.short 384
|
||||
.short \arg0
|
||||
.short \arg1
|
||||
@ -2245,13 +2245,13 @@
|
||||
.short \arg1
|
||||
.endm
|
||||
|
||||
.macro scrcmd_397 arg0, arg1
|
||||
.macro mon_forget_move arg0, arg1
|
||||
.short 397
|
||||
.short \arg0
|
||||
.short \arg1
|
||||
.endm
|
||||
|
||||
.macro scrcmd_398 arg0, arg1, arg2
|
||||
.macro mon_get_move arg0, arg1, arg2
|
||||
.short 398
|
||||
.short \arg0
|
||||
.short \arg1
|
||||
@ -2439,7 +2439,7 @@
|
||||
.short \arg0
|
||||
.endm
|
||||
|
||||
.macro scrcmd_428 arg0
|
||||
.macro mon_give_mail arg0
|
||||
.short 428
|
||||
.short \arg0
|
||||
.endm
|
||||
@ -2473,7 +2473,7 @@
|
||||
.short \arg2
|
||||
.endm
|
||||
|
||||
.macro scrcmd_434 arg0, arg1
|
||||
.macro party_count_mons_at_or_below_level arg0, arg1
|
||||
.short 434
|
||||
.short \arg0
|
||||
.short \arg1
|
||||
@ -2602,13 +2602,13 @@
|
||||
.byte \arg0
|
||||
.endm
|
||||
|
||||
.macro scrcmd_457 arg0, arg1
|
||||
.macro mon_get_nature arg0, arg1
|
||||
.short 457
|
||||
.short \arg0
|
||||
.short \arg1
|
||||
.endm
|
||||
|
||||
.macro scrcmd_458 arg0, arg1
|
||||
.macro get_party_slot_with_nature arg0, arg1
|
||||
.short 458
|
||||
.short \arg0
|
||||
.short \arg1
|
||||
@ -2718,13 +2718,13 @@
|
||||
.short \arg1
|
||||
.endm
|
||||
|
||||
.macro scrcmd_478 arg0, arg1
|
||||
.macro mon_get_ribbon_count arg0, arg1
|
||||
.short 478
|
||||
.short \arg0
|
||||
.short \arg1
|
||||
.endm
|
||||
|
||||
.macro scrcmd_479 arg0
|
||||
.macro party_get_ribbon_count arg0
|
||||
.short 479
|
||||
.short \arg0
|
||||
.endm
|
||||
@ -2827,7 +2827,7 @@
|
||||
.short \arg0
|
||||
.endm
|
||||
|
||||
.macro scrcmd_496 arg0
|
||||
.macro get_party_lead arg0
|
||||
.short 496
|
||||
.short \arg0
|
||||
.endm
|
||||
@ -3011,7 +3011,7 @@
|
||||
.short \arg0
|
||||
.endm
|
||||
|
||||
.macro get_lead_mon_index arg0
|
||||
.macro get_party_lead_alive arg0
|
||||
.short 529
|
||||
.short \arg0
|
||||
.endm
|
||||
@ -3045,7 +3045,7 @@
|
||||
.short \arg0
|
||||
.endm
|
||||
|
||||
.macro scrcmd_535 arg0, arg1
|
||||
.macro mon_get_level arg0, arg1
|
||||
.short 535
|
||||
.short \arg0
|
||||
.short \arg1
|
||||
@ -3085,7 +3085,7 @@
|
||||
.byte \arg3
|
||||
.endm
|
||||
|
||||
.macro scrcmd_542 arg0, arg1, arg2
|
||||
.macro mon_get_contest_value arg0, arg1, arg2
|
||||
.short 542
|
||||
.short \arg0
|
||||
.short \arg1
|
||||
@ -3650,7 +3650,7 @@
|
||||
.short \arg0
|
||||
.endm
|
||||
|
||||
.macro scrcmd_647 arg0, arg1
|
||||
.macro get_party_slot_with_species arg0, arg1
|
||||
.short 647
|
||||
.short \arg0
|
||||
.short \arg1
|
||||
@ -3896,7 +3896,7 @@
|
||||
.short \arg0
|
||||
.endm
|
||||
|
||||
.macro scrcmd_688 arg0, arg1
|
||||
.macro get_party_slot_with_fateful_encounter arg0, arg1
|
||||
.short 688
|
||||
.short \arg0
|
||||
.short \arg1
|
||||
@ -3971,7 +3971,7 @@
|
||||
.short 700
|
||||
.endm
|
||||
|
||||
.macro scrcmd_701 arg0, arg1
|
||||
.macro mon_has_item arg0, arg1
|
||||
.short 701
|
||||
.short \arg0
|
||||
.short \arg1
|
||||
@ -4382,7 +4382,7 @@
|
||||
.byte \arg1
|
||||
.endm
|
||||
|
||||
.macro scrcmd_781 arg0
|
||||
.macro kenya_check_party_or_mailbox arg0
|
||||
.short 781
|
||||
.short \arg0
|
||||
.endm
|
||||
@ -4619,7 +4619,7 @@
|
||||
.short \arg1
|
||||
.endm
|
||||
|
||||
.macro scrcmd_828 arg0, arg1, arg2
|
||||
.macro mon_add_contest_value arg0, arg1, arg2
|
||||
.short 828
|
||||
.short \arg0
|
||||
.byte \arg1
|
||||
|
@ -24,7 +24,7 @@ ov78_021E5900: ; 0x021E5900
|
||||
bl OverlayManager_GetParentWork
|
||||
add r5, r0, #0
|
||||
ldr r0, [r5]
|
||||
bl Save_GetLeadMonIdxForBugContest
|
||||
bl Save_GetPartyLeadAlive
|
||||
add r6, r0, #0
|
||||
cmp r5, #0
|
||||
bne _021E593C
|
||||
|
48
asm/scrcmd.s
48
asm/scrcmd.s
@ -272,8 +272,8 @@ gScriptCmdTable:
|
||||
.word ScrCmd_235 ; 235
|
||||
.word ScrCmd_236 ; 236
|
||||
.word ScrCmd_237 ; 237
|
||||
.word ScrCmd_238 ; 238
|
||||
.word ScrCmd_239 ; 239
|
||||
.word ScrCmd_PartyHasPokerus ; 238
|
||||
.word ScrCmd_MonGetGender ; 239
|
||||
.word ScrCmd_SetDynamicWarp ; 240
|
||||
.word ScrCmd_GetDynamicWarpFloorNo ; 241
|
||||
.word ScrCmd_ElevatorCurFloorBox ; 242
|
||||
@ -392,8 +392,8 @@ gScriptCmdTable:
|
||||
.word ScrCmd_PartymonIsMine ; 355
|
||||
.word ScrCmd_PartyCountNotEgg ; 356
|
||||
.word ScrCmd_CountAliveMons ; 357
|
||||
.word ScrCmd_PokeathlonPartyCount ; 358
|
||||
.word ScrCmd_359 ; 359
|
||||
.word ScrCmd_CountAliveMonsAndPC ; 358
|
||||
.word ScrCmd_PartyCountEgg ; 359
|
||||
.word ScrCmd_SubMoneyVar ; 360
|
||||
.word ScrCmd_RetrieveDayCareMon ; 361
|
||||
.word ScrCmd_GiveLoanMon ; 362
|
||||
@ -416,9 +416,9 @@ gScriptCmdTable:
|
||||
.word ScrCmd_379 ; 379
|
||||
.word ScrCmd_Random ; 380
|
||||
.word ScrCmd_381 ; 381
|
||||
.word ScrCmd_382 ; 382
|
||||
.word ScrCmd_383 ; 383
|
||||
.word ScrCmd_384 ; 384
|
||||
.word ScrCmd_MonGetFriendship ; 382
|
||||
.word ScrCmd_MonAddFriendship ; 383
|
||||
.word ScrCmd_MonSubtractFriendship ; 384
|
||||
.word ScrCmd_BufferDayCareMonStats ; 385
|
||||
.word ScrCmd_GetPlayerFacing ; 386
|
||||
.word ScrCmd_GetDayCareCompatibility ; 387
|
||||
@ -431,8 +431,8 @@ gScriptCmdTable:
|
||||
.word ScrCmd_394 ; 394
|
||||
.word ScrCmd_395 ; 395
|
||||
.word ScrCmd_CountMonMoves ; 396
|
||||
.word ScrCmd_397 ; 397
|
||||
.word ScrCmd_398 ; 398
|
||||
.word ScrCmd_MonForgetMove ; 397
|
||||
.word ScrCmd_MonGetMove ; 398
|
||||
.word ScrCmd_BufferPartyMonMoveName ; 399
|
||||
.word ScrCmd_StrengthFlagAction ; 400
|
||||
.word ScrCmd_FlashAction ; 401
|
||||
@ -462,13 +462,13 @@ gScriptCmdTable:
|
||||
.word ScrCmd_425 ; 425
|
||||
.word ScrCmd_KenyaCheck ; 426
|
||||
.word ScrCmd_427 ; 427
|
||||
.word ScrCmd_428 ; 428
|
||||
.word ScrCmd_MonGiveMail ; 428
|
||||
.word ScrCmd_CountFossils ; 429
|
||||
.word ScrCmd_SetPhoneCall ; 430
|
||||
.word ScrCmd_RunPhoneCall ; 431
|
||||
.word ScrCmd_GetFossilPokemon ; 432
|
||||
.word ScrCmd_GetFossilMinimumAmount ; 433
|
||||
.word ScrCmd_434 ; 434
|
||||
.word ScrCmd_PartyCountMonsAtOrBelowLevel ; 434
|
||||
.word ScrCmd_SurvivePoisoning ; 435
|
||||
.word ScrCmd_436 ; 436
|
||||
.word ScrCmd_DebugWatch ; 437
|
||||
@ -491,8 +491,8 @@ gScriptCmdTable:
|
||||
.word ScrCmd_454 ; 454
|
||||
.word ScrCmd_455 ; 455
|
||||
.word ScrCmd_456 ; 456
|
||||
.word ScrCmd_457 ; 457
|
||||
.word ScrCmd_458 ; 458
|
||||
.word ScrCmd_MonGetNature ; 457
|
||||
.word ScrCmd_GetPartySlotWithNature ; 458
|
||||
.word ScrCmd_459 ; 459
|
||||
.word ScrCmd_LoadPhoneDat ; 460
|
||||
.word ScrCmd_GetPhoneContactMsgIds ; 461
|
||||
@ -512,8 +512,8 @@ gScriptCmdTable:
|
||||
.word ScrCmd_475 ; 475
|
||||
.word ScrCmd_476 ; 476
|
||||
.word ScrCmd_NatDexFlagAction ; 477
|
||||
.word ScrCmd_478 ; 478
|
||||
.word ScrCmd_479 ; 479
|
||||
.word ScrCmd_MonGetRibbonCount ; 478
|
||||
.word ScrCmd_GetPartyRibbonCount ; 479
|
||||
.word ScrCmd_MonHasRibbon ; 480
|
||||
.word ScrCmd_GiveRibbon ; 481
|
||||
.word ScrCmd_BufferRibbonName ; 482
|
||||
@ -530,7 +530,7 @@ gScriptCmdTable:
|
||||
.word ScrCmd_PromptEasyChat ; 493
|
||||
.word ScrCmd_494 ; 494
|
||||
.word ScrCmd_GetGameVersion ; 495
|
||||
.word ScrCmd_496 ; 496
|
||||
.word ScrCmd_GetPartyLead ; 496
|
||||
.word ScrCmd_GetMonTypes ; 497
|
||||
.word ScrCmd_PrimoPasswordCheck1 ; 498
|
||||
.word ScrCmd_PrimoPasswordCheck2 ; 499
|
||||
@ -563,20 +563,20 @@ gScriptCmdTable:
|
||||
.word ScrCmd_526 ; 526
|
||||
.word ScrCmd_527 ; 527
|
||||
.word ScrCmd_528 ; 528
|
||||
.word ScrCmd_PartySelectMon ; 529
|
||||
.word ScrCmd_GetPartyLeadAlive ; 529
|
||||
.word ScrCmd_530 ; 530
|
||||
.word ScrCmd_BufferBackgroundName ; 531
|
||||
.word ScrCmd_CheckCoinsImmediate ; 532
|
||||
.word ScrCmd_CheckGiveCoins ; 533
|
||||
.word ScrCmd_534 ; 534
|
||||
.word ScrCmd_535 ; 535
|
||||
.word ScrCmd_MonGetLevel ; 535
|
||||
.word ScrCmd_536 ; 536
|
||||
.word ScrCmd_537 ; 537
|
||||
.word ScrCmd_538 ; 538
|
||||
.word ScrCmd_539 ; 539
|
||||
.word ScrCmd_540 ; 540
|
||||
.word ScrCmd_BufferIntEx ; 541
|
||||
.word ScrCmd_542 ; 542
|
||||
.word ScrCmd_MonGetContestValue ; 542
|
||||
.word ScrCmd_543 ; 543
|
||||
.word ScrCmd_544 ; 544
|
||||
.word ScrCmd_545 ; 545
|
||||
@ -681,7 +681,7 @@ gScriptCmdTable:
|
||||
.word ScrCmd_644 ; 644
|
||||
.word ScrCmd_645 ; 645
|
||||
.word ScrCmd_646 ; 646
|
||||
.word ScrCmd_647 ; 647
|
||||
.word ScrCmd_GetPartySlotWithSpecies ; 647
|
||||
.word ScrCmd_648 ; 648
|
||||
.word ScrCmd_ScratchOffCard ; 649
|
||||
.word ScrCmd_ScratchOffCardEnd ; 650
|
||||
@ -722,7 +722,7 @@ gScriptCmdTable:
|
||||
.word ScrCmd_GetPlayerXYZ ; 685
|
||||
.word ScrCmd_686 ; 686
|
||||
.word ScrCmd_687 ; 687
|
||||
.word ScrCmd_688 ; 688
|
||||
.word ScrCmd_GetPartySlotWithFatefulEncounter ; 688
|
||||
.word ScrCmd_CommSanitizeParty ; 689
|
||||
.word ScrCmd_DayCareSanitizeMon ; 690
|
||||
.word ScrCmd_691 ; 691
|
||||
@ -735,7 +735,7 @@ gScriptCmdTable:
|
||||
.word ScrCmd_FollowerPokeIsEventTrigger ; 698
|
||||
.word ScrCmd_699 ; 699
|
||||
.word ScrCmd_700 ; 700
|
||||
.word ScrCmd_701 ; 701
|
||||
.word ScrCmd_MonHasItem ; 701
|
||||
.word ScrCmd_702 ; 702
|
||||
.word ScrCmd_703 ; 703
|
||||
.word ScrCmd_704 ; 704
|
||||
@ -815,7 +815,7 @@ gScriptCmdTable:
|
||||
.word ScrCmd_GiveSpikyEarPichu ; 778
|
||||
.word ScrCmd_RadioMusicIsPlaying ; 779
|
||||
.word ScrCmd_CasinoGame ; 780
|
||||
.word ScrCmd_781 ; 781
|
||||
.word ScrCmd_KenyaCheckPartyOrMailbox ; 781
|
||||
.word ScrCmd_MartSell ; 782
|
||||
.word ScrCmd_SetFollowPokeInhibitState ; 783
|
||||
.word ScrCmd_ScriptOverlayCmd ; 784
|
||||
@ -862,7 +862,7 @@ gScriptCmdTable:
|
||||
.word ScrCmd_825 ; 825
|
||||
.word ScrCmd_826 ; 826
|
||||
.word ScrCmd_GetPartymonForme ; 827
|
||||
.word ScrCmd_828 ; 828
|
||||
.word ScrCmd_MonAddContestValue ; 828
|
||||
.word ScrCmd_829 ; 829
|
||||
.word ScrCmd_830 ; 830
|
||||
.word ScrCmd_831 ; 831
|
||||
|
2561
asm/scrcmd_15.s
2561
asm/scrcmd_15.s
File diff suppressed because it is too large
Load Diff
@ -625,7 +625,7 @@ _02051D94:
|
||||
cmp r0, #0
|
||||
beq _02051DDA
|
||||
add r0, r4, #0
|
||||
bl Save_GetLeadMonIdxForBugContest
|
||||
bl Save_GetPartyLeadAlive
|
||||
mov r1, #0x73
|
||||
lsl r1, r1, #2
|
||||
strb r0, [r5, r1]
|
||||
|
@ -309,8 +309,8 @@ _0205BD14:
|
||||
_0205BD1C: .word 0x000004AA
|
||||
thumb_func_end sub_0205BC78
|
||||
|
||||
thumb_func_start sub_0205BD20
|
||||
sub_0205BD20: ; 0x0205BD20
|
||||
thumb_func_start Save_GetPartyLead
|
||||
Save_GetPartyLead: ; 0x0205BD20
|
||||
push {r3, r4, r5, r6, r7, lr}
|
||||
add r6, r0, #0
|
||||
bl SavArray_PlayerParty_get
|
||||
@ -343,10 +343,10 @@ _0205BD5C:
|
||||
pop {r3, r4, r5, r6, r7, pc}
|
||||
.balign 4, 0
|
||||
_0205BD60: .word 0x00000000
|
||||
thumb_func_end sub_0205BD20
|
||||
thumb_func_end Save_GetPartyLead
|
||||
|
||||
thumb_func_start Save_GetLeadMonIdxForBugContest
|
||||
Save_GetLeadMonIdxForBugContest: ; 0x0205BD64
|
||||
thumb_func_start Save_GetPartyLeadAlive
|
||||
Save_GetPartyLeadAlive: ; 0x0205BD64
|
||||
push {r3, r4, r5, r6, r7, lr}
|
||||
add r7, r0, #0
|
||||
bl SavArray_PlayerParty_get
|
||||
@ -385,7 +385,7 @@ _0205BDAE:
|
||||
pop {r3, r4, r5, r6, r7, pc}
|
||||
nop
|
||||
_0205BDB4: .word 0x00000000
|
||||
thumb_func_end Save_GetLeadMonIdxForBugContest
|
||||
thumb_func_end Save_GetPartyLeadAlive
|
||||
|
||||
thumb_func_start sub_0205BDB8
|
||||
sub_0205BDB8: ; 0x0205BDB8
|
||||
|
@ -153,7 +153,7 @@ _0216:
|
||||
pokecen_anim VAR_SPECIAL_x8006
|
||||
apply_movement VAR_SPECIAL_x8007, _107C
|
||||
wait_movement
|
||||
get_lead_mon_index VAR_SPECIAL_x8008
|
||||
get_party_lead_alive VAR_SPECIAL_x8008
|
||||
heal_party
|
||||
return
|
||||
|
||||
@ -173,7 +173,7 @@ _026F:
|
||||
set_avatar_bits PLAYER_TRANSITION_WALKING
|
||||
_0273:
|
||||
update_avatar_state
|
||||
get_lead_mon_index VAR_SPECIAL_x8009
|
||||
get_party_lead_alive VAR_SPECIAL_x8009
|
||||
compare VAR_SPECIAL_x8008, VAR_SPECIAL_x8009
|
||||
goto_if_eq _02B2
|
||||
wait 15, VAR_SPECIAL_x800A
|
||||
@ -211,7 +211,7 @@ _02F3:
|
||||
set_avatar_bits PLAYER_TRANSITION_WALKING
|
||||
_02F7:
|
||||
update_avatar_state
|
||||
get_lead_mon_index VAR_SPECIAL_x8009
|
||||
get_party_lead_alive VAR_SPECIAL_x8009
|
||||
compare VAR_SPECIAL_x8008, VAR_SPECIAL_x8009
|
||||
goto_if_eq _0336
|
||||
wait 15, VAR_SPECIAL_x800A
|
||||
@ -235,7 +235,7 @@ _0336:
|
||||
end
|
||||
|
||||
_034D:
|
||||
scrcmd_238 VAR_SPECIAL_x8006
|
||||
party_has_pokerus VAR_SPECIAL_x8006
|
||||
compare VAR_SPECIAL_x8006, 1
|
||||
goto_if_eq _0364
|
||||
goto _023A
|
||||
@ -255,7 +255,7 @@ _0391:
|
||||
set_avatar_bits PLAYER_TRANSITION_WALKING
|
||||
_0395:
|
||||
update_avatar_state
|
||||
get_lead_mon_index VAR_SPECIAL_x8009
|
||||
get_party_lead_alive VAR_SPECIAL_x8009
|
||||
compare VAR_SPECIAL_x8008, VAR_SPECIAL_x8009
|
||||
goto_if_eq _03D4
|
||||
wait 15, VAR_SPECIAL_x800A
|
||||
|
@ -186,7 +186,7 @@ _02A8:
|
||||
scr_seq_D24R0101_007:
|
||||
scrcmd_609
|
||||
lockall
|
||||
get_lead_mon_index VAR_TEMP_x4005
|
||||
get_party_lead_alive VAR_TEMP_x4005
|
||||
follower_poke_is_event_trigger 2, VAR_TEMP_x4005, VAR_TEMP_x4006
|
||||
compare VAR_TEMP_x4006, 0
|
||||
goto_if_eq _02DA
|
||||
|
@ -23,7 +23,7 @@ scr_seq_D24R0205_008:
|
||||
goto _009D
|
||||
|
||||
_003D:
|
||||
get_lead_mon_index VAR_TEMP_x4005
|
||||
get_party_lead_alive VAR_TEMP_x4005
|
||||
compare VAR_UNK_4102, 1
|
||||
goto_if_eq _0061
|
||||
compare VAR_UNK_4102, 2
|
||||
|
@ -21,7 +21,7 @@ scr_seq_D24R0216_004:
|
||||
goto _0095
|
||||
|
||||
_0035:
|
||||
get_lead_mon_index VAR_TEMP_x4005
|
||||
get_party_lead_alive VAR_TEMP_x4005
|
||||
compare VAR_UNK_4102, 1
|
||||
goto_if_eq _0059
|
||||
compare VAR_UNK_4102, 2
|
||||
|
@ -21,7 +21,7 @@ scr_seq_D24R0218_004:
|
||||
goto _0095
|
||||
|
||||
_0035:
|
||||
get_lead_mon_index VAR_TEMP_x4005
|
||||
get_party_lead_alive VAR_TEMP_x4005
|
||||
compare VAR_UNK_4102, 1
|
||||
goto_if_eq _0059
|
||||
compare VAR_UNK_4102, 2
|
||||
|
@ -1316,7 +1316,7 @@ _1371:
|
||||
npc_msg msg_0115_D36R0101_00032
|
||||
_1374:
|
||||
closemsg
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
get_partymon_species VAR_TEMP_x4000, VAR_TEMP_x4001
|
||||
compare VAR_TEMP_x4001, 50
|
||||
goto_if_eq _13D5
|
||||
@ -1615,7 +1615,7 @@ scr_seq_D36R0101_012:
|
||||
goto_if_ge _17C1
|
||||
compare VAR_UNK_412B, 1
|
||||
goto_if_eq _1803
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
follower_poke_is_event_trigger 0, VAR_TEMP_x4000, VAR_TEMP_x4001
|
||||
compare VAR_TEMP_x4001, 0
|
||||
goto_if_ne _17B7
|
||||
@ -1629,7 +1629,7 @@ _17C1:
|
||||
compare VAR_UNK_40FE, 4
|
||||
goto_if_ge _1803
|
||||
goto_if_unset FLAG_BEAT_RADIO_TOWER_ROCKETS, _1803
|
||||
get_lead_mon_index VAR_TEMP_x4006
|
||||
get_party_lead_alive VAR_TEMP_x4006
|
||||
follower_poke_is_event_trigger 3, VAR_TEMP_x4006, VAR_TEMP_x4007
|
||||
compare VAR_TEMP_x4007, 0
|
||||
goto_if_ne _17FD
|
||||
|
@ -188,7 +188,7 @@ _01F5:
|
||||
compare VAR_SPECIAL_RESULT, 0
|
||||
goto_if_ge _02CA
|
||||
_02CA:
|
||||
scrcmd_383 1, VAR_SPECIAL_x8005
|
||||
mon_add_friendship 1, VAR_SPECIAL_x8005
|
||||
bufferpartymonnick 0, VAR_SPECIAL_x8005
|
||||
npc_msg msg_0117_D37R0102_00024
|
||||
wait_button_or_walk_away
|
||||
@ -197,7 +197,7 @@ _02CA:
|
||||
end
|
||||
|
||||
_02E0:
|
||||
scrcmd_383 5, VAR_SPECIAL_x8005
|
||||
mon_add_friendship 5, VAR_SPECIAL_x8005
|
||||
bufferpartymonnick 0, VAR_SPECIAL_x8005
|
||||
npc_msg msg_0117_D37R0102_00025
|
||||
wait_button_or_walk_away
|
||||
@ -206,7 +206,7 @@ _02E0:
|
||||
end
|
||||
|
||||
_02F6:
|
||||
scrcmd_383 10, VAR_SPECIAL_x8005
|
||||
mon_add_friendship 10, VAR_SPECIAL_x8005
|
||||
bufferpartymonnick 0, VAR_SPECIAL_x8005
|
||||
npc_msg msg_0117_D37R0102_00026
|
||||
wait_button_or_walk_away
|
||||
@ -304,7 +304,7 @@ _0375:
|
||||
goto_if_ge _047C
|
||||
_0444:
|
||||
call _04C8
|
||||
scrcmd_383 1, VAR_SPECIAL_x8005
|
||||
mon_add_friendship 1, VAR_SPECIAL_x8005
|
||||
bufferpartymonnick 0, VAR_SPECIAL_x8005
|
||||
npc_msg msg_0117_D37R0102_00024
|
||||
wait_button_or_walk_away
|
||||
@ -314,7 +314,7 @@ _0444:
|
||||
|
||||
_0460:
|
||||
call _04C8
|
||||
scrcmd_383 5, VAR_SPECIAL_x8005
|
||||
mon_add_friendship 5, VAR_SPECIAL_x8005
|
||||
bufferpartymonnick 0, VAR_SPECIAL_x8005
|
||||
npc_msg msg_0117_D37R0102_00025
|
||||
wait_button_or_walk_away
|
||||
@ -324,7 +324,7 @@ _0460:
|
||||
|
||||
_047C:
|
||||
call _04D8
|
||||
scrcmd_383 10, VAR_SPECIAL_x8005
|
||||
mon_add_friendship 10, VAR_SPECIAL_x8005
|
||||
bufferpartymonnick 0, VAR_SPECIAL_x8005
|
||||
npc_msg msg_0117_D37R0102_00026
|
||||
wait_button_or_walk_away
|
||||
@ -363,13 +363,13 @@ _04BD:
|
||||
end
|
||||
|
||||
_04C8:
|
||||
scrcmd_828 VAR_SPECIAL_x8005, 1, 16
|
||||
scrcmd_828 VAR_SPECIAL_x8005, 5, 11
|
||||
mon_add_contest_value VAR_SPECIAL_x8005, 1, 16
|
||||
mon_add_contest_value VAR_SPECIAL_x8005, 5, 11
|
||||
return
|
||||
|
||||
_04D8:
|
||||
scrcmd_828 VAR_SPECIAL_x8005, 1, 24
|
||||
scrcmd_828 VAR_SPECIAL_x8005, 5, 18
|
||||
mon_add_contest_value VAR_SPECIAL_x8005, 1, 24
|
||||
mon_add_contest_value VAR_SPECIAL_x8005, 5, 18
|
||||
return
|
||||
|
||||
scr_seq_D37R0102_003:
|
||||
|
@ -115,7 +115,7 @@ scr_seq_D45R0102_001:
|
||||
buffer_players_name 0
|
||||
gender_msgbox msg_0131_D45R0102_00016, msg_0131_D45R0102_00015
|
||||
closemsg
|
||||
get_lead_mon_index VAR_TEMP_x4002
|
||||
get_party_lead_alive VAR_TEMP_x4002
|
||||
get_partymon_species VAR_TEMP_x4002, VAR_SPECIAL_RESULT
|
||||
compare VAR_SPECIAL_RESULT, 251
|
||||
call_if_ne _02C0
|
||||
|
@ -130,7 +130,7 @@ _01D9:
|
||||
goto _0218
|
||||
|
||||
_020C:
|
||||
get_lead_mon_index VAR_SPECIAL_x8000
|
||||
get_party_lead_alive VAR_SPECIAL_x8000
|
||||
buffer_mon_species_name 1, VAR_SPECIAL_x8000
|
||||
npc_msg msg_0137_D49_00001
|
||||
_0218:
|
||||
|
@ -75,7 +75,7 @@ scr_seq_D51R0201_001:
|
||||
faceplayer
|
||||
compare VAR_SCENE_SINJOH_MYSTRI_ROOM, 8
|
||||
goto_if_eq _0165
|
||||
get_lead_mon_index VAR_TEMP_x4005
|
||||
get_party_lead_alive VAR_TEMP_x4005
|
||||
follower_poke_is_event_trigger 2, VAR_TEMP_x4005, VAR_TEMP_x4006
|
||||
compare VAR_TEMP_x4006, 1
|
||||
goto_if_eq _011A
|
||||
@ -409,7 +409,7 @@ _0550:
|
||||
return
|
||||
|
||||
_056D:
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
compare VAR_UNK_4102, 1
|
||||
goto_if_ne _05B2
|
||||
follower_poke_is_event_trigger 1, VAR_TEMP_x4000, VAR_SPECIAL_RESULT
|
||||
@ -710,7 +710,7 @@ _0A4D:
|
||||
wait_fade
|
||||
compare VAR_SCENE_SINJOH_MYSTRI_ROOM, 14
|
||||
goto_if_eq _0AAA
|
||||
get_lead_mon_index VAR_TEMP_x4005
|
||||
get_party_lead_alive VAR_TEMP_x4005
|
||||
follower_poke_is_event_trigger 2, VAR_TEMP_x4005, VAR_TEMP_x4006
|
||||
compare VAR_TEMP_x4006, 1
|
||||
goto_if_ne _0AA0
|
||||
|
@ -89,7 +89,7 @@ _0126:
|
||||
|
||||
_0143:
|
||||
scrcmd_598 1
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
get_partymon_species VAR_TEMP_x4000, VAR_TEMP_x4000
|
||||
call _025B
|
||||
play_cry VAR_TEMP_x4000, 0
|
||||
@ -142,7 +142,7 @@ _01FB:
|
||||
|
||||
_0218:
|
||||
scrcmd_598 1
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
get_partymon_species VAR_TEMP_x4000, VAR_TEMP_x4000
|
||||
call _025B
|
||||
play_cry VAR_TEMP_x4000, 0
|
||||
@ -238,7 +238,7 @@ _0365:
|
||||
_0382:
|
||||
setvar VAR_SPECIAL_x8007, 1
|
||||
scrcmd_598 1
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
get_partymon_species VAR_TEMP_x4000, VAR_TEMP_x4000
|
||||
call _04D0
|
||||
play_cry VAR_TEMP_x4000, 0
|
||||
@ -297,7 +297,7 @@ _045C:
|
||||
_0479:
|
||||
scrcmd_598 1
|
||||
setvar VAR_SPECIAL_x8007, 1
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
get_partymon_species VAR_TEMP_x4000, VAR_TEMP_x4000
|
||||
call _04D0
|
||||
play_cry VAR_TEMP_x4000, 0
|
||||
@ -394,7 +394,7 @@ _05DD:
|
||||
goto _060E
|
||||
|
||||
_05F4:
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
get_partymon_species VAR_TEMP_x4000, VAR_TEMP_x4000
|
||||
call _0715
|
||||
play_cry VAR_TEMP_x4000, 0
|
||||
@ -453,7 +453,7 @@ _06A6:
|
||||
goto _06D7
|
||||
|
||||
_06BD:
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
get_partymon_species VAR_TEMP_x4000, VAR_TEMP_x4000
|
||||
call _0715
|
||||
play_cry VAR_TEMP_x4000, 0
|
||||
@ -617,7 +617,7 @@ _08D2:
|
||||
goto _0909
|
||||
|
||||
_08E9:
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
get_partymon_species VAR_TEMP_x4000, VAR_TEMP_x4000
|
||||
call _091A
|
||||
play_cry VAR_TEMP_x4000, 0
|
||||
@ -812,7 +812,7 @@ _0B67:
|
||||
compare VAR_SPECIAL_RESULT, 1
|
||||
goto_if_ne _0BA0
|
||||
scrcmd_598 1
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
get_partymon_species VAR_TEMP_x4000, VAR_TEMP_x4000
|
||||
call _0CC5
|
||||
play_cry VAR_TEMP_x4000, 0
|
||||
@ -876,7 +876,7 @@ _0C5D:
|
||||
compare VAR_SPECIAL_RESULT, 1
|
||||
goto_if_ne _0C96
|
||||
scrcmd_598 1
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
get_partymon_species VAR_TEMP_x4000, VAR_TEMP_x4000
|
||||
call _0CC5
|
||||
play_cry VAR_TEMP_x4000, 0
|
||||
|
@ -144,7 +144,7 @@ _01B0:
|
||||
compare VAR_SPECIAL_x8004, 1
|
||||
goto_if_eq _021A
|
||||
_01D4:
|
||||
get_lead_mon_index VAR_SPECIAL_RESULT
|
||||
get_party_lead_alive VAR_SPECIAL_RESULT
|
||||
bufferpartymonnick 0, VAR_SPECIAL_RESULT
|
||||
npc_msg msg_0246_00010
|
||||
touchscreen_menu_hide
|
||||
|
@ -98,7 +98,7 @@ _019C:
|
||||
goto _008C
|
||||
.byte 0x02, 0x00
|
||||
_01A7:
|
||||
pokeathlon_party_count VAR_SPECIAL_RESULT
|
||||
count_alive_mons_and_pc VAR_SPECIAL_RESULT
|
||||
compare VAR_SPECIAL_RESULT, 3
|
||||
goto_if_lt _07E6
|
||||
npc_msg msg_0312_00003
|
||||
@ -679,7 +679,7 @@ _0AA6:
|
||||
.byte 0x02
|
||||
.byte 0x00
|
||||
_0AB1:
|
||||
pokeathlon_party_count VAR_SPECIAL_RESULT
|
||||
count_alive_mons_and_pc VAR_SPECIAL_RESULT
|
||||
compare VAR_SPECIAL_RESULT, 3
|
||||
goto_if_lt _07E6
|
||||
callstd std_prompt_save
|
||||
|
@ -18,7 +18,7 @@ scr_seq_R03_001:
|
||||
scrcmd_517 386, VAR_SPECIAL_RESULT
|
||||
compare VAR_SPECIAL_RESULT, 0
|
||||
goto_if_eq _02DF
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
get_partymon_species VAR_TEMP_x4000, VAR_TEMP_x4001
|
||||
compare VAR_TEMP_x4001, 386
|
||||
goto_if_eq _0050
|
||||
@ -61,7 +61,7 @@ scr_seq_R03_002:
|
||||
scrcmd_517 386, VAR_SPECIAL_RESULT
|
||||
compare VAR_SPECIAL_RESULT, 0
|
||||
goto_if_eq _02DF
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
get_partymon_species VAR_TEMP_x4000, VAR_TEMP_x4001
|
||||
compare VAR_TEMP_x4001, 386
|
||||
goto_if_eq _0107
|
||||
@ -110,7 +110,7 @@ scr_seq_R03_003:
|
||||
scrcmd_517 386, VAR_SPECIAL_RESULT
|
||||
compare VAR_SPECIAL_RESULT, 0
|
||||
goto_if_eq _02DF
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
get_partymon_species VAR_TEMP_x4000, VAR_TEMP_x4001
|
||||
compare VAR_TEMP_x4001, 386
|
||||
goto_if_eq _01D5
|
||||
@ -146,7 +146,7 @@ scr_seq_R03_004:
|
||||
scrcmd_517 386, VAR_SPECIAL_RESULT
|
||||
compare VAR_SPECIAL_RESULT, 0
|
||||
goto_if_eq _02DF
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
get_partymon_species VAR_TEMP_x4000, VAR_TEMP_x4001
|
||||
compare VAR_TEMP_x4001, 386
|
||||
goto_if_eq _0275
|
||||
|
@ -71,7 +71,7 @@ scr_seq_R10_002:
|
||||
player_on_bike_check VAR_SPECIAL_RESULT
|
||||
compare VAR_SPECIAL_RESULT, 1
|
||||
goto_if_eq _0197
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
get_partymon_species VAR_TEMP_x4000, VAR_TEMP_x4001
|
||||
compare VAR_TEMP_x4001, 25
|
||||
goto_if_ne _0197
|
||||
|
@ -421,7 +421,7 @@ scr_seq_R14_005:
|
||||
player_on_bike_check VAR_SPECIAL_RESULT
|
||||
compare VAR_SPECIAL_RESULT, 1
|
||||
goto_if_eq _0602
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
get_partymon_species VAR_TEMP_x4000, VAR_TEMP_x4001
|
||||
compare VAR_TEMP_x4001, 113
|
||||
goto_if_eq _060D
|
||||
@ -455,7 +455,7 @@ _0658:
|
||||
player_on_bike_check VAR_SPECIAL_RESULT
|
||||
compare VAR_SPECIAL_RESULT, 1
|
||||
goto_if_eq _0680
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
get_partymon_species VAR_TEMP_x4000, VAR_TEMP_x4001
|
||||
compare VAR_TEMP_x4001, 113
|
||||
goto_if_eq _068B
|
||||
|
@ -14,8 +14,8 @@ scr_seq_R27R0101_000:
|
||||
faceplayer
|
||||
goto_if_set FLAG_UNK_0E9, _006A
|
||||
npc_msg msg_0370_R27R0101_00000
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
scrcmd_382 VAR_SPECIAL_RESULT, VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
mon_get_friendship VAR_SPECIAL_RESULT, VAR_TEMP_x4000
|
||||
compare VAR_SPECIAL_RESULT, 150
|
||||
goto_if_ge _003E
|
||||
npc_msg msg_0370_R27R0101_00003
|
||||
|
@ -40,7 +40,7 @@ scr_seq_R29_003:
|
||||
play_se SEQ_SE_DP_SELECT
|
||||
lockall
|
||||
faceplayer
|
||||
get_lead_mon_index VAR_SPECIAL_x8002
|
||||
get_party_lead_alive VAR_SPECIAL_x8002
|
||||
mon_has_ribbon VAR_SPECIAL_RESULT, VAR_SPECIAL_x8002, RIBBON_SHOCK
|
||||
compare VAR_SPECIAL_RESULT, 1
|
||||
goto_if_eq _018A
|
||||
|
@ -37,7 +37,7 @@ _0056:
|
||||
_006F:
|
||||
compare VAR_UNK_4114, 6
|
||||
goto_if_ne _008D
|
||||
scrcmd_781 VAR_SPECIAL_RESULT
|
||||
kenya_check_party_or_mailbox VAR_SPECIAL_RESULT
|
||||
compare VAR_SPECIAL_RESULT, 1
|
||||
goto_if_eq _02AE
|
||||
_008D:
|
||||
@ -179,7 +179,7 @@ _026A:
|
||||
npc_msg msg_0378_R31_00006
|
||||
play_fanfare SEQ_ME_ITEM
|
||||
wait_fanfare
|
||||
scrcmd_428 VAR_TEMP_x4000
|
||||
mon_give_mail VAR_TEMP_x4000
|
||||
goto _0195
|
||||
.byte 0x02, 0x00
|
||||
_0295:
|
||||
|
@ -57,7 +57,7 @@ scr_seq_R32_005:
|
||||
play_se SEQ_SE_DP_SELECT
|
||||
lockall
|
||||
faceplayer
|
||||
get_lead_mon_index VAR_SPECIAL_x8002
|
||||
get_party_lead_alive VAR_SPECIAL_x8002
|
||||
mon_has_ribbon VAR_SPECIAL_RESULT, VAR_SPECIAL_x8002, RIBBON_RELAX
|
||||
compare VAR_SPECIAL_RESULT, 1
|
||||
goto_if_eq _01D4
|
||||
|
@ -65,7 +65,7 @@ scr_seq_R35R0101_000:
|
||||
play_fanfare SEQ_ME_PT_SPECIAL
|
||||
wait_fanfare
|
||||
_00BC:
|
||||
scrcmd_781 VAR_SPECIAL_RESULT
|
||||
kenya_check_party_or_mailbox VAR_SPECIAL_RESULT
|
||||
compare VAR_SPECIAL_RESULT, 0
|
||||
goto_if_eq _0178
|
||||
goto_if_set FLAG_UNK_0B5, _00E3
|
||||
|
@ -268,7 +268,7 @@ scr_seq_R36_001:
|
||||
play_se SEQ_SE_DP_SELECT
|
||||
lockall
|
||||
faceplayer
|
||||
get_lead_mon_index VAR_SPECIAL_x8002
|
||||
get_party_lead_alive VAR_SPECIAL_x8002
|
||||
mon_has_ribbon VAR_SPECIAL_RESULT, VAR_SPECIAL_x8002, RIBBON_CARELESS
|
||||
compare VAR_SPECIAL_RESULT, 1
|
||||
goto_if_eq _04E2
|
||||
|
@ -27,7 +27,7 @@ scr_seq_R37_001:
|
||||
play_se SEQ_SE_DP_SELECT
|
||||
lockall
|
||||
faceplayer
|
||||
get_lead_mon_index VAR_SPECIAL_x8002
|
||||
get_party_lead_alive VAR_SPECIAL_x8002
|
||||
mon_has_ribbon VAR_SPECIAL_RESULT, VAR_SPECIAL_x8002, RIBBON_SMILE
|
||||
compare VAR_SPECIAL_RESULT, 1
|
||||
goto_if_eq _0159
|
||||
|
@ -216,7 +216,7 @@ _0290:
|
||||
party_count_not_egg VAR_SPECIAL_RESULT
|
||||
compare VAR_SPECIAL_RESULT, 1
|
||||
goto_if_eq _03FB
|
||||
pokeathlon_party_count VAR_SPECIAL_RESULT
|
||||
count_alive_mons_and_pc VAR_SPECIAL_RESULT
|
||||
compare VAR_SPECIAL_RESULT, 2
|
||||
goto_if_eq _041F
|
||||
npc_msg msg_0439_00022
|
||||
|
@ -72,9 +72,9 @@ _00F0:
|
||||
npc_msg msg_0449_T01R0201_00003
|
||||
wait_se SEQ_SE_DP_FW367
|
||||
wait 15, VAR_SPECIAL_RESULT
|
||||
scrcmd_383 10, VAR_SPECIAL_x8004
|
||||
scrcmd_828 VAR_SPECIAL_x8004, 1, 32
|
||||
scrcmd_828 VAR_SPECIAL_x8004, 5, 22
|
||||
mon_add_friendship 10, VAR_SPECIAL_x8004
|
||||
mon_add_contest_value VAR_SPECIAL_x8004, 1, 32
|
||||
mon_add_contest_value VAR_SPECIAL_x8004, 5, 22
|
||||
compare VAR_UNK_4122, 7
|
||||
goto_if_eq _012D
|
||||
addvar VAR_UNK_4122, 1
|
||||
|
@ -299,7 +299,7 @@ _0415:
|
||||
goto_if_eq _04EA
|
||||
load_npc_trade 12
|
||||
copyvar VAR_SPECIAL_x8004, VAR_SPECIAL_RESULT
|
||||
scrcmd_382 VAR_TEMP_x4002, VAR_SPECIAL_x8004
|
||||
mon_get_friendship VAR_TEMP_x4002, VAR_SPECIAL_x8004
|
||||
get_partymon_species VAR_SPECIAL_x8004, VAR_SPECIAL_x8005
|
||||
npc_trade_get_req_species VAR_SPECIAL_RESULT
|
||||
compare VAR_SPECIAL_x8005, VAR_SPECIAL_RESULT
|
||||
|
@ -234,7 +234,7 @@ _03AC:
|
||||
end
|
||||
|
||||
_03B2:
|
||||
scrcmd_647 VAR_SPECIAL_x8000, SPECIES_ROTOM
|
||||
get_party_slot_with_species VAR_SPECIAL_x8000, SPECIES_ROTOM
|
||||
goto _0434
|
||||
.byte 0x02, 0x00
|
||||
_03C0:
|
||||
@ -294,7 +294,7 @@ _04BE:
|
||||
.byte 0x02, 0x00
|
||||
_04CC:
|
||||
nop_var_490 VAR_TEMP_x4005
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
get_partymon_species VAR_TEMP_x4000, VAR_TEMP_x4001
|
||||
compare VAR_TEMP_x4001, 479
|
||||
goto_if_ne _050C
|
||||
@ -313,7 +313,7 @@ _050C:
|
||||
.byte 0x02, 0x00
|
||||
_051C:
|
||||
nop_var_490 VAR_TEMP_x4007
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
get_partymon_species VAR_TEMP_x4000, VAR_TEMP_x4001
|
||||
compare VAR_TEMP_x4001, 479
|
||||
goto_if_ne _0564
|
||||
@ -347,14 +347,14 @@ _058A:
|
||||
wait_fade
|
||||
compare VAR_SPECIAL_x8002, 4
|
||||
goto_if_eq _0628
|
||||
scrcmd_398 VAR_SPECIAL_RESULT, VAR_SPECIAL_x8000, VAR_SPECIAL_x8002
|
||||
mon_get_move VAR_SPECIAL_RESULT, VAR_SPECIAL_x8000, VAR_SPECIAL_x8002
|
||||
buffer_move_name 1, VAR_SPECIAL_RESULT
|
||||
npc_msg msg_0538_T11R0702_00003
|
||||
getmenuchoice VAR_SPECIAL_RESULT
|
||||
compare VAR_SPECIAL_RESULT, 1
|
||||
goto_if_eq _0649
|
||||
bufferpartymonnick 0, VAR_SPECIAL_x8000
|
||||
scrcmd_398 VAR_SPECIAL_RESULT, VAR_SPECIAL_x8000, VAR_SPECIAL_x8002
|
||||
mon_get_move VAR_SPECIAL_RESULT, VAR_SPECIAL_x8000, VAR_SPECIAL_x8002
|
||||
buffer_move_name 1, VAR_SPECIAL_RESULT
|
||||
npc_msg msg_0538_T11R0702_00004
|
||||
play_se SEQ_SE_DP_KON
|
||||
|
@ -11,7 +11,7 @@
|
||||
scr_seq_T11R0703_000:
|
||||
scrcmd_609
|
||||
lockall
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
get_partymon_species VAR_TEMP_x4000, VAR_TEMP_x4001
|
||||
compare VAR_TEMP_x4001, 479
|
||||
goto_if_ne _018C
|
||||
|
@ -279,7 +279,7 @@ _03BA:
|
||||
get_party_count VAR_SPECIAL_RESULT
|
||||
compare VAR_SPECIAL_RESULT, 0
|
||||
goto_if_eq _03F5
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
get_partymon_species VAR_TEMP_x4000, VAR_TEMP_x4001
|
||||
compare VAR_TEMP_x4001, 172
|
||||
goto_if_ne _03F5
|
||||
@ -399,7 +399,7 @@ _0550:
|
||||
end
|
||||
|
||||
_055F:
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
get_partymon_species VAR_TEMP_x4000, VAR_TEMP_x4001
|
||||
scrcmd_149 0
|
||||
compare VAR_TEMP_x4001, 175
|
||||
@ -1170,7 +1170,7 @@ _0FDC:
|
||||
step 13, 1
|
||||
step_end
|
||||
_0FE4:
|
||||
scrcmd_382 VAR_SPECIAL_RESULT, VAR_TEMP_x4000
|
||||
mon_get_friendship VAR_SPECIAL_RESULT, VAR_TEMP_x4000
|
||||
compare VAR_SPECIAL_RESULT, 220
|
||||
goto_if_ge _0FFF
|
||||
goto _03F5
|
||||
|
@ -42,7 +42,7 @@ _005C:
|
||||
end
|
||||
|
||||
_006D:
|
||||
get_lead_mon_index VAR_SPECIAL_x8006
|
||||
get_party_lead_alive VAR_SPECIAL_x8006
|
||||
scrcmd_825 VAR_SPECIAL_x8006, VAR_SPECIAL_RESULT
|
||||
goto_if_set FLAG_UNK_161, _00B1
|
||||
compare VAR_SPECIAL_RESULT, 1
|
||||
|
@ -103,7 +103,7 @@ _014C:
|
||||
goto _0192
|
||||
|
||||
_0162:
|
||||
scrcmd_382 VAR_SPECIAL_RESULT, VAR_TEMP_x4000
|
||||
mon_get_friendship VAR_SPECIAL_RESULT, VAR_TEMP_x4000
|
||||
compare VAR_SPECIAL_RESULT, 149
|
||||
goto_if_le _0181
|
||||
call _019A
|
||||
|
@ -14,9 +14,9 @@ scr_seq_T25R0301_000:
|
||||
play_se SEQ_SE_DP_SELECT
|
||||
lockall
|
||||
faceplayer
|
||||
get_lead_mon_index VAR_SPECIAL_x8000
|
||||
get_party_lead_alive VAR_SPECIAL_x8000
|
||||
npc_msg msg_0585_T25R0301_00000
|
||||
scrcmd_382 VAR_SPECIAL_RESULT, VAR_SPECIAL_x8000
|
||||
mon_get_friendship VAR_SPECIAL_RESULT, VAR_SPECIAL_x8000
|
||||
compare VAR_SPECIAL_RESULT, 250
|
||||
goto_if_ge _006C
|
||||
compare VAR_SPECIAL_RESULT, 200
|
||||
|
@ -14,10 +14,10 @@
|
||||
scr_seq_T25R0601_002:
|
||||
goto_if_set FLAG_UNK_15D, _0058
|
||||
goto_if_unset FLAG_UNK_0B5, _0058
|
||||
scrcmd_688 VAR_TEMP_x4000, 492
|
||||
get_party_slot_with_fateful_encounter VAR_TEMP_x4000, 492
|
||||
compare VAR_TEMP_x4000, 255
|
||||
goto_if_eq _0058
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
get_partymon_species VAR_TEMP_x4000, VAR_TEMP_x4001
|
||||
compare VAR_TEMP_x4001, 492
|
||||
goto_if_ne _0058
|
||||
@ -266,10 +266,10 @@ scr_seq_T25R0601_001:
|
||||
lockall
|
||||
faceplayer
|
||||
goto_if_set FLAG_UNK_15D, _03FD
|
||||
scrcmd_688 VAR_SPECIAL_RESULT, 492
|
||||
get_party_slot_with_fateful_encounter VAR_SPECIAL_RESULT, 492
|
||||
compare VAR_SPECIAL_RESULT, 255
|
||||
goto_if_eq _03F2
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
get_partymon_species VAR_TEMP_x4000, VAR_TEMP_x4001
|
||||
compare VAR_TEMP_x4001, 492
|
||||
goto_if_eq _0432
|
||||
@ -281,10 +281,10 @@ _03F2:
|
||||
end
|
||||
|
||||
_03FD:
|
||||
scrcmd_688 VAR_SPECIAL_RESULT, 492
|
||||
get_party_slot_with_fateful_encounter VAR_SPECIAL_RESULT, 492
|
||||
compare VAR_SPECIAL_RESULT, 255
|
||||
goto_if_eq _03F2
|
||||
get_lead_mon_index VAR_TEMP_x4000
|
||||
get_party_lead_alive VAR_TEMP_x4000
|
||||
get_partymon_species VAR_TEMP_x4000, VAR_TEMP_x4001
|
||||
compare VAR_TEMP_x4001, 492
|
||||
goto_if_ne _03F2
|
||||
|
@ -157,10 +157,10 @@ scr_seq_T25R1005_006:
|
||||
lockall
|
||||
faceplayer
|
||||
goto_if_set FLAG_UNK_08E, _0219
|
||||
get_lead_mon_index VAR_SPECIAL_x8000
|
||||
get_party_lead_alive VAR_SPECIAL_x8000
|
||||
buffer_mon_species_name 0, VAR_SPECIAL_x8000
|
||||
npc_msg msg_0596_T25R1005_00000
|
||||
scrcmd_382 VAR_SPECIAL_RESULT, VAR_SPECIAL_x8000
|
||||
mon_get_friendship VAR_SPECIAL_RESULT, VAR_SPECIAL_x8000
|
||||
compare VAR_SPECIAL_RESULT, 149
|
||||
goto_if_ge _01E3
|
||||
compare VAR_SPECIAL_RESULT, 50
|
||||
|
@ -192,7 +192,7 @@ scr_seq_T29_005:
|
||||
play_se SEQ_SE_DP_SELECT
|
||||
lockall
|
||||
faceplayer
|
||||
get_lead_mon_index VAR_SPECIAL_x8002
|
||||
get_party_lead_alive VAR_SPECIAL_x8002
|
||||
mon_has_ribbon VAR_SPECIAL_RESULT, VAR_SPECIAL_x8002, RIBBON_DOWNCAST
|
||||
compare VAR_SPECIAL_RESULT, 1
|
||||
goto_if_eq _039B
|
||||
|
@ -73,7 +73,7 @@ scr_seq_T30_006:
|
||||
play_se SEQ_SE_DP_SELECT
|
||||
lockall
|
||||
faceplayer
|
||||
get_lead_mon_index VAR_SPECIAL_x8002
|
||||
get_party_lead_alive VAR_SPECIAL_x8002
|
||||
mon_has_ribbon VAR_SPECIAL_RESULT, VAR_SPECIAL_x8002, RIBBON_SNOOZE
|
||||
compare VAR_SPECIAL_RESULT, 1
|
||||
goto_if_eq _0209
|
||||
|
@ -36,7 +36,7 @@ _003B:
|
||||
load_npc_trade 3
|
||||
copyvar VAR_SPECIAL_x8004, VAR_SPECIAL_RESULT
|
||||
get_partymon_species VAR_SPECIAL_x8004, VAR_SPECIAL_x8005
|
||||
scrcmd_239 VAR_SPECIAL_x8004, VAR_SPECIAL_x8006
|
||||
mon_get_gender VAR_SPECIAL_x8004, VAR_SPECIAL_x8006
|
||||
compare VAR_SPECIAL_x8006, 0
|
||||
goto_if_eq _00B2
|
||||
npc_trade_get_req_species VAR_SPECIAL_RESULT
|
||||
@ -77,7 +77,7 @@ scr_seq_T30R0301_001:
|
||||
play_se SEQ_SE_DP_SELECT
|
||||
lockall
|
||||
faceplayer
|
||||
get_lead_mon_index VAR_SPECIAL_x8000
|
||||
get_party_lead_alive VAR_SPECIAL_x8000
|
||||
mon_has_ribbon VAR_SPECIAL_RESULT, VAR_SPECIAL_x8000, RIBBON_HOENN_EFFORT
|
||||
compare VAR_SPECIAL_RESULT, 1
|
||||
goto_if_eq _0199
|
||||
|
@ -76,7 +76,7 @@ _0068:
|
||||
end
|
||||
|
||||
_011D:
|
||||
scrcmd_397 VAR_SPECIAL_x8002, VAR_SPECIAL_x8001
|
||||
mon_forget_move VAR_SPECIAL_x8002, VAR_SPECIAL_x8001
|
||||
play_fanfare SEQ_ME_WASURE
|
||||
wait_fanfare
|
||||
npc_msg msg_0635_T30R0601_00008
|
||||
@ -286,7 +286,7 @@ _0359:
|
||||
mon_has_move VAR_SPECIAL_RESULT, MOVE_DRACO_METEOR, VAR_SPECIAL_x8000
|
||||
compare VAR_SPECIAL_RESULT, 1
|
||||
goto_if_eq _02D1
|
||||
scrcmd_382 VAR_SPECIAL_RESULT, VAR_SPECIAL_x8000
|
||||
mon_get_friendship VAR_SPECIAL_RESULT, VAR_SPECIAL_x8000
|
||||
compare VAR_SPECIAL_RESULT, 255
|
||||
goto_if_lt _02E1
|
||||
buffer_mon_species_name 0, VAR_SPECIAL_x8000
|
||||
@ -367,7 +367,7 @@ _04AC:
|
||||
call _06B0
|
||||
compare VAR_SPECIAL_RESULT, 1
|
||||
goto_if_eq _0722
|
||||
scrcmd_382 VAR_SPECIAL_RESULT, VAR_SPECIAL_x8000
|
||||
mon_get_friendship VAR_SPECIAL_RESULT, VAR_SPECIAL_x8000
|
||||
compare VAR_SPECIAL_RESULT, 255
|
||||
goto_if_lt _0715
|
||||
buffer_mon_species_name 0, VAR_SPECIAL_x8000
|
||||
|
@ -143,7 +143,7 @@ _0264:
|
||||
goto _00D2
|
||||
.byte 0x02, 0x00
|
||||
_0276:
|
||||
scrcmd_434 VAR_SPECIAL_RESULT, 30
|
||||
party_count_mons_at_or_below_level VAR_SPECIAL_RESULT, 30
|
||||
compare VAR_SPECIAL_RESULT, 2
|
||||
goto_if_lt _0324
|
||||
scrcmd_271 0, 2
|
||||
@ -229,7 +229,7 @@ _03B3:
|
||||
goto _0478
|
||||
.byte 0x02, 0x00
|
||||
_03F6:
|
||||
scrcmd_359 VAR_SPECIAL_RESULT
|
||||
party_count_egg VAR_SPECIAL_RESULT
|
||||
compare VAR_SPECIAL_RESULT, 0
|
||||
goto_if_eq _074F
|
||||
scrcmd_630 VAR_SPECIAL_RESULT
|
||||
@ -314,7 +314,7 @@ _0528:
|
||||
touchscreen_menu_show
|
||||
compare VAR_SPECIAL_RESULT, 1
|
||||
goto_if_eq _066C
|
||||
scrcmd_359 VAR_SPECIAL_RESULT
|
||||
party_count_egg VAR_SPECIAL_RESULT
|
||||
compare VAR_SPECIAL_RESULT, 0
|
||||
goto_if_eq _0698
|
||||
party_legal_check VAR_SPECIAL_RESULT
|
||||
@ -586,7 +586,7 @@ _0974:
|
||||
touchscreen_menu_show
|
||||
compare VAR_SPECIAL_RESULT, 1
|
||||
goto_if_eq _0A22
|
||||
scrcmd_434 VAR_SPECIAL_RESULT, 30
|
||||
party_count_mons_at_or_below_level VAR_SPECIAL_RESULT, 30
|
||||
compare VAR_SPECIAL_RESULT, 2
|
||||
goto_if_lt _0A33
|
||||
scrcmd_271 1, 0
|
||||
@ -662,7 +662,7 @@ _0AA2:
|
||||
goto_if_eq _0A22
|
||||
scrcmd_271 1, 0
|
||||
closemsg
|
||||
scrcmd_359 VAR_SPECIAL_RESULT
|
||||
party_count_egg VAR_SPECIAL_RESULT
|
||||
compare VAR_SPECIAL_RESULT, 0
|
||||
goto_if_eq _073E
|
||||
scrcmd_272 VAR_SPECIAL_RESULT
|
||||
|
@ -33,7 +33,7 @@ scr_seq_W40_001:
|
||||
play_se SEQ_SE_DP_SELECT
|
||||
lockall
|
||||
faceplayer
|
||||
get_lead_mon_index VAR_SPECIAL_x8002
|
||||
get_party_lead_alive VAR_SPECIAL_x8002
|
||||
mon_has_ribbon VAR_SPECIAL_RESULT, VAR_SPECIAL_x8002, RIBBON_ALERT
|
||||
compare VAR_SPECIAL_RESULT, 1
|
||||
goto_if_eq _0171
|
||||
|
52
global.inc
52
global.inc
@ -2700,7 +2700,7 @@
|
||||
.public Save_FlyPoints_init
|
||||
.public Save_FlyPoints_sizeof
|
||||
.public Save_FrontierData_get
|
||||
.public Save_GetLeadMonIdxForBugContest
|
||||
.public Save_GetPartyLeadAlive
|
||||
.public Save_GetPCBoxModifiedFlags
|
||||
.public Save_GetStatusFlags
|
||||
.public Save_LCRNGAdvanceLotoID
|
||||
@ -2819,8 +2819,8 @@
|
||||
.public ScrCmd_235
|
||||
.public ScrCmd_236
|
||||
.public ScrCmd_237
|
||||
.public ScrCmd_238
|
||||
.public ScrCmd_239
|
||||
.public ScrCmd_PartyHasPokerus
|
||||
.public ScrCmd_MonGetGender
|
||||
.public ScrCmd_247
|
||||
.public ScrCmd_249
|
||||
.public ScrCmd_250
|
||||
@ -2880,7 +2880,7 @@
|
||||
.public ScrCmd_346
|
||||
.public ScrCmd_347
|
||||
.public ScrCmd_350
|
||||
.public ScrCmd_359
|
||||
.public ScrCmd_PartyCountEgg
|
||||
.public ScrCmd_370
|
||||
.public ScrCmd_374
|
||||
.public ScrCmd_375
|
||||
@ -2889,13 +2889,13 @@
|
||||
.public ScrCmd_378
|
||||
.public ScrCmd_379
|
||||
.public ScrCmd_381
|
||||
.public ScrCmd_382
|
||||
.public ScrCmd_383
|
||||
.public ScrCmd_384
|
||||
.public ScrCmd_MonGetFriendship
|
||||
.public ScrCmd_MonAddFriendship
|
||||
.public ScrCmd_MonSubtractFriendship
|
||||
.public ScrCmd_394
|
||||
.public ScrCmd_395
|
||||
.public ScrCmd_397
|
||||
.public ScrCmd_398
|
||||
.public ScrCmd_MonForgetMove
|
||||
.public ScrCmd_MonGetMove
|
||||
.public ScrCmd_403
|
||||
.public ScrCmd_404
|
||||
.public ScrCmd_405
|
||||
@ -2918,8 +2918,8 @@
|
||||
.public ScrCmd_422
|
||||
.public ScrCmd_425
|
||||
.public ScrCmd_427
|
||||
.public ScrCmd_428
|
||||
.public ScrCmd_434
|
||||
.public ScrCmd_MonGiveMail
|
||||
.public ScrCmd_PartyCountMonsAtOrBelowLevel
|
||||
.public ScrCmd_436
|
||||
.public ScrCmd_441
|
||||
.public ScrCmd_442
|
||||
@ -2936,8 +2936,8 @@
|
||||
.public ScrCmd_454
|
||||
.public ScrCmd_455
|
||||
.public ScrCmd_456
|
||||
.public ScrCmd_457
|
||||
.public ScrCmd_458
|
||||
.public ScrCmd_MonGetNature
|
||||
.public ScrCmd_GetPartySlotWithNature
|
||||
.public ScrCmd_459
|
||||
.public ScrCmd_462
|
||||
.public ScrCmd_EnableMassOutbreaks
|
||||
@ -2946,13 +2946,13 @@
|
||||
.public ScrCmd_GetOfferedSpecies
|
||||
.public ScrCmd_475
|
||||
.public ScrCmd_476
|
||||
.public ScrCmd_478
|
||||
.public ScrCmd_479
|
||||
.public ScrCmd_MonGetRibbonCount
|
||||
.public ScrCmd_GetPartyRibbonCount
|
||||
.public ScrCmd_485
|
||||
.public ScrCmd_491
|
||||
.public ScrCmd_492
|
||||
.public ScrCmd_494
|
||||
.public ScrCmd_496
|
||||
.public ScrCmd_GetPartyLead
|
||||
.public ScrCmd_500
|
||||
.public ScrCmd_501
|
||||
.public ScrCmd_502
|
||||
@ -2974,13 +2974,13 @@
|
||||
.public ScrCmd_528
|
||||
.public ScrCmd_530
|
||||
.public ScrCmd_534
|
||||
.public ScrCmd_535
|
||||
.public ScrCmd_MonGetLevel
|
||||
.public ScrCmd_536
|
||||
.public ScrCmd_537
|
||||
.public ScrCmd_538
|
||||
.public ScrCmd_539
|
||||
.public ScrCmd_540
|
||||
.public ScrCmd_542
|
||||
.public ScrCmd_MonGetContestValue
|
||||
.public ScrCmd_543
|
||||
.public ScrCmd_544
|
||||
.public ScrCmd_545
|
||||
@ -3062,7 +3062,7 @@
|
||||
.public ScrCmd_644
|
||||
.public ScrCmd_645
|
||||
.public ScrCmd_646
|
||||
.public ScrCmd_647
|
||||
.public ScrCmd_GetPartySlotWithSpecies
|
||||
.public ScrCmd_648
|
||||
.public ScrCmd_652
|
||||
.public ScrCmd_656
|
||||
@ -3085,14 +3085,14 @@
|
||||
.public ScrCmd_684
|
||||
.public ScrCmd_686
|
||||
.public ScrCmd_687
|
||||
.public ScrCmd_688
|
||||
.public ScrCmd_GetPartySlotWithFatefulEncounter
|
||||
.public ScrCmd_691
|
||||
.public ScrCmd_695
|
||||
.public ScrCmd_696
|
||||
.public ScrCmd_697
|
||||
.public ScrCmd_699
|
||||
.public ScrCmd_700
|
||||
.public ScrCmd_701
|
||||
.public ScrCmd_MonHasItem
|
||||
.public ScrCmd_702
|
||||
.public ScrCmd_703
|
||||
.public ScrCmd_704
|
||||
@ -3156,7 +3156,7 @@
|
||||
.public ScrCmd_774
|
||||
.public ScrCmd_775
|
||||
.public ScrCmd_777
|
||||
.public ScrCmd_781
|
||||
.public ScrCmd_KenyaCheckPartyOrMailbox
|
||||
.public ScrCmd_791
|
||||
.public ScrCmd_792
|
||||
.public ScrCmd_795
|
||||
@ -3186,7 +3186,7 @@
|
||||
.public ScrCmd_824
|
||||
.public ScrCmd_825
|
||||
.public ScrCmd_826
|
||||
.public ScrCmd_828
|
||||
.public ScrCmd_MonAddContestValue
|
||||
.public ScrCmd_829
|
||||
.public ScrCmd_830
|
||||
.public ScrCmd_831
|
||||
@ -3482,7 +3482,7 @@
|
||||
.public ScrCmd_PartyCountNotEgg
|
||||
.public ScrCmd_PartyLegalCheck
|
||||
.public ScrCmd_PartySelect
|
||||
.public ScrCmd_PartySelectMon
|
||||
.public ScrCmd_GetPartyLeadAlive
|
||||
.public ScrCmd_PartySelectUI
|
||||
.public ScrCmd_PartymonIsMine
|
||||
.public ScrCmd_PhotoAlbumIsFull
|
||||
@ -3495,7 +3495,7 @@
|
||||
.public ScrCmd_PlayerMovementSavingSet
|
||||
.public ScrCmd_PokeCenAnim
|
||||
.public ScrCmd_Pokeathlon
|
||||
.public ScrCmd_PokeathlonPartyCount
|
||||
.public ScrCmd_CountAliveMonsAndPC
|
||||
.public ScrCmd_PrimoPasswordCheck1
|
||||
.public ScrCmd_PrimoPasswordCheck2
|
||||
.public ScrCmd_PromptEasyChat
|
||||
@ -29285,7 +29285,7 @@
|
||||
.public sub_0205BB1C
|
||||
.public sub_0205BBD0
|
||||
.public sub_0205BC78
|
||||
.public sub_0205BD20
|
||||
.public Save_GetPartyLead
|
||||
.public sub_0205BDB8
|
||||
.public sub_0205BED8
|
||||
.public sub_0205BFB4
|
||||
|
@ -268,8 +268,8 @@ BOOL ScrCmd_234(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_235(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_236(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_237(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_238(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_239(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_PartyHasPokerus(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_MonGetGender(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_SetDynamicWarp(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_GetDynamicWarpFloorNo(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_ElevatorCurFloorBox(SCRIPTCONTEXT* ctx);
|
||||
@ -392,8 +392,8 @@ BOOL ScrCmd_GetPartyMonSpecies(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_PartymonIsMine(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_PartyCountNotEgg(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_CountAliveMons(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_PokeathlonPartyCount(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_359(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_CountAliveMonsAndPC(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_PartyCountEgg(SCRIPTCONTEXT* ctx);
|
||||
|
||||
// scrcmd_money.c
|
||||
BOOL ScrCmd_SubMoneyVar(SCRIPTCONTEXT* ctx);
|
||||
@ -418,9 +418,9 @@ BOOL ScrCmd_378(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_379(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_Random(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_381(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_382(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_383(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_384(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_MonGetFriendship(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_MonAddFriendship(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_MonSubtractFriendship(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_BufferDayCareMonStats(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_GetPlayerFacing(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_GetDayCareCompatibility(SCRIPTCONTEXT* ctx);
|
||||
@ -433,8 +433,8 @@ BOOL ScrCmd_BufferRecordSize(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_394(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_395(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_CountMonMoves(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_397(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_398(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_MonForgetMove(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_MonGetMove(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_BufferPartyMonMoveName(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_StrengthFlagAction(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_FlashAction(SCRIPTCONTEXT* ctx);
|
||||
@ -464,13 +464,13 @@ BOOL ScrCmd_CheckNationalDexComplete(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_425(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_KenyaCheck(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_427(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_428(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_MonGiveMail(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_CountFossils(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_SetPhoneCall(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_RunPhoneCall(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_GetFossilPokemon(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_GetFossilMinimumAmount(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_434(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_PartyCountMonsAtOrBelowLevel(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_SurvivePoisoning(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_436(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_DebugWatch(SCRIPTCONTEXT* ctx);
|
||||
@ -493,8 +493,8 @@ BOOL ScrCmd_453(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_454(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_455(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_456(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_457(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_458(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_MonGetNature(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_GetPartySlotWithNature(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_459(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_LoadPhoneDat(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_GetPhoneContactMsgIds(SCRIPTCONTEXT* ctx);
|
||||
@ -514,8 +514,8 @@ BOOL ScrCmd_NPCTradeEnd(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_475(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_476(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_NatDexFlagAction(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_478(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_479(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_MonGetRibbonCount(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_GetPartyRibbonCount(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_MonHasRibbon(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_GiveRibbon(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_BufferRibbonName(SCRIPTCONTEXT* ctx);
|
||||
@ -532,7 +532,7 @@ BOOL ScrCmd_492(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_PromptEasyChat(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_494(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_GetGameVersion(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_496(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_GetPartyLead(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_GetMonTypes(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_PrimoPasswordCheck1(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_PrimoPasswordCheck2(SCRIPTCONTEXT* ctx);
|
||||
@ -565,20 +565,20 @@ BOOL ScrCmd_525(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_526(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_527(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_528(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_PartySelectMon(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_GetPartyLeadAlive(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_530(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_BufferBackgroundName(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_CheckCoinsImmediate(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_CheckGiveCoins(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_534(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_535(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_MonGetLevel(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_536(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_537(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_538(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_539(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_540(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_BufferIntEx(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_542(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_MonGetContestValue(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_543(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_544(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_545(SCRIPTCONTEXT* ctx);
|
||||
@ -683,7 +683,7 @@ BOOL ScrCmd_643(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_644(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_645(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_646(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_647(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_GetPartySlotWithSpecies(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_648(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_ScratchOffCard(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_ScratchOffCardEnd(SCRIPTCONTEXT* ctx);
|
||||
@ -724,7 +724,7 @@ BOOL ScrCmd_684(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_GetPlayerXYZ(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_686(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_687(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_688(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_GetPartySlotWithFatefulEncounter(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_CommSanitizeParty(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_DayCareSanitizeMon(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_691(SCRIPTCONTEXT* ctx);
|
||||
@ -737,7 +737,7 @@ BOOL ScrCmd_697(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_FollowerPokeIsEventTrigger(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_699(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_700(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_701(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_MonHasItem(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_702(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_703(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_704(SCRIPTCONTEXT* ctx);
|
||||
@ -817,7 +817,7 @@ BOOL ScrCmd_777(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_GiveSpikyEarPichu(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_RadioMusicIsPlaying(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_CasinoGame(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_781(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_KenyaCheckPartyOrMailbox(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_MartSell(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_SetFollowPokeInhibitState(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_ScriptOverlayCmd(SCRIPTCONTEXT* ctx);
|
||||
@ -864,7 +864,7 @@ BOOL ScrCmd_824(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_825(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_826(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_GetPartymonForme(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_828(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_MonAddContestValue(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_829(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_830(SCRIPTCONTEXT* ctx);
|
||||
BOOL ScrCmd_831(SCRIPTCONTEXT* ctx);
|
||||
|
2
main.lsf
2
main.lsf
@ -172,7 +172,7 @@ Static main
|
||||
Object asm/scrcmd_12.o
|
||||
Object src/scrcmd_money.o
|
||||
Object src/scrcmd_daycare.o
|
||||
Object asm/scrcmd_15.o
|
||||
Object src/scrcmd_party.o
|
||||
Object src/scrcmd_dppl_prizes.o
|
||||
Object src/scrcmd_17.o
|
||||
Object src/scrcmd_items.o
|
||||
|
@ -238,8 +238,8 @@ extern BOOL ScrCmd_234(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_235(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_236(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_237(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_238(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_239(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_PartyHasPokerus(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_MonGetGender(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_SetDynamicWarp(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_GetDynamicWarpFloorNo(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_ElevatorCurFloorBox(SCRIPTCONTEXT *ctx);
|
||||
@ -358,8 +358,8 @@ extern BOOL ScrCmd_GetPartyMonSpecies(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_PartymonIsMine(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_PartyCountNotEgg(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_CountAliveMons(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_PokeathlonPartyCount(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_359(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_PokeathloScrCmd_CountAliveMonsAndPCnPartyCount(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_PartyCountEgg(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_SubMoneyVar(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_RetrieveDayCareMon(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_GiveLoanMon(SCRIPTCONTEXT *ctx);
|
||||
@ -382,9 +382,9 @@ extern BOOL ScrCmd_378(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_379(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_Random(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_381(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_382(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_383(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_384(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_MonGetFriendship(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_MonAddFriendship(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_MonSubtractFriendship(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_BufferDayCareMonStats(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_GetPlayerFacing(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_GetDayCareCompatibility(SCRIPTCONTEXT *ctx);
|
||||
@ -397,8 +397,8 @@ extern BOOL ScrCmd_BufferRecordSize(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_394(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_395(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_CountMonMoves(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_397(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_398(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_MonForgetMove(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_MonGetMove(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_BufferPartyMonMoveName(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_StrengthFlagAction(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_FlashAction(SCRIPTCONTEXT *ctx);
|
||||
@ -428,13 +428,13 @@ extern BOOL ScrCmd_CheckNationalDexComplete(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_425(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_KenyaCheck(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_427(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_428(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_MonGiveMail(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_CountFossils(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_SetPhoneCall(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_RunPhoneCall(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_GetFossilPokemon(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_GetFossilMinimumAmount(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_434(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_PartyCountMonsAtOrBelowLevel(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_SurvivePoisoning(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_436(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_DebugWatch(SCRIPTCONTEXT *ctx);
|
||||
@ -457,8 +457,8 @@ extern BOOL ScrCmd_453(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_454(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_455(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_456(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_457(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_458(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_MonGetNature(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_GetPartySlotWithNature(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_459(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_LoadPhoneDat(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_GetPhoneContactMsgIds(SCRIPTCONTEXT *ctx);
|
||||
@ -478,8 +478,8 @@ extern BOOL ScrCmd_NPCTradeEnd(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_475(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_476(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_NatDexFlagAction(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_478(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_479(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_MonGetRibbonCount(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_GetPartyRibbonCount(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_MonHasRibbon(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_GiveRibbon(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_BufferRibbonName(SCRIPTCONTEXT *ctx);
|
||||
@ -496,7 +496,7 @@ extern BOOL ScrCmd_492(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_PromptEasyChat(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_494(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_GetGameVersion(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_496(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_GetPartyLead(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_GetMonTypes(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_PrimoPasswordCheck1(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_PrimoPasswordCheck2(SCRIPTCONTEXT *ctx);
|
||||
@ -529,20 +529,20 @@ extern BOOL ScrCmd_525(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_526(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_527(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_528(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_PartySelectMon(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_GetPartyLeadAlive(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_530(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_BufferBackgroundName(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_CheckCoinsImmediate(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_CheckGiveCoins(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_534(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_535(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_MonGetLevel(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_536(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_537(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_538(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_539(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_540(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_BufferIntEx(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_542(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_MonGetContestValue(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_543(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_544(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_545(SCRIPTCONTEXT *ctx);
|
||||
@ -647,7 +647,7 @@ extern BOOL ScrCmd_643(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_644(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_645(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_646(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_647(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_GetPartySlotWithSpecies(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_648(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_ScratchOffCard(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_ScratchOffCardEnd(SCRIPTCONTEXT *ctx);
|
||||
@ -688,7 +688,7 @@ extern BOOL ScrCmd_684(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_GetPlayerXYZ(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_686(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_687(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_688(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_GetPartySlotWithFatefulEncounter(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_CommSanitizeParty(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_DayCareSanitizeMon(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_691(SCRIPTCONTEXT *ctx);
|
||||
@ -701,7 +701,7 @@ extern BOOL ScrCmd_697(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_FollowerPokeIsEventTrigger(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_699(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_700(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_701(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_MonHasItem(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_702(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_703(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_704(SCRIPTCONTEXT *ctx);
|
||||
@ -781,7 +781,7 @@ extern BOOL ScrCmd_777(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_GiveSpikyEarPichu(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_RadioMusicIsPlaying(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_CasinoGame(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_781(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_KenyaCheckPartyOrMailbox(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_MartSell(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_SetFollowPokeInhibitState(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_ScriptOverlayCmd(SCRIPTCONTEXT *ctx);
|
||||
@ -828,7 +828,7 @@ extern BOOL ScrCmd_824(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_825(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_826(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_GetPartymonForme(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_828(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_MonAddContestValue(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_829(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_830(SCRIPTCONTEXT *ctx);
|
||||
extern BOOL ScrCmd_831(SCRIPTCONTEXT *ctx);
|
||||
@ -1093,8 +1093,8 @@ const ScrCmdFunc gScriptCmdTable[] = {
|
||||
ScrCmd_235,
|
||||
ScrCmd_236,
|
||||
ScrCmd_237,
|
||||
ScrCmd_238,
|
||||
ScrCmd_239,
|
||||
ScrCmd_PartyHasPokerus,
|
||||
ScrCmd_MonGetGender,
|
||||
ScrCmd_SetDynamicWarp,
|
||||
ScrCmd_GetDynamicWarpFloorNo,
|
||||
ScrCmd_ElevatorCurFloorBox,
|
||||
@ -1213,8 +1213,8 @@ const ScrCmdFunc gScriptCmdTable[] = {
|
||||
ScrCmd_PartymonIsMine,
|
||||
ScrCmd_PartyCountNotEgg,
|
||||
ScrCmd_CountAliveMons,
|
||||
ScrCmd_PokeathlonPartyCount,
|
||||
ScrCmd_359,
|
||||
ScrCmd_CountAliveMonsAndPC,
|
||||
ScrCmd_PartyCountEgg,
|
||||
ScrCmd_SubMoneyVar,
|
||||
ScrCmd_RetrieveDayCareMon,
|
||||
ScrCmd_GiveLoanMon,
|
||||
@ -1237,9 +1237,9 @@ const ScrCmdFunc gScriptCmdTable[] = {
|
||||
ScrCmd_379,
|
||||
ScrCmd_Random,
|
||||
ScrCmd_381,
|
||||
ScrCmd_382,
|
||||
ScrCmd_383,
|
||||
ScrCmd_384,
|
||||
ScrCmd_MonGetFriendship,
|
||||
ScrCmd_MonAddFriendship,
|
||||
ScrCmd_MonSubtractFriendship,
|
||||
ScrCmd_BufferDayCareMonStats,
|
||||
ScrCmd_GetPlayerFacing,
|
||||
ScrCmd_GetDayCareCompatibility,
|
||||
@ -1252,8 +1252,8 @@ const ScrCmdFunc gScriptCmdTable[] = {
|
||||
ScrCmd_394,
|
||||
ScrCmd_395,
|
||||
ScrCmd_CountMonMoves,
|
||||
ScrCmd_397,
|
||||
ScrCmd_398,
|
||||
ScrCmd_MonForgetMove,
|
||||
ScrCmd_MonGetMove,
|
||||
ScrCmd_BufferPartyMonMoveName,
|
||||
ScrCmd_StrengthFlagAction,
|
||||
ScrCmd_FlashAction,
|
||||
@ -1283,13 +1283,13 @@ const ScrCmdFunc gScriptCmdTable[] = {
|
||||
ScrCmd_425,
|
||||
ScrCmd_KenyaCheck,
|
||||
ScrCmd_427,
|
||||
ScrCmd_428,
|
||||
ScrCmd_MonGiveMail,
|
||||
ScrCmd_CountFossils,
|
||||
ScrCmd_SetPhoneCall,
|
||||
ScrCmd_RunPhoneCall,
|
||||
ScrCmd_GetFossilPokemon,
|
||||
ScrCmd_GetFossilMinimumAmount,
|
||||
ScrCmd_434,
|
||||
ScrCmd_PartyCountMonsAtOrBelowLevel,
|
||||
ScrCmd_SurvivePoisoning,
|
||||
ScrCmd_436,
|
||||
ScrCmd_DebugWatch,
|
||||
@ -1312,8 +1312,8 @@ const ScrCmdFunc gScriptCmdTable[] = {
|
||||
ScrCmd_454,
|
||||
ScrCmd_455,
|
||||
ScrCmd_456,
|
||||
ScrCmd_457,
|
||||
ScrCmd_458,
|
||||
ScrCmd_MonGetNature,
|
||||
ScrCmd_GetPartySlotWithNature,
|
||||
ScrCmd_459,
|
||||
ScrCmd_LoadPhoneDat,
|
||||
ScrCmd_GetPhoneContactMsgIds,
|
||||
@ -1333,8 +1333,8 @@ const ScrCmdFunc gScriptCmdTable[] = {
|
||||
ScrCmd_475,
|
||||
ScrCmd_476,
|
||||
ScrCmd_NatDexFlagAction,
|
||||
ScrCmd_478,
|
||||
ScrCmd_479,
|
||||
ScrCmd_MonGetRibbonCount,
|
||||
ScrCmd_GetPartyRibbonCount,
|
||||
ScrCmd_MonHasRibbon,
|
||||
ScrCmd_GiveRibbon,
|
||||
ScrCmd_BufferRibbonName,
|
||||
@ -1351,7 +1351,7 @@ const ScrCmdFunc gScriptCmdTable[] = {
|
||||
ScrCmd_PromptEasyChat,
|
||||
ScrCmd_494,
|
||||
ScrCmd_GetGameVersion,
|
||||
ScrCmd_496,
|
||||
ScrCmd_GetPartyLead,
|
||||
ScrCmd_GetMonTypes,
|
||||
ScrCmd_PrimoPasswordCheck1,
|
||||
ScrCmd_PrimoPasswordCheck2,
|
||||
@ -1384,20 +1384,20 @@ const ScrCmdFunc gScriptCmdTable[] = {
|
||||
ScrCmd_526,
|
||||
ScrCmd_527,
|
||||
ScrCmd_528,
|
||||
ScrCmd_PartySelectMon,
|
||||
ScrCmd_GetPartyLeadAlive,
|
||||
ScrCmd_530,
|
||||
ScrCmd_BufferBackgroundName,
|
||||
ScrCmd_CheckCoinsImmediate,
|
||||
ScrCmd_CheckGiveCoins,
|
||||
ScrCmd_534,
|
||||
ScrCmd_535,
|
||||
ScrCmd_MonGetLevel,
|
||||
ScrCmd_536,
|
||||
ScrCmd_537,
|
||||
ScrCmd_538,
|
||||
ScrCmd_539,
|
||||
ScrCmd_540,
|
||||
ScrCmd_BufferIntEx,
|
||||
ScrCmd_542,
|
||||
ScrCmd_MonGetContestValue,
|
||||
ScrCmd_543,
|
||||
ScrCmd_544,
|
||||
ScrCmd_545,
|
||||
@ -1502,7 +1502,7 @@ const ScrCmdFunc gScriptCmdTable[] = {
|
||||
ScrCmd_644,
|
||||
ScrCmd_645,
|
||||
ScrCmd_646,
|
||||
ScrCmd_647,
|
||||
ScrCmd_GetPartySlotWithSpecies,
|
||||
ScrCmd_648,
|
||||
ScrCmd_ScratchOffCard,
|
||||
ScrCmd_ScratchOffCardEnd,
|
||||
@ -1543,7 +1543,7 @@ const ScrCmdFunc gScriptCmdTable[] = {
|
||||
ScrCmd_GetPlayerXYZ,
|
||||
ScrCmd_686,
|
||||
ScrCmd_687,
|
||||
ScrCmd_688,
|
||||
ScrCmd_GetPartySlotWithFatefulEncounter,
|
||||
ScrCmd_CommSanitizeParty,
|
||||
ScrCmd_DayCareSanitizeMon,
|
||||
ScrCmd_691,
|
||||
@ -1556,7 +1556,7 @@ const ScrCmdFunc gScriptCmdTable[] = {
|
||||
ScrCmd_FollowerPokeIsEventTrigger,
|
||||
ScrCmd_699,
|
||||
ScrCmd_700,
|
||||
ScrCmd_701,
|
||||
ScrCmd_MonHasItem,
|
||||
ScrCmd_702,
|
||||
ScrCmd_703,
|
||||
ScrCmd_704,
|
||||
@ -1636,7 +1636,7 @@ const ScrCmdFunc gScriptCmdTable[] = {
|
||||
ScrCmd_GiveSpikyEarPichu,
|
||||
ScrCmd_RadioMusicIsPlaying,
|
||||
ScrCmd_CasinoGame,
|
||||
ScrCmd_781,
|
||||
ScrCmd_KenyaCheckPartyOrMailbox,
|
||||
ScrCmd_MartSell,
|
||||
ScrCmd_SetFollowPokeInhibitState,
|
||||
ScrCmd_ScriptOverlayCmd,
|
||||
@ -1683,7 +1683,7 @@ const ScrCmdFunc gScriptCmdTable[] = {
|
||||
ScrCmd_825,
|
||||
ScrCmd_826,
|
||||
ScrCmd_GetPartymonForme,
|
||||
ScrCmd_828,
|
||||
ScrCmd_MonAddContestValue,
|
||||
ScrCmd_829,
|
||||
ScrCmd_830,
|
||||
ScrCmd_831,
|
||||
|
@ -30,7 +30,7 @@ void BugContest_InitEncounters(BUGCONTEST *bugContest);
|
||||
void BugContest_RestoreParty_RetrieveCaughtPokemon(BUGCONTEST *bugContest);
|
||||
u16 BugContest_JudgePlayerMon(BUGCONTEST *bugContest, POKEMON *pokemon);
|
||||
|
||||
extern u8 Save_GetLeadMonIdxForBugContest(SAVEDATA *saveData);
|
||||
extern u8 Save_GetPartyLeadAlive(SAVEDATA *saveData);
|
||||
extern PC_STORAGE *GetStoragePCPointer(SAVEDATA *saveData);
|
||||
|
||||
BUGCONTEST *BugContest_new(FieldSystem *fsys, u8 weekday) {
|
||||
@ -192,7 +192,7 @@ void BugContest_BackUpParty(BUGCONTEST *bugContest) {
|
||||
bugContest->party_cur = SavArray_PlayerParty_get(bugContest->saveData);
|
||||
Party_copy(bugContest->party_cur, bugContest->party_bak);
|
||||
bugContest->party_cur_num = GetPartyCount(bugContest->party_cur);
|
||||
bugContest->lead_mon_idx = Save_GetLeadMonIdxForBugContest(bugContest->saveData);
|
||||
bugContest->lead_mon_idx = Save_GetPartyLeadAlive(bugContest->saveData);
|
||||
// You can only enter the contest with one pokemon, so
|
||||
// remove any Pokemon other than the first that can battle.
|
||||
for (i = 0; i < bugContest->party_cur_num - 1; i++) {
|
||||
|
811
src/scrcmd_party.c
Normal file
811
src/scrcmd_party.c
Normal file
@ -0,0 +1,811 @@
|
||||
#include "scrcmd.h"
|
||||
#include "map_header.h"
|
||||
#include "pokedex.h"
|
||||
#include "script_pokemon_util.h"
|
||||
#include "player_data.h"
|
||||
#include "get_egg.h"
|
||||
#include "constants/balls.h"
|
||||
#include "item.h"
|
||||
#include "save_arrays.h"
|
||||
#include "npc_trade.h"
|
||||
|
||||
FS_EXTERN_OVERLAY(npc_trade);
|
||||
|
||||
BOOL ScrCmd_GiveMon(SCRIPTCONTEXT *ctx) {
|
||||
u16 map = MapHeader_GetMapSec(ctx->fsys->location->mapId);
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
POKEDEX *pokedex = Sav2_Pokedex_get(fsys->savedata);
|
||||
|
||||
u16 species = ScriptGetVar(ctx);
|
||||
u8 level = ScriptGetVar(ctx);
|
||||
u16 heldItem = ScriptGetVar(ctx);
|
||||
u8 forme = ScriptGetVar(ctx);
|
||||
u16 ability = ScriptGetVar(ctx);
|
||||
u16 *retPtr = ScriptGetVarPointer(ctx);
|
||||
|
||||
PARTY *party = SavArray_PlayerParty_get(fsys->savedata);
|
||||
*retPtr = GiveMon(11, fsys->savedata, species, level, forme, ability, heldItem, map, 24);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_TakeMon(SCRIPTCONTEXT *ctx) {
|
||||
u8 slot = ScriptGetVar(ctx);
|
||||
PARTY *party = SavArray_PlayerParty_get(ctx->fsys->savedata);
|
||||
RemoveMonFromParty(party, slot);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_GetPartyMonSpecies(SCRIPTCONTEXT *ctx) {
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 slot = ScriptGetVar(ctx);
|
||||
u16 *species = ScriptGetVarPointer(ctx);
|
||||
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), slot);
|
||||
if (GetMonData(pokemon, MON_DATA_IS_EGG, 0) == 0) {
|
||||
*species = GetMonData(pokemon, MON_DATA_SPECIES, 0);
|
||||
}
|
||||
else {
|
||||
*species = 0;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_PartymonIsMine(SCRIPTCONTEXT *ctx) {
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
SAVEDATA *save = Fsys_GetSaveDataPtr(fsys);
|
||||
PLAYERPROFILE *profile = Sav2_PlayerData_GetProfileAddr(save);
|
||||
|
||||
u16 *slot = ScriptGetVarPointer(ctx);
|
||||
u16 *mine = ScriptGetVarPointer(ctx);
|
||||
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), *slot);
|
||||
u16 pokemonID = GetMonData(pokemon, MON_DATA_OTID, 0);
|
||||
u16 playerID = PlayerProfile_GetTrainerID(profile);
|
||||
|
||||
if (pokemonID == playerID) {
|
||||
*mine = 0;
|
||||
}
|
||||
else {
|
||||
*mine = 1;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_GiveEgg(SCRIPTCONTEXT *ctx) {
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
PLAYERPROFILE *profile = Sav2_PlayerData_GetProfileAddr(fsys->savedata);
|
||||
|
||||
u16 species = ScriptGetVar(ctx);
|
||||
u16 offset = ScriptGetVar(ctx);
|
||||
|
||||
PARTY *party = SavArray_PlayerParty_get(fsys->savedata);
|
||||
u8 partyCount = GetPartyCount(party);
|
||||
if (partyCount < 6) {
|
||||
POKEMON *pokemon = AllocMonZeroed(11);
|
||||
ZeroMonData(pokemon);
|
||||
int val = sub_02017FE4(MAPSECTYPE_GIFT, offset);
|
||||
SetEggStats(pokemon, species, 1, profile, 3, val);
|
||||
AddMonToParty(party, pokemon);
|
||||
FreeToHeap(pokemon);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_SetMonMove(SCRIPTCONTEXT *ctx) {
|
||||
u16 monSlot = ScriptGetVar(ctx);
|
||||
u16 moveSlot = ScriptGetVar(ctx);
|
||||
u16 moveId = ScriptGetVar(ctx);
|
||||
|
||||
PartyMonSetMoveInSlot(SavArray_PlayerParty_get(ctx->fsys->savedata), monSlot, moveSlot, moveId);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_MonHasMove(SCRIPTCONTEXT *ctx) {
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 *hasMove = ScriptGetVarPointer(ctx);
|
||||
u16 move = ScriptGetVar(ctx);
|
||||
u16 slot = ScriptGetVar(ctx);
|
||||
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), slot);
|
||||
*hasMove = 0;
|
||||
if (GetMonData(pokemon, MON_DATA_IS_EGG, 0) != 0) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (GetMonData(pokemon, MON_DATA_MOVE1, 0) == move || GetMonData(pokemon, MON_DATA_MOVE2, 0) == move ||
|
||||
GetMonData(pokemon, MON_DATA_MOVE3, 0) == move || GetMonData(pokemon, MON_DATA_MOVE4, 0) == move) {
|
||||
*hasMove = 1;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_GetPartySlotWithMove(SCRIPTCONTEXT *ctx) {
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 *slot = ScriptGetVarPointer(ctx);
|
||||
u16 move = ScriptGetVar(ctx);
|
||||
u8 i;
|
||||
|
||||
u8 partyCount = GetPartyCount(SavArray_PlayerParty_get(fsys->savedata));
|
||||
for (i = 0, *slot = 6; i < partyCount; i++) {
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), i);
|
||||
if (GetMonData(pokemon, MON_DATA_IS_EGG, 0) != 0) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (GetMonData(pokemon, MON_DATA_MOVE1, 0) == move || GetMonData(pokemon, MON_DATA_MOVE2, 0) == move ||
|
||||
GetMonData(pokemon, MON_DATA_MOVE3, 0) == move || GetMonData(pokemon, MON_DATA_MOVE4, 0) == move) {
|
||||
*slot = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_SurvivePoisoning(SCRIPTCONTEXT *ctx) {
|
||||
u16 *poison = ScriptGetVarPointer(ctx);
|
||||
u16 slot = ScriptGetVar(ctx);
|
||||
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(ctx->fsys->savedata), slot);
|
||||
*poison = SurvivePoisoning(pokemon);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_PartyCountMonsAtOrBelowLevel(SCRIPTCONTEXT *ctx) {
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 *levelCount = ScriptGetVarPointer(ctx);
|
||||
u16 level = ScriptGetVar(ctx);
|
||||
u8 i, count;
|
||||
|
||||
u8 partyCount = GetPartyCount(SavArray_PlayerParty_get(fsys->savedata));
|
||||
for (i = 0, count = 0, *levelCount = 0; i < partyCount; i++) {
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), i);
|
||||
if (GetMonData(pokemon, MON_DATA_IS_EGG, 0) == 0 && GetMonData(pokemon, MON_DATA_LEVEL, 0) <= level) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
*levelCount = count;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_MonGetLevel(SCRIPTCONTEXT *ctx) {
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 *level = ScriptGetVarPointer(ctx);
|
||||
u16 slot = ScriptGetVar(ctx);
|
||||
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), slot);
|
||||
*level = 0;
|
||||
if (GetMonData(pokemon, MON_DATA_IS_EGG, 0) == 0) {
|
||||
*level = GetMonData(pokemon, MON_DATA_LEVEL, 0);
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_MonGetNature(SCRIPTCONTEXT *ctx) {
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 *nature = ScriptGetVarPointer(ctx);
|
||||
u16 slot = ScriptGetVar(ctx);
|
||||
|
||||
u8 partyCount = GetPartyCount(SavArray_PlayerParty_get(fsys->savedata));
|
||||
if (slot >= partyCount) {
|
||||
*nature = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), slot);
|
||||
if (GetMonData(pokemon, MON_DATA_IS_EGG, 0) != 0) {
|
||||
*nature = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
*nature = GetMonNature(pokemon);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_GetPartySlotWithNature(SCRIPTCONTEXT *ctx) {
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 *slot = ScriptGetVarPointer(ctx);
|
||||
u16 nature = ScriptGetVar(ctx);
|
||||
u8 i;
|
||||
|
||||
u8 partyCount = GetPartyCount(SavArray_PlayerParty_get(fsys->savedata));
|
||||
for (i = 0, *slot = 255; i < partyCount; i++) {
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), i);
|
||||
if (GetMonData(pokemon , MON_DATA_IS_EGG, 0) == 0 && GetMonNature(pokemon) == nature) {
|
||||
*slot = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_MonGetFriendship(SCRIPTCONTEXT *ctx) {
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 *friendship = ScriptGetVarPointer(ctx);
|
||||
u16 slot = ScriptGetVar(ctx);
|
||||
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), slot);
|
||||
*friendship = GetMonData(pokemon, MON_DATA_FRIENDSHIP, 0);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_MonAddFriendship(SCRIPTCONTEXT *ctx) {
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 friendshipModifier = ScriptGetVar(ctx);
|
||||
u16 slot = ScriptGetVar(ctx);
|
||||
u16 map = MapHeader_GetMapSec(ctx->fsys->location->mapId);
|
||||
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), slot);
|
||||
u16 friendship = GetMonData(pokemon, MON_DATA_FRIENDSHIP, 0);
|
||||
if (friendshipModifier != 0) {
|
||||
if (GetMonData(pokemon, MON_DATA_POKEBALL, 0) == BALL_LUXURY) {
|
||||
friendshipModifier++;
|
||||
}
|
||||
|
||||
if (map == GetMonData(pokemon, MON_DATA_EGG_MET_LOCATION, 0)) {
|
||||
friendshipModifier++;
|
||||
}
|
||||
|
||||
if (GetItemAttr(GetMonData(pokemon, MON_DATA_HELD_ITEM, 0), ITEMATTR_HOLD_EFFECT, 11) == HOLD_EFFECT_FRIENDSHIP_UP) {
|
||||
friendshipModifier = friendshipModifier * 150 / 100;
|
||||
}
|
||||
}
|
||||
|
||||
friendship += friendshipModifier;
|
||||
if (friendship > FRIENDSHIP_MAX) {
|
||||
friendship = FRIENDSHIP_MAX;
|
||||
}
|
||||
SetMonData(pokemon, MON_DATA_FRIENDSHIP, &friendship);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_MonSubtractFriendship(SCRIPTCONTEXT *ctx) {
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 friendshipModifier = ScriptGetVar(ctx);
|
||||
u16 slot = ScriptGetVar(ctx);
|
||||
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), slot);
|
||||
u16 friendship = GetMonData(pokemon, MON_DATA_FRIENDSHIP, 0);
|
||||
if (friendshipModifier > friendship) {
|
||||
friendship = 0;
|
||||
}
|
||||
else {
|
||||
friendship -= friendshipModifier;
|
||||
}
|
||||
SetMonData(pokemon, MON_DATA_FRIENDSHIP, &friendship);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_MonGetContestValue(SCRIPTCONTEXT *ctx) {
|
||||
u16 slot = ScriptGetVar(ctx);
|
||||
u16 contestAttribute = ScriptGetVar(ctx);
|
||||
u16 *contestValue = ScriptGetVarPointer(ctx);
|
||||
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(ctx->fsys->savedata), slot);
|
||||
*contestValue = GetMonData(pokemon, contestAttribute + MON_DATA_COOL, 0);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_GetPartyLead(SCRIPTCONTEXT *ctx) {
|
||||
u16 *slot = ScriptGetVarPointer(ctx);
|
||||
*slot = Save_GetPartyLead(ctx->fsys->savedata);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_GetPartyLeadAlive(SCRIPTCONTEXT *ctx) {
|
||||
u16 *slot = ScriptGetVarPointer(ctx);
|
||||
*slot = Save_GetPartyLeadAlive(ctx->fsys->savedata);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_GetMonTypes(SCRIPTCONTEXT *ctx) {
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 *type1 = ScriptGetVarPointer(ctx);
|
||||
u16 *type2 = ScriptGetVarPointer(ctx);
|
||||
u16 slot = ScriptGetVar(ctx);
|
||||
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), slot);
|
||||
*type1 = GetMonData(pokemon, MON_DATA_TYPE_1, 0);
|
||||
*type2 = GetMonData(pokemon, MON_DATA_TYPE_2, 0);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_GetPartyCount(SCRIPTCONTEXT *ctx) {
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 *count = ScriptGetVarPointer(ctx);
|
||||
*count = GetPartyCount(SavArray_PlayerParty_get(fsys->savedata));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_PartyCountNotEgg(SCRIPTCONTEXT *ctx) {
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 *eggCount = ScriptGetVarPointer(ctx);
|
||||
int count, i;
|
||||
|
||||
int partyCount = GetPartyCount(SavArray_PlayerParty_get(fsys->savedata));
|
||||
for (i = 0, count = 0; i < partyCount; i++) {
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), i);
|
||||
if (GetMonData(pokemon, MON_DATA_IS_EGG, 0) == 0) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
|
||||
*eggCount = count;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_CountAliveMons(SCRIPTCONTEXT *ctx) {
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 *aliveCount = ScriptGetVarPointer(ctx);
|
||||
u16 slot = ScriptGetVar(ctx);
|
||||
int count, i;
|
||||
|
||||
int partyCount = GetPartyCount(SavArray_PlayerParty_get(fsys->savedata));
|
||||
for (i = 0, count = 0; i < partyCount; i++) {
|
||||
if (i != slot) {
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), i);
|
||||
if (GetMonData(pokemon, MON_DATA_IS_EGG, 0) == 0 && GetMonData(pokemon, MON_DATA_HP, 0) != 0) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
*aliveCount = count;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_CountAliveMonsAndPC(SCRIPTCONTEXT *ctx) {
|
||||
int partyCount, count, i;
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 *pokemonCount = ScriptGetVarPointer(ctx);
|
||||
PC_STORAGE *pc = GetStoragePCPointer(fsys->savedata);
|
||||
|
||||
partyCount = GetPartyCount(SavArray_PlayerParty_get(fsys->savedata));
|
||||
for (i = 0, count = 0; i < partyCount; i++) {
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), i);
|
||||
if (GetMonData(pokemon, MON_DATA_IS_EGG, 0) == 0 && GetMonData(pokemon, MON_DATA_HP, 0) != 0) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
*pokemonCount = count + PCStorage_CountMonsInAllBoxes(pc);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_PartyCountEgg(SCRIPTCONTEXT *ctx) {
|
||||
int partyCount, count, i;
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 *eggCount = ScriptGetVarPointer(ctx);
|
||||
|
||||
partyCount = GetPartyCount(SavArray_PlayerParty_get(fsys->savedata));
|
||||
for (i = 0, count = 0; i < partyCount; i++) {
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), i);
|
||||
if (GetMonData(pokemon, MON_DATA_IS_EGG, 0) != 0) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
*eggCount = count;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_PartyHasPokerus(SCRIPTCONTEXT *ctx) {
|
||||
u16 i, partyCount;
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 *slot = ScriptGetVarPointer(ctx);
|
||||
|
||||
partyCount = GetPartyCount(SavArray_PlayerParty_get(fsys->savedata));
|
||||
for (i = 0, *slot = 0; i < partyCount; i++) {
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), i);
|
||||
if (GetMonData(pokemon, MON_DATA_POKERUS, 0) != 0) {
|
||||
*slot = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_MonGetGender(SCRIPTCONTEXT *ctx) {
|
||||
u16 slot = ScriptGetVar(ctx);
|
||||
u16 *gender = ScriptGetVarPointer(ctx);
|
||||
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(ctx->fsys->savedata), slot);
|
||||
*gender = GetMonData(pokemon, MON_DATA_GENDER, 0);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_CountMonMoves(SCRIPTCONTEXT *ctx) {
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 *moveCount = ScriptGetVarPointer(ctx);
|
||||
u16 slot = ScriptGetVar(ctx);
|
||||
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), slot);
|
||||
if (GetMonData(pokemon, MON_DATA_IS_EGG, 0) != 0) {
|
||||
*moveCount = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
u8 count = 0;
|
||||
if (GetMonData(pokemon, MON_DATA_MOVE1, 0) != 0) {
|
||||
count++;
|
||||
}
|
||||
|
||||
if (GetMonData(pokemon, MON_DATA_MOVE2, 0) != 0) {
|
||||
count++;
|
||||
}
|
||||
|
||||
if (GetMonData(pokemon, MON_DATA_MOVE3, 0) != 0) {
|
||||
count++;
|
||||
}
|
||||
|
||||
if (GetMonData(pokemon, MON_DATA_MOVE4, 0) != 0) {
|
||||
count++;
|
||||
}
|
||||
|
||||
*moveCount = count;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_MonForgetMove(SCRIPTCONTEXT *ctx) {
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 pokemonSlot = ScriptGetVar(ctx);
|
||||
u16 moveSlot = ScriptGetVar(ctx);
|
||||
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), pokemonSlot);
|
||||
MonDeleteMoveSlot(pokemon, moveSlot);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_MonGetMove(SCRIPTCONTEXT *ctx) {
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 *move = ScriptGetVarPointer(ctx);
|
||||
u16 pokemonSlot = ScriptGetVar(ctx);
|
||||
u16 moveSlot = ScriptGetVar(ctx);
|
||||
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), pokemonSlot);
|
||||
*move = GetMonData(pokemon, moveSlot + MON_DATA_MOVE1, 0);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_KenyaCheck(SCRIPTCONTEXT *ctx) {
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 *kenya = ScriptGetVarPointer(ctx);
|
||||
u16 slot = ScriptGetVar(ctx);
|
||||
u8 val = ScriptReadByte(ctx);
|
||||
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), slot);
|
||||
if (ItemIdIsMail(GetMonData(pokemon, MON_DATA_HELD_ITEM, 0)) == 0) {
|
||||
*kenya = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (val == 0) {
|
||||
*kenya = 1;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
HandleLoadOverlay(FS_OVERLAY_ID(npc_trade), OVY_LOAD_ASYNC);
|
||||
MAIL *kenyaMail = NPCTrade_MakeKenyaMail();
|
||||
MAIL *mail = Mail_new(11);
|
||||
GetMonData(pokemon, MON_DATA_MAIL_STRUCT, mail);
|
||||
*kenya = Mail_compare(kenyaMail, mail);
|
||||
FreeToHeap(mail);
|
||||
FreeToHeap(kenyaMail);
|
||||
UnloadOverlayByID(FS_OVERLAY_ID(npc_trade));
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_KenyaCheckPartyOrMailbox(SCRIPTCONTEXT *ctx) {
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 *kenya = ScriptGetVarPointer(ctx);
|
||||
*kenya = 0;
|
||||
int i;
|
||||
|
||||
PARTY *party = SavArray_PlayerParty_get(fsys->savedata);
|
||||
HandleLoadOverlay(FS_OVERLAY_ID(npc_trade), OVY_LOAD_ASYNC);
|
||||
MAIL *kenyaMail = NPCTrade_MakeKenyaMail();
|
||||
MAIL *mail = Mail_new(11);
|
||||
UnloadOverlayByID(FS_OVERLAY_ID(npc_trade));
|
||||
|
||||
for (i = 0; i < GetPartyCount(party); i++) {
|
||||
POKEMON *pokemon = GetPartyMonByIndex(party, i);
|
||||
if (ItemIdIsMail(GetMonData(pokemon, MON_DATA_HELD_ITEM, 0)) != 0) {
|
||||
GetMonData(pokemon, MON_DATA_MAIL_STRUCT, mail);
|
||||
if (Mail_compare(kenyaMail, mail) != 0) {
|
||||
*kenya = 1;
|
||||
FreeToHeap(mail);
|
||||
FreeToHeap(kenyaMail);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MAILBOX *mailbox = Sav2_Mailbox_get(fsys->savedata);
|
||||
i = 0;
|
||||
while (TRUE) {
|
||||
Mailbox_FetchMailToBuffer(mailbox->msgs, 0, i, mail);
|
||||
if (Mail_TypeIsValid(mail) != 0 && Mail_compare(kenyaMail, mail) != 0) {
|
||||
*kenya = 1;
|
||||
break;
|
||||
}
|
||||
|
||||
i++;
|
||||
if (i >= MAILBOX_MSG_COUNT) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
FreeToHeap(mail);
|
||||
FreeToHeap(kenyaMail);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_MonGiveMail(SCRIPTCONTEXT *ctx) {
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 slot = ScriptGetVar(ctx);
|
||||
u16 item;
|
||||
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), slot);
|
||||
if (ItemIdIsMail(GetMonData(pokemon, MON_DATA_HELD_ITEM, 0)) == 0) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
item = 0;
|
||||
MAIL *mail = Mail_new(11);
|
||||
Mail_init(mail);
|
||||
SetMonData(pokemon, MON_DATA_MAIL_STRUCT, mail);
|
||||
SetMonData(pokemon, MON_DATA_HELD_ITEM, &item);
|
||||
FreeToHeap(mail);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_PlayerHasSpecies(SCRIPTCONTEXT *ctx) {
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 *playerHasSpecies = ScriptGetVarPointer(ctx);
|
||||
u16 species = ScriptGetVar(ctx);
|
||||
u8 i;
|
||||
|
||||
u8 partyCount = GetPartyCount(SavArray_PlayerParty_get(fsys->savedata));
|
||||
for (i = 0, *playerHasSpecies = 0; i < partyCount; i++) {
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), i);
|
||||
if (GetMonData(pokemon, MON_DATA_IS_EGG, 0) == 0 && (u16)GetMonData(pokemon, MON_DATA_SPECIES, 0) == species) {
|
||||
*playerHasSpecies = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_CountPartyMonsOfSpecies(SCRIPTCONTEXT *ctx) {
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 *speciesCount = ScriptGetVarPointer(ctx);
|
||||
u16 species = ScriptGetVar(ctx);
|
||||
u16 array[6];
|
||||
u8 i, j;
|
||||
|
||||
for (i = 0; i < 6; i++) {
|
||||
array[i] = 0;
|
||||
}
|
||||
|
||||
u8 partyCount = GetPartyCount(SavArray_PlayerParty_get(fsys->savedata));
|
||||
for (i = 0, *speciesCount = 0; i < partyCount; i++) {
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), i);
|
||||
if (GetMonData(pokemon, MON_DATA_IS_EGG, 0) == 0) {
|
||||
u16 monSpecies = GetMonData(pokemon, MON_DATA_SPECIES, 0);
|
||||
if (species == 0) {
|
||||
array[i] = monSpecies;
|
||||
for (j = 0; j < i; j++) {
|
||||
if (array[j] == array[i]) {
|
||||
*speciesCount = 1;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (species == monSpecies) {
|
||||
*speciesCount = *speciesCount + 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_GetPartySlotWithSpecies(SCRIPTCONTEXT *ctx) {
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 *slot = ScriptGetVarPointer(ctx);
|
||||
u16 species = ScriptGetVar(ctx);
|
||||
u8 i;
|
||||
|
||||
u8 partyCount = GetPartyCount(SavArray_PlayerParty_get(fsys->savedata));
|
||||
for (i = 0, *slot = 255; i < partyCount; i++) {
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), i);
|
||||
if (GetMonData(pokemon, MON_DATA_IS_EGG, 0) == 0 && (u16)GetMonData(pokemon, MON_DATA_SPECIES, 0) == species) {
|
||||
*slot = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_MonGetRibbonCount(SCRIPTCONTEXT *ctx) {
|
||||
u16 *ribbons = ScriptGetVarPointer(ctx);
|
||||
u16 slot = ScriptGetVar(ctx);
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(ctx->fsys->savedata), slot);
|
||||
|
||||
u16 i, count;
|
||||
for (i = 0, count = 0; i < 80; i++) {
|
||||
if (GetMonData(pokemon, sub_0208E55C((u8)i, 0), 0) != 0) {
|
||||
count++;
|
||||
}
|
||||
}
|
||||
*ribbons = count;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_GetPartyRibbonCount(SCRIPTCONTEXT *ctx) {
|
||||
PARTY *party;
|
||||
u16 i, count;
|
||||
|
||||
u16 *ribbons = ScriptGetVarPointer(ctx);
|
||||
u16 partyCount = GetPartyCount(SavArray_PlayerParty_get(ctx->fsys->savedata));
|
||||
party = SavArray_PlayerParty_get(ctx->fsys->savedata);
|
||||
|
||||
for (i = 0, count = 0; i < 80; i++) {
|
||||
for (u16 j = 0; j < partyCount; j++) {
|
||||
POKEMON *pokemon = GetPartyMonByIndex(party, j);
|
||||
if (GetMonData(pokemon, MON_DATA_IS_EGG, 0) == 0 && GetMonData(pokemon, sub_0208E55C((u8)i, 0), 0) != 0) {
|
||||
count++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
*ribbons = count;
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_MonHasRibbon(SCRIPTCONTEXT *ctx) {
|
||||
u16 *hasRibbon = ScriptGetVarPointer(ctx);
|
||||
u16 slot = ScriptGetVar(ctx);
|
||||
u16 ribbon = ScriptGetVar(ctx);
|
||||
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(ctx->fsys->savedata), slot);
|
||||
*hasRibbon = GetMonData(pokemon, sub_0208E55C((u8)ribbon, 0), 0);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_GiveRibbon(SCRIPTCONTEXT *ctx) {
|
||||
u16 slot = ScriptGetVar(ctx);
|
||||
u16 ribbon = ScriptGetVar(ctx);
|
||||
u8 hasRibbon = TRUE;
|
||||
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(ctx->fsys->savedata), slot);
|
||||
SetMonData(pokemon, sub_0208E55C((u8)ribbon, 0), &hasRibbon);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_PartyLegalCheck(SCRIPTCONTEXT *ctx) {
|
||||
u16 i;
|
||||
|
||||
u16 *legal = ScriptGetVarPointer(ctx);
|
||||
u16 partyCount = GetPartyCount(SavArray_PlayerParty_get(ctx->fsys->savedata));
|
||||
PARTY *party = SavArray_PlayerParty_get(ctx->fsys->savedata);
|
||||
|
||||
for (i = 0; i < 80; i++) {
|
||||
for (u16 j = 0; j < partyCount; j++) {
|
||||
POKEMON *pokemon = GetPartyMonByIndex(party, j);
|
||||
if (GetMonData(pokemon, MON_DATA_IS_EGG, 0) != 0 && GetMonData(pokemon, MON_DATA_CHECKSUM_FAILED, 0) != 0) {
|
||||
*legal = 1;
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*legal = 0;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_GetPartySlotWithFatefulEncounter(SCRIPTCONTEXT *ctx) {
|
||||
u8 partyCount, i;
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 *slot = ScriptGetVarPointer(ctx);
|
||||
u16 species = ScriptGetVar(ctx);
|
||||
|
||||
partyCount = GetPartyCount(SavArray_PlayerParty_get(fsys->savedata));
|
||||
for (i = 0, *slot = 255; i < partyCount; i++) {
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), i);
|
||||
if (GetMonData(pokemon, MON_DATA_IS_EGG, 0) == 0) {
|
||||
if ((u16)GetMonData(pokemon, MON_DATA_SPECIES, 0) == species && GetMonData(pokemon, MON_DATA_FATEFUL_ENCOUNTER, 0) == 1) {
|
||||
*slot = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_MonHasItem(SCRIPTCONTEXT *ctx) {
|
||||
int i;
|
||||
FieldSystem *fsys = ctx->fsys;
|
||||
u16 item = ScriptGetVar(ctx);
|
||||
u16 *hasItem = ScriptGetVarPointer(ctx);
|
||||
|
||||
int partyCount = GetPartyCount(SavArray_PlayerParty_get(fsys->savedata));
|
||||
for (i = 0, *hasItem = 0; i < partyCount; i++) {
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(fsys->savedata), i);
|
||||
if (GetMonData(pokemon, MON_DATA_HELD_ITEM, 0) == item) {
|
||||
*hasItem = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
BOOL ScrCmd_GetPartymonForme(SCRIPTCONTEXT *ctx) {
|
||||
u16 slot = ScriptGetVar(ctx);
|
||||
u16 *forme = ScriptGetVarPointer(ctx);
|
||||
|
||||
POKEMON *pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(ctx->fsys->savedata), slot);
|
||||
*forme = GetMonData(pokemon, MON_DATA_FORME, 0);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
BOOL ScrCmd_MonAddContestValue(SCRIPTCONTEXT *ctx) {
|
||||
POKEMON *pokemon;
|
||||
u8 contestValue = 0;
|
||||
u16 slot = ScriptGetVar(ctx);
|
||||
u8 contestAttribute = ScriptReadByte(ctx);
|
||||
int contestModifier = ScriptGetVar(ctx);
|
||||
|
||||
if (contestAttribute >= 6) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
pokemon = GetPartyMonByIndex(SavArray_PlayerParty_get(ctx->fsys->savedata), slot);
|
||||
if (GetMonData(pokemon, MON_DATA_SHEEN, 0) == 255) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
contestAttribute += MON_DATA_COOL;
|
||||
contestValue = GetMonData(pokemon, contestAttribute, 0);
|
||||
|
||||
if ((contestModifier + contestValue) > 255) {
|
||||
contestValue = 255;
|
||||
}
|
||||
else {
|
||||
contestValue += contestModifier;
|
||||
}
|
||||
SetMonData(pokemon, contestAttribute, &contestValue);
|
||||
|
||||
return FALSE;
|
||||
}
|
@ -1489,13 +1489,13 @@
|
||||
"args": []
|
||||
},
|
||||
{
|
||||
"name": "scrcmd_238",
|
||||
"name": "party_has_pokerus",
|
||||
"args": [
|
||||
"var"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "scrcmd_239",
|
||||
"name": "mon_get_gender",
|
||||
"args": [
|
||||
"var",
|
||||
"var"
|
||||
@ -2176,13 +2176,13 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "pokeathlon_party_count",
|
||||
"name": "count_alive_mons_and_pc",
|
||||
"args": [
|
||||
"var"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "scrcmd_359",
|
||||
"name": "party_count_egg",
|
||||
"args": [
|
||||
"var"
|
||||
]
|
||||
@ -2323,21 +2323,21 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "scrcmd_382",
|
||||
"name": "mon_get_friendship",
|
||||
"args": [
|
||||
"var",
|
||||
"var"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "scrcmd_383",
|
||||
"name": "mon_add_friendship",
|
||||
"args": [
|
||||
2,
|
||||
"var"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "scrcmd_384",
|
||||
"name": "mon_subtract_friendship",
|
||||
"args": [
|
||||
2,
|
||||
2
|
||||
@ -2426,14 +2426,14 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "scrcmd_397",
|
||||
"name": "mon_forget_move",
|
||||
"args": [
|
||||
"var",
|
||||
"var"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "scrcmd_398",
|
||||
"name": "mon_get_move",
|
||||
"args": [
|
||||
"var",
|
||||
"var",
|
||||
@ -2655,7 +2655,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "scrcmd_428",
|
||||
"name": "mon_give_mail",
|
||||
"args": [
|
||||
"var"
|
||||
]
|
||||
@ -2694,7 +2694,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "scrcmd_434",
|
||||
"name": "party_count_mons_at_or_below_level",
|
||||
"args": [
|
||||
"var",
|
||||
2
|
||||
@ -2840,14 +2840,14 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "scrcmd_457",
|
||||
"name": "mon_get_nature",
|
||||
"args": [
|
||||
2,
|
||||
2
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "scrcmd_458",
|
||||
"name": "get_party_slot_with_nature",
|
||||
"args": [
|
||||
2,
|
||||
2
|
||||
@ -2993,14 +2993,14 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "scrcmd_478",
|
||||
"name": "mon_get_ribbon_count",
|
||||
"args": [
|
||||
2,
|
||||
2
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "scrcmd_479",
|
||||
"name": "party_get_ribbon_count",
|
||||
"args": [
|
||||
2
|
||||
]
|
||||
@ -3135,7 +3135,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "scrcmd_496",
|
||||
"name": "get_party_lead",
|
||||
"args": [
|
||||
2
|
||||
]
|
||||
@ -3344,7 +3344,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "get_lead_mon_index",
|
||||
"name": "get_party_lead_alive",
|
||||
"args": [
|
||||
"var"
|
||||
]
|
||||
@ -3384,7 +3384,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "scrcmd_535",
|
||||
"name": "mon_get_level",
|
||||
"args": [
|
||||
2,
|
||||
2
|
||||
@ -3430,7 +3430,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "scrcmd_542",
|
||||
"name": "mon_get_contest_value",
|
||||
"args": [
|
||||
2,
|
||||
2,
|
||||
@ -4075,7 +4075,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "scrcmd_647",
|
||||
"name": "get_party_slot_with_species",
|
||||
"args": [
|
||||
"var",
|
||||
"species"
|
||||
@ -4357,7 +4357,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "scrcmd_688",
|
||||
"name": "get_party_slot_with_fateful_encounter",
|
||||
"args": [
|
||||
"var",
|
||||
2
|
||||
@ -4440,7 +4440,7 @@
|
||||
"args": []
|
||||
},
|
||||
{
|
||||
"name": "scrcmd_701",
|
||||
"name": "mon_has_item",
|
||||
"args": [
|
||||
2,
|
||||
2
|
||||
@ -4901,7 +4901,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "scrcmd_781",
|
||||
"name": "kenya_check_party_or_mailbox",
|
||||
"args": [
|
||||
"var"
|
||||
]
|
||||
@ -5171,7 +5171,7 @@
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "scrcmd_828",
|
||||
"name": "mon_add_contest_value",
|
||||
"args": [
|
||||
"var",
|
||||
1,
|
||||
|
Loading…
Reference in New Issue
Block a user