This commit is contained in:
@@ -255,8 +255,11 @@ public static class MoveTurnExecutor
|
||||
if (secondaryEffect != null)
|
||||
{
|
||||
var preventSecondary = false;
|
||||
target.RunScriptHook(x =>
|
||||
executingMove.RunScriptHook(x =>
|
||||
x.PreventSecondaryEffect(executingMove, target, hitIndex, ref preventSecondary));
|
||||
target.RunScriptHook(x =>
|
||||
x.PreventIncomingSecondaryEffect(executingMove, target, hitIndex,
|
||||
ref preventSecondary));
|
||||
|
||||
if (!preventSecondary)
|
||||
{
|
||||
|
||||
@@ -450,12 +450,21 @@ public abstract class Script : IDeepCloneable
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function allows a script to prevent a secondary effect of a move from being applied.
|
||||
/// This means the move will still hit and do damage, but not trigger its secondary effect. Note that this
|
||||
/// function is not called for status moves.
|
||||
/// </summary>
|
||||
public virtual void PreventSecondaryEffect(IExecutingMove move, IPokemon target, byte hit, ref bool prevent)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This function allows a script attached to a Pokemon or its parents to prevent an incoming
|
||||
/// secondary effect. This means the move will still hit and do damage, but not trigger its
|
||||
/// secondary effect. Note that this function is not called for status moves.
|
||||
/// </summary>
|
||||
public virtual void PreventSecondaryEffect(IExecutingMove move, IPokemon target, byte hit, ref bool prevent)
|
||||
public virtual void PreventIncomingSecondaryEffect(IExecutingMove move, IPokemon target, byte hit, ref bool prevent)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user