mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 20:24:18 +01:00
Merge pull request #1710 from AsparagusEduardo/BE_Struggle
Implemented modern effect of struggle with config
This commit is contained in:
commit
1f4844c7f5
@ -379,6 +379,7 @@ gBattleScriptsForMoveEffects::
|
||||
.4byte BattleScript_EffectDecorate @ EFFECT_DECORATE
|
||||
.4byte BattleScript_EffectHit @ EFFECT_SNIPE_SHOT
|
||||
.4byte BattleScript_EffectTripleHit @ EFFECT_TRIPLE_HIT
|
||||
.4byte BattleScript_EffectRecoilHP25 @ EFFECT_RECOIL_HP_25
|
||||
|
||||
BattleScript_EffectDecorate:
|
||||
attackcanceler
|
||||
@ -4911,6 +4912,12 @@ BattleScript_EffectRecoil50:
|
||||
setmoveeffect MOVE_EFFECT_RECOIL_50 | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN
|
||||
goto BattleScript_EffectHit
|
||||
|
||||
BattleScript_EffectRecoilHP25:
|
||||
setmoveeffect MOVE_EFFECT_RECOIL_HP_25 | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN
|
||||
jumpifnotmove MOVE_STRUGGLE, BattleScript_EffectHit
|
||||
incrementgamestat GAME_STAT_USED_STRUGGLE
|
||||
goto BattleScript_EffectHit
|
||||
|
||||
BattleScript_EffectTeeterDance::
|
||||
attackcanceler
|
||||
attackstring
|
||||
|
@ -347,7 +347,8 @@
|
||||
#define MOVE_EFFECT_THROAT_CHOP 0x43
|
||||
#define MOVE_EFFECT_INCINERATE 0x44
|
||||
#define MOVE_EFFECT_BUG_BITE 0x45
|
||||
#define NUM_MOVE_EFFECTS 0x46
|
||||
#define MOVE_EFFECT_RECOIL_HP_25 0x46
|
||||
#define NUM_MOVE_EFFECTS 0x47
|
||||
|
||||
#define MOVE_EFFECT_AFFECTS_USER 0x4000
|
||||
#define MOVE_EFFECT_CERTAIN 0x8000
|
||||
|
@ -363,7 +363,8 @@
|
||||
#define EFFECT_DECORATE 357
|
||||
#define EFFECT_SNIPE_SHOT 358
|
||||
#define EFFECT_TRIPLE_HIT 359
|
||||
#define EFFECT_RECOIL_HP_25 360
|
||||
|
||||
#define NUM_BATTLE_MOVE_EFFECTS 360
|
||||
#define NUM_BATTLE_MOVE_EFFECTS 361
|
||||
|
||||
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
||||
|
@ -3177,6 +3177,14 @@ void SetMoveEffect(bool32 primary, u32 certain)
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||
gBattlescriptCurrInstr = BattleScript_MoveEffectRecoilWithStatus;
|
||||
break;
|
||||
case MOVE_EFFECT_RECOIL_HP_25: // Struggle
|
||||
gBattleMoveDamage = (gBattleMons[gEffectBattler].maxHP) / 4;
|
||||
if (gBattleMoveDamage == 0)
|
||||
gBattleMoveDamage = 1;
|
||||
|
||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||
gBattlescriptCurrInstr = BattleScript_MoveEffectRecoil;
|
||||
break;
|
||||
case MOVE_EFFECT_THRASH:
|
||||
if (gBattleMons[gEffectBattler].status2 & STATUS2_LOCK_CONFUSE)
|
||||
{
|
||||
|
@ -2599,11 +2599,12 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
||||
#if B_UPDATED_MOVE_DATA >= GEN_4
|
||||
.accuracy = 0,
|
||||
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_KINGS_ROCK_AFFECTED,
|
||||
.effect = EFFECT_RECOIL_HP_25,
|
||||
#else
|
||||
.accuracy = 100,
|
||||
.flags = FLAG_MAKES_CONTACT | FLAG_PROTECT_AFFECTED | FLAG_MIRROR_MOVE_AFFECTED | FLAG_KINGS_ROCK_AFFECTED,
|
||||
.effect = EFFECT_RECOIL_25,
|
||||
#endif
|
||||
.effect = EFFECT_RECOIL_25,
|
||||
.power = 50,
|
||||
.type = TYPE_NORMAL,
|
||||
.pp = 1,
|
||||
|
Loading…
Reference in New Issue
Block a user