Preliminary verssion for fight

This commit is contained in:
2020-06-07 23:16:29 +02:00
parent 1f875bafc5
commit 9d2c0da852
12 changed files with 295 additions and 141 deletions

View File

@ -28,7 +28,11 @@ export class RdDRollDialog extends Dialog {
dialogConf.title = "Test de compétence",
dialogOptions.width = 600;
dialogOptions.height = 360;
}
} else if (mode == "arme") {
dialogConf.title = "Test de combat/arme",
dialogOptions.width = 600;
dialogOptions.height = 360;
}
super(dialogConf, dialogOptions);
this.mode = mode;
@ -55,7 +59,8 @@ export class RdDRollDialog extends Dialog {
$("#roll-param").text( rollData.selectedCarac.value + " / " + rollData.finalLevelStr );
rollData.rollTarget = game.data.RdDUtility.getResolutionField( rollData.selectedCarac.value, rollData.finalLevel);
let niveauStr = (rollData.competence.data.niveau >= 0) ? "+" + rollData.competence.data.niveau : rollData.competence.data.niveau;
$("#compdialogTitle").text( rollData.competence.name + " - " + niveauStr + " - " + rollData.selectedCarac.label );
let armeTitle = ( rollData.arme ) ? " ("+rollData.arme.name+") " : ""; // If a weapon is there, add it in the title
$("#compdialogTitle").text( rollData.selectedCarac.label + "/" + rollData.competence.name + armeTitle + " " + niveauStr );
$(".table-resolution").remove();
game.data.RdDUtility.makeHTMLResolutionTable( $("#resolutionTable"), rollData.selectedCarac.value-2, parseInt(rollData.selectedCarac.value) + 2, -10, 11,
rollData.selectedCarac.value, rollData.finalLevel );