Merge pull request #1272 from BuffelSaft/Batte_Engine_Only
Fix Jump Kick
This commit is contained in:
commit
73a7800f72
4 changed files with 26 additions and 1 deletions
|
@ -2805,6 +2805,10 @@ BattleScript_EffectDoubleHit::
|
|||
BattleScript_EffectRecoilIfMiss::
|
||||
attackcanceler
|
||||
accuracycheck BattleScript_MoveMissedDoDamage, ACC_CURR_MOVE
|
||||
.if B_CRASH_IF_TARGET_IMMUNE >= GEN_4
|
||||
typecalc
|
||||
jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE, BattleScript_MoveMissedDoDamage
|
||||
.endif
|
||||
goto BattleScript_HitFromAtkString
|
||||
BattleScript_MoveMissedDoDamage::
|
||||
jumpifability BS_ATTACKER, ABILITY_MAGIC_GUARD, BattleScript_PrintMoveMissed
|
||||
|
@ -2813,19 +2817,33 @@ BattleScript_MoveMissedDoDamage::
|
|||
pause 0x40
|
||||
resultmessage
|
||||
waitmessage 0x40
|
||||
.if B_CRASH_IF_TARGET_IMMUNE < GEN_4
|
||||
jumpifbyte CMP_COMMON_BITS, gMoveResultFlags, MOVE_RESULT_DOESNT_AFFECT_FOE, BattleScript_MoveEnd
|
||||
.endif
|
||||
printstring STRINGID_PKMNCRASHED
|
||||
waitmessage 0x40
|
||||
damagecalc
|
||||
typecalc
|
||||
adjustdamage
|
||||
.if B_CRASH_IF_TARGET_IMMUNE == GEN_4
|
||||
manipulatedamage DMG_RECOIL_FROM_IMMUNE
|
||||
.else
|
||||
manipulatedamage DMG_RECOIL_FROM_MISS
|
||||
.endif
|
||||
.if B_CRASH_IF_TARGET_IMMUNE >= GEN_4
|
||||
bichalfword gMoveResultFlags, MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE
|
||||
.else
|
||||
bichalfword gMoveResultFlags, MOVE_RESULT_MISSED
|
||||
.endif
|
||||
orword gHitMarker, HITMARKER_IGNORE_SUBSTITUTE
|
||||
healthbarupdate BS_ATTACKER
|
||||
datahpupdate BS_ATTACKER
|
||||
tryfaintmon BS_ATTACKER, FALSE, NULL
|
||||
.if B_CRASH_IF_TARGET_IMMUNE >= GEN_4
|
||||
orhalfword gMoveResultFlags, MOVE_RESULT_MISSED | MOVE_RESULT_DOESNT_AFFECT_FOE
|
||||
.else
|
||||
orhalfword gMoveResultFlags, MOVE_RESULT_MISSED
|
||||
.endif
|
||||
goto BattleScript_MoveEnd
|
||||
|
||||
BattleScript_EffectMist::
|
||||
|
|
|
@ -111,6 +111,7 @@
|
|||
#define B_MINIMIZE_DMG_ACC GEN_6 // In Gen6+, moves that causes double damage to minimized Pokémon will also skip accuracy checks.
|
||||
#define B_PP_REDUCED_BY_SPITE GEN_6 // In Gen4+, Spite reduces the foe's last move's PP by 4, instead of 2 to 5.
|
||||
#define B_CAN_SPITE_FAIL GEN_6 // In Gen4+, Spite can no longer fail if the foe's last move only has 1 remaining PP.
|
||||
#define B_CRASH_IF_TARGET_IMMUNE GEN_6 // In Gen4+, The user of Jump Kick or Hi Jump Kick will "keep going and crash" if it attacks a target that is immune to the move.
|
||||
|
||||
// Ability settings
|
||||
#define B_ABILITY_WEATHER GEN_6 // In Gen6+, ability-induced weather lasts 5 turns. Before, it lasted until the battle ended or until it was changed by a move.
|
||||
|
|
|
@ -177,6 +177,7 @@
|
|||
#define DMG_CURR_ATTACKER_HP 5
|
||||
#define DMG_BIG_ROOT 6
|
||||
#define DMG_1_2_ATTACKER_HP 7
|
||||
#define DMG_RECOIL_FROM_IMMUNE 8 // Used to calculate recoil for the Gen 4 version of Jump Kick
|
||||
|
||||
// Cmd_jumpifcantswitch
|
||||
#define SWITCH_IGNORE_ESCAPE_PREVENTION 0x80
|
||||
|
|
|
@ -8586,7 +8586,9 @@ 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:
|
||||
|
@ -8609,6 +8611,9 @@ static void Cmd_manipulatedamage(void)
|
|||
case DMG_1_2_ATTACKER_HP:
|
||||
gBattleMoveDamage = gBattleMons[gBattlerAttacker].maxHP / 2;
|
||||
break;
|
||||
case DMG_RECOIL_FROM_IMMUNE:
|
||||
gBattleMoveDamage = gBattleMons[gBattlerTarget].maxHP / 2;
|
||||
break;
|
||||
}
|
||||
|
||||
gBattlescriptCurrInstr += 2;
|
||||
|
|
Loading…
Reference in a new issue