diff --git a/Dragon Warriors/Dragon Warriors Revised.css b/Dragon Warriors/Dragon Warriors Revised.css index d98e58f5c2..e85ef4d0a9 100644 --- a/Dragon Warriors/Dragon Warriors Revised.css +++ b/Dragon Warriors/Dragon Warriors Revised.css @@ -12,7 +12,6 @@ select width: 8em; background-color: #F5F5F5; font-family: 'Almendra SC', serif; - } textarea @@ -23,13 +22,13 @@ textarea background-color: #F5F5F5; } -Input[type=number] +number { font-family: 'Almendra SC', serif; background-color: #F5F5F5; } -Input[type=text] +text { width: 9em; font-family: 'Almendra SC', serif; @@ -65,6 +64,7 @@ input.sheet-twelvemidlongtextinput } .sheet-main { + font-family: 'Almendra SC', serif; min-width: 850px; border: 20px solid transparent; padding: 1px; @@ -73,6 +73,606 @@ input.sheet-twelvemidlongtextinput background-color: #DCDCDC; } +/* Configure the button styling. This example makes it look like a radio. */ +button.sheet-sdot { + padding: 0; + border: solid 1px #a8a8a8; + margin-left: 6px; + margin-bottom:3px; + cursor: pointer; + width: 14px; + height: 14px; + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; +} + +button.sheet-sdot > span { + width: 6px; + height: 6px; + border-radius: 50%; + background: buttontext; +} + +button.sheet-mdot { + padding: 0; + border: solid 1px #a8a8a8; + margin-left: 6px; + margin-bottom:3px; + cursor: pointer; + width: 14px; + height: 14px; + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; +} + +button.sheet-mdot > span { + width: 6px; + height: 6px; + border-radius: 50%; + background: buttontext; +} + +button.sheet-m2dot { + padding: 0; + border: solid 1px #a8a8a8; + margin-left: 6px; + margin-bottom:3px; + cursor: pointer; + width: 14px; + height: 14px; + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; +} + +button.sheet-m2dot > span { + width: 6px; + height: 6px; + border-radius: 50%; + background: buttontext; +} +button.sheet-m3dot { + padding: 0; + border: solid 1px #a8a8a8; + margin-left: 6px; + margin-bottom:3px; + cursor: pointer; + width: 14px; + height: 14px; + border-radius: 50%; + display: flex; + justify-content: center; + align-items: center; +} + +button.sheet-m3dot > span { + width: 6px; + height: 6px; + border-radius: 50%; + background: buttontext; +} + +/* Hide the "checked" section of the radio if the hidden attribute value is greater than the button value */ + input.sheet-sdot[value="0"] ~ button.sheet-gt-0 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="1"] ~ button.sheet-gt-1 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="2"] ~ button.sheet-gt-2 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="3"] ~ button.sheet-gt-3 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="4"] ~ button.sheet-gt-4 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="5"] ~ button.sheet-gt-5 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="6"] ~ button.sheet-gt-6 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="7"] ~ button.sheet-gt-7 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="8"] ~ button.sheet-gt-8 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="9"] ~ button.sheet-gt-9 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="10"] ~ button.sheet-gt-10 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="11"] ~ button.sheet-gt-11 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="12"] ~ button.sheet-gt-12 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="13"] ~ button.sheet-gt-13 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="14"] ~ button.sheet-gt-14 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="15"] ~ button.sheet-gt-15 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="16"] ~ button.sheet-gt-16 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="17"] ~ button.sheet-gt-17 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="18"] ~ button.sheet-gt-18 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="19"] ~ button.sheet-gt-19 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="20"] ~ button.sheet-gt-20 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="21"] ~ button.sheet-gt-21 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="22"] ~ button.sheet-gt-22 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="23"] ~ button.sheet-gt-23 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="24"] ~ button.sheet-gt-24 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="25"] ~ button.sheet-gt-25 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="26"] ~ button.sheet-gt-26 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="27"] ~ button.sheet-gt-27 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="28"] ~ button.sheet-gt-28 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="29"] ~ button.sheet-gt-29 > span.sheet-checked { + display: none; + } + input.sheet-sdot[value="30"] ~ button.sheet-gt-30 > span.sheet-checked { + display: none; + } + + input.sheet-sbody[value="0"] ~ button.sheet-gt-0, + input.sheet-sbody[value="1"] ~ button.sheet-gt-1, + input.sheet-sbody[value="2"] ~ button.sheet-gt-2, + input.sheet-sbody[value="3"] ~ button.sheet-gt-3, + input.sheet-sbody[value="4"] ~ button.sheet-gt-4, + input.sheet-sbody[value="5"] ~ button.sheet-gt-5, + input.sheet-sbody[value="6"] ~ button.sheet-gt-6, + input.sheet-sbody[value="7"] ~ button.sheet-gt-7, + input.sheet-sbody[value="8"] ~ button.sheet-gt-8, + input.sheet-sbody[value="9"] ~ button.sheet-gt-9, + input.sheet-sbody[value="10"] ~ button.sheet-gt-10, + input.sheet-sbody[value="11"] ~ button.sheet-gt-11, + input.sheet-sbody[value="12"] ~ button.sheet-gt-12, + input.sheet-sbody[value="13"] ~ button.sheet-gt-13, + input.sheet-sbody[value="14"] ~ button.sheet-gt-14, + input.sheet-sbody[value="15"] ~ button.sheet-gt-15, + input.sheet-sbody[value="16"] ~ button.sheet-gt-16, + input.sheet-sbody[value="17"] ~ button.sheet-gt-17, + input.sheet-sbody[value="18"] ~ button.sheet-gt-18, + input.sheet-sbody[value="19"] ~ button.sheet-gt-19, + input.sheet-sbody[value="20"] ~ button.sheet-gt-20, + input.sheet-sbody[value="21"] ~ button.sheet-gt-21, + input.sheet-sbody[value="22"] ~ button.sheet-gt-22, + input.sheet-sbody[value="23"] ~ button.sheet-gt-23, + input.sheet-sbody[value="24"] ~ button.sheet-gt-24, + input.sheet-sbody[value="25"] ~ button.sheet-gt-25, + input.sheet-sbody[value="26"] ~ button.sheet-gt-26, + input.sheet-sbody[value="27"] ~ button.sheet-gt-27, + input.sheet-sbody[value="28"] ~ button.sheet-gt-28, + input.sheet-sbody[value="29"] ~ button.sheet-gt-29, + input.sheet-sbody[value="30"] ~ button.sheet-gt-30{ + display: none; + } + + input.sheet-mdot[value="0"] ~ button.sheet-mt-0 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="1"] ~ button.sheet-mt-1 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="2"] ~ button.sheet-mt-2 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="3"] ~ button.sheet-mt-3 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="4"] ~ button.sheet-mt-4 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="5"] ~ button.sheet-mt-5 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="6"] ~ button.sheet-mt-6 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="7"] ~ button.sheet-mt-7 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="8"] ~ button.sheet-mt-8 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="9"] ~ button.sheet-mt-9 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="10"] ~ button.sheet-mt-10 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="11"] ~ button.sheet-mt-11 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="12"] ~ button.sheet-mt-12 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="13"] ~ button.sheet-mt-13 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="14"] ~ button.sheet-mt-14 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="15"] ~ button.sheet-mt-15 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="16"] ~ button.sheet-mt-16 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="17"] ~ button.sheet-mt-17 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="18"] ~ button.sheet-mt-18 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="19"] ~ button.sheet-mt-19 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="20"] ~ button.sheet-mt-20 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="21"] ~ button.sheet-mt-21 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="22"] ~ button.sheet-mt-22 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="23"] ~ button.sheet-mt-23 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="24"] ~ button.sheet-mt-24 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="25"] ~ button.sheet-mt-25 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="26"] ~ button.sheet-mt-26 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="27"] ~ button.sheet-mt-27 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="28"] ~ button.sheet-mt-28 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="29"] ~ button.sheet-mt-29 > span.sheet-checked { + display: none; + } + input.sheet-mdot[value="30"] ~ button.sheet-mt-30 > span.sheet-checked { + display: none; + } + + input.sheet-mbody[value="0"] ~ button.sheet-mt-0, + input.sheet-mbody[value="1"] ~ button.sheet-mt-1, + input.sheet-mbody[value="2"] ~ button.sheet-mt-2, + input.sheet-mbody[value="3"] ~ button.sheet-mt-3, + input.sheet-mbody[value="4"] ~ button.sheet-mt-4, + input.sheet-mbody[value="5"] ~ button.sheet-mt-5, + input.sheet-mbody[value="6"] ~ button.sheet-mt-6, + input.sheet-mbody[value="7"] ~ button.sheet-mt-7, + input.sheet-mbody[value="8"] ~ button.sheet-mt-8, + input.sheet-mbody[value="9"] ~ button.sheet-mt-9, + input.sheet-mbody[value="10"] ~ button.sheet-mt-10, + input.sheet-mbody[value="11"] ~ button.sheet-mt-11, + input.sheet-mbody[value="12"] ~ button.sheet-mt-12, + input.sheet-mbody[value="13"] ~ button.sheet-mt-13, + input.sheet-mbody[value="14"] ~ button.sheet-mt-14, + input.sheet-mbody[value="15"] ~ button.sheet-mt-15, + input.sheet-mbody[value="16"] ~ button.sheet-mt-16, + input.sheet-mbody[value="17"] ~ button.sheet-mt-17, + input.sheet-mbody[value="18"] ~ button.sheet-mt-18, + input.sheet-mbody[value="19"] ~ button.sheet-mt-19, + input.sheet-mbody[value="20"] ~ button.sheet-mt-20, + input.sheet-mbody[value="21"] ~ button.sheet-mt-21, + input.sheet-mbody[value="22"] ~ button.sheet-mt-22, + input.sheet-mbody[value="23"] ~ button.sheet-mt-23, + input.sheet-mbody[value="24"] ~ button.sheet-mt-24, + input.sheet-mbody[value="25"] ~ button.sheet-mt-25, + input.sheet-mbody[value="26"] ~ button.sheet-mt-26, + input.sheet-mbody[value="27"] ~ button.sheet-mt-27, + input.sheet-mbody[value="28"] ~ button.sheet-mt-28, + input.sheet-mbody[value="29"] ~ button.sheet-mt-29, + input.sheet-mbody[value="30"] ~ button.sheet-mt-30{ + display: none; + } + + input.sheet-m2dot[value="0"] ~ button.sheet-mt2-0 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="1"] ~ button.sheet-mt2-1 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="2"] ~ button.sheet-mt2-2 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="3"] ~ button.sheet-mt2-3 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="4"] ~ button.sheet-mt2-4 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="5"] ~ button.sheet-mt2-5 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="6"] ~ button.sheet-mt2-6 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="7"] ~ button.sheet-mt2-7 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="8"] ~ button.sheet-mt2-8 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="9"] ~ button.sheet-mt2-9 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="10"] ~ button.sheet-mt2-10 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="11"] ~ button.sheet-mt2-11 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="12"] ~ button.sheet-mt2-12 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="13"] ~ button.sheet-mt2-13 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="14"] ~ button.sheet-mt2-14 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="15"] ~ button.sheet-mt2-15 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="16"] ~ button.sheet-mt2-16 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="17"] ~ button.sheet-mt2-17 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="18"] ~ button.sheet-mt2-18 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="19"] ~ button.sheet-mt2-19 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="20"] ~ button.sheet-mt2-20 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="21"] ~ button.sheet-mt2-21 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="22"] ~ button.sheet-mt2-22 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="23"] ~ button.sheet-mt2-23 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="24"] ~ button.sheet-mt2-24 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="25"] ~ button.sheet-mt2-25 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="26"] ~ button.sheet-mt2-26 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="27"] ~ button.sheet-mt2-27 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="28"] ~ button.sheet-mt2-28 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="29"] ~ button.sheet-mt2-29 > span.sheet-checked { + display: none; + } + input.sheet-m2dot[value="30"] ~ button.sheet-mt2-30 > span.sheet-checked { + display: none; + } + + input.sheet-m2body[value="0"] ~ button.sheet-mt2-0, + input.sheet-m2body[value="1"] ~ button.sheet-mt2-1, + input.sheet-m2body[value="2"] ~ button.sheet-mt2-2, + input.sheet-m2body[value="3"] ~ button.sheet-mt2-3, + input.sheet-m2body[value="4"] ~ button.sheet-mt2-4, + input.sheet-m2body[value="5"] ~ button.sheet-mt2-5, + input.sheet-m2body[value="6"] ~ button.sheet-mt2-6, + input.sheet-m2body[value="7"] ~ button.sheet-mt2-7, + input.sheet-m2body[value="8"] ~ button.sheet-mt2-8, + input.sheet-m2body[value="9"] ~ button.sheet-mt2-9, + input.sheet-m2body[value="10"] ~ button.sheet-mt2-10, + input.sheet-m2body[value="11"] ~ button.sheet-mt2-11, + input.sheet-m2body[value="12"] ~ button.sheet-mt2-12, + input.sheet-m2body[value="13"] ~ button.sheet-mt2-13, + input.sheet-m2body[value="14"] ~ button.sheet-mt2-14, + input.sheet-m2body[value="15"] ~ button.sheet-mt2-15, + input.sheet-m2body[value="16"] ~ button.sheet-mt2-16, + input.sheet-m2body[value="17"] ~ button.sheet-mt2-17, + input.sheet-m2body[value="18"] ~ button.sheet-mt2-18, + input.sheet-m2body[value="19"] ~ button.sheet-mt2-19, + input.sheet-m2body[value="20"] ~ button.sheet-mt2-20, + input.sheet-m2body[value="21"] ~ button.sheet-mt2-21, + input.sheet-m2body[value="22"] ~ button.sheet-mt2-22, + input.sheet-m2body[value="23"] ~ button.sheet-mt2-23, + input.sheet-m2body[value="24"] ~ button.sheet-mt2-24, + input.sheet-m2body[value="25"] ~ button.sheet-mt2-25, + input.sheet-m2body[value="26"] ~ button.sheet-mt2-26, + input.sheet-m2body[value="27"] ~ button.sheet-mt2-27, + input.sheet-m2body[value="28"] ~ button.sheet-mt2-28, + input.sheet-m2body[value="29"] ~ button.sheet-mt2-29, + input.sheet-m2body[value="30"] ~ button.sheet-mt2-30{ + display: none; + } + + + input.sheet-m3dot[value="0"] ~ button.sheet-mt3-0 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="1"] ~ button.sheet-mt3-1 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="2"] ~ button.sheet-mt3-2 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="3"] ~ button.sheet-mt3-3 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="4"] ~ button.sheet-mt3-4 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="5"] ~ button.sheet-mt3-5 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="6"] ~ button.sheet-mt3-6 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="7"] ~ button.sheet-mt3-7 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="8"] ~ button.sheet-mt3-8 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="9"] ~ button.sheet-mt3-9 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="10"] ~ button.sheet-mt3-10 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="11"] ~ button.sheet-mt3-11 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="12"] ~ button.sheet-mt3-12 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="13"] ~ button.sheet-mt3-13 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="14"] ~ button.sheet-mt3-14 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="15"] ~ button.sheet-mt3-15 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="16"] ~ button.sheet-mt3-16 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="17"] ~ button.sheet-mt3-17 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="18"] ~ button.sheet-mt3-18 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="19"] ~ button.sheet-mt3-19 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="20"] ~ button.sheet-mt3-20 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="21"] ~ button.sheet-mt3-21 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="22"] ~ button.sheet-mt3-22 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="23"] ~ button.sheet-mt3-23 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="24"] ~ button.sheet-mt3-24 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="25"] ~ button.sheet-mt3-25 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="26"] ~ button.sheet-mt3-26 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="27"] ~ button.sheet-mt3-27 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="28"] ~ button.sheet-mt3-28 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="29"] ~ button.sheet-mt3-29 > span.sheet-checked { + display: none; + } + input.sheet-m3dot[value="30"] ~ button.sheet-mt3-30 > span.sheet-checked { + display: none; + } + + input.sheet-m3body[value="0"] ~ button.sheet-mt3-0, + input.sheet-m3body[value="1"] ~ button.sheet-mt3-1, + input.sheet-m3body[value="2"] ~ button.sheet-mt3-2, + input.sheet-m3body[value="3"] ~ button.sheet-mt3-3, + input.sheet-m3body[value="4"] ~ button.sheet-mt3-4, + input.sheet-m3body[value="5"] ~ button.sheet-mt3-5, + input.sheet-m3body[value="6"] ~ button.sheet-mt3-6, + input.sheet-m3body[value="7"] ~ button.sheet-mt3-7, + input.sheet-m3body[value="8"] ~ button.sheet-mt3-8, + input.sheet-m3body[value="9"] ~ button.sheet-mt3-9, + input.sheet-m3body[value="10"] ~ button.sheet-mt3-10, + input.sheet-m3body[value="11"] ~ button.sheet-mt3-11, + input.sheet-m3body[value="12"] ~ button.sheet-mt3-12, + input.sheet-m3body[value="13"] ~ button.sheet-mt3-13, + input.sheet-m3body[value="14"] ~ button.sheet-mt3-14, + input.sheet-m3body[value="15"] ~ button.sheet-mt3-15, + input.sheet-m3body[value="16"] ~ button.sheet-mt3-16, + input.sheet-m3body[value="17"] ~ button.sheet-mt3-17, + input.sheet-m3body[value="18"] ~ button.sheet-mt3-18, + input.sheet-m3body[value="19"] ~ button.sheet-mt3-19, + input.sheet-m3body[value="20"] ~ button.sheet-mt3-20, + input.sheet-m3body[value="21"] ~ button.sheet-mt3-21, + input.sheet-m3body[value="22"] ~ button.sheet-mt3-22, + input.sheet-m3body[value="23"] ~ button.sheet-mt3-23, + input.sheet-m3body[value="24"] ~ button.sheet-mt3-24, + input.sheet-m3body[value="25"] ~ button.sheet-mt3-25, + input.sheet-m3body[value="26"] ~ button.sheet-mt3-26, + input.sheet-m3body[value="27"] ~ button.sheet-mt3-27, + input.sheet-m3body[value="28"] ~ button.sheet-mt3-28, + input.sheet-m3body[value="29"] ~ button.sheet-mt3-29, + input.sheet-m3body[value="30"] ~ button.sheet-mt3-30{ + display: none; + } + + + /*Configure the tab buttons*/ .sheet-character, .sheet-skills, @@ -80,12 +680,11 @@ input.sheet-twelvemidlongtextinput .sheet-magic, .sheet-biographical, .sheet-release, -.sheet-documentation -{ +.sheet-documentation { display: none; - font-family: 'Almendra SC', serif; } + /* show the selected tab */ .sheet-tabstoggle[value="character"] ~ div.sheet-character, .sheet-tabstoggle[value="skills"] ~ div.sheet-skills, @@ -93,15 +692,13 @@ input.sheet-twelvemidlongtextinput .sheet-tabstoggle[value="magic"] ~ div.sheet-magic, .sheet-tabstoggle[value="biographical"] ~ div.sheet-biographical, .sheet-tabstoggle[value="release"] ~ div.sheet-release, -.sheet-tabstoggle[value="documentation"] ~ div.sheet-documentation -{ +.sheet-tabstoggle[value="documentation"] ~ div.sheet-documentation { display: grid; font-family: 'Almendra SC', serif; grid-gap: 5px; } -.sheet-buttonbar -{ +.sheet-buttonbar { display: flex; flex-direction: row; flex-wrap: wrap; @@ -116,18 +713,16 @@ input.sheet-twelvemidlongtextinput } /*define tab pages*/ -.sheet-character -{ +.sheet-character { width: auto; height: auto; font-family: 'Almendra SC', serif; - grid-template-columns: auto; + grid-template-columns: 28% 28% 40%; grid-template-rows: auto; - grid-template-areas: "common common common common common" "attributes atkdefattributes weaponattributes weaponattributes weaponattributes" "attributes atkdefattributes weaponattributes weaponattributes weaponattributes" "attributes evaattribute weaponattributes weaponattributes weaponattributes" "attributes steperattributes weaponattributes weaponattributes weaponattributes" "attributes steperattributes weaponattributes weaponattributes weaponattributes" "hpattributes AFattributes weaponattributes weaponattributes weaponattributes" "hpattributes AFattributes weaponattributes weaponattributes weaponattributes" "hpattributes AFattributes weaponattributes weaponattributes weaponattributes" "hpattributes AFattributes posessionsattributes posessionsattributes posessionsattributes" "professionskillsattributes mamdattributes posessionsattributes posessionsattributes posessionsattributes" "professionskillsattributes mamdattributes posessionsattributes posessionsattributes posessionsattributes" "professionskillsattributes mamdattributes posessionsattributes posessionsattributes posessionsattributes" "professionskillsattributes moneyattributes posessionsattributes posessionsattributes posessionsattributes" "expattributes moneyattributes posessionsattributes posessionsattributes posessionsattributes" "expattributes moneyattributes posessionsattributes posessionsattributes posessionsattributes"; + grid-template-areas: "common common common common common" "attributes atkdefattributes weaponattributes weaponattributes weaponattributes" "attributes atkdefattributes weaponattributes weaponattributes weaponattributes" "attributes evaattribute weaponattributes weaponattributes weaponattributes" "attributes steperattributes weaponattributes weaponattributes weaponattributes" "attributes steperattributes weaponattributes weaponattributes weaponattributes" "hpattributes AFattributes weaponattributes weaponattributes weaponattributes" "hpattributes AFattributes weaponattributes weaponattributes weaponattributes" "hpattributes AFattributes weaponattributes weaponattributes weaponattributes" "hpattributes AFattributes possessionsattributes possessionsattributes possessionsattributes" "mpattributes mamdattributes possessionsattributes possessionsattributes possessionsattributes" "mpattributes moneyattributes possessionsattributes possessionsattributes possessionsattributes" "professionskillsattributes moneyattributes possessionsattributes possessionsattributes possessionsattributes" "professionskillsattributes moneyattributes possessionsattributes possessionsattributes possessionsattributes" "professionskillsattributes moneyattributes possessionsattributes possessionsattributes possessionsattributes" "professionskillsattributes moneyattributes possessionsattributes possessionsattributes possessionsattributes"; } -.sheet-skills -{ +.sheet-skills { width: auto; height: auto; font-family: 'Almendra SC', serif; @@ -136,29 +731,25 @@ input.sheet-twelvemidlongtextinput grid-template-areas: "professionskills" "secondaryskills"; } -.sheet-inventory -{ +.sheet-inventory { width: auto; height: auto; font-family: 'Almendra SC', serif; grid-template-columns: auto; grid-template-rows: auto; - grid-template-areas: "posessions posessions" "money armour" "weapons weapons"; + grid-template-areas: "possessions possessions" "money armour" "weapons weapons" "encumbrance encumbrance"; } -.sheet-magic -{ +.sheet-magic { width: auto; height: auto; font-family: 'Almendra SC', serif; grid-template-columns: auto; grid-template-rows: auto; - grid-template-areas: "sorcerermana mysticmana" "warlockmana elementalistmana" "demonologistmana elementalistmana" "spells spells"; - + grid-template-areas: "manabox" "spellbox"; } -.sheet-biographical -{ +.sheet-biographical { width: auto; height: auto; font-family: 'Almendra SC', serif; @@ -167,8 +758,7 @@ input.sheet-twelvemidlongtextinput grid-template-areas: "basicbio" "modlang" "anclang"; } -.sheet-release -{ +.sheet-release { width: auto; height: auto; font-family: sans-serif; @@ -177,8 +767,7 @@ input.sheet-twelvemidlongtextinput border-width: 6px; } -.sheet-documentation -{ +.sheet-documentation { width: auto; height: auto; font-family: sans-serif; @@ -187,227 +776,215 @@ input.sheet-twelvemidlongtextinput border-width: 6px; } -.sheet-common -{ +/*define pages*/ + +.sheet-common { grid-area: common; font-family: 'Almendra SC', serif; border-style: double; border-width: 6px; - } -.sheet-attributes -{ +.sheet-attributes { grid-area: attributes; font-family: 'Almendra SC', serif; border-style: double; border-width: 6px; } -.sheet-atkdefattributes -{ +.sheet-atkdefattributes { grid-area: atkdefattributes; font-family: 'Almendra SC', serif; border-style: double; border-width: 6px; } -.sheet-evaattribute -{ +.sheet-evaattribute { grid-area: evaattribute; font-family: 'Almendra SC', serif; border-style: double; border-width: 6px; } -.sheet-steperattributes -{ +.sheet-steperattributes { grid-area: steperattributes; font-family: 'Almendra SC', serif; border-style: double; border-width: 6px; } -.sheet-mamdattributes -{ +.sheet-mamdattributes { grid-area: mamdattributes; font-family: 'Almendra SC', serif; border-style: double; border-width: 6px; } -.sheet-hpattributes -{ +.sheet-hpattributes { grid-area: hpattributes; font-family: 'Almendra SC', serif; border-style: double; border-width: 6px; } -.sheet-AFattributes -{ +.sheet-AFattributes { grid-area: AFattributes; font-family: 'Almendra SC', serif; border-style: double; border-width: 6px; } -.sheet-expattributes -{ - grid-area: expattributes; +.sheet-mpattributes { + grid-area: mpattributes; font-family: 'Almendra SC', serif; border-style: double; border-width: 6px; } -.sheet-weaponattributes -{ +.sheet-weaponattributes { grid-area: weaponattributes; font-family: 'Almendra SC', serif; border-style: double; border-width: 6px; } -.sheet-professionskillsattributes -{ +.sheet-professionskillsattributes { grid-area: professionskillsattributes; font-family: 'Almendra SC', serif; border-style: double; border-width: 6px; } -.sheet-posessionsattributes -{ - grid-area: posessionsattributes; +.sheet-possessionsattributes { + grid-area: possessionsattributes; font-family: 'Almendra SC', serif; border-style: double; border-width: 6px; } -.sheet-moneyattributes -{ +.sheet-moneyattributes { grid-area: moneyattributes; font-family: 'Almendra SC', serif; border-style: double; border-width: 6px; } -.sheet-professionskills -{ +.sheet-professionskills { grid-area: professionskills; font-family: 'Almendra SC', serif; border-style: double; border-width: 6px; } -.sheet-secondaryskillssec -{ +.sheet-secondaryskillssec { grid-area: secondaryskills; font-family: 'Almendra SC', serif; border-style: double; border-width: 6px; } -.sheet-posessions -{ - grid-area: posessions; +.sheet-possessions { + grid-area: possessions; font-family: 'Almendra SC', serif; border-style: double; border-width: 6px; } -.sheet-money -{ +.sheet-money { grid-area: money; font-family: 'Almendra SC', serif; border-style: double; border-width: 6px; } -.sheet-armour -{ +.sheet-armour { grid-area: armour; font-family: 'Almendra SC', serif; border-style: double; border-width: 6px; } -.sheet-weapons -{ +.sheet-weapons { grid-area: weapons; font-family: 'Almendra SC', serif; border-style: double; border-width: 6px; } -.sheet-basicbio -{ +.sheet-encumbrance { + grid-area: encumbrance; + font-family: 'Almendra SC', serif; + border-style: double; + border-width: 6px; +} + +.sheet-basicbio { grid-area: basicbio; font-family: 'Almendra SC', serif; border-style: double; border-width: 6px; } -.sheet-modlang -{ - grid-area: modlang; +.sheet-modlang { + grid-area: modlang; font-family: 'Almendra SC', serif; border-style: double; border-width: 6px; } -.sheet-anclang -{ +.sheet-anclang { grid-area: anclang; font-family: 'Almendra SC', serif; border-style: double; border-width: 6px; } -.sheet-sorcerermana -{ - grid-area: sorcerermana; +div.sheet-mana { + display: none; +} + +input.sheet-profession-toggle[value="3"] ~ div.sheet-sorcerermana, +input.sheet-profession-toggle[value="4"] ~ div.sheet-mysticmana, +input.sheet-profession-toggle[value="5"] ~ div.sheet-elementalistmana, +input.sheet-profession-toggle[value="6"] ~ div.sheet-warlockmana, +input.sheet-profession-toggle[value="11"] ~ div.sheet-demonologistmana { + display: block; + font-family: 'Almendra SC', serif; + border-style: double; + border-width: 6px; +} + +div.sheet-spells { + display: none; +} + +input.sheet-profession-toggle[value="3"] ~ div.sheet-list, +input.sheet-profession-toggle[value="4"] ~ div.sheet-list, +input.sheet-profession-toggle[value="5"] ~ div.sheet-list, +input.sheet-profession-toggle[value="6"] ~ div.sheet-list, +input.sheet-profession-toggle[value="11"] ~ div.sheet-list { + display: block; font-family: 'Almendra SC', serif; border-style: double; border-width: 6px; } -.sheet-elementalistmana -{ - grid-area: elementalistmana; - font-family: 'Almendra SC', serif; - border-style: double; - border-width: 6px; +div.sheet-frontmp { + display: none; } -.sheet-mysticmana -{ - grid-area: mysticmana; - font-family: 'Almendra SC', serif; - border-style: double; - border-width: 6px; +input.sheet-profession-toggle[value="3"] ~ div.sheet-sorcmp, +input.sheet-profession-toggle[value="4"] ~ div.sheet-mysticmp, +input.sheet-profession-toggle[value="5"] ~ div.sheet-elementalistmp, +input.sheet-profession-toggle[value="6"] ~ div.sheet-warlockmp, +input.sheet-profession-toggle[value="11"] ~ div.sheet-demonologistmp { + display: block; + font-family: 'Almendra SC', serif; } -.sheet-warlockmana -{ - grid-area: warlockmana; - font-family: 'Almendra SC', serif; - border-style: double; - border-width: 6px; -} - -.sheet-demonologistmana -{ - grid-area: demonologistmana; - font-family: 'Almendra SC', serif; - border-style: double; - border-width: 6px; -} - -.sheet-spells -{ - grid-area: spells; - font-family: 'Almendra SC', serif; - border-style: double; - border-width: 6px; -} +.sheet-dots { + display: flex; + flex-wrap: wrap; + justify-content: left; + font-family: 'Almendra SC', serif; +} \ No newline at end of file diff --git a/Dragon Warriors/Dragon Warriors Revised.html b/Dragon Warriors/Dragon Warriors Revised.html index 78bc984d76..44fd080eb2 100644 --- a/Dragon Warriors/Dragon Warriors Revised.html +++ b/Dragon Warriors/Dragon Warriors Revised.html @@ -1,439 +1,1577 @@
-
- - - - - - - - -
+
+ + + + + + + + +
+ + +
+
+ +
+
+ + + + + +
+
+ + +
+
+ +
+
+ + +
+
+ + +
+
+ + +
+ + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ + + +
+
+ +
+ + ABR + Dmg +
+
+
+ +
+ +
+ +
+ +
+
+
+ + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+ + +
+
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + +
+ +
+
+
+ +
+ +
+
+
+ + + + + +
+
+ +
+
+ +
+ Skill + Description

