mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2025-01-31 16:30:00 +01:00
Field terrain move effect
This commit is contained in:
parent
5019615be1
commit
563ce8f416
@ -12075,6 +12075,30 @@ static void Cmd_getsecretpowereffect(void)
|
||||
u16 GetSecretPowerMoveEffect(void)
|
||||
{
|
||||
u16 moveEffect;
|
||||
u32 fieldTerrain = gFieldStatuses & STATUS_FIELD_TERRAIN_ANY;
|
||||
if (fieldTerrain)
|
||||
{
|
||||
switch (fieldTerrain)
|
||||
{
|
||||
case STATUS_FIELD_MISTY_TERRAIN:
|
||||
moveEffect = MOVE_EFFECT_SP_ATK_MINUS_1;
|
||||
break;
|
||||
case STATUS_FIELD_GRASSY_TERRAIN:
|
||||
moveEffect = MOVE_EFFECT_SLEEP;
|
||||
break;
|
||||
case STATUS_FIELD_ELECTRIC_TERRAIN:
|
||||
moveEffect = MOVE_EFFECT_PARALYSIS;
|
||||
break;
|
||||
case STATUS_FIELD_PSYCHIC_TERRAIN:
|
||||
moveEffect = MOVE_EFFECT_SPD_MINUS_1;
|
||||
break;
|
||||
default:
|
||||
moveEffect = MOVE_EFFECT_PARALYSIS;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (gBattleTerrain)
|
||||
{
|
||||
case BATTLE_TERRAIN_GRASS:
|
||||
@ -12105,6 +12129,7 @@ u16 GetSecretPowerMoveEffect(void)
|
||||
moveEffect = MOVE_EFFECT_PARALYSIS;
|
||||
break;
|
||||
}
|
||||
}
|
||||
return moveEffect;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user