diff --git a/asm/macros/event.inc b/asm/macros/event.inc index e3c47c04ea..7529edc55a 100644 --- a/asm/macros/event.inc +++ b/asm/macros/event.inc @@ -2367,3 +2367,11 @@ setvar VAR_TEMP_1, \species special SetCaughtMon .endm + + @ Changes the caught ball of a selected Pokémon + .macro setmonball ballId:req + special ChoosePartyMon + waitstate + setvar VAR_TEMP_1, \ballId + special SetMonBall + .endm diff --git a/data/specials.inc b/data/specials.inc index 8f17fd8e55..67e82c0e18 100644 --- a/data/specials.inc +++ b/data/specials.inc @@ -560,3 +560,4 @@ gSpecials:: def_special GetCaughtMon def_special SetSeenMon def_special SetCaughtMon + def_special SetMonBall diff --git a/src/field_specials.c b/src/field_specials.c index 64330d2e6d..a574083ae4 100644 --- a/src/field_specials.c +++ b/src/field_specials.c @@ -4332,3 +4332,8 @@ void SetCaughtMon(void) GetSetPokedexFlag(SpeciesToNationalPokedexNum(VarGet(VAR_TEMP_1)), FLAG_SET_CAUGHT); } +void SetMonBall(void) +{ + u16 ballId = VarGet(VAR_TEMP_1); + SetMonData(&gPlayerParty[gSpecialVar_0x8004], MON_DATA_POKEBALL, &ballId); +}