summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGriffinR <griffin.richards@comcast.net>2019-09-17 15:53:30 -0400
committerhuderlem <huderlem@gmail.com>2019-09-22 08:14:22 -0500
commit1ffa890d27273590f5d9b99b15c3747dc06106d8 (patch)
tree595447ce9968f49fc7568e3b09396db37b87598b
parent80f58f7b24058db4f6e6ab62b24875d0b78b084a (diff)
Consolidate remaining pokemon constants
-rw-r--r--constants/constants.inc1
-rw-r--r--constants/pokemon_data_constants.inc35
-rw-r--r--include/constants/pokemon.h52
-rw-r--r--include/pokemon.h49
4 files changed, 50 insertions, 87 deletions
diff --git a/constants/constants.inc b/constants/constants.inc
index 6e5f5a81d..a58bf92a2 100644
--- a/constants/constants.inc
+++ b/constants/constants.inc
@@ -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"
diff --git a/constants/pokemon_data_constants.inc b/constants/pokemon_data_constants.inc
deleted file mode 100644
index 646bd6d4c..000000000
--- a/constants/pokemon_data_constants.inc
+++ /dev/null
@@ -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
diff --git a/include/constants/pokemon.h b/include/constants/pokemon.h
index 6ba269336..14c2acdf6 100644
--- a/include/constants/pokemon.h
+++ b/include/constants/pokemon.h
@@ -23,7 +23,6 @@
#define TYPE_DARK 17
#define NUMBER_OF_MON_TYPES 18
-
// Pokemon egg groups
#define EGG_GROUP_NONE 0
#define EGG_GROUP_MONSTER 1
@@ -85,7 +84,7 @@
// Shiny odds
#define SHINY_ODDS 8 // Actual probability is SHINY_ODDS/65536
-// Mon Data
+// Flags for Get(Box)MonData / Set(Box)MonData
#define MON_DATA_PERSONALITY 0
#define MON_DATA_OT_ID 1
#define MON_DATA_NICKNAME 2
@@ -219,4 +218,53 @@
#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
diff --git a/include/pokemon.h b/include/pokemon.h
index 807d8888b..6a34e3cda 100644
--- a/include/pokemon.h
+++ b/include/pokemon.h
@@ -218,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;
@@ -237,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;
@@ -284,8 +237,6 @@ struct Evolution
u16 targetSpecies;
};
-#define EVOS_PER_MON 5
-
extern u8 gPlayerPartyCount;
extern struct Pokemon gPlayerParty[PARTY_SIZE];
extern u8 gEnemyPartyCount;