+
+
+
+ +
+ Skill + Level

+ Description

+
+
+
-
-
- -
- -
-

-

-

-

- -
- -
-

- -
- -
- -
- -
-

- -
- -
-

- -
- -
- - -

-

-

-
- -
-

-

- -
- -
- -
- -
- -
- Type - ABR - Dmg

-
-
- -
- -
- -
-
- -
- -
- -
-
- -
-

-

-

-
-
- -
-
- -
- Skill

- Description

-
-
- -
- -
- Skill - Level

- Description

-
-
-
- -
-
- - Item - Location - Encumberance -
- Item - Location - Encumberance -
- - +
+
+ +
+ Item + Location + Quantity + Encumbrance +
+
+
+ + + + +
+
+ + + + + + +
+
+ +
+ + Armour Bypass Roll + Damage + Short + Medium + Long + +
+ + +
+ Ammunition Type + Quantity +
+
+
+ + +
+
-
- -
- - - - -
- - -
- - - - - - -
- -
- -
- - Armour Bypass Roll - Damage - Short - Medium - Long -
-
-
- -
-
- - -
- -
- - -
- -
- - -
- -
- - - - - - - -
- -
- - - -
- -
- -
- Name - Range - Duration

- Description

-
- -
- Name - Range - Duration

- Description

