Battle Pike functionality

This commit is contained in:
Bassoonian 2023-04-23 20:33:28 +02:00
parent 13f6acf9a1
commit a020001a78

View File

@ -729,6 +729,7 @@ static void GetRoomInflictedStatus(void)
switch (sStatusFlags) switch (sStatusFlags)
{ {
case STATUS1_FREEZE: case STATUS1_FREEZE:
case STATUS1_FROSTBITE:
gSpecialVar_Result = PIKE_STATUS_FREEZE; gSpecialVar_Result = PIKE_STATUS_FREEZE;
break; break;
case STATUS1_BURN: case STATUS1_BURN:
@ -818,6 +819,7 @@ static bool8 DoesAbilityPreventStatus(struct Pokemon *mon, u32 status)
switch (status) switch (status)
{ {
case STATUS1_FREEZE: case STATUS1_FREEZE:
case STATUS1_FROSTBITE:
if (ability == ABILITY_MAGMA_ARMOR) if (ability == ABILITY_MAGMA_ARMOR)
ret = TRUE; ret = TRUE;
break; break;
@ -853,6 +855,7 @@ static bool8 DoesTypePreventStatus(u16 species, u32 status)
ret = TRUE; ret = TRUE;
break; break;
case STATUS1_FREEZE: case STATUS1_FREEZE:
case STATUS1_FROSTBITE:
if (gSpeciesInfo[species].types[0] == TYPE_ICE || gSpeciesInfo[species].types[1] == TYPE_ICE) if (gSpeciesInfo[species].types[0] == TYPE_ICE || gSpeciesInfo[species].types[1] == TYPE_ICE)
ret = TRUE; ret = TRUE;
break; break;
@ -913,7 +916,11 @@ static bool8 TryInflictRandomStatus(void)
if (rand < 35) if (rand < 35)
sStatusFlags = STATUS1_TOXIC_POISON; sStatusFlags = STATUS1_TOXIC_POISON;
else if (rand < 60) else if (rand < 60)
#if B_USE_FROSTBITE == TRUE
sStatusFlags = STATUS1_FROSTBITE;
#else
sStatusFlags = STATUS1_FREEZE; sStatusFlags = STATUS1_FREEZE;
#endif
else if (rand < 80) else if (rand < 80)
sStatusFlags = STATUS1_PARALYSIS; sStatusFlags = STATUS1_PARALYSIS;
else if (rand < 90) else if (rand < 90)
@ -950,6 +957,7 @@ static bool8 TryInflictRandomStatus(void)
switch (sStatusFlags) switch (sStatusFlags)
{ {
case STATUS1_FREEZE: case STATUS1_FREEZE:
case STATUS1_FROSTBITE:
sStatusMon = PIKE_STATUSMON_DUSCLOPS; sStatusMon = PIKE_STATUSMON_DUSCLOPS;
break; break;
case STATUS1_BURN: case STATUS1_BURN: