More abilities
This commit is contained in:
19
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/Unburden.cs
Normal file
19
Plugins/PkmnLib.Plugin.Gen7/Scripts/Abilities/Unburden.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
|
||||
|
||||
/// <summary>
|
||||
/// Unburden is an ability that doubles the Pokémon's Speed if it loses its held item.
|
||||
///
|
||||
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Unburden_(Ability)">Bulbapedia - Unburden</see>
|
||||
/// </summary>
|
||||
[Script(ScriptCategory.Ability, "unburden")]
|
||||
public class Unburden : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void ChangeSpeed(ITurnChoice choice, ref uint speed)
|
||||
{
|
||||
if (choice.User.HasItemBeenRemovedForBattle)
|
||||
{
|
||||
speed = speed.MultiplyOrMax(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user