This commit is contained in:
22
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/ThunderFang.cs
Normal file
22
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/ThunderFang.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
using PkmnLib.Plugin.Gen7.Scripts.Status;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||
|
||||
[Script(ScriptCategory.Move, "thunder_fang")]
|
||||
public class ThunderFang : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
|
||||
{
|
||||
var random = move.Battle.Random;
|
||||
if (random.EffectChance(10, move, target, hit))
|
||||
{
|
||||
target.SetStatus(ScriptUtils.ResolveName<Paralyzed>());
|
||||
}
|
||||
if (random.EffectChance(10, move, target, hit))
|
||||
{
|
||||
target.Volatile.Add(new FlinchEffect());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user