Affichage des ajustements V2

This commit is contained in:
2025-10-17 22:51:56 +02:00
parent a6c593c100
commit e16f89743a
29 changed files with 94 additions and 79 deletions

View File

@@ -63,14 +63,9 @@ export class RollPartAttaque extends RollPartSelect {
getAjustements(rollData) {
const current = this.getCurrent(rollData)
const ajustements = []
if (current.tactique) {
ajustements.push({ label: current.tactique.label, diff: current.tactique.attaque })
}
if (rollData.opponent?.surprise) {
ajustements.push({ label: rollData.opponent.surprise.label, diff: rollData.opponent.surprise.attaque })
}
return ajustements
const tactique = current.tactique ? [{ label: current.tactique.label, value: current.tactique.attaque }] : []
const surprise = rollData.opponent?.surprise ? [{ label: rollData.opponent.surprise.label, value: rollData.opponent.surprise.attaque }] : []
return [...tactique, ...surprise]
}