mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 19:54:21 +01:00
Fixes Triple Kick effect and Z move damage calc
minor correction to the z-move fix Add comment to EFFECT_TRIPLE_KICK
This commit is contained in:
parent
3cee3b18c8
commit
5a384f9090
@ -820,6 +820,8 @@ s32 AI_CalcDamage(u16 move, u8 battlerAtk, u8 battlerDef, u8 *typeEffectiveness,
|
||||
else
|
||||
dmg = (critDmg + normalDmg * (critChance - 1)) / critChance;
|
||||
|
||||
if (!gBattleStruct->zmove.active)
|
||||
{
|
||||
// Handle dynamic move damage
|
||||
switch (gBattleMoves[move].effect)
|
||||
{
|
||||
@ -836,9 +838,6 @@ s32 AI_CalcDamage(u16 move, u8 battlerAtk, u8 battlerDef, u8 *typeEffectiveness,
|
||||
case EFFECT_MULTI_HIT:
|
||||
dmg *= (AI_DATA->abilities[battlerAtk] == ABILITY_SKILL_LINK ? 5 : 3);
|
||||
break;
|
||||
case EFFECT_TRIPLE_KICK:
|
||||
dmg *= (AI_DATA->abilities[battlerAtk] == ABILITY_SKILL_LINK ? 6 : 5);
|
||||
break;
|
||||
case EFFECT_ENDEAVOR:
|
||||
// If target has less HP than user, Endeavor does no damage
|
||||
dmg = max(0, gBattleMons[battlerDef].hp - gBattleMons[battlerAtk].hp);
|
||||
@ -862,6 +861,7 @@ s32 AI_CalcDamage(u16 move, u8 battlerAtk, u8 battlerDef, u8 *typeEffectiveness,
|
||||
if (dmg == 0)
|
||||
dmg = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
effectivenessMultiplier = CalcTypeEffectivenessMultiplier(move, moveType, battlerAtk, battlerDef, FALSE);
|
||||
|
@ -8584,6 +8584,9 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef)
|
||||
basePower = gBattleStruct->presentBasePower;
|
||||
break;
|
||||
case EFFECT_TRIPLE_KICK:
|
||||
if (gMultiHitCounter == 0) // Calc damage with max BP for move consideration
|
||||
basePower *= 6;
|
||||
else
|
||||
basePower *= (4 - gMultiHitCounter);
|
||||
break;
|
||||
case EFFECT_SPIT_UP:
|
||||
|
Loading…
Reference in New Issue
Block a user