Rename gItems and gAbilities to gItemsInfo and gAbilitiesInfo (#4068)

* Rename gItems to gItemsInfo

* Rename gAbilities to gAbilitiesInfo

* Just fixing up my bad merge

---------

Co-authored-by: Eduardo Quezada D'Ottone <eduardo602002@gmail.com>
This commit is contained in:
Bassoonian 2024-01-26 19:25:52 +01:00 committed by GitHub
parent 0bdc0b2aa5
commit b9a02b205d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
80 changed files with 234 additions and 234 deletions

View file

@ -1,7 +1,7 @@
#ifndef GUARD_ITEM_CONSTANTS_H
#define GUARD_ITEM_CONSTANTS_H
// These constants are used in gItems
// These constants are used in gItemsInfo
#define POCKET_NONE 0
#define POCKET_ITEMS 1
#define POCKET_POKE_BALLS 2

View file

@ -31,7 +31,7 @@ struct BagPocket
u8 capacity;
};
extern const struct Item gItems[];
extern const struct Item gItemsInfo[];
extern struct BagPocket gBagPockets[];
void ApplyNewEncryptionKeyToBagItems(u32 newKey);

View file

@ -610,7 +610,7 @@ extern const u16 gUnionRoomFacilityClasses[];
extern const struct SpriteTemplate gBattlerSpriteTemplates[];
extern const s8 gNatureStatTable[][5];
extern const u32 sExpCandyExperienceTable[];
extern const struct Ability gAbilities[];
extern const struct Ability gAbilitiesInfo[];
void ZeroBoxMonData(struct BoxPokemon *boxMon);
void ZeroMonData(struct Pokemon *mon);

View file

