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