More abilities, refactor IPokemon.SetStatus to pass pokemon that caused the status change
All checks were successful
Build / Build (push) Successful in 50s
All checks were successful
Build / Build (push) Successful in 50s
This commit is contained in:
19
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/SwiftSwim.cs
Normal file
19
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/SwiftSwim.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
|
||||
|
||||
/// <summary>
|
||||
/// Swift Swim is an ability that doubles the Pokémon's Speed in rain.
|
||||
///
|
||||
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Swift_Swim_(Ability)">Bulbapedia - Swift Swim</see>
|
||||
/// </summary>
|
||||
[Script(ScriptCategory.Ability, "swift_swim")]
|
||||
public class SwiftSwim : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void ChangeSpeed(ITurnChoice choice, ref uint speed)
|
||||
{
|
||||
if (choice.User.BattleData?.Battle.WeatherName == ScriptUtils.ResolveName<Weather.Rain>())
|
||||
{
|
||||
speed = speed.MultiplyOrMax(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user