forked from public/bol
Preliminary rolls
This commit is contained in:
parent
954c95e606
commit
7bfeb96d5e
@ -86,5 +86,6 @@
|
|||||||
"Extreme": "Extrême",
|
"Extreme": "Extrême",
|
||||||
"Maximum": "Maximale",
|
"Maximum": "Maximale",
|
||||||
"Defender": "Défenseur",
|
"Defender": "Défenseur",
|
||||||
"Defense score": "Score de défense"
|
"Defense score": "Score de défense",
|
||||||
|
"Modifier": "Modificateur"
|
||||||
}
|
}
|
@ -126,6 +126,7 @@ export class BoLActor extends Actor {
|
|||||||
actorImg: this.img,
|
actorImg: this.img,
|
||||||
weapon : weapon,
|
weapon : weapon,
|
||||||
target: target,
|
target: target,
|
||||||
|
isRanged: BoLUtility.isRangedWeapon( weapon ),
|
||||||
defender: objectDefender,
|
defender: objectDefender,
|
||||||
boons : this.getBoons(),
|
boons : this.getBoons(),
|
||||||
flaws : this.getFlaws(),
|
flaws : this.getFlaws(),
|
||||||
|
@ -116,6 +116,10 @@ export class BoLUtility {
|
|||||||
static createChatWithRollMode(name, chatOptions) {
|
static createChatWithRollMode(name, chatOptions) {
|
||||||
this.createChatMessage(name, game.settings.get("core", "rollMode"), chatOptions);
|
this.createChatMessage(name, game.settings.get("core", "rollMode"), chatOptions);
|
||||||
}
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
|
static isRangedWeapon( weapon) {
|
||||||
|
return weapon.data.type == 'ranged' || weapon.data.thrown;
|
||||||
|
}
|
||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
static getTarget() {
|
static getTarget() {
|
||||||
@ -152,7 +156,7 @@ export class BoLUtility {
|
|||||||
modifier += rollData.attribute.value;
|
modifier += rollData.attribute.value;
|
||||||
} else if ( rollData.mode == 'weapon') {
|
} else if ( rollData.mode == 'weapon') {
|
||||||
modifier += Number(rollData.attributes[rollData.rollAttribute].value) + Number(rollData.aptitude.value) + Number(rollData.rangeModifier);
|
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;
|
let formula = nbDice+"d6"+mode+"+"+modifier;
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{{#if isRangedWeapon}}
|
||||||
<div class="property flexrow">
|
<div class="property flexrow">
|
||||||
<label class="property-label">{{localize "Range Modifier"}}</label>
|
<label class="property-label">{{localize "Range Modifier"}}</label>
|
||||||
<select id="rangeModifier" value="rangeModifier">
|
<select id="rangeModifier" value="rangeModifier">
|
||||||
@ -58,6 +59,7 @@
|
|||||||
{{/select}}
|
{{/select}}
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<div class="property flexrow">
|
<div class="property flexrow">
|
||||||
<label class="property-label">{{localize "Modifier"}}</label>
|
<label class="property-label">{{localize "Modifier"}}</label>
|
||||||
|
Loading…
Reference in New Issue
Block a user