summaryrefslogtreecommitdiff
path: root/arm9/src/pokemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'arm9/src/pokemon.c')
-rw-r--r--arm9/src/pokemon.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/arm9/src/pokemon.c b/arm9/src/pokemon.c
index a15d20c1..39739474 100644
--- a/arm9/src/pokemon.c
+++ b/arm9/src/pokemon.c
@@ -972,7 +972,7 @@ u32 GetBoxMonDataInternal(struct BoxPokemon * boxmon, int attr, void * dest)
case MON_DATA_TYPE_1:
case MON_DATA_TYPE_2:
if (blockA->species == SPECIES_ARCEUS && blockA->ability == ABILITY_MULTITYPE)
- ret = (u32)GetArceusTypeByHeldItemEffect((u16)FUN_0206E7B8(blockA->heldItem, 1, 0));
+ ret = (u32)GetArceusTypeByHeldItemEffect((u16)GetItemAttr(blockA->heldItem, 1, 0));
else
{
ret = (u32)GetMonBaseStat_HandleFormeConversion(blockA->species, blockB->alternateForm, (enum BaseStat)(attr - MON_DATA_TYPE_1 + BASE_TYPE1));
@@ -2060,7 +2060,7 @@ void MonApplyFriendshipMod(struct Pokemon * pokemon, u32 kind, u32 location)
if (species == SPECIES_NONE || species == SPECIES_EGG)
return;
- effect = (u8)FUN_0206E7B8((u16)GetMonData(pokemon, MON_DATA_HELD_ITEM, NULL), 1, 0);
+ effect = (u8)GetItemAttr((u16)GetMonData(pokemon, MON_DATA_HELD_ITEM, NULL), 1, 0);
r4 = 0;
friendship = (s16)GetMonData(pokemon, MON_DATA_FRIENDSHIP, NULL);
if (friendship >= 100)
@@ -2514,7 +2514,7 @@ u16 GetMonEvolution(struct PlayerParty * party, struct Pokemon * pokemon, u32 co
personality = GetMonData(pokemon, MON_DATA_PERSONALITY, NULL);
beauty = (u8)GetMonData(pokemon, MON_DATA_BEAUTY, NULL);
pid_hi = (u16)((personality & 0xFFFF0000) >> 16);
- r1 = (u8)FUN_0206E7B8(heldItem, 1, 0);
+ r1 = (u8)GetItemAttr(heldItem, 1, 0);
if (species != SPECIES_KADABRA && r1 == 0x3F && context != 3)
return SPECIES_NONE;
if (method_ret == NULL)
@@ -3248,7 +3248,7 @@ void FUN_02069ECC(struct BoxPokemon * boxmon)
u32 forme;
if (species == SPECIES_ARCEUS && ability == ABILITY_MULTITYPE)
{
- forme = GetArceusTypeByHeldItemEffect((u16)FUN_0206E7B8((u16)heldItem, 1, 0));
+ forme = GetArceusTypeByHeldItemEffect((u16)GetItemAttr((u16)heldItem, 1, 0));
SetBoxMonData(boxmon, MON_DATA_FORME, &forme);
}
}
@@ -3257,37 +3257,37 @@ u32 GetArceusTypeByHeldItemEffect(u16 heldEffect)
{
switch (heldEffect)
{
- case 0x7D:
+ case HOLD_EFFECT_ARCEUS_FIRE:
return TYPE_FIRE;
- case 0x7E:
+ case HOLD_EFFECT_ARCEUS_WATER:
return TYPE_WATER;
- case 0x7F:
+ case HOLD_EFFECT_ARCEUS_ELECTRIC:
return TYPE_ELECTRIC;
- case 0x80:
+ case HOLD_EFFECT_ARCEUS_GRASS:
return TYPE_GRASS;
- case 0x81:
+ case HOLD_EFFECT_ARCEUS_ICE:
return TYPE_ICE;
- case 0x82:
+ case HOLD_EFFECT_ARCEUS_FIGHT:
return TYPE_FIGHTING;
- case 0x83:
+ case HOLD_EFFECT_ARCEUS_POISON:
return TYPE_POISON;
- case 0x84:
+ case HOLD_EFFECT_ARCEUS_GROUND:
return TYPE_GROUND;
- case 0x85:
+ case HOLD_EFFECT_ARCEUS_FLYING:
return TYPE_FLYING;
- case 0x86:
+ case HOLD_EFFECT_ARCEUS_PSYCHIC:
return TYPE_PSYCHIC;
- case 0x87:
+ case HOLD_EFFECT_ARCEUS_BUG:
return TYPE_BUG;
- case 0x88:
+ case HOLD_EFFECT_ARCEUS_ROCK:
return TYPE_ROCK;
- case 0x89:
+ case HOLD_EFFECT_ARCEUS_GHOST:
return TYPE_GHOST;
- case 0x8A:
+ case HOLD_EFFECT_ARCEUS_DRAGON:
return TYPE_DRAGON;
- case 0x8B:
+ case HOLD_EFFECT_ARCEUS_DARK:
return TYPE_DARK;
- case 0x8C:
+ case HOLD_EFFECT_ARCEUS_STEEL:
return TYPE_STEEL;
default:
return TYPE_NORMAL;