From 8470d8fc9a4974b1d54caeb42425e90711af085a Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Mon, 11 Dec 2023 09:44:12 +0100 Subject: [PATCH] Fixed open doors check. Added more errata --- ADnD_2E_Revised/2ESheet.html | 15 +++++++++------ ADnD_2E_Revised/javascript/sheetWorkers.js | 10 ++++++---- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 5ffcd9943b51..195c320b3b08 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -45397,6 +45397,7 @@

Monster Sheet specific

'reference': 'p. 172', 'book': 'PHB', 'book-compendium': 'Wizard’s Spell Compendium Volume One p. 161', + 'errata': 'Sage Advice #266 p. 22', 'damage': '', 'damage-type': '', 'healing': '', @@ -45437,11 +45438,11 @@

Monster Sheet specific

'reference': 'p. 172', 'book': 'PHB', 'book-compendium': 'Wizard’s Spell Compendium Volume One p. 237', - 'errata': 'Sage Advice #213 p. 85\nSage Advice #245 p. 17', + 'errata': 'Dungeon Master Guide p. 161\nSage Advice #213 p. 85\nSage Advice #214 p. 78-79\nSage Advice #243 p. 22\nSage Advice #245 p. 17-18\nSage Advice #254 p. 24', 'damage': '', 'damage-type': '', 'healing': '', - 'effect': 'When the *detect magic* spell is cast, the wizard detects magical radiations in a path 10 feet wide and up to 60 feet long, in the direction he is facing. The intensity of the magic can be determined (dim, faint, moderate, strong, overwhelming), and the wizard has a 10% chance per level ([[{10*[[@{level-wizard}]],100}kl1]]%) to recognize if a certain type of magic (alteration, conjuration, etc.) is present. The caster can turn, scanning a 60-degree arc per round. A stone wall of 1 foot or more thickness, solid metal of 1 inch thickness, or a yard or more of solid wood blocks the spell. Magical areas, multiple types of magic, or strong local magical emanations may confuse or conceal weaker radiations. Note that this spell does not reveal the presence of good or evil, or reveal alignment. Otherplanar creatures are not necessarily magical.\n *Detect magic* can detect an invisible creature’s magical aura, but not pinpoint the invisible creature’s exact location. See *DUNGEON MASTER Guide* p. 161.\n Casting *detect magic* on a cursed item generally indicates the school of magic the cursed item is imitating, i.e. *dust of sneezing and choking* that imitates *dust of disappearance* would radiate illusion/phantasm magic. If the *dust* imitates *dust of appearance* it would radiate divination or abjuration magic.' + 'effect': 'When the *detect magic* spell is cast, the wizard detects magical radiations in a path 10 feet wide and up to 60 feet long, in the direction he is facing. The intensity of the magic can be determined (dim, faint, moderate, strong, overwhelming), and the wizard has a 10% chance per level ([[{10*[[@{level-wizard}]],100}kl1]]%) to recognize if a certain type of magic (alteration, conjuration, etc.) is present. The caster can turn, scanning a 60-degree arc per round. A stone wall of 1 foot or more thickness, solid metal of 1 inch thickness, a yard or more of solid wood, or a *wall of force* blocks the spell. Magical areas, multiple types of magic, or strong local magical emanations may confuse or conceal weaker radiations. Note that this spell does not reveal the presence of good or evil, or reveal alignment. Otherplanar creatures are not necessarily magical.\n *Detect magic* can detect an invisible creature’s magical aura, but not pinpoint the invisible creature’s exact location. See *DUNGEON MASTER Guide* p. 161.\n Casting *detect magic* on a cursed item generally indicates the school of magic the cursed item is imitating, i.e. *dust of sneezing and choking* that imitates *dust of disappearance* would radiate illusion/phantasm magic. If the *dust* imitates *dust of appearance* it would radiate divination or abjuration magic.' }; wiz1['Detect Undead'] = { @@ -70319,17 +70320,19 @@

Monster Sheet specific

on('clicked:opendoor-check', function (eventInfo){ getAttrs(['opendoor'], async function (values){ - let match = values.opendoor.match(/(\d+)\((\d+)\)/); let rollBuilder = new RollTemplateBuilder('2Echeck'); rollBuilder.push('character=@{character_name}','checkroll=[[1d20cs1cf20]]','color=blue','success=The door swings open!'); + + let match = values.opendoor.match(/(\d+)\((\d+)\)/); if (!match) { - rollBuilder.push('checkvs=Open Doors Check','checktarget=[[@{opendoor}]]','fail=The door stays shut, but you can try again.'); + rollBuilder.push('checkvs=Open Heavy/Stuck Doors Check','checktarget=[[@{opendoor}]]','fail=The door stays shut, but you can try again.'); return printRoll(rollBuilder.string()); } - let target = await extractQueryResult(`?{What kind of door?|Normal door,${match[1]}|Locked / Barred / Magical door,${match[2]}}`); + + let target = await extractQueryResult(`?{What kind of door?|Heavy / Stuck door,${match[1]}|Locked / Barred / Magical door,${match[2]}}`); rollBuilder.push(`checktarget=[[${target}]]`); if (target === match[1]) { - rollBuilder.push('checkvs=Open Normal Doors Check','fail=The door stays shut, but you can try again.'); + rollBuilder.push('checkvs=Open Heavy/Stuck Doors Check','fail=The door stays shut, but you can try again.'); } else { rollBuilder.push('checkvs=Open Locked/Barred/Magically Held Doors Check','fail=The door stays shut. No further attempts can be made by @{character_name}.'); } diff --git a/ADnD_2E_Revised/javascript/sheetWorkers.js b/ADnD_2E_Revised/javascript/sheetWorkers.js index a695fb1c71a7..bb4ae01fed3a 100644 --- a/ADnD_2E_Revised/javascript/sheetWorkers.js +++ b/ADnD_2E_Revised/javascript/sheetWorkers.js @@ -834,17 +834,19 @@ on('change:charisma change:leadership change:appearance', function() { on('clicked:opendoor-check', function (eventInfo){ getAttrs(['opendoor'], async function (values){ - let match = values.opendoor.match(/(\d+)\((\d+)\)/); let rollBuilder = new RollTemplateBuilder('2Echeck'); rollBuilder.push('character=@{character_name}','checkroll=[[1d20cs1cf20]]','color=blue','success=The door swings open!'); + + let match = values.opendoor.match(/(\d+)\((\d+)\)/); if (!match) { - rollBuilder.push('checkvs=Open Doors Check','checktarget=[[@{opendoor}]]','fail=The door stays shut, but you can try again.'); + rollBuilder.push('checkvs=Open Heavy/Stuck Doors Check','checktarget=[[@{opendoor}]]','fail=The door stays shut, but you can try again.'); return printRoll(rollBuilder.string()); } - let target = await extractQueryResult(`?{What kind of door?|Normal door,${match[1]}|Locked / Barred / Magical door,${match[2]}}`); + + let target = await extractQueryResult(`?{What kind of door?|Heavy / Stuck door,${match[1]}|Locked / Barred / Magical door,${match[2]}}`); rollBuilder.push(`checktarget=[[${target}]]`); if (target === match[1]) { - rollBuilder.push('checkvs=Open Normal Doors Check','fail=The door stays shut, but you can try again.'); + rollBuilder.push('checkvs=Open Heavy/Stuck Doors Check','fail=The door stays shut, but you can try again.'); } else { rollBuilder.push('checkvs=Open Locked/Barred/Magically Held Doors Check','fail=The door stays shut. No further attempts can be made by @{character_name}.'); }