2025-05-03 17:52:50 +02:00

19 lines
529 B
C#

using PkmnLib.Plugin.Gen7.Scripts.Weather;
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
[Script(ScriptCategory.Move, "shore_up")]
public class ShoreUp : Script
{
/// <inheritdoc />
public override void OnSecondaryEffect(IExecutingMove move, IPokemon target, byte hit)
{
var healMod = 0.5f;
if (move.Battle.WeatherName == ScriptUtils.ResolveName<Sandstorm>())
{
healMod = 2f / 3f;
}
var heal = (uint)(target.MaxHealth * healMod);
target.Heal(heal);
}
}