Fixes Water Sport/Mud Sport when B_SPORT_TURNS < GEN_6 (#8613)
This commit is contained in:
parent
ae01e51f85
commit
8cb6791cdc
@ -13278,47 +13278,50 @@ static void Cmd_settypebasedhalvers(void)
|
||||
|
||||
bool8 worked = FALSE;
|
||||
|
||||
if (GetMoveEffect(gCurrentMove) == EFFECT_MUD_SPORT)
|
||||
if (!gBattleStruct->isSkyBattle)
|
||||
{
|
||||
if (B_SPORT_TURNS >= GEN_6)
|
||||
if (GetMoveEffect(gCurrentMove) == EFFECT_MUD_SPORT)
|
||||
{
|
||||
if (!(gFieldStatuses & STATUS_FIELD_MUDSPORT))
|
||||
if (B_SPORT_TURNS >= GEN_6)
|
||||
{
|
||||
gFieldStatuses |= STATUS_FIELD_MUDSPORT;
|
||||
gFieldTimers.mudSportTimer = 5;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WEAKEN_ELECTRIC;
|
||||
worked = TRUE;
|
||||
if (!(gFieldStatuses & STATUS_FIELD_MUDSPORT))
|
||||
{
|
||||
gFieldStatuses |= STATUS_FIELD_MUDSPORT;
|
||||
gFieldTimers.mudSportTimer = 5;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WEAKEN_ELECTRIC;
|
||||
worked = TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!gBattleMons[gBattlerAttacker].volatiles.mudSport)
|
||||
{
|
||||
gBattleMons[gBattlerAttacker].volatiles.mudSport = TRUE;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WEAKEN_ELECTRIC;
|
||||
worked = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
else // Water Sport
|
||||
{
|
||||
if (!gBattleMons[gBattlerAttacker].volatiles.waterSport)
|
||||
if (B_SPORT_TURNS >= GEN_6)
|
||||
{
|
||||
gBattleMons[gBattlerAttacker].volatiles.waterSport = TRUE;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WEAKEN_ELECTRIC;
|
||||
worked = TRUE;
|
||||
if (!(gFieldStatuses & STATUS_FIELD_WATERSPORT))
|
||||
{
|
||||
gFieldStatuses |= STATUS_FIELD_WATERSPORT;
|
||||
gFieldTimers.waterSportTimer = 5;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WEAKEN_FIRE;
|
||||
worked = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else // Water Sport
|
||||
{
|
||||
if (B_SPORT_TURNS >= GEN_6)
|
||||
{
|
||||
if (!(gFieldStatuses & STATUS_FIELD_WATERSPORT))
|
||||
else
|
||||
{
|
||||
gFieldStatuses |= STATUS_FIELD_WATERSPORT;
|
||||
gFieldTimers.waterSportTimer = 5;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WEAKEN_FIRE;
|
||||
worked = TRUE;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!gBattleMons[gBattlerAttacker].volatiles.mudSport)
|
||||
{
|
||||
gBattleMons[gBattlerAttacker].volatiles.mudSport = TRUE;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WEAKEN_FIRE;
|
||||
worked = TRUE;
|
||||
if (!gBattleMons[gBattlerAttacker].volatiles.waterSport)
|
||||
{
|
||||
gBattleMons[gBattlerAttacker].volatiles.waterSport = TRUE;
|
||||
gBattleCommunication[MULTISTRING_CHOOSER] = B_MSG_WEAKEN_FIRE;
|
||||
worked = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -6961,7 +6961,10 @@ u32 CalcFuryCutterBasePower(u32 basePower, u32 furyCutterCounter)
|
||||
|
||||
static inline u32 IsFieldMudSportAffected(enum Type moveType)
|
||||
{
|
||||
if (moveType == TYPE_ELECTRIC && (gFieldStatuses & STATUS_FIELD_MUDSPORT))
|
||||
if (moveType != TYPE_ELECTRIC)
|
||||
return FALSE;
|
||||
|
||||
if (gFieldStatuses & STATUS_FIELD_MUDSPORT)
|
||||
return TRUE;
|
||||
|
||||
if (B_SPORT_TURNS < GEN_6)
|
||||
@ -6978,7 +6981,10 @@ static inline u32 IsFieldMudSportAffected(enum Type moveType)
|
||||
|
||||
static inline u32 IsFieldWaterSportAffected(enum Type moveType)
|
||||
{
|
||||
if (moveType == TYPE_FIRE && (gFieldStatuses & STATUS_FIELD_WATERSPORT))
|
||||
if (moveType != TYPE_FIRE)
|
||||
return FALSE;
|
||||
|
||||
if (gFieldStatuses & STATUS_FIELD_WATERSPORT)
|
||||
return TRUE;
|
||||
|
||||
if (B_SPORT_TURNS < GEN_6)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user