mirror of
https://github.com/raeleus/Hashtag-DnD.git
synced 2025-07-05 13:10:28 -04:00
Added #version. Resolved #42
This commit is contained in:
parent
6ae6ebae51
commit
a8fbc6df5b
3 changed files with 12 additions and 1 deletions
10
Input.js
10
Input.js
|
@ -1,3 +1,4 @@
|
|||
const version = "Hashtag DnD v0.2.0"
|
||||
const rollSynonyms = ["roll"]
|
||||
const createSynonyms = ["create", "generate", "start", "begin", "setup", "party", "member", "new"]
|
||||
const renameCharacterSynonyms = ["renamecharacter", "renameperson"]
|
||||
|
@ -73,6 +74,7 @@ const initiativeSynonyms = ["initiative"]
|
|||
const setAcSynonyms = ["setac", "setarmorclass", "ac", "armorclass"]
|
||||
const turnSynonyms = ["turn", "doturn", "taketurn"]
|
||||
const fleeSynonyms = ["flee", "retreat", "runaway"]
|
||||
const versionSynonyms = ["version", "ver", "showversion"]
|
||||
const helpSynonyms = ["help"]
|
||||
|
||||
const modifier = (text) => {
|
||||
|
@ -114,7 +116,7 @@ const modifier = (text) => {
|
|||
return { text }
|
||||
}
|
||||
|
||||
if (!found) found = processCommandSynonyms(command, commandName, helpSynonyms.concat(rollSynonyms, noteSynonyms, eraseNoteSynonyms, showNotesSynonyms, clearNotesSynonyms, showCharactersSynonyms, removeCharacterSynonyms, generateNameSynonyms, setDefaultDifficultySynonyms, showDefaultDifficultySynonyms, renameCharacterSynonyms, cloneCharacterSynonyms, createLocationSynonyms, showLocationsSynonyms, goToLocationSynonyms, removeLocationSynonyms, getLocationSynonyms, clearLocationsSynonyms, goNorthSynonyms, goSouthSynonyms, goEastSynonyms, goWestSynonyms, encounterSynonyms, showEnemiesSynonyms, addEnemySynonyms, removeEnemySynonyms, initiativeSynonyms, turnSynonyms, fleeSynonyms, resetSynonyms), function () {return true})
|
||||
if (!found) found = processCommandSynonyms(command, commandName, helpSynonyms.concat(rollSynonyms, noteSynonyms, eraseNoteSynonyms, showNotesSynonyms, clearNotesSynonyms, showCharactersSynonyms, removeCharacterSynonyms, generateNameSynonyms, setDefaultDifficultySynonyms, showDefaultDifficultySynonyms, renameCharacterSynonyms, cloneCharacterSynonyms, createLocationSynonyms, showLocationsSynonyms, goToLocationSynonyms, removeLocationSynonyms, getLocationSynonyms, clearLocationsSynonyms, goNorthSynonyms, goSouthSynonyms, goEastSynonyms, goWestSynonyms, encounterSynonyms, showEnemiesSynonyms, addEnemySynonyms, removeEnemySynonyms, initiativeSynonyms, turnSynonyms, fleeSynonyms, versionSynonyms, resetSynonyms), function () {return true})
|
||||
|
||||
if (found == null) {
|
||||
if (state.characterName == null) {
|
||||
|
@ -195,6 +197,7 @@ const modifier = (text) => {
|
|||
if (text == null) text = processCommandSynonyms(command, commandName, cloneCharacterSynonyms, doCloneCharacter)
|
||||
if (text == null) text = processCommandSynonyms(command, commandName, showDaySynonyms, doShowDay)
|
||||
if (text == null) text = processCommandSynonyms(command, commandName, setDaySynonyms, doSetDay)
|
||||
if (text == null) text = processCommandSynonyms(command, commandName, versionSynonyms, doVersion)
|
||||
if (text == null) text = processCommandSynonyms(command, commandName, helpSynonyms, doHelp)
|
||||
if (text == null) {
|
||||
var character = getCharacter()
|
||||
|
@ -2135,6 +2138,11 @@ function doClearSkills(command) {
|
|||
return " "
|
||||
}
|
||||
|
||||
function doVersion(command) {
|
||||
state.show = "none"
|
||||
return version
|
||||
}
|
||||
|
||||
function doReset(command) {
|
||||
state.notes = []
|
||||
state.characters = []
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue