Actions - jeutn/omg-research-project GitHub Wiki

Core Actions

Core actions represent the fundamental operations and interactions that modify the game state. These include player commands, automated system processes, state transitions, and game lifecycle events that collectively drive gameplay progression. They can be invoked by either the player or the system.

4.1 Player Actions

Actions that represent decisions that players can make/invoke.

Action Description
SelectWorker Select between Sloppy Worker or Efficient Worker
AssignWorker Select a building from building site to assign worker for production
SelectBuilding Select a building from building site for production
QueueBuilding Select a building from hand to build after production, building is initially hidden to other players
BuildBuilding Add building onto buildings site making it available for future production
HireAssistant Pay 2 coins worth of goods to hire an assistant, only allowed if player has required pre-requisite buildings (random)
MoveAssistant Move assistant to work in another building after paying 2 coins
FinalisePlan Finalise decisions for later production phase

4.2 System Actions

Automatic operations performed by game system (mechanics).

Action Description
DealCards(type, num) Deal out num number of type cards into hand
ShuffleDeck Randomise deck of cards
ClearDisplay Clear market display of all cards; reset temporary state
DrawCard Draw one card at a time from the shuffled deck
RevealCard Reveal card to tableau
DiscardCard Move card back into the deck
ProduceGoods Use resources and buildings to produce goods with a corresponding coins value
CheckSun Check the condition if 2 half-suns have appeared on the market display
ProductionChain Produce extra goods by paying num amount of required production chain resources
ConsumeResources Activate and assist in production of goods by paying with resources from hand
ReplaceHand Refresh player hand with new cards of the same amount

4.3 State Update Actions

Actions that modify player or game state variables.

Action Description
UpdateGoodsInventory Update player's amount of each resource and corresponding coins value
PayCoins Pay for items using goods with its corresponding coins value
UpdateCoins Update player's coins inventory
UpdateBuildingSite Add buildings, add assistant, clear buildings site
UpdateTotalVP Update amount of VPs per player when buildings and workers become active

4.4 Game Lifecycle Actions

These control game progression.

Action Description
RoundCounter Keep track of current round number; terminate game when pre-selected round number is reached
FinalRoundSignal Visual cue to players that the final round will start after the current one ends, where all production chains will be used
GameEnd Trigger CoinsToVP, UpdateTotalVP, IdentifyWinner; visual cue to players describing winner and total economy
CoinsToVP Calculate total VPs from player's coins (5 coins = 1 VP), then UpdateTotalVP
IdentifyWinner Determine player with highest amount of VPs at the end of game