Fix Jump Kick

* Now inflicts recoil damage on the user if the target was immune to the attack
* Gen V+ recoil damage is now half of the user's HP instead of half of the target's HP.
This commit is contained in:
BuffelSaft 2020-12-06 16:14:02 +13:00
parent e05b5fc8a3
commit ef41a4c14d
2 changed files with 5 additions and 4 deletions

View File

@ -2806,6 +2806,8 @@ BattleScript_EffectDoubleHit::
BattleScript_EffectRecoilIfMiss::
attackcanceler
accuracycheck BattleScript_MoveMissedDoDamage, ACC_CURR_MOVE
typecalc
jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE, BattleScript_MoveMissedDoDamage
goto BattleScript_HitFromAtkString
BattleScript_MoveMissedDoDamage::
jumpifability BS_ATTACKER, ABILITY_MAGIC_GUARD, BattleScript_PrintMoveMissed
@ -2814,19 +2816,18 @@ BattleScript_MoveMissedDoDamage::
pause 0x40
resultmessage
waitmessage 0x40
jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE, BattleScript_MoveEnd
printstring STRINGID_PKMNCRASHED
waitmessage 0x40
damagecalc
typecalc
adjustdamage
manipulatedamage DMG_RECOIL_FROM_MISS
bichalfword gMoveResultFlags, MOVE_RESULT_MISSED
bichalfword gMoveResultFlags, MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
healthbarupdate BS_ATTACKER
datahpupdate BS_ATTACKER
tryfaintmon BS_ATTACKER, FALSE, NULL
orhalfword gMoveResultFlags, MOVE_RESULT_MISSED
orhalfword gMoveResultFlags, MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE
goto BattleScript_MoveEnd
BattleScript_EffectMist::

View File

@ -8584,7 +8584,7 @@ static void Cmd_manipulatedamage(void)
if (gBattleMoveDamage == 0)
gBattleMoveDamage = 1;
if (B_RECOIL_IF_MISS_DMG >= GEN_5 || ((gBattleMons[gBattlerTarget].maxHP / 2) < gBattleMoveDamage))
gBattleMoveDamage = gBattleMons[gBattlerTarget].maxHP / 2;
gBattleMoveDamage = gBattleMons[gBattlerAttacker].maxHP / 2;
break;
case DMG_DOUBLED:
gBattleMoveDamage *= 2;