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

@@ -1,4 +1,4 @@
import { ATTAQUE_TYPE, RdDItemArme } from "./item/arme.js";
import { ATTAQUE_TYPE, EMPOIGNADE, PUGILAT, RdDItemArme } from "./item/arme.js";
import { ITEM_TYPES } from "./constants.js";
export class RdDHotbar {
@@ -28,8 +28,8 @@ export class RdDHotbar {
return ' ' + maniement
case 'tir': return ' (tir)';
case 'lancer': return ' (lancer)';
case 'pugilat': return ' (pugilat)';
case 'empoignade': return ' (empoignade)';
case PUGILAT: return ' (pugilat)';
case EMPOIGNADE: return ' (empoignade)';
}
return ''
}
@@ -63,8 +63,8 @@ export class RdDHotbar {
case ITEM_TYPES.competence:
await this.createItemMacro(item, slot++, 'competence')
if (item.isCorpsACorps()) {
await this.createItemMacro(item, slot++, 'pugilat')
await this.createItemMacro(item, slot++, 'empoignade')
await this.createItemMacro(item, slot++, PUGILAT)
await this.createItemMacro(item, slot++, EMPOIGNADE)
}
else if (item.isCompetenceArme()) {
ui.notifications.info(`${item.name} est une compétence d'arme, la macro n'est pas liée à un arme.<br>
@@ -121,9 +121,9 @@ export class RdDHotbar {
case ITEM_TYPES.competence:
if (item.isCorpsACorps()) {
switch (categorieArme) {
case 'pugilat':
return actor.rollArme(RdDItemArme.corpsACorps(actor));
case 'empoignade':
case PUGILAT:
return actor.rollArme(RdDItemArme.pugilat(actor));
case EMPOIGNADE:
return actor.rollArme(RdDItemArme.empoignade(actor));
}
}