Initial commit: Theriapolis baseline at port/godot branch point

Captures the pre-Godot-port state of the codebase. This is the rollback
anchor for the Godot port (M0 of theriapolis-rpg-implementation-plan-godot-port.md).
All Phase 0 through Phase 6.5 work is included; Phase 7 is in flight.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Christopher Wiebe
2026-04-30 20:40:51 -07:00
commit b451f83174
525 changed files with 75786 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
namespace Theriapolis.Core.Rules.Combat;
/// <summary>
/// Mutable per-turn state for the active combatant: action / bonus action /
/// reaction availability and remaining movement budget. The
/// <see cref="Encounter"/> rebuilds this when each new turn begins; the
/// <see cref="Resolver"/> consumes resources as the combatant uses them.
///
/// Phase 5 M4 tracks the booleans but doesn't enforce them inside Resolver
/// (callers can attack twice in a turn if they want — useful for tests).
/// M5 introduces per-action-cost gating in the live PlayScreen wrapper.
/// </summary>
public struct Turn
{
public int CombatantId;
public bool ActionAvailable;
public bool BonusActionAvailable;
public bool ReactionAvailable;
public int RemainingMovementFt;
public static Turn FreshFor(int combatantId, int speedFt) => new()
{
CombatantId = combatantId,
ActionAvailable = true,
BonusActionAvailable = true,
ReactionAvailable = true,
RemainingMovementFt = speedFt,
};
public void ConsumeAction() => ActionAvailable = false;
public void ConsumeBonusAction() => BonusActionAvailable = false;
public void ConsumeReaction() => ReactionAvailable = false;
public void ConsumeMovement(int feet)
{
RemainingMovementFt -= feet;
if (RemainingMovementFt < 0) RemainingMovementFt = 0;
}
}