Fixes Rage Fist for gen7 Disguise (#7692)

This commit is contained in:
Alex 2025-09-08 11:56:31 +02:00 committed by GitHub
parent 6aead97a37
commit 7a0e5046d1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 6 additions and 2 deletions

View File

@ -6584,6 +6584,7 @@ BattleScript_CudChewActivates::
BattleScript_ApplyDisguiseFormChangeHPLoss::
jumpifgenconfiglowerthan GEN_CONFIG_DISGUISE_HP_LOSS, GEN_8, BattleScript_ApplyDisguiseFormChangeHPLossReturn
orword gHitMarker, HITMARKER_PASSIVE_HP_UPDATE
healthbarupdate BS_SCRIPTING
datahpupdate BS_SCRIPTING
BattleScript_ApplyDisguiseFormChangeHPLossReturn:

View File

@ -2321,6 +2321,7 @@ static void Cmd_datahpupdate(void)
{
CMD_ARGS(u8 battler);
bool32 isPassiveHpUpdate = gHitMarker & HITMARKER_PASSIVE_HP_UPDATE;
bool32 disguiseActivates = FALSE;
if (gBattleControllerExecFlags)
return;
@ -2362,7 +2363,7 @@ static void Cmd_datahpupdate(void)
gBattleStruct->moveDamage[battler] = GetNonDynamaxMaxHP(battler) / 8;
BattleScriptPush(cmd->nextInstr);
gBattlescriptCurrInstr = BattleScript_TargetFormChange;
return;
disguiseActivates = TRUE;
}
else
{
@ -2447,6 +2448,9 @@ static void Cmd_datahpupdate(void)
&& CanBattlerGetOrLoseItem(gBattlerTarget, gBattleMons[gBattlerTarget].item)
&& !NoAliveMonsForEitherParty())
gBattleStruct->battlerState[gBattlerTarget].itemCanBeKnockedOff = TRUE;
if (disguiseActivates)
return;
}
TryRestoreDamageAfterCheekPouch(battler);

View File

@ -251,7 +251,6 @@ SINGLE_BATTLE_TEST("Rage Fist base power is not increased if move had no affect"
SINGLE_BATTLE_TEST("Rage Fist base power is increased if Disguise breaks (Gen7)")
{
KNOWN_FAILING;
s16 timesGotHit[2];
u16 species = SPECIES_NONE;