From 4d599cb912967ed45430677b3249de1efbcab17a Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Mon, 9 Jan 2023 21:28:49 +0100 Subject: [PATCH 01/58] WIP for new spells --- ADnD_2E_Revised/2ESheet.html | 173 +++++++++--------- .../html/shared/new-spell-template.html | 84 +++++++++ ADnD_2E_Revised/html/tabs/monster-tab.html | 2 +- ADnD_2E_Revised/pug/spellsTemplate.pug | 98 ++++++++++ 4 files changed, 267 insertions(+), 90 deletions(-) create mode 100644 ADnD_2E_Revised/html/shared/new-spell-template.html create mode 100644 ADnD_2E_Revised/pug/spellsTemplate.pug diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 9d4c870033..4257454852 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -19188,95 +19188,90 @@ -
-
-
- - - - - - - - -
Spell name: - - - Casting time:
- - - - - -
Cast / Memorized: /
- - - - - -
Spell Points / Arc Used: /
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Level:School:Components:
Range:Area of Effect:Duration:
Damage:Damage type:Saving throw:
Healing:Materials:Book reference:
Subtlety:Sensory:Knockdown:
Critical:
- - - - - -
- -
- -
-
-
-
-
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Spell nameRangeArea of
effect
Casting timeMacro
+ + + + + + + + + + + +
CastMemorized
/
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SchoolSphere
DurationSaving Throw
SubtletySensory
KnockdownCritical
DamageDamage Type
Healing
Reference
Materials
+

diff --git a/ADnD_2E_Revised/html/shared/new-spell-template.html b/ADnD_2E_Revised/html/shared/new-spell-template.html new file mode 100644 index 0000000000..73dd926e67 --- /dev/null +++ b/ADnD_2E_Revised/html/shared/new-spell-template.html @@ -0,0 +1,84 @@ +
+
+ + + + + + + + + + + + + + + + + + + + + + + +
Spell nameRangeArea of
effect
Casting timeMacro
+ + + + + + + + + + + +
CastMemorized
/
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
SchoolSphere
DurationSaving Throw
SubtletySensory
KnockdownCritical
DamageDamage Type
Healing
Reference
Materials
+
\ No newline at end of file diff --git a/ADnD_2E_Revised/html/tabs/monster-tab.html b/ADnD_2E_Revised/html/tabs/monster-tab.html index 7fe47831c6..f17f67d982 100644 --- a/ADnD_2E_Revised/html/tabs/monster-tab.html +++ b/ADnD_2E_Revised/html/tabs/monster-tab.html @@ -196,7 +196,7 @@ - insert_wizard-spell-template.html_(wizmonster,@{wtype} ) + insert_new-spell-template.html
diff --git a/ADnD_2E_Revised/pug/spellsTemplate.pug b/ADnD_2E_Revised/pug/spellsTemplate.pug new file mode 100644 index 0000000000..9260895175 --- /dev/null +++ b/ADnD_2E_Revised/pug/spellsTemplate.pug @@ -0,0 +1,98 @@ +div(class="sheet-flex-wrap") + fieldset(name="repeating_spells-#REPLACE0#" class="repeating_spells-#REPLACE0#") + div + table + tr + td(class="sheet-default-header") Spell name: + td + input(type="text" name="spell-name" title="@{repeating_spells-#REPLACE0#_$X_spell-name}" class="sheet-spell-big sheet-chrome" placeholder="Spell name" list="#REPLACE0#-spells") + input(type="text" name="spell-name" title="@{repeating_spells-#REPLACE0#_$X_spell-name}" class="sheet-spell-big sheet-firefox" placeholder="Spell name" list="#REPLACE0#-spells-ff") + td(class="sheet-default-header") Casting time: + td + input(type="text" name="attr_spell-cast-time" title="@{repeating_spells-#REPLACE0#_$X_spell-cast-time}" class="sheet-short" placeholder="Cast time") + td + button(type="roll" name="roll_spell-init" title="@{repeating_spells-#REPLACE0#_$X_spell-init}" value="/gmroll [[{([[1d10]]+@{spell-cast-time}-(@{misc-mod})), 1}kh1]] [Initiative (@{spell-name})]&{tracker}") Initiative + table(class="sheet-default-header-first-column sheet-inline-5") + tr + td Cast / Memorized: + td + input(type="number" name="attr_spell-cast-value" title="@{repeating_spells-#REPLACE0#_$X_spell-cast-value}" value="0" class="sheet-short") + b / + input(type="number" name="attr_spell-memorized" title="@{repeating_spells-#REPLACE0#_$X_spell-memorized}" value="0" class="sheet-short") + table + tr + td Spell Points / Wind Used: + td + input(type="number" name="attr_spell-points" title="@{repeating_spells-#REPLACE0#_$X_spell-points}" class="sheet-short" value="0") + b / + input(type="number" name="attr_spell-wind" title="@{repeating_spells-#REPLACE0#_$X_spell-wind}" class="sheet-short" value="0") + input(type="checkbox" class="sheet-show-spell-details sheet-show-spell-hack" title="Show spell details") + span(class="sheet-show-spell-hack") + label(class="sheet-show-spell-hack") Show spell details + table(class="sheet-default-header-odd-column sheet-spell-details") + tr + td Sphere: + td + input(type="text" name="attr_spell-sphere" title="@{repeating_spells-#REPLACE0#_$X_spell-sphere}" class="sheet-spell-half" placeholder="Sphere") + input(style="display:none;" type="text" name="attr_spell-level" title="@{repeating_spells-#REPLACE0#_$X_spell-level}" class="sheet-spell-half" placeholder="Spell level") + td School: + td + input(type="text" name="attr_spell-school" title="@{repeating_spells-#REPLACE0#_$X_spell-school}" class="sheet-spell-half" placeholder="School") + td Components: + td + input(type="text" name="attr_spell-components" title="@{repeating_spells-#REPLACE0#_$X_spell-components}" class="sheet-spell-half" placeholder="Components") + tr + td Range: + td + input(type="text" name="attr_spell-range" title="@{repeating_spells-#REPLACE0#_$X_spell-range}" class="sheet-spell-half" placeholder="Range") + td Area of Effect: + td + input(type="text" name="attr_spell-aoe" title="@{repeating_spells-#REPLACE0#_$X_spell-aoe}" class="sheet-spell-half" placeholder="Area of Effect") + td Duration: + td + input(type="text" name="attr_spell-duration" title="@{repeating_spells-#REPLACE0#_$X_spell-duration}" class="sheet-spell-half" placeholder="Duration") + tr + td Damage: + td + textarea(type="text" name="attr_spell-damage" title="@{repeating_spells-#REPLACE0#_$X_spell-damage}" class="sheet-spell-half sheet-input-like" placeholder="[[Damage]]") + td Damage type: + td + input(type="text" name="attr_spell-damage-type" title="@{repeating_spells-#REPLACE0#_$X_spell-damage-type}" class="sheet-spell-half" placeholder="Damage type" list="spell-damage-type") + td Saving throw: + td + input(type="text" name="attr_spell-saving-throw" title="@{repeating_spells-#REPLACE0#_$X_spell-saving-throw}" class="sheet-spell-half" placeholder="Saving Throw") + tr + td Healing: + td + textarea(type="text" name="attr_spell-healing" title="@{repeating_spells-#REPLACE0#_$X_spell-healing}" class="sheet-spell-half sheet-input-like" placeholder="[[Healing]]") + td Materials: + td + textarea(type="text" name="attr_spell-materials" title="@{repeating_spells-#REPLACE0#_$X_spell-materials}" class="sheet-spell-half sheet-input-like" placeholder="Materials") + td Book reference: + td + input(type="text" name="attr_spell-reference" title="@{repeating_spells-#REPLACE0#_$X_spell-reference}" class="sheet-spell-half" placeholder="Book Reference") + tr + td Subtlety: + td + input(type="text" name="attr_spell-subtlety" title="@{repeating_spells-#REPLACE0#_$X_spell-subtlety}" class="sheet-spell-half" placeholder="Subtlety") + td Sensory: + td + input(type="text" name="attr_spell-sensory" title="@{repeating_spells-#REPLACE0#_$X_spell-sensory}" class="sheet-spell-half" placeholder="Sensory") + td Knockdown: + td + input(type="text" name="attr_spell-knockdown" title="@{repeating_spells-#REPLACE0#_$X_spell-knockdown}" class="sheet-spell-half" placeholder="[[d6]]") + tr + td Critical: + td + input(type="text" name="attr_spell-crit-size" title="@{repeating_spells-#REPLACE0#_$X_spell-crit-size}" class="sheet-spell-half" placeholder="Large (1d3 hits)" list="spell-crit-size") + td(colspan="2" style="background: transparent") + button(type="action" name="act_spell-crit2" class="btn sheet-action-button" title="%{repeating_spells-#REPLACE0#_$X_spell-crit2}") Critical Effect + table(class="sheet-spell-effect") + tr + td(style="width: 100%") + textarea(name="attr_spell-effect" title="@{repeating_spells-#REPLACE0#_$X_spell-effect}" placeholder="Insert Spell effects." style="margin: 0; height: 60px") + td + button(type="roll" name="roll_spell-cast" title="%{repeating_spells-#REPLACE0#_$X_spell-cast}" value="#REPLACE1#@{spell-effect}" style="margin-bottom: 5px") Roll Spell Effects + br + button(type="roll" name="roll_spell-template" title="%{repeating_spells-#REPLACE0#_$X_spell-template}" value="#REPLACE1#&{template:2Espell}{{title=@{spell-name}}}{{splevel=@{spell-level}}}{{school=@{spell-school}}}{{sphere=@{spell-sphere}}}{{components=@{spell-components}}}{{time=@{spell-cast-time}}}{{range=@{spell-range}}}{{duration=@{spell-duration}}}{{aoe=@{spell-aoe}}}{{save=@{spell-saving-throw}}}{{subtlety=@{spell-subtlety}}}{{sensory=@{spell-sensory}}}{{knockdown=@{spell-knockdown}}}{{crit=@{spell-crit-size}}}{{damage=@{spell-damage}}}{{damagetype=@{spell-damage-type}}}{{healing=@{spell-healing}}}{{reference=@{spell-reference}}}{{materials=@{spell-materials}}}{{checkroll=[[1d100]]%}}{{checktarget=#REPLACE2#}}{{fail=The spell is expended with absolutely no effect whatsoever.}}{{effects=@{spell-effect}}}") Roll Template + hr \ No newline at end of file From c1e9fb112ff6cf14f10907eee684eafa664b24cd Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Wed, 18 Jan 2023 12:54:49 +0100 Subject: [PATCH 02/58] Improved styling of textarea for holding spell effect --- ADnD_2E_Revised/2ESheet.html | 121 +++++++++--------- ADnD_2E_Revised/2EStyle.css | 17 +++ ADnD_2E_Revised/css/2EStyle-base.css | 17 +++ .../html/shared/new-spell-template.html | 121 +++++++++--------- 4 files changed, 158 insertions(+), 118 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index baaf76dbdc..5c7d0737c6 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -19193,34 +19193,34 @@ -
-
- +
+
+
- - - - + + + + - - - - - - + + + + + +
Spell name RangeArea of
effect
Area of effect Casting time Macro
- - +
+ @@ -19232,50 +19232,53 @@
Cast Memorized
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SchoolSphere
DurationSaving Throw
SubtletySensory
KnockdownCritical
DamageDamage Type
Healing
Reference
Materials
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
School:Sphere:
Duration:Saving Throw:
Subtlety:Sensory:
Knockdown:Critical:
Damage:Damage Type:
Healing:
Reference:
Materials:
+ +

diff --git a/ADnD_2E_Revised/2EStyle.css b/ADnD_2E_Revised/2EStyle.css index a1ad9b7db1..cba60cc68f 100644 --- a/ADnD_2E_Revised/2EStyle.css +++ b/ADnD_2E_Revised/2EStyle.css @@ -205,6 +205,16 @@ textarea { min-width: 90%; } +.charsheet th.sheet-td-dynamic20, +.charsheet td.sheet-td-dynamic20 { + width: 20%; +} + +.charsheet th.sheet-td-dynamic25, +.charsheet td.sheet-td-dynamic25 { + width: 25%; +} + .charsheet th.sheet-td-dynamic30, .charsheet td.sheet-td-dynamic30 { width: 30%; @@ -215,6 +225,11 @@ textarea { width: 50%; } +.charsheet th.sheet-td-dynamic60, +.charsheet td.sheet-td-dynamic60 { + width: 60%; +} + .charsheet th.sheet-td-dynamic70, .charsheet td.sheet-td-dynamic70 { width: 70%; @@ -1584,7 +1599,9 @@ table.sheet-default-header-every-third-row tr:nth-child(3n+1), table.sheet-default-header-first-column td:first-child, table.sheet-default-header-first-column th:first-child, table.sheet-default-header-even-column td:nth-child(even), +table.sheet-default-header-even-column th:nth-child(even), table.sheet-default-header-odd-column td:nth-child(odd), +table.sheet-default-header-odd-column th:nth-child(odd), table.sheet-default-header-every-third-column td:nth-child(3n+1), .sheet-default-header { background-color: #7C0303; diff --git a/ADnD_2E_Revised/css/2EStyle-base.css b/ADnD_2E_Revised/css/2EStyle-base.css index 2c1a0a9221..e17f179336 100644 --- a/ADnD_2E_Revised/css/2EStyle-base.css +++ b/ADnD_2E_Revised/css/2EStyle-base.css @@ -205,6 +205,16 @@ textarea { min-width: 90%; } +.charsheet th.sheet-td-dynamic20, +.charsheet td.sheet-td-dynamic20 { + width: 20%; +} + +.charsheet th.sheet-td-dynamic25, +.charsheet td.sheet-td-dynamic25 { + width: 25%; +} + .charsheet th.sheet-td-dynamic30, .charsheet td.sheet-td-dynamic30 { width: 30%; @@ -215,6 +225,11 @@ textarea { width: 50%; } +.charsheet th.sheet-td-dynamic60, +.charsheet td.sheet-td-dynamic60 { + width: 60%; +} + .charsheet th.sheet-td-dynamic70, .charsheet td.sheet-td-dynamic70 { width: 70%; @@ -890,7 +905,9 @@ table.sheet-default-header-every-third-row tr:nth-child(3n+1), table.sheet-default-header-first-column td:first-child, table.sheet-default-header-first-column th:first-child, table.sheet-default-header-even-column td:nth-child(even), +table.sheet-default-header-even-column th:nth-child(even), table.sheet-default-header-odd-column td:nth-child(odd), +table.sheet-default-header-odd-column th:nth-child(odd), table.sheet-default-header-every-third-column td:nth-child(3n+1), .sheet-default-header { background-color: #7C0303; diff --git a/ADnD_2E_Revised/html/shared/new-spell-template.html b/ADnD_2E_Revised/html/shared/new-spell-template.html index 73dd926e67..75b93f70c8 100644 --- a/ADnD_2E_Revised/html/shared/new-spell-template.html +++ b/ADnD_2E_Revised/html/shared/new-spell-template.html @@ -1,31 +1,31 @@ -
-
- +
+
+
- - - - + + + + - - - - - - + + + + + +
Spell name RangeArea of
effect
Area of effect Casting time Macro
- - +
+ @@ -37,48 +37,51 @@
Cast Memorized
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
SchoolSphere
DurationSaving Throw
SubtletySensory
KnockdownCritical
DamageDamage Type
Healing
Reference
Materials
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
School:Sphere:
Duration:Saving Throw:
Subtlety:Sensory:
Knockdown:Critical:
Damage:Damage Type:
Healing:
Reference:
Materials:
+ +
\ No newline at end of file From d8b006ce13fd8b167fd6dcb25d250ae5b3baf91c Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Wed, 18 Jan 2023 13:19:00 +0100 Subject: [PATCH 03/58] Added resize vertical to avoid textarea becoming slimmer --- ADnD_2E_Revised/2ESheet.html | 2 +- ADnD_2E_Revised/html/shared/new-spell-template.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 5c7d0737c6..ea49c212fc 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -19277,7 +19277,7 @@ - +
diff --git a/ADnD_2E_Revised/html/shared/new-spell-template.html b/ADnD_2E_Revised/html/shared/new-spell-template.html index 75b93f70c8..ecf0193c6a 100644 --- a/ADnD_2E_Revised/html/shared/new-spell-template.html +++ b/ADnD_2E_Revised/html/shared/new-spell-template.html @@ -82,6 +82,6 @@ - + \ No newline at end of file From 988f23afbe91b5292fd964909c89c95f721cd0bf Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Sun, 22 Jan 2023 19:33:20 +0100 Subject: [PATCH 04/58] Knockdown and sensory signature changed places to reflect their placement in the source book --- ADnD_2E_Revised/2ESheet.html | 57 ++++++++++--------- .../html/components/rolltemplates.html | 46 +++++++-------- .../html/shared/new-spell-template.html | 11 +++- 3 files changed, 62 insertions(+), 52 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index ea49c212fc..3292ec9904 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -19243,20 +19243,25 @@ Duration: - Saving Throw: + Components: Subtlety: - Sensory: + Saving Throw: + Sensory: + Knockdown: + + Critical: + Damage: @@ -19277,7 +19282,7 @@ - +
@@ -29266,49 +29271,49 @@ Saving Throw
{{save}} {{#subtlety}} - {{#sensory}} + {{#knockdown}} Casting Subtlety
{{subtlety}} - Sensory Signature
{{sensory}} + Knockdown
{{knockdown}} - {{/sensory}} + {{/knockdown}} {{/subtlety}} {{#subtlety}} - {{^sensory}} + {{^knockdown}} Casting Subtlety
{{subtlety}} - {{/sensory}} + {{/knockdown}} {{/subtlety}} {{^subtlety}} - {{#sensory}} - - Sensory Signature
{{sensory}} - - {{/sensory}} - {{/subtlety}} {{#knockdown}} - {{#crit}} - - Knockdown
{{knockdown}} - Critical Strikes
{{crit}} - - {{/crit}} - {{/knockdown}} - {{#knockdown}} - {{^crit}} Knockdown
{{knockdown}} - {{/crit}} {{/knockdown}} - {{^knockdown}} + {{/subtlety}} + {{#sensory}} + {{#crit}} + + Sensory Signature
{{sensory}} + Critical Strikes
{{crit}} + + {{/crit}} + {{/sensory}} + {{#sensory}} + {{^crit}} + + Sensory Signature
{{sensory}} + + {{/crit}} + {{/sensory}} + {{^sensory}} {{#crit}} Critical Strikes
{{crit}} {{/crit}} - {{/knockdown}} + {{/sensory}} {{#damage}} Damage: diff --git a/ADnD_2E_Revised/html/components/rolltemplates.html b/ADnD_2E_Revised/html/components/rolltemplates.html index 129c3913a5..690ace0091 100644 --- a/ADnD_2E_Revised/html/components/rolltemplates.html +++ b/ADnD_2E_Revised/html/components/rolltemplates.html @@ -138,49 +138,49 @@ Saving Throw
{{save}} {{#subtlety}} - {{#sensory}} + {{#knockdown}} Casting Subtlety
{{subtlety}} - Sensory Signature
{{sensory}} + Knockdown
{{knockdown}} - {{/sensory}} + {{/knockdown}} {{/subtlety}} {{#subtlety}} - {{^sensory}} + {{^knockdown}} Casting Subtlety
{{subtlety}} - {{/sensory}} + {{/knockdown}} {{/subtlety}} {{^subtlety}} - {{#sensory}} - - Sensory Signature
{{sensory}} - - {{/sensory}} - {{/subtlety}} {{#knockdown}} - {{#crit}} - - Knockdown
{{knockdown}} - Critical Strikes
{{crit}} - - {{/crit}} - {{/knockdown}} - {{#knockdown}} - {{^crit}} Knockdown
{{knockdown}} - {{/crit}} {{/knockdown}} - {{^knockdown}} + {{/subtlety}} + {{#sensory}} + {{#crit}} + + Sensory Signature
{{sensory}} + Critical Strikes
{{crit}} + + {{/crit}} + {{/sensory}} + {{#sensory}} + {{^crit}} + + Sensory Signature
{{sensory}} + + {{/crit}} + {{/sensory}} + {{^sensory}} {{#crit}} Critical Strikes
{{crit}} {{/crit}} - {{/knockdown}} + {{/sensory}} {{#damage}} Damage: diff --git a/ADnD_2E_Revised/html/shared/new-spell-template.html b/ADnD_2E_Revised/html/shared/new-spell-template.html index ecf0193c6a..ac516d54ce 100644 --- a/ADnD_2E_Revised/html/shared/new-spell-template.html +++ b/ADnD_2E_Revised/html/shared/new-spell-template.html @@ -48,20 +48,25 @@ Duration: - Saving Throw: + Components: Subtlety: - Sensory: + Saving Throw: + Sensory: + Knockdown: + + Critical: + Damage: @@ -82,6 +87,6 @@ - + \ No newline at end of file From e1dd34f8ce42b8510e4134810e5210269ce42baf Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Sun, 22 Jan 2023 19:34:47 +0100 Subject: [PATCH 05/58] Updated changelog --- ADnD_2E_Revised/2ESheet.html | 5 +---- ADnD_2E_Revised/html/changelog.html | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 3292ec9904..0356b7a751 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -11,10 +11,7 @@
  • Fixed autofill for simple magic weapons where the bonus is inserted in a spot without a whitespace. Here are some examples that have been fixed:
      -
    • "Short bow, Flight Arrow" -> "Short bow +1, Flight Arrow"
    • -
    • "Bastard sword, One-handed" -> "Bastard sword +2, One-handed"
    • -
    • "Katana, One-handed (samurai long sword)" -> "Katana +1, One-handed (samurai long sword)"
    • -
    • "Sling, Bullet" -> "Sling +1, Bullet"
    • +
    • 2Espell - Sensory signature and Knockdown switched places to make them appear in the same order as in the PO: Spells & Magic book
diff --git a/ADnD_2E_Revised/html/changelog.html b/ADnD_2E_Revised/html/changelog.html index 137826fec8..2821603319 100644 --- a/ADnD_2E_Revised/html/changelog.html +++ b/ADnD_2E_Revised/html/changelog.html @@ -6,10 +6,7 @@
  • Fixed autofill for simple magic weapons where the bonus is inserted in a spot without a whitespace. Here are some examples that have been fixed:
      -
    • "Short bow, Flight Arrow" -> "Short bow +1, Flight Arrow"
    • -
    • "Bastard sword, One-handed" -> "Bastard sword +2, One-handed"
    • -
    • "Katana, One-handed (samurai long sword)" -> "Katana +1, One-handed (samurai long sword)"
    • -
    • "Sling, Bullet" -> "Sling +1, Bullet"
    • +
    • 2Espell - Sensory signature and Knockdown switched places to make them appear in the same order as in the PO: Spells & Magic book
From b62d3c3541e3b7e4685b2084bf23153ca1a4fa11 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Sun, 22 Jan 2023 22:03:53 +0100 Subject: [PATCH 06/58] - Added actual fields to slim spells - Added button logic for show hide - Testing design for layout of fields --- ADnD_2E_Revised/2ESheet.html | 135 ++++++++--------- .../html/shared/new-spell-template.html | 136 +++++++++--------- ADnD_2E_Revised/html/tabs/monster-tab.html | 2 +- ADnD_2E_Revised/javascript/sheetWorkers.js | 1 + 4 files changed, 142 insertions(+), 132 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 0356b7a751..6af5603da9 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -19197,22 +19197,19 @@ Spell name Range Area of effect - - - Casting time Macro - - - - - - - - - + + + + + + + + + @@ -19223,63 +19220,70 @@ Memorized - + / - + -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
School:Sphere:
Duration:Components:
Subtlety:Saving Throw:
Sensory:Knockdown:
Critical:
Damage:Damage Type:
Healing:
Reference:
Materials:
- +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level:Sphere:
School:Components:
Duration:Saving Throw:
Subtlety:Knockdown:
Sensory:Critical:
Damage:Damage Type:
Healing:
Reference:
Materials:
+ +

@@ -69617,6 +69621,7 @@ PSIONIC_CORE_SECTIONS.forEach(({section, name, macro, number, cost_number, disci const REPEATING_SECTIONS = [ ...PSIONIC_CORE_SECTIONS.map(e => e.section), 'scrolls', + 'spells-wizmonster', ]; REPEATING_SECTIONS.forEach(section => { on(`clicked:repeating_${section}:show clicked:repeating_${section}:hide`, function (eventInfo) { diff --git a/ADnD_2E_Revised/html/shared/new-spell-template.html b/ADnD_2E_Revised/html/shared/new-spell-template.html index ac516d54ce..a44216b7fc 100644 --- a/ADnD_2E_Revised/html/shared/new-spell-template.html +++ b/ADnD_2E_Revised/html/shared/new-spell-template.html @@ -1,26 +1,23 @@ -
+
- - - - - - - - - - - - + + + + + +
Spell name Range Area of effect Casting time Macro
+ + +
@@ -31,62 +28,69 @@ Memorized - + / - +
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
School:Sphere:
Duration:Components:
Subtlety:Saving Throw:
Sensory:Knockdown:
Critical:
Damage:Damage Type:
Healing:
Reference:
Materials:
- +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level:Sphere:
School:Components:
Duration:Saving Throw:
Subtlety:Knockdown:
Sensory:Critical:
Damage:Damage Type:
Healing:
Reference:
Materials:
+ +
\ No newline at end of file diff --git a/ADnD_2E_Revised/html/tabs/monster-tab.html b/ADnD_2E_Revised/html/tabs/monster-tab.html index f17f67d982..346e2ab891 100644 --- a/ADnD_2E_Revised/html/tabs/monster-tab.html +++ b/ADnD_2E_Revised/html/tabs/monster-tab.html @@ -196,7 +196,7 @@ - insert_new-spell-template.html + insert_new-spell-template.html_(wizmonster,@{wtype} )
diff --git a/ADnD_2E_Revised/javascript/sheetWorkers.js b/ADnD_2E_Revised/javascript/sheetWorkers.js index 9dd33bedaf..10972c14c9 100644 --- a/ADnD_2E_Revised/javascript/sheetWorkers.js +++ b/ADnD_2E_Revised/javascript/sheetWorkers.js @@ -2884,6 +2884,7 @@ PSIONIC_CORE_SECTIONS.forEach(({section, name, macro, number, cost_number, disci const REPEATING_SECTIONS = [ ...PSIONIC_CORE_SECTIONS.map(e => e.section), 'scrolls', + 'spells-wizmonster', ]; REPEATING_SECTIONS.forEach(section => { on(`clicked:repeating_${section}:show clicked:repeating_${section}:hide`, function (eventInfo) { From 3c7618bcaf4e54c9f485a7bc9a6a574826192625 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Mon, 23 Jan 2023 08:31:42 +0100 Subject: [PATCH 07/58] Removed level function as a parameter, and just references it directly instead --- ADnD_2E_Revised/2ESheet.html | 14 ++++++++------ ADnD_2E_Revised/javascript/sheetWorkers.js | 14 ++++++++------ 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 6af5603da9..1d91b81258 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -67901,7 +67901,7 @@ function setupSpellSlotsReset(buttonName, tab, spellLevels, allSections) { //#endregion //#region Wizard and Priest spells and Powers setup -function setupAutoFillSpellInfo(section, spellsTable, levelFunc, optionalRulesFields) { +function setupAutoFillSpellInfo(section, spellsTable, optionalRulesFields) { if (!spellsTable[section]) return; @@ -67920,7 +67920,7 @@ function setupAutoFillSpellInfo(section, spellsTable, levelFunc, optionalRulesFi let spellInfo = { [`repeating_spells-${section}_spell-cast-time`] : spell['cast-time'], - [`repeating_spells-${section}_spell-level`] : levelFunc(spell['level'], className), + [`repeating_spells-${section}_spell-level`] : displaySpellLevel(spell['level'], className), [`repeating_spells-${section}_spell-school`] : getSpellSchools(spell, books), [`repeating_spells-${section}_spell-components`] : spell['components'], [`repeating_spells-${section}_spell-range`] : spell['range'], @@ -67940,6 +67940,8 @@ function setupAutoFillSpellInfo(section, spellsTable, levelFunc, optionalRulesFi [`repeating_spells-${section}_spell-effect`] : spell['effect'] }; + + if (isPriest) { let sphereRules = getActiveSettings(SPHERE_FIELDS, books); spellInfo[`repeating_spells-${section}_spell-sphere`] = getSpellSpheres(spell, sphereRules); @@ -68003,11 +68005,11 @@ wizardSpellLevelsSections.forEach(spellLevel => { // Auto set spell info function let lastSection = spellLevel.sections[spellLevel.sections.length - 1]; if (isNewSpellSection(lastSection)) { - setupAutoFillSpellInfo(lastSection, wizardSpells, displaySpellLevel, SCHOOL_FIELDS); + setupAutoFillSpellInfo(lastSection, wizardSpells, SCHOOL_FIELDS); setupSpellCrit(lastSection); } }); -setupAutoFillSpellInfo('wizmonster', wizardSpells, displaySpellLevel, SCHOOL_FIELDS); +setupAutoFillSpellInfo('wizmonster', wizardSpells, SCHOOL_FIELDS); setupSpellCrit('wizmonster'); priestSpellLevelsSections.forEach(spellLevel => { @@ -68021,14 +68023,14 @@ priestSpellLevelsSections.forEach(spellLevel => { // Auto set spell info function let lastSection = spellLevel.sections[spellLevel.sections.length - 1]; if (isNewSpellSection(lastSection)) { - setupAutoFillSpellInfo(lastSection, priestSpells, displaySpellLevel, SPHERE_FIELDS); + setupAutoFillSpellInfo(lastSection, priestSpells, SPHERE_FIELDS); setupSpellCrit(lastSection); if (lastSection !== 'priq') { setupAddPriestSpell(lastSection); } } }); -setupAutoFillSpellInfo('primonster', priestSpells, displaySpellLevel, SPHERE_FIELDS); +setupAutoFillSpellInfo('primonster', priestSpells, SPHERE_FIELDS); setupSpellCrit('primonster'); // --- End setup Spell Slots --- // diff --git a/ADnD_2E_Revised/javascript/sheetWorkers.js b/ADnD_2E_Revised/javascript/sheetWorkers.js index 10972c14c9..a849c1509d 100644 --- a/ADnD_2E_Revised/javascript/sheetWorkers.js +++ b/ADnD_2E_Revised/javascript/sheetWorkers.js @@ -1164,7 +1164,7 @@ function setupSpellSlotsReset(buttonName, tab, spellLevels, allSections) { //#endregion //#region Wizard and Priest spells and Powers setup -function setupAutoFillSpellInfo(section, spellsTable, levelFunc, optionalRulesFields) { +function setupAutoFillSpellInfo(section, spellsTable, optionalRulesFields) { if (!spellsTable[section]) return; @@ -1183,7 +1183,7 @@ function setupAutoFillSpellInfo(section, spellsTable, levelFunc, optionalRulesFi let spellInfo = { [`repeating_spells-${section}_spell-cast-time`] : spell['cast-time'], - [`repeating_spells-${section}_spell-level`] : levelFunc(spell['level'], className), + [`repeating_spells-${section}_spell-level`] : displaySpellLevel(spell['level'], className), [`repeating_spells-${section}_spell-school`] : getSpellSchools(spell, books), [`repeating_spells-${section}_spell-components`] : spell['components'], [`repeating_spells-${section}_spell-range`] : spell['range'], @@ -1203,6 +1203,8 @@ function setupAutoFillSpellInfo(section, spellsTable, levelFunc, optionalRulesFi [`repeating_spells-${section}_spell-effect`] : spell['effect'] }; + + if (isPriest) { let sphereRules = getActiveSettings(SPHERE_FIELDS, books); spellInfo[`repeating_spells-${section}_spell-sphere`] = getSpellSpheres(spell, sphereRules); @@ -1266,11 +1268,11 @@ wizardSpellLevelsSections.forEach(spellLevel => { // Auto set spell info function let lastSection = spellLevel.sections[spellLevel.sections.length - 1]; if (isNewSpellSection(lastSection)) { - setupAutoFillSpellInfo(lastSection, wizardSpells, displaySpellLevel, SCHOOL_FIELDS); + setupAutoFillSpellInfo(lastSection, wizardSpells, SCHOOL_FIELDS); setupSpellCrit(lastSection); } }); -setupAutoFillSpellInfo('wizmonster', wizardSpells, displaySpellLevel, SCHOOL_FIELDS); +setupAutoFillSpellInfo('wizmonster', wizardSpells, SCHOOL_FIELDS); setupSpellCrit('wizmonster'); priestSpellLevelsSections.forEach(spellLevel => { @@ -1284,14 +1286,14 @@ priestSpellLevelsSections.forEach(spellLevel => { // Auto set spell info function let lastSection = spellLevel.sections[spellLevel.sections.length - 1]; if (isNewSpellSection(lastSection)) { - setupAutoFillSpellInfo(lastSection, priestSpells, displaySpellLevel, SPHERE_FIELDS); + setupAutoFillSpellInfo(lastSection, priestSpells, SPHERE_FIELDS); setupSpellCrit(lastSection); if (lastSection !== 'priq') { setupAddPriestSpell(lastSection); } } }); -setupAutoFillSpellInfo('primonster', priestSpells, displaySpellLevel, SPHERE_FIELDS); +setupAutoFillSpellInfo('primonster', priestSpells, SPHERE_FIELDS); setupSpellCrit('primonster'); // --- End setup Spell Slots --- // From ae9cff87f00f5ca185b63177b465d14e0d21963a Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Thu, 9 Feb 2023 10:10:49 +0100 Subject: [PATCH 08/58] Tweaked design for single line spells --- ADnD_2E_Revised/2ESheet.html | 22 +++++++++++-------- .../html/shared/new-spell-template.html | 20 +++++++++++------ ADnD_2E_Revised/javascript/sheetWorkers.js | 2 -- 3 files changed, 26 insertions(+), 18 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 1d91b81258..89984d5ce8 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -19196,7 +19196,7 @@ Spell name Range - Area of effect + Area of Effect Casting time Macro @@ -19232,18 +19232,24 @@ Level: - Sphere: - - - School: - Components: - Duration: + Sphere: + + + + Range: + + Components: + + + + Area of Effect: + Saving Throw: @@ -67940,8 +67946,6 @@ function setupAutoFillSpellInfo(section, spellsTable, optionalRulesFields) { [`repeating_spells-${section}_spell-effect`] : spell['effect'] }; - - if (isPriest) { let sphereRules = getActiveSettings(SPHERE_FIELDS, books); spellInfo[`repeating_spells-${section}_spell-sphere`] = getSpellSpheres(spell, sphereRules); diff --git a/ADnD_2E_Revised/html/shared/new-spell-template.html b/ADnD_2E_Revised/html/shared/new-spell-template.html index a44216b7fc..f20ad7456b 100644 --- a/ADnD_2E_Revised/html/shared/new-spell-template.html +++ b/ADnD_2E_Revised/html/shared/new-spell-template.html @@ -4,7 +4,7 @@ Spell name Range - Area of effect + Area of Effect Casting time Macro @@ -40,18 +40,24 @@ Level: - Sphere: - - - School: - Components: - Duration: + Sphere: + + + + Range: + + Components: + + + + Area of Effect: + Saving Throw: diff --git a/ADnD_2E_Revised/javascript/sheetWorkers.js b/ADnD_2E_Revised/javascript/sheetWorkers.js index a849c1509d..fc4d4de6b3 100644 --- a/ADnD_2E_Revised/javascript/sheetWorkers.js +++ b/ADnD_2E_Revised/javascript/sheetWorkers.js @@ -1203,8 +1203,6 @@ function setupAutoFillSpellInfo(section, spellsTable, optionalRulesFields) { [`repeating_spells-${section}_spell-effect`] : spell['effect'] }; - - if (isPriest) { let sphereRules = getActiveSettings(SPHERE_FIELDS, books); spellInfo[`repeating_spells-${section}_spell-sphere`] = getSpellSpheres(spell, sphereRules); From d81048d6fd83cc2e5d05d07f7ec2a92185015fb5 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Thu, 9 Feb 2023 10:29:59 +0100 Subject: [PATCH 09/58] Going with this design for the first iteration of single line spells --- ADnD_2E_Revised/2ESheet.html | 33 ++++++++----------- .../html/shared/new-spell-template.html | 33 ++++++++----------- 2 files changed, 26 insertions(+), 40 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 89984d5ce8..6ccfb0e6ef 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -19202,13 +19202,13 @@ - - + + - + @@ -19231,43 +19231,36 @@ - - - + - - + + - - + + - - + + - - + + - - - - - - + diff --git a/ADnD_2E_Revised/html/shared/new-spell-template.html b/ADnD_2E_Revised/html/shared/new-spell-template.html index f20ad7456b..5416ffb9f7 100644 --- a/ADnD_2E_Revised/html/shared/new-spell-template.html +++ b/ADnD_2E_Revised/html/shared/new-spell-template.html @@ -10,13 +10,13 @@ - + @@ -39,43 +39,36 @@
Level:School:
Duration:School: Sphere:
Range:Duration: Components:
Area of Effect:Subtlety: Saving Throw:
Subtlety:Sensory: Knockdown:
Sensory: Critical:
Damage:
- - + +
- - - + - - + + - - + + - - + + - - + + - - - - - - + From 44846a894f31825684cb8edba0252892bee4d727 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Thu, 9 Feb 2023 12:49:22 +0100 Subject: [PATCH 10/58] Finalized the pug for the new spells --- ADnD_2E_Revised/2ESheet.html | 118 +++++++++++++----- ADnD_2E_Revised/2EStyle.css | 38 +++--- ADnD_2E_Revised/build/buildPug.js | 9 +- ADnD_2E_Revised/css/2EStyle-base.css | 38 +++--- .../html/shared/new-spell-template.html | 2 +- ADnD_2E_Revised/html/tabs/monster-tab.html | 2 +- ADnD_2E_Revised/pug/spellTemplate.pug | 103 +++++++++++++++ ADnD_2E_Revised/pug/spellsTemplate.pug | 98 --------------- 8 files changed, 242 insertions(+), 166 deletions(-) create mode 100644 ADnD_2E_Revised/pug/spellTemplate.pug delete mode 100644 ADnD_2E_Revised/pug/spellsTemplate.pug diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 6ccfb0e6ef..65c119a307 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -19190,9 +19190,10 @@
Level:School:
Duration:School: Sphere:
Range:Duration: Components:
Area of Effect:Subtlety: Saving Throw:
Subtlety:Sensory: Knockdown:
Sensory: Critical:
Damage:
-
-
- + +
+
+
@@ -19202,86 +19203,135 @@ + + + + + + - - - - - -
Spell name Range
- - + + + + + + + + + + + + + + +
- - - + + + - + - +
CastMemorizedCastMemorized
+ + / + +
-
+
- + - + - + - + - + - + - + - + - + - - + + - + - + - + - + - +
Level: + +
School: + + Sphere: + +
Duration: + + Components: + +
Subtlety: + + Saving Throw: + +
Sensory: + + Knockdown: + +
Critical: + + + +
Damage: + + Damage Type: + +
Healing: + +
Reference: + +
Materials: + +
- +
diff --git a/ADnD_2E_Revised/2EStyle.css b/ADnD_2E_Revised/2EStyle.css index cba60cc68f..35b0c8f9e7 100644 --- a/ADnD_2E_Revised/2EStyle.css +++ b/ADnD_2E_Revised/2EStyle.css @@ -1716,6 +1716,29 @@ table.sheet-padding-right-column2 td:nth-child(2) { justify-content: space-around; } +.sheet-spell-line { + display: flex; + align-items: flex-end; + justify-content: space-between; + column-gap: 5px; +} + +.sheet-spell-fold { + display: flex; + justify-content: space-between; + column-gap: 10px; + padding-top: 5px; + padding-bottom: 5px; + padding-left: 15px; + +} + +.charsheet .sheet-spell-effect { + height: unset; + resize: vertical; + margin-bottom: 0px; +} + .charsheet label input[type="radio"], .charsheet label input[type="checkbox"] { position: absolute; @@ -1766,21 +1789,6 @@ div.repcontainer div.repitem:first-child thead.sheet-show-first { visibility: visible; } -.sheet-show-spell-hack { - position: relative; - top: -11px; -} - -.sheet-spell-effect { - width: 100%; - position: relative; - top: -5px; -} - -input.sheet-show-spell-details:checked ~ .sheet-spell-effect { - top: 0; -} - table.sheet-spell-details { visibility: collapse; } diff --git a/ADnD_2E_Revised/build/buildPug.js b/ADnD_2E_Revised/build/buildPug.js index 2a2762d63f..506864a11d 100644 --- a/ADnD_2E_Revised/build/buildPug.js +++ b/ADnD_2E_Revised/build/buildPug.js @@ -4,7 +4,7 @@ const path = require('path'); const sourceFolder = path.join(__dirname, '..'); const jsFolder = path.join(sourceFolder, 'javascript'); const pugFolder = path.join(sourceFolder, 'pug'); -const htmlFolder = path.join(sourceFolder, 'html', 'components'); +const htmlFolder = path.join(sourceFolder, 'html'); const miscFolder = path.join(sourceFolder, 'misc'); const booksPriority = [ {book: 'PHB', print: 'First Printing May 2013'}, @@ -65,6 +65,11 @@ spellsJs.forEach(jsFile => { } }); +let spellTemplate = pug.renderFile(path.join(pugFolder, 'spellTemplate.pug'), {pretty: true, isPriest: false}); +fs.writeFileSync(path.join(htmlFolder, 'shared', 'wizard-spell-template.html'), spellTemplate); +spellTemplate = pug.renderFile(path.join(pugFolder, 'spellTemplate.pug'), {pretty: true, isPriest: true}); +fs.writeFileSync(path.join(htmlFolder, 'shared', 'priest-spell-template.html'), spellTemplate); + const wizardSpells = require(path.join(jsFolder, 'wizardSpells.js')); const priestSpells = require(path.join(jsFolder, 'priestSpells.js')); html += pug.renderFile(path.join(pugFolder, 'spellScrollsDatalists.pug'), {pretty: true, wizardSpells, priestSpells}); @@ -96,5 +101,5 @@ simpleDatalists.forEach(simpleDatalist => { html += pug.renderFile(path.join(pugFolder, 'simpleDatalists.pug'), {pretty: true, data: data, id:simpleDatalist[1]}) }); -fs.writeFileSync(path.join(htmlFolder, 'dynamicDatalists.html'), html); +fs.writeFileSync(path.join(htmlFolder, 'components', 'dynamicDatalists.html'), html); console.log(''); \ No newline at end of file diff --git a/ADnD_2E_Revised/css/2EStyle-base.css b/ADnD_2E_Revised/css/2EStyle-base.css index e17f179336..186f18c9ec 100644 --- a/ADnD_2E_Revised/css/2EStyle-base.css +++ b/ADnD_2E_Revised/css/2EStyle-base.css @@ -1022,6 +1022,29 @@ table.sheet-padding-right-column2 td:nth-child(2) { justify-content: space-around; } +.sheet-spell-line { + display: flex; + align-items: flex-end; + justify-content: space-between; + column-gap: 5px; +} + +.sheet-spell-fold { + display: flex; + justify-content: space-between; + column-gap: 10px; + padding-top: 5px; + padding-bottom: 5px; + padding-left: 15px; + +} + +.charsheet .sheet-spell-effect { + height: unset; + resize: vertical; + margin-bottom: 0px; +} + .charsheet label input[type="radio"], .charsheet label input[type="checkbox"] { position: absolute; @@ -1072,21 +1095,6 @@ div.repcontainer div.repitem:first-child thead.sheet-show-first { visibility: visible; } -.sheet-show-spell-hack { - position: relative; - top: -11px; -} - -.sheet-spell-effect { - width: 100%; - position: relative; - top: -5px; -} - -input.sheet-show-spell-details:checked ~ .sheet-spell-effect { - top: 0; -} - table.sheet-spell-details { visibility: collapse; } diff --git a/ADnD_2E_Revised/html/shared/new-spell-template.html b/ADnD_2E_Revised/html/shared/new-spell-template.html index 5416ffb9f7..84c9b2a988 100644 --- a/ADnD_2E_Revised/html/shared/new-spell-template.html +++ b/ADnD_2E_Revised/html/shared/new-spell-template.html @@ -86,7 +86,7 @@ Materials: - + diff --git a/ADnD_2E_Revised/html/tabs/monster-tab.html b/ADnD_2E_Revised/html/tabs/monster-tab.html index 346e2ab891..59d66518f3 100644 --- a/ADnD_2E_Revised/html/tabs/monster-tab.html +++ b/ADnD_2E_Revised/html/tabs/monster-tab.html @@ -196,7 +196,7 @@ - insert_new-spell-template.html_(wizmonster,@{wtype} ) + insert_spell-template.html_(wizmonster,@{wtype} )
diff --git a/ADnD_2E_Revised/pug/spellTemplate.pug b/ADnD_2E_Revised/pug/spellTemplate.pug new file mode 100644 index 0000000000..bda84c1163 --- /dev/null +++ b/ADnD_2E_Revised/pug/spellTemplate.pug @@ -0,0 +1,103 @@ +- let failureCheck = '' +- let spellPoints = 'Arc' +if isPriest + - failureCheck = '{{checkroll=[[1d100]]%}}{{checktarget=#REPLACE2#}}{{fail=The spell is expended with absolutely no effect whatsoever.}}' + - spellPoints = 'Wind' +fieldset(name="repeating_spells-#REPLACE0#" class="repeating_spells-#REPLACE0#") + div(class="sheet-spell-line") + table(class="sheet-default-header-first-row sheet-inline" style="flex-grow: 1") + tr(class="sheet-collapse sheet-show-first") + th Spell name + th Range + th Area of Effect + th(colspan="2") Casting time + th(colspan="2") Macro + tr + td(class="sheet-td-dynamic50") + input(type="text" name="attr_spell-name" title="@{repeating_spells-#REPLACE0#_$X_spell-name}" class="sheet-table-dynamic sheet-chrome" placeholder="Spell name" list="#REPLACE0#-spells") + input(type="text" name="attr_spell-name" title="@{repeating_spells-#REPLACE0#_$X_spell-name}" class="sheet-table-dynamic sheet-firefox" placeholder="Spell name" list="#REPLACE0#-spells-ff") + td(class="sheet-td-dynamic25") + input(type="text" name="attr_spell-range" title="@{repeating_spells-#REPLACE0#_$X_spell-range}" class="sheet-table-dynamic" placeholder="Range") + td(class="sheet-td-dynamic25") + input(type="text" name="attr_spell-aoe" title="@{repeating_spells-#REPLACE0#_$X_spell-aoe}" class="sheet-table-dynamic" placeholder="Area of Effect") + td + input(type="text" name="attr_spell-cast-time" title="@{repeating_spells-#REPLACE0#_$X_spell-cast-time}" class="sheet-short" placeholder="Cast time") + td + button(type="roll" name="roll_spell-init" title="@{repeating_spells-#REPLACE0#_$X_spell-init}" value="/gmroll [[{[[1d10]]+(@{spell-cast-time})-(@{misc-mod}), 1}kh1]] [Initiative (@{spell-name})]&{tracker}") Initiative + td + button(type="roll" name="roll_spell-template" title="%{repeating_spells-#REPLACE0#_$X_spell-template}" value="#REPLACE1#&{template:2Espell}{{title=@{spell-name}}}{{splevel=@{spell-level}}}{{school=@{spell-school}}}{{sphere=@{spell-sphere}}}{{components=@{spell-components}}}{{time=@{spell-cast-time}}}{{range=@{spell-range}}}{{duration=@{spell-duration}}}{{aoe=@{spell-aoe}}}{{save=@{spell-saving-throw}}}{{subtlety=@{spell-subtlety}}}{{sensory=@{spell-sensory}}}{{knockdown=@{spell-knockdown}}}{{crit=@{spell-crit-size}}}{{damage=@{spell-damage}}}{{damagetype=@{spell-damage-type}}}{{healing=@{spell-healing}}}{{reference=@{spell-reference}}}{{materials=@{spell-materials}}}#{failureCheck}{{effects=@{spell-effect}}}") T + td + button(type="action" name="act_show" class="btn sheet-hidden sheet-show") ▼ + button(type="action" name="act_hide" class="btn sheet-hidden") ▲ + table(class="sheet-default-header-first-row") + tr(class="sheet-collapse sheet-show-first") + td Cast + td + td Memorized + tr + td + input(type="number" name="attr_spell-cast-value" title="@{repeating_spells-#REPLACE0#_$X_spell-cast-value}" class="sheet-short" value="0") + td(class="sheet-centering-padding-5") / + td + input(type="number" name="attr_spell-memorized" title="@{repeating_spells-#REPLACE0#_$X_spell-memorized}" class="sheet-short" value="0") + div(class="sheet-hidden") + div(class="sheet-spell-fold") + table(class="sheet-default-header-odd-column" style="align-self: flex-start") + tr + th Level: + td(colspan="3") + input(type="text" name="attr_spell-level" title="@{repeating_spells-#REPLACE0#_$X_spell-level}" class="sheet-table-dynamic" placeholder="Spell level") + tr + th School: + td + input(type="text" name="attr_spell-school" title="@{repeating_spells-#REPLACE0#_$X_spell-school}" class="sheet-spell-half" placeholder="School") + th Sphere: + td + input(type="text" name="attr_spell-sphere" title="@{repeating_spells-#REPLACE0#_$X_spell-sphere}" class="sheet-spell-half" placeholder="Sphere") + tr + th Duration: + td + input(type="text" name="attr_spell-duration" title="@{repeating_spells-#REPLACE0#_$X_spell-duration}" class="sheet-spell-half" placeholder="Duration") + th Components: + td + input(type="text" name="attr_spell-components" title="@{repeating_spells-#REPLACE0#_$X_spell-components}" class="sheet-spell-half" placeholder="Components") + tr + th Subtlety: + td + input(type="text" name="attr_spell-subtlety" title="@{repeating_spells-#REPLACE0#_$X_spell-subtlety}" class="sheet-spell-half" placeholder="Subtlety") + th(style="white-space: nowrap") Saving Throw: + td + input(type="text" name="attr_spell-saving-throw" title="@{repeating_spells-#REPLACE0#_$X_spell-saving-throw}" class="sheet-spell-half" placeholder="Saving Throw") + tr + th Sensory: + td + input(type="text" name="attr_spell-sensory" title="@{repeating_spells-#REPLACE0#_$X_spell-sensory}" class="sheet-spell-half" placeholder="Sensory") + th Knockdown: + td + input(type="text" name="attr_spell-knockdown" title="@{repeating_spells-#REPLACE0#_$X_spell-knockdown}" class="sheet-spell-half" placeholder="[[d6]]") + tr + th Critical: + td + input(type="text" name="attr_spell-crit-size" title="@{repeating_spells-#REPLACE0#_$X_spell-crit-size}" class="sheet-spell-half" placeholder="Large (1d3 hits)" list="spell-crit-size") + td(colspan="2" style="background-color: transparent;") + button(type="action" name="act_spell-crit2" class="btn sheet-action-button" title="%{repeating_spells-#REPLACE0#_$X_spell-crit2}") Critical Effect + tr + th Damage: + td + textarea(name="attr_spell-damage" title="@{repeating_spells-#REPLACE0#_$X_spell-damage}" class="sheet-spell-half sheet-input-like" placeholder="[[Damage]]") + th Damage Type: + td + input(type="text" name="attr_spell-damage-type" title="@{repeating_spells-#REPLACE0#_$X_spell-damage-type}" class="sheet-spell-half" placeholder="Damage type" list="spell-damage-type") + tr + th Healing: + td(colspan="3") + textarea(name="attr_spell-healing" title="@{repeating_spells-#REPLACE0#_$X_spell-healing}" class="sheet-table-dynamic sheet-input-like" placeholder="[[Healing]]") + tr + th Reference: + td(colspan="3") + input(type="text" name="attr_spell-reference" title="@{repeating_spells-#REPLACE0#_$X_spell-reference}" class="sheet-table-dynamic" placeholder="Book Reference") + tr + th Materials: + td(colspan="3") + textarea(name="attr_spell-materials" title="@{repeating_spells-#REPLACE0#_$X_spell-materials}" class="sheet-table-dynamic sheet-input-like" placeholder="Materials") + textarea(name="attr_spell-effect" title="@{repeating_spells-#REPLACE0#_$X_spell-effect}" placeholder="Insert Spell effects." class="sheet-spell-effect") \ No newline at end of file diff --git a/ADnD_2E_Revised/pug/spellsTemplate.pug b/ADnD_2E_Revised/pug/spellsTemplate.pug deleted file mode 100644 index 9260895175..0000000000 --- a/ADnD_2E_Revised/pug/spellsTemplate.pug +++ /dev/null @@ -1,98 +0,0 @@ -div(class="sheet-flex-wrap") - fieldset(name="repeating_spells-#REPLACE0#" class="repeating_spells-#REPLACE0#") - div - table - tr - td(class="sheet-default-header") Spell name: - td - input(type="text" name="spell-name" title="@{repeating_spells-#REPLACE0#_$X_spell-name}" class="sheet-spell-big sheet-chrome" placeholder="Spell name" list="#REPLACE0#-spells") - input(type="text" name="spell-name" title="@{repeating_spells-#REPLACE0#_$X_spell-name}" class="sheet-spell-big sheet-firefox" placeholder="Spell name" list="#REPLACE0#-spells-ff") - td(class="sheet-default-header") Casting time: - td - input(type="text" name="attr_spell-cast-time" title="@{repeating_spells-#REPLACE0#_$X_spell-cast-time}" class="sheet-short" placeholder="Cast time") - td - button(type="roll" name="roll_spell-init" title="@{repeating_spells-#REPLACE0#_$X_spell-init}" value="/gmroll [[{([[1d10]]+@{spell-cast-time}-(@{misc-mod})), 1}kh1]] [Initiative (@{spell-name})]&{tracker}") Initiative - table(class="sheet-default-header-first-column sheet-inline-5") - tr - td Cast / Memorized: - td - input(type="number" name="attr_spell-cast-value" title="@{repeating_spells-#REPLACE0#_$X_spell-cast-value}" value="0" class="sheet-short") - b / - input(type="number" name="attr_spell-memorized" title="@{repeating_spells-#REPLACE0#_$X_spell-memorized}" value="0" class="sheet-short") - table - tr - td Spell Points / Wind Used: - td - input(type="number" name="attr_spell-points" title="@{repeating_spells-#REPLACE0#_$X_spell-points}" class="sheet-short" value="0") - b / - input(type="number" name="attr_spell-wind" title="@{repeating_spells-#REPLACE0#_$X_spell-wind}" class="sheet-short" value="0") - input(type="checkbox" class="sheet-show-spell-details sheet-show-spell-hack" title="Show spell details") - span(class="sheet-show-spell-hack") - label(class="sheet-show-spell-hack") Show spell details - table(class="sheet-default-header-odd-column sheet-spell-details") - tr - td Sphere: - td - input(type="text" name="attr_spell-sphere" title="@{repeating_spells-#REPLACE0#_$X_spell-sphere}" class="sheet-spell-half" placeholder="Sphere") - input(style="display:none;" type="text" name="attr_spell-level" title="@{repeating_spells-#REPLACE0#_$X_spell-level}" class="sheet-spell-half" placeholder="Spell level") - td School: - td - input(type="text" name="attr_spell-school" title="@{repeating_spells-#REPLACE0#_$X_spell-school}" class="sheet-spell-half" placeholder="School") - td Components: - td - input(type="text" name="attr_spell-components" title="@{repeating_spells-#REPLACE0#_$X_spell-components}" class="sheet-spell-half" placeholder="Components") - tr - td Range: - td - input(type="text" name="attr_spell-range" title="@{repeating_spells-#REPLACE0#_$X_spell-range}" class="sheet-spell-half" placeholder="Range") - td Area of Effect: - td - input(type="text" name="attr_spell-aoe" title="@{repeating_spells-#REPLACE0#_$X_spell-aoe}" class="sheet-spell-half" placeholder="Area of Effect") - td Duration: - td - input(type="text" name="attr_spell-duration" title="@{repeating_spells-#REPLACE0#_$X_spell-duration}" class="sheet-spell-half" placeholder="Duration") - tr - td Damage: - td - textarea(type="text" name="attr_spell-damage" title="@{repeating_spells-#REPLACE0#_$X_spell-damage}" class="sheet-spell-half sheet-input-like" placeholder="[[Damage]]") - td Damage type: - td - input(type="text" name="attr_spell-damage-type" title="@{repeating_spells-#REPLACE0#_$X_spell-damage-type}" class="sheet-spell-half" placeholder="Damage type" list="spell-damage-type") - td Saving throw: - td - input(type="text" name="attr_spell-saving-throw" title="@{repeating_spells-#REPLACE0#_$X_spell-saving-throw}" class="sheet-spell-half" placeholder="Saving Throw") - tr - td Healing: - td - textarea(type="text" name="attr_spell-healing" title="@{repeating_spells-#REPLACE0#_$X_spell-healing}" class="sheet-spell-half sheet-input-like" placeholder="[[Healing]]") - td Materials: - td - textarea(type="text" name="attr_spell-materials" title="@{repeating_spells-#REPLACE0#_$X_spell-materials}" class="sheet-spell-half sheet-input-like" placeholder="Materials") - td Book reference: - td - input(type="text" name="attr_spell-reference" title="@{repeating_spells-#REPLACE0#_$X_spell-reference}" class="sheet-spell-half" placeholder="Book Reference") - tr - td Subtlety: - td - input(type="text" name="attr_spell-subtlety" title="@{repeating_spells-#REPLACE0#_$X_spell-subtlety}" class="sheet-spell-half" placeholder="Subtlety") - td Sensory: - td - input(type="text" name="attr_spell-sensory" title="@{repeating_spells-#REPLACE0#_$X_spell-sensory}" class="sheet-spell-half" placeholder="Sensory") - td Knockdown: - td - input(type="text" name="attr_spell-knockdown" title="@{repeating_spells-#REPLACE0#_$X_spell-knockdown}" class="sheet-spell-half" placeholder="[[d6]]") - tr - td Critical: - td - input(type="text" name="attr_spell-crit-size" title="@{repeating_spells-#REPLACE0#_$X_spell-crit-size}" class="sheet-spell-half" placeholder="Large (1d3 hits)" list="spell-crit-size") - td(colspan="2" style="background: transparent") - button(type="action" name="act_spell-crit2" class="btn sheet-action-button" title="%{repeating_spells-#REPLACE0#_$X_spell-crit2}") Critical Effect - table(class="sheet-spell-effect") - tr - td(style="width: 100%") - textarea(name="attr_spell-effect" title="@{repeating_spells-#REPLACE0#_$X_spell-effect}" placeholder="Insert Spell effects." style="margin: 0; height: 60px") - td - button(type="roll" name="roll_spell-cast" title="%{repeating_spells-#REPLACE0#_$X_spell-cast}" value="#REPLACE1#@{spell-effect}" style="margin-bottom: 5px") Roll Spell Effects - br - button(type="roll" name="roll_spell-template" title="%{repeating_spells-#REPLACE0#_$X_spell-template}" value="#REPLACE1#&{template:2Espell}{{title=@{spell-name}}}{{splevel=@{spell-level}}}{{school=@{spell-school}}}{{sphere=@{spell-sphere}}}{{components=@{spell-components}}}{{time=@{spell-cast-time}}}{{range=@{spell-range}}}{{duration=@{spell-duration}}}{{aoe=@{spell-aoe}}}{{save=@{spell-saving-throw}}}{{subtlety=@{spell-subtlety}}}{{sensory=@{spell-sensory}}}{{knockdown=@{spell-knockdown}}}{{crit=@{spell-crit-size}}}{{damage=@{spell-damage}}}{{damagetype=@{spell-damage-type}}}{{healing=@{spell-healing}}}{{reference=@{spell-reference}}}{{materials=@{spell-materials}}}{{checkroll=[[1d100]]%}}{{checktarget=#REPLACE2#}}{{fail=The spell is expended with absolutely no effect whatsoever.}}{{effects=@{spell-effect}}}") Roll Template - hr \ No newline at end of file From 82350feab5833f3c83e9dc3873fdc5babfb834a2 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Thu, 9 Feb 2023 13:12:38 +0100 Subject: [PATCH 11/58] Added the new pug logic to the old files. Still need to handle the failure check and interpolated strings --- ADnD_2E_Revised/2ESheet.html | 5662 ++++++++++------- ADnD_2E_Revised/2EStyle.css | 26 - ADnD_2E_Revised/css/2EStyle-base.css | 26 - .../html/shared/new-spell-template.html | 95 - .../html/shared/priest-spell-template.html | 237 +- .../html/shared/wizard-spell-template.html | 234 +- ADnD_2E_Revised/html/tabs/monster-tab.html | 2 +- ADnD_2E_Revised/javascript/sheetWorkers.js | 15 +- ADnD_2E_Revised/pug/spellTemplate.pug | 4 +- 9 files changed, 3793 insertions(+), 2508 deletions(-) delete mode 100644 ADnD_2E_Revised/html/shared/new-spell-template.html diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 65c119a307..e13b85dc4b 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -3980,95 +3980,151 @@

Spells Memorized and Spell Book


Spells Memorized

-
-
-
- - - - - - - - -
Spell name: - - - Casting time:
- - - - - -
Cast / Memorized: /
- - - - - -
Spell Points / Arc Used: /
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Level:School:Components:
Range:Area of Effect:Duration:
Damage:Damage type:Saving throw:
Healing:Materials:Book reference:
Subtlety:Sensory:Knockdown:
Critical:
- - - - - -
- -
- -
-
-
-
-
+ +
+
+ + + + + + + + + + + + + + + + + +
Spell nameRangeArea of EffectCasting timeMacro
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
CastMemorized
+ + / + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level: + +
School: + + Sphere: + +
Duration: + + Components: + +
Subtlety: + + Saving Throw: + +
Sensory: + + Knockdown: + +
Critical: + + + +
Damage: + + Damage Type: + +
Healing: + +
Reference: + +
Materials: + +
+ +
+
+
@@ -4225,95 +4281,151 @@

Spells Memorized and Spell Book


Spells Memorized

-
-
-
- - - - - - - - -
Spell name: - - - Casting time:
- - - - - -
Cast / Memorized: /
- - - - - -
Spell Points / Arc Used: /
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Level:School:Components:
Range:Area of Effect:Duration:
Damage:Damage type:Saving throw:
Healing:Materials:Book reference:
Subtlety:Sensory:Knockdown:
Critical:
- - - - - -
- -
- -
-
-
-
-
+ +
+
+ + + + + + + + + + + + + + + + + +
Spell nameRangeArea of EffectCasting timeMacro
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
CastMemorized
+ + / + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level: + +
School: + + Sphere: + +
Duration: + + Components: + +
Subtlety: + + Saving Throw: + +
Sensory: + + Knockdown: + +
Critical: + + + +
Damage: + + Damage Type: + +
Healing: + +
Reference: + +
Materials: + +
+ +
+
+
@@ -4470,95 +4582,151 @@

Spells Memorized and Spell Book


Spells Memorized

-
-
-
- - - - - - - - -
Spell name: - - - Casting time:
- - - - - -
Cast / Memorized: /
- - - - - -
Spell Points / Arc Used: /
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Level:School:Components:
Range:Area of Effect:Duration:
Damage:Damage type:Saving throw:
Healing:Materials:Book reference:
Subtlety:Sensory:Knockdown:
Critical:
- - - - - -
- -
- -
-
-
-
-
+ +
+
+ + + + + + + + + + + + + + + + + +
Spell nameRangeArea of EffectCasting timeMacro
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
CastMemorized
+ + / + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level: + +
School: + + Sphere: + +
Duration: + + Components: + +
Subtlety: + + Saving Throw: + +
Sensory: + + Knockdown: + +
Critical: + + + +
Damage: + + Damage Type: + +
Healing: + +
Reference: + +
Materials: + +
+ +
+
+
@@ -4715,95 +4883,151 @@

Spells Memorized and Spell Book


Spells Memorized

-
-
-
- - - - - - - - -
Spell name: - - - Casting time:
- - - - - -
Cast / Memorized: /
- - - - - -
Spell Points / Arc Used: /
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Level:School:Components:
Range:Area of Effect:Duration:
Damage:Damage type:Saving throw:
Healing:Materials:Book reference:
Subtlety:Sensory:Knockdown:
Critical:
- - - - - -
- -
- -
-
-
-
-
+ +
+
+ + + + + + + + + + + + + + + + + +
Spell nameRangeArea of EffectCasting timeMacro
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
CastMemorized
+ + / + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level: + +
School: + + Sphere: + +
Duration: + + Components: + +
Subtlety: + + Saving Throw: + +
Sensory: + + Knockdown: + +
Critical: + + + +
Damage: + + Damage Type: + +
Healing: + +
Reference: + +
Materials: + +
+ +
+
+
@@ -4960,95 +5184,151 @@

Spells Memorized and Spell Book


Spells Memorized

-
-
-
- - - - - - - - -
Spell name: - - - Casting time:
- - - - - -
Cast / Memorized: /
- - - - - -
Spell Points / Arc Used: /
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Level:School:Components:
Range:Area of Effect:Duration:
Damage:Damage type:Saving throw:
Healing:Materials:Book reference:
Subtlety:Sensory:Knockdown:
Critical:
- - - - - -
- -
- -
-
-
-
-
+ +
+
+ + + + + + + + + + + + + + + + + +
Spell nameRangeArea of EffectCasting timeMacro
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
CastMemorized
+ + / + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level: + +
School: + + Sphere: + +
Duration: + + Components: + +
Subtlety: + + Saving Throw: + +
Sensory: + + Knockdown: + +
Critical: + + + +
Damage: + + Damage Type: + +
Healing: + +
Reference: + +
Materials: + +
+ +
+
+
@@ -5206,95 +5486,151 @@

Spells Memorized and Spell Book


Spells Memorized

-
-
-
- - - - - - - - -
Spell name: - - - Casting time:
- - - - - -
Cast / Memorized: /
- - - - - -
Spell Points / Arc Used: /
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Level:School:Components:
Range:Area of Effect:Duration:
Damage:Damage type:Saving throw:
Healing:Materials:Book reference:
Subtlety:Sensory:Knockdown:
Critical:
- - - - - -
- -
- -
-
-
-
-
+ +
+
+ + + + + + + + + + + + + + + + + +
Spell nameRangeArea of EffectCasting timeMacro
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
CastMemorized
+ + / + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level: + +
School: + + Sphere: + +
Duration: + + Components: + +
Subtlety: + + Saving Throw: + +
Sensory: + + Knockdown: + +
Critical: + + + +
Damage: + + Damage Type: + +
Healing: + +
Reference: + +
Materials: + +
+ +
+
+
@@ -5451,95 +5787,151 @@

Spells Memorized and Spell Book


Spells Memorized

-
-
-
- - - - - - - - -
Spell name: - - - Casting time:
- - - - - -
Cast / Memorized: /
- - - - - -
Spell Points / Arc Used: /
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Level:School:Components:
Range:Area of Effect:Duration:
Damage:Damage type:Saving throw:
Healing:Materials:Book reference:
Subtlety:Sensory:Knockdown:
Critical:
- - - - - -
- -
- -
-
-
-
-
+ +
+
+ + + + + + + + + + + + + + + + + +
Spell nameRangeArea of EffectCasting timeMacro
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
CastMemorized
+ + / + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level: + +
School: + + Sphere: + +
Duration: + + Components: + +
Subtlety: + + Saving Throw: + +
Sensory: + + Knockdown: + +
Critical: + + + +
Damage: + + Damage Type: + +
Healing: + +
Reference: + +
Materials: + +
+ +
+
+
@@ -5696,95 +6088,151 @@

Spells Memorized and Spell Book


Spells Memorized

-
-
-
- - - - - - - - -
Spell name: - - - Casting time:
- - - - - -
Cast / Memorized: /
- - - - - -
Spell Points / Arc Used: /
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Level:School:Components:
Range:Area of Effect:Duration:
Damage:Damage type:Saving throw:
Healing:Materials:Book reference:
Subtlety:Sensory:Knockdown:
Critical:
- - - - - -
- -
- -
-
-
-
-
+ +
+
+ + + + + + + + + + + + + + + + + +
Spell nameRangeArea of EffectCasting timeMacro
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
CastMemorized
+ + / + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level: + +
School: + + Sphere: + +
Duration: + + Components: + +
Subtlety: + + Saving Throw: + +
Sensory: + + Knockdown: + +
Critical: + + + +
Damage: + + Damage Type: + +
Healing: + +
Reference: + +
Materials: + +
+ +
+
+
@@ -5941,95 +6389,151 @@

Spells Memorized and Spell Book


Spells Memorized

-
-
-
- - - - - - - - -
Spell name: - - - Casting time:
- - - - - -
Cast / Memorized: /
- - - - - -
Spell Points / Arc Used: /
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Level:School:Components:
Range:Area of Effect:Duration:
Damage:Damage type:Saving throw:
Healing:Materials:Book reference:
Subtlety:Sensory:Knockdown:
Critical:
- - - - - -
- -
- -
-
-
-
-
+ +
+
+ + + + + + + + + + + + + + + + + +
Spell nameRangeArea of EffectCasting timeMacro
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
CastMemorized
+ + / + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level: + +
School: + + Sphere: + +
Duration: + + Components: + +
Subtlety: + + Saving Throw: + +
Sensory: + + Knockdown: + +
Critical: + + + +
Damage: + + Damage Type: + +
Healing: + +
Reference: + +
Materials: + +
+ +
+
+
@@ -6186,95 +6690,151 @@

Spells Memorized and Spell Book


Spells Memorized

-
-
-
- - - - - - - - -
Spell name: - - - Casting time:
- - - - - -
Cast / Memorized: /
- - - - - -
Spell Points / Arc Used: /
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Level:School:Components:
Range:Area of Effect:Duration:
Damage:Damage type:Saving throw:
Healing:Materials:Book reference:
Subtlety:Sensory:Knockdown:
Critical:
- - - - - -
- -
- -
-
-
-
-
+ +
+
+ + + + + + + + + + + + + + + + + +
Spell nameRangeArea of EffectCasting timeMacro
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
CastMemorized
+ + / + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level: + +
School: + + Sphere: + +
Duration: + + Components: + +
Subtlety: + + Saving Throw: + +
Sensory: + + Knockdown: + +
Critical: + + + +
Damage: + + Damage Type: + +
Healing: + +
Reference: + +
Materials: + +
+ +
+
+
@@ -6431,95 +6991,151 @@

Spells Memorized and Spell Book


Spells Memorized

-
-
-
- - - - - - - - -
Spell name: - - - Casting time:
- - - - - -
Cast / Memorized: /
- - - - - -
Spell Points / Arc Used: /
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Level:School:Components:
Range:Area of Effect:Duration:
Damage:Damage type:Saving throw:
Healing:Materials:Book reference:
Subtlety:Sensory:Knockdown:
Critical:
- - - - - -
- -
- -
-
-
-
-
+ +
+
+ + + + + + + + + + + + + + + + + +
Spell nameRangeArea of EffectCasting timeMacro
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
CastMemorized
+ + / + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level: + +
School: + + Sphere: + +
Duration: + + Components: + +
Subtlety: + + Saving Throw: + +
Sensory: + + Knockdown: + +
Critical: + + + +
Damage: + + Damage Type: + +
Healing: + +
Reference: + +
Materials: + +
+ +
+
+
@@ -6676,95 +7292,151 @@

Spells Memorized and Spell Book


Spells Memorized

-
-
-
- - - - - - - - -
Spell name: - - - Casting time:
- - - - - -
Cast / Memorized: /
- - - - - -
Spell Points / Arc Used: /
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Level:School:Components:
Range:Area of Effect:Duration:
Damage:Damage type:Saving throw:
Healing:Materials:Book reference:
Subtlety:Sensory:Knockdown:
Critical:
- - - - - -
- -
- -
-
-
-
-
+ +
+
+ + + + + + + + + + + + + + + + + +
Spell nameRangeArea of EffectCasting timeMacro
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
CastMemorized
+ + / + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level: + +
School: + + Sphere: + +
Duration: + + Components: + +
Subtlety: + + Saving Throw: + +
Sensory: + + Knockdown: + +
Critical: + + + +
Damage: + + Damage Type: + +
Healing: + +
Reference: + +
Materials: + +
+ +
+
+
@@ -6921,95 +7593,151 @@

Spells Memorized and Spell Book


Spells Memorized

-
-
-
- - - - - - - - -
Spell name: - - - Casting time:
- - - - - -
Cast / Memorized: /
- - - - - -
Spell Points / Arc Used: /
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Level:School:Components:
Range:Area of Effect:Duration:
Damage:Damage type:Saving throw:
Healing:Materials:Book reference:
Subtlety:Sensory:Knockdown:
Critical:
- - - - - -
- -
- -
-
-
-
-
+ +
+
+ + + + + + + + + + + + + + + + + +
Spell nameRangeArea of EffectCasting timeMacro
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
CastMemorized
+ + / + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level: + +
School: + + Sphere: + +
Duration: + + Components: + +
Subtlety: + + Saving Throw: + +
Sensory: + + Knockdown: + +
Critical: + + + +
Damage: + + Damage Type: + +
Healing: + +
Reference: + +
Materials: + +
+ +
+
+
@@ -7166,95 +7894,151 @@

Spells Memorized and Spell Book


Spells Memorized

-
-
-
- - - - - - - - -
Spell name: - - - Casting time:
- - - - - -
Cast / Memorized: /
- - - - - -
Spell Points / Arc Used: /
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Level:School:Components:
Range:Area of Effect:Duration:
Damage:Damage type:Saving throw:
Healing:Materials:Book reference:
Subtlety:Sensory:Knockdown:
Critical:
- - - - - -
- -
- -
-
-
-
-
+ +
+
+ + + + + + + + + + + + + + + + + +
Spell nameRangeArea of EffectCasting timeMacro
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
CastMemorized
+ + / + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level: + +
School: + + Sphere: + +
Duration: + + Components: + +
Subtlety: + + Saving Throw: + +
Sensory: + + Knockdown: + +
Critical: + + + +
Damage: + + Damage Type: + +
Healing: + +
Reference: + +
Materials: + +
+ +
+
+
@@ -7411,95 +8195,151 @@

Spells Memorized and Spell Book


Spells Memorized

-
-
-
- - - - - - - - -
Spell name: - - - Casting time:
- - - - - -
Cast / Memorized: /
- - - - - -
Spell Points / Arc Used: /
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Level:School:Components:
Range:Area of Effect:Duration:
Damage:Damage type:Saving throw:
Healing:Materials:Book reference:
Subtlety:Sensory:Knockdown:
Critical:
- - - - - -
- -
- -
-
-
-
-
+ +
+
+ + + + + + + + + + + + + + + + + +
Spell nameRangeArea of EffectCasting timeMacro
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
CastMemorized
+ + / + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level: + +
School: + + Sphere: + +
Duration: + + Components: + +
Subtlety: + + Saving Throw: + +
Sensory: + + Knockdown: + +
Critical: + + + +
Damage: + + Damage Type: + +
Healing: + +
Reference: + +
Materials: + +
+ +
+
+
@@ -7742,98 +8582,151 @@

Spells Memorized and Spell Book


Spells Memorized

-
-
-
- - - - - - - - -
Spell name: - - - Casting time:
- - - - - -
Cast / Memorized: /
- - - - - -
Spell Points / Wind Used: /
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sphere: - - - School:Components:
Range:Area of Effect:Duration:
Damage:Damage type:Saving throw:
Healing:Materials:Book reference:
Subtlety:Sensory:Knockdown:
Critical:
- - - - - -
- -
- -
-
-
-
-
+ +
+
+ + + + + + + + + + + + + + + + + +
Spell nameRangeArea of EffectCasting timeMacro
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
CastMemorized
+ + / + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level: + +
School: + + Sphere: + +
Duration: + + Components: + +
Subtlety: + + Saving Throw: + +
Sensory: + + Knockdown: + +
Critical: + + + +
Damage: + + Damage Type: + +
Healing: + +
Reference: + +
Materials: + +
+ +
+
+
@@ -7992,98 +8885,151 @@

Spells Memorized and Spell Book


Spells Memorized

-
-
-
- - - - - - - - -
Spell name: - - - Casting time:
- - - - - -
Cast / Memorized: /
- - - - - -
Spell Points / Wind Used: /
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sphere: - - - School:Components:
Range:Area of Effect:Duration:
Damage:Damage type:Saving throw:
Healing:Materials:Book reference:
Subtlety:Sensory:Knockdown:
Critical:
- - - - - -
- -
- -
-
-
-
-
+ +
+
+ + + + + + + + + + + + + + + + + +
Spell nameRangeArea of EffectCasting timeMacro
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
CastMemorized
+ + / + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level: + +
School: + + Sphere: + +
Duration: + + Components: + +
Subtlety: + + Saving Throw: + +
Sensory: + + Knockdown: + +
Critical: + + + +
Damage: + + Damage Type: + +
Healing: + +
Reference: + +
Materials: + +
+ +
+
+
@@ -8242,98 +9188,151 @@

Spells Memorized and Spell Book


Spells Memorized

-
-
-
- - - - - - - - -
Spell name: - - - Casting time:
- - - - - -
Cast / Memorized: /
- - - - - -
Spell Points / Wind Used: /
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sphere: - - - School:Components:
Range:Area of Effect:Duration:
Damage:Damage type:Saving throw:
Healing:Materials:Book reference:
Subtlety:Sensory:Knockdown:
Critical:
- - - - - -
- -
- -
-
-
-
-
+ +
+
+ + + + + + + + + + + + + + + + + +
Spell nameRangeArea of EffectCasting timeMacro
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
CastMemorized
+ + / + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level: + +
School: + + Sphere: + +
Duration: + + Components: + +
Subtlety: + + Saving Throw: + +
Sensory: + + Knockdown: + +
Critical: + + + +
Damage: + + Damage Type: + +
Healing: + +
Reference: + +
Materials: + +
+ +
+
+
@@ -8492,98 +9491,151 @@

Spells Memorized and Spell Book


Spells Memorized

-
-
-
- - - - - - - - -
Spell name: - - - Casting time:
- - - - - -
Cast / Memorized: /
- - - - - -
Spell Points / Wind Used: /
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sphere: - - - School:Components:
Range:Area of Effect:Duration:
Damage:Damage type:Saving throw:
Healing:Materials:Book reference:
Subtlety:Sensory:Knockdown:
Critical:
- - - - - -
- -
- -
-
-
-
-
+ +
+
+ + + + + + + + + + + + + + + + + +
Spell nameRangeArea of EffectCasting timeMacro
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
CastMemorized
+ + / + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level: + +
School: + + Sphere: + +
Duration: + + Components: + +
Subtlety: + + Saving Throw: + +
Sensory: + + Knockdown: + +
Critical: + + + +
Damage: + + Damage Type: + +
Healing: + +
Reference: + +
Materials: + +
+ +
+
+
@@ -8742,98 +9794,151 @@

Spells Memorized and Spell Book


Spells Memorized

-
-
-
- - - - - - - - -
Spell name: - - - Casting time:
- - - - - -
Cast / Memorized: /
- - - - - -
Spell Points / Wind Used: /
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sphere: - - - School:Components:
Range:Area of Effect:Duration:
Damage:Damage type:Saving throw:
Healing:Materials:Book reference:
Subtlety:Sensory:Knockdown:
Critical:
- - - - - -
- -
- -
-
-
-
-
+ +
+
+ + + + + + + + + + + + + + + + + +
Spell nameRangeArea of EffectCasting timeMacro
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
CastMemorized
+ + / + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level: + +
School: + + Sphere: + +
Duration: + + Components: + +
Subtlety: + + Saving Throw: + +
Sensory: + + Knockdown: + +
Critical: + + + +
Damage: + + Damage Type: + +
Healing: + +
Reference: + +
Materials: + +
+ +
+
+
@@ -8992,98 +10097,151 @@

Spells Memorized and Spell Book


Spells Memorized

-
-
-
- - - - - - - - -
Spell name: - - - Casting time:
- - - - - -
Cast / Memorized: /
- - - - - -
Spell Points / Wind Used: /
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sphere: - - - School:Components:
Range:Area of Effect:Duration:
Damage:Damage type:Saving throw:
Healing:Materials:Book reference:
Subtlety:Sensory:Knockdown:
Critical:
- - - - - -
- -
- -
-
-
-
-
+ +
+
+ + + + + + + + + + + + + + + + + +
Spell nameRangeArea of EffectCasting timeMacro
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
CastMemorized
+ + / + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level: + +
School: + + Sphere: + +
Duration: + + Components: + +
Subtlety: + + Saving Throw: + +
Sensory: + + Knockdown: + +
Critical: + + + +
Damage: + + Damage Type: + +
Healing: + +
Reference: + +
Materials: + +
+ +
+
+
@@ -9242,98 +10400,151 @@

Spells Memorized and Spell Book


Spells Memorized

-
-
-
- - - - - - - - -
Spell name: - - - Casting time:
- - - - - -
Cast / Memorized: /
- - - - - -
Spell Points / Wind Used: /
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sphere: - - - School:Components:
Range:Area of Effect:Duration:
Damage:Damage type:Saving throw:
Healing:Materials:Book reference:
Subtlety:Sensory:Knockdown:
Critical:
- - - - - -
- -
- -
-
-
-
-
+ +
+
+ + + + + + + + + + + + + + + + + +
Spell nameRangeArea of EffectCasting timeMacro
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
CastMemorized
+ + / + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level: + +
School: + + Sphere: + +
Duration: + + Components: + +
Subtlety: + + Saving Throw: + +
Sensory: + + Knockdown: + +
Critical: + + + +
Damage: + + Damage Type: + +
Healing: + +
Reference: + +
Materials: + +
+ +
+
+
@@ -9486,98 +10697,151 @@

Spells Memorized and Spell Book


Spells Memorized

-
-
-
- - - - - - - - -
Spell name: - - - Casting time:
- - - - - -
Cast / Memorized: /
- - - - - -
Spell Points / Wind Used: /
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sphere: - - - School:Components:
Range:Area of Effect:Duration:
Damage:Damage type:Saving throw:
Healing:Materials:Book reference:
Subtlety:Sensory:Knockdown:
Critical:
- - - - - -
- -
- -
-
-
-
-
+ +
+
+ + + + + + + + + + + + + + + + + +
Spell nameRangeArea of EffectCasting timeMacro
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
CastMemorized
+ + / + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level: + +
School: + + Sphere: + +
Duration: + + Components: + +
Subtlety: + + Saving Throw: + +
Sensory: + + Knockdown: + +
Critical: + + + +
Damage: + + Damage Type: + +
Healing: + +
Reference: + +
Materials: + +
+ +
+
+
@@ -19216,10 +20480,10 @@ - + - + @@ -19347,98 +20611,151 @@ -
-
-
- - - - - - - - -
Spell name: - - - Casting time:
- - - - - -
Cast / Memorized: /
- - - - - -
Spell Points / Wind Used: /
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sphere: - - - School:Components:
Range:Area of Effect:Duration:
Damage:Damage type:Saving throw:
Healing:Materials:Book reference:
Subtlety:Sensory:Knockdown:
Critical:
- - - - - -
- -
- -
-
-
-
-
+ +
+
+ + + + + + + + + + + + + + + + + +
Spell nameRangeArea of EffectCasting timeMacro
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
CastMemorized
+ + / + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level: + +
School: + + Sphere: + +
Duration: + + Components: + +
Subtlety: + + Saving Throw: + +
Sensory: + + Knockdown: + +
Critical: + + + +
Damage: + + Damage Type: + +
Healing: + +
Reference: + +
Materials: + +
+ +
+
+

@@ -68339,13 +69656,13 @@ on('change:repeating_weapons:weaponname', function(eventInfo) { //melee damage autofill on('change:repeating_weapons-damage:weaponname1', function(eventInfo) { let comparer = function (weapon1, weapon2, isPlayersOption) { - let fisk = ['small-medium','large']; + let compareFields = ['small-medium','large']; if (isPlayersOption) { - fisk.push('size'); - fisk.push('type'); - fisk.push('knockdown'); + compareFields.push('size'); + compareFields.push('type'); + compareFields.push('knockdown'); } - return fisk.every(f => weapon1[f] === weapon2[f]) + return compareFields.every(f => weapon1[f] === weapon2[f]) } let rowId = parseSourceAttribute(eventInfo).rowId; let setWeaponFunc = function (weapon) { @@ -69668,9 +70985,12 @@ PSIONIC_CORE_SECTIONS.forEach(({section, name, macro, number, cost_number, disci // Show / Hide buttons for various repeating sections const REPEATING_SECTIONS = [ + ...wizardSpellLevelsSections.map(e => e.sections[e.sections.length-1]).map(e => `spells-${e}`), + 'spells-wizmonster', + ...priestSpellLevelsSections.map(e => e.sections[e.sections.length-1]).map(e => `spells-${e}`), + 'spells-primonster', ...PSIONIC_CORE_SECTIONS.map(e => e.section), 'scrolls', - 'spells-wizmonster', ]; REPEATING_SECTIONS.forEach(section => { on(`clicked:repeating_${section}:show clicked:repeating_${section}:hide`, function (eventInfo) { diff --git a/ADnD_2E_Revised/2EStyle.css b/ADnD_2E_Revised/2EStyle.css index 35b0c8f9e7..8dc62a9411 100644 --- a/ADnD_2E_Revised/2EStyle.css +++ b/ADnD_2E_Revised/2EStyle.css @@ -52,12 +52,10 @@ textarea { .charsheet input.sheet-madtext { width: 79px; } -.charsheet select.sheet-spell-select, .charsheet select.sheet-attr, .charsheet input.sheet-attr { width: 80px; } -.charsheet select.sheet-spell-select-min, .charsheet select.sheet-attr-min, .charsheet input.sheet-attr-min { min-width: 80px; @@ -155,10 +153,6 @@ textarea { .charsheet input.sheet-nonweaponprof { width: 260px; } -.charsheet select.sheet-spell-big, -.charsheet input.sheet-spell-big { - width: 295px; -} .charsheet select.sheet-long, .charsheet input.sheet-long { width: 400px; @@ -1789,26 +1783,6 @@ div.repcontainer div.repitem:first-child thead.sheet-show-first { visibility: visible; } -table.sheet-spell-details { - visibility: collapse; -} -input.sheet-show-spell-details:checked ~ table.sheet-spell-details { - visibility: visible; - margin-top: -5px; -} - -div.sheet-spell-details { - display: none; -} -input.sheet-show-spell-details:checked ~ div.sheet-spell-details { - display: flex; -} - -.sheet-underline { - text-decoration: underline; - font-weight: bolder; -} - /* Overwrite Roll20 base styling */ details > summary:first-of-type { display: list-item; diff --git a/ADnD_2E_Revised/css/2EStyle-base.css b/ADnD_2E_Revised/css/2EStyle-base.css index 186f18c9ec..e2e4bfa73f 100644 --- a/ADnD_2E_Revised/css/2EStyle-base.css +++ b/ADnD_2E_Revised/css/2EStyle-base.css @@ -52,12 +52,10 @@ textarea { .charsheet input.sheet-madtext { width: 79px; } -.charsheet select.sheet-spell-select, .charsheet select.sheet-attr, .charsheet input.sheet-attr { width: 80px; } -.charsheet select.sheet-spell-select-min, .charsheet select.sheet-attr-min, .charsheet input.sheet-attr-min { min-width: 80px; @@ -155,10 +153,6 @@ textarea { .charsheet input.sheet-nonweaponprof { width: 260px; } -.charsheet select.sheet-spell-big, -.charsheet input.sheet-spell-big { - width: 295px; -} .charsheet select.sheet-long, .charsheet input.sheet-long { width: 400px; @@ -1095,26 +1089,6 @@ div.repcontainer div.repitem:first-child thead.sheet-show-first { visibility: visible; } -table.sheet-spell-details { - visibility: collapse; -} -input.sheet-show-spell-details:checked ~ table.sheet-spell-details { - visibility: visible; - margin-top: -5px; -} - -div.sheet-spell-details { - display: none; -} -input.sheet-show-spell-details:checked ~ div.sheet-spell-details { - display: flex; -} - -.sheet-underline { - text-decoration: underline; - font-weight: bolder; -} - /* Overwrite Roll20 base styling */ details > summary:first-of-type { display: list-item; diff --git a/ADnD_2E_Revised/html/shared/new-spell-template.html b/ADnD_2E_Revised/html/shared/new-spell-template.html deleted file mode 100644 index 84c9b2a988..0000000000 --- a/ADnD_2E_Revised/html/shared/new-spell-template.html +++ /dev/null @@ -1,95 +0,0 @@ -
-
- - - - - - - - - - - - - - - - - -
Spell nameRangeArea of EffectCasting timeMacro
- - -
- - - - - - - - - - - -
CastMemorized
/
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Level:
School:Sphere:
Duration:Components:
Subtlety:Saving Throw:
Sensory:Knockdown:
Critical:
Damage:Damage Type:
Healing:
Reference:
Materials:
- -
-
-
\ No newline at end of file diff --git a/ADnD_2E_Revised/html/shared/priest-spell-template.html b/ADnD_2E_Revised/html/shared/priest-spell-template.html index 0306860003..351b0cb434 100644 --- a/ADnD_2E_Revised/html/shared/priest-spell-template.html +++ b/ADnD_2E_Revised/html/shared/priest-spell-template.html @@ -1,92 +1,145 @@ -
-
-
- - - - - - - - -
Spell name: - - - Casting time:
- - - - - -
Cast / Memorized: /
- - - - - -
Spell Points / Wind Used: /
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Sphere: - - - School:Components:
Range:Area of Effect:Duration:
Damage:Damage type:Saving throw:
Healing:Materials:Book reference:
Subtlety:Sensory:Knockdown:
Critical:
- - - - - -
- -
- -
-
-
-
-
\ No newline at end of file + +
+
+ + + + + + + + + + + + + + + + + +
Spell nameRangeArea of EffectCasting timeMacro
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
CastMemorized
+ + / + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level: + +
School: + + Sphere: + +
Duration: + + Components: + +
Subtlety: + + Saving Throw: + +
Sensory: + + Knockdown: + +
Critical: + + + +
Damage: + + Damage Type: + +
Healing: + +
Reference: + +
Materials: + +
+ +
+
+
\ No newline at end of file diff --git a/ADnD_2E_Revised/html/shared/wizard-spell-template.html b/ADnD_2E_Revised/html/shared/wizard-spell-template.html index d91ab24b1e..351b0cb434 100644 --- a/ADnD_2E_Revised/html/shared/wizard-spell-template.html +++ b/ADnD_2E_Revised/html/shared/wizard-spell-template.html @@ -1,89 +1,145 @@ -
-
-
- - - - - - - - -
Spell name: - - - Casting time:
- - - - - -
Cast / Memorized: /
- - - - - -
Spell Points / Arc Used: /
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Level:School:Components:
Range:Area of Effect:Duration:
Damage:Damage type:Saving throw:
Healing:Materials:Book reference:
Subtlety:Sensory:Knockdown:
Critical:
- - - - - -
- -
- -
-
-
-
-
\ No newline at end of file + +
+
+ + + + + + + + + + + + + + + + + +
Spell nameRangeArea of EffectCasting timeMacro
+ + + + + + + + + + + + + + + +
+ + + + + + + + + + + +
CastMemorized
+ + / + +
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Level: + +
School: + + Sphere: + +
Duration: + + Components: + +
Subtlety: + + Saving Throw: + +
Sensory: + + Knockdown: + +
Critical: + + + +
Damage: + + Damage Type: + +
Healing: + +
Reference: + +
Materials: + +
+ +
+
+
\ No newline at end of file diff --git a/ADnD_2E_Revised/html/tabs/monster-tab.html b/ADnD_2E_Revised/html/tabs/monster-tab.html index 59d66518f3..7fe47831c6 100644 --- a/ADnD_2E_Revised/html/tabs/monster-tab.html +++ b/ADnD_2E_Revised/html/tabs/monster-tab.html @@ -196,7 +196,7 @@ - insert_spell-template.html_(wizmonster,@{wtype} ) + insert_wizard-spell-template.html_(wizmonster,@{wtype} )
diff --git a/ADnD_2E_Revised/javascript/sheetWorkers.js b/ADnD_2E_Revised/javascript/sheetWorkers.js index fc4d4de6b3..4a429cfbef 100644 --- a/ADnD_2E_Revised/javascript/sheetWorkers.js +++ b/ADnD_2E_Revised/javascript/sheetWorkers.js @@ -1553,13 +1553,13 @@ on('change:repeating_weapons:weaponname', function(eventInfo) { //melee damage autofill on('change:repeating_weapons-damage:weaponname1', function(eventInfo) { let comparer = function (weapon1, weapon2, isPlayersOption) { - let fisk = ['small-medium','large']; + let compareFields = ['small-medium','large']; if (isPlayersOption) { - fisk.push('size'); - fisk.push('type'); - fisk.push('knockdown'); + compareFields.push('size'); + compareFields.push('type'); + compareFields.push('knockdown'); } - return fisk.every(f => weapon1[f] === weapon2[f]) + return compareFields.every(f => weapon1[f] === weapon2[f]) } let rowId = parseSourceAttribute(eventInfo).rowId; let setWeaponFunc = function (weapon) { @@ -2882,9 +2882,12 @@ PSIONIC_CORE_SECTIONS.forEach(({section, name, macro, number, cost_number, disci // Show / Hide buttons for various repeating sections const REPEATING_SECTIONS = [ + ...wizardSpellLevelsSections.map(e => e.sections[e.sections.length-1]).map(e => `spells-${e}`), + 'spells-wizmonster', + ...priestSpellLevelsSections.map(e => e.sections[e.sections.length-1]).map(e => `spells-${e}`), + 'spells-primonster', ...PSIONIC_CORE_SECTIONS.map(e => e.section), 'scrolls', - 'spells-wizmonster', ]; REPEATING_SECTIONS.forEach(section => { on(`clicked:repeating_${section}:show clicked:repeating_${section}:hide`, function (eventInfo) { diff --git a/ADnD_2E_Revised/pug/spellTemplate.pug b/ADnD_2E_Revised/pug/spellTemplate.pug index bda84c1163..56a6b7e763 100644 --- a/ADnD_2E_Revised/pug/spellTemplate.pug +++ b/ADnD_2E_Revised/pug/spellTemplate.pug @@ -23,9 +23,9 @@ fieldset(name="repeating_spells-#REPLACE0#" class="repeating_spells-#REPLACE0#") td input(type="text" name="attr_spell-cast-time" title="@{repeating_spells-#REPLACE0#_$X_spell-cast-time}" class="sheet-short" placeholder="Cast time") td - button(type="roll" name="roll_spell-init" title="@{repeating_spells-#REPLACE0#_$X_spell-init}" value="/gmroll [[{[[1d10]]+(@{spell-cast-time})-(@{misc-mod}), 1}kh1]] [Initiative (@{spell-name})]&{tracker}") Initiative + button(type="roll" name="roll_spell-init" title="@{repeating_spells-#REPLACE0#_$X_spell-init}" value!="/gmroll [[{[[1d10]]+(@{spell-cast-time})-(@{misc-mod}), 1}kh1]] [Initiative (@{spell-name})]&{tracker}") Initiative td - button(type="roll" name="roll_spell-template" title="%{repeating_spells-#REPLACE0#_$X_spell-template}" value="#REPLACE1#&{template:2Espell}{{title=@{spell-name}}}{{splevel=@{spell-level}}}{{school=@{spell-school}}}{{sphere=@{spell-sphere}}}{{components=@{spell-components}}}{{time=@{spell-cast-time}}}{{range=@{spell-range}}}{{duration=@{spell-duration}}}{{aoe=@{spell-aoe}}}{{save=@{spell-saving-throw}}}{{subtlety=@{spell-subtlety}}}{{sensory=@{spell-sensory}}}{{knockdown=@{spell-knockdown}}}{{crit=@{spell-crit-size}}}{{damage=@{spell-damage}}}{{damagetype=@{spell-damage-type}}}{{healing=@{spell-healing}}}{{reference=@{spell-reference}}}{{materials=@{spell-materials}}}#{failureCheck}{{effects=@{spell-effect}}}") T + button(type="roll" name="roll_spell-template" title="%{repeating_spells-#REPLACE0#_$X_spell-template}" value!="#REPLACE1#&{template:2Espell}{{title=@{spell-name}}}{{splevel=@{spell-level}}}{{school=@{spell-school}}}{{sphere=@{spell-sphere}}}{{components=@{spell-components}}}{{time=@{spell-cast-time}}}{{range=@{spell-range}}}{{duration=@{spell-duration}}}{{aoe=@{spell-aoe}}}{{save=@{spell-saving-throw}}}{{subtlety=@{spell-subtlety}}}{{sensory=@{spell-sensory}}}{{knockdown=@{spell-knockdown}}}{{crit=@{spell-crit-size}}}{{damage=@{spell-damage}}}{{damagetype=@{spell-damage-type}}}{{healing=@{spell-healing}}}{{reference=@{spell-reference}}}{{materials=@{spell-materials}}}#{failureCheck}{{effects=@{spell-effect}}}") T td button(type="action" name="act_show" class="btn sheet-hidden sheet-show") ▼ button(type="action" name="act_hide" class="btn sheet-hidden") ▲ From 70937ef324dd9b8b00e85205c65b68e6a51ac5b3 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Thu, 9 Feb 2023 13:15:53 +0100 Subject: [PATCH 12/58] Fixed interpolation --- ADnD_2E_Revised/2ESheet.html | 50 +++++++++---------- .../html/shared/priest-spell-template.html | 2 +- .../html/shared/wizard-spell-template.html | 2 +- ADnD_2E_Revised/pug/spellTemplate.pug | 2 +- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index e13b85dc4b..f01cbb46af 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -4009,7 +4009,7 @@ - + @@ -4310,7 +4310,7 @@ - + @@ -4611,7 +4611,7 @@ - + @@ -4912,7 +4912,7 @@ - + @@ -5213,7 +5213,7 @@ - + @@ -5515,7 +5515,7 @@ - + @@ -5816,7 +5816,7 @@ - + @@ -6117,7 +6117,7 @@ - + @@ -6418,7 +6418,7 @@ - + @@ -6719,7 +6719,7 @@ - + @@ -7020,7 +7020,7 @@ - + @@ -7321,7 +7321,7 @@ - + @@ -7622,7 +7622,7 @@ - + @@ -7923,7 +7923,7 @@ - + @@ -8224,7 +8224,7 @@ - + @@ -8611,7 +8611,7 @@ - + @@ -8914,7 +8914,7 @@ - + @@ -9217,7 +9217,7 @@ - + @@ -9520,7 +9520,7 @@ - + @@ -9823,7 +9823,7 @@ - + @@ -10126,7 +10126,7 @@ - + @@ -10429,7 +10429,7 @@ - + @@ -10726,7 +10726,7 @@ - + @@ -20483,7 +20483,7 @@ - + @@ -20640,7 +20640,7 @@ - + diff --git a/ADnD_2E_Revised/html/shared/priest-spell-template.html b/ADnD_2E_Revised/html/shared/priest-spell-template.html index 351b0cb434..c020dbeebc 100644 --- a/ADnD_2E_Revised/html/shared/priest-spell-template.html +++ b/ADnD_2E_Revised/html/shared/priest-spell-template.html @@ -27,7 +27,7 @@ - + diff --git a/ADnD_2E_Revised/html/shared/wizard-spell-template.html b/ADnD_2E_Revised/html/shared/wizard-spell-template.html index 351b0cb434..f987890da3 100644 --- a/ADnD_2E_Revised/html/shared/wizard-spell-template.html +++ b/ADnD_2E_Revised/html/shared/wizard-spell-template.html @@ -27,7 +27,7 @@ - + diff --git a/ADnD_2E_Revised/pug/spellTemplate.pug b/ADnD_2E_Revised/pug/spellTemplate.pug index 56a6b7e763..3e05e4bfce 100644 --- a/ADnD_2E_Revised/pug/spellTemplate.pug +++ b/ADnD_2E_Revised/pug/spellTemplate.pug @@ -25,7 +25,7 @@ fieldset(name="repeating_spells-#REPLACE0#" class="repeating_spells-#REPLACE0#") td button(type="roll" name="roll_spell-init" title="@{repeating_spells-#REPLACE0#_$X_spell-init}" value!="/gmroll [[{[[1d10]]+(@{spell-cast-time})-(@{misc-mod}), 1}kh1]] [Initiative (@{spell-name})]&{tracker}") Initiative td - button(type="roll" name="roll_spell-template" title="%{repeating_spells-#REPLACE0#_$X_spell-template}" value!="#REPLACE1#&{template:2Espell}{{title=@{spell-name}}}{{splevel=@{spell-level}}}{{school=@{spell-school}}}{{sphere=@{spell-sphere}}}{{components=@{spell-components}}}{{time=@{spell-cast-time}}}{{range=@{spell-range}}}{{duration=@{spell-duration}}}{{aoe=@{spell-aoe}}}{{save=@{spell-saving-throw}}}{{subtlety=@{spell-subtlety}}}{{sensory=@{spell-sensory}}}{{knockdown=@{spell-knockdown}}}{{crit=@{spell-crit-size}}}{{damage=@{spell-damage}}}{{damagetype=@{spell-damage-type}}}{{healing=@{spell-healing}}}{{reference=@{spell-reference}}}{{materials=@{spell-materials}}}#{failureCheck}{{effects=@{spell-effect}}}") T + button(type="roll" name="roll_spell-template" title="%{repeating_spells-#REPLACE0#_$X_spell-template}" value!="#REPLACE1#&{template:2Espell}{{title=@{spell-name}}}{{splevel=@{spell-level}}}{{school=@{spell-school}}}{{sphere=@{spell-sphere}}}{{components=@{spell-components}}}{{time=@{spell-cast-time}}}{{range=@{spell-range}}}{{duration=@{spell-duration}}}{{aoe=@{spell-aoe}}}{{save=@{spell-saving-throw}}}{{subtlety=@{spell-subtlety}}}{{sensory=@{spell-sensory}}}{{knockdown=@{spell-knockdown}}}{{crit=@{spell-crit-size}}}{{damage=@{spell-damage}}}{{damagetype=@{spell-damage-type}}}{{healing=@{spell-healing}}}{{reference=@{spell-reference}}}{{materials=@{spell-materials}}}"+failureCheck+"{{effects=@{spell-effect}}}") T td button(type="action" name="act_show" class="btn sheet-hidden sheet-show") ▼ button(type="action" name="act_hide" class="btn sheet-hidden") ▲ From 46e990585819b57cd283baf340e1a4dc20286106 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Mon, 13 Feb 2023 10:39:17 +0100 Subject: [PATCH 13/58] Added spell tracking for spell points and for Arc / Wind. Now need to find a way to show / hide the the sections based on settings. --- ADnD_2E_Revised/2ESheet.html | 550 +++++++++++++++++- ADnD_2E_Revised/futureIdeas.txt | 24 +- .../html/shared/priest-spell-template.html | 22 +- .../html/shared/wizard-spell-template.html | 22 +- ADnD_2E_Revised/pug/spellTemplate.pug | 18 +- 5 files changed, 588 insertions(+), 48 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index f01cbb46af..976af64dd7 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -4029,7 +4029,27 @@ / - + + + + + + + + + + + +
Spell Points Used
+ +
+ + + + + +
Arcs Used
+
@@ -4330,7 +4350,27 @@ / - + + + + + + + + + + + +
Spell Points Used
+ +
+ + + + + +
Arcs Used
+
@@ -4631,7 +4671,27 @@ / - + + + + + + + + + + + +
Spell Points Used
+ +
+ + + + + +
Arcs Used
+
@@ -4932,7 +4992,27 @@ / - + + + + + + + + + + + +
Spell Points Used
+ +
+ + + + + +
Arcs Used
+
@@ -5233,7 +5313,27 @@ / - + + + + + + + + + + + +
Spell Points Used
+ +
+ + + + + +
Arcs Used
+
@@ -5535,7 +5635,27 @@ / - + + + + + + + + + + + +
Spell Points Used
+ +
+ + + + + +
Arcs Used
+
@@ -5836,7 +5956,27 @@ / - + + + + + + + + + + + +
Spell Points Used
+ +
+ + + + + +
Arcs Used
+
@@ -6137,7 +6277,27 @@ / - + + + + + + + + + + + +
Spell Points Used
+ +
+ + + + + +
Arcs Used
+
@@ -6438,7 +6598,27 @@ / - + + + + + + + + + + + +
Spell Points Used
+ +
+ + + + + +
Arcs Used
+
@@ -6739,7 +6919,27 @@ / - + + + + + + + + + + + +
Spell Points Used
+ +
+ + + + + +
Arcs Used
+
@@ -7040,7 +7240,27 @@ / - + + + + + + + + + + + +
Spell Points Used
+ +
+ + + + + +
Arcs Used
+
@@ -7341,7 +7561,27 @@ / - + + + + + + + + + + + +
Spell Points Used
+ +
+ + + + + +
Arcs Used
+
@@ -7642,7 +7882,27 @@ / - + + + + + + + + + + + +
Spell Points Used
+ +
+ + + + + +
Arcs Used
+
@@ -7943,7 +8203,27 @@ / - + + + + + + + + + + + +
Spell Points Used
+ +
+ + + + + +
Arcs Used
+
@@ -8244,7 +8524,27 @@ / - + + + + + + + + + + + +
Spell Points Used
+ +
+ + + + + +
Arcs Used
+
@@ -8631,7 +8931,27 @@ / - + + + + + + + + + + + +
Spell Points Used
+ +
+ + + + + +
Winds Used
+
@@ -8934,7 +9254,27 @@ / - + + + + + + + + + + + +
Spell Points Used
+ +
+ + + + + +
Winds Used
+
@@ -9237,7 +9577,27 @@ / - + + + + + + + + + + + +
Spell Points Used
+ +
+ + + + + +
Winds Used
+
@@ -9540,7 +9900,27 @@ / - + + + + + + + + + + + +
Spell Points Used
+ +
+ + + + + +
Winds Used
+
@@ -9843,7 +10223,27 @@ / - + + + + + + + + + + + +
Spell Points Used
+ +
+ + + + + +
Winds Used
+
@@ -10146,7 +10546,27 @@ / - + + + + + + + + + + + +
Spell Points Used
+ +
+ + + + + +
Winds Used
+
@@ -10449,7 +10869,27 @@ / - + + + + + + + + + + + +
Spell Points Used
+ +
+ + + + + +
Winds Used
+
@@ -10746,7 +11186,27 @@ / - + + + + + + + + + + + +
Spell Points Used
+ +
+ + + + + +
Winds Used
+
@@ -20503,7 +20963,27 @@ / - + + + + + + + + + + + +
Spell Points Used
+ +
+ + + + + +
Arcs Used
+
@@ -20660,7 +21140,27 @@ / - + + + + + + + + + + + +
Spell Points Used
+ +
+ + + + + +
Winds Used
+
diff --git a/ADnD_2E_Revised/futureIdeas.txt b/ADnD_2E_Revised/futureIdeas.txt index 41292df675..a9ff1684e9 100644 --- a/ADnD_2E_Revised/futureIdeas.txt +++ b/ADnD_2E_Revised/futureIdeas.txt @@ -1,20 +1,4 @@ -Possible NPC sheet -- Follower sheet -- Add top level button to jump directly to the Follower sheet -- More detailed weapons and such for npcs -- Remove repeating NPC sections? - -- Structured spell book, which fields for total pages, pages used, and remaining pages. --- Multiple spell books --- A roll button for the number of pages needed --- A roll button for the number of days to write it into the book - -- Armor Class detailed breakdown -- Armor class Slashing/Piercing/Bludgeoning - -Follower classes - -AD&D 2E Book release order +AD&D 2E Book release order The Complete Fighter's Handbook 1989 December The Complete Thief's Handbook 1989 December The Complete Priest's Handbook 1990 May @@ -271,4 +255,8 @@ http://www.wizards.com/dnd/DnDDMGErrata.asp http://www.wizards.com/dnd/DnDPlayersOptionSkillsPowersErrata.asp http://www.wizards.com/dnd/DnDPlayersOptionSkillsPowers2ndErrata.asp http://www.wizards.com/dnd/DnDPlayersOptionSkillsPowers3rdErrata.asp -http://www.wizards.com/dnd/DnDPlayersOptionCombatTacticsErrata.asp \ No newline at end of file +http://www.wizards.com/dnd/DnDPlayersOptionCombatTacticsErrata.asp + +Spell points and Arc are different systems. They should be separated when selecting spell tracking. +Add a field for Wind bonus from Wisdom and Level, and sum them in the total field. +Leave Arc as is, as there are no different sources \ No newline at end of file diff --git a/ADnD_2E_Revised/html/shared/priest-spell-template.html b/ADnD_2E_Revised/html/shared/priest-spell-template.html index c020dbeebc..ebeb2cda69 100644 --- a/ADnD_2E_Revised/html/shared/priest-spell-template.html +++ b/ADnD_2E_Revised/html/shared/priest-spell-template.html @@ -47,7 +47,27 @@ / - + + + + + + + + + + + +
Spell Points Used
+ +
+ + + + + +
Winds Used
+
diff --git a/ADnD_2E_Revised/html/shared/wizard-spell-template.html b/ADnD_2E_Revised/html/shared/wizard-spell-template.html index f987890da3..4d10149a5c 100644 --- a/ADnD_2E_Revised/html/shared/wizard-spell-template.html +++ b/ADnD_2E_Revised/html/shared/wizard-spell-template.html @@ -47,7 +47,27 @@ / - + + + + + + + + + + + +
Spell Points Used
+ +
+ + + + + +
Arcs Used
+
diff --git a/ADnD_2E_Revised/pug/spellTemplate.pug b/ADnD_2E_Revised/pug/spellTemplate.pug index 3e05e4bfce..615876fc61 100644 --- a/ADnD_2E_Revised/pug/spellTemplate.pug +++ b/ADnD_2E_Revised/pug/spellTemplate.pug @@ -1,8 +1,8 @@ - let failureCheck = '' -- let spellPoints = 'Arc' +- let arcWind = 'Arc' if isPriest - failureCheck = '{{checkroll=[[1d100]]%}}{{checktarget=#REPLACE2#}}{{fail=The spell is expended with absolutely no effect whatsoever.}}' - - spellPoints = 'Wind' + - arcWind = 'Wind' fieldset(name="repeating_spells-#REPLACE0#" class="repeating_spells-#REPLACE0#") div(class="sheet-spell-line") table(class="sheet-default-header-first-row sheet-inline" style="flex-grow: 1") @@ -39,7 +39,19 @@ fieldset(name="repeating_spells-#REPLACE0#" class="repeating_spells-#REPLACE0#") input(type="number" name="attr_spell-cast-value" title="@{repeating_spells-#REPLACE0#_$X_spell-cast-value}" class="sheet-short" value="0") td(class="sheet-centering-padding-5") / td - input(type="number" name="attr_spell-memorized" title="@{repeating_spells-#REPLACE0#_$X_spell-memorized}" class="sheet-short" value="0") + input(type="number" name="attr_spell-memorized" title="@{repeating_spells-#REPLACE0#_$X_spell-memorized}" class="sheet-table-dynamic" value="0") + table(class="sheet-default-header-first-row") + tr(class="sheet-collapse sheet-show-first") + td Spell Points Used + tr + td + input(type="number" name="attr_spell-points" title="@{repeating_spells-#REPLACE0#_$X_spell-points}" class="sheet-table-dynamic" value="0") + table(class="sheet-default-header-first-row") + tr(class="sheet-collapse sheet-show-first") + td #{arcWind}s Used + tr + td + input(type="number" name="attr_spell-"+arcWind.toLowerCase() title="@{repeating_spells-#REPLACE0#_$X_spell-"+arcWind.toLowerCase()+"}" class="sheet-table-dynamic" value="0") div(class="sheet-hidden") div(class="sheet-spell-fold") table(class="sheet-default-header-odd-column" style="align-self: flex-start") From 8ec8925651f96c31a66df36753c4ac2a23b68720 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Mon, 13 Feb 2023 11:08:46 +0100 Subject: [PATCH 14/58] Added more fields for Winds. Still need sheetworker code to update the total --- ADnD_2E_Revised/2ESheet.html | 10 ++++++++-- .../html/tabs/character-tab/spells-tab/priest-tab.html | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 976af64dd7..14cade4fd1 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -8789,12 +8789,18 @@ + + + - - + + + + +
LevelWisdom Total| Remaining
WindWinds|
diff --git a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html index 5933f59196..f2f48bd79b 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html @@ -37,12 +37,18 @@ + + + - - + + + + +
LevelWisdom Total| Remaining
WindWinds|
From fe1fe0a8ebc68797014a1a895e9423c06b363fb3 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Wed, 15 Feb 2023 11:23:06 +0100 Subject: [PATCH 15/58] Initial work for show hiding slots, points and arcs --- ADnD_2E_Revised/2ESheet.html | 449 ++++++++++-------- ADnD_2E_Revised/2EStyle.css | 45 +- ADnD_2E_Revised/css/2EStyle-base.css | 45 +- ADnD_2E_Revised/html/2ESheet-base.html | 2 +- ADnD_2E_Revised/html/changelog.html | 2 +- .../html/shared/priest-spell-template.html | 10 +- .../html/shared/wizard-spell-template.html | 10 +- .../tabs/character-tab/equipment-tab.html | 2 +- .../html/tabs/character-tab/spells-tab.html | 4 + .../components/priest-sphere-button.html | 3 +- .../components/spell-slots-reset-button.html | 2 +- .../spell-slots-tracking-wizard.html | 39 ++ .../character-tab/spells-tab/priest-tab.html | 102 ++-- .../character-tab/spells-tab/wizard-tab.html | 72 ++- ...-settings.html => sheet-settings-tab.html} | 20 +- ADnD_2E_Revised/html/toast.html | 2 +- ADnD_2E_Revised/javascript/sheetWorkers.js | 20 +- ADnD_2E_Revised/pug/spellTemplate.pug | 10 +- 18 files changed, 488 insertions(+), 351 deletions(-) create mode 100644 ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/spell-slots-tracking-wizard.html rename ADnD_2E_Revised/html/tabs/{sheet-settings.html => sheet-settings-tab.html} (88%) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 14cade4fd1..8da5ea6491 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -5,7 +5,7 @@
Announcements -
+

Changes in

    @@ -3853,6 +3853,10 @@ Powers

    + + + +

    Spell Levels


    @@ -3874,45 +3878,6 @@ Level 15

    - Spell Points & Arc - Player's Option: Spells & Magic -
    - - - - - - - - - - - - - - - - - - - -
    LevelSpecialistIntelligenceTotal|Remaining
    Spell Points|
    - -
    - - - - - - - - - - - -
    TotalRemaining
    Arc
    - -
    -
    @@ -3921,7 +3886,40 @@
    Wizard caster level
    -
    + + + + + + + + + + + + + + + + + + + + +
    LevelSpecialistIntelligenceTotal|Remaining
    Spell Points|
    + + + + + + + + + + + +
    TotalRemaining
    Arc
    +
    Level 7  Quest

    - Spell Points & Wind - Player's Option: Spells & Magic -
    - - - - - - - - - - - - - - - - - -
    LevelWisdomTotal|Remaining
    Spell Points|
    - -
    - - - - - - - - - - - - - - - - - - -
    LevelWisdomTotal|Remaining
    Winds|
    - -
    -
    @@ -8815,7 +8799,45 @@
    Priest caster level
    -
    + + + + + + + + + + + + + + + + + + +
    LevelWisdomTotal|Remaining
    Spell Points|
    + + + + + + + + + + + + + + + + + + +
    LevelWisdomTotal|Remaining
    Winds|
    +
    -
    - Major: - - -
    - Minor: - - -
    +
    +
    + Major: + + +
    + Minor: + + +
    +
    - -
    +


    @@ -8889,6 +8912,7 @@

    Spells Memorized

    +
    @@ -8925,7 +8949,7 @@
    - +
    @@ -8941,7 +8965,7 @@
    Cast
    - +
    @@ -8951,7 +8975,7 @@
    Spell Points Used
    - +
    @@ -9053,6 +9077,7 @@ +
    @@ -9164,8 +9189,7 @@
    - -
    +


    @@ -9212,6 +9236,7 @@

    Spells Memorized

    +
    Winds Used
    @@ -9248,7 +9273,7 @@
    - +
    @@ -9264,7 +9289,7 @@
    Cast
    - +
    @@ -9274,7 +9299,7 @@
    Spell Points Used
    - +
    @@ -9376,6 +9401,7 @@ +
    @@ -9487,8 +9513,7 @@
    - -
    +


    @@ -9535,6 +9560,7 @@

    Spells Memorized

    +
    Winds Used
    @@ -9571,7 +9597,7 @@
    - +
    @@ -9587,7 +9613,7 @@
    Cast
    - +
    @@ -9597,7 +9623,7 @@
    Spell Points Used
    - +
    @@ -9699,6 +9725,7 @@ +
    @@ -9810,8 +9837,7 @@
    - -
    +


    @@ -9858,6 +9884,7 @@

    Spells Memorized

    +
    Winds Used
    @@ -9894,7 +9921,7 @@
    - +
    @@ -9910,7 +9937,7 @@
    Cast
    - +
    @@ -9920,7 +9947,7 @@
    Spell Points Used
    - +
    @@ -10022,6 +10049,7 @@ +
    @@ -10133,8 +10161,7 @@
    - -
    +


    @@ -10181,6 +10208,7 @@

    Spells Memorized

    +
    Winds Used
    @@ -10217,7 +10245,7 @@
    - +
    @@ -10233,7 +10261,7 @@
    Cast
    - +
    @@ -10243,7 +10271,7 @@
    Spell Points Used
    - +
    @@ -10345,6 +10373,7 @@ +
    @@ -10456,8 +10485,7 @@
    - -
    +


    @@ -10504,6 +10532,7 @@

    Spells Memorized

    +
    Winds Used
    @@ -10540,7 +10569,7 @@
    - +
    @@ -10556,7 +10585,7 @@
    Cast
    - +
    @@ -10566,7 +10595,7 @@
    Spell Points Used
    - +
    @@ -10668,6 +10697,7 @@ +
    @@ -10779,8 +10809,7 @@
    - -
    +


    @@ -10827,6 +10856,7 @@

    Spells Memorized

    +
    Winds Used
    @@ -10863,7 +10893,7 @@
    - +
    @@ -10879,7 +10909,7 @@
    Cast
    - +
    @@ -10889,7 +10919,7 @@
    Spell Points Used
    - +
    @@ -10991,6 +11021,7 @@ +
    @@ -11144,6 +11175,7 @@

    Spells Memorized

    +
    Winds Used
    @@ -11180,7 +11212,7 @@
    - +
    @@ -11196,7 +11228,7 @@
    Cast
    - +
    @@ -11206,7 +11238,7 @@
    Spell Points Used
    - +
    @@ -11308,6 +11340,7 @@ +
    @@ -13026,7 +13059,7 @@
    -
    +
    Winds Used
    @@ -20921,6 +20954,7 @@
    Slot
    +
    @@ -20957,7 +20991,7 @@
    - +
    @@ -20973,7 +21007,7 @@
    Cast
    - +
    @@ -20983,7 +21017,7 @@
    Spell Points Used
    - +
    @@ -21085,6 +21119,7 @@ +
    @@ -21098,6 +21133,7 @@
    Arcs Used
    +
    @@ -21134,7 +21170,7 @@
    - +
    @@ -21150,7 +21186,7 @@
    Cast
    - +
    @@ -21160,7 +21196,7 @@
    Spell Points Used
    - +
    @@ -21262,6 +21298,7 @@ +
    @@ -21308,7 +21345,7 @@

    General

    -

    Select books to include autofil information from:

    +

    Select books to include autofill information from:

    Winds Used
    @@ -21483,6 +21520,9 @@
    Book

    +

    Miscellaneous modifier popup

    +

    By default all rolls creates a popup asking for a 'Miscellaneous modifier' to capture when the DM says: 'Make an X-roll with +2'. + If your DM rarely asks for this, if you find the popup annoying, or if you would rather add any bonuses after the roll is made, this popup can be turned off



    +

    Spell tracking system

    + AD&D 2E have different systems for tracking spells, three have been implemented: +
      +
    • Spell slots: The default system described in the Player's Handbook
    • +
    • Spell Points: Introduced in the Player's Option: Spells & Magic book
    • +
    • Arcs, Songs, Winds: Introduced in Forgotten Realms, Netheril: Empire of Magic
    • +
    + + +
    +

    Character Sheet specific


    Monster Sheet specific

    @@ -21502,7 +21557,7 @@
    -
    +
    @@ -69545,8 +69600,8 @@ function setupRepeatingSpellSumming(sections, oldField, newField, resultFieldNam function setupCalculateRemaining(totalField, sumField, remainingField) { on(`change:${totalField} change:${sumField}`, function () { getAttrs([totalField, sumField], function (values) { - let intTotal = parseInt(values[totalField]); - let intSum = parseInt(values[sumField]); + let intTotal = parseInt(values[totalField]) || 0; + let intSum = parseInt(values[sumField]) || 0; console.log(`Setting ${remainingField} with value from ${totalField}: ${intTotal} and ${sumField}: ${intSum}`); @@ -69827,6 +69882,17 @@ function setupAutoFillSpellInfo(section, spellsTable, optionalRulesFields) { }); } +const addSpellRow = function(section) { + on(`clicked:spells-${section}-add-row`, function (eventObject) { + getAttrs(['spell-tracking-system'], function (values) { + let spellTrackingSystem = values['spell-tracking-system']; + const rowID = generateRowID(); + const setObj = {}; + setObj[`repeating_spells-${section}_${rowID}_show-${spellTrackingSystem}`] = 1; + setAttrs(setObj,{silent:true}); + }); + }); +} let wizardSpellLevelsSections = [ {level: '1', sections: ['', '2', '3', 'wiz1']}, @@ -69877,6 +69943,7 @@ wizardSpellLevelsSections.forEach(spellLevel => { if (isNewSpellSection(lastSection)) { setupAutoFillSpellInfo(lastSection, wizardSpells, SCHOOL_FIELDS); setupSpellCrit(lastSection); + addSpellRow(lastSection); } }); setupAutoFillSpellInfo('wizmonster', wizardSpells, SCHOOL_FIELDS); @@ -71490,7 +71557,7 @@ PSIONIC_CORE_SECTIONS.forEach(({section, name, macro, number, cost_number, disci //#endregion // Show / Hide buttons for various repeating sections -const REPEATING_SECTIONS = [ +const FOLDABLE_REPEATING_SECTIONS = [ ...wizardSpellLevelsSections.map(e => e.sections[e.sections.length-1]).map(e => `spells-${e}`), 'spells-wizmonster', ...priestSpellLevelsSections.map(e => e.sections[e.sections.length-1]).map(e => `spells-${e}`), @@ -71498,7 +71565,7 @@ const REPEATING_SECTIONS = [ ...PSIONIC_CORE_SECTIONS.map(e => e.section), 'scrolls', ]; -REPEATING_SECTIONS.forEach(section => { +FOLDABLE_REPEATING_SECTIONS.forEach(section => { on(`clicked:repeating_${section}:show clicked:repeating_${section}:hide`, function (eventInfo) { let parse = parseSourceAttribute(eventInfo); $20(`div[data-reprowid=${parse.rowId}] .sheet-hidden`).toggleClass('sheet-show'); diff --git a/ADnD_2E_Revised/2EStyle.css b/ADnD_2E_Revised/2EStyle.css index 8dc62a9411..01a66f4980 100644 --- a/ADnD_2E_Revised/2EStyle.css +++ b/ADnD_2E_Revised/2EStyle.css @@ -1755,6 +1755,7 @@ th { padding-left: inherit; } +/* Show hide styling */ .sheet-collapse { visibility: collapse; } @@ -1762,20 +1763,25 @@ th { .sheet-hidden { display: none; } -.sheet-hidden.sheet-show { + +.sheet-hidden.sheet-show, +input.sheet-show-announcement:checked ~ .sheet-hidden, +input.sheet-show-worn-equipment:checked ~ .sheet-hidden, +input.sheet-show-spell-slots:checked ~ .sheet-tab-content .sheet-spell-slots.sheet-hidden, +input.sheet-show-spell-points:checked ~ .sheet-tab-content .sheet-spell-points.sheet-hidden, +input.sheet-show-spell-arcs-winds:checked ~ .sheet-tab-content .sheet-spell-arcs-winds.sheet-hidden, +input.sheet-show-spell-spheres-pri:checked ~ div .sheet-spell-sphere-pri.sheet-hidden, +input.sheet-show-toast:checked + .sheet-hidden +{ display: revert; } + .btn.sheet-hidden { padding-top: 2px; padding-left: 8px; padding-right: 8px; } -div.repcontainer:not(.editmode) div.repitem td button[type="action"], -div.repcontainer:not(.editmode) div.repitem th button[type="action"] { - position: relative; -} - div.repcontainer div.repitem:first-child td.sheet-show-first, div.repcontainer div.repitem:first-child tr.sheet-show-first, div.repcontainer div.repitem:first-child th.sheet-show-first, @@ -1788,24 +1794,19 @@ details > summary:first-of-type { display: list-item; } -/* Show hide styling */ -.sheet-worn-equipment, -.sheet-spell-points-wiz, -.sheet-spell-points-pri, -.sheet-spell-sphere-pri, -.sheet-announcement, -.sheet-toast { - display: none; +/* Fix action buttons in repeating tables */ +div.repcontainer:not(.editmode) div.repitem td button[type="action"], +div.repcontainer:not(.editmode) div.repitem th button[type="action"] { + position: relative; } -input.sheet-show-worn-equipment:checked ~ .sheet-worn-equipment, -input.sheet-show-spell-points-wiz:checked ~ .sheet-spell-points-wiz, -input.sheet-show-spell-points-pri:checked ~ .sheet-spell-points-pri, -input.sheet-show-spell-spheres-pri:checked ~ .sheet-spell-sphere-pri, -input.sheet-show-announcement:checked ~ .sheet-announcement, -input.sheet-show-toast:checked ~ .sheet-toast -{ - display: block; +/* Hide +Add button so that it can be controlled from sheetworker */ +.repcontrol-hide-add ~ .repcontrol > .repcontrol_add { + display: none !important; +} + +.editmode ~ .repcontrol-button { + display: none; } .sheet-action-button, diff --git a/ADnD_2E_Revised/css/2EStyle-base.css b/ADnD_2E_Revised/css/2EStyle-base.css index e2e4bfa73f..608cb662f0 100644 --- a/ADnD_2E_Revised/css/2EStyle-base.css +++ b/ADnD_2E_Revised/css/2EStyle-base.css @@ -1061,6 +1061,7 @@ th { padding-left: inherit; } +/* Show hide styling */ .sheet-collapse { visibility: collapse; } @@ -1068,20 +1069,25 @@ th { .sheet-hidden { display: none; } -.sheet-hidden.sheet-show { + +.sheet-hidden.sheet-show, +input.sheet-show-announcement:checked ~ .sheet-hidden, +input.sheet-show-worn-equipment:checked ~ .sheet-hidden, +input.sheet-show-spell-slots:checked ~ .sheet-tab-content .sheet-spell-slots.sheet-hidden, +input.sheet-show-spell-points:checked ~ .sheet-tab-content .sheet-spell-points.sheet-hidden, +input.sheet-show-spell-arcs-winds:checked ~ .sheet-tab-content .sheet-spell-arcs-winds.sheet-hidden, +input.sheet-show-spell-spheres-pri:checked ~ div .sheet-spell-sphere-pri.sheet-hidden, +input.sheet-show-toast:checked + .sheet-hidden +{ display: revert; } + .btn.sheet-hidden { padding-top: 2px; padding-left: 8px; padding-right: 8px; } -div.repcontainer:not(.editmode) div.repitem td button[type="action"], -div.repcontainer:not(.editmode) div.repitem th button[type="action"] { - position: relative; -} - div.repcontainer div.repitem:first-child td.sheet-show-first, div.repcontainer div.repitem:first-child tr.sheet-show-first, div.repcontainer div.repitem:first-child th.sheet-show-first, @@ -1094,24 +1100,19 @@ details > summary:first-of-type { display: list-item; } -/* Show hide styling */ -.sheet-worn-equipment, -.sheet-spell-points-wiz, -.sheet-spell-points-pri, -.sheet-spell-sphere-pri, -.sheet-announcement, -.sheet-toast { - display: none; +/* Fix action buttons in repeating tables */ +div.repcontainer:not(.editmode) div.repitem td button[type="action"], +div.repcontainer:not(.editmode) div.repitem th button[type="action"] { + position: relative; } -input.sheet-show-worn-equipment:checked ~ .sheet-worn-equipment, -input.sheet-show-spell-points-wiz:checked ~ .sheet-spell-points-wiz, -input.sheet-show-spell-points-pri:checked ~ .sheet-spell-points-pri, -input.sheet-show-spell-spheres-pri:checked ~ .sheet-spell-sphere-pri, -input.sheet-show-announcement:checked ~ .sheet-announcement, -input.sheet-show-toast:checked ~ .sheet-toast -{ - display: block; +/* Hide +Add button so that it can be controlled from sheetworker */ +.repcontrol-hide-add ~ .repcontrol > .repcontrol_add { + display: none !important; +} + +.editmode ~ .repcontrol-button { + display: none; } .sheet-action-button, diff --git a/ADnD_2E_Revised/html/2ESheet-base.html b/ADnD_2E_Revised/html/2ESheet-base.html index 8d0582f721..20147b25fb 100644 --- a/ADnD_2E_Revised/html/2ESheet-base.html +++ b/ADnD_2E_Revised/html/2ESheet-base.html @@ -14,7 +14,7 @@ insert_changelog.html insert_character-tab.html insert_monster-tab.html -insert_sheet-settings.html +insert_sheet-settings-tab.html insert_toast.html diff --git a/ADnD_2E_Revised/html/changelog.html b/ADnD_2E_Revised/html/changelog.html index 2821603319..a6ee70ec51 100644 --- a/ADnD_2E_Revised/html/changelog.html +++ b/ADnD_2E_Revised/html/changelog.html @@ -1,6 +1,6 @@
    Announcements -
    +

    Changes in

      diff --git a/ADnD_2E_Revised/html/shared/priest-spell-template.html b/ADnD_2E_Revised/html/shared/priest-spell-template.html index ebeb2cda69..6b0724d56a 100644 --- a/ADnD_2E_Revised/html/shared/priest-spell-template.html +++ b/ADnD_2E_Revised/html/shared/priest-spell-template.html @@ -1,4 +1,5 @@ +
      @@ -35,7 +36,7 @@
      - +
      @@ -51,7 +52,7 @@
      Cast
      - +
      @@ -61,7 +62,7 @@
      Spell Points Used
      - +
      @@ -162,4 +163,5 @@ - \ No newline at end of file + + \ No newline at end of file diff --git a/ADnD_2E_Revised/html/shared/wizard-spell-template.html b/ADnD_2E_Revised/html/shared/wizard-spell-template.html index 4d10149a5c..12adb8b890 100644 --- a/ADnD_2E_Revised/html/shared/wizard-spell-template.html +++ b/ADnD_2E_Revised/html/shared/wizard-spell-template.html @@ -1,4 +1,5 @@ +
      Winds Used
      @@ -35,7 +36,7 @@
      - +
      @@ -51,7 +52,7 @@
      Cast
      - +
      @@ -61,7 +62,7 @@
      Spell Points Used
      - +
      @@ -162,4 +163,5 @@ - \ No newline at end of file + + \ No newline at end of file diff --git a/ADnD_2E_Revised/html/tabs/character-tab/equipment-tab.html b/ADnD_2E_Revised/html/tabs/character-tab/equipment-tab.html index 6149daaa92..1a17b204e6 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/equipment-tab.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/equipment-tab.html @@ -3,7 +3,7 @@
      -
      +
      Arcs Used
      diff --git a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab.html b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab.html index a0e385cbeb..aab1250af3 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab.html @@ -7,6 +7,10 @@ Powers

      + + + + insert_wizard-tab.html insert_priest-tab.html insert_powers-tab.html diff --git a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/priest-sphere-button.html b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/priest-sphere-button.html index 2c53c9b4bd..30b997858c 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/priest-sphere-button.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/priest-sphere-button.html @@ -1,5 +1,4 @@ - -
      +


      diff --git a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/spell-slots-reset-button.html b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/spell-slots-reset-button.html index 5d48c07d0e..9eb4b7c6d4 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/spell-slots-reset-button.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/spell-slots-reset-button.html @@ -1,4 +1,4 @@ -
      +
      Slot
      + + + + + + + + + + + + + + + + + + +
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      + + + + + + + + + + + + + + + + +
      Available to
      Memorize|Cast
      |
      + + \ No newline at end of file diff --git a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html index f2f48bd79b..21ba6d13e0 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html @@ -11,50 +11,6 @@ Level 7  Quest

      - Spell Points & Wind - Player's Option: Spells & Magic -
      - - - - - - - - - - - - - - - - - -
      LevelWisdomTotal|Remaining
      Spell Points|
      - -
      - - - - - - - - - - - - - - - - - - -
      LevelWisdomTotal|Remaining
      Winds|
      - -
      -
      @@ -63,18 +19,58 @@
      Priest caster level
      + + + + + + + + + + + + + + + + + + +
      LevelWisdomTotal|Remaining
      Spell Points|
      + + + + + + + + + + + + + + + + + + +
      LevelWisdomTotal|Remaining
      Winds|
      insert_spell-slots-reset-button.html_(pri,(Not Quest))

      Show Spheres of Influence: -
      - Major: - - -
      - Minor: - - -
      +
      +
      + Major: + + +
      + Minor: + + +
      +
      diff --git a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html index df03fd9563..c116465f89 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html @@ -19,45 +19,6 @@ Level 15

      - Spell Points & Arc - Player's Option: Spells & Magic -
      - - - - - - - - - - - - - - - - - - - -
      LevelSpecialistIntelligenceTotal|Remaining
      Spell Points|
      - -
      - - - - - - - - - - - -
      TotalRemaining
      Arc
      - -
      -
      @@ -66,6 +27,39 @@
      Wizard caster level
      + + + + + + + + + + + + + + + + + + + + +
      LevelSpecialistIntelligenceTotal|Remaining
      Spell Points|
      + + + + + + + + + + + +
      TotalRemaining
      Arc
      insert_spell-slots-reset-button.html_(wiz)
      diff --git a/ADnD_2E_Revised/html/tabs/sheet-settings.html b/ADnD_2E_Revised/html/tabs/sheet-settings-tab.html similarity index 88% rename from ADnD_2E_Revised/html/tabs/sheet-settings.html rename to ADnD_2E_Revised/html/tabs/sheet-settings-tab.html index be37dda28d..b8c025d263 100644 --- a/ADnD_2E_Revised/html/tabs/sheet-settings.html +++ b/ADnD_2E_Revised/html/tabs/sheet-settings-tab.html @@ -1,6 +1,6 @@

      General

      -

      Select books to include autofil information from:

      +

      Select books to include autofill information from:

      @@ -175,6 +175,9 @@
      Book

      +

      Miscellaneous modifier popup

      +

      By default all rolls creates a popup asking for a 'Miscellaneous modifier' to capture when the DM says: 'Make an X-roll with +2'. + If your DM rarely asks for this, if you find the popup annoying, or if you would rather add any bonuses after the roll is made, this popup can be turned off



      +

      Spell tracking system

      + AD&D 2E have different systems for tracking spells, three have been implemented: +
        +
      • Spell slots: The default system described in the Player's Handbook
      • +
      • Spell Points: Introduced in the Player's Option: Spells & Magic book
      • +
      • Arcs, Songs, Winds: Introduced in Forgotten Realms, Netheril: Empire of Magic
      • +
      + + +
      +

      Character Sheet specific


      Monster Sheet specific

      diff --git a/ADnD_2E_Revised/html/toast.html b/ADnD_2E_Revised/html/toast.html index e36f0d3eab..7af49133a0 100644 --- a/ADnD_2E_Revised/html/toast.html +++ b/ADnD_2E_Revised/html/toast.html @@ -1,6 +1,6 @@
      -
      +
      diff --git a/ADnD_2E_Revised/javascript/sheetWorkers.js b/ADnD_2E_Revised/javascript/sheetWorkers.js index 4a429cfbef..83f68b1a97 100644 --- a/ADnD_2E_Revised/javascript/sheetWorkers.js +++ b/ADnD_2E_Revised/javascript/sheetWorkers.js @@ -936,8 +936,8 @@ function setupRepeatingSpellSumming(sections, oldField, newField, resultFieldNam function setupCalculateRemaining(totalField, sumField, remainingField) { on(`change:${totalField} change:${sumField}`, function () { getAttrs([totalField, sumField], function (values) { - let intTotal = parseInt(values[totalField]); - let intSum = parseInt(values[sumField]); + let intTotal = parseInt(values[totalField]) || 0; + let intSum = parseInt(values[sumField]) || 0; console.log(`Setting ${remainingField} with value from ${totalField}: ${intTotal} and ${sumField}: ${intSum}`); @@ -1218,6 +1218,17 @@ function setupAutoFillSpellInfo(section, spellsTable, optionalRulesFields) { }); } +const addSpellRow = function(section) { + on(`clicked:spells-${section}-add-row`, function (eventObject) { + getAttrs(['spell-tracking-system'], function (values) { + let spellTrackingSystem = values['spell-tracking-system']; + const rowID = generateRowID(); + const setObj = {}; + setObj[`repeating_spells-${section}_${rowID}_show-${spellTrackingSystem}`] = 1; + setAttrs(setObj,{silent:true}); + }); + }); +} let wizardSpellLevelsSections = [ {level: '1', sections: ['', '2', '3', 'wiz1']}, @@ -1268,6 +1279,7 @@ wizardSpellLevelsSections.forEach(spellLevel => { if (isNewSpellSection(lastSection)) { setupAutoFillSpellInfo(lastSection, wizardSpells, SCHOOL_FIELDS); setupSpellCrit(lastSection); + addSpellRow(lastSection); } }); setupAutoFillSpellInfo('wizmonster', wizardSpells, SCHOOL_FIELDS); @@ -2881,7 +2893,7 @@ PSIONIC_CORE_SECTIONS.forEach(({section, name, macro, number, cost_number, disci //#endregion // Show / Hide buttons for various repeating sections -const REPEATING_SECTIONS = [ +const FOLDABLE_REPEATING_SECTIONS = [ ...wizardSpellLevelsSections.map(e => e.sections[e.sections.length-1]).map(e => `spells-${e}`), 'spells-wizmonster', ...priestSpellLevelsSections.map(e => e.sections[e.sections.length-1]).map(e => `spells-${e}`), @@ -2889,7 +2901,7 @@ const REPEATING_SECTIONS = [ ...PSIONIC_CORE_SECTIONS.map(e => e.section), 'scrolls', ]; -REPEATING_SECTIONS.forEach(section => { +FOLDABLE_REPEATING_SECTIONS.forEach(section => { on(`clicked:repeating_${section}:show clicked:repeating_${section}:hide`, function (eventInfo) { let parse = parseSourceAttribute(eventInfo); $20(`div[data-reprowid=${parse.rowId}] .sheet-hidden`).toggleClass('sheet-show'); diff --git a/ADnD_2E_Revised/pug/spellTemplate.pug b/ADnD_2E_Revised/pug/spellTemplate.pug index 615876fc61..0ce5bdae05 100644 --- a/ADnD_2E_Revised/pug/spellTemplate.pug +++ b/ADnD_2E_Revised/pug/spellTemplate.pug @@ -3,6 +3,7 @@ if isPriest - failureCheck = '{{checkroll=[[1d100]]%}}{{checktarget=#REPLACE2#}}{{fail=The spell is expended with absolutely no effect whatsoever.}}' - arcWind = 'Wind' +div(class="repcontrol-hide-add") fieldset(name="repeating_spells-#REPLACE0#" class="repeating_spells-#REPLACE0#") div(class="sheet-spell-line") table(class="sheet-default-header-first-row sheet-inline" style="flex-grow: 1") @@ -29,7 +30,7 @@ fieldset(name="repeating_spells-#REPLACE0#" class="repeating_spells-#REPLACE0#") td button(type="action" name="act_show" class="btn sheet-hidden sheet-show") ▼ button(type="action" name="act_hide" class="btn sheet-hidden") ▲ - table(class="sheet-default-header-first-row") + table(class="sheet-default-header-first-row spell-slots sheet-hidden") tr(class="sheet-collapse sheet-show-first") td Cast td @@ -40,13 +41,13 @@ fieldset(name="repeating_spells-#REPLACE0#" class="repeating_spells-#REPLACE0#") td(class="sheet-centering-padding-5") / td input(type="number" name="attr_spell-memorized" title="@{repeating_spells-#REPLACE0#_$X_spell-memorized}" class="sheet-table-dynamic" value="0") - table(class="sheet-default-header-first-row") + table(class="sheet-default-header-first-row spell-points sheet-hidden") tr(class="sheet-collapse sheet-show-first") td Spell Points Used tr td input(type="number" name="attr_spell-points" title="@{repeating_spells-#REPLACE0#_$X_spell-points}" class="sheet-table-dynamic" value="0") - table(class="sheet-default-header-first-row") + table(class="sheet-default-header-first-row spell-arcs-winds sheet-hidden") tr(class="sheet-collapse sheet-show-first") td #{arcWind}s Used tr @@ -112,4 +113,5 @@ fieldset(name="repeating_spells-#REPLACE0#" class="repeating_spells-#REPLACE0#") th Materials: td(colspan="3") textarea(name="attr_spell-materials" title="@{repeating_spells-#REPLACE0#_$X_spell-materials}" class="sheet-table-dynamic sheet-input-like" placeholder="Materials") - textarea(name="attr_spell-effect" title="@{repeating_spells-#REPLACE0#_$X_spell-effect}" placeholder="Insert Spell effects." class="sheet-spell-effect") \ No newline at end of file + textarea(name="attr_spell-effect" title="@{repeating_spells-#REPLACE0#_$X_spell-effect}" placeholder="Insert Spell effects." class="sheet-spell-effect") +button(type="action" name="act_spells-#REPLACE0#-add-row" class="btn repcontrol-button") +Add \ No newline at end of file From 9c60d9dc9efda0a72d1b6c9d662c5f089da205dc Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Wed, 15 Feb 2023 11:31:58 +0100 Subject: [PATCH 16/58] Extracted wizard spell slot tracking --- ADnD_2E_Revised/2ESheet.html | 1 - .../spell-slots-tracking-wizard.html | 16 +- .../character-tab/spells-tab/wizard-tab.html | 601 +----------------- 3 files changed, 23 insertions(+), 595 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 8da5ea6491..ca0a64de68 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -5589,7 +5589,6 @@

      -

      Spells Memorized and Spell Book


      diff --git a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/spell-slots-tracking-wizard.html b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/spell-slots-tracking-wizard.html index 3054b4639a..11fd5084b6 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/spell-slots-tracking-wizard.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/spell-slots-tracking-wizard.html @@ -10,10 +10,10 @@ Spell Slots - - - - + + + + / @@ -30,10 +30,10 @@ - + | - + - - \ No newline at end of file + + \ No newline at end of file diff --git a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html index c116465f89..8742e97a65 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html @@ -63,45 +63,7 @@ insert_spell-slots-reset-button.html_(wiz)
      - - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - + insert_spell-slots-tracking-wizard.html_(level1)

      @@ -121,45 +83,7 @@
      - - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - + insert_spell-slots-tracking-wizard.html_(level2)

      @@ -179,45 +103,7 @@
      - - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - + insert_spell-slots-tracking-wizard.html_(level3)

      @@ -237,45 +123,7 @@
      - - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - + insert_spell-slots-tracking-wizard.html_(level4)

      @@ -295,45 +143,7 @@
      - - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - + insert_spell-slots-tracking-wizard.html_(level5)

      @@ -353,48 +163,9 @@
      - - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - + insert_spell-slots-tracking-wizard.html_(level6)

      -

      Spells Memorized and Spell Book


      @@ -412,45 +183,7 @@
      - - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - + insert_spell-slots-tracking-wizard.html_(level7)

      @@ -470,45 +203,7 @@
      - - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - + insert_spell-slots-tracking-wizard.html_(level8)

      @@ -528,45 +223,7 @@
      - - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - + insert_spell-slots-tracking-wizard.html_(level9)

      @@ -586,45 +243,7 @@
      - - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - + insert_spell-slots-tracking-wizard.html_(level10)

      @@ -644,45 +263,7 @@
      - - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - + insert_spell-slots-tracking-wizard.html_(level11)

      @@ -702,45 +283,7 @@
      - - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - + insert_spell-slots-tracking-wizard.html_(level12)

      @@ -760,45 +303,7 @@
      - - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - + insert_spell-slots-tracking-wizard.html_(level13)

      @@ -818,45 +323,7 @@
      - - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - + insert_spell-slots-tracking-wizard.html_(level14)

      @@ -876,45 +343,7 @@
      - - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - + insert_spell-slots-tracking-wizard.html_(level15)

      From a8db8ad1b6d4f39a66f7eb28d59450d07d79cba8 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Wed, 15 Feb 2023 11:36:18 +0100 Subject: [PATCH 17/58] Extracted priest spell slot tracking --- .../spell-slots-tracking-priest.html | 35 +++ .../character-tab/spells-tab/priest-tab.html | 288 +----------------- 2 files changed, 43 insertions(+), 280 deletions(-) create mode 100644 ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/spell-slots-tracking-priest.html diff --git a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/spell-slots-tracking-priest.html b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/spell-slots-tracking-priest.html new file mode 100644 index 0000000000..b613756451 --- /dev/null +++ b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/spell-slots-tracking-priest.html @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + +
      LevelWisdomMisc.Total
      Spell Slots
      + + + + + + + + + + + + + + + + +
      Available to
      Memorize|Cast
      |
      + + \ No newline at end of file diff --git a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html index 21ba6d13e0..08893164c1 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html @@ -75,41 +75,7 @@
      insert_priest-sphere-button.html_(pri1,1st) - - - - - - - - - - - - - - - -
      LevelWisdomMisc.Total
      Spell Slots
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - + insert_spell-slots-tracking-priest.html_(level1)

      @@ -130,41 +96,7 @@
      insert_priest-sphere-button.html_(pri2,2nd) - - - - - - - - - - - - - - - -
      LevelWisdomMisc.Total
      Spell Slots
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - + insert_spell-slots-tracking-priest.html_(level2)

      @@ -185,41 +117,7 @@
      insert_priest-sphere-button.html_(pri3,3rd) - - - - - - - - - - - - - - - -
      LevelWisdomMisc.Total
      Spell Slots
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - + insert_spell-slots-tracking-priest.html_(level3)

      @@ -240,41 +138,7 @@
      insert_priest-sphere-button.html_(pri4,4th) - - - - - - - - - - - - - - - -
      LevelWisdomMisc.Total
      Spell Slots
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - + insert_spell-slots-tracking-priest.html_(level4)

      @@ -295,41 +159,7 @@
      insert_priest-sphere-button.html_(pri5,5th) - - - - - - - - - - - - - - - -
      LevelWisdomMisc.Total
      Spell Slots
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - + insert_spell-slots-tracking-priest.html_(level5)

      @@ -350,41 +180,7 @@
      insert_priest-sphere-button.html_(pri6,6th) - - - - - - - - - - - - - - - -
      LevelWisdomMisc.Total
      Spell Slots
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - + insert_spell-slots-tracking-priest.html_(level6)

      @@ -405,41 +201,7 @@
      insert_priest-sphere-button.html_(pri7,7th) - - - - - - - - - - - - - - - -
      LevelWisdomMisc.Total
      Spell Slots
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - + insert_spell-slots-tracking-priest.html_(level7)

      @@ -459,41 +221,7 @@
      - - - - - - - - - - - - - - - -
      LevelWisdomMisc.Total
      Spell Slots
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - + insert_spell-slots-tracking-priest.html_(levelq)

      From 7f6f594ae96181539c765614ac10e4b295ec3104 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Wed, 15 Feb 2023 12:52:20 +0100 Subject: [PATCH 18/58] Finished styling for wizard spell tracking. Priest needs some finishing touches --- ADnD_2E_Revised/2ESheet.html | 1945 +++++++++-------- .../html/shared/priest-spell-template.html | 6 +- .../html/shared/wizard-spell-template.html | 6 +- .../spell-slots-tracking-priest.html | 72 +- .../spell-slots-tracking-wizard.html | 80 +- .../character-tab/spells-tab/priest-tab.html | 10 +- .../character-tab/spells-tab/wizard-tab.html | 9 +- ADnD_2E_Revised/pug/spellTemplate.pug | 6 +- 8 files changed, 1095 insertions(+), 1039 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index ca0a64de68..52808214af 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -3878,7 +3878,7 @@ Level 15

      - +
      @@ -3886,6 +3886,7 @@
      Wizard caster level
      +
      @@ -3899,7 +3900,7 @@ - + @@ -3911,11 +3912,13 @@ + - + +
      Spell Points
      Total| Remaining
      Arc|
      @@ -3933,45 +3936,47 @@
      - - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - +
      + + + + + + + + + + + + + + + + + + + +
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      + + + + + + + + + + + + + + + + +
      Available to
      Memorize|Cast
      |
      + + +


      @@ -4016,7 +4021,7 @@ - +
      @@ -4032,7 +4037,7 @@
      Cast
      - +
      @@ -4042,7 +4047,7 @@
      Spell Points Used
      - +
      @@ -4256,45 +4261,47 @@
      -
      Arcs Used
      - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - +
      + + + + + + + + + + + + + + + + + + + +
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      + + + + + + + + + + + + + + + + +
      Available to
      Memorize|Cast
      |
      + + +


      @@ -4339,7 +4346,7 @@ - +
      @@ -4355,7 +4362,7 @@
      Cast
      - +
      @@ -4365,7 +4372,7 @@
      Spell Points Used
      - +
      @@ -4579,45 +4586,47 @@
      -
      Arcs Used
      - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - +
      + + + + + + + + + + + + + + + + + + + +
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      + + + + + + + + + + + + + + + + +
      Available to
      Memorize|Cast
      |
      + + +


      @@ -4662,7 +4671,7 @@ - +
      @@ -4678,7 +4687,7 @@
      Cast
      - +
      @@ -4688,7 +4697,7 @@
      Spell Points Used
      - +
      @@ -4902,45 +4911,47 @@
      -
      Arcs Used
      - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - +
      + + + + + + + + + + + + + + + + + + + +
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      + + + + + + + + + + + + + + + + +
      Available to
      Memorize|Cast
      |
      + + +


      @@ -4985,7 +4996,7 @@ - +
      @@ -5001,7 +5012,7 @@
      Cast
      - +
      @@ -5011,7 +5022,7 @@
      Spell Points Used
      - +
      @@ -5225,45 +5236,47 @@
      -
      Arcs Used
      - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - +
      + + + + + + + + + + + + + + + + + + + +
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      + + + + + + + + + + + + + + + + +
      Available to
      Memorize|Cast
      |
      + + +


      @@ -5308,7 +5321,7 @@ - +
      @@ -5324,7 +5337,7 @@
      Cast
      - +
      @@ -5334,7 +5347,7 @@
      Spell Points Used
      - +
      @@ -5548,45 +5561,47 @@
      -
      Arcs Used
      - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - +
      + + + + + + + + + + + + + + + + + + + +
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      + + + + + + + + + + + + + + + + +
      Available to
      Memorize|Cast
      |
      + + +


      @@ -5631,7 +5646,7 @@ - +
      @@ -5647,7 +5662,7 @@
      Cast
      - +
      @@ -5657,7 +5672,7 @@
      Spell Points Used
      - +
      @@ -5871,45 +5886,47 @@
      -
      Arcs Used
      - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - +
      + + + + + + + + + + + + + + + + + + + +
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      + + + + + + + + + + + + + + + + +
      Available to
      Memorize|Cast
      |
      + + +


      @@ -5954,7 +5971,7 @@ - +
      @@ -5970,7 +5987,7 @@
      Cast
      - +
      @@ -5980,7 +5997,7 @@
      Spell Points Used
      - +
      @@ -6194,45 +6211,47 @@
      -
      Arcs Used
      - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - +
      + + + + + + + + + + + + + + + + + + + +
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      + + + + + + + + + + + + + + + + +
      Available to
      Memorize|Cast
      |
      + + +


      @@ -6277,7 +6296,7 @@ - +
      @@ -6293,7 +6312,7 @@
      Cast
      - +
      @@ -6303,7 +6322,7 @@
      Spell Points Used
      - +
      @@ -6517,45 +6536,47 @@
      -
      Arcs Used
      - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - +
      + + + + + + + + + + + + + + + + + + + +
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      + + + + + + + + + + + + + + + + +
      Available to
      Memorize|Cast
      |
      + + +


      @@ -6600,7 +6621,7 @@ - +
      @@ -6616,7 +6637,7 @@
      Cast
      - +
      @@ -6626,7 +6647,7 @@
      Spell Points Used
      - +
      @@ -6840,45 +6861,47 @@
      -
      Arcs Used
      - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - +
      + + + + + + + + + + + + + + + + + + + +
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      + + + + + + + + + + + + + + + + +
      Available to
      Memorize|Cast
      |
      + + +


      @@ -6923,7 +6946,7 @@ - +
      @@ -6939,7 +6962,7 @@
      Cast
      - +
      @@ -6949,7 +6972,7 @@
      Spell Points Used
      - +
      @@ -7163,45 +7186,47 @@
      -
      Arcs Used
      - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - +
      + + + + + + + + + + + + + + + + + + + +
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      + + + + + + + + + + + + + + + + +
      Available to
      Memorize|Cast
      |
      + + +


      @@ -7246,7 +7271,7 @@ - +
      @@ -7262,7 +7287,7 @@
      Cast
      - +
      @@ -7272,7 +7297,7 @@
      Spell Points Used
      - +
      @@ -7486,45 +7511,47 @@
      -
      Arcs Used
      - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - +
      + + + + + + + + + + + + + + + + + + + +
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      + + + + + + + + + + + + + + + + +
      Available to
      Memorize|Cast
      |
      + + +


      @@ -7569,7 +7596,7 @@ - +
      @@ -7585,7 +7612,7 @@
      Cast
      - +
      @@ -7595,7 +7622,7 @@
      Spell Points Used
      - +
      @@ -7809,45 +7836,47 @@
      -
      Arcs Used
      - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - +
      + + + + + + + + + + + + + + + + + + + +
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      + + + + + + + + + + + + + + + + +
      Available to
      Memorize|Cast
      |
      + + +


      @@ -7892,7 +7921,7 @@ - +
      @@ -7908,7 +7937,7 @@
      Cast
      - +
      @@ -7918,7 +7947,7 @@
      Spell Points Used
      - +
      @@ -8132,45 +8161,47 @@
      -
      Arcs Used
      - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - +
      + + + + + + + + + + + + + + + + + + + +
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      + + + + + + + + + + + + + + + + +
      Available to
      Memorize|Cast
      |
      + + +


      @@ -8215,7 +8246,7 @@ - +
      @@ -8231,7 +8262,7 @@
      Cast
      - +
      @@ -8241,7 +8272,7 @@
      Spell Points Used
      - +
      @@ -8455,45 +8486,47 @@
      -
      Arcs Used
      - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - +
      + + + + + + + + + + + + + + + + + + + +
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      + + + + + + + + + + + + + + + + +
      Available to
      Memorize|Cast
      |
      + + +


      @@ -8538,7 +8571,7 @@ - +
      @@ -8554,7 +8587,7 @@
      Cast
      - +
      @@ -8564,7 +8597,7 @@
      Spell Points Used
      - +
      @@ -8790,7 +8823,7 @@ Level 7  Quest

      -
      Arcs Used
      +
      @@ -8798,8 +8831,9 @@
      Priest caster level
      +
      - +
      @@ -8810,15 +8844,14 @@ - +
      Level
      Spell Points |
      - - +
      @@ -8869,41 +8902,43 @@

      -
      Level
      - - - - - - - - - - - - - - -
      LevelWisdomMisc.Total
      Spell Slots
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - +
      + + + + + + + + + + + + + + + +
      LevelWisdomMisc.Total
      Spell Slots
      + + + + + + + + + + + + + + + + +
      Available to
      Memorize|Cast
      |
      + + +


      @@ -8948,7 +8983,7 @@ - +
      @@ -8964,7 +8999,7 @@
      Cast
      - +
      @@ -8974,7 +9009,7 @@
      Spell Points Used
      - +
      @@ -9193,41 +9228,43 @@

      -
      Winds Used
      - - - - - - - - - - - - - - -
      LevelWisdomMisc.Total
      Spell Slots
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - +
      + + + + + + + + + + + + + + + +
      LevelWisdomMisc.Total
      Spell Slots
      + + + + + + + + + + + + + + + + +
      Available to
      Memorize|Cast
      |
      + + +


      @@ -9272,7 +9309,7 @@ - +
      @@ -9288,7 +9325,7 @@
      Cast
      - +
      @@ -9298,7 +9335,7 @@
      Spell Points Used
      - +
      @@ -9517,41 +9554,43 @@

      -
      Winds Used
      - - - - - - - - - - - - - - -
      LevelWisdomMisc.Total
      Spell Slots
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - +
      + + + + + + + + + + + + + + + +
      LevelWisdomMisc.Total
      Spell Slots
      + + + + + + + + + + + + + + + + +
      Available to
      Memorize|Cast
      |
      + + +


      @@ -9596,7 +9635,7 @@ - +
      @@ -9612,7 +9651,7 @@
      Cast
      - +
      @@ -9622,7 +9661,7 @@
      Spell Points Used
      - +
      @@ -9841,41 +9880,43 @@

      -
      Winds Used
      - - - - - - - - - - - - - - -
      LevelWisdomMisc.Total
      Spell Slots
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - +
      + + + + + + + + + + + + + + + +
      LevelWisdomMisc.Total
      Spell Slots
      + + + + + + + + + + + + + + + + +
      Available to
      Memorize|Cast
      |
      + + +


      @@ -9920,7 +9961,7 @@ - +
      @@ -9936,7 +9977,7 @@
      Cast
      - +
      @@ -9946,7 +9987,7 @@
      Spell Points Used
      - +
      @@ -10165,41 +10206,43 @@

      -
      Winds Used
      - - - - - - - - - - - - - - -
      LevelWisdomMisc.Total
      Spell Slots
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - +
      + + + + + + + + + + + + + + + +
      LevelWisdomMisc.Total
      Spell Slots
      + + + + + + + + + + + + + + + + +
      Available to
      Memorize|Cast
      |
      + + +


      @@ -10244,7 +10287,7 @@ - +
      @@ -10260,7 +10303,7 @@
      Cast
      - +
      @@ -10270,7 +10313,7 @@
      Spell Points Used
      - +
      @@ -10489,41 +10532,43 @@

      -
      Winds Used
      - - - - - - - - - - - - - - -
      LevelWisdomMisc.Total
      Spell Slots
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - +
      + + + + + + + + + + + + + + + +
      LevelWisdomMisc.Total
      Spell Slots
      + + + + + + + + + + + + + + + + +
      Available to
      Memorize|Cast
      |
      + + +


      @@ -10568,7 +10613,7 @@ - +
      @@ -10584,7 +10629,7 @@
      Cast
      - +
      @@ -10594,7 +10639,7 @@
      Spell Points Used
      - +
      @@ -10813,41 +10858,43 @@

      -
      Winds Used
      - - - - - - - - - - - - - - -
      LevelWisdomMisc.Total
      Spell Slots
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - +
      + + + + + + + + + + + + + + + +
      LevelWisdomMisc.Total
      Spell Slots
      + + + + + + + + + + + + + + + + +
      Available to
      Memorize|Cast
      |
      + + +


      @@ -10892,7 +10939,7 @@ - +
      @@ -10908,7 +10955,7 @@
      Cast
      - +
      @@ -10918,7 +10965,7 @@
      Spell Points Used
      - +
      @@ -11132,41 +11179,43 @@
      -
      Winds Used
      - - - - - - - - - - - - - - -
      LevelWisdomMisc.Total
      Spell Slots
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - +
      + + + + + + + + + + + + + + + +
      LevelWisdomMisc.Total
      Spell Slots
      + + + + + + + + + + + + + + + + +
      Available to
      Memorize|Cast
      |
      + + +


      @@ -11211,7 +11260,7 @@ - +
      @@ -11227,7 +11276,7 @@
      Cast
      - +
      @@ -11237,7 +11286,7 @@
      Spell Points Used
      - +
      @@ -20990,7 +21039,7 @@
      Winds Used
      - +
      @@ -21006,7 +21055,7 @@
      Cast
      - +
      @@ -21016,7 +21065,7 @@
      Spell Points Used
      - +
      @@ -21169,7 +21218,7 @@
      Arcs Used
      - +
      @@ -21185,7 +21234,7 @@
      Cast
      - +
      @@ -21195,7 +21244,7 @@
      Spell Points Used
      - +
      diff --git a/ADnD_2E_Revised/html/shared/priest-spell-template.html b/ADnD_2E_Revised/html/shared/priest-spell-template.html index 6b0724d56a..fdd35c934f 100644 --- a/ADnD_2E_Revised/html/shared/priest-spell-template.html +++ b/ADnD_2E_Revised/html/shared/priest-spell-template.html @@ -36,7 +36,7 @@
      Winds Used
      - +
      @@ -52,7 +52,7 @@
      Cast
      - +
      @@ -62,7 +62,7 @@
      Spell Points Used
      - +
      diff --git a/ADnD_2E_Revised/html/shared/wizard-spell-template.html b/ADnD_2E_Revised/html/shared/wizard-spell-template.html index 12adb8b890..a97221d727 100644 --- a/ADnD_2E_Revised/html/shared/wizard-spell-template.html +++ b/ADnD_2E_Revised/html/shared/wizard-spell-template.html @@ -36,7 +36,7 @@
      Winds Used
      - +
      @@ -52,7 +52,7 @@
      Cast
      - +
      @@ -62,7 +62,7 @@
      Spell Points Used
      - +
      diff --git a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/spell-slots-tracking-priest.html b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/spell-slots-tracking-priest.html index b613756451..1d9ad20a0d 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/spell-slots-tracking-priest.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/spell-slots-tracking-priest.html @@ -1,35 +1,37 @@ -
      Arcs Used
      - - - - - - - - - - - - - - -
      LevelWisdomMisc.Total
      Spell Slots
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - \ No newline at end of file +
      + + + + + + + + + + + + + + + +
      LevelWisdomMisc.Total
      Spell Slots
      + + + + + + + + + + + + + + + + +
      Available to
      Memorize|Cast
      |
      + + +
      \ No newline at end of file diff --git a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/spell-slots-tracking-wizard.html b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/spell-slots-tracking-wizard.html index 11fd5084b6..34efd2528e 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/spell-slots-tracking-wizard.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/spell-slots-tracking-wizard.html @@ -1,39 +1,41 @@ - - - - - - - - - - - - - - - - - - - -
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      - - - - - - - - - - - - - - - - -
      Available to
      Memorize|Cast
      |
      - - \ No newline at end of file +
      + + + + + + + + + + + + + + + + + + + +
      LevelSpecialistMisc.Total/Max
      Spell Slots/
      + + + + + + + + + + + + + + + + +
      Available to
      Memorize|Cast
      |
      + + +
      \ No newline at end of file diff --git a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html index 08893164c1..02a7125d70 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html @@ -11,7 +11,7 @@ Level 7  Quest

      - +
      @@ -19,8 +19,9 @@
      Priest caster level
      +
      - +
      @@ -31,15 +32,14 @@ - +
      Level
      Spell Points |
      - - +
      diff --git a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html index 8742e97a65..eda9a42115 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html @@ -19,7 +19,7 @@ Level 15

      -
      Level
      +
      @@ -27,6 +27,7 @@
      Wizard caster level
      +
      @@ -40,7 +41,7 @@ - + @@ -52,11 +53,13 @@ + - + +
      Spell Points
      Total| Remaining
      Arc|
      diff --git a/ADnD_2E_Revised/pug/spellTemplate.pug b/ADnD_2E_Revised/pug/spellTemplate.pug index 0ce5bdae05..48838c46c4 100644 --- a/ADnD_2E_Revised/pug/spellTemplate.pug +++ b/ADnD_2E_Revised/pug/spellTemplate.pug @@ -30,7 +30,7 @@ fieldset(name="repeating_spells-#REPLACE0#" class="repeating_spells-#REPLACE0#") td button(type="action" name="act_show" class="btn sheet-hidden sheet-show") ▼ button(type="action" name="act_hide" class="btn sheet-hidden") ▲ - table(class="sheet-default-header-first-row spell-slots sheet-hidden") + table(class="sheet-default-header-first-row sheet-spell-slots sheet-hidden") tr(class="sheet-collapse sheet-show-first") td Cast td @@ -41,13 +41,13 @@ fieldset(name="repeating_spells-#REPLACE0#" class="repeating_spells-#REPLACE0#") td(class="sheet-centering-padding-5") / td input(type="number" name="attr_spell-memorized" title="@{repeating_spells-#REPLACE0#_$X_spell-memorized}" class="sheet-table-dynamic" value="0") - table(class="sheet-default-header-first-row spell-points sheet-hidden") + table(class="sheet-default-header-first-row sheet-spell-points sheet-hidden") tr(class="sheet-collapse sheet-show-first") td Spell Points Used tr td input(type="number" name="attr_spell-points" title="@{repeating_spells-#REPLACE0#_$X_spell-points}" class="sheet-table-dynamic" value="0") - table(class="sheet-default-header-first-row spell-arcs-winds sheet-hidden") + table(class="sheet-default-header-first-row sheet-spell-arcs-winds sheet-hidden") tr(class="sheet-collapse sheet-show-first") td #{arcWind}s Used tr From 7d315c3718a1e41095a4c69fb828f9f41fde0167 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Wed, 15 Feb 2023 13:17:20 +0100 Subject: [PATCH 19/58] - Removed some unused tab sections. - Removed requirement for div for tab section - Removed some unused CSS --- ADnD_2E_Revised/2EStyle.css | 176 +++++++++++++-------------- ADnD_2E_Revised/css/2EStyle-base.css | 176 +++++++++++++-------------- 2 files changed, 166 insertions(+), 186 deletions(-) diff --git a/ADnD_2E_Revised/2EStyle.css b/ADnD_2E_Revised/2EStyle.css index 01a66f4980..ffb42267af 100644 --- a/ADnD_2E_Revised/2EStyle.css +++ b/ADnD_2E_Revised/2EStyle.css @@ -325,102 +325,92 @@ textarea.sheet-input-like { content: "✓"; } -div[class^="sheet-section"] { +.charsheet input.sheet-tab1:checked ~ .sheet-section-character-page, +.charsheet input.sheet-tab2:checked ~ .sheet-section-monster-page, +.charsheet input.sheet-tab3:checked ~ .sheet-section-character-info, +.charsheet input.sheet-tab4:checked ~ .sheet-section-attributes, +.charsheet input.sheet-tab5:checked ~ .sheet-section-weapons, +.charsheet input.sheet-tab6:checked ~ .sheet-section-rogue, +.charsheet input.sheet-tab7:checked ~ .sheet-section-proficiencies, +.charsheet input.sheet-tab8:checked ~ .sheet-section-spells, +.charsheet input.sheet-tab9:checked ~ .sheet-section-psionics, +.charsheet input.sheet-tab10:checked ~ .sheet-section-equipment, +.charsheet input.sheet-tab11:checked ~ .sheet-section-currency, +.charsheet input.sheet-tab12:checked ~ .sheet-section-followers, +.charsheet input.sheet-tab14:checked ~ .sheet-section-ravenloft-saves, +.charsheet input.sheet-tab15:checked ~ .sheet-section-movement-standard, +.charsheet input.sheet-tab16:checked ~ .sheet-section-movement-advanced, +.charsheet input.sheet-tab17:checked ~ .sheet-section-attributes-standard, +.charsheet input.sheet-tab18:checked ~ .sheet-section-attributes-player-option, +.charsheet input.sheet-tab19:checked ~ .sheet-section-wizard-spells, +.charsheet input.sheet-tab20:checked ~ .sheet-section-priest-spells, +.charsheet input.sheet-tab21:checked ~ .sheet-section-wizard-level-one, +.charsheet input.sheet-tab22:checked ~ .sheet-section-wizard-level-two, +.charsheet input.sheet-tab23:checked ~ .sheet-section-wizard-level-three, +.charsheet input.sheet-tab24:checked ~ .sheet-section-wizard-level-four, +.charsheet input.sheet-tab25:checked ~ .sheet-section-wizard-level-five, +.charsheet input.sheet-tab26:checked ~ .sheet-section-wizard-level-six, +.charsheet input.sheet-tab27:checked ~ .sheet-section-wizard-level-seven, +.charsheet input.sheet-tab28:checked ~ .sheet-section-wizard-level-eight, +.charsheet input.sheet-tab29:checked ~ .sheet-section-wizard-level-nine, +.charsheet input.sheet-tab30:checked ~ .sheet-section-wizard-level-ten, +.charsheet input.sheet-tab31:checked ~ .sheet-section-priest-level-one, +.charsheet input.sheet-tab32:checked ~ .sheet-section-priest-level-two, +.charsheet input.sheet-tab33:checked ~ .sheet-section-priest-level-three, +.charsheet input.sheet-tab34:checked ~ .sheet-section-priest-level-four, +.charsheet input.sheet-tab35:checked ~ .sheet-section-priest-level-five, +.charsheet input.sheet-tab36:checked ~ .sheet-section-priest-level-six, +.charsheet input.sheet-tab37:checked ~ .sheet-section-priest-level-seven, +.charsheet input.sheet-tab38:checked ~ .sheet-section-priest-quest, +.charsheet input.sheet-tab39:checked ~ .sheet-section-rogue-standard, +.charsheet input.sheet-tab40:checked ~ .sheet-section-psionic-standard, +.charsheet input.sheet-tab41:checked ~ .sheet-section-psionic-advanced, +.charsheet input.sheet-tab42:checked ~ .sheet-section-currency-standard, +.charsheet input.sheet-tab43:checked ~ .sheet-section-currency-dragonlance, +.charsheet input.sheet-tab44:checked ~ .sheet-section-currency-dark-sun, +.charsheet input.sheet-tab45:checked ~ .sheet-section-currency-ravenloft, +.charsheet input.sheet-tab46:checked ~ .sheet-section-follower-warrior, +.charsheet input.sheet-tab47:checked ~ .sheet-section-follower-wizard, +.charsheet input.sheet-tab48:checked ~ .sheet-section-follower-priest, +.charsheet input.sheet-tab49:checked ~ .sheet-section-follower-rogue, +.charsheet input.sheet-tab50:checked ~ .sheet-section-follower-psion, +.charsheet input.sheet-tab51:checked ~ .sheet-section-follower-animals, +.charsheet input.sheet-tab52:checked ~ .sheet-section-priest-turn, +.charsheet input.sheet-tab53:checked ~ .sheet-section-journal, +.charsheet input.sheet-tab54:checked ~ .sheet-section-wizard-level-eleven, +.charsheet input.sheet-tab55:checked ~ .sheet-section-wizard-level-twelve, +.charsheet input.sheet-tab56:checked ~ .sheet-section-wizard-level-thirteen, +.charsheet input.sheet-tab57:checked ~ .sheet-section-wizard-level-fourteen, +.charsheet input.sheet-tab58:checked ~ .sheet-section-wizard-level-fifteen, +.charsheet input.sheet-tab59:checked ~ .sheet-section-currency-maztica, +.charsheet input.sheet-tab60:checked ~ .sheet-section-rogue-spds, +.charsheet input.sheet-tab61:checked ~ .sheet-section-rogue-standard-hench, +.charsheet input.sheet-tab62:checked ~ .sheet-section-rogue-spds-hench, +.charsheet input.sheet-tab63:checked ~ .sheet-section-rogue-standard-repeat, +.charsheet input.sheet-tab64:checked ~ .sheet-section-rogue-spds-repeat, +.charsheet input.sheet-tab65:checked ~ .sheet-section-psionics-standard-hench, +.charsheet input.sheet-tab66:checked ~ .sheet-section-psionics-advanced-hench, +.charsheet input.sheet-tab67:checked ~ .sheet-section-psionics-standard-repeat, +.charsheet input.sheet-tab68:checked ~ .sheet-section-psionics-advanced-repeat, +.charsheet input.sheet-tab69:checked ~ .sheet-section-granted-powers, +.charsheet input.sheet-tab70:checked ~ .sheet-section-weapon-standard-melee, +.charsheet input.sheet-tab71:checked ~ .sheet-section-weapon-standard-ranged, +.charsheet input.sheet-tab72:checked ~ .sheet-section-movement-mount, +.charsheet input.sheet-tab73:checked ~ .sheet-section-character-info-details, +.charsheet input.sheet-tab74:checked ~ .sheet-section-character-info-tracker, +.charsheet input.sheet-tab75:checked ~ .sheet-section-currency-birthright, +.charsheet input.sheet-tab76:checked ~ .sheet-section-birthright, +.charsheet input.sheet-tab77:checked ~ .sheet-section-movement-barbarian, +.charsheet input.sheet-tab79:checked ~ .sheet-section-movement-swimming, +.charsheet input.sheet-tab80:checked ~ .sheet-section-movement-flying, +.charsheet input.sheet-tab81:checked ~ .sheet-section-weapon-standard, +.charsheet input.sheet-tab82:checked ~ .sheet-section-weapon-player-option, +.charsheet input.sheet-tab83:checked ~ .sheet-section-weapon-player-option-melee, +.charsheet input.sheet-tab84:checked ~ .sheet-section-weapon-player-option-ranged, +.charsheet input.sheet-tab85:checked ~ .sheet-section-settings-page { display: block; } -.charsheet input.sheet-tab1:checked ~ div.sheet-section-character-page, -.charsheet input.sheet-tab2:checked ~ div.sheet-section-monster-page, -.charsheet input.sheet-tab3:checked ~ div.sheet-section-character-info, -.charsheet input.sheet-tab4:checked ~ div.sheet-section-attributes, -.charsheet input.sheet-tab5:checked ~ div.sheet-section-weapons, -.charsheet input.sheet-tab6:checked ~ div.sheet-section-rogue, -.charsheet input.sheet-tab7:checked ~ div.sheet-section-proficiencies, -.charsheet input.sheet-tab8:checked ~ div.sheet-section-spells, -.charsheet input.sheet-tab9:checked ~ div.sheet-section-psionics, -.charsheet input.sheet-tab10:checked ~ div.sheet-section-equipment, -.charsheet input.sheet-tab11:checked ~ div.sheet-section-currency, -.charsheet input.sheet-tab12:checked ~ div.sheet-section-followers, -.charsheet input.sheet-tab13:checked ~ div.sheet-section-standard-saves, -.charsheet input.sheet-tab14:checked ~ div.sheet-section-ravenloft-saves, -.charsheet input.sheet-tab15:checked ~ div.sheet-section-movement-standard, -.charsheet input.sheet-tab16:checked ~ div.sheet-section-movement-advanced, -.charsheet input.sheet-tab17:checked ~ div.sheet-section-attributes-standard, -.charsheet input.sheet-tab18:checked ~ div.sheet-section-attributes-player-option, -.charsheet input.sheet-tab19:checked ~ div.sheet-section-wizard-spells, -.charsheet input.sheet-tab20:checked ~ div.sheet-section-priest-spells, -.charsheet input.sheet-tab21:checked ~ div.sheet-section-wizard-level-one, -.charsheet input.sheet-tab22:checked ~ div.sheet-section-wizard-level-two, -.charsheet input.sheet-tab23:checked ~ div.sheet-section-wizard-level-three, -.charsheet input.sheet-tab24:checked ~ div.sheet-section-wizard-level-four, -.charsheet input.sheet-tab25:checked ~ div.sheet-section-wizard-level-five, -.charsheet input.sheet-tab26:checked ~ div.sheet-section-wizard-level-six, -.charsheet input.sheet-tab27:checked ~ div.sheet-section-wizard-level-seven, -.charsheet input.sheet-tab28:checked ~ div.sheet-section-wizard-level-eight, -.charsheet input.sheet-tab29:checked ~ div.sheet-section-wizard-level-nine, -.charsheet input.sheet-tab30:checked ~ div.sheet-section-wizard-level-ten, -.charsheet input.sheet-tab31:checked ~ div.sheet-section-priest-level-one, -.charsheet input.sheet-tab32:checked ~ div.sheet-section-priest-level-two, -.charsheet input.sheet-tab33:checked ~ div.sheet-section-priest-level-three, -.charsheet input.sheet-tab34:checked ~ div.sheet-section-priest-level-four, -.charsheet input.sheet-tab35:checked ~ div.sheet-section-priest-level-five, -.charsheet input.sheet-tab36:checked ~ div.sheet-section-priest-level-six, -.charsheet input.sheet-tab37:checked ~ div.sheet-section-priest-level-seven, -.charsheet input.sheet-tab38:checked ~ div.sheet-section-priest-quest, -.charsheet input.sheet-tab39:checked ~ div.sheet-section-rogue-standard, -.charsheet input.sheet-tab40:checked ~ div.sheet-section-psionic-standard, -.charsheet input.sheet-tab41:checked ~ div.sheet-section-psionic-advanced, -.charsheet input.sheet-tab42:checked ~ div.sheet-section-currency-standard, -.charsheet input.sheet-tab43:checked ~ div.sheet-section-currency-dragonlance, -.charsheet input.sheet-tab44:checked ~ div.sheet-section-currency-dark-sun, -.charsheet input.sheet-tab45:checked ~ div.sheet-section-currency-ravenloft, -.charsheet input.sheet-tab46:checked ~ div.sheet-section-follower-warrior, -.charsheet input.sheet-tab47:checked ~ div.sheet-section-follower-wizard, -.charsheet input.sheet-tab48:checked ~ div.sheet-section-follower-priest, -.charsheet input.sheet-tab49:checked ~ div.sheet-section-follower-rogue, -.charsheet input.sheet-tab50:checked ~ div.sheet-section-follower-psion, -.charsheet input.sheet-tab51:checked ~ div.sheet-section-follower-animals, -.charsheet input.sheet-tab52:checked ~ div.sheet-section-priest-turn, -.charsheet input.sheet-tab53:checked ~ div.sheet-section-journal, -.charsheet input.sheet-tab54:checked ~ div.sheet-section-wizard-level-eleven, -.charsheet input.sheet-tab55:checked ~ div.sheet-section-wizard-level-twelve, -.charsheet input.sheet-tab56:checked ~ div.sheet-section-wizard-level-thirteen, -.charsheet input.sheet-tab57:checked ~ div.sheet-section-wizard-level-fourteen, -.charsheet input.sheet-tab58:checked ~ div.sheet-section-wizard-level-fifteen, -.charsheet input.sheet-tab59:checked ~ div.sheet-section-currency-maztica, -.charsheet input.sheet-tab60:checked ~ div.sheet-section-rogue-spds, -.charsheet input.sheet-tab61:checked ~ div.sheet-section-rogue-standard-hench, -.charsheet input.sheet-tab62:checked ~ div.sheet-section-rogue-spds-hench, -.charsheet input.sheet-tab63:checked ~ div.sheet-section-rogue-standard-repeat, -.charsheet input.sheet-tab64:checked ~ div.sheet-section-rogue-spds-repeat, -.charsheet input.sheet-tab65:checked ~ div.sheet-section-psionics-standard-hench, -.charsheet input.sheet-tab66:checked ~ div.sheet-section-psionics-advanced-hench, -.charsheet input.sheet-tab67:checked ~ div.sheet-section-psionics-standard-repeat, -.charsheet input.sheet-tab68:checked ~ div.sheet-section-psionics-advanced-repeat, -.charsheet input.sheet-tab69:checked ~ div.sheet-section-granted-powers, -.charsheet input.sheet-tab70:checked ~ div.sheet-section-weapon-standard-melee, -.charsheet input.sheet-tab71:checked ~ div.sheet-section-weapon-standard-ranged, -.charsheet input.sheet-tab72:checked ~ div.sheet-section-movement-mount, -.charsheet input.sheet-tab73:checked ~ div.sheet-section-character-info-details, -.charsheet input.sheet-tab74:checked ~ div.sheet-section-character-info-tracker, -.charsheet input.sheet-tab75:checked ~ div.sheet-section-currency-birthright, -.charsheet input.sheet-tab76:checked ~ div.sheet-section-birthright, -.charsheet input.sheet-tab77:checked ~ div.sheet-section-movement-barbarian, -.charsheet input.sheet-tab78:checked ~ div.sheet-section-attributes-dream, -.charsheet input.sheet-tab79:checked ~ div.sheet-section-movement-swimming, -.charsheet input.sheet-tab80:checked ~ div.sheet-section-movement-flying, -.charsheet input.sheet-tab81:checked ~ div.sheet-section-weapon-standard, -.charsheet input.sheet-tab82:checked ~ div.sheet-section-weapon-player-option, -.charsheet input.sheet-tab83:checked ~ div.sheet-section-weapon-player-option-melee, -.charsheet input.sheet-tab84:checked ~ div.sheet-section-weapon-player-option-ranged, -.charsheet input.sheet-tab85:checked ~ div.sheet-section-settings-page { - display: block; -} - -.charsheet input.sheet-tab99:checked ~ div[class^="sheet-section"] { - display: block; -} - .charsheet input.sheet-tab { width: 120px; height: inherit; diff --git a/ADnD_2E_Revised/css/2EStyle-base.css b/ADnD_2E_Revised/css/2EStyle-base.css index 608cb662f0..38c6808851 100644 --- a/ADnD_2E_Revised/css/2EStyle-base.css +++ b/ADnD_2E_Revised/css/2EStyle-base.css @@ -325,102 +325,92 @@ textarea.sheet-input-like { content: "✓"; } -div[class^="sheet-section"] { +.charsheet input.sheet-tab1:checked ~ .sheet-section-character-page, +.charsheet input.sheet-tab2:checked ~ .sheet-section-monster-page, +.charsheet input.sheet-tab3:checked ~ .sheet-section-character-info, +.charsheet input.sheet-tab4:checked ~ .sheet-section-attributes, +.charsheet input.sheet-tab5:checked ~ .sheet-section-weapons, +.charsheet input.sheet-tab6:checked ~ .sheet-section-rogue, +.charsheet input.sheet-tab7:checked ~ .sheet-section-proficiencies, +.charsheet input.sheet-tab8:checked ~ .sheet-section-spells, +.charsheet input.sheet-tab9:checked ~ .sheet-section-psionics, +.charsheet input.sheet-tab10:checked ~ .sheet-section-equipment, +.charsheet input.sheet-tab11:checked ~ .sheet-section-currency, +.charsheet input.sheet-tab12:checked ~ .sheet-section-followers, +.charsheet input.sheet-tab14:checked ~ .sheet-section-ravenloft-saves, +.charsheet input.sheet-tab15:checked ~ .sheet-section-movement-standard, +.charsheet input.sheet-tab16:checked ~ .sheet-section-movement-advanced, +.charsheet input.sheet-tab17:checked ~ .sheet-section-attributes-standard, +.charsheet input.sheet-tab18:checked ~ .sheet-section-attributes-player-option, +.charsheet input.sheet-tab19:checked ~ .sheet-section-wizard-spells, +.charsheet input.sheet-tab20:checked ~ .sheet-section-priest-spells, +.charsheet input.sheet-tab21:checked ~ .sheet-section-wizard-level-one, +.charsheet input.sheet-tab22:checked ~ .sheet-section-wizard-level-two, +.charsheet input.sheet-tab23:checked ~ .sheet-section-wizard-level-three, +.charsheet input.sheet-tab24:checked ~ .sheet-section-wizard-level-four, +.charsheet input.sheet-tab25:checked ~ .sheet-section-wizard-level-five, +.charsheet input.sheet-tab26:checked ~ .sheet-section-wizard-level-six, +.charsheet input.sheet-tab27:checked ~ .sheet-section-wizard-level-seven, +.charsheet input.sheet-tab28:checked ~ .sheet-section-wizard-level-eight, +.charsheet input.sheet-tab29:checked ~ .sheet-section-wizard-level-nine, +.charsheet input.sheet-tab30:checked ~ .sheet-section-wizard-level-ten, +.charsheet input.sheet-tab31:checked ~ .sheet-section-priest-level-one, +.charsheet input.sheet-tab32:checked ~ .sheet-section-priest-level-two, +.charsheet input.sheet-tab33:checked ~ .sheet-section-priest-level-three, +.charsheet input.sheet-tab34:checked ~ .sheet-section-priest-level-four, +.charsheet input.sheet-tab35:checked ~ .sheet-section-priest-level-five, +.charsheet input.sheet-tab36:checked ~ .sheet-section-priest-level-six, +.charsheet input.sheet-tab37:checked ~ .sheet-section-priest-level-seven, +.charsheet input.sheet-tab38:checked ~ .sheet-section-priest-quest, +.charsheet input.sheet-tab39:checked ~ .sheet-section-rogue-standard, +.charsheet input.sheet-tab40:checked ~ .sheet-section-psionic-standard, +.charsheet input.sheet-tab41:checked ~ .sheet-section-psionic-advanced, +.charsheet input.sheet-tab42:checked ~ .sheet-section-currency-standard, +.charsheet input.sheet-tab43:checked ~ .sheet-section-currency-dragonlance, +.charsheet input.sheet-tab44:checked ~ .sheet-section-currency-dark-sun, +.charsheet input.sheet-tab45:checked ~ .sheet-section-currency-ravenloft, +.charsheet input.sheet-tab46:checked ~ .sheet-section-follower-warrior, +.charsheet input.sheet-tab47:checked ~ .sheet-section-follower-wizard, +.charsheet input.sheet-tab48:checked ~ .sheet-section-follower-priest, +.charsheet input.sheet-tab49:checked ~ .sheet-section-follower-rogue, +.charsheet input.sheet-tab50:checked ~ .sheet-section-follower-psion, +.charsheet input.sheet-tab51:checked ~ .sheet-section-follower-animals, +.charsheet input.sheet-tab52:checked ~ .sheet-section-priest-turn, +.charsheet input.sheet-tab53:checked ~ .sheet-section-journal, +.charsheet input.sheet-tab54:checked ~ .sheet-section-wizard-level-eleven, +.charsheet input.sheet-tab55:checked ~ .sheet-section-wizard-level-twelve, +.charsheet input.sheet-tab56:checked ~ .sheet-section-wizard-level-thirteen, +.charsheet input.sheet-tab57:checked ~ .sheet-section-wizard-level-fourteen, +.charsheet input.sheet-tab58:checked ~ .sheet-section-wizard-level-fifteen, +.charsheet input.sheet-tab59:checked ~ .sheet-section-currency-maztica, +.charsheet input.sheet-tab60:checked ~ .sheet-section-rogue-spds, +.charsheet input.sheet-tab61:checked ~ .sheet-section-rogue-standard-hench, +.charsheet input.sheet-tab62:checked ~ .sheet-section-rogue-spds-hench, +.charsheet input.sheet-tab63:checked ~ .sheet-section-rogue-standard-repeat, +.charsheet input.sheet-tab64:checked ~ .sheet-section-rogue-spds-repeat, +.charsheet input.sheet-tab65:checked ~ .sheet-section-psionics-standard-hench, +.charsheet input.sheet-tab66:checked ~ .sheet-section-psionics-advanced-hench, +.charsheet input.sheet-tab67:checked ~ .sheet-section-psionics-standard-repeat, +.charsheet input.sheet-tab68:checked ~ .sheet-section-psionics-advanced-repeat, +.charsheet input.sheet-tab69:checked ~ .sheet-section-granted-powers, +.charsheet input.sheet-tab70:checked ~ .sheet-section-weapon-standard-melee, +.charsheet input.sheet-tab71:checked ~ .sheet-section-weapon-standard-ranged, +.charsheet input.sheet-tab72:checked ~ .sheet-section-movement-mount, +.charsheet input.sheet-tab73:checked ~ .sheet-section-character-info-details, +.charsheet input.sheet-tab74:checked ~ .sheet-section-character-info-tracker, +.charsheet input.sheet-tab75:checked ~ .sheet-section-currency-birthright, +.charsheet input.sheet-tab76:checked ~ .sheet-section-birthright, +.charsheet input.sheet-tab77:checked ~ .sheet-section-movement-barbarian, +.charsheet input.sheet-tab79:checked ~ .sheet-section-movement-swimming, +.charsheet input.sheet-tab80:checked ~ .sheet-section-movement-flying, +.charsheet input.sheet-tab81:checked ~ .sheet-section-weapon-standard, +.charsheet input.sheet-tab82:checked ~ .sheet-section-weapon-player-option, +.charsheet input.sheet-tab83:checked ~ .sheet-section-weapon-player-option-melee, +.charsheet input.sheet-tab84:checked ~ .sheet-section-weapon-player-option-ranged, +.charsheet input.sheet-tab85:checked ~ .sheet-section-settings-page { display: block; } -.charsheet input.sheet-tab1:checked ~ div.sheet-section-character-page, -.charsheet input.sheet-tab2:checked ~ div.sheet-section-monster-page, -.charsheet input.sheet-tab3:checked ~ div.sheet-section-character-info, -.charsheet input.sheet-tab4:checked ~ div.sheet-section-attributes, -.charsheet input.sheet-tab5:checked ~ div.sheet-section-weapons, -.charsheet input.sheet-tab6:checked ~ div.sheet-section-rogue, -.charsheet input.sheet-tab7:checked ~ div.sheet-section-proficiencies, -.charsheet input.sheet-tab8:checked ~ div.sheet-section-spells, -.charsheet input.sheet-tab9:checked ~ div.sheet-section-psionics, -.charsheet input.sheet-tab10:checked ~ div.sheet-section-equipment, -.charsheet input.sheet-tab11:checked ~ div.sheet-section-currency, -.charsheet input.sheet-tab12:checked ~ div.sheet-section-followers, -.charsheet input.sheet-tab13:checked ~ div.sheet-section-standard-saves, -.charsheet input.sheet-tab14:checked ~ div.sheet-section-ravenloft-saves, -.charsheet input.sheet-tab15:checked ~ div.sheet-section-movement-standard, -.charsheet input.sheet-tab16:checked ~ div.sheet-section-movement-advanced, -.charsheet input.sheet-tab17:checked ~ div.sheet-section-attributes-standard, -.charsheet input.sheet-tab18:checked ~ div.sheet-section-attributes-player-option, -.charsheet input.sheet-tab19:checked ~ div.sheet-section-wizard-spells, -.charsheet input.sheet-tab20:checked ~ div.sheet-section-priest-spells, -.charsheet input.sheet-tab21:checked ~ div.sheet-section-wizard-level-one, -.charsheet input.sheet-tab22:checked ~ div.sheet-section-wizard-level-two, -.charsheet input.sheet-tab23:checked ~ div.sheet-section-wizard-level-three, -.charsheet input.sheet-tab24:checked ~ div.sheet-section-wizard-level-four, -.charsheet input.sheet-tab25:checked ~ div.sheet-section-wizard-level-five, -.charsheet input.sheet-tab26:checked ~ div.sheet-section-wizard-level-six, -.charsheet input.sheet-tab27:checked ~ div.sheet-section-wizard-level-seven, -.charsheet input.sheet-tab28:checked ~ div.sheet-section-wizard-level-eight, -.charsheet input.sheet-tab29:checked ~ div.sheet-section-wizard-level-nine, -.charsheet input.sheet-tab30:checked ~ div.sheet-section-wizard-level-ten, -.charsheet input.sheet-tab31:checked ~ div.sheet-section-priest-level-one, -.charsheet input.sheet-tab32:checked ~ div.sheet-section-priest-level-two, -.charsheet input.sheet-tab33:checked ~ div.sheet-section-priest-level-three, -.charsheet input.sheet-tab34:checked ~ div.sheet-section-priest-level-four, -.charsheet input.sheet-tab35:checked ~ div.sheet-section-priest-level-five, -.charsheet input.sheet-tab36:checked ~ div.sheet-section-priest-level-six, -.charsheet input.sheet-tab37:checked ~ div.sheet-section-priest-level-seven, -.charsheet input.sheet-tab38:checked ~ div.sheet-section-priest-quest, -.charsheet input.sheet-tab39:checked ~ div.sheet-section-rogue-standard, -.charsheet input.sheet-tab40:checked ~ div.sheet-section-psionic-standard, -.charsheet input.sheet-tab41:checked ~ div.sheet-section-psionic-advanced, -.charsheet input.sheet-tab42:checked ~ div.sheet-section-currency-standard, -.charsheet input.sheet-tab43:checked ~ div.sheet-section-currency-dragonlance, -.charsheet input.sheet-tab44:checked ~ div.sheet-section-currency-dark-sun, -.charsheet input.sheet-tab45:checked ~ div.sheet-section-currency-ravenloft, -.charsheet input.sheet-tab46:checked ~ div.sheet-section-follower-warrior, -.charsheet input.sheet-tab47:checked ~ div.sheet-section-follower-wizard, -.charsheet input.sheet-tab48:checked ~ div.sheet-section-follower-priest, -.charsheet input.sheet-tab49:checked ~ div.sheet-section-follower-rogue, -.charsheet input.sheet-tab50:checked ~ div.sheet-section-follower-psion, -.charsheet input.sheet-tab51:checked ~ div.sheet-section-follower-animals, -.charsheet input.sheet-tab52:checked ~ div.sheet-section-priest-turn, -.charsheet input.sheet-tab53:checked ~ div.sheet-section-journal, -.charsheet input.sheet-tab54:checked ~ div.sheet-section-wizard-level-eleven, -.charsheet input.sheet-tab55:checked ~ div.sheet-section-wizard-level-twelve, -.charsheet input.sheet-tab56:checked ~ div.sheet-section-wizard-level-thirteen, -.charsheet input.sheet-tab57:checked ~ div.sheet-section-wizard-level-fourteen, -.charsheet input.sheet-tab58:checked ~ div.sheet-section-wizard-level-fifteen, -.charsheet input.sheet-tab59:checked ~ div.sheet-section-currency-maztica, -.charsheet input.sheet-tab60:checked ~ div.sheet-section-rogue-spds, -.charsheet input.sheet-tab61:checked ~ div.sheet-section-rogue-standard-hench, -.charsheet input.sheet-tab62:checked ~ div.sheet-section-rogue-spds-hench, -.charsheet input.sheet-tab63:checked ~ div.sheet-section-rogue-standard-repeat, -.charsheet input.sheet-tab64:checked ~ div.sheet-section-rogue-spds-repeat, -.charsheet input.sheet-tab65:checked ~ div.sheet-section-psionics-standard-hench, -.charsheet input.sheet-tab66:checked ~ div.sheet-section-psionics-advanced-hench, -.charsheet input.sheet-tab67:checked ~ div.sheet-section-psionics-standard-repeat, -.charsheet input.sheet-tab68:checked ~ div.sheet-section-psionics-advanced-repeat, -.charsheet input.sheet-tab69:checked ~ div.sheet-section-granted-powers, -.charsheet input.sheet-tab70:checked ~ div.sheet-section-weapon-standard-melee, -.charsheet input.sheet-tab71:checked ~ div.sheet-section-weapon-standard-ranged, -.charsheet input.sheet-tab72:checked ~ div.sheet-section-movement-mount, -.charsheet input.sheet-tab73:checked ~ div.sheet-section-character-info-details, -.charsheet input.sheet-tab74:checked ~ div.sheet-section-character-info-tracker, -.charsheet input.sheet-tab75:checked ~ div.sheet-section-currency-birthright, -.charsheet input.sheet-tab76:checked ~ div.sheet-section-birthright, -.charsheet input.sheet-tab77:checked ~ div.sheet-section-movement-barbarian, -.charsheet input.sheet-tab78:checked ~ div.sheet-section-attributes-dream, -.charsheet input.sheet-tab79:checked ~ div.sheet-section-movement-swimming, -.charsheet input.sheet-tab80:checked ~ div.sheet-section-movement-flying, -.charsheet input.sheet-tab81:checked ~ div.sheet-section-weapon-standard, -.charsheet input.sheet-tab82:checked ~ div.sheet-section-weapon-player-option, -.charsheet input.sheet-tab83:checked ~ div.sheet-section-weapon-player-option-melee, -.charsheet input.sheet-tab84:checked ~ div.sheet-section-weapon-player-option-ranged, -.charsheet input.sheet-tab85:checked ~ div.sheet-section-settings-page { - display: block; -} - -.charsheet input.sheet-tab99:checked ~ div[class^="sheet-section"] { - display: block; -} - .charsheet input.sheet-tab { width: 120px; height: inherit; From 3896b4e15474633b4b3b6694c0e25532a8f784cb Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Wed, 15 Feb 2023 13:48:35 +0100 Subject: [PATCH 20/58] Cleaned up spells real good! Now they look so nice and the support for spell points and arcs are way better --- ADnD_2E_Revised/2ESheet.html | 245 ++++++------------ ADnD_2E_Revised/2EStyle.css | 9 +- ADnD_2E_Revised/css/2EStyle-base.css | 9 +- .../components/priest-sphere-button.html | 5 - .../spell-slots-tracking-wizard.html | 4 +- .../character-tab/spells-tab/priest-tab.html | 82 +++--- .../character-tab/spells-tab/wizard-tab.html | 75 ++---- 7 files changed, 136 insertions(+), 293 deletions(-) delete mode 100644 ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/priest-sphere-button.html diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 52808214af..d4551ef532 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -3944,7 +3944,7 @@ Specialist Misc. Total - / + / Max @@ -3953,7 +3953,7 @@ - / + / @@ -3977,11 +3977,8 @@
      -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      @@ -4269,7 +4266,7 @@ Specialist Misc. Total - / + / Max @@ -4278,7 +4275,7 @@ - / + / @@ -4302,11 +4299,8 @@
      -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      @@ -4594,7 +4588,7 @@ Specialist Misc. Total - / + / Max @@ -4603,7 +4597,7 @@ - / + / @@ -4627,11 +4621,8 @@
      -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      @@ -4919,7 +4910,7 @@ Specialist Misc. Total - / + / Max @@ -4928,7 +4919,7 @@ - / + / @@ -4952,11 +4943,8 @@
      -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      @@ -5244,7 +5232,7 @@ Specialist Misc. Total - / + / Max @@ -5253,7 +5241,7 @@ - / + / @@ -5277,11 +5265,8 @@
      -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      @@ -5569,7 +5554,7 @@ Specialist Misc. Total - / + / Max @@ -5578,7 +5563,7 @@ - / + / @@ -5602,11 +5587,8 @@
      -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      @@ -5894,7 +5876,7 @@ Specialist Misc. Total - / + / Max @@ -5903,7 +5885,7 @@ - / + / @@ -5927,11 +5909,8 @@
      -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      @@ -6219,7 +6198,7 @@ Specialist Misc. Total - / + / Max @@ -6228,7 +6207,7 @@ - / + / @@ -6252,11 +6231,8 @@
      -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      @@ -6544,7 +6520,7 @@ Specialist Misc. Total - / + / Max @@ -6553,7 +6529,7 @@ - / + / @@ -6577,11 +6553,8 @@
      -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      @@ -6869,7 +6842,7 @@ Specialist Misc. Total - / + / Max @@ -6878,7 +6851,7 @@ - / + / @@ -6902,11 +6875,8 @@
      -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      @@ -7194,7 +7164,7 @@ Specialist Misc. Total - / + / Max @@ -7203,7 +7173,7 @@ - / + / @@ -7227,11 +7197,8 @@
      -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      @@ -7519,7 +7486,7 @@ Specialist Misc. Total - / + / Max @@ -7528,7 +7495,7 @@ - / + / @@ -7552,11 +7519,8 @@
      -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      @@ -7844,7 +7808,7 @@ Specialist Misc. Total - / + / Max @@ -7853,7 +7817,7 @@ - / + / @@ -7877,11 +7841,8 @@
      -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      @@ -8169,7 +8130,7 @@ Specialist Misc. Total - / + / Max @@ -8178,7 +8139,7 @@ - / + / @@ -8202,11 +8163,8 @@
      -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      @@ -8494,7 +8452,7 @@ Specialist Misc. Total - / + / Max @@ -8503,7 +8461,7 @@ - / + / @@ -8527,11 +8485,8 @@
      -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      @@ -8833,6 +8788,27 @@
      +
      + Show Spheres of Influence: +
      + Major: + + +
      + Minor: + + + + + + + + + +
      +
      +
      + @@ -8881,27 +8857,8 @@ -

      - Show Spheres of Influence: -
      -
      - Major: - - -
      - Minor: - - -
      -
      -
      -
      - -
      -
      -
      @@ -8939,11 +8896,8 @@ -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      @@ -9223,11 +9177,6 @@
      -
      - -
      -
      -
      @@ -9265,11 +9214,8 @@ -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      @@ -9549,11 +9495,6 @@
      -
      - -
      -
      -
      @@ -9591,11 +9532,8 @@ -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      @@ -9875,11 +9813,6 @@
      -
      - -
      -
      -
      @@ -9917,11 +9850,8 @@ -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      @@ -10201,11 +10131,6 @@
      -
      - -
      -
      -
      @@ -10243,11 +10168,8 @@ -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      @@ -10527,11 +10449,6 @@
      -
      - -
      -
      -
      @@ -10569,11 +10486,8 @@ -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      @@ -10853,11 +10767,6 @@
      -
      - -
      -
      -
      @@ -10895,11 +10804,8 @@ -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      @@ -11216,11 +11122,8 @@
      -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      diff --git a/ADnD_2E_Revised/2EStyle.css b/ADnD_2E_Revised/2EStyle.css index ffb42267af..9bf7e3639e 100644 --- a/ADnD_2E_Revised/2EStyle.css +++ b/ADnD_2E_Revised/2EStyle.css @@ -361,6 +361,13 @@ textarea.sheet-input-like { .charsheet input.sheet-tab35:checked ~ .sheet-section-priest-level-five, .charsheet input.sheet-tab36:checked ~ .sheet-section-priest-level-six, .charsheet input.sheet-tab37:checked ~ .sheet-section-priest-level-seven, +.charsheet input.sheet-tab31:checked ~ div .sheet-section-priest-level-one, +.charsheet input.sheet-tab32:checked ~ div .sheet-section-priest-level-two, +.charsheet input.sheet-tab33:checked ~ div .sheet-section-priest-level-three, +.charsheet input.sheet-tab34:checked ~ div .sheet-section-priest-level-four, +.charsheet input.sheet-tab35:checked ~ div .sheet-section-priest-level-five, +.charsheet input.sheet-tab36:checked ~ div .sheet-section-priest-level-six, +.charsheet input.sheet-tab37:checked ~ div .sheet-section-priest-level-seven, .charsheet input.sheet-tab38:checked ~ .sheet-section-priest-quest, .charsheet input.sheet-tab39:checked ~ .sheet-section-rogue-standard, .charsheet input.sheet-tab40:checked ~ .sheet-section-psionic-standard, @@ -1760,7 +1767,7 @@ input.sheet-show-worn-equipment:checked ~ .sheet-hidden, input.sheet-show-spell-slots:checked ~ .sheet-tab-content .sheet-spell-slots.sheet-hidden, input.sheet-show-spell-points:checked ~ .sheet-tab-content .sheet-spell-points.sheet-hidden, input.sheet-show-spell-arcs-winds:checked ~ .sheet-tab-content .sheet-spell-arcs-winds.sheet-hidden, -input.sheet-show-spell-spheres-pri:checked ~ div .sheet-spell-sphere-pri.sheet-hidden, +input.sheet-show-spell-spheres-pri:checked ~ .sheet-spell-sphere-pri.sheet-hidden, input.sheet-show-toast:checked + .sheet-hidden { display: revert; diff --git a/ADnD_2E_Revised/css/2EStyle-base.css b/ADnD_2E_Revised/css/2EStyle-base.css index 38c6808851..e6bd48f79b 100644 --- a/ADnD_2E_Revised/css/2EStyle-base.css +++ b/ADnD_2E_Revised/css/2EStyle-base.css @@ -361,6 +361,13 @@ textarea.sheet-input-like { .charsheet input.sheet-tab35:checked ~ .sheet-section-priest-level-five, .charsheet input.sheet-tab36:checked ~ .sheet-section-priest-level-six, .charsheet input.sheet-tab37:checked ~ .sheet-section-priest-level-seven, +.charsheet input.sheet-tab31:checked ~ div .sheet-section-priest-level-one, +.charsheet input.sheet-tab32:checked ~ div .sheet-section-priest-level-two, +.charsheet input.sheet-tab33:checked ~ div .sheet-section-priest-level-three, +.charsheet input.sheet-tab34:checked ~ div .sheet-section-priest-level-four, +.charsheet input.sheet-tab35:checked ~ div .sheet-section-priest-level-five, +.charsheet input.sheet-tab36:checked ~ div .sheet-section-priest-level-six, +.charsheet input.sheet-tab37:checked ~ div .sheet-section-priest-level-seven, .charsheet input.sheet-tab38:checked ~ .sheet-section-priest-quest, .charsheet input.sheet-tab39:checked ~ .sheet-section-rogue-standard, .charsheet input.sheet-tab40:checked ~ .sheet-section-psionic-standard, @@ -1066,7 +1073,7 @@ input.sheet-show-worn-equipment:checked ~ .sheet-hidden, input.sheet-show-spell-slots:checked ~ .sheet-tab-content .sheet-spell-slots.sheet-hidden, input.sheet-show-spell-points:checked ~ .sheet-tab-content .sheet-spell-points.sheet-hidden, input.sheet-show-spell-arcs-winds:checked ~ .sheet-tab-content .sheet-spell-arcs-winds.sheet-hidden, -input.sheet-show-spell-spheres-pri:checked ~ div .sheet-spell-sphere-pri.sheet-hidden, +input.sheet-show-spell-spheres-pri:checked ~ .sheet-spell-sphere-pri.sheet-hidden, input.sheet-show-toast:checked + .sheet-hidden { display: revert; diff --git a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/priest-sphere-button.html b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/priest-sphere-button.html deleted file mode 100644 index 30b997858c..0000000000 --- a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/priest-sphere-button.html +++ /dev/null @@ -1,5 +0,0 @@ -
      - -
      -
      -
      \ No newline at end of file diff --git a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/spell-slots-tracking-wizard.html b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/spell-slots-tracking-wizard.html index 34efd2528e..f99a455505 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/spell-slots-tracking-wizard.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/components/spell-slots-tracking-wizard.html @@ -6,7 +6,7 @@
      - + @@ -15,7 +15,7 @@ - +
      Specialist Misc. Total// Max
      //
      diff --git a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html index 02a7125d70..eb78c07de6 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html @@ -21,6 +21,27 @@
      +
      + Show Spheres of Influence: +
      + Major: + + +
      + Minor: + + + + + + + + + +
      +
      +
      + @@ -58,29 +79,11 @@
      insert_spell-slots-reset-button.html_(pri,(Not Quest)) -

      - Show Spheres of Influence: -
      -
      - Major: - - -
      - Minor: - - -
      -
      -
      - insert_priest-sphere-button.html_(pri1,1st) insert_spell-slots-tracking-priest.html_(level1) -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      insert_priest-spell-template.html_(pri1,,[[@{wisfail}]]%)
      @@ -95,13 +98,9 @@
      - insert_priest-sphere-button.html_(pri2,2nd) insert_spell-slots-tracking-priest.html_(level2) -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      insert_priest-spell-template.html_(pri2,,[[@{wisfail}]]%)
      @@ -116,13 +115,9 @@
      - insert_priest-sphere-button.html_(pri3,3rd) insert_spell-slots-tracking-priest.html_(level3) -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      insert_priest-spell-template.html_(pri3,,[[@{wisfail}]]%)
      @@ -137,13 +132,9 @@
      - insert_priest-sphere-button.html_(pri4,4th) insert_spell-slots-tracking-priest.html_(level4) -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      insert_priest-spell-template.html_(pri4,,[[@{wisfail}]]%)
      @@ -158,13 +149,9 @@
      - insert_priest-sphere-button.html_(pri5,5th) insert_spell-slots-tracking-priest.html_(level5) -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      insert_priest-spell-template.html_(pri5,,[[@{wisfail}]]%)
      @@ -179,13 +166,9 @@
      - insert_priest-sphere-button.html_(pri6,6th) insert_spell-slots-tracking-priest.html_(level6) -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      insert_priest-spell-template.html_(pri6,,[[@{wisfail}]]%)
      @@ -200,13 +183,9 @@
      - insert_priest-sphere-button.html_(pri7,7th) insert_spell-slots-tracking-priest.html_(level7) -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      insert_priest-spell-template.html_(pri7,,[[@{wisfail}]]%)
      @@ -222,11 +201,8 @@
      insert_spell-slots-tracking-priest.html_(levelq) -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      insert_priest-spell-template.html_(priq,,[[@{wisfail}]]%)
      diff --git a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html index eda9a42115..5e427d5a39 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html @@ -67,11 +67,8 @@
      insert_spell-slots-tracking-wizard.html_(level1) -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      insert_wizard-spell-template.html_(wiz1)
      @@ -87,11 +84,8 @@
      insert_spell-slots-tracking-wizard.html_(level2) -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      insert_wizard-spell-template.html_(wiz2)
      @@ -107,11 +101,8 @@
      insert_spell-slots-tracking-wizard.html_(level3) -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      insert_wizard-spell-template.html_(wiz3)
      @@ -127,11 +118,8 @@
      insert_spell-slots-tracking-wizard.html_(level4) -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      insert_wizard-spell-template.html_(wiz4)
      @@ -147,11 +135,8 @@
      insert_spell-slots-tracking-wizard.html_(level5) -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      insert_wizard-spell-template.html_(wiz5)
      @@ -167,11 +152,8 @@
      insert_spell-slots-tracking-wizard.html_(level6) -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      insert_wizard-spell-template.html_(wiz6)
      @@ -187,11 +169,8 @@
      insert_spell-slots-tracking-wizard.html_(level7) -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      insert_wizard-spell-template.html_(wiz7)
      @@ -207,11 +186,8 @@
      insert_spell-slots-tracking-wizard.html_(level8) -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      insert_wizard-spell-template.html_(wiz8)
      @@ -227,11 +203,8 @@
      insert_spell-slots-tracking-wizard.html_(level9) -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      insert_wizard-spell-template.html_(wiz9)
      @@ -247,11 +220,8 @@
      insert_spell-slots-tracking-wizard.html_(level10) -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      insert_wizard-spell-template.html_(wiz10)
      @@ -267,11 +237,8 @@
      insert_spell-slots-tracking-wizard.html_(level11) -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      insert_wizard-spell-template.html_(wiz11)
      @@ -287,11 +254,8 @@
      insert_spell-slots-tracking-wizard.html_(level12) -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      insert_wizard-spell-template.html_(wiz12)
      @@ -307,11 +271,8 @@
      insert_spell-slots-tracking-wizard.html_(level13) -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      insert_wizard-spell-template.html_(wiz13)
      @@ -327,11 +288,8 @@
      insert_spell-slots-tracking-wizard.html_(level14) -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      insert_wizard-spell-template.html_(wiz14)
      @@ -347,11 +305,8 @@
      insert_spell-slots-tracking-wizard.html_(level15) -

      - +
      -

      Spells Memorized and Spell Book

      -

      Spells Memorized

      insert_wizard-spell-template.html_(wiz15)
      From 11fb0f23a08ea9c265226c15ea01eaafc93324b9 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Wed, 15 Feb 2023 14:24:05 +0100 Subject: [PATCH 21/58] Updated change log --- ADnD_2E_Revised/2ESheet.html | 30 +++++++++++-------- ADnD_2E_Revised/html/changelog.html | 8 +++-- .../html/tabs/sheet-settings-tab.html | 20 ++++++------- ADnD_2E_Revised/javascript/abilityScores.js | 1 + ADnD_2E_Revised/javascript/sheetWorkers.js | 1 + 5 files changed, 36 insertions(+), 24 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index d4551ef532..1b9f366738 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -9,11 +9,15 @@

      Changes in

        -
      • Fixed autofill for simple magic weapons where the bonus is inserted in a spot without a whitespace. Here are some examples that have been fixed: +
      • 2Espell - Sensory signature and Knockdown switched places to make them appear in the same order as in the PO: Spells & Magic book
      • +
      • Completely redesigned the new spell section, so each spell can be on a single line, showing Name, Range, and Area of Effect
          -
        • 2Espell - Sensory signature and Knockdown switched places to make them appear in the same order as in the PO: Spells & Magic book
        • +
        • Single line spells can be folded out to show additional information of the spells
        • +
        • Removed the "Roll Spell Effect" button as it caused more confusion than it helped
      • +
      • Added Spell tracking selection to the Sheet Settings Tab. Choices are: Spell slots, spell points, arcs / songs / winds
      • +
      • Redesigned the Spells tab to only show the spell tracking system that selected on the Sheet Settings Tab

      @@ -21471,16 +21475,6 @@
      -

      Miscellaneous modifier popup

      -

      By default all rolls creates a popup asking for a 'Miscellaneous modifier' to capture when the DM says: 'Make an X-roll with +2'. - If your DM rarely asks for this, if you find the popup annoying, or if you would rather add any bonuses after the roll is made, this popup can be turned off

      - - -
      -

      Spell tracking system

      AD&D 2E have different systems for tracking spells, three have been implemented:
        @@ -21496,6 +21490,16 @@

        +

        Miscellaneous modifier popup

        +

        By default all rolls creates a popup asking for a 'Miscellaneous modifier' to capture when the DM says: 'Make an X-roll with +2'. + If your DM rarely asks for this, if you find the popup annoying, or if you would rather add any bonuses after the roll is made, this popup can be turned off

        + + +
        +

        Character Sheet specific


        Monster Sheet specific

        @@ -33856,6 +33860,7 @@ intelligenceTable['intimm4th'] = ['Error','','','','','','','','','','','','','' intelligenceTable['intimm5th'] = ['Error','','','','','','','','','','','','','','','','','','','','','','','5th-level','5th-level','5th-level']; intelligenceTable['intimm6th'] = ['Error','','','','','','','','','','','','','','','','','','','','','','','','6th-level','6th-level']; intelligenceTable['intimm7th'] = ['Error','','','','','','','','','','','','','','','','','','','','','','','','','7th-level']; +// intelligenceTable['spell-points-int'] = ['Error','','','','','','','','','2','2','2','3','3','4','4','5','6','7','8','9','9','9','9','9','9']; intelligenceTable['intnotes'] = ['INVALID INTELLIGENCE','Communicate by Grunts & Gestures','','','','','','','','','','','','','','','','','','','','','','','','','']; const wisdomTable = {}; @@ -69274,6 +69279,7 @@ on('change:intelligence change:reason change:knowledge', function() { intimm5th: intelligenceTable['intimm5th'][reason], intimm6th: intelligenceTable['intimm6th'][reason], intimm7th: intelligenceTable['intimm7th'][reason], + // ['spell-points-int']: intelligenceTable['spell-points-int'][intelligence], intnotes: intnotes, int2notes: int2notes, }); diff --git a/ADnD_2E_Revised/html/changelog.html b/ADnD_2E_Revised/html/changelog.html index a6ee70ec51..ec0437d2fc 100644 --- a/ADnD_2E_Revised/html/changelog.html +++ b/ADnD_2E_Revised/html/changelog.html @@ -4,11 +4,15 @@

        Changes in

          -
        • Fixed autofill for simple magic weapons where the bonus is inserted in a spot without a whitespace. Here are some examples that have been fixed: +
        • 2Espell - Sensory signature and Knockdown switched places to make them appear in the same order as in the PO: Spells & Magic book
        • +
        • Completely redesigned the new spell section, so each spell can be on a single line, showing Name, Range, and Area of Effect
            -
          • 2Espell - Sensory signature and Knockdown switched places to make them appear in the same order as in the PO: Spells & Magic book
          • +
          • Single line spells can be folded out to show additional information of the spells
          • +
          • Removed the "Roll Spell Effect" button as it caused more confusion than it helped
        • +
        • Added Spell tracking selection to the Sheet Settings Tab. Choices are: Spell slots, spell points, arcs / songs / winds
        • +
        • Redesigned the Spells tab to only show the spell tracking system that selected on the Sheet Settings Tab

        diff --git a/ADnD_2E_Revised/html/tabs/sheet-settings-tab.html b/ADnD_2E_Revised/html/tabs/sheet-settings-tab.html index b8c025d263..6ed6642a04 100644 --- a/ADnD_2E_Revised/html/tabs/sheet-settings-tab.html +++ b/ADnD_2E_Revised/html/tabs/sheet-settings-tab.html @@ -175,16 +175,6 @@
        -

        Miscellaneous modifier popup

        -

        By default all rolls creates a popup asking for a 'Miscellaneous modifier' to capture when the DM says: 'Make an X-roll with +2'. - If your DM rarely asks for this, if you find the popup annoying, or if you would rather add any bonuses after the roll is made, this popup can be turned off

        - - -
        -

        Spell tracking system

        AD&D 2E have different systems for tracking spells, three have been implemented:
          @@ -200,6 +190,16 @@

          +

          Miscellaneous modifier popup

          +

          By default all rolls creates a popup asking for a 'Miscellaneous modifier' to capture when the DM says: 'Make an X-roll with +2'. + If your DM rarely asks for this, if you find the popup annoying, or if you would rather add any bonuses after the roll is made, this popup can be turned off

          + + +
          +

          Character Sheet specific


          Monster Sheet specific

          diff --git a/ADnD_2E_Revised/javascript/abilityScores.js b/ADnD_2E_Revised/javascript/abilityScores.js index fcb3a0008a..cd4b4c6b81 100644 --- a/ADnD_2E_Revised/javascript/abilityScores.js +++ b/ADnD_2E_Revised/javascript/abilityScores.js @@ -99,6 +99,7 @@ intelligenceTable['intimm4th'] = ['Error','','','','','','','','','','','','','' intelligenceTable['intimm5th'] = ['Error','','','','','','','','','','','','','','','','','','','','','','','5th-level','5th-level','5th-level']; intelligenceTable['intimm6th'] = ['Error','','','','','','','','','','','','','','','','','','','','','','','','6th-level','6th-level']; intelligenceTable['intimm7th'] = ['Error','','','','','','','','','','','','','','','','','','','','','','','','','7th-level']; +// intelligenceTable['spell-points-int'] = ['Error','','','','','','','','','2','2','2','3','3','4','4','5','6','7','8','9','9','9','9','9','9']; intelligenceTable['intnotes'] = ['INVALID INTELLIGENCE','Communicate by Grunts & Gestures','','','','','','','','','','','','','','','','','','','','','','','','','']; const wisdomTable = {}; diff --git a/ADnD_2E_Revised/javascript/sheetWorkers.js b/ADnD_2E_Revised/javascript/sheetWorkers.js index 83f68b1a97..cb08d1498d 100644 --- a/ADnD_2E_Revised/javascript/sheetWorkers.js +++ b/ADnD_2E_Revised/javascript/sheetWorkers.js @@ -659,6 +659,7 @@ on('change:intelligence change:reason change:knowledge', function() { intimm5th: intelligenceTable['intimm5th'][reason], intimm6th: intelligenceTable['intimm6th'][reason], intimm7th: intelligenceTable['intimm7th'][reason], + // ['spell-points-int']: intelligenceTable['spell-points-int'][intelligence], intnotes: intnotes, int2notes: int2notes, }); From 450fec6d267c11777c7d93ad9e119115b49c5712 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Wed, 15 Feb 2023 15:48:11 +0100 Subject: [PATCH 22/58] - Restyled monster sheet to dynamically size input fields. - Added more space for monster HP and hit dice --- ADnD_2E_Revised/2ESheet.html | 131 ++++++++++-------- ADnD_2E_Revised/2EStyle.css | 16 +++ ADnD_2E_Revised/css/2EStyle-base.css | 16 +++ ADnD_2E_Revised/html/2ESheet-base.html | 5 + .../html/tabs/character-tab/spells-tab.html | 4 - ADnD_2E_Revised/html/tabs/monster-tab.html | 122 ++++++++-------- 6 files changed, 174 insertions(+), 120 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 1b9f366738..bb007a9048 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -47,6 +47,11 @@

          + + + + +
          Info  @@ -3857,10 +3862,6 @@ Powers

          - - - -

          Spell Levels


          @@ -20716,134 +20717,144 @@
          - +
          - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + +
          Name:
          Climate/Terrain:
          Frequency:
          Organization:
          Activity Cycle:
          Diet:
          Intelligence:
          Treasure:
          Alignment:
          - +
          - + - + - + - - + + - + - + - + - - + + - - + +
          No. Appearing:
          Armor Class:
          Movement:
          Hit Dice: - ± - | - - + + + + + + + + + +
          ±|
          Hit Points: - - / - + + + + + + +
          /
          THAC0:
          # of Attacks:
          Attack 1:
          - +
          - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + +
          Attack 2:
          Attack 3:
          Special Atk:
          Special Def:
          Magic Res:
          Size:
          Morale:
          XP Value:
          diff --git a/ADnD_2E_Revised/2EStyle.css b/ADnD_2E_Revised/2EStyle.css index 9bf7e3639e..eb0b3da909 100644 --- a/ADnD_2E_Revised/2EStyle.css +++ b/ADnD_2E_Revised/2EStyle.css @@ -1667,6 +1667,22 @@ table.sheet-padding-right-column2 td:nth-child(2) { padding-right: 5px; } +.sheet-table-nowrap th, +.sheet-table-nowrap td, +.sheet-table-nowrap-column1 th:nth-child(1), +.sheet-table-nowrap-column1 td:nth-child(1), +.sheet-table-nowrap-column2 th:nth-child(2), +.sheet-table-nowrap-column2 td:nth-child(2) { + white-space: nowrap; +} + +.sheet-table-full-width-column1 th:nth-child(1), +.sheet-table-full-width-column1 td:nth-child(1), +.sheet-table-full-width-column2 th:nth-child(2), +.sheet-table-full-width-column2 td:nth-child(2) { + width: 100%; +} + .sheet-table-white { color: #FFF; font-family: Arial, sans-serif; diff --git a/ADnD_2E_Revised/css/2EStyle-base.css b/ADnD_2E_Revised/css/2EStyle-base.css index e6bd48f79b..d26d7214f1 100644 --- a/ADnD_2E_Revised/css/2EStyle-base.css +++ b/ADnD_2E_Revised/css/2EStyle-base.css @@ -973,6 +973,22 @@ table.sheet-padding-right-column2 td:nth-child(2) { padding-right: 5px; } +.sheet-table-nowrap th, +.sheet-table-nowrap td, +.sheet-table-nowrap-column1 th:nth-child(1), +.sheet-table-nowrap-column1 td:nth-child(1), +.sheet-table-nowrap-column2 th:nth-child(2), +.sheet-table-nowrap-column2 td:nth-child(2) { + white-space: nowrap; +} + +.sheet-table-full-width-column1 th:nth-child(1), +.sheet-table-full-width-column1 td:nth-child(1), +.sheet-table-full-width-column2 th:nth-child(2), +.sheet-table-full-width-column2 td:nth-child(2) { + width: 100%; +} + .sheet-table-white { color: #FFF; font-family: Arial, sans-serif; diff --git a/ADnD_2E_Revised/html/2ESheet-base.html b/ADnD_2E_Revised/html/2ESheet-base.html index 20147b25fb..64d5b29397 100644 --- a/ADnD_2E_Revised/html/2ESheet-base.html +++ b/ADnD_2E_Revised/html/2ESheet-base.html @@ -12,6 +12,11 @@ insert_changelog.html

          + + + + + insert_character-tab.html insert_monster-tab.html insert_sheet-settings-tab.html diff --git a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab.html b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab.html index aab1250af3..a0e385cbeb 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab.html @@ -7,10 +7,6 @@ Powers

          - - - - insert_wizard-tab.html insert_priest-tab.html insert_powers-tab.html diff --git a/ADnD_2E_Revised/html/tabs/monster-tab.html b/ADnD_2E_Revised/html/tabs/monster-tab.html index 7fe47831c6..4e1148f37d 100644 --- a/ADnD_2E_Revised/html/tabs/monster-tab.html +++ b/ADnD_2E_Revised/html/tabs/monster-tab.html @@ -4,134 +4,144 @@
          - +
          - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + +
          Name:
          Climate/Terrain:
          Frequency:
          Organization:
          Activity Cycle:
          Diet:
          Intelligence:
          Treasure:
          Alignment:
          - +
          - + - + - + - - + + - + - + - + - - + + - - + +
          No. Appearing:
          Armor Class:
          Movement:
          Hit Dice: - ± - | - - + + + + + + + + + +
          ±|
          Hit Points: - - / - + + + + + + +
          /
          THAC0:
          # of Attacks:
          Attack 1:
          - +
          - - + + - - + + - - + + - - + + - - + + - + - + - - + + - - + +
          Attack 2:
          Attack 3:
          Special Atk:
          Special Def:
          Magic Res:
          Size:
          Morale:
          XP Value:
          From 93da684ca603dbecbf4d5383b3a68fe2049642b9 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Wed, 15 Feb 2023 15:50:35 +0100 Subject: [PATCH 23/58] Changed padding a bit --- ADnD_2E_Revised/2ESheet.html | 2 +- ADnD_2E_Revised/html/tabs/monster-tab.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index bb007a9048..246cba7783 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -20782,7 +20782,7 @@ ± - | + | diff --git a/ADnD_2E_Revised/html/tabs/monster-tab.html b/ADnD_2E_Revised/html/tabs/monster-tab.html index 4e1148f37d..062a962ed2 100644 --- a/ADnD_2E_Revised/html/tabs/monster-tab.html +++ b/ADnD_2E_Revised/html/tabs/monster-tab.html @@ -69,7 +69,7 @@ ± - | + | From be0f6aef314f5fca57db00e6b333c40257a966ac Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Wed, 15 Feb 2023 15:51:42 +0100 Subject: [PATCH 24/58] updated change log --- ADnD_2E_Revised/2ESheet.html | 1 + ADnD_2E_Revised/html/changelog.html | 1 + 2 files changed, 2 insertions(+) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 246cba7783..2eca2df5dd 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -18,6 +18,7 @@
        • Added Spell tracking selection to the Sheet Settings Tab. Choices are: Spell slots, spell points, arcs / songs / winds
        • Redesigned the Spells tab to only show the spell tracking system that selected on the Sheet Settings Tab
        • +
        • Styled Monster tab to have dynamically sized fields, and larger fields for Hice Dice, HP, and Max HP

        diff --git a/ADnD_2E_Revised/html/changelog.html b/ADnD_2E_Revised/html/changelog.html index ec0437d2fc..065eaae948 100644 --- a/ADnD_2E_Revised/html/changelog.html +++ b/ADnD_2E_Revised/html/changelog.html @@ -13,6 +13,7 @@

      • Added Spell tracking selection to the Sheet Settings Tab. Choices are: Spell slots, spell points, arcs / songs / winds
      • Redesigned the Spells tab to only show the spell tracking system that selected on the Sheet Settings Tab
      • +
      • Styled Monster tab to have dynamically sized fields, and larger fields for Hice Dice, HP, and Max HP

      From 2e506c59898aa616a98890bbe286dd4bc9f2829f Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Wed, 15 Feb 2023 20:51:51 +0100 Subject: [PATCH 25/58] Remove logic, html, css for hiding the default add spell row button --- ADnD_2E_Revised/2ESheet.html | 63 ------------------- ADnD_2E_Revised/2EStyle.css | 9 --- ADnD_2E_Revised/css/2EStyle-base.css | 9 --- .../html/shared/priest-spell-template.html | 4 +- .../html/shared/wizard-spell-template.html | 4 +- ADnD_2E_Revised/javascript/sheetWorkers.js | 13 ---- ADnD_2E_Revised/pug/spellTemplate.pug | 4 +- 7 files changed, 3 insertions(+), 103 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 2eca2df5dd..85ed4573db 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -3987,7 +3987,6 @@

      Spells Memorized

      -
      @@ -4152,7 +4151,6 @@ -
      @@ -4309,7 +4307,6 @@

      Spells Memorized

      -
      @@ -4474,7 +4471,6 @@ -
      @@ -4631,7 +4627,6 @@

      Spells Memorized

      -
      @@ -4796,7 +4791,6 @@ -
      @@ -4953,7 +4947,6 @@

      Spells Memorized

      -
      @@ -5118,7 +5111,6 @@ -
      @@ -5275,7 +5267,6 @@

      Spells Memorized

      -
      @@ -5440,7 +5431,6 @@ -
      @@ -5597,7 +5587,6 @@

      Spells Memorized

      -
      @@ -5762,7 +5751,6 @@ -
      @@ -5919,7 +5907,6 @@

      Spells Memorized

      -
      @@ -6084,7 +6071,6 @@ -
      @@ -6241,7 +6227,6 @@

      Spells Memorized

      -
      @@ -6406,7 +6391,6 @@ -
      @@ -6563,7 +6547,6 @@

      Spells Memorized

      -
      @@ -6728,7 +6711,6 @@ -
      @@ -6885,7 +6867,6 @@

      Spells Memorized

      -
      @@ -7050,7 +7031,6 @@ -
      @@ -7207,7 +7187,6 @@

      Spells Memorized

      -
      @@ -7372,7 +7351,6 @@ -
      @@ -7529,7 +7507,6 @@

      Spells Memorized

      -
      @@ -7694,7 +7671,6 @@ -
      @@ -7851,7 +7827,6 @@

      Spells Memorized

      -
      @@ -8016,7 +7991,6 @@ -
      @@ -8173,7 +8147,6 @@

      Spells Memorized

      -
      @@ -8338,7 +8311,6 @@ -
      @@ -8495,7 +8467,6 @@

      Spells Memorized

      -
      @@ -8660,7 +8631,6 @@ -
      @@ -8906,7 +8876,6 @@

      Spells Memorized

      -
      @@ -9071,7 +9040,6 @@ -
      @@ -9224,7 +9192,6 @@

      Spells Memorized

      -
      @@ -9389,7 +9356,6 @@ -
      @@ -9542,7 +9508,6 @@

      Spells Memorized

      -
      @@ -9707,7 +9672,6 @@ -
      @@ -9860,7 +9824,6 @@

      Spells Memorized

      -
      @@ -10025,7 +9988,6 @@ -
      @@ -10178,7 +10140,6 @@

      Spells Memorized

      -
      @@ -10343,7 +10304,6 @@ -
      @@ -10496,7 +10456,6 @@

      Spells Memorized

      -
      @@ -10661,7 +10620,6 @@ -
      @@ -10814,7 +10772,6 @@

      Spells Memorized

      -
      @@ -10979,7 +10936,6 @@ -
      @@ -11132,7 +11088,6 @@

      Spells Memorized

      -
      @@ -11297,7 +11252,6 @@ -
      @@ -20921,7 +20875,6 @@
      -
      @@ -21086,7 +21039,6 @@ -
      @@ -21100,7 +21052,6 @@
      -
      @@ -21265,7 +21216,6 @@ -
      @@ -69851,18 +69801,6 @@ function setupAutoFillSpellInfo(section, spellsTable, optionalRulesFields) { }); } -const addSpellRow = function(section) { - on(`clicked:spells-${section}-add-row`, function (eventObject) { - getAttrs(['spell-tracking-system'], function (values) { - let spellTrackingSystem = values['spell-tracking-system']; - const rowID = generateRowID(); - const setObj = {}; - setObj[`repeating_spells-${section}_${rowID}_show-${spellTrackingSystem}`] = 1; - setAttrs(setObj,{silent:true}); - }); - }); -} - let wizardSpellLevelsSections = [ {level: '1', sections: ['', '2', '3', 'wiz1']}, {level: '2', sections: ['4', '5', '6', 'wiz2']}, @@ -69912,7 +69850,6 @@ wizardSpellLevelsSections.forEach(spellLevel => { if (isNewSpellSection(lastSection)) { setupAutoFillSpellInfo(lastSection, wizardSpells, SCHOOL_FIELDS); setupSpellCrit(lastSection); - addSpellRow(lastSection); } }); setupAutoFillSpellInfo('wizmonster', wizardSpells, SCHOOL_FIELDS); diff --git a/ADnD_2E_Revised/2EStyle.css b/ADnD_2E_Revised/2EStyle.css index eb0b3da909..8a181f4f50 100644 --- a/ADnD_2E_Revised/2EStyle.css +++ b/ADnD_2E_Revised/2EStyle.css @@ -1813,15 +1813,6 @@ div.repcontainer:not(.editmode) div.repitem th button[type="action"] { position: relative; } -/* Hide +Add button so that it can be controlled from sheetworker */ -.repcontrol-hide-add ~ .repcontrol > .repcontrol_add { - display: none !important; -} - -.editmode ~ .repcontrol-button { - display: none; -} - .sheet-action-button, .sheet-action-button-roll { height: 19px; diff --git a/ADnD_2E_Revised/css/2EStyle-base.css b/ADnD_2E_Revised/css/2EStyle-base.css index d26d7214f1..8f95ad109d 100644 --- a/ADnD_2E_Revised/css/2EStyle-base.css +++ b/ADnD_2E_Revised/css/2EStyle-base.css @@ -1119,15 +1119,6 @@ div.repcontainer:not(.editmode) div.repitem th button[type="action"] { position: relative; } -/* Hide +Add button so that it can be controlled from sheetworker */ -.repcontrol-hide-add ~ .repcontrol > .repcontrol_add { - display: none !important; -} - -.editmode ~ .repcontrol-button { - display: none; -} - .sheet-action-button, .sheet-action-button-roll { height: 19px; diff --git a/ADnD_2E_Revised/html/shared/priest-spell-template.html b/ADnD_2E_Revised/html/shared/priest-spell-template.html index fdd35c934f..07251574ff 100644 --- a/ADnD_2E_Revised/html/shared/priest-spell-template.html +++ b/ADnD_2E_Revised/html/shared/priest-spell-template.html @@ -1,5 +1,4 @@ -
      @@ -163,5 +162,4 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/ADnD_2E_Revised/html/shared/wizard-spell-template.html b/ADnD_2E_Revised/html/shared/wizard-spell-template.html index a97221d727..de68d8cdda 100644 --- a/ADnD_2E_Revised/html/shared/wizard-spell-template.html +++ b/ADnD_2E_Revised/html/shared/wizard-spell-template.html @@ -1,5 +1,4 @@ -
      @@ -163,5 +162,4 @@ - - \ No newline at end of file + \ No newline at end of file diff --git a/ADnD_2E_Revised/javascript/sheetWorkers.js b/ADnD_2E_Revised/javascript/sheetWorkers.js index cb08d1498d..4a9dd16204 100644 --- a/ADnD_2E_Revised/javascript/sheetWorkers.js +++ b/ADnD_2E_Revised/javascript/sheetWorkers.js @@ -1219,18 +1219,6 @@ function setupAutoFillSpellInfo(section, spellsTable, optionalRulesFields) { }); } -const addSpellRow = function(section) { - on(`clicked:spells-${section}-add-row`, function (eventObject) { - getAttrs(['spell-tracking-system'], function (values) { - let spellTrackingSystem = values['spell-tracking-system']; - const rowID = generateRowID(); - const setObj = {}; - setObj[`repeating_spells-${section}_${rowID}_show-${spellTrackingSystem}`] = 1; - setAttrs(setObj,{silent:true}); - }); - }); -} - let wizardSpellLevelsSections = [ {level: '1', sections: ['', '2', '3', 'wiz1']}, {level: '2', sections: ['4', '5', '6', 'wiz2']}, @@ -1280,7 +1268,6 @@ wizardSpellLevelsSections.forEach(spellLevel => { if (isNewSpellSection(lastSection)) { setupAutoFillSpellInfo(lastSection, wizardSpells, SCHOOL_FIELDS); setupSpellCrit(lastSection); - addSpellRow(lastSection); } }); setupAutoFillSpellInfo('wizmonster', wizardSpells, SCHOOL_FIELDS); diff --git a/ADnD_2E_Revised/pug/spellTemplate.pug b/ADnD_2E_Revised/pug/spellTemplate.pug index 48838c46c4..7379f5dfe8 100644 --- a/ADnD_2E_Revised/pug/spellTemplate.pug +++ b/ADnD_2E_Revised/pug/spellTemplate.pug @@ -3,7 +3,6 @@ if isPriest - failureCheck = '{{checkroll=[[1d100]]%}}{{checktarget=#REPLACE2#}}{{fail=The spell is expended with absolutely no effect whatsoever.}}' - arcWind = 'Wind' -div(class="repcontrol-hide-add") fieldset(name="repeating_spells-#REPLACE0#" class="repeating_spells-#REPLACE0#") div(class="sheet-spell-line") table(class="sheet-default-header-first-row sheet-inline" style="flex-grow: 1") @@ -113,5 +112,4 @@ fieldset(name="repeating_spells-#REPLACE0#" class="repeating_spells-#REPLACE0#") th Materials: td(colspan="3") textarea(name="attr_spell-materials" title="@{repeating_spells-#REPLACE0#_$X_spell-materials}" class="sheet-table-dynamic sheet-input-like" placeholder="Materials") - textarea(name="attr_spell-effect" title="@{repeating_spells-#REPLACE0#_$X_spell-effect}" placeholder="Insert Spell effects." class="sheet-spell-effect") -button(type="action" name="act_spells-#REPLACE0#-add-row" class="btn repcontrol-button") +Add \ No newline at end of file + textarea(name="attr_spell-effect" title="@{repeating_spells-#REPLACE0#_$X_spell-effect}" placeholder="Insert Spell effects." class="sheet-spell-effect") \ No newline at end of file From 9f8c8cf4275cc0a00d67c0d312f97f0b524945cc Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Wed, 15 Feb 2023 21:01:58 +0100 Subject: [PATCH 26/58] extracted more css to its own file --- ADnD_2E_Revised/2EStyle.css | 696 +++++++++++------------ ADnD_2E_Revised/css/2EStyle-base.css | 72 +-- ADnD_2E_Revised/css/announcements.css | 34 ++ ADnD_2E_Revised/css/browser-support.css | 13 + ADnD_2E_Revised/css/roll20-overrides.css | 10 + 5 files changed, 406 insertions(+), 419 deletions(-) create mode 100644 ADnD_2E_Revised/css/announcements.css create mode 100644 ADnD_2E_Revised/css/browser-support.css create mode 100644 ADnD_2E_Revised/css/roll20-overrides.css diff --git a/ADnD_2E_Revised/2EStyle.css b/ADnD_2E_Revised/2EStyle.css index 8a181f4f50..a54bffdc1c 100644 --- a/ADnD_2E_Revised/2EStyle.css +++ b/ADnD_2E_Revised/2EStyle.css @@ -877,6 +877,350 @@ button { background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ADnD_2E_Revised/img/background-parchment_paper_seamless_pattern.jpg"); } +.sheet-inline, +.sheet-inline-5 { + display: inline-block; +} + +.sheet-inline-5 { + padding-right: 5px; +} + +table.sheet-default-header-first-row tr:first-child, +table.sheet-default-header-thead thead:first-child, +table.sheet-default-header-even-row tr:nth-child(even), +table.sheet-default-header-odd-row tr:nth-child(odd), +table.sheet-default-header-every-third-row tr:nth-child(3n+1), +table.sheet-default-header-first-column td:first-child, +table.sheet-default-header-first-column th:first-child, +table.sheet-default-header-even-column td:nth-child(even), +table.sheet-default-header-even-column th:nth-child(even), +table.sheet-default-header-odd-column td:nth-child(odd), +table.sheet-default-header-odd-column th:nth-child(odd), +table.sheet-default-header-every-third-column td:nth-child(3n+1), +.sheet-default-header { + background-color: #7C0303; + color: #FFF; + font-family: Arial, sans-serif; + font-weight: bold; +} + +table.sheet-background-gray-pair3 tr:nth-child(6n+5), +table.sheet-background-gray-pair3 tr:nth-child(6n+6), +table.sheet-background-gray-pair3 tr:nth-child(6n+7) { + background-color: rgb(0, 0, 0, 10%); +} + +.sheet-centering, +.sheet-centering-padding-2, +.sheet-centering-padding-5, +table.sheet-centering-column1 th:nth-child(1), +table.sheet-centering-column1 td:nth-child(1), +table.sheet-centering-column2 th:nth-child(2), +table.sheet-centering-column2 td:nth-child(2), +table.sheet-centering-column3 th:nth-child(3), +table.sheet-centering-column3 td:nth-child(3), +table.sheet-centering-column4 th:nth-child(4), +table.sheet-centering-column4 td:nth-child(4), +table.sheet-centering-padding-5-column2 th:nth-child(2), +table.sheet-centering-padding-5-column2 td:nth-child(2), +table.sheet-centering-padding-5-column3 th:nth-child(3), +table.sheet-centering-padding-5-column3 td:nth-child(3), +table.sheet-centering-padding-5-column4 th:nth-child(4), +table.sheet-centering-padding-5-column4 td:nth-child(4), +table.sheet-centering-padding-5-column5 th:nth-child(5), +table.sheet-centering-padding-5-column5 td:nth-child(5) { + text-align: center; + vertical-align: middle; +} + +.sheet-centering-horizontal { + text-align: center; +} + +.sheet-centering-vertical { + vertical-align: middle; +} + +.sheet-table-center { + margin-left: auto; + margin-right: auto; +} + +.sheet-centering-padding-2 { + padding-left: 2px; + padding-right: 2px; +} + +table.sheet-centering-padding-5-column2 th:nth-child(2), +table.sheet-centering-padding-5-column2 td:nth-child(2), +table.sheet-centering-padding-5-column3 th:nth-child(3), +table.sheet-centering-padding-5-column3 td:nth-child(3), +table.sheet-centering-padding-5-column4 th:nth-child(4), +table.sheet-centering-padding-5-column4 td:nth-child(4), +.sheet-centering-padding-5 { + padding-left: 5px; + padding-right: 5px; +} + +.sheet-padding-right, +table.sheet-padding-right-column1 th:nth-child(1), +table.sheet-padding-right-column1 td:nth-child(1), +table.sheet-padding-right-column2 th:nth-child(2), +table.sheet-padding-right-column2 td:nth-child(2) { + padding-right: 5px; +} + +.sheet-table-nowrap th, +.sheet-table-nowrap td, +.sheet-table-nowrap-column1 th:nth-child(1), +.sheet-table-nowrap-column1 td:nth-child(1), +.sheet-table-nowrap-column2 th:nth-child(2), +.sheet-table-nowrap-column2 td:nth-child(2) { + white-space: nowrap; +} + +.sheet-table-full-width-column1 th:nth-child(1), +.sheet-table-full-width-column1 td:nth-child(1), +.sheet-table-full-width-column2 th:nth-child(2), +.sheet-table-full-width-column2 td:nth-child(2) { + width: 100%; +} + +.sheet-table-white { + color: #FFF; + font-family: Arial, sans-serif; + font-weight: bold; +} + +.sheet-table-slim-first-column td:first-child { + width: 1px; +} + +.sheet-table-sub-ability-score tr:nth-child(3n) button:first-child, +.sheet-table-sub-ability-score tr:nth-child(3n-1) button:first-child { + margin-left: 10px; +} + +.sheet-note { + line-height:1em; + font-family: Arial, sans-serif; + font-size:.8125rem; + font-weight: bold; + color: #000; +} + +.sheet-flex, +.charsheet .sheet-body .sheet-flex { + display: flex; +} + +.sheet-flex-column, +.charsheet .sheet-body .sheet-flex-column { + display: flex; + flex-direction: column; +} + +.sheet-spell-line { + display: flex; + align-items: flex-end; + justify-content: space-between; + column-gap: 5px; +} + +.sheet-spell-fold { + display: flex; + justify-content: space-between; + column-gap: 10px; + padding-top: 5px; + padding-bottom: 5px; + padding-left: 15px; +} + +.charsheet .sheet-spell-effect { + height: unset; + resize: vertical; + margin-bottom: 0; +} + +.charsheet label input[type="radio"], +.charsheet label input[type="checkbox"] { + position: absolute; + width: 100%; + height: 100%; + opacity: 0; + left: 0; + top: 0; + margin: 0; +} + +table { + border-collapse: collapse; + border-spacing: 0; +} + +td, +th { + text-align: inherit; + padding-left: inherit; +} + +/* Show hide styling */ +.sheet-collapse { + visibility: collapse; +} + +.sheet-hidden { + display: none; +} + +.sheet-hidden.sheet-show, +input.sheet-show-worn-equipment:checked ~ .sheet-hidden, +input.sheet-show-spell-slots:checked ~ .sheet-tab-content .sheet-spell-slots.sheet-hidden, +input.sheet-show-spell-points:checked ~ .sheet-tab-content .sheet-spell-points.sheet-hidden, +input.sheet-show-spell-arcs-winds:checked ~ .sheet-tab-content .sheet-spell-arcs-winds.sheet-hidden, +input.sheet-show-spell-spheres-pri:checked ~ .sheet-spell-sphere-pri.sheet-hidden, +input.sheet-show-toast:checked + .sheet-hidden +{ + display: revert; +} + +.btn.sheet-hidden { + padding-top: 2px; + padding-left: 8px; + padding-right: 8px; +} + +div.repcontainer div.repitem:first-child td.sheet-show-first, +div.repcontainer div.repitem:first-child tr.sheet-show-first, +div.repcontainer div.repitem:first-child th.sheet-show-first, +div.repcontainer div.repitem:first-child thead.sheet-show-first { + visibility: visible; +} + +.sheet-action-button, +.sheet-action-button-roll { + height: 19px; + font-size: 1.3em; + padding: 2px 3px; + margin: 0 3px; +} + +.sheet-action-button-roll:before { + font-family: "dicefontd20"; + content: "t"; +} + +/*#region Announcement styling start */ +input.sheet-show-announcement:checked ~ .sheet-hidden { + display: revert; +} + +div.sheet-announcement { + width: 95%; + margin: 5px; + border: 3px solid #ff0000; + border-radius: 8px; + padding: 8px; + background: #ababab; + box-sizing: border-box; +} + +.sheet-selectable { + font-style: italic; + font-weight: bold; + color: #181E72; + -webkit-user-select: all; /* Chrome all / Safari all */ + -moz-user-select: all; /* Firefox all */ + -ms-user-select: all; /* IE 10+ */ + user-select: all; /* Likely future */ +} + +img.expandable { + transition:transform 0.25s ease; +} + +img.expandable:hover { + -webkit-transform:scale(3); /* or some other value */ + transform:scale(3); +} +/*#endregion Announcement styling end */ +/*#region Toast styling*/ +.sheet-toast { + position: fixed; + right: 30px; + bottom: -13px; + text-align: center; + width: 300px; + height: 200px; +} + +.sheet-toast div { + position: absolute; + top: 0; + right: 0; + border: 2px solid; + border-radius: 10px; + cursor: text; +} + +input.sheet-toast-success:checked ~ .sheet-toast-content { + border-color: #badbcc; + background-color: #d1e7dd; +} +input.sheet-toast-info:checked ~ .sheet-toast-content { + border-color: #b6d4fe; + background-color: #cfe2ff; +} +input.sheet-toast-warning:checked ~ .sheet-toast-content { + border-color: #ffecb5; + background-color: #fff3cd; +} +input.sheet-toast-error:checked ~ .sheet-toast-content { + border-color: #f5c2c7; + background-color: #f8d7da; +} + +.sheet-toast input { + text-align: center; + font-size: 18px; + font-weight: bold; + width: 100%; +} + +.sheet-toast input, +.sheet-toast textarea { + border: 0; + background-color: transparent; + cursor: text; + margin-bottom: 0; + resize: none; +} + +.sheet-hide-toast { + position: absolute; + top: -10px; + right: -12px; + z-index: 1; + border-radius: 20px; + border-color: black; + background-color: white; + font-weight: bold; +} +/*#endregion Toast styling end*/ +/* Firefox styling */ +@supports (-moz-appearance:none) { + .charsheet .sheet-chrome { + display: none; + } +} + +/* Not Firefox styling */ +@supports not (-moz-appearance:none) { + .charsheet .sheet-firefox { + display: none; + } +} /*/ Styles for 2ESheet rolltemplates /*/ .sheet-rolltemplate-darkmode .inlinerollresult { color: rgb(255, 171, 0); @@ -1572,236 +1916,6 @@ button { } /*#endregion*/ - -.sheet-inline, -.sheet-inline-5 { - display: inline-block; -} - -.sheet-inline-5 { - padding-right: 5px; -} - -table.sheet-default-header-first-row tr:first-child, -table.sheet-default-header-thead thead:first-child, -table.sheet-default-header-even-row tr:nth-child(even), -table.sheet-default-header-odd-row tr:nth-child(odd), -table.sheet-default-header-every-third-row tr:nth-child(3n+1), -table.sheet-default-header-first-column td:first-child, -table.sheet-default-header-first-column th:first-child, -table.sheet-default-header-even-column td:nth-child(even), -table.sheet-default-header-even-column th:nth-child(even), -table.sheet-default-header-odd-column td:nth-child(odd), -table.sheet-default-header-odd-column th:nth-child(odd), -table.sheet-default-header-every-third-column td:nth-child(3n+1), -.sheet-default-header { - background-color: #7C0303; - color: #FFF; - font-family: Arial, sans-serif; - font-weight: bold; -} - -table.sheet-background-gray-pair3 tr:nth-child(6n+5), -table.sheet-background-gray-pair3 tr:nth-child(6n+6), -table.sheet-background-gray-pair3 tr:nth-child(6n+7) { - background-color: rgb(0, 0, 0, 10%); -} - -.sheet-centering, -.sheet-centering-padding-2, -.sheet-centering-padding-5, -table.sheet-centering-column1 th:nth-child(1), -table.sheet-centering-column1 td:nth-child(1), -table.sheet-centering-column2 th:nth-child(2), -table.sheet-centering-column2 td:nth-child(2), -table.sheet-centering-column3 th:nth-child(3), -table.sheet-centering-column3 td:nth-child(3), -table.sheet-centering-column4 th:nth-child(4), -table.sheet-centering-column4 td:nth-child(4), -table.sheet-centering-padding-5-column2 th:nth-child(2), -table.sheet-centering-padding-5-column2 td:nth-child(2), -table.sheet-centering-padding-5-column3 th:nth-child(3), -table.sheet-centering-padding-5-column3 td:nth-child(3), -table.sheet-centering-padding-5-column4 th:nth-child(4), -table.sheet-centering-padding-5-column4 td:nth-child(4), -table.sheet-centering-padding-5-column5 th:nth-child(5), -table.sheet-centering-padding-5-column5 td:nth-child(5) { - text-align: center; - vertical-align: middle; -} - -.sheet-centering-horizontal { - text-align: center; -} - -.sheet-centering-vertical { - vertical-align: middle; -} - -.sheet-table-center { - margin-left: auto; - margin-right: auto; -} - -.sheet-centering-padding-2 { - padding-left: 2px; - padding-right: 2px; -} - -table.sheet-centering-padding-5-column2 th:nth-child(2), -table.sheet-centering-padding-5-column2 td:nth-child(2), -table.sheet-centering-padding-5-column3 th:nth-child(3), -table.sheet-centering-padding-5-column3 td:nth-child(3), -table.sheet-centering-padding-5-column4 th:nth-child(4), -table.sheet-centering-padding-5-column4 td:nth-child(4), -.sheet-centering-padding-5 { - padding-left: 5px; - padding-right: 5px; -} - -.sheet-padding-right, -table.sheet-padding-right-column1 th:nth-child(1), -table.sheet-padding-right-column1 td:nth-child(1), -table.sheet-padding-right-column2 th:nth-child(2), -table.sheet-padding-right-column2 td:nth-child(2) { - padding-right: 5px; -} - -.sheet-table-nowrap th, -.sheet-table-nowrap td, -.sheet-table-nowrap-column1 th:nth-child(1), -.sheet-table-nowrap-column1 td:nth-child(1), -.sheet-table-nowrap-column2 th:nth-child(2), -.sheet-table-nowrap-column2 td:nth-child(2) { - white-space: nowrap; -} - -.sheet-table-full-width-column1 th:nth-child(1), -.sheet-table-full-width-column1 td:nth-child(1), -.sheet-table-full-width-column2 th:nth-child(2), -.sheet-table-full-width-column2 td:nth-child(2) { - width: 100%; -} - -.sheet-table-white { - color: #FFF; - font-family: Arial, sans-serif; - font-weight: bold; -} - -.sheet-table-slim-first-column td:first-child { - width: 1px; -} - -.sheet-table-sub-ability-score tr:nth-child(3n) button:first-child, -.sheet-table-sub-ability-score tr:nth-child(3n-1) button:first-child { - margin-left: 10px; -} - -.sheet-note { - line-height:1em; - font-family: Arial, sans-serif; - font-size:.8125rem; - font-weight: bold; - color: #000; -} - -.sheet-flex, -.charsheet .sheet-body .sheet-flex { - display: flex; -} - -.sheet-flex-column, -.charsheet .sheet-body .sheet-flex-column { - display: flex; - flex-direction: column; -} - -.sheet-flex-wrap .repcontainer { - display: flex; - flex-wrap: wrap; - justify-content: space-around; -} - -.sheet-spell-line { - display: flex; - align-items: flex-end; - justify-content: space-between; - column-gap: 5px; -} - -.sheet-spell-fold { - display: flex; - justify-content: space-between; - column-gap: 10px; - padding-top: 5px; - padding-bottom: 5px; - padding-left: 15px; - -} - -.charsheet .sheet-spell-effect { - height: unset; - resize: vertical; - margin-bottom: 0px; -} - -.charsheet label input[type="radio"], -.charsheet label input[type="checkbox"] { - position: absolute; - width: 100%; - height: 100%; - opacity: 0; - left: 0; - top: 0; - margin: 0; -} - -table { - border-collapse: collapse; - border-spacing: 0; -} - -td, -th { - text-align: inherit; - padding-left: inherit; -} - -/* Show hide styling */ -.sheet-collapse { - visibility: collapse; -} - -.sheet-hidden { - display: none; -} - -.sheet-hidden.sheet-show, -input.sheet-show-announcement:checked ~ .sheet-hidden, -input.sheet-show-worn-equipment:checked ~ .sheet-hidden, -input.sheet-show-spell-slots:checked ~ .sheet-tab-content .sheet-spell-slots.sheet-hidden, -input.sheet-show-spell-points:checked ~ .sheet-tab-content .sheet-spell-points.sheet-hidden, -input.sheet-show-spell-arcs-winds:checked ~ .sheet-tab-content .sheet-spell-arcs-winds.sheet-hidden, -input.sheet-show-spell-spheres-pri:checked ~ .sheet-spell-sphere-pri.sheet-hidden, -input.sheet-show-toast:checked + .sheet-hidden -{ - display: revert; -} - -.btn.sheet-hidden { - padding-top: 2px; - padding-left: 8px; - padding-right: 8px; -} - -div.repcontainer div.repitem:first-child td.sheet-show-first, -div.repcontainer div.repitem:first-child tr.sheet-show-first, -div.repcontainer div.repitem:first-child th.sheet-show-first, -div.repcontainer div.repitem:first-child thead.sheet-show-first { - visibility: visible; -} - /* Overwrite Roll20 base styling */ details > summary:first-of-type { display: list-item; @@ -1812,125 +1926,3 @@ div.repcontainer:not(.editmode) div.repitem td button[type="action"], div.repcontainer:not(.editmode) div.repitem th button[type="action"] { position: relative; } - -.sheet-action-button, -.sheet-action-button-roll { - height: 19px; - font-size: 1.3em; - padding: 2px 3px; - margin: 0 3px; -} - -.sheet-action-button-roll:before { - font-family: "dicefontd20"; - content: "t"; -} - -/* Announcement styling start */ -div.sheet-announcement { - width: 95%; - margin: 5px; - border: 3px solid #ff0000; - border-radius: 8px; - padding: 8px; - background: #ababab; - box-sizing: border-box; -} - -.sheet-selectable { - font-style: italic; - font-weight: bold; - color: #181E72; - -webkit-user-select: all; /* Chrome all / Safari all */ - -moz-user-select: all; /* Firefox all */ - -ms-user-select: all; /* IE 10+ */ - user-select: all; /* Likely future */ -} - -img.expandable { - transition:transform 0.25s ease; -} - -img.expandable:hover { - -webkit-transform:scale(3); /* or some other value */ - transform:scale(3); -} -/* Announcement styling end */ - -/* Firefox styling */ -@supports (-moz-appearance:none) { - .charsheet .sheet-chrome { - display: none; - } -} - -/* Not Firefox styling */ -@supports not (-moz-appearance:none) { - .charsheet .sheet-firefox { - display: none; - } -} - -/*#region Toast styling*/ -.sheet-toast { - position: fixed; - right: 30px; - bottom: -13px; - text-align: center; - width: 300px; - height: 200px; -} - -.sheet-toast div { - position: absolute; - top: 0; - right: 0; - border: 2px solid; - border-radius: 10px; - cursor: text; -} - -input.sheet-toast-success:checked ~ .sheet-toast-content { - border-color: #badbcc; - background-color: #d1e7dd; -} -input.sheet-toast-info:checked ~ .sheet-toast-content { - border-color: #b6d4fe; - background-color: #cfe2ff; -} -input.sheet-toast-warning:checked ~ .sheet-toast-content { - border-color: #ffecb5; - background-color: #fff3cd; -} -input.sheet-toast-error:checked ~ .sheet-toast-content { - border-color: #f5c2c7; - background-color: #f8d7da; -} - -.sheet-toast input { - text-align: center; - font-size: 18px; - font-weight: bold; - width: 100%; -} - -.sheet-toast input, -.sheet-toast textarea { - border: 0; - background-color: transparent; - cursor: text; - margin-bottom: 0; - resize: none; -} - -.sheet-hide-toast { - position: absolute; - top: -10px; - right: -12px; - z-index: 1; - border-radius: 20px; - border-color: black; - background-color: white; - font-weight: bold; -} -/*#endregion Toast styling end*/ diff --git a/ADnD_2E_Revised/css/2EStyle-base.css b/ADnD_2E_Revised/css/2EStyle-base.css index 8f95ad109d..35d717f5cc 100644 --- a/ADnD_2E_Revised/css/2EStyle-base.css +++ b/ADnD_2E_Revised/css/2EStyle-base.css @@ -877,8 +877,6 @@ button { background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ADnD_2E_Revised/img/background-parchment_paper_seamless_pattern.jpg"); } -insert_rolltemplates.css - .sheet-inline, .sheet-inline-5 { display: inline-block; @@ -1023,12 +1021,6 @@ table.sheet-padding-right-column2 td:nth-child(2) { flex-direction: column; } -.sheet-flex-wrap .repcontainer { - display: flex; - flex-wrap: wrap; - justify-content: space-around; -} - .sheet-spell-line { display: flex; align-items: flex-end; @@ -1043,13 +1035,12 @@ table.sheet-padding-right-column2 td:nth-child(2) { padding-top: 5px; padding-bottom: 5px; padding-left: 15px; - } .charsheet .sheet-spell-effect { height: unset; resize: vertical; - margin-bottom: 0px; + margin-bottom: 0; } .charsheet label input[type="radio"], @@ -1084,7 +1075,6 @@ th { } .sheet-hidden.sheet-show, -input.sheet-show-announcement:checked ~ .sheet-hidden, input.sheet-show-worn-equipment:checked ~ .sheet-hidden, input.sheet-show-spell-slots:checked ~ .sheet-tab-content .sheet-spell-slots.sheet-hidden, input.sheet-show-spell-points:checked ~ .sheet-tab-content .sheet-spell-points.sheet-hidden, @@ -1108,17 +1098,6 @@ div.repcontainer div.repitem:first-child thead.sheet-show-first { visibility: visible; } -/* Overwrite Roll20 base styling */ -details > summary:first-of-type { - display: list-item; -} - -/* Fix action buttons in repeating tables */ -div.repcontainer:not(.editmode) div.repitem td button[type="action"], -div.repcontainer:not(.editmode) div.repitem th button[type="action"] { - position: relative; -} - .sheet-action-button, .sheet-action-button-roll { height: 19px; @@ -1132,49 +1111,8 @@ div.repcontainer:not(.editmode) div.repitem th button[type="action"] { content: "t"; } -/* Announcement styling start */ -div.sheet-announcement { - width: 95%; - margin: 5px; - border: 3px solid #ff0000; - border-radius: 8px; - padding: 8px; - background: #ababab; - box-sizing: border-box; -} - -.sheet-selectable { - font-style: italic; - font-weight: bold; - color: #181E72; - -webkit-user-select: all; /* Chrome all / Safari all */ - -moz-user-select: all; /* Firefox all */ - -ms-user-select: all; /* IE 10+ */ - user-select: all; /* Likely future */ -} - -img.expandable { - transition:transform 0.25s ease; -} - -img.expandable:hover { - -webkit-transform:scale(3); /* or some other value */ - transform:scale(3); -} -/* Announcement styling end */ - -/* Firefox styling */ -@supports (-moz-appearance:none) { - .charsheet .sheet-chrome { - display: none; - } -} - -/* Not Firefox styling */ -@supports not (-moz-appearance:none) { - .charsheet .sheet-firefox { - display: none; - } -} - +insert_announcements.css insert_toast.css +insert_browser-support.css +insert_rolltemplates.css +insert_roll20-overrides.css diff --git a/ADnD_2E_Revised/css/announcements.css b/ADnD_2E_Revised/css/announcements.css new file mode 100644 index 0000000000..839684986d --- /dev/null +++ b/ADnD_2E_Revised/css/announcements.css @@ -0,0 +1,34 @@ +/*#region Announcement styling start */ +input.sheet-show-announcement:checked ~ .sheet-hidden { + display: revert; +} + +div.sheet-announcement { + width: 95%; + margin: 5px; + border: 3px solid #ff0000; + border-radius: 8px; + padding: 8px; + background: #ababab; + box-sizing: border-box; +} + +.sheet-selectable { + font-style: italic; + font-weight: bold; + color: #181E72; + -webkit-user-select: all; /* Chrome all / Safari all */ + -moz-user-select: all; /* Firefox all */ + -ms-user-select: all; /* IE 10+ */ + user-select: all; /* Likely future */ +} + +img.expandable { + transition:transform 0.25s ease; +} + +img.expandable:hover { + -webkit-transform:scale(3); /* or some other value */ + transform:scale(3); +} +/*#endregion Announcement styling end */ diff --git a/ADnD_2E_Revised/css/browser-support.css b/ADnD_2E_Revised/css/browser-support.css new file mode 100644 index 0000000000..3ee71bb8e5 --- /dev/null +++ b/ADnD_2E_Revised/css/browser-support.css @@ -0,0 +1,13 @@ +/* Firefox styling */ +@supports (-moz-appearance:none) { + .charsheet .sheet-chrome { + display: none; + } +} + +/* Not Firefox styling */ +@supports not (-moz-appearance:none) { + .charsheet .sheet-firefox { + display: none; + } +} diff --git a/ADnD_2E_Revised/css/roll20-overrides.css b/ADnD_2E_Revised/css/roll20-overrides.css new file mode 100644 index 0000000000..b0638727eb --- /dev/null +++ b/ADnD_2E_Revised/css/roll20-overrides.css @@ -0,0 +1,10 @@ +/* Overwrite Roll20 base styling */ +details > summary:first-of-type { + display: list-item; +} + +/* Fix action buttons in repeating tables */ +div.repcontainer:not(.editmode) div.repitem td button[type="action"], +div.repcontainer:not(.editmode) div.repitem th button[type="action"] { + position: relative; +} From 9b2d36dd300ae70b240081fd3277d8050082a5c9 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Wed, 15 Feb 2023 21:02:51 +0100 Subject: [PATCH 27/58] extracted toast show hide to its own file --- ADnD_2E_Revised/2EStyle.css | 4 +++- ADnD_2E_Revised/css/2EStyle-base.css | 1 - ADnD_2E_Revised/css/toast.css | 3 +++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ADnD_2E_Revised/2EStyle.css b/ADnD_2E_Revised/2EStyle.css index a54bffdc1c..5e303b5ae7 100644 --- a/ADnD_2E_Revised/2EStyle.css +++ b/ADnD_2E_Revised/2EStyle.css @@ -1080,7 +1080,6 @@ input.sheet-show-spell-slots:checked ~ .sheet-tab-content .sheet-spell-slots.she input.sheet-show-spell-points:checked ~ .sheet-tab-content .sheet-spell-points.sheet-hidden, input.sheet-show-spell-arcs-winds:checked ~ .sheet-tab-content .sheet-spell-arcs-winds.sheet-hidden, input.sheet-show-spell-spheres-pri:checked ~ .sheet-spell-sphere-pri.sheet-hidden, -input.sheet-show-toast:checked + .sheet-hidden { display: revert; } @@ -1146,6 +1145,9 @@ img.expandable:hover { } /*#endregion Announcement styling end */ /*#region Toast styling*/ +input.sheet-show-toast:checked + .sheet-hidden { + display: revert; +} .sheet-toast { position: fixed; right: 30px; diff --git a/ADnD_2E_Revised/css/2EStyle-base.css b/ADnD_2E_Revised/css/2EStyle-base.css index 35d717f5cc..8f37f7a747 100644 --- a/ADnD_2E_Revised/css/2EStyle-base.css +++ b/ADnD_2E_Revised/css/2EStyle-base.css @@ -1080,7 +1080,6 @@ input.sheet-show-spell-slots:checked ~ .sheet-tab-content .sheet-spell-slots.she input.sheet-show-spell-points:checked ~ .sheet-tab-content .sheet-spell-points.sheet-hidden, input.sheet-show-spell-arcs-winds:checked ~ .sheet-tab-content .sheet-spell-arcs-winds.sheet-hidden, input.sheet-show-spell-spheres-pri:checked ~ .sheet-spell-sphere-pri.sheet-hidden, -input.sheet-show-toast:checked + .sheet-hidden { display: revert; } diff --git a/ADnD_2E_Revised/css/toast.css b/ADnD_2E_Revised/css/toast.css index 23be582b90..437987d9b9 100644 --- a/ADnD_2E_Revised/css/toast.css +++ b/ADnD_2E_Revised/css/toast.css @@ -1,4 +1,7 @@ /*#region Toast styling*/ +input.sheet-show-toast:checked + .sheet-hidden { + display: revert; +} .sheet-toast { position: fixed; right: 30px; From be27adec53e888ed9f44e4d9c2226b50bfe96214 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Wed, 15 Feb 2023 21:13:07 +0100 Subject: [PATCH 28/58] Moved more stuff out to roll20 overrides --- ADnD_2E_Revised/2EStyle.css | 54 ++++++------------------ ADnD_2E_Revised/css/2EStyle-base.css | 42 +----------------- ADnD_2E_Revised/css/roll20-overrides.css | 13 ++++++ 3 files changed, 27 insertions(+), 82 deletions(-) diff --git a/ADnD_2E_Revised/2EStyle.css b/ADnD_2E_Revised/2EStyle.css index 5e303b5ae7..1e45694cdb 100644 --- a/ADnD_2E_Revised/2EStyle.css +++ b/ADnD_2E_Revised/2EStyle.css @@ -1,10 +1,3 @@ -input, -button, -select, -textarea { - background-color: white; -} - .charsheet input { display: inline-block; width: 165px; @@ -555,7 +548,6 @@ textarea.sheet-input-like { cursor: pointer; z-index: 1; } -input.sheet-tab + span::before, input.sheet-tab + span::before { margin-right: 4px; @@ -586,11 +578,6 @@ input.sheet-tab + span::before padding: 0 0 0 0; } -/* Dark Mode override */ -.sheet-darkmode .charsheet label { - color: #333; -} - .charsheet h1, .charsheet h2, .charsheet h3, @@ -600,28 +587,6 @@ input.sheet-tab + span::before font-weight: 800; } -/*h2,h3,h4,h5,h6 {*/ -/* line-height:1em;*/ -/* display:inline;*/ -/* font-family: Arial, sans-serif;*/ -/* font-size:.8125rem;*/ -/* color: #000;*/ -/*}*/ - - -/*h1 {*/ -/* width: 100%;*/ -/* background-color: #FFF;*/ -/* color: #000;*/ -/* padding:.2em 0 0 0;*/ -/* min-height: 1em;*/ -/* margin: 0 0 .5em 0;*/ -/* font-size:.8125rem;*/ -/* line-height:1.4em;*/ -/* display:block;*/ -/* text-align:center;*/ -/*}*/ - .sheet-small-label1 { display: inline-block; padding: .5em .07em 0 .07em; @@ -868,10 +833,6 @@ input.sheet-tab + span::before border: .5px; } -button { - background-color: #7C0303; -} - .charsheet, .charsheet button:hover { background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ADnD_2E_Revised/img/background-parchment_paper_seamless_pattern.jpg"); @@ -1079,8 +1040,7 @@ input.sheet-show-worn-equipment:checked ~ .sheet-hidden, input.sheet-show-spell-slots:checked ~ .sheet-tab-content .sheet-spell-slots.sheet-hidden, input.sheet-show-spell-points:checked ~ .sheet-tab-content .sheet-spell-points.sheet-hidden, input.sheet-show-spell-arcs-winds:checked ~ .sheet-tab-content .sheet-spell-arcs-winds.sheet-hidden, -input.sheet-show-spell-spheres-pri:checked ~ .sheet-spell-sphere-pri.sheet-hidden, -{ +input.sheet-show-spell-spheres-pri:checked ~ .sheet-spell-sphere-pri.sheet-hidden { display: revert; } @@ -1928,3 +1888,15 @@ div.repcontainer:not(.editmode) div.repitem td button[type="action"], div.repcontainer:not(.editmode) div.repitem th button[type="action"] { position: relative; } + +/* Dark Mode override */ +.sheet-darkmode .charsheet label { + color: #333; +} + +input, +button, +select, +textarea { + background-color: white; +} diff --git a/ADnD_2E_Revised/css/2EStyle-base.css b/ADnD_2E_Revised/css/2EStyle-base.css index 8f37f7a747..be3352fcaa 100644 --- a/ADnD_2E_Revised/css/2EStyle-base.css +++ b/ADnD_2E_Revised/css/2EStyle-base.css @@ -1,10 +1,3 @@ -input, -button, -select, -textarea { - background-color: white; -} - .charsheet input { display: inline-block; width: 165px; @@ -555,7 +548,6 @@ textarea.sheet-input-like { cursor: pointer; z-index: 1; } -input.sheet-tab + span::before, input.sheet-tab + span::before { margin-right: 4px; @@ -586,11 +578,6 @@ input.sheet-tab + span::before padding: 0 0 0 0; } -/* Dark Mode override */ -.sheet-darkmode .charsheet label { - color: #333; -} - .charsheet h1, .charsheet h2, .charsheet h3, @@ -600,28 +587,6 @@ input.sheet-tab + span::before font-weight: 800; } -/*h2,h3,h4,h5,h6 {*/ -/* line-height:1em;*/ -/* display:inline;*/ -/* font-family: Arial, sans-serif;*/ -/* font-size:.8125rem;*/ -/* color: #000;*/ -/*}*/ - - -/*h1 {*/ -/* width: 100%;*/ -/* background-color: #FFF;*/ -/* color: #000;*/ -/* padding:.2em 0 0 0;*/ -/* min-height: 1em;*/ -/* margin: 0 0 .5em 0;*/ -/* font-size:.8125rem;*/ -/* line-height:1.4em;*/ -/* display:block;*/ -/* text-align:center;*/ -/*}*/ - .sheet-small-label1 { display: inline-block; padding: .5em .07em 0 .07em; @@ -868,10 +833,6 @@ input.sheet-tab + span::before border: .5px; } -button { - background-color: #7C0303; -} - .charsheet, .charsheet button:hover { background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ADnD_2E_Revised/img/background-parchment_paper_seamless_pattern.jpg"); @@ -1079,8 +1040,7 @@ input.sheet-show-worn-equipment:checked ~ .sheet-hidden, input.sheet-show-spell-slots:checked ~ .sheet-tab-content .sheet-spell-slots.sheet-hidden, input.sheet-show-spell-points:checked ~ .sheet-tab-content .sheet-spell-points.sheet-hidden, input.sheet-show-spell-arcs-winds:checked ~ .sheet-tab-content .sheet-spell-arcs-winds.sheet-hidden, -input.sheet-show-spell-spheres-pri:checked ~ .sheet-spell-sphere-pri.sheet-hidden, -{ +input.sheet-show-spell-spheres-pri:checked ~ .sheet-spell-sphere-pri.sheet-hidden { display: revert; } diff --git a/ADnD_2E_Revised/css/roll20-overrides.css b/ADnD_2E_Revised/css/roll20-overrides.css index b0638727eb..97e51c521f 100644 --- a/ADnD_2E_Revised/css/roll20-overrides.css +++ b/ADnD_2E_Revised/css/roll20-overrides.css @@ -8,3 +8,16 @@ div.repcontainer:not(.editmode) div.repitem td button[type="action"], div.repcontainer:not(.editmode) div.repitem th button[type="action"] { position: relative; } + +/* Dark Mode override */ +.sheet-darkmode .charsheet label { + color: #333; +} + +/* Fix background color so active fields can be differentiated from read-only and disabled fields */ +input, +button, +select, +textarea { + background-color: white; +} From 35878e08e67dd1b378d18868461837234a5f50db Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Wed, 15 Feb 2023 21:25:59 +0100 Subject: [PATCH 29/58] removed a lot of unused styling --- ADnD_2E_Revised/2EStyle.css | 278 +-------------------------- ADnD_2E_Revised/css/2EStyle-base.css | 277 +------------------------- 2 files changed, 19 insertions(+), 536 deletions(-) diff --git a/ADnD_2E_Revised/2EStyle.css b/ADnD_2E_Revised/2EStyle.css index 1e45694cdb..c7f6bb991b 100644 --- a/ADnD_2E_Revised/2EStyle.css +++ b/ADnD_2E_Revised/2EStyle.css @@ -188,6 +188,10 @@ box-sizing: border-box; } +.charsheet select.sheet-table-dynamic { + margin: 0; +} + .charsheet input.sheet-table-dynamic90 { min-width: 90%; } @@ -227,29 +231,12 @@ width: 100%; } -.charsheet select.sheet-table-dynamic { - margin: 0; -} - .charsheet input[type="number"].sheet-tiny { width: 23px; } input[type="number"].sheet-tiny::-webkit-inner-spin-button { -webkit-appearance: none; } -input[type="number"].sheet-nobut::-webkit-inner-spin-button { - -webkit-appearance: none; -} - -input.sheet-arrow -{ - float: left; -} - -input.sheet-arrow:checked ~ div.sheet-body -{ - display: none; -} .charsheet input[type="checkbox"].left { float: left; @@ -414,7 +401,7 @@ textarea.sheet-input-like { .charsheet input.sheet-tab { width: 120px; height: inherit; - cursor: pointer; + cursor: pointer; position: relative; opacity: 0; z-index: 9999; @@ -422,16 +409,16 @@ textarea.sheet-input-like { .charsheet span.sheet-tab { text-align: center; - display: inline-block; - font-size: 14px; - background: #800a0a; + display: inline-block; + font-size: 14px; + background: #800a0a; color: white; font-weight: bold; border-radius: 4px; width: 120px; height: inherit; - cursor: pointer; + cursor: pointer; position: relative; } @@ -587,252 +574,6 @@ input.sheet-tab + span::before font-weight: 800; } -.sheet-small-label1 { - display: inline-block; - padding: .5em .07em 0 .07em; - margin: .75rem .4em 1.125rem .4em; - height: 1.85em; - width: 72px; - vertical-align: middle; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} - -.sheet-small-label1 span { - padding: .5em .07em 0 .07em; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - float:left; /* floats but 100% wide. */ - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} -.sheet-small-label1 input::-moz-focus-inner { - padding: 0; -} -.sheet-small-label1 select { - margin-top:-2px; - width: 72px; - border: .5px; -} -.sheet-small-label2 { - display: inline-block; - padding: .5em .07em 0 .07em; - margin: .75rem .4em 1.125rem .4em; - height: 1.85em; - width: 63px; - vertical-align: middle; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} - -.sheet-small-label2 span { - padding: .5em .07em 0 .07em; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - float:left; /* floats but 100% wide. */ - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} -.sheet-small-label2 input::-moz-focus-inner { - padding: 0; -} -.sheet-small-label2 select { - margin-top:-2px; - width: 63px; - border: .5px; -} -.sheet-small-label3 { - display: inline-block; - padding: .5em .07em 0 .07em; - margin: .75rem .4em 1.125rem .4em; - height: 1.85em; - width: 85px; - vertical-align: middle; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} - -.sheet-small-label3 span { - padding: .5em .07em 0 .07em; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - float:left; /* floats but 100% wide. */ - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} -.sheet-small-label3 input::-moz-focus-inner { - padding: 0; -} -.sheet-small-label3 select { - margin-top:-2px; - width: 85px; - border: .5px; -} -.sheet-small-label4 { - display: inline-block; - padding: .5em .07em 0 .07em; - margin: .75rem .4em 1.125rem .4em; - height: 1.85em; - width: 67px; - vertical-align: middle; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} - -.sheet-small-label4 span { - padding: .5em .07em 0 .07em; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - float:left; /* floats but 100% wide. */ - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} -.sheet-small-label4 input::-moz-focus-inner { - padding: 0; -} -.sheet-small-label4 select { - margin-top:-2px; - width: 67px; - border: .5px; -} -.sheet-small-label5 { - display: inline-block; - padding: .5em .07em 0 .07em; - margin: .75rem .4em 1.125rem .4em; - height: 1.85em; - width: 105px; - vertical-align: middle; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} - -.sheet-small-label5 span { - padding: .5em .07em 0 .07em; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - float:left; /* floats but 100% wide. */ - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} -.sheet-small-label5 input::-moz-focus-inner { - padding: 0; -} -.sheet-small-label5 select { - margin-top:-2px; - width: 105px; - border: .5px; -} -.sheet-small-label6 { - display: inline-block; - padding: .5em .07em 0 .07em; - margin: .75rem .4em 1.125rem .4em; - height: 1.85em; - width: 75px; - vertical-align: middle; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} - -.sheet-small-label6 span { - padding: .5em .07em 0 .07em; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - float:left; /* floats but 100% wide. */ - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} -.sheet-small-label6 input::-moz-focus-inner { - padding: 0; -} -.sheet-small-label6 select { - margin-top:-2px; - width: 75px; - border: .5px; -} -.sheet-small-label7 { - display: inline-block; - padding: .5em .07em 0 .07em; - margin: .75rem .4em 1.125rem .4em; - height: 1.85em; - width: 125px; - vertical-align: middle; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} - -.sheet-small-label7 span { - padding: .5em .07em 0 .07em; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - float:left; /* floats but 100% wide. */ - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} -.sheet-small-label7 input::-moz-focus-inner { - padding: 0; -} -.sheet-small-label7 select { - margin-top:-2px; - width: 125px; - border: .5px; -} - .charsheet, .charsheet button:hover { background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ADnD_2E_Revised/img/background-parchment_paper_seamless_pattern.jpg"); @@ -1894,6 +1635,7 @@ div.repcontainer:not(.editmode) div.repitem th button[type="action"] { color: #333; } +/* Fix background color so active fields can be differentiated from read-only and disabled fields */ input, button, select, diff --git a/ADnD_2E_Revised/css/2EStyle-base.css b/ADnD_2E_Revised/css/2EStyle-base.css index be3352fcaa..902d01bc77 100644 --- a/ADnD_2E_Revised/css/2EStyle-base.css +++ b/ADnD_2E_Revised/css/2EStyle-base.css @@ -188,6 +188,10 @@ box-sizing: border-box; } +.charsheet select.sheet-table-dynamic { + margin: 0; +} + .charsheet input.sheet-table-dynamic90 { min-width: 90%; } @@ -227,29 +231,12 @@ width: 100%; } -.charsheet select.sheet-table-dynamic { - margin: 0; -} - .charsheet input[type="number"].sheet-tiny { width: 23px; } input[type="number"].sheet-tiny::-webkit-inner-spin-button { -webkit-appearance: none; } -input[type="number"].sheet-nobut::-webkit-inner-spin-button { - -webkit-appearance: none; -} - -input.sheet-arrow -{ - float: left; -} - -input.sheet-arrow:checked ~ div.sheet-body -{ - display: none; -} .charsheet input[type="checkbox"].left { float: left; @@ -414,7 +401,7 @@ textarea.sheet-input-like { .charsheet input.sheet-tab { width: 120px; height: inherit; - cursor: pointer; + cursor: pointer; position: relative; opacity: 0; z-index: 9999; @@ -422,16 +409,16 @@ textarea.sheet-input-like { .charsheet span.sheet-tab { text-align: center; - display: inline-block; - font-size: 14px; - background: #800a0a; + display: inline-block; + font-size: 14px; + background: #800a0a; color: white; font-weight: bold; border-radius: 4px; width: 120px; height: inherit; - cursor: pointer; + cursor: pointer; position: relative; } @@ -587,252 +574,6 @@ input.sheet-tab + span::before font-weight: 800; } -.sheet-small-label1 { - display: inline-block; - padding: .5em .07em 0 .07em; - margin: .75rem .4em 1.125rem .4em; - height: 1.85em; - width: 72px; - vertical-align: middle; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} - -.sheet-small-label1 span { - padding: .5em .07em 0 .07em; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - float:left; /* floats but 100% wide. */ - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} -.sheet-small-label1 input::-moz-focus-inner { - padding: 0; -} -.sheet-small-label1 select { - margin-top:-2px; - width: 72px; - border: .5px; -} -.sheet-small-label2 { - display: inline-block; - padding: .5em .07em 0 .07em; - margin: .75rem .4em 1.125rem .4em; - height: 1.85em; - width: 63px; - vertical-align: middle; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} - -.sheet-small-label2 span { - padding: .5em .07em 0 .07em; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - float:left; /* floats but 100% wide. */ - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} -.sheet-small-label2 input::-moz-focus-inner { - padding: 0; -} -.sheet-small-label2 select { - margin-top:-2px; - width: 63px; - border: .5px; -} -.sheet-small-label3 { - display: inline-block; - padding: .5em .07em 0 .07em; - margin: .75rem .4em 1.125rem .4em; - height: 1.85em; - width: 85px; - vertical-align: middle; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} - -.sheet-small-label3 span { - padding: .5em .07em 0 .07em; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - float:left; /* floats but 100% wide. */ - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} -.sheet-small-label3 input::-moz-focus-inner { - padding: 0; -} -.sheet-small-label3 select { - margin-top:-2px; - width: 85px; - border: .5px; -} -.sheet-small-label4 { - display: inline-block; - padding: .5em .07em 0 .07em; - margin: .75rem .4em 1.125rem .4em; - height: 1.85em; - width: 67px; - vertical-align: middle; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} - -.sheet-small-label4 span { - padding: .5em .07em 0 .07em; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - float:left; /* floats but 100% wide. */ - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} -.sheet-small-label4 input::-moz-focus-inner { - padding: 0; -} -.sheet-small-label4 select { - margin-top:-2px; - width: 67px; - border: .5px; -} -.sheet-small-label5 { - display: inline-block; - padding: .5em .07em 0 .07em; - margin: .75rem .4em 1.125rem .4em; - height: 1.85em; - width: 105px; - vertical-align: middle; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} - -.sheet-small-label5 span { - padding: .5em .07em 0 .07em; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - float:left; /* floats but 100% wide. */ - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} -.sheet-small-label5 input::-moz-focus-inner { - padding: 0; -} -.sheet-small-label5 select { - margin-top:-2px; - width: 105px; - border: .5px; -} -.sheet-small-label6 { - display: inline-block; - padding: .5em .07em 0 .07em; - margin: .75rem .4em 1.125rem .4em; - height: 1.85em; - width: 75px; - vertical-align: middle; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} - -.sheet-small-label6 span { - padding: .5em .07em 0 .07em; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - float:left; /* floats but 100% wide. */ - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} -.sheet-small-label6 input::-moz-focus-inner { - padding: 0; -} -.sheet-small-label6 select { - margin-top:-2px; - width: 75px; - border: .5px; -} -.sheet-small-label7 { - display: inline-block; - padding: .5em .07em 0 .07em; - margin: .75rem .4em 1.125rem .4em; - height: 1.85em; - width: 125px; - vertical-align: middle; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} - -.sheet-small-label7 span { - padding: .5em .07em 0 .07em; - text-align:center; - font-size: .85em; - font-style: italic; - font-weight: bold; - float:left; /* floats but 100% wide. */ - /*firefox has to be squeezed */ - -moz-margin-start:-2px; - -moz-margin-end:-2px; -} -.sheet-small-label7 input::-moz-focus-inner { - padding: 0; -} -.sheet-small-label7 select { - margin-top:-2px; - width: 125px; - border: .5px; -} - .charsheet, .charsheet button:hover { background-image: url("https://raw.githubusercontent.com/Roll20/roll20-character-sheets/master/ADnD_2E_Revised/img/background-parchment_paper_seamless_pattern.jpg"); From 9d3775739fdd7d2d863c6b73e8ec04196b084236 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Wed, 15 Feb 2023 21:41:39 +0100 Subject: [PATCH 30/58] removed more unused styling --- ADnD_2E_Revised/2EStyle.css | 13 ------------- ADnD_2E_Revised/css/2EStyle-base.css | 13 ------------- 2 files changed, 26 deletions(-) diff --git a/ADnD_2E_Revised/2EStyle.css b/ADnD_2E_Revised/2EStyle.css index c7f6bb991b..844649e67b 100644 --- a/ADnD_2E_Revised/2EStyle.css +++ b/ADnD_2E_Revised/2EStyle.css @@ -231,19 +231,6 @@ width: 100%; } -.charsheet input[type="number"].sheet-tiny { - width: 23px; -} -input[type="number"].sheet-tiny::-webkit-inner-spin-button { - -webkit-appearance: none; -} - -.charsheet input[type="checkbox"].left { - float: left; - margin: 5px 0; - width: 2px; -} - input.sheet-tab:not(:first-child)::before { border-left: none; diff --git a/ADnD_2E_Revised/css/2EStyle-base.css b/ADnD_2E_Revised/css/2EStyle-base.css index 902d01bc77..9b827e7cb2 100644 --- a/ADnD_2E_Revised/css/2EStyle-base.css +++ b/ADnD_2E_Revised/css/2EStyle-base.css @@ -231,19 +231,6 @@ width: 100%; } -.charsheet input[type="number"].sheet-tiny { - width: 23px; -} -input[type="number"].sheet-tiny::-webkit-inner-spin-button { - -webkit-appearance: none; -} - -.charsheet input[type="checkbox"].left { - float: left; - margin: 5px 0; - width: 2px; -} - input.sheet-tab:not(:first-child)::before { border-left: none; From 4a4fcd1456d68a5532baa765faa0b706112c2364 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Wed, 15 Feb 2023 23:46:15 +0100 Subject: [PATCH 31/58] - Added support for autofill winds - Now reads bonus spells from string instead of relying on two strings matching --- ADnD_2E_Revised/2ESheet.html | 37 +++++++++++++------ ADnD_2E_Revised/html/changelog.html | 6 ++- .../character-tab/spells-tab/wizard-tab.html | 2 +- ADnD_2E_Revised/javascript/abilityScores.js | 3 +- ADnD_2E_Revised/javascript/sheetWorkers.js | 25 ++++++++++--- 5 files changed, 51 insertions(+), 22 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 85ed4573db..180502a455 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -16,9 +16,11 @@
    • Removed the "Roll Spell Effect" button as it caused more confusion than it helped
    • -
    • Added Spell tracking selection to the Sheet Settings Tab. Choices are: Spell slots, spell points, arcs / songs / winds
    • +
    • Added Spell tracking selection to the Sheet Settings Tab. Choices are: Spell slots, spell points, Arcs / Winds
    • Redesigned the Spells tab to only show the spell tracking system that selected on the Sheet Settings Tab
    • -
    • Styled Monster tab to have dynamically sized fields, and larger fields for Hice Dice, HP, and Max HP
    • +
    • Added autofill for bonus Winds from high Wisdom for the Arcs/Winds spell tracking system. If the PO: S&P sub ability scores are used, base Wisdom is still used for determining bonus winds
    • +
    • Fixed bonus spells from high Intuition. Willpower was incorrectly used
    • +
    • Styled Monster tab to have dynamically sized fields, and larger fields for Hit Dice, HP, and Max HP

    • @@ -3922,7 +3924,7 @@

      - + @@ -33828,8 +33830,7 @@ intelligenceTable['intnotes'] = ['INVALID INTELLIGENCE','Communicate by Grunts & const wisdomTable = {}; wisdomTable['wisdef'] = ['Error','-6','-4','-3','-2','-1','-1','-1','0','0','0','0','0','0','0','+1','+2','+3','+4','+4','+4','+4','+4','+4','+4','+4']; wisdomTable['wisbonus'] = ['Error','—','—','—','—','—','—','—','—','0','0','0','0','1st','1st','2nd','2nd','3rd','4th','1st,3rd','2nd,4th','3rd,5th','4th,5th','1st,6th','5th,6th','6th,7th']; -wisdomTable['wisbonus-prime'] = ['Error','','','','','','','','','','','','','1st','2x1st','2x1st, 2nd','2x1st, 2x2nd','2x1st, 2x2nd, 3rd','2x1st, 2x2nd, 3rd, 4th','3x1st, 2x2nd, 2x3rd, 4th','3x1st, 3x2nd, 2x3rd, 2x4th','3x1st, 3x2nd, 3x3rd, 2x4th','3x1st, 3x2nd, 3x3rd, 3x4th','4x1st, 3x2nd, 3x3rd, 3x4th','4x1st, 3x2nd, 3x3rd, 3x4th','4x1st, 3x2nd, 3x3rd, 3x4th']; -wisdomTable['wisbonus-extra'] = ['Error','','','','','','','','','','','','','','','','','','','','','5th','2x5th','2x5th, 6th','3x5th, 2x6th','3x5th, 3x6th, 7th']; +wisdomTable['wisdom-wind'] = [0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3,4,5,6,7,8,9,10,11,12]; wisdomTable['wisfail'] = ['Error','80','60','50','45','40','35','30','25','20','15','10','5','0','0','0','0','0','0','0','0','0','0','0','0','0']; wisdomTable['wisimmune'] = ['Error','','','','','','','','','','','','','','','','','','','cause fear, charm person, command, friends, hypnotism','forget, hold person, ray of enfeeblement, scare','fear','charm monster, confusion, emotion, fumble, suggestion','chaos, feeblemind, hold monster, magic jar, quest','geas, mass suggestion, rod of rulership','antipathy/sympathy, death spell, mass charm']; wisdomTable['wisnotes'] = ['INVALID WISDOM','','','','','','','','','','','','','','','','','','','','','','','','','','']; @@ -69250,7 +69251,7 @@ on('change:intelligence change:reason change:knowledge', function() { }); // Set sub-attributes based on Wisdom, Intuition, and Willpower -function parseWisBonus(abilityScore) { +function parseWisBonus(abilityScore, wisdom) { if (abilityScore < 13) { return { '1st': 0, @@ -69260,6 +69261,7 @@ function parseWisBonus(abilityScore) { '5th': 0, '6th': 0, '7th': 0, + 'wind': wisdomTable['wisdom-wind'][wisdom], 'wisbonus': wisdomTable['wisbonus'][abilityScore], 'wisbonus-prime': wisdomTable['wisbonus'][abilityScore], 'wisbonus-extra': wisdomTable['wisbonus'][abilityScore], @@ -69281,11 +69283,21 @@ function parseWisBonus(abilityScore) { '5th': (bonusString.match(/5th/g) || []).length, '6th': (bonusString.match(/6th/g) || []).length, '7th': (bonusString.match(/7th/g) || []).length, + 'wind': wisdomTable['wisdom-wind'][wisdom], }; // Generate bonus prime and bonus extra strings - bonus['wisbonus-prime'] = wisdomTable['wisbonus-prime'][abilityScore]; - bonus['wisbonus-extra'] = wisdomTable['wisbonus-extra'][abilityScore]; + function format(bonus, key) { + if (bonus[key] === 0) { + return ''; + } + if (bonus[key] === 1) { + return key + } + return `${bonus[key]}x${key}`; + } + bonus['wisbonus-prime'] = [format(bonus, '1st'), format(bonus, '2nd'), format(bonus, '3rd'), format(bonus, '4th')].filter(Boolean).join(', '); + bonus['wisbonus-extra'] = [format(bonus, '5th'), format(bonus, '6th'), format(bonus, '7th')].filter(Boolean).join(', '); bonus['wisbonus'] = [bonus['wisbonus-prime'], bonus['wisbonus-extra']].filter(Boolean).join(', '); return bonus; @@ -69304,7 +69316,7 @@ on('change:wisdom change:intuition change:willpower', function() { let bonusSpells; if (wisdom === 0) { - bonusSpells = parseWisBonus(0); + bonusSpells = parseWisBonus(0, 0); assignAttributes(0, 0, 0, bonusSpells, wisdomTable['wisimmune'][0], wisdomTable['wisimmune'][0], wisdomTable['wisnotes'][0], wisdomTable['wisnotes'][0]); return; } @@ -69336,7 +69348,8 @@ on('change:wisdom change:intuition change:willpower', function() { wisimm1 = wisImmuneArray.slice(0, slicePoint).filter(Boolean).join(', '); wisimm2 = wisImmuneArray.slice(slicePoint).filter(Boolean).join(', '); } - bonusSpells = parseWisBonus(willpower); + bonusSpells = parseWisBonus(intuition, wisdom); + console.log(bonusSpells); assignAttributes(wisdom, intuition, willpower, bonusSpells, wisimm1, wisimm2, wisnotes, wis2notes); @@ -69359,6 +69372,7 @@ on('change:wisdom change:intuition change:willpower', function() { 'spell-priest-level5-wisdom': bonusSpells['5th'], 'spell-priest-level6-wisdom': bonusSpells['6th'], 'spell-priest-level7-wisdom': bonusSpells['7th'], + 'wisdom-wind': bonusSpells['wind'], }); } }); @@ -69517,7 +69531,7 @@ function setupRepeatingSpellSumming(sections, oldField, newField, resultFieldNam } function setupCalculateRemaining(totalField, sumField, remainingField) { - on(`change:${totalField} change:${sumField}`, function () { + on(`change:${totalField} change:${sumField}`, function (eventInfo) { getAttrs([totalField, sumField], function (values) { let intTotal = parseInt(values[totalField]) || 0; let intSum = parseInt(values[sumField]) || 0; @@ -69891,6 +69905,7 @@ let priestSpellPoints = 'spell-points-priest'; let wind = 'total-wind'; let allPriestSpellSections = priestSpellLevelsSections.flatMap(sl => sl.sections); setupStaticCalculateTotal(`${priestSpellPoints}-total`, [`${priestSpellPoints}-lvl`, `${priestSpellPoints}-wis`]); +setupStaticCalculateTotal(wind, ['level-wind', 'wisdom-wind']); setupRepeatingSpellSumming(allPriestSpellSections, priestSpellPoints, 'spell-points', `${priestSpellPoints}-sum`, true); setupRepeatingSpellSumming(allPriestSpellSections, 'wind', 'spell-wind', `${wind}-sum`, true); setupCalculateRemaining(`${priestSpellPoints}-total`, `${priestSpellPoints}-sum`, `${priestSpellPoints}-remaining`); diff --git a/ADnD_2E_Revised/html/changelog.html b/ADnD_2E_Revised/html/changelog.html index 065eaae948..af3afdafb2 100644 --- a/ADnD_2E_Revised/html/changelog.html +++ b/ADnD_2E_Revised/html/changelog.html @@ -11,9 +11,11 @@
    • Removed the "Roll Spell Effect" button as it caused more confusion than it helped
    • -
    • Added Spell tracking selection to the Sheet Settings Tab. Choices are: Spell slots, spell points, arcs / songs / winds
    • +
    • Added Spell tracking selection to the Sheet Settings Tab. Choices are: Spell slots, spell points, Arcs / Winds
    • Redesigned the Spells tab to only show the spell tracking system that selected on the Sheet Settings Tab
    • -
    • Styled Monster tab to have dynamically sized fields, and larger fields for Hice Dice, HP, and Max HP
    • +
    • Added autofill for bonus Winds from high Wisdom for the Arcs/Winds spell tracking system. If the PO: S&P sub ability scores are used, base Wisdom is still used for determining bonus winds
    • +
    • Fixed bonus spells from high Intuition. Willpower was incorrectly used
    • +
    • Styled Monster tab to have dynamically sized fields, and larger fields for Hit Dice, HP, and Max HP

    • diff --git a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html index 5e427d5a39..d07d15f437 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html @@ -57,7 +57,7 @@

      - + diff --git a/ADnD_2E_Revised/javascript/abilityScores.js b/ADnD_2E_Revised/javascript/abilityScores.js index cd4b4c6b81..7c213a0b3c 100644 --- a/ADnD_2E_Revised/javascript/abilityScores.js +++ b/ADnD_2E_Revised/javascript/abilityScores.js @@ -105,8 +105,7 @@ intelligenceTable['intnotes'] = ['INVALID INTELLIGENCE','Communicate by Grunts & const wisdomTable = {}; wisdomTable['wisdef'] = ['Error','-6','-4','-3','-2','-1','-1','-1','0','0','0','0','0','0','0','+1','+2','+3','+4','+4','+4','+4','+4','+4','+4','+4']; wisdomTable['wisbonus'] = ['Error','—','—','—','—','—','—','—','—','0','0','0','0','1st','1st','2nd','2nd','3rd','4th','1st,3rd','2nd,4th','3rd,5th','4th,5th','1st,6th','5th,6th','6th,7th']; -wisdomTable['wisbonus-prime'] = ['Error','','','','','','','','','','','','','1st','2x1st','2x1st, 2nd','2x1st, 2x2nd','2x1st, 2x2nd, 3rd','2x1st, 2x2nd, 3rd, 4th','3x1st, 2x2nd, 2x3rd, 4th','3x1st, 3x2nd, 2x3rd, 2x4th','3x1st, 3x2nd, 3x3rd, 2x4th','3x1st, 3x2nd, 3x3rd, 3x4th','4x1st, 3x2nd, 3x3rd, 3x4th','4x1st, 3x2nd, 3x3rd, 3x4th','4x1st, 3x2nd, 3x3rd, 3x4th']; -wisdomTable['wisbonus-extra'] = ['Error','','','','','','','','','','','','','','','','','','','','','5th','2x5th','2x5th, 6th','3x5th, 2x6th','3x5th, 3x6th, 7th']; +wisdomTable['wisdom-wind'] = [0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3,4,5,6,7,8,9,10,11,12]; wisdomTable['wisfail'] = ['Error','80','60','50','45','40','35','30','25','20','15','10','5','0','0','0','0','0','0','0','0','0','0','0','0','0']; wisdomTable['wisimmune'] = ['Error','','','','','','','','','','','','','','','','','','','cause fear, charm person, command, friends, hypnotism','forget, hold person, ray of enfeeblement, scare','fear','charm monster, confusion, emotion, fumble, suggestion','chaos, feeblemind, hold monster, magic jar, quest','geas, mass suggestion, rod of rulership','antipathy/sympathy, death spell, mass charm']; wisdomTable['wisnotes'] = ['INVALID WISDOM','','','','','','','','','','','','','','','','','','','','','','','','','','']; diff --git a/ADnD_2E_Revised/javascript/sheetWorkers.js b/ADnD_2E_Revised/javascript/sheetWorkers.js index 4a9dd16204..d955789724 100644 --- a/ADnD_2E_Revised/javascript/sheetWorkers.js +++ b/ADnD_2E_Revised/javascript/sheetWorkers.js @@ -668,7 +668,7 @@ on('change:intelligence change:reason change:knowledge', function() { }); // Set sub-attributes based on Wisdom, Intuition, and Willpower -function parseWisBonus(abilityScore) { +function parseWisBonus(abilityScore, wisdom) { if (abilityScore < 13) { return { '1st': 0, @@ -678,6 +678,7 @@ function parseWisBonus(abilityScore) { '5th': 0, '6th': 0, '7th': 0, + 'wind': wisdomTable['wisdom-wind'][wisdom], 'wisbonus': wisdomTable['wisbonus'][abilityScore], 'wisbonus-prime': wisdomTable['wisbonus'][abilityScore], 'wisbonus-extra': wisdomTable['wisbonus'][abilityScore], @@ -699,11 +700,21 @@ function parseWisBonus(abilityScore) { '5th': (bonusString.match(/5th/g) || []).length, '6th': (bonusString.match(/6th/g) || []).length, '7th': (bonusString.match(/7th/g) || []).length, + 'wind': wisdomTable['wisdom-wind'][wisdom], }; // Generate bonus prime and bonus extra strings - bonus['wisbonus-prime'] = wisdomTable['wisbonus-prime'][abilityScore]; - bonus['wisbonus-extra'] = wisdomTable['wisbonus-extra'][abilityScore]; + function format(bonus, key) { + if (bonus[key] === 0) { + return ''; + } + if (bonus[key] === 1) { + return key + } + return `${bonus[key]}x${key}`; + } + bonus['wisbonus-prime'] = [format(bonus, '1st'), format(bonus, '2nd'), format(bonus, '3rd'), format(bonus, '4th')].filter(Boolean).join(', '); + bonus['wisbonus-extra'] = [format(bonus, '5th'), format(bonus, '6th'), format(bonus, '7th')].filter(Boolean).join(', '); bonus['wisbonus'] = [bonus['wisbonus-prime'], bonus['wisbonus-extra']].filter(Boolean).join(', '); return bonus; @@ -722,7 +733,7 @@ on('change:wisdom change:intuition change:willpower', function() { let bonusSpells; if (wisdom === 0) { - bonusSpells = parseWisBonus(0); + bonusSpells = parseWisBonus(0, 0); assignAttributes(0, 0, 0, bonusSpells, wisdomTable['wisimmune'][0], wisdomTable['wisimmune'][0], wisdomTable['wisnotes'][0], wisdomTable['wisnotes'][0]); return; } @@ -754,7 +765,7 @@ on('change:wisdom change:intuition change:willpower', function() { wisimm1 = wisImmuneArray.slice(0, slicePoint).filter(Boolean).join(', '); wisimm2 = wisImmuneArray.slice(slicePoint).filter(Boolean).join(', '); } - bonusSpells = parseWisBonus(willpower); + bonusSpells = parseWisBonus(intuition, wisdom); assignAttributes(wisdom, intuition, willpower, bonusSpells, wisimm1, wisimm2, wisnotes, wis2notes); @@ -777,6 +788,7 @@ on('change:wisdom change:intuition change:willpower', function() { 'spell-priest-level5-wisdom': bonusSpells['5th'], 'spell-priest-level6-wisdom': bonusSpells['6th'], 'spell-priest-level7-wisdom': bonusSpells['7th'], + 'wisdom-wind': bonusSpells['wind'], }); } }); @@ -935,7 +947,7 @@ function setupRepeatingSpellSumming(sections, oldField, newField, resultFieldNam } function setupCalculateRemaining(totalField, sumField, remainingField) { - on(`change:${totalField} change:${sumField}`, function () { + on(`change:${totalField} change:${sumField}`, function (eventInfo) { getAttrs([totalField, sumField], function (values) { let intTotal = parseInt(values[totalField]) || 0; let intSum = parseInt(values[sumField]) || 0; @@ -1309,6 +1321,7 @@ let priestSpellPoints = 'spell-points-priest'; let wind = 'total-wind'; let allPriestSpellSections = priestSpellLevelsSections.flatMap(sl => sl.sections); setupStaticCalculateTotal(`${priestSpellPoints}-total`, [`${priestSpellPoints}-lvl`, `${priestSpellPoints}-wis`]); +setupStaticCalculateTotal(wind, ['level-wind', 'wisdom-wind']); setupRepeatingSpellSumming(allPriestSpellSections, priestSpellPoints, 'spell-points', `${priestSpellPoints}-sum`, true); setupRepeatingSpellSumming(allPriestSpellSections, 'wind', 'spell-wind', `${wind}-sum`, true); setupCalculateRemaining(`${priestSpellPoints}-total`, `${priestSpellPoints}-sum`, `${priestSpellPoints}-remaining`); From 48a388d2e0111365f2e5432434d316184bddb7ec Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Thu, 16 Feb 2023 09:08:04 +0100 Subject: [PATCH 32/58] - Fold now only targets specific children marked with the "sheet-fold" class - Fold button extracted to its own file --- ADnD_2E_Revised/2ESheet.html | 293 ++++++------------ ADnD_2E_Revised/futureIdeas.txt | 4 - .../html/components/fold-button.html | 1 + .../html/shared/priest-spell-template.html | 8 +- .../html/shared/wizard-spell-template.html | 8 +- .../tabs/character-tab/equipment-tab.html | 6 +- .../psionics-tab/psionic-core-discipline.html | 6 +- ADnD_2E_Revised/javascript/sheetWorkers.js | 2 +- ADnD_2E_Revised/pug/spellTemplate.pug | 6 +- 9 files changed, 110 insertions(+), 224 deletions(-) create mode 100644 ADnD_2E_Revised/html/components/fold-button.html diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 180502a455..036a7646cf 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -4018,11 +4018,7 @@ - +
      Remaining
      ArcArcs | Remaining
      ArcArcs | - - - -
      @@ -4062,7 +4058,7 @@
      -
      +
      @@ -4338,11 +4334,7 @@ - +
      - - - -
      @@ -4382,7 +4374,7 @@
      -
      +
      @@ -4658,11 +4650,7 @@ - +
      - - - -
      @@ -4702,7 +4690,7 @@
      -
      +
      @@ -4978,11 +4966,7 @@ - +
      - - - -
      @@ -5022,7 +5006,7 @@
      -
      +
      @@ -5298,11 +5282,7 @@ - +
      - - - -
      @@ -5342,7 +5322,7 @@
      -
      +
      @@ -5618,11 +5598,7 @@ - +
      - - - -
      @@ -5662,7 +5638,7 @@
      -
      +
      @@ -5938,11 +5914,7 @@ - +
      - - - -
      @@ -5982,7 +5954,7 @@
      -
      +
      @@ -6258,11 +6230,7 @@ - +
      - - - -
      @@ -6302,7 +6270,7 @@
      -
      +
      @@ -6578,11 +6546,7 @@ - +
      - - - -
      @@ -6622,7 +6586,7 @@
      -
      +
      @@ -6898,11 +6862,7 @@ - +
      - - - -
      @@ -6942,7 +6902,7 @@
      -
      +
      @@ -7218,11 +7178,7 @@ - +
      - - - -
      @@ -7262,7 +7218,7 @@
      -
      +
      @@ -7538,11 +7494,7 @@ - +
      - - - -
      @@ -7582,7 +7534,7 @@
      -
      +
      @@ -7858,11 +7810,7 @@ - +
      - - - -
      @@ -7902,7 +7850,7 @@
      -
      +
      @@ -8178,11 +8126,7 @@ - +
      - - - -
      @@ -8222,7 +8166,7 @@
      -
      +
      @@ -8498,11 +8442,7 @@ - +
      - - - -
      @@ -8542,7 +8482,7 @@
      -
      +
      @@ -8907,11 +8847,7 @@ - +
      - - - -
      @@ -8951,7 +8887,7 @@
      -
      +
      @@ -9223,11 +9159,7 @@ - +
      - - - -
      @@ -9267,7 +9199,7 @@
      -
      +
      @@ -9539,11 +9471,7 @@ - +
      - - - -
      @@ -9583,7 +9511,7 @@
      -
      +
      @@ -9855,11 +9783,7 @@ - +
      - - - -
      @@ -9899,7 +9823,7 @@
      -
      +
      @@ -10171,11 +10095,7 @@ - +
      - - - -
      @@ -10215,7 +10135,7 @@
      -
      +
      @@ -10487,11 +10407,7 @@ - +
      - - - -
      @@ -10531,7 +10447,7 @@
      -
      +
      @@ -10803,11 +10719,7 @@ - +
      - - - -
      @@ -10847,7 +10759,7 @@
      -
      +
      @@ -11119,11 +11031,7 @@ - +
      - - - -
      @@ -11163,7 +11071,7 @@
      -
      +
      @@ -11705,11 +11613,11 @@ - + - +
      - +
      @@ -11754,11 +11662,11 @@ - + - + - + @@ -11806,11 +11714,11 @@ - + - + - + @@ -11855,11 +11763,11 @@ - + - + - + @@ -11907,11 +11815,11 @@ - + - + - + @@ -11956,11 +11864,11 @@ - + - + - + @@ -12008,11 +11916,11 @@ - + - + - + @@ -12057,11 +11965,11 @@ - + - + - + @@ -12109,11 +12017,11 @@ - + - + - + @@ -12158,11 +12066,11 @@ - + - + - + @@ -12210,11 +12118,11 @@ - + - + - + @@ -12259,11 +12167,11 @@ - + - + - + @@ -12311,11 +12219,11 @@ - + - + - + @@ -12360,11 +12268,11 @@ - + - + - + @@ -13420,14 +13328,14 @@ - + - + Spell failure: % - + @@ -20906,11 +20814,7 @@ - - - - - + @@ -20950,7 +20854,7 @@
      -
      +
      @@ -21083,11 +20987,7 @@ - +
      - - - -
      @@ -21127,7 +21027,7 @@
      -
      +
      @@ -69349,7 +69249,6 @@ on('change:wisdom change:intuition change:willpower', function() { wisimm2 = wisImmuneArray.slice(slicePoint).filter(Boolean).join(', '); } bonusSpells = parseWisBonus(intuition, wisdom); - console.log(bonusSpells); assignAttributes(wisdom, intuition, willpower, bonusSpells, wisimm1, wisimm2, wisnotes, wis2notes); @@ -71489,7 +71388,7 @@ const FOLDABLE_REPEATING_SECTIONS = [ FOLDABLE_REPEATING_SECTIONS.forEach(section => { on(`clicked:repeating_${section}:show clicked:repeating_${section}:hide`, function (eventInfo) { let parse = parseSourceAttribute(eventInfo); - $20(`div[data-reprowid=${parse.rowId}] .sheet-hidden`).toggleClass('sheet-show'); + $20(`div[data-reprowid=${parse.rowId}] .sheet-hidden.sheet-fold`).toggleClass('sheet-show'); }); }); diff --git a/ADnD_2E_Revised/futureIdeas.txt b/ADnD_2E_Revised/futureIdeas.txt index a9ff1684e9..fb12fc09c2 100644 --- a/ADnD_2E_Revised/futureIdeas.txt +++ b/ADnD_2E_Revised/futureIdeas.txt @@ -256,7 +256,3 @@ http://www.wizards.com/dnd/DnDPlayersOptionSkillsPowersErrata.asp http://www.wizards.com/dnd/DnDPlayersOptionSkillsPowers2ndErrata.asp http://www.wizards.com/dnd/DnDPlayersOptionSkillsPowers3rdErrata.asp http://www.wizards.com/dnd/DnDPlayersOptionCombatTacticsErrata.asp - -Spell points and Arc are different systems. They should be separated when selecting spell tracking. -Add a field for Wind bonus from Wisdom and Level, and sum them in the total field. -Leave Arc as is, as there are no different sources \ No newline at end of file diff --git a/ADnD_2E_Revised/html/components/fold-button.html b/ADnD_2E_Revised/html/components/fold-button.html new file mode 100644 index 0000000000..2343a2cd89 --- /dev/null +++ b/ADnD_2E_Revised/html/components/fold-button.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/ADnD_2E_Revised/html/shared/priest-spell-template.html b/ADnD_2E_Revised/html/shared/priest-spell-template.html index 07251574ff..687835af64 100644 --- a/ADnD_2E_Revised/html/shared/priest-spell-template.html +++ b/ADnD_2E_Revised/html/shared/priest-spell-template.html @@ -28,11 +28,7 @@ - + insert_fold-button.html
      - - - -
      @@ -72,7 +68,7 @@
      -
      +
      diff --git a/ADnD_2E_Revised/html/shared/wizard-spell-template.html b/ADnD_2E_Revised/html/shared/wizard-spell-template.html index de68d8cdda..05ee976b91 100644 --- a/ADnD_2E_Revised/html/shared/wizard-spell-template.html +++ b/ADnD_2E_Revised/html/shared/wizard-spell-template.html @@ -28,11 +28,7 @@ - + insert_fold-button.html
      - - - -
      @@ -72,7 +68,7 @@
      -
      +
      diff --git a/ADnD_2E_Revised/html/tabs/character-tab/equipment-tab.html b/ADnD_2E_Revised/html/tabs/character-tab/equipment-tab.html index 1a17b204e6..029beb93fc 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/equipment-tab.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/equipment-tab.html @@ -451,14 +451,14 @@ - + insert_fold-button.html - + - +
      Spell failure: %
      diff --git a/ADnD_2E_Revised/html/tabs/character-tab/psionics-tab/psionic-core-discipline.html b/ADnD_2E_Revised/html/tabs/character-tab/psionics-tab/psionic-core-discipline.html index f1c721c7e7..3d329b6aa6 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/psionics-tab/psionic-core-discipline.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/psionics-tab/psionic-core-discipline.html @@ -32,11 +32,11 @@ - + insert_fold-button.html - + - + diff --git a/ADnD_2E_Revised/javascript/sheetWorkers.js b/ADnD_2E_Revised/javascript/sheetWorkers.js index d955789724..5ad2202278 100644 --- a/ADnD_2E_Revised/javascript/sheetWorkers.js +++ b/ADnD_2E_Revised/javascript/sheetWorkers.js @@ -2905,7 +2905,7 @@ const FOLDABLE_REPEATING_SECTIONS = [ FOLDABLE_REPEATING_SECTIONS.forEach(section => { on(`clicked:repeating_${section}:show clicked:repeating_${section}:hide`, function (eventInfo) { let parse = parseSourceAttribute(eventInfo); - $20(`div[data-reprowid=${parse.rowId}] .sheet-hidden`).toggleClass('sheet-show'); + $20(`div[data-reprowid=${parse.rowId}] .sheet-hidden.sheet-fold`).toggleClass('sheet-show'); }); }); diff --git a/ADnD_2E_Revised/pug/spellTemplate.pug b/ADnD_2E_Revised/pug/spellTemplate.pug index 7379f5dfe8..7b383e6f23 100644 --- a/ADnD_2E_Revised/pug/spellTemplate.pug +++ b/ADnD_2E_Revised/pug/spellTemplate.pug @@ -26,9 +26,7 @@ fieldset(name="repeating_spells-#REPLACE0#" class="repeating_spells-#REPLACE0#") button(type="roll" name="roll_spell-init" title="@{repeating_spells-#REPLACE0#_$X_spell-init}" value!="/gmroll [[{[[1d10]]+(@{spell-cast-time})-(@{misc-mod}), 1}kh1]] [Initiative (@{spell-name})]&{tracker}") Initiative td button(type="roll" name="roll_spell-template" title="%{repeating_spells-#REPLACE0#_$X_spell-template}" value!="#REPLACE1#&{template:2Espell}{{title=@{spell-name}}}{{splevel=@{spell-level}}}{{school=@{spell-school}}}{{sphere=@{spell-sphere}}}{{components=@{spell-components}}}{{time=@{spell-cast-time}}}{{range=@{spell-range}}}{{duration=@{spell-duration}}}{{aoe=@{spell-aoe}}}{{save=@{spell-saving-throw}}}{{subtlety=@{spell-subtlety}}}{{sensory=@{spell-sensory}}}{{knockdown=@{spell-knockdown}}}{{crit=@{spell-crit-size}}}{{damage=@{spell-damage}}}{{damagetype=@{spell-damage-type}}}{{healing=@{spell-healing}}}{{reference=@{spell-reference}}}{{materials=@{spell-materials}}}"+failureCheck+"{{effects=@{spell-effect}}}") T - td - button(type="action" name="act_show" class="btn sheet-hidden sheet-show") ▼ - button(type="action" name="act_hide" class="btn sheet-hidden") ▲ + | insert_fold-button.html table(class="sheet-default-header-first-row sheet-spell-slots sheet-hidden") tr(class="sheet-collapse sheet-show-first") td Cast @@ -52,7 +50,7 @@ fieldset(name="repeating_spells-#REPLACE0#" class="repeating_spells-#REPLACE0#") tr td input(type="number" name="attr_spell-"+arcWind.toLowerCase() title="@{repeating_spells-#REPLACE0#_$X_spell-"+arcWind.toLowerCase()+"}" class="sheet-table-dynamic" value="0") - div(class="sheet-hidden") + div(class="sheet-hidden sheet-fold") div(class="sheet-spell-fold") table(class="sheet-default-header-odd-column" style="align-self: flex-start") tr From 88559404f92e6a79b7decef0f26258e83b9664e8 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Thu, 16 Feb 2023 13:20:34 +0100 Subject: [PATCH 33/58] Only add bonus spells if you are actually a priest --- ADnD_2E_Revised/2ESheet.html | 87 ++++++++++++---------- ADnD_2E_Revised/javascript/sheetWorkers.js | 87 ++++++++++++---------- 2 files changed, 94 insertions(+), 80 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 036a7646cf..c5feb2a3d6 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -69151,21 +69151,28 @@ on('change:intelligence change:reason change:knowledge', function() { }); // Set sub-attributes based on Wisdom, Intuition, and Willpower -function parseWisBonus(abilityScore, wisdom) { - if (abilityScore < 13) { - return { - '1st': 0, - '2nd': 0, - '3rd': 0, - '4th': 0, - '5th': 0, - '6th': 0, - '7th': 0, - 'wind': wisdomTable['wisdom-wind'][wisdom], - 'wisbonus': wisdomTable['wisbonus'][abilityScore], - 'wisbonus-prime': wisdomTable['wisbonus'][abilityScore], - 'wisbonus-extra': wisdomTable['wisbonus'][abilityScore], - }; +async function parseWisBonus(abilityScore, wisdom) { + let bonus = { + '1st': 0, + '2nd': 0, + '3rd': 0, + '4th': 0, + '5th': 0, + '6th': 0, + '7th': 0, + 'wind': 0, + 'wisbonus': '—', + 'wisbonus-prime': '—', + 'wisbonus-extra': '—', + }; + if (abilityScore < 13 && wisdom < 13) { + await keepContextRoll(); + return bonus; + } + + let answer = await extractQueryResult('?{Priests get bonus spells from high Wisdom (but not Paladins and Rangers). Do you play a priest?|My character is a priest,true|My character is a different class,false}'); + if (answer !== 'true') { + return bonus; } // Combine all spell levels into one string @@ -69175,7 +69182,7 @@ function parseWisBonus(abilityScore, wisdom) { } // Count instances of each spell level - let bonus = { + bonus = { '1st': (bonusString.match(/1st/g) || []).length, '2nd': (bonusString.match(/2nd/g) || []).length, '3rd': (bonusString.match(/3rd/g) || []).length, @@ -69204,7 +69211,7 @@ function parseWisBonus(abilityScore, wisdom) { } on('change:wisdom change:intuition change:willpower', function() { - getAttrs(['wisdom','intuition','willpower'], function(values) { + getAttrs(['wisdom','intuition','willpower'], async function (values) { let wisdomRaw = values.wisdom.replace(/\s+/g, ''); let intuitionRaw = values.intuition.replace(/\s+/g, ''); let willpowerRaw = values.willpower.replace(/\s+/g, ''); @@ -69216,7 +69223,7 @@ on('change:wisdom change:intuition change:willpower', function() { let bonusSpells; if (wisdom === 0) { - bonusSpells = parseWisBonus(0, 0); + bonusSpells = await parseWisBonus(0, 0); assignAttributes(0, 0, 0, bonusSpells, wisdomTable['wisimmune'][0], wisdomTable['wisimmune'][0], wisdomTable['wisnotes'][0], wisdomTable['wisnotes'][0]); return; } @@ -69244,35 +69251,35 @@ on('change:wisdom change:intuition change:willpower', function() { for (let i = willpower; i > 18; i--) { wisImmuneArray.push(wisdomTable['wisimmune'][i]); } - let slicePoint = Math.round(wisImmuneArray.length/2); + let slicePoint = Math.round(wisImmuneArray.length / 2); wisimm1 = wisImmuneArray.slice(0, slicePoint).filter(Boolean).join(', '); wisimm2 = wisImmuneArray.slice(slicePoint).filter(Boolean).join(', '); } - bonusSpells = parseWisBonus(intuition, wisdom); + bonusSpells = await parseWisBonus(intuition, wisdom); assignAttributes(wisdom, intuition, willpower, bonusSpells, wisimm1, wisimm2, wisnotes, wis2notes); function assignAttributes(wisdom, intuition, willpower, bonusSpells, wisimm1, wisimm2, wisnotes, wis2notes) { - setAttrs({ - wisdef: wisdomTable['wisdef'][willpower], - wisbonus: bonusSpells['wisbonus'], - 'wisbonus-prime': bonusSpells['wisbonus-prime'], - 'wisbonus-extra': bonusSpells['wisbonus-extra'], - wisfail: wisdomTable['wisfail'][intuition], - wisimm: wisimm1, - wisimm1: wisimm1, - wisimm2: wisimm2, - wisnotes: wisnotes, - wis2notes: wis2notes, - 'spell-priest-level1-wisdom': bonusSpells['1st'], - 'spell-priest-level2-wisdom': bonusSpells['2nd'], - 'spell-priest-level3-wisdom': bonusSpells['3rd'], - 'spell-priest-level4-wisdom': bonusSpells['4th'], - 'spell-priest-level5-wisdom': bonusSpells['5th'], - 'spell-priest-level6-wisdom': bonusSpells['6th'], - 'spell-priest-level7-wisdom': bonusSpells['7th'], - 'wisdom-wind': bonusSpells['wind'], - }); + let newValue = {}; + newValue['wisdef'] = wisdomTable['wisdef'][willpower]; + newValue['wisbonus'] = bonusSpells['wisbonus']; + newValue['wisbonus-prime'] = bonusSpells['wisbonus-prime']; + newValue['wisbonus-extra'] = bonusSpells['wisbonus-extra']; + newValue['wisfail'] = wisdomTable['wisfail'][intuition]; + newValue['wisimm'] = wisimm1; + newValue['wisimm1'] = wisimm1; + newValue['wisimm2'] = wisimm2; + newValue['wisnotes'] = wisnotes; + newValue['wis2notes'] = wis2notes; + newValue['spell-priest-level1-wisdom'] = bonusSpells['1st']; + newValue['spell-priest-level2-wisdom'] = bonusSpells['2nd']; + newValue['spell-priest-level3-wisdom'] = bonusSpells['3rd']; + newValue['spell-priest-level4-wisdom'] = bonusSpells['4th']; + newValue['spell-priest-level5-wisdom'] = bonusSpells['5th']; + newValue['spell-priest-level6-wisdom'] = bonusSpells['6th']; + newValue['spell-priest-level7-wisdom'] = bonusSpells['7th']; + newValue['wisdom-wind'] = bonusSpells['wind']; + setAttrs(newValue); } }); }); diff --git a/ADnD_2E_Revised/javascript/sheetWorkers.js b/ADnD_2E_Revised/javascript/sheetWorkers.js index 5ad2202278..8dd46a163e 100644 --- a/ADnD_2E_Revised/javascript/sheetWorkers.js +++ b/ADnD_2E_Revised/javascript/sheetWorkers.js @@ -668,21 +668,28 @@ on('change:intelligence change:reason change:knowledge', function() { }); // Set sub-attributes based on Wisdom, Intuition, and Willpower -function parseWisBonus(abilityScore, wisdom) { - if (abilityScore < 13) { - return { - '1st': 0, - '2nd': 0, - '3rd': 0, - '4th': 0, - '5th': 0, - '6th': 0, - '7th': 0, - 'wind': wisdomTable['wisdom-wind'][wisdom], - 'wisbonus': wisdomTable['wisbonus'][abilityScore], - 'wisbonus-prime': wisdomTable['wisbonus'][abilityScore], - 'wisbonus-extra': wisdomTable['wisbonus'][abilityScore], - }; +async function parseWisBonus(abilityScore, wisdom) { + let bonus = { + '1st': 0, + '2nd': 0, + '3rd': 0, + '4th': 0, + '5th': 0, + '6th': 0, + '7th': 0, + 'wind': 0, + 'wisbonus': '—', + 'wisbonus-prime': '—', + 'wisbonus-extra': '—', + }; + if (abilityScore < 13 && wisdom < 13) { + await keepContextRoll(); + return bonus; + } + + let answer = await extractQueryResult('?{Priests get bonus spells from high Wisdom (but not Paladins and Rangers). Do you play a priest?|My character is a priest,true|My character is a different class,false}'); + if (answer !== 'true') { + return bonus; } // Combine all spell levels into one string @@ -692,7 +699,7 @@ function parseWisBonus(abilityScore, wisdom) { } // Count instances of each spell level - let bonus = { + bonus = { '1st': (bonusString.match(/1st/g) || []).length, '2nd': (bonusString.match(/2nd/g) || []).length, '3rd': (bonusString.match(/3rd/g) || []).length, @@ -721,7 +728,7 @@ function parseWisBonus(abilityScore, wisdom) { } on('change:wisdom change:intuition change:willpower', function() { - getAttrs(['wisdom','intuition','willpower'], function(values) { + getAttrs(['wisdom','intuition','willpower'], async function (values) { let wisdomRaw = values.wisdom.replace(/\s+/g, ''); let intuitionRaw = values.intuition.replace(/\s+/g, ''); let willpowerRaw = values.willpower.replace(/\s+/g, ''); @@ -733,7 +740,7 @@ on('change:wisdom change:intuition change:willpower', function() { let bonusSpells; if (wisdom === 0) { - bonusSpells = parseWisBonus(0, 0); + bonusSpells = await parseWisBonus(0, 0); assignAttributes(0, 0, 0, bonusSpells, wisdomTable['wisimmune'][0], wisdomTable['wisimmune'][0], wisdomTable['wisnotes'][0], wisdomTable['wisnotes'][0]); return; } @@ -761,35 +768,35 @@ on('change:wisdom change:intuition change:willpower', function() { for (let i = willpower; i > 18; i--) { wisImmuneArray.push(wisdomTable['wisimmune'][i]); } - let slicePoint = Math.round(wisImmuneArray.length/2); + let slicePoint = Math.round(wisImmuneArray.length / 2); wisimm1 = wisImmuneArray.slice(0, slicePoint).filter(Boolean).join(', '); wisimm2 = wisImmuneArray.slice(slicePoint).filter(Boolean).join(', '); } - bonusSpells = parseWisBonus(intuition, wisdom); + bonusSpells = await parseWisBonus(intuition, wisdom); assignAttributes(wisdom, intuition, willpower, bonusSpells, wisimm1, wisimm2, wisnotes, wis2notes); function assignAttributes(wisdom, intuition, willpower, bonusSpells, wisimm1, wisimm2, wisnotes, wis2notes) { - setAttrs({ - wisdef: wisdomTable['wisdef'][willpower], - wisbonus: bonusSpells['wisbonus'], - 'wisbonus-prime': bonusSpells['wisbonus-prime'], - 'wisbonus-extra': bonusSpells['wisbonus-extra'], - wisfail: wisdomTable['wisfail'][intuition], - wisimm: wisimm1, - wisimm1: wisimm1, - wisimm2: wisimm2, - wisnotes: wisnotes, - wis2notes: wis2notes, - 'spell-priest-level1-wisdom': bonusSpells['1st'], - 'spell-priest-level2-wisdom': bonusSpells['2nd'], - 'spell-priest-level3-wisdom': bonusSpells['3rd'], - 'spell-priest-level4-wisdom': bonusSpells['4th'], - 'spell-priest-level5-wisdom': bonusSpells['5th'], - 'spell-priest-level6-wisdom': bonusSpells['6th'], - 'spell-priest-level7-wisdom': bonusSpells['7th'], - 'wisdom-wind': bonusSpells['wind'], - }); + let newValue = {}; + newValue['wisdef'] = wisdomTable['wisdef'][willpower]; + newValue['wisbonus'] = bonusSpells['wisbonus']; + newValue['wisbonus-prime'] = bonusSpells['wisbonus-prime']; + newValue['wisbonus-extra'] = bonusSpells['wisbonus-extra']; + newValue['wisfail'] = wisdomTable['wisfail'][intuition]; + newValue['wisimm'] = wisimm1; + newValue['wisimm1'] = wisimm1; + newValue['wisimm2'] = wisimm2; + newValue['wisnotes'] = wisnotes; + newValue['wis2notes'] = wis2notes; + newValue['spell-priest-level1-wisdom'] = bonusSpells['1st']; + newValue['spell-priest-level2-wisdom'] = bonusSpells['2nd']; + newValue['spell-priest-level3-wisdom'] = bonusSpells['3rd']; + newValue['spell-priest-level4-wisdom'] = bonusSpells['4th']; + newValue['spell-priest-level5-wisdom'] = bonusSpells['5th']; + newValue['spell-priest-level6-wisdom'] = bonusSpells['6th']; + newValue['spell-priest-level7-wisdom'] = bonusSpells['7th']; + newValue['wisdom-wind'] = bonusSpells['wind']; + setAttrs(newValue); } }); }); From 61b0fb549335e235ea7dd0a35cb3272261cfe591 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Thu, 16 Feb 2023 13:27:46 +0100 Subject: [PATCH 34/58] Updated changelog --- ADnD_2E_Revised/2ESheet.html | 3 ++- ADnD_2E_Revised/html/changelog.html | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index c5feb2a3d6..1d3d5e41ee 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -18,7 +18,8 @@
    • Added Spell tracking selection to the Sheet Settings Tab. Choices are: Spell slots, spell points, Arcs / Winds
    • Redesigned the Spells tab to only show the spell tracking system that selected on the Sheet Settings Tab
    • -
    • Added autofill for bonus Winds from high Wisdom for the Arcs/Winds spell tracking system. If the PO: S&P sub ability scores are used, base Wisdom is still used for determining bonus winds
    • +
    • High Wisdom now triggers a popup asking if you are a priest. Bonus spells are only added if you are a priest
    • +
    • High Wisdom now autofill bonus Winds for Priests for the Arcs/Winds spell tracking system. If the PO: S&P sub ability scores are used, base Wisdom is still used for determining bonus winds
    • Fixed bonus spells from high Intuition. Willpower was incorrectly used
    • Styled Monster tab to have dynamically sized fields, and larger fields for Hit Dice, HP, and Max HP
    diff --git a/ADnD_2E_Revised/html/changelog.html b/ADnD_2E_Revised/html/changelog.html index af3afdafb2..9a3605627a 100644 --- a/ADnD_2E_Revised/html/changelog.html +++ b/ADnD_2E_Revised/html/changelog.html @@ -13,7 +13,8 @@
  • Added Spell tracking selection to the Sheet Settings Tab. Choices are: Spell slots, spell points, Arcs / Winds
  • Redesigned the Spells tab to only show the spell tracking system that selected on the Sheet Settings Tab
  • -
  • Added autofill for bonus Winds from high Wisdom for the Arcs/Winds spell tracking system. If the PO: S&P sub ability scores are used, base Wisdom is still used for determining bonus winds
  • +
  • High Wisdom now triggers a popup asking if you are a priest. Bonus spells are only added if you are a priest
  • +
  • High Wisdom now autofill bonus Winds for Priests for the Arcs/Winds spell tracking system. If the PO: S&P sub ability scores are used, base Wisdom is still used for determining bonus winds
  • Fixed bonus spells from high Intuition. Willpower was incorrectly used
  • Styled Monster tab to have dynamically sized fields, and larger fields for Hit Dice, HP, and Max HP
From 42a3095a7ff55a322becb8ba72b917a83566c648 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Thu, 16 Feb 2023 17:28:41 +0100 Subject: [PATCH 35/58] Clarified regeneration, maybe --- ADnD_2E_Revised/2ESheet.html | 5 +++-- ADnD_2E_Revised/html/changelog.html | 1 + ADnD_2E_Revised/javascript/abilityScores.js | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 1d3d5e41ee..ca7953b9e2 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -20,6 +20,7 @@
  • Redesigned the Spells tab to only show the spell tracking system that selected on the Sheet Settings Tab
  • High Wisdom now triggers a popup asking if you are a priest. Bonus spells are only added if you are a priest
  • High Wisdom now autofill bonus Winds for Priests for the Arcs/Winds spell tracking system. If the PO: S&P sub ability scores are used, base Wisdom is still used for determining bonus winds
  • +
  • High Constitution Regeneration now clarifies that it is per turn(s)
  • Fixed bonus spells from high Intuition. Willpower was incorrectly used
  • Styled Monster tab to have dynamically sized fields, and larger fields for Hit Dice, HP, and Max HP
  • @@ -33709,8 +33710,8 @@ constitutionTable['conadj'] = ['Error','-3','-2','-2','-1','-1','-1','0','0','0' constitutionTable['conshock'] = ['Error','25','30','35','40','45','50','55','60','65','70','75','80','85','88','90','95','97','99','99','99','99','99','99','99','100']; constitutionTable['conres'] = ['Error','30','35','40','45','50','55','60','65','70','75','80','85','90','92','94','96','98','100','100','100','100','100','100','100','100']; constitutionTable['conpoisonsave'] = ['Error','-2','-1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','+1','+1','+2','+2','+3','+3','+4']; -constitutionTable['conregen'] = ['Error','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','1/6','1/5','1/4','1/3','1/2','1/1']; -constitutionTable['connotes'] = ['INVALID CONSTITUTION','','','','','','','','','','','','','','','','','','','','1 hp/6 turns - not acid/fire','1 hp/5 turns - not acid/fire','1 hp/4 turns - not acid/fire','1 hp/3 turns - not acid/fire','1 hp/2 turns - not acid/fire','1 hp/turn - not acid/fire']; +constitutionTable['conregen'] = ['Error','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','1/6 turns','1/5 turns','1/4 turns','1/3 turns','1/2 turns','1/1 turn']; +constitutionTable['connotes'] = ['INVALID CONSTITUTION','','','','','','','','','','','','','','','','','','','','Fire and acid damage cannot be regenerated','Fire and acid damage cannot be regenerated','Fire and acid damage cannot be regenerated','Fire and acid damage cannot be regenerated','Fire and acid damage cannot be regenerated','Fire and acid damage cannot be regenerated']; constitutionTable['con2notes'] = ['INVALID CONSTITUTION','','','','','','','','','','','','','','','','','(+3) Warriors only','(+4) Warriors only','(+5) Warriors only','(+5) Warriors only','(+6) Warriors only','(+6) Warriors only','(+6) Warriors only','(+7) Warriors only','(+7) Warriors only']; const intelligenceTable = {}; diff --git a/ADnD_2E_Revised/html/changelog.html b/ADnD_2E_Revised/html/changelog.html index 9a3605627a..57571987f7 100644 --- a/ADnD_2E_Revised/html/changelog.html +++ b/ADnD_2E_Revised/html/changelog.html @@ -15,6 +15,7 @@
  • Redesigned the Spells tab to only show the spell tracking system that selected on the Sheet Settings Tab
  • High Wisdom now triggers a popup asking if you are a priest. Bonus spells are only added if you are a priest
  • High Wisdom now autofill bonus Winds for Priests for the Arcs/Winds spell tracking system. If the PO: S&P sub ability scores are used, base Wisdom is still used for determining bonus winds
  • +
  • High Constitution Regeneration now clarifies that it is per turn(s)
  • Fixed bonus spells from high Intuition. Willpower was incorrectly used
  • Styled Monster tab to have dynamically sized fields, and larger fields for Hit Dice, HP, and Max HP
  • diff --git a/ADnD_2E_Revised/javascript/abilityScores.js b/ADnD_2E_Revised/javascript/abilityScores.js index 7c213a0b3c..6841a97ba7 100644 --- a/ADnD_2E_Revised/javascript/abilityScores.js +++ b/ADnD_2E_Revised/javascript/abilityScores.js @@ -83,8 +83,8 @@ constitutionTable['conadj'] = ['Error','-3','-2','-2','-1','-1','-1','0','0','0' constitutionTable['conshock'] = ['Error','25','30','35','40','45','50','55','60','65','70','75','80','85','88','90','95','97','99','99','99','99','99','99','99','100']; constitutionTable['conres'] = ['Error','30','35','40','45','50','55','60','65','70','75','80','85','90','92','94','96','98','100','100','100','100','100','100','100','100']; constitutionTable['conpoisonsave'] = ['Error','-2','-1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','+1','+1','+2','+2','+3','+3','+4']; -constitutionTable['conregen'] = ['Error','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','1/6','1/5','1/4','1/3','1/2','1/1']; -constitutionTable['connotes'] = ['INVALID CONSTITUTION','','','','','','','','','','','','','','','','','','','','1 hp/6 turns - not acid/fire','1 hp/5 turns - not acid/fire','1 hp/4 turns - not acid/fire','1 hp/3 turns - not acid/fire','1 hp/2 turns - not acid/fire','1 hp/turn - not acid/fire']; +constitutionTable['conregen'] = ['Error','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','1/6 turns','1/5 turns','1/4 turns','1/3 turns','1/2 turns','1/1 turn']; +constitutionTable['connotes'] = ['INVALID CONSTITUTION','','','','','','','','','','','','','','','','','','','','Fire and acid damage cannot be regenerated','Fire and acid damage cannot be regenerated','Fire and acid damage cannot be regenerated','Fire and acid damage cannot be regenerated','Fire and acid damage cannot be regenerated','Fire and acid damage cannot be regenerated']; constitutionTable['con2notes'] = ['INVALID CONSTITUTION','','','','','','','','','','','','','','','','','(+3) Warriors only','(+4) Warriors only','(+5) Warriors only','(+5) Warriors only','(+6) Warriors only','(+6) Warriors only','(+6) Warriors only','(+7) Warriors only','(+7) Warriors only']; const intelligenceTable = {}; From dc7d466bbeebb0348138349c6d115415bfde7077 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Thu, 16 Feb 2023 17:33:15 +0100 Subject: [PATCH 36/58] Added PHB reference to regenration note --- ADnD_2E_Revised/2ESheet.html | 2 +- ADnD_2E_Revised/javascript/abilityScores.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index ca7953b9e2..fc465e7c6c 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -33711,7 +33711,7 @@ constitutionTable['conshock'] = ['Error','25','30','35','40','45','50','55','60' constitutionTable['conres'] = ['Error','30','35','40','45','50','55','60','65','70','75','80','85','90','92','94','96','98','100','100','100','100','100','100','100','100']; constitutionTable['conpoisonsave'] = ['Error','-2','-1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','+1','+1','+2','+2','+3','+3','+4']; constitutionTable['conregen'] = ['Error','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','1/6 turns','1/5 turns','1/4 turns','1/3 turns','1/2 turns','1/1 turn']; -constitutionTable['connotes'] = ['INVALID CONSTITUTION','','','','','','','','','','','','','','','','','','','','Fire and acid damage cannot be regenerated','Fire and acid damage cannot be regenerated','Fire and acid damage cannot be regenerated','Fire and acid damage cannot be regenerated','Fire and acid damage cannot be regenerated','Fire and acid damage cannot be regenerated']; +constitutionTable['connotes'] = ['INVALID CONSTITUTION','','','','','','','','','','','','','','','','','','','','Fire and acid damage cannot be regenerated, PHB p. 21','Fire and acid damage cannot be regenerated, PHB p. 21','Fire and acid damage cannot be regenerated, PHB p. 21','Fire and acid damage cannot be regenerated, PHB p. 21','Fire and acid damage cannot be regenerated, PHB p. 21','Fire and acid damage cannot be regenerated, PHB p. 21']; constitutionTable['con2notes'] = ['INVALID CONSTITUTION','','','','','','','','','','','','','','','','','(+3) Warriors only','(+4) Warriors only','(+5) Warriors only','(+5) Warriors only','(+6) Warriors only','(+6) Warriors only','(+6) Warriors only','(+7) Warriors only','(+7) Warriors only']; const intelligenceTable = {}; diff --git a/ADnD_2E_Revised/javascript/abilityScores.js b/ADnD_2E_Revised/javascript/abilityScores.js index 6841a97ba7..8470822ad9 100644 --- a/ADnD_2E_Revised/javascript/abilityScores.js +++ b/ADnD_2E_Revised/javascript/abilityScores.js @@ -84,7 +84,7 @@ constitutionTable['conshock'] = ['Error','25','30','35','40','45','50','55','60' constitutionTable['conres'] = ['Error','30','35','40','45','50','55','60','65','70','75','80','85','90','92','94','96','98','100','100','100','100','100','100','100','100']; constitutionTable['conpoisonsave'] = ['Error','-2','-1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','+1','+1','+2','+2','+3','+3','+4']; constitutionTable['conregen'] = ['Error','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','Nil','1/6 turns','1/5 turns','1/4 turns','1/3 turns','1/2 turns','1/1 turn']; -constitutionTable['connotes'] = ['INVALID CONSTITUTION','','','','','','','','','','','','','','','','','','','','Fire and acid damage cannot be regenerated','Fire and acid damage cannot be regenerated','Fire and acid damage cannot be regenerated','Fire and acid damage cannot be regenerated','Fire and acid damage cannot be regenerated','Fire and acid damage cannot be regenerated']; +constitutionTable['connotes'] = ['INVALID CONSTITUTION','','','','','','','','','','','','','','','','','','','','Fire and acid damage cannot be regenerated, PHB p. 21','Fire and acid damage cannot be regenerated, PHB p. 21','Fire and acid damage cannot be regenerated, PHB p. 21','Fire and acid damage cannot be regenerated, PHB p. 21','Fire and acid damage cannot be regenerated, PHB p. 21','Fire and acid damage cannot be regenerated, PHB p. 21']; constitutionTable['con2notes'] = ['INVALID CONSTITUTION','','','','','','','','','','','','','','','','','(+3) Warriors only','(+4) Warriors only','(+5) Warriors only','(+5) Warriors only','(+6) Warriors only','(+6) Warriors only','(+6) Warriors only','(+7) Warriors only','(+7) Warriors only']; const intelligenceTable = {}; From 28fde3960775f5a1655bfd9b96117668be57ebe4 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Thu, 16 Feb 2023 19:29:45 +0100 Subject: [PATCH 37/58] - Updated change log - Added checkbox and logic for automatically updating spell points from intelligence --- ADnD_2E_Revised/2ESheet.html | 23 ++++++++++++++++--- ADnD_2E_Revised/html/changelog.html | 3 ++- .../character-tab/spells-tab/wizard-tab.html | 7 +++++- ADnD_2E_Revised/javascript/abilityScores.js | 2 +- ADnD_2E_Revised/javascript/sheetWorkers.js | 11 +++++++++ 5 files changed, 40 insertions(+), 6 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index fc465e7c6c..85f505f420 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -9,7 +9,6 @@

    Changes in

      -
    • 2Espell - Sensory signature and Knockdown switched places to make them appear in the same order as in the PO: Spells & Magic book
    • Completely redesigned the new spell section, so each spell can be on a single line, showing Name, Range, and Area of Effect
      • Single line spells can be folded out to show additional information of the spells
      • @@ -20,9 +19,11 @@
      • Redesigned the Spells tab to only show the spell tracking system that selected on the Sheet Settings Tab
      • High Wisdom now triggers a popup asking if you are a priest. Bonus spells are only added if you are a priest
      • High Wisdom now autofill bonus Winds for Priests for the Arcs/Winds spell tracking system. If the PO: S&P sub ability scores are used, base Wisdom is still used for determining bonus winds
      • +
      • Added support for automatic Spell Points for Wizards with high Intelligence
      • High Constitution Regeneration now clarifies that it is per turn(s)
      • Fixed bonus spells from high Intuition. Willpower was incorrectly used
      • Styled Monster tab to have dynamically sized fields, and larger fields for Hit Dice, HP, and Max HP
      • +
      • 2Espell - Sensory signature and Knockdown switched places to make them appear in the same order as in the PO: Spells & Magic book

      @@ -3903,7 +3904,7 @@ Level Specialist - Intelligence + Intelligence Total | Remaining @@ -3913,11 +3914,16 @@ + | +

      + Bonus spell points from high Intelligence to Wizards + Under this optional rule, wizard characters gain a number of bonus spell points, based on their Intelligence score. PO: Spells & Powers, p. 79 +
      @@ -33726,7 +33732,7 @@ intelligenceTable['intimm4th'] = ['Error','','','','','','','','','','','','','' intelligenceTable['intimm5th'] = ['Error','','','','','','','','','','','','','','','','','','','','','','','5th-level','5th-level','5th-level']; intelligenceTable['intimm6th'] = ['Error','','','','','','','','','','','','','','','','','','','','','','','','6th-level','6th-level']; intelligenceTable['intimm7th'] = ['Error','','','','','','','','','','','','','','','','','','','','','','','','','7th-level']; -// intelligenceTable['spell-points-int'] = ['Error','','','','','','','','','2','2','2','3','3','4','4','5','6','7','8','9','9','9','9','9','9']; +intelligenceTable['spell-points-int'] = [0,0,0,0,0,0,0,0,0,2,2,2,3,3,4,4,5,6,7,8,9,9,9,9,9,9]; intelligenceTable['intnotes'] = ['INVALID INTELLIGENCE','Communicate by Grunts & Gestures','','','','','','','','','','','','','','','','','','','','','','','','','']; const wisdomTable = {}; @@ -69808,6 +69814,17 @@ setupRepeatingSpellSumming(allWizardSpellSections, wizardSpellPoints, 'spell-poi setupRepeatingSpellSumming(allWizardSpellSections, 'arc', 'spell-arc', `${arc}-sum`, true); setupCalculateRemaining(`${wizardSpellPoints}-total`, `${wizardSpellPoints}-sum`, `${wizardSpellPoints}-remaining`); setupCalculateRemaining(arc, `${arc}-sum`, `${arc}-remaining`); +on('change:spell-points-int-enabled change:intelligence', function (eventInfo) { + getAttrs(['spell-points-int-enabled', 'intelligence'], function (values) { + let newValue = {'spell-points-int': 0} + if (values['spell-points-int-enabled'] !== '1') { + return setAttrs(newValue) + } + let intelligence = getLookupValue(values['intelligence'], 0); + newValue['spell-points-int'] = intelligenceTable['spell-points-int'][intelligence]; + setAttrs(newValue); + }); +}); let priestSpellPoints = 'spell-points-priest'; let wind = 'total-wind'; diff --git a/ADnD_2E_Revised/html/changelog.html b/ADnD_2E_Revised/html/changelog.html index 57571987f7..441c7fa495 100644 --- a/ADnD_2E_Revised/html/changelog.html +++ b/ADnD_2E_Revised/html/changelog.html @@ -4,7 +4,6 @@

      Changes in

        -
      • 2Espell - Sensory signature and Knockdown switched places to make them appear in the same order as in the PO: Spells & Magic book
      • Completely redesigned the new spell section, so each spell can be on a single line, showing Name, Range, and Area of Effect
        • Single line spells can be folded out to show additional information of the spells
        • @@ -15,9 +14,11 @@
        • Redesigned the Spells tab to only show the spell tracking system that selected on the Sheet Settings Tab
        • High Wisdom now triggers a popup asking if you are a priest. Bonus spells are only added if you are a priest
        • High Wisdom now autofill bonus Winds for Priests for the Arcs/Winds spell tracking system. If the PO: S&P sub ability scores are used, base Wisdom is still used for determining bonus winds
        • +
        • Added support for automatic Spell Points for Wizards with high Intelligence
        • High Constitution Regeneration now clarifies that it is per turn(s)
        • Fixed bonus spells from high Intuition. Willpower was incorrectly used
        • Styled Monster tab to have dynamically sized fields, and larger fields for Hit Dice, HP, and Max HP
        • +
        • 2Espell - Sensory signature and Knockdown switched places to make them appear in the same order as in the PO: Spells & Magic book

        diff --git a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html index d07d15f437..b240705946 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html @@ -34,7 +34,7 @@

      - + @@ -44,11 +44,16 @@ +
      Level SpecialistIntelligenceIntelligence Total | Remaining |
      +
      + Bonus spell points from high Intelligence to Wizards + Under this optional rule, wizard characters gain a number of bonus spell points, based on their Intelligence score. PO: Spells & Powers, p. 79 +
      diff --git a/ADnD_2E_Revised/javascript/abilityScores.js b/ADnD_2E_Revised/javascript/abilityScores.js index 8470822ad9..30f09d49f9 100644 --- a/ADnD_2E_Revised/javascript/abilityScores.js +++ b/ADnD_2E_Revised/javascript/abilityScores.js @@ -99,7 +99,7 @@ intelligenceTable['intimm4th'] = ['Error','','','','','','','','','','','','','' intelligenceTable['intimm5th'] = ['Error','','','','','','','','','','','','','','','','','','','','','','','5th-level','5th-level','5th-level']; intelligenceTable['intimm6th'] = ['Error','','','','','','','','','','','','','','','','','','','','','','','','6th-level','6th-level']; intelligenceTable['intimm7th'] = ['Error','','','','','','','','','','','','','','','','','','','','','','','','','7th-level']; -// intelligenceTable['spell-points-int'] = ['Error','','','','','','','','','2','2','2','3','3','4','4','5','6','7','8','9','9','9','9','9','9']; +intelligenceTable['spell-points-int'] = [0,0,0,0,0,0,0,0,0,2,2,2,3,3,4,4,5,6,7,8,9,9,9,9,9,9]; intelligenceTable['intnotes'] = ['INVALID INTELLIGENCE','Communicate by Grunts & Gestures','','','','','','','','','','','','','','','','','','','','','','','','','']; const wisdomTable = {}; diff --git a/ADnD_2E_Revised/javascript/sheetWorkers.js b/ADnD_2E_Revised/javascript/sheetWorkers.js index 8dd46a163e..d02523196f 100644 --- a/ADnD_2E_Revised/javascript/sheetWorkers.js +++ b/ADnD_2E_Revised/javascript/sheetWorkers.js @@ -1323,6 +1323,17 @@ setupRepeatingSpellSumming(allWizardSpellSections, wizardSpellPoints, 'spell-poi setupRepeatingSpellSumming(allWizardSpellSections, 'arc', 'spell-arc', `${arc}-sum`, true); setupCalculateRemaining(`${wizardSpellPoints}-total`, `${wizardSpellPoints}-sum`, `${wizardSpellPoints}-remaining`); setupCalculateRemaining(arc, `${arc}-sum`, `${arc}-remaining`); +on('change:spell-points-int-enabled change:intelligence', function (eventInfo) { + getAttrs(['spell-points-int-enabled', 'intelligence'], function (values) { + let newValue = {'spell-points-int': 0} + if (values['spell-points-int-enabled'] !== '1') { + return setAttrs(newValue) + } + let intelligence = getLookupValue(values['intelligence'], 0); + newValue['spell-points-int'] = intelligenceTable['spell-points-int'][intelligence]; + setAttrs(newValue); + }); +}); let priestSpellPoints = 'spell-points-priest'; let wind = 'total-wind'; From 7624068b4616cf09fb8d4e6d75728e4de5ccd5c5 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Fri, 17 Feb 2023 09:07:35 +0100 Subject: [PATCH 38/58] - Added logic for bonus spell points based on wisdom to priests - Updated change log --- ADnD_2E_Revised/2ESheet.html | 81 +++++++++++++++++-- ADnD_2E_Revised/html/changelog.html | 8 +- .../character-tab/spells-tab/priest-tab.html | 7 +- .../character-tab/spells-tab/wizard-tab.html | 4 +- ADnD_2E_Revised/javascript/abilityScores.js | 4 +- ADnD_2E_Revised/javascript/sheetWorkers.js | 66 ++++++++++++++- 6 files changed, 154 insertions(+), 16 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 85f505f420..278d8033ac 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -3904,7 +3904,7 @@ - + @@ -3914,7 +3914,7 @@ - + @@ -8739,7 +8739,7 @@ - + @@ -8748,11 +8748,16 @@ +
      Level SpecialistIntelligenceIntelligence Total | Remaining |
      LevelWisdomWisdom Total | RemainingSpell Points |
      +
      + Bonus spell points from high Wisdom to Priests + Priests with high Wisdom scores gain a special bonus spell points to reflect their piety and devotion. (This is a standard rule in this spell point system, unlike the optional bonus spell point rule for wizards with high Intelligence scores.) PO: Spells & Powers, p. 92 +
      @@ -33732,16 +33737,16 @@ intelligenceTable['intimm4th'] = ['Error','','','','','','','','','','','','','' intelligenceTable['intimm5th'] = ['Error','','','','','','','','','','','','','','','','','','','','','','','5th-level','5th-level','5th-level']; intelligenceTable['intimm6th'] = ['Error','','','','','','','','','','','','','','','','','','','','','','','','6th-level','6th-level']; intelligenceTable['intimm7th'] = ['Error','','','','','','','','','','','','','','','','','','','','','','','','','7th-level']; -intelligenceTable['spell-points-int'] = [0,0,0,0,0,0,0,0,0,2,2,2,3,3,4,4,5,6,7,8,9,9,9,9,9,9]; intelligenceTable['intnotes'] = ['INVALID INTELLIGENCE','Communicate by Grunts & Gestures','','','','','','','','','','','','','','','','','','','','','','','','','']; +intelligenceTable['spell-points-int'] = [0,0,0,0,0,0,0,0,0,2,2,2,3,3,4,4,5,6,7,8,9,9,9,9,9,9]; const wisdomTable = {}; wisdomTable['wisdef'] = ['Error','-6','-4','-3','-2','-1','-1','-1','0','0','0','0','0','0','0','+1','+2','+3','+4','+4','+4','+4','+4','+4','+4','+4']; wisdomTable['wisbonus'] = ['Error','—','—','—','—','—','—','—','—','0','0','0','0','1st','1st','2nd','2nd','3rd','4th','1st,3rd','2nd,4th','3rd,5th','4th,5th','1st,6th','5th,6th','6th,7th']; -wisdomTable['wisdom-wind'] = [0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3,4,5,6,7,8,9,10,11,12]; wisdomTable['wisfail'] = ['Error','80','60','50','45','40','35','30','25','20','15','10','5','0','0','0','0','0','0','0','0','0','0','0','0','0']; wisdomTable['wisimmune'] = ['Error','','','','','','','','','','','','','','','','','','','cause fear, charm person, command, friends, hypnotism','forget, hold person, ray of enfeeblement, scare','fear','charm monster, confusion, emotion, fumble, suggestion','chaos, feeblemind, hold monster, magic jar, quest','geas, mass suggestion, rod of rulership','antipathy/sympathy, death spell, mass charm']; wisdomTable['wisnotes'] = ['INVALID WISDOM','','','','','','','','','','','','','','','','','','','','','','','','','','']; +wisdomTable['wisdom-wind'] = [0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3,4,5,6,7,8,9,10,11,12]; const charismaTable = {}; charismaTable['chamax'] = ['Error','0','1','1','1','2','2','3','3','4','4','4','5','5','6','7','8','10','15','20','25','30','35','40','45','50']; @@ -69818,7 +69823,7 @@ on('change:spell-points-int-enabled change:intelligence', function (eventInfo) { getAttrs(['spell-points-int-enabled', 'intelligence'], function (values) { let newValue = {'spell-points-int': 0} if (values['spell-points-int-enabled'] !== '1') { - return setAttrs(newValue) + return setAttrs(newValue); } let intelligence = getLookupValue(values['intelligence'], 0); newValue['spell-points-int'] = intelligenceTable['spell-points-int'][intelligence]; @@ -69835,6 +69840,70 @@ setupRepeatingSpellSumming(allPriestSpellSections, priestSpellPoints, 'spell-poi setupRepeatingSpellSumming(allPriestSpellSections, 'wind', 'spell-wind', `${wind}-sum`, true); setupCalculateRemaining(`${priestSpellPoints}-total`, `${priestSpellPoints}-sum`, `${priestSpellPoints}-remaining`); setupCalculateRemaining(wind, `${wind}-sum`, `${wind}-remaining`); +let PRIEST_SPELL_POINTS_WIS = 'spell-points-priest-wis'; +on('change:spell-points-priest-wis-enabled change:wisdom change:level-priest', function (eventInfo) { + getAttrs(['spell-points-priest-wis-enabled', 'wisdom', 'level-priest'], async function (values) { + await keepContextRoll(); + let newValue = {}; + newValue[PRIEST_SPELL_POINTS_WIS] = 0; + if (values['spell-points-priest-wis-enabled'] !== '1') { + return setAttrs(newValue); + } + let wisdom = getLookupValue(values['wisdom'], 0); + if (wisdom < 13) { + return setAttrs(newValue); + } + if (wisdom === 13) { + newValue[PRIEST_SPELL_POINTS_WIS] = 4; + return setAttrs(newValue); + } + if (wisdom === 14) { + newValue[PRIEST_SPELL_POINTS_WIS] = 8; + return setAttrs(newValue); + } + let level = await extractRollResult(values['level-priest']); + if (isNaN(level) || level < 0) { + level = 1; + } + let spellPoints = 0; + if (wisdom === 15) { + spellPoints = level < 3 ? 8 : 15; + } else if (wisdom === 16) { + spellPoints = level < 3 ? 8 : 20; + } else if (wisdom === 17) { + if (1 <= level && level <= 2) { + spellPoints = 8; + } else if (3 <= level && level <= 4) { + spellPoints = 20; + } else { + spellPoints = 30; + } + } else if (wisdom === 18) { + if (1 <= level && level <= 2) { + spellPoints = 8; + } else if (3 <= level && level <= 4) { + spellPoints = 20; + } else if (5 <= level && level <= 6) { + spellPoints = 30; + } else { + spellPoints = 45; + } + } else if (wisdom >= 19) { + if (1 <= level && level <= 2) { + spellPoints = 12; + } else if (3 <= level && level <= 4) { + spellPoints = 25; + } else if (5 <= level && level <= 6) { + spellPoints = 45; + } else { + spellPoints = 60; + } + } + + newValue[PRIEST_SPELL_POINTS_WIS] = spellPoints; + setAttrs(newValue); + }); +}); // --- End setup Spell Points, Arc, and Wind --- // // --- Start setup reset buttons --- // diff --git a/ADnD_2E_Revised/html/changelog.html b/ADnD_2E_Revised/html/changelog.html index 441c7fa495..82b42a449d 100644 --- a/ADnD_2E_Revised/html/changelog.html +++ b/ADnD_2E_Revised/html/changelog.html @@ -13,10 +13,10 @@
    • Added Spell tracking selection to the Sheet Settings Tab. Choices are: Spell slots, spell points, Arcs / Winds
    • Redesigned the Spells tab to only show the spell tracking system that selected on the Sheet Settings Tab
    • High Wisdom now triggers a popup asking if you are a priest. Bonus spells are only added if you are a priest
    • -
    • High Wisdom now autofill bonus Winds for Priests for the Arcs/Winds spell tracking system. If the PO: S&P sub ability scores are used, base Wisdom is still used for determining bonus winds
    • -
    • Added support for automatic Spell Points for Wizards with high Intelligence
    • -
    • High Constitution Regeneration now clarifies that it is per turn(s)
    • -
    • Fixed bonus spells from high Intuition. Willpower was incorrectly used
    • +
    • High Wisdom now autofill bonus Winds for Priests for the Arcs/Winds spell tracking system, based on the same popup as stated above. If the PO: S&P sub ability scores are used, base Wisdom is still used for determining bonus winds
    • +
    • Added support for automatic Spell Points for Wizards with high Intelligence. This is a toggle as the bonus is optional.
    • +
    • Added support for automatic Spell Points for Priests with high Wisdom. This is a toggle as only priests gets this bonus, and not Paladins and rangers. The Priest caster level is used to determine how many spell points should be given
    • +
    • Fixed bonus spells from high Intuition from PO: Skills & Powers. Willpower was incorrectly used
    • Styled Monster tab to have dynamically sized fields, and larger fields for Hit Dice, HP, and Max HP
    • 2Espell - Sensory signature and Knockdown switched places to make them appear in the same order as in the PO: Spells & Magic book
    • diff --git a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html index eb78c07de6..2d26714ba8 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html @@ -46,7 +46,7 @@ - + @@ -55,11 +55,16 @@ +
      LevelWisdomWisdom Total | RemainingSpell Points |
      +
      + Bonus spell points from high Wisdom to Priests + Priests with high Wisdom scores gain a special bonus spell points to reflect their piety and devotion. (This is a standard rule in this spell point system, unlike the optional bonus spell point rule for wizards with high Intelligence scores.) PO: Spells & Powers, p. 92 +
      diff --git a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html index b240705946..685c6424cc 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html @@ -34,7 +34,7 @@ - + @@ -44,7 +44,7 @@ - + diff --git a/ADnD_2E_Revised/javascript/abilityScores.js b/ADnD_2E_Revised/javascript/abilityScores.js index 30f09d49f9..4a9fc1bc57 100644 --- a/ADnD_2E_Revised/javascript/abilityScores.js +++ b/ADnD_2E_Revised/javascript/abilityScores.js @@ -99,16 +99,16 @@ intelligenceTable['intimm4th'] = ['Error','','','','','','','','','','','','','' intelligenceTable['intimm5th'] = ['Error','','','','','','','','','','','','','','','','','','','','','','','5th-level','5th-level','5th-level']; intelligenceTable['intimm6th'] = ['Error','','','','','','','','','','','','','','','','','','','','','','','','6th-level','6th-level']; intelligenceTable['intimm7th'] = ['Error','','','','','','','','','','','','','','','','','','','','','','','','','7th-level']; -intelligenceTable['spell-points-int'] = [0,0,0,0,0,0,0,0,0,2,2,2,3,3,4,4,5,6,7,8,9,9,9,9,9,9]; intelligenceTable['intnotes'] = ['INVALID INTELLIGENCE','Communicate by Grunts & Gestures','','','','','','','','','','','','','','','','','','','','','','','','','']; +intelligenceTable['spell-points-int'] = [0,0,0,0,0,0,0,0,0,2,2,2,3,3,4,4,5,6,7,8,9,9,9,9,9,9]; const wisdomTable = {}; wisdomTable['wisdef'] = ['Error','-6','-4','-3','-2','-1','-1','-1','0','0','0','0','0','0','0','+1','+2','+3','+4','+4','+4','+4','+4','+4','+4','+4']; wisdomTable['wisbonus'] = ['Error','—','—','—','—','—','—','—','—','0','0','0','0','1st','1st','2nd','2nd','3rd','4th','1st,3rd','2nd,4th','3rd,5th','4th,5th','1st,6th','5th,6th','6th,7th']; -wisdomTable['wisdom-wind'] = [0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3,4,5,6,7,8,9,10,11,12]; wisdomTable['wisfail'] = ['Error','80','60','50','45','40','35','30','25','20','15','10','5','0','0','0','0','0','0','0','0','0','0','0','0','0']; wisdomTable['wisimmune'] = ['Error','','','','','','','','','','','','','','','','','','','cause fear, charm person, command, friends, hypnotism','forget, hold person, ray of enfeeblement, scare','fear','charm monster, confusion, emotion, fumble, suggestion','chaos, feeblemind, hold monster, magic jar, quest','geas, mass suggestion, rod of rulership','antipathy/sympathy, death spell, mass charm']; wisdomTable['wisnotes'] = ['INVALID WISDOM','','','','','','','','','','','','','','','','','','','','','','','','','','']; +wisdomTable['wisdom-wind'] = [0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,3,4,5,6,7,8,9,10,11,12]; const charismaTable = {}; charismaTable['chamax'] = ['Error','0','1','1','1','2','2','3','3','4','4','4','5','5','6','7','8','10','15','20','25','30','35','40','45','50']; diff --git a/ADnD_2E_Revised/javascript/sheetWorkers.js b/ADnD_2E_Revised/javascript/sheetWorkers.js index d02523196f..045112609e 100644 --- a/ADnD_2E_Revised/javascript/sheetWorkers.js +++ b/ADnD_2E_Revised/javascript/sheetWorkers.js @@ -1327,7 +1327,7 @@ on('change:spell-points-int-enabled change:intelligence', function (eventInfo) { getAttrs(['spell-points-int-enabled', 'intelligence'], function (values) { let newValue = {'spell-points-int': 0} if (values['spell-points-int-enabled'] !== '1') { - return setAttrs(newValue) + return setAttrs(newValue); } let intelligence = getLookupValue(values['intelligence'], 0); newValue['spell-points-int'] = intelligenceTable['spell-points-int'][intelligence]; @@ -1344,6 +1344,70 @@ setupRepeatingSpellSumming(allPriestSpellSections, priestSpellPoints, 'spell-poi setupRepeatingSpellSumming(allPriestSpellSections, 'wind', 'spell-wind', `${wind}-sum`, true); setupCalculateRemaining(`${priestSpellPoints}-total`, `${priestSpellPoints}-sum`, `${priestSpellPoints}-remaining`); setupCalculateRemaining(wind, `${wind}-sum`, `${wind}-remaining`); +let PRIEST_SPELL_POINTS_WIS = 'spell-points-priest-wis'; +on('change:spell-points-priest-wis-enabled change:wisdom change:level-priest', function (eventInfo) { + getAttrs(['spell-points-priest-wis-enabled', 'wisdom', 'level-priest'], async function (values) { + await keepContextRoll(); + let newValue = {}; + newValue[PRIEST_SPELL_POINTS_WIS] = 0; + if (values['spell-points-priest-wis-enabled'] !== '1') { + return setAttrs(newValue); + } + let wisdom = getLookupValue(values['wisdom'], 0); + if (wisdom < 13) { + return setAttrs(newValue); + } + if (wisdom === 13) { + newValue[PRIEST_SPELL_POINTS_WIS] = 4; + return setAttrs(newValue); + } + if (wisdom === 14) { + newValue[PRIEST_SPELL_POINTS_WIS] = 8; + return setAttrs(newValue); + } + let level = await extractRollResult(values['level-priest']); + if (isNaN(level) || level < 0) { + level = 1; + } + let spellPoints = 0; + if (wisdom === 15) { + spellPoints = level < 3 ? 8 : 15; + } else if (wisdom === 16) { + spellPoints = level < 3 ? 8 : 20; + } else if (wisdom === 17) { + if (1 <= level && level <= 2) { + spellPoints = 8; + } else if (3 <= level && level <= 4) { + spellPoints = 20; + } else { + spellPoints = 30; + } + } else if (wisdom === 18) { + if (1 <= level && level <= 2) { + spellPoints = 8; + } else if (3 <= level && level <= 4) { + spellPoints = 20; + } else if (5 <= level && level <= 6) { + spellPoints = 30; + } else { + spellPoints = 45; + } + } else if (wisdom >= 19) { + if (1 <= level && level <= 2) { + spellPoints = 12; + } else if (3 <= level && level <= 4) { + spellPoints = 25; + } else if (5 <= level && level <= 6) { + spellPoints = 45; + } else { + spellPoints = 60; + } + } + + newValue[PRIEST_SPELL_POINTS_WIS] = spellPoints; + setAttrs(newValue); + }); +}); // --- End setup Spell Points, Arc, and Wind --- // // --- Start setup reset buttons --- // From eba57554b436c7edb46562906f96b153251ee448 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Fri, 17 Feb 2023 09:08:23 +0100 Subject: [PATCH 39/58] Ran combine --- ADnD_2E_Revised/2ESheet.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 278d8033ac..6479f769bb 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -18,10 +18,10 @@
    • Added Spell tracking selection to the Sheet Settings Tab. Choices are: Spell slots, spell points, Arcs / Winds
    • Redesigned the Spells tab to only show the spell tracking system that selected on the Sheet Settings Tab
    • High Wisdom now triggers a popup asking if you are a priest. Bonus spells are only added if you are a priest
    • -
    • High Wisdom now autofill bonus Winds for Priests for the Arcs/Winds spell tracking system. If the PO: S&P sub ability scores are used, base Wisdom is still used for determining bonus winds
    • -
    • Added support for automatic Spell Points for Wizards with high Intelligence
    • -
    • High Constitution Regeneration now clarifies that it is per turn(s)
    • -
    • Fixed bonus spells from high Intuition. Willpower was incorrectly used
    • +
    • High Wisdom now autofill bonus Winds for Priests for the Arcs/Winds spell tracking system, based on the same popup as stated above. If the PO: S&P sub ability scores are used, base Wisdom is still used for determining bonus winds
    • +
    • Added support for automatic Spell Points for Wizards with high Intelligence. This is a toggle as the bonus is optional.
    • +
    • Added support for automatic Spell Points for Priests with high Wisdom. This is a toggle as only priests gets this bonus, and not Paladins and rangers. The Priest caster level is used to determine how many spell points should be given
    • +
    • Fixed bonus spells from high Intuition from PO: Skills & Powers. Willpower was incorrectly used
    • Styled Monster tab to have dynamically sized fields, and larger fields for Hit Dice, HP, and Max HP
    • 2Espell - Sensory signature and Knockdown switched places to make them appear in the same order as in the PO: Spells & Magic book
    • From 5d1ba361ed4b2b6f193e74eef5bbd4a094653644 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Fri, 17 Feb 2023 09:09:49 +0100 Subject: [PATCH 40/58] Updated change log --- ADnD_2E_Revised/2ESheet.html | 1 + ADnD_2E_Revised/html/changelog.html | 1 + 2 files changed, 2 insertions(+) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 6479f769bb..d1005e1e9a 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -22,6 +22,7 @@
    • Added support for automatic Spell Points for Wizards with high Intelligence. This is a toggle as the bonus is optional.
    • Added support for automatic Spell Points for Priests with high Wisdom. This is a toggle as only priests gets this bonus, and not Paladins and rangers. The Priest caster level is used to determine how many spell points should be given
    • Fixed bonus spells from high Intuition from PO: Skills & Powers. Willpower was incorrectly used
    • +
    • Regeneration from high Constitution now clarifies that it is per turn(s)
    • Styled Monster tab to have dynamically sized fields, and larger fields for Hit Dice, HP, and Max HP
    • 2Espell - Sensory signature and Knockdown switched places to make them appear in the same order as in the PO: Spells & Magic book
    • diff --git a/ADnD_2E_Revised/html/changelog.html b/ADnD_2E_Revised/html/changelog.html index 82b42a449d..6d995cbe09 100644 --- a/ADnD_2E_Revised/html/changelog.html +++ b/ADnD_2E_Revised/html/changelog.html @@ -17,6 +17,7 @@
    • Added support for automatic Spell Points for Wizards with high Intelligence. This is a toggle as the bonus is optional.
    • Added support for automatic Spell Points for Priests with high Wisdom. This is a toggle as only priests gets this bonus, and not Paladins and rangers. The Priest caster level is used to determine how many spell points should be given
    • Fixed bonus spells from high Intuition from PO: Skills & Powers. Willpower was incorrectly used
    • +
    • Regeneration from high Constitution now clarifies that it is per turn(s)
    • Styled Monster tab to have dynamically sized fields, and larger fields for Hit Dice, HP, and Max HP
    • 2Espell - Sensory signature and Knockdown switched places to make them appear in the same order as in the PO: Spells & Magic book
    • From 5dc88696bf328704c03676e2d60c9f4ee82b96ca Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Fri, 17 Feb 2023 13:40:09 +0100 Subject: [PATCH 41/58] Simplified the nonprof handling and removed the migration as it is so insignificant that it does not matter --- ADnD_2E_Revised/2ESheet.html | 81 +++++++++------------- ADnD_2E_Revised/javascript/sheetWorkers.js | 71 +++++++++---------- ADnD_2E_Revised/javascript/version.js | 10 --- 3 files changed, 62 insertions(+), 100 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index d1005e1e9a..01ac1de92b 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -68564,45 +68564,42 @@ const capitalizeFirst = function (s) { } const displaySize = function(size) { - if (typeof size !== 'string') + if (typeof size !== 'string' || size.length === 0) return ''; - size = size.toLowerCase(); - switch (size) { - case 't': - case 'tiny': return 'Tiny'; - case 's': - case 'small': return 'Small'; - case 'm': - case 'medium': return 'Medium'; - case 'l': - case 'large': return 'Large'; - case 'h': - case 'huge': return 'Huge'; - case 'g': - case 'gargantuan': return 'Gargantuan'; + let sizeLetter = size.charAt(0).toLowerCase(); + switch (sizeLetter) { + case 't': return 'Tiny'; + case 's': return 'Small'; + case 'm': return 'Medium'; + case 'l': return 'Large'; + case 'h': return 'Huge'; + case 'g': return 'Gargantuan'; default: return capitalizeFirst(size); } } const sizeToInt = function(size) { - size = displaySize(size); - switch (size) { - case 'Tiny': return 0; - case 'Small': return 1; - case 'Medium': return 2; - case 'Large': return 3; - case 'Huge': return 4; - case 'Gargantuan': return 5; + if (typeof size !== 'string' || size.length === 0) + return ''; + + let sizeLetter = size.charAt(0).toLowerCase(); + switch (sizeLetter) { + case 't': return 0; + case 's': return 1; + case 'm': return 2; + case 'l': return 3; + case 'h': return 4; + case 'g': return 5; } } const displayWeaponType = function (type) { - if (typeof type !== 'string') + if (typeof type !== 'string' || type.length === 0) return ''; - type = type.toLowerCase(); - switch (type) { + let typeLetter = type.toLowerCase(); + switch (typeLetter) { case 's': return 'Slashing'; case 'p': return 'Piercing'; case 'b': return 'Bludgeoning'; @@ -69978,19 +69975,14 @@ on('change:repeating_customrogue:crl remove:repeating_customrogue', function(){ //#endregion //#region Weapons tab logic and autofil -//Used in version.js -const updateNonprofPenalty = function () { - getAttrs(['nonprof-penalty'], function(values) { - let nonprof = Math.abs(parseInt(values['nonprof-penalty'])) * -1; - let famil = Math.floor(nonprof / 2) - setAttrs({ - ['nonprof-penalty']: nonprof, - ['famil-penalty']: famil - },{silent:true}); - }); -} on('change:nonprof-penalty', function (eventInfo){ - updateNonprofPenalty(); + let nonprofRaw = parseInt(eventInfo.newValue) || 0; + let nonprof = Math.abs(nonprofRaw) * -1; + let famil = Math.floor(nonprof / 2) + setAttrs({ + ['nonprof-penalty']: nonprof, + ['famil-penalty']: famil + },{silent:true}); }); on('change:thac0-base-calc', function(eventInfo) { @@ -70899,11 +70891,10 @@ function weaponPoCritTemplate(prefix, fields, nameFunc, baseDamageFunc, damageAd //#region Proficiencies //Weapon proficiency slots -const updateWeaponProfsRemaining = () => repeatingCalculateRemaining('weaponprofs', ['weapprofnum'], 'weapprof-slots-total-calc', 'weapprof-slots-remain'); on('change:repeating_weaponprofs:weapprofnum remove:repeating_weaponprofs change:weapprof-slots-total-calc', function(eventInfo) { if (doEarlyReturn(eventInfo, ['weapprofnum'])) return; - updateWeaponProfsRemaining(); + repeatingCalculateRemaining('weaponprofs', ['weapprofnum'], 'weapprof-slots-total-calc', 'weapprof-slots-remain'); }); //Weapon proficiency autofill on('change:repeating_weaponprofs:weapprofname', function(eventInfo) { @@ -71539,9 +71530,6 @@ on('sheet:opened', function(){ if (oldSheetVersion.isBelowMigrate(3, 3, 2)) migrate3_3_2(); - if (oldSheetVersion.isBelowMigrate(3, 4, 0)) - migrate3_4_0(); - if (oldSheetVersion.isBelowMigrate(4, 3, 0)) migrate4_3_0(); } @@ -71698,13 +71686,6 @@ function migrateOtherValuables() { } //#endregion -//#region version 3.4.0 -function migrate3_4_0() { - console.log('Migrating to v3.4.0'); - updateNonprofPenalty(); -} -//#endregion - //#region version 3.3.2 function migrate3_3_2() { console.log('Migrating to v3.3.2'); diff --git a/ADnD_2E_Revised/javascript/sheetWorkers.js b/ADnD_2E_Revised/javascript/sheetWorkers.js index 045112609e..efe9f5f9b2 100644 --- a/ADnD_2E_Revised/javascript/sheetWorkers.js +++ b/ADnD_2E_Revised/javascript/sheetWorkers.js @@ -67,45 +67,42 @@ const capitalizeFirst = function (s) { } const displaySize = function(size) { - if (typeof size !== 'string') + if (typeof size !== 'string' || size.length === 0) return ''; - size = size.toLowerCase(); - switch (size) { - case 't': - case 'tiny': return 'Tiny'; - case 's': - case 'small': return 'Small'; - case 'm': - case 'medium': return 'Medium'; - case 'l': - case 'large': return 'Large'; - case 'h': - case 'huge': return 'Huge'; - case 'g': - case 'gargantuan': return 'Gargantuan'; + let sizeLetter = size.charAt(0).toLowerCase(); + switch (sizeLetter) { + case 't': return 'Tiny'; + case 's': return 'Small'; + case 'm': return 'Medium'; + case 'l': return 'Large'; + case 'h': return 'Huge'; + case 'g': return 'Gargantuan'; default: return capitalizeFirst(size); } } const sizeToInt = function(size) { - size = displaySize(size); - switch (size) { - case 'Tiny': return 0; - case 'Small': return 1; - case 'Medium': return 2; - case 'Large': return 3; - case 'Huge': return 4; - case 'Gargantuan': return 5; + if (typeof size !== 'string' || size.length === 0) + return ''; + + let sizeLetter = size.charAt(0).toLowerCase(); + switch (sizeLetter) { + case 't': return 0; + case 's': return 1; + case 'm': return 2; + case 'l': return 3; + case 'h': return 4; + case 'g': return 5; } } const displayWeaponType = function (type) { - if (typeof type !== 'string') + if (typeof type !== 'string' || type.length === 0) return ''; - type = type.toLowerCase(); - switch (type) { + let typeLetter = type.toLowerCase(); + switch (typeLetter) { case 's': return 'Slashing'; case 'p': return 'Piercing'; case 'b': return 'Bludgeoning'; @@ -1481,19 +1478,14 @@ on('change:repeating_customrogue:crl remove:repeating_customrogue', function(){ //#endregion //#region Weapons tab logic and autofil -//Used in version.js -const updateNonprofPenalty = function () { - getAttrs(['nonprof-penalty'], function(values) { - let nonprof = Math.abs(parseInt(values['nonprof-penalty'])) * -1; - let famil = Math.floor(nonprof / 2) - setAttrs({ - ['nonprof-penalty']: nonprof, - ['famil-penalty']: famil - },{silent:true}); - }); -} on('change:nonprof-penalty', function (eventInfo){ - updateNonprofPenalty(); + let nonprofRaw = parseInt(eventInfo.newValue) || 0; + let nonprof = Math.abs(nonprofRaw) * -1; + let famil = Math.floor(nonprof / 2) + setAttrs({ + ['nonprof-penalty']: nonprof, + ['famil-penalty']: famil + },{silent:true}); }); on('change:thac0-base-calc', function(eventInfo) { @@ -2402,11 +2394,10 @@ function weaponPoCritTemplate(prefix, fields, nameFunc, baseDamageFunc, damageAd //#region Proficiencies //Weapon proficiency slots -const updateWeaponProfsRemaining = () => repeatingCalculateRemaining('weaponprofs', ['weapprofnum'], 'weapprof-slots-total-calc', 'weapprof-slots-remain'); on('change:repeating_weaponprofs:weapprofnum remove:repeating_weaponprofs change:weapprof-slots-total-calc', function(eventInfo) { if (doEarlyReturn(eventInfo, ['weapprofnum'])) return; - updateWeaponProfsRemaining(); + repeatingCalculateRemaining('weaponprofs', ['weapprofnum'], 'weapprof-slots-total-calc', 'weapprof-slots-remain'); }); //Weapon proficiency autofill on('change:repeating_weaponprofs:weapprofname', function(eventInfo) { diff --git a/ADnD_2E_Revised/javascript/version.js b/ADnD_2E_Revised/javascript/version.js index 0bb3294495..a6b93f691b 100644 --- a/ADnD_2E_Revised/javascript/version.js +++ b/ADnD_2E_Revised/javascript/version.js @@ -28,9 +28,6 @@ on('sheet:opened', function(){ if (oldSheetVersion.isBelowMigrate(3, 3, 2)) migrate3_3_2(); - if (oldSheetVersion.isBelowMigrate(3, 4, 0)) - migrate3_4_0(); - if (oldSheetVersion.isBelowMigrate(4, 3, 0)) migrate4_3_0(); } @@ -187,13 +184,6 @@ function migrateOtherValuables() { } //#endregion -//#region version 3.4.0 -function migrate3_4_0() { - console.log('Migrating to v3.4.0'); - updateNonprofPenalty(); -} -//#endregion - //#region version 3.3.2 function migrate3_3_2() { console.log('Migrating to v3.3.2'); From a49c28a7bdaff4046d2dfb2d685f3c48bed8309a Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Fri, 17 Feb 2023 14:01:02 +0100 Subject: [PATCH 42/58] capitalized some const in the javascript --- ADnD_2E_Revised/2ESheet.html | 36 ++++++++++++---------- ADnD_2E_Revised/javascript/sheetWorkers.js | 36 ++++++++++++---------- 2 files changed, 38 insertions(+), 34 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 01ac1de92b..6dd1b8830a 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -68924,7 +68924,7 @@ on('clicked:hide-toast', function(eventInfo) { //#region Ability Scores logic // Ability Score Parser function -const EXCEPTIONAL_STRENGHT_REGEX = /18[\[(]([0-9]{1,3})[\])]/; // Ie. 18[65], 18(65) +const EXCEPTIONAL_STRENGTH_REGEX = /18[\[(]([0-9]{1,3})[\])]/; // Ie. 18[65], 18(65) function getLookupValue(abilityScoreString, defaultValue, isStrength = false) { if (abilityScoreString === '') { return defaultValue; @@ -68936,7 +68936,7 @@ function getLookupValue(abilityScoreString, defaultValue, isStrength = false) { } if (isStrength) { - let exceptionalMatch = abilityScoreString.match(EXCEPTIONAL_STRENGHT_REGEX); + let exceptionalMatch = abilityScoreString.match(EXCEPTIONAL_STRENGTH_REGEX); if (exceptionalMatch !== null) { let exceptionalStrNumber = parseInt(exceptionalMatch[1]); if (1 <= exceptionalStrNumber && exceptionalStrNumber <= 50) { @@ -69473,9 +69473,9 @@ const PRIEST_SPHERES = [ 'Chaos','Law','Numbers','Thought','Time','Travelers','War','Wards' ]; -const primarySphereRegex = new RegExp(PRIEST_SPHERES.join('|'), 'gi'); -const noElementalRegex = new RegExp(PRIEST_SPHERES.filter(s => s !== ELEMENTAL).join('|'), 'gi'); -const elementalRegex = /Earth|Air|Fire|Water/gi +const PRIMARY_SPHERE_REGEX = new RegExp(PRIEST_SPHERES.join('|'), 'gi'); +const NO_ELEMENTAL_REGEX = new RegExp(PRIEST_SPHERES.filter(s => s !== ELEMENTAL).join('|'), 'gi'); +const ELEMENTAL_REGEX = /Earth|Air|Fire|Water/gi function parseSpheres(spheresStrings, regex) { let spheres = new Set(); @@ -69509,7 +69509,7 @@ function isSpellAvailable(spellName, spell, availableSpheres, elementalSpheres, let spheres = getSpellSpheres(spell, optionalSpheres); - let primarySpellSpheres = spheres.match(noElementalRegex) || []; + let primarySpellSpheres = spheres.match(NO_ELEMENTAL_REGEX) || []; let isAvailable = primarySpellSpheres.some(sphere => availableSpheres.has(sphere)); if (isAvailable) return true; @@ -69521,7 +69521,7 @@ function isSpellAvailable(spellName, spell, availableSpheres, elementalSpheres, return false; if (spheres.includes(`${ELEMENTAL} (`)) - return spheres.match(elementalRegex).some((element) => elementalSpheres.has(element)) + return spheres.match(ELEMENTAL_REGEX).some((element) => elementalSpheres.has(element)) // The player and the spell has the elemental sphere (without any sub elements) // Currently only 'Commune With Nature' in the revised Player's Handbook (1995) has this property @@ -69546,8 +69546,8 @@ function setupAddPriestSpell(postfix) { knownSpells.add(row.S[field]); return knownSpells; }, new Set(), function (knownSpells,_,attrSet){ - let primarySpheres = parseSpheres(sphereFields.map(aField => attrSet.S[aField]), primarySphereRegex); - let elementalSpheres = parseSpheres(sphereFields.map(aField => attrSet.S[aField]), elementalRegex); + let primarySpheres = parseSpheres(sphereFields.map(aField => attrSet.S[aField]), PRIMARY_SPHERE_REGEX); + let elementalSpheres = parseSpheres(sphereFields.map(aField => attrSet.S[aField]), ELEMENTAL_REGEX); if (primarySpheres.size < 1) { showToast(WARNING, 'No spheres found', `No valid spheres found. Please write or select some spheres`); @@ -70013,7 +70013,7 @@ async function selectVersion(foundObjects, values, comparer, objectName) { return; } - let isPlayersOption = values[PLAYERS_OPTION_FIELD] === '2'; + let isPlayersOption = values[WEAPONS_PLAYERS_OPTION_FIELD] === '2'; let isAllEqual = activeObjects.every(o => comparer(o, activeObjects[0], isPlayersOption)); if (isAllEqual) { await keepContextRoll(); @@ -70053,13 +70053,13 @@ function combineBooks(activeObjects, comparer, isPlayersOptions) { } //#region Weapons autofill -const PLAYERS_OPTION_FIELD = 'tab81'; +const WEAPONS_PLAYERS_OPTION_FIELD = 'tab81'; function setWeaponWithBonus(weaponName, setWeaponFunc, comparer, thac0Field, category) { if (!weaponName) return; weaponName = weaponName.toLowerCase(); - let fields = [...BOOK_FIELDS, PLAYERS_OPTION_FIELD, thac0Field].filter(Boolean); + let fields = [...BOOK_FIELDS, WEAPONS_PLAYERS_OPTION_FIELD, thac0Field].filter(Boolean); getAttrs(fields, async function (values) { let bonus = 0; let baseWeapons = WEAPONS_TABLE[weaponName] @@ -70247,7 +70247,7 @@ function setupFollowerWeaponsAutoFill(repeating, sections) { }); } -const followerWeapons = [ +const FOLLOWER_WEAPONS = [ {repeating: '', sections: ['', '001', '002']}, {repeating: 'hench', sections: ['003', '004', '005']}, {repeating: '', sections: ['006', '007', '008']}, @@ -70262,7 +70262,7 @@ const followerWeapons = [ {repeating: 'hench6', sections: ['033', '034', '035']}, ]; -followerWeapons.forEach(fw => { +FOLLOWER_WEAPONS.forEach(fw => { setupFollowerWeaponsAutoFill(fw.repeating, fw.sections); }); @@ -71221,12 +71221,14 @@ const setPsionicDisciplineVisibility = function(newValue) { elements.removeClass('sheet-show'); } } -on('change:tab8 sheet:opened', function (eventInfo) { + +const PSIONIC_SKILLS_AND_POWERS_FIELD = 'tab8'; +on(`change:${PSIONIC_SKILLS_AND_POWERS_FIELD} sheet:opened`, function (eventInfo) { if (eventInfo.newValue) return setPsionicDisciplineVisibility(eventInfo.newValue); - getAttrs(['tab8'], function (values) { - setPsionicDisciplineVisibility(values['tab8']); + getAttrs([PSIONIC_SKILLS_AND_POWERS_FIELD], function (values) { + setPsionicDisciplineVisibility(values[PSIONIC_SKILLS_AND_POWERS_FIELD]); }) }); diff --git a/ADnD_2E_Revised/javascript/sheetWorkers.js b/ADnD_2E_Revised/javascript/sheetWorkers.js index efe9f5f9b2..516812fda3 100644 --- a/ADnD_2E_Revised/javascript/sheetWorkers.js +++ b/ADnD_2E_Revised/javascript/sheetWorkers.js @@ -427,7 +427,7 @@ on('clicked:hide-toast', function(eventInfo) { //#region Ability Scores logic // Ability Score Parser function -const EXCEPTIONAL_STRENGHT_REGEX = /18[\[(]([0-9]{1,3})[\])]/; // Ie. 18[65], 18(65) +const EXCEPTIONAL_STRENGTH_REGEX = /18[\[(]([0-9]{1,3})[\])]/; // Ie. 18[65], 18(65) function getLookupValue(abilityScoreString, defaultValue, isStrength = false) { if (abilityScoreString === '') { return defaultValue; @@ -439,7 +439,7 @@ function getLookupValue(abilityScoreString, defaultValue, isStrength = false) { } if (isStrength) { - let exceptionalMatch = abilityScoreString.match(EXCEPTIONAL_STRENGHT_REGEX); + let exceptionalMatch = abilityScoreString.match(EXCEPTIONAL_STRENGTH_REGEX); if (exceptionalMatch !== null) { let exceptionalStrNumber = parseInt(exceptionalMatch[1]); if (1 <= exceptionalStrNumber && exceptionalStrNumber <= 50) { @@ -976,9 +976,9 @@ const PRIEST_SPHERES = [ 'Chaos','Law','Numbers','Thought','Time','Travelers','War','Wards' ]; -const primarySphereRegex = new RegExp(PRIEST_SPHERES.join('|'), 'gi'); -const noElementalRegex = new RegExp(PRIEST_SPHERES.filter(s => s !== ELEMENTAL).join('|'), 'gi'); -const elementalRegex = /Earth|Air|Fire|Water/gi +const PRIMARY_SPHERE_REGEX = new RegExp(PRIEST_SPHERES.join('|'), 'gi'); +const NO_ELEMENTAL_REGEX = new RegExp(PRIEST_SPHERES.filter(s => s !== ELEMENTAL).join('|'), 'gi'); +const ELEMENTAL_REGEX = /Earth|Air|Fire|Water/gi function parseSpheres(spheresStrings, regex) { let spheres = new Set(); @@ -1012,7 +1012,7 @@ function isSpellAvailable(spellName, spell, availableSpheres, elementalSpheres, let spheres = getSpellSpheres(spell, optionalSpheres); - let primarySpellSpheres = spheres.match(noElementalRegex) || []; + let primarySpellSpheres = spheres.match(NO_ELEMENTAL_REGEX) || []; let isAvailable = primarySpellSpheres.some(sphere => availableSpheres.has(sphere)); if (isAvailable) return true; @@ -1024,7 +1024,7 @@ function isSpellAvailable(spellName, spell, availableSpheres, elementalSpheres, return false; if (spheres.includes(`${ELEMENTAL} (`)) - return spheres.match(elementalRegex).some((element) => elementalSpheres.has(element)) + return spheres.match(ELEMENTAL_REGEX).some((element) => elementalSpheres.has(element)) // The player and the spell has the elemental sphere (without any sub elements) // Currently only 'Commune With Nature' in the revised Player's Handbook (1995) has this property @@ -1049,8 +1049,8 @@ function setupAddPriestSpell(postfix) { knownSpells.add(row.S[field]); return knownSpells; }, new Set(), function (knownSpells,_,attrSet){ - let primarySpheres = parseSpheres(sphereFields.map(aField => attrSet.S[aField]), primarySphereRegex); - let elementalSpheres = parseSpheres(sphereFields.map(aField => attrSet.S[aField]), elementalRegex); + let primarySpheres = parseSpheres(sphereFields.map(aField => attrSet.S[aField]), PRIMARY_SPHERE_REGEX); + let elementalSpheres = parseSpheres(sphereFields.map(aField => attrSet.S[aField]), ELEMENTAL_REGEX); if (primarySpheres.size < 1) { showToast(WARNING, 'No spheres found', `No valid spheres found. Please write or select some spheres`); @@ -1516,7 +1516,7 @@ async function selectVersion(foundObjects, values, comparer, objectName) { return; } - let isPlayersOption = values[PLAYERS_OPTION_FIELD] === '2'; + let isPlayersOption = values[WEAPONS_PLAYERS_OPTION_FIELD] === '2'; let isAllEqual = activeObjects.every(o => comparer(o, activeObjects[0], isPlayersOption)); if (isAllEqual) { await keepContextRoll(); @@ -1556,13 +1556,13 @@ function combineBooks(activeObjects, comparer, isPlayersOptions) { } //#region Weapons autofill -const PLAYERS_OPTION_FIELD = 'tab81'; +const WEAPONS_PLAYERS_OPTION_FIELD = 'tab81'; function setWeaponWithBonus(weaponName, setWeaponFunc, comparer, thac0Field, category) { if (!weaponName) return; weaponName = weaponName.toLowerCase(); - let fields = [...BOOK_FIELDS, PLAYERS_OPTION_FIELD, thac0Field].filter(Boolean); + let fields = [...BOOK_FIELDS, WEAPONS_PLAYERS_OPTION_FIELD, thac0Field].filter(Boolean); getAttrs(fields, async function (values) { let bonus = 0; let baseWeapons = WEAPONS_TABLE[weaponName] @@ -1750,7 +1750,7 @@ function setupFollowerWeaponsAutoFill(repeating, sections) { }); } -const followerWeapons = [ +const FOLLOWER_WEAPONS = [ {repeating: '', sections: ['', '001', '002']}, {repeating: 'hench', sections: ['003', '004', '005']}, {repeating: '', sections: ['006', '007', '008']}, @@ -1765,7 +1765,7 @@ const followerWeapons = [ {repeating: 'hench6', sections: ['033', '034', '035']}, ]; -followerWeapons.forEach(fw => { +FOLLOWER_WEAPONS.forEach(fw => { setupFollowerWeaponsAutoFill(fw.repeating, fw.sections); }); @@ -2724,12 +2724,14 @@ const setPsionicDisciplineVisibility = function(newValue) { elements.removeClass('sheet-show'); } } -on('change:tab8 sheet:opened', function (eventInfo) { + +const PSIONIC_SKILLS_AND_POWERS_FIELD = 'tab8'; +on(`change:${PSIONIC_SKILLS_AND_POWERS_FIELD} sheet:opened`, function (eventInfo) { if (eventInfo.newValue) return setPsionicDisciplineVisibility(eventInfo.newValue); - getAttrs(['tab8'], function (values) { - setPsionicDisciplineVisibility(values['tab8']); + getAttrs([PSIONIC_SKILLS_AND_POWERS_FIELD], function (values) { + setPsionicDisciplineVisibility(values[PSIONIC_SKILLS_AND_POWERS_FIELD]); }) }); From 5e148a092f0b080b463bd0a22c464e0af373b31f Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Fri, 17 Feb 2023 14:14:08 +0100 Subject: [PATCH 43/58] - Updated version - wrapped spell points in div to also hide the details when it is not active - set spell slots to be checked as default to make sure a system is shown on a fresh character sheet --- ADnD_2E_Revised/2ESheet.html | 104 +++++++++--------- ADnD_2E_Revised/html/2ESheet-base.html | 2 +- .../character-tab/spells-tab/priest-tab.html | 48 ++++---- .../character-tab/spells-tab/wizard-tab.html | 52 ++++----- ADnD_2E_Revised/javascript/version.js | 2 +- 5 files changed, 108 insertions(+), 100 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 6dd1b8830a..c52cf9ceb3 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -55,7 +55,7 @@
      - + @@ -3900,31 +3900,33 @@
      Level SpecialistIntelligenceIntelligence Total | Remaining |

      - - - - - - - - - - - - - - - - - - - - -
      LevelSpecialistIntelligenceTotal|Remaining
      Spell Points|
      -
      - Bonus spell points from high Intelligence to Wizards - Under this optional rule, wizard characters gain a number of bonus spell points, based on their Intelligence score. PO: Spells & Powers, p. 79 -
      +
      + + + + + + + + + + + + + + + + + + + + +
      LevelSpecialistIntelligenceTotal|Remaining
      Spell Points|
      +
      + Bonus spell points from high Intelligence to Wizards + Under this optional rule, wizard characters gain a number of bonus spell points, based on their Intelligence score. PO: Spells & Powers, p. 79 +
      +
      @@ -8736,29 +8738,31 @@
      -
      - - - - - - - - - - - - - - - - - -
      LevelWisdomTotal|Remaining
      Spell Points|
      -
      - Bonus spell points from high Wisdom to Priests - Priests with high Wisdom scores gain a special bonus spell points to reflect their piety and devotion. (This is a standard rule in this spell point system, unlike the optional bonus spell point rule for wizards with high Intelligence scores.) PO: Spells & Powers, p. 92 -
      +
      + + + + + + + + + + + + + + + + + + +
      LevelWisdomTotal|Remaining
      Spell Points|
      +
      + Bonus spell points from high Wisdom to Priests + Priests with high Wisdom scores gain a special bonus spell points to reflect their piety and devotion. (This is a standard rule in this spell point system, unlike the optional bonus spell point rule for wizards with high Intelligence scores.) PO: Spells & Powers, p. 92 +
      +
      @@ -71505,7 +71509,7 @@ on(BOOK_FIELDS.map(b => `change:${b}`).join(' '), function (eventInfo) { // --- Version change start --- // const SHEET_NAME = 'AD&D 2E Revised'; -const SHEET_VERSION = '4.14.2'; +const SHEET_VERSION = '4.15.0'; on('sheet:opened', function(){ getAttrs(['character_sheet'],function(attrs){ diff --git a/ADnD_2E_Revised/html/2ESheet-base.html b/ADnD_2E_Revised/html/2ESheet-base.html index 64d5b29397..c804ae9533 100644 --- a/ADnD_2E_Revised/html/2ESheet-base.html +++ b/ADnD_2E_Revised/html/2ESheet-base.html @@ -13,7 +13,7 @@ insert_changelog.html
      - + diff --git a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html index 2d26714ba8..26261accc8 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html @@ -42,29 +42,31 @@
      -
      - - - - - - - - - - - - - - - - - -
      LevelWisdomTotal|Remaining
      Spell Points|
      -
      - Bonus spell points from high Wisdom to Priests - Priests with high Wisdom scores gain a special bonus spell points to reflect their piety and devotion. (This is a standard rule in this spell point system, unlike the optional bonus spell point rule for wizards with high Intelligence scores.) PO: Spells & Powers, p. 92 -
      +
      + + + + + + + + + + + + + + + + + + +
      LevelWisdomTotal|Remaining
      Spell Points|
      +
      + Bonus spell points from high Wisdom to Priests + Priests with high Wisdom scores gain a special bonus spell points to reflect their piety and devotion. (This is a standard rule in this spell point system, unlike the optional bonus spell point rule for wizards with high Intelligence scores.) PO: Spells & Powers, p. 92 +
      +
      diff --git a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html index 685c6424cc..51711db3f8 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html @@ -29,31 +29,33 @@

      - - - - - - - - - - - - - - - - - - - - -
      LevelSpecialistIntelligenceTotal|Remaining
      Spell Points|
      -
      - Bonus spell points from high Intelligence to Wizards - Under this optional rule, wizard characters gain a number of bonus spell points, based on their Intelligence score. PO: Spells & Powers, p. 79 -
      +
      + + + + + + + + + + + + + + + + + + + + +
      LevelSpecialistIntelligenceTotal|Remaining
      Spell Points|
      +
      + Bonus spell points from high Intelligence to Wizards + Under this optional rule, wizard characters gain a number of bonus spell points, based on their Intelligence score. PO: Spells & Powers, p. 79 +
      +
      diff --git a/ADnD_2E_Revised/javascript/version.js b/ADnD_2E_Revised/javascript/version.js index a6b93f691b..d23f5e650e 100644 --- a/ADnD_2E_Revised/javascript/version.js +++ b/ADnD_2E_Revised/javascript/version.js @@ -1,7 +1,7 @@ // --- Version change start --- // const SHEET_NAME = 'AD&D 2E Revised'; -const SHEET_VERSION = '4.14.2'; +const SHEET_VERSION = '4.15.0'; on('sheet:opened', function(){ getAttrs(['character_sheet'],function(attrs){ From 6b78fdc25cfab15932b6da2246a0f14b8fde293b Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Fri, 17 Feb 2023 19:45:40 +0100 Subject: [PATCH 44/58] change log --- ADnD_2E_Revised/2ESheet.html | 2 +- ADnD_2E_Revised/html/changelog.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index c52cf9ceb3..84114d3da8 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -15,7 +15,7 @@
    • Removed the "Roll Spell Effect" button as it caused more confusion than it helped
    • -
    • Added Spell tracking selection to the Sheet Settings Tab. Choices are: Spell slots, spell points, Arcs / Winds
    • +
    • Added Spell tracking selection to the Sheet Settings Tab. Choices are: Spell Slots, Spell Points, Arcs / Winds
    • Redesigned the Spells tab to only show the spell tracking system that selected on the Sheet Settings Tab
    • High Wisdom now triggers a popup asking if you are a priest. Bonus spells are only added if you are a priest
    • High Wisdom now autofill bonus Winds for Priests for the Arcs/Winds spell tracking system, based on the same popup as stated above. If the PO: S&P sub ability scores are used, base Wisdom is still used for determining bonus winds
    • diff --git a/ADnD_2E_Revised/html/changelog.html b/ADnD_2E_Revised/html/changelog.html index 6d995cbe09..3b5c227249 100644 --- a/ADnD_2E_Revised/html/changelog.html +++ b/ADnD_2E_Revised/html/changelog.html @@ -10,7 +10,7 @@
    • Removed the "Roll Spell Effect" button as it caused more confusion than it helped
    • -
    • Added Spell tracking selection to the Sheet Settings Tab. Choices are: Spell slots, spell points, Arcs / Winds
    • +
    • Added Spell tracking selection to the Sheet Settings Tab. Choices are: Spell Slots, Spell Points, Arcs / Winds
    • Redesigned the Spells tab to only show the spell tracking system that selected on the Sheet Settings Tab
    • High Wisdom now triggers a popup asking if you are a priest. Bonus spells are only added if you are a priest
    • High Wisdom now autofill bonus Winds for Priests for the Arcs/Winds spell tracking system, based on the same popup as stated above. If the PO: S&P sub ability scores are used, base Wisdom is still used for determining bonus winds
    • From ecf381d05f4ce0f24cb9d10f417b1bcd9127066c Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Fri, 17 Feb 2023 20:28:17 +0100 Subject: [PATCH 45/58] Added spell tracking system selection to sheet.json --- ADnD_2E_Revised/2ESheet.html | 8 ++++---- ADnD_2E_Revised/html/tabs/sheet-settings-tab.html | 8 ++++---- ADnD_2E_Revised/sheet.json | 14 +++++++++++++- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 84114d3da8..12abd62ee8 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -21360,11 +21360,11 @@

      Spell tracking system

      AD&D 2E have different systems for tracking spells, three have been implemented:
        -
      • Spell slots: The default system described in the Player's Handbook
      • -
      • Spell Points: Introduced in the Player's Option: Spells & Magic book
      • +
      • Spell Slots: The default system described in the Player's Handbook
      • +
      • Spell Points: Introduced in Player's Option: Spells & Magic
      • Arcs, Songs, Winds: Introduced in Forgotten Realms, Netheril: Empire of Magic
      - +

      -

      Miscellaneous modifier popup

      +

      Miscellaneous modifier popup on rolls

      By default all rolls creates a popup asking for a 'Miscellaneous modifier' to capture when the DM says: 'Make an X-roll with +2'. If your DM rarely asks for this, if you find the popup annoying, or if you would rather add any bonuses after the roll is made, this popup can be turned off

      diff --git a/ADnD_2E_Revised/html/tabs/sheet-settings-tab.html b/ADnD_2E_Revised/html/tabs/sheet-settings-tab.html index 6ed6642a04..ce800762e7 100644 --- a/ADnD_2E_Revised/html/tabs/sheet-settings-tab.html +++ b/ADnD_2E_Revised/html/tabs/sheet-settings-tab.html @@ -178,11 +178,11 @@

      Spell tracking system

      AD&D 2E have different systems for tracking spells, three have been implemented:
        -
      • Spell slots: The default system described in the Player's Handbook
      • -
      • Spell Points: Introduced in the Player's Option: Spells & Magic book
      • +
      • Spell Slots: The default system described in the Player's Handbook
      • +
      • Spell Points: Introduced in Player's Option: Spells & Magic
      • Arcs, Songs, Winds: Introduced in Forgotten Realms, Netheril: Empire of Magic
      - +

      -

      Miscellaneous modifier popup

      +

      Miscellaneous modifier popup on rolls

      By default all rolls creates a popup asking for a 'Miscellaneous modifier' to capture when the DM says: 'Make an X-roll with +2'. If your DM rarely asks for this, if you find the popup annoying, or if you would rather add any bonuses after the roll is made, this popup can be turned off

      diff --git a/ADnD_2E_Revised/sheet.json b/ADnD_2E_Revised/sheet.json index 85675addc2..1e842e273e 100644 --- a/ADnD_2E_Revised/sheet.json +++ b/ADnD_2E_Revised/sheet.json @@ -216,9 +216,21 @@ { "displayname": " " }, + { + "attribute": "spell-tracking-system", + "displayname": "System for Spell Tracking", + "type": "select", + "options": [ + "Spell Slots|spell-slots", + "Spell Points|spell-points", + "Arcs, Songs, Winds|spell-arcs-winds" + ], + "default": "spell-slots", + "description": "AD&D 2E have different systems for tracking spells, three have been implemented: Spell Slots: The default system described in the Player's Handbook. Spell Points: Introduced in Player's Option: Spells & Magic. Arcs, Songs, Winds: Introduced in Forgotten Realms, Netheril: Empire of Magic" + }, { "attribute": "misc-mod", - "displayname": "Miscellaneous modifier on Rolls", + "displayname": "Miscellaneous modifier popup on rolls", "type": "select", "options": [ "Popup on rolls|?{Misc. modifier?|0}", From 00e79e3841104117c14905fe45a711d56dd480c5 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Sat, 18 Feb 2023 13:35:55 +0100 Subject: [PATCH 46/58] Uses value from sheet.json to determine default spell tracking system --- ADnD_2E_Revised/2ESheet.html | 2 +- ADnD_2E_Revised/html/2ESheet-base.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 12abd62ee8..0ceea518b5 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -55,7 +55,7 @@
      - + diff --git a/ADnD_2E_Revised/html/2ESheet-base.html b/ADnD_2E_Revised/html/2ESheet-base.html index c804ae9533..64d5b29397 100644 --- a/ADnD_2E_Revised/html/2ESheet-base.html +++ b/ADnD_2E_Revised/html/2ESheet-base.html @@ -13,7 +13,7 @@ insert_changelog.html
      - + From 72f110dce7108cada0068113b999e056ee35984b Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Sat, 18 Feb 2023 15:15:43 +0100 Subject: [PATCH 47/58] final clean up --- ADnD_2E_Revised/2ESheet.html | 18 ++++-- ADnD_2E_Revised/html/changelog.html | 2 +- .../character-tab/spells-tab/priest-tab.html | 2 +- .../character-tab/spells-tab/wizard-tab.html | 2 +- ADnD_2E_Revised/javascript/sheetWorkers.js | 64 ++++++++++--------- 5 files changed, 48 insertions(+), 40 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 0ceea518b5..86de042163 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -20,7 +20,7 @@
    • High Wisdom now triggers a popup asking if you are a priest. Bonus spells are only added if you are a priest
    • High Wisdom now autofill bonus Winds for Priests for the Arcs/Winds spell tracking system, based on the same popup as stated above. If the PO: S&P sub ability scores are used, base Wisdom is still used for determining bonus winds
    • Added support for automatic Spell Points for Wizards with high Intelligence. This is a toggle as the bonus is optional.
    • -
    • Added support for automatic Spell Points for Priests with high Wisdom. This is a toggle as only priests gets this bonus, and not Paladins and rangers. The Priest caster level is used to determine how many spell points should be given
    • +
    • Added support for automatic Spell Points for Priests with high Wisdom. This is a toggle as only priests gets this bonus, and not Paladins and Rangers. The Priest caster level is used to determine how many spell points should be given
    • Fixed bonus spells from high Intuition from PO: Skills & Powers. Willpower was incorrectly used
    • Regeneration from high Constitution now clarifies that it is per turn(s)
    • Styled Monster tab to have dynamically sized fields, and larger fields for Hit Dice, HP, and Max HP
    • @@ -3924,7 +3924,7 @@
      Bonus spell points from high Intelligence to Wizards - Under this optional rule, wizard characters gain a number of bonus spell points, based on their Intelligence score. PO: Spells & Powers, p. 79 + Under this optional rule, wizard characters gain a number of bonus spell points, based on their Intelligence score. Player's Options: Spells & Powers, p. 79
    @@ -8760,7 +8760,7 @@
    Bonus spell points from high Wisdom to Priests - Priests with high Wisdom scores gain a special bonus spell points to reflect their piety and devotion. (This is a standard rule in this spell point system, unlike the optional bonus spell point rule for wizards with high Intelligence scores.) PO: Spells & Powers, p. 92 + Priests with high Wisdom scores gain a special bonus spell points to reflect their piety and devotion. (This is a standard rule in this spell point system, unlike the optional bonus spell point rule for wizards with high Intelligence scores.) Player's Option: Spells & Powers, p. 92
    @@ -69157,7 +69157,6 @@ on('change:intelligence change:reason change:knowledge', function() { intimm5th: intelligenceTable['intimm5th'][reason], intimm6th: intelligenceTable['intimm6th'][reason], intimm7th: intelligenceTable['intimm7th'][reason], - // ['spell-points-int']: intelligenceTable['spell-points-int'][intelligence], intnotes: intnotes, int2notes: int2notes, }); @@ -69726,8 +69725,7 @@ function setupAutoFillSpellInfo(section, spellsTable, optionalRulesFields) { spellInfo[`repeating_spells-${section}_spell-sphere`] = getSpellSpheres(spell, sphereRules); } if (!books[levelField].trim()) { - let classLevel = capitalizeFirst(levelField.replace('level-', '')); - let toast = getToastObject(INFO, `Set ${classLevel} caster level`, 'Almost every spell requires a caster level to calculate its effect. Without it most spells will fail and show and error in the chat'); + let toast = getToastObject(INFO, `Set ${className} caster level`, 'Almost every spell requires a caster level to calculate its effect. Without it most spells will fail and show and error in the chat'); Object.assign(spellInfo, toast); } @@ -69863,7 +69861,13 @@ on('change:spell-points-priest-wis-enabled change:wisdom change:level-priest', f newValue[PRIEST_SPELL_POINTS_WIS] = 8; return setAttrs(newValue); } - let level = await extractRollResult(values['level-priest']); + + let level = 1; + if (values['level-priest'] === '') { + return showToast(INFO, 'Set Priest caster level', 'The Priest\'s level is needed to calculate the bonus Spell Points from high Wisdom.'); + } else { + level = await extractRollResult(values['level-priest']); + } if (isNaN(level) || level < 0) { level = 1; } diff --git a/ADnD_2E_Revised/html/changelog.html b/ADnD_2E_Revised/html/changelog.html index 3b5c227249..06459d00d1 100644 --- a/ADnD_2E_Revised/html/changelog.html +++ b/ADnD_2E_Revised/html/changelog.html @@ -15,7 +15,7 @@
  • High Wisdom now triggers a popup asking if you are a priest. Bonus spells are only added if you are a priest
  • High Wisdom now autofill bonus Winds for Priests for the Arcs/Winds spell tracking system, based on the same popup as stated above. If the PO: S&P sub ability scores are used, base Wisdom is still used for determining bonus winds
  • Added support for automatic Spell Points for Wizards with high Intelligence. This is a toggle as the bonus is optional.
  • -
  • Added support for automatic Spell Points for Priests with high Wisdom. This is a toggle as only priests gets this bonus, and not Paladins and rangers. The Priest caster level is used to determine how many spell points should be given
  • +
  • Added support for automatic Spell Points for Priests with high Wisdom. This is a toggle as only priests gets this bonus, and not Paladins and Rangers. The Priest caster level is used to determine how many spell points should be given
  • Fixed bonus spells from high Intuition from PO: Skills & Powers. Willpower was incorrectly used
  • Regeneration from high Constitution now clarifies that it is per turn(s)
  • Styled Monster tab to have dynamically sized fields, and larger fields for Hit Dice, HP, and Max HP
  • diff --git a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html index 26261accc8..2c7264c83f 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/priest-tab.html @@ -64,7 +64,7 @@
    Bonus spell points from high Wisdom to Priests - Priests with high Wisdom scores gain a special bonus spell points to reflect their piety and devotion. (This is a standard rule in this spell point system, unlike the optional bonus spell point rule for wizards with high Intelligence scores.) PO: Spells & Powers, p. 92 + Priests with high Wisdom scores gain a special bonus spell points to reflect their piety and devotion. (This is a standard rule in this spell point system, unlike the optional bonus spell point rule for wizards with high Intelligence scores.) Player's Option: Spells & Powers, p. 92
    diff --git a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html index 51711db3f8..7536864cd3 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/spells-tab/wizard-tab.html @@ -53,7 +53,7 @@
    Bonus spell points from high Intelligence to Wizards - Under this optional rule, wizard characters gain a number of bonus spell points, based on their Intelligence score. PO: Spells & Powers, p. 79 + Under this optional rule, wizard characters gain a number of bonus spell points, based on their Intelligence score. Player's Options: Spells & Powers, p. 79
    diff --git a/ADnD_2E_Revised/javascript/sheetWorkers.js b/ADnD_2E_Revised/javascript/sheetWorkers.js index 516812fda3..1c0defcf0b 100644 --- a/ADnD_2E_Revised/javascript/sheetWorkers.js +++ b/ADnD_2E_Revised/javascript/sheetWorkers.js @@ -656,7 +656,6 @@ on('change:intelligence change:reason change:knowledge', function() { intimm5th: intelligenceTable['intimm5th'][reason], intimm6th: intelligenceTable['intimm6th'][reason], intimm7th: intelligenceTable['intimm7th'][reason], - // ['spell-points-int']: intelligenceTable['spell-points-int'][intelligence], intnotes: intnotes, int2notes: int2notes, }); @@ -1225,8 +1224,7 @@ function setupAutoFillSpellInfo(section, spellsTable, optionalRulesFields) { spellInfo[`repeating_spells-${section}_spell-sphere`] = getSpellSpheres(spell, sphereRules); } if (!books[levelField].trim()) { - let classLevel = capitalizeFirst(levelField.replace('level-', '')); - let toast = getToastObject(INFO, `Set ${classLevel} caster level`, 'Almost every spell requires a caster level to calculate its effect. Without it most spells will fail and show and error in the chat'); + let toast = getToastObject(INFO, `Set ${className} caster level`, 'Almost every spell requires a caster level to calculate its effect. Without it most spells will fail and show and error in the chat'); Object.assign(spellInfo, toast); } @@ -1235,7 +1233,7 @@ function setupAutoFillSpellInfo(section, spellsTable, optionalRulesFields) { }); } -let wizardSpellLevelsSections = [ +const WIZARD_SPELL_LEVELS_SECTIONS = [ {level: '1', sections: ['', '2', '3', 'wiz1']}, {level: '2', sections: ['4', '5', '6', 'wiz2']}, {level: '3', sections: ['7', '8', '9', 'wiz3']}, @@ -1253,7 +1251,7 @@ let wizardSpellLevelsSections = [ {level: '15', sections: ['64', '65', '66', 'wiz15']}, ]; -let priestSpellLevelsSections = [ +const PRIEST_SPELL_LEVELS_SECTIONS = [ {level: '1', sections: ['28', '29', '30', 'pri1']}, {level: '2', sections: ['31', '32', '33', 'pri2']}, {level: '3', sections: ['34', '35', '36', 'pri3']}, @@ -1271,7 +1269,7 @@ const displaySpellLevel = function(level, className) { } // --- Start setup Spell Slots --- // -wizardSpellLevelsSections.forEach(spellLevel => { +WIZARD_SPELL_LEVELS_SECTIONS.forEach(spellLevel => { let prefix = `spell-level${spellLevel.level}`; setupStaticCalculateTotal(`${prefix}-total`, [`${prefix}-castable`, `${prefix}-specialist`, `${prefix}-misc`]); setupRepeatingSpellSumming(spellLevel.sections, 'cast-value', 'spell-cast-value', `${prefix}-cast-value-sum`); @@ -1289,7 +1287,7 @@ wizardSpellLevelsSections.forEach(spellLevel => { setupAutoFillSpellInfo('wizmonster', wizardSpells, SCHOOL_FIELDS); setupSpellCrit('wizmonster'); -priestSpellLevelsSections.forEach(spellLevel => { +PRIEST_SPELL_LEVELS_SECTIONS.forEach(spellLevel => { let prefix = `spell-priest-level${spellLevel.level}`; setupStaticCalculateTotal(`${prefix}-total`, [`${prefix}-castable`, `${prefix}-wisdom`, `${prefix}-misc`]); setupRepeatingSpellSumming(spellLevel.sections, 'cast-value', 'spell-cast-value', `${prefix}-cast-value-sum`); @@ -1312,14 +1310,14 @@ setupSpellCrit('primonster'); // --- End setup Spell Slots --- // // --- Start setup Spell Points, Arc, and Wind --- // -let wizardSpellPoints = 'spell-points'; -let arc = 'total-arc'; -let allWizardSpellSections = wizardSpellLevelsSections.flatMap(sl => sl.sections); -setupStaticCalculateTotal(`${wizardSpellPoints}-total`, [`${wizardSpellPoints}-lvl`, `${wizardSpellPoints}-spc`, `${wizardSpellPoints}-int`]); -setupRepeatingSpellSumming(allWizardSpellSections, wizardSpellPoints, 'spell-points', `${wizardSpellPoints}-sum`, true); -setupRepeatingSpellSumming(allWizardSpellSections, 'arc', 'spell-arc', `${arc}-sum`, true); -setupCalculateRemaining(`${wizardSpellPoints}-total`, `${wizardSpellPoints}-sum`, `${wizardSpellPoints}-remaining`); -setupCalculateRemaining(arc, `${arc}-sum`, `${arc}-remaining`); +const WIZARD_SPELL_POINTS = 'spell-points'; +const TOTAL_ARC = 'total-arc'; +const ALL_WIZARD_SPELL_SECTIONS = WIZARD_SPELL_LEVELS_SECTIONS.flatMap(sl => sl.sections); +setupStaticCalculateTotal(`${WIZARD_SPELL_POINTS}-total`, [`${WIZARD_SPELL_POINTS}-lvl`, `${WIZARD_SPELL_POINTS}-spc`, `${WIZARD_SPELL_POINTS}-int`]); +setupRepeatingSpellSumming(ALL_WIZARD_SPELL_SECTIONS, WIZARD_SPELL_POINTS, 'spell-points', `${WIZARD_SPELL_POINTS}-sum`, true); +setupRepeatingSpellSumming(ALL_WIZARD_SPELL_SECTIONS, 'arc', 'spell-arc', `${TOTAL_ARC}-sum`, true); +setupCalculateRemaining(`${WIZARD_SPELL_POINTS}-total`, `${WIZARD_SPELL_POINTS}-sum`, `${WIZARD_SPELL_POINTS}-remaining`); +setupCalculateRemaining(TOTAL_ARC, `${TOTAL_ARC}-sum`, `${TOTAL_ARC}-remaining`); on('change:spell-points-int-enabled change:intelligence', function (eventInfo) { getAttrs(['spell-points-int-enabled', 'intelligence'], function (values) { let newValue = {'spell-points-int': 0} @@ -1332,15 +1330,15 @@ on('change:spell-points-int-enabled change:intelligence', function (eventInfo) { }); }); -let priestSpellPoints = 'spell-points-priest'; -let wind = 'total-wind'; -let allPriestSpellSections = priestSpellLevelsSections.flatMap(sl => sl.sections); -setupStaticCalculateTotal(`${priestSpellPoints}-total`, [`${priestSpellPoints}-lvl`, `${priestSpellPoints}-wis`]); -setupStaticCalculateTotal(wind, ['level-wind', 'wisdom-wind']); -setupRepeatingSpellSumming(allPriestSpellSections, priestSpellPoints, 'spell-points', `${priestSpellPoints}-sum`, true); -setupRepeatingSpellSumming(allPriestSpellSections, 'wind', 'spell-wind', `${wind}-sum`, true); -setupCalculateRemaining(`${priestSpellPoints}-total`, `${priestSpellPoints}-sum`, `${priestSpellPoints}-remaining`); -setupCalculateRemaining(wind, `${wind}-sum`, `${wind}-remaining`); +const PRIEST_SPELL_POINTS = 'spell-points-priest'; +const TOTAL_WIND = 'total-wind'; +const ALL_PRIEST_SPELL_SECTIONS = PRIEST_SPELL_LEVELS_SECTIONS.flatMap(sl => sl.sections); +setupStaticCalculateTotal(`${PRIEST_SPELL_POINTS}-total`, [`${PRIEST_SPELL_POINTS}-lvl`, `${PRIEST_SPELL_POINTS}-wis`]); +setupStaticCalculateTotal(TOTAL_WIND, ['level-wind', 'wisdom-wind']); +setupRepeatingSpellSumming(ALL_PRIEST_SPELL_SECTIONS, PRIEST_SPELL_POINTS, 'spell-points', `${PRIEST_SPELL_POINTS}-sum`, true); +setupRepeatingSpellSumming(ALL_PRIEST_SPELL_SECTIONS, 'wind', 'spell-wind', `${TOTAL_WIND}-sum`, true); +setupCalculateRemaining(`${PRIEST_SPELL_POINTS}-total`, `${PRIEST_SPELL_POINTS}-sum`, `${PRIEST_SPELL_POINTS}-remaining`); +setupCalculateRemaining(TOTAL_WIND, `${TOTAL_WIND}-sum`, `${TOTAL_WIND}-remaining`); let PRIEST_SPELL_POINTS_WIS = 'spell-points-priest-wis'; on('change:spell-points-priest-wis-enabled change:wisdom change:level-priest', function (eventInfo) { getAttrs(['spell-points-priest-wis-enabled', 'wisdom', 'level-priest'], async function (values) { @@ -1362,7 +1360,13 @@ on('change:spell-points-priest-wis-enabled change:wisdom change:level-priest', f newValue[PRIEST_SPELL_POINTS_WIS] = 8; return setAttrs(newValue); } - let level = await extractRollResult(values['level-priest']); + + let level = 1; + if (values['level-priest'] === '') { + return showToast(INFO, 'Set Priest caster level', 'The Priest\'s level is needed to calculate the bonus Spell Points from high Wisdom.'); + } else { + level = await extractRollResult(values['level-priest']); + } if (isNaN(level) || level < 0) { level = 1; } @@ -1410,9 +1414,9 @@ on('change:spell-points-priest-wis-enabled change:wisdom change:level-priest', f // --- Start setup reset buttons --- // //tab6 = wizard levels //tab7 = priest levels -setupSpellSlotsReset('reset-spent-slots-wiz', 'tab6', wizardSpellLevelsSections, allWizardSpellSections); -let allPriestSectionsExceptQuest = priestSpellLevelsSections.slice(0, -1).flatMap(sl => sl.sections); -setupSpellSlotsReset('reset-spent-slots-pri', 'tab7', priestSpellLevelsSections, allPriestSectionsExceptQuest); +setupSpellSlotsReset('reset-spent-slots-wiz', 'tab6', WIZARD_SPELL_LEVELS_SECTIONS, ALL_WIZARD_SPELL_SECTIONS); +let allPriestSectionsExceptQuest = PRIEST_SPELL_LEVELS_SECTIONS.slice(0, -1).flatMap(sl => sl.sections); +setupSpellSlotsReset('reset-spent-slots-pri', 'tab7', PRIEST_SPELL_LEVELS_SECTIONS, allPriestSectionsExceptQuest); // --- End setup reset buttons --- // // --- Start setup Granted Powers --- // @@ -2970,9 +2974,9 @@ PSIONIC_CORE_SECTIONS.forEach(({section, name, macro, number, cost_number, disci // Show / Hide buttons for various repeating sections const FOLDABLE_REPEATING_SECTIONS = [ - ...wizardSpellLevelsSections.map(e => e.sections[e.sections.length-1]).map(e => `spells-${e}`), + ...WIZARD_SPELL_LEVELS_SECTIONS.map(e => e.sections[e.sections.length-1]).map(e => `spells-${e}`), 'spells-wizmonster', - ...priestSpellLevelsSections.map(e => e.sections[e.sections.length-1]).map(e => `spells-${e}`), + ...PRIEST_SPELL_LEVELS_SECTIONS.map(e => e.sections[e.sections.length-1]).map(e => `spells-${e}`), 'spells-primonster', ...PSIONIC_CORE_SECTIONS.map(e => e.section), 'scrolls', From fcb65b26c3c832630ed833c4b8f8e841013cef64 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Sat, 18 Feb 2023 15:16:05 +0100 Subject: [PATCH 48/58] final clean up --- ADnD_2E_Revised/2ESheet.html | 52 ++++++++++++++++++------------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 86de042163..1c9461e7a2 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -69734,7 +69734,7 @@ function setupAutoFillSpellInfo(section, spellsTable, optionalRulesFields) { }); } -let wizardSpellLevelsSections = [ +const WIZARD_SPELL_LEVELS_SECTIONS = [ {level: '1', sections: ['', '2', '3', 'wiz1']}, {level: '2', sections: ['4', '5', '6', 'wiz2']}, {level: '3', sections: ['7', '8', '9', 'wiz3']}, @@ -69752,7 +69752,7 @@ let wizardSpellLevelsSections = [ {level: '15', sections: ['64', '65', '66', 'wiz15']}, ]; -let priestSpellLevelsSections = [ +const PRIEST_SPELL_LEVELS_SECTIONS = [ {level: '1', sections: ['28', '29', '30', 'pri1']}, {level: '2', sections: ['31', '32', '33', 'pri2']}, {level: '3', sections: ['34', '35', '36', 'pri3']}, @@ -69770,7 +69770,7 @@ const displaySpellLevel = function(level, className) { } // --- Start setup Spell Slots --- // -wizardSpellLevelsSections.forEach(spellLevel => { +WIZARD_SPELL_LEVELS_SECTIONS.forEach(spellLevel => { let prefix = `spell-level${spellLevel.level}`; setupStaticCalculateTotal(`${prefix}-total`, [`${prefix}-castable`, `${prefix}-specialist`, `${prefix}-misc`]); setupRepeatingSpellSumming(spellLevel.sections, 'cast-value', 'spell-cast-value', `${prefix}-cast-value-sum`); @@ -69788,7 +69788,7 @@ wizardSpellLevelsSections.forEach(spellLevel => { setupAutoFillSpellInfo('wizmonster', wizardSpells, SCHOOL_FIELDS); setupSpellCrit('wizmonster'); -priestSpellLevelsSections.forEach(spellLevel => { +PRIEST_SPELL_LEVELS_SECTIONS.forEach(spellLevel => { let prefix = `spell-priest-level${spellLevel.level}`; setupStaticCalculateTotal(`${prefix}-total`, [`${prefix}-castable`, `${prefix}-wisdom`, `${prefix}-misc`]); setupRepeatingSpellSumming(spellLevel.sections, 'cast-value', 'spell-cast-value', `${prefix}-cast-value-sum`); @@ -69811,14 +69811,14 @@ setupSpellCrit('primonster'); // --- End setup Spell Slots --- // // --- Start setup Spell Points, Arc, and Wind --- // -let wizardSpellPoints = 'spell-points'; -let arc = 'total-arc'; -let allWizardSpellSections = wizardSpellLevelsSections.flatMap(sl => sl.sections); -setupStaticCalculateTotal(`${wizardSpellPoints}-total`, [`${wizardSpellPoints}-lvl`, `${wizardSpellPoints}-spc`, `${wizardSpellPoints}-int`]); -setupRepeatingSpellSumming(allWizardSpellSections, wizardSpellPoints, 'spell-points', `${wizardSpellPoints}-sum`, true); -setupRepeatingSpellSumming(allWizardSpellSections, 'arc', 'spell-arc', `${arc}-sum`, true); -setupCalculateRemaining(`${wizardSpellPoints}-total`, `${wizardSpellPoints}-sum`, `${wizardSpellPoints}-remaining`); -setupCalculateRemaining(arc, `${arc}-sum`, `${arc}-remaining`); +const WIZARD_SPELL_POINTS = 'spell-points'; +const TOTAL_ARC = 'total-arc'; +const ALL_WIZARD_SPELL_SECTIONS = WIZARD_SPELL_LEVELS_SECTIONS.flatMap(sl => sl.sections); +setupStaticCalculateTotal(`${WIZARD_SPELL_POINTS}-total`, [`${WIZARD_SPELL_POINTS}-lvl`, `${WIZARD_SPELL_POINTS}-spc`, `${WIZARD_SPELL_POINTS}-int`]); +setupRepeatingSpellSumming(ALL_WIZARD_SPELL_SECTIONS, WIZARD_SPELL_POINTS, 'spell-points', `${WIZARD_SPELL_POINTS}-sum`, true); +setupRepeatingSpellSumming(ALL_WIZARD_SPELL_SECTIONS, 'arc', 'spell-arc', `${TOTAL_ARC}-sum`, true); +setupCalculateRemaining(`${WIZARD_SPELL_POINTS}-total`, `${WIZARD_SPELL_POINTS}-sum`, `${WIZARD_SPELL_POINTS}-remaining`); +setupCalculateRemaining(TOTAL_ARC, `${TOTAL_ARC}-sum`, `${TOTAL_ARC}-remaining`); on('change:spell-points-int-enabled change:intelligence', function (eventInfo) { getAttrs(['spell-points-int-enabled', 'intelligence'], function (values) { let newValue = {'spell-points-int': 0} @@ -69831,15 +69831,15 @@ on('change:spell-points-int-enabled change:intelligence', function (eventInfo) { }); }); -let priestSpellPoints = 'spell-points-priest'; -let wind = 'total-wind'; -let allPriestSpellSections = priestSpellLevelsSections.flatMap(sl => sl.sections); -setupStaticCalculateTotal(`${priestSpellPoints}-total`, [`${priestSpellPoints}-lvl`, `${priestSpellPoints}-wis`]); -setupStaticCalculateTotal(wind, ['level-wind', 'wisdom-wind']); -setupRepeatingSpellSumming(allPriestSpellSections, priestSpellPoints, 'spell-points', `${priestSpellPoints}-sum`, true); -setupRepeatingSpellSumming(allPriestSpellSections, 'wind', 'spell-wind', `${wind}-sum`, true); -setupCalculateRemaining(`${priestSpellPoints}-total`, `${priestSpellPoints}-sum`, `${priestSpellPoints}-remaining`); -setupCalculateRemaining(wind, `${wind}-sum`, `${wind}-remaining`); +const PRIEST_SPELL_POINTS = 'spell-points-priest'; +const TOTAL_WIND = 'total-wind'; +const ALL_PRIEST_SPELL_SECTIONS = PRIEST_SPELL_LEVELS_SECTIONS.flatMap(sl => sl.sections); +setupStaticCalculateTotal(`${PRIEST_SPELL_POINTS}-total`, [`${PRIEST_SPELL_POINTS}-lvl`, `${PRIEST_SPELL_POINTS}-wis`]); +setupStaticCalculateTotal(TOTAL_WIND, ['level-wind', 'wisdom-wind']); +setupRepeatingSpellSumming(ALL_PRIEST_SPELL_SECTIONS, PRIEST_SPELL_POINTS, 'spell-points', `${PRIEST_SPELL_POINTS}-sum`, true); +setupRepeatingSpellSumming(ALL_PRIEST_SPELL_SECTIONS, 'wind', 'spell-wind', `${TOTAL_WIND}-sum`, true); +setupCalculateRemaining(`${PRIEST_SPELL_POINTS}-total`, `${PRIEST_SPELL_POINTS}-sum`, `${PRIEST_SPELL_POINTS}-remaining`); +setupCalculateRemaining(TOTAL_WIND, `${TOTAL_WIND}-sum`, `${TOTAL_WIND}-remaining`); let PRIEST_SPELL_POINTS_WIS = 'spell-points-priest-wis'; on('change:spell-points-priest-wis-enabled change:wisdom change:level-priest', function (eventInfo) { getAttrs(['spell-points-priest-wis-enabled', 'wisdom', 'level-priest'], async function (values) { @@ -69915,9 +69915,9 @@ on('change:spell-points-priest-wis-enabled change:wisdom change:level-priest', f // --- Start setup reset buttons --- // //tab6 = wizard levels //tab7 = priest levels -setupSpellSlotsReset('reset-spent-slots-wiz', 'tab6', wizardSpellLevelsSections, allWizardSpellSections); -let allPriestSectionsExceptQuest = priestSpellLevelsSections.slice(0, -1).flatMap(sl => sl.sections); -setupSpellSlotsReset('reset-spent-slots-pri', 'tab7', priestSpellLevelsSections, allPriestSectionsExceptQuest); +setupSpellSlotsReset('reset-spent-slots-wiz', 'tab6', WIZARD_SPELL_LEVELS_SECTIONS, ALL_WIZARD_SPELL_SECTIONS); +let allPriestSectionsExceptQuest = PRIEST_SPELL_LEVELS_SECTIONS.slice(0, -1).flatMap(sl => sl.sections); +setupSpellSlotsReset('reset-spent-slots-pri', 'tab7', PRIEST_SPELL_LEVELS_SECTIONS, allPriestSectionsExceptQuest); // --- End setup reset buttons --- // // --- Start setup Granted Powers --- // @@ -71475,9 +71475,9 @@ PSIONIC_CORE_SECTIONS.forEach(({section, name, macro, number, cost_number, disci // Show / Hide buttons for various repeating sections const FOLDABLE_REPEATING_SECTIONS = [ - ...wizardSpellLevelsSections.map(e => e.sections[e.sections.length-1]).map(e => `spells-${e}`), + ...WIZARD_SPELL_LEVELS_SECTIONS.map(e => e.sections[e.sections.length-1]).map(e => `spells-${e}`), 'spells-wizmonster', - ...priestSpellLevelsSections.map(e => e.sections[e.sections.length-1]).map(e => `spells-${e}`), + ...PRIEST_SPELL_LEVELS_SECTIONS.map(e => e.sections[e.sections.length-1]).map(e => `spells-${e}`), 'spells-primonster', ...PSIONIC_CORE_SECTIONS.map(e => e.section), 'scrolls', From ea9cf2a2a6d88d1153b8b4bcefefd4a92027de59 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Sat, 18 Feb 2023 15:29:03 +0100 Subject: [PATCH 49/58] Cleaned up monster and henchmen saving throws a bit --- ADnD_2E_Revised/2ESheet.html | 260 +++++++++--------- .../html/shared/saving-throws.html | 20 +- 2 files changed, 140 insertions(+), 140 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 1c9461e7a2..67916e50f6 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -14105,16 +14105,16 @@
    - - - - - - - - - - + + + + + + + + + + @@ -14310,16 +14310,16 @@
    - - - - - - - - - - + + + + + + + + + + @@ -14514,16 +14514,16 @@
    - - - - - - - - - - + + + + + + + + + + @@ -14872,16 +14872,16 @@
    - - - - - - - - - - + + + + + + + + + + @@ -15235,16 +15235,16 @@
    - - - - - - - - - - + + + + + + + + + + @@ -15593,16 +15593,16 @@
    - - - - - - - - - - + + + + + + + + + + @@ -15956,16 +15956,16 @@
    - - - - - - - - - - + + + + + + + + + + @@ -16407,16 +16407,16 @@
    - - - - - - - - - - + + + + + + + + + + @@ -16863,16 +16863,16 @@
    - - - - - - - - - - + + + + + + + + + + @@ -18170,16 +18170,16 @@
    - - - - - - - - - - + + + + + + + + + + @@ -19499,16 +19499,16 @@
    - - - - - - - - - - + + + + + + + + + + @@ -20075,16 +20075,16 @@
    - - - - - - - - - - + + + + + + + + + + @@ -21141,16 +21141,16 @@
    - - - - - - - - - - + + + + + + + + + + diff --git a/ADnD_2E_Revised/html/shared/saving-throws.html b/ADnD_2E_Revised/html/shared/saving-throws.html index 7f88cf4f41..f30bc58433 100644 --- a/ADnD_2E_Revised/html/shared/saving-throws.html +++ b/ADnD_2E_Revised/html/shared/saving-throws.html @@ -1,15 +1,15 @@
    - - - - - - - - - - + + + + + + + + + + From 7e6ac5f5bb6b3db79b8d5af615e116f1ae46b0f8 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Sat, 18 Feb 2023 15:38:22 +0100 Subject: [PATCH 50/58] Extracted saving throw buttons --- .../character-info-tracker-tab.html | 26 +++++++++---------- .../saving-throw-button.html | 1 + 2 files changed, 14 insertions(+), 13 deletions(-) create mode 100644 ADnD_2E_Revised/html/tabs/character-tab/character-info-tab/character-info-tracker-tab/saving-throw-button.html diff --git a/ADnD_2E_Revised/html/tabs/character-tab/character-info-tab/character-info-tracker-tab.html b/ADnD_2E_Revised/html/tabs/character-tab/character-info-tab/character-info-tracker-tab.html index 7d047745b6..1fca9f94c3 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/character-info-tab/character-info-tracker-tab.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/character-info-tab/character-info-tracker-tab.html @@ -497,7 +497,7 @@ @@ -505,7 +505,7 @@ @@ -513,7 +513,7 @@ @@ -521,7 +521,7 @@ @@ -529,7 +529,7 @@ @@ -537,7 +537,7 @@ @@ -545,7 +545,7 @@ @@ -553,7 +553,7 @@ @@ -561,7 +561,7 @@ @@ -569,7 +569,7 @@
    - + insert_saving-throw-button.html_(par,Paralyzation)
    - + insert_saving-throw-button.html_(poi,Poison)
    - + insert_saving-throw-button.html_(dea,Death)
    - + insert_saving-throw-button.html_(rod,Rod)
    - + insert_saving-throw-button.html_(sta,Staff)
    - + insert_saving-throw-button.html_(wan,Wand)
    - + insert_saving-throw-button.html_(pet,Petrification)
    - + insert_saving-throw-button.html_(pol,Polymorph)
    - + insert_saving-throw-button.html_(breath,Breath)
    - + insert_saving-throw-button.html_(sp,Spell)
    @@ -586,7 +586,7 @@ - + insert_saving-throw-button.html_(f,Fear) @@ -594,7 +594,7 @@ - + insert_saving-throw-button.html_(horr,Horror) @@ -602,7 +602,7 @@ - + insert_saving-throw-button.html_(mad,Madness) diff --git a/ADnD_2E_Revised/html/tabs/character-tab/character-info-tab/character-info-tracker-tab/saving-throw-button.html b/ADnD_2E_Revised/html/tabs/character-tab/character-info-tab/character-info-tracker-tab/saving-throw-button.html new file mode 100644 index 0000000000..5be055516f --- /dev/null +++ b/ADnD_2E_Revised/html/tabs/character-tab/character-info-tab/character-info-tracker-tab/saving-throw-button.html @@ -0,0 +1 @@ + \ No newline at end of file From 22dc487fed98a190a53dfdb0b6ec43d7329a7edc Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Sat, 18 Feb 2023 15:50:21 +0100 Subject: [PATCH 51/58] Updated saving throws to show by how much the check was made or failed --- ADnD_2E_Revised/2ESheet.html | 286 +++++++++--------- .../html/shared/saving-throws.html | 20 +- .../saving-throw-button.html | 2 +- 3 files changed, 154 insertions(+), 154 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 67916e50f6..0edeeef0ea 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -744,7 +744,7 @@ - + @@ -752,7 +752,7 @@ - + @@ -760,7 +760,7 @@ - + @@ -768,7 +768,7 @@ - + @@ -776,7 +776,7 @@ - + @@ -784,7 +784,7 @@ - + @@ -792,7 +792,7 @@ - + @@ -800,7 +800,7 @@ - + @@ -808,7 +808,7 @@ - + @@ -816,7 +816,7 @@ - + @@ -833,7 +833,7 @@ - + @@ -841,7 +841,7 @@ - + @@ -849,7 +849,7 @@ - + @@ -14105,16 +14105,16 @@
    - - - - - - - - - - + + + + + + + + + + @@ -14310,16 +14310,16 @@
    - - - - - - - - - - + + + + + + + + + + @@ -14514,16 +14514,16 @@
    - - - - - - - - - - + + + + + + + + + + @@ -14872,16 +14872,16 @@
    - - - - - - - - - - + + + + + + + + + + @@ -15235,16 +15235,16 @@
    - - - - - - - - - - + + + + + + + + + + @@ -15593,16 +15593,16 @@
    - - - - - - - - - - + + + + + + + + + + @@ -15956,16 +15956,16 @@
    - - - - - - - - - - + + + + + + + + + + @@ -16407,16 +16407,16 @@
    - - - - - - - - - - + + + + + + + + + + @@ -16863,16 +16863,16 @@
    - - - - - - - - - - + + + + + + + + + + @@ -18170,16 +18170,16 @@
    - - - - - - - - - - + + + + + + + + + + @@ -19499,16 +19499,16 @@
    - - - - - - - - - - + + + + + + + + + + @@ -20075,16 +20075,16 @@
    - - - - - - - - - - + + + + + + + + + + @@ -21141,16 +21141,16 @@
    - - - - - - - - - - + + + + + + + + + + diff --git a/ADnD_2E_Revised/html/shared/saving-throws.html b/ADnD_2E_Revised/html/shared/saving-throws.html index f30bc58433..ea2fd8a5a1 100644 --- a/ADnD_2E_Revised/html/shared/saving-throws.html +++ b/ADnD_2E_Revised/html/shared/saving-throws.html @@ -1,15 +1,15 @@
    - - - - - - - - - - + + + + + + + + + + diff --git a/ADnD_2E_Revised/html/tabs/character-tab/character-info-tab/character-info-tracker-tab/saving-throw-button.html b/ADnD_2E_Revised/html/tabs/character-tab/character-info-tab/character-info-tracker-tab/saving-throw-button.html index 5be055516f..d4e3b43d8b 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/character-info-tab/character-info-tracker-tab/saving-throw-button.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/character-info-tab/character-info-tracker-tab/saving-throw-button.html @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file From 7a81d2c43e2f3e2483b165f77d8c43449dcc29b7 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Sat, 18 Feb 2023 15:52:25 +0100 Subject: [PATCH 52/58] Use reference to previous roll for ability score to trim down the html a bit --- ADnD_2E_Revised/2ESheet.html | 48 +++++++++---------- .../attributes-tab/attribute-button.html | 2 +- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 0edeeef0ea..b59eada41f 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -1156,7 +1156,7 @@ - + @@ -1175,7 +1175,7 @@ - + @@ -1193,7 +1193,7 @@ - + @@ -1213,7 +1213,7 @@ - + @@ -1232,7 +1232,7 @@ - + @@ -1249,7 +1249,7 @@ - + @@ -1295,7 +1295,7 @@
    Notes
    Notes
    Notes
    %Notes
    Notes
    Notes
    - + @@ -1306,7 +1306,7 @@ - + @@ -1314,7 +1314,7 @@ - + @@ -1325,7 +1325,7 @@ - + @@ -1333,7 +1333,7 @@ - + @@ -1341,7 +1341,7 @@ - + @@ -1349,7 +1349,7 @@ - + @@ -1359,7 +1359,7 @@ - + @@ -1369,7 +1369,7 @@ - + @@ -1378,7 +1378,7 @@ - + @@ -1388,7 +1388,7 @@ - + @@ -1398,7 +1398,7 @@ - + @@ -1408,7 +1408,7 @@ - + @@ -1417,7 +1417,7 @@ - + @@ -1426,7 +1426,7 @@ - + @@ -1435,7 +1435,7 @@ - + @@ -1443,7 +1443,7 @@ - + @@ -1451,7 +1451,7 @@ - + diff --git a/ADnD_2E_Revised/html/tabs/character-tab/attributes-tab/attribute-button.html b/ADnD_2E_Revised/html/tabs/character-tab/attributes-tab/attribute-button.html index 032a7004af..045c675ab2 100644 --- a/ADnD_2E_Revised/html/tabs/character-tab/attributes-tab/attribute-button.html +++ b/ADnD_2E_Revised/html/tabs/character-tab/attributes-tab/attribute-button.html @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file From 3bf790b45912762ef1c5b9efcdbc63c6f8d8b3fa Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Sat, 18 Feb 2023 15:57:19 +0100 Subject: [PATCH 53/58] updated change log --- ADnD_2E_Revised/2ESheet.html | 1 + ADnD_2E_Revised/html/changelog.html | 1 + 2 files changed, 2 insertions(+) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index b59eada41f..48e53f2d88 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -24,6 +24,7 @@
  • Fixed bonus spells from high Intuition from PO: Skills & Powers. Willpower was incorrectly used
  • Regeneration from high Constitution now clarifies that it is per turn(s)
  • Styled Monster tab to have dynamically sized fields, and larger fields for Hit Dice, HP, and Max HP
  • +
  • Updated saving throws to tell how much the check was made or missed by
  • 2Espell - Sensory signature and Knockdown switched places to make them appear in the same order as in the PO: Spells & Magic book

  • diff --git a/ADnD_2E_Revised/html/changelog.html b/ADnD_2E_Revised/html/changelog.html index 06459d00d1..f5a209edc1 100644 --- a/ADnD_2E_Revised/html/changelog.html +++ b/ADnD_2E_Revised/html/changelog.html @@ -19,6 +19,7 @@
  • Fixed bonus spells from high Intuition from PO: Skills & Powers. Willpower was incorrectly used
  • Regeneration from high Constitution now clarifies that it is per turn(s)
  • Styled Monster tab to have dynamically sized fields, and larger fields for Hit Dice, HP, and Max HP
  • +
  • Updated saving throws to tell how much the check was made or missed by
  • 2Espell - Sensory signature and Knockdown switched places to make them appear in the same order as in the PO: Spells & Magic book

  • From 8f33ca415a0a3690e707cf4c017d3ff7bd736387 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Sun, 19 Feb 2023 13:41:35 +0100 Subject: [PATCH 54/58] Only show increment/decrement buttons on firefox on hover or focus, like it is on chrome --- ADnD_2E_Revised/2EStyle.css | 8 ++++++++ ADnD_2E_Revised/css/browser-support.css | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/ADnD_2E_Revised/2EStyle.css b/ADnD_2E_Revised/2EStyle.css index 844649e67b..0b305e9f23 100644 --- a/ADnD_2E_Revised/2EStyle.css +++ b/ADnD_2E_Revised/2EStyle.css @@ -903,6 +903,14 @@ input.sheet-toast-error:checked ~ .sheet-toast-content { .charsheet .sheet-chrome { display: none; } + + input[type="number"] { + -moz-appearance: textfield; + } + input[type="number"]:hover, + input[type="number"]:focus { + -moz-appearance: revert; + } } /* Not Firefox styling */ diff --git a/ADnD_2E_Revised/css/browser-support.css b/ADnD_2E_Revised/css/browser-support.css index 3ee71bb8e5..1fae634aed 100644 --- a/ADnD_2E_Revised/css/browser-support.css +++ b/ADnD_2E_Revised/css/browser-support.css @@ -3,6 +3,14 @@ .charsheet .sheet-chrome { display: none; } + + input[type="number"] { + -moz-appearance: textfield; + } + input[type="number"]:hover, + input[type="number"]:focus { + -moz-appearance: revert; + } } /* Not Firefox styling */ From dd3be750d763d032f86043f5bdb3e0d69b608d10 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Sun, 19 Feb 2023 14:04:46 +0100 Subject: [PATCH 55/58] updated change log --- ADnD_2E_Revised/html/changelog.html | 1 + 1 file changed, 1 insertion(+) diff --git a/ADnD_2E_Revised/html/changelog.html b/ADnD_2E_Revised/html/changelog.html index f5a209edc1..39391556ec 100644 --- a/ADnD_2E_Revised/html/changelog.html +++ b/ADnD_2E_Revised/html/changelog.html @@ -18,6 +18,7 @@
  • Added support for automatic Spell Points for Priests with high Wisdom. This is a toggle as only priests gets this bonus, and not Paladins and Rangers. The Priest caster level is used to determine how many spell points should be given
  • Fixed bonus spells from high Intuition from PO: Skills & Powers. Willpower was incorrectly used
  • Regeneration from high Constitution now clarifies that it is per turn(s)
  • +
  • Only show up and down arrows on numeric input fields in Firefox on hover or focus
  • Styled Monster tab to have dynamically sized fields, and larger fields for Hit Dice, HP, and Max HP
  • Updated saving throws to tell how much the check was made or missed by
  • 2Espell - Sensory signature and Knockdown switched places to make them appear in the same order as in the PO: Spells & Magic book
  • From aea1b13ac69e25398bc1ed7e34cba293a74c3005 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Sun, 19 Feb 2023 14:47:56 +0100 Subject: [PATCH 56/58] Removed "the" --- ADnD_2E_Revised/javascript/sheetWorkers.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ADnD_2E_Revised/javascript/sheetWorkers.js b/ADnD_2E_Revised/javascript/sheetWorkers.js index 1c0defcf0b..becb63d05e 100644 --- a/ADnD_2E_Revised/javascript/sheetWorkers.js +++ b/ADnD_2E_Revised/javascript/sheetWorkers.js @@ -1363,7 +1363,7 @@ on('change:spell-points-priest-wis-enabled change:wisdom change:level-priest', f let level = 1; if (values['level-priest'] === '') { - return showToast(INFO, 'Set Priest caster level', 'The Priest\'s level is needed to calculate the bonus Spell Points from high Wisdom.'); + return showToast(INFO, 'Set Priest caster level', 'The Priest\'s level is needed to calculate bonus Spell Points from high Wisdom.'); } else { level = await extractRollResult(values['level-priest']); } From 34bbcaecb3c52b7b1870598c755679b8194af2c5 Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Sun, 19 Feb 2023 14:48:11 +0100 Subject: [PATCH 57/58] removed "the" --- ADnD_2E_Revised/2ESheet.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index 48e53f2d88..aa7a1deef3 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -23,6 +23,7 @@
  • Added support for automatic Spell Points for Priests with high Wisdom. This is a toggle as only priests gets this bonus, and not Paladins and Rangers. The Priest caster level is used to determine how many spell points should be given
  • Fixed bonus spells from high Intuition from PO: Skills & Powers. Willpower was incorrectly used
  • Regeneration from high Constitution now clarifies that it is per turn(s)
  • +
  • Only show up and down arrows on numeric input fields in Firefox on hover or focus
  • Styled Monster tab to have dynamically sized fields, and larger fields for Hit Dice, HP, and Max HP
  • Updated saving throws to tell how much the check was made or missed by
  • 2Espell - Sensory signature and Knockdown switched places to make them appear in the same order as in the PO: Spells & Magic book
  • @@ -69865,7 +69866,7 @@ on('change:spell-points-priest-wis-enabled change:wisdom change:level-priest', f let level = 1; if (values['level-priest'] === '') { - return showToast(INFO, 'Set Priest caster level', 'The Priest\'s level is needed to calculate the bonus Spell Points from high Wisdom.'); + return showToast(INFO, 'Set Priest caster level', 'The Priest\'s level is needed to calculate bonus Spell Points from high Wisdom.'); } else { level = await extractRollResult(values['level-priest']); } From 18f44bd4d288f754c0cd1b0a16368bff0a0d543b Mon Sep 17 00:00:00 2001 From: Peter Bjerg Lidegaard Date: Sun, 19 Feb 2023 15:10:17 +0100 Subject: [PATCH 58/58] Setting spell slots to be checked as default --- ADnD_2E_Revised/2ESheet.html | 2 +- ADnD_2E_Revised/html/2ESheet-base.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ADnD_2E_Revised/2ESheet.html b/ADnD_2E_Revised/2ESheet.html index aa7a1deef3..31b328bd7c 100644 --- a/ADnD_2E_Revised/2ESheet.html +++ b/ADnD_2E_Revised/2ESheet.html @@ -57,7 +57,7 @@
    - + diff --git a/ADnD_2E_Revised/html/2ESheet-base.html b/ADnD_2E_Revised/html/2ESheet-base.html index 64d5b29397..c804ae9533 100644 --- a/ADnD_2E_Revised/html/2ESheet-base.html +++ b/ADnD_2E_Revised/html/2ESheet-base.html @@ -13,7 +13,7 @@ insert_changelog.html
    - +
    Hit
    Probability
    Damage
    Adjustment
    Notes
    Reaction
    Adjustment
    Missile Attack
    Adjustment
    Notes
    Hit Point
    Adjustment
    System
    Shock
    Notes
    %
    Number of
    Languages
    Maximum
    Spell Level
    Notes
    Magical Def
    Adjustment
    Bonus
    Priest Spells
    Notes
    Maximum Number
    of Henchmen
    Loyalty
    Base
    Notes