Replace power checks with IS_MOVE_STATUS (#5820)
Co-authored-by: Eduardo Quezada <eduardo602002@gmail.com>
This commit is contained in:
parent
e579333427
commit
5cc0b35d81
24 changed files with 61 additions and 61 deletions
|
@ -843,9 +843,9 @@ STATIC_ASSERT(sizeof(((struct BattleStruct *)0)->palaceFlags) * 8 >= MAX_BATTLER
|
|||
#define F_DYNAMIC_TYPE_IGNORE_PHYSICALITY (1 << 6) // If set, the dynamic type's physicality won't be used for certain move effects.
|
||||
#define F_DYNAMIC_TYPE_SET (1 << 7) // Set for all dynamic types to distinguish a dynamic type of Normal (0) from no dynamic type.
|
||||
|
||||
#define IS_MOVE_PHYSICAL(move)(GetBattleMoveCategory(move) == DAMAGE_CATEGORY_PHYSICAL)
|
||||
#define IS_MOVE_SPECIAL(move)(GetBattleMoveCategory(move) == DAMAGE_CATEGORY_SPECIAL)
|
||||
#define IS_MOVE_STATUS(move)(gMovesInfo[move].category == DAMAGE_CATEGORY_STATUS)
|
||||
#define IS_MOVE_PHYSICAL(move) (GetBattleMoveCategory(move) == DAMAGE_CATEGORY_PHYSICAL)
|
||||
#define IS_MOVE_SPECIAL(move) (GetBattleMoveCategory(move) == DAMAGE_CATEGORY_SPECIAL)
|
||||
#define IS_MOVE_STATUS(move) (gMovesInfo[move].category == DAMAGE_CATEGORY_STATUS)
|
||||
|
||||
#define IS_MOVE_RECOIL(move)(gMovesInfo[move].recoil > 0 || gMovesInfo[move].effect == EFFECT_RECOIL_IF_MISS)
|
||||
|
||||
|
|
|
@ -433,7 +433,7 @@ static void SetBattlerAiMovesData(struct AiLogicData *aiData, u32 battlerAtk, u3
|
|||
|
||||
if (move != 0
|
||||
&& move != 0xFFFF
|
||||
//&& gMovesInfo[move].power != 0 /* we want to get effectiveness and accuracy of status moves */
|
||||
//&& !IS_MOVE_STATUS(gMovesInfo[move]) /* we want to get effectiveness and accuracy of status moves */
|
||||
&& !(aiData->moveLimitations[battlerAtk] & (1u << moveIndex)))
|
||||
{
|
||||
dmg = AI_CalcDamage(move, battlerAtk, battlerDef, &effectiveness, TRUE, weather, rollType);
|
||||
|
@ -2607,8 +2607,8 @@ static s32 AI_TryToFaint(u32 battlerAtk, u32 battlerDef, u32 move, s32 score)
|
|||
if (IS_TARGETING_PARTNER(battlerAtk, battlerDef))
|
||||
return score;
|
||||
|
||||
if (gMovesInfo[move].power == 0)
|
||||
return score; // can't make anything faint with no power
|
||||
if (IS_MOVE_STATUS(move))
|
||||
return score; // status moves aren't accounted here
|
||||
|
||||
if (CanIndexMoveFaintTarget(battlerAtk, battlerDef, movesetIndex, 0) && gMovesInfo[move].effect != EFFECT_EXPLOSION)
|
||||
{
|
||||
|
@ -4916,7 +4916,7 @@ static s32 AI_PreferBatonPass(u32 battlerAtk, u32 battlerDef, u32 move, s32 scor
|
|||
{
|
||||
if (IS_TARGETING_PARTNER(battlerAtk, battlerDef)
|
||||
|| CountUsablePartyMons(battlerAtk) == 0
|
||||
|| gMovesInfo[move].power != 0
|
||||
|| !IS_MOVE_STATUS(move)
|
||||
|| !HasMoveEffect(battlerAtk, EFFECT_BATON_PASS)
|
||||
|| IsBattlerTrapped(battlerAtk, TRUE))
|
||||
return score;
|
||||
|
|
|
@ -122,8 +122,8 @@ static bool32 ShouldSwitchIfHasBadOdds(u32 battler)
|
|||
hasStatusMove = TRUE;
|
||||
}
|
||||
|
||||
// Only check damage if move has power
|
||||
if (gMovesInfo[aiMove].power != 0)
|
||||
// Only check damage if it's a damaging move
|
||||
if (!IS_MOVE_STATUS(aiMove))
|
||||
{
|
||||
// Check if mon has a super effective move
|
||||
if (AI_GetMoveEffectiveness(aiMove, battler, opposingBattler) >= AI_EFFECTIVENESS_x2)
|
||||
|
@ -156,7 +156,7 @@ static bool32 ShouldSwitchIfHasBadOdds(u32 battler)
|
|||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
{
|
||||
playerMove = gBattleMons[opposingBattler].moves[i];
|
||||
if (playerMove != MOVE_NONE && gMovesInfo[playerMove].power != 0)
|
||||
if (playerMove != MOVE_NONE && !IS_MOVE_STATUS(playerMove))
|
||||
{
|
||||
damageTaken = AI_CalcDamage(playerMove, opposingBattler, battler, &effectiveness, FALSE, weather, DMG_ROLL_HIGHEST).expected;
|
||||
if (damageTaken > maxDamageTaken)
|
||||
|
@ -1238,7 +1238,7 @@ static u32 GetBestMonDmg(struct Pokemon *party, int firstId, int lastId, u8 inva
|
|||
for (j = 0; j < MAX_MON_MOVES; j++)
|
||||
{
|
||||
aiMove = AI_DATA->switchinCandidate.battleMon.moves[j];
|
||||
if (aiMove != MOVE_NONE && gMovesInfo[aiMove].power != 0)
|
||||
if (aiMove != MOVE_NONE && !IS_MOVE_STATUS(aiMove))
|
||||
{
|
||||
aiMove = GetMonData(&party[i], MON_DATA_MOVE1 + j);
|
||||
dmg = AI_CalcPartyMonDamage(aiMove, battler, opposingBattler, AI_DATA->switchinCandidate.battleMon, TRUE, rollType);
|
||||
|
@ -1694,7 +1694,7 @@ static s32 GetMaxDamagePlayerCouldDealToSwitchin(u32 battler, u32 opposingBattle
|
|||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
{
|
||||
playerMove = gBattleMons[opposingBattler].moves[i];
|
||||
if (playerMove != MOVE_NONE && gMovesInfo[playerMove].power != 0)
|
||||
if (playerMove != MOVE_NONE && !IS_MOVE_STATUS(playerMove))
|
||||
{
|
||||
damageTaken = AI_CalcPartyMonDamage(playerMove, opposingBattler, battler, battleMon, FALSE, DMG_ROLL_HIGHEST);
|
||||
if (damageTaken > maxDamageTaken)
|
||||
|
@ -1822,7 +1822,7 @@ static u32 GetBestMonIntegrated(struct Pokemon *party, int firstId, int lastId,
|
|||
{
|
||||
aiMove = AI_DATA->switchinCandidate.battleMon.moves[j];
|
||||
|
||||
if (aiMove != MOVE_NONE && gMovesInfo[aiMove].power != 0)
|
||||
if (aiMove != MOVE_NONE && !IS_MOVE_STATUS(aiMove))
|
||||
{
|
||||
if (AI_THINKING_STRUCT->aiFlags[battler] & AI_FLAG_CONSERVATIVE)
|
||||
damageDealt = AI_CalcPartyMonDamage(aiMove, battler, opposingBattler, AI_DATA->switchinCandidate.battleMon, TRUE, DMG_ROLL_LOWEST);
|
||||
|
@ -1852,7 +1852,7 @@ static u32 GetBestMonIntegrated(struct Pokemon *party, int firstId, int lastId,
|
|||
}
|
||||
|
||||
// Check for mon with resistance and super effective move for best type matchup mon with effective move
|
||||
if (aiMove != MOVE_NONE && gMovesInfo[aiMove].power != 0)
|
||||
if (aiMove != MOVE_NONE && !IS_MOVE_STATUS(aiMove))
|
||||
{
|
||||
if (typeMatchup < bestResistEffective)
|
||||
{
|
||||
|
|
|
@ -2378,7 +2378,7 @@ bool32 HasDamagingMove(u32 battlerId)
|
|||
|
||||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
{
|
||||
if (moves[i] != MOVE_NONE && moves[i] != MOVE_UNAVAILABLE && gMovesInfo[moves[i]].power != 0)
|
||||
if (moves[i] != MOVE_NONE && moves[i] != MOVE_UNAVAILABLE && !IS_MOVE_STATUS(moves[i]))
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -2393,7 +2393,7 @@ bool32 HasDamagingMoveOfType(u32 battlerId, u32 type)
|
|||
for (i = 0; i < MAX_MON_MOVES; i++)
|
||||
{
|
||||
if (moves[i] != MOVE_NONE && moves[i] != MOVE_UNAVAILABLE
|
||||
&& gMovesInfo[moves[i]].type == type && gMovesInfo[moves[i]].power != 0)
|
||||
&& !IS_MOVE_STATUS(moves[i]].type == type && gMovesInfo[moves[i]))
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -360,7 +360,7 @@ void BattleArena_AddMindPoints(u8 battler)
|
|||
// All moves with power != 0 give 1 point, with the following exceptions:
|
||||
// - Counter, Mirror Coat, and Bide give 0 points
|
||||
// - Fake Out subtracts 1 point
|
||||
// All moves with power == 0 give 0 points, with the following exceptions:
|
||||
// All status moves give 0 points, with the following exceptions:
|
||||
// - Protect, Detect, and Endure subtract 1 point
|
||||
|
||||
if (gMovesInfo[gCurrentMove].effect == EFFECT_FIRST_TURN_ONLY
|
||||
|
@ -369,7 +369,7 @@ void BattleArena_AddMindPoints(u8 battler)
|
|||
{
|
||||
gBattleStruct->arenaMindPoints[battler]--;
|
||||
}
|
||||
else if (gMovesInfo[gCurrentMove].power != 0
|
||||
else if (!IS_MOVE_STATUS(gCurrentMove)
|
||||
&& gMovesInfo[gCurrentMove].effect != EFFECT_COUNTER
|
||||
&& gMovesInfo[gCurrentMove].effect != EFFECT_MIRROR_COAT
|
||||
&& gMovesInfo[gCurrentMove].effect != EFFECT_METAL_BURST
|
||||
|
|
|
@ -4326,7 +4326,7 @@ static void DisplayTrainerInfoOnCard(u8 flags, u8 trainerTourneyId)
|
|||
allocatedArray[k] = IsDomeStatusMoveEffect(move);
|
||||
break;
|
||||
case MOVE_POINTS_DMG:
|
||||
allocatedArray[k] = (gMovesInfo[move].power != 0) ? 1 : 0;
|
||||
allocatedArray[k] = (!IS_MOVE_STATUS(move)) ? 1 : 0;
|
||||
break;
|
||||
case MOVE_POINTS_DEF:
|
||||
allocatedArray[k] = IsDomeDefensiveMoveEffect(gMovesInfo[move].effect) ? 1 : 0;
|
||||
|
@ -5108,7 +5108,7 @@ static u16 GetWinningMove(int winnerTournamentId, int loserTournamentId, u8 roun
|
|||
moveIds[i * MAX_MON_MOVES + j] = gFacilityTrainerMons[DOME_MONS[winnerTournamentId][i]].moves[j];
|
||||
|
||||
movePower = gMovesInfo[moveIds[i * MAX_MON_MOVES + j]].power;
|
||||
if (movePower == 0)
|
||||
if (IS_MOVE_STATUS(moveIds[i * MAX_MON_MOVES + j]))
|
||||
movePower = 40;
|
||||
else if (movePower == 1)
|
||||
movePower = 60;
|
||||
|
|
|
@ -4839,7 +4839,7 @@ s8 GetMovePriority(u32 battler, u16 move)
|
|||
s8 priority;
|
||||
u16 ability = GetBattlerAbility(battler);
|
||||
|
||||
if (GetActiveGimmick(battler) == GIMMICK_Z_MOVE && gMovesInfo[move].power != 0)
|
||||
if (GetActiveGimmick(battler) == GIMMICK_Z_MOVE && !IS_MOVE_STATUS(move))
|
||||
move = GetUsableZMove(battler, move);
|
||||
|
||||
priority = gMovesInfo[move].priority;
|
||||
|
|
|
@ -5727,7 +5727,7 @@ static void Cmd_moveend(void)
|
|||
&& GetBattlerSide(gBattlerAttacker) != GetBattlerSide(gBattlerTarget)
|
||||
&& !(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||
&& TARGET_TURN_DAMAGED
|
||||
&& gMovesInfo[gCurrentMove].power != 0
|
||||
&& !IS_MOVE_STATUS(gCurrentMove)
|
||||
&& CompareStat(gBattlerTarget, STAT_ATK, MAX_STAT_STAGE, CMP_LESS_THAN))
|
||||
{
|
||||
SET_STATCHANGER(STAT_ATK, 1, FALSE);
|
||||
|
@ -8694,7 +8694,7 @@ static void Cmd_useitemonopponent(void)
|
|||
static bool32 HasAttackerFaintedTarget(void)
|
||||
{
|
||||
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||
&& gMovesInfo[gCurrentMove].power != 0
|
||||
&& !IS_MOVE_STATUS(gCurrentMove)
|
||||
&& (gLastHitBy[gBattlerTarget] == 0xFF || gLastHitBy[gBattlerTarget] == gBattlerAttacker)
|
||||
&& gBattleStruct->moveTarget[gBattlerAttacker] == gBattlerTarget
|
||||
&& gBattlerTarget != gBattlerAttacker
|
||||
|
|
|
@ -225,7 +225,7 @@ void HandleAction_UseMove(void)
|
|||
}
|
||||
else if (IsDoubleBattle()
|
||||
&& gSideTimers[side].followmeTimer == 0
|
||||
&& (gMovesInfo[gCurrentMove].power != 0 || (moveTarget != MOVE_TARGET_USER && moveTarget != MOVE_TARGET_ALL_BATTLERS))
|
||||
&& (!IS_MOVE_STATUS(gCurrentMove) || (moveTarget != MOVE_TARGET_USER && moveTarget != MOVE_TARGET_ALL_BATTLERS))
|
||||
&& ((GetBattlerAbility(*(gBattleStruct->moveTarget + gBattlerAttacker)) != ABILITY_LIGHTNING_ROD && moveType == TYPE_ELECTRIC)
|
||||
|| (GetBattlerAbility(*(gBattleStruct->moveTarget + gBattlerAttacker)) != ABILITY_STORM_DRAIN && moveType == TYPE_WATER)))
|
||||
{
|
||||
|
@ -5693,7 +5693,7 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32
|
|||
case ABILITY_COLOR_CHANGE:
|
||||
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT)
|
||||
&& move != MOVE_STRUGGLE
|
||||
&& gMovesInfo[move].power != 0
|
||||
&& !IS_MOVE_STATUS(move)
|
||||
&& TARGET_TURN_DAMAGED
|
||||
&& !IS_BATTLER_OF_TYPE(battler, moveType)
|
||||
&& moveType != TYPE_STELLAR
|
||||
|
@ -8647,7 +8647,7 @@ bool32 IsBattlerProtected(u32 battlerAtk, u32 battlerDef, u32 move)
|
|||
return TRUE;
|
||||
else if (gProtectStructs[battlerDef].spikyShielded)
|
||||
return TRUE;
|
||||
else if (gProtectStructs[battlerDef].kingsShielded && gMovesInfo[move].power != 0)
|
||||
else if (gProtectStructs[battlerDef].kingsShielded && !IS_MOVE_STATUS(move))
|
||||
return TRUE;
|
||||
else if (gProtectStructs[battlerDef].maxGuarded)
|
||||
return TRUE;
|
||||
|
|
|
@ -14,7 +14,7 @@ SINGLE_BATTLE_TEST("Anger Shell activates only if the target had more than 50% o
|
|||
PARAMETRIZE { hp = 254; activates = TRUE; }
|
||||
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
PLAYER(SPECIES_KLAWF) { Ability(ABILITY_ANGER_SHELL); MaxHP(maxHp); HP(hp); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
|
@ -41,7 +41,7 @@ SINGLE_BATTLE_TEST("Anger Shell lowers Def/Sp.Def by 1 and raises Atk/Sp.Atk/Spd
|
|||
{
|
||||
u16 maxHp = 500;
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
PLAYER(SPECIES_KLAWF) { Ability(ABILITY_ANGER_SHELL); MaxHP(maxHp); HP(maxHp / 2 + 1); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gMovesInfo[MOVE_WATER_GUN].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_WATER_GUN));
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Battle Bond does not transform species other than Greninja")
|
||||
|
|
|
@ -14,7 +14,7 @@ SINGLE_BATTLE_TEST("Berserk activates only if the target had more than 50% of it
|
|||
PARAMETRIZE { hp = 254; activates = TRUE; }
|
||||
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
PLAYER(SPECIES_DRAMPA) { Ability(ABILITY_BERSERK); MaxHP(maxHp); HP(hp); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
|
@ -37,7 +37,7 @@ SINGLE_BATTLE_TEST("Berserk raises Sp.Atk by 1")
|
|||
{
|
||||
u16 maxHp = 500;
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
PLAYER(SPECIES_DRAMPA) { Ability(ABILITY_BERSERK); MaxHP(maxHp); HP(maxHp / 2 + 1); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gMovesInfo[MOVE_WATER_GUN].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_WATER_GUN));
|
||||
ASSUME(gMovesInfo[MOVE_WATER_GUN].type == TYPE_WATER);
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ SINGLE_BATTLE_TEST("Desolate Land blocks damaging Water-type moves")
|
|||
DOUBLE_BATTLE_TEST("Desolate Land blocks damaging Water-type moves and prints the message only once with moves hitting multiple targets")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_SURF].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_SURF));
|
||||
ASSUME(gMovesInfo[MOVE_SURF].type == TYPE_WATER);
|
||||
ASSUME(gMovesInfo[MOVE_SURF].target == MOVE_TARGET_FOES_AND_ALLY);
|
||||
PLAYER(SPECIES_GROUDON) {Item(ITEM_RED_ORB); {Speed(5);}}
|
||||
|
|
|
@ -10,11 +10,11 @@ SINGLE_BATTLE_TEST("Electromorphosis sets up Charge when hit by any move")
|
|||
PARAMETRIZE {move = MOVE_GUST; }
|
||||
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(gMovesInfo[MOVE_GUST].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_GUST));
|
||||
ASSUME(gMovesInfo[MOVE_GUST].category == DAMAGE_CATEGORY_SPECIAL);
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].category == DAMAGE_CATEGORY_PHYSICAL);
|
||||
ASSUME(gMovesInfo[MOVE_THUNDER_SHOCK].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_THUNDER_SHOCK));
|
||||
ASSUME(gMovesInfo[MOVE_THUNDER_SHOCK].type == TYPE_ELECTRIC);
|
||||
|
||||
PLAYER(SPECIES_BELLIBOLT) { Ability(ABILITY_ELECTROMORPHOSIS); Speed(10); }
|
||||
|
|
|
@ -42,7 +42,7 @@ DOUBLE_BATTLE_TEST("Frisk triggers for player in a Double Battle after switching
|
|||
PARAMETRIZE { target = playerRight; }
|
||||
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_POUND].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_POUND));
|
||||
PLAYER(SPECIES_WOBBUFFET) { HP(1); }
|
||||
PLAYER(SPECIES_WOBBUFFET) { HP(1); }
|
||||
PLAYER(SPECIES_FURRET) { Ability(ABILITY_FRISK); };
|
||||
|
@ -65,7 +65,7 @@ DOUBLE_BATTLE_TEST("Frisk triggers for opponent in a Double Battle after switchi
|
|||
PARAMETRIZE { target = opponentRight; }
|
||||
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_POUND].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_POUND));
|
||||
PLAYER(SPECIES_WYNAUT) { Item(ITEM_POTION); }
|
||||
PLAYER(SPECIES_WYNAUT);
|
||||
OPPONENT(SPECIES_WOBBUFFET) { HP(1); }
|
||||
|
|
|
@ -14,7 +14,7 @@ SINGLE_BATTLE_TEST("Innards Out deal dmg on fainting equal to the amount of dmg
|
|||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET) { HP(70); SpAttack(1000); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
ASSUME(gMovesInfo[MOVE_PSYCHIC].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_PSYCHIC));
|
||||
ASSUME(gMovesInfo[MOVE_PSYCHIC].category == DAMAGE_CATEGORY_SPECIAL);
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, MOVE_PSYCHIC); SEND_OUT(player, 1); if (hp == 100) { SEND_OUT(opponent, 1); } }
|
||||
|
@ -32,7 +32,7 @@ SINGLE_BATTLE_TEST("Innards Out does not trigger after Gastro Acid has been used
|
|||
PLAYER(SPECIES_PYUKUMUKU) { HP(1); Ability(ABILITY_INNARDS_OUT); }
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
ASSUME(gMovesInfo[MOVE_PSYCHIC].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_PSYCHIC));
|
||||
ASSUME(gMovesInfo[MOVE_GASTRO_ACID].effect == EFFECT_GASTRO_ACID);
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, MOVE_GASTRO_ACID); }
|
||||
|
@ -55,7 +55,7 @@ SINGLE_BATTLE_TEST("Innards Out does not damage Magic Guard Pokemon")
|
|||
PLAYER(SPECIES_PYUKUMUKU) { HP(1); Ability(ABILITY_INNARDS_OUT); }
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_CLEFABLE) { Ability(ABILITY_MAGIC_GUARD); }
|
||||
ASSUME(gMovesInfo[MOVE_PSYCHIC].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_PSYCHIC));
|
||||
} WHEN {
|
||||
TURN { MOVE(opponent, MOVE_PSYCHIC); SEND_OUT(player, 1); }
|
||||
} SCENE {
|
||||
|
|
|
@ -5,7 +5,7 @@ SINGLE_BATTLE_TEST("Magician does not get self-damage recoil after stealing Life
|
|||
{
|
||||
GIVEN {
|
||||
ASSUME(gItemsInfo[ITEM_LIFE_ORB].holdEffect == HOLD_EFFECT_LIFE_ORB);
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
PLAYER(SPECIES_DELPHOX) { Ability(ABILITY_MAGICIAN); Item(ITEM_NONE); }
|
||||
OPPONENT(SPECIES_WOBBUFFET) { Item(ITEM_LIFE_ORB); }
|
||||
} WHEN {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gMovesInfo[MOVE_EMBER].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_EMBER));
|
||||
ASSUME(gMovesInfo[MOVE_EMBER].type == TYPE_FIRE);
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ SINGLE_BATTLE_TEST("Primordial Sea blocks damaging Fire-type moves")
|
|||
DOUBLE_BATTLE_TEST("Primordial Sea blocks damaging Fire-type moves and prints the message only once with moves hitting multiple targets")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_ERUPTION].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_ERUPTION));
|
||||
ASSUME(gMovesInfo[MOVE_ERUPTION].type == TYPE_FIRE);
|
||||
ASSUME(gMovesInfo[MOVE_ERUPTION].target == MOVE_TARGET_BOTH);
|
||||
PLAYER(SPECIES_KYOGRE) {Item(ITEM_BLUE_ORB); {Speed(5);}}
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gMovesInfo[MOVE_FURY_CUTTER].type == TYPE_BUG);
|
||||
ASSUME(gMovesInfo[MOVE_FURY_CUTTER].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_FURY_CUTTER));
|
||||
ASSUME(gMovesInfo[MOVE_FEINT_ATTACK].type == TYPE_DARK);
|
||||
ASSUME(gMovesInfo[MOVE_FEINT_ATTACK].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_FEINT_ATTACK));
|
||||
ASSUME(gMovesInfo[MOVE_SHADOW_PUNCH].type == TYPE_GHOST);
|
||||
ASSUME(gMovesInfo[MOVE_SHADOW_PUNCH].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_SHADOW_PUNCH));
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].type == TYPE_NORMAL);
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
}
|
||||
|
||||
SINGLE_BATTLE_TEST("Rattled boosts speed by 1 when hit by Bug, Dark or Ghost type move")
|
||||
|
|
|
@ -24,8 +24,8 @@ SINGLE_BATTLE_TEST("Stamina raises Defense by 1 when hit by a move")
|
|||
PARAMETRIZE {move = MOVE_GUST; }
|
||||
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(gMovesInfo[MOVE_GUST].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_GUST));
|
||||
ASSUME(gMovesInfo[MOVE_GUST].category == DAMAGE_CATEGORY_SPECIAL);
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].category == DAMAGE_CATEGORY_PHYSICAL);
|
||||
PLAYER(SPECIES_WOBBUFFET) { Ability(ABILITY_STAMINA); }
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(gMovesInfo[MOVE_GUST].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_GUST));
|
||||
ASSUME(gMovesInfo[MOVE_GUST].category == DAMAGE_CATEGORY_SPECIAL);
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].category == DAMAGE_CATEGORY_PHYSICAL);
|
||||
ASSUME(B_WEAK_ARMOR_SPEED >= GEN_7);
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gMovesInfo[MOVE_THUNDERBOLT].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_THUNDERBOLT));
|
||||
ASSUME(gMovesInfo[MOVE_THUNDERBOLT].type == TYPE_ELECTRIC);
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(gMovesInfo[MOVE_AIR_CUTTER].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_AIR_CUTTER));
|
||||
ASSUME(gMovesInfo[MOVE_AIR_CUTTER].target == MOVE_TARGET_BOTH);
|
||||
ASSUME(gMovesInfo[MOVE_AIR_CUTTER].windMove == TRUE);
|
||||
ASSUME(gMovesInfo[MOVE_PETAL_BLIZZARD].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_PETAL_BLIZZARD));
|
||||
ASSUME(gMovesInfo[MOVE_PETAL_BLIZZARD].target == MOVE_TARGET_FOES_AND_ALLY);
|
||||
ASSUME(gMovesInfo[MOVE_PETAL_BLIZZARD].windMove == TRUE);
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].windMove == FALSE);
|
||||
|
|
|
@ -120,7 +120,7 @@ DOUBLE_BATTLE_TEST("Primal reversion's order is determined by Speed - player fas
|
|||
SINGLE_BATTLE_TEST("Primal reversion happens after a mon is sent out after a mon is fainted")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
PLAYER(SPECIES_WOBBUFFET) {HP(1); }
|
||||
PLAYER(SPECIES_GROUDON) { Item(ITEM_RED_ORB); }
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
|
@ -156,7 +156,7 @@ SINGLE_BATTLE_TEST("Primal reversion happens after a mon is switched in")
|
|||
SINGLE_BATTLE_TEST("Primal reversion happens after a switch-in caused by Eject Button")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
ASSUME(gItemsInfo[ITEM_EJECT_BUTTON].holdEffect == HOLD_EFFECT_EJECT_BUTTON);
|
||||
PLAYER(SPECIES_WOBBUFFET) {Item(ITEM_EJECT_BUTTON); }
|
||||
PLAYER(SPECIES_GROUDON) { Item(ITEM_RED_ORB); }
|
||||
|
@ -177,7 +177,7 @@ SINGLE_BATTLE_TEST("Primal reversion happens after a switch-in caused by Eject B
|
|||
SINGLE_BATTLE_TEST("Primal reversion happens after a switch-in caused by Red Card")
|
||||
{
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
ASSUME(gItemsInfo[ITEM_RED_CARD].holdEffect == HOLD_EFFECT_RED_CARD);
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
PLAYER(SPECIES_GROUDON) { Item(ITEM_RED_ORB); }
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
ASSUMPTIONS
|
||||
{
|
||||
ASSUME(gMovesInfo[MOVE_THUNDERBOLT].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_THUNDERBOLT));
|
||||
ASSUME(gMovesInfo[MOVE_THUNDERBOLT].type == TYPE_ELECTRIC);
|
||||
}
|
||||
|
||||
|
@ -115,7 +115,7 @@ SINGLE_BATTLE_TEST("Charge's effect is removed regardless if the next move is El
|
|||
|
||||
GIVEN {
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].type != TYPE_ELECTRIC);
|
||||
ASSUME(gMovesInfo[MOVE_TACKLE].power != 0);
|
||||
ASSUME(!IS_MOVE_STATUS(MOVE_TACKLE));
|
||||
PLAYER(SPECIES_WOBBUFFET);
|
||||
OPPONENT(SPECIES_WOBBUFFET);
|
||||
} WHEN {
|
||||
|
|
Loading…
Reference in a new issue