Even more abilities
All checks were successful
Build / Build (push) Successful in 51s

This commit is contained in:
2025-06-14 13:21:23 +02:00
parent 4b07f36176
commit 5961bb746e
31 changed files with 787 additions and 157 deletions

View File

@@ -0,0 +1,21 @@
namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
/// <summary>
/// Sand Rush is an ability that doubles the Pokémon's Speed during a sandstorm.
///
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Sand_Rush_(Ability)">Bulbapedia - Sand Rush</see>
/// </summary>
[Script(ScriptCategory.Ability, "sand_rush")]
public class SandRush : Script
{
/// <inheritdoc />
public override void ChangeSpeed(ITurnChoice choice, ref uint speed)
{
if (choice.User.BattleData?.Battle.WeatherName == ScriptUtils.ResolveName<Weather.Sandstorm>())
{
speed = speed.MultiplyOrMax(2);
}
}
// TODO: Prevent sandstorm damage.
}