Added setmonball

This commit is contained in:
pkmnsnfrn 2024-08-11 18:53:39 -07:00
parent fba1452c3b
commit e746334e1e
3 changed files with 14 additions and 0 deletions

View file

@ -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

View file

@ -560,3 +560,4 @@ gSpecials::
def_special GetCaughtMon
def_special SetSeenMon
def_special SetCaughtMon
def_special SetMonBall

View file

@ -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);
}