diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/constants/item_effects.h | 79 | ||||
-rw-r--r-- | include/constants/items.h | 2 |
2 files changed, 80 insertions, 1 deletions
diff --git a/include/constants/item_effects.h b/include/constants/item_effects.h new file mode 100644 index 000000000..a5bb77035 --- /dev/null +++ b/include/constants/item_effects.h @@ -0,0 +1,79 @@ +#ifndef GUARD_CONSTANTS_ITEM_EFFECTS_H +#define GUARD_CONSTANTS_ITEM_EFFECTS_H + +// field 0 masks +#define ITEM0_X_ATTACK 0x0F +#define ITEM0_HIGH_CRIT 0x30 // For Dire Hit, works the same way as move Focus Energy. +#define ITEM0_SACRED_ASH 0x40 +#define ITEM0_INFATUATION 0x80 + +// field 1 masks +#define ITEM1_X_SPEED 0x0F +#define ITEM1_X_DEFEND 0xF0 + +// field 2 masks +#define ITEM2_X_SPATK 0x0F +#define ITEM2_X_ACCURACY 0xF0 + +// field 3 masks +#define ITEM3_CONFUSION 0x1 +#define ITEM3_PARALYSIS 0x2 +#define ITEM3_FREEZE 0x4 +#define ITEM3_BURN 0x8 +#define ITEM3_POISON 0x10 +#define ITEM3_SLEEP 0x20 +#define ITEM3_LEVEL_UP 0x40 +#define ITEM3_MIST 0x80 // For Guard Specs, works the same way as move Mist. + +#define ITEM3_STATUS_ALL (ITEM3_CONFUSION | ITEM3_PARALYSIS | ITEM3_FREEZE | ITEM3_BURN | ITEM3_POISON | ITEM3_SLEEP) + +// field 4 masks +#define ITEM4_EV_HP 0x1 +#define ITEM4_EV_ATK 0x2 +#define ITEM4_HEAL_HP 0x4 +#define ITEM4_HEAL_PP_ALL 0x8 +#define ITEM4_HEAL_PP_ONE 0x10 +#define ITEM4_PP_UP 0x20 +#define ITEM4_REVIVE 0x40 +#define ITEM4_EVO_STONE 0x80 + +// field 5 masks +#define ITEM5_EV_DEF 0x1 +#define ITEM5_EV_SPEED 0x2 +#define ITEM5_EV_SPDEF 0x4 +#define ITEM5_EV_SPATK 0x8 +#define ITEM5_PP_MAX 0x10 +#define ITEM5_FRIENDSHIP_LOW 0x20 +#define ITEM5_FRIENDSHIP_MID 0x40 +#define ITEM5_FRIENDSHIP_HIGH 0x80 + +#define ITEM5_FRIENDSHIP_ALL (ITEM5_FRIENDSHIP_LOW | ITEM5_FRIENDSHIP_MID | ITEM5_FRIENDSHIP_HIGH) + +// fields 6 and onwards are item-specific arguments + +// Used for GetItemEffectType. +#define ITEM_EFFECT_X_ITEM 0 +#define ITEM_EFFECT_RAISE_LEVEL 1 +#define ITEM_EFFECT_HEAL_HP 2 +#define ITEM_EFFECT_CURE_POISON 3 +#define ITEM_EFFECT_CURE_SLEEP 4 +#define ITEM_EFFECT_CURE_BURN 5 +#define ITEM_EFFECT_CURE_FREEZE 6 +#define ITEM_EFFECT_CURE_PARALYSIS 7 +#define ITEM_EFFECT_CURE_CONFUSION 8 +#define ITEM_EFFECT_CURE_INFATUATION 9 +#define ITEM_EFFECT_SACRED_ASH 10 +#define ITEM_EFFECT_CURE_ALL_STATUS 11 +#define ITEM_EFFECT_ATK_EV 12 +#define ITEM_EFFECT_HP_EV 13 +#define ITEM_EFFECT_SPATK_EV 14 +#define ITEM_EFFECT_SPDEF_EV 15 +#define ITEM_EFFECT_SPEED_EV 16 +#define ITEM_EFFECT_DEF_EV 17 +#define ITEM_EFFECT_EVO_STONE 18 +#define ITEM_EFFECT_PP_UP 19 +#define ITEM_EFFECT_PP_MAX 20 +#define ITEM_EFFECT_HEAL_PP 21 +#define ITEM_EFFECT_NONE 22 + +#endif // GUARD_CONSTANTS_ITEM_EFFECTS_H diff --git a/include/constants/items.h b/include/constants/items.h index 294499c8b..3a894f8ff 100644 --- a/include/constants/items.h +++ b/include/constants/items.h @@ -473,6 +473,6 @@ #define NUM_HIDDEN_MACHINES 8 // Check if the item is one that can be used on a Pokemon. -#define IS_POKEMON_ITEM(item) ((item) >= ITEM_POTION && (item) <= ITEM_0B2) +#define ITEM_HAS_EFFECT(item) ((item) >= ITEM_POTION && (item) <= ITEM_0B2) #endif // GUARD_CONSTANTS_ITEMS_H |