18 lines
598 B
C#
18 lines
598 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>(), false);
|
|
}
|
|
}
|
|
} |