SotM Engine API
Class documentation for the Sentinels of the Multiverse Engine API.
Loading...
Searching...
No Matches
Game Class Reference

Public Member Functions

 Game (IEnumerable< string > turnTakerIdentifiers, bool isAdvanced=false, IDictionary< string, string > promoIdentifiers=null, int? randomSeed=null, bool isMultiplayer=false, SerializableRandom randomizer=null, HashSet< string > foilCardIdentifiers=null, IEnumerable< string > advancedIdentifiers=null, bool isChallenge=false, IEnumerable< string > challengeIdentifiers=null, string shieldIdentifier=null, IEnumerable< string > scionIdentifiers=null)
 Initializes a new instance of the Handelabra.Sentinels.Engine.Model.Game class.
 
bool AreNemeses (Card cardA, Card cardB)
 Find out if one card is the nemesis of the other.
 
void AssignPlayCardIndex (Card card)
 
TurnTaker FindNextAfterTurnTaker (TurnTaker afterTurnTaker)
 
TurnTaker FindNextTurnTaker ()
 
IEnumerable< TurnPhaseFindTurnPhases (Func< TurnPhase, bool > criteria)
 
TurnTaker FindTurnTaker (string identifier)
 Looks up a turn taker.
 
IEnumerable< CardGetAllCards (bool realCardsOnly=true)
 
int GetNextDecisionIdentifier ()
 
bool HasTurnTaker (TurnTaker taker)
 
string NameForTurnTakerIdentifier (string identifier)
 Returns a user visible name given a turn taker identifier. Can be used to look up names to display instead of {Identifier}. Works for any turn taker who has a deck definition. This supports the identifier having "'s" or "’s" at the end, and that will be returned as part of it. For mod decks not in the game, the identifier must be qualified.
 
void RemoveAllStatusEffects ()
 
void RemovePlayCardIndex (Card card)
 
TurnTaker ReplaceTurnTaker (TurnTaker oldTurnTaker, string turnTakerIdentifier, string promoIdentifier, IEnumerable< string > promoSwappingIdentifiers=null, HashSet< string > foilIdentifiers=null)
 
TurnTaker ReplaceTurnTaker (TurnTaker oldTurnTaker, TurnTaker newTurnTaker)
 
void SetActiveTurnPhase (TurnPhase turnPhase, bool forceIncrementTurnIndex=false, bool fromPhaseEphemeral=false, bool incrementTurnPhaseIndex=true)
 
void SetRound (int round)
 Only to be used for debug/testing purposes!
 
void StartGame ()
 
string TitleForCardIdentifier (string identifier, bool allowPromoTitle=false)
 Returns a user visible title given a card identifier. Can be used to look up names to display instead of {Identifier}. Only works for cards in this game. This supports the identifier having "'s" or "’s" at the end, and that will be returned as part of it.
 
string ToStateString ()
 
override string ToString ()
 
string ToSummaryString ()
 

Static Public Attributes

static int CurrentModelVersion = 2
 

Properties

TurnPhase ActiveTurnPhase [get]
 
TurnTaker ActiveTurnTaker [get]
 
List< BattleZoneBattleZones [get]
 
IEnumerable< TurnTakerEnvironmentTurnTakers [get]
 
IEnumerable< TurnTakerExtraTurnTakers [get]
 Gets the list of extra turn takers that are not in the game, but are loaded for later.
 
IEnumerable< string > FoilCardIdentifiers [get]
 
bool ForceIncrementTurnIndex [get, set]
 If this is true, then when EnterNextTurnPhase() is called it will increment the index. Used for InMediasRes.
 
int H [get]
 
bool HasGameStarted [get]
 
IEnumerable< HeroTurnTakerHeroTurnTakers [get]
 
SerializableRandom InitialRNG [get]
 
bool IsAdvanced [get]
 
bool IsChallenge [get]
 
bool IsMultiplayer [get, set]
 
