Added first script, bugfixes
This commit is contained in:
@@ -77,7 +77,7 @@ public class Gen7DamageCalculator(bool hasRandomness) : IDamageCalculator
|
||||
{
|
||||
if (executingMove.UseMove.Category == MoveCategory.Status)
|
||||
return 0;
|
||||
var basePower = hitData.BasePower;
|
||||
var basePower = executingMove.UseMove.BasePower;
|
||||
executingMove.RunScriptHook(script =>
|
||||
script.ChangeBasePower(executingMove, target, hitNumber, ref basePower));
|
||||
return basePower;
|
||||
|
||||
25
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/Acrobatics.cs
Normal file
25
Plugins/PkmnLib.Plugin.Gen7/Scripts/Moves/Acrobatics.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using PkmnLib.Dynamic.Models;
|
||||
using PkmnLib.Dynamic.ScriptHandling;
|
||||
using PkmnLib.Static.Utils;
|
||||
|
||||
namespace PkmnLib.Plugin.Gen7.Moves;
|
||||
|
||||
/// <summary>
|
||||
/// The user nimbly strikes the target. If the user is not holding an item, this attack inflicts massive damage.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Does double base power if the user is not holding an item.
|
||||
/// </remarks>
|
||||
[Script(ScriptCategory.Move, "acrobatics")]
|
||||
public class Acrobatics : Script
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override string Name => "acrobatics";
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void ChangeBasePower(IExecutingMove move, IPokemon target, byte hit, ref byte basePower)
|
||||
{
|
||||
if (move.User.HeldItem == null)
|
||||
basePower = basePower.MultiplyOrMax(2);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user