Modify HeroSystem6e.html and css to improve combat maneuvers

- Update combat maneuver notes
- Add dropdown for selecting number of attacks on Multiple Attacks maneuver
- Integrate that dropdown into the combat preview
This commit is contained in:
John Sherwood
2022-08-09 19:00:28 -04:00
parent 586a08488d
commit 8a4f271ccf
2 changed files with 28 additions and 9 deletions
+5
View File
@@ -1583,6 +1583,11 @@ div.sheet-am4, input[type=text].sheet-am4, span.sheet-am4
text-align: left;
/* white-space: nowrap; */
}
div.sheet-am4 select
{
width: 70px;
height: 18px;
}
div.sheet-am4
{
white-space: nowrap;
+23 -9
View File
@@ -1006,11 +1006,11 @@
<div class="line">
<div class="am0"><input type="checkbox" name="attr_radio_maneuver3" value="1" /></div>
<div class="am1">Brace</div>
<div class="am2">+0</div>
<div class="am2">0</div>
<div class="am2">+0</div>
<div class="am2">&#189;</div>
<div class="am3"></div>
<div class="am4">+2 RMod</div>
<div class="am4">+2 RMod (-1 increment)</div>
</div>
<div class="line">
<div class="am0"><input type="checkbox" name="attr_radio_maneuver4" value="1" /></div>
@@ -1055,7 +1055,7 @@
<div class="am2">+0</div>
<div class="am2">-5</div>
<div class="am3">+4DC</div>
<div class="am4">+4 DCs to attack</div>
<div class="am4">+4 DCs to attack; +1 segment</div>
</div>
<div class="line">
<div class="am0"><input type="checkbox" name="attr_radio_maneuver9" value="1" /></div>
@@ -1082,7 +1082,18 @@
<div class="am2">var</div>
<div class="am2">&#189;</div>
<div class="am3"></div>
<div class="am4">Attack multiple times</div>
<div class="am4">
# of attacks:
<select class="am4" name="attr_multiattack_penalty" value="">
<option value=0></option>
<option value=-2>2 (-2)</option>
<option value=-4>3 (-4)</option>
<option value=-6>4 (-6)</option>
<option value=-8>5 (-8)</option>
<option value=-10>6 (-10)</option>
<option value=-12>7 (-12)</option>
</select>
</div>
</div>
<div class="line">
<div class="am0"><input type="checkbox" name="attr_radio_maneuver12" value="1" /></div>
@@ -2728,7 +2739,7 @@ var maneuvers = [
{ name: "Haymaker", ocv: "+0", dcv: "-5", damage: "+4DC" },
{ name: "Move By" , ocv: "-2", dcv: "-2", damage: "+v/10" },
{ name: "Move Through", ocv: "-v/10", dcv: "-3", damage: "+v/6" },
{ name: "Multiple Attack", ocv: "-2", dcv: "\u00BD", damage: "" },
{ name: "Multiple Attack", ocv: "-2/extra attack", dcv: "\u00BD", damage: "" },
{ name: "Set", ocv: "+1", dcv: "+0", damage: "" },
{ name: "Shove", ocv: "-1", dcv: "-1", damage: "" },
{ name: "Strike", ocv: "+0", dcv: "+0", damage: "" },
@@ -4678,9 +4689,10 @@ var setManeuver = function() {
});
var checkPreset = function(n) {
getAttrs([ "str", "velocity", "radio_maneuver"+n ], function(v) {
getAttrs([ "str", "velocity", "multiattack_penalty", "radio_maneuver"+n ], function(v) {
var str = parseInt( v["str"], 10 )||0;
var velocity = parseInt( v["velocity"], 10 )||0;
var multiattack_penalty = parseInt( v["multiattack_penalty"], 10 )||0
if( v["radio_maneuver"+n] == 1 ) {
switch(n) {
@@ -4727,11 +4739,13 @@ var setManeuver = function() {
case 10:
pre_name = "Move Through";
pre_ocv = roundup(velocity/(-10));
pre_dcv = (-3);
pre_dc = roundup(velocity/6) * 5;
break;
case 11:
pre_name = "Multiple Attack";
/* no pre_ocv. player will need to use other modifier, -2 x number of targets over first */
pre_ocv = multiattack_penalty;
pre_half_dcv = 1;
break;
case 12:
@@ -4880,7 +4894,7 @@ on("change:radio_maneuver1 change:radio_maneuver2 change:radio_maneuver3 change:
"change:radio_maneuver9 change:radio_maneuver10 change:radio_maneuver11 change:radio_maneuver12 " +
"change:radio_maneuver13 change:radio_maneuver14 change:radio_maneuver15 change:radio_maneuver16 " +
"change:repeating_maneuvers:radio_maneuver_custom change:repeating_maneuvers remove:repeating_maneuvers " +
"change:str change:velocity", function(eventinfo) {
"change:str change:velocity change:multiattack_penalty", function(eventinfo) {
if( eventinfo.sourceType == "sheetworker" ) return;
setManeuver();
});
@@ -5122,7 +5136,7 @@ var setCombatModifiers = function() {
break;
default:
modifier = 0;
roll = "0";
roll = "";
}
setAttrs({ ocv_modifiers: modifier, hit_location_roll: roll });
@@ -5551,7 +5565,7 @@ on("change:ocv_base change:dcv_base change:ocv_pow change:dcv_pow " +
"change:penalty_levels_rmod change:penalty_levels_ocv change:penalty_levels_dcv " +
"change:psl_rmod_pow change:psl_ocv_pow change:psl_dcv_pow " +
"change:ocv_modifiers change:other_ocv change:other_dcv change:half_ocv change:half_dcv " +
"change:range_ocv change:velocity", function() {
"change:range_ocv change:velocity change:multiattack_penalty", function() {
setCombatValues();
});