summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGriffinR <griffin.g.richards@gmail.com>2022-01-11 02:08:14 -0500
committerGriffinR <griffin.g.richards@gmail.com>2022-01-11 02:08:14 -0500
commit110fbc559cc658179e127117c68d9eea9474a61a (patch)
treefaa94232eae8ce54a79993ebf237da6faa85964a
parentce55e58ad83e57b7e1fde7eeb3c3c94365fe0f12 (diff)
Make item optional for givemon and setwildbattle
-rw-r--r--asm/macros/event.inc4
-rw-r--r--data/maps/AncientTomb/scripts.inc2
-rw-r--r--data/maps/AquaHideout_B1F/scripts.inc4
-rw-r--r--data/maps/BattleFrontier_OutsideEast/scripts.inc2
-rw-r--r--data/maps/DesertRuins/scripts.inc2
-rw-r--r--data/maps/IslandCave/scripts.inc2
-rw-r--r--data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc6
-rw-r--r--data/maps/MarineCave_End/scripts.inc2
-rw-r--r--data/maps/MossdeepCity_StevensHouse/scripts.inc2
-rw-r--r--data/maps/NewMauville_Inside/scripts.inc6
-rw-r--r--data/maps/Route120/scripts.inc2
-rw-r--r--data/maps/RustboroCity_DevonCorp_2F/scripts.inc4
-rw-r--r--data/maps/SkyPillar_Top/scripts.inc2
-rw-r--r--data/maps/TerraCave_End/scripts.inc2
-rw-r--r--data/scripts/kecleon.inc2
15 files changed, 22 insertions, 22 deletions
diff --git a/asm/macros/event.inc b/asm/macros/event.inc
index 8d65f602d..d85cfb975 100644
--- a/asm/macros/event.inc
+++ b/asm/macros/event.inc
@@ -986,7 +986,7 @@
@ Gives the player a Pokémon of the specified species and level, holding the specified item. The trailing 0s are unused parameters.
@ VAR_RESULT will be set to MON_GIVEN_TO_PARTY, MON_GIVEN_TO_PC, or MON_CANT_GIVE depending on the outcome.
- .macro givemon species:req, level:req, item:req
+ .macro givemon species:req, level:req, item=ITEM_NONE
.byte 0x79
.2byte \species
.byte \level
@@ -1432,7 +1432,7 @@
@ Prepares to start a wild battle against a 'species' at 'level' holding 'item'. Running this command will not affect
@ normal wild battles. You start the prepared battle with dowildbattle.
- .macro setwildbattle species:req, level:req, item:req
+ .macro setwildbattle species:req, level:req, item=ITEM_NONE
.byte 0xb6
.2byte \species
.byte \level
diff --git a/data/maps/AncientTomb/scripts.inc b/data/maps/AncientTomb/scripts.inc
index d28ac7bc3..dd2235955 100644
--- a/data/maps/AncientTomb/scripts.inc
+++ b/data/maps/AncientTomb/scripts.inc
@@ -61,7 +61,7 @@ AncientTomb_EventScript_Registeel::
playmoncry SPECIES_REGISTEEL, CRY_MODE_ENCOUNTER
delay 40
waitmoncry
- setwildbattle SPECIES_REGISTEEL, 40, ITEM_NONE
+ setwildbattle SPECIES_REGISTEEL, 40
setflag FLAG_SYS_CTRL_OBJ_DELETE
special StartRegiBattle
waitstate
diff --git a/data/maps/AquaHideout_B1F/scripts.inc b/data/maps/AquaHideout_B1F/scripts.inc
index 4f2eb836f..f644f6ae5 100644
--- a/data/maps/AquaHideout_B1F/scripts.inc
+++ b/data/maps/AquaHideout_B1F/scripts.inc
@@ -29,7 +29,7 @@ AquaHideout_B1F_EventScript_ShowElectrode2::
AquaHideout_B1F_EventScript_Electrode1::
lock
faceplayer
- setwildbattle SPECIES_ELECTRODE, 30, ITEM_NONE
+ setwildbattle SPECIES_ELECTRODE, 30
waitse
playmoncry SPECIES_ELECTRODE, CRY_MODE_ENCOUNTER
delay 40
@@ -53,7 +53,7 @@ AquaHideout_B1F_EventScript_DefeatedElectrode1::
AquaHideout_B1F_EventScript_Electrode2::
lock
faceplayer
- setwildbattle SPECIES_ELECTRODE, 30, ITEM_NONE
+ setwildbattle SPECIES_ELECTRODE, 30
waitse
playmoncry SPECIES_ELECTRODE, CRY_MODE_ENCOUNTER
delay 40
diff --git a/data/maps/BattleFrontier_OutsideEast/scripts.inc b/data/maps/BattleFrontier_OutsideEast/scripts.inc
index f34373480..e8eec6f16 100644
--- a/data/maps/BattleFrontier_OutsideEast/scripts.inc
+++ b/data/maps/BattleFrontier_OutsideEast/scripts.inc
@@ -129,7 +129,7 @@ BattleFrontier_OutsideEast_EventScript_WaterSudowoodo::
delay 40
waitmoncry
setvar VAR_LAST_TALKED, LOCALID_SUDOWOODO
- setwildbattle SPECIES_SUDOWOODO, 40, ITEM_NONE
+ setwildbattle SPECIES_SUDOWOODO, 40
setflag FLAG_SYS_CTRL_OBJ_DELETE
dowildbattle
clearflag FLAG_SYS_CTRL_OBJ_DELETE
diff --git a/data/maps/DesertRuins/scripts.inc b/data/maps/DesertRuins/scripts.inc
index 2aaa61ebb..21473e87a 100644
--- a/data/maps/DesertRuins/scripts.inc
+++ b/data/maps/DesertRuins/scripts.inc
@@ -61,7 +61,7 @@ DesertRuins_EventScript_Regirock::
playmoncry SPECIES_REGIROCK, CRY_MODE_ENCOUNTER
delay 40
waitmoncry
- setwildbattle SPECIES_REGIROCK, 40, ITEM_NONE
+ setwildbattle SPECIES_REGIROCK, 40
setflag FLAG_SYS_CTRL_OBJ_DELETE
special StartRegiBattle
waitstate
diff --git a/data/maps/IslandCave/scripts.inc b/data/maps/IslandCave/scripts.inc
index 8f8236a5c..d15802aaa 100644
--- a/data/maps/IslandCave/scripts.inc
+++ b/data/maps/IslandCave/scripts.inc
@@ -94,7 +94,7 @@ IslandCave_EventScript_Regice::
playmoncry SPECIES_REGICE, CRY_MODE_ENCOUNTER
delay 40
waitmoncry
- setwildbattle SPECIES_REGICE, 40, ITEM_NONE
+ setwildbattle SPECIES_REGICE, 40
setflag FLAG_SYS_CTRL_OBJ_DELETE
special StartRegiBattle
waitstate
diff --git a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc
index 7c7f47d2e..d645db440 100644
--- a/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc
+++ b/data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc
@@ -340,7 +340,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_TakeYourTime::
LittlerootTown_ProfessorBirchsLab_EventScript_GiveCyndaquil::
bufferspeciesname STR_VAR_1, SPECIES_CYNDAQUIL
setvar VAR_TEMP_1, SPECIES_CYNDAQUIL
- givemon SPECIES_CYNDAQUIL, 5, ITEM_NONE
+ givemon SPECIES_CYNDAQUIL, 5
goto_if_eq VAR_RESULT, 0, LittlerootTown_ProfessorBirchsLab_EventScript_SendCyndaquilToParty
goto_if_eq VAR_RESULT, 1, LittlerootTown_ProfessorBirchsLab_EventScript_SendCyndaquilToPC
hidemonpic
@@ -381,7 +381,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedCyndaquil::
LittlerootTown_ProfessorBirchsLab_EventScript_GiveTotodile::
bufferspeciesname STR_VAR_1, SPECIES_TOTODILE
setvar VAR_TEMP_1, SPECIES_TOTODILE
- givemon SPECIES_TOTODILE, 5, ITEM_NONE
+ givemon SPECIES_TOTODILE, 5
goto_if_eq VAR_RESULT, 0, LittlerootTown_ProfessorBirchsLab_EventScript_SendTotodileToParty
goto_if_eq VAR_RESULT, 1, LittlerootTown_ProfessorBirchsLab_EventScript_SendTotodileToPC
hidemonpic
@@ -422,7 +422,7 @@ LittlerootTown_ProfessorBirchsLab_EventScript_ReceivedTotodile::
LittlerootTown_ProfessorBirchsLab_EventScript_GiveChikorita::
bufferspeciesname STR_VAR_1, SPECIES_CHIKORITA
setvar VAR_TEMP_1, SPECIES_CHIKORITA
- givemon SPECIES_CHIKORITA, 5, ITEM_NONE
+ givemon SPECIES_CHIKORITA, 5
goto_if_eq VAR_RESULT, 0, LittlerootTown_ProfessorBirchsLab_EventScript_SendChikoritaToParty
goto_if_eq VAR_RESULT, 1, LittlerootTown_ProfessorBirchsLab_EventScript_SendChikoritaToPC
hidemonpic
diff --git a/data/maps/MarineCave_End/scripts.inc b/data/maps/MarineCave_End/scripts.inc
index 1d988a444..a7ff58369 100644
--- a/data/maps/MarineCave_End/scripts.inc
+++ b/data/maps/MarineCave_End/scripts.inc
@@ -35,7 +35,7 @@ MarineCave_End_EventScript_Kyogre::
delay 40
waitmoncry
setvar VAR_LAST_TALKED, LOCALID_KYOGRE
- setwildbattle SPECIES_KYOGRE, 70, ITEM_NONE
+ setwildbattle SPECIES_KYOGRE, 70
setflag FLAG_SYS_CTRL_OBJ_DELETE
special BattleSetup_StartLegendaryBattle
waitstate
diff --git a/data/maps/MossdeepCity_StevensHouse/scripts.inc b/data/maps/MossdeepCity_StevensHouse/scripts.inc
index aac12ec2a..00814ce19 100644
--- a/data/maps/MossdeepCity_StevensHouse/scripts.inc
+++ b/data/maps/MossdeepCity_StevensHouse/scripts.inc
@@ -86,7 +86,7 @@ MossdeepCity_StevensHouse_EventScript_LeaveBeldum::
MossdeepCity_StevensHouse_EventScript_GiveBeldum::
setvar VAR_TEMP_1, SPECIES_BELDUM
- givemon SPECIES_BELDUM, 5, ITEM_NONE
+ givemon SPECIES_BELDUM, 5
goto_if_eq VAR_RESULT, 0, MossdeepCity_StevensHouse_EventScript_SendBeldumParty
goto_if_eq VAR_RESULT, 1, MossdeepCity_StevensHouse_EventScript_SendBeldumPC
goto Common_EventScript_NoMoreRoomForPokemon
diff --git a/data/maps/NewMauville_Inside/scripts.inc b/data/maps/NewMauville_Inside/scripts.inc
index 51748380a..244eea436 100644
--- a/data/maps/NewMauville_Inside/scripts.inc
+++ b/data/maps/NewMauville_Inside/scripts.inc
@@ -176,7 +176,7 @@ NewMauville_Inside_EventScript_GeneratorOff::
NewMauville_Inside_EventScript_Voltorb1::
lock
faceplayer
- setwildbattle SPECIES_VOLTORB, 25, ITEM_NONE
+ setwildbattle SPECIES_VOLTORB, 25
waitse
playmoncry SPECIES_VOLTORB, CRY_MODE_ENCOUNTER
delay 40
@@ -200,7 +200,7 @@ NewMauville_Inside_EventScript_DefeatedVoltorb1::
NewMauville_Inside_EventScript_Voltorb2::
lock
faceplayer
- setwildbattle SPECIES_VOLTORB, 25, ITEM_NONE
+ setwildbattle SPECIES_VOLTORB, 25
waitse
playmoncry SPECIES_VOLTORB, CRY_MODE_ENCOUNTER
delay 40
@@ -224,7 +224,7 @@ NewMauville_Inside_EventScript_DefeatedVoltorb2::
NewMauville_Inside_EventScript_Voltorb3::
lock
faceplayer
- setwildbattle SPECIES_VOLTORB, 25, ITEM_NONE
+ setwildbattle SPECIES_VOLTORB, 25
waitse
playmoncry SPECIES_VOLTORB, CRY_MODE_ENCOUNTER
delay 40
diff --git a/data/maps/Route120/scripts.inc b/data/maps/Route120/scripts.inc
index baf721a5c..a0bfbc60c 100644
--- a/data/maps/Route120/scripts.inc
+++ b/data/maps/Route120/scripts.inc
@@ -193,7 +193,7 @@ Route120_EventScript_StevenBattleKecleon::
playmoncry SPECIES_KECLEON, CRY_MODE_ENCOUNTER
delay 40
waitmoncry
- setwildbattle SPECIES_KECLEON, 30, ITEM_NONE
+ setwildbattle SPECIES_KECLEON, 30
setvar VAR_0x8009, 0
setflag FLAG_SYS_CTRL_OBJ_DELETE
dowildbattle
diff --git a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc
index 987828a29..a85cbc8be 100644
--- a/data/maps/RustboroCity_DevonCorp_2F/scripts.inc
+++ b/data/maps/RustboroCity_DevonCorp_2F/scripts.inc
@@ -145,7 +145,7 @@ RustboroCity_DevonCorp_2F_EventScript_AnorithReady::
RustboroCity_DevonCorp_2F_EventScript_ReceiveLileep::
setvar VAR_TEMP_1, SPECIES_LILEEP
- givemon SPECIES_LILEEP, 20, ITEM_NONE
+ givemon SPECIES_LILEEP, 20
goto_if_eq VAR_RESULT, 0, RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepParty
goto_if_eq VAR_RESULT, 1, RustboroCity_DevonCorp_2F_EventScript_ReceiveLileepPC
goto Common_EventScript_NoMoreRoomForPokemon
@@ -190,7 +190,7 @@ RustboroCity_DevonCorp_2F_EventScript_FinishReceivingLileep::
RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorith::
setvar VAR_TEMP_1, SPECIES_ANORITH
- givemon SPECIES_ANORITH, 20, ITEM_NONE
+ givemon SPECIES_ANORITH, 20
goto_if_eq VAR_RESULT, 0, RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithParty
goto_if_eq VAR_RESULT, 1, RustboroCity_DevonCorp_2F_EventScript_ReceiveAnorithPC
goto Common_EventScript_NoMoreRoomForPokemon
diff --git a/data/maps/SkyPillar_Top/scripts.inc b/data/maps/SkyPillar_Top/scripts.inc
index 5c71bbe4b..7b65d9e25 100644
--- a/data/maps/SkyPillar_Top/scripts.inc
+++ b/data/maps/SkyPillar_Top/scripts.inc
@@ -48,7 +48,7 @@ SkyPillar_Top_EventScript_Rayquaza::
playmoncry SPECIES_RAYQUAZA, CRY_MODE_ENCOUNTER
delay 40
waitmoncry
- setwildbattle SPECIES_RAYQUAZA, 70, ITEM_NONE
+ setwildbattle SPECIES_RAYQUAZA, 70
setflag FLAG_SYS_CTRL_OBJ_DELETE
special BattleSetup_StartLegendaryBattle
waitstate
diff --git a/data/maps/TerraCave_End/scripts.inc b/data/maps/TerraCave_End/scripts.inc
index 5f0051bec..8b2732d45 100644
--- a/data/maps/TerraCave_End/scripts.inc
+++ b/data/maps/TerraCave_End/scripts.inc
@@ -35,7 +35,7 @@ TerraCave_End_EventScript_Groudon::
delay 40
waitmoncry
setvar VAR_LAST_TALKED, LOCALID_GROUDON
- setwildbattle SPECIES_GROUDON, 70, ITEM_NONE
+ setwildbattle SPECIES_GROUDON, 70
setflag FLAG_SYS_CTRL_OBJ_DELETE
special BattleSetup_StartLegendaryBattle
waitstate
diff --git a/data/scripts/kecleon.inc b/data/scripts/kecleon.inc
index f51dc2fbd..634551902 100644
--- a/data/scripts/kecleon.inc
+++ b/data/scripts/kecleon.inc
@@ -71,7 +71,7 @@ EventScript_BattleKecleon::
playmoncry SPECIES_KECLEON, CRY_MODE_ENCOUNTER
delay 40
waitmoncry
- setwildbattle SPECIES_KECLEON, 30, ITEM_NONE
+ setwildbattle SPECIES_KECLEON, 30
setflag FLAG_SYS_CTRL_OBJ_DELETE
dowildbattle
clearflag FLAG_SYS_CTRL_OBJ_DELETE