Skip to content

Commit

Permalink
Merge branch '_RHH/master' into _RHH/upcoming
Browse files Browse the repository at this point in the history
  • Loading branch information
AsparagusEduardo committed Dec 20, 2024
2 parents f27bf84 + 9a0b575 commit 53aebc3
Show file tree
Hide file tree
Showing 57 changed files with 735 additions and 176 deletions.
24 changes: 14 additions & 10 deletions data/battle_scripts_1.s
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,11 @@ BattleScript_EffectTidyUp::
pause B_WAIT_TIME_MED
ppreduce
waitstate
saveattacker
savetarget
trytidyup FALSE, BattleScript_EffectTidyUpDoMoveAnimation
restoreattacker
restoretarget
goto BattleScript_EffectDragonDanceFromStatUp

BattleScript_EffectTidyUpDoMoveAnimation::
Expand All @@ -143,6 +147,8 @@ BattleScript_EffectTidyUpDoMoveAnimation::
trytidyup TRUE, NULL
printstring STRINGID_TIDYINGUPCOMPLETE
waitmessage B_WAIT_TIME_LONG
restoreattacker
restoretarget
goto BattleScript_EffectDragonDanceFromStatUp

BattleScript_EffectUpperHand::
Expand Down Expand Up @@ -1220,7 +1226,6 @@ BattleScript_StrengthSapLower:
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printfromtable gStatDownStringIds
waitmessage B_WAIT_TIME_LONG
goto BattleScript_StrengthSapHp
@ Drain HP without lowering a stat
BattleScript_StrengthSapHp:
jumpifability BS_TARGET, ABILITY_LIQUID_OOZE, BattleScript_StrengthSapManipulateDmg
Expand Down Expand Up @@ -6371,18 +6376,14 @@ BattleScript_GulpMissileGulping::
datahpupdate BS_ATTACKER
tryfaintmon BS_ATTACKER
jumpiffainted BS_ATTACKER, TRUE, BattleScript_GulpMissileNoSecondEffectGulping
jumpifholdeffect BS_ATTACKER, HOLD_EFFECT_CLEAR_AMULET, BattleScript_GulpMissileNoSecondEffectGulping
jumpifability BS_ATTACKER, ABILITY_CLEAR_BODY, BattleScript_GulpMissileNoSecondEffectGulping
jumpifability BS_ATTACKER, ABILITY_FULL_METAL_BODY, BattleScript_GulpMissileNoSecondEffectGulping
jumpifability BS_ATTACKER, ABILITY_WHITE_SMOKE, BattleScript_GulpMissileNoSecondEffectGulping
jumpifflowerveilattacker BattleScript_GulpMissileNoSecondEffectGulping
BattleScript_GulpMissileNoDmgGulping:
handleformchange BS_TARGET, 0
playanimation BS_TARGET, B_ANIM_FORM_CHANGE
waitanimation
swapattackerwithtarget @ to make gStatDownStringIds down below print the right battler
setstatchanger STAT_DEF, 1, TRUE
statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED, BattleScript_GulpMissileGorgingTargetDefenseCantGoLower
statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED | STAT_CHANGE_ALLOW_PTR, BattleScript_GulpMissileGulpingEnd
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_GulpMissileGulpingTargetDefenseCantGoLower
setgraphicalstatchangevalues
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printfromtable gStatDownStringIds
Expand All @@ -6394,9 +6395,11 @@ BattleScript_GulpMissileNoSecondEffectGulping:
playanimation BS_TARGET, B_ANIM_FORM_CHANGE
waitanimation
return
BattleScript_GulpMissileGorgingTargetDefenseCantGoLower:
BattleScript_GulpMissileGulpingTargetDefenseCantGoLower:
printstring STRINGID_STATSWONTDECREASE
waitmessage B_WAIT_TIME_LONG
BattleScript_GulpMissileGulpingEnd:
swapattackerwithtarget @ restore the battlers, just in case
return

