feat: separate skill value/max (transcendence pool vs level)
Release Creation / build (release) Successful in 58s

- skill.value = spendable transcendence pool (editable select)
- skill.max = max level (locked by default, unlock btn)
- computeRollFormula/computeResults/confront use skill.max
- clamp transcendence spend to skill.value
- resetTranscendence button in Bio&Notes
- v14 compat: duplicate→deepClone, mergeObject→spread, socket fixes
- Dialog v1 removed, DragDrop dedup, await fixes
This commit is contained in:
2026-07-24 09:00:26 +02:00
parent 8c79e6f0ba
commit 31e2561797
63 changed files with 385 additions and 340 deletions
+4 -7
View File
@@ -8,7 +8,7 @@ export class EcrymeCombat extends Combat {
ids = typeof ids === "string" ? [ids] : ids;
for (let cId = 0; cId < ids.length; cId++) {
const c = this.combatants.get(ids[cId]);
let id = c._id || c.id;
let id = c.id;
let initBonus = c.actor ? c.actor.getInitiativeScore( this.id, id ) : -1;
await this.updateEmbeddedDocuments("Combatant", [ { _id: id, initiative: initBonus } ]);
}
@@ -17,9 +17,6 @@ export class EcrymeCombat extends Combat {
}
/* -------------------------------------------- */
_onUpdate(changed, options, userId) {
}
/* -------------------------------------------- */
static async checkTurnPosition() {
while (game.combat.turn > 0) {
@@ -28,13 +25,13 @@ export class EcrymeCombat extends Combat {
}
/* -------------------------------------------- */
_onDelete() {
async _onDelete() {
let combatants = this.combatants.contents
for (let c of combatants) {
let actor = game.actors.get(c.actorId)
actor.clearInitiative()
await actor.clearInitiative()
}
super._onDelete()
await super._onDelete()
}
}
+3 -3
View File
@@ -7,10 +7,10 @@ import { EcrymeCharacterSummary } from "../app/ecryme-summary-app.js"
export class EcrymeCommands {
static init() {
if (!game.system.ecryme.commands) {
if (!game.ecryme.commands) {
const commands = new EcrymeCommands();
commands.registerCommand({ path: ["/resume"], func: (content, msg, params) => EcrymeCharacterSummary.displayPCSummary(), descr: "Affiche la liste des PJs!" });
game.system.ecryme.commands = commands;
game.ecryme.commands = commands;
}
}
constructor() {
@@ -88,7 +88,7 @@ export class EcrymeCommands {
if (command && command.func) {
const result = command.func(content, msg, params);
if (result == false) {
CrucibleCommands._chatAnswer(msg, command.descr);
EcrymeCommands._chatAnswer(msg, command.descr);
}
return true;
}
+4 -4
View File
@@ -14,7 +14,7 @@ export class EcrymeHotbar {
if (documentData.type == "Item") {
console.log("Drop done !!!", bar, documentData, slot)
let item = documentData.data
let command = `game.system.ecryme.EcrymeHotbar.rollMacro("${item.name}", "${item.type}");`
let command = `game.ecryme.EcrymeHotbar.rollMacro("${item.name}", "${item.type}");`
let macro = game.macros.contents.find(m => (m.name === item.name) && (m.command === command))
if (!macro) {
macro = await Macro.create({
@@ -33,9 +33,9 @@ export class EcrymeHotbar {
let macro = game.macros.contents.find(m => (m.name === actor.name) && (m.command === command));
if (!macro) {
macro = await Macro.create({
name: actor.data.name,
name: actor.name,
type: "script",
img: actor.data.img,
img: actor.img,
command: command
}, { displaySheet: false })
game.user.assignHotbarMacro(macro, slot);
@@ -48,7 +48,7 @@ export class EcrymeHotbar {
let macro = game.macros.contents.find(m => (m.name === journal.name) && (m.command === command));
if (!macro) {
macro = await Macro.create({
name: journal.data.name,
name: journal.name,
type: "script",
img: "",
command: command
+3 -3
View File
@@ -31,7 +31,7 @@ export class EcrymeCharacterSummary extends HandlebarsApplicationMixin(foundry.a
/* -------------------------------------------- */
static displayPCSummary() {
if (game.user.isGM) {
game.system.ecryme.charSummary.render(true)
game.ecryme.charSummary.render(true)
} else {
ui.notifications.info("Commande /summary réservée au MJ !")
}
@@ -50,7 +50,7 @@ export class EcrymeCharacterSummary extends HandlebarsApplicationMixin(foundry.a
return
}
let charSummary = new EcrymeCharacterSummary()
game.system.ecryme.charSummary = charSummary
game.ecryme.charSummary = charSummary
}
/* -------------------------------------------- */
@@ -75,7 +75,7 @@ export class EcrymeCharacterSummary extends HandlebarsApplicationMixin(foundry.a
return {
pcs,
npcs,
config: game.system.ecryme.config,
config: game.ecryme.config,
}
}