Lots more work on implementing battling
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using PkmnLib.Dynamic.Libraries;
|
||||
using PkmnLib.Dynamic.Models;
|
||||
using PkmnLib.Dynamic.Models.Choices;
|
||||
using PkmnLib.Dynamic.ScriptHandling.Registry;
|
||||
using PkmnLib.Static;
|
||||
using PkmnLib.Static.Utils;
|
||||
|
||||
@@ -17,10 +18,11 @@ public abstract class Script
|
||||
private int _suppressCount;
|
||||
|
||||
/// <summary>
|
||||
/// The name of a script is its unique identifier. This should generally be set on load, and be
|
||||
/// the same as the key that was used to load it.
|
||||
/// The name of a script is its unique identifier.
|
||||
/// If not overridden, this will resolve the name from the <see cref="ScriptAttribute"/> of the
|
||||
/// script.
|
||||
/// </summary>
|
||||
public abstract StringKey Name { get; }
|
||||
public virtual StringKey Name => this.ResolveName();
|
||||
|
||||
public bool MarkForDeletion() => _markedForDeletion = true;
|
||||
public bool IsMarkedForDeletion() => _markedForDeletion;
|
||||
@@ -69,7 +71,7 @@ public abstract class Script
|
||||
/// <summary>
|
||||
/// This function is ran when this script starts being in effect.
|
||||
/// </summary>
|
||||
public virtual void OnInitialize(IDynamicLibrary library, IReadOnlyDictionary<StringKey, object> parameters)
|
||||
public virtual void OnInitialize(IDynamicLibrary library, IReadOnlyDictionary<StringKey, object>? parameters)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -356,7 +358,7 @@ public abstract class Script
|
||||
/// so changing this to above or equal to 100 will make it always hit, while setting it to equal
|
||||
/// or below 0 will make it never hit.
|
||||
/// </summary>
|
||||
public virtual void ChangeIncomingEffectChance(IExecutingMove move, IPokemon target, ref float chance)
|
||||
public virtual void ChangeIncomingEffectChance(IExecutingMove move, IPokemon target, byte hit, ref float chance)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user