Merge pull request #1858 from AsparagusEduardo/pret/doc/fateful
Rename eventLegal to modernFatefulEncounter
This commit is contained in:
@@ -1576,15 +1576,15 @@
|
||||
.4byte \value
|
||||
.endm
|
||||
|
||||
@ Sets the eventLegal bit for the Pokemon in the specified slot of the player's party.
|
||||
.macro setmoneventlegal slot:req
|
||||
@ Sets the modernFatefulEncounter bit for the Pokemon in the specified slot of the player's party.
|
||||
.macro setmodernfatefulencounter slot:req
|
||||
.byte 0xcd
|
||||
.2byte \slot
|
||||
.endm
|
||||
|
||||
@ Checks if the eventLegal bit is set for the Pokemon in the specified slot of the player's party. If it isn't set,
|
||||
@ Checks if the modernFatefulEncounter bit is set for the Pokemon in the specified slot of the player's party. If it isn't set,
|
||||
@ VAR_RESULT is TRUE. If the bit is set (or if the specified slot is empty or invalid), VAR_RESULT is FALSE.
|
||||
.macro checkmoneventlegal slot:req
|
||||
.macro checkmodernfatefulencounter slot:req
|
||||
.byte 0xce
|
||||
.2byte \slot
|
||||
.endm
|
||||
@@ -1932,10 +1932,10 @@
|
||||
closebraillemessage
|
||||
.endm
|
||||
|
||||
@ Creates an "event legal" Pokémon for an encounter
|
||||
@ Creates a Pokémon with the modernFatefulEncounter bit set for an encounter
|
||||
.macro seteventmon species:req, level:req, item=ITEM_NONE
|
||||
setvar VAR_0x8004, \species
|
||||
setvar VAR_0x8005, \level
|
||||
setvar VAR_0x8006, \item
|
||||
special CreateEventLegalEnemyMon
|
||||
special CreateEnemyEventMon
|
||||
.endm
|
||||
|
||||
@@ -1,232 +1,232 @@
|
||||
.align 2
|
||||
gScriptCmdTable::
|
||||
.4byte ScrCmd_nop @ 0x00
|
||||
.4byte ScrCmd_nop1 @ 0x01
|
||||
.4byte ScrCmd_end @ 0x02
|
||||
.4byte ScrCmd_return @ 0x03
|
||||
.4byte ScrCmd_call @ 0x04
|
||||
.4byte ScrCmd_goto @ 0x05
|
||||
.4byte ScrCmd_goto_if @ 0x06
|
||||
.4byte ScrCmd_call_if @ 0x07
|
||||
.4byte ScrCmd_gotostd @ 0x08
|
||||
.4byte ScrCmd_callstd @ 0x09
|
||||
.4byte ScrCmd_gotostd_if @ 0x0a
|
||||
.4byte ScrCmd_callstd_if @ 0x0b
|
||||
.4byte ScrCmd_returnram @ 0x0c
|
||||
.4byte ScrCmd_endram @ 0x0d
|
||||
.4byte ScrCmd_setmysteryeventstatus @ 0x0e
|
||||
.4byte ScrCmd_loadword @ 0x0f
|
||||
.4byte ScrCmd_loadbyte @ 0x10
|
||||
.4byte ScrCmd_setptr @ 0x11
|
||||
.4byte ScrCmd_loadbytefromptr @ 0x12
|
||||
.4byte ScrCmd_setptrbyte @ 0x13
|
||||
.4byte ScrCmd_copylocal @ 0x14
|
||||
.4byte ScrCmd_copybyte @ 0x15
|
||||
.4byte ScrCmd_setvar @ 0x16
|
||||
.4byte ScrCmd_addvar @ 0x17
|
||||
.4byte ScrCmd_subvar @ 0x18
|
||||
.4byte ScrCmd_copyvar @ 0x19
|
||||
.4byte ScrCmd_setorcopyvar @ 0x1a
|
||||
.4byte ScrCmd_compare_local_to_local @ 0x1b
|
||||
.4byte ScrCmd_compare_local_to_value @ 0x1c
|
||||
.4byte ScrCmd_compare_local_to_ptr @ 0x1d
|
||||
.4byte ScrCmd_compare_ptr_to_local @ 0x1e
|
||||
.4byte ScrCmd_compare_ptr_to_value @ 0x1f
|
||||
.4byte ScrCmd_compare_ptr_to_ptr @ 0x20
|
||||
.4byte ScrCmd_compare_var_to_value @ 0x21
|
||||
.4byte ScrCmd_compare_var_to_var @ 0x22
|
||||
.4byte ScrCmd_callnative @ 0x23
|
||||
.4byte ScrCmd_gotonative @ 0x24
|
||||
.4byte ScrCmd_special @ 0x25
|
||||
.4byte ScrCmd_specialvar @ 0x26
|
||||
.4byte ScrCmd_waitstate @ 0x27
|
||||
.4byte ScrCmd_delay @ 0x28
|
||||
.4byte ScrCmd_setflag @ 0x29
|
||||
.4byte ScrCmd_clearflag @ 0x2a
|
||||
.4byte ScrCmd_checkflag @ 0x2b
|
||||
.4byte ScrCmd_initclock @ 0x2c
|
||||
.4byte ScrCmd_dotimebasedevents @ 0x2d
|
||||
.4byte ScrCmd_gettime @ 0x2e
|
||||
.4byte ScrCmd_playse @ 0x2f
|
||||
.4byte ScrCmd_waitse @ 0x30
|
||||
.4byte ScrCmd_playfanfare @ 0x31
|
||||
.4byte ScrCmd_waitfanfare @ 0x32
|
||||
.4byte ScrCmd_playbgm @ 0x33
|
||||
.4byte ScrCmd_savebgm @ 0x34
|
||||
.4byte ScrCmd_fadedefaultbgm @ 0x35
|
||||
.4byte ScrCmd_fadenewbgm @ 0x36
|
||||
.4byte ScrCmd_fadeoutbgm @ 0x37
|
||||
.4byte ScrCmd_fadeinbgm @ 0x38
|
||||
.4byte ScrCmd_warp @ 0x39
|
||||
.4byte ScrCmd_warpsilent @ 0x3a
|
||||
.4byte ScrCmd_warpdoor @ 0x3b
|
||||
.4byte ScrCmd_warphole @ 0x3c
|
||||
.4byte ScrCmd_warpteleport @ 0x3d
|
||||
.4byte ScrCmd_setwarp @ 0x3e
|
||||
.4byte ScrCmd_setdynamicwarp @ 0x3f
|
||||
.4byte ScrCmd_setdivewarp @ 0x40
|
||||
.4byte ScrCmd_setholewarp @ 0x41
|
||||
.4byte ScrCmd_getplayerxy @ 0x42
|
||||
.4byte ScrCmd_getpartysize @ 0x43
|
||||
.4byte ScrCmd_additem @ 0x44
|
||||
.4byte ScrCmd_removeitem @ 0x45
|
||||
.4byte ScrCmd_checkitemspace @ 0x46
|
||||
.4byte ScrCmd_checkitem @ 0x47
|
||||
.4byte ScrCmd_checkitemtype @ 0x48
|
||||
.4byte ScrCmd_addpcitem @ 0x49
|
||||
.4byte ScrCmd_checkpcitem @ 0x4a
|
||||
.4byte ScrCmd_adddecoration @ 0x4b
|
||||
.4byte ScrCmd_removedecoration @ 0x4c
|
||||
.4byte ScrCmd_checkdecor @ 0x4d
|
||||
.4byte ScrCmd_checkdecorspace @ 0x4e
|
||||
.4byte ScrCmd_applymovement @ 0x4f
|
||||
.4byte ScrCmd_applymovementat @ 0x50
|
||||
.4byte ScrCmd_waitmovement @ 0x51
|
||||
.4byte ScrCmd_waitmovementat @ 0x52
|
||||
.4byte ScrCmd_removeobject @ 0x53
|
||||
.4byte ScrCmd_removeobjectat @ 0x54
|
||||
.4byte ScrCmd_addobject @ 0x55
|
||||
.4byte ScrCmd_addobjectat @ 0x56
|
||||
.4byte ScrCmd_setobjectxy @ 0x57
|
||||
.4byte ScrCmd_showobjectat @ 0x58
|
||||
.4byte ScrCmd_hideobjectat @ 0x59
|
||||
.4byte ScrCmd_faceplayer @ 0x5a
|
||||
.4byte ScrCmd_turnobject @ 0x5b
|
||||
.4byte ScrCmd_trainerbattle @ 0x5c
|
||||
.4byte ScrCmd_dotrainerbattle @ 0x5d
|
||||
.4byte ScrCmd_gotopostbattlescript @ 0x5e
|
||||
.4byte ScrCmd_gotobeatenscript @ 0x5f
|
||||
.4byte ScrCmd_checktrainerflag @ 0x60
|
||||
.4byte ScrCmd_settrainerflag @ 0x61
|
||||
.4byte ScrCmd_cleartrainerflag @ 0x62
|
||||
.4byte ScrCmd_setobjectxyperm @ 0x63
|
||||
.4byte ScrCmd_copyobjectxytoperm @ 0x64
|
||||
.4byte ScrCmd_setobjectmovementtype @ 0x65
|
||||
.4byte ScrCmd_waitmessage @ 0x66
|
||||
.4byte ScrCmd_message @ 0x67
|
||||
.4byte ScrCmd_closemessage @ 0x68
|
||||
.4byte ScrCmd_lockall @ 0x69
|
||||
.4byte ScrCmd_lock @ 0x6a
|
||||
.4byte ScrCmd_releaseall @ 0x6b
|
||||
.4byte ScrCmd_release @ 0x6c
|
||||
.4byte ScrCmd_waitbuttonpress @ 0x6d
|
||||
.4byte ScrCmd_yesnobox @ 0x6e
|
||||
.4byte ScrCmd_multichoice @ 0x6f
|
||||
.4byte ScrCmd_multichoicedefault @ 0x70
|
||||
.4byte ScrCmd_multichoicegrid @ 0x71
|
||||
.4byte ScrCmd_drawbox @ 0x72
|
||||
.4byte ScrCmd_erasebox @ 0x73
|
||||
.4byte ScrCmd_drawboxtext @ 0x74
|
||||
.4byte ScrCmd_showmonpic @ 0x75
|
||||
.4byte ScrCmd_hidemonpic @ 0x76
|
||||
.4byte ScrCmd_showcontestpainting @ 0x77
|
||||
.4byte ScrCmd_braillemessage @ 0x78
|
||||
.4byte ScrCmd_givemon @ 0x79
|
||||
.4byte ScrCmd_giveegg @ 0x7a
|
||||
.4byte ScrCmd_setmonmove @ 0x7b
|
||||
.4byte ScrCmd_checkpartymove @ 0x7c
|
||||
.4byte ScrCmd_bufferspeciesname @ 0x7d
|
||||
.4byte ScrCmd_bufferleadmonspeciesname @ 0x7e
|
||||
.4byte ScrCmd_bufferpartymonnick @ 0x7f
|
||||
.4byte ScrCmd_bufferitemname @ 0x80
|
||||
.4byte ScrCmd_bufferdecorationname @ 0x81
|
||||
.4byte ScrCmd_buffermovename @ 0x82
|
||||
.4byte ScrCmd_buffernumberstring @ 0x83
|
||||
.4byte ScrCmd_bufferstdstring @ 0x84
|
||||
.4byte ScrCmd_bufferstring @ 0x85
|
||||
.4byte ScrCmd_pokemart @ 0x86
|
||||
.4byte ScrCmd_pokemartdecoration @ 0x87
|
||||
.4byte ScrCmd_pokemartdecoration2 @ 0x88
|
||||
.4byte ScrCmd_playslotmachine @ 0x89
|
||||
.4byte ScrCmd_setberrytree @ 0x8a
|
||||
.4byte ScrCmd_choosecontestmon @ 0x8b
|
||||
.4byte ScrCmd_startcontest @ 0x8c
|
||||
.4byte ScrCmd_showcontestresults @ 0x8d
|
||||
.4byte ScrCmd_contestlinktransfer @ 0x8e
|
||||
.4byte ScrCmd_random @ 0x8f
|
||||
.4byte ScrCmd_addmoney @ 0x90
|
||||
.4byte ScrCmd_removemoney @ 0x91
|
||||
.4byte ScrCmd_checkmoney @ 0x92
|
||||
.4byte ScrCmd_showmoneybox @ 0x93
|
||||
.4byte ScrCmd_hidemoneybox @ 0x94
|
||||
.4byte ScrCmd_updatemoneybox @ 0x95
|
||||
.4byte ScrCmd_getpokenewsactive @ 0x96
|
||||
.4byte ScrCmd_fadescreen @ 0x97
|
||||
.4byte ScrCmd_fadescreenspeed @ 0x98
|
||||
.4byte ScrCmd_setflashlevel @ 0x99
|
||||
.4byte ScrCmd_animateflash @ 0x9a
|
||||
.4byte ScrCmd_messageautoscroll @ 0x9b
|
||||
.4byte ScrCmd_dofieldeffect @ 0x9c
|
||||
.4byte ScrCmd_setfieldeffectargument @ 0x9d
|
||||
.4byte ScrCmd_waitfieldeffect @ 0x9e
|
||||
.4byte ScrCmd_setrespawn @ 0x9f
|
||||
.4byte ScrCmd_checkplayergender @ 0xa0
|
||||
.4byte ScrCmd_playmoncry @ 0xa1
|
||||
.4byte ScrCmd_setmetatile @ 0xa2
|
||||
.4byte ScrCmd_resetweather @ 0xa3
|
||||
.4byte ScrCmd_setweather @ 0xa4
|
||||
.4byte ScrCmd_doweather @ 0xa5
|
||||
.4byte ScrCmd_setstepcallback @ 0xa6
|
||||
.4byte ScrCmd_setmaplayoutindex @ 0xa7
|
||||
.4byte ScrCmd_setobjectsubpriority @ 0xa8
|
||||
.4byte ScrCmd_resetobjectsubpriority @ 0xa9
|
||||
.4byte ScrCmd_createvobject @ 0xaa
|
||||
.4byte ScrCmd_turnvobject @ 0xab
|
||||
.4byte ScrCmd_opendoor @ 0xac
|
||||
.4byte ScrCmd_closedoor @ 0xad
|
||||
.4byte ScrCmd_waitdooranim @ 0xae
|
||||
.4byte ScrCmd_setdooropen @ 0xaf
|
||||
.4byte ScrCmd_setdoorclosed @ 0xb0
|
||||
.4byte ScrCmd_addelevmenuitem @ 0xb1
|
||||
.4byte ScrCmd_showelevmenu @ 0xb2
|
||||
.4byte ScrCmd_checkcoins @ 0xb3
|
||||
.4byte ScrCmd_addcoins @ 0xb4
|
||||
.4byte ScrCmd_removecoins @ 0xb5
|
||||
.4byte ScrCmd_setwildbattle @ 0xb6
|
||||
.4byte ScrCmd_dowildbattle @ 0xb7
|
||||
.4byte ScrCmd_setvaddress @ 0xb8
|
||||
.4byte ScrCmd_vgoto @ 0xb9
|
||||
.4byte ScrCmd_vcall @ 0xba
|
||||
.4byte ScrCmd_vgoto_if @ 0xbb
|
||||
.4byte ScrCmd_vcall_if @ 0xbc
|
||||
.4byte ScrCmd_vmessage @ 0xbd
|
||||
.4byte ScrCmd_vbuffermessage @ 0xbe
|
||||
.4byte ScrCmd_vbufferstring @ 0xbf
|
||||
.4byte ScrCmd_showcoinsbox @ 0xc0
|
||||
.4byte ScrCmd_hidecoinsbox @ 0xc1
|
||||
.4byte ScrCmd_updatecoinsbox @ 0xc2
|
||||
.4byte ScrCmd_incrementgamestat @ 0xc3
|
||||
.4byte ScrCmd_setescapewarp @ 0xc4
|
||||
.4byte ScrCmd_waitmoncry @ 0xc5
|
||||
.4byte ScrCmd_bufferboxname @ 0xc6
|
||||
.4byte ScrCmd_nop1 @ 0xc7
|
||||
.4byte ScrCmd_nop1 @ 0xc8
|
||||
.4byte ScrCmd_nop1 @ 0xc9
|
||||
.4byte ScrCmd_nop1 @ 0xca
|
||||
.4byte ScrCmd_nop1 @ 0xcb
|
||||
.4byte ScrCmd_nop1 @ 0xcc
|
||||
.4byte ScrCmd_setmoneventlegal @ 0xcd
|
||||
.4byte ScrCmd_checkmoneventlegal @ 0xce
|
||||
.4byte ScrCmd_trywondercardscript @ 0xcf
|
||||
.4byte ScrCmd_nop1 @ 0xd0
|
||||
.4byte ScrCmd_warpspinenter @ 0xd1
|
||||
.4byte ScrCmd_setmonmetlocation @ 0xd2
|
||||
.4byte ScrCmd_moverotatingtileobjects @ 0xd3
|
||||
.4byte ScrCmd_turnrotatingtileobjects @ 0xd4
|
||||
.4byte ScrCmd_initrotatingtilepuzzle @ 0xd5
|
||||
.4byte ScrCmd_freerotatingtilepuzzle @ 0xd6
|
||||
.4byte ScrCmd_warpmossdeepgym @ 0xd7
|
||||
.4byte ScrCmd_selectapproachingtrainer @ 0xd8
|
||||
.4byte ScrCmd_lockfortrainer @ 0xd9
|
||||
.4byte ScrCmd_closebraillemessage @ 0xda
|
||||
.4byte ScrCmd_messageinstant @ 0xdb
|
||||
.4byte ScrCmd_fadescreenswapbuffers @ 0xdc
|
||||
.4byte ScrCmd_buffertrainerclassname @ 0xdd
|
||||
.4byte ScrCmd_buffertrainername @ 0xde
|
||||
.4byte ScrCmd_pokenavcall @ 0xdf
|
||||
.4byte ScrCmd_warpwhitefade @ 0xe0
|
||||
.4byte ScrCmd_buffercontestname @ 0xe1
|
||||
.4byte ScrCmd_bufferitemnameplural @ 0xe2
|
||||
.4byte ScrCmd_nop @ 0x00
|
||||
.4byte ScrCmd_nop1 @ 0x01
|
||||
.4byte ScrCmd_end @ 0x02
|
||||
.4byte ScrCmd_return @ 0x03
|
||||
.4byte ScrCmd_call @ 0x04
|
||||
.4byte ScrCmd_goto @ 0x05
|
||||
.4byte ScrCmd_goto_if @ 0x06
|
||||
.4byte ScrCmd_call_if @ 0x07
|
||||
.4byte ScrCmd_gotostd @ 0x08
|
||||
.4byte ScrCmd_callstd @ 0x09
|
||||
.4byte ScrCmd_gotostd_if @ 0x0a
|
||||
.4byte ScrCmd_callstd_if @ 0x0b
|
||||
.4byte ScrCmd_returnram @ 0x0c
|
||||
.4byte ScrCmd_endram @ 0x0d
|
||||
.4byte ScrCmd_setmysteryeventstatus @ 0x0e
|
||||
.4byte ScrCmd_loadword @ 0x0f
|
||||
.4byte ScrCmd_loadbyte @ 0x10
|
||||
.4byte ScrCmd_setptr @ 0x11
|
||||
.4byte ScrCmd_loadbytefromptr @ 0x12
|
||||
.4byte ScrCmd_setptrbyte @ 0x13
|
||||
.4byte ScrCmd_copylocal @ 0x14
|
||||
.4byte ScrCmd_copybyte @ 0x15
|
||||
.4byte ScrCmd_setvar @ 0x16
|
||||
.4byte ScrCmd_addvar @ 0x17
|
||||
.4byte ScrCmd_subvar @ 0x18
|
||||
.4byte ScrCmd_copyvar @ 0x19
|
||||
.4byte ScrCmd_setorcopyvar @ 0x1a
|
||||
.4byte ScrCmd_compare_local_to_local @ 0x1b
|
||||
.4byte ScrCmd_compare_local_to_value @ 0x1c
|
||||
.4byte ScrCmd_compare_local_to_ptr @ 0x1d
|
||||
.4byte ScrCmd_compare_ptr_to_local @ 0x1e
|
||||
.4byte ScrCmd_compare_ptr_to_value @ 0x1f
|
||||
.4byte ScrCmd_compare_ptr_to_ptr @ 0x20
|
||||
.4byte ScrCmd_compare_var_to_value @ 0x21
|
||||
.4byte ScrCmd_compare_var_to_var @ 0x22
|
||||
.4byte ScrCmd_callnative @ 0x23
|
||||
.4byte ScrCmd_gotonative @ 0x24
|
||||
.4byte ScrCmd_special @ 0x25
|
||||
.4byte ScrCmd_specialvar @ 0x26
|
||||
.4byte ScrCmd_waitstate @ 0x27
|
||||
.4byte ScrCmd_delay @ 0x28
|
||||
.4byte ScrCmd_setflag @ 0x29
|
||||
.4byte ScrCmd_clearflag @ 0x2a
|
||||
.4byte ScrCmd_checkflag @ 0x2b
|
||||
.4byte ScrCmd_initclock @ 0x2c
|
||||
.4byte ScrCmd_dotimebasedevents @ 0x2d
|
||||
.4byte ScrCmd_gettime @ 0x2e
|
||||
.4byte ScrCmd_playse @ 0x2f
|
||||
.4byte ScrCmd_waitse @ 0x30
|
||||
.4byte ScrCmd_playfanfare @ 0x31
|
||||
.4byte ScrCmd_waitfanfare @ 0x32
|
||||
.4byte ScrCmd_playbgm @ 0x33
|
||||
.4byte ScrCmd_savebgm @ 0x34
|
||||
.4byte ScrCmd_fadedefaultbgm @ 0x35
|
||||
.4byte ScrCmd_fadenewbgm @ 0x36
|
||||
.4byte ScrCmd_fadeoutbgm @ 0x37
|
||||
.4byte ScrCmd_fadeinbgm @ 0x38
|
||||
.4byte ScrCmd_warp @ 0x39
|
||||
.4byte ScrCmd_warpsilent @ 0x3a
|
||||
.4byte ScrCmd_warpdoor @ 0x3b
|
||||
.4byte ScrCmd_warphole @ 0x3c
|
||||
.4byte ScrCmd_warpteleport @ 0x3d
|
||||
.4byte ScrCmd_setwarp @ 0x3e
|
||||
.4byte ScrCmd_setdynamicwarp @ 0x3f
|
||||
.4byte ScrCmd_setdivewarp @ 0x40
|
||||
.4byte ScrCmd_setholewarp @ 0x41
|
||||
.4byte ScrCmd_getplayerxy @ 0x42
|
||||
.4byte ScrCmd_getpartysize @ 0x43
|
||||
.4byte ScrCmd_additem @ 0x44
|
||||
.4byte ScrCmd_removeitem @ 0x45
|
||||
.4byte ScrCmd_checkitemspace @ 0x46
|
||||
.4byte ScrCmd_checkitem @ 0x47
|
||||
.4byte ScrCmd_checkitemtype @ 0x48
|
||||
.4byte ScrCmd_addpcitem @ 0x49
|
||||
.4byte ScrCmd_checkpcitem @ 0x4a
|
||||
.4byte ScrCmd_adddecoration @ 0x4b
|
||||
.4byte ScrCmd_removedecoration @ 0x4c
|
||||
.4byte ScrCmd_checkdecor @ 0x4d
|
||||
.4byte ScrCmd_checkdecorspace @ 0x4e
|
||||
.4byte ScrCmd_applymovement @ 0x4f
|
||||
.4byte ScrCmd_applymovementat @ 0x50
|
||||
.4byte ScrCmd_waitmovement @ 0x51
|
||||
.4byte ScrCmd_waitmovementat @ 0x52
|
||||
.4byte ScrCmd_removeobject @ 0x53
|
||||
.4byte ScrCmd_removeobjectat @ 0x54
|
||||
.4byte ScrCmd_addobject @ 0x55
|
||||
.4byte ScrCmd_addobjectat @ 0x56
|
||||
.4byte ScrCmd_setobjectxy @ 0x57
|
||||
.4byte ScrCmd_showobjectat @ 0x58
|
||||
.4byte ScrCmd_hideobjectat @ 0x59
|
||||
.4byte ScrCmd_faceplayer @ 0x5a
|
||||
.4byte ScrCmd_turnobject @ 0x5b
|
||||
.4byte ScrCmd_trainerbattle @ 0x5c
|
||||
.4byte ScrCmd_dotrainerbattle @ 0x5d
|
||||
.4byte ScrCmd_gotopostbattlescript @ 0x5e
|
||||
.4byte ScrCmd_gotobeatenscript @ 0x5f
|
||||
.4byte ScrCmd_checktrainerflag @ 0x60
|
||||
.4byte ScrCmd_settrainerflag @ 0x61
|
||||
.4byte ScrCmd_cleartrainerflag @ 0x62
|
||||
.4byte ScrCmd_setobjectxyperm @ 0x63
|
||||
.4byte ScrCmd_copyobjectxytoperm @ 0x64
|
||||
.4byte ScrCmd_setobjectmovementtype @ 0x65
|
||||
.4byte ScrCmd_waitmessage @ 0x66
|
||||
.4byte ScrCmd_message @ 0x67
|
||||
.4byte ScrCmd_closemessage @ 0x68
|
||||
.4byte ScrCmd_lockall @ 0x69
|
||||
.4byte ScrCmd_lock @ 0x6a
|
||||
.4byte ScrCmd_releaseall @ 0x6b
|
||||
.4byte ScrCmd_release @ 0x6c
|
||||
.4byte ScrCmd_waitbuttonpress @ 0x6d
|
||||
.4byte ScrCmd_yesnobox @ 0x6e
|
||||
.4byte ScrCmd_multichoice @ 0x6f
|
||||
.4byte ScrCmd_multichoicedefault @ 0x70
|
||||
.4byte ScrCmd_multichoicegrid @ 0x71
|
||||
.4byte ScrCmd_drawbox @ 0x72
|
||||
.4byte ScrCmd_erasebox @ 0x73
|
||||
.4byte ScrCmd_drawboxtext @ 0x74
|
||||
.4byte ScrCmd_showmonpic @ 0x75
|
||||
.4byte ScrCmd_hidemonpic @ 0x76
|
||||
.4byte ScrCmd_showcontestpainting @ 0x77
|
||||
.4byte ScrCmd_braillemessage @ 0x78
|
||||
.4byte ScrCmd_givemon @ 0x79
|
||||
.4byte ScrCmd_giveegg @ 0x7a
|
||||
.4byte ScrCmd_setmonmove @ 0x7b
|
||||
.4byte ScrCmd_checkpartymove @ 0x7c
|
||||
.4byte ScrCmd_bufferspeciesname @ 0x7d
|
||||
.4byte ScrCmd_bufferleadmonspeciesname @ 0x7e
|
||||
.4byte ScrCmd_bufferpartymonnick @ 0x7f
|
||||
.4byte ScrCmd_bufferitemname @ 0x80
|
||||
.4byte ScrCmd_bufferdecorationname @ 0x81
|
||||
.4byte ScrCmd_buffermovename @ 0x82
|
||||
.4byte ScrCmd_buffernumberstring @ 0x83
|
||||
.4byte ScrCmd_bufferstdstring @ 0x84
|
||||
.4byte ScrCmd_bufferstring @ 0x85
|
||||
.4byte ScrCmd_pokemart @ 0x86
|
||||
.4byte ScrCmd_pokemartdecoration @ 0x87
|
||||
.4byte ScrCmd_pokemartdecoration2 @ 0x88
|
||||
.4byte ScrCmd_playslotmachine @ 0x89
|
||||
.4byte ScrCmd_setberrytree @ 0x8a
|
||||
.4byte ScrCmd_choosecontestmon @ 0x8b
|
||||
.4byte ScrCmd_startcontest @ 0x8c
|
||||
.4byte ScrCmd_showcontestresults @ 0x8d
|
||||
.4byte ScrCmd_contestlinktransfer @ 0x8e
|
||||
.4byte ScrCmd_random @ 0x8f
|
||||
.4byte ScrCmd_addmoney @ 0x90
|
||||
.4byte ScrCmd_removemoney @ 0x91
|
||||
.4byte ScrCmd_checkmoney @ 0x92
|
||||
.4byte ScrCmd_showmoneybox @ 0x93
|
||||
.4byte ScrCmd_hidemoneybox @ 0x94
|
||||
.4byte ScrCmd_updatemoneybox @ 0x95
|
||||
.4byte ScrCmd_getpokenewsactive @ 0x96
|
||||
.4byte ScrCmd_fadescreen @ 0x97
|
||||
.4byte ScrCmd_fadescreenspeed @ 0x98
|
||||
.4byte ScrCmd_setflashlevel @ 0x99
|
||||
.4byte ScrCmd_animateflash @ 0x9a
|
||||
.4byte ScrCmd_messageautoscroll @ 0x9b
|
||||
.4byte ScrCmd_dofieldeffect @ 0x9c
|
||||
.4byte ScrCmd_setfieldeffectargument @ 0x9d
|
||||
.4byte ScrCmd_waitfieldeffect @ 0x9e
|
||||
.4byte ScrCmd_setrespawn @ 0x9f
|
||||
.4byte ScrCmd_checkplayergender @ 0xa0
|
||||
.4byte ScrCmd_playmoncry @ 0xa1
|
||||
.4byte ScrCmd_setmetatile @ 0xa2
|
||||
.4byte ScrCmd_resetweather @ 0xa3
|
||||
.4byte ScrCmd_setweather @ 0xa4
|
||||
.4byte ScrCmd_doweather @ 0xa5
|
||||
.4byte ScrCmd_setstepcallback @ 0xa6
|
||||
.4byte ScrCmd_setmaplayoutindex @ 0xa7
|
||||
.4byte ScrCmd_setobjectsubpriority @ 0xa8
|
||||
.4byte ScrCmd_resetobjectsubpriority @ 0xa9
|
||||
.4byte ScrCmd_createvobject @ 0xaa
|
||||
.4byte ScrCmd_turnvobject @ 0xab
|
||||
.4byte ScrCmd_opendoor @ 0xac
|
||||
.4byte ScrCmd_closedoor @ 0xad
|
||||
.4byte ScrCmd_waitdooranim @ 0xae
|
||||
.4byte ScrCmd_setdooropen @ 0xaf
|
||||
.4byte ScrCmd_setdoorclosed @ 0xb0
|
||||
.4byte ScrCmd_addelevmenuitem @ 0xb1
|
||||
.4byte ScrCmd_showelevmenu @ 0xb2
|
||||
.4byte ScrCmd_checkcoins @ 0xb3
|
||||
.4byte ScrCmd_addcoins @ 0xb4
|
||||
.4byte ScrCmd_removecoins @ 0xb5
|
||||
.4byte ScrCmd_setwildbattle @ 0xb6
|
||||
.4byte ScrCmd_dowildbattle @ 0xb7
|
||||
.4byte ScrCmd_setvaddress @ 0xb8
|
||||
.4byte ScrCmd_vgoto @ 0xb9
|
||||
.4byte ScrCmd_vcall @ 0xba
|
||||
.4byte ScrCmd_vgoto_if @ 0xbb
|
||||
.4byte ScrCmd_vcall_if @ 0xbc
|
||||
.4byte ScrCmd_vmessage @ 0xbd
|
||||
.4byte ScrCmd_vbuffermessage @ 0xbe
|
||||
.4byte ScrCmd_vbufferstring @ 0xbf
|
||||
.4byte ScrCmd_showcoinsbox @ 0xc0
|
||||
.4byte ScrCmd_hidecoinsbox @ 0xc1
|
||||
.4byte ScrCmd_updatecoinsbox @ 0xc2
|
||||
.4byte ScrCmd_incrementgamestat @ 0xc3
|
||||
.4byte ScrCmd_setescapewarp @ 0xc4
|
||||
.4byte ScrCmd_waitmoncry @ 0xc5
|
||||
.4byte ScrCmd_bufferboxname @ 0xc6
|
||||
.4byte ScrCmd_nop1 @ 0xc7
|
||||
.4byte ScrCmd_nop1 @ 0xc8
|
||||
.4byte ScrCmd_nop1 @ 0xc9
|
||||
.4byte ScrCmd_nop1 @ 0xca
|
||||
.4byte ScrCmd_nop1 @ 0xcb
|
||||
.4byte ScrCmd_nop1 @ 0xcc
|
||||
.4byte ScrCmd_setmonmodernfatefulencounter @ 0xcd
|
||||
.4byte ScrCmd_checkmonmodernfatefulencounter @ 0xce
|
||||
.4byte ScrCmd_trywondercardscript @ 0xcf
|
||||
.4byte ScrCmd_nop1 @ 0xd0
|
||||
.4byte ScrCmd_warpspinenter @ 0xd1
|
||||
.4byte ScrCmd_setmonmetlocation @ 0xd2
|
||||
.4byte ScrCmd_moverotatingtileobjects @ 0xd3
|
||||
.4byte ScrCmd_turnrotatingtileobjects @ 0xd4
|
||||
.4byte ScrCmd_initrotatingtilepuzzle @ 0xd5
|
||||
.4byte ScrCmd_freerotatingtilepuzzle @ 0xd6
|
||||
.4byte ScrCmd_warpmossdeepgym @ 0xd7
|
||||
.4byte ScrCmd_selectapproachingtrainer @ 0xd8
|
||||
.4byte ScrCmd_lockfortrainer @ 0xd9
|
||||
.4byte ScrCmd_closebraillemessage @ 0xda
|
||||
.4byte ScrCmd_messageinstant @ 0xdb
|
||||
.4byte ScrCmd_fadescreenswapbuffers @ 0xdc
|
||||
.4byte ScrCmd_buffertrainerclassname @ 0xdd
|
||||
.4byte ScrCmd_buffertrainername @ 0xde
|
||||
.4byte ScrCmd_pokenavcall @ 0xdf
|
||||
.4byte ScrCmd_warpwhitefade @ 0xe0
|
||||
.4byte ScrCmd_buffercontestname @ 0xe1
|
||||
.4byte ScrCmd_bufferitemnameplural @ 0xe2
|
||||
|
||||
gScriptCmdTableEnd::
|
||||
.4byte ScrCmd_nop
|
||||
|
||||
@@ -29,7 +29,7 @@ SurfPichu_FullParty:
|
||||
|
||||
SurfPichu_GiveEgg:
|
||||
giveegg SPECIES_PICHU
|
||||
setmoneventlegal VAR_GIFT_PICHU_SLOT
|
||||
setmodernfatefulencounter VAR_GIFT_PICHU_SLOT
|
||||
setmonmetlocation VAR_GIFT_PICHU_SLOT, METLOC_FATEFUL_ENCOUNTER
|
||||
vgoto_if_eq VAR_GIFT_PICHU_SLOT, 1, SurfPichu_Slot1
|
||||
vgoto_if_eq VAR_GIFT_PICHU_SLOT, 2, SurfPichu_Slot2
|
||||
|
||||
@@ -490,7 +490,7 @@ gSpecials::
|
||||
def_special ScrollableMultichoice_ClosePersistentMenu
|
||||
def_special DoDeoxysRockInteraction
|
||||
def_special SetDeoxysRockPalette
|
||||
def_special CreateEventLegalEnemyMon
|
||||
def_special CreateEnemyEventMon
|
||||
def_special StartMirageTowerDisintegration
|
||||
def_special StartMirageTowerShake
|
||||
def_special StartMirageTowerFossilFallAndSink
|
||||
|
||||
@@ -85,7 +85,7 @@ enum {
|
||||
MON_DATA_EARTH_RIBBON,
|
||||
MON_DATA_WORLD_RIBBON,
|
||||
MON_DATA_UNUSED_RIBBONS,
|
||||
MON_DATA_EVENT_LEGAL,
|
||||
MON_DATA_MODERN_FATEFUL_ENCOUNTER,
|
||||
MON_DATA_KNOWN_MOVES,
|
||||
MON_DATA_RIBBON_COUNT,
|
||||
MON_DATA_RIBBONS,
|
||||
@@ -147,25 +147,32 @@ struct PokemonSubstruct3
|
||||
/* 0x07 */ u32 isEgg:1;
|
||||
/* 0x07 */ u32 abilityNum:1;
|
||||
|
||||
/* 0x08 */ u32 coolRibbon:3;
|
||||
/* 0x08 */ u32 beautyRibbon:3;
|
||||
/* 0x08 */ u32 cuteRibbon:3;
|
||||
/* 0x09 */ u32 smartRibbon:3;
|
||||
/* 0x09 */ u32 toughRibbon:3;
|
||||
/* 0x09 */ u32 championRibbon:1;
|
||||
/* 0x0A */ u32 winningRibbon:1;
|
||||
/* 0x0A */ u32 victoryRibbon:1;
|
||||
/* 0x0A */ u32 artistRibbon:1;
|
||||
/* 0x0A */ u32 effortRibbon:1;
|
||||
/* 0x0A */ u32 marineRibbon:1; // never distributed
|
||||
/* 0x0A */ u32 landRibbon:1; // never distributed
|
||||
/* 0x0A */ u32 skyRibbon:1; // never distributed
|
||||
/* 0x0A */ u32 countryRibbon:1; // distributed during Pokémon Festa '04 and '05 to tournament winners
|
||||
/* 0x0B */ u32 nationalRibbon:1;
|
||||
/* 0x0B */ u32 earthRibbon:1;
|
||||
/* 0x0B */ u32 worldRibbon:1; // distributed during Pokémon Festa '04 and '05 to tournament winners
|
||||
/* 0x0B */ u32 unusedRibbons:4; // discarded in Gen 4
|
||||
/* 0x0B */ u32 eventLegal:1; // controls Mew & Deoxys obedience; if set, Pokémon is a fateful encounter in Gen 4+; set for in-game event island legendaries, some distributed events, and Pokémon from XD: Gale of Darkness.
|
||||
/* 0x08 */ u32 coolRibbon:3; // Stores the highest contest rank achieved in the Cool category.
|
||||
/* 0x08 */ u32 beautyRibbon:3; // Stores the highest contest rank achieved in the Beauty category.
|
||||
/* 0x08 */ u32 cuteRibbon:3; // Stores the highest contest rank achieved in the Cute category.
|
||||
/* 0x09 */ u32 smartRibbon:3; // Stores the highest contest rank achieved in the Smart category.
|
||||
/* 0x09 */ u32 toughRibbon:3; // Stores the highest contest rank achieved in the Tough category.
|
||||
/* 0x09 */ u32 championRibbon:1; // Given when defeating the Champion. Because both RSE and FRLG use it, later generations don't specify from which region it comes from.
|
||||
/* 0x0A */ u32 winningRibbon:1; // Given at the Battle Tower's Level 50 challenge by winning a set of seven battles that extends the current streak to 56 or more.
|
||||
/* 0x0A */ u32 victoryRibbon:1; // Given at the Battle Tower's Level 100 challenge by winning a set of seven battles that extends the current streak to 56 or more.
|
||||
/* 0x0A */ u32 artistRibbon:1; // Given at the Contest Hall by winning a Master Rank contest with at least 800 points, and agreeing to have the Pokémon's portrait placed in the museum after being offered.
|
||||
/* 0x0A */ u32 effortRibbon:1; // Given at Slateport's market to Pokémon with maximum EVs.
|
||||
/* 0x0A */ u32 marineRibbon:1; // Never distributed.
|
||||
/* 0x0A */ u32 landRibbon:1; // Never distributed.
|
||||
/* 0x0A */ u32 skyRibbon:1; // Never distributed.
|
||||
/* 0x0A */ u32 countryRibbon:1; // Distributed during Pokémon Festa '04 and '05 to tournament winners.
|
||||
/* 0x0B */ u32 nationalRibbon:1; // Given to purified Shadow Pokémon in Colosseum/XD.
|
||||
/* 0x0B */ u32 earthRibbon:1; // Given to teams that have beaten Mt. Battle's 100-battle challenge in Colosseum/XD.
|
||||
/* 0x0B */ u32 worldRibbon:1; // Distributed during Pokémon Festa '04 and '05 to tournament winners.
|
||||
/* 0x0B */ u32 unusedRibbons:4; // Discarded in Gen 4.
|
||||
|
||||
// The functionality of this bit changed in FRLG:
|
||||
// In RS, this bit does nothing, is never set, & is accidentally unset when hatching Eggs.
|
||||
// In FRLG & Emerald, this controls Mew & Deoxys obedience and whether they can be traded.
|
||||
// If set, a Pokémon is a fateful encounter in FRLG's summary screen if hatched & for all Pokémon in Gen 4+ summary screens.
|
||||
// Set for in-game event island legendaries, events distributed after a certain date, & Pokémon from XD: Gale of Darkness.
|
||||
// Not to be confused with METLOC_FATEFUL_ENCOUNTER.
|
||||
/* 0x0B */ u32 modernFatefulEncounter:1;
|
||||
};
|
||||
|
||||
// Number of bytes in the largest Pokémon substruct.
|
||||
@@ -401,12 +408,11 @@ void CreateBattleTowerMon_HandleLevel(struct Pokemon *mon, struct BattleTowerPok
|
||||
void CreateApprenticeMon(struct Pokemon *mon, const struct Apprentice *src, u8 monId);
|
||||
void CreateMonWithEVSpreadNatureOTID(struct Pokemon *mon, u16 species, u8 level, u8 nature, u8 fixedIV, u8 evSpread, u32 otId);
|
||||
void ConvertPokemonToBattleTowerPokemon(struct Pokemon *mon, struct BattleTowerPokemon *dest);
|
||||
void CreateEventLegalMon(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 hasFixedPersonality, u32 fixedPersonality, u8 otIdType, u32 fixedOtId);
|
||||
bool8 ShouldIgnoreDeoxysForm(u8 caseId, u8 battlerId);
|
||||
void SetDeoxysStats(void);
|
||||
u16 GetUnionRoomTrainerPic(void);
|
||||
u16 GetUnionRoomTrainerClass(void);
|
||||
void CreateEventLegalEnemyMon(void);
|
||||
void CreateEnemyEventMon(void);
|
||||
void CalculateMonStats(struct Pokemon *mon);
|
||||
void BoxMonToMon(const struct BoxPokemon *src, struct Pokemon *dest);
|
||||
u8 GetLevelFromMonExp(struct Pokemon *mon);
|
||||
|
||||
@@ -12,8 +12,8 @@ extern const struct WindowTemplate gTradeEvolutionSceneYesNoWindowTemplate;
|
||||
s32 GetGameProgressForLinkTrade(void);
|
||||
void CB2_StartCreateTradeMenu(void);
|
||||
void CB2_LinkTrade(void);
|
||||
int CanRegisterMonForTradingBoard(struct RfuGameCompatibilityData player, u16 species2, u16 species, bool8 isEventLegal);
|
||||
int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct RfuGameCompatibilityData partner, u16 playerSpecies2, u16 partnerSpecies, u8 requestedType, u16 playerSpecies, bool8 isEventLegal);
|
||||
int CanRegisterMonForTradingBoard(struct RfuGameCompatibilityData player, u16 species2, u16 species, bool8 isModernFatefulEncounter);
|
||||
int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct RfuGameCompatibilityData partner, u16 playerSpecies2, u16 partnerSpecies, u8 requestedType, u16 playerSpecies, bool8 isModernFatefulEncounter);
|
||||
int CanSpinTradeMon(struct Pokemon *, u16);
|
||||
void InitTradeSequenceBgGpuRegs(void);
|
||||
void LinkTradeDrawWindow(void);
|
||||
|
||||
@@ -3885,14 +3885,14 @@ u8 GetMoveTarget(u16 move, u8 setTarget)
|
||||
return targetBattler;
|
||||
}
|
||||
|
||||
static bool32 IsMonEventLegal(u8 battlerId)
|
||||
static bool32 IsBattlerModernFatefulEncounter(u8 battlerId)
|
||||
{
|
||||
if (GetBattlerSide(battlerId) == B_SIDE_OPPONENT)
|
||||
return TRUE;
|
||||
if (GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES, NULL) != SPECIES_DEOXYS
|
||||
&& GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_SPECIES, NULL) != SPECIES_MEW)
|
||||
return TRUE;
|
||||
return GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_EVENT_LEGAL, NULL);
|
||||
return GetMonData(&gPlayerParty[gBattlerPartyIndexes[battlerId]], MON_DATA_MODERN_FATEFUL_ENCOUNTER, NULL);
|
||||
}
|
||||
|
||||
u8 IsMonDisobedient(void)
|
||||
@@ -3906,7 +3906,7 @@ u8 IsMonDisobedient(void)
|
||||
if (GetBattlerSide(gBattlerAttacker) == B_SIDE_OPPONENT)
|
||||
return 0;
|
||||
|
||||
if (IsMonEventLegal(gBattlerAttacker)) // only false if illegal Mew or Deoxys
|
||||
if (IsBattlerModernFatefulEncounter(gBattlerAttacker)) // only false if illegal Mew or Deoxys
|
||||
{
|
||||
if (gBattleTypeFlags & BATTLE_TYPE_INGAME_PARTNER && GetBattlerPosition(gBattlerAttacker) == 2)
|
||||
return 0;
|
||||
|
||||
@@ -313,7 +313,7 @@ static void CreateHatchedMon(struct Pokemon *egg, struct Pokemon *temp)
|
||||
{
|
||||
u16 species;
|
||||
u32 personality, pokerus;
|
||||
u8 i, friendship, language, gameMet, markings, isEventLegal;
|
||||
u8 i, friendship, language, gameMet, markings, isModernFatefulEncounter;
|
||||
u16 moves[MAX_MON_MOVES];
|
||||
u32 ivs[NUM_STATS];
|
||||
|
||||
@@ -332,7 +332,7 @@ static void CreateHatchedMon(struct Pokemon *egg, struct Pokemon *temp)
|
||||
gameMet = GetMonData(egg, MON_DATA_MET_GAME);
|
||||
markings = GetMonData(egg, MON_DATA_MARKINGS);
|
||||
pokerus = GetMonData(egg, MON_DATA_POKERUS);
|
||||
isEventLegal = GetMonData(egg, MON_DATA_EVENT_LEGAL);
|
||||
isModernFatefulEncounter = GetMonData(egg, MON_DATA_MODERN_FATEFUL_ENCOUNTER);
|
||||
|
||||
CreateMon(temp, species, EGG_HATCH_LEVEL, USE_RANDOM_IVS, TRUE, personality, OT_ID_PLAYER_ID, 0);
|
||||
|
||||
@@ -350,7 +350,7 @@ static void CreateHatchedMon(struct Pokemon *egg, struct Pokemon *temp)
|
||||
friendship = 120;
|
||||
SetMonData(temp, MON_DATA_FRIENDSHIP, &friendship);
|
||||
SetMonData(temp, MON_DATA_POKERUS, &pokerus);
|
||||
SetMonData(temp, MON_DATA_EVENT_LEGAL, &isEventLegal);
|
||||
SetMonData(temp, MON_DATA_MODERN_FATEFUL_ENCOUNTER, &isModernFatefulEncounter);
|
||||
|
||||
*egg = *temp;
|
||||
}
|
||||
|
||||
@@ -3595,9 +3595,9 @@ static void CursorCb_Register(u8 taskId)
|
||||
{
|
||||
u16 species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES_OR_EGG);
|
||||
u16 species = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES);
|
||||
u8 isEventLegal = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_EVENT_LEGAL);
|
||||
u8 isModernFatefulEncounter = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_MODERN_FATEFUL_ENCOUNTER);
|
||||
|
||||
switch (CanRegisterMonForTradingBoard(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), species2, species, isEventLegal))
|
||||
switch (CanRegisterMonForTradingBoard(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), species2, species, isModernFatefulEncounter))
|
||||
{
|
||||
case CANT_REGISTER_MON:
|
||||
StringExpandPlaceholders(gStringVar4, gText_PkmnCantBeTradedNow);
|
||||
@@ -3622,8 +3622,8 @@ static void CursorCb_Trade1(u8 taskId)
|
||||
{
|
||||
u16 species2 = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES_OR_EGG);
|
||||
u16 species = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_SPECIES);
|
||||
u8 isEventLegal = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_EVENT_LEGAL);
|
||||
u32 stringId = GetUnionRoomTradeMessageId(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), gRfuPartnerCompatibilityData, species2, gUnionRoomOfferedSpecies, gUnionRoomRequestedMonType, species, isEventLegal);
|
||||
u8 isModernFatefulEncounter = GetMonData(&gPlayerParty[gPartyMenu.slotId], MON_DATA_MODERN_FATEFUL_ENCOUNTER);
|
||||
u32 stringId = GetUnionRoomTradeMessageId(*(struct RfuGameCompatibilityData *)GetHostRfuGameData(), gRfuPartnerCompatibilityData, species2, gUnionRoomOfferedSpecies, gUnionRoomRequestedMonType, species, isModernFatefulEncounter);
|
||||
|
||||
if (stringId != UR_TRADE_MSG_NONE)
|
||||
{
|
||||
|
||||
@@ -2623,12 +2623,12 @@ void ConvertPokemonToBattleTowerPokemon(struct Pokemon *mon, struct BattleTowerP
|
||||
GetMonData(mon, MON_DATA_NICKNAME, dest->nickname);
|
||||
}
|
||||
|
||||
void CreateEventLegalMon(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 hasFixedPersonality, u32 fixedPersonality, u8 otIdType, u32 fixedOtId)
|
||||
static void CreateEventMon(struct Pokemon *mon, u16 species, u8 level, u8 fixedIV, u8 hasFixedPersonality, u32 fixedPersonality, u8 otIdType, u32 fixedOtId)
|
||||
{
|
||||
bool32 isEventLegal = TRUE;
|
||||
bool32 isModernFatefulEncounter = TRUE;
|
||||
|
||||
CreateMon(mon, species, level, fixedIV, hasFixedPersonality, fixedPersonality, otIdType, fixedOtId);
|
||||
SetMonData(mon, MON_DATA_EVENT_LEGAL, &isEventLegal);
|
||||
SetMonData(mon, MON_DATA_MODERN_FATEFUL_ENCOUNTER, &isModernFatefulEncounter);
|
||||
}
|
||||
|
||||
// If FALSE, should load this game's Deoxys form. If TRUE, should load normal Deoxys form
|
||||
@@ -2763,14 +2763,14 @@ u16 GetUnionRoomTrainerClass(void)
|
||||
return gFacilityClassToTrainerClass[gUnionRoomFacilityClasses[arrId]];
|
||||
}
|
||||
|
||||
void CreateEventLegalEnemyMon(void)
|
||||
void CreateEnemyEventMon(void)
|
||||
{
|
||||
s32 species = gSpecialVar_0x8004;
|
||||
s32 level = gSpecialVar_0x8005;
|
||||
s32 itemId = gSpecialVar_0x8006;
|
||||
|
||||
ZeroEnemyPartyMons();
|
||||
CreateEventLegalMon(&gEnemyParty[0], species, level, USE_RANDOM_IVS, FALSE, 0, OT_ID_PLAYER_ID, 0);
|
||||
CreateEventMon(&gEnemyParty[0], species, level, USE_RANDOM_IVS, FALSE, 0, OT_ID_PLAYER_ID, 0);
|
||||
if (itemId)
|
||||
{
|
||||
u8 heldItem[2];
|
||||
@@ -3957,8 +3957,8 @@ u32 GetBoxMonData(struct BoxPokemon *boxMon, s32 field, u8 *data)
|
||||
case MON_DATA_UNUSED_RIBBONS:
|
||||
retVal = substruct3->unusedRibbons;
|
||||
break;
|
||||
case MON_DATA_EVENT_LEGAL:
|
||||
retVal = substruct3->eventLegal;
|
||||
case MON_DATA_MODERN_FATEFUL_ENCOUNTER:
|
||||
retVal = substruct3->modernFatefulEncounter;
|
||||
break;
|
||||
case MON_DATA_SPECIES_OR_EGG:
|
||||
retVal = substruct0->species;
|
||||
@@ -4341,8 +4341,8 @@ void SetBoxMonData(struct BoxPokemon *boxMon, s32 field, const void *dataArg)
|
||||
case MON_DATA_UNUSED_RIBBONS:
|
||||
SET8(substruct3->unusedRibbons);
|
||||
break;
|
||||
case MON_DATA_EVENT_LEGAL:
|
||||
SET8(substruct3->eventLegal);
|
||||
case MON_DATA_MODERN_FATEFUL_ENCOUNTER:
|
||||
SET8(substruct3->modernFatefulEncounter);
|
||||
break;
|
||||
case MON_DATA_IVS:
|
||||
{
|
||||
|
||||
12
src/scrcmd.c
12
src/scrcmd.c
@@ -2206,21 +2206,21 @@ bool8 ScrCmd_lockfortrainer(struct ScriptContext *ctx)
|
||||
}
|
||||
}
|
||||
|
||||
// This command will set a Pokémon's eventLegal bit; there is no similar command to clear it.
|
||||
bool8 ScrCmd_setmoneventlegal(struct ScriptContext *ctx)
|
||||
// This command will set a Pokémon's modernFatefulEncounter bit; there is no similar command to clear it.
|
||||
bool8 ScrCmd_setmonmodernfatefulencounter(struct ScriptContext *ctx)
|
||||
{
|
||||
bool8 isEventLegal = TRUE;
|
||||
bool8 isModernFatefulEncounter = TRUE;
|
||||
u16 partyIndex = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
SetMonData(&gPlayerParty[partyIndex], MON_DATA_EVENT_LEGAL, &isEventLegal);
|
||||
SetMonData(&gPlayerParty[partyIndex], MON_DATA_MODERN_FATEFUL_ENCOUNTER, &isModernFatefulEncounter);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
bool8 ScrCmd_checkmoneventlegal(struct ScriptContext *ctx)
|
||||
bool8 ScrCmd_checkmonmodernfatefulencounter(struct ScriptContext *ctx)
|
||||
{
|
||||
u16 partyIndex = VarGet(ScriptReadHalfword(ctx));
|
||||
|
||||
gSpecialVar_Result = GetMonData(&gPlayerParty[partyIndex], MON_DATA_EVENT_LEGAL, NULL);
|
||||
gSpecialVar_Result = GetMonData(&gPlayerParty[partyIndex], MON_DATA_MODERN_FATEFUL_ENCOUNTER, NULL);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
18
src/trade.c
18
src/trade.c
@@ -1577,7 +1577,7 @@ static u8 CheckValidityOfTradeMons(u8 *aliveMons, u8 playerPartyCount, u8 player
|
||||
// Partner cant trade illegitimate Deoxys or Mew
|
||||
if (partnerSpecies == SPECIES_DEOXYS || partnerSpecies == SPECIES_MEW)
|
||||
{
|
||||
if (!GetMonData(&gEnemyParty[partnerMonIdx], MON_DATA_EVENT_LEGAL))
|
||||
if (!GetMonData(&gEnemyParty[partnerMonIdx], MON_DATA_MODERN_FATEFUL_ENCOUNTER))
|
||||
return PARTNER_MON_INVALID;
|
||||
}
|
||||
|
||||
@@ -2380,7 +2380,7 @@ static void SaveTradeGiftRibbons(void)
|
||||
{
|
||||
if (gSaveBlock1Ptr->giftRibbons[i] == 0 && sTradeMenu->giftRibbons[i] != 0)
|
||||
{
|
||||
if (sTradeMenu->giftRibbons[i] < 64)
|
||||
if (sTradeMenu->giftRibbons[i] < MAX_GIFT_RIBBON)
|
||||
gSaveBlock1Ptr->giftRibbons[i] = sTradeMenu->giftRibbons[i];
|
||||
}
|
||||
}
|
||||
@@ -2426,7 +2426,7 @@ static u32 CanTradeSelectedMon(struct Pokemon *playerParty, int partyCount, int
|
||||
|
||||
if (species[monIdx] == SPECIES_DEOXYS || species[monIdx] == SPECIES_MEW)
|
||||
{
|
||||
if (!GetMonData(&playerParty[monIdx], MON_DATA_EVENT_LEGAL))
|
||||
if (!GetMonData(&playerParty[monIdx], MON_DATA_MODERN_FATEFUL_ENCOUNTER))
|
||||
return CANT_TRADE_INVALID_MON;
|
||||
}
|
||||
|
||||
@@ -2491,17 +2491,17 @@ s32 GetGameProgressForLinkTrade(void)
|
||||
return TRADE_BOTH_PLAYERS_READY;
|
||||
}
|
||||
|
||||
static bool32 IsDeoxysOrMewUntradable(u16 species, bool8 isEventLegal)
|
||||
static bool32 IsDeoxysOrMewUntradable(u16 species, bool8 isModernFatefulEncounter)
|
||||
{
|
||||
if (species == SPECIES_DEOXYS || species == SPECIES_MEW)
|
||||
{
|
||||
if (!isEventLegal)
|
||||
if (!isModernFatefulEncounter)
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct RfuGameCompatibilityData partner, u16 playerSpecies2, u16 partnerSpecies, u8 requestedType, u16 playerSpecies, bool8 isEventLegal)
|
||||
int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct RfuGameCompatibilityData partner, u16 playerSpecies2, u16 partnerSpecies, u8 requestedType, u16 playerSpecies, bool8 isModernFatefulEncounter)
|
||||
{
|
||||
bool8 playerHasNationalDex = player.hasNationalDex;
|
||||
bool8 playerCanLinkNationally = player.canLinkNationally;
|
||||
@@ -2520,7 +2520,7 @@ int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct Rf
|
||||
}
|
||||
|
||||
// Cannot trade illegitimate Deoxys/Mew
|
||||
if (IsDeoxysOrMewUntradable(playerSpecies, isEventLegal))
|
||||
if (IsDeoxysOrMewUntradable(playerSpecies, isModernFatefulEncounter))
|
||||
return UR_TRADE_MSG_MON_CANT_BE_TRADED_2;
|
||||
|
||||
if (partnerSpecies == SPECIES_EGG)
|
||||
@@ -2563,11 +2563,11 @@ int GetUnionRoomTradeMessageId(struct RfuGameCompatibilityData player, struct Rf
|
||||
return UR_TRADE_MSG_NONE;
|
||||
}
|
||||
|
||||
int CanRegisterMonForTradingBoard(struct RfuGameCompatibilityData player, u16 species2, u16 species, bool8 isEventLegal)
|
||||
int CanRegisterMonForTradingBoard(struct RfuGameCompatibilityData player, u16 species2, u16 species, bool8 isModernFatefulEncounter)
|
||||
{
|
||||
bool8 hasNationalDex = player.hasNationalDex;
|
||||
|
||||
if (IsDeoxysOrMewUntradable(species, isEventLegal))
|
||||
if (IsDeoxysOrMewUntradable(species, isModernFatefulEncounter))
|
||||
return CANT_REGISTER_MON;
|
||||
|
||||
if (hasNationalDex)
|
||||
|
||||
Reference in New Issue
Block a user