BattleScript_SeedSowerActivates::
Expand Down Expand Up @@ -7124,7 +7127,8 @@ BattleScript_CottonDownLoop:
jumpiffainted BS_TARGET, TRUE, BattleScript_CottonDownLoopIncrement
setstatchanger STAT_SPEED, 1, TRUE
jumpifbyteequal gBattlerTarget, gEffectBattler, BattleScript_CottonDownLoopIncrement
statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED, BattleScript_CottonDownTargetSpeedCantGoLower
statbuffchange STAT_CHANGE_NOT_PROTECT_AFFECTED | STAT_CHANGE_ALLOW_PTR, BattleScript_CottonDownLoopIncrement
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_DECREASE, BattleScript_CottonDownTargetSpeedCantGoLower
setgraphicalstatchangevalues
playanimation BS_TARGET, B_ANIM_STATS_CHANGE, sB_ANIM_ARG1
printfromtable gStatDownStringIds
Expand Down Expand Up @@ -9067,7 +9071,7 @@ BattleScript_BerryStatRaiseEnd2::
BattleScript_BerryStatRaiseEnd2_AbilityPopup:
call BattleScript_AbilityPopUp
BattleScript_BerryStatRaiseEnd2_Anim:
statbuffchange STAT_CHANGE_ALLOW_PTR, BattleScript_BerryStatRaiseEnd2_End
statbuffchange STAT_CHANGE_ALLOW_PTR | MOVE_EFFECT_AFFECTS_USER, BattleScript_BerryStatRaiseEnd2_End
setgraphicalstatchangevalues
playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, sB_ANIM_ARG1
setbyte cMULTISTRING_CHOOSER, B_MSG_STAT_ROSE_ITEM
Expand Down
1 change: 1 addition & 0 deletions docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- [How to add a new move](tutorials/how_to_new_move.md)
- [How to add a new trainer class](tutorials/how_to_trainer_class.md)
- [How to add a new Pokémon]()
- [v1.10.x](tutorials/how_to_new_pokemon_1_10_0.md)
- [v1.9.x](tutorials/how_to_new_pokemon_1_9_0.md)
- [v1.8.x](tutorials/how_to_new_pokemon_1_8_0.md)
- [v1.7.x](tutorials/how_to_new_pokemon_1_7_0.md)
Expand Down
7 changes: 4 additions & 3 deletions include/battle.h
Original file line number Diff line number Diff line change
Expand Up @@ -864,9 +864,10 @@ 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)

