Fix initiative pour les creatures/entites
This commit is contained in:
parent
78b4eef453
commit
cf4cfe2589
@ -122,7 +122,7 @@ export class RdDActor extends Actor {
|
|||||||
|
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
async performRoll(rollData) {
|
async performRoll(rollData) {
|
||||||
let rolled = await RdDResolutionTable.roll(rollData.carac, rollData.finalLevel);
|
let rolled = await RdDResolutionTable.roll(rollData.carac, rollData.finalLevel, true);
|
||||||
//rolled.isPart = true; // Pour tester le particulières
|
//rolled.isPart = true; // Pour tester le particulières
|
||||||
rollData.rolled = rolled; // garder le résultat
|
rollData.rolled = rolled; // garder le résultat
|
||||||
console.log("performRoll", rollData, rolled)
|
console.log("performRoll", rollData, rolled)
|
||||||
|
@ -142,6 +142,7 @@ export class RdDResolutionTable {
|
|||||||
return reussite;
|
return reussite;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
static _computeRow(carac) {
|
static _computeRow(carac) {
|
||||||
let dataRow = [
|
let dataRow = [
|
||||||
this._computeCell(-10, Math.max(Math.floor(carac / 4), 1)),
|
this._computeCell(-10, Math.max(Math.floor(carac / 4), 1)),
|
||||||
@ -153,6 +154,7 @@ export class RdDResolutionTable {
|
|||||||
return dataRow;
|
return dataRow;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
static _computeCell(niveau, percentage) {
|
static _computeCell(niveau, percentage) {
|
||||||
return {
|
return {
|
||||||
niveau: niveau,
|
niveau: niveau,
|
||||||
@ -164,18 +166,22 @@ export class RdDResolutionTable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
static _reussiteSignificative(score) {
|
static _reussiteSignificative(score) {
|
||||||
return Math.floor(score / 2);
|
return Math.floor(score / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
static _reussitePart(score) {
|
static _reussitePart(score) {
|
||||||
return Math.ceil(score / 5);
|
return Math.ceil(score / 5);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
static _echecParticulier(score) {
|
static _echecParticulier(score) {
|
||||||
return Math.ceil(score / 5) + 80;
|
return Math.ceil(score / 5) + 80;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------------------------------------- */
|
||||||
static _echecTotal(score) {
|
static _echecTotal(score) {
|
||||||
return Math.ceil(score / 10) + 91;
|
return Math.ceil(score / 10) + 91;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user