18 lines
624 B
C#
18 lines
624 B
C#
namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
|
|
|
|
/// <summary>
|
|
/// Gooey is an ability that lowers the Speed of attackers making contact with the Pokémon.
|
|
///
|
|
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Gooey_(Ability)">Bulbapedia - Gooey</see>
|
|
/// </summary>
|
|
[Script(ScriptCategory.Ability, "gooey")]
|
|
public class Gooey : Script, IScriptOnIncomingHit
|
|
{
|
|
/// <inheritdoc />
|
|
public void OnIncomingHit(IExecutingMove move, IPokemon target, byte hit)
|
|
{
|
|
if (!move.GetHitData(target, hit).IsContact)
|
|
return;
|
|
move.User.ChangeStatBoost(Statistic.Speed, -1, false, false);
|
|
}
|
|
} |