mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-27 04:04:17 +01:00
Terrain Pulse effect implemented
This commit is contained in:
parent
aa7484bba0
commit
43d42c95cf
@ -13979,7 +13979,7 @@ Move_RISING_VOLTAGE::
|
||||
end @to do:
|
||||
|
||||
Move_TERRAIN_PULSE::
|
||||
end @to do:
|
||||
goto Move_DRAGON_PULSE @Temporary, needs to setup different animations based on terrain
|
||||
|
||||
Move_SKITTER_SMACK::
|
||||
end @to do:
|
||||
|
@ -379,6 +379,7 @@ gBattleScriptsForMoveEffects::
|
||||
.4byte BattleScript_EffectDecorate @ EFFECT_DECORATE
|
||||
.4byte BattleScript_EffectHit @ EFFECT_SNIPE_SHOT
|
||||
.4byte BattleScript_EffectTripleHit @ EFFECT_TRIPLE_HIT
|
||||
.4byte BattleScript_EffectHit @ EFFECT_TERRAIN_PULSE
|
||||
|
||||
BattleScript_EffectDecorate:
|
||||
attackcanceler
|
||||
|
@ -363,7 +363,8 @@
|
||||
#define EFFECT_DECORATE 357
|
||||
#define EFFECT_SNIPE_SHOT 358
|
||||
#define EFFECT_TRIPLE_HIT 359
|
||||
#define EFFECT_TERRAIN_PULSE 360
|
||||
|
||||
#define NUM_BATTLE_MOVE_EFFECTS 360
|
||||
#define NUM_BATTLE_MOVE_EFFECTS 361
|
||||
|
||||
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
||||
|
@ -5095,6 +5095,23 @@ void SetTypeBeforeUsingMove(u16 move, u8 battlerAtk)
|
||||
if (ItemId_GetPocket(gBattleMons[battlerAtk].item) == POCKET_BERRIES)
|
||||
gBattleStruct->dynamicMoveType = gNaturalGiftTable[ITEM_TO_BERRY(gBattleMons[battlerAtk].item)].type;
|
||||
}
|
||||
else if (gBattleMoves[move].effect == EFFECT_TERRAIN_PULSE)
|
||||
{
|
||||
if ((gFieldStatuses & STATUS_FIELD_TERRAIN_ANY)
|
||||
&& IsBattlerGrounded(battlerAtk))
|
||||
{
|
||||
if (gFieldStatuses & STATUS_FIELD_ELECTRIC_TERRAIN)
|
||||
gBattleStruct->dynamicMoveType = TYPE_ELECTRIC | 0x80;
|
||||
else if (gFieldStatuses & STATUS_FIELD_GRASSY_TERRAIN)
|
||||
gBattleStruct->dynamicMoveType = TYPE_GRASS | 0x80;
|
||||
else if (gFieldStatuses & STATUS_FIELD_MISTY_TERRAIN)
|
||||
gBattleStruct->dynamicMoveType = TYPE_FAIRY | 0x80;
|
||||
else if (gFieldStatuses & STATUS_FIELD_PSYCHIC_TERRAIN)
|
||||
gBattleStruct->dynamicMoveType = TYPE_PSYCHIC | 0x80;
|
||||
else
|
||||
gBattleStruct->dynamicMoveType = TYPE_NORMAL | 0x80;
|
||||
}
|
||||
}
|
||||
|
||||
attackerAbility = GetBattlerAbility(battlerAtk);
|
||||
GET_MOVE_TYPE(move, moveType);
|
||||
|
@ -7572,6 +7572,11 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef)
|
||||
basePower *= 2;
|
||||
#endif
|
||||
break;
|
||||
case EFFECT_TERRAIN_PULSE:
|
||||
if ((gFieldStatuses & STATUS_FIELD_TERRAIN_ANY)
|
||||
&& IsBattlerGrounded(gBattlerAttacker))
|
||||
basePower *= 2;
|
||||
break;
|
||||
}
|
||||
|
||||
// move-specific base power changes
|
||||
|
@ -11332,7 +11332,7 @@ const struct BattleMove gBattleMoves[MOVES_COUNT] =
|
||||
|
||||
[MOVE_TERRAIN_PULSE] =
|
||||
{
|
||||
.effect = EFFECT_PLACEHOLDER, //TODO
|
||||
.effect = EFFECT_TERRAIN_PULSE,
|
||||
.power = 50,
|
||||
.type = TYPE_NORMAL,
|
||||
.accuracy = 100,
|
||||
|
Loading…
Reference in New Issue
Block a user