minor improvements

This commit is contained in:
The Last Scrub
2020-07-03 22:55:07 -07:00
parent 82c0f109ec
commit 74e8be4c59
7 changed files with 37 additions and 20 deletions
+4
View File
@@ -302,6 +302,10 @@ export class DeltaGreenActorSheet extends ActorSheet {
// damage roll, not a skill check
label = dataset.label ? `Rolling damage for ${dataset.label.toUpperCase()}` : '';
}
else if(dataset.target === "lethality"){
// a lethality roll
label = dataset.label ? `Rolling LETHALITY for ${dataset.label.toUpperCase()}` : '';
}
roll.roll().toMessage({
speaker: ChatMessage.getSpeaker({ actor: this.actor }),
+9
View File
@@ -66,6 +66,15 @@ Hooks.once('init', async function() {
}
});
Handlebars.registerHelper('formatLethality', function(lethality) {
if (lethality > 0) {
return lethality.toString() + "%";
}
else {
return "";
}
});
Handlebars.registerHelper('getActorSkillProp', function(actorData, skillName, prop) {
if(skillName != "" && prop != ""){
let skills = actorData.skills;