Roll V2 sur compétences&combat

Corrections associées
Maintenant, active en mode rollV2
This commit is contained in:
2025-10-03 22:34:07 +02:00
parent 52065fd6f6
commit 47c4478303
12 changed files with 118 additions and 70 deletions

View File

@@ -264,8 +264,8 @@ export default class RollDialog extends HandlebarsApplicationMixin(ApplicationV2
const potential = ALL_ROLL_TYPES.find(m => m.code == rollData.type.current)?.code
const allowed = rollData.type.retry && potential
? [potential]
: (rollData.type.allowed ?? ALL_ROLL_TYPES.filter(m => m.isAllowed(rollData) && m.visible(rollData)).map(m => m.code))
const rollType = allowed.find(c => c == rollData.type.current) ?? (allowed.length > 0 ? allowed[0].code : ROLL_TYPE_COMP);
: (rollData.type.allowed ?? ALL_ROLL_TYPES.filter(m => m.isAllowed(rollData) && m.visible(rollData)).map(m => m.code) ?? [ROLL_TYPE_COMP])
const rollType = allowed.find(c => c == rollData.type.current) ?? allowed[0]
rollData.type.allowed = allowed
rollData.type.current = rollType