-
- -
- Name - Range - Duration

- Description

-
- -
- Name - Range - Duration

- Description

-
- -
- Name - Range - Duration

- Description

-
- -
- Name - Range - Duration

- Description

-
- -
- Name - Range - Duration

- Description

-
- -
- Name - Range - Duration

- Description

-
- -
- Name - Range - Duration

- Description

-
- -
- Name - Range - Duration

- Description

-
-
-
- -
-
- - - - - - - - - Description

- Biography

-
- -
- -
- Language +
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+
+ + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + +
+ + + + +
+ +
+ + + +
+
+
+ +
+ +
+ Name + Range + Duration

+ Description

+
+ +
+ Name + Range + Duration

+ Description

+
+ +
+ Name + Range + Duration

+ Description

+
+ +
+ Name + Range + Duration

+ Description

+
+ +
+ Name + Range + Duration

+ Description

+
+ +
+ Name + Range + Duration

+ Description

+
+ +
+ Name + Range + Duration

+ Description

+
+ +
+ Name + Range + Duration

+ Description

+
+ +
+ Name + Range + Duration

+ Description

+
+ +
+ Name + Range + Duration

+ Description

+
+
+
+
- - Fluency Level - Literate? - Script - -
-
- -
- Language - Fluency Level - Literate? - Script -
-
- +
+
+ + + + + + + + + Description

+ Biography

+
+
+ +
+ Language + Fluency Level + Literate? + Script +
+
+
+ +
+ Language + Fluency Level + Literate? + Script +
+
+
- -
-

Release Notes

- -

Fixed Ancient Languages buttons to be accurately labeled.

-

Ver 1.0

- -

Autocalc to round off weight of coins (not working) and then Autocalc Total Encumberance.

-

Show/hide magic sections depending on class selected on dropdown list.

-

Move release notes and documentation to bottom of page?

-

Change input fields font to Almendra

-
- -
-

At Serpent King Games, we’re fans of Dragon Warriors as well as the current publishers of the game. We recognise the essential contribution that fans have made in keeping interest in the game alive over the past three decades or so. We are very happy to see additions to the Dragon Warriors setting, in the form of free fan-made websites or other internet-based content such as free e-books or e-zines. However, it is essential that all Dragon Warriors fan sites adhere to the following Fan Policy:

- -

1. Fan websites (or e-books, e-zines, etc.) must not be commercial enterprises. We have no objection to a fan site covering its costs through the use of adverts or similar, but you must not charge people to download or access fan-made material based on the Dragon Warriors setting.

- -

2. Fan websites(or e-books, e-zines, etc.) are explicitly NOT permitted to reprint copyright material, including such items as art, character professions, monsters, or adventures that have been printed by Serpent King Games or other official Dragon Warriors publishers.

- -

3. You may reference names, places, etc. from the Dragon Warriors setting.

- -

4. All fan websites (or e-books, e-zines, etc.) must include the following text, in legible form, on the front page or on the first page that refers to Dragon Warriors or Legend:

- -

“This website includes material based on the Dragon Warriors setting, as created by and copyright (c) Dave Morris and Oliver Johnson, and used according to the terms of the Serpent King Games Fan Policy. We are not permitted to charge you to use or access this content. This website is not published, endorsed, or officially approved by Serpent King Games. For more information about Dragon Warriors products and Serpent King Games, please visit www.serpentking.com”

- -

5. We expect fan websites (or e-books, e-zines, etc.) to use the Dragon Warriors setting responsibly and legally. That means avoiding associating the setting with extreme graphic violence, explicit sexual content, hate speech against any particular real-world segment of society, or anything else that does not present Dragon Warriors in a positive light.

- -

If you have any questions about the Fan Policy, please email info@serpentking.com

-
+
+ + + +

Missing Languages added

+

Slight remodel of the front page to incorporate new elements

+

Sheet Worker now rounds off encumberance, and calculates total (including equipment, coins, weapons and shield) and maximum encumbrance values

+

Added a quantity field for inventory items

+

Added an ammunition section underneath the Weapons

+

Wounds checkboxes have been updated, the number of radioboxes available is set to equal a character's max HP. The sheet can calculate remaining HP based on the wounds counter.

+

Show/hide magic sections (front page and magic page) dependant on profession selected from the dropdown list

+

Major code tidy up

+

+ +

None known, let me know if you see one so I can squash it!

+ Features still to add: +

Change input fields font to Almendra

+

Sheet roll templates for attribute checks and other basic functions

+
+ +
+

This character sheet includes material based on the Dragon Warriors setting, as created by and copyright (c) Dave Morris and Oliver Johnson, and used according to the terms of the Serpent King Games Fan Policy. We are not permitted to charge you to use or access this content. This character sheet is not published, endorsed, or officially approved by Serpent King Games. For more information about Dragon Warriors products and Serpent King Games, please visit www.serpentking.com

+

Serpent King Games expects you to use the Dragon Warriors setting responsibly and legally. That means avoiding associating the setting with extreme graphic violence, explicit sexual content, hate speech against any particular real-world segment of society, or anything else that does not present Dragon Warriors in a positive light.

+

If you have any questions about Dragon Warriors, or the conditions of use of this character sheet, please email info@serpentking.com

+
+ + on("change:strength sheet:opened", function() { + getAttrs(["strength"], function(value) { + let strength = parseInt(value.strength)||0; + if (strength < 6) { + ev = 6; + } else if (strength < 9) { + ev = 8; + } else if (strength < 13) { + ev = 10; + } else if (strength < 16) { + ev = 12; + } else { + ev = 14; + } + setAttrs({ + maxenc: ev + }); + }); + }); + + const woundValues = ["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30"]; + woundValues.forEach(function(value) { + on(`clicked:wound_${value}`, function() { + setAttrs({ + "wound":value + }); + }); + }); + + const manausedValues = ["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30"]; + manausedValues.forEach(function(value) { + on(`clicked:manaused_${value}`, function() { + setAttrs({ + "manaused":value + }); + }); + }); + + const secmanausedValues = ["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30"]; + secmanausedValues.forEach(function(value) { + on(`clicked:secmanaused_${value}`, function() { + setAttrs({ + "secmanaused":value + }); + }); + }); + + const termanausedValues = ["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30"]; + termanausedValues.forEach(function(value) { + on(`clicked:termanaused_${value}`, function() { + setAttrs({ + "termanaused":value + }); + }); + }); + + on("clicked:wound_reset", function() { + setAttrs({ + "wound": 0 + }); + }); + + on("clicked:mp_reset", function() { + setAttrs({ + "manaused": 0 + }); + }); + + on("clicked:mpele_reset", function() { + setAttrs({ + "manaused": 0, + "secmanaused": 0, + "termanaused": 0 + }); + }); + + + on("change:gc change:sf change:cp sheet:opened", function() { + getAttrs(["gc","sf", "cp"], function(value) { + let gc = parseFloat(value.GC)||0; + let sf = parseFloat(value.SF)||0; + let cp = parseFloat(value.CP)||0; + let cw = gc + sf; + setAttrs({ + coinweight: cw + }); + }); + }); + + + const repeatingSum = (destinations, section, fields, ...extras) => { + const isNumber = value => parseFloat(value).toString() === value.toString(); + const isOption = value => [...checks.valid, ...checks.roundtypes].includes(value); + const isRounding = value => checks.roundtypes.includes(value); + const isFraction = value => value.includes('/') && !(value.includes(',') || value.includes('|')); + const getTrimmed = value => value.toLowerCase().replace(/\s/g, ''); + const getRounded = (type, value, pow) => (Math[type](value * Math.pow(10, pow)) / Math.pow(10, pow)).toFixed(Math.max(0, pow)); + const getFraction = (value) => /*{ console.log(`value: ${value}`); */ + parseInt(value.split('/')[0]) / parseInt(value.split('/')[1]); + const getMultiplier = (value, rounding = 1) => 'undefined' === typeof value ? (rounding ? 0: 1) : ( + isNumber(value) ? parseFloat(value) : (isFraction(value) ? getFraction(value) : value)); + if (!Array.isArray(destinations)) destinations = [getTrimmed(destinations)]; + if (!Array.isArray(fields)) fields = [getTrimmed(fields)]; + const fields_trimmed = fields.map(field => getTrimmed(field).split(':')[0]); + const subfields = fields_trimmed.slice(0,destinations.length); + const checks = { valid: ['multiplier'], roundtypes: ['ceil', 'round', 'floor'] }; + let properties = {attributes: {}, options: {}}; + extras.forEach(extra => { + const [prop, v] = getTrimmed(extra).split(':'); + const multiplier_maybe = getMultiplier(v, isRounding(prop)); + const obj = isNumber(multiplier_maybe) ? subfields.reduce((obj,field) => { + obj[field] = multiplier_maybe; + return obj; + },{}) : multiplier_maybe.split(',').reduce((obj, item) => { + const [stat, value] = item.split('|'); + const multiplier = getMultiplier(value, isRounding(prop)); + obj[stat] = multiplier; + return obj; + }, {}); + properties[isOption(prop) ? 'options' : 'attributes'][prop] = obj; + }); + getSectionIDs(`repeating_${section}`, idArray => { + const attrArray = idArray.reduce((m, id) => [...m, ...(fields_trimmed.map(field => `repeating_${section}_${id}_${field}`))], []); + getAttrs([...attrArray, ...Object.keys(properties.attributes)], v => { + const getValue = (section, id, field) => v[`repeating_${section}_${id}_${field}`] === 'on' ? 1 : parseFloat(v[`repeating_${section}_${id}_${field}`]) || 0; + const commonMultipliers = (fields.length <= destinations.length) ? [] : fields.splice(destinations.length, fields.length - destinations.length); + const output = destinations.reduce((obj, destination, index) => { + let sumTotal = idArray.reduce((total, id) => total + getValue(section, id, fields_trimmed[index]) * commonMultipliers.reduce((subtotal, mult) => subtotal * ((!mult.includes(':') || mult.split(':')[1].split(',').includes(fields_trimmed[index])) ? getValue(section, id, mult.split(':')[0]) : 1), 1), 0); + sumTotal *= (properties.options.hasOwnProperty('multiplier') && Object.keys(properties.options.multiplier).includes(fields_trimmed[index])) ? (parseFloat(properties.options.multiplier[fields_trimmed[index]]) || 0): 1; + sumTotal += Object.entries(properties.attributes).reduce((total, [key, value]) => + total += (value.hasOwnProperty(fields_trimmed[index]) ? parseFloat(v[key] || 0) * (parseFloat(value[fields_trimmed[index]]) || 1): 0) , 0); + checks.roundtypes.forEach(type => { + if (properties.options.hasOwnProperty(type)) { + if (Object.keys(properties.options[type]).includes(fields_trimmed[index])) { + sumTotal = getRounded(type, sumTotal, (+properties.options[type][fields_trimmed[index]] || 0)); + } else if (properties.options[type] == '0' || !isNaN(+properties.options[type] || 'x') ) { + sumTotal = getRounded(type, sumTotal, +properties.options[type]); + } + } + }); + obj[destination] = sumTotal; + return obj; + }, {}); + setAttrs(output); + }); + }); + }; + + on("change:repeating_weapons remove:repeating_weapons sheet:opened", function() { + repeatingSum("totalweapons", "weapons", "weaponweight"); + }); + + on("change:repeating_ammo remove:repeating_ammo sheet:opened", function() { + repeatingSum("ammoweight", "ammo", "ammoqty"); + }); + + on("change:repeating_inventoryitems remove:repeating_inventoryitems change:gc change:sf change:cp change:totalweapons change:ammoweight change:shield sheet:opened", function() { + repeatingSum("totalencumbrance", "inventoryitems", ["inventoryqty", "encumbrancevalue"], "gc:1/150", "sf:1/150", "cp:1/150", "ammoweight:1/12", "totalweapons", "shield", "round"); + }); + \ No newline at end of file diff --git a/Dragon Warriors/Example - clean.png b/Dragon Warriors/Example - clean.png index c30354474a..ae9667ee16 100644 Binary files a/Dragon Warriors/Example - clean.png and b/Dragon Warriors/Example - clean.png differ diff --git a/Dragon Warriors/Example - filled.png b/Dragon Warriors/Example - filled.png index 4bbd7e7e63..a36af8d3b2 100644 Binary files a/Dragon Warriors/Example - filled.png and b/Dragon Warriors/Example - filled.png differ