Cap recoil for Gen 4 Jump Kick

Jump Kick's recoil in Gen 4 cannot exceed half of the target's maximum HP.
This commit is contained in:
BuffelSaft 2020-12-07 19:41:49 +13:00
parent 72b769ec75
commit a3b891bd65

View file

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