Moved Electrified to Status4.
This commit is contained in:
parent
3add4d6a17
commit
cf6e3873b4
6 changed files with 32 additions and 8 deletions
|
@ -857,6 +857,7 @@ extern u8 gUnusedFirstBattleVar2;
|
|||
extern u32 gSideStatuses[2];
|
||||
extern struct SideTimer gSideTimers[2];
|
||||
extern u32 gStatuses3[MAX_BATTLERS_COUNT];
|
||||
extern u32 gStatuses4[MAX_BATTLERS_COUNT];
|
||||
extern struct DisableStruct gDisableStructs[MAX_BATTLERS_COUNT];
|
||||
extern u16 gPauseCounterBattle;
|
||||
extern u16 gPaydayMoney;
|
||||
|
|
|
@ -169,10 +169,11 @@
|
|||
#define STATUS3_HEAL_BLOCK (1 << 27)
|
||||
#define STATUS3_AQUA_RING (1 << 28)
|
||||
#define STATUS3_LASER_FOCUS (1 << 29)
|
||||
#define STATUS3_ELECTRIFIED (1 << 30)
|
||||
#define STATUS3_POWER_TRICK (1 << 31)
|
||||
#define STATUS3_POWER_TRICK (1 << 30)
|
||||
#define STATUS3_SEMI_INVULNERABLE (STATUS3_UNDERGROUND | STATUS3_ON_AIR | STATUS3_UNDERWATER | STATUS3_PHANTOM_FORCE)
|
||||
|
||||
#define STATUS4_ELECTRIFIED (1 << 0)
|
||||
|
||||
#define HITMARKER_x10 (1 << 4)
|
||||
#define HITMARKER_x20 (1 << 5)
|
||||
#define HITMARKER_DESTINYBOND (1 << 6)
|
||||
|
|
|
@ -97,6 +97,7 @@ enum
|
|||
LIST_ITEM_STATUS1,
|
||||
LIST_ITEM_STATUS2,
|
||||
LIST_ITEM_STATUS3,
|
||||
LIST_ITEM_STATUS4,
|
||||
LIST_ITEM_SIDE_STATUS,
|
||||
LIST_ITEM_AI,
|
||||
LIST_ITEM_AI_MOVES_PTS,
|
||||
|
@ -164,6 +165,7 @@ static const u8 sText_StatStages[] = _("Stat Stages");
|
|||
static const u8 sText_Status1[] = _("Status1");
|
||||
static const u8 sText_Status2[] = _("Status2");
|
||||
static const u8 sText_Status3[] = _("Status3");
|
||||
static const u8 sText_Status4[] = _("Status4");
|
||||
static const u8 sText_HeldItem[] = _("Held Item");
|
||||
static const u8 sText_SideStatus[] = _("Side Status");
|
||||
static const u8 sText_MaxHp[] = _("HP Max");
|
||||
|
@ -298,8 +300,12 @@ static const struct BitfieldInfo sStatus3Bitfield[] =
|
|||
// Heal Block 1, 27,
|
||||
{/*Aqua Ring*/ 1, 28},
|
||||
{/*Laser Focus*/ 1, 29},
|
||||
{/*Electrified*/ 1, 30},
|
||||
// Power Trick 1, 31,
|
||||
// Power Trick 1, 30,
|
||||
};
|
||||
|
||||
static const struct BitfieldInfo sStatus4Bitfield[] =
|
||||
{
|
||||
{/*Electrified*/ 1, 0,}
|
||||
};
|
||||
|
||||
static const struct BitfieldInfo sAIBitfield[] =
|
||||
|
@ -329,6 +335,7 @@ static const struct ListMenuItem sMainListItems[] =
|
|||
{sText_Status1, LIST_ITEM_STATUS1},
|
||||
{sText_Status2, LIST_ITEM_STATUS2},
|
||||
{sText_Status3, LIST_ITEM_STATUS3},
|
||||
{sText_Status4, LIST_ITEM_STATUS4},
|
||||
{sText_SideStatus, LIST_ITEM_SIDE_STATUS},
|
||||
{sText_AI, LIST_ITEM_AI},
|
||||
{sText_AIMovePts, LIST_ITEM_AI_MOVES_PTS},
|
||||
|
@ -414,7 +421,11 @@ static const struct ListMenuItem sStatus3ListItems[] =
|
|||
{sText_MiracleEye, 9},
|
||||
{sText_AquaRing, 10},
|
||||
{sText_LaserFocus, 11},
|
||||
{sText_Electrified, 12},
|
||||
};
|
||||
|
||||
static const struct ListMenuItem sStatus4ListItems[] =
|
||||
{
|
||||
{sText_Electrified, 0},
|
||||
};
|
||||
|
||||
static const struct ListMenuItem sSideStatusListItems[] =
|
||||
|
@ -1183,6 +1194,11 @@ static void CreateSecondaryListMenu(struct BattleDebugMenu *data)
|
|||
itemsCount = ARRAY_COUNT(sStatus3ListItems);
|
||||
data->bitfield = sStatus3Bitfield;
|
||||
break;
|
||||
case LIST_ITEM_STATUS4:
|
||||
listTemplate.items = sStatus4ListItems;
|
||||
itemsCount = ARRAY_COUNT(sStatus4ListItems);
|
||||
data->bitfield = sStatus4Bitfield;
|
||||
break;
|
||||
case LIST_ITEM_AI:
|
||||
listTemplate.items = sAIListItems;
|
||||
itemsCount = ARRAY_COUNT(sAIListItems);
|
||||
|
@ -1741,6 +1757,11 @@ static void SetUpModifyArrows(struct BattleDebugMenu *data)
|
|||
data->modifyArrows.currValue = GetBitfieldValue(gStatuses3[data->battlerId], data->bitfield[data->currentSecondaryListItemId].currBit, data->bitfield[data->currentSecondaryListItemId].bitsCount);
|
||||
data->modifyArrows.typeOfVal = VAL_BITFIELD_32;
|
||||
goto CASE_ITEM_STATUS;
|
||||
case LIST_ITEM_STATUS4:
|
||||
data->modifyArrows.modifiedValPtr = &gStatuses4[data->battlerId];
|
||||
data->modifyArrows.currValue = GetBitfieldValue(gStatuses4[data->battlerId], data->bitfield[data->currentSecondaryListItemId].currBit, data->bitfield[data->currentSecondaryListItemId].bitsCount);
|
||||
data->modifyArrows.typeOfVal = VAL_BITFIELD_32;
|
||||
goto CASE_ITEM_STATUS;
|
||||
case LIST_ITEM_AI:
|
||||
data->modifyArrows.modifiedValPtr = &gBattleResources->ai->aiFlags;
|
||||
data->modifyArrows.currValue = GetBitfieldValue(gBattleResources->ai->aiFlags, data->bitfield[data->currentSecondaryListItemId].currBit, data->bitfield[data->currentSecondaryListItemId].bitsCount);
|
||||
|
|
|
@ -190,6 +190,7 @@ EWRAM_DATA u8 gUnusedFirstBattleVar2 = 0; // Never read
|
|||
EWRAM_DATA u32 gSideStatuses[2] = {0};
|
||||
EWRAM_DATA struct SideTimer gSideTimers[2] = {0};
|
||||
EWRAM_DATA u32 gStatuses3[MAX_BATTLERS_COUNT] = {0};
|
||||
EWRAM_DATA u32 gStatuses4[MAX_BATTLERS_COUNT] = {0};
|
||||
EWRAM_DATA struct DisableStruct gDisableStructs[MAX_BATTLERS_COUNT] = {0};
|
||||
EWRAM_DATA u16 gPauseCounterBattle = 0;
|
||||
EWRAM_DATA u16 gPaydayMoney = 0;
|
||||
|
@ -5118,7 +5119,7 @@ void SetTypeBeforeUsingMove(u16 move, u8 battlerAtk)
|
|||
attackerAbility = GetBattlerAbility(battlerAtk);
|
||||
GET_MOVE_TYPE(move, moveType);
|
||||
if ((gFieldStatuses & STATUS_FIELD_ION_DELUGE && moveType == TYPE_NORMAL)
|
||||
|| gStatuses3[battlerAtk] & STATUS3_ELECTRIFIED)
|
||||
|| gStatuses4[battlerAtk] & STATUS4_ELECTRIFIED)
|
||||
{
|
||||
gBattleStruct->dynamicMoveType = 0x80 | TYPE_ELECTRIC;
|
||||
}
|
||||
|
|
|
@ -8089,7 +8089,7 @@ static void Cmd_various(void)
|
|||
}
|
||||
else
|
||||
{
|
||||
gStatuses3[gBattlerTarget] |= STATUS3_ELECTRIFIED;
|
||||
gStatuses4[gBattlerTarget] |= STATUS4_ELECTRIFIED;
|
||||
gBattlescriptCurrInstr += 7;
|
||||
}
|
||||
return;
|
||||
|
|
|
@ -2838,7 +2838,7 @@ u8 DoBattlerEndTurnEffects(void)
|
|||
gBattleStruct->turnEffectsTracker++;
|
||||
break;
|
||||
case ENDTURN_ELECTRIFY:
|
||||
gStatuses3[gActiveBattler] &= ~(STATUS3_ELECTRIFIED);
|
||||
gStatuses4[gActiveBattler] &= ~(STATUS4_ELECTRIFIED);
|
||||
gBattleStruct->turnEffectsTracker++;
|
||||
case ENDTURN_POWDER:
|
||||
gBattleMons[gActiveBattler].status2 &= ~(STATUS2_POWDER);
|
||||
|
|
Loading…
Reference in a new issue