Field terrain move effect
This commit is contained in:
parent
5019615be1
commit
563ce8f416
1 changed files with 54 additions and 29 deletions
|
@ -12075,35 +12075,60 @@ static void Cmd_getsecretpowereffect(void)
|
||||||
u16 GetSecretPowerMoveEffect(void)
|
u16 GetSecretPowerMoveEffect(void)
|
||||||
{
|
{
|
||||||
u16 moveEffect;
|
u16 moveEffect;
|
||||||
switch (gBattleTerrain)
|
u32 fieldTerrain = gFieldStatuses & STATUS_FIELD_TERRAIN_ANY;
|
||||||
|
if (fieldTerrain)
|
||||||
{
|
{
|
||||||
case BATTLE_TERRAIN_GRASS:
|
switch (fieldTerrain)
|
||||||
moveEffect = MOVE_EFFECT_SLEEP;
|
{
|
||||||
break;
|
case STATUS_FIELD_MISTY_TERRAIN:
|
||||||
case BATTLE_TERRAIN_LONG_GRASS:
|
moveEffect = MOVE_EFFECT_SP_ATK_MINUS_1;
|
||||||
moveEffect = MOVE_EFFECT_SLEEP;
|
break;
|
||||||
break;
|
case STATUS_FIELD_GRASSY_TERRAIN:
|
||||||
case BATTLE_TERRAIN_SAND:
|
moveEffect = MOVE_EFFECT_SLEEP;
|
||||||
moveEffect = MOVE_EFFECT_ACC_MINUS_1;
|
break;
|
||||||
break;
|
case STATUS_FIELD_ELECTRIC_TERRAIN:
|
||||||
case BATTLE_TERRAIN_UNDERWATER:
|
moveEffect = MOVE_EFFECT_PARALYSIS;
|
||||||
moveEffect = MOVE_EFFECT_ATK_MINUS_1;
|
break;
|
||||||
break;
|
case STATUS_FIELD_PSYCHIC_TERRAIN:
|
||||||
case BATTLE_TERRAIN_WATER:
|
moveEffect = MOVE_EFFECT_SPD_MINUS_1;
|
||||||
moveEffect = MOVE_EFFECT_ATK_MINUS_1;
|
break;
|
||||||
break;
|
default:
|
||||||
case BATTLE_TERRAIN_POND:
|
moveEffect = MOVE_EFFECT_PARALYSIS;
|
||||||
moveEffect = MOVE_EFFECT_ATK_MINUS_1;
|
break;
|
||||||
break;
|
}
|
||||||
case BATTLE_TERRAIN_MOUNTAIN:
|
}
|
||||||
moveEffect = MOVE_EFFECT_ACC_MINUS_1;
|
else
|
||||||
break;
|
{
|
||||||
case BATTLE_TERRAIN_CAVE:
|
switch (gBattleTerrain)
|
||||||
moveEffect = MOVE_EFFECT_FLINCH;
|
{
|
||||||
break;
|
case BATTLE_TERRAIN_GRASS:
|
||||||
default:
|
moveEffect = MOVE_EFFECT_SLEEP;
|
||||||
moveEffect = MOVE_EFFECT_PARALYSIS;
|
break;
|
||||||
break;
|
case BATTLE_TERRAIN_LONG_GRASS:
|
||||||
|
moveEffect = MOVE_EFFECT_SLEEP;
|
||||||
|
break;
|
||||||
|
case BATTLE_TERRAIN_SAND:
|
||||||
|
moveEffect = MOVE_EFFECT_ACC_MINUS_1;
|
||||||
|
break;
|
||||||
|
case BATTLE_TERRAIN_UNDERWATER:
|
||||||
|
moveEffect = MOVE_EFFECT_ATK_MINUS_1;
|
||||||
|
break;
|
||||||
|
case BATTLE_TERRAIN_WATER:
|
||||||
|
moveEffect = MOVE_EFFECT_ATK_MINUS_1;
|
||||||
|
break;
|
||||||
|
case BATTLE_TERRAIN_POND:
|
||||||
|
moveEffect = MOVE_EFFECT_ATK_MINUS_1;
|
||||||
|
break;
|
||||||
|
case BATTLE_TERRAIN_MOUNTAIN:
|
||||||
|
moveEffect = MOVE_EFFECT_ACC_MINUS_1;
|
||||||
|
break;
|
||||||
|
case BATTLE_TERRAIN_CAVE:
|
||||||
|
moveEffect = MOVE_EFFECT_FLINCH;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
moveEffect = MOVE_EFFECT_PARALYSIS;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return moveEffect;
|
return moveEffect;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue