This commit is contained in:
14
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/TrickOrTreat.cs
Normal file
14
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/TrickOrTreat.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||
|
||||
[Script(ScriptCategory.Move, "trick_or_treat")]
|
||||
public class TrickOrTreat : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
|
||||
{
|
||||
var library = move.Battle.Library.StaticLibrary.Types;
|
||||
if (!library.TryGetTypeIdentifier("ghost", out var ghostType))
|
||||
return;
|
||||
target.AddType(ghostType);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user