Merge pull request #1661 from arantonitis/battle_engine
Fixed Nature Power move on different terrains.
This commit is contained in:
commit
f82161c003
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
|
||||
{
|
||||
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 a new issue