Use DC phrasing where appropriate.

This commit is contained in:
raeleus 2024-09-18 22:25:38 -07:00
parent 3caaf01bf3
commit 250173148a
2 changed files with 17 additions and 16 deletions

View file

@ -882,10 +882,10 @@ function doCheck(command) {
var dieText = arg1 == "advantage" || arg1 == "disadvantage" ? `${arg1}(${die1},${die2})` : die1
var text
if (score == 20) text = `\n[${arg0} check: ${target}. roll: ${dieText}. Critical Success!]\n`
else if (score == 1) text = `\n[${arg0} check: ${target}. roll: ${dieText}. Critical Failure!]\n`
else if (modifier != 0) text = `\n[${arg0} check: ${target}. roll: ${dieText}${modifier > 0 ? "+" + modifier : modifier}=${score + modifier}. ${score + modifier >= target ? "Success!" : "Failure!"}]\n`
else text = `\n[${arg0} check: ${target}. roll: ${dieText}. ${score >= target ? "Success!" : "Failure!"}]\n`
if (score == 20) text = `\n[${arg0} check DC: ${target}. roll: ${dieText}. Critical Success!]\n`
else if (score == 1) text = `\n[${arg0} check DC: ${target}. roll: ${dieText}. Critical Failure!]\n`
else if (modifier != 0) text = `\n[${arg0} check DC: ${target}. roll: ${dieText}${modifier > 0 ? "+" + modifier : modifier}=${score + modifier}. ${score + modifier >= target ? "Success!" : "Failure!"}]\n`
else text = `\n[${arg0} check DC: ${target}. roll: ${dieText}. ${score >= target ? "Success!" : "Failure!"}]\n`
return text
}
@ -952,10 +952,10 @@ function doTry(command) {
var dieText = arg1 == "advantage" || arg1 == "disadvantage" ? `${arg1}(${die1},${die2})` : die1
state.show = "prefix"
if (score == 20) state.prefix = `\n[${arg0} check: ${target}. roll: ${dieText}]\n`
else if (score == 1) state.prefix = `\n[${arg0} check: ${target}. roll: ${dieText}]\n`
else if (modifier != 0) state.prefix = `\n[${arg0} check: ${target}. roll: ${dieText}${modifier > 0 ? "+" + modifier : modifier}=${score + modifier}. ${score + modifier >= target ? "Success!" : "Failure!"}]\n`
else state.prefix = `\n[${arg0} check: ${target}. roll: ${dieText}. ${score >= target ? "Success!" : "Failure!"}]\n`
if (score == 20) state.prefix = `\n[${arg0} check DC: ${target}. roll: ${dieText}]\n`
else if (score == 1) state.prefix = `\n[${arg0} check DC: ${target}. roll: ${dieText}]\n`
else if (modifier != 0) state.prefix = `\n[${arg0} check DC: ${target}. roll: ${dieText}${modifier > 0 ? "+" + modifier : modifier}=${score + modifier}. ${score + modifier >= target ? "Success!" : "Failure!"}]\n`
else state.prefix = `\n[${arg0} check DC: ${target}. roll: ${dieText}. ${score >= target ? "Success!" : "Failure!"}]\n`
var text = `\n${character.name} ${score + modifier >= target ? "successfully" : failword + " to"} ${arg3}`
if (score == 20) text += " Critical success! Your action was extremely effective."
else if (score == 1) text += " Critical failure! There are dire consequences of your action."
@ -1511,10 +1511,11 @@ function doCastSpell(command) {
state.show = "prefix"
var dieText = advantage == "advantage" || advantage == "disadvantage" ? `${advantage}(${roll1},${roll2})` : roll1
if (roll == 20) state.prefix = `\n[Difficulty: ${difficulty}. Roll: ${dieText}. Critcal Success!]\n`
else if (roll == 1) state.prefix = `\n[Difficulty: ${difficulty}. Roll: ${dieText}. Critcal Failure!]\n`
else if (modifier != 0) state.prefix = `\n[Difficulty: ${difficulty}. Roll: ${dieText}${modifier > 0 ? "+" + modifier : modifier}=${roll + modifier}. ${roll + modifier >= difficulty ? "Success!" : "Failure!"}]\n`
else state.prefix = `\n[Difficulty: ${difficulty}. Roll: ${dieText}. ${roll + modifier >= difficulty ? "Success!" : "Failure!"}]\n`
var difficultyWord = target == null ? "Difficulty" : "Armor"
if (roll == 20) state.prefix = `\n[${difficultyWord} Class: ${difficulty}. Roll: ${dieText}. Critcal Success!]\n`
else if (roll == 1) state.prefix = `\n[${difficultyWord} Class: ${difficulty}. Roll: ${dieText}. Critcal Failure!]\n`
else if (modifier != 0) state.prefix = `\n[${difficultyWord} Class: ${difficulty}. Roll: ${dieText}${modifier > 0 ? "+" + modifier : modifier}=${roll + modifier}. ${roll + modifier >= difficulty ? "Success!" : "Failure!"}]\n`
else state.prefix = `\n[${difficultyWord} Class: ${difficulty}. Roll: ${dieText}. ${roll + modifier >= difficulty ? "Success!" : "Failure!"}]\n`
if (roll == 20) text += ` Critical success!`
else if (roll == 1) text += ` Critical failure! The spell ${target != null ? "misses" : "fails"} in a spectacular way.`

View file

@ -210,7 +210,7 @@ const modifier = (text) => {
text += "\n#addxp value"
text += "\n Increases the character's experience by the specified value. The player is notified if there is a level up."
text += "\n#setautoxp value"
text += "\n Automatically increases the experience of all party members when a #try, #attack, or #cast is called. The amount of experience is scaled based on the difficulty of the check with any check 20 or higher will result in the maximum specified by value. Set to 0 to disable."
text += "\n Automatically increases the experience of all party members when a #try, #attack, or #cast is called. The amount of experience is scaled based on the difficulty class of the check with any check 20 or higher will result in the maximum specified by value. Set to 0 to disable."
text += "\n#showautoxp"
text += "\n Shows the value of the auto xp."
text += "\n#levelup"
@ -221,13 +221,13 @@ const modifier = (text) => {
text += "\n Removes the character that has the indicated name."
text += "\n\n--Character Checks--"
text += "\n#check (ability|skill) (advantage|disadvantage) (difficulty_value or effortless|easy|medium|hard|impossible)"
text += "\n#check (ability|skill) (advantage|disadvantage) (difficulty_class or effortless|easy|medium|hard|impossible)"
text += "\n Rolls a d20 and compares the result (modified by the character's ability/skill) to the specified difficulty"
text += "\n#try (ability|skill) (advantage|disadvantage) (difficulty_value or effortless|easy|medium|hard|impossible) task"
text += "\n#try (ability|skill) (advantage|disadvantage) (difficulty_class or effortless|easy|medium|hard|impossible) task"
text += "\n Attempts to do the task based on the character's ability/skill against the specified difficulty."
text += "\n#attack (ranged) (advantage|disadvantage) (ac or effortless|easy|medium|hard|impossible) target"
text += "\n Attacks the specified target with a melee (the default) or ranged attack. The roll is compared against the specified AC which will determine if the attack succeeds or misses."
text += "\n#cast (advantage|disadvantage) (difficulty_value or effortless|easy|medium|hard|impossible) spell(target)"
text += "\n#cast (advantage|disadvantage) (difficulty_class or effortless|easy|medium|hard|impossible) spell(target)"
text += "\n Character will cast the indicated spell if the spell is in their spellbook. It will be a targeted spell if a target is indicated. The roll is modified by the spell casting ability of the character. You may type a phrase without quotes for spell such as \"cast fire bolt at the giant chicken\""
text += "\n\n--Abilities--"