diff --git a/Nanochrome/NanoChrome.css b/Nanochrome/NanoChrome.css index 2ac688b5d3..4d763c6265 100644 --- a/Nanochrome/NanoChrome.css +++ b/Nanochrome/NanoChrome.css @@ -4,11 +4,16 @@ { justify-content:space-between; flex-wrap:wrap; - min-width:720px; + min-width:800px; align-items:flex-start; width:100%; } +.sheet-fichePNJ +{ + min-width:800px; +} + .sheet-tab1, .sheet-tab2 { @@ -438,6 +443,9 @@ div.sheet-initiative > input[type="hidden"][value="1"] ~ button[type="roll"], div.sheet-initiative > input[type="hidden"][value="0"] ~ div:nth-of-type(1), div.sheet-defense > input[type="hidden"][value="1"] ~ label:nth-of-type(2), div.sheet-defense > input[type="hidden"][value="0"] ~ div:nth-of-type(1), +div.sheet-pareFeu > div:nth-of-type(1) > input[type="hidden"][value="1"] ~ label:nth-of-type(2), +div.sheet-pareFeu > div:nth-of-type(1) > input[type="hidden"][value="1"] ~ button[type="roll"], +div.sheet-pareFeu > div:nth-of-type(1) > input[type="hidden"][value="0"] ~ div:nth-of-type(1), div.sheet-heroisme > input[type="hidden"][value="1"]:first-of-type ~ label:nth-of-type(2), div.sheet-heroisme > input[type="hidden"][value="0"]:first-of-type ~ div:nth-of-type(2), div.sheet-PVPNJ > input[type="hidden"][value="1"] ~ label:nth-of-type(2), @@ -473,6 +481,7 @@ div.sheet-PV > label:nth-of-type(1), div.sheet-connexion > label:nth-of-type(1), div.sheet-initiative > label:nth-of-type(1), div.sheet-defense > label:nth-of-type(1), +div.sheet-pareFeu > div > label:nth-of-type(1), div.sheet-heroisme > label:nth-of-type(1), div.sheet-PVPNJ > label:nth-of-type(1), div.sheet-puissance > label:nth-of-type(1) @@ -487,6 +496,7 @@ div.sheet-PV > label:nth-of-type(1) > input[type="checkbox"], div.sheet-connexion > label:nth-of-type(1) > input[type="checkbox"], div.sheet-initiative > label:nth-of-type(1) > input[type="checkbox"], div.sheet-defense > label:nth-of-type(1) > input[type="checkbox"], +div.sheet-pareFeu > div > label:nth-of-type(1) > input[type="checkbox"], div.sheet-heroisme > label:nth-of-type(1) > input[type="checkbox"], div.sheet-PVPNJ > label:nth-of-type(1) > input[type="checkbox"], div.sheet-puissance > label:nth-of-type(1) > input[type="checkbox"] @@ -502,6 +512,7 @@ div.sheet-PV > label:nth-of-type(1) > input[type="checkbox"] ~ span, div.sheet-connexion > label:nth-of-type(1) > input[type="checkbox"] ~ span, div.sheet-initiative > label:nth-of-type(1) > input[type="checkbox"] ~ span, div.sheet-defense > label:nth-of-type(1) > input[type="checkbox"] ~ span, +div.sheet-pareFeu > div > label:nth-of-type(1) > input[type="checkbox"] ~ span, div.sheet-heroisme > label:nth-of-type(1) > input[type="checkbox"] ~ span, div.sheet-PVPNJ > label:nth-of-type(1) > input[type="checkbox"] ~ span, div.sheet-puissance > label:nth-of-type(1) > input[type="checkbox"] ~ span @@ -513,6 +524,7 @@ div.sheet-PV > label:nth-of-type(1) > input[type="checkbox"] ~ span::before, div.sheet-connexion > label:nth-of-type(1) > input[type="checkbox"] ~ span::before, div.sheet-initiative > label:nth-of-type(1) > input[type="checkbox"] ~ span::before, div.sheet-defense > label:nth-of-type(1) > input[type="checkbox"] ~ span::before, +div.sheet-pareFeu > div > label:nth-of-type(1) > input[type="checkbox"] ~ span::before, div.sheet-heroisme > label:nth-of-type(1) > input[type="checkbox"] ~ span::before, div.sheet-PVPNJ > label:nth-of-type(1) > input[type="checkbox"] ~ span::before, div.sheet-puissance > label:nth-of-type(1) > input[type="checkbox"] ~ span::before @@ -530,6 +542,7 @@ div.sheet-PV:hover > label:nth-of-type(1) > input[type="checkbox"] ~ span::befor div.sheet-connexion:hover > label:nth-of-type(1) > input[type="checkbox"] ~ span::before, div.sheet-initiative:hover > label:nth-of-type(1) > input[type="checkbox"] ~ span::before, div.sheet-defense:hover > label:nth-of-type(1) > input[type="checkbox"] ~ span::before, +div.sheet-pareFeu:hover > div > label:nth-of-type(1) > input[type="checkbox"] ~ span::before, div.sheet-heroisme:hover > label:nth-of-type(1) > input[type="checkbox"] ~ span::before, div.sheet-PVPNJ:hover > label:nth-of-type(1) > input[type="checkbox"] ~ span::before, div.sheet-puissance:hover > label:nth-of-type(1) > input[type="checkbox"] ~ span::before @@ -541,6 +554,7 @@ div.sheet-PV > label:nth-of-type(1) > input[type="checkbox"]:checked ~ span::bef div.sheet-connexion > label:nth-of-type(1) > input[type="checkbox"]:checked ~ span::before, div.sheet-initiative > label:nth-of-type(1) > input[type="checkbox"]:checked ~ span::before, div.sheet-defense > label:nth-of-type(1) > input[type="checkbox"]:checked ~ span::before, +div.sheet-pareFeu > div > label:nth-of-type(1) > input[type="checkbox"]:checked ~ span::before, div.sheet-heroisme > label:nth-of-type(1) > input[type="checkbox"]:checked ~ span::before, div.sheet-PVPNJ > label:nth-of-type(1) > input[type="checkbox"]:checked ~ span::before, div.sheet-puissance > label:nth-of-type(1) > input[type="checkbox"]:checked ~ span::before @@ -571,8 +585,7 @@ div.sheet-puissance > label:nth-of-type(2) height:30px; } -div.sheet-defense > label:nth-of-type(2), -div.sheet-pareFeu > div:nth-of-type(1) > label:nth-of-type(1) +div.sheet-defense > label:nth-of-type(2) { width:100%; border-radius:5px; @@ -581,6 +594,16 @@ div.sheet-pareFeu > div:nth-of-type(1) > label:nth-of-type(1) height:30px; } +div.sheet-pareFeu > div:nth-of-type(1) > label:nth-of-type(2) +{ + width:100%; + border-top-left-radius: 5px; + border-top-right-radius: 5px; + border:1px solid black; + justify-content:space-between; + height:30px; +} + div.sheet-PV > label:nth-of-type(2) > input[type="number"], div.sheet-connexion > label:nth-of-type(2) > input[type="number"], div.sheet-heroisme > label:nth-of-type(2) > input[type="number"], @@ -594,9 +617,9 @@ div.sheet-PVPNJ > label:nth-of-type(2) > input[type="number"] font-size:20px; } -div.sheet-initiative > label:nth-of-type(2) > input[type="number"], +div.sheet-initiative > label:nth-of-type(2) > input[type="text"], div.sheet-defense > label:nth-of-type(2) > input[type="number"], -div.sheet-pareFeu > div:nth-of-type(1) > label:nth-of-type(1) > input[type="number"], +div.sheet-pareFeu > div:nth-of-type(1) > label:nth-of-type(2) > input[type="text"], div.sheet-puissance > label:nth-of-type(2) > input[type="number"] { width: 100%; @@ -608,6 +631,7 @@ div.sheet-puissance > label:nth-of-type(2) > input[type="number"] } div.sheet-initiative > button[type="roll"], +div.sheet-pareFeu > div > button[type="roll"], div.sheet-puissance > button[type="roll"] { width: 100%; @@ -620,6 +644,7 @@ div.sheet-puissance > button[type="roll"] } div.sheet-initiative > button[type="roll"]::before, +div.sheet-pareFeu > div > button[type="roll"]::before, div.sheet-puissance > button[type="roll"]::before { font-family:dicefontd6; @@ -705,6 +730,7 @@ div.sheet-heroisme > div:nth-of-type(1) div.sheet-heroisme > div:nth-of-type(1) > input[type="hidden"][value="0"] ~ span:nth-of-type(7), div.sheet-heroisme > div:nth-of-type(1) > input[type="hidden"][value="0"] ~ span:nth-of-type(9), +div.sheet-heroisme > div:nth-of-type(1) > input[type="hidden"][value="1"] ~ span:nth-of-type(5), div.sheet-heroisme > div:nth-of-type(1) > input[type="hidden"][value="1"] ~ span:nth-of-type(6), div.sheet-heroisme > div:nth-of-type(1) > input[type="hidden"][value="1"] ~ span:nth-of-type(8) { @@ -1003,6 +1029,7 @@ div.sheet-PV > div:nth-of-type(2), div.sheet-PV > div:nth-of-type(3), div.sheet-connexion > div:nth-of-type(1), div.sheet-initiative > div:nth-of-type(1), +div.sheet-pareFeu > div:nth-of-type(1) > div:nth-of-type(1), div.sheet-defense > div:nth-of-type(1), div.sheet-heroisme > div:nth-of-type(2), div.sheet-PVPNJ > div:nth-of-type(1), @@ -1017,6 +1044,7 @@ div.sheet-PV > div:nth-of-type(3) > label, div.sheet-connexion > div:nth-of-type(1) > label, div.sheet-initiative > div:nth-of-type(1) > label, div.sheet-defense > div:nth-of-type(1) > label, +div.sheet-pareFeu > div:first-of-type > div:nth-of-type(1) > label, div.sheet-heroisme > div:nth-of-type(2) > label, div.sheet-PVPNJ > div:nth-of-type(1) > label, div.sheet-puissance > div:nth-of-type(1) > label @@ -1032,6 +1060,7 @@ div.sheet-PV > div:nth-of-type(3) > div, div.sheet-connexion > div:nth-of-type(1) > div, div.sheet-initiative > div:nth-of-type(1) > div, div.sheet-defense > div:nth-of-type(1) > div, +div.sheet-pareFeu > div:nth-of-type(1) > div:nth-of-type(1) > div, div.sheet-heroisme > div:nth-of-type(2) > div, div.sheet-pareFeu > div:nth-of-type(2), div.sheet-PVPNJ > div:nth-of-type(1) > div, @@ -1046,7 +1075,10 @@ div.sheet-PV > div:nth-of-type(2) > label > input[type="number"], div.sheet-PV > div:nth-of-type(3) > label > input[type="number"], div.sheet-connexion > div:nth-of-type(1) > label > input[type="number"], div.sheet-initiative > div:nth-of-type(1) > label > input[type="number"], +div.sheet-initiative > div:nth-of-type(1) > label > input[type="text"], div.sheet-defense > div:nth-of-type(1) > label > input[type="number"], +div.sheet-pareFeu > div:nth-of-type(1) > div:nth-of-type(1) > label > input[type="number"], +div.sheet-pareFeu > div:nth-of-type(1) > div:nth-of-type(1) > label > input[type="text"], div.sheet-heroisme > div:nth-of-type(2) > label > input[type="number"], div.sheet-PVPNJ > div:nth-of-type(1) > label > input[type="number"], div.sheet-puissance > div:nth-of-type(1) > label > input[type="number"] @@ -1062,8 +1094,9 @@ div.sheet-puissance > div:nth-of-type(1) > label > input[type="number"] div.sheet-PV > div:nth-of-type(3) > label:nth-of-type(1) > input[type="number"], div.sheet-connexion > div:nth-of-type(1) > label:nth-of-type(1) > input[type="number"], -div.sheet-initiative > div:nth-of-type(1) > label:nth-of-type(1) > input[type="number"], +div.sheet-initiative > div:nth-of-type(1) > label:nth-of-type(1) > input[type="text"], div.sheet-defense > div:nth-of-type(1) > label:nth-of-type(1) > input[type="number"], +div.sheet-pareFeu > div:nth-of-type(1) > div:nth-of-type(1) > label:nth-of-type(1) > input[type="text"], div.sheet-heroisme > div:nth-of-type(2) > label:nth-of-type(1) > input[type="number"], div.sheet-PVPNJ > div:nth-of-type(1) > label:nth-of-type(1) > input[type="number"], div.sheet-puissance > div:nth-of-type(1) > label:nth-of-type(1) > input[type="number"] @@ -1077,6 +1110,7 @@ div.sheet-PV > div:nth-of-type(2) > label > span, div.sheet-PV > div:nth-of-type(3) > label > span, div.sheet-connexion > div:nth-of-type(1) > label > span, div.sheet-initiative > div:nth-of-type(1) > label > span, +div.sheet-pareFeu > div:nth-of-type(1) > div:nth-of-type(1) > label > span, div.sheet-defense > div:nth-of-type(1) > label > span, div.sheet-heroisme > div:nth-of-type(2) > label > span, div.sheet-pareFeu > div:nth-of-type(3) > span, @@ -1095,6 +1129,7 @@ div.sheet-PV > div:nth-of-type(3) > label:nth-of-type(1) > span, div.sheet-connexion > div:nth-of-type(1) > label:nth-of-type(1) > span, div.sheet-initiative > div:nth-of-type(1) > label:nth-of-type(1) > span, div.sheet-defense > div:nth-of-type(1) > label:nth-of-type(1) > span, +div.sheet-pareFeu > div:nth-of-type(1) > div:nth-of-type(1) > label:nth-of-type(1) > span, div.sheet-heroisme > div:nth-of-type(2) > label:nth-of-type(1) > span, div.sheet-PV > div:nth-of-type(1) > label:nth-of-type(1) > span, div.sheet-PVPNJ > div:nth-of-type(1) > label:nth-of-type(1) > span, @@ -1292,14 +1327,20 @@ div.sheet-vehicule > span padding-left:2px; } -div.sheet-armement > span:nth-of-type(1), -div.sheet-armementPNJ > span:nth-of-type(1) +div.sheet-armement > span:nth-of-type(1) { - width:calc(100% - 20px - 45px - 45px - 250px - 225px - 25px); + width:calc(100% - 20px - 45px - 45px - (135px*2) - 25px - 150px); padding-left:20px; justify-content:left; } +div.sheet-armementPNJ > span:nth-of-type(1) +{ + width: calc(100% - 20px - 45px - 45px - 250px - 225px - 25px); + padding-left: 20px; + justify-content: left; +} + div.sheet-protection > span:nth-of-type(1) { width:calc(100% - 45px - 200px - 270px - 20px); @@ -1307,22 +1348,31 @@ div.sheet-protection > span:nth-of-type(1) padding-left:2px; } -div.sheet-armement > span:nth-of-type(2), -div.sheet-armementPNJ > span:nth-of-type(2), +div.sheet-armement > span:nth-of-type(2) +{ + width:150px; +} + div.sheet-armement > span:nth-of-type(3), +div.sheet-armementPNJ > span:nth-of-type(2), +div.sheet-armement > span:nth-of-type(4), div.sheet-armementPNJ > span:nth-of-type(3), div.sheet-protection > span:nth-of-type(2) { width:45px; } -div.sheet-armement > span:nth-of-type(4), +div.sheet-armement > span:nth-of-type(5), +div.sheet-armement > span:nth-of-type(6) +{ + width:135px; +} + div.sheet-armementPNJ > span:nth-of-type(4) { width:250px; } -div.sheet-armement > span:nth-of-type(5), div.sheet-armementPNJ > span:nth-of-type(5) { width:225px; @@ -1434,7 +1484,13 @@ div.sheet-protection > .repcontainer > .repitem > input[type="number"] border-color:black; } -div.sheet-armement > .repcontainer > .repitem > select, +div.sheet-armement > .repcontainer > .repitem > select +{ + width:150px; + padding-left:2px; + height:20px; +} + div.sheet-armementPNJ > .repcontainer > .repitem > input[type="text"]:nth-of-type(1) { width:calc(100% - 20px - 45px - 45px - 250px - 225px - 25px); @@ -1457,20 +1513,30 @@ div.sheet-protection > .repcontainer > .repitem > input[type="number"] text-align:center; } -div.sheet-armement > .repcontainer > .repitem > input[type="text"]:not(:nth-of-type(1)), -div.sheet-armementPNJ > .repcontainer > .repitem > input[type="text"]:not(:nth-of-type(1)) +div.sheet-armement > .repcontainer > .repitem > input[type="text"]:not(:nth-of-type(1)) { width:200px; } -div.sheet-armement > .repcontainer > .repitem > input[type="text"]:nth-of-type(3), -div.sheet-armementPNJ > .repcontainer > .repitem > input[type="text"]:nth-of-type(3) +div.sheet-armement > .repcontainer > .repitem > input[type="text"]:nth-of-type(1) +{ + width:calc(100% - 20px - 45px - 45px - (135px*2) - 25px - 150px); + padding-left:2px; + margin-left:-5px; +} + +div.sheet-armement > .repcontainer > .repitem > input[type="text"]:nth-of-type(4), +div.sheet-armement > .repcontainer > .repitem > input[type="text"]:nth-of-type(5) +{ + width:135px; +} + +div.sheet-armementPNJ > .repcontainer > .repitem > input[type="text"]:nth-of-type(4) { width:250px; } -div.sheet-armement > .repcontainer > .repitem > input[type="text"]:nth-of-type(4), -div.sheet-armementPNJ > .repcontainer > .repitem > input[type="text"]:nth-of-type(4) +div.sheet-armementPNJ > .repcontainer > .repitem > input[type="text"]:nth-of-type(5) { width:225px; } @@ -2061,6 +2127,7 @@ div.sheet-parametresJets > div > label:nth-of-type(2) > select display:flex; width:100%; justify-content:center; + text-align:center; font-size:18px; font-weight:bold; font-variant:small-caps; diff --git a/Nanochrome/NanoChrome.html b/Nanochrome/NanoChrome.html index 2977cd5074..6bf86a40cc 100644 --- a/Nanochrome/NanoChrome.html +++ b/Nanochrome/NanoChrome.html @@ -922,6 +922,44 @@ }); }); + on("change:intelligence change:initiative_bonusD6 change:initiative_bonusDes sheet:opened", function() + { + getAttrs(["intelligence", "initiative_bonusD6", "initiative_bonusDes"], function(values) + { + var intel = parseInt(values["intelligence"], 10)||0; + var bonus = parseInt(values["initiative_bonusD6"], 10)||0; + var D6 = parseInt(values["initiative_bonusDes"], 10)||0; + + var dice = 3; + dice += D6; + + var total = intel+bonus; + + setAttrs({ + initiative:dice+"D6+"+total + }); + }); + }); + + on("change:puissancePNJ change:initiativePNJ_bonus change:initiativePNJ_bonusDes sheet:opened", function() + { + getAttrs(["puissancePNJ", "initiativePNJ_bonus", "initiativePNJ_bonusDes"], function(values) + { + var puissance = parseInt(values["puissancePNJ"], 10)||0; + var bonus = parseInt(values["initiativePNJ_bonus"], 10)||0; + var D6 = parseInt(values["initiativePNJ_bonusDes"], 10)||0; + + var dice = 3; + dice += D6; + + var total = puissance+bonus; + + setAttrs({ + initiativePNJ:dice+"D6+"+total + }); + }); + }); + on("change:version", function() { getAttrs(["version"], function(values) @@ -950,6 +988,7 @@ }); }); +