feat: add active effects inspector to tile drawer
- Track active effects with human-readable labels in AbilitySystem (LabelFromReversal/LabelFromTick for stat mods, status flags, DOT/HOT) - Add ActiveEffectDto to GameStateDto and GameStateDelta; delta now always includes the full effects list so clients are never stale - Add ResolveLabelFromEffectJson fallback for effects stored before the Label field was introduced (old game sessions show correct labels) - Client _append_active_effect_lines helper filters activeEffects by targetRef and appends formatted lines to the tile drawer for spirits, archspirits, spirit tokens, and ruins Generated with [Claude Code](https://claude.ai/code) via [Happy](https://happy.engineering) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Happy <yesreply@happy.engineering>
This commit is contained in:
@@ -519,7 +519,8 @@ public sealed record GameStateDelta(
|
||||
IReadOnlyDictionary<string, PlayerStatsDelta>? PlayerStatsByAccount,
|
||||
IReadOnlyDictionary<string, PublicCountsDelta>? PublicCountsByAccount,
|
||||
PrivateViewerDelta? PrivateByViewer,
|
||||
GameMetaDelta? MetaDelta);
|
||||
GameMetaDelta? MetaDelta,
|
||||
IReadOnlyList<ActiveEffectDto>? ActiveEffects = null); // full replacement when changed
|
||||
|
||||
public sealed record TileDelta(
|
||||
int X,
|
||||
@@ -624,7 +625,19 @@ public sealed record GameStateDto(
|
||||
BoardDto? Board, // full board state including tile affinities
|
||||
IEnumerable<string> SeatOrder, // account IDs in seat/turn order; empty = legacy 1v1
|
||||
string GameMode, // "FFA" | "Teams" | "MultiTeam"
|
||||
Dictionary<int, string> TeamColors); // teamIndex → hex color e.g. "4488FF"
|
||||
Dictionary<int, string> TeamColors, // teamIndex → hex color e.g. "4488FF"
|
||||
IEnumerable<ActiveEffectDto> ActiveEffects); // currently tracked duration effects
|
||||
|
||||
/// <summary>
|
||||
/// Client-facing view of a single duration-tracked active effect.
|
||||
/// </summary>
|
||||
public sealed record ActiveEffectDto(
|
||||
string SourceInstanceId,
|
||||
string SourceName, // resolved display name of the source unit
|
||||
string TargetRef, // InstanceId of target unit or AccountId of target player
|
||||
string Label, // human-readable description of the applied effect e.g. "ATK +2"
|
||||
string DurationType, // e.g. "UntilEndOfTurn", "ForNTurns", "WhileSourceOnBattlefield"
|
||||
int TurnsRemaining); // non-zero only for ForNTurns
|
||||
|
||||
public sealed record PlayerStateDto(
|
||||
Guid AccountId,
|
||||
|
||||
Reference in New Issue
Block a user