forked from public/foundryvtt-reve-de-dragon
Jets de compétence avec carac imposée
Fonctionne maintenant correctement Pour les créatures/entitées: on fait au mieux, mais ça ne correspond pas forcément bien, car les carac/compétences ne correspondent pas toujours
This commit is contained in:
@ -41,7 +41,7 @@ export class TextRollCaracCompetence {
|
||||
if (diff.match(REGEX_DICE_DIFF)) {
|
||||
const roll = new Roll(diff)
|
||||
await roll.evaluate()
|
||||
await roll.toMessage({flavor: `La difficulté de ${diff} a donné ${roll.total}`})
|
||||
await roll.toMessage({ flavor: `La difficulté de ${diff} a donné ${roll.total}` })
|
||||
return roll.total
|
||||
}
|
||||
return diff
|
||||
@ -49,17 +49,14 @@ export class TextRollCaracCompetence {
|
||||
|
||||
async doRoll(actor, caracCode, competence, diff) {
|
||||
caracCode = actor.mapCarac(caracCode)
|
||||
if (competence) {
|
||||
if (actor.type == ACTOR_TYPES.personnage) {
|
||||
if (caracCode) {
|
||||
if (competence) {
|
||||
await actor.rollCaracCompetence(caracCode, competence, diff)
|
||||
}
|
||||
else {
|
||||
await actor.doRollCaracCompetence(caracCode, competence, diff)
|
||||
await actor.rollCarac(caracCode, { diff })
|
||||
}
|
||||
}
|
||||
else {
|
||||
await actor.rollCarac(caracCode, { diff })
|
||||
}
|
||||
}
|
||||
|
||||
getSelectedActors(actor) {
|
||||
|
Reference in New Issue
Block a user