Fixed Nature Power move on different terrains.
This commit is contained in:
parent
58356fdcd6
commit
e037cb9276
1 changed files with 9 additions and 2 deletions
|
@ -11301,7 +11301,7 @@ static void Cmd_setcharge(void)
|
||||||
static void Cmd_callterrainattack(void) // nature power
|
static void Cmd_callterrainattack(void) // nature power
|
||||||
{
|
{
|
||||||
gHitMarker &= ~(HITMARKER_ATTACKSTRING_PRINTED);
|
gHitMarker &= ~(HITMARKER_ATTACKSTRING_PRINTED);
|
||||||
gCurrentMove = sNaturePowerMoves[gBattleTerrain];
|
gCurrentMove = GetNaturePowerMove();
|
||||||
gBattlerTarget = GetMoveTarget(gCurrentMove, 0);
|
gBattlerTarget = GetMoveTarget(gCurrentMove, 0);
|
||||||
BattleScriptPush(gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]);
|
BattleScriptPush(gBattleScriptsForMoveEffects[gBattleMoves[gCurrentMove].effect]);
|
||||||
gBattlescriptCurrInstr++;
|
gBattlescriptCurrInstr++;
|
||||||
|
@ -11309,7 +11309,14 @@ static void Cmd_callterrainattack(void) // nature power
|
||||||
|
|
||||||
u16 GetNaturePowerMove(void)
|
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];
|
return sNaturePowerMoves[gBattleTerrain];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue