diff --git a/Sentinel Comics RPG/SCRPG-Sheet.css b/Sentinel Comics RPG/SCRPG-Sheet.css index 8bf1ae735f..3c8731a435 100644 --- a/Sentinel Comics RPG/SCRPG-Sheet.css +++ b/Sentinel Comics RPG/SCRPG-Sheet.css @@ -19,6 +19,9 @@ .sheet-statusgrid { display: grid; grid-template-columns: 30px 65px auto 50px 50px; } +.sheet-dividedgrid { + display: grid; grid-template-columns: 15px auto 25px auto 65px 65px 65px; +} .sheet-shead {display: inline-grid; place-items: center;} .sheet-sgreen {background-color: #41b23b; display: inline-grid; place-items: center;} .sheet-syellow {background-color: #f8df1b; display: inline-grid; place-items: center;} @@ -87,6 +90,21 @@ .sheet-tabstoggle[value="auxiliary"] ~ div.sheet-modey2, .sheet-tabstoggle[value="auxiliary"] ~ div.sheet-moder1 {display: block;} +/* Hide Powers, Qualities, or Modes from ability and villain tabs */ +.sheet-modeselect[value="0"] ~ div.sheet-modebase, +.sheet-tabstoggle[value="villain"] ~ div.sheet-modebase, +.sheet-tabstoggle:not([value="villain"]) + .sheet-modeselect:not([value="0"]) ~ div.sheet-powerbase, +.sheet-dividedselect[value="1"] + .sheet-divideddouble[value="on"] ~ div.sheet-powerbase, +.sheet-dividedselect[value="0"] ~ div.sheet-dividedeither, +.sheet-dividedselect[value="2"] ~ div.sheet-dividedcivilian, +.sheet-dividedselect:not([value="2"]) ~ div.sheet-dividedheroic, +.sheet-dividedselect[value="2"] + .sheet-divideddouble[value="on"] ~ div.sheet-rightquality, +.sheet-leftquality, +.sheet-rightpower {display: none;} + +.sheet-dividedselect[value="2"] + .sheet-divideddouble[value="on"] ~ div.sheet-rightpower, +.sheet-dividedselect[value="1"] + .sheet-divideddouble[value="on"] ~ div.sheet-leftquality {display: block;} + /* change font of die in roll buttons */ button[type=roll].sheet-rolldice::before { content: ''; font-family: 'dicefontd4'; } @@ -106,12 +124,6 @@ input.sheet-icon-cycle:not([value="4"]) ~ span.sheet-boost, input.sheet-icon-cycle:not([value="5"]) ~ span.sheet-hinder, input.sheet-icon-cycle:not([value="6"]) ~ span.sheet-recover {display: none;} -/* Hide Powers or Modes from ability and villain tabs */ -.sheet-modeselect[value="0"] ~ div.sheet-modebase, -.sheet-tabstoggle[value="villain"] ~ div.sheet-modebase, -.sheet-tabstoggle:not([value="villain"]) + .sheet-modeselect:not([value="0"]) ~ div.sheet-powerbase {display: none;} - - /* Clear default open/close button styling */ button.sheet-direction, button.sheet-lock { diff --git a/Sentinel Comics RPG/SCRPG-Sheet.html b/Sentinel Comics RPG/SCRPG-Sheet.html index dadf1449bf..c83d6db4cd 100644 --- a/Sentinel Comics RPG/SCRPG-Sheet.html +++ b/Sentinel Comics RPG/SCRPG-Sheet.html @@ -256,10 +256,32 @@
+ + +
+
+
+ +
+ + +
+ +
+
+ +
+
+ +
+
+
+ +

Powers

@@ -309,9 +331,58 @@ 0
+ +
+

Qualities

+
+ + + +
+
+ + +
+ +
+
+ +
+

Powers

+
+ + + +
+
+ + +
+ +
-
+

Qualities

@@ -351,13 +422,25 @@
Min
- + +
+ +
+
+ +
@@ -370,13 +453,25 @@
Min
- + +
+ +
+
+ +
@@ -389,13 +484,25 @@
Min
- + +
+ +
+
+ +
@@ -448,9 +555,9 @@
- +

Character has no Alternate Forms or Modes

@@ -1009,6 +1116,88 @@
+ +
+
+

Divided Options:

+ +
*Sourcebook + +
+
+
+
+ +

Character does not use Divided Template

+
+
Green
+
Yellow
+
Red
+ + + + Use only Qualities +
+ +
+
+ +
+
+ +
+ + + + Use only Powers +
+ +
+
+ +
+
+ +
+
+
+
@@ -1648,19 +1837,26 @@ }); }); - //CODE FOR SETTING/GETTING POWER VALUES from REPEATING SECTIONS - on("change:repeating_powers:powercheck", function(eventInfo) { - getAttrs(["repeating_powers_power","repeating_powers_powerdtype","repeating_powers_powercheck"],function(v) { - let check = parseInt(v.repeating_powers_powercheck)||0; - if(check === 1) { - let power = v.repeating_powers_power; - let value = v.repeating_powers_powerdtype; - setAttrs({ - "power_chosen": power, - "power_value": value, - "repeating_powers_powercheck":0 - }); - } + //Toggles between Divided Forms + on("clicked:divided_toggle", function() {getAttrs(["dividedradio"], function(v) { + setAttrs({"dividedradio": v["dividedradio"] !== "1" ? "1" : "2"}); + });}); + //When the divided radio changes, also change hidden value + on("change:dividedradio", function(eventInfo) { + getAttrs(["dividedradio"],function(v) { + let divnum = parseInt(v.dividedradio)||0; + setAttrs({ + "civilianoheroic": divnum, + }); + }); + }); + //CODE FOR SETTING/GETTING STATUS VALUES + on("change:dividedcheck", function(eventInfo) { + getAttrs(["dividedcheck"],function(v) { + let value = v.dividedcheck; + setAttrs({ + "usingdouble": value, + }); }); }); @@ -1750,6 +1946,21 @@ }); }); + //CODE FOR SETTING/GETTING POWER VALUES from REPEATING SECTIONS + on("change:repeating_powers:powercheck", function(eventInfo) { + getAttrs(["repeating_powers_power","repeating_powers_powerdtype","repeating_powers_powercheck"],function(v) { + let check = parseInt(v.repeating_powers_powercheck)||0; + if(check === 1) { + let power = v.repeating_powers_power; + let value = v.repeating_powers_powerdtype; + setAttrs({ + "power_chosen": power, + "power_value": value, + "repeating_powers_powercheck":0 + }); + } + }); + }); //CODE FOR SETTING/GETTING QUALITY VALUES from REPEATING SECTIONS on("change:repeating_qualities:qualitycheck", function(eventInfo) { getAttrs(["repeating_qualities_quality","repeating_qualities_qualitydtype","repeating_qualities_qualitycheck"],function(v) { @@ -1765,26 +1976,67 @@ } }); }); - - //CODE FOR SETTING/GETTING STATUS VALUES - on("change:greencheck", function(eventInfo) { - getAttrs(["greendtype","greencheck"],function(v) { - let check = parseInt(v.greencheck)||0; + //CODE FOR SETTING/GETTING POWER VALUES from REPEATING SECTIONS (in 2nd column for Divided) + on("change:repeating_powers:qualitycheck", function(eventInfo) { + getAttrs(["repeating_powers_power","repeating_powers_powerdtype","repeating_powers_qualitycheck"],function(v) { + let check = parseInt(v.repeating_powers_qualitycheck)||0; if(check === 1) { - let value = v.greendtype; + let quality = v.repeating_powers_power; + let value = v.repeating_powers_powerdtype; setAttrs({ - "status_chosen": "Green", - "status_value": value, - "greencheck":0 + "quality_chosen": quality, + "quality_value": value, + "repeating_powers_qualitycheck":0 + }); + } + }); + }); + //CODE FOR SETTING/GETTING QUALITY VALUES from REPEATING SECTIONS (in 1st column for Divided) + on("change:repeating_qualities:powercheck", function(eventInfo) { + getAttrs(["repeating_qualities_quality","repeating_qualities_qualitydtype","repeating_qualities_powercheck"],function(v) { + let check = parseInt(v.repeating_qualities_powercheck)||0; + if(check === 1) { + let power = v.repeating_qualities_quality; + let value = v.repeating_qualities_qualitydtype; + setAttrs({ + "power_chosen": power, + "power_value": value, + "repeating_qualities_powercheck":0 }); } }); }); + + + //CODE FOR SETTING/GETTING STATUS VALUES + on("change:greencheck", function(eventInfo) { + getAttrs(["greendtype","green2dtype","greencheck","dividedradio"],function(v) { + let check = parseInt(v.greencheck)||0; + if(check === 1) { + let value = parseInt(v.dividedradio)||0; + if(value == 2) { + value = v.green2dtype; + } else { + value = v.greendtype; + } + setAttrs({ + "status_chosen": "Green", + "status_value": value, + "greencheck":0 + }); + } + }); + }); on("change:yellowcheck", function(eventInfo) { - getAttrs(["yellowdtype","yellowcheck"],function(v) { + getAttrs(["yellowdtype","yellow2dtype","yellowcheck","dividedradio"],function(v) { let check = parseInt(v.yellowcheck)||0; if(check === 1) { - let value = v.yellowdtype; + let value = parseInt(v.dividedradio)||0; + if(value == 2) { + value = v.yellow2dtype; + } else { + value = v.yellowdtype; + } setAttrs({ "status_chosen": "Yellow", "status_value": value, @@ -1794,10 +2046,15 @@ }); }); on("change:redcheck", function(eventInfo) { - getAttrs(["reddtype","redcheck"],function(v) { + getAttrs(["reddtype","red2dtype","redcheck","dividedradio"],function(v) { let check = parseInt(v.redcheck)||0; if(check === 1) { - let value = v.reddtype; + let value = parseInt(v.dividedradio)||0; + if(value == 2) { + value = v.red2dtype; + } else { + value = v.reddtype; + } setAttrs({ "status_chosen": "Red", "status_value": value,