Skip to content

Commit

Permalink
Merge pull request #13133 from vince-roll20/New1eUpdates
Browse files Browse the repository at this point in the history
AD&D1e Revised
  • Loading branch information
NBrooks-Roll20 authored Jul 30, 2024
2 parents 6784512 + 642982e commit d40ac24
Show file tree
Hide file tree
Showing 2 changed files with 142 additions and 30 deletions.
130 changes: 110 additions & 20 deletions ADnD_1E_Revised/1ESheet.css
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,17 @@
overflow: visible;
}

/*light goldenrod*/
.charsheet .background-selection[value='7']:checked ~ .background {
background-color: #f6e8a7;
background-image: none;
}

.charsheet .background-selection[value='7']:checked ~ .background input,
.charsheet .background-selection[value='7']:checked ~ .background select {
background-color: rgb(255 255 255 / 40%);
}

/*goldenrod*/
.charsheet .background-selection[value='3']:checked ~ .background {
background-color: #f4d74f;
Expand Down Expand Up @@ -1095,28 +1106,104 @@ summary::-webkit-details-marker {
z-index: 1;
}

.charsheet .sheet-type {
display: grid;
gap: 2px;
grid-template-rows: 1.1em 1.1em;
position: relative;
top: -1.25em;
}

.charsheet .friend-foe > span {
padding-top: 4px;
width: 6.25em;
}

.charsheet input.is-friend,
.charsheet input.is-foe {
margin-inline: auto;
opacity: 0;
position: relative;
width: 100%;
z-index: 1;
}

.charsheet .friend-foe .inline-label input.is-friend + span::before {
content: 'Friend';
font-weight: normal;
margin: -0.65em 0 0 -2.75em;
opacity: .35;
position: relative;
}

.charsheet .friend-foe .inline-label input.is-foe + span::before {
content: 'Foe';
font-weight: normal;
margin: -0.65em 0 0 -2.5em;
opacity: .35;
position: relative;
}

.charsheet .friend-foe .inline-label input[type="radio"].is-friend:checked + span::before,
.charsheet .friend-foe .inline-label input[type="radio"].is-foe:checked + span::before {
font-weight: bold;
opacity: 1;
text-decoration: underline;
}


.charsheet .pc-npc > span {
justify-content: space-evenly;
padding-top: 4px;
width: 7.5em;
width: 6.25em;
}

.charsheet input.is-pc {
left: 4px;
margin: 0;
min-width: 3em;
opacity: 0;
position: relative;
z-index: 1;
}

.charsheet input.is-npc {
left: -10px;
margin: 0;
min-width: 3em;
opacity: 0;
position: relative;
z-index: 1;
}

.charsheet .pc-npc .inline-label input.is-pc + span::before {
content: 'PC';
margin: -0.65em 0 0 -3.75em;
position: absolute;
font-weight: normal;
left: -13px;
opacity: .35;
position: relative;
}

.charsheet .pc-npc .inline-label input.is-npc + span::before {
content: 'NPC';
margin: -0.65em 0 0 -4.5em;
position: absolute;
font-weight: normal;
opacity: .35;
position: relative;
right: 3.65em;
}

.charsheet .pc-npc .inline-label input.is-pc:checked + span::before,
.charsheet .pc-npc .inline-label input.is-npc:checked + span::before {
.charsheet .pc-npc .inline-label input[type="radio"].is-pc:checked + span::before,
.charsheet .pc-npc .inline-label input[type="radio"].is-npc:checked + span::before {
font-weight: bold;
opacity: 1;
text-decoration: underline;
}

.charsheet .friend-foe .inline-label input.is-friend:hover + span::before,
.charsheet .friend-foe .inline-label input.is-foe:hover + span::before,
.charsheet .pc-npc .inline-label input.is-pc:hover + span::before,
.charsheet .pc-npc .inline-label input.is-npc:hover + span::before {
font-weight: bold;
opacity: .75;
}

.charsheet .npc-toggle.npc-tabs {
Expand Down Expand Up @@ -2705,8 +2792,8 @@ details[open].thac0-box {
.charsheet .announcements-box .announcements-title {
color: var(--link-hover);
font-size: var(--text-xl);
margin: auto;
padding: 0 0 0 5px;
margin: 0 0 0 0;
padding: 0 0 0 10px;
}

.charsheet .wrapper .announcements {
Expand Down Expand Up @@ -3700,16 +3787,16 @@ details[open].thac0-box {
scrollbar-width: none;
}

.charsheet button:focus,
.charsheet select:focus,
.charsheet textarea:focus,
.charsheet input[type='number']:focus,
.charsheet input[type='text']:focus,
.charsheet button[type='roll']:focus-within,
.charsheet select:focus-within,
.charsheet textarea:focus-within,
.charsheet input[type='number']:focus-within,
.charsheet input[type='text']:focus-within {
.charsheet .background .wrapper button:focus,
.charsheet .background .wrapper select:focus,
.charsheet .background .wrapper textarea:focus,
.charsheet .background .wrapper input[type='number']:focus,
.charsheet .background .wrapper input[type='text']:focus,
.charsheet .background .wrapper button[type='roll']:focus-within,
.charsheet .background .wrapper select:focus-within,
.charsheet .background .wrapper textarea:focus-within,
.charsheet .background .wrapper input[type='number']:focus-within,
.charsheet .background .wrapper input[type='text']:focus-within {
background-color: revert;
color: var(--color-black1);
outline: outset 2px var(--link-hover);
Expand Down Expand Up @@ -3875,7 +3962,10 @@ details[open].thac0-box {

.charsheet .announcements-box input[type='checkbox'].sect-show ~ .material-icons::before {
content: 'menu';
font-size: 1.75rem;
margin: auto;
margin-top: 3px;
opacity: .5;
}

.charsheet .announcements-box input[type='checkbox'].sect-show:checked ~ .material-icons::before {
Expand Down
42 changes: 32 additions & 10 deletions ADnD_1E_Revised/1ESheet.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<input type="checkbox" name="attr_background" value="4" class="background-selection hidden" />
<input type="checkbox" name="attr_background" value="5" class="background-selection hidden" />
<input type="checkbox" name="attr_background" value="6" class="background-selection hidden" />
<input type="checkbox" name="attr_background" value="7" class="background-selection hidden" />

<!--option toggles-->
<input type="hidden" name="attr_is_npc" value="0" class="is-npc" />
Expand Down Expand Up @@ -39,12 +40,20 @@
</section>
<!-- Announcements -->
<section class="announcements-box">
<span class="pc-npc">
<span class="inline-label" title="@{is_npc} | Indicates that the sheet is either a PC or NPC/Monster.">
<input type="radio" class="width-smallest is-pc" name="attr_is_npc" value="0" checked /><span></span>
<input type="radio" class="width-smallest is-npc" name="attr_is_npc" value="1" /><span></span>
<div class="sheet-type">
<span class="friend-foe">
<span class="inline-label" title="@{is_foe} | Indicates that the sheet is either a friend or foe. This option is purely visual and has no impact on the sheet.">
<input type="radio" class="width-smallest is-friend" name="attr_is_foe" value="0" /><span></span>
<input type="radio" class="width-smallest is-foe" name="attr_is_foe" value="1" checked/><span></span>
</span>
</span>
</span>
<span class="pc-npc">
<span class="inline-label" title="@{is_npc} | Indicates that the sheet is either a PC or NPC/Monster. Choosing NPC/Monster will reveal an additional NPC/Monster page.">
<input type="radio" class="width-smallest is-pc" name="attr_is_npc" value="0" checked /><span></span>
<input type="radio" class="width-smallest is-npc" name="attr_is_npc" value="1" /><span></span>
</span>
</span>
</div>
<input type="checkbox" class="sect-show" name="attr_toggle_announcements" value="1" title="Open to read about important sheet changes." checked />
<span class="header announcements-title">i</span><span class="material-icons"></span>
<div class="sect announcements">
Expand All @@ -54,9 +63,13 @@ <h5 class="right two-columns">
<span class="left">
<span>v<span name="attr_sheet_version">
</span>
<span class="right"> • 7/19/24'</span>
<span class="right"> • 7/28/24'</span>
</h5>
<ul>
<li>Fixed Thief/Monk/Assassin Save vs Spell @levels 5-8. Corrected the threshold from "12" to "13".</li>
<li>Added Friend/Foe indicator at the top of the sheet. This is purely a visual indicator and does not impact the sheet.</li>
<li>Copied the Magic Resistance field to PC Saving Throws.</li>
<li>Added "Light Goldenrod" background.</li>
<li>Added a close "X" option from within the Announcements window.</li>
<li>Removed the whisper option when clicking on the portrait image to send to chat and added a query to prevent an accidental display of the portrait.</li>
<li>Updated History/Bio textarea to auto-expand to match it's content.</li>
Expand Down Expand Up @@ -2585,7 +2598,15 @@ <h4>Autofill Base:</h4>
</span>
</span>
</div>
<span class="inline-label width-fill">
<span class="inline-label">
<label class="inline-label width-auto">
<button type="roll" name="roll_magicresistance_roll" class="dice-button text-only" title="%{selected|magicresistance_roll}" value="@{whisper_pc} &amp;{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Magic Resistance Notes}} {{freetext=@{magic_resistance}}}">
<span>Magic Resistance Notes:</span>
</button>
</label>
<textarea class="height-short" name="attr_magic_resistance" title="@{magic_resistance}" placeholder="Nil"></textarea>
</span>
<span class="inline-label">
<label class="inline-label width-auto">
<button type="roll" name="roll_savingthrow_notes_roll" class="dice-button text-only" title="%{selected|savingthrow_notes_roll}" value="@{whisper_pc} &amp;{template:general} {{color=@{color_option}}} {{name=@{character_name}}} {{subtag=Saving Throw Notes}} {{freetext=@{savingthrow_notes}}}">
<span>Saving Throw Notes:</span>
Expand Down Expand Up @@ -4322,6 +4343,7 @@ <h4>Background:</h4>
<select class="background-selection" name="attr_background">
<option value="1" default="">White</option>
<option value="2" style="background-color: #d5cdc2;">Parchment</option>
<option value="7" style="background-color: #f6e8a7;">Light Goldenrod</option>
<option value="3" style="background-color: #f4d74f;">Goldenrod</option>
<option value="4" style="background-color: #b5dcb3">Moldvay</option>
<option value="5" style="background-color: var(--color-white1);">Light Greyhawk</option>
Expand Down Expand Up @@ -10949,7 +10971,7 @@ <h4 style="grid-row: 1/3; justify-self: left;">ADVANCED Options:</h4>
output.savepetrificationpolymorph_base = 11;
output.saverodsstaveswands_base = 12;
output.savebreathweapons_base = 15;
output.savespells_base = 12;
output.savespells_base = 13;
} else if (levelSelected < 13) {
output.saveparalysispoisondeath_base = 11;
output.savepetrificationpolymorph_base = 10;
Expand Down Expand Up @@ -10991,7 +11013,7 @@ <h4 style="grid-row: 1/3; justify-self: left;">ADVANCED Options:</h4>
output.savepetrificationpolymorph_base = 11;
output.saverodsstaveswands_base = 12;
output.savebreathweapons_base = 15;
output.savespells_base = 12;
output.savespells_base = 13;
} else if (levelSelected < 13) {
output.saveparalysispoisondeath_base = 11;
output.savepetrificationpolymorph_base = 10;
Expand Down Expand Up @@ -11027,7 +11049,7 @@ <h4 style="grid-row: 1/3; justify-self: left;">ADVANCED Options:</h4>
output.savepetrificationpolymorph_base = 11;
output.saverodsstaveswands_base = 12;
output.savebreathweapons_base = 15;
output.savespells_base = 12;
output.savespells_base = 13;
} else if (levelSelected < 13) {
output.saveparalysispoisondeath_base = 11;
output.savepetrificationpolymorph_base = 10;
Expand Down

0 comments on commit d40ac24

Please sign in to comment.