More moves implemented
This commit is contained in:
18
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/Endeavor.cs
Normal file
18
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/Endeavor.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||
|
||||
[Script(ScriptCategory.Move, "endeavor")]
|
||||
public class Endeavor : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void ChangeMoveDamage(IExecutingMove move, IPokemon target, byte hit, ref uint damage)
|
||||
{
|
||||
var user = move.User;
|
||||
var userHealth = user.CurrentHealth;
|
||||
var targetHealth = target.CurrentHealth;
|
||||
if (userHealth >= targetHealth)
|
||||
{
|
||||
return;
|
||||
}
|
||||
damage = targetHealth - userHealth;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user