mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 20:24:18 +01:00
Fix Scale Shot
Lowers defense and raises speed instead of just lowering defense now. Tested with Contrary and min/max speed/def.
This commit is contained in:
parent
48c91d03cd
commit
14a2e86313
@ -570,9 +570,7 @@ BattleScript_ScaleShotPrintStrings::
|
|||||||
printstring STRINGID_HITXTIMES
|
printstring STRINGID_HITXTIMES
|
||||||
waitmessage 0x40
|
waitmessage 0x40
|
||||||
BattleScript_ScaleShotEnd::
|
BattleScript_ScaleShotEnd::
|
||||||
setmoveeffect MOVE_EFFECT_SPD_PLUS_1 | MOVE_EFFECT_AFFECTS_USER
|
setmoveeffect MOVE_EFFECT_SCALE_SHOT | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN
|
||||||
seteffectwithchance
|
|
||||||
setmoveeffect MOVE_EFFECT_DEF_MINUS_1 | MOVE_EFFECT_AFFECTS_USER
|
|
||||||
seteffectwithchance
|
seteffectwithchance
|
||||||
tryfaintmon BS_TARGET, FALSE, NULL
|
tryfaintmon BS_TARGET, FALSE, NULL
|
||||||
moveendcase MOVEEND_SYNCHRONIZE_TARGET
|
moveendcase MOVEEND_SYNCHRONIZE_TARGET
|
||||||
@ -7182,6 +7180,26 @@ BattleScript_DefSpDefDownTrySpDef::
|
|||||||
BattleScript_DefSpDefDownRet::
|
BattleScript_DefSpDefDownRet::
|
||||||
return
|
return
|
||||||
|
|
||||||
|
BattleScript_DefDownSpeedUp::
|
||||||
|
jumpifstat BS_ATTACKER, CMP_GREATER_THAN, STAT_DEF, MIN_STAT_STAGE, BattleScript_DefDownSpeedUpTryDef
|
||||||
|
jumpifstat BS_ATTACKER, CMP_EQUAL, STAT_SPEED, MAX_STAT_STAGE, BattleScript_DefDownSpeedUpRet
|
||||||
|
BattleScript_DefDownSpeedUpTryDef::
|
||||||
|
playstatchangeanimation BS_ATTACKER, BIT_DEF, STAT_CHANGE_NEGATIVE | STAT_CHANGE_CANT_PREVENT
|
||||||
|
setstatchanger STAT_DEF, 1, TRUE
|
||||||
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR | MOVE_EFFECT_CERTAIN, BattleScript_DefDownSpeedUpTrySpeed
|
||||||
|
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_DefDownSpeedUpTrySpeed
|
||||||
|
printfromtable gStatUpStringIds
|
||||||
|
waitmessage B_WAIT_TIME_LONG
|
||||||
|
BattleScript_DefDownSpeedUpTrySpeed:
|
||||||
|
playstatchangeanimation BS_ATTACKER, BIT_SPEED, 0
|
||||||
|
setstatchanger STAT_SPEED, 1, FALSE
|
||||||
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | STAT_BUFF_ALLOW_PTR | MOVE_EFFECT_CERTAIN, BattleScript_DefDownSpeedUpRet
|
||||||
|
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, B_MSG_STAT_WONT_INCREASE, BattleScript_DefDownSpeedUpRet
|
||||||
|
printfromtable gStatUpStringIds
|
||||||
|
waitmessage B_WAIT_TIME_LONG
|
||||||
|
BattleScript_DefDownSpeedUpRet::
|
||||||
|
return
|
||||||
|
|
||||||
BattleScript_KnockedOff::
|
BattleScript_KnockedOff::
|
||||||
playanimation BS_TARGET, B_ANIM_ITEM_KNOCKOFF, NULL
|
playanimation BS_TARGET, B_ANIM_ITEM_KNOCKOFF, NULL
|
||||||
printstring STRINGID_PKMNKNOCKEDOFF
|
printstring STRINGID_PKMNKNOCKEDOFF
|
||||||
|
@ -421,5 +421,6 @@ extern const u8 BattleScript_BeakBlastBurn[];
|
|||||||
extern const u8 BattleScript_ShellTrapSetUp[];
|
extern const u8 BattleScript_ShellTrapSetUp[];
|
||||||
extern const u8 BattleScript_ShellTrapExplode[];
|
extern const u8 BattleScript_ShellTrapExplode[];
|
||||||
extern const u8 BattleScript_EffectShellTrap[];
|
extern const u8 BattleScript_EffectShellTrap[];
|
||||||
|
extern const u8 BattleScript_DefDownSpeedUp[];
|
||||||
|
|
||||||
#endif // GUARD_BATTLE_SCRIPTS_H
|
#endif // GUARD_BATTLE_SCRIPTS_H
|
||||||
|
@ -359,9 +359,9 @@
|
|||||||
#define MOVE_EFFECT_RECOIL_HP_25 0x46
|
#define MOVE_EFFECT_RECOIL_HP_25 0x46
|
||||||
#define MOVE_EFFECT_RELIC_SONG 0x47
|
#define MOVE_EFFECT_RELIC_SONG 0x47
|
||||||
#define MOVE_EFFECT_TRAP_BOTH 0x48
|
#define MOVE_EFFECT_TRAP_BOTH 0x48
|
||||||
#define MOVE_EFFECT_SPD_PLUS_1_DEF_MINUS_1 0x49
|
#define MOVE_EFFECT_SCALE_SHOT 0x49
|
||||||
#define MOVE_EFFECT_MELT_ITEM 0x4A
|
#define MOVE_EFFECT_MELT_ITEM 0x4A
|
||||||
#define NUM_MOVE_EFFECTS 0x50
|
#define NUM_MOVE_EFFECTS 0x4B
|
||||||
|
|
||||||
#define MOVE_EFFECT_AFFECTS_USER 0x4000
|
#define MOVE_EFFECT_AFFECTS_USER 0x4000
|
||||||
#define MOVE_EFFECT_CERTAIN 0x8000
|
#define MOVE_EFFECT_CERTAIN 0x8000
|
||||||
|
@ -4715,8 +4715,8 @@ static void CheckFocusPunch_ClearVarsBeforeTurnStarts(void)
|
|||||||
BattleScriptExecute(BattleScript_BeakBlastSetUp);
|
BattleScriptExecute(BattleScript_BeakBlastSetUp);
|
||||||
return;
|
return;
|
||||||
case MOVE_SHELL_TRAP:
|
case MOVE_SHELL_TRAP:
|
||||||
BattleScriptExecute(BattleScript_ShellTrapSetUp);
|
BattleScriptExecute(BattleScript_ShellTrapSetUp);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3489,6 +3489,10 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
|||||||
gBattleMons[gBattlerTarget].status2 |= STATUS2_ESCAPE_PREVENTION;
|
gBattleMons[gBattlerTarget].status2 |= STATUS2_ESCAPE_PREVENTION;
|
||||||
gBattleMons[gBattlerAttacker].status2 |= STATUS2_ESCAPE_PREVENTION;
|
gBattleMons[gBattlerAttacker].status2 |= STATUS2_ESCAPE_PREVENTION;
|
||||||
break;
|
break;
|
||||||
|
case MOVE_EFFECT_SCALE_SHOT:
|
||||||
|
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||||
|
gBattlescriptCurrInstr = BattleScript_DefDownSpeedUp;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -9329,6 +9333,9 @@ static void Cmd_various(void)
|
|||||||
case VARIOUS_SET_BEAK_BLAST:
|
case VARIOUS_SET_BEAK_BLAST:
|
||||||
gProtectStructs[gBattlerAttacker].beakBlastCharge = 1;
|
gProtectStructs[gBattlerAttacker].beakBlastCharge = 1;
|
||||||
break;
|
break;
|
||||||
|
case VARIOUS_SET_SHELL_TRAP:
|
||||||
|
gProtectStructs[gBattlerAttacker].shellTrap = 1;
|
||||||
|
break;
|
||||||
case VARIOUS_SWAP_SIDE_STATUSES:
|
case VARIOUS_SWAP_SIDE_STATUSES:
|
||||||
{
|
{
|
||||||
/* This code is a mess, but idk how to do it better without changing how Side Statuses and
|
/* This code is a mess, but idk how to do it better without changing how Side Statuses and
|
||||||
|
Loading…
Reference in New Issue
Block a user