bool IsOblivAeonMode [get]
 
bool IsVillainTeamMode [get]
 
Journal Journal [get]
 
int? NextTurnIndex [get, set]
 
IEnumerable< string > OblivAeonScionOrder [get]
 
string OblivAeonStartingShield [get]
 
IEnumerable< CardOrderedCardsInPlay [get]
 Keeps an ongoing list of all the cards in play and the order they were played.
 
TurnPhase OverrideNextTurnPhase [get, set]
 If this is set, then when EnterNextTurnPhase() is called it will go directly to this turn phase. Used for skipping turns and immediately ending turns.
 
string PeriodicalObjectID [get, set]
 This is recorded for use by the Weekly One-Shots (game of the week) feature. We need to keep track of whether a game is part of that system so we can record awards at the end of the game.
 
int? RandomSeed [get]
 The specified random seed that the game was started with, if any.
 
IEnumerable< TurnTakerRemovedTurnTakers [get]
 The list of turn takers who have been removed from the game.
 
Random RNG [get]
 The random number generator that should be used for all game-related things. Created when necessary.
 
int Round [get]
 
int SavedModelVersion [get]
 
Dictionary< string, string > StartingPromoIdentifiers [get]
 
IEnumerable< string > StartingTurnTakerIdentifiers [get]
 
List< StatusEffectStatusEffects [get]
 
int? TurnIndex [get]
 
int TurnPhaseIndex [get]
 
IEnumerable< TurnTakerTurnTakers [get]
 
IEnumerable< TurnTakerVillainTurnTakers [get]
 

Constructor & Destructor Documentation

◆ Game()

Game ( IEnumerable< string > turnTakerIdentifiers,
bool isAdvanced = false,
IDictionary< string, string > promoIdentifiers = null,
int? randomSeed = null,
bool isMultiplayer = false,
SerializableRandom randomizer = null,
HashSet< string > foilCardIdentifiers = null,
IEnumerable< string > advancedIdentifiers = null,
bool isChallenge = false,
IEnumerable< string > challengeIdentifiers = null,
string shieldIdentifier = null,
IEnumerable< string > scionIdentifiers = null )
inline

Initializes a new instance of the Handelabra.Sentinels.Engine.Model.Game class.

Parameters
turnTakerIdentifiersTurn taker identifier in turn order.
isAdvancedIf set to true the game will use advanced difficulty.
promoIdentifiersPromo card identifiers to use; key = turn taker identifier, value = promo card identifier.
randomSeedSeed with which to initialize the RNG

Member Function Documentation

◆ FindTurnTaker()

TurnTaker FindTurnTaker ( string identifier)
inline

Looks up a turn taker.

Parameters
identifierQualified identifier of a turn taker.
Returns
The turn taker, or null if not found.

◆ NameForTurnTakerIdentifier()

string NameForTurnTakerIdentifier ( string identifier)
inline

Returns a user visible name given a turn taker identifier. Can be used to look up names to display instead of {Identifier}. Works for any turn taker who has a deck definition. This supports the identifier having "'s" or "’s" at the end, and that will be returned as part of it. For mod decks not in the game, the identifier must be qualified.

Returns
The name for the turn taker, or null if not found.
Parameters
identifierQualified or non-qualified identifier of a turn taker.

◆ TitleForCardIdentifier()

string TitleForCardIdentifier ( string identifier,
bool allowPromoTitle = false )
inline

Returns a user visible title given a card identifier. Can be used to look up names to display instead of {Identifier}. Only works for cards in this game. This supports the identifier having "'s" or "’s" at the end, and that will be returned as part of it.

Returns
The title for the card.
Parameters
identifierIdentifier of a card.

Property Documentation

◆ ExtraTurnTakers

IEnumerable<TurnTaker> ExtraTurnTakers
get

Gets the list of extra turn takers that are not in the game, but are loaded for later.

The extra turn takers.