Close combat effect
This commit is contained in:
parent
7b60a654b2
commit
23a06c0836
6 changed files with 38 additions and 8 deletions
|
@ -299,6 +299,7 @@ gBattleScriptsForMoveEffects:: @ 82D86A8
|
||||||
.4byte BattleScript_EffectReflectType
|
.4byte BattleScript_EffectReflectType
|
||||||
.4byte BattleScript_EffectSoak
|
.4byte BattleScript_EffectSoak
|
||||||
.4byte BattleScript_EffectGrowth
|
.4byte BattleScript_EffectGrowth
|
||||||
|
.4byte BattleScript_EffectCloseCombat
|
||||||
|
|
||||||
BattleScript_EffectGrowth:
|
BattleScript_EffectGrowth:
|
||||||
attackcanceler
|
attackcanceler
|
||||||
|
@ -3182,6 +3183,10 @@ BattleScript_EffectSuperpower:
|
||||||
setmoveeffect MOVE_EFFECT_ATK_DEF_DOWN | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN
|
setmoveeffect MOVE_EFFECT_ATK_DEF_DOWN | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN
|
||||||
goto BattleScript_EffectHit
|
goto BattleScript_EffectHit
|
||||||
|
|
||||||
|
BattleScript_EffectCloseCombat:
|
||||||
|
setmoveeffect MOVE_EFFECT_DEF_SPDEF_DOWN | MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN
|
||||||
|
goto BattleScript_EffectHit
|
||||||
|
|
||||||
BattleScript_EffectMagicCoat:
|
BattleScript_EffectMagicCoat:
|
||||||
attackcanceler
|
attackcanceler
|
||||||
trysetmagiccoat BattleScript_ButItFailedAtkStringPpReduce
|
trysetmagiccoat BattleScript_ButItFailedAtkStringPpReduce
|
||||||
|
@ -4554,18 +4559,37 @@ BattleScript_AtkDefDown::
|
||||||
playstatchangeanimation BS_ATTACKER, BIT_DEF | BIT_ATK, ATK48_DONT_CHECK_LOWER | ATK48_STAT_NEGATIVE | ATK48_ONLY_MULTIPLE
|
playstatchangeanimation BS_ATTACKER, BIT_DEF | BIT_ATK, ATK48_DONT_CHECK_LOWER | ATK48_STAT_NEGATIVE | ATK48_ONLY_MULTIPLE
|
||||||
playstatchangeanimation BS_ATTACKER, BIT_ATK, ATK48_DONT_CHECK_LOWER | ATK48_STAT_NEGATIVE
|
playstatchangeanimation BS_ATTACKER, BIT_ATK, ATK48_DONT_CHECK_LOWER | ATK48_STAT_NEGATIVE
|
||||||
setstatchanger STAT_ATK, 1, TRUE
|
setstatchanger STAT_ATK, 1, TRUE
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | 0x1, BattleScript_82DB144
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | 0x1, BattleScript_AtkDefDownTryDef
|
||||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_82DB144
|
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_AtkDefDownTryDef
|
||||||
printfromtable gStatDownStringIds
|
printfromtable gStatDownStringIds
|
||||||
waitmessage 0x40
|
waitmessage 0x40
|
||||||
BattleScript_82DB144::
|
BattleScript_AtkDefDownTryDef::
|
||||||
playstatchangeanimation BS_ATTACKER, BIT_DEF, ATK48_DONT_CHECK_LOWER | ATK48_STAT_NEGATIVE
|
playstatchangeanimation BS_ATTACKER, BIT_DEF, ATK48_DONT_CHECK_LOWER | ATK48_STAT_NEGATIVE
|
||||||
setstatchanger STAT_DEF, 1, TRUE
|
setstatchanger STAT_DEF, 1, TRUE
|
||||||
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | 0x1, BattleScript_82DB167
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | 0x1, BattleScript_AtkDefDownRet
|
||||||
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_82DB167
|
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_AtkDefDownRet
|
||||||
printfromtable gStatDownStringIds
|
printfromtable gStatDownStringIds
|
||||||
waitmessage 0x40
|
waitmessage 0x40
|
||||||
BattleScript_82DB167::
|
BattleScript_AtkDefDownRet::
|
||||||
|
return
|
||||||
|
|
||||||
|
BattleScript_DefSpDefDown::
|
||||||
|
setbyte sSTAT_ANIM_PLAYED, FALSE
|
||||||
|
playstatchangeanimation BS_ATTACKER, BIT_DEF | BIT_SPDEF, ATK48_DONT_CHECK_LOWER | ATK48_STAT_NEGATIVE | ATK48_ONLY_MULTIPLE
|
||||||
|
playstatchangeanimation BS_ATTACKER, BIT_DEF, ATK48_DONT_CHECK_LOWER | ATK48_STAT_NEGATIVE
|
||||||
|
setstatchanger STAT_DEF, 1, TRUE
|
||||||
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | 0x1, BattleScript_DefSpDefDownTrySpDef
|
||||||
|
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_DefSpDefDownTrySpDef
|
||||||
|
printfromtable gStatDownStringIds
|
||||||
|
waitmessage 0x40
|
||||||
|
BattleScript_DefSpDefDownTrySpDef::
|
||||||
|
playstatchangeanimation BS_ATTACKER, BIT_SPDEF, ATK48_DONT_CHECK_LOWER | ATK48_STAT_NEGATIVE
|
||||||
|
setstatchanger STAT_SPDEF, 1, TRUE
|
||||||
|
statbuffchange MOVE_EFFECT_AFFECTS_USER | MOVE_EFFECT_CERTAIN | 0x1, BattleScript_DefSpDefDownRet
|
||||||
|
jumpifbyte CMP_EQUAL, cMULTISTRING_CHOOSER, 0x2, BattleScript_DefSpDefDownRet
|
||||||
|
printfromtable gStatDownStringIds
|
||||||
|
waitmessage 0x40
|
||||||
|
BattleScript_DefSpDefDownRet::
|
||||||
return
|
return
|
||||||
|
|
||||||
BattleScript_KnockedOff::
|
BattleScript_KnockedOff::
|
||||||
|
|
|
@ -86,6 +86,7 @@ extern const u8 BattleScript_SelectingNotAllowedMoveTauntInPalace[];
|
||||||
extern const u8 BattleScript_WishComesTrue[];
|
extern const u8 BattleScript_WishComesTrue[];
|
||||||
extern const u8 BattleScript_IngrainTurnHeal[];
|
extern const u8 BattleScript_IngrainTurnHeal[];
|
||||||
extern const u8 BattleScript_AtkDefDown[];
|
extern const u8 BattleScript_AtkDefDown[];
|
||||||
|
extern const u8 BattleScript_DefSpDefDown[];
|
||||||
extern const u8 BattleScript_KnockedOff[];
|
extern const u8 BattleScript_KnockedOff[];
|
||||||
extern const u8 BattleScript_MoveUsedIsImprisoned[];
|
extern const u8 BattleScript_MoveUsedIsImprisoned[];
|
||||||
extern const u8 BattleScript_SelectingImprisionedMove[];
|
extern const u8 BattleScript_SelectingImprisionedMove[];
|
||||||
|
|
|
@ -309,7 +309,7 @@
|
||||||
#define MOVE_EFFECT_EVS_MINUS_2 0x34
|
#define MOVE_EFFECT_EVS_MINUS_2 0x34
|
||||||
#define MOVE_EFFECT_THRASH 0x35
|
#define MOVE_EFFECT_THRASH 0x35
|
||||||
#define MOVE_EFFECT_KNOCK_OFF 0x36
|
#define MOVE_EFFECT_KNOCK_OFF 0x36
|
||||||
#define MOVE_EFFECT_NOTHING_37 0x37
|
#define MOVE_EFFECT_DEF_SPDEF_DOWN 0x37
|
||||||
#define MOVE_EFFECT_NOTHING_38 0x38
|
#define MOVE_EFFECT_NOTHING_38 0x38
|
||||||
#define MOVE_EFFECT_NOTHING_39 0x39
|
#define MOVE_EFFECT_NOTHING_39 0x39
|
||||||
#define MOVE_EFFECT_NOTHING_3A 0x3A
|
#define MOVE_EFFECT_NOTHING_3A 0x3A
|
||||||
|
|
|
@ -288,5 +288,6 @@
|
||||||
#define EFFECT_REFLECT_TYPE 282
|
#define EFFECT_REFLECT_TYPE 282
|
||||||
#define EFFECT_SOAK 283
|
#define EFFECT_SOAK 283
|
||||||
#define EFFECT_GROWTH 284
|
#define EFFECT_GROWTH 284
|
||||||
|
#define EFFECT_CLOSE_COMBAT 285
|
||||||
|
|
||||||
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
||||||
|
|
|
@ -2594,6 +2594,10 @@ void SetMoveEffect(bool8 primary, u8 certain)
|
||||||
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||||
gBattlescriptCurrInstr = BattleScript_AtkDefDown;
|
gBattlescriptCurrInstr = BattleScript_AtkDefDown;
|
||||||
break;
|
break;
|
||||||
|
case MOVE_EFFECT_DEF_SPDEF_DOWN: // Close Combat
|
||||||
|
BattleScriptPush(gBattlescriptCurrInstr + 1);
|
||||||
|
gBattlescriptCurrInstr = BattleScript_DefSpDefDown;
|
||||||
|
break;
|
||||||
case MOVE_EFFECT_RECOIL_33: // Double Edge
|
case MOVE_EFFECT_RECOIL_33: // Double Edge
|
||||||
gBattleMoveDamage = gHpDealt / 3;
|
gBattleMoveDamage = gHpDealt / 3;
|
||||||
if (gBattleMoveDamage == 0)
|
if (gBattleMoveDamage == 0)
|
||||||
|
|
|
@ -4444,7 +4444,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT_GEN6] =
|
||||||
.split = SPLIT_PHYSICAL,
|
.split = SPLIT_PHYSICAL,
|
||||||
},
|
},
|
||||||
{ // MOVE_CLOSE_COMBAT
|
{ // MOVE_CLOSE_COMBAT
|
||||||
.effect = EFFECT_PLACEHOLDER, // Needs a custom move effect
|
.effect = EFFECT_CLOSE_COMBAT,
|
||||||
.power = 120,
|
.power = 120,
|
||||||
.type = TYPE_FIGHTING,
|
.type = TYPE_FIGHTING,
|
||||||
.accuracy = 100,
|
.accuracy = 100,
|
||||||
|
|
Loading…
Reference in a new issue