Implement Body Press' effect
Body Press calculates damage using the user's defense stat instead of its attack. Also adds a special variant of the effect that uses the special defense stat.
This commit is contained in:
parent
d270dee6bc
commit
7d237d8ff6
4 changed files with 18 additions and 2 deletions
|
@ -365,6 +365,7 @@ gBattleScriptsForMoveEffects:: @ 82D86A8
|
|||
.4byte BattleScript_EffectFairyLock
|
||||
.4byte BattleScript_EffectAllySwitch
|
||||
.4byte BattleScript_EffectSleepHit
|
||||
.4byte BattleScript_EffectBodyPress
|
||||
|
||||
BattleScript_EffectSleepHit:
|
||||
setmoveeffect MOVE_EFFECT_SLEEP
|
||||
|
@ -2049,6 +2050,7 @@ BattleScript_EffectChangeTypeOnItem:
|
|||
BattleScript_EffectFusionCombo:
|
||||
BattleScript_EffectRevelationDance:
|
||||
BattleScript_EffectBelch:
|
||||
BattleScript_EffectBodyPress:
|
||||
|
||||
BattleScript_HitFromAtkCanceler::
|
||||
attackcanceler
|
||||
|
|
|
@ -351,7 +351,8 @@
|
|||
#define EFFECT_FAIRY_LOCK 345
|
||||
#define EFFECT_ALLY_SWITCH 346
|
||||
#define EFFECT_SLEEP_HIT 347 // Relic Song
|
||||
#define EFFECT_BODY_PRESS 348
|
||||
|
||||
#define NUM_BATTLE_MOVE_EFFECTS 348
|
||||
#define NUM_BATTLE_MOVE_EFFECTS 349
|
||||
|
||||
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
||||
|
|
|
@ -7307,6 +7307,19 @@ static u32 CalcAttackStat(u16 move, u8 battlerAtk, u8 battlerDef, u8 moveType, b
|
|||
atkStage = gBattleMons[battlerDef].statStages[STAT_SPATK];
|
||||
}
|
||||
}
|
||||
if (gBattleMoves[move].effect == EFFECT_BODY_PRESS)
|
||||
{
|
||||
if (IS_MOVE_PHYSICAL(move))
|
||||
{
|
||||
atkStat = gBattleMons[battlerAtk].defense;
|
||||
atkStage = gBattleMons[battlerAtk].statStages[STAT_DEF];
|
||||
}
|
||||
else
|
||||
{
|
||||
atkStat = gBattleMons[battlerAtk].spDefense;
|
||||
atkStage = gBattleMons[battlerAtk].statStages[STAT_SPDEF];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (IS_MOVE_PHYSICAL(move))
|
||||
|
|
|
@ -10828,7 +10828,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
|||
|
||||
[MOVE_BODY_PRESS] =
|
||||
{
|
||||
.effect = EFFECT_PLACEHOLDER, //TODO
|
||||
.effect = EFFECT_BODY_PRESS,
|
||||
.power = 80,
|
||||
.type = TYPE_FIGHTING,
|
||||
.accuracy = 100,
|
||||
|
|
Loading…
Reference in a new issue