Add seteventmon

This commit is contained in:
GriffinR 2022-01-11 02:16:25 -05:00
parent 110fbc559c
commit 3a6c633905
6 changed files with 14 additions and 24 deletions

View File

@ -1931,3 +1931,11 @@
waitbuttonpress waitbuttonpress
closebraillemessage closebraillemessage
.endm .endm
@ Creates an "event legal" Pokémon 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
.endm

View File

@ -82,10 +82,7 @@ BirthIsland_Exterior_EventScript_Deoxys::
delay 40 delay 40
waitmoncry waitmoncry
setvar VAR_LAST_TALKED, LOCALID_DEOXYS setvar VAR_LAST_TALKED, LOCALID_DEOXYS
setvar VAR_0x8004, SPECIES_DEOXYS seteventmon SPECIES_DEOXYS, 30
setvar VAR_0x8005, 30 @ level
setvar VAR_0x8006, ITEM_NONE
special CreateEventLegalEnemyMon
setflag FLAG_SYS_CTRL_OBJ_DELETE setflag FLAG_SYS_CTRL_OBJ_DELETE
special BattleSetup_StartLegendaryBattle special BattleSetup_StartLegendaryBattle
waitstate waitstate

View File

@ -129,10 +129,7 @@ FarawayIsland_Interior_EventScript_Mew::
special DestroyMewEmergingGrassSprite special DestroyMewEmergingGrassSprite
delay 40 delay 40
waitmoncry waitmoncry
setvar VAR_0x8004, SPECIES_MEW seteventmon SPECIES_MEW, 30
setvar VAR_0x8005, 30 @ level
setvar VAR_0x8006, ITEM_NONE
special CreateEventLegalEnemyMon
setflag FLAG_SYS_CTRL_OBJ_DELETE setflag FLAG_SYS_CTRL_OBJ_DELETE
special BattleSetup_StartLegendaryBattle special BattleSetup_StartLegendaryBattle
waitstate waitstate

View File

@ -53,10 +53,7 @@ NavelRock_Bottom_EventScript_Lugia::
playmoncry SPECIES_LUGIA, CRY_MODE_ENCOUNTER playmoncry SPECIES_LUGIA, CRY_MODE_ENCOUNTER
waitmoncry waitmoncry
delay 20 delay 20
setvar VAR_0x8004, SPECIES_LUGIA seteventmon SPECIES_LUGIA, 70
setvar VAR_0x8005, 70 @ level
setvar VAR_0x8006, ITEM_NONE
special CreateEventLegalEnemyMon
setflag FLAG_SYS_CTRL_OBJ_DELETE setflag FLAG_SYS_CTRL_OBJ_DELETE
special BattleSetup_StartLegendaryBattle special BattleSetup_StartLegendaryBattle
waitstate waitstate

View File

@ -57,10 +57,7 @@ NavelRock_Top_EventScript_HoOh::
applymovement LOCALID_HO_OH, NavelRock_Top_Movement_HoOhApproach applymovement LOCALID_HO_OH, NavelRock_Top_Movement_HoOhApproach
waitmovement 0 waitmovement 0
special RemoveCameraObject special RemoveCameraObject
setvar VAR_0x8004, SPECIES_HO_OH seteventmon SPECIES_HO_OH, 70
setvar VAR_0x8005, 70 @ level
setvar VAR_0x8006, ITEM_NONE
special CreateEventLegalEnemyMon
setflag FLAG_SYS_CTRL_OBJ_DELETE setflag FLAG_SYS_CTRL_OBJ_DELETE
special BattleSetup_StartLegendaryBattle special BattleSetup_StartLegendaryBattle
waitstate waitstate

View File

@ -105,17 +105,11 @@ SouthernIsland_Interior_EventScript_Sign::
end end
SouthernIsland_Interior_EventScript_SetLatiosBattleVars:: SouthernIsland_Interior_EventScript_SetLatiosBattleVars::
setvar VAR_0x8004, SPECIES_LATIOS seteventmon SPECIES_LATIOS, 50, ITEM_SOUL_DEW
setvar VAR_0x8005, 50 @ level
setvar VAR_0x8006, ITEM_SOUL_DEW
special CreateEventLegalEnemyMon
return return
SouthernIsland_Interior_EventScript_SetLatiasBattleVars:: SouthernIsland_Interior_EventScript_SetLatiasBattleVars::
setvar VAR_0x8004, SPECIES_LATIAS seteventmon SPECIES_LATIAS, 50, ITEM_SOUL_DEW
setvar VAR_0x8005, 50 @ level
setvar VAR_0x8006, ITEM_SOUL_DEW
special CreateEventLegalEnemyMon
return return
SouthernIsland_Interior_Movement_CameraPanUp: SouthernIsland_Interior_Movement_CameraPanUp: