Move new species to battle_config.h

This commit is contained in:
DizzyEggg 2019-05-17 10:38:48 +02:00
parent f22f7866ac
commit a9b4d0208b
4 changed files with 16 additions and 9 deletions

View File

@ -1,6 +1,18 @@
#ifndef GUARD_CONSTANTS_BATTLE_CONFIG_H
#define GUARD_CONSTANTS_BATTLE_CONFIG_H
// Species with peculiar battle effects. Remove them if they're properly placed in constant/species.h
#define SPECIES_DIALGA 0
#define SPECIES_PALKIA 0
#define SPECIES_GIRATINA 0
#define SPECIES_CHERRIM 0
#define SPECIES_ARCEUS 0
#define SPECIES_SILVALLY 0
#define SPECIES_GENESECT 0
// Items with peculiar battle effects. Remove them if they're properly placed in constant/items.h
#define ITEM_GRISEOUS_ORB 0
#define GEN_3 0
#define GEN_4 1
#define GEN_5 2

View File

@ -475,6 +475,4 @@
// Check if the item is one that can be used on a Pokemon.
#define ITEM_HAS_EFFECT(item) ((item) >= ITEM_POTION && (item) <= ITEM_0B2)
#define ITEM_GRISEOUS_ORB 0
#endif // GUARD_CONSTANTS_ITEMS_H

View File

@ -447,13 +447,6 @@
#define NUM_SPECIES SPECIES_EGG
#define SPECIES_DIALGA 0
#define SPECIES_PALKIA 0
#define SPECIES_GIRATINA 0
#define SPECIES_CHERRIM 0
#define SPECIES_ARCEUS 0
#define SPECIES_SILVALLY 0
// National Dex Index Defines
#define NATIONAL_DEX_NONE 0

View File

@ -6115,6 +6115,10 @@ bool32 CanBattlerGetOrLoseItem(u8 battlerId, u16 itemId)
return FALSE;
else if (species == SPECIES_GIRATINA && itemId == ITEM_GRISEOUS_ORB)
return FALSE;
else if (species == SPECIES_GENESECT && GetBattlerHoldEffect(battlerId, FALSE) == HOLD_EFFECT_DRIVE)
return FALSE;
else if (species == SPECIES_SILVALLY && GetBattlerHoldEffect(battlerId, FALSE) == HOLD_EFFECT_MEMORY)
return FALSE;
else
return TRUE;
}