24 lines
688 B
C#
24 lines
688 B
C#
|
using System;
|
||
|
using PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||
|
|
||
|
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||
|
|
||
|
[Script(ScriptCategory.Move, "ice_burn")]
|
||
|
public class IceBurn : BaseChargeMove<RequireChargeEffect>
|
||
|
{
|
||
|
/// <inheritdoc />
|
||
|
public override RequireChargeEffect CreateVolatile(IPokemon user) => new(user, "ice_burn");
|
||
|
|
||
|
/// <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(30, move, target, hit))
|
||
|
{
|
||
|
target.SetStatus("burned");
|
||
|
}
|
||
|
}
|
||
|
}
|