24 lines
672 B
C#
24 lines
672 B
C#
using PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
|
|
|
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
|
|
|
[Script(ScriptCategory.Move, "ice_fang")]
|
|
public class IceFang : Script
|
|
{
|
|
/// <inheritdoc />
|
|
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
|
|
{
|
|
var battleData = move.User.BattleData;
|
|
if (battleData == null)
|
|
return;
|
|
|
|
if (battleData.Battle.Random.EffectChance(10, move, target, hit))
|
|
{
|
|
target.SetStatus("frozen");
|
|
}
|
|
if (battleData.Battle.Random.EffectChance(10, move, target, hit))
|
|
{
|
|
target.Volatile.Add(new FlinchEffect());
|
|
}
|
|
}
|
|
} |