mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 03:34:15 +01:00
Remove debug item effect override (#3106)
This commit is contained in:
parent
0efc9a29ad
commit
0c0b841a80
@ -621,7 +621,6 @@ struct BattleStruct
|
||||
u8 stolenStats[NUM_BATTLE_STATS]; // hp byte is used for which stats to raise, other inform about by how many stages
|
||||
u8 lastMoveFailed; // as bits for each battler, for the sake of Stomping Tantrum
|
||||
u8 lastMoveTarget[MAX_BATTLERS_COUNT]; // The last target on which each mon used a move, for the sake of Instruct
|
||||
u8 debugHoldEffects[MAX_BATTLERS_COUNT]; // These override actual items' hold effects.
|
||||
u16 tracedAbility[MAX_BATTLERS_COUNT];
|
||||
u16 hpBefore[MAX_BATTLERS_COUNT]; // Hp of battlers before using a move. For Berserk
|
||||
bool8 spriteIgnore0Hp;
|
||||
|
@ -137,7 +137,6 @@ enum
|
||||
VAR_IN_LOVE,
|
||||
VAR_U16_4_ENTRIES,
|
||||
VAL_S8,
|
||||
VAL_ITEM,
|
||||
VAL_ALL_STAT_STAGES,
|
||||
};
|
||||
|
||||
@ -246,7 +245,6 @@ static const u8 sText_InLove[] = _("In Love");
|
||||
static const u8 sText_AIMovePts[] = _("AI Pts/Dmg");
|
||||
static const u8 sText_AiKnowledge[] = _("AI Info");
|
||||
static const u8 sText_AiParty[] = _("AI Party");
|
||||
static const u8 sText_EffectOverride[] = _("Effect Override");
|
||||
|
||||
static const u8 sText_EmptyString[] = _("");
|
||||
|
||||
@ -1302,7 +1300,7 @@ static void CreateSecondaryListMenu(struct BattleDebugMenu *data)
|
||||
itemsCount = 1;
|
||||
break;
|
||||
case LIST_ITEM_HELD_ITEM:
|
||||
itemsCount = 2;
|
||||
itemsCount = 1;
|
||||
break;
|
||||
case LIST_ITEM_TYPES:
|
||||
itemsCount = 3;
|
||||
@ -1440,11 +1438,6 @@ static void PrintSecondaryEntries(struct BattleDebugMenu *data)
|
||||
PadString(ItemId_GetName(gBattleMons[data->battlerId].item), text);
|
||||
printer.currentY = printer.y = sSecondaryListTemplate.upText_Y;
|
||||
AddTextPrinter(&printer, 0, NULL);
|
||||
|
||||
PadString(sText_EffectOverride, text);
|
||||
printer.fontId = 0;
|
||||
printer.currentY = printer.y = sSecondaryListTemplate.upText_Y + yMultiplier;
|
||||
AddTextPrinter(&printer, 0, NULL);
|
||||
break;
|
||||
case LIST_ITEM_TYPES:
|
||||
for (i = 0; i < 3; i++)
|
||||
@ -1586,12 +1579,6 @@ static void UpdateBattlerValue(struct BattleDebugMenu *data)
|
||||
gBattleMons[data->battlerId].status2 &= ~STATUS2_INFATUATION;
|
||||
}
|
||||
break;
|
||||
case VAL_ITEM:
|
||||
if (data->currentSecondaryListItemId == 0)
|
||||
*(u16 *)(data->modifyArrows.modifiedValPtr) = data->modifyArrows.currValue;
|
||||
else if (data->currentSecondaryListItemId == 1)
|
||||
gBattleStruct->debugHoldEffects[data->battlerId] = data->modifyArrows.currValue;
|
||||
break;
|
||||
}
|
||||
data->battlerWasChanged[data->battlerId] = TRUE;
|
||||
}
|
||||
@ -1800,11 +1787,8 @@ static void SetUpModifyArrows(struct BattleDebugMenu *data)
|
||||
data->modifyArrows.maxValue = ITEMS_COUNT - 1;
|
||||
data->modifyArrows.maxDigits = 3;
|
||||
data->modifyArrows.modifiedValPtr = &gBattleMons[data->battlerId].item;
|
||||
data->modifyArrows.typeOfVal = VAL_ITEM;
|
||||
if (data->currentSecondaryListItemId == 0)
|
||||
data->modifyArrows.currValue = gBattleMons[data->battlerId].item;
|
||||
else
|
||||
data->modifyArrows.currValue = gBattleStruct->debugHoldEffects[data->battlerId];
|
||||
data->modifyArrows.typeOfVal = VAL_U16;
|
||||
data->modifyArrows.currValue = gBattleMons[data->battlerId].item;
|
||||
break;
|
||||
case LIST_ITEM_TYPES:
|
||||
data->modifyArrows.minValue = 0;
|
||||
|
@ -8060,11 +8060,6 @@ u32 GetBattlerHoldEffect(u8 battlerId, bool32 checkNegating)
|
||||
|
||||
gPotentialItemEffectBattler = battlerId;
|
||||
|
||||
#if DEBUG_BATTLE_MENU == TRUE
|
||||
if (gBattleStruct->debugHoldEffects[battlerId] != 0 && gBattleMons[battlerId].item)
|
||||
return gBattleStruct->debugHoldEffects[battlerId];
|
||||
else
|
||||
#endif
|
||||
if (gBattleMons[battlerId].item == ITEM_ENIGMA_BERRY_E_READER)
|
||||
return gEnigmaBerries[battlerId].holdEffect;
|
||||
else
|
||||
@ -9986,11 +9981,6 @@ bool32 CanMegaEvolve(u8 battlerId)
|
||||
// Check if there is an entry in the evolution table for regular Mega Evolution.
|
||||
if (GetBattleFormChangeTargetSpecies(battlerId, FORM_CHANGE_BATTLE_MEGA_EVOLUTION_ITEM) != SPECIES_NONE)
|
||||
{
|
||||
#if DEBUG_BATTLE_MENU == TRUE
|
||||
if (gBattleStruct->debugHoldEffects[battlerId])
|
||||
holdEffect = gBattleStruct->debugHoldEffects[battlerId];
|
||||
else
|
||||
#endif
|
||||
if (itemId == ITEM_ENIGMA_BERRY_E_READER)
|
||||
holdEffect = gEnigmaBerries[battlerId].holdEffect;
|
||||
else
|
||||
|
@ -194,11 +194,6 @@ bool32 IsViableZMove(u8 battlerId, u16 move)
|
||||
return FALSE; // Partner has mega evolved or is about to mega evolve
|
||||
}
|
||||
|
||||
#if DEBUG_BATTLE_MENU == TRUE
|
||||
if (gBattleStruct->debugHoldEffects[battlerId])
|
||||
holdEffect = gBattleStruct->debugHoldEffects[battlerId];
|
||||
else
|
||||
#endif
|
||||
if (item == ITEM_ENIGMA_BERRY_E_READER)
|
||||
return FALSE; // HoldEffect = gEnigmaBerries[battlerId].holdEffect;
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user