mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-13 23:23:43 +01:00
Merge branch 'master' into document-scriptmenu
This commit is contained in:
commit
8e4e344c7d
@ -1,5 +1,4 @@
|
||||
.include "constants/gba_constants.inc"
|
||||
.include "constants/global.inc"
|
||||
.include "constants/contest_constants.inc"
|
||||
.include "constants/pokemon_data_constants.inc"
|
||||
.include "constants/contest_move_effects.inc"
|
||||
|
@ -1,35 +0,0 @@
|
||||
.set GROWTH_MEDIUM_FAST, 0x00
|
||||
.set GROWTH_ERRATIC, 0x01
|
||||
.set GROWTH_FLUCTUATING, 0x02
|
||||
.set GROWTH_MEDIUM_SLOW, 0x03
|
||||
.set GROWTH_FAST, 0x04
|
||||
.set GROWTH_SLOW, 0x05
|
||||
|
||||
.set BODY_COLOR_RED, 0x00
|
||||
.set BODY_COLOR_BLUE, 0x01
|
||||
.set BODY_COLOR_YELLOW, 0x02
|
||||
.set BODY_COLOR_GREEN, 0x03
|
||||
.set BODY_COLOR_BLACK, 0x04
|
||||
.set BODY_COLOR_BROWN, 0x05
|
||||
.set BODY_COLOR_PURPLE, 0x06
|
||||
.set BODY_COLOR_GRAY, 0x07
|
||||
.set BODY_COLOR_WHITE, 0x08
|
||||
.set BODY_COLOR_PINK, 0x09
|
||||
|
||||
.set F_SUMMARY_SCREEN_FLIP_SPRITE, 0x80
|
||||
|
||||
.set EVO_FRIENDSHIP, 0x0001 @ Pokémon levels up with friendship ≥ 220
|
||||
.set EVO_FRIENDSHIP_DAY, 0x0002 @ Pokémon levels up during the day with friendship ≥ 220
|
||||
.set EVO_FRIENDSHIP_NIGHT, 0x0003 @ Pokémon levels up at night with friendship ≥ 220
|
||||
.set EVO_LEVEL, 0x0004 @ Pokémon reaches the specified level
|
||||
.set EVO_TRADE, 0x0005 @ Pokémon is traded
|
||||
.set EVO_TRADE_ITEM, 0x0006 @ Pokémon is traded while it's holding the specified item
|
||||
.set EVO_ITEM, 0x0007 @ specified item is used on Pokémon
|
||||
.set EVO_LEVEL_ATK_GT_DEF, 0x0008 @ Pokémon reaches the specified level with attack > defense
|
||||
.set EVO_LEVEL_ATK_EQ_DEF, 0x0009 @ Pokémon reaches the specified level with attack = defense
|
||||
.set EVO_LEVEL_ATK_LT_DEF, 0x000a @ Pokémon reaches the specified level with attack < defense
|
||||
.set EVO_LEVEL_SILCOON, 0x000b @ Pokémon reaches the specified level with a Silcoon personality value
|
||||
.set EVO_LEVEL_CASCOON, 0x000c @ Pokémon reaches the specified level with a Cascoon personality value
|
||||
.set EVO_LEVEL_NINJASK, 0x000d @ Pokémon reaches the specified level (special value for Ninjask)
|
||||
.set EVO_LEVEL_SHEDINJA, 0x000e @ Pokémon reaches the specified level (special value for Shedinja)
|
||||
.set EVO_BEAUTY, 0x000f @ Pokémon levels up with beauty ≥ specified value
|
@ -17,6 +17,7 @@
|
||||
#include "constants/map_scripts.h"
|
||||
#include "constants/maps.h"
|
||||
#include "constants/moves.h"
|
||||
#include "constants/pokemon.h"
|
||||
#include "constants/script_menu.h"
|
||||
#include "constants/songs.h"
|
||||
#include "constants/species.h"
|
||||
|
@ -392,7 +392,7 @@ OldaleTown_PokemonCenter_2F_EventScript_276F23:: @ 8276F23
|
||||
|
||||
OldaleTown_PokemonCenter_2F_EventScript_276F2E:: @ 8276F2E
|
||||
special HasEnoughMonsForDoubleBattle
|
||||
compare VAR_RESULT, 0
|
||||
compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS
|
||||
goto_if_ne OldaleTown_PokemonCenter_2F_EventScript_276F47
|
||||
setvar VAR_0x8004, 2
|
||||
goto OldaleTown_PokemonCenter_2F_EventScript_276F60
|
||||
@ -1174,7 +1174,7 @@ OldaleTown_PokemonCenter_2F_EventScript_27788E:: @ 827788E
|
||||
|
||||
OldaleTown_PokemonCenter_2F_EventScript_277899:: @ 8277899
|
||||
special HasEnoughMonsForDoubleBattle
|
||||
compare VAR_RESULT, 0
|
||||
compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS
|
||||
goto_if_ne OldaleTown_PokemonCenter_2F_EventScript_2778B2
|
||||
setvar VAR_0x8004, 1
|
||||
goto OldaleTown_PokemonCenter_2F_EventScript_277931
|
||||
|
@ -26,7 +26,7 @@ EventScript_TryDoDoubleTrainerBattle:: @ 827138A
|
||||
compare VAR_RESULT, 0
|
||||
goto_if_ne EventScript_NoDoubleTrainerBattle
|
||||
special HasEnoughMonsForDoubleBattle
|
||||
compare VAR_RESULT, 0
|
||||
compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS
|
||||
goto_if_ne EventScript_NotEnoughMonsForDoubleBattle
|
||||
special SetUpTrainerEncounterMusic
|
||||
special SetUpTrainerMovement
|
||||
@ -69,7 +69,7 @@ EventScript_TryDoDoubleRematchBattle:: @ 82713F8
|
||||
compare VAR_RESULT, 0
|
||||
goto_if_eq EventScript_NoDoubleRematchTrainerBattle
|
||||
special HasEnoughMonsForDoubleBattle
|
||||
compare VAR_RESULT, 0
|
||||
compare VAR_RESULT, PLAYER_HAS_TWO_USABLE_MONS
|
||||
goto_if_ne EventScript_NotEnoughMonsForDoubleRematchBattle
|
||||
special SetUpTrainerEncounterMusic
|
||||
special SetUpTrainerMovement
|
||||
|
@ -2,81 +2,80 @@
|
||||
#define GUARD_CONSTANTS_POKEMON_H
|
||||
|
||||
// Pokemon types
|
||||
#define TYPE_NONE 0xFF
|
||||
#define TYPE_NORMAL 0x00
|
||||
#define TYPE_FIGHTING 0x01
|
||||
#define TYPE_FLYING 0x02
|
||||
#define TYPE_POISON 0x03
|
||||
#define TYPE_GROUND 0x04
|
||||
#define TYPE_ROCK 0x05
|
||||
#define TYPE_BUG 0x06
|
||||
#define TYPE_GHOST 0x07
|
||||
#define TYPE_STEEL 0x08
|
||||
#define TYPE_MYSTERY 0x09
|
||||
#define TYPE_FIRE 0x0a
|
||||
#define TYPE_WATER 0x0b
|
||||
#define TYPE_GRASS 0x0c
|
||||
#define TYPE_ELECTRIC 0x0d
|
||||
#define TYPE_PSYCHIC 0x0e
|
||||
#define TYPE_ICE 0x0f
|
||||
#define TYPE_DRAGON 0x10
|
||||
#define TYPE_DARK 0x11
|
||||
#define NUMBER_OF_MON_TYPES 0x12
|
||||
|
||||
#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
|
||||
#define NUMBER_OF_MON_TYPES 18
|
||||
|
||||
// Pokemon egg groups
|
||||
#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
|
||||
#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
|
||||
|
||||
// Pokemon natures
|
||||
#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
|
||||
#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
|
||||
|
||||
// Pokemon Stats
|
||||
#define STAT_HP 0
|
||||
#define STAT_ATK 1
|
||||
#define STAT_DEF 2
|
||||
#define STAT_SPEED 3
|
||||
#define STAT_SPATK 4
|
||||
#define STAT_SPDEF 5
|
||||
#define STAT_ACC 6 // Only in battles.
|
||||
#define STAT_HP 0
|
||||
#define STAT_ATK 1
|
||||
#define STAT_DEF 2
|
||||
#define STAT_SPEED 3
|
||||
#define STAT_SPATK 4
|
||||
#define STAT_SPDEF 5
|
||||
#define STAT_ACC 6 // Only in battles.
|
||||
#define STAT_EVASION 7 // Only in battles.
|
||||
|
||||
#define NUM_STATS 6
|
||||
@ -85,4 +84,187 @@
|
||||
// Shiny odds
|
||||
#define SHINY_ODDS 8 // Actual probability is SHINY_ODDS/65536
|
||||
|
||||
// Flags for Get(Box)MonData / Set(Box)MonData
|
||||
#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
|
||||
#define MON_DATA_GIFT_RIBBON_1 72
|
||||
#define MON_DATA_GIFT_RIBBON_2 73
|
||||
#define MON_DATA_GIFT_RIBBON_3 74
|
||||
#define MON_DATA_GIFT_RIBBON_4 75
|
||||
#define MON_DATA_GIFT_RIBBON_5 76
|
||||
#define MON_DATA_GIFT_RIBBON_6 77
|
||||
#define MON_DATA_GIFT_RIBBON_7 78
|
||||
#define MON_DATA_FATEFUL_ENCOUNTER 79
|
||||
#define MON_DATA_OBEDIENCE 80
|
||||
#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
|
||||
|
||||
#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
|
||||
|
||||
#define MON_MALE 0x00
|
||||
#define MON_FEMALE 0xFE
|
||||
#define MON_GENDERLESS 0xFF
|
||||
|
||||
#define FRIENDSHIP_EVENT_GROW_LEVEL 0
|
||||
#define FRIENDSHIP_EVENT_VITAMIN 1 // unused
|
||||
#define FRIENDSHIP_EVENT_BATTLE_ITEM 2 // unused
|
||||
#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_OUTSIDE_BATTLE 7
|
||||
#define FRIENDSHIP_EVENT_FAINT_LARGE 8
|
||||
|
||||
#define STATUS_PRIMARY_NONE 0
|
||||
#define STATUS_PRIMARY_POISON 1
|
||||
#define STATUS_PRIMARY_PARALYSIS 2
|
||||
#define STATUS_PRIMARY_SLEEP 3
|
||||
#define STATUS_PRIMARY_FREEZE 4
|
||||
#define STATUS_PRIMARY_BURN 5
|
||||
#define STATUS_PRIMARY_POKERUS 6
|
||||
#define STATUS_PRIMARY_FAINTED 7
|
||||
|
||||
#define MAX_TOTAL_EVS 510
|
||||
#define EV_ITEM_RAISE_LIMIT 100
|
||||
|
||||
#define UNOWN_FORM_COUNT 28
|
||||
|
||||
// Battle move flags
|
||||
#define FLAG_MAKES_CONTACT 0x1
|
||||
#define FLAG_PROTECT_AFFECTED 0x2
|
||||
#define FLAG_MAGICCOAT_AFFECTED 0x4
|
||||
#define FLAG_SNATCH_AFFECTED 0x8
|
||||
#define FLAG_MIRROR_MOVE_AFFECTED 0x10
|
||||
#define FLAG_KINGSROCK_AFFECTED 0x20
|
||||
|
||||
// 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
|
||||
|
||||
// Evolution type flags
|
||||
#define EVO_FRIENDSHIP 0x0001 // Pokémon levels up with friendship ≥ 220
|
||||
#define EVO_FRIENDSHIP_DAY 0x0002 // Pokémon levels up during the day with friendship ≥ 220
|
||||
#define EVO_FRIENDSHIP_NIGHT 0x0003 // Pokémon levels up at night with friendship ≥ 220
|
||||
#define EVO_LEVEL 0x0004 // Pokémon reaches the specified level
|
||||
#define EVO_TRADE 0x0005 // Pokémon is traded
|
||||
#define EVO_TRADE_ITEM 0x0006 // Pokémon is traded while it's holding the specified item
|
||||
#define EVO_ITEM 0x0007 // specified item is used on Pokémon
|
||||
#define EVO_LEVEL_ATK_GT_DEF 0x0008 // Pokémon reaches the specified level with attack > defense
|
||||
#define EVO_LEVEL_ATK_EQ_DEF 0x0009 // Pokémon reaches the specified level with attack = defense
|
||||
#define EVO_LEVEL_ATK_LT_DEF 0x000a // Pokémon reaches the specified level with attack < defense
|
||||
#define EVO_LEVEL_SILCOON 0x000b // Pokémon reaches the specified level with a Silcoon personality value
|
||||
#define EVO_LEVEL_CASCOON 0x000c // Pokémon reaches the specified level with a Cascoon personality value
|
||||
#define EVO_LEVEL_NINJASK 0x000d // Pokémon reaches the specified level (special value for Ninjask)
|
||||
#define EVO_LEVEL_SHEDINJA 0x000e // Pokémon reaches the specified level (special value for Shedinja)
|
||||
#define EVO_BEAUTY 0x000f // Pokémon levels up with beauty ≥ specified value
|
||||
|
||||
#define EVOS_PER_MON 5
|
||||
|
||||
#endif // GUARD_CONSTANTS_POKEMON_H
|
||||
|
@ -4,136 +4,6 @@
|
||||
#include "constants/pokemon.h"
|
||||
#include "sprite.h"
|
||||
|
||||
#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
|
||||
#define MON_DATA_GIFT_RIBBON_1 72
|
||||
#define MON_DATA_GIFT_RIBBON_2 73
|
||||
#define MON_DATA_GIFT_RIBBON_3 74
|
||||
#define MON_DATA_GIFT_RIBBON_4 75
|
||||
#define MON_DATA_GIFT_RIBBON_5 76
|
||||
#define MON_DATA_GIFT_RIBBON_6 77
|
||||
#define MON_DATA_GIFT_RIBBON_7 78
|
||||
#define MON_DATA_FATEFUL_ENCOUNTER 79
|
||||
#define MON_DATA_OBEDIENCE 80
|
||||
#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
|
||||
|
||||
#define MAX_LEVEL 100
|
||||
|
||||
#define OT_ID_RANDOM_NO_SHINY 2
|
||||
#define OT_ID_PRESET 1
|
||||
#define OT_ID_PLAYER_ID 0
|
||||
|
||||
#define MON_GIVEN_TO_PARTY 0x0
|
||||
#define MON_GIVEN_TO_PC 0x1
|
||||
#define MON_CANT_GIVE 0x2
|
||||
|
||||
#define PLAYER_HAS_TWO_USABLE_MONS 0x0
|
||||
#define PLAYER_HAS_ONE_MON 0x1
|
||||
#define PLAYER_HAS_ONE_USABLE_MON 0x2
|
||||
|
||||
#define MON_MALE 0x00
|
||||
#define MON_FEMALE 0xFE
|
||||
#define MON_GENDERLESS 0xFF
|
||||
|
||||
#define FRIENDSHIP_EVENT_GROW_LEVEL 0x0
|
||||
#define FRIENDSHIP_EVENT_VITAMIN 0x1 // unused
|
||||
#define FRIENDSHIP_EVENT_BATTLE_ITEM 0x2 // unused
|
||||
#define FRIENDSHIP_EVENT_LEAGUE_BATTLE 0x3
|
||||
#define FRIENDSHIP_EVENT_LEARN_TMHM 0x4
|
||||
#define FRIENDSHIP_EVENT_WALKING 0x5
|
||||
#define FRIENDSHIP_EVENT_FAINT_SMALL 0x6
|
||||
#define FRIENDSHIP_EVENT_FAINT_OUTSIDE_BATTLE 0x7
|
||||
#define FRIENDSHIP_EVENT_FAINT_LARGE 0x8
|
||||
|
||||
#define STATUS_PRIMARY_NONE 0x0
|
||||
#define STATUS_PRIMARY_POISON 0x1
|
||||
#define STATUS_PRIMARY_PARALYSIS 0x2
|
||||
#define STATUS_PRIMARY_SLEEP 0x3
|
||||
#define STATUS_PRIMARY_FREEZE 0x4
|
||||
#define STATUS_PRIMARY_BURN 0x5
|
||||
#define STATUS_PRIMARY_POKERUS 0x6
|
||||
#define STATUS_PRIMARY_FAINTED 0x7
|
||||
|
||||
#define MAX_TOTAL_EVS 510
|
||||
#define UNOWN_FORM_COUNT 28
|
||||
|
||||
struct PokemonSubstruct0
|
||||
{
|
||||
u16 species;
|
||||
@ -348,13 +218,6 @@ struct BattleMove
|
||||
u8 flags;
|
||||
};
|
||||
|
||||
#define FLAG_MAKES_CONTACT 0x1
|
||||
#define FLAG_PROTECT_AFFECTED 0x2
|
||||
#define FLAG_MAGICCOAT_AFFECTED 0x4
|
||||
#define FLAG_SNATCH_AFFECTED 0x8
|
||||
#define FLAG_MIRROR_MOVE_AFFECTED 0x10
|
||||
#define FLAG_KINGSROCK_AFFECTED 0x20
|
||||
|
||||
struct SpindaSpot
|
||||
{
|
||||
u8 x, y;
|
||||
@ -367,46 +230,6 @@ struct __attribute__((packed)) LevelUpMove
|
||||
u16 level:7;
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
GROWTH_MEDIUM_FAST,
|
||||
GROWTH_ERRATIC,
|
||||
GROWTH_FLUCTUATING,
|
||||
GROWTH_MEDIUM_SLOW,
|
||||
GROWTH_FAST,
|
||||
GROWTH_SLOW
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
BODY_COLOR_RED,
|
||||
BODY_COLOR_BLUE,
|
||||
BODY_COLOR_YELLOW,
|
||||
BODY_COLOR_GREEN,
|
||||
BODY_COLOR_BLACK,
|
||||
BODY_COLOR_BROWN,
|
||||
BODY_COLOR_PURPLE,
|
||||
BODY_COLOR_GRAY,
|
||||
BODY_COLOR_WHITE,
|
||||
BODY_COLOR_PINK
|
||||
};
|
||||
|
||||
#define EVO_FRIENDSHIP 0x0001 // Pokémon levels up with friendship ≥ 220
|
||||
#define EVO_FRIENDSHIP_DAY 0x0002 // Pokémon levels up during the day with friendship ≥ 220
|
||||
#define EVO_FRIENDSHIP_NIGHT 0x0003 // Pokémon levels up at night with friendship ≥ 220
|
||||
#define EVO_LEVEL 0x0004 // Pokémon reaches the specified level
|
||||
#define EVO_TRADE 0x0005 // Pokémon is traded
|
||||
#define EVO_TRADE_ITEM 0x0006 // Pokémon is traded while it's holding the specified item
|
||||
#define EVO_ITEM 0x0007 // specified item is used on Pokémon
|
||||
#define EVO_LEVEL_ATK_GT_DEF 0x0008 // Pokémon reaches the specified level with attack > defense
|
||||
#define EVO_LEVEL_ATK_EQ_DEF 0x0009 // Pokémon reaches the specified level with attack = defense
|
||||
#define EVO_LEVEL_ATK_LT_DEF 0x000a // Pokémon reaches the specified level with attack < defense
|
||||
#define EVO_LEVEL_SILCOON 0x000b // Pokémon reaches the specified level with a Silcoon personality value
|
||||
#define EVO_LEVEL_CASCOON 0x000c // Pokémon reaches the specified level with a Cascoon personality value
|
||||
#define EVO_LEVEL_NINJASK 0x000d // Pokémon reaches the specified level (special value for Ninjask)
|
||||
#define EVO_LEVEL_SHEDINJA 0x000e // Pokémon reaches the specified level (special value for Shedinja)
|
||||
#define EVO_BEAUTY 0x000f // Pokémon levels up with beauty ≥ specified value
|
||||
|
||||
struct Evolution
|
||||
{
|
||||
u16 method;
|
||||
@ -414,8 +237,6 @@ struct Evolution
|
||||
u16 targetSpecies;
|
||||
};
|
||||
|
||||
#define EVOS_PER_MON 5
|
||||
|
||||
extern u8 gPlayerPartyCount;
|
||||
extern struct Pokemon gPlayerParty[PARTY_SIZE];
|
||||
extern u8 gEnemyPartyCount;
|
||||
|
@ -4817,11 +4817,11 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
|
||||
{
|
||||
if (evCount >= MAX_TOTAL_EVS)
|
||||
return TRUE;
|
||||
if (dataSigned >= 100)
|
||||
if (dataSigned >= EV_ITEM_RAISE_LIMIT)
|
||||
break;
|
||||
|
||||
if (dataSigned + r2 > 100)
|
||||
r5 = 100 - (dataSigned + r2) + r2;
|
||||
if (dataSigned + r2 > EV_ITEM_RAISE_LIMIT)
|
||||
r5 = EV_ITEM_RAISE_LIMIT - (dataSigned + r2) + r2;
|
||||
else
|
||||
r5 = r2;
|
||||
|
||||
@ -5021,11 +5021,11 @@ bool8 PokemonUseItemEffects(struct Pokemon *mon, u16 item, u8 partyIndex, u8 mov
|
||||
{
|
||||
if (evCount >= MAX_TOTAL_EVS)
|
||||
return TRUE;
|
||||
if (dataSigned >= 100)
|
||||
if (dataSigned >= EV_ITEM_RAISE_LIMIT)
|
||||
break;
|
||||
|
||||
if (dataSigned + r2 > 100)
|
||||
r5 = 100 - (dataSigned + r2) + r2;
|
||||
if (dataSigned + r2 > EV_ITEM_RAISE_LIMIT)
|
||||
r5 = EV_ITEM_RAISE_LIMIT - (dataSigned + r2) + r2;
|
||||
else
|
||||
r5 = r2;
|
||||
|
||||
|
@ -585,14 +585,14 @@ void HasEnoughMonsForDoubleBattle(void)
|
||||
{
|
||||
switch (GetMonsStateToDoubles())
|
||||
{
|
||||
case 0:
|
||||
gSpecialVar_Result = 0;
|
||||
case PLAYER_HAS_TWO_USABLE_MONS:
|
||||
gSpecialVar_Result = PLAYER_HAS_TWO_USABLE_MONS;
|
||||
break;
|
||||
case 1:
|
||||
gSpecialVar_Result = 1;
|
||||
case PLAYER_HAS_ONE_MON:
|
||||
gSpecialVar_Result = PLAYER_HAS_ONE_MON;
|
||||
break;
|
||||
case 2:
|
||||
gSpecialVar_Result = 2;
|
||||
case PLAYER_HAS_ONE_USABLE_MON:
|
||||
gSpecialVar_Result = PLAYER_HAS_ONE_USABLE_MON;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user