mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-09 01:23:57 -07:00
Add core type definitions and constants for the command zone feature: - zone_names.h: Add command zone name constants (command, partner, companion, background) for protocol and lookup operations - command_zone_types.h: Define CommandZoneType enum, ZoneVisibility enum, and StateChangeResult struct for state machine logic - counter_ids.h: Define shared counter IDs and names for commander tax tracking (IDs 8-9 reserved to avoid conflicts with user counters) These headers are intentionally minimal and dependency-free to enable inclusion in both production code and isolated unit tests.
29 lines
912 B
C++
29 lines
912 B
C++
#ifndef COUNTER_IDS_H
|
|
#define COUNTER_IDS_H
|
|
|
|
/**
|
|
* Shared counter IDs used by both client and server.
|
|
* These must match between server_player.cpp and player_event_handler.cpp.
|
|
*
|
|
* Reserved counter IDs for system counters:
|
|
* IDs 0-7: Standard player counters (life, mana colors, storm)
|
|
* IDs 8-9: Commander tax counters (reserved, do not use for custom counters)
|
|
* IDs 10+: Available for user-created counters
|
|
*
|
|
* The server's newCounterId() starts from the highest existing ID + 1,
|
|
* so these reserved IDs won't conflict as long as they're created first
|
|
* during setupZones().
|
|
*/
|
|
namespace CounterIds
|
|
{
|
|
constexpr int CommanderTax = 8;
|
|
constexpr int PartnerTax = 9;
|
|
} // namespace CounterIds
|
|
|
|
namespace CounterNames
|
|
{
|
|
constexpr const char *CommanderTax = "commander_tax_counter";
|
|
constexpr const char *PartnerTax = "partner_tax_counter";
|
|
} // namespace CounterNames
|
|
|
|
#endif // COUNTER_IDS_H
|