Code Copyright 2022 by Kevin B. Smith (kevindigo)
Based on Ardent Reapers by Gee Barger and Luke Olson
Ardent Reapers is copyright 2022 Gee Barger, Luke Olson, and ProGen Distillery Games and is used with permission.
More information about Ardent Reapers can be found at https://ardentreapers.com
Argel is a library (written in typescript) that implements the components and rules of the Ardent Reapers card game.
The goal is to develop the low-level code that could be used to create a full online implementation (with rules enforcement). That could be a standalone site along the lines of TheCrucible.online, or perhaps it could be used in BoardGameArena or one of the other online gaming sites. Or even in an app.
It's not really usable yet. But in the future, you will be able to build an application around it! Wrap a UI around it, so we can all play AR online, with rules enforcement. The UI could be text-based or graphical, and could be real-time or asynchronous. It could be self-contained or split between client and server.
In your typescript or javascript appliction, add this library. Docs for the specific calls aren't available yet. Stay tuned.
npm ci
will install the dependencies
npm test
will run the unit tests
npm run lint
will check for problems
npm run build
will build the library
npm start
will run whatever demo code is there
Game
only runs on the server. Each client can use the model objects and their helpers.
Only Game
can update the official game State
.
The State
object that the client receives will always have a current Deed
,
which contains the decisions made so far, as well as the current decision to be made.
The client will let the server know which of the available options should be applied.
Options in a decision are always slots.
Most data structures are plain objects, so they can be serialized. When it makes sense, There are wrappers (known as managers) that provide functions. So to manipulate a State object, you would typically wrap it in a StateManager. Same for Side (SideManager) and Deed (DeedManager).
- Items
Card
= An instance of a card, including its facing, identified by CardIdCardef
= The definition of a card (SetId, CardNumber)CardId
= The set and number of a cardCardNumber
= 3-digit identifier within a setDeckId
= UID of a deckDeckList
= A SetId, DeckId, and list of CardNumbersGame
= A session in progress; Consists of 2 Sides and a TurnStatePlayer
= Identified by their name and DeckIdSetId
= Name of a set (e.g. "Omega Codex")Side
= A player, and their DrawPile, Discards, Hand, Scored, Line, Arsenal, and Flags- Flag:
isNextCardActive
= The next played card will be Active instead of Dormant - Flag:
canPlayActions
= Can play Actions this turn - Flag:
canFight
= Can Fight this turn
- Flag:
State
= A data object containing the complete game stateTurnState
= Who is the Active Player, and TurnFlagsQueuedAdditionalPlay
= After this Deed, Active Player can Play another CardQueuedFightLineIndex
= After this Deed, Active Player can Fight with this CreatureTurnFlags
canDiscard
= The Active Player either has played a card this turn, or cannot play and has revealed their hand, so they are allowed to Discard
- Locations
Discards
(D) = A face-up discard pileDrawPile
= Face-down cards available to drawBottom
(B) = Bottom card in a DrawPileTop
(T) = Top card in a DrawPile
Hand
(H)Line
(L) = A player's in-play CreaturesPurgatory
(P) = A temporary holding place during a DeedArsenal
(A) = A player's in-play RelicsScored
(S) = A players's score pile
- Deeds (Each play/harvest/discard/fight is a "deed")
Decision
= A single user choiceLabel
= Short description of the choice being madeavailableSlots
= All legal options for this decisionselectedSlots
= The slot(s) chosen by the user
decisions
= An array of the decisions the user made to construct the deedDeedType
Discard
= Move a Card from Hand to DiscardsFight
= Initiate a battleHarvest
= Score a Mature cardPlay
= Play a card from handTeamup
= Team up in a fight
mainCard
= The card being played, harvested, discarded, or used to fight
- Effects
ChooseNumber
(N) = Choose a number / chosen numberDraw
= Move a Card from a DrawPile to that Side's HandEndTurn
(END) = Immediately end turn, without drawing or rotatingHarvest
= Move a Mature card to DiscardsPlay
= Move a Card from Hand to Line (position -1 means the right end)Queue
(Q) = Queue a Play or Fight for after this DeedReveal
(%) = Make a current hand visible to the other PlayerRotate
(@) = Change the facing of a Card
- Qualifiers
Any
(A) = Any (location), used to mean either of My (M) and Opp (O)Controller
(C) = Whose line or arsenal the card is inHighest
(^) = Of the candidates, the ones with the highest Power (^P) or VP (^V)Lowest
(v) = Of the candidates, the ones with the lowest Power (vP) or VP (vV)My
(M) = Belonging to the active playerEnemy
(E) = Belonging to the non-active playerOwner
(O) = The Player using the DeckId that matches the Card being owned- Note: this prevents mirror matches where both players use the same deck!
- Values
Count
(#) = The number of selected cardsPower
(P) = The effective power of an in-play CardVictoryPoints
(V) = The VP of a Cardef or sum of a Scored
- Triggers
Harvest
(H:) = Bonus that triggers on a HarvestOptional
(MAY:) = Optional EffectWinFight
(WF:) = Bonus that triggers when the Creature wins a fight
- Other
- (=) = The card that is triggering the Effect
Facing
= State of a cardDormant
(@D) = A card is turned left (can't be used)Ready
(@R) = A card is upright (if in play, it can Fight)Mature
(@M) = A card is turned right (if in play, it can Fight or Harvest)Down
(@F) = A card is face-down
If/Else
(if ? :) = if(cond) ? :Random
= If the hand is not revealed, random is automaticRepeat
(x) = "5x(MT > H)" would mean draw from top to hand 5 timesShuffleLocation
(&) = Shuffle the cards in the specified locationShuffleInto
(~) = Shuffle a card into its owner's DrawPile
When identifying the "from", most locations must be prefixed with M
or E
to indicate the Side.
When identifying the "to", a Side does not have to be specified for DrawPile, Discards, or Hand, because Cards will always go to their Owner's respective location.