Members
-
constant getDraftSets
-
Get draft sets to play draft mode
-
constant getHeroesIdsByFaction
-
Get 12 heroes id by faction in random order.
-
constant shuffleHeroes
-
Shuffle Heroes
-
TH_Ability :object
-
Ability of an Hero
Properties:
Name Type Description namestring name of the ability
hookTH_AbilityHook when ability has an effect
isOptionnalboolean If true, player will have choice wether to activate ability or not
descstring Description of the ability effect
-
TH_AbilityHook :'AfterDeploy'|'AfterDiscard'|'AfterRecruit'|'BeforeControl'|'BeforeMaintenance'|'BeforeMilitary'
-
Ability Hook
-
TH_AdvRule :'popularity'|'discard'
-
Possible advanced rules
-
TH_BattleTile :object
-
Battle Tile object
Properties:
Name Type Description idnumber unique ID of tile
namestring name of tile
victoryPointsnumber Number of victory points
victories/bluenumber Number of red player victories
victories/rednumber Number of blue player victories
-
TH_Color :'blue'|'red'
-
player colors
-
TH_CommStatus :object
-
Comm status
Properties:
Name Type Description statusTH_ReqStatus Status of the request
textstring Text describing current status
-
TH_DeckMode :'faction'|'draft'|'tournament'
-
Values For Deck Mode.
-
TH_Faction :'orcs'|'humans'|'elves'|'meca'|'none'
-
Faction of a hero
-
TH_GameDataStore :object
-
Game Data Store
Properties:
Name Type Description gameTH_GameGlobalState The game global state in store
bluePlayerTH_PlayerGameState The game state for blue player
redPlayerTH_PlayerGameState The game state for red player
-
TH_GameGlobalState :object
-
One game global state
Properties:
Name Type Description gameStateTH_GameStateEnum Current status of the game
allHeroesArray.<TH_HeroCard> Array containing all heroes
deckModeTH_DeckMode Deck mode of the game
advRulesArray.<TH_AdvRule> Array describing the active advandced rules, if any
waitingFor/blueboolean If true, we are waiting for blue to play
waitingFor/redboolean If true, we are waiting for red to play
currentPlayerTH_Color | 'both' Who is current player, can be 'both'
battleTiles/left/ofBlueArray.<TH_BattleTile> Battle tiles on left side of blue player
battleTiles/center/ofBlueArray.<TH_BattleTile> Battle tiles on center of blue player
battleTiles/right/ofBlueArray.<TH_BattleTile> Battle tiles on right side of blue player
totalFoodnumber Total food available for players to take
allHeroesJsonstring All heroes in JSON format (read from a JSON file)
-
TH_GameStateEnum :'0_INIT'|'1_SELECT_DRAFT'|'1_SELECT_FACTION'|'1_SELECT_TOURNAMENT'|'2_CHANGE_UP_TO_3_CARDS'
-
Values for Game state.
-
TH_HeroAction :'recruit'|'deploy'|'move'|'ability'|'dismiss'|'discard'|'replace'
-
Possible action for a hero
-
TH_HeroCard :object
-
Hero card
Properties:
Name Type Description idnumber unique ID of hero
namestring name of hero
costnumber cost of hero
powernumber power of hero
factionTH_Faction faction of hero
popularityTH_Popularity popularity attribute of hero
isDraftableboolean Is hero available in Draft mode
abilityTH_Ability Ability of a hero
-
TH_HeroInGame :object
-
Hero in game
Properties:
Name Type Description idnumber unique ID of hero
positionTH_HeroPosition position of hero in game
possibleActionsArray.<TH_HeroAction> Actions possible on hero
-
TH_HeroPosition :'pile'|'hand'|'discard'|'camp'|'battle_left'|'battle_center'|'battle_right'
-
Possible position for a hero
-
TH_MessageChatFrom :object
-
Message for chat from one player to others
Properties:
Name Type Description fromstring From is the message from
textstring The content of chat message
-
TH_MessageDraftStep :object
-
Message from player for draft mode steps. Each turn of draft mode, players choses 2 new Ids which will be added to his twelveHeroes.
Properties:
Name Type Description colorTH_Color color of player
chosenIdsArray.<number> The chosen Ids
-
TH_MessageFaction :object
-
Message from player with faction selected
Properties:
Name Type Description colorTH_Color color of player
factionTH_Faction The chosen faction
-
TH_MessageTournamentDeckStep :object
-
Message from player for tournament mode. Player chose 12 heroes.
Properties:
Name Type Description colorTH_Color color of player
twelveHeroesIdsArray.<number> The chosen 12 heroes IDs
-
TH_PlayerAction :'supply'|'pass'
-
Possible action for a player
-
TH_PlayerGameState :object
-
Game state for one player
Properties:
Name Type Description namestring username of this player
colorTH_Color color of the player
factionTH_Faction | '' Chosen faction (empty if not playing faction mode)
draftHeroesIdsArray.<number> Will contain the IDs of the heroes selectable for draft mode
twelveHeroesArray.<TH_HeroInGame> The 12 Heroes used by player
foodInCampnumber Number of food in camp
foodInBattle/leftnumber Food on left battle field
foodInBattle/centernumber Food on center battle field
foodInBattle/rightnumber Food on right battle field
actionsPerformedArray.<object> During military phase it will contain actions made by player to be replayed by other
Array.<TH_PlayerAction> Actions avalaible for the player
-
TH_Popularity :'with'|'without'|'any'
-
popularity attribute of a hero
-
TH_ReqStatus :'idle'|'requested'|'success'|'error'
-
Statuses of a server Request