Finish Expanding Force

Hits both foes if the user is affected by Psychic Terrain. Modified targeting is also shown in the move selection screen.
This commit is contained in:
BuffelSaft 2021-11-21 21:49:47 +13:00
parent bcaa17ffb3
commit abb67e96e8
2 changed files with 10 additions and 1 deletions

View File

@ -609,6 +609,13 @@ static void HandleInputChooseMove(void)
else
moveTarget = MOVE_TARGET_SELECTED;
}
else if (moveInfo->moves[gMoveSelectionCursor[gActiveBattler]] == MOVE_EXPANDING_FORCE)
{
if (IsBattlerTerrainAffected(gActiveBattler, STATUS_FIELD_PSYCHIC_TERRAIN))
moveTarget = MOVE_TARGET_BOTH;
else
moveTarget = MOVE_TARGET_SELECTED;
}
else
{
moveTarget = gBattleMoves[moveInfo->moves[gMoveSelectionCursor[gActiveBattler]]].target;

View File

@ -5246,7 +5246,9 @@ static void Cmd_moveend(void)
if (!(gHitMarker & HITMARKER_UNABLE_TO_USE_MOVE)
&& gBattleTypeFlags & BATTLE_TYPE_DOUBLE
&& !gProtectStructs[gBattlerAttacker].chargingTurn
&& (gBattleMoves[gCurrentMove].target == MOVE_TARGET_BOTH || gBattleMoves[gCurrentMove].target == MOVE_TARGET_FOES_AND_ALLY)
&& (gBattleMoves[gCurrentMove].target == MOVE_TARGET_BOTH
|| gBattleMoves[gCurrentMove].target == MOVE_TARGET_FOES_AND_ALLY
|| (gBattleMoves[gCurrentMove].effect == EFFECT_EXPANDING_FORCE && IsBattlerTerrainAffected(gBattlerAttacker, STATUS_FIELD_PSYCHIC_TERRAIN)))
&& !(gHitMarker & HITMARKER_NO_ATTACKSTRING))
{
u8 battlerId;