19 lines
503 B
C#
19 lines
503 B
C#
using PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
|
|
|
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
|
|
|
[Script(ScriptCategory.Move, "telekinesis")]
|
|
public class Telekinesis : Script
|
|
{
|
|
/// <inheritdoc />
|
|
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
|
|
{
|
|
if (move.Battle.Volatile.Contains<Battle.Gravity>())
|
|
{
|
|
move.GetHitData(target, hit).Fail();
|
|
return;
|
|
}
|
|
|
|
target.Volatile.Add(new TelekinesisEffect());
|
|
}
|
|
} |