/* Checks if 'battlerId' is any of the types.
Expand Down
2 changes: 2 additions & 0 deletions include/config/battle.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
#define B_ABILITY_TRIGGER_CHANCE GEN_LATEST // In Gen3, Shed Skin, Cute Charm, Flame Body, Static and Poison Point have a 1/3 chance to trigger. In Gen 4+ it's 30%.
// In Gen3, Effect Spore has a 10% chance to sleep, poison or paralyze, with an equal chance.
// In Gen4, it's 30%. In Gen5+ it has 11% to sleep, 9% chance to poison and 10% chance to paralyze.
#define B_PICKUP_WILD GEN_LATEST // In Gen9+, Pickup allows its user to pickup its own used item at the end of the turn in wild battles.

// Item settings
#define B_HP_BERRIES GEN_LATEST // In Gen4+, berries which restore HP activate immediately after HP drops to half. In Gen3, the effect occurs at the end of the turn.
Expand All @@ -165,6 +166,7 @@
#define B_MENTAL_HERB GEN_LATEST // In Gen5+, the Mental Herb cures Taunt, Encore, Torment, Heal Block, and Disable in addition to Infatuation from before.
#define B_TRAINERS_KNOCK_OFF_ITEMS TRUE // If TRUE, trainers can steal/swap your items (non-berries are restored after battle). In vanilla games trainers cannot steal items.
#define B_RETURN_STOLEN_NPC_ITEMS GEN_LATEST // In Gen5+, Thief and Covet no longer steal items from NPCs.
#define B_STEAL_WILD_ITEMS GEN_LATEST // In Gen9, Thief and Covet steal a wild pokemon's item and send it to the bag. Before Gen9, the stolen item would be held by the Thief/Covet user.
#define B_RESTORE_HELD_BATTLE_ITEMS GEN_LATEST // In Gen9, all non-berry items are restored after battle.
#define B_SOUL_DEW_BOOST GEN_LATEST // In Gens3-6, Soul Dew boosts Latis' Sp. Atk and Sp. Def. In Gen7+ it boosts the power of their Psychic and Dragon type moves instead.
#define B_NET_BALL_MODIFIER GEN_LATEST // In Gen7+, Net Ball's catch multiplier is x5 instead of x3.
Expand Down
2 changes: 1 addition & 1 deletion include/config/pokemon.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
#define P_SHOW_TERA_TYPE GEN_8 // Since Gen 9, the Tera Type is shown on the summary screen.
#define P_TM_LITERACY GEN_LATEST // Since Gen 6, TM illiterate Pokémon can learn TMs that teach moves that are in their level-up learnsets.
#define P_CAN_FORGET_HIDDEN_MOVE FALSE // If TRUE, Pokémon can forget any move, even if it is a Hidden Move.
#define P_EGG_CYCLE_LENGTH GEN_LATEST // Since Gen 8, egg cycles take half as many steps as before.
#define P_EGG_CYCLE_LENGTH GEN_LATEST // Since Gen 8, egg cycles take half as many steps as before. Previous Gens have some varied step counts around 255.
#define P_ONLY_OBTAINABLE_SHINIES FALSE // If TRUE, Pokémon encountered in the Battle Pyramid won't be shiny.
#define P_NO_SHINIES_WITHOUT_POKEBALLS FALSE // If TRUE, Pokémon encountered when the player is out of Poké Balls won't be shiny
#define P_SHOW_DYNAMIC_TYPES FALSE // If TRUE, all moves with dynamic type changes will be reflected as their current type in battle/summary screens instead of just select ones like in vanilla.
Expand Down
3 changes: 1 addition & 2 deletions include/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -815,8 +815,7 @@ struct DayCare
{
struct DaycareMon mons[DAYCARE_MON_COUNT];
u32 offspringPersonality;
u8 stepCounter;
//u8 padding[3];
u32 stepCounter;
};

struct LilycoveLadyQuiz
Expand Down
8 changes: 4 additions & 4 deletions src/battle_ai_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -2619,8 +2619,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)
{
Expand Down Expand Up @@ -4937,7 +4937,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;
Expand Down
14 changes: 7 additions & 7 deletions src/battle_ai_switch_items.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -1242,7 +1242,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);
Expand Down Expand Up @@ -1698,7 +1698,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)
Expand Down Expand Up @@ -1826,7 +1826,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);
Expand Down Expand Up @@ -1856,7 +1856,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)
{
Expand Down
4 changes: 2 additions & 2 deletions src/battle_ai_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -2419,7 +2419,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;
}

Expand All @@ -2434,7 +2434,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;
}

Expand Down
78 changes: 78 additions & 0 deletions src/battle_anim_effects_1.c
Original file line number Diff line number Diff line change
Expand Up @@ -6642,6 +6642,79 @@ static void ReloadBattlerSprites(u32 battler, struct Pokemon *party)
}
}

static void TrySwapSkyDropTargets(u32 battlerAtk, u32 battlerPartner)
{
u32 i, temp;

// battlerAtk is using Ally Switch
// check if our partner is the target of sky drop
// If so, change that index to battlerAtk
for (i = 0; i < gBattlersCount; i++) {
if (gBattleStruct->skyDropTargets[i] == battlerPartner) {
gBattleStruct->skyDropTargets[i] = battlerAtk;
break;
}
}

// Then swap our own sky drop targets with the partner in case our partner is mid-skydrop
SWAP(gBattleStruct->skyDropTargets[battlerAtk], gBattleStruct->skyDropTargets[battlerPartner], temp);
}

#define TRY_SIDE_TIMER_BATTLER_ID_SWAP(battlerAtk, battlerPartner, side, field) \
if (gSideTimers[side].field == battlerAtk) \
gSideTimers[side].field = battlerPartner; \
else if (gSideTimers[side].field == battlerPartner) \
gSideTimers[side].field = battlerAtk;

static void TrySwapStickyWebBattlerId(u32 battlerAtk, u32 battlerPartner)
{
u32 atkSide = GetBattlerSide(battlerAtk);
u32 oppSide = GetBattlerSide(BATTLE_OPPOSITE(battlerAtk));

// not all of these are needed to be swapped, but are done so to be robust to anything in the future that might care about them
TRY_SIDE_TIMER_BATTLER_ID_SWAP(battlerAtk, battlerPartner, atkSide, reflectBattlerId);
TRY_SIDE_TIMER_BATTLER_ID_SWAP(battlerAtk, battlerPartner, atkSide, lightscreenBattlerId);
TRY_SIDE_TIMER_BATTLER_ID_SWAP(battlerAtk, battlerPartner, atkSide, mistBattlerId);
TRY_SIDE_TIMER_BATTLER_ID_SWAP(battlerAtk, battlerPartner, atkSide, safeguardBattlerId);
TRY_SIDE_TIMER_BATTLER_ID_SWAP(battlerAtk, battlerPartner, atkSide, auroraVeilBattlerId);
TRY_SIDE_TIMER_BATTLER_ID_SWAP(battlerAtk, battlerPartner, atkSide, tailwindBattlerId);
TRY_SIDE_TIMER_BATTLER_ID_SWAP(battlerAtk, battlerPartner, atkSide, luckyChantBattlerId);

// if we've set sticky web on the opposing side, need to swap stickyWebBattlerId for mirror armor
TRY_SIDE_TIMER_BATTLER_ID_SWAP(battlerAtk, battlerPartner, oppSide, stickyWebBattlerId);
}
#undef TRY_SIDE_TIMER_BATTLER_ID_SWAP

static void TrySwapWishBattlerIds(u32 battlerAtk, u32 battlerPartner)
{
u32 i, temp;
u32 oppSide = GetBattlerSide(BATTLE_OPPOSITE(battlerAtk));

// if used future sight on opposing side, properly track who used it
if (gSideStatuses[oppSide] & SIDE_STATUS_FUTUREATTACK) {
for (i = 0; i < gBattlersCount; i++) {
if (IsAlly(i,battlerAtk))
continue; // only on opposing side
if (gWishFutureKnock.futureSightBattlerIndex[i] == battlerAtk) {
// if target was attacked with future sight from us, now they'll be the partner slot
gWishFutureKnock.futureSightBattlerIndex[i] = battlerPartner;
gWishFutureKnock.futureSightPartyIndex[i] = gBattlerPartyIndexes[battlerPartner];
break;
} else if (gWishFutureKnock.futureSightBattlerIndex[i] == battlerPartner) {
gWishFutureKnock.futureSightBattlerIndex[i] = battlerAtk;
gWishFutureKnock.futureSightPartyIndex[i] = gBattlerPartyIndexes[battlerAtk];
break;
}
}
}

// swap wish party indices
if (gWishFutureKnock.wishCounter[battlerAtk] > 0
|| gWishFutureKnock.wishCounter[battlerPartner] > 0) {
SWAP(gWishFutureKnock.wishPartyId[battlerAtk], gWishFutureKnock.wishPartyId[battlerPartner], temp);
}
}

static void AnimTask_AllySwitchDataSwap(u8 taskId)
{
s32 i, j;
Expand Down Expand Up @@ -6684,6 +6757,7 @@ static void AnimTask_AllySwitchDataSwap(u8 taskId)
break;
}
SWAP(gBattlerByTurnOrder[i], gBattlerByTurnOrder[j], temp);
SWAP(gActionsByTurnOrder[i], gActionsByTurnOrder[j], temp);
break;
}
}
Expand All @@ -6692,6 +6766,10 @@ static void AnimTask_AllySwitchDataSwap(u8 taskId)
SwitchTwoBattlersInParty(battlerAtk, battlerPartner);
SWAP(gBattlerPartyIndexes[battlerAtk], gBattlerPartyIndexes[battlerPartner], temp);

TrySwapSkyDropTargets(battlerAtk, battlerPartner);
TrySwapStickyWebBattlerId(battlerAtk, battlerPartner);
TrySwapWishBattlerIds(battlerAtk, battlerPartner);

// For Snipe Shot and abilities Stalwart/Propeller Tail - keep the original target.
for (i = 0; i < MAX_BATTLERS_COUNT; i++)
{
Expand Down
4 changes: 2 additions & 2 deletions src/battle_arena.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading

0 comments on commit 53aebc3

Please sign in to comment.