diff --git a/Only-War-Enhanced/OnlyWarEnhanced.css b/Only-War-Enhanced/OnlyWarEnhanced.css index b5d29c3716..1652c228e4 100644 --- a/Only-War-Enhanced/OnlyWarEnhanced.css +++ b/Only-War-Enhanced/OnlyWarEnhanced.css @@ -594,7 +594,7 @@ ______________________________ start of minimisable infographic ________________ .sheet-minimisable_infographic_grid { display: grid; - grid-template-columns: 185px 103px 103px 215px; + grid-template-columns: 185px 185px 103px 215px; } .sheet-minimisable_infographic_g1 { grid-area: mi1; background: #52682d !important; border: 0px solid transparent; font-family: inherit !important; letter-spacing: 0px; justify-self: center; width: calc(100% - 6px); } diff --git a/Only-War-Enhanced/OnlyWarEnhanced.html b/Only-War-Enhanced/OnlyWarEnhanced.html index 1d2c186b73..63c3f6953e 100644 --- a/Only-War-Enhanced/OnlyWarEnhanced.html +++ b/Only-War-Enhanced/OnlyWarEnhanced.html @@ -70,16 +70,15 @@ - - - - - - - - - - + + + + + + + + + @@ -357,13 +356,17 @@ -
+
-

Current

- -

Max

- + value='@{to-gm}&{template:mythic} {{character= @{character_name}}} {{name=Fatigue}} {{2x2-name=Current}} {{2x2=@{fatigue}}} {{2x2-name-max=Max}} {{2x2-max=@{fatigue|max}}} '>Fatigue + +

Current

+ +

Threshold

+ +

Max

+ +
@@ -435,7 +438,7 @@ - +

Athletics

@@ -450,7 +453,7 @@ - +

Awareness

@@ -466,7 +469,7 @@ - +

Charm

@@ -480,7 +483,7 @@ - +

Command

@@ -497,7 +500,7 @@ - +

Commerce

@@ -512,7 +515,7 @@ - +

Deceive

@@ -527,7 +530,7 @@ - +

Dodge

@@ -541,7 +544,7 @@ - +

Inquiry

@@ -557,7 +560,7 @@ - +

Interrogation

@@ -572,7 +575,7 @@ - +

Intimidate

@@ -587,7 +590,7 @@ - +

Logic

@@ -602,7 +605,7 @@ - +

Medicae

@@ -618,7 +621,7 @@ - +

Navigate: Surface

@@ -633,7 +636,7 @@ - +

Navigate: Stellar

@@ -648,7 +651,7 @@ - +

Navigate: Warp

@@ -663,7 +666,7 @@ - +

Operate: Surface

@@ -678,7 +681,7 @@ - +

Operate: Aeronautica

@@ -693,7 +696,7 @@ - +

Operate: Voidship

@@ -708,7 +711,7 @@ - +

Parry

@@ -722,7 +725,7 @@ - +

Psyniscience

@@ -737,7 +740,7 @@ - +

Scrutiny

@@ -752,7 +755,7 @@ - +

Security

@@ -767,7 +770,7 @@ - +

Sleight of Hand

@@ -782,7 +785,7 @@ - +

Stealth

@@ -797,7 +800,7 @@ - +

Survival

@@ -813,7 +816,7 @@ - +

Tech-Use

@@ -828,7 +831,7 @@ - +
@@ -851,7 +854,7 @@ - +
@@ -883,7 +886,7 @@ +
@@ -901,7 +904,7 @@ +
@@ -933,7 +936,7 @@ +
@@ -951,7 +954,7 @@ +
@@ -983,7 +986,7 @@ +
@@ -1001,7 +1004,7 @@ +
@@ -1033,7 +1036,7 @@ +
@@ -1051,7 +1054,7 @@ +
@@ -1084,7 +1087,7 @@ +
@@ -1103,7 +1106,7 @@ +
@@ -1165,7 +1168,7 @@ +!ammo @{character_id} repeating_rangedweapons_@{id}_R_weapon_mag [[@{ammo}*@{R_weapon_setting}]]'>Hit |
@@ -1286,7 +1289,7 @@ - +
@@ -1774,6 +1777,7 @@
+
Focus Power
Power Mod
- +
@@ -2031,11 +2035,12 @@ +!ammo @{character_id} repeating_rangedweapons_@{id}_V_R_weapon_mag [[@{ammo}*@{V_R_weapon_setting}]]'>Hit | +
@@ -2158,7 +2163,7 @@ - +
@@ -2551,14 +2556,12 @@ // ________________________Fatigue and Armor sheet worker_____________________ // ___________________________________________________________________________ let fieldsFA = [ - 'fatigue_mod', 'tou', 'tou_unnat', 'tou_advancement', 'wp', 'wp_unnat', 'wp_advancement', 'armor_head', 'armor_arm_right', 'armor_body', 'armor_arm_left', 'armor_leg_right', 'armor_leg_left' ]; on('sheet:opened ' + fieldsFA.map(field => 'change:' + field).join(' '), function() { getAttrs(fieldsFA, function(values) { - var fatigue_mod = parseInt(values['fatigue_mod'], 10) || 0; var tou = parseInt(values['tou'], 10) || 0; var tou_unnat = parseInt(values['tou_unnat'], 10) || 0; var tou_advancement = parseInt(values['tou_advancement'], 10) || 0; @@ -2582,12 +2585,28 @@ soak_arm_left: (armor_arm_left + tou_mod), soak_leg_right: (armor_leg_right + tou_mod), soak_leg_left: (armor_leg_left + tou_mod), - fatigue_max: (tou_mod + wp_mod + fatigue_mod) + fatigue_max: (tou_mod + wp_mod) }); }); }); + //fatigue penalty + on('sheet:opened change:fatigue change:fatigue_threshold', function() { + getAttrs([ + 'fatigue', 'fatigue_threshold' + ], function(values) { + var fatigue = parseInt(values['fatigue']) || 0; + var threshold = parseInt(values['fatigue_threshold']) || 0; + + var check = (fatigue > threshold) ? -10: 0; + console.log(values,fatigue, threshold, check) + setAttrs({ + fatigued: check + }); + }); + }); + // ___________________________________________________________________________ @@ -2613,8 +2632,8 @@ getAttrs([ 'insanity_pts', 'corruption_pts' ], function(values) { - var insanity_pts = parseInt(values['insanity_pts'], 0) || 0; - var corruption_pts = parseInt(values['corruption_pts'], 10) || 0; + var insanity_pts = parseInt(values['insanity_pts']) || 0; + var corruption_pts = parseInt(values['corruption_pts']) || 0; if (insanity_pts <= 9) { setAttrs({ @@ -2781,10 +2800,12 @@ if (p_focus.length > 3) { attr[`${row}_psy_ab_total_finder`] = `@{${p_focus}_total}`; attr[`${row}_psy_ab_unnat_finder`] = `@{${p_focus}_unnat}`; + attr[`${row}_psy_fatigue_finder`] = 0; } else { attr[`${row}_psy_ab_total_finder`] = `@{${p_focus}Total}`; attr[`${row}_psy_ab_unnat_finder`] = `@{${p_focus.toUpperCase()}_unnat}`; + attr[`${row}_psy_fatigue_finder`] = `@{fatigued}`; } }); console.log(values,attr) @@ -2810,10 +2831,12 @@ if (v_r_focus.length > 3) { attr[`${row}_veh_atk_total_finder`] = `@{${v_r_focus}_total}`; attr[`${row}_veh_atk_unnat_finder`] = `@{${v_r_focus}_unnat}`; + attr[`${row}_veh_fatigue_finder`] = 0; } else { attr[`${row}_veh_atk_total_finder`] = `@{${v_r_focus}Total}`; attr[`${row}_veh_atk_unnat_finder`] = `@{${v_r_focus.toUpperCase()}_unnat}`; + attr[`${row}_veh_fatigue_finder`] = `@{fatigued}`; } }); console.log(values,attr) @@ -3156,7 +3179,6 @@ {{^loc}}
{{/loc}}
-
Target: