diff --git a/Shadowrun3e/shadowrun3e.css b/Shadowrun3e/shadowrun3e.css index b18f95b767..fd1ed651e7 100644 --- a/Shadowrun3e/shadowrun3e.css +++ b/Shadowrun3e/shadowrun3e.css @@ -794,6 +794,8 @@ min-width: 0; line-height: 25px; font-size: 10px; } + +.pictos3-button, #sensorexp, #vehiclesensor, .d6-button, @@ -848,6 +850,7 @@ min-width: 0; color: red; } +.charsheet button[type=action].pictos3-button:hover, .charsheet button[type=action].d6-button:hover, .charsheet button[type=action].pictos-custom-button:hover, .charsheet button[type=action].explosive-dice:hover, @@ -866,13 +869,15 @@ min-width: 0; #vehiclesensor, .pictos-button { font-family: 'Pictos'; - } .d6-button { font-family: 'dicefontd6'; } +.pictos3-button { + font-family: 'Pictos Three'; +} /* GENERAL STYLING OF ELEMENTS WITHIN THE SHEET */ .atable { @@ -926,6 +931,7 @@ min-width: 0; /* TEMPLATE sytling*/ +.sheet-rolltemplate-item div.sheet-rtcontainer, .sheet-rolltemplate-info div.sheet-rtcontainer, .sheet-rolltemplate-vehicle div.sheet-rtcontainer, .sheet-rolltemplate-matrix div.sheet-rtcontainer, @@ -974,6 +980,7 @@ min-width: 0; color: black; } +.sheet-rolltemplate-item div.sheet-rtheader, .sheet-rolltemplate-info div.sheet-rtheader, .sheet-rolltemplate-skill div.sheet-rtheader, .sheet-rolltemplate-attribute div.sheet-rtheader { @@ -1001,6 +1008,7 @@ min-width: 0; } .sheet-rolltemplate-info div.sheet-rtrow:nth-child(odd), +.sheet-rolltemplate-item div.sheet-rtrow:nth-child(odd), .sheet-rolltemplate-vehicle div.sheet-rtrow:nth-child(odd), .sheet-rolltemplate-matrix div.sheet-rtrow:nth-child(odd), .sheet-rolltemplate-spell div.sheet-rtrow:nth-child(odd), @@ -1015,6 +1023,7 @@ min-width: 0; } +.sheet-rolltemplate-item div.sheet-rtrow:nth-child(even), .sheet-rolltemplate-info div.sheet-rtrow:nth-child(even), .sheet-rolltemplate-vehicle div.sheet-rtrow:nth-child(even), .sheet-rolltemplate-matrix div.sheet-rtrow:nth-child(even), @@ -1028,6 +1037,7 @@ min-width: 0; .sheet-rolltemplate-spell div.sheet-rtrow:nth-child(even) { background-color: lightgrey; } +.sheet-rolltemplate-item .sheet-numberspan, .sheet-rolltemplate-info .sheet-numberspan, .sheet-rolltemplate-vehicle .sheet-numberspan, .sheet-rolltemplate-matrix .sheet-numberspan, @@ -1047,6 +1057,7 @@ min-width: 0; padding-right: 3px; border: 2px solid rgba(167, 168, 170, 1); } +.sheet-rolltemplate-item .inlinerollresult, .sheet-rolltemplate-info .inlinerollresult, .sheet-rolltemplate-vehicle .inlinerollresult, .sheet-rolltemplate-matrix .inlinerollresult, @@ -1064,6 +1075,8 @@ min-width: 0; border: 2px solid rgba(167, 168, 170, 1); } + +.sheet-rolltemplate-item .inlinerollresult.fullcrit, .sheet-rolltemplate-info .inlinerollresult.fullcrit, .sheet-rolltemplate-vehicle .inlinerollresult.fullcrit, .sheet-rolltemplate-matrix .inlinerollresult.fullcrit, @@ -1078,6 +1091,7 @@ min-width: 0; border: 2px solid #3FB315; } +.sheet-rolltemplate-item .inlinerollresult.fullfail, .sheet-rolltemplate-info .inlinerollresult.fullfail, .sheet-rolltemplate-vehicle .inlinerollresult.fullfail, .sheet-rolltemplate-matrix .inlinerollresult.fullfail, @@ -1092,6 +1106,7 @@ min-width: 0; border: 2px solid #B31515; } +.sheet-rolltemplate-item .inlinerollresult.importantroll, .sheet-rolltemplate-info .inlinerollresult.importantroll, .sheet-rolltemplate-vehicle .inlinerollresult.importantroll, .sheet-rolltemplate-matrix .inlinerollresult.importantroll, @@ -1451,15 +1466,33 @@ melee-table-row input[type="textarea"], text-align: left; grid-template-columns: 25px 25px 80px 100px 45px 40px 40px 40px 40px 50px 25px 25px 25px 25px 40px 50px 40px 40px 40px 30px 1fr; } + +.ammo-table-row [type="number"], +.cyberware-list input[type="number"], +.deck-utilities-special input[type="number"], +.deck-utilities-defensive input[type="number"], +.deck-utilities-offensive input[type="number"], +.deck-utilities-addrow input[type="number"], +.gear-table input[type="number"], +.credsticks input[type="number"], +.securitytally input[type="number"], +.matrix-intruder-tally input[type="number"], +.ic-attributes-table input[type="number"], .edges-table input[type="number"], .skills-table input[type="number"], .melee-table-row input[type="number"], .armorsets-table-row input[type="number"], .weaponfocus-attributes input[type="number"], .foci-table input[type="number"], -.adept-skills-table input[type="number"], .magic-spells-row input[type="number"], -.deck-utilities-addrow input[type="number"], +.adept-skills-table input[type="number"] { + box-sizing: border-box; + width: 100% !important; + height: 100%; + font-size: 12px; + text-align: center; + vertical-align: middle; +} .explosives-table-row input[type="number"], .ranged-table-row input[type="number"] { box-sizing: border-box; @@ -1492,7 +1525,6 @@ melee-table-row input[type="textarea"], .vehicles-table input[type="number"], -.credsticks input[type="number"], .karma-history input[type="number"], .show-weaponmods input[type="number"] { width: 100% !important; @@ -1764,6 +1796,7 @@ melee-table-row input[type="textarea"], } .mediumselect { + justif width: 90px; font-size: 10px; } @@ -1789,6 +1822,17 @@ melee-table-row input[type="textarea"], width: 40px; font-size: 10px; } +.ammo-table-row [type="text"], +.armorsets-table-row [type="text"], +.cyberware-list input[type="text"], +.deck-utilities-defensive input[type="text"], +.deck-utilities-offensive input[type="text"], +.deck-utilities-addrow input[type="text"], +.deck-utilities-special input[type="text"], +.gear-table input[type="text"], +.securitytally input[type="text"], +.matrix-intruder-tally input[type="text"], +.ic-attributes-table input[type="text"], .edges-table input[type="text"], .skills-table input[type="text"], .vehicle-info input[type="text"] { @@ -2239,7 +2283,7 @@ input.enable-fa:not(:checked)~span.show_fa_dice { .matrix-status { align-items: center; display: grid; - grid-template-columns: 30px 185px 25px 85px 35px 155px 70px 35px 200px; + grid-template-columns: 30px 185px 25px 85px 35px 155px 70px 35px 80px 120px; } .matrixalert-format[value="4"]~div.matrix-always-displayed { @@ -2658,13 +2702,10 @@ input.enable-fa:not(:checked)~span.show_fa_dice { grid-template-columns: 300px 250px 250px; column-gap: 20px; } -.gear { - display: grid; - grid-template-columns: 600px; - } + .gear-table { display: grid; - grid-template-columns: 125px 60px 60px 60px 60px 40px 255px; + grid-template-columns: 125px 60px 60px 60px 100px 50px 70px 40px 1fr; row-gap: 20px; } diff --git a/Shadowrun3e/shadowrun3e.html b/Shadowrun3e/shadowrun3e.html index 60ff23d32a..f1309ed222 100644 --- a/Shadowrun3e/shadowrun3e.html +++ b/Shadowrun3e/shadowrun3e.html @@ -1887,7 +1887,7 @@
-
+
@@ -1896,7 +1896,7 @@
-
+
@@ -1919,7 +1919,7 @@
-
+
@@ -1928,7 +1928,7 @@
-
+
@@ -1937,7 +1937,7 @@
-
+
@@ -1946,7 +1946,7 @@
-
+
@@ -1954,11 +1954,11 @@
-
+
-
+
@@ -1979,7 +1979,7 @@
Test
Swap Memory
Notes
-
@@ -1989,7 +1989,7 @@
-
+
@@ -1999,7 +1999,7 @@
-
+
@@ -2009,7 +2009,7 @@
-
+
@@ -2019,7 +2019,7 @@
-
+
@@ -2030,11 +2030,11 @@
-
+
-
+
@@ -2126,7 +2126,9 @@
Rating
Weight
Conceal
+
Type
Quantity
+
Pool
Roll
Description
@@ -2136,11 +2138,24 @@
+
+
-
-
-
+
+
+
+
@@ -3023,7 +3038,7 @@
- + @@ -3056,7 +3071,7 @@
-
+
- +
@@ -3094,10 +3109,10 @@
-
-
-
- +
+
+
+
@@ -3129,15 +3144,15 @@
/
Slave
-
-
+
-
+ @@ -3172,8 +3187,8 @@
Detection Roll
Security Tally
Reset Tally
-
Alert Status - @@ -3181,7 +3196,6 @@
-
@@ -3215,7 +3229,7 @@
-
+
@@ -3223,7 +3237,7 @@
- +
@@ -3254,14 +3268,13 @@
Resist
- +
-
+
-
d6 +
-
-
+
-
+ +
-
@@ -3294,28 +3307,13 @@
-
-
- -
-
-
-
-
-
-
-
- -
-
-
+
+
+
+
+
+
+
@@ -3328,6 +3326,7 @@ type="action" name="act_matrixsystemset">Apply +
@@ -4220,10 +4219,10 @@
-
+
-
+
Bioware
@@ -4234,10 +4233,10 @@
-
+
-
+
Nanotech
@@ -4249,10 +4248,10 @@
-
+
-
+
@@ -4446,6 +4445,45 @@ buttonlist.forEach(button => { }); + on('clicked:repeating_gear:usegear', (info) => { + var atts=[]; + var source=info['sourceAttribute'].split('_'); + var sourceattr=source.pop(); + var myrepeat=source.join('_').concat('_'); + atts.push(myrepeat.concat("rating")); + atts.push(myrepeat.concat("quantity")); + atts.push(myrepeat.concat("type")); + atts.push(myrepeat.concat("pool")); + atts.push(myrepeat.concat("name")); + getAttrs(atts, function(myval) { + var sets={}; + let rating=parseInt(myval[myrepeat.concat("rating")]); + let qty=parseInt(myval[myrepeat.concat("quantity")]); + let mypool=myval[myrepeat.concat("pool")]; + const poolname = mypool.charAt(0).toUpperCase() + mypool.slice(1); + const pool=mypool + "pool"; + let myname=myval[myrepeat.concat("name")]; + let mytype=myval[myrepeat.concat("type")]; + calcDice=rating; + if ( mypool != "none" ) calcDice += " + ?{" + poolname + " Pool Dice?}"; + var myroll="&{template:item} {{item=" + myname +"}}{{myname=@{character_name}}}"; + myroll += "{{targetnumber=[[?{Target Number?|4}]]}}"; + if ( mypool != "none" ) myroll += "{{poolname=" + poolname + " Pool}}{{pooldice=[[?{" + poolname + " Pool Dice?|0}]]}}"; + myroll += "{{rolldice=[[" + calcDice + " ]]}}"; + myroll += "{{result=[[ [[ " + calcDice + " ]]d6>[[?{Target Number?}]]!! ]]}}"; + if ( ( mytype == "onetime" ) && ( qty < 1 ) ) myroll="/w gm &{template:info}{{character=@{character_name}}}{{action=You are out of " + myname + "}}"; + console.log(myroll); + startRoll(myroll, (results) => { + if ( mypool != "none" ) updatepoolused("taskpool", results.results.pooldice.result); + if (( mytype == "onetime" ) && ( qty > 0 )) { + sets[myrepeat.concat("quantity")] = qty -1; + setAttrs(sets); + } + finishRoll( results.rollId); + }); + }); + + }); on('clicked:repeating_credsticks:checkcredstick', (info) => { var atts=[]; var source=info['sourceAttribute'].split('_'); @@ -4456,7 +4494,7 @@ buttonlist.forEach(button => { getAttrs(atts, function(myval) { let rating=parseInt(myval[myrepeat.concat("rating")]); let myid=myval[myrepeat.concat("id")]; - var myroll="&{template:skill} {{skill=" + myid + " credstick}}{{myname=@{character_name}}}{{poolname=Task Pool}}{{targetnumber=[[?{Verification System Rating?|4}]]}}"; + var myroll="&{template:item} {{item=" + myid + " credstick}}{{myname=@{character_name}}}{{poolname=Task Pool}}{{targetnumber=[[?{Verification System Rating?|4}]]}}"; myroll += "{{pooldice=[[?{Task Pool Dice?|0}]]}}{{rolldice=[[" + rating + " + ?{Task Pool Dice?} ]]}}"; myroll += "{{result=[[ [[ " + rating + " + ?{Task Pool Dice?} ]]d6>[[?{Verification System Rating?}]]!! ]]}}"; console.log(myroll); @@ -5007,9 +5045,9 @@ buttonlist.forEach(button => { }); var initiative = function (init, reaction, dmgpen, mytitle, character) { + console.log('init ' + init + ' reaction ' + reaction + ' dmgpen ' + dmgpen + ' mytitle ' + mytitle + ' character ' + character ); penatts=["stun_pen", "wound_pen", "matrix-penalty", "vehicle-penalty", "rccommand-penalty", "rcsimsense-penalty", "rcsystem-penalty"]; getAttrs(penatts, function (myval) { - console.log('test'); console.log(init, reaction) var myroll="&{template:init} {{character=" + character + "}}{{type=" + mytitle + "}}" myroll += "{{roll=[[" + init + "d6+" + reaction + dmgpen + " &{tracker}]]}}" @@ -5029,6 +5067,7 @@ buttonlist.forEach(button => { }); }; on('clicked:init-aug', (info) => { + const myid=info["htmlAttributes"]["id"] let init="@{initiative|max}"; let reaction="@{reaction|max}"; let dmgpen=" -@{wp-char}"; @@ -5038,6 +5077,8 @@ buttonlist.forEach(button => { }); + + on('clicked:repeating_ic:init', (info) => { gets=[]; var source=info['sourceAttribute'].split('_'); @@ -5046,18 +5087,15 @@ buttonlist.forEach(button => { const mytitle=info["htmlAttributes"]["title"] gets.push(myrepeat.concat("icrating")); gets.push(myrepeat.concat("icname")); - gets.push(myrepeat.concat("matrix-damage")); + gets.push(myrepeat.concat("ic-penalty")); getAttrs(gets, function (myval) { + var penalty; console.log(myval); const init = "@{matrixsecuritynumber}"; const reaction = parseInt(myval[myrepeat.concat("icrating")]); const character = myval[myrepeat.concat("icname")]; - const dmg = parseInt(myval[myrepeat.concat("matrix-damage")]); - var penalty = " - 0"; - if ( dmg > 10) penalty = " - 100"; - else if (dmg > 5) penalty = " - 3"; - else if (dmg > 2) penalty = " - 2"; - else if (dmg > 0) penalty = " - 1"; + var penalty = -1 * parseInt(myval[myrepeat.concat("ic-penalty")]); + if ( penalty == 0 ) penalty = " + 0 "; initiative(init, reaction, penalty, mytitle, character); }); @@ -5356,7 +5394,7 @@ buttonlist.forEach(button => { }); on('clicked:vehicleposition', (info) => { - calcTN="[[{2,(@{handling} + @{speed-exceeding} + @{driving-position-terrain} - @{vehicle-actionbonus} + (@{vehicle-autonav} * @{autonav}) + @{vehicle-driver}stun_pen} +@{vehicle-driver}wound_pen} +@{wp-vehicle} )}kh1]]"; + calcTN="[[{2,(@{handling} + @{speed-exceeding} + @{driving-position-terrain} - @{vehicle-actionbonus} + (@{vehicle-autonav} * @{autonav}) + @{vehicle-driver}stun_pen} +@{vehicle-driver}wound_pen} + @{wp-vehicle} )}kh1]]"; calcDice="[[@{vehicle-skill-final} + ?{Control Pool Dice?}]]" var myroll="&{template:vehicle}{{type=Position Maneuever}}{{controlpool=[[?{Control Pool Dice?|0}]]}}{{character=@{character_name}}}" myroll += "{{targetnumber=" + calcTN + "}}{{position=[[0]]}}" @@ -6553,44 +6591,31 @@ on("change:deck-systemrating change:matrix-iconstatus change:deck-activemem chan setAttrs({"deck-mem-overloaded": myoverloaded, "deck-util-overloaded": myratingoload}); }); }); - +const matrixtn={BLUE: {Intruder: 3, Legitimate: 6, secrating: 1}, GREEN: {Intruder: 4, Legitimate: 5, secrating: 2}, ORANGE: {Intruder: 5, Legitimate: 4, secrating: 3}, RED: {Intruder: 6, Legitimate: 3, secrating: 4}}; on("change:deck-systemrating change:matrix-iconstatus", function() { getAttrs(["deck-systemrating","matrix-iconstatus"], function(myval) { + sets={}; var mytn=0; - switch(myval["deck-systemrating"]) { - case "Blue": - if (myval["matrix-iconstatus"] == "Intruder") { - mytn=3; - } else { - mytn=6; - } - break; - case "Green": - if (myval["matrix-iconstatus"] == "Intruder") { - mytn=4; - } else { - mytn=5; - } - break; - case "Orange": - if (myval["matrix-iconstatus"] == "Intruder") { - mytn=5; - } else { - mytn=4; - } - break; - case "Red": - if (myval["matrix-iconstatus"] == "Intruder") { - mytn=6; - } else { - mytn=3; - } - break; - } - setAttrs({"deck-tn": mytn}); + const rating=myval["deck-systemrating"].toUpperCase(); + const icon=myval["matrix-iconstatus"]; + sets["deck-tn"]=matrixtn[rating][icon]; + console.log(sets) + setAttrs(sets); }); }); +on("change:matrixcode", function() { + console.log('matrixsecuritynumber') + getAttrs(["matrixcode"], function (myvar) { + const rating=myvar["matrixcode"].toUpperCase(); + sets={}; + sets["matrixsecuritynumber"]=matrixtn[rating]["secrating"]; + console.log(sets) + setAttrs(sets); + }); +}); + + on("change:deckattacklevel", function() { const multipliers={L:2, M:3, S:4, D:5}; getAttrs(["deckattacklevel"], function(myval) { @@ -6600,6 +6625,46 @@ on("change:deckattacklevel", function() { }); }); + + on('clicked:repeating_ic:combat', (info) => { + const mytitle=info["htmlAttributes"]["title"] + const myid=info["htmlAttributes"]["id"] + gets=["matrixcode"]; + var source=info['sourceAttribute'].split('_'); + var sourceattr=source.pop(); + var myrepeat=source.join('_').concat('_'); + gets.push(myrepeat.concat("icrating")); + gets.push(myrepeat.concat("icname")); + gets.push(myrepeat.concat("ic-penalty")); + gets.push(myrepeat.concat("matrix-iconstatus")); + getAttrs(gets, function (myval) { + var myatt="@{target|Target|deck-evasion-final}"; + const code=myval["matrixcode"].toUpperCase(); + const rating=parseInt(myval[myrepeat.concat("icrating")]); + const name=myval[myrepeat.concat("icname")]; + const penalty=parseInt(myval[myrepeat.concat("ic-penalty")]); + const targeticon=myval[myrepeat.concat("matrix-iconstatus")]; + const attacktn =matrixtn[code][targeticon]; + var target="{{target=@{target|Target|token_name}}}"; + if ( mytitle == "Evade Detection" ) myatt = "@{target|Target|deck-sensors-final}"; + if ( mytitle == "IC Attack" ) myatt = attacktn; + if ( mytitle == "IC Resist" ) myatt = "?{Power of Attack?|2}"; + if ( mytitle == "IC Resist" ) target = "{{target=" + name + "}}"; + var calcTN= myatt + " +?{Miscellaneous Modifiers|0} + " + penalty; + var calcDice="@{matrixsecurityrating}" + var myroll="&{template:matrix}{{myname=" + name + "}}"; + myroll+=target; + myroll+="{{rolldice=[[" + calcDice + "]]}}{{targetnumber=[[" + calcTN + "]]}}"; + myroll+="{{action=" + mytitle + "}}" + myroll+="{{roll= [[ [[" + calcDice + "]]d6>[[ {2,(" + calcTN + ")}kh1]]!! ]] }}" + console.log(myroll); + startRoll(myroll, (results) => { + finishRoll( results.rollId); + }); + }); + + }); + on("clicked:deck-utilities-unloadall", function() { utilatts=[]; utilrepeatatts=[]; @@ -7354,7 +7419,7 @@ on("change:visionprofile change:visibility", function() { updateVisionTNs(); }); -on("change:matrix-damage change:rccommand-damage change:rcsimsense-damage change:rcsystem-damage change:vehicle-damage change:repeating_ic:matrix-damage", function(eventinfo) { +on("change:matrix-damage change:rccommand-damage change:rcsimsense-damage change:rcsystem-damage change:vehicle-damage change:repeating_ic:ic-damage", function(eventinfo) { let myattribute="" console.log(eventinfo); if ( eventinfo["sourceAttribute"].startsWith("repeating") ) { @@ -7407,27 +7472,6 @@ on("change:metatype change:quickness change:acceleration change:handling-street }); -on("change:matrixcode", function() { - console.log('matrixsecuritynumber') - getAttrs(["matrixcode"], function (myvar) { - switch (myvar.matrixcode) { - case "BLUE": - var myval = 1 - break; - case "GREEN": - var myval = 2 - break; - case "ORANGE": - var myval = 3 - break; - case "RED": - var myval = 4 - break; - } - setAttrs({matrixsecuritynumber: myval}); - }); -}); - on("change:deck-dni change:intelligence_max change:reaction change:deck-asist change:deck-response change:deck-realityfilter", function() { getAttrs(["deck-dni", "intelligence_max", "reaction", "deck-response", "deck-asist", "deck-realityfilter"], function (myval) { var dnibonus=0; @@ -7669,13 +7713,18 @@ var updatePenalty = function(attribute) { let myatt = attribute.concat("-damage"); let mypen = attribute.concat("-penalty"); getAttrs([myatt], function(myval) { + sets={}; + console.log('dmg ' + myval[myatt]); + console.log('pen ' + mypen); var penalty = 0; var dmg = parseInt(myval[myatt]); if ( dmg > 10) penalty = 4; else if (dmg > 5) penalty = 3; else if (dmg > 2) penalty = 2; else if (dmg > 0) penalty = 1; - setAttrs({[mypen]: penalty}); + sets[mypen]=penalty; + console.log(sets); + setAttrs(sets); }); }; @@ -8203,6 +8252,18 @@ powers: ["Accident", "Divination", "Guard", "Materialization", "Search"] + +
+
{{myname}} uses {{item}}
+
Rolling: {{rolldice}}d6 vs. {{targetnumber}}
+
Item Test: {{result}}
+ {{#description}}
{{description}}
{{/description}} + {{#poolname}}
{{poolname}}: {{pooldice}}
{{/poolname}} + {{#notes}}
{{notes}}
{{/notes}} + {{#dicepool}}
Dice Pool Used: {{dicepool}}
{{/dicepool}} +
+
+
{{myname}}: {{skill}}
@@ -8289,7 +8350,7 @@ powers: ["Accident", "Divination", "Guard", "Materialization", "Search"]
{{character}}: Info
Action: {{action}}
-
Type: {{type}}
+ {{#type}}
Type: {{type}}
{{/type}} {{#info1}}
{{info1}}
{{/info1}} {{#info2}}
{{info2}}
{{/info2}}
diff --git a/Shadowrun3e/sheet.json b/Shadowrun3e/sheet.json index 605814f82d..068666ae0f 100644 --- a/Shadowrun3e/sheet.json +++ b/Shadowrun3e/sheet.json @@ -2,7 +2,7 @@ "html": "shadowrun3e.html", "css": "shadowrun3e.css", "authors": "Brad Hornbeck", - "roll20userid": "Brad H.", + "roll20userid": "9045742", "preview": "shadowrun3.PNG", "instructions": "https://shadowrun3roll20.fandom.com/wiki/Shadowrun3.roll20_Wiki" }