Implements several more moves
This commit is contained in:
25
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/Captivate.cs
Normal file
25
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/Captivate.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using PkmnLib.Static;
|
||||
using PkmnLib.Static.Species;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||
|
||||
[Script(ScriptCategory.Move, "captivate")]
|
||||
public class Captivate : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
|
||||
{
|
||||
var user = move.User;
|
||||
if (target.Gender == Gender.Genderless || target.Gender == user.Gender)
|
||||
{
|
||||
move.GetHitData(target, hit).Fail();
|
||||
return;
|
||||
}
|
||||
if (target.ActiveAbility?.Name == "oblivious")
|
||||
{
|
||||
move.GetHitData(target, hit).Fail();
|
||||
return;
|
||||
}
|
||||
target.ChangeStatBoost(Statistic.SpecialAttack, -2, false);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user