Slow Start

This commit is contained in:
DizzyEggg 2020-04-18 12:52:15 +02:00
parent b5ba1de7cf
commit a2813e63de
6 changed files with 25 additions and 2 deletions

View file

@ -5742,6 +5742,14 @@ BattleScript_ThroatChopEndTurn::
waitmessage 0x40
end2
BattleScript_SlowStartEnds::
pause 0x5
copybyte gBattlerAbility, gBattlerAttacker
call BattleScript_AbilityPopUp
printstring STRINGID_SLOWSTARTEND
waitmessage 0x40
end2
BattleScript_SelectingNotAllowedMoveGravity::
printselectionstring STRINGID_GRAVITYPREVENTSUSAGE
endselectionscript

View file

@ -331,5 +331,6 @@ extern const u8 BattleScript_AftermathDmg[];
extern const u8 BattleScript_StanceChangeActivates[];
extern const u8 BattleScript_DisguiseBustedActivates[];
extern const u8 BattleScript_AnticipationActivates[];
extern const u8 BattleScript_SlowStartEnds[];
#endif // GUARD_BATTLE_SCRIPTS_H

View file

@ -4254,6 +4254,8 @@ u32 GetBattlerTotalSpeedStat(u8 battlerId)
speed = (speed * 150) / 100;
else if (ability == ABILITY_SURGE_SURFER && gFieldStatuses & STATUS_FIELD_ELECTRIC_TERRAIN)
speed *= 2;
else if (ability == ABILITY_SLOW_START && gDisableStructs[battlerId].slowStartTimer != 0)
speed /= 2;
// stat stages
speed *= gStatStageRatios[gBattleMons[battlerId].statStages[STAT_SPEED]][0];

View file

@ -584,7 +584,7 @@ static const u8 sText_MoldBreakerEnters[] = _("{B_ATK_NAME_WITH_PREFIX} breaks t
static const u8 sText_TeravoltEnters[] = _("{B_ATK_NAME_WITH_PREFIX} is radiating a bursting aura!");
static const u8 sText_TurboblazeEnters[] = _("{B_ATK_NAME_WITH_PREFIX} is radiating\na blazing aura!");
static const u8 sText_SlowStartEnters[] = _("{B_ATK_NAME_WITH_PREFIX} can't get it going!");
static const u8 sText_SlowStartEnd[] = _("{B_ATK_NAME_WITH_PREFIX} finally got its act together!");
static const u8 sText_SlowStartEnd[] = _("{B_ATK_NAME_WITH_PREFIX} finally got\nits act together!");
static const u8 sText_SolarPowerHpDrop[] = _("The {B_ATK_NAME_WITH_PREFIX}'s {B_ATK_ABILITY}\ntakes its toll!");
static const u8 sText_AftermathDmg[] = _("{B_ATK_NAME_WITH_PREFIX} is hurt!");
static const u8 sText_AnticipationActivates[] = _("{B_ATK_NAME_WITH_PREFIX} shuddered\nin anticipation!");

View file

@ -1392,6 +1392,7 @@ enum
ENDTURN_ELECTRIFY,
ENDTURN_POWDER,
ENDTURN_THROAT_CHOP,
ENDTURN_SLOW_START,
ENDTURN_BATTLER_COUNT
};
@ -1856,6 +1857,16 @@ u8 DoBattlerEndTurnEffects(void)
}
gBattleStruct->turnEffectsTracker++;
break;
case ENDTURN_SLOW_START:
if (gDisableStructs[gActiveBattler].slowStartTimer
&& --gDisableStructs[gActiveBattler].slowStartTimer == 0
&& ability == ABILITY_SLOW_START)
{
BattleScriptExecute(BattleScript_SlowStartEnds);
effect++;
}
gBattleStruct->turnEffectsTracker++;
break;
case ENDTURN_BATTLER_COUNT: // done
gBattleStruct->turnEffectsTracker = 0;
gBattleStruct->turnEffectsBattlerId++;
@ -2854,6 +2865,7 @@ u8 AbilityBattleEffects(u8 caseID, u8 battler, u8 ability, u8 special, u16 moveA
case ABILITY_SLOW_START:
if (!gSpecialStatuses[battler].switchInAbilityDone)
{
gDisableStructs[battler].slowStartTimer = 5;
gBattleCommunication[MULTISTRING_CHOOSER] = 3;
gSpecialStatuses[battler].switchInAbilityDone = 1;
BattleScriptPushCursorAndCallback(BattleScript_SwitchInAbilityMsg);

View file

@ -7296,7 +7296,7 @@ const struct BaseStats gBaseStats[] =
.growthRate = GROWTH_SLOW,
.eggGroup1 = EGG_GROUP_FLYING,
.eggGroup2 = EGG_GROUP_FLYING,
.abilities = {ABILITY_KEEN_EYE, ABILITY_STURDY},
.abilities = {ABILITY_SLOW_START, ABILITY_SLOW_START},
.safariZoneFleeRate = 0,
.bodyColor = BODY_COLOR_GRAY,
.noFlip = FALSE,