Changed type1 and type2 to be consistent (#2021)

* Changed type1 and type2 in gBattleMons to match gSpeciesInfo
* Changed monType1 and monType2 to monTypes to match gSpeciesInfo
This commit is contained in:
psf
2024-08-06 22:44:03 -07:00
committed by GitHub
parent 9a3c6d072b
commit 312749dd31
10 changed files with 56 additions and 58 deletions

View File

@@ -465,11 +465,11 @@ STATIC_ASSERT(sizeof(((struct BattleStruct *)0)->palaceFlags) * 8 >= MAX_BATTLER
#define TARGET_TURN_DAMAGED ((gSpecialStatuses[gBattlerTarget].physicalDmg != 0 || gSpecialStatuses[gBattlerTarget].specialDmg != 0))
#define IS_BATTLER_OF_TYPE(battlerId, type)((gBattleMons[battlerId].type1 == type || gBattleMons[battlerId].type2 == type))
#define IS_BATTLER_OF_TYPE(battlerId, type)((gBattleMons[battlerId].types[0] == type || gBattleMons[battlerId].types[1] == type))
#define SET_BATTLER_TYPE(battlerId, type) \
{ \
gBattleMons[battlerId].type1 = type; \
gBattleMons[battlerId].type2 = type; \
gBattleMons[battlerId].types[0] = type; \
gBattleMons[battlerId].types[1] = type; \
}
#define GET_STAT_BUFF_ID(n)((n & 0xF)) // first four bits 0x1, 0x2, 0x4, 0x8

View File

@@ -124,8 +124,7 @@ struct ChooseMoveStruct
u8 currentPp[MAX_MON_MOVES];
u8 maxPp[MAX_MON_MOVES];
u16 species;
u8 monType1;
u8 monType2;
u8 monTypes[2];
};
enum

View File

@@ -276,8 +276,7 @@ struct BattlePokemon
/*0x17*/ u32 abilityNum:1;
/*0x18*/ s8 statStages[NUM_BATTLE_STATS];
/*0x20*/ u8 ability;
/*0x21*/ u8 type1;
/*0x22*/ u8 type2;
/*0x21*/ u8 types[2];
/*0x23*/ u8 unknown;
/*0x24*/ u8 pp[MAX_MON_MOVES];
/*0x28*/ u16 hp;