More move effects
This commit is contained in:
25
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/OneHitKo.cs
Normal file
25
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/OneHitKo.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using PkmnLib.Static.Utils;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||
|
||||
[Script(ScriptCategory.Move, "one_hit_ko")]
|
||||
public class OneHitKo : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override void ChangeAccuracy(IExecutingMove executingMove, IPokemon target, byte hitIndex, ref int modifiedAccuracy)
|
||||
{
|
||||
var levelDifference = executingMove.User.Level - target.Level;
|
||||
if (levelDifference < 0)
|
||||
{
|
||||
executingMove.GetHitData(target, hitIndex).Fail();
|
||||
return;
|
||||
}
|
||||
modifiedAccuracy = 30 + levelDifference;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void ChangeMoveDamage(IExecutingMove move, IPokemon target, byte hit, ref uint damage)
|
||||
{
|
||||
damage = target.BoostedStats.Hp.MultiplyOrMax(10);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user