- .NET 10 console app with Spectre.Console and Loreline integration - Black Box Sim architecture (simulation separated from presentation) - Progressive CLI rendering (9 phases from basic to full layout) - 25+ box definitions with weighted loot tables - 100+ item definitions (meta, cosmetics, materials, adventure tokens) - 9 Loreline adventures (Space, Medieval, Pirate, etc.) - Bilingual content (EN/FR) - Save/load system - Game Design Document
52 lines
1.4 KiB
C#
52 lines
1.4 KiB
C#
using OpenTheBox.Core.Enums;
|
|
|
|
namespace OpenTheBox.Simulation.Actions;
|
|
|
|
/// <summary>
|
|
/// Base type for all player-initiated actions in the game.
|
|
/// </summary>
|
|
public abstract record GameAction
|
|
{
|
|
public DateTime Timestamp { get; init; } = DateTime.UtcNow;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Player opens a box from their inventory.
|
|
/// </summary>
|
|
public sealed record OpenBoxAction(Guid BoxInstanceId) : GameAction
|
|
{
|
|
/// <summary>
|
|
/// The definition id of the box being opened.
|
|
/// </summary>
|
|
public string? BoxDefinitionId { get; init; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Player uses an item from their inventory.
|
|
/// </summary>
|
|
public sealed record UseItemAction(Guid ItemInstanceId) : GameAction;
|
|
|
|
/// <summary>
|
|
/// Player crafts at a workstation using material items.
|
|
/// </summary>
|
|
public sealed record CraftAction(WorkstationType Station, List<Guid> MaterialIds) : GameAction;
|
|
|
|
/// <summary>
|
|
/// Player starts an adventure.
|
|
/// </summary>
|
|
public sealed record StartAdventureAction(AdventureTheme Theme) : GameAction;
|
|
|
|
/// <summary>
|
|
/// Player changes the game locale.
|
|
/// </summary>
|
|
public sealed record ChangeLocaleAction(Locale NewLocale) : GameAction;
|
|
|
|
/// <summary>
|
|
/// Player equips a cosmetic item.
|
|
/// </summary>
|
|
public sealed record EquipCosmeticAction(Guid ItemInstanceId) : GameAction;
|
|
|
|
/// <summary>
|
|
/// Player saves the game to a named slot.
|
|
/// </summary>
|
|
public sealed record SaveGameAction(string SlotName) : GameAction;
|