modified to take in account monster stats

monster stats
This commit is contained in:
marcom
2021-03-07 16:22:08 -08:00
parent 853fe1bfb8
commit 62340e2f18
2 changed files with 30 additions and 11 deletions
+9 -3
View File
@@ -320,13 +320,19 @@ export class DeltaGreenActorSheet extends ActorSheet {
let requestedModifyRoll = (event && event.shiftKey || event.which === 3); //(event && (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey));
// check the 'data-target="something" property to determine how to grab the target for the roll
let inhuman_flag = false; // inhuman_flag to be used for stats above 20
if(rollType === "skill" || rollType === "typeskill"){
targetVal = dataset.target;
label = game.i18n.localize(label).toUpperCase();
}
else if(dataset.target === "statistic.x5"){
let stat = this.actor.data.data.statistics[key];
targetVal = stat.x5;
if (stat.value>=20){
targetVal = stat.value;
inhuman_flag = true; // you use the value instead of the x5 but you set the inhuman_flag to true
}else{
targetVal = stat.x5;
}
label = game.i18n.localize("DG.Attributes." + key).toUpperCase();
}
else if(rollType === "sanity"){
@@ -354,7 +360,7 @@ export class DeltaGreenActorSheet extends ActorSheet {
}
else{
if(requestedModifyRoll){
showModifyPercentileTestDialogue(this.actor, label, targetVal, isLethalityRoll);
showModifyPercentileTestDialogue(this.actor, label, targetVal, isLethalityRoll,inhuman_flag);
}
else{
if(isLethalityRoll)
@@ -362,7 +368,7 @@ export class DeltaGreenActorSheet extends ActorSheet {
sendLethalityTestToChat(this.actor, label, targetVal);
}
else{
sendPercentileTestToChat(this.actor, label, targetVal);
sendPercentileTestToChat(this.actor, label, targetVal,inhuman_flag);
}
}
}