mirror of
https://github.com/raeleus/Hashtag-DnD.git
synced 2025-08-22 10:17:08 -04:00
#damage no longer needs a character specified and does not need quotes for the enemy name.
This commit is contained in:
parent
21abddcf0d
commit
18f1017653
2 changed files with 8 additions and 3 deletions
9
Input.js
9
Input.js
|
@ -125,7 +125,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, clearEnemiesSynonyms, initiativeSynonyms, turnSynonyms, fleeSynonyms, versionSynonyms, setupEnemySynonyms, 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, clearEnemiesSynonyms, initiativeSynonyms, turnSynonyms, fleeSynonyms, versionSynonyms, setupEnemySynonyms, damageSynonyms, resetSynonyms), function () {return true})
|
||||
|
||||
if (found == null) {
|
||||
if (state.characterName == null) {
|
||||
|
@ -1222,9 +1222,14 @@ function doDamage(command) {
|
|||
return "\n[Error: Not enough parameters. See #help]\n"
|
||||
}
|
||||
|
||||
var arg1 = getArgument(command, 1)
|
||||
var arg1 = getArgumentRemainder(command, 1)
|
||||
|
||||
if (arg1 == null) {
|
||||
if (character == null) {
|
||||
state.show = "none"
|
||||
return "\n[Error: Character must be specified. See #help]\n"
|
||||
}
|
||||
|
||||
var damage
|
||||
|
||||
var damageMatches = arg0.match(/\d*d\d+((\+|-)d+)?/gi)
|
||||
|
|
|
@ -334,7 +334,7 @@ const modifier = (text) => {
|
|||
text += "\n Sets the character's health to specified value. It's capped at the character's max health."
|
||||
text += "\n#heal value"
|
||||
text += "\n Increases the character's health by the specified value. It's capped at the character's max health."
|
||||
text += "\n#damage (enemy) damage or dice_roll"
|
||||
text += "\n#damage value or dice_roll (enemy) "
|
||||
text += "\n Decreases the enemy's health by the specified damage or dice_roll. If an enemy isn't specified, the character calling the command is damaged. Reaching 0 causes the character to become \"unconscious\"."
|
||||
text += "\n#setac value"
|
||||
text += "\n Sets the armor class of the character. The default is 10"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue