Additional functionality

This commit is contained in:
2024-09-30 19:23:56 +02:00
parent 4c34910a43
commit b01a8fb704
9 changed files with 171 additions and 5 deletions

View File

@@ -128,6 +128,11 @@ public interface IExecutingMove : IScriptSource
/// Gets a hit based on its raw index.
/// </summary>
IHitData GetDataFromRawIndex(int index);
/// <summary>
/// Gets the targets of this move.
/// </summary>
IReadOnlyList<IPokemon?> Targets { get; }
}
/// <inheritdoc cref="IExecutingMove"/>
@@ -207,6 +212,9 @@ public class ExecutingMoveImpl : ScriptSource, IExecutingMove
return _hits[index];
}
/// <inheritdoc />
public IReadOnlyList<IPokemon?> Targets => _targets.ToList();
/// <inheritdoc />
public override int ScriptCount => 1 + User.ScriptCount;