This commit is contained in:
18
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/VoltTackle.cs
Normal file
18
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/VoltTackle.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
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>());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user