mirror of
https://github.com/Ninjdai1/pokeemerald.git
synced 2024-12-26 19:54:21 +01:00
Battle Pike functionality
This commit is contained in:
parent
13f6acf9a1
commit
a020001a78
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user