Surprisingly, more moves
This commit is contained in:
@@ -119,6 +119,8 @@ internal static class MoveTurnExecutor
|
||||
break;
|
||||
|
||||
var hitIndex = i;
|
||||
executingMove.RunScriptHook(x => x.OnBeforeHit(executingMove, target, hitIndex));
|
||||
|
||||
var useMove = executingMove.UseMove;
|
||||
var hitType = useMove.MoveType;
|
||||
executingMove.RunScriptHook(x => x.ChangeMoveType(executingMove, target, hitIndex, ref hitType));
|
||||
|
||||
@@ -312,7 +312,7 @@ public abstract class Script : IDeepCloneable
|
||||
/// This function allows a script to change the actual offensive stat values used when calculating damage
|
||||
/// </summary>
|
||||
public virtual void ChangeOffensiveStatValue(IExecutingMove move, IPokemon target, byte hit, uint defensiveStat,
|
||||
ref uint value)
|
||||
ImmutableStatisticSet<uint> targetStats, ref uint value)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ public abstract class Script : IDeepCloneable
|
||||
/// This function allows a script to change the actual defensive stat values used when calculating damage.
|
||||
/// </summary>
|
||||
public virtual void ChangeDefensiveStatValue(IExecutingMove move, IPokemon target, byte hit, uint offensiveStat,
|
||||
ref uint value)
|
||||
ImmutableStatisticSet<uint> targetStats, ref uint value)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -610,4 +610,8 @@ public abstract class Script : IDeepCloneable
|
||||
public virtual void ChangeCategory(IExecutingMove move, IPokemon target, byte hitIndex, ref MoveCategory category)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void OnBeforeHit(IExecutingMove move, IPokemon target, byte hitIndex)
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -62,13 +62,15 @@ public class ScriptContainer : IReadOnlyScriptContainer
|
||||
/// <summary>
|
||||
/// Removes the script from this container.
|
||||
/// </summary>
|
||||
public void Clear()
|
||||
public Script? Clear()
|
||||
{
|
||||
if (Script is not null)
|
||||
{
|
||||
Script.OnRemove();
|
||||
}
|
||||
var script = Script;
|
||||
Script = null;
|
||||
return script;
|
||||
}
|
||||
|
||||
public void ClearWithoutRemoving()
|
||||
|
||||
Reference in New Issue
Block a user