mirror of
https://github.com/raeleus/Hashtag-DnD.git
synced 2025-07-04 20:50:27 -04:00
Fixed enemy spells showing the damage dice in the output text.
This commit is contained in:
parent
8db353f486
commit
226c82442b
2 changed files with 3 additions and 2 deletions
|
@ -376,9 +376,9 @@ function executeTurn(activeCharacter) {
|
|||
var diceMatches = spell.match(/(?<=^.*)\d*d\d+((\+|-)\d+)?$/gi)
|
||||
if (diceMatches == null) text += `${activeCharacterName} casts spell ${spell}!`
|
||||
else {
|
||||
var spell = spell.substring(0, spell.length - diceMatches[0].length)
|
||||
if (hit) {
|
||||
var damage = calculateRoll(diceMatches[0])
|
||||
var spell = spell.substring(0, spell.length - diceMatches[0].length)
|
||||
target.health = Math.max(target.health - damage, 0)
|
||||
|
||||
text += `\n[Character AC: ${target.ac} Attack roll: ${attack}]\n`
|
||||
|
@ -419,9 +419,9 @@ function executeTurn(activeCharacter) {
|
|||
var diceMatches = spell.match(/(?<=^.*)\d*d\d+((\+|-)\d+)?$/gi)
|
||||
if (diceMatches == null) text += `${activeCharacterName} casts spell ${spell}!`
|
||||
else {
|
||||
var spell = spell.substring(0, spell.length - diceMatches[0].length)
|
||||
if (hit) {
|
||||
var damage = calculateRoll(diceMatches[0])
|
||||
var spell = spell.substring(0, spell.length - diceMatches[0].length)
|
||||
target.health = Math.max(target.health - damage, 0)
|
||||
|
||||
text += `\n[Character AC: ${target.ac} Attack roll: ${attack}]\n`
|
||||
|
|
|
@ -21,6 +21,7 @@ Hashtag-DnD has another new scenario! Check out the [VTOL-Knights Repository](ht
|
|||
|
||||
v.0.7.0
|
||||
* Added allies which are NPC characters that fight alongside the characters in encounters
|
||||
* Fixed enemy spells showing the damage dice in the output text.
|
||||
|
||||
v. 0.6.0
|
||||
* Added Memory/Matchmaking Game
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue