mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 04:04:17 +01:00
Merge pull request #1824 from ghoulslash/itemheal_fix
Fix iteam healing after a failed move
This commit is contained in:
commit
6b65ef5bcf
@ -5968,7 +5968,7 @@ BattleScript_DamagingWeatherHeal:
|
||||
printstring STRINGID_ICEBODYHPGAIN
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_DamagingWeatherHpChange:
|
||||
orword gHitMarker, HITMARKER_x20 | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 | HITMARKER_GRUDGE
|
||||
orword gHitMarker, HITMARKER_SKIP_DMG_TRACK | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE | HITMARKER_GRUDGE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
||||
@ -5978,7 +5978,7 @@ BattleScript_DamagingWeatherLoopIncrement::
|
||||
addbyte gBattleCommunication, 1
|
||||
jumpifbytenotequal gBattleCommunication, gBattlersCount, BattleScript_DamagingWeatherLoop
|
||||
BattleScript_DamagingWeatherContinuesEnd::
|
||||
bicword gHitMarker, HITMARKER_x20 | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 | HITMARKER_GRUDGE
|
||||
bicword gHitMarker, HITMARKER_SKIP_DMG_TRACK | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE | HITMARKER_GRUDGE
|
||||
end2
|
||||
|
||||
BattleScript_SandStormHailEnds::
|
||||
@ -6097,7 +6097,7 @@ BattleScript_SafeguardEnds::
|
||||
|
||||
BattleScript_LeechSeedTurnDrain::
|
||||
playanimation BS_ATTACKER, B_ANIM_LEECH_SEED_DRAIN, sB_ANIM_ARG1
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
copyword gBattleMoveDamage, gHpDealt
|
||||
@ -6111,7 +6111,7 @@ BattleScript_LeechSeedTurnPrintLiquidOoze::
|
||||
call BattleScript_AbilityPopUp
|
||||
setbyte cMULTISTRING_CHOOSER, B_MSG_LEECH_SEED_OOZE
|
||||
BattleScript_LeechSeedTurnPrintAndUpdateHp::
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
healthbarupdate BS_TARGET
|
||||
datahpupdate BS_TARGET
|
||||
printfromtable gLeechSeedStringIds
|
||||
@ -6292,14 +6292,14 @@ BattleScript_EncoredNoMore::
|
||||
BattleScript_DestinyBondTakesLife::
|
||||
printstring STRINGID_PKMNTOOKFOE
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
||||
return
|
||||
|
||||
BattleScript_DmgHazardsOnAttacker::
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
call BattleScript_PrintHurtByDmgHazards
|
||||
@ -6314,7 +6314,7 @@ BattleScript_DmgHazardsOnAttackerFainted::
|
||||
goto BattleScript_HandleFaintedMon
|
||||
|
||||
BattleScript_DmgHazardsOnTarget::
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
healthbarupdate BS_TARGET
|
||||
datahpupdate BS_TARGET
|
||||
call BattleScript_PrintHurtByDmgHazards
|
||||
@ -6329,7 +6329,7 @@ BattleScript_DmgHazardsOnTargetFainted::
|
||||
goto BattleScript_HandleFaintedMon
|
||||
|
||||
BattleScript_DmgHazardsOnFaintedBattler::
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
healthbarupdate BS_FAINTED
|
||||
datahpupdate BS_FAINTED
|
||||
call BattleScript_PrintHurtByDmgHazards
|
||||
@ -6384,7 +6384,7 @@ BattleScript_StickyWebOnSwitchInEnd:
|
||||
BattleScript_PerishSongTakesLife::
|
||||
printstring STRINGID_PKMNPERISHCOUNTFELL
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
||||
@ -6394,14 +6394,14 @@ BattleScript_PerishBodyActivates::
|
||||
call BattleScript_AbilityPopUp
|
||||
printstring STRINGID_PKMNSWILLPERISHIN3TURNS
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
return
|
||||
|
||||
BattleScript_GulpMissileGorging::
|
||||
call BattleScript_AbilityPopUp
|
||||
playanimation BS_ATTACKER, B_ANIM_GULP_MISSILE, NULL
|
||||
waitanimation
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
effectivenesssound
|
||||
hitanimation BS_ATTACKER
|
||||
waitstate
|
||||
@ -6430,7 +6430,7 @@ BattleScript_GulpMissileGulping::
|
||||
call BattleScript_AbilityPopUp
|
||||
playanimation BS_ATTACKER, B_ANIM_GULP_MISSILE, NULL
|
||||
waitanimation
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
effectivenesssound
|
||||
hitanimation BS_ATTACKER
|
||||
waitstate
|
||||
@ -7009,7 +7009,7 @@ BattleScript_AnticipationActivates::
|
||||
BattleScript_AftermathDmg::
|
||||
pause B_WAIT_TIME_SHORT
|
||||
call BattleScript_AbilityPopUp
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
printstring STRINGID_AFTERMATHDMG
|
||||
@ -7042,7 +7042,7 @@ BattleScript_PoisonTurnDmg::
|
||||
BattleScript_DoStatusTurnDmg::
|
||||
statusanimation BS_ATTACKER
|
||||
BattleScript_DoTurnDmg:
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
||||
@ -7055,7 +7055,7 @@ BattleScript_PoisonHealActivates::
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
recordability BS_ATTACKER
|
||||
statusanimation BS_ATTACKER
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
end2
|
||||
@ -7152,7 +7152,7 @@ BattleScript_DoSelfConfusionDmg::
|
||||
effectivenesssound
|
||||
hitanimation BS_ATTACKER
|
||||
waitstate
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
resultmessage
|
||||
@ -7173,7 +7173,7 @@ BattleScript_MoveUsedPowder::
|
||||
effectivenesssound
|
||||
hitanimation BS_ATTACKER
|
||||
waitstate
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
printstring STRINGID_POWDEREXPLODES
|
||||
@ -7347,7 +7347,7 @@ BattleScript_MoveEffectRecoil::
|
||||
jumpifmove MOVE_STRUGGLE, BattleScript_DoRecoil
|
||||
jumpifability BS_ATTACKER, ABILITY_ROCK_HEAD, BattleScript_RecoilEnd
|
||||
BattleScript_DoRecoil::
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 | HITMARKER_IGNORE_DISGUISE
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE | HITMARKER_IGNORE_DISGUISE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
printstring STRINGID_PKMNHITWITHRECOIL
|
||||
@ -7509,7 +7509,7 @@ BattleScript_HarvestActivatesEnd:
|
||||
end3
|
||||
|
||||
BattleScript_SolarPowerActivates::
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
call BattleScript_AbilityPopUp
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
@ -7755,7 +7755,7 @@ BattleScript_BadDreamsActivates::
|
||||
BattleScript_BadDreamsLoop:
|
||||
trygetbaddreamstarget BattleScript_BadDreamsEnd
|
||||
dmg_1_8_targethp
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
printstring STRINGID_BADDREAMSDMG
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
jumpifability BS_TARGET, ABILITY_MAGIC_GUARD, BattleScript_BadDreamsIncrement
|
||||
@ -7924,14 +7924,14 @@ BattleScript_GrassyTerrainLoop:
|
||||
printstring STRINGID_GRASSYTERRAINHEALS
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
BattleScript_GrassyTerrainHpChange:
|
||||
orword gHitMarker, HITMARKER_x20 | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
orword gHitMarker, HITMARKER_SKIP_DMG_TRACK | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
BattleScript_GrassyTerrainLoopIncrement::
|
||||
addbyte gBattleCommunication, 1
|
||||
jumpifbytenotequal gBattleCommunication, gBattlersCount, BattleScript_GrassyTerrainLoop
|
||||
BattleScript_GrassyTerrainLoopEnd::
|
||||
bicword gHitMarker, HITMARKER_x20 | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
bicword gHitMarker, HITMARKER_SKIP_DMG_TRACK | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
jumpifword CMP_COMMON_BITS, gFieldStatuses, STATUS_FIELD_TERRAIN_PERMANENT, BattleScript_GrassyTerrainHealEnd
|
||||
jumpifbyte CMP_EQUAL, gFieldTimers + 5, 0, BattleScript_GrassyTerrainEnds
|
||||
BattleScript_GrassyTerrainHealEnd:
|
||||
@ -8127,7 +8127,7 @@ BattleScript_ImposterActivates::
|
||||
end3
|
||||
|
||||
BattleScript_HurtAttacker:
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
printstring STRINGID_PKMNHURTSWITH
|
||||
@ -8151,7 +8151,7 @@ BattleScript_RockyHelmetActivatesDmg:
|
||||
|
||||
BattleScript_SpikyShieldEffect::
|
||||
jumpifabsent BS_ATTACKER, BattleScript_SpikyShieldRet
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
bichalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
@ -8162,7 +8162,7 @@ BattleScript_SpikyShieldRet::
|
||||
return
|
||||
|
||||
BattleScript_KingsShieldEffect::
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
bichalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT
|
||||
seteffectsecondary
|
||||
setmoveeffect 0
|
||||
@ -8172,7 +8172,7 @@ BattleScript_KingsShieldEffect::
|
||||
return
|
||||
|
||||
BattleScript_BanefulBunkerEffect::
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_IGNORE_SAFEGUARD | HITMARKER_x100000
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_IGNORE_SAFEGUARD | HITMARKER_PASSIVE_DAMAGE
|
||||
bichalfword gMoveResultFlags, MOVE_RESULT_NO_EFFECT
|
||||
seteffectsecondary
|
||||
setmoveeffect 0
|
||||
@ -8426,7 +8426,7 @@ BattleScript_ItemHealHP_RemoveItemRet_Anim:
|
||||
playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL
|
||||
printstring STRINGID_PKMNSITEMRESTOREDHEALTH
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
||||
orword gHitMarker, HITMARKER_SKIP_DMG_TRACK | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
healthbarupdate BS_SCRIPTING
|
||||
datahpupdate BS_SCRIPTING
|
||||
removeitem BS_SCRIPTING
|
||||
@ -8441,7 +8441,7 @@ BattleScript_ItemHealHP_RemoveItemEnd2_Anim:
|
||||
playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL
|
||||
printstring STRINGID_PKMNSITEMRESTOREDHEALTH
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
||||
orword gHitMarker, HITMARKER_SKIP_DMG_TRACK | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
removeitem BS_ATTACKER
|
||||
@ -8475,7 +8475,7 @@ BattleScript_AirBaloonMsgPop::
|
||||
return
|
||||
|
||||
BattleScript_ItemHurtRet::
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_x100000 | HITMARKER_IGNORE_DISGUISE
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE | HITMARKER_IGNORE_DISGUISE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
printstring STRINGID_HURTBYITEM
|
||||
@ -8493,7 +8493,7 @@ BattleScript_ItemHealHP_Ret::
|
||||
playanimation BS_ATTACKER, B_ANIM_HELD_ITEM_EFFECT, NULL
|
||||
printstring STRINGID_PKMNSITEMRESTOREDHPALITTLE
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_IGNORE_DISGUISE
|
||||
orword gHitMarker, HITMARKER_SKIP_DMG_TRACK | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_IGNORE_DISGUISE | HITMARKER_PASSIVE_DAMAGE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
return
|
||||
@ -8524,7 +8524,7 @@ BattleScript_BerryConfuseHealEnd2_Anim:
|
||||
playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL
|
||||
printstring STRINGID_PKMNSITEMRESTOREDHEALTH
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
||||
orword gHitMarker, HITMARKER_SKIP_DMG_TRACK | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
healthbarupdate BS_SCRIPTING
|
||||
datahpupdate BS_SCRIPTING
|
||||
printstring STRINGID_FORXCOMMAYZ
|
||||
@ -8543,7 +8543,7 @@ BattleScript_BerryConfuseHealRet_Anim:
|
||||
playanimation BS_SCRIPTING, B_ANIM_HELD_ITEM_EFFECT, NULL
|
||||
printstring STRINGID_PKMNSITEMRESTOREDHEALTH
|
||||
waitmessage B_WAIT_TIME_LONG
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
||||
orword gHitMarker, HITMARKER_SKIP_DMG_TRACK | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_PASSIVE_DAMAGE
|
||||
healthbarupdate BS_SCRIPTING
|
||||
datahpupdate BS_SCRIPTING
|
||||
printstring STRINGID_FORXCOMMAYZ
|
||||
|
@ -176,7 +176,7 @@
|
||||
#define STATUS4_PLASMA_FISTS (1 << 1)
|
||||
|
||||
#define HITMARKER_x10 (1 << 4)
|
||||
#define HITMARKER_x20 (1 << 5)
|
||||
#define HITMARKER_SKIP_DMG_TRACK (1 << 5)
|
||||
#define HITMARKER_DESTINYBOND (1 << 6)
|
||||
#define HITMARKER_NO_ANIMATIONS (1 << 7)
|
||||
#define HITMARKER_IGNORE_SUBSTITUTE (1 << 8)
|
||||
@ -190,7 +190,7 @@
|
||||
#define HITMARKER_IGNORE_DISGUISE (1 << 16)
|
||||
// 3 free spots because of change in handling of UNDERGROUND/UNDERWATER/ON AIR
|
||||
#define HITMARKER_UNABLE_TO_USE_MOVE (1 << 19)
|
||||
#define HITMARKER_x100000 (1 << 20)
|
||||
#define HITMARKER_PASSIVE_DAMAGE (1 << 20)
|
||||
#define HITMARKER_x200000 (1 << 21)
|
||||
#define HITMARKER_x400000 (1 << 22)
|
||||
#define HITMARKER_x800000 (1 << 23)
|
||||
|
@ -3638,7 +3638,7 @@ void BattleTurnPassed(void)
|
||||
gHitMarker &= ~(HITMARKER_NO_ATTACKSTRING);
|
||||
gHitMarker &= ~(HITMARKER_UNABLE_TO_USE_MOVE);
|
||||
gHitMarker &= ~(HITMARKER_x400000);
|
||||
gHitMarker &= ~(HITMARKER_x100000);
|
||||
gHitMarker &= ~(HITMARKER_PASSIVE_DAMAGE);
|
||||
gBattleScripting.animTurn = 0;
|
||||
gBattleScripting.animTargetsHit = 0;
|
||||
gBattleScripting.moveendState = 0;
|
||||
@ -4775,7 +4775,7 @@ static void RunTurnActionsFunctions(void)
|
||||
|
||||
if (gCurrentTurnActionNumber >= gBattlersCount) // everyone did their actions, turn finished
|
||||
{
|
||||
gHitMarker &= ~(HITMARKER_x100000);
|
||||
gHitMarker &= ~(HITMARKER_PASSIVE_DAMAGE);
|
||||
gBattleMainFunc = sEndTurnFuncsTable[gBattleOutcome & 0x7F];
|
||||
}
|
||||
else
|
||||
|
@ -2123,7 +2123,7 @@ static void Cmd_healthbarupdate(void)
|
||||
if (gBattleControllerExecFlags)
|
||||
return;
|
||||
|
||||
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT))
|
||||
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) || (gHitMarker & HITMARKER_PASSIVE_DAMAGE))
|
||||
{
|
||||
gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]);
|
||||
|
||||
@ -2160,7 +2160,7 @@ static void Cmd_datahpupdate(void)
|
||||
else
|
||||
moveType = gBattleMoves[gCurrentMove].type;
|
||||
|
||||
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT))
|
||||
if (!(gMoveResultFlags & MOVE_RESULT_NO_EFFECT) || (gHitMarker & HITMARKER_PASSIVE_DAMAGE))
|
||||
{
|
||||
gActiveBattler = GetBattlerForBattleScript(gBattlescriptCurrInstr[1]);
|
||||
if (DoesSubstituteBlockMove(gBattlerAttacker, gActiveBattler, gCurrentMove) && gDisableStructs[gActiveBattler].substituteHP && !(gHitMarker & HITMARKER_IGNORE_SUBSTITUTE))
|
||||
@ -2206,9 +2206,9 @@ static void Cmd_datahpupdate(void)
|
||||
}
|
||||
else // hp goes down
|
||||
{
|
||||
if (gHitMarker & HITMARKER_x20)
|
||||
if (gHitMarker & HITMARKER_SKIP_DMG_TRACK)
|
||||
{
|
||||
gHitMarker &= ~(HITMARKER_x20);
|
||||
gHitMarker &= ~(HITMARKER_SKIP_DMG_TRACK);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -2230,10 +2230,10 @@ static void Cmd_datahpupdate(void)
|
||||
gBattleMons[gActiveBattler].hp = 0;
|
||||
}
|
||||
|
||||
if (!gSpecialStatuses[gActiveBattler].dmg && !(gHitMarker & HITMARKER_x100000))
|
||||
if (!gSpecialStatuses[gActiveBattler].dmg && !(gHitMarker & HITMARKER_PASSIVE_DAMAGE))
|
||||
gSpecialStatuses[gActiveBattler].dmg = gHpDealt;
|
||||
|
||||
if (IS_MOVE_PHYSICAL(gCurrentMove) && !(gHitMarker & HITMARKER_x100000) && gCurrentMove != MOVE_PAIN_SPLIT)
|
||||
if (IS_MOVE_PHYSICAL(gCurrentMove) && !(gHitMarker & HITMARKER_PASSIVE_DAMAGE) && gCurrentMove != MOVE_PAIN_SPLIT)
|
||||
{
|
||||
gProtectStructs[gActiveBattler].physicalDmg = gHpDealt;
|
||||
gSpecialStatuses[gActiveBattler].physicalDmg = gHpDealt;
|
||||
@ -2248,7 +2248,7 @@ static void Cmd_datahpupdate(void)
|
||||
gSpecialStatuses[gActiveBattler].physicalBattlerId = gBattlerTarget;
|
||||
}
|
||||
}
|
||||
else if (!IS_MOVE_PHYSICAL(gCurrentMove) && !(gHitMarker & HITMARKER_x100000))
|
||||
else if (!IS_MOVE_PHYSICAL(gCurrentMove) && !(gHitMarker & HITMARKER_PASSIVE_DAMAGE))
|
||||
{
|
||||
gProtectStructs[gActiveBattler].specialDmg = gHpDealt;
|
||||
gSpecialStatuses[gActiveBattler].specialDmg = gHpDealt;
|
||||
@ -2264,7 +2264,7 @@ static void Cmd_datahpupdate(void)
|
||||
}
|
||||
}
|
||||
}
|
||||
gHitMarker &= ~(HITMARKER_x100000);
|
||||
gHitMarker &= ~(HITMARKER_PASSIVE_DAMAGE);
|
||||
BtlController_EmitSetMonData(0, REQUEST_HP_BATTLE, 0, 2, &gBattleMons[gActiveBattler].hp);
|
||||
MarkBattlerForControllerExec(gActiveBattler);
|
||||
}
|
||||
|
@ -864,7 +864,7 @@ void HandleAction_NothingIsFainted(void)
|
||||
gCurrentTurnActionNumber++;
|
||||
gCurrentActionFuncId = gActionsByTurnOrder[gCurrentTurnActionNumber];
|
||||
gHitMarker &= ~(HITMARKER_DESTINYBOND | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_ATTACKSTRING_PRINTED
|
||||
| HITMARKER_NO_PPDEDUCT | HITMARKER_IGNORE_SAFEGUARD | HITMARKER_x100000
|
||||
| HITMARKER_NO_PPDEDUCT | HITMARKER_IGNORE_SAFEGUARD | HITMARKER_PASSIVE_DAMAGE
|
||||
| HITMARKER_OBEYS | HITMARKER_x10 | HITMARKER_SYNCHRONISE_EFFECT
|
||||
| HITMARKER_CHARGING | HITMARKER_x4000000);
|
||||
}
|
||||
@ -876,7 +876,7 @@ void HandleAction_ActionFinished(void)
|
||||
gCurrentActionFuncId = gActionsByTurnOrder[gCurrentTurnActionNumber];
|
||||
SpecialStatusesClear();
|
||||
gHitMarker &= ~(HITMARKER_DESTINYBOND | HITMARKER_IGNORE_SUBSTITUTE | HITMARKER_ATTACKSTRING_PRINTED
|
||||
| HITMARKER_NO_PPDEDUCT | HITMARKER_IGNORE_SAFEGUARD | HITMARKER_x100000
|
||||
| HITMARKER_NO_PPDEDUCT | HITMARKER_IGNORE_SAFEGUARD | HITMARKER_PASSIVE_DAMAGE
|
||||
| HITMARKER_OBEYS | HITMARKER_x10 | HITMARKER_SYNCHRONISE_EFFECT
|
||||
| HITMARKER_CHARGING | HITMARKER_x4000000 | HITMARKER_IGNORE_DISGUISE);
|
||||
|
||||
@ -2414,7 +2414,7 @@ u8 DoBattlerEndTurnEffects(void)
|
||||
{
|
||||
u32 ability, i, effect = 0;
|
||||
|
||||
gHitMarker |= (HITMARKER_GRUDGE | HITMARKER_x20);
|
||||
gHitMarker |= (HITMARKER_GRUDGE | HITMARKER_SKIP_DMG_TRACK);
|
||||
while (gBattleStruct->turnEffectsBattlerId < gBattlersCount && gBattleStruct->turnEffectsTracker <= ENDTURN_BATTLER_COUNT)
|
||||
{
|
||||
gActiveBattler = gBattlerAttacker = gBattlerByTurnOrder[gBattleStruct->turnEffectsBattlerId];
|
||||
@ -2908,13 +2908,13 @@ u8 DoBattlerEndTurnEffects(void)
|
||||
return effect;
|
||||
|
||||
}
|
||||
gHitMarker &= ~(HITMARKER_GRUDGE | HITMARKER_x20);
|
||||
gHitMarker &= ~(HITMARKER_GRUDGE | HITMARKER_SKIP_DMG_TRACK);
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool8 HandleWishPerishSongOnTurnEnd(void)
|
||||
{
|
||||
gHitMarker |= (HITMARKER_GRUDGE | HITMARKER_x20);
|
||||
gHitMarker |= (HITMARKER_GRUDGE | HITMARKER_SKIP_DMG_TRACK);
|
||||
|
||||
switch (gBattleStruct->wishPerishSongState)
|
||||
{
|
||||
@ -3011,7 +3011,7 @@ bool8 HandleWishPerishSongOnTurnEnd(void)
|
||||
break;
|
||||
}
|
||||
|
||||
gHitMarker &= ~(HITMARKER_GRUDGE | HITMARKER_x20);
|
||||
gHitMarker &= ~(HITMARKER_GRUDGE | HITMARKER_SKIP_DMG_TRACK);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user