mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-11-16 19:47:35 +01:00
Fixed Nature Power move on different terrains.
This commit is contained in:
parent
58356fdcd6
commit
e037cb9276
@ -11301,7 +11301,7 @@ static void Cmd_setcharge(void)
|
||||
static void Cmd_callterrainattack(void) // nature power
|
||||
{
|
||||
gHitMarker &= ~(HITMARKER_ATTACKSTRING_PRINTED);
|
||||
gCurrentMove = sNaturePowerMoves[gBattleTerrain];
|
||||
gCurrentMove = GetNaturePowerMove();
|
||||
gBattlerTarget = GetMoveTarget(gCurrentMove, 0);
|
||||
BattleScriptPush(gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]);
|
||||
gBattlescriptCurrInstr++;
|
||||
@ -11309,7 +11309,14 @@ static void Cmd_callterrainattack(void) // nature power
|
||||
|
||||
u16 GetNaturePowerMove(void)
|
||||
{
|
||||
//TODO terrain
|
||||
if (gFieldStatuses & STATUS_FIELD_MISTY_TERRAIN)
|
||||
return MOVE_MOONBLAST;
|
||||
else if (gFieldStatuses & STATUS_FIELD_ELECTRIC_TERRAIN)
|
||||
return MOVE_THUNDERBOLT;
|
||||
else if (gFieldStatuses & STATUS_FIELD_GRASSY_TERRAIN)
|
||||
return MOVE_ENERGY_BALL;
|
||||
else if (gFieldStatuses & STATUS_FIELD_PSYCHIC_TERRAIN)
|
||||
return MOVE_PSYCHIC;
|
||||
return sNaturePowerMoves[gBattleTerrain];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user