2025-06-15 12:29:13 +02:00

18 lines
602 B
C#

namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
[Script(ScriptCategory.Move, "volt_tackle")]
public class VoltTackle : Script
{
/// <inheritdoc />
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
{
var hitData = move.GetHitData(target, hit);
var recoilDamage = (uint)(hitData.Damage * (1f / 3f));
move.User.Damage(recoilDamage, DamageSource.Misc);
if (move.Battle.Random.EffectChance(10, move, target, hit))
{
target.SetStatus(ScriptUtils.ResolveName<Status.Paralyzed>(), move.User);
}
}
}