diff --git a/css/deltagreen.css b/css/deltagreen.css
index fc8da49..9f3392c 100644
--- a/css/deltagreen.css
+++ b/css/deltagreen.css
@@ -80,6 +80,10 @@ section.window-content{
color: #999999;
}
+.dg-red{
+ color:rgb(117, 0, 0);
+}
+
.grid-1col{
display: grid;
grid-column: span 1 / span 1;
diff --git a/module/actor/actor-sheet.js b/module/actor/actor-sheet.js
index b826037..61450b1 100644
--- a/module/actor/actor-sheet.js
+++ b/module/actor/actor-sheet.js
@@ -321,9 +321,21 @@ export class DeltaGreenActorSheet extends ActorSheet {
html.find('.gear-browse').click(ev => {
//game.packs.find(k=>k.collection==="deltagreen.firearms").render(true);
});
+
+ html.find('.toggle-lethality').click(event => {
+ this._toggleLethality(event);
+ });
}
+ _toggleLethality(event) {
+ const itemId = event.target.getAttribute("item-id");
+ const isLethal = event.target.getAttribute("is-lethal") === "true";
+ const item = this.actor.data.items.find((i) => i.id === itemId);
+ item.update({"data.isLethal": !isLethal});
+
+ }
+
_showNewEditTypeSkillDialog(targetSkill, currentLabel, currentGroup){
// TO DO: BUILD DIALOG TO CAPTURE UPDATED DATA
diff --git a/templates/actor/actor-sheet.html b/templates/actor/actor-sheet.html
index 60950ff..4e76f33 100644
--- a/templates/actor/actor-sheet.html
+++ b/templates/actor/actor-sheet.html
@@ -313,23 +313,35 @@
{{item.name}}
- {{#unless item.data.data.isLethal}}
-
+ {{#unless item.data.data.isLethal}}
+
+ {{toUpperCase item.data.data.damage}}{{#if_eq item.data.data.skill 'unarmed_combat'}}{{actor.data.data.statistics.str.meleeDamageBonusFormula}}{{/if_eq}}{{#if_eq item.data.data.skill 'melee_weapons'}}{{actor.data.data.statistics.str.meleeDamageBonusFormula}}{{/if_eq}}
+ {{/unless}}
+
+ {{#if item.data.data.isLethal}}
+
+ {{item.data.data.lethality}}%
+ {{/if}}
- data-rolltype="damage"
- data-target="damage"
- data-label="{{toUpperCase item.name}}"
- data-roll="{{toUpperCase item.data.data.damage}}"
- data-skill="{{item.data.data.skill}}"
- >
- {{toUpperCase item.data.data.damage}}{{#if_eq item.data.data.skill 'unarmed_combat'}}{{actor.data.data.statistics.str.meleeDamageBonusFormula}}{{/if_eq}}{{#if_eq item.data.data.skill 'melee_weapons'}}{{actor.data.data.statistics.str.meleeDamageBonusFormula}}{{/if_eq}}
- {{/unless}}
+ {{#if item.data.data.lethality}}
+ -
+ {{#if item.data.data.isLethal}}
+
+ {{else}}
+
+ {{/if}}
+ {{/if}}
+
- {{#if item.data.data.isLethal}}
- {{formatLethality item.data.data.lethality}}
- {{/if}}
{{item.data.data.armorPiercing}}