Bunch more moves, changes in how additional information for items works.
This commit is contained in:
19
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/Nightmare.cs
Normal file
19
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/Nightmare.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
using PkmnLib.Plugin.Gen7.Scripts.Status;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||
|
||||
[Script(ScriptCategory.Move, "nightmare")]
|
||||
public class Nightmare : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
|
||||
{
|
||||
if (!target.HasStatus(ScriptUtils.ResolveName<Sleep>()))
|
||||
{
|
||||
move.GetHitData(target, hit).Fail();
|
||||
return;
|
||||
}
|
||||
target.Volatile.Add(new NightmareEffect(target));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user