Implements an initial version of Baton Pass.
Will probably need some additional work in the future.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using PkmnLib.Dynamic.ScriptHandling;
|
||||
using PkmnLib.Static.Utils;
|
||||
|
||||
namespace PkmnLib.Dynamic.Models.Choices;
|
||||
|
||||
@@ -31,6 +32,8 @@ public interface IMoveChoice : ITurnChoice
|
||||
/// The underlying script of the move.
|
||||
/// </summary>
|
||||
ScriptContainer Script { get; set; }
|
||||
|
||||
Dictionary<StringKey, object?>? AdditionalData { get; }
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IMoveChoice"/>
|
||||
@@ -69,6 +72,9 @@ public class MoveChoice : TurnChoice, IMoveChoice
|
||||
/// <inheritdoc />
|
||||
public ScriptContainer Script { get; set; } = new();
|
||||
|
||||
/// <inheritdoc />
|
||||
public Dictionary<StringKey, object?>? AdditionalData { get; }
|
||||
|
||||
/// <inheritdoc />
|
||||
public override int ScriptCount => 1 + User.ScriptCount;
|
||||
|
||||
|
||||
@@ -65,4 +65,9 @@ public class ScriptContainer : IEnumerable<ScriptContainer>, IDeepCloneable
|
||||
}
|
||||
Script = null;
|
||||
}
|
||||
|
||||
public void ClearWithoutRemoving()
|
||||
{
|
||||
Script = null;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user