23 lines
730 B
C#
23 lines
730 B
C#
using PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
|
|
|
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
|
|
|
[Script(ScriptCategory.Move, "freeze_shock")]
|
|
public class FreezeShock : BaseChargeMove<RequireChargeEffect>
|
|
{
|
|
/// <inheritdoc />
|
|
public override RequireChargeEffect CreateVolatile(IBattlePokemon user) => new(user, "freeze_shock");
|
|
|
|
/// <inheritdoc />
|
|
public override void OnSecondaryEffect(IExecutingMove move, IBattlePokemon target, byte hit)
|
|
{
|
|
var battleData = target;
|
|
if (battleData == null)
|
|
return;
|
|
|
|
if (battleData.Battle.Random.EffectChance(30, move, target, hit))
|
|
{
|
|
target.SetStatus(ScriptUtils.ResolveName<Status.Paralyzed>(), move.User);
|
|
}
|
|
}
|
|
} |