Bunch more moves, changes in how additional information for items works.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using PkmnLib.Plugin.Gen7.Scripts.Status;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Pokemon;
|
||||
|
||||
[Script(ScriptCategory.Pokemon, "nightmare")]
|
||||
public class NightmareEffect : Script
|
||||
{
|
||||
private readonly IPokemon _owner;
|
||||
|
||||
public NightmareEffect(IPokemon owner)
|
||||
{
|
||||
_owner = owner;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnEndTurn(IBattle battle)
|
||||
{
|
||||
if (!_owner.HasStatus(ScriptUtils.ResolveName<Sleep>()))
|
||||
{
|
||||
RemoveSelf();
|
||||
return;
|
||||
}
|
||||
var maxHp = _owner.MaxHealth;
|
||||
_owner.Damage(maxHp / 4, DamageSource.Misc);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user