Merge pull request #1423 from BuffelSaft/body-press

Implement Body Press's effect
This commit is contained in:
ultima-soul 2021-06-01 18:42:54 -07:00 committed by GitHub
commit 255be1a0c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 2 deletions

View File

@ -367,6 +367,7 @@ gBattleScriptsForMoveEffects:: @ 82D86A8
.4byte BattleScript_EffectFairyLock
.4byte BattleScript_EffectAllySwitch
.4byte BattleScript_EffectSleepHit
.4byte BattleScript_EffectBodyPress
BattleScript_EffectSleepHit:
setmoveeffect MOVE_EFFECT_SLEEP
@ -2051,6 +2052,7 @@ BattleScript_EffectChangeTypeOnItem:
BattleScript_EffectFusionCombo:
BattleScript_EffectRevelationDance:
BattleScript_EffectBelch:
BattleScript_EffectBodyPress:
BattleScript_HitFromAtkCanceler::
attackcanceler

View File

@ -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

View File

@ -7524,6 +7524,11 @@ 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)
{
atkStat = gBattleMons[battlerAtk].defense;
atkStage = gBattleMons[battlerAtk].statStages[STAT_DEF];
}
else
{
if (IS_MOVE_PHYSICAL(move))

View File

@ -10926,7 +10926,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,