2018-02-08 11:17:41 +01:00
# ifndef GUARD_CONSTANTS_POKEMON_H
# define GUARD_CONSTANTS_POKEMON_H
// Pokemon types
2019-09-17 21:24:44 +02:00
# define TYPE_NONE 255
# define TYPE_NORMAL 0
# define TYPE_FIGHTING 1
# define TYPE_FLYING 2
# define TYPE_POISON 3
# define TYPE_GROUND 4
# define TYPE_ROCK 5
# define TYPE_BUG 6
# define TYPE_GHOST 7
# define TYPE_STEEL 8
# define TYPE_MYSTERY 9
# define TYPE_FIRE 10
# define TYPE_WATER 11
# define TYPE_GRASS 12
# define TYPE_ELECTRIC 13
# define TYPE_PSYCHIC 14
# define TYPE_ICE 15
# define TYPE_DRAGON 16
# define TYPE_DARK 17
2019-10-06 15:57:33 +02:00
# define TYPE_FAIRY 18
# define NUMBER_OF_MON_TYPES 19
2018-12-05 16:09:19 +01:00
2018-02-08 11:17:41 +01:00
// Pokemon egg groups
2019-09-17 21:24:44 +02:00
# define EGG_GROUP_NONE 0
# define EGG_GROUP_MONSTER 1
# define EGG_GROUP_WATER_1 2
# define EGG_GROUP_BUG 3
# define EGG_GROUP_FLYING 4
# define EGG_GROUP_FIELD 5
# define EGG_GROUP_FAIRY 6
# define EGG_GROUP_GRASS 7
# define EGG_GROUP_HUMAN_LIKE 8
# define EGG_GROUP_WATER_3 9
# define EGG_GROUP_MINERAL 10
# define EGG_GROUP_AMORPHOUS 11
# define EGG_GROUP_WATER_2 12
# define EGG_GROUP_DITTO 13
# define EGG_GROUP_DRAGON 14
# define EGG_GROUP_UNDISCOVERED 15
2018-02-08 11:17:41 +01:00
2019-09-25 20:48:22 +02:00
# define EGG_GROUPS_PER_MON 2
2018-02-08 11:17:41 +01:00
// Pokemon natures
2019-09-17 21:24:44 +02:00
# define NATURE_HARDY 0
# define NATURE_LONELY 1
# define NATURE_BRAVE 2
# define NATURE_ADAMANT 3
# define NATURE_NAUGHTY 4
# define NATURE_BOLD 5
# define NATURE_DOCILE 6
# define NATURE_RELAXED 7
# define NATURE_IMPISH 8
# define NATURE_LAX 9
# define NATURE_TIMID 10
# define NATURE_HASTY 11
# define NATURE_SERIOUS 12
# define NATURE_JOLLY 13
# define NATURE_NAIVE 14
# define NATURE_MODEST 15
# define NATURE_MILD 16
# define NATURE_QUIET 17
# define NATURE_BASHFUL 18
# define NATURE_RASH 19
# define NATURE_CALM 20
# define NATURE_GENTLE 21
# define NATURE_SASSY 22
# define NATURE_CAREFUL 23
# define NATURE_QUIRKY 24
2020-07-17 02:12:12 +02:00
# define NUM_NATURES 25
2018-02-08 11:17:41 +01:00
// Pokemon Stats
2019-09-17 21:24:44 +02:00
# define STAT_HP 0
# define STAT_ATK 1
# define STAT_DEF 2
# define STAT_SPEED 3
# define STAT_SPATK 4
# define STAT_SPDEF 5
2021-12-29 00:07:41 +01:00
# define NUM_STATS 6
2019-09-17 21:24:44 +02:00
# define STAT_ACC 6 // Only in battles.
2018-11-18 20:00:36 +01:00
# define STAT_EVASION 7 // Only in battles.
2021-12-29 00:07:41 +01:00
# define NUM_NATURE_STATS (NUM_STATS - 1) // excludes HP
# define NUM_BATTLE_STATS (NUM_STATS + 2) // includes Accuracy and Evasion
2018-02-08 11:17:41 +01:00
2020-08-05 02:33:05 +02:00
# define MIN_STAT_STAGE 0
# define DEFAULT_STAT_STAGE 6
# define MAX_STAT_STAGE 12
2019-07-11 20:16:39 +02:00
// Shiny odds
# define SHINY_ODDS 8 // Actual probability is SHINY_ODDS/65536
2019-09-17 21:53:30 +02:00
// Flags for Get(Box)MonData / Set(Box)MonData
2019-09-17 21:24:44 +02:00
# define MON_DATA_PERSONALITY 0
# define MON_DATA_OT_ID 1
# define MON_DATA_NICKNAME 2
# define MON_DATA_LANGUAGE 3
# define MON_DATA_SANITY_IS_BAD_EGG 4
# define MON_DATA_SANITY_HAS_SPECIES 5
# define MON_DATA_SANITY_IS_EGG 6
# define MON_DATA_OT_NAME 7
# define MON_DATA_MARKINGS 8
# define MON_DATA_CHECKSUM 9
# define MON_DATA_ENCRYPT_SEPARATOR 10
# define MON_DATA_SPECIES 11
# define MON_DATA_HELD_ITEM 12
# define MON_DATA_MOVE1 13
# define MON_DATA_MOVE2 14
# define MON_DATA_MOVE3 15
# define MON_DATA_MOVE4 16
# define MON_DATA_PP1 17
# define MON_DATA_PP2 18
# define MON_DATA_PP3 19
# define MON_DATA_PP4 20
# define MON_DATA_PP_BONUSES 21
# define MON_DATA_COOL 22
# define MON_DATA_BEAUTY 23
# define MON_DATA_CUTE 24
# define MON_DATA_EXP 25
# define MON_DATA_HP_EV 26
# define MON_DATA_ATK_EV 27
# define MON_DATA_DEF_EV 28
# define MON_DATA_SPEED_EV 29
# define MON_DATA_SPATK_EV 30
# define MON_DATA_SPDEF_EV 31
# define MON_DATA_FRIENDSHIP 32
# define MON_DATA_SMART 33
# define MON_DATA_POKERUS 34
# define MON_DATA_MET_LOCATION 35
# define MON_DATA_MET_LEVEL 36
# define MON_DATA_MET_GAME 37
# define MON_DATA_POKEBALL 38
# define MON_DATA_HP_IV 39
# define MON_DATA_ATK_IV 40
# define MON_DATA_DEF_IV 41
# define MON_DATA_SPEED_IV 42
# define MON_DATA_SPATK_IV 43
# define MON_DATA_SPDEF_IV 44
# define MON_DATA_IS_EGG 45
# define MON_DATA_ABILITY_NUM 46
# define MON_DATA_TOUGH 47
# define MON_DATA_SHEEN 48
# define MON_DATA_OT_GENDER 49
# define MON_DATA_COOL_RIBBON 50
# define MON_DATA_BEAUTY_RIBBON 51
# define MON_DATA_CUTE_RIBBON 52
# define MON_DATA_SMART_RIBBON 53
# define MON_DATA_TOUGH_RIBBON 54
# define MON_DATA_STATUS 55
# define MON_DATA_LEVEL 56
# define MON_DATA_HP 57
# define MON_DATA_MAX_HP 58
# define MON_DATA_ATK 59
# define MON_DATA_DEF 60
# define MON_DATA_SPEED 61
# define MON_DATA_SPATK 62
# define MON_DATA_SPDEF 63
# define MON_DATA_MAIL 64
# define MON_DATA_SPECIES2 65
# define MON_DATA_IVS 66
# define MON_DATA_CHAMPION_RIBBON 67
# define MON_DATA_WINNING_RIBBON 68
# define MON_DATA_VICTORY_RIBBON 69
# define MON_DATA_ARTIST_RIBBON 70
# define MON_DATA_EFFORT_RIBBON 71
2021-02-15 17:40:16 +01:00
# define MON_DATA_MARINE_RIBBON 72
2021-02-15 20:54:35 +01:00
# define MON_DATA_LAND_RIBBON 73
# define MON_DATA_SKY_RIBBON 74
# define MON_DATA_COUNTRY_RIBBON 75
# define MON_DATA_NATIONAL_RIBBON 76
# define MON_DATA_EARTH_RIBBON 77
# define MON_DATA_WORLD_RIBBON 78
2021-02-17 20:11:45 +01:00
# define MON_DATA_UNUSED_RIBBONS 79
2021-02-15 20:54:35 +01:00
# define MON_DATA_EVENT_LEGAL 80
2019-09-17 21:24:44 +02:00
# define MON_DATA_KNOWN_MOVES 81
# define MON_DATA_RIBBON_COUNT 82
# define MON_DATA_RIBBONS 83
# define MON_DATA_ATK2 84
# define MON_DATA_DEF2 85
# define MON_DATA_SPEED2 86
# define MON_DATA_SPATK2 87
# define MON_DATA_SPDEF2 88
2021-02-18 15:59:24 +01:00
// Ribbon IDs used by TV and Pokénav
# define CHAMPION_RIBBON 0
# define COOL_RIBBON_NORMAL 1
# define COOL_RIBBON_SUPER 2
# define COOL_RIBBON_HYPER 3
# define COOL_RIBBON_MASTER 4
# define BEAUTY_RIBBON_NORMAL 5
# define BEAUTY_RIBBON_SUPER 6
# define BEAUTY_RIBBON_HYPER 7
# define BEAUTY_RIBBON_MASTER 8
# define CUTE_RIBBON_NORMAL 9
# define CUTE_RIBBON_SUPER 10
# define CUTE_RIBBON_HYPER 11
# define CUTE_RIBBON_MASTER 12
# define SMART_RIBBON_NORMAL 13
# define SMART_RIBBON_SUPER 14
# define SMART_RIBBON_HYPER 15
# define SMART_RIBBON_MASTER 16
# define TOUGH_RIBBON_NORMAL 17
# define TOUGH_RIBBON_SUPER 18
# define TOUGH_RIBBON_HYPER 19
# define TOUGH_RIBBON_MASTER 20
# define WINNING_RIBBON 21
# define VICTORY_RIBBON 22
# define ARTIST_RIBBON 23
# define EFFORT_RIBBON 24
# define MARINE_RIBBON 25
# define LAND_RIBBON 26
# define SKY_RIBBON 27
# define COUNTRY_RIBBON 28
# define NATIONAL_RIBBON 29
# define EARTH_RIBBON 30
# define WORLD_RIBBON 31
# define FIRST_GIFT_RIBBON MARINE_RIBBON
# define LAST_GIFT_RIBBON WORLD_RIBBON
# define NUM_GIFT_RIBBONS (1 + LAST_GIFT_RIBBON - FIRST_GIFT_RIBBON)
// The above gift ribbons (Marine - World) are
// special distribution ribbons that correspond to
// 1 bit each in the Pokémon struct. Gen 4 hard-codes
// each of these to the given name. In Gen 3 they're
// used to get an index into giftRibbons in the save block,
2021-08-25 00:59:32 +02:00
// which can have a value 0-64 (0 is 'no ribbon') that
2021-02-18 15:59:24 +01:00
// corresponds to one of the special ribbons listed
// in gGiftRibbonDescriptionPointers. Most of these were
// never distributed
# define MAX_GIFT_RIBBON 64
2019-10-01 00:14:35 +02:00
# define MIN_LEVEL 1
2019-09-17 21:24:44 +02:00
# define MAX_LEVEL 100
# define OT_ID_PLAYER_ID 0
# define OT_ID_PRESET 1
# define OT_ID_RANDOM_NO_SHINY 2
# define MON_GIVEN_TO_PARTY 0
# define MON_GIVEN_TO_PC 1
# define MON_CANT_GIVE 2
# define PLAYER_HAS_TWO_USABLE_MONS 0
# define PLAYER_HAS_ONE_MON 1
# define PLAYER_HAS_ONE_USABLE_MON 2
2019-10-18 01:22:03 +02:00
# define MON_ALREADY_KNOWS_MOVE 0xFFFE
# define MON_HAS_MAX_MOVES 0xFFFF
2019-11-15 00:56:18 +01:00
# define LEVEL_UP_MOVE_ID 0x01FF
# define LEVEL_UP_MOVE_LV 0xFE00
# define LEVEL_UP_END 0xFFFF
2020-08-28 20:36:07 +02:00
# define MAX_LEVEL_UP_MOVES 20
2019-09-17 21:24:44 +02:00
# define MON_MALE 0x00
# define MON_FEMALE 0xFE
# define MON_GENDERLESS 0xFF
2020-02-02 19:28:54 +01:00
// Constants for AdjustFriendship
# define FRIENDSHIP_EVENT_GROW_LEVEL 0
# define FRIENDSHIP_EVENT_VITAMIN 1 // unused, handled by PokemonUseItemEffects
# define FRIENDSHIP_EVENT_BATTLE_ITEM 2 // unused, handled by PokemonUseItemEffects
# define FRIENDSHIP_EVENT_LEAGUE_BATTLE 3
# define FRIENDSHIP_EVENT_LEARN_TMHM 4
# define FRIENDSHIP_EVENT_WALKING 5
# define FRIENDSHIP_EVENT_FAINT_SMALL 6
# define FRIENDSHIP_EVENT_FAINT_FIELD_PSN 7
# define FRIENDSHIP_EVENT_FAINT_LARGE 8 // If opponent was >= 30 levels higher. See AdjustFriendshipOnBattleFaint
2019-09-17 21:24:44 +02:00
2021-11-10 02:02:12 +01:00
# define MAX_FRIENDSHIP 255
# define MAX_SHEEN 255
# define MAX_CONDITION 255
2019-12-18 08:32:52 +01:00
2021-01-07 23:13:14 +01:00
# define MAX_PER_STAT_IVS 31
# define MAX_IV_MASK 31
# define USE_RANDOM_IVS (MAX_PER_STAT_IVS + 1)
2020-08-28 03:25:02 +02:00
# define MAX_PER_STAT_EVS 255
2019-09-17 21:24:44 +02:00
# define MAX_TOTAL_EVS 510
# define EV_ITEM_RAISE_LIMIT 100
2019-09-17 21:53:30 +02:00
// Battle move flags
2020-10-06 00:48:51 +02:00
# define FLAG_MAKES_CONTACT (1 << 0)
# define FLAG_PROTECT_AFFECTED (1 << 1)
2020-12-12 16:09:26 +01:00
# define FLAG_MAGIC_COAT_AFFECTED (1 << 2)
2020-10-06 00:48:51 +02:00
# define FLAG_SNATCH_AFFECTED (1 << 3)
# define FLAG_MIRROR_MOVE_AFFECTED (1 << 4)
2020-12-12 16:09:26 +01:00
# define FLAG_KINGS_ROCK_AFFECTED (1 << 5)
2019-09-17 21:53:30 +02:00
// Growth rates
# define GROWTH_MEDIUM_FAST 0
# define GROWTH_ERRATIC 1
# define GROWTH_FLUCTUATING 2
# define GROWTH_MEDIUM_SLOW 3
# define GROWTH_FAST 4
# define GROWTH_SLOW 5
// Body colors for pokedex search
# define BODY_COLOR_RED 0
# define BODY_COLOR_BLUE 1
# define BODY_COLOR_YELLOW 2
# define BODY_COLOR_GREEN 3
# define BODY_COLOR_BLACK 4
# define BODY_COLOR_BROWN 5
# define BODY_COLOR_PURPLE 6
# define BODY_COLOR_GRAY 7
# define BODY_COLOR_WHITE 8
# define BODY_COLOR_PINK 9
# define F_SUMMARY_SCREEN_FLIP_SPRITE 0x80
2020-10-06 00:48:51 +02:00
// Evolution types
2020-10-11 07:10:12 +02:00
# define EVO_MEGA_EVOLUTION 0xffff // Not an actual evolution, used to temporarily mega evolve in battle.
2020-11-11 19:18:39 +01:00
# define EVO_MOVE_MEGA_EVOLUTION 0xfffe // Mega Evolution that checks for a move instead of held item.
2021-10-09 06:55:36 +02:00
# define EVO_PRIMAL_REVERSION 0xfffd // Not an actual evolution, used to undergo primal reversion in battle.
2020-10-11 07:10:12 +02:00
# define EVO_FRIENDSHIP 1 // Pokémon levels up with friendship ≥ 220
# define EVO_FRIENDSHIP_DAY 2 // Pokémon levels up during the day with friendship ≥ 220
# define EVO_FRIENDSHIP_NIGHT 3 // Pokémon levels up at night with friendship ≥ 220
# define EVO_LEVEL 4 // Pokémon reaches the specified level
# define EVO_TRADE 5 // Pokémon is traded
# define EVO_TRADE_ITEM 6 // Pokémon is traded while it's holding the specified item
# define EVO_ITEM 7 // specified item is used on Pokémon
# define EVO_LEVEL_ATK_GT_DEF 8 // Pokémon reaches the specified level with attack > defense
# define EVO_LEVEL_ATK_EQ_DEF 9 // Pokémon reaches the specified level with attack = defense
# define EVO_LEVEL_ATK_LT_DEF 10 // Pokémon reaches the specified level with attack < defense
# define EVO_LEVEL_SILCOON 11 // Pokémon reaches the specified level with a Silcoon personality value
# define EVO_LEVEL_CASCOON 12 // Pokémon reaches the specified level with a Cascoon personality value
# define EVO_LEVEL_NINJASK 13 // Pokémon reaches the specified level (special value for Ninjask)
# define EVO_LEVEL_SHEDINJA 14 // Pokémon reaches the specified level (special value for Shedinja)
# define EVO_BEAUTY 15 // Pokémon levels up with beauty ≥ specified value
2020-10-13 02:11:41 +02:00
# define EVO_LEVEL_FEMALE 16 // Pokémon reaches the specified level, is female
# define EVO_LEVEL_MALE 17 // Pokémon reaches the specified level, is male
# define EVO_LEVEL_NIGHT 18 // Pokémon reaches the specified level, is night
# define EVO_LEVEL_DAY 19 // Pokémon reaches the specified level, is day
# define EVO_LEVEL_DUSK 20 // Pokémon reaches the specified level, is dusk (5-6 P.M)
# define EVO_ITEM_HOLD_DAY 21 // Pokémon levels up, holds specified item at day
# define EVO_ITEM_HOLD_NIGHT 22 // Pokémon levels up, holds specified item at night
# define EVO_MOVE 23 // Pokémon levels up, knows specified move
# define EVO_MOVE_TYPE 24 // Pokémon levels up, knows move with specified type
2020-11-25 04:53:53 +01:00
# define EVO_MAPSEC 25 // Pokémon levels up on specified mapsec
2020-10-13 02:11:41 +02:00
# define EVO_ITEM_MALE 26 // specified item is used on a male Pokémon
# define EVO_ITEM_FEMALE 27 // specified item is used on a female Pokémon
# define EVO_LEVEL_RAIN 28 // Pokémon reaches the specified level while it's raining
# define EVO_SPECIFIC_MON_IN_PARTY 29 // Pokémon levels up with a specified Pokémon in party
# define EVO_LEVEL_DARK_TYPE_MON_IN_PARTY 30 // Pokémon reaches the specified level with a Dark Type Pokémon in party
2020-10-15 01:16:18 +02:00
# define EVO_TRADE_SPECIFIC_MON 31 // Pokémon is traded for a specified Pokémon
2020-11-25 04:53:53 +01:00
# define EVO_SPECIFIC_MAP 32 // Pokémon levels up on specified map
2021-11-28 00:46:19 +01:00
# define EVO_LEVEL_NATURE_AMPED 33 // Pokémon reaches the specified level, it has a Hardy, Brave, Adamant, Naughty, Docile, Impish, Lax, Hasty, Jolly, Naive, Rash, Sassy, or Quirky nature.
# define EVO_LEVEL_NATURE_LOW_KEY 34 // Pokémon reaches the specified level, it has a Lonely, Bold, Relaxed, Timid, Serious, Modest, Mild, Quiet, Bashful, Calm, Gentle, or Careful nature.
2022-05-05 20:55:31 +02:00
# define EVO_SCRIPT_TRIGGER_DMG 35 // Pokémon has specified HP below max, then player interacts trigger
# define EVO_DARK_SCROLL 36 // interacts with Scroll of Darkness
# define EVO_WATER_SCROLL 37 // interacts with Scroll of Waters
2019-09-17 21:53:30 +02:00
2020-11-25 03:47:07 +01:00
# define EVOS_PER_MON 10
2019-09-17 21:53:30 +02:00
2021-02-12 20:54:11 +01:00
// Evolution 'modes,' for GetEvolutionTargetSpecies
2022-05-05 20:55:31 +02:00
# define EVO_MODE_NORMAL 0
# define EVO_MODE_TRADE 1
# define EVO_MODE_ITEM_USE 2
# define EVO_MODE_ITEM_CHECK 3 // If an Everstone is being held, still want to show that the stone *could* be used on that Pokémon to evolve
# define EVO_MODE_OVERWORLD_SPECIAL 4
2021-02-12 20:54:11 +01:00
2021-10-02 20:55:21 +02:00
// Form change types
# define FORM_CHANGE_END 0
# define FORM_ITEM_HOLD 1
# define FORM_ITEM_USE 2
# define FORM_MOVE 3
# define FORM_WITHDRAW 4
# define FORM_ITEM_HOLD_ABILITY 5
# define FORM_ITEM_USE_TIME 6
2020-02-07 18:48:47 +01:00
# define NUM_MALE_LINK_FACILITY_CLASSES 8
# define NUM_FEMALE_LINK_FACILITY_CLASSES 8
2021-11-01 17:02:08 +01:00
# define MON_PIC_WIDTH 64
# define MON_PIC_HEIGHT 64
# define MON_PIC_SIZE (MON_PIC_WIDTH * MON_PIC_HEIGHT / 2)
2021-03-29 15:38:19 +02:00
2021-10-03 05:48:12 +02:00
# define BATTLE_ALIVE_EXCEPT_ACTIVE 0
# define BATTLE_ALIVE_ATK_SIDE 1
# define BATTLE_ALIVE_DEF_SIDE 2
# define SKIP_FRONT_ANIM (1 << 7)
2021-05-23 22:17:43 +02:00
# define NUM_ABILITY_SLOTS (NUM_NORMAL_ABILITY_SLOTS + NUM_HIDDEN_ABILITY_SLOTS)
# define NUM_NORMAL_ABILITY_SLOTS 2
# define NUM_HIDDEN_ABILITY_SLOTS 1
2021-04-17 03:36:45 +02:00
2022-04-15 00:44:20 +02:00
// Species Flags
# define FLAG_LEGENDARY (1 << 0)
# define FLAG_MYTHICAL (1 << 1)
# define FLAG_ULTRA_BEAST (1 << 2)
# define FLAG_ALOLAN_FORM (1 << 3)
# define FLAG_GALARIAN_FORM (1 << 4)
# define FLAG_GENDER_DIFFERENCE (1 << 5)
2022-04-16 18:51:02 +02:00
# define LEGENDARY_PERFECT_IV_COUNT 3
2018-02-08 11:17:41 +01:00
# endif // GUARD_CONSTANTS_POKEMON_H