More moves
This commit is contained in:
19
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/LeechSeed.cs
Normal file
19
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/LeechSeed.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System.Linq;
|
||||
using PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||
|
||||
[Script(ScriptCategory.Move, "leech_seed")]
|
||||
public class LeechSeed : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
|
||||
{
|
||||
if (target.Types.Any(x => x.Name == "grass"))
|
||||
{
|
||||
move.GetHitData(target, hit).Fail();
|
||||
return;
|
||||
}
|
||||
target.Volatile.Add(new LeechSeedEffect(target, move.User));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user