modified to take in account monster stats
monster stats
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user