Sync with gitlab

This commit is contained in:
2020-06-17 20:31:43 +02:00
parent 3962f33e84
commit 259a7577e8
8 changed files with 135 additions and 54 deletions

View File

@ -133,11 +133,19 @@ export class RdDActor extends Actor {
specialStr = "<br><strong>Esquive/Parade échouée, encaissement !</strong>";
encaisser = true;
}
} else {
} else { // This is the attack roll!
if ( rollData.pointsDeTache > 0 ) {
let myroll = new Roll("2d10");
myroll.roll();
rollData.degats = parseInt(myroll.result) + parseInt(rollData.arme.data.dommages) + parseInt(this.data.data.attributs.plusdom.value);
rollData.degats = parseInt(myroll.result) + parseInt(rollData.arme.data.dommages);
if ( rollData.selectedCarac.label == "Mêlée" ) // +dom only for Melee
rollData.degats += parseInt(this.data.data.attributs.plusdom.value);
if ( rollData.selectedCarac.label == "Lancer" ) { // +dom only for Melee/Lancer
let bdom = parseInt(this.data.data.attributs.plusdom.value);
if ( bdom > parseInt(rollData.arme.data.dommages)*2 )
bdom = parseInt(rollData.arme.data.dommages)*2;
rollData.degats += bdom
}
rollData.loc = RdDUtility.getLocalisation();
for (let target of game.user.targets) {
defenseMsg = RdDUtility.buildDefenseChatCard(this, target, rollData );
@ -156,7 +164,7 @@ export class RdDActor extends Actor {
let lvl = (rollData.competence) ? rollData.competence.name : rollData.bmValue;
let chatOptions = { content: "<strong>Test : " + rollData.selectedCarac.label + " / " + lvl + "</strong><br>Jet : " +
rollData.selectedCarac.value + " / " + rollData.finalLevelStr + " - " + rollData.rollTarget.score + "%<br><strong>Résutat : </strong>" + myroll.total + "<br>" +
rollData.selectedCarac.value + " / " + rollData.finalLevelStr + " -> " + rollData.rollTarget.score + "%<br><strong>Résutat : </strong>" + myroll.total + "<br>" +
"<strong>" + quality + "</strong>" + specialStr + xpmsg,
user: game.user._id,
title: "Résultat du test"