@ -2125,8 +2125,8 @@ static s32 AI_CheckBadMove(u32 battlerAtk, u32 battlerDef, u32 move, s32 score)
case EFFECT_ROLE_PLAY:
if (aiData->abilities[battlerAtk] == aiData->abilities[battlerDef]
|| aiData->abilities[battlerDef] == ABILITY_NONE
|| gAbilities[aiData->abilities[battlerAtk]].cantBeSuppressed
|| gAbilities[aiData->abilities[battlerDef]].cantBeCopied)
|| gAbilitiesInfo[aiData->abilities[battlerAtk]].cantBeSuppressed
|| gAbilitiesInfo[aiData->abilities[battlerDef]].cantBeCopied)
ADJUST_SCORE(-10);
else if (IsAbilityOfRating(aiData->abilities[battlerAtk], 5))
ADJUST_SCORE(-4);
@ -2155,32 +2155,32 @@ static s32 AI_CheckBadMove(u32 battlerAtk, u32 battlerDef, u32 move, s32 score)
break;
case EFFECT_SKILL_SWAP:
if (aiData->abilities[battlerAtk] == ABILITY_NONE || aiData->abilities[battlerDef] == ABILITY_NONE
|| gAbilities[aiData->abilities[battlerAtk]].cantBeSwapped
|| gAbilities[aiData->abilities[battlerDef]].cantBeSwapped
|| gAbilitiesInfo[aiData->abilities[battlerAtk]].cantBeSwapped
|| gAbilitiesInfo[aiData->abilities[battlerDef]].cantBeSwapped
|| aiData->holdEffects[battlerDef] == HOLD_EFFECT_ABILITY_SHIELD)
ADJUST_SCORE(-10);
break;
case EFFECT_WORRY_SEED:
if (aiData->abilities[battlerDef] == ABILITY_INSOMNIA
|| gAbilities[aiData->abilities[battlerDef]].cantBeOverwritten
|| gAbilitiesInfo[aiData->abilities[battlerDef]].cantBeOverwritten
|| aiData->holdEffects[battlerDef] == HOLD_EFFECT_ABILITY_SHIELD)
ADJUST_SCORE(-10);
break;
case EFFECT_GASTRO_ACID:
if (gStatuses3[battlerDef] & STATUS3_GASTRO_ACID
|| gAbilities[aiData->abilities[battlerDef]].cantBeSuppressed)
|| gAbilitiesInfo[aiData->abilities[battlerDef]].cantBeSuppressed)
ADJUST_SCORE(-10);
break;
case EFFECT_ENTRAINMENT:
if (aiData->abilities[battlerAtk] == ABILITY_NONE
|| gAbilities[aiData->abilities[battlerAtk]].cantBeCopied
|| gAbilities[aiData->abilities[battlerDef]].cantBeOverwritten
|| gAbilitiesInfo[aiData->abilities[battlerAtk]].cantBeCopied
|| gAbilitiesInfo[aiData->abilities[battlerDef]].cantBeOverwritten
|| aiData->holdEffects[battlerAtk] == HOLD_EFFECT_ABILITY_SHIELD)
ADJUST_SCORE(-10);
break;
case EFFECT_SIMPLE_BEAM:
if (aiData->abilities[battlerDef] == ABILITY_SIMPLE
|| gAbilities[aiData->abilities[battlerDef]].cantBeOverwritten
|| gAbilitiesInfo[aiData->abilities[battlerDef]].cantBeOverwritten
|| aiData->holdEffects[battlerDef] == HOLD_EFFECT_ABILITY_SHIELD)
ADJUST_SCORE(-10);
break;
@ -2695,8 +2695,8 @@ static s32 AI_DoubleBattle(u32 battlerAtk, u32 battlerDef, u32 move, s32 score)
u32 atkPartnerAbility = aiData->abilities[BATTLE_PARTNER(battlerAtk)];
u32 atkPartnerHoldEffect = aiData->holdEffects[BATTLE_PARTNER(battlerAtk)];
bool32 partnerProtecting = (gBattleMoves[aiData->partnerMove].effect == EFFECT_PROTECT);
bool32 attackerHasBadAbility = (gAbilities[aiData->abilities[battlerAtk]].aiRating < 0);
bool32 partnerHasBadAbility = (gAbilities[atkPartnerAbility].aiRating < 0);
bool32 attackerHasBadAbility = (gAbilitiesInfo[aiData->abilities[battlerAtk]].aiRating < 0);
bool32 partnerHasBadAbility = (gAbilitiesInfo[atkPartnerAbility].aiRating < 0);
u32 predictedMove = aiData->predictedMoves[battlerDef];
SetTypeBeforeUsingMove(move, battlerAtk);
@ -4074,8 +4074,8 @@ static u32 AI_CalcMoveScore(u32 battlerAtk, u32 battlerDef, u32 move)
}
break;
case EFFECT_ROLE_PLAY:
if (!gAbilities[aiData->abilities[battlerAtk]].cantBeSuppressed
&& !gAbilities[aiData->abilities[battlerDef]].cantBeCopied
if (!gAbilitiesInfo[aiData->abilities[battlerAtk]].cantBeSuppressed
&& !gAbilitiesInfo[aiData->abilities[battlerDef]].cantBeCopied
&& !IsAbilityOfRating(aiData->abilities[battlerAtk], 5)
&& IsAbilityOfRating(aiData->abilities[battlerDef], 5))
ADJUST_SCORE(2);
@ -4117,7 +4117,7 @@ static u32 AI_CalcMoveScore(u32 battlerAtk, u32 battlerDef, u32 move)
ADJUST_SCORE(2);
break;
case EFFECT_SKILL_SWAP:
if (gAbilities[aiData->abilities[battlerDef]].aiRating > gAbilities[aiData->abilities[battlerAtk]].aiRating)
if (gAbilitiesInfo[aiData->abilities[battlerDef]].aiRating > gAbilitiesInfo[aiData->abilities[battlerAtk]].aiRating)
ADJUST_SCORE(2);
break;
case EFFECT_WORRY_SEED:
@ -4127,7 +4127,7 @@ static u32 AI_CalcMoveScore(u32 battlerAtk, u32 battlerDef, u32 move)
ADJUST_SCORE(2);
break;
case EFFECT_ENTRAINMENT:
if (IsAbilityOfRating(aiData->abilities[battlerDef], 5) || gAbilities[aiData->abilities[battlerAtk]].aiRating <= 0)
if (IsAbilityOfRating(aiData->abilities[battlerDef], 5) || gAbilitiesInfo[aiData->abilities[battlerAtk]].aiRating <= 0)
{
if (aiData->abilities[battlerDef] != aiData->abilities[battlerAtk] && !(gStatuses3[battlerDef] & STATUS3_GASTRO_ACID))
ADJUST_SCORE(2);

View file

@ -1261,7 +1261,7 @@ static bool32 IsMonGrounded(u16 heldItemEffect, u32 ability, u8 type1, u8 type2)
static u32 GetSwitchinHazardsDamage(u32 battler, struct BattlePokemon *battleMon)
{
u8 defType1 = battleMon->type1, defType2 = battleMon->type2, tSpikesLayers;
u16 heldItemEffect = gItems[battleMon->item].holdEffect;
u16 heldItemEffect = gItemsInfo[battleMon->item].holdEffect;
u32 maxHP = battleMon->maxHP, ability = battleMon->ability, status = battleMon->status1;
u32 spikesDamage = 0, tSpikesDamage = 0, hazardDamage = 0;
u32 hazardFlags = gSideStatuses[GetBattlerSide(battler)] & (SIDE_STATUS_SPIKES | SIDE_STATUS_STEALTH_ROCK | SIDE_STATUS_STICKY_WEB | SIDE_STATUS_TOXIC_SPIKES | SIDE_STATUS_SAFEGUARD);
@ -1444,7 +1444,7 @@ static u32 GetSwitchinStatusDamage(u32 battler)
{
u8 defType1 = AI_DATA->switchinCandidate.battleMon.type1, defType2 = AI_DATA->switchinCandidate.battleMon.type2;
u8 tSpikesLayers = gSideTimers[GetBattlerSide(battler)].toxicSpikesAmount;
u16 heldItemEffect = gItems[AI_DATA->switchinCandidate.battleMon.item].holdEffect;
u16 heldItemEffect = gItemsInfo[AI_DATA->switchinCandidate.battleMon.item].holdEffect;
u32 status = AI_DATA->switchinCandidate.battleMon.status1, ability = AI_DATA->switchinCandidate.battleMon.ability, maxHP = AI_DATA->switchinCandidate.battleMon.maxHP;
u32 statusDamage = 0;
@ -1521,8 +1521,8 @@ static u32 GetSwitchinHitsToKO(s32 damageTaken, u32 battler)
u32 recurringHealing = GetSwitchinRecurringHealing();
u32 statusDamage = GetSwitchinStatusDamage(battler);
u32 hitsToKO = 0, singleUseItemHeal = 0;
u16 maxHP = AI_DATA->switchinCandidate.battleMon.maxHP, item = AI_DATA->switchinCandidate.battleMon.item, heldItemEffect = gItems[AI_DATA->switchinCandidate.battleMon.item].holdEffect;
u8 weatherDuration = gWishFutureKnock.weatherDuration, holdEffectParam = gItems[AI_DATA->switchinCandidate.battleMon.item].holdEffectParam;
u16 maxHP = AI_DATA->switchinCandidate.battleMon.maxHP, item = AI_DATA->switchinCandidate.battleMon.item, heldItemEffect = gItemsInfo[AI_DATA->switchinCandidate.battleMon.item].holdEffect;
u8 weatherDuration = gWishFutureKnock.weatherDuration, holdEffectParam = gItemsInfo[AI_DATA->switchinCandidate.battleMon.item].holdEffectParam;
u32 opposingBattler = GetBattlerAtPosition(BATTLE_OPPOSITE(GetBattlerPosition(battler)));
u32 opposingAbility = gBattleMons[opposingBattler].ability;
bool32 usedSingleUseHealingItem = FALSE;

View file

@ -2258,7 +2258,7 @@ static bool32 PartyBattlerShouldAvoidHazards(u32 currBattler, u32 switchBattler)
if (gFieldStatuses & STATUS_FIELD_MAGIC_ROOM || ability == ABILITY_KLUTZ)
holdEffect = HOLD_EFFECT_NONE;
else
holdEffect = gItems[GetMonData(mon, MON_DATA_HELD_ITEM)].holdEffect;
holdEffect = gItemsInfo[GetMonData(mon, MON_DATA_HELD_ITEM)].holdEffect;
if (holdEffect == HOLD_EFFECT_HEAVY_DUTY_BOOTS)
return FALSE;
@ -3212,7 +3212,7 @@ bool32 SideHasMoveCategory(u32 battlerId, u32 category)
bool32 IsAbilityOfRating(u32 ability, s8 rating)
{
if (gAbilities[ability].aiRating >= rating)
if (gAbilitiesInfo[ability].aiRating >= rating)
return TRUE;
return FALSE;
}

View file

@ -868,7 +868,7 @@ static void PutAiInfoText(struct BattleDebugMenu *data)
u16 holdEffect = AI_DATA->holdEffects[i];
u16 item = AI_DATA->items[i];
u8 x = (i == B_POSITION_PLAYER_LEFT) ? 83 + (i) * 75 : 83 + (i-1) * 75;
AddTextPrinterParameterized(data->aiMovesWindowId, FONT_SMALL, gAbilities[ability].name, x, 0, 0, NULL);
AddTextPrinterParameterized(data->aiMovesWindowId, FONT_SMALL, gAbilitiesInfo[ability].name, x, 0, 0, NULL);
AddTextPrinterParameterized(data->aiMovesWindowId, FONT_SMALL, ItemId_GetName(item), x, 15, 0, NULL);
AddTextPrinterParameterized(data->aiMovesWindowId, FONT_SMALL, GetHoldEffectName(holdEffect), x, 30, 0, NULL);
}
@ -901,7 +901,7 @@ static void PutAiPartyText(struct BattleDebugMenu *data)
AddTextPrinterParameterized5(data->aiMovesWindowId, FONT_SMALL_NARROW, text, i * 41, 0, 0, NULL, 0, 0);
}
txtPtr = StringCopyN(text, gAbilities[aiMons[i].ability].name, 7); // The screen is too small to fit the whole string, so we need to drop the last letters.
txtPtr = StringCopyN(text, gAbilitiesInfo[aiMons[i].ability].name, 7); // The screen is too small to fit the whole string, so we need to drop the last letters.
*txtPtr = EOS;
AddTextPrinterParameterized5(data->aiMovesWindowId, FONT_SMALL_NARROW, text, i * 41, 15, 0, NULL, 0, 0);
@ -1441,7 +1441,7 @@ static void PrintSecondaryEntries(struct BattleDebugMenu *data)
}
break;
case LIST_ITEM_ABILITY:
PadString(gAbilities[gBattleMons[data->battlerId].ability].name, text);
PadString(gAbilitiesInfo[gBattleMons[data->battlerId].ability].name, text);
printer.currentY = printer.y = sSecondaryListTemplate.upText_Y;
AddTextPrinter(&printer, 0, NULL);
break;

View file

@ -3114,7 +3114,7 @@ static void PrintBattlerOnAbilityPopUp(u8 battlerId, u8 spriteId1, u8 spriteId2)
static void PrintAbilityOnAbilityPopUp(u32 ability, u8 spriteId1, u8 spriteId2)
{
PrintOnAbilityPopUp(gAbilities[ability].name,
PrintOnAbilityPopUp(gAbilitiesInfo[ability].name,
(void*)(OBJ_VRAM0) + (gSprites[spriteId1].oam.tileNum * 32) + 256,
(void*)(OBJ_VRAM0) + (gSprites[spriteId2].oam.tileNum * 32) + 256,
5, 12,

View file

@ -3423,19 +3423,19 @@ u32 BattleStringExpandPlaceholders(const u8 *src, u8 *dst)
}
break;
case B_TXT_LAST_ABILITY: // last used ability
toCpy = gAbilities[gLastUsedAbility].name;
toCpy = gAbilitiesInfo[gLastUsedAbility].name;
break;
case B_TXT_ATK_ABILITY: // attacker ability
toCpy = gAbilities[sBattlerAbilities[gBattlerAttacker]].name;
toCpy = gAbilitiesInfo[sBattlerAbilities[gBattlerAttacker]].name;
break;
case B_TXT_DEF_ABILITY: // target ability
toCpy = gAbilities[sBattlerAbilities[gBattlerTarget]].name;
toCpy = gAbilitiesInfo[sBattlerAbilities[gBattlerTarget]].name;
break;
case B_TXT_SCR_ACTIVE_ABILITY: // scripting active ability
toCpy = gAbilities[sBattlerAbilities[gBattleScripting.battler]].name;
toCpy = gAbilitiesInfo[sBattlerAbilities[gBattleScripting.battler]].name;
break;
case B_TXT_EFF_ABILITY: // effect battler ability
toCpy = gAbilities[sBattlerAbilities[gEffectBattler]].name;
toCpy = gAbilitiesInfo[sBattlerAbilities[gEffectBattler]].name;
break;
case B_TXT_TRAINER1_CLASS: // trainer class name
toCpy = BattleStringGetOpponentClassByTrainerId(gTrainerBattleOpponent_A);
@ -3814,7 +3814,7 @@ void ExpandBattleTextBuffPlaceholders(const u8 *src, u8 *dst)
srcID += 2;
break;
case B_BUFF_ABILITY: // ability names
StringAppend(dst, gAbilities[T1_READ_16(&src[srcID + 1])].name);
StringAppend(dst, gAbilitiesInfo[T1_READ_16(&src[srcID + 1])].name);
srcID += 3;
break;
case B_BUFF_ITEM: // item name

View file

@ -9308,7 +9308,7 @@ static void Cmd_various(void)
if (IsBattlerAlive(gBattlerAbility)
&& (i == ABILITY_RECEIVER || i == ABILITY_POWER_OF_ALCHEMY)
&& GetBattlerHoldEffect(battler, TRUE) != HOLD_EFFECT_ABILITY_SHIELD
&& !gAbilities[gBattleMons[battler].ability].cantBeCopied)
&& !gAbilitiesInfo[gBattleMons[battler].ability].cantBeCopied)
{
gBattleStruct->tracedAbility[gBattlerAbility] = gBattleMons[battler].ability; // re-using the variable for trace
gBattleScripting.battler = battler;
@ -9412,7 +9412,7 @@ static void Cmd_various(void)
case VARIOUS_SET_SIMPLE_BEAM:
{
VARIOUS_ARGS(const u8 *failInstr);
if (gAbilities[gBattleMons[gBattlerTarget].ability].cantBeOverwritten
if (gAbilitiesInfo[gBattleMons[gBattlerTarget].ability].cantBeOverwritten
|| gBattleMons[gBattlerTarget].ability == ABILITY_SIMPLE)
{
RecordAbilityBattle(gBattlerTarget, gBattleMons[gBattlerTarget].ability);
@ -9436,8 +9436,8 @@ static void Cmd_various(void)
case VARIOUS_TRY_ENTRAINMENT:
{
VARIOUS_ARGS(const u8 *failInstr);
if (gAbilities[gBattleMons[gBattlerAttacker].ability].cantBeCopied
|| gAbilities[gBattleMons[gBattlerTarget].ability].cantBeOverwritten)
if (gAbilitiesInfo[gBattleMons[gBattlerAttacker].ability].cantBeCopied
|| gAbilitiesInfo[gBattleMons[gBattlerTarget].ability].cantBeOverwritten)
{
RecordAbilityBattle(gBattlerTarget, gBattleMons[gBattlerTarget].ability);
gBattlescriptCurrInstr = cmd->failInstr;
@ -13988,9 +13988,9 @@ static void Cmd_trycopyability(void)
if (gBattleMons[battler].ability == defAbility
|| defAbility == ABILITY_NONE
|| gAbilities[gBattleMons[battler].ability].cantBeSuppressed
|| gAbilities[gBattleMons[BATTLE_PARTNER(battler)].ability].cantBeSuppressed
|| gAbilities[defAbility].cantBeCopied)
|| gAbilitiesInfo[gBattleMons[battler].ability].cantBeSuppressed
|| gAbilitiesInfo[gBattleMons[BATTLE_PARTNER(battler)].ability].cantBeSuppressed
|| gAbilitiesInfo[defAbility].cantBeCopied)
{
gBattlescriptCurrInstr = cmd->failInstr;
}
@ -14066,7 +14066,7 @@ static void Cmd_setgastroacid(void)
{
CMD_ARGS(const u8 *failInstr);
if (gAbilities[gBattleMons[gBattlerTarget].ability].cantBeSuppressed)
if (gAbilitiesInfo[gBattleMons[gBattlerTarget].ability].cantBeSuppressed)
{
gBattlescriptCurrInstr = cmd->failInstr;
}
@ -14166,8 +14166,8 @@ static void Cmd_tryswapabilities(void)
{
CMD_ARGS(const u8 *failInstr);
if (gAbilities[gBattleMons[gBattlerAttacker].ability].cantBeSwapped
|| gAbilities[gBattleMons[gBattlerTarget].ability].cantBeSwapped)
if (gAbilitiesInfo[gBattleMons[gBattlerAttacker].ability].cantBeSwapped
|| gAbilitiesInfo[gBattleMons[gBattlerTarget].ability].cantBeSwapped)
{
RecordAbilityBattle(gBattlerTarget, gBattleMons[gBattlerTarget].ability);
gBattlescriptCurrInstr = cmd->failInstr;
@ -15446,7 +15446,7 @@ static void Cmd_tryworryseed(void)
{
CMD_ARGS(const u8 *failInstr);
if (gAbilities[gBattleMons[gBattlerTarget].ability].cantBeOverwritten
if (gAbilitiesInfo[gBattleMons[gBattlerTarget].ability].cantBeOverwritten
|| gBattleMons[gBattlerTarget].ability == ABILITY_INSOMNIA)
{
RecordAbilityBattle(gBattlerTarget, gBattleMons[gBattlerTarget].ability);

View file

@ -5138,7 +5138,7 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32
&& gBattleStruct->overwrittenAbilities[gBattlerAttacker] != GetBattlerAbility(gBattlerTarget)
&& gBattleMons[gBattlerTarget].ability != ABILITY_MUMMY
&& gBattleMons[gBattlerTarget].ability != ABILITY_LINGERING_AROMA
&& !gAbilities[gBattleMons[gBattlerTarget].ability].cantBeSuppressed)
&& !gAbilitiesInfo[gBattleMons[gBattlerTarget].ability].cantBeSuppressed)
{
if (GetBattlerHoldEffect(gBattlerAttacker, TRUE) == HOLD_EFFECT_ABILITY_SHIELD)
{
@ -5159,7 +5159,7 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32
&& TARGET_TURN_DAMAGED
&& IsMoveMakingContact(move, gBattlerAttacker)
&& !IsDynamaxed(gBattlerTarget)
&& !gAbilities[gBattleMons[gBattlerAttacker].ability].cantBeSwapped)
&& !gAbilitiesInfo[gBattleMons[gBattlerAttacker].ability].cantBeSwapped)
{
if (GetBattlerHoldEffect(gBattlerAttacker, TRUE) == HOLD_EFFECT_ABILITY_SHIELD)
{
@ -5796,17 +5796,17 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32
if (gBattleTypeFlags & BATTLE_TYPE_DOUBLE)
{
if (!gAbilities[gBattleMons[target1].ability].cantBeTraced && gBattleMons[target1].hp != 0
&& !gAbilities[gBattleMons[target2].ability].cantBeTraced && gBattleMons[target2].hp != 0)
if (!gAbilitiesInfo[gBattleMons[target1].ability].cantBeTraced && gBattleMons[target1].hp != 0
&& !gAbilitiesInfo[gBattleMons[target2].ability].cantBeTraced && gBattleMons[target2].hp != 0)
chosenTarget = GetBattlerAtPosition((RandomPercentage(RNG_TRACE, 50) * 2) | side), effect++;
else if (!gAbilities[gBattleMons[target1].ability].cantBeTraced && gBattleMons[target1].hp != 0)
else if (!gAbilitiesInfo[gBattleMons[target1].ability].cantBeTraced && gBattleMons[target1].hp != 0)
chosenTarget = target1, effect++;
else if (!gAbilities[gBattleMons[target2].ability].cantBeTraced && gBattleMons[target2].hp != 0)
else if (!gAbilitiesInfo[gBattleMons[target2].ability].cantBeTraced && gBattleMons[target2].hp != 0)
chosenTarget = target2, effect++;
}
else
{
if (!gAbilities[gBattleMons[target1].ability].cantBeTraced && gBattleMons[target1].hp != 0)
if (!gAbilitiesInfo[gBattleMons[target1].ability].cantBeTraced && gBattleMons[target1].hp != 0)
chosenTarget = target1, effect++;
}
@ -6001,7 +6001,7 @@ bool32 IsMoldBreakerTypeAbility(u32 ability)
u32 GetBattlerAbility(u32 battler)
{
if (gAbilities[gBattleMons[battler].ability].cantBeSuppressed)
if (gAbilitiesInfo[gBattleMons[battler].ability].cantBeSuppressed)
return gBattleMons[battler].ability;
if (gStatuses3[battler] & STATUS3_GASTRO_ACID)
@ -6016,7 +6016,7 @@ u32 GetBattlerAbility(u32 battler)
if (((IsMoldBreakerTypeAbility(gBattleMons[gBattlerAttacker].ability)
&& !(gStatuses3[gBattlerAttacker] & STATUS3_GASTRO_ACID))
|| gBattleMoves[gCurrentMove].ignoresTargetAbility)
&& gAbilities[gBattleMons[battler].ability].breakable
&& gAbilitiesInfo[gBattleMons[battler].ability].breakable
&& gBattlerByTurnOrder[gCurrentTurnActionNumber] == gBattlerAttacker
&& gActionsByTurnOrder[gBattlerByTurnOrder[gBattlerAttacker]] == B_ACTION_USE_MOVE
&& gCurrentTurnActionNumber < gBattlersCount)

View file

@ -2166,7 +2166,7 @@ void ObjectEventInteractionApplyMulch(void)
u8 mulch = ITEM_TO_MULCH(gSpecialVar_ItemId);
gSaveBlock1Ptr->berryTrees[GetObjectEventBerryTreeId(gSelectedObjectEvent)].mulch = mulch;
StringExpandPlaceholders(gStringVar1, gItems[gSpecialVar_ItemId].name);
StringExpandPlaceholders(gStringVar1, gItemsInfo[gSpecialVar_ItemId].name);
}
void ObjectEventInteractionPickBerryTree(void)

View file

@ -1,4 +1,4 @@
const struct Ability gAbilities[ABILITIES_COUNT] =
const struct Ability gAbilitiesInfo[ABILITIES_COUNT] =
{
[ABILITY_NONE] =
{

View file

@ -140,7 +140,7 @@ static const u8 sGenericMulchDesc[] = _("A fertilizer that\n"
"is unsuitable for\n"
"local soil.");
const struct Item gItems[] =
const struct Item gItemsInfo[] =
{
[ITEM_NONE] =
{

View file

@ -3385,7 +3385,7 @@ static void DebugAction_Give_Pokemon_SelectNature(u8 taskId)
ConvertIntToDecimalStringN(gStringVar3, gTasks[taskId].tInput, STR_CONV_MODE_LEADING_ZEROS, 2);
StringCopyPadded(gStringVar3, gStringVar3, CHAR_SPACE, 15);
abilityId = GetAbilityBySpecies(sDebugMonData->species, 0);
StringCopy(gStringVar1, gAbilities[abilityId].name);
StringCopy(gStringVar1, gAbilitiesInfo[abilityId].name);
StringExpandPlaceholders(gStringVar4, sDebugText_PokemonAbility);
AddTextPrinterParameterized(gTasks[taskId].tSubWindowId, DEBUG_MENU_FONT, gStringVar4, 1, 1, 0, NULL);
@ -3430,7 +3430,7 @@ static void DebugAction_Give_Pokemon_SelectAbility(u8 taskId)
StringCopy(gStringVar2, gText_DigitIndicator[gTasks[taskId].tDigit]);
ConvertIntToDecimalStringN(gStringVar3, gTasks[taskId].tInput, STR_CONV_MODE_LEADING_ZEROS, 2);
StringCopyPadded(gStringVar3, gStringVar3, CHAR_SPACE, 15);
StringCopy(gStringVar1, gAbilities[abilityId].name);
StringCopy(gStringVar1, gAbilitiesInfo[abilityId].name);
StringExpandPlaceholders(gStringVar4, sDebugText_PokemonAbility);
AddTextPrinterParameterized(gTasks[taskId].tSubWindowId, DEBUG_MENU_FONT, gStringVar4, 1, 1, 0, NULL);
}

View file

@ -867,24 +867,24 @@ static u16 SanitizeItemId(u16 itemId)
const u8 *ItemId_GetName(u16 itemId)
{
if (DECAP_ENABLED && DECAP_MIRRORING && !DECAP_ITEM_NAMES)
return ROM_MIRROR_PTR(gItems[SanitizeItemId(itemId)].name);
return ROM_MIRROR_PTR(gItemsInfo[SanitizeItemId(itemId)].name);
else
return gItems[SanitizeItemId(itemId)].name;
return gItemsInfo[SanitizeItemId(itemId)].name;
}
u32 ItemId_GetPrice(u16 itemId)
{
return gItems[SanitizeItemId(itemId)].price;
return gItemsInfo[SanitizeItemId(itemId)].price;
}
static bool32 DoesItemHavePluralName(u16 itemId)
{
return (gItems[SanitizeItemId(itemId)].pluralName[0] != '\0');
return (gItemsInfo[SanitizeItemId(itemId)].pluralName[0] != '\0');
}
static const u8 *ItemId_GetPluralName(u16 itemId)
{
return gItems[SanitizeItemId(itemId)].pluralName;
return gItemsInfo[SanitizeItemId(itemId)].pluralName;
}
const u8 *ItemId_GetEffect(u32 itemId)
@ -892,42 +892,42 @@ const u8 *ItemId_GetEffect(u32 itemId)
if (itemId == ITEM_ENIGMA_BERRY_E_READER)
return gSaveBlock1Ptr->enigmaBerry.itemEffect;
else
return gItems[SanitizeItemId(itemId)].effect;
return gItemsInfo[SanitizeItemId(itemId)].effect;
}
u32 ItemId_GetHoldEffect(u32 itemId)
{
return gItems[SanitizeItemId(itemId)].holdEffect;
return gItemsInfo[SanitizeItemId(itemId)].holdEffect;
}
u32 ItemId_GetHoldEffectParam(u32 itemId)
{
return gItems[SanitizeItemId(itemId)].holdEffectParam;
return gItemsInfo[SanitizeItemId(itemId)].holdEffectParam;
}
const u8 *ItemId_GetDescription(u16 itemId)
{
return gItems[SanitizeItemId(itemId)].description;
return gItemsInfo[SanitizeItemId(itemId)].description;
}
u8 ItemId_GetImportance(u16 itemId)
{
return gItems[SanitizeItemId(itemId)].importance;
return gItemsInfo[SanitizeItemId(itemId)].importance;
}
u8 ItemId_GetPocket(u16 itemId)
{
return gItems[SanitizeItemId(itemId)].pocket;
return gItemsInfo[SanitizeItemId(itemId)].pocket;
}
u8 ItemId_GetType(u16 itemId)
{
return gItems[SanitizeItemId(itemId)].type;
return gItemsInfo[SanitizeItemId(itemId)].type;
}
ItemUseFunc ItemId_GetFieldFunc(u16 itemId)
{
return gItems[SanitizeItemId(itemId)].fieldUseFunc;
return gItemsInfo[SanitizeItemId(itemId)].fieldUseFunc;
}
// Returns an item's battle effect script ID.
@ -959,17 +959,17 @@ u8 ItemId_GetBattleUsage(u16 itemId)
}
}
else
return gItems[item].battleUsage;
return gItemsInfo[item].battleUsage;
}
u8 ItemId_GetSecondaryId(u16 itemId)
{
return gItems[SanitizeItemId(itemId)].secondaryId;
return gItemsInfo[SanitizeItemId(itemId)].secondaryId;
}
u32 ItemId_GetFlingPower(u32 itemId)
{
return gItems[SanitizeItemId(itemId)].flingPower;
return gItemsInfo[SanitizeItemId(itemId)].flingPower;
}

View file

@ -4701,7 +4701,7 @@ void Task_AbilityCapsule(u8 taskId)
}
gPartyMenuUseExitCallback = TRUE;
GetMonNickname(&gPlayerParty[tMonId], gStringVar1);
StringCopy(gStringVar2, gAbilities[GetAbilityBySpecies(tSpecies, tAbilityNum)].name);
StringCopy(gStringVar2, gAbilitiesInfo[GetAbilityBySpecies(tSpecies, tAbilityNum)].name);
StringExpandPlaceholders(gStringVar4, askText);
PlaySE(SE_SELECT);
DisplayPartyMenuMessage(gStringVar4, 1);
@ -4788,7 +4788,7 @@ void Task_AbilityPatch(u8 taskId)
}
gPartyMenuUseExitCallback = TRUE;
GetMonNickname(&gPlayerParty[tMonId], gStringVar1);
StringCopy(gStringVar2, gAbilities[GetAbilityBySpecies(tSpecies, tAbilityNum)].name);
StringCopy(gStringVar2, gAbilitiesInfo[GetAbilityBySpecies(tSpecies, tAbilityNum)].name);
StringExpandPlaceholders(gStringVar4, askText);
PlaySE(SE_SELECT);
DisplayPartyMenuMessage(gStringVar4, 1);
@ -5235,7 +5235,7 @@ void ItemUseCB_PPUp(u8 taskId, TaskFunc task)
u16 ItemIdToBattleMoveId(u16 item)
{
return (ItemId_GetPocket(item) == POCKET_TM_HM) ? gItems[item].secondaryId : MOVE_NONE;
return (ItemId_GetPocket(item) == POCKET_TM_HM) ? gItemsInfo[item].secondaryId : MOVE_NONE;
}
bool8 MonKnowsMove(struct Pokemon *mon, u16 move)

View file

@ -6002,21 +6002,21 @@ static void PrintStatsScreen_Abilities(u8 taskId)
if (gTasks[taskId].data[5] == 0)
{
ability0 = sPokedexView->sPokemonStats.ability0;
PrintStatsScreenTextSmallWhite(WIN_STATS_ABILITIES, gAbilities[ability0].name, abilities_x, abilities_y);
PrintStatsScreenTextSmall(WIN_STATS_ABILITIES, gAbilities[ability0].description, abilities_x, abilities_y + 14);
PrintStatsScreenTextSmallWhite(WIN_STATS_ABILITIES, gAbilitiesInfo[ability0].name, abilities_x, abilities_y);
PrintStatsScreenTextSmall(WIN_STATS_ABILITIES, gAbilitiesInfo[ability0].description, abilities_x, abilities_y + 14);
ability1 = sPokedexView->sPokemonStats.ability1;
if (ability1 != ABILITY_NONE && ability1 != ability0)
{
PrintStatsScreenTextSmallWhite(WIN_STATS_ABILITIES, gAbilities[ability1].name, abilities_x, abilities_y + 30);
PrintStatsScreenTextSmall(WIN_STATS_ABILITIES, gAbilities[ability1].description, abilities_x, abilities_y + 44);
PrintStatsScreenTextSmallWhite(WIN_STATS_ABILITIES, gAbilitiesInfo[ability1].name, abilities_x, abilities_y + 30);
PrintStatsScreenTextSmall(WIN_STATS_ABILITIES, gAbilitiesInfo[ability1].description, abilities_x, abilities_y + 44);
}
}
else //Hidden abilities
{
abilityHidden = sPokedexView->sPokemonStats.abilityHidden;
PrintStatsScreenTextSmallWhite(WIN_STATS_ABILITIES, gAbilities[abilityHidden].name, abilities_x, abilities_y);
PrintStatsScreenTextSmall(WIN_STATS_ABILITIES, gAbilities[abilityHidden].description, abilities_x, abilities_y + 14);
PrintStatsScreenTextSmallWhite(WIN_STATS_ABILITIES, gAbilitiesInfo[abilityHidden].name, abilities_x, abilities_y);
PrintStatsScreenTextSmall(WIN_STATS_ABILITIES, gAbilitiesInfo[abilityHidden].description, abilities_x, abilities_y + 14);
}
}

View file

@ -3198,13 +3198,13 @@ static void PrintMonOTID(void)
static void PrintMonAbilityName(void)
{
u16 ability = GetAbilityBySpecies(sMonSummaryScreen->summary.species, sMonSummaryScreen->summary.abilityNum);
PrintTextOnWindow(AddWindowFromTemplateList(sPageInfoTemplate, PSS_DATA_WINDOW_INFO_ABILITY), gAbilities[ability].name, 0, 1, 0, 1);
PrintTextOnWindow(AddWindowFromTemplateList(sPageInfoTemplate, PSS_DATA_WINDOW_INFO_ABILITY), gAbilitiesInfo[ability].name, 0, 1, 0, 1);
}
static void PrintMonAbilityDescription(void)
{
u16 ability = GetAbilityBySpecies(sMonSummaryScreen->summary.species, sMonSummaryScreen->summary.abilityNum);
PrintTextOnWindow(AddWindowFromTemplateList(sPageInfoTemplate, PSS_DATA_WINDOW_INFO_ABILITY), gAbilities[ability].description, 0, 17, 0, 0);
PrintTextOnWindow(AddWindowFromTemplateList(sPageInfoTemplate, PSS_DATA_WINDOW_INFO_ABILITY), gAbilitiesInfo[ability].description, 0, 17, 0, 0);
}
static void BufferMonTrainerMemo(void)

View file

@ -151,9 +151,9 @@ static const struct GFRomHeader sGFRomHeader = {
.externalEventDataOffset = offsetof(struct SaveBlock1, externalEventData),
.unk18 = 0x00000000,
.speciesInfo = gSpeciesInfo,
//.abilityNames = gAbilityNames, //handled in gAbilities
//.abilityDescriptions = gAbilityDescriptionPointers, //handled in gAbilities
.items = gItems,
//.abilityNames = gAbilityNames, //handled in gAbilitiesInfo
//.abilityDescriptions = gAbilityDescriptionPointers, //handled in gAbilitiesInfo
.items = gItemsInfo,
.moves = gBattleMoves,
.ballGfx = gBallSpriteSheets,
.ballPalettes = gBallSpritePalettes,

View file

@ -38,7 +38,7 @@ static const struct RHHRomHeader sRHHRomHeader =
.movesCount = MOVES_COUNT,
.numSpecies = NUM_SPECIES,
.abilitiesCount = ABILITIES_COUNT,
.abilities = gAbilities,
.abilities = gAbilitiesInfo,
.itemsCount = ITEMS_COUNT,
.itemNameLength = ITEM_NAME_LENGTH,
};

View file

@ -73,8 +73,8 @@ SINGLE_BATTLE_TEST("Corrosion can poison Poison- and Steel-type targets if it us
GIVEN {
ASSUME(gBattleMoves[MOVE_FLING].effect == EFFECT_FLING);
ASSUME(gItems[ITEM_POISON_BARB].holdEffect == HOLD_EFFECT_POISON_POWER);
ASSUME(gItems[ITEM_TOXIC_ORB].holdEffect == HOLD_EFFECT_TOXIC_ORB);
ASSUME(gItemsInfo[ITEM_POISON_BARB].holdEffect == HOLD_EFFECT_POISON_POWER);
ASSUME(gItemsInfo[ITEM_TOXIC_ORB].holdEffect == HOLD_EFFECT_TOXIC_ORB);
PLAYER(SPECIES_SALANDIT) { Ability(ABILITY_CORROSION); Item(heldItem); }
OPPONENT(SPECIES_ODDISH);
} WHEN {
@ -93,7 +93,7 @@ SINGLE_BATTLE_TEST("Corrosion can poison Poison- and Steel-type targets if it us
SINGLE_BATTLE_TEST("If a Poison- or Steel-type Pokémon with Corrosion holds a Toxic Orb, it will badly poison itself")
{
GIVEN {
ASSUME(gItems[ITEM_TOXIC_ORB].holdEffect == HOLD_EFFECT_TOXIC_ORB);
ASSUME(gItemsInfo[ITEM_TOXIC_ORB].holdEffect == HOLD_EFFECT_TOXIC_ORB);
PLAYER(SPECIES_SALANDIT) { Ability(ABILITY_CORROSION); Item(ITEM_TOXIC_ORB); }
OPPONENT(SPECIES_ODDISH);
} WHEN {

View file

@ -99,7 +99,7 @@ DOUBLE_BATTLE_TEST("Intimidate doesn't activate on an empty field in a double ba
SINGLE_BATTLE_TEST("Intimidate and Eject Button force the opponent to Attack")
{
GIVEN {
ASSUME(gItems[ITEM_EJECT_BUTTON].holdEffect == HOLD_EFFECT_EJECT_BUTTON);
ASSUME(gItemsInfo[ITEM_EJECT_BUTTON].holdEffect == HOLD_EFFECT_EJECT_BUTTON);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_EJECT_BUTTON); }
OPPONENT(SPECIES_HITMONTOP) { Moves(MOVE_TACKLE); }

View file

@ -33,8 +33,8 @@ SINGLE_BATTLE_TEST("Leaf Guard prevents status conditions from Flame Orb and Tox
PARAMETRIZE { item = ITEM_FLAME_ORB; }
PARAMETRIZE { item = ITEM_TOXIC_ORB; }
GIVEN {
ASSUME(gItems[ITEM_FLAME_ORB].holdEffect == HOLD_EFFECT_FLAME_ORB);
ASSUME(gItems[ITEM_TOXIC_ORB].holdEffect == HOLD_EFFECT_TOXIC_ORB);
ASSUME(gItemsInfo[ITEM_FLAME_ORB].holdEffect == HOLD_EFFECT_FLAME_ORB);
ASSUME(gItemsInfo[ITEM_TOXIC_ORB].holdEffect == HOLD_EFFECT_TOXIC_ORB);
PLAYER(SPECIES_LEAFEON) { Ability(ABILITY_LEAF_GUARD); Item(item); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {

View file

@ -4,7 +4,7 @@
SINGLE_BATTLE_TEST("Magician does not get self-damage recoil after stealing Life Orb")
{
GIVEN {
ASSUME(gItems[ITEM_LIFE_ORB].holdEffect == HOLD_EFFECT_LIFE_ORB);
ASSUME(gItemsInfo[ITEM_LIFE_ORB].holdEffect == HOLD_EFFECT_LIFE_ORB);
ASSUME(gBattleMoves[MOVE_TACKLE].power != 0);
PLAYER(SPECIES_DELPHOX) { Ability(ABILITY_MAGICIAN); Item(ITEM_NONE); }
OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_LIFE_ORB); }

View file

@ -106,7 +106,7 @@ SINGLE_BATTLE_TEST("Own Tempo cures confusion if it's obtained via Skill Swap")
SINGLE_BATTLE_TEST("Own Tempo prevents confusion from items")
{
GIVEN {
ASSUME(gItems[ITEM_BERSERK_GENE].holdEffect == HOLD_EFFECT_BERSERK_GENE);
ASSUME(gItemsInfo[ITEM_BERSERK_GENE].holdEffect == HOLD_EFFECT_BERSERK_GENE);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_SLOWPOKE) { Ability(ABILITY_OWN_TEMPO); Item(ITEM_BERSERK_GENE); };
} WHEN {

View file

@ -19,7 +19,7 @@ SINGLE_BATTLE_TEST("Stench does not stack with King's Rock")
{
PASSES_RANDOMLY(1, 10, RNG_STENCH);
GIVEN {
ASSUME(gItems[ITEM_KINGS_ROCK].holdEffect == HOLD_EFFECT_FLINCH);
ASSUME(gItemsInfo[ITEM_KINGS_ROCK].holdEffect == HOLD_EFFECT_FLINCH);
ASSUME(gBattleMoves[MOVE_TACKLE].power > 0);
PLAYER(SPECIES_GRIMER) { Ability(ABILITY_STENCH); Item(ITEM_KINGS_ROCK); }

View file

@ -181,7 +181,7 @@ SINGLE_BATTLE_TEST("Scope Lens increases the critical hit ratio by one stage")
{
PASSES_RANDOMLY(1, 8, RNG_CRITICAL_HIT);
GIVEN {
ASSUME(gItems[ITEM_SCOPE_LENS].holdEffect == HOLD_EFFECT_SCOPE_LENS);
ASSUME(gItemsInfo[ITEM_SCOPE_LENS].holdEffect == HOLD_EFFECT_SCOPE_LENS);
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_SCOPE_LENS); };
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
@ -196,7 +196,7 @@ SINGLE_BATTLE_TEST("High crit rate, Super Luck and Scope Lens cause the move to
{
GIVEN {
ASSUME(gBattleMoves[MOVE_SLASH].criticalHitStage == 1);
ASSUME(gItems[ITEM_SCOPE_LENS].holdEffect == HOLD_EFFECT_SCOPE_LENS);
ASSUME(gItemsInfo[ITEM_SCOPE_LENS].holdEffect == HOLD_EFFECT_SCOPE_LENS);
PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_SUPER_LUCK); Item(ITEM_SCOPE_LENS); };
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
@ -221,8 +221,8 @@ SINGLE_BATTLE_TEST("Signature items Leek and Lucky Punch increase the critical h
PARAMETRIZE { species = SPECIES_CHANSEY; item = ITEM_LUCKY_PUNCH; }
GIVEN {
ASSUME(gItems[ITEM_LEEK].holdEffect == HOLD_EFFECT_LEEK);
ASSUME(gItems[ITEM_LUCKY_PUNCH].holdEffect == HOLD_EFFECT_LUCKY_PUNCH);
ASSUME(gItemsInfo[ITEM_LEEK].holdEffect == HOLD_EFFECT_LEEK);
ASSUME(gItemsInfo[ITEM_LUCKY_PUNCH].holdEffect == HOLD_EFFECT_LUCKY_PUNCH);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(species) { Item(item); }
} WHEN {
@ -237,7 +237,7 @@ SINGLE_BATTLE_TEST("Dire Hit increases a battler's critical hit chance by 2 stag
{
PASSES_RANDOMLY(1, 2, RNG_CRITICAL_HIT);
GIVEN {
ASSUME(gItems[ITEM_DIRE_HIT].battleUsage == EFFECT_ITEM_SET_FOCUS_ENERGY);
ASSUME(gItemsInfo[ITEM_DIRE_HIT].battleUsage == EFFECT_ITEM_SET_FOCUS_ENERGY);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {

View file

@ -157,7 +157,7 @@ SINGLE_BATTLE_TEST("Primal reversion happens after a switch-in caused by Eject B
{
GIVEN {
ASSUME(gBattleMoves[MOVE_TACKLE].power != 0);
ASSUME(gItems[ITEM_EJECT_BUTTON].holdEffect == HOLD_EFFECT_EJECT_BUTTON);
ASSUME(gItemsInfo[ITEM_EJECT_BUTTON].holdEffect == HOLD_EFFECT_EJECT_BUTTON);
PLAYER(SPECIES_WOBBUFFET) {Item(ITEM_EJECT_BUTTON); }
PLAYER(SPECIES_GROUDON) { Item(ITEM_RED_ORB); }
OPPONENT(SPECIES_WOBBUFFET);
@ -178,7 +178,7 @@ SINGLE_BATTLE_TEST("Primal reversion happens after a switch-in caused by Red Car
{
GIVEN {
ASSUME(gBattleMoves[MOVE_TACKLE].power != 0);
ASSUME(gItems[ITEM_RED_CARD].holdEffect == HOLD_EFFECT_RED_CARD);
ASSUME(gItemsInfo[ITEM_RED_CARD].holdEffect == HOLD_EFFECT_RED_CARD);
PLAYER(SPECIES_WOBBUFFET);
PLAYER(SPECIES_GROUDON) { Item(ITEM_RED_ORB); }
OPPONENT(SPECIES_WOBBUFFET) {Item(ITEM_RED_CARD); }

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_AIR_BALLOON].holdEffect == HOLD_EFFECT_AIR_BALLOON);
ASSUME(gItemsInfo[ITEM_AIR_BALLOON].holdEffect == HOLD_EFFECT_AIR_BALLOON);
ASSUME(gBattleMoves[MOVE_EARTHQUAKE].type == TYPE_GROUND);
ASSUME(gBattleMoves[MOVE_TACKLE].type != TYPE_GROUND);
ASSUME(gBattleMoves[MOVE_RECYCLE].effect == EFFECT_RECYCLE);

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_LIECHI_BERRY].holdEffect == HOLD_EFFECT_ATTACK_UP);
ASSUME(gItemsInfo[ITEM_LIECHI_BERRY].holdEffect == HOLD_EFFECT_ATTACK_UP);
ASSUME(gBattleMoves[MOVE_DRAGON_RAGE].effect == EFFECT_FIXED_DAMAGE_ARG);
ASSUME(gBattleMoves[MOVE_DRAGON_RAGE].argument == 40);
}

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_BERSERK_GENE].holdEffect == HOLD_EFFECT_BERSERK_GENE);
ASSUME(gItemsInfo[ITEM_BERSERK_GENE].holdEffect == HOLD_EFFECT_BERSERK_GENE);
}
SINGLE_BATTLE_TEST("Berserk Gene sharply raises attack at the start of a single battle", s16 damage)

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_CLEAR_AMULET].holdEffect == HOLD_EFFECT_CLEAR_AMULET);
ASSUME(gItemsInfo[ITEM_CLEAR_AMULET].holdEffect == HOLD_EFFECT_CLEAR_AMULET);
}
SINGLE_BATTLE_TEST("Clear Amulet prevents Intimidate")

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_LANSAT_BERRY].holdEffect == HOLD_EFFECT_CRITICAL_UP);
ASSUME(gItemsInfo[ITEM_LANSAT_BERRY].holdEffect == HOLD_EFFECT_CRITICAL_UP);
ASSUME(gBattleMoves[MOVE_DRAGON_RAGE].effect == EFFECT_FIXED_DAMAGE_ARG);
ASSUME(gBattleMoves[MOVE_DRAGON_RAGE].argument == 40);
}

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_LUM_BERRY].holdEffect == HOLD_EFFECT_CURE_STATUS);
ASSUME(gItemsInfo[ITEM_LUM_BERRY].holdEffect == HOLD_EFFECT_CURE_STATUS);
}
SINGLE_BATTLE_TEST("Pecha and Lum Berries cure poison")
@ -14,7 +14,7 @@ SINGLE_BATTLE_TEST("Pecha and Lum Berries cure poison")
PARAMETRIZE { item = ITEM_LUM_BERRY; }
GIVEN {
ASSUME(gItems[ITEM_PECHA_BERRY].holdEffect == HOLD_EFFECT_CURE_PSN);
ASSUME(gItemsInfo[ITEM_PECHA_BERRY].holdEffect == HOLD_EFFECT_CURE_PSN);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET) { Item(item); }
} WHEN {
@ -36,7 +36,7 @@ SINGLE_BATTLE_TEST("Pecha and Lum Berries cure bad poison")
PARAMETRIZE { item = ITEM_LUM_BERRY; }
GIVEN {
ASSUME(gItems[ITEM_PECHA_BERRY].holdEffect == HOLD_EFFECT_CURE_PSN);
ASSUME(gItemsInfo[ITEM_PECHA_BERRY].holdEffect == HOLD_EFFECT_CURE_PSN);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET) { Item(item); }
} WHEN {
@ -58,7 +58,7 @@ SINGLE_BATTLE_TEST("Rawst and Lum Berries cure burn")
PARAMETRIZE { item = ITEM_LUM_BERRY; }
GIVEN {
ASSUME(gItems[ITEM_RAWST_BERRY].holdEffect == HOLD_EFFECT_CURE_BRN);
ASSUME(gItemsInfo[ITEM_RAWST_BERRY].holdEffect == HOLD_EFFECT_CURE_BRN);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET) { Item(item); }
} WHEN {
@ -80,7 +80,7 @@ SINGLE_BATTLE_TEST("Aspear and Lum Berries cure freeze")
PARAMETRIZE { item = ITEM_LUM_BERRY; }
GIVEN {
ASSUME(gItems[ITEM_ASPEAR_BERRY].holdEffect == HOLD_EFFECT_CURE_FRZ);
ASSUME(gItemsInfo[ITEM_ASPEAR_BERRY].holdEffect == HOLD_EFFECT_CURE_FRZ);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET) { Item(item); }
} WHEN {
@ -102,7 +102,7 @@ SINGLE_BATTLE_TEST("Chesto and Lum Berries cure sleep")
PARAMETRIZE { item = ITEM_LUM_BERRY; }
GIVEN {
ASSUME(gItems[ITEM_CHESTO_BERRY].holdEffect == HOLD_EFFECT_CURE_SLP);
ASSUME(gItemsInfo[ITEM_CHESTO_BERRY].holdEffect == HOLD_EFFECT_CURE_SLP);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET) { Item(item); }
} WHEN {
@ -124,7 +124,7 @@ SINGLE_BATTLE_TEST("Cheri and Lum Berries cure paralysis")
PARAMETRIZE { item = ITEM_LUM_BERRY; }
GIVEN {
ASSUME(gItems[ITEM_CHERI_BERRY].holdEffect == HOLD_EFFECT_CURE_PAR);
ASSUME(gItemsInfo[ITEM_CHERI_BERRY].holdEffect == HOLD_EFFECT_CURE_PAR);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET) { Item(item); }
} WHEN {
@ -146,7 +146,7 @@ SINGLE_BATTLE_TEST("Perism and Lum Berries cure confusion")
PARAMETRIZE { item = ITEM_LUM_BERRY; }
GIVEN {
ASSUME(gItems[ITEM_PERSIM_BERRY].holdEffect == HOLD_EFFECT_CURE_CONFUSION);
ASSUME(gItemsInfo[ITEM_PERSIM_BERRY].holdEffect == HOLD_EFFECT_CURE_CONFUSION);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET) { Item(item); }
} WHEN {
@ -171,11 +171,11 @@ SINGLE_BATTLE_TEST("Berry hold effect cures status if a pokemon enters a battle"
PARAMETRIZE{ status = STATUS1_SLEEP; item = ITEM_CHESTO_BERRY; }
GIVEN {
ASSUME(gItems[ITEM_RAWST_BERRY].holdEffect == HOLD_EFFECT_CURE_BRN);
ASSUME(gItems[ITEM_ASPEAR_BERRY].holdEffect == HOLD_EFFECT_CURE_FRZ);
ASSUME(gItems[ITEM_CHERI_BERRY].holdEffect == HOLD_EFFECT_CURE_PAR);
ASSUME(gItems[ITEM_PECHA_BERRY].holdEffect == HOLD_EFFECT_CURE_PSN);
ASSUME(gItems[ITEM_CHESTO_BERRY].holdEffect == HOLD_EFFECT_CURE_SLP);
ASSUME(gItemsInfo[ITEM_RAWST_BERRY].holdEffect == HOLD_EFFECT_CURE_BRN);
ASSUME(gItemsInfo[ITEM_ASPEAR_BERRY].holdEffect == HOLD_EFFECT_CURE_FRZ);
ASSUME(gItemsInfo[ITEM_CHERI_BERRY].holdEffect == HOLD_EFFECT_CURE_PAR);
ASSUME(gItemsInfo[ITEM_PECHA_BERRY].holdEffect == HOLD_EFFECT_CURE_PSN);
ASSUME(gItemsInfo[ITEM_CHESTO_BERRY].holdEffect == HOLD_EFFECT_CURE_SLP);
PLAYER(SPECIES_WOBBUFFET) { Status1(status); Item(ITEM_LUM_BERRY); }
OPPONENT(SPECIES_WOBBUFFET) { Status1(status); Item(item); }
} WHEN {
@ -194,8 +194,8 @@ SINGLE_BATTLE_TEST("Opponent Pokemon can be further poisoned with Toxic spikes a
PARAMETRIZE { item = ITEM_LUM_BERRY; }
GIVEN {
ASSUME(gItems[ITEM_PECHA_BERRY].holdEffect == HOLD_EFFECT_CURE_PSN);
ASSUME(gItems[ITEM_LUM_BERRY].holdEffect == HOLD_EFFECT_CURE_STATUS);
ASSUME(gItemsInfo[ITEM_PECHA_BERRY].holdEffect == HOLD_EFFECT_CURE_PSN);
ASSUME(gItemsInfo[ITEM_LUM_BERRY].holdEffect == HOLD_EFFECT_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WYNAUT) { Item(item); }
@ -234,8 +234,8 @@ SINGLE_BATTLE_TEST("Player Pokemon can be further poisoned with Toxic spikes aft
PARAMETRIZE { item = ITEM_LUM_BERRY; }
GIVEN {
ASSUME(gItems[ITEM_PECHA_BERRY].holdEffect == HOLD_EFFECT_CURE_PSN);
ASSUME(gItems[ITEM_LUM_BERRY].holdEffect == HOLD_EFFECT_CURE_STATUS);
ASSUME(gItemsInfo[ITEM_PECHA_BERRY].holdEffect == HOLD_EFFECT_CURE_PSN);
ASSUME(gItemsInfo[ITEM_LUM_BERRY].holdEffect == HOLD_EFFECT_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET);
PLAYER(SPECIES_WOBBUFFET) {Item(item); }
PLAYER(SPECIES_WYNAUT);

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_CUSTAP_BERRY].holdEffect == HOLD_EFFECT_CUSTAP_BERRY);
ASSUME(gItemsInfo[ITEM_CUSTAP_BERRY].holdEffect == HOLD_EFFECT_CUSTAP_BERRY);
}
SINGLE_BATTLE_TEST("Custap Berry allows the holder to move first in its priority bracket when HP is below 1/4")

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_GANLON_BERRY].holdEffect == HOLD_EFFECT_DEFENSE_UP);
ASSUME(gItemsInfo[ITEM_GANLON_BERRY].holdEffect == HOLD_EFFECT_DEFENSE_UP);
ASSUME(gBattleMoves[MOVE_DRAGON_RAGE].effect == EFFECT_FIXED_DAMAGE_ARG);
ASSUME(gBattleMoves[MOVE_DRAGON_RAGE].argument == 40);
}

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_EJECT_BUTTON].holdEffect == HOLD_EFFECT_EJECT_BUTTON);
ASSUME(gItemsInfo[ITEM_EJECT_BUTTON].holdEffect == HOLD_EFFECT_EJECT_BUTTON);
}
SINGLE_BATTLE_TEST("Eject Button is not triggered when there is nothing to switch in")

View file

@ -3,13 +3,13 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_EJECT_PACK].holdEffect == HOLD_EFFECT_EJECT_PACK);
ASSUME(gItemsInfo[ITEM_EJECT_PACK].holdEffect == HOLD_EFFECT_EJECT_PACK);
}
SINGLE_BATTLE_TEST("Eject Pack does not cause the new pokemon to lose hp due to it's held Life Orb")
{
GIVEN {
ASSUME(gItems[ITEM_LIFE_ORB].holdEffect == HOLD_EFFECT_LIFE_ORB);
ASSUME(gItemsInfo[ITEM_LIFE_ORB].holdEffect == HOLD_EFFECT_LIFE_ORB);
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_EJECT_PACK); }
PLAYER(SPECIES_WYNAUT) { Item(ITEM_LIFE_ORB); }
OPPONENT(SPECIES_WOBBUFFET);

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_ENIGMA_BERRY].holdEffect == HOLD_EFFECT_ENIGMA_BERRY);
ASSUME(gItemsInfo[ITEM_ENIGMA_BERRY].holdEffect == HOLD_EFFECT_ENIGMA_BERRY);
}
SINGLE_BATTLE_TEST("Enigma Berry recovers 25% of HP if hit by super effective move")

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_NORMAL_GEM].holdEffect == HOLD_EFFECT_GEMS);
ASSUME(gItemsInfo[ITEM_NORMAL_GEM].holdEffect == HOLD_EFFECT_GEMS);
}
SINGLE_BATTLE_TEST("Gem is consumed when it corresponds to the type of a move")

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_JABOCA_BERRY].holdEffect == HOLD_EFFECT_JABOCA_BERRY);
ASSUME(gItemsInfo[ITEM_JABOCA_BERRY].holdEffect == HOLD_EFFECT_JABOCA_BERRY);
ASSUME(gBattleMoves[MOVE_TACKLE].category == BATTLE_CATEGORY_PHYSICAL);
}

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_KEE_BERRY].holdEffect == HOLD_EFFECT_KEE_BERRY);
ASSUME(gItemsInfo[ITEM_KEE_BERRY].holdEffect == HOLD_EFFECT_KEE_BERRY);
ASSUME(gBattleMoves[MOVE_TACKLE].category == BATTLE_CATEGORY_PHYSICAL);
}

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_LEFTOVERS].holdEffect == HOLD_EFFECT_LEFTOVERS);
ASSUME(gItemsInfo[ITEM_LEFTOVERS].holdEffect == HOLD_EFFECT_LEFTOVERS);
}
SINGLE_BATTLE_TEST("Leftovers recovers 1/16th HP at end of turn")

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_MARANGA_BERRY].holdEffect == HOLD_EFFECT_MARANGA_BERRY);
ASSUME(gItemsInfo[ITEM_MARANGA_BERRY].holdEffect == HOLD_EFFECT_MARANGA_BERRY);
}
SINGLE_BATTLE_TEST("Maranga Berry raises the holder's Sp. Def by one stage when hit by a special move")

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_METRONOME].holdEffect == HOLD_EFFECT_METRONOME);
ASSUME(gItemsInfo[ITEM_METRONOME].holdEffect == HOLD_EFFECT_METRONOME);
}
const uq4_12_t MetronomeMultipliers[] = {

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_MICLE_BERRY].holdEffect == HOLD_EFFECT_MICLE_BERRY);
ASSUME(gItemsInfo[ITEM_MICLE_BERRY].holdEffect == HOLD_EFFECT_MICLE_BERRY);
ASSUME(gBattleMoves[MOVE_DRAGON_RAGE].effect == EFFECT_FIXED_DAMAGE_ARG);
ASSUME(gBattleMoves[MOVE_DRAGON_RAGE].argument == 40);
}

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_MIRROR_HERB].holdEffect == HOLD_EFFECT_MIRROR_HERB);
ASSUME(gItemsInfo[ITEM_MIRROR_HERB].holdEffect == HOLD_EFFECT_MIRROR_HERB);
}
SINGLE_BATTLE_TEST("Mirror Herb copies all of foe's positive stat changes in a turn", s16 damage)
@ -38,7 +38,7 @@ SINGLE_BATTLE_TEST("Mirror Herb copies all of foe's positive stat changes in a t
SINGLE_BATTLE_TEST("Mirror Herb copies all of Stuff Cheeks' stat boosts")
{
GIVEN {
ASSUME(gItems[ITEM_LIECHI_BERRY].holdEffect == HOLD_EFFECT_ATTACK_UP);
ASSUME(gItemsInfo[ITEM_LIECHI_BERRY].holdEffect == HOLD_EFFECT_ATTACK_UP);
PLAYER(SPECIES_SKWOVET) { Item(ITEM_LIECHI_BERRY); }
OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_MIRROR_HERB); }
} WHEN {

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_QUICK_CLAW].holdEffect == HOLD_EFFECT_QUICK_CLAW);
ASSUME(gItemsInfo[ITEM_QUICK_CLAW].holdEffect == HOLD_EFFECT_QUICK_CLAW);
}
SINGLE_BATTLE_TEST("Quick Claw activates 10% of the time")

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_STARF_BERRY].holdEffect == HOLD_EFFECT_RANDOM_STAT_UP);
ASSUME(gItemsInfo[ITEM_STARF_BERRY].holdEffect == HOLD_EFFECT_RANDOM_STAT_UP);
}
TO_DO_BATTLE_TEST("Starf Berry randomly raises the holder's Attack, Defense, Sp. Atk, Sp. Def, or Speed by two stages when the holder's HP drop to 1/4 or below")

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_RED_CARD].holdEffect == HOLD_EFFECT_RED_CARD);
ASSUME(gItemsInfo[ITEM_RED_CARD].holdEffect == HOLD_EFFECT_RED_CARD);
}
SINGLE_BATTLE_TEST("Red Card switches the attacker with a random non-fainted replacement")

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_ROWAP_BERRY].holdEffect == HOLD_EFFECT_ROWAP_BERRY);
ASSUME(gItemsInfo[ITEM_ROWAP_BERRY].holdEffect == HOLD_EFFECT_ROWAP_BERRY);
}
SINGLE_BATTLE_TEST("Rowap Berry causes the attacker to lose 1/8 of its max HP if a special move was used")

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_SAFETY_GOGGLES].holdEffect == HOLD_EFFECT_SAFETY_GOGGLES);
ASSUME(gItemsInfo[ITEM_SAFETY_GOGGLES].holdEffect == HOLD_EFFECT_SAFETY_GOGGLES);
};
SINGLE_BATTLE_TEST("Safety Goggles block powder and spore moves")

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_PETAYA_BERRY].holdEffect == HOLD_EFFECT_SP_ATTACK_UP);
ASSUME(gItemsInfo[ITEM_PETAYA_BERRY].holdEffect == HOLD_EFFECT_SP_ATTACK_UP);
ASSUME(gBattleMoves[MOVE_DRAGON_RAGE].effect == EFFECT_FIXED_DAMAGE_ARG);
ASSUME(gBattleMoves[MOVE_DRAGON_RAGE].argument == 40);
}

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_APICOT_BERRY].holdEffect == HOLD_EFFECT_SP_DEFENSE_UP);
ASSUME(gItemsInfo[ITEM_APICOT_BERRY].holdEffect == HOLD_EFFECT_SP_DEFENSE_UP);
ASSUME(gBattleMoves[MOVE_DRAGON_RAGE].effect == EFFECT_FIXED_DAMAGE_ARG);
ASSUME(gBattleMoves[MOVE_DRAGON_RAGE].argument == 40);
}

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_SALAC_BERRY].holdEffect == HOLD_EFFECT_SPEED_UP);
ASSUME(gItemsInfo[ITEM_SALAC_BERRY].holdEffect == HOLD_EFFECT_SPEED_UP);
ASSUME(gBattleMoves[MOVE_DRAGON_RAGE].effect == EFFECT_FIXED_DAMAGE_ARG);
ASSUME(gBattleMoves[MOVE_DRAGON_RAGE].argument == 40);
}

