#53 : Gestion des détériorations et du recul
This commit is contained in:
@ -31,13 +31,13 @@ export class RdDRollDialog extends Dialog {
|
||||
// Select proper roll dialog template and stuff
|
||||
if (mode == "competence") {
|
||||
dialogConf.title = "Test de compétence"
|
||||
dialogOptions.height = 420
|
||||
dialogOptions.height = 430
|
||||
} else if (mode == "arme") {
|
||||
dialogConf.title = "Test de combat/arme"
|
||||
dialogOptions.height = 440
|
||||
dialogOptions.height = 460
|
||||
} else if (mode == "carac") {
|
||||
dialogConf.title = "Test de caractéristique"
|
||||
dialogOptions.height = 400
|
||||
dialogOptions.height = 420
|
||||
} else if (mode == "sort") {
|
||||
dialogConf.title = "Lancer un sort"
|
||||
dialogOptions.height = 460
|
||||
@ -154,6 +154,9 @@ export class RdDRollDialog extends Dialog {
|
||||
html.find('#coupsNonMortels').change((event) => {
|
||||
this.rollData.mortalite = event.currentTarget.checked ? "non-mortel" : "non-mortel";
|
||||
});
|
||||
html.find('#isCharge').change((event) => {
|
||||
this.rollData.isCharge = event.currentTarget.checked;
|
||||
});
|
||||
html.find('#surencMalusApply').change((event) => {
|
||||
this.rollData.surencMalusApply = event.currentTarget.checked;
|
||||
updateRollResult(rollData);
|
||||
@ -171,6 +174,7 @@ export class RdDRollDialog extends Dialog {
|
||||
let malusEnc = (rollData.surencMalusApply ) ? rollData.surencMalusValue : 0;
|
||||
let diffLibre = Misc.toInt(rollData.diffLibre);
|
||||
let malusEncNatation = (rollData.useEncForNatation) ? -rollData.encValueForNatation : 0;
|
||||
let chargeBonus = (rollData.isCharge) ? 4 : 0; // gestion de la charge en mélée
|
||||
|
||||
// Gestion malus armure
|
||||
let malusArmureValue = 0;
|
||||
@ -190,7 +194,7 @@ export class RdDRollDialog extends Dialog {
|
||||
diffLibre = RdDItemSort.getDifficulte(rollData.selectedSort, diffLibre);
|
||||
}
|
||||
|
||||
return etat + diffCompetence + diffLibre + diffConditions + malusEnc + malusEncNatation + malusArmureValue;
|
||||
return etat + diffCompetence + diffLibre + diffConditions + malusEnc + malusEncNatation + malusArmureValue + chargeBonus;
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
|
Reference in New Issue
Block a user