forked from public/bol
Preliminary rolls
This commit is contained in:
parent
954c95e606
commit
7bfeb96d5e
@ -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"
|
||||
}
|
@ -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(),
|
||||
|
@ -116,7 +116,11 @@ 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() {
|
||||
if (game.user.targets && game.user.targets.size == 1) {
|
||||
@ -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;
|
||||
|
@ -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,7 +59,8 @@
|
||||
{{/select}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{{/if}}
|
||||
|
||||
<div class="property flexrow">
|
||||
<label class="property-label">{{localize "Modifier"}}</label>
|
||||
<select id="bonusMalus" value="bonusMalus">
|
||||
|
Loading…
Reference in New Issue
Block a user