Update CSS/Look & feel

This commit is contained in:
2026-04-03 00:39:39 +02:00
parent 23b105a47e
commit 9754bbc3a8
265 changed files with 12355 additions and 47899 deletions

View File

@@ -16,10 +16,10 @@ export default class MournbladeCYD2ActorSheetV2 extends HandlebarsApplicationMix
/** @override */
static DEFAULT_OPTIONS = {
classes: ["fvtt-mournblade-cyd2", "sheet", "actor"],
classes: ["fvtt-mournblade-cyd-2-0", "sheet", "actor"],
position: {
width: 640,
height: 720,
width: 750,
height: 820,
},
form: {
submitOnChange: true,
@@ -44,6 +44,7 @@ export default class MournbladeCYD2ActorSheetV2 extends HandlebarsApplicationMix
createItem: MournbladeCYD2ActorSheetV2.#onCreateItem,
equipItem: MournbladeCYD2ActorSheetV2.#onEquipItem,
modifyQuantity: MournbladeCYD2ActorSheetV2.#onModifyQuantity,
modifyAdversite: MournbladeCYD2ActorSheetV2.#onModifyAdversite,
modifySante: MournbladeCYD2ActorSheetV2.#onModifySante,
modifyAme: MournbladeCYD2ActorSheetV2.#onModifyAme,
rollAttribut: MournbladeCYD2ActorSheetV2.#onRollAttribut,
@@ -53,7 +54,11 @@ export default class MournbladeCYD2ActorSheetV2 extends HandlebarsApplicationMix
rollArmeSpecial: MournbladeCYD2ActorSheetV2.#onRollArmeSpecial,
rollArmeDegats: MournbladeCYD2ActorSheetV2.#onRollArmeDegats,
rollAssommer: MournbladeCYD2ActorSheetV2.#onRollAssommer,
rollCoupBas: MournbladeCYD2ActorSheetV2.#onRollCoupBas,
rollImmobiliser: MournbladeCYD2ActorSheetV2.#onRollImmobiliser,
rollRepousser: MournbladeCYD2ActorSheetV2.#onRollRepousser,
rollDesengager: MournbladeCYD2ActorSheetV2.#onRollDesengager,
rollInitiative: MournbladeCYD2ActorSheetV2.#onRollInitiative,
rollFuir: MournbladeCYD2ActorSheetV2.#onRollFuir,
},
};
@@ -226,6 +231,15 @@ export default class MournbladeCYD2ActorSheetV2 extends HandlebarsApplicationMix
}
}
static async #onModifyAdversite(event, target) {
const li = target.closest('[data-adversite]');
const adversiteKey = li?.dataset.adversite;
if (!adversiteKey) return;
const value = Number.parseInt(target.dataset.adversiteValue);
const current = this.document.system.adversite[adversiteKey] || 0;
await this.document.update({ [`system.adversite.${adversiteKey}`]: Math.max(0, current + value) });
}
static async #onModifySante(event, target) {
const type = target.dataset.type;
const value = Number.parseInt(target.dataset.value);
@@ -254,25 +268,44 @@ export default class MournbladeCYD2ActorSheetV2 extends HandlebarsApplicationMix
}
static async #onRollArmeOffensif(event, target) {
await this.document.rollArmeOffensif(target.dataset.armeId);
const li = target.closest('[data-item-id]');
await this.document.rollArmeOffensif(target.dataset.armeId ?? li?.dataset.itemId);
}
static async #onRollArmeSpecial(event, target) {
await this.document.rollArmeSpecial(target.dataset.armeId);
const li = target.closest('[data-item-id]');
await this.document.rollArmeSpecial(target.dataset.armeId ?? li?.dataset.itemId);
}
static async #onRollArmeDegats(event, target) {
await this.document.rollArmeDegats(target.dataset.armeId);
const li = target.closest('[data-item-id]');
await this.document.rollArmeDegats(target.dataset.armeId ?? li?.dataset.itemId);
}
static async #onRollAssommer(event, target) {
await this.document.rollAssomer();
}
static async #onRollCoupBas(event, target) {
await this.document.rollCoupBas();
}
static async #onRollImmobiliser(event, target) {
await this.document.rollImmobiliser();
}
static async #onRollRepousser(event, target) {
await this.document.rollRepousser();
}
static async #onRollDesengager(event, target) {
await this.document.rollDesengager();
}
static async #onRollInitiative(event, target) {
await this.document.rollAttribut("adr", true);
}
static async #onRollFuir(event, target) {
await this.document.rollFuir();
}