mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 20:24:18 +01:00
Merge pull request #2427 from BuffelSaft/fix-stat-boost-on-hit
Fix abilities that raise target's stat after hit
This commit is contained in:
commit
9ea3ad8938
@ -9773,3 +9773,13 @@ BattleScript_SymbiosisActivates::
|
|||||||
printstring STRINGID_SYMBIOSISITEMPASS
|
printstring STRINGID_SYMBIOSISITEMPASS
|
||||||
waitmessage B_WAIT_TIME_LONG
|
waitmessage B_WAIT_TIME_LONG
|
||||||
return
|
return
|
||||||
|
|
||||||
|
BattleScript_TargetAbilityStatRaiseRet::
|
||||||
|
copybyte gBattlerAbility, gEffectBattler
|
||||||
|
copybyte gBattlerAttacker, gBattlerTarget
|
||||||
|
call BattleScript_AbilityPopUp
|
||||||
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN, BattleScript_TargetAbilityStatRaiseRet_End
|
||||||
|
setgraphicalstatchangevalues
|
||||||
|
call BattleScript_StatUp
|
||||||
|
BattleScript_TargetAbilityStatRaiseRet_End:
|
||||||
|
return
|
||||||
|
@ -431,6 +431,7 @@ extern const u8 BattleScript_AffectionBasedEndurance[];
|
|||||||
extern const u8 BattleScript_SymbiosisActivates[];
|
extern const u8 BattleScript_SymbiosisActivates[];
|
||||||
extern const u8 BattleScript_MultiHitPrintStrings[];
|
extern const u8 BattleScript_MultiHitPrintStrings[];
|
||||||
extern const u8 BattleScript_BurnUpRemoveType[];
|
extern const u8 BattleScript_BurnUpRemoveType[];
|
||||||
|
extern const u8 BattleScript_TargetAbilityStatRaiseRet[];
|
||||||
|
|
||||||
// zmoves
|
// zmoves
|
||||||
extern const u8 BattleScript_ZMoveActivateDamaging[];
|
extern const u8 BattleScript_ZMoveActivateDamaging[];
|
||||||
|
@ -5241,9 +5241,10 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
|||||||
&& moveType == TYPE_DARK
|
&& moveType == TYPE_DARK
|
||||||
&& CompareStat(battler, STAT_ATK, MAX_STAT_STAGE, CMP_LESS_THAN))
|
&& CompareStat(battler, STAT_ATK, MAX_STAT_STAGE, CMP_LESS_THAN))
|
||||||
{
|
{
|
||||||
|
gEffectBattler = battler;
|
||||||
SET_STATCHANGER(STAT_ATK, 1, FALSE);
|
SET_STATCHANGER(STAT_ATK, 1, FALSE);
|
||||||
BattleScriptPushCursor();
|
BattleScriptPushCursor();
|
||||||
gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaiseOnMoveEnd;
|
gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaiseRet;
|
||||||
effect++;
|
effect++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -5254,9 +5255,10 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
|||||||
&& (moveType == TYPE_DARK || moveType == TYPE_BUG || moveType == TYPE_GHOST)
|
&& (moveType == TYPE_DARK || moveType == TYPE_BUG || moveType == TYPE_GHOST)
|
||||||
&& CompareStat(battler, STAT_SPEED, MAX_STAT_STAGE, CMP_LESS_THAN))
|
&& CompareStat(battler, STAT_SPEED, MAX_STAT_STAGE, CMP_LESS_THAN))
|
||||||
{
|
{
|
||||||
|
gEffectBattler = battler;
|
||||||
SET_STATCHANGER(STAT_SPEED, 1, FALSE);
|
SET_STATCHANGER(STAT_SPEED, 1, FALSE);
|
||||||
BattleScriptPushCursor();
|
BattleScriptPushCursor();
|
||||||
gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaiseOnMoveEnd;
|
gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaiseRet;
|
||||||
effect++;
|
effect++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -5267,9 +5269,10 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
|||||||
&& moveType == TYPE_WATER
|
&& moveType == TYPE_WATER
|
||||||
&& CompareStat(battler, STAT_DEF, MAX_STAT_STAGE, CMP_LESS_THAN))
|
&& CompareStat(battler, STAT_DEF, MAX_STAT_STAGE, CMP_LESS_THAN))
|
||||||
{
|
{
|
||||||
|
gEffectBattler = battler;
|
||||||
SET_STATCHANGER(STAT_DEF, 2, FALSE);
|
SET_STATCHANGER(STAT_DEF, 2, FALSE);
|
||||||
BattleScriptPushCursor();
|
BattleScriptPushCursor();
|
||||||
gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaiseOnMoveEnd;
|
gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaiseRet;
|
||||||
effect++;
|
effect++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -5279,9 +5282,10 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
|||||||
&& IsBattlerAlive(battler)
|
&& IsBattlerAlive(battler)
|
||||||
&& CompareStat(battler, STAT_DEF, MAX_STAT_STAGE, CMP_LESS_THAN))
|
&& CompareStat(battler, STAT_DEF, MAX_STAT_STAGE, CMP_LESS_THAN))
|
||||||
{
|
{
|
||||||
|
gEffectBattler = battler;
|
||||||
SET_STATCHANGER(STAT_DEF, 1, FALSE);
|
SET_STATCHANGER(STAT_DEF, 1, FALSE);
|
||||||
BattleScriptPushCursor();
|
BattleScriptPushCursor();
|
||||||
gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaiseOnMoveEnd;
|
gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaiseRet;
|
||||||
effect++;
|
effect++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -5296,9 +5300,10 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
|||||||
&& !(TestSheerForceFlag(gBattlerAttacker, gCurrentMove))
|
&& !(TestSheerForceFlag(gBattlerAttacker, gCurrentMove))
|
||||||
&& CompareStat(battler, STAT_SPATK, MAX_STAT_STAGE, CMP_LESS_THAN))
|
&& CompareStat(battler, STAT_SPATK, MAX_STAT_STAGE, CMP_LESS_THAN))
|
||||||
{
|
{
|
||||||
|
gEffectBattler = battler;
|
||||||
SET_STATCHANGER(STAT_SPATK, 1, FALSE);
|
SET_STATCHANGER(STAT_SPATK, 1, FALSE);
|
||||||
BattleScriptPushCursor();
|
BattleScriptPushCursor();
|
||||||
gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaiseOnMoveEnd;
|
gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaiseRet;
|
||||||
effect++;
|
effect++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -5636,9 +5641,10 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u16 ability, u8 special, u16 move
|
|||||||
&& CompareStat(battler, STAT_SPEED, MAX_STAT_STAGE, CMP_LESS_THAN)
|
&& CompareStat(battler, STAT_SPEED, MAX_STAT_STAGE, CMP_LESS_THAN)
|
||||||
&& (moveType == TYPE_FIRE || moveType == TYPE_WATER))
|
&& (moveType == TYPE_FIRE || moveType == TYPE_WATER))
|
||||||
{
|
{
|
||||||
|
gEffectBattler = battler;
|
||||||
SET_STATCHANGER(STAT_SPEED, 6, FALSE);
|
SET_STATCHANGER(STAT_SPEED, 6, FALSE);
|
||||||
BattleScriptPushCursor();
|
BattleScriptPushCursor();
|
||||||
gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaiseOnMoveEnd;
|
gBattlescriptCurrInstr = BattleScript_TargetAbilityStatRaiseRet;
|
||||||
effect++;
|
effect++;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user