+
+
Powers
@@ -309,9 +331,58 @@
0
+
+
+
+
+
-
+
Qualities
+
+
+
+
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,