More abilities, refactor custom triggers to be typed.
All checks were successful
Build / Build (push) Successful in 48s

This commit is contained in:
2025-06-13 11:15:48 +02:00
parent 4326794611
commit 6d71de375e
43 changed files with 630 additions and 196 deletions

View File

@@ -356,6 +356,23 @@ public abstract class Script : IDeepCloneable
{
}
/// <summary>
/// This function allows a script to change the offensive stat value of an incoming move.
/// </summary>
public virtual void ChangeIncomingMoveOffensiveStatValue(IExecutingMove executingMove, IPokemon target,
byte hitNumber, uint defensiveStat, StatisticSet<uint> targetStats, Statistic offensive, ref uint offensiveStat)
{
}
/// <summary>
/// This function allows a script to change the defensive stat value of an incoming move.
/// </summary>
public virtual void ChangeIncomingMoveDefensiveStatValue(IExecutingMove executingMove, IPokemon target,
byte hitNumber, uint origOffensiveStat, StatisticSet<uint> targetStats, Statistic defensive,
ref uint defensiveStat)
{
}
/// <summary>
/// This function allows a script to change the raw modifier we retrieved from the stats of the
/// defender and attacker. The default value is the offensive stat divided by the defensive stat.
@@ -633,10 +650,10 @@ public abstract class Script : IDeepCloneable
/// The name of the event that is triggered. This should be unique for each different event. Overriding scripts
/// should validate the event name is one they should handle.
/// </param>
/// <param name="parameters">
/// The parameters that are passed to the event. This can be null if no parameters are passed.
/// <param name="args">
/// The parameters that are passed to the event.
/// </param>
public virtual void CustomTrigger(StringKey eventName, IDictionary<StringKey, object?>? parameters)
public virtual void CustomTrigger(StringKey eventName, ICustomTriggerArgs args)
{
}