24 lines
731 B
C#
24 lines
731 B
C#
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
|
|
|
[Script(ScriptCategory.Pokemon, "magma_storm")]
|
|
public class MagmaStormEffect : Script, IScriptOnEndTurn, IScriptPreventSelfRunAway, IScriptPreventSelfSwitch
|
|
{
|
|
private readonly IPokemon _owner;
|
|
|
|
public MagmaStormEffect(IPokemon owner)
|
|
{
|
|
_owner = owner;
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public void OnEndTurn(IScriptSource owner, IBattle battle)
|
|
{
|
|
_owner.Damage(_owner.BoostedStats.Hp / 16, DamageSource.Misc);
|
|
}
|
|
|
|
/// <inheritdoc />
|
|
public void PreventSelfRunAway(IFleeChoice choice, ref bool prevent) => prevent = true;
|
|
|
|
/// <inheritdoc />
|
|
public void PreventSelfSwitch(ISwitchChoice choice, ref bool prevent) => prevent = true;
|
|
} |