fix: utiliser skill.value dans les formules de jets (pas skill.max)
Release Creation / build (release) Successful in 40s
Release Creation / build (release) Successful in 40s
- computeRollFormula, computeResults, confrontations utilisent la valeur actuelle - skill.max sert uniquement de plafond et d'affichage
This commit is contained in:
@@ -229,19 +229,19 @@ export class EcrymeUtility {
|
||||
let maxMargin // Dummy max
|
||||
if (confront.marginExecution > 0) { // Successful hit
|
||||
// Limit with skill+spec
|
||||
maxMargin = confront.rollData1.skill.max + ((confront.rollData1.spec) ? 2 : 0)
|
||||
maxMargin = confront.rollData1.skill.value + ((confront.rollData1.spec) ? 2 : 0)
|
||||
confront.marginExecution = Math.min(confront.marginExecution, maxMargin)
|
||||
} else { // Failed hit
|
||||
maxMargin = confront.rollData2.skill.max + ((confront.rollData2.spec) ? 2 : 0)
|
||||
maxMargin = confront.rollData2.skill.value + ((confront.rollData2.spec) ? 2 : 0)
|
||||
confront.marginExecution = -Math.min(Math.abs(confront.marginExecution), maxMargin)
|
||||
}
|
||||
|
||||
if (confront.marginPreservation > 0) { // Successful defense
|
||||
// Limit with skill+spec
|
||||
maxMargin = confront.rollData1.skill.max + ((confront.rollData1.spec) ? 2 : 0)
|
||||
maxMargin = confront.rollData1.skill.value + ((confront.rollData1.spec) ? 2 : 0)
|
||||
confront.marginPreservation = Math.min(confront.marginPreservation, maxMargin)
|
||||
} else { // Failed defense
|
||||
maxMargin = confront.rollData2.skill.max + ((confront.rollData2.spec) ? 2 : 0)
|
||||
maxMargin = confront.rollData2.skill.value + ((confront.rollData2.spec) ? 2 : 0)
|
||||
confront.marginPreservation = - Math.min(Math.abs(confront.marginPreservation), maxMargin)
|
||||
}
|
||||
|
||||
@@ -551,7 +551,7 @@ export class EcrymeUtility {
|
||||
rollData.margin = rollData.total - rollData.difficulty
|
||||
if (rollData.total > rollData.difficulty) {
|
||||
rollData.isSuccess = true
|
||||
let maxMargin = rollData.skill.max + ((rollData.spec) ? 2 : 0)
|
||||
let maxMargin = rollData.skill.value + ((rollData.spec) ? 2 : 0)
|
||||
rollData.margin = Math.min(rollData.margin, maxMargin)
|
||||
}
|
||||
}
|
||||
@@ -567,7 +567,7 @@ export class EcrymeUtility {
|
||||
diceFormula = (isConfrontation) ? "5d6kl2" : "3d6kl2"
|
||||
}
|
||||
if (rollData.skill) {
|
||||
diceFormula += "+" + rollData.skill.max
|
||||
diceFormula += "+" + rollData.skill.value
|
||||
}
|
||||
if (rollData.skillTranscendence) {
|
||||
let toSpend = Math.min(rollData.skillTranscendence, rollData.skill.value)
|
||||
|
||||
Reference in New Issue
Block a user