This commit is contained in:
@@ -3,13 +3,14 @@ using PkmnLib.Static.Moves;
|
||||
namespace PkmnLib.Plugin.Gen7.Scripts.Moves;
|
||||
|
||||
[Script(ScriptCategory.Move, "present")]
|
||||
public class Present : Script, IScriptOnSecondaryEffect, IScriptChangeBasePower
|
||||
public class Present : Script, IScriptOnSecondaryEffect, IScriptChangeBasePower, IScriptChangeCategory,
|
||||
IScriptOnBeforeHit
|
||||
{
|
||||
private bool _isHealing;
|
||||
private byte _basePower;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void OnBeforeHit(IExecutingMove move, IPokemon target, byte hitIndex)
|
||||
public void OnBeforeHit(IExecutingMove move, IPokemon target, byte hitIndex)
|
||||
{
|
||||
var battleRandom = move.User.BattleData?.Battle.Random;
|
||||
if (battleRandom == null)
|
||||
@@ -33,7 +34,7 @@ public class Present : Script, IScriptOnSecondaryEffect, IScriptChangeBasePower
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void ChangeCategory(IExecutingMove move, IPokemon target, byte hitIndex, ref MoveCategory category)
|
||||
public void ChangeCategory(IExecutingMove move, IPokemon target, byte hitIndex, ref MoveCategory category)
|
||||
{
|
||||
if (_isHealing)
|
||||
category = MoveCategory.Status;
|
||||
|
||||
Reference in New Issue
Block a user