Merge v1 #1

Merged
sladecraven merged 5 commits from master into master 2021-11-06 12:21:05 +01:00
4 changed files with 12 additions and 4 deletions
Showing only changes of commit 7bfeb96d5e - Show all commits

View File

@ -86,5 +86,6 @@
"Extreme": "Extrême",
"Maximum": "Maximale",
"Defender": "Défenseur",
"Defense score": "Score de défense"
"Defense score": "Score de défense",
"Modifier": "Modificateur"
}

View File

@ -126,6 +126,7 @@ export class BoLActor extends Actor {
actorImg: this.img,
weapon : weapon,
target: target,
isRanged: BoLUtility.isRangedWeapon( weapon ),
defender: objectDefender,
boons : this.getBoons(),
flaws : this.getFlaws(),

View File

@ -116,6 +116,10 @@ export class BoLUtility {
static createChatWithRollMode(name, chatOptions) {
this.createChatMessage(name, game.settings.get("core", "rollMode"), chatOptions);
}
/* -------------------------------------------- */
static isRangedWeapon( weapon) {
return weapon.data.type == 'ranged' || weapon.data.thrown;
}
/* -------------------------------------------- */
static getTarget() {
@ -152,7 +156,7 @@ export class BoLUtility {
modifier += rollData.attribute.value;
} else if ( rollData.mode == 'weapon') {
modifier += Number(rollData.attributes[rollData.rollAttribute].value) + Number(rollData.aptitude.value) + Number(rollData.rangeModifier);
modifier -= rollData.defender.aptitudes.def.value;
modifier -= rollData.defender.data.aptitudes.def.value;
}
let formula = nbDice+"d6"+mode+"+"+modifier;

View File

@ -44,6 +44,7 @@
</select>
</div>
{{#if isRangedWeapon}}
<div class="property flexrow">
<label class="property-label">{{localize "Range Modifier"}}</label>
<select id="rangeModifier" value="rangeModifier">
@ -58,6 +59,7 @@
{{/select}}
</select>
</div>
{{/if}}
<div class="property flexrow">
<label class="property-label">{{localize "Modifier"}}</label>