Deukhoofd 9ff4745c0a
All checks were successful
Build / Build (push) Successful in 49s
Finishes the last few moves
2025-05-18 12:20:21 +02:00

18 lines
591 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>());
}
}
}