Move attack build/repeat state, combat-mode policy, authoritative auto-target transitions, and spell-cast intent beneath RuntimeActionState. Keep App as the input, world-query, DAT-policy, transport, and presentation adapter while preserving retail request and busy ordering. Add direct/graphical parity, reset, failure, and instance-isolation coverage. Co-authored-by: Codex <noreply@openai.com>
40 lines
1.1 KiB
C#
40 lines
1.1 KiB
C#
using AcDream.Core.Combat;
|
|
using AcDream.Runtime.Gameplay;
|
|
|
|
namespace AcDream.Runtime;
|
|
|
|
public readonly record struct RuntimeCombatAttackSnapshot(
|
|
long Revision,
|
|
AttackHeight RequestedHeight,
|
|
float DesiredPower,
|
|
float PowerBarLevel,
|
|
bool BuildInProgress,
|
|
bool RequestInProgress,
|
|
float RequestedPower);
|
|
|
|
public readonly record struct RuntimeSpellCastSnapshot(
|
|
long Revision,
|
|
uint LastRequestedSpellId,
|
|
uint LastRequestedTargetId);
|
|
|
|
public readonly record struct RuntimeActionSnapshot(
|
|
long SelectionRevision,
|
|
uint SelectedObjectId,
|
|
uint PreviousObjectId,
|
|
uint PreviousValidObjectId,
|
|
long CombatRevision,
|
|
CombatMode CombatMode,
|
|
int TrackedTargetHealthCount,
|
|
long InteractionRevision,
|
|
InteractionModeKind InteractionMode,
|
|
uint InteractionSourceObjectId,
|
|
RuntimeInteractionTransactionSnapshot InteractionTransactions,
|
|
RuntimeCombatAttackSnapshot CombatAttack = default,
|
|
RuntimeSpellCastSnapshot Magic = default);
|
|
|
|
public interface IRuntimeActionView
|
|
{
|
|
RuntimeActionSnapshot Snapshot { get; }
|
|
|
|
bool TryGetHealth(uint objectId, out float healthPercent);
|
|
}
|