@ehsawyer/initiative-tracker
A lightweight combat tracker for tabletop games
Last updated 12 days ago by ehsawyer .
GPL-3.0-only · Repository · Original npm · Tarball · package.json
$ cnpm install @ehsawyer/initiative-tracker 
SYNC missed versions from official npm registry.

@ehsawyer/initiative-tracker

A lightweight combat tracker for tabletop games

Installation

Install with

npm i @ehsawyer/initiative-tracker

or

yarn add @ehsawyer/initiative-tracker

Documentation

Table of Contents

Tracker

Class that handles initiative tracking

Parameters

  • characters array The characters in the tracker
  • turn number The character position whose turn it is
  • round number The current round

allCharacters

Get the amount of characters in the tracker

Returns string The amount of character in the tracker

characterCount

Get the amount of characters in the tracker

Returns string The amount of character in the tracker

round

Get the current round

Returns string The current round

turn

Get the current turn

Returns string The current turn

progress

Get the amount of characters in the tracker

Returns string The amount of character in the tracker

currentCharacter

Get the current character whose turn it is

Returns string The current character whose turn it is

turnIndex

Set the turn index

Parameters
  • index integer The target index

roundIndex

Set the round index

Parameters
  • index integer The target index

getCharacterOwnerID

Get the target character

Parameters
  • targetName
  • name string The name of the target character

Returns string The target character

getCharacterIndex

Get the target character's index

Parameters
  • name string The name of the target character

Returns string The target character's index

addCharacter

Adds a character to the tracker

Parameters
  • userID string The ID of the user responsible for controlling the character
  • name string The name of the character to be added
  • initiative string The character's initiative roll
  • dexterity string The character's dexterity score

editCharacter

Edits a character in the tracker

Parameters
  • name string The name of the character to be added
  • newname
  • initiative string The character's initiative roll
  • dexterity string The character's dexterity score

removeCharacter

Removes a character from the tracker

Parameters
  • name string The name of the character to be removed

userHasCharacter

Checks if a user already has a character

Parameters

listCharacters

Lists characters to console (Debug only)

nextTurn

Progresses to the next turn

startCombat

Starts Combat

sortTracker

Sorts the current turn order by rolled initiative and then the dexterity score of the characters

reset

Resets the tracker

Parameters
  • wipe (optional, default true)

Current Tags

  • 1.2.1                                ...           latest (12 days ago)

10 Versions

  • 1.2.1                                ...           12 days ago
  • 1.0.10                                ...           2 months ago
  • 1.0.9                                ...           2 months ago
  • 1.0.8                                ...           2 months ago
  • 1.0.7                                ...           2 months ago
  • 1.0.6                                ...           2 months ago
  • 1.0.5                                ...           2 months ago
  • 1.0.4                                ...           2 months ago
  • 1.0.3                                ...           2 months ago
  • 1.0.2                                ...           2 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 20
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |