22 lines
657 B
C#
22 lines
657 B
C#
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
|
|
|
[Script(ScriptCategory.Move, "flare_blitz")]
|
|
public class FlareBlitz : Script
|
|
{
|
|
/// <inheritdoc />
|
|
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
|
|
{
|
|
var battleData = target.BattleData;
|
|
if (battleData == null)
|
|
return;
|
|
|
|
if (battleData.Battle.Random.EffectChance(10, move, target, hit))
|
|
{
|
|
target.SetStatus("burned");
|
|
}
|
|
|
|
var hitData = move.GetHitData(target, hit);
|
|
var recoilDamage = (uint)(hitData.Damage * (1 / 3));
|
|
move.User.Damage(recoilDamage, DamageSource.Misc);
|
|
}
|
|
} |