namespace PkmnLib.Plugin.Gen7.Scripts.Moves; [Script(ScriptCategory.Move, "struggle")] public class Struggle : Script, IScriptChangeNumberOfHits, IScriptIsInvulnerableToMove, IScriptChangeEffectiveness, IScriptOnSecondaryEffect { /// public void ChangeNumberOfHits(IMoveChoice choice, ref byte numberOfHits) { numberOfHits = 1; } /// public void IsInvulnerableToMove(IExecutingMove move, IPokemon target, ref bool invulnerable) { invulnerable = false; } /// public void ChangeEffectiveness(IExecutingMove move, IPokemon target, byte hit, ref float effectiveness) { effectiveness = 1; } /// public void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit) { var damage = move.User.MaxHealth / 4; if (damage == 0) damage = 1; move.User.Damage(damage, DamageSource.Struggle, new EventBatchId()); } }