- ajoute les visuels système (bannière, pause, tokens)
Release Creation / build (release) Successful in 1m57s
Release Creation / build (release) Successful in 1m57s
- active le drag & drop inverse des objets depuis les fiches d’acteur - corrige le calcul des PV des créatures selon la taille - ajoute les options d’armes de créature manquantes - met à jour les styles et les packs générés
This commit is contained in:
@@ -81,6 +81,15 @@ export default class LesOubliesActorSheet extends HandlebarsApplicationMixin(fou
|
||||
super._onRender(context, options)
|
||||
}
|
||||
|
||||
_onDragStart(event) {
|
||||
const itemElement = event.currentTarget?.closest?.("[data-item-id]") ?? event.target?.closest?.("[data-item-id]")
|
||||
const itemId = itemElement?.dataset?.itemId
|
||||
const item = itemId ? this.document.items.get(itemId) : null
|
||||
if (!item || !event.dataTransfer) return
|
||||
|
||||
event.dataTransfer.setData("text/plain", JSON.stringify(item.toDragData()))
|
||||
}
|
||||
|
||||
_canDragStart() {
|
||||
return this.isEditable
|
||||
}
|
||||
|
||||
@@ -41,8 +41,9 @@ export class LesOubliesActor extends Actor {
|
||||
if (this.type !== "creature") return
|
||||
|
||||
const system = this.system
|
||||
const hpValue = Math.max(Number(system.hp?.value ?? 0), 0)
|
||||
const hpMax = Math.max(Number(system.hp?.max ?? hpValue), hpValue, 0)
|
||||
const sizeValue = Math.clamp(Number(system.size?.value ?? 1), 1, 8)
|
||||
const hpMax = Math.max(sizeValue * 4, 0)
|
||||
const hpValue = Math.max(Number(system.hp?.value ?? hpMax), 0)
|
||||
system.hp.max = hpMax
|
||||
system.hp.value = Math.min(hpValue, hpMax)
|
||||
const songesPoints = Math.max(Number(system.songes?.points ?? 0), 0)
|
||||
|
||||
@@ -60,12 +60,14 @@ export const SIZE_LABELS = {
|
||||
}
|
||||
|
||||
export const WEAPON_CATEGORY_LABELS = {
|
||||
corpsacorps: "Corps à corps",
|
||||
melee: "Mêlée",
|
||||
tir: "Tir",
|
||||
jet: "Jet",
|
||||
}
|
||||
|
||||
export const WEAPON_ORIGIN_LABELS = {
|
||||
animaux: "Animaux",
|
||||
geant: "Géant",
|
||||
petitPeuple: "Petit Peuple",
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user