Skip to content

Commit

Permalink
Fixed open doors check. Added more errata
Browse files Browse the repository at this point in the history
  • Loading branch information
DBFBlackbull committed Dec 11, 2023
1 parent 5543693 commit 8470d8f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 10 deletions.
15 changes: 9 additions & 6 deletions ADnD_2E_Revised/2ESheet.html
Original file line number Diff line number Diff line change
Expand Up @@ -45397,6 +45397,7 @@ <h2>Monster Sheet specific</h2>
'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': '',
Expand Down Expand Up @@ -45437,11 +45438,11 @@ <h2>Monster Sheet specific</h2>
'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&emsp;*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&emsp;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&emsp;*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&emsp;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'] = {
Expand Down Expand Up @@ -70319,17 +70320,19 @@ <h2>Monster Sheet specific</h2>

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}.');
}
Expand Down
10 changes: 6 additions & 4 deletions ADnD_2E_Revised/javascript/sheetWorkers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}.');
}
Expand Down

0 comments on commit 8470d8f

Please sign in to comment.