mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-13 15:13:42 +01:00
Terrain Pulse
This commit is contained in:
parent
0202b75822
commit
271f19e6cb
@ -375,6 +375,7 @@ gBattleScriptsForMoveEffects:: @ 82D86A8
|
||||
.4byte BattleScript_EffectRisingVoltage
|
||||
.4byte BattleScript_EffectCorrosiveGas
|
||||
.4byte BattleScript_EffectBeakBlast
|
||||
.4byte BattleScript_EffectTerrainPulse
|
||||
|
||||
BattleScript_EffectBeakBlast::
|
||||
attackcanceler
|
||||
@ -2196,6 +2197,7 @@ BattleScript_EffectBelch:
|
||||
BattleScript_EffectBodyPress:
|
||||
BattleScript_EffectExpandingForce:
|
||||
BattleScript_EffectRisingVoltage:
|
||||
BattleScript_EffectTerrainPulse:
|
||||
|
||||
BattleScript_HitFromAtkCanceler::
|
||||
attackcanceler
|
||||
|
@ -359,7 +359,8 @@
|
||||
#define EFFECT_RISING_VOLTAGE 353
|
||||
#define EFFECT_CORROSIVE_GAS 354
|
||||
#define EFFECT_BEAK_BLAST 355
|
||||
#define EFFECT_TERRAIN_PULSE 356
|
||||
|
||||
#define NUM_BATTLE_MOVE_EFFECTS 356
|
||||
#define NUM_BATTLE_MOVE_EFFECTS 357
|
||||
|
||||
#endif // GUARD_CONSTANTS_BATTLE_MOVE_EFFECTS_H
|
||||
|
@ -5070,6 +5070,17 @@ 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_MISTY_TERRAIN)
|
||||
gBattleStruct->dynamicMoveType = TYPE_FAIRY | 0x80;
|
||||
else if (gFieldStatuses & STATUS_FIELD_ELECTRIC_TERRAIN)
|
||||
gBattleStruct->dynamicMoveType = TYPE_ELECTRIC | 0x80;
|
||||
else if (gFieldStatuses & STATUS_FIELD_PSYCHIC_TERRAIN)
|
||||
gBattleStruct->dynamicMoveType = TYPE_PSYCHIC | 0x80;
|
||||
else if (gFieldStatuses & STATUS_FIELD_GRASSY_TERRAIN)
|
||||
gBattleStruct->dynamicMoveType = TYPE_GRASS | 0x80;
|
||||
}
|
||||
|
||||
attackerAbility = GetBattlerAbility(battlerAtk);
|
||||
GET_MOVE_TYPE(move, moveType);
|
||||
|
@ -7224,6 +7224,10 @@ static u16 CalcMoveBasePower(u16 move, u8 battlerAtk, u8 battlerDef)
|
||||
#endif
|
||||
basePower *= 2;
|
||||
break;
|
||||
case EFFECT_TERRAIN_PULSE:
|
||||
if (gFieldStatuses & (STATUS_FIELD_GRASSY_TERRAIN | STATUS_FIELD_ELECTRIC_TERRAIN | STATUS_FIELD_MISTY_TERRAIN | STATUS_FIELD_PSYCHIC_TERRAIN))
|
||||
basePower *= 2;
|
||||
break;
|
||||
}
|
||||
|
||||
if (basePower == 0)
|
||||
|
@ -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…
x
Reference in New Issue
Block a user