Field terrain move effect
This commit is contained in:
parent
5019615be1
commit
563ce8f416
1 changed files with 54 additions and 29 deletions
|
@ -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…
Reference in a new issue