This commit is contained in:
27
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/SlowStart.cs
Normal file
27
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/SlowStart.cs
Normal file
@@ -0,0 +1,27 @@
|
||||
using PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
|
||||
|
||||
/// <summary>
|
||||
/// Slow Start is an ability that halves the user's Attack and Speed for five turns after entering battle.
|
||||
///
|
||||
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Slow_Start_(Ability)">Bulbapedia - Slow Start</see>
|
||||
/// </summary>
|
||||
[Script(ScriptCategory.Ability, "slow_start")]
|
||||
public class SlowStart : Script
|
||||
{
|
||||
private IPokemon? _pokemon;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnSwitchIn(IPokemon pokemon, byte position)
|
||||
{
|
||||
_pokemon = pokemon;
|
||||
pokemon.Volatile.Add(new SlowStartEffect());
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnRemove()
|
||||
{
|
||||
_pokemon?.Volatile.Remove<SlowStartEffect>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user