More move effects
This commit is contained in:
23
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/FlareBlitz.cs
Normal file
23
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/FlareBlitz.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user