View file

@ -4,7 +4,7 @@
// Please add Utility Umbrella interactions with move, item and ability effects on their respective files.
ASSUMPTIONS
{
ASSUME(gItems[ITEM_UTILITY_UMBRELLA].holdEffect == HOLD_EFFECT_UTILITY_UMBRELLA);
ASSUME(gItemsInfo[ITEM_UTILITY_UMBRELLA].holdEffect == HOLD_EFFECT_UTILITY_UMBRELLA);
ASSUME(gBattleMoves[MOVE_EMBER].type == TYPE_FIRE);
ASSUME(gBattleMoves[MOVE_WATER_GUN].type == TYPE_WATER);
}

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_WHITE_HERB].holdEffect == HOLD_EFFECT_RESTORE_STATS);
ASSUME(gItemsInfo[ITEM_WHITE_HERB].holdEffect == HOLD_EFFECT_RESTORE_STATS);
}
SINGLE_BATTLE_TEST("White Herb restores stats when they're lowered")

View file

@ -4,7 +4,7 @@
SINGLE_BATTLE_TEST("Paralyze Heal heals a battler from being paralyzed")
{
GIVEN {
ASSUME(gItems[ITEM_PARALYZE_HEAL].battleUsage == EFFECT_ITEM_CURE_STATUS);
ASSUME(gItemsInfo[ITEM_PARALYZE_HEAL].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_PARALYSIS); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
@ -19,7 +19,7 @@ SINGLE_BATTLE_TEST("Paralyze Heal heals a battler from being paralyzed")
SINGLE_BATTLE_TEST("Antidote heals a battler from being poisoned")
{
GIVEN {
ASSUME(gItems[ITEM_ANTIDOTE].battleUsage == EFFECT_ITEM_CURE_STATUS);
ASSUME(gItemsInfo[ITEM_ANTIDOTE].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_POISON); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
@ -34,7 +34,7 @@ SINGLE_BATTLE_TEST("Antidote heals a battler from being poisoned")
SINGLE_BATTLE_TEST("Antidote heals a battler from being badly poisoned")
{
GIVEN {
ASSUME(gItems[ITEM_ANTIDOTE].battleUsage == EFFECT_ITEM_CURE_STATUS);
ASSUME(gItemsInfo[ITEM_ANTIDOTE].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_TOXIC_POISON); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
@ -49,7 +49,7 @@ SINGLE_BATTLE_TEST("Antidote heals a battler from being badly poisoned")
SINGLE_BATTLE_TEST("Awakening heals a battler from being asleep")
{
GIVEN {
ASSUME(gItems[ITEM_AWAKENING].battleUsage == EFFECT_ITEM_CURE_STATUS);
ASSUME(gItemsInfo[ITEM_AWAKENING].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_SLEEP); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
@ -64,7 +64,7 @@ SINGLE_BATTLE_TEST("Awakening heals a battler from being asleep")
SINGLE_BATTLE_TEST("Burn Heal heals a battler from being burned")
{
GIVEN {
ASSUME(gItems[ITEM_BURN_HEAL].battleUsage == EFFECT_ITEM_CURE_STATUS);
ASSUME(gItemsInfo[ITEM_BURN_HEAL].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_BURN); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
@ -79,7 +79,7 @@ SINGLE_BATTLE_TEST("Burn Heal heals a battler from being burned")
SINGLE_BATTLE_TEST("Ice Heal heals a battler from being frozen")
{
GIVEN {
ASSUME(gItems[ITEM_ICE_HEAL].battleUsage == EFFECT_ITEM_CURE_STATUS);
ASSUME(gItemsInfo[ITEM_ICE_HEAL].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(STATUS1_FREEZE); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
@ -101,7 +101,7 @@ SINGLE_BATTLE_TEST("Full Heal heals a battler from any primary status")
PARAMETRIZE{ status = STATUS1_TOXIC_POISON; }
PARAMETRIZE{ status = STATUS1_SLEEP; }
GIVEN {
ASSUME(gItems[ITEM_FULL_HEAL].battleUsage == EFFECT_ITEM_CURE_STATUS);
ASSUME(gItemsInfo[ITEM_FULL_HEAL].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(status); }
OPPONENT(SPECIES_WYNAUT);
} WHEN {
@ -123,7 +123,7 @@ SINGLE_BATTLE_TEST("Heal Powder heals a battler from any primary status")
PARAMETRIZE{ status = STATUS1_TOXIC_POISON; }
PARAMETRIZE{ status = STATUS1_SLEEP; }
GIVEN {
ASSUME(gItems[ITEM_HEAL_POWDER].battleUsage == EFFECT_ITEM_CURE_STATUS);
ASSUME(gItemsInfo[ITEM_HEAL_POWDER].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(status); }
OPPONENT(SPECIES_WYNAUT);
} WHEN {
@ -145,7 +145,7 @@ SINGLE_BATTLE_TEST("Pewter Crunchies heals a battler from any primary status")
PARAMETRIZE{ status = STATUS1_TOXIC_POISON; }
PARAMETRIZE{ status = STATUS1_SLEEP; }
GIVEN {
ASSUME(gItems[ITEM_PEWTER_CRUNCHIES].battleUsage == EFFECT_ITEM_CURE_STATUS);
ASSUME(gItemsInfo[ITEM_PEWTER_CRUNCHIES].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(status); }
OPPONENT(SPECIES_WYNAUT);
} WHEN {
@ -167,7 +167,7 @@ SINGLE_BATTLE_TEST("Lava Cookies heals a battler from any primary status")
PARAMETRIZE{ status = STATUS1_TOXIC_POISON; }
PARAMETRIZE{ status = STATUS1_SLEEP; }
GIVEN {
ASSUME(gItems[ITEM_LAVA_COOKIE].battleUsage == EFFECT_ITEM_CURE_STATUS);
ASSUME(gItemsInfo[ITEM_LAVA_COOKIE].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(status); }
OPPONENT(SPECIES_WYNAUT);
} WHEN {
@ -189,7 +189,7 @@ SINGLE_BATTLE_TEST("Rage Candy Bar heals a battler from any primary status")
PARAMETRIZE{ status = STATUS1_TOXIC_POISON; }
PARAMETRIZE{ status = STATUS1_SLEEP; }
GIVEN {
ASSUME(gItems[ITEM_RAGE_CANDY_BAR].battleUsage == EFFECT_ITEM_CURE_STATUS);
ASSUME(gItemsInfo[ITEM_RAGE_CANDY_BAR].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(status); }
OPPONENT(SPECIES_WYNAUT);
} WHEN {
@ -211,7 +211,7 @@ SINGLE_BATTLE_TEST("Old Gateu heals a battler from any primary status")
PARAMETRIZE{ status = STATUS1_TOXIC_POISON; }
PARAMETRIZE{ status = STATUS1_SLEEP; }
GIVEN {
ASSUME(gItems[ITEM_OLD_GATEAU].battleUsage == EFFECT_ITEM_CURE_STATUS);
ASSUME(gItemsInfo[ITEM_OLD_GATEAU].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(status); }
OPPONENT(SPECIES_WYNAUT);
} WHEN {
@ -233,7 +233,7 @@ SINGLE_BATTLE_TEST("Casteliacone heals a battler from any primary status")
PARAMETRIZE{ status = STATUS1_TOXIC_POISON; }
PARAMETRIZE{ status = STATUS1_SLEEP; }
GIVEN {
ASSUME(gItems[ITEM_CASTELIACONE].battleUsage == EFFECT_ITEM_CURE_STATUS);
ASSUME(gItemsInfo[ITEM_CASTELIACONE].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(status); }
OPPONENT(SPECIES_WYNAUT);
} WHEN {
@ -255,7 +255,7 @@ SINGLE_BATTLE_TEST("Lumiose Galette heals a battler from any primary status")
PARAMETRIZE{ status = STATUS1_TOXIC_POISON; }
PARAMETRIZE{ status = STATUS1_SLEEP; }
GIVEN {
ASSUME(gItems[ITEM_LUMIOSE_GALETTE].battleUsage == EFFECT_ITEM_CURE_STATUS);
ASSUME(gItemsInfo[ITEM_LUMIOSE_GALETTE].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(status); }
OPPONENT(SPECIES_WYNAUT);
} WHEN {
@ -277,7 +277,7 @@ SINGLE_BATTLE_TEST("Shalour Sable heals a battler from any primary status")
PARAMETRIZE{ status = STATUS1_TOXIC_POISON; }
PARAMETRIZE{ status = STATUS1_SLEEP; }
GIVEN {
ASSUME(gItems[ITEM_SHALOUR_SABLE].battleUsage == EFFECT_ITEM_CURE_STATUS);
ASSUME(gItemsInfo[ITEM_SHALOUR_SABLE].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(status); }
OPPONENT(SPECIES_WYNAUT);
} WHEN {
@ -299,7 +299,7 @@ SINGLE_BATTLE_TEST("Big Malasada heals a battler from any primary status")
PARAMETRIZE{ status = STATUS1_TOXIC_POISON; }
PARAMETRIZE{ status = STATUS1_SLEEP; }
GIVEN {
ASSUME(gItems[ITEM_BIG_MALASADA].battleUsage == EFFECT_ITEM_CURE_STATUS);
ASSUME(gItemsInfo[ITEM_BIG_MALASADA].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { Status1(status); }
OPPONENT(SPECIES_WYNAUT);
} WHEN {
@ -325,7 +325,7 @@ SINGLE_BATTLE_TEST("Full Heal, Heal Powder and Local Specialties heal a battler
PARAMETRIZE { item = ITEM_SHALOUR_SABLE; }
PARAMETRIZE { item = ITEM_BIG_MALASADA; }
GIVEN {
ASSUME(gItems[item].battleUsage == EFFECT_ITEM_CURE_STATUS);
ASSUME(gItemsInfo[item].battleUsage == EFFECT_ITEM_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_GENGAR);
} WHEN {

View file

@ -3,7 +3,7 @@
ASSUMPTIONS
{
ASSUME(gItems[ITEM_POKE_TOY].battleUsage == EFFECT_ITEM_ESCAPE);
ASSUME(gItemsInfo[ITEM_POKE_TOY].battleUsage == EFFECT_ITEM_ESCAPE);
}
WILD_BATTLE_TEST("Poke Toy lets the player escape from a wild battle")

View file

@ -11,7 +11,7 @@ SINGLE_BATTLE_TEST("Full Restore restores a battler's HP and cures any primary s
PARAMETRIZE{ status = STATUS1_TOXIC_POISON; }
PARAMETRIZE{ status = STATUS1_SLEEP; }
GIVEN {
ASSUME(gItems[ITEM_FULL_RESTORE].battleUsage == EFFECT_ITEM_HEAL_AND_CURE_STATUS);
ASSUME(gItemsInfo[ITEM_FULL_RESTORE].battleUsage == EFFECT_ITEM_HEAL_AND_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { HP(1); MaxHP(300); Status1(status); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
@ -27,7 +27,7 @@ SINGLE_BATTLE_TEST("Full Restore restores a battler's HP and cures any primary s
SINGLE_BATTLE_TEST("Full Restore restores a battler's HP and cures confusion")
{
GIVEN {
ASSUME(gItems[ITEM_FULL_RESTORE].battleUsage == EFFECT_ITEM_HEAL_AND_CURE_STATUS);
ASSUME(gItemsInfo[ITEM_FULL_RESTORE].battleUsage == EFFECT_ITEM_HEAL_AND_CURE_STATUS);
PLAYER(SPECIES_WOBBUFFET) { HP(1); MaxHP(300); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {

View file

@ -7,7 +7,7 @@ SINGLE_BATTLE_TEST("X Attack sharply raises battler's Attack stat", s16 damage)
PARAMETRIZE { useItem = FALSE; }
PARAMETRIZE { useItem = TRUE; }
GIVEN {
ASSUME(gItems[ITEM_X_ATTACK].battleUsage == EFFECT_ITEM_INCREASE_STAT);
ASSUME(gItemsInfo[ITEM_X_ATTACK].battleUsage == EFFECT_ITEM_INCREASE_STAT);
ASSUME(gBattleMoves[MOVE_TACKLE].category == BATTLE_CATEGORY_PHYSICAL);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
@ -31,7 +31,7 @@ SINGLE_BATTLE_TEST("X Defense sharply raises battler's Defense stat", s16 damage
PARAMETRIZE { useItem = FALSE; }
PARAMETRIZE { useItem = TRUE; }
GIVEN {
ASSUME(gItems[ITEM_X_DEFENSE].battleUsage == EFFECT_ITEM_INCREASE_STAT);
ASSUME(gItemsInfo[ITEM_X_DEFENSE].battleUsage == EFFECT_ITEM_INCREASE_STAT);
ASSUME(gBattleMoves[MOVE_TACKLE].category == BATTLE_CATEGORY_PHYSICAL);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
@ -55,7 +55,7 @@ SINGLE_BATTLE_TEST("X Sp. Atk sharply raises battler's Sp. Attack stat", s16 dam
PARAMETRIZE { useItem = FALSE; }
PARAMETRIZE { useItem = TRUE; }
GIVEN {
ASSUME(gItems[ITEM_X_SP_ATK].battleUsage == EFFECT_ITEM_INCREASE_STAT);
ASSUME(gItemsInfo[ITEM_X_SP_ATK].battleUsage == EFFECT_ITEM_INCREASE_STAT);
ASSUME(gBattleMoves[MOVE_DISARMING_VOICE].category == BATTLE_CATEGORY_SPECIAL);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
@ -79,7 +79,7 @@ SINGLE_BATTLE_TEST("X Sp. Def sharply raises battler's Sp. Defense stat", s16 da
PARAMETRIZE { useItem = FALSE; }
PARAMETRIZE { useItem = TRUE; }
GIVEN {
ASSUME(gItems[ITEM_X_SP_DEF].battleUsage == EFFECT_ITEM_INCREASE_STAT);
ASSUME(gItemsInfo[ITEM_X_SP_DEF].battleUsage == EFFECT_ITEM_INCREASE_STAT);
ASSUME(gBattleMoves[MOVE_DISARMING_VOICE].category == BATTLE_CATEGORY_SPECIAL);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
@ -103,7 +103,7 @@ SINGLE_BATTLE_TEST("X Speed sharply raises battler's Speed stat", s16 damage)
PARAMETRIZE { useItem = FALSE; }
PARAMETRIZE { useItem = TRUE; }
GIVEN {
ASSUME(gItems[ITEM_X_SPEED].battleUsage == EFFECT_ITEM_INCREASE_STAT);
ASSUME(gItemsInfo[ITEM_X_SPEED].battleUsage == EFFECT_ITEM_INCREASE_STAT);
if (B_X_ITEMS_BUFF >= GEN_7)
{
PLAYER(SPECIES_WOBBUFFET) { Speed(3); }
@ -140,7 +140,7 @@ SINGLE_BATTLE_TEST("X Accuracy sharply raises battler's Accuracy stat")
else
PASSES_RANDOMLY(gBattleMoves[MOVE_SING].accuracy * 4 / 3, 100, RNG_ACCURACY);
GIVEN {
ASSUME(gItems[ITEM_X_ACCURACY].battleUsage == EFFECT_ITEM_INCREASE_STAT);
ASSUME(gItemsInfo[ITEM_X_ACCURACY].battleUsage == EFFECT_ITEM_INCREASE_STAT);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
@ -158,7 +158,7 @@ SINGLE_BATTLE_TEST("Max Mushrooms raises battler's Attack stat", s16 damage)
PARAMETRIZE { useItem = FALSE; }
PARAMETRIZE { useItem = TRUE; }
GIVEN {
ASSUME(gItems[ITEM_MAX_MUSHROOMS].battleUsage == EFFECT_ITEM_INCREASE_ALL_STATS);
ASSUME(gItemsInfo[ITEM_MAX_MUSHROOMS].battleUsage == EFFECT_ITEM_INCREASE_ALL_STATS);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
@ -178,7 +178,7 @@ SINGLE_BATTLE_TEST("Max Mushrooms raises battler's Defense stat", s16 damage)
PARAMETRIZE { useItem = FALSE; }
PARAMETRIZE { useItem = TRUE; }
GIVEN {
ASSUME(gItems[ITEM_MAX_MUSHROOMS].battleUsage == EFFECT_ITEM_INCREASE_ALL_STATS);
ASSUME(gItemsInfo[ITEM_MAX_MUSHROOMS].battleUsage == EFFECT_ITEM_INCREASE_ALL_STATS);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
@ -198,7 +198,7 @@ SINGLE_BATTLE_TEST("Max Mushrooms raises battler's Sp. Attack stat", s16 damage)
PARAMETRIZE { useItem = FALSE; }
PARAMETRIZE { useItem = TRUE; }
GIVEN {
ASSUME(gItems[ITEM_MAX_MUSHROOMS].battleUsage == EFFECT_ITEM_INCREASE_ALL_STATS);
ASSUME(gItemsInfo[ITEM_MAX_MUSHROOMS].battleUsage == EFFECT_ITEM_INCREASE_ALL_STATS);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
@ -218,7 +218,7 @@ SINGLE_BATTLE_TEST("Max Mushrooms battler's Sp. Defense stat", s16 damage)
PARAMETRIZE { useItem = FALSE; }
PARAMETRIZE { useItem = TRUE; }
GIVEN {
ASSUME(gItems[ITEM_MAX_MUSHROOMS].battleUsage == EFFECT_ITEM_INCREASE_ALL_STATS);
ASSUME(gItemsInfo[ITEM_MAX_MUSHROOMS].battleUsage == EFFECT_ITEM_INCREASE_ALL_STATS);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
@ -238,7 +238,7 @@ SINGLE_BATTLE_TEST("Max Mushrooms raises battler's Speed stat", s16 damage)
PARAMETRIZE { useItem = FALSE; }
PARAMETRIZE { useItem = TRUE; }
GIVEN {
ASSUME(gItems[ITEM_MAX_MUSHROOMS].battleUsage == EFFECT_ITEM_INCREASE_ALL_STATS);
ASSUME(gItemsInfo[ITEM_MAX_MUSHROOMS].battleUsage == EFFECT_ITEM_INCREASE_ALL_STATS);
PLAYER(SPECIES_WOBBUFFET) { Speed(4); }
OPPONENT(SPECIES_WOBBUFFET) { Speed(5); }
} WHEN {

View file

@ -19,7 +19,7 @@ SINGLE_BATTLE_TEST("Items can restore a battler's HP by a fixed amount")
PARAMETRIZE { item = ITEM_SITRUS_BERRY; hp = 30; }
#endif
GIVEN {
ASSUME(gItems[item].battleUsage == EFFECT_ITEM_RESTORE_HP);
ASSUME(gItemsInfo[item].battleUsage == EFFECT_ITEM_RESTORE_HP);
PLAYER(SPECIES_WOBBUFFET) { HP(1); MaxHP(400); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
@ -37,7 +37,7 @@ SINGLE_BATTLE_TEST("Items can restore a battler's HP by a percentage")
PARAMETRIZE { item = ITEM_SITRUS_BERRY; percentage = 25; }
#endif
GIVEN {
ASSUME(gItems[item].battleUsage == EFFECT_ITEM_RESTORE_HP);
ASSUME(gItemsInfo[item].battleUsage == EFFECT_ITEM_RESTORE_HP);
PLAYER(SPECIES_WOBBUFFET) { HP(1); MaxHP(400); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {

View file

@ -4,8 +4,8 @@
SINGLE_BATTLE_TEST("Ether restores the PP of one of a battler's moves by 10 ")
{
GIVEN {
ASSUME(gItems[ITEM_ETHER].battleUsage == EFFECT_ITEM_RESTORE_PP);
ASSUME(gItems[ITEM_ETHER].type == ITEM_USE_PARTY_MENU_MOVES);
ASSUME(gItemsInfo[ITEM_ETHER].battleUsage == EFFECT_ITEM_RESTORE_PP);
ASSUME(gItemsInfo[ITEM_ETHER].type == ITEM_USE_PARTY_MENU_MOVES);
PLAYER(SPECIES_WOBBUFFET) { MovesWithPP({MOVE_TACKLE, 0}, {MOVE_CONFUSION, 20}); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
@ -19,8 +19,8 @@ SINGLE_BATTLE_TEST("Ether restores the PP of one of a battler's moves by 10 ")
SINGLE_BATTLE_TEST("Max Ether restores the PP of one of a battler's moves fully")
{
GIVEN {
ASSUME(gItems[ITEM_MAX_ETHER].battleUsage == EFFECT_ITEM_RESTORE_PP);
ASSUME(gItems[ITEM_MAX_ETHER].type == ITEM_USE_PARTY_MENU_MOVES);
ASSUME(gItemsInfo[ITEM_MAX_ETHER].battleUsage == EFFECT_ITEM_RESTORE_PP);
ASSUME(gItemsInfo[ITEM_MAX_ETHER].type == ITEM_USE_PARTY_MENU_MOVES);
PLAYER(SPECIES_WOBBUFFET) { MovesWithPP({MOVE_TACKLE, 0}, {MOVE_CONFUSION, 20}); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
@ -34,8 +34,8 @@ SINGLE_BATTLE_TEST("Max Ether restores the PP of one of a battler's moves fully"
SINGLE_BATTLE_TEST("Elixir restores the PP of all of a battler's moves by 10")
{
GIVEN {
ASSUME(gItems[ITEM_ELIXIR].battleUsage == EFFECT_ITEM_RESTORE_PP);
ASSUME(gItems[ITEM_ELIXIR].type == ITEM_USE_PARTY_MENU);
ASSUME(gItemsInfo[ITEM_ELIXIR].battleUsage == EFFECT_ITEM_RESTORE_PP);
ASSUME(gItemsInfo[ITEM_ELIXIR].type == ITEM_USE_PARTY_MENU);
PLAYER(SPECIES_WOBBUFFET) { MovesWithPP({MOVE_TACKLE, 0}, {MOVE_CONFUSION, 0}, {MOVE_SCRATCH, 0}, {MOVE_GROWL, 0}); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
@ -51,8 +51,8 @@ SINGLE_BATTLE_TEST("Elixir restores the PP of all of a battler's moves by 10")
SINGLE_BATTLE_TEST("Max Elixir restores the PP of all of a battler's moves fully")
{
GIVEN {
ASSUME(gItems[ITEM_MAX_ELIXIR].battleUsage == EFFECT_ITEM_RESTORE_PP);
ASSUME(gItems[ITEM_MAX_ELIXIR].type == ITEM_USE_PARTY_MENU);
ASSUME(gItemsInfo[ITEM_MAX_ELIXIR].battleUsage == EFFECT_ITEM_RESTORE_PP);
ASSUME(gItemsInfo[ITEM_MAX_ELIXIR].type == ITEM_USE_PARTY_MENU);
PLAYER(SPECIES_WOBBUFFET) { MovesWithPP({MOVE_TACKLE, 0}, {MOVE_CONFUSION, 0}, {MOVE_SCRATCH, 0}, {MOVE_GROWL, 0}); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {

View file

@ -4,7 +4,7 @@
SINGLE_BATTLE_TEST("Revive restores a fainted battler's HP to half")
{
GIVEN {
ASSUME(gItems[ITEM_REVIVE].battleUsage == EFFECT_ITEM_REVIVE);
ASSUME(gItemsInfo[ITEM_REVIVE].battleUsage == EFFECT_ITEM_REVIVE);
PLAYER(SPECIES_WYNAUT) { HP(1); MaxHP(200); }
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
@ -22,7 +22,7 @@ SINGLE_BATTLE_TEST("Revive restores a fainted battler's HP to half")
SINGLE_BATTLE_TEST("Max Revive restores a fainted battler's HP fully")
{
GIVEN {
ASSUME(gItems[ITEM_MAX_REVIVE].battleUsage == EFFECT_ITEM_REVIVE);
ASSUME(gItemsInfo[ITEM_MAX_REVIVE].battleUsage == EFFECT_ITEM_REVIVE);
PLAYER(SPECIES_WYNAUT) { HP(1); MaxHP(200); }
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
@ -40,7 +40,7 @@ SINGLE_BATTLE_TEST("Max Revive restores a fainted battler's HP fully")
SINGLE_BATTLE_TEST("Revival Herb restores a fainted battler's HP fully")
{
GIVEN {
ASSUME(gItems[ITEM_REVIVAL_HERB].battleUsage == EFFECT_ITEM_REVIVE);
ASSUME(gItemsInfo[ITEM_REVIVAL_HERB].battleUsage == EFFECT_ITEM_REVIVE);
PLAYER(SPECIES_WYNAUT) { HP(1); MaxHP(200); }
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
@ -58,7 +58,7 @@ SINGLE_BATTLE_TEST("Revival Herb restores a fainted battler's HP fully")
SINGLE_BATTLE_TEST("Max Honey restores a fainted battler's HP fully")
{
GIVEN {
ASSUME(gItems[ITEM_MAX_HONEY].battleUsage == EFFECT_ITEM_REVIVE);
ASSUME(gItemsInfo[ITEM_MAX_HONEY].battleUsage == EFFECT_ITEM_REVIVE);
PLAYER(SPECIES_WYNAUT) { HP(1); MaxHP(200); }
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);

View file

@ -4,7 +4,7 @@
SINGLE_BATTLE_TEST("Guard Spec. sets Mist effect on the battlers side")
{
GIVEN {
ASSUME(gItems[ITEM_GUARD_SPEC].battleUsage == EFFECT_ITEM_SET_MIST);
ASSUME(gItemsInfo[ITEM_GUARD_SPEC].battleUsage == EFFECT_ITEM_SET_MIST);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {

View file

@ -117,8 +117,8 @@ SINGLE_BATTLE_TEST("Bug Bite eats the target's berry and immediately gains its e
SINGLE_BATTLE_TEST("Tanga Berry activates before Bug Bite")
{
GIVEN {
ASSUME(gItems[ITEM_TANGA_BERRY].holdEffect == HOLD_EFFECT_RESIST_BERRY);
ASSUME(gItems[ITEM_TANGA_BERRY].holdEffectParam == TYPE_BUG);
ASSUME(gItemsInfo[ITEM_TANGA_BERRY].holdEffect == HOLD_EFFECT_RESIST_BERRY);
ASSUME(gItemsInfo[ITEM_TANGA_BERRY].holdEffectParam == TYPE_BUG);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET) {Item(ITEM_TANGA_BERRY); }
} WHEN {

View file

@ -9,7 +9,7 @@ ASSUMPTIONS
SINGLE_BATTLE_TEST("Embargo blocks the effect of an affected Pokémon's held item")
{
GIVEN {
ASSUME(gItems[ITEM_FOCUS_SASH].holdEffect == HOLD_EFFECT_FOCUS_SASH);
ASSUME(gItemsInfo[ITEM_FOCUS_SASH].holdEffect == HOLD_EFFECT_FOCUS_SASH);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_FOCUS_SASH); };
} WHEN {
@ -31,7 +31,7 @@ SINGLE_BATTLE_TEST("Embargo blocks an affected Pokémon's trainer from using ite
// in the action of an NPC using an item in battle.
KNOWN_FAILING;
GIVEN {
ASSUME(gItems[ITEM_POTION].battleUsage == EFFECT_ITEM_RESTORE_HP);
ASSUME(gItemsInfo[ITEM_POTION].battleUsage == EFFECT_ITEM_RESTORE_HP);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET) { HP(1); }
} WHEN {
@ -55,7 +55,7 @@ WILD_BATTLE_TEST("Embargo doesn't block held item effects that affect experience
GIVEN {
PLAYER(SPECIES_WOBBUFFET) { Level(20); Item(item); }
OPPONENT(SPECIES_CATERPIE) { Level(10); HP(1); }
ASSUME(gItems[ITEM_LUCKY_EGG].holdEffect == HOLD_EFFECT_LUCKY_EGG);
ASSUME(gItemsInfo[ITEM_LUCKY_EGG].holdEffect == HOLD_EFFECT_LUCKY_EGG);
} WHEN {
TURN { MOVE(opponent, MOVE_EMBARGO); MOVE(player, MOVE_SCRATCH); }
} SCENE {
@ -76,9 +76,9 @@ WILD_BATTLE_TEST("Embargo doesn't block held item effects that affect effort val
GIVEN {
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_POWER_WEIGHT); }
OPPONENT(SPECIES_CATERPIE) { HP(1); }
ASSUME(gItems[ITEM_POWER_WEIGHT].holdEffect == HOLD_EFFECT_POWER_ITEM);
ASSUME(gItems[ITEM_POWER_WEIGHT].holdEffectParam == 8);
ASSUME(gItems[ITEM_POWER_WEIGHT].secondaryId == STAT_HP);
ASSUME(gItemsInfo[ITEM_POWER_WEIGHT].holdEffect == HOLD_EFFECT_POWER_ITEM);
ASSUME(gItemsInfo[ITEM_POWER_WEIGHT].holdEffectParam == 8);
ASSUME(gItemsInfo[ITEM_POWER_WEIGHT].secondaryId == STAT_HP);
ASSUME(gSpeciesInfo[SPECIES_CATERPIE].evYield_HP == 1);
} WHEN {
TURN { MOVE(opponent, MOVE_EMBARGO); MOVE(player, MOVE_SCRATCH); }
@ -90,7 +90,7 @@ WILD_BATTLE_TEST("Embargo doesn't block held item effects that affect effort val
MESSAGE("Wobbuffet used Scratch!");
MESSAGE("Wild Caterpie fainted!");
} THEN {
finalHPEVAmount = (GetMonData(&PLAYER_PARTY[0], MON_DATA_HP_EV) + gItems[ITEM_POWER_WEIGHT].holdEffectParam + gSpeciesInfo[SPECIES_CATERPIE].evYield_HP);
finalHPEVAmount = (GetMonData(&PLAYER_PARTY[0], MON_DATA_HP_EV) + gItemsInfo[ITEM_POWER_WEIGHT].holdEffectParam + gSpeciesInfo[SPECIES_CATERPIE].evYield_HP);
EXPECT_EQ(GetMonData(&gPlayerParty[0], MON_DATA_HP_EV), finalHPEVAmount);
}
}
@ -100,7 +100,7 @@ SINGLE_BATTLE_TEST("Embargo negates a held item's Speed reduction")
GIVEN {
PLAYER(SPECIES_WOBBUFFET) { Speed(19); }
OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_MACHO_BRACE); Speed(20); }
ASSUME(gItems[ITEM_MACHO_BRACE].holdEffect == HOLD_EFFECT_MACHO_BRACE);
ASSUME(gItemsInfo[ITEM_MACHO_BRACE].holdEffect == HOLD_EFFECT_MACHO_BRACE);
} WHEN {
TURN { MOVE(player, MOVE_EMBARGO); }
TURN { MOVE(player, MOVE_SCRATCH); MOVE(opponent, MOVE_SCRATCH); }
@ -121,7 +121,7 @@ WILD_BATTLE_TEST("Embargo doesn't block held item effects that affect friendship
KNOWN_FAILING; // Pokémon are currently not obtaining Friendship for using items in battle.
GIVEN {
ASSUME(gItems[ITEM_X_ACCURACY].battleUsage == EFFECT_ITEM_INCREASE_STAT);
ASSUME(gItemsInfo[ITEM_X_ACCURACY].battleUsage == EFFECT_ITEM_INCREASE_STAT);
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_SOOTHE_BELL); };
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
@ -146,9 +146,9 @@ SINGLE_BATTLE_TEST("Embargo doesn't block a held item's form-changing effect, bu
GIVEN {
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_ARCEUS_GRASS) { Item(heldItem); };
ASSUME(gItems[ITEM_MEADOW_PLATE].holdEffect == HOLD_EFFECT_PLATE);
ASSUME(gItems[ITEM_MEADOW_PLATE].holdEffectParam == 20);
ASSUME(gItems[ITEM_MEADOW_PLATE].secondaryId == TYPE_GRASS);
ASSUME(gItemsInfo[ITEM_MEADOW_PLATE].holdEffect == HOLD_EFFECT_PLATE);
ASSUME(gItemsInfo[ITEM_MEADOW_PLATE].holdEffectParam == 20);
ASSUME(gItemsInfo[ITEM_MEADOW_PLATE].secondaryId == TYPE_GRASS);
} WHEN {
TURN { MOVE(player, MOVE_EMBARGO); MOVE(opponent, MOVE_RAZOR_LEAF); }
} SCENE {

View file

@ -442,7 +442,7 @@ SINGLE_BATTLE_TEST("Fling deals damage based on items fling power")
GIVEN {
ASSUME(gBattleMoves[MOVE_CRUNCH].power == 80);
ASSUME(gItems[ITEM_VENUSAURITE].flingPower == 80);
ASSUME(gItemsInfo[ITEM_VENUSAURITE].flingPower == 80);
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_VENUSAURITE); }
OPPONENT(SPECIES_REGIROCK);
} WHEN {

View file

@ -104,7 +104,7 @@ SINGLE_BATTLE_TEST("Multi hit Moves hit at least four times with Loaded Dice")
PASSES_RANDOMLY(50, 100, RNG_LOADED_DICE);
GIVEN {
ASSUME(gItems[ITEM_LOADED_DICE].holdEffect == HOLD_EFFECT_LOADED_DICE);
ASSUME(gItemsInfo[ITEM_LOADED_DICE].holdEffect == HOLD_EFFECT_LOADED_DICE);
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_LOADED_DICE); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
@ -123,7 +123,7 @@ SINGLE_BATTLE_TEST("Multi hit Moves hit five times 50 Percent of the time with L
PASSES_RANDOMLY(50, 100, RNG_LOADED_DICE);
GIVEN {
ASSUME(gItems[ITEM_LOADED_DICE].holdEffect == HOLD_EFFECT_LOADED_DICE);
ASSUME(gItemsInfo[ITEM_LOADED_DICE].holdEffect == HOLD_EFFECT_LOADED_DICE);
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_LOADED_DICE); }
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {

View file

@ -44,7 +44,7 @@ SINGLE_BATTLE_TEST("Shed Tail fails if the user doesn't have enough HP")
SINGLE_BATTLE_TEST("Shed Tail's HP cost can trigger a berry before the user switches out")
{
GIVEN {
ASSUME(gItems[ITEM_SITRUS_BERRY].battleUsage == EFFECT_ITEM_RESTORE_HP);
ASSUME(gItemsInfo[ITEM_SITRUS_BERRY].battleUsage == EFFECT_ITEM_RESTORE_HP);
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_SITRUS_BERRY); }
PLAYER(SPECIES_WYNAUT);
OPPONENT(SPECIES_WOBBUFFET);

View file

@ -149,7 +149,7 @@ SINGLE_BATTLE_TEST("Strength Sap restores more HP if Big Root is held", s16 hp)
PARAMETRIZE { item = ITEM_BIG_ROOT; }
GIVEN {
ASSUME(gItems[ITEM_BIG_ROOT].holdEffect == HOLD_EFFECT_BIG_ROOT);
ASSUME(gItemsInfo[ITEM_BIG_ROOT].holdEffect == HOLD_EFFECT_BIG_ROOT);
PLAYER(SPECIES_WOBBUFFET) { HP(200); Item(item); }
OPPONENT(SPECIES_WOBBUFFET) { Attack(100); }
} WHEN {

View file

@ -4,8 +4,8 @@
ASSUMPTIONS
{
ASSUME(gBattleMoves[MOVE_STUFF_CHEEKS].effect == EFFECT_STUFF_CHEEKS);
ASSUME(gItems[ITEM_LIECHI_BERRY].pocket == POCKET_BERRIES);
ASSUME(gItems[ITEM_LIECHI_BERRY].holdEffect == HOLD_EFFECT_ATTACK_UP);
ASSUME(gItemsInfo[ITEM_LIECHI_BERRY].pocket == POCKET_BERRIES);
ASSUME(gItemsInfo[ITEM_LIECHI_BERRY].holdEffect == HOLD_EFFECT_ATTACK_UP);
}
SINGLE_BATTLE_TEST("Stuff Cheeks cannot be used if the user doesn't hold a berry")

View file

@ -43,7 +43,7 @@ SINGLE_BATTLE_TEST("Substitute fails if the user doesn't have enough HP")
SINGLE_BATTLE_TEST("Substitute's HP cost can trigger a berry")
{
GIVEN {
ASSUME(gItems[ITEM_SITRUS_BERRY].battleUsage == EFFECT_ITEM_RESTORE_HP);
ASSUME(gItemsInfo[ITEM_SITRUS_BERRY].battleUsage == EFFECT_ITEM_RESTORE_HP);
PLAYER(SPECIES_WOBBUFFET) { HP(300); Item(ITEM_SITRUS_BERRY); }
PLAYER(SPECIES_WYNAUT);
OPPONENT(SPECIES_WOBBUFFET);

View file

@ -4,7 +4,7 @@
ASSUMPTIONS
{
ASSUME(gBattleMoves[MOVE_TEATIME].effect == EFFECT_TEATIME);
ASSUME(gItems[ITEM_LIECHI_BERRY].holdEffect == HOLD_EFFECT_ATTACK_UP);
ASSUME(gItemsInfo[ITEM_LIECHI_BERRY].holdEffect == HOLD_EFFECT_ATTACK_UP);
}
SINGLE_BATTLE_TEST("Teatime causes the user to consume its Berry, ignoring HP requirements")

View file

@ -22,8 +22,8 @@ SINGLE_BATTLE_TEST("Electric Terrain protects grounded battlers from falling asl
SINGLE_BATTLE_TEST("Electric Terrain activates Electric Seed and Mimicry")
{
GIVEN {
ASSUME(gItems[ITEM_ELECTRIC_SEED].holdEffect == HOLD_EFFECT_SEEDS);
ASSUME(gItems[ITEM_ELECTRIC_SEED].holdEffectParam == HOLD_EFFECT_PARAM_ELECTRIC_TERRAIN);
ASSUME(gItemsInfo[ITEM_ELECTRIC_SEED].holdEffect == HOLD_EFFECT_SEEDS);
ASSUME(gItemsInfo[ITEM_ELECTRIC_SEED].holdEffectParam == HOLD_EFFECT_PARAM_ELECTRIC_TERRAIN);
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_ELECTRIC_SEED); }
OPPONENT(SPECIES_STUNFISK_GALARIAN) { Ability(ABILITY_MIMICRY); }
} WHEN {

View file

@ -18,8 +18,8 @@ SINGLE_BATTLE_TEST("Grassy Terrain recovers 1/16th HP at end of turn")
SINGLE_BATTLE_TEST("Grassy Terrain activates Grassy Seed and Mimicry")
{
GIVEN {
ASSUME(gItems[ITEM_GRASSY_SEED].holdEffect == HOLD_EFFECT_SEEDS);
ASSUME(gItems[ITEM_GRASSY_SEED].holdEffectParam == HOLD_EFFECT_PARAM_GRASSY_TERRAIN);
ASSUME(gItemsInfo[ITEM_GRASSY_SEED].holdEffect == HOLD_EFFECT_SEEDS);
ASSUME(gItemsInfo[ITEM_GRASSY_SEED].holdEffectParam == HOLD_EFFECT_PARAM_GRASSY_TERRAIN);
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_GRASSY_SEED); }
OPPONENT(SPECIES_STUNFISK_GALARIAN) { Ability(ABILITY_MIMICRY); }
} WHEN {

View file

@ -22,8 +22,8 @@ SINGLE_BATTLE_TEST("Misty Terrain protects grounded battlers from non-volatile s
SINGLE_BATTLE_TEST("Misty Terrain activates Misty Seed and Mimicry")
{
GIVEN {
ASSUME(gItems[ITEM_MISTY_SEED].holdEffect == HOLD_EFFECT_SEEDS);
ASSUME(gItems[ITEM_MISTY_SEED].holdEffectParam == HOLD_EFFECT_PARAM_MISTY_TERRAIN);
ASSUME(gItemsInfo[ITEM_MISTY_SEED].holdEffect == HOLD_EFFECT_SEEDS);
ASSUME(gItemsInfo[ITEM_MISTY_SEED].holdEffectParam == HOLD_EFFECT_PARAM_MISTY_TERRAIN);
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_MISTY_SEED); }
OPPONENT(SPECIES_STUNFISK_GALARIAN) { Ability(ABILITY_MIMICRY); }
} WHEN {

View file

@ -21,8 +21,8 @@ SINGLE_BATTLE_TEST("Psychic Terrain protects grounded battlers from priority mov
SINGLE_BATTLE_TEST("Psychic Terrain activates Psychic Seed and Mimicry")
{
GIVEN {
ASSUME(gItems[ITEM_PSYCHIC_SEED].holdEffect == HOLD_EFFECT_SEEDS);
ASSUME(gItems[ITEM_PSYCHIC_SEED].holdEffectParam == HOLD_EFFECT_PARAM_PSYCHIC_TERRAIN);
ASSUME(gItemsInfo[ITEM_PSYCHIC_SEED].holdEffect == HOLD_EFFECT_SEEDS);
ASSUME(gItemsInfo[ITEM_PSYCHIC_SEED].holdEffectParam == HOLD_EFFECT_PARAM_PSYCHIC_TERRAIN);
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_PSYCHIC_SEED); }
OPPONENT(SPECIES_STUNFISK_GALARIAN) { Ability(ABILITY_MIMICRY); }
} WHEN {

View file

@ -176,7 +176,7 @@ SINGLE_BATTLE_TEST("(DYNAMAX) Dynamaxed Pokemon are not affected by phazing move
SINGLE_BATTLE_TEST("(DYNAMAX) Dynamaxed Pokemon are not affected by Red Card")
{
GIVEN {
ASSUME(gItems[ITEM_RED_CARD].holdEffect == HOLD_EFFECT_RED_CARD);
ASSUME(gItemsInfo[ITEM_RED_CARD].holdEffect == HOLD_EFFECT_RED_CARD);
PLAYER(SPECIES_WOBBUFFET);
PLAYER(SPECIES_WYNAUT);
OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_RED_CARD); }
@ -502,7 +502,7 @@ SINGLE_BATTLE_TEST("(DYNAMAX) Dynamaxed Pokemon are not affected by Choice items
PARAMETRIZE { item = ITEM_CHOICE_BAND; }
PARAMETRIZE { item = ITEM_NONE; }
GIVEN {
ASSUME(gItems[ITEM_CHOICE_BAND].holdEffect == HOLD_EFFECT_CHOICE_BAND);
ASSUME(gItemsInfo[ITEM_CHOICE_BAND].holdEffect == HOLD_EFFECT_CHOICE_BAND);
PLAYER(SPECIES_WOBBUFFET) { Item(item); };
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
@ -520,7 +520,7 @@ SINGLE_BATTLE_TEST("(DYNAMAX) Dynamaxed Pokemon are not affected by Choice items
SINGLE_BATTLE_TEST("(DYNAMAX) Dynamaxed Pokemon cannot use Max Guard while holding Assault Vest")
{
GIVEN {
ASSUME(gItems[ITEM_ASSAULT_VEST].holdEffect == HOLD_EFFECT_ASSAULT_VEST);
ASSUME(gItemsInfo[ITEM_ASSAULT_VEST].holdEffect == HOLD_EFFECT_ASSAULT_VEST);
PLAYER(SPECIES_WOBBUFFET) { Item(ITEM_ASSAULT_VEST); };
OPPONENT(SPECIES_WOBBUFFET);
} WHEN {
@ -602,7 +602,7 @@ SINGLE_BATTLE_TEST("(DYNAMAX) Sitrus Berries heal based on a Pokemon's non-Dynam
PARAMETRIZE { dynamax = FALSE; }
GIVEN {
ASSUME(I_SITRUS_BERRY_HEAL >= GEN_4);
ASSUME(gItems[ITEM_SITRUS_BERRY].holdEffect == HOLD_EFFECT_RESTORE_PCT_HP);
ASSUME(gItemsInfo[ITEM_SITRUS_BERRY].holdEffect == HOLD_EFFECT_RESTORE_PCT_HP);
PLAYER(SPECIES_WOBBUFFET);
OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_SITRUS_BERRY); }
} WHEN {