Future Sight Innards Out follow up for upcoming (#5998)

This commit is contained in:
Alex 2025-01-12 00:25:50 +01:00 committed by GitHub
parent 7f2b76d597
commit ddef67bbb1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 24 deletions

View File

@ -291,7 +291,6 @@ struct WishFutureKnock
u8 wishPartyId[MAX_BATTLERS_COUNT];
u8 weatherDuration;
u8 knockedOffMons[NUM_BATTLE_SIDES]; // Each battler is represented by a bit.
s16 futureSightDmg;
};
struct AI_SavedBattleMon

View File

@ -2647,9 +2647,6 @@ static void Cmd_datahpupdate(void)
u32 effect = GetMoveEffect(gCurrentMove);
// Record damage for foreseen moves
gWishFutureKnock.futureSightDmg = gBattleStruct->moveDamage[battler];
// Note: While physicalDmg/specialDmg below are only distinguished between for Counter/Mirror Coat, they are
// used in combination as general damage trackers for other purposes. specialDmg is additionally used
// to help determine if a fire move should defrost the target.
@ -14241,7 +14238,6 @@ static void Cmd_trysetfutureattack(void)
gWishFutureKnock.futureSightBattlerIndex[gBattlerTarget] = gBattlerAttacker;
gWishFutureKnock.futureSightPartyIndex[gBattlerTarget] = gBattlerPartyIndexes[gBattlerAttacker];
gWishFutureKnock.futureSightCounter[gBattlerTarget] = 3;
gWishFutureKnock.futureSightDmg = 0;
if (gCurrentMove == MOVE_DOOM_DESIRE)
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_DOOM_DESIRE;

View File

@ -5887,27 +5887,18 @@ u32 AbilityBattleEffects(u32 caseID, u32 battler, u32 ability, u32 special, u32
&& !IsBattlerAlive(gBattlerTarget)
&& IsBattlerAlive(gBattlerAttacker))
{
//special Future Sight handling
if (gMovesInfo[gWishFutureKnock.futureSightMove[battler]].effect == EFFECT_FUTURE_SIGHT)
// Prevent Innards Out effect if Future Sight user is currently not on field
if (GetMoveEffect(gCurrentMove) == EFFECT_FUTURE_SIGHT)
{
//no Innards Out effect if Future Sight user is currently not on field
if (gWishFutureKnock.futureSightPartyIndex[gBattlerTarget] == gBattlerPartyIndexes[gBattlerAttacker]
|| gWishFutureKnock.futureSightPartyIndex[gBattlerTarget] == BATTLE_PARTNER(gBattlerPartyIndexes[gBattlerAttacker]))
{
gBattleStruct->moveDamage[gBattlerAttacker] = gWishFutureKnock.futureSightDmg;
gWishFutureKnock.futureSightDmg = 0;
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_AftermathDmg;
effect++;
}
}
else
{
gBattleStruct->moveDamage[gBattlerAttacker] = gBattleStruct->moveDamage[gBattlerTarget];
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_AftermathDmg;
effect++;
if (gWishFutureKnock.futureSightPartyIndex[gBattlerTarget] != gBattlerPartyIndexes[gBattlerAttacker]
&& gWishFutureKnock.futureSightPartyIndex[gBattlerTarget] != BATTLE_PARTNER(gBattlerPartyIndexes[gBattlerAttacker]))
break;
}
gBattleStruct->moveDamage[gBattlerAttacker] = gBattleStruct->moveDamage[gBattlerTarget];
BattleScriptPushCursor();
gBattlescriptCurrInstr = BattleScript_AftermathDmg;
effect++;
}
break;
case ABILITY_EFFECT_SPORE: