diff --git a/lang/fr.json b/lang/fr.json index 6e3623e..701f6a3 100644 --- a/lang/fr.json +++ b/lang/fr.json @@ -449,7 +449,9 @@ "rangeLongue": "Longue portée", "type": "Type", "typeMelee": "Mêlée", - "typeDistance": "Distance" + "typeDistance": "Distance", + "equip": "Équiper", + "unequip": "Retirer" }, "Armure": { "protection": "Protection", diff --git a/module/applications/sheets/base-actor-sheet.mjs b/module/applications/sheets/base-actor-sheet.mjs index 2c12560..f81843f 100644 --- a/module/applications/sheets/base-actor-sheet.mjs +++ b/module/applications/sheets/base-actor-sheet.mjs @@ -46,6 +46,7 @@ export default class CelestopolActorSheet extends HandlebarsApplicationMixin(fou skillLevel: CelestopolActorSheet.#onSkillLevel, factionLevel: CelestopolActorSheet.#onFactionLevel, toggleArmure: CelestopolActorSheet.#onToggleArmure, + toggleWeapon: CelestopolActorSheet.#onToggleWeapon, }, } @@ -237,6 +238,13 @@ export default class CelestopolActorSheet extends HandlebarsApplicationMixin(fou if (item?.type === "armure") await item.update({ "system.equipped": !item.system.equipped }) } + static async #onToggleWeapon(_event, target) { + const uuid = target.closest('[data-item-uuid]')?.dataset.itemUuid + if (!uuid) return + const item = await fromUuid(uuid) + if (item?.type === "weapon") await item.update({ "system.equipped": !item.system.equipped }) + } + static #onFactionLevel(_event, target) { if (!this.isEditable) return const factionId = target.dataset.faction diff --git a/module/documents/roll.mjs b/module/documents/roll.mjs index 4f3132c..89a1174 100644 --- a/module/documents/roll.mjs +++ b/module/documents/roll.mjs @@ -320,6 +320,8 @@ export class CelestopolRoll extends Roll { : null const resolvedWeaponName = (isRangedDefense && selectedCombatTarget?.weaponName) ? selectedCombatTarget.weaponName : weaponName const resolvedWeaponDegats = (isRangedDefense && selectedCombatTarget?.weaponDegats) ? selectedCombatTarget.weaponDegats : weaponDegats + // Dégâts de l'arme adverse en cas d'échec (arme équipée du PNJ ciblé en mêlée, arme distance en esquive) + const incomingWeaponDegats = selectedCombatTarget?.weaponDegats ?? resolvedWeaponDegats const targetActorId = selectedCombatTarget?.id || "" const targetActorUuid = selectedCombatTarget?.uuid || "" const targetActorName = selectedCombatTarget?.name || "" @@ -373,6 +375,7 @@ export class CelestopolRoll extends Roll { weaponType, weaponName: resolvedWeaponName, weaponDegats: resolvedWeaponDegats, + incomingWeaponDegats, targetActorId, targetActorUuid, targetActorName, @@ -407,9 +410,9 @@ export class CelestopolRoll extends Roll { } } - // Mêlée échouée OU défense à distance échouée → le protagoniste subit les dégâts de l'arme PNJ - if (isCombat && (weaponType === "melee" || isRangedDefense) && actor && roll.options.resultType === "failure") { - const incomingWounds = this.getIncomingWounds(resolvedWeaponDegats) + // Mêlée échouée OU défense à distance échouée → le protagoniste (PJ uniquement) subit les dégâts de l'arme PNJ + if (isCombat && (weaponType === "melee" || isRangedDefense) && actor?.type === "character" && roll.options.resultType === "failure") { + const incomingWounds = this.getIncomingWounds(roll.options.incomingWeaponDegats ?? resolvedWeaponDegats) const protection = this.getActorArmorProtection(actor) const appliedWounds = incomingWounds === null ? 1 @@ -555,6 +558,13 @@ export class CelestopolRoll extends Roll { ? Math.max(0, incomingWounds - selectedTargetProtection) : null + // Type de l'acteur qui lance le jet (character | npc) + const rollingActor = await this.constructor.resolveActor({ + actorUuid: this.options.actorUuid ?? null, + actorId: this.options.actorId ?? null, + }) + const actorType = rollingActor?.type ?? this.options.actorType ?? null + // Libellé de difficulté : en combat "Corps PNJ : N", en opposition "vs ?", sinon "Seuil : 11" const difficultyLabel = this.options.isCombat ? `${game.i18n.localize("CELESTOPOL.Combat.corpsPnj")} : ${threshold}` @@ -600,6 +610,8 @@ export class CelestopolRoll extends Roll { woundLabel, isResistance: this.options.isResistance ?? false, isCombat: this.options.isCombat ?? false, + actorType, + isNpcAttack: actorType === "npc", weaponName: this.options.weaponName ?? null, weaponDegats, weaponType: this.options.weaponType ?? null, diff --git a/module/models/character.mjs b/module/models/character.mjs index 2b1d4f1..623e957 100644 --- a/module/models/character.mjs +++ b/module/models/character.mjs @@ -13,8 +13,6 @@ import { SYSTEM } from "../config/system.mjs" -const WEAPON_DAMAGE_PRIORITY = { "0": 0, "1": 1, "2": 2, X: 3 } - export default class CelestopolCharacter extends foundry.abstract.TypeDataModel { static defineSchema() { const fields = foundry.data.fields @@ -275,40 +273,39 @@ export default class CelestopolCharacter extends foundry.abstract.TypeDataModel * Collecte les cibles de combat sur la scène active. * Pour un PJ attaquant, seules les cibles PNJ présentes sur la scène sont proposées. * @param {object} options - * @param {boolean} [options.onlyRanged=false] - * @param {boolean} [options.fallbackToAll=false] + * @param {boolean} [options.onlyRanged=false] - Filtrer sur les PNJ ayant une arme à distance équipée + * @param {boolean} [options.fallbackToAll=false] - Revenir à tous les PNJ si aucune cible trouvée + * @param {boolean} [options.includeMeleeWeapon=false] - Inclure l'arme de mêlée équipée du PNJ (dégâts adverses) * @returns {Array<{id:string, uuid:string, name:string, corps:number, weaponName?:string, weaponDegats?:string}>} */ - _getCombatTargets({ onlyRanged = false, fallbackToAll = false } = {}) { - const getBestRangedWeapon = actor => { - const rangedWeapons = actor.itemTypes?.weapon?.filter(item => item.system.type === "distance") ?? [] - if (!rangedWeapons.length) return null - return rangedWeapons.reduce((best, item) => { - if (!best) return item - const bestPriority = WEAPON_DAMAGE_PRIORITY[best.system.degats] ?? -1 - const itemPriority = WEAPON_DAMAGE_PRIORITY[item.system.degats] ?? -1 - if (itemPriority !== bestPriority) return itemPriority > bestPriority ? item : best - return item.name.localeCompare(best.name) < 0 ? item : best - }, null) + _getCombatTargets({ onlyRanged = false, fallbackToAll = false, includeMeleeWeapon = false } = {}) { + const getEquippedWeapon = (actor, type) => + actor.itemTypes?.weapon?.find(item => item.system.type === type && item.system.equipped) ?? null + + const toEntry = actor => { + const entry = { + id: actor.id, + uuid: actor.uuid, + name: actor.name, + corps: actor.system.stats?.corps?.res ?? 0, + } + if (onlyRanged) { + const weapon = getEquippedWeapon(actor, "distance") + if (weapon) { + entry.weaponName = weapon.name + entry.weaponDegats = weapon.system.degats + } + } else if (includeMeleeWeapon) { + const weapon = getEquippedWeapon(actor, "melee") + entry.weaponDegats = weapon ? weapon.system.degats : "0" + } + return entry } - const toEntry = actor => ({ - id: actor.id, - uuid: actor.uuid, - name: actor.name, - corps: actor.system.stats?.corps?.res ?? 0, - ...(onlyRanged ? (() => { - const weapon = getBestRangedWeapon(actor) - return weapon ? { - weaponName: weapon.name, - weaponDegats: weapon.system.degats, - } : {} - })() : {}), - }) const sceneTokens = canvas?.scene?.isView ? (canvas.tokens?.placeables ?? []) : [] const targets = [...new Map(sceneTokens .filter(t => t.actor?.type === "npc" && t.actor.id !== this.parent.id) - .filter(t => !onlyRanged || getBestRangedWeapon(t.actor)) + .filter(t => !onlyRanged || getEquippedWeapon(t.actor, "distance")) .map(t => { const actor = t.actor return [actor.uuid, toEntry(actor)] @@ -353,13 +350,12 @@ export default class CelestopolCharacter extends foundry.abstract.TypeDataModel weaponType: item.system.type, weaponName: item.name, weaponDegats: item.system.degats, - availableTargets: this._getCombatTargets(), + availableTargets: this._getCombatTargets({ includeMeleeWeapon: item.system.type === "melee" }), }) } /** - * Lance une attaque de mêlée à mains nues. - * @returns {Promise} + * Lance une attaque à mains nues (Échauffourée sans arme). */ async rollUnarmedAttack() { const { CelestopolRoll } = await import("../documents/roll.mjs") @@ -387,7 +383,7 @@ export default class CelestopolCharacter extends foundry.abstract.TypeDataModel weaponType: "melee", weaponName: game.i18n.localize("CELESTOPOL.Combat.unarmedAttack"), weaponDegats: "0", - availableTargets: this._getCombatTargets(), + availableTargets: this._getCombatTargets({ includeMeleeWeapon: true }), }) } @@ -426,7 +422,7 @@ export default class CelestopolCharacter extends foundry.abstract.TypeDataModel weaponType: "distance", weaponName: item.name, weaponDegats: "0", - availableTargets: this._getCombatTargets(), + availableTargets: this._getCombatTargets({ onlyRanged: true, fallbackToAll: true }), }) } diff --git a/module/models/items.mjs b/module/models/items.mjs index ed16c69..3601f68 100644 --- a/module/models/items.mjs +++ b/module/models/items.mjs @@ -85,6 +85,7 @@ export class CelestopolWeapon extends foundry.abstract.TypeDataModel { choices: Object.keys(SYSTEM.WEAPON_DAMAGE_TYPES) }), portee: new fields.StringField({ required: true, nullable: false, initial: "contact", choices: Object.keys(SYSTEM.WEAPON_RANGE_TYPES) }), + equipped: new fields.BooleanField({ initial: false }), description: new fields.HTMLField({ required: true, textSearch: true }), } } diff --git a/packs-system/aides-de-jeu/000072.log b/packs-system/aides-de-jeu/000075.log similarity index 100% rename from packs-system/aides-de-jeu/000072.log rename to packs-system/aides-de-jeu/000075.log diff --git a/packs-system/aides-de-jeu/CURRENT b/packs-system/aides-de-jeu/CURRENT index bcf1079..f8d57cc 100644 --- a/packs-system/aides-de-jeu/CURRENT +++ b/packs-system/aides-de-jeu/CURRENT @@ -1 +1 @@ -MANIFEST-000070 +MANIFEST-000074 diff --git a/packs-system/aides-de-jeu/LOG b/packs-system/aides-de-jeu/LOG index 2a606b7..edf2787 100644 --- a/packs-system/aides-de-jeu/LOG +++ b/packs-system/aides-de-jeu/LOG @@ -1,8 +1,3 @@ -2026/04/14-00:55:24.427256 7f68497ed6c0 Recovering log #68 -2026/04/14-00:55:24.442232 7f68497ed6c0 Delete type=3 #66 -2026/04/14-00:55:24.442302 7f68497ed6c0 Delete type=0 #68 -2026/04/14-00:56:01.490011 7f6833fff6c0 Level-0 table #73: started -2026/04/14-00:56:01.490050 7f6833fff6c0 Level-0 table #73: 0 bytes OK -2026/04/14-00:56:01.496026 7f6833fff6c0 Delete type=0 #71 -2026/04/14-00:56:01.502797 7f6833fff6c0 Manual compaction at level-0 from '!journal!eNYstmPK0mMmVJYC' @ 72057594037927935 : 1 .. '!journal.pages!eNYstmPK0mMmVJYC.r9h1ggd3G9hiqYJX' @ 0 : 0; will stop at (end) -2026/04/14-00:56:01.513341 7f6833fff6c0 Manual compaction at level-1 from '!journal!eNYstmPK0mMmVJYC' @ 72057594037927935 : 1 .. '!journal.pages!eNYstmPK0mMmVJYC.r9h1ggd3G9hiqYJX' @ 0 : 0; will stop at (end) +2026/04/14-10:43:54.304360 7fddcbfff6c0 Recovering log #72 +2026/04/14-10:43:54.314599 7fddcbfff6c0 Delete type=3 #70 +2026/04/14-10:43:54.314647 7fddcbfff6c0 Delete type=0 #72 diff --git a/packs-system/aides-de-jeu/LOG.old b/packs-system/aides-de-jeu/LOG.old index d4bf04d..2a606b7 100644 --- a/packs-system/aides-de-jeu/LOG.old +++ b/packs-system/aides-de-jeu/LOG.old @@ -1,8 +1,8 @@ -2026/04/14-00:42:19.979759 7f68497ed6c0 Recovering log #64 -2026/04/14-00:42:19.989860 7f68497ed6c0 Delete type=3 #62 -2026/04/14-00:42:19.989918 7f68497ed6c0 Delete type=0 #64 -2026/04/14-00:50:27.807116 7f6833fff6c0 Level-0 table #69: started -2026/04/14-00:50:27.807197 7f6833fff6c0 Level-0 table #69: 0 bytes OK -2026/04/14-00:50:27.813335 7f6833fff6c0 Delete type=0 #67 -2026/04/14-00:50:27.836261 7f6833fff6c0 Manual compaction at level-0 from '!journal!eNYstmPK0mMmVJYC' @ 72057594037927935 : 1 .. '!journal.pages!eNYstmPK0mMmVJYC.r9h1ggd3G9hiqYJX' @ 0 : 0; will stop at (end) -2026/04/14-00:50:27.836305 7f6833fff6c0 Manual compaction at level-1 from '!journal!eNYstmPK0mMmVJYC' @ 72057594037927935 : 1 .. '!journal.pages!eNYstmPK0mMmVJYC.r9h1ggd3G9hiqYJX' @ 0 : 0; will stop at (end) +2026/04/14-00:55:24.427256 7f68497ed6c0 Recovering log #68 +2026/04/14-00:55:24.442232 7f68497ed6c0 Delete type=3 #66 +2026/04/14-00:55:24.442302 7f68497ed6c0 Delete type=0 #68 +2026/04/14-00:56:01.490011 7f6833fff6c0 Level-0 table #73: started +2026/04/14-00:56:01.490050 7f6833fff6c0 Level-0 table #73: 0 bytes OK +2026/04/14-00:56:01.496026 7f6833fff6c0 Delete type=0 #71 +2026/04/14-00:56:01.502797 7f6833fff6c0 Manual compaction at level-0 from '!journal!eNYstmPK0mMmVJYC' @ 72057594037927935 : 1 .. '!journal.pages!eNYstmPK0mMmVJYC.r9h1ggd3G9hiqYJX' @ 0 : 0; will stop at (end) +2026/04/14-00:56:01.513341 7f6833fff6c0 Manual compaction at level-1 from '!journal!eNYstmPK0mMmVJYC' @ 72057594037927935 : 1 .. '!journal.pages!eNYstmPK0mMmVJYC.r9h1ggd3G9hiqYJX' @ 0 : 0; will stop at (end) diff --git a/packs-system/aides-de-jeu/MANIFEST-000070 b/packs-system/aides-de-jeu/MANIFEST-000074 similarity index 79% rename from packs-system/aides-de-jeu/MANIFEST-000070 rename to packs-system/aides-de-jeu/MANIFEST-000074 index 02510ce..fe288a9 100644 Binary files a/packs-system/aides-de-jeu/MANIFEST-000070 and b/packs-system/aides-de-jeu/MANIFEST-000074 differ diff --git a/packs-system/anomalies/000128.log b/packs-system/anomalies/000128.log new file mode 100644 index 0000000..7746829 Binary files /dev/null and b/packs-system/anomalies/000128.log differ diff --git a/packs-system/anomalies/CURRENT b/packs-system/anomalies/CURRENT index d9766b1..224d52a 100644 --- a/packs-system/anomalies/CURRENT +++ b/packs-system/anomalies/CURRENT @@ -1 +1 @@ -MANIFEST-000122 +MANIFEST-000127 diff --git a/packs-system/anomalies/LOG b/packs-system/anomalies/LOG index f0b562d..4750b80 100644 --- a/packs-system/anomalies/LOG +++ b/packs-system/anomalies/LOG @@ -1,15 +1,3 @@ -2026/04/14-00:55:24.391968 7f6848fec6c0 Recovering log #119 -2026/04/14-00:55:24.406978 7f6848fec6c0 Delete type=3 #117 -2026/04/14-00:55:24.407044 7f6848fec6c0 Delete type=0 #119 -2026/04/14-00:56:01.480723 7f6833fff6c0 Level-0 table #125: started -2026/04/14-00:56:01.483872 7f6833fff6c0 Level-0 table #125: 3524 bytes OK -2026/04/14-00:56:01.489828 7f6833fff6c0 Delete type=0 #123 -2026/04/14-00:56:01.502786 7f6833fff6c0 Manual compaction at level-0 from '!items!anomCommMorts001' @ 72057594037927935 : 1 .. '!items!null' @ 0 : 0; will stop at (end) -2026/04/14-00:56:01.502828 7f6833fff6c0 Manual compaction at level-1 from '!items!anomCommMorts001' @ 72057594037927935 : 1 .. '!items!null' @ 0 : 0; will stop at '!items!null' @ 105 : 1 -2026/04/14-00:56:01.502835 7f6833fff6c0 Compacting 1@1 + 1@2 files -2026/04/14-00:56:01.506551 7f6833fff6c0 Generated table #126@1: 9 keys, 6617 bytes -2026/04/14-00:56:01.506586 7f6833fff6c0 Compacted 1@1 + 1@2 files => 6617 bytes -2026/04/14-00:56:01.512723 7f6833fff6c0 compacted to: files[ 0 0 1 0 0 0 0 ] -2026/04/14-00:56:01.513072 7f6833fff6c0 Delete type=2 #121 -2026/04/14-00:56:01.513274 7f6833fff6c0 Delete type=2 #125 -2026/04/14-00:56:01.519560 7f6833fff6c0 Manual compaction at level-1 from '!items!null' @ 105 : 1 .. '!items!null' @ 0 : 0; will stop at (end) +2026/04/14-10:43:54.279048 7fddd97be6c0 Recovering log #124 +2026/04/14-10:43:54.288686 7fddd97be6c0 Delete type=3 #122 +2026/04/14-10:43:54.288755 7fddd97be6c0 Delete type=0 #124 diff --git a/packs-system/anomalies/LOG.old b/packs-system/anomalies/LOG.old index 3eb03fc..f0b562d 100644 --- a/packs-system/anomalies/LOG.old +++ b/packs-system/anomalies/LOG.old @@ -1,15 +1,15 @@ -2026/04/14-00:42:19.950173 7f684a7ef6c0 Recovering log #114 -2026/04/14-00:42:19.961639 7f684a7ef6c0 Delete type=3 #112 -2026/04/14-00:42:19.961720 7f684a7ef6c0 Delete type=0 #114 -2026/04/14-00:50:27.813444 7f6833fff6c0 Level-0 table #120: started -2026/04/14-00:50:27.816594 7f6833fff6c0 Level-0 table #120: 3524 bytes OK -2026/04/14-00:50:27.823812 7f6833fff6c0 Delete type=0 #118 -2026/04/14-00:50:27.836273 7f6833fff6c0 Manual compaction at level-0 from '!items!anomCommMorts001' @ 72057594037927935 : 1 .. '!items!null' @ 0 : 0; will stop at (end) -2026/04/14-00:50:27.836318 7f6833fff6c0 Manual compaction at level-1 from '!items!anomCommMorts001' @ 72057594037927935 : 1 .. '!items!null' @ 0 : 0; will stop at '!items!null' @ 101 : 1 -2026/04/14-00:50:27.836325 7f6833fff6c0 Compacting 1@1 + 1@2 files -2026/04/14-00:50:27.839513 7f6833fff6c0 Generated table #121@1: 9 keys, 6617 bytes -2026/04/14-00:50:27.839549 7f6833fff6c0 Compacted 1@1 + 1@2 files => 6617 bytes -2026/04/14-00:50:27.846476 7f6833fff6c0 compacted to: files[ 0 0 1 0 0 0 0 ] -2026/04/14-00:50:27.846640 7f6833fff6c0 Delete type=2 #116 -2026/04/14-00:50:27.846851 7f6833fff6c0 Delete type=2 #120 -2026/04/14-00:50:27.853500 7f6833fff6c0 Manual compaction at level-1 from '!items!null' @ 101 : 1 .. '!items!null' @ 0 : 0; will stop at (end) +2026/04/14-00:55:24.391968 7f6848fec6c0 Recovering log #119 +2026/04/14-00:55:24.406978 7f6848fec6c0 Delete type=3 #117 +2026/04/14-00:55:24.407044 7f6848fec6c0 Delete type=0 #119 +2026/04/14-00:56:01.480723 7f6833fff6c0 Level-0 table #125: started +2026/04/14-00:56:01.483872 7f6833fff6c0 Level-0 table #125: 3524 bytes OK +2026/04/14-00:56:01.489828 7f6833fff6c0 Delete type=0 #123 +2026/04/14-00:56:01.502786 7f6833fff6c0 Manual compaction at level-0 from '!items!anomCommMorts001' @ 72057594037927935 : 1 .. '!items!null' @ 0 : 0; will stop at (end) +2026/04/14-00:56:01.502828 7f6833fff6c0 Manual compaction at level-1 from '!items!anomCommMorts001' @ 72057594037927935 : 1 .. '!items!null' @ 0 : 0; will stop at '!items!null' @ 105 : 1 +2026/04/14-00:56:01.502835 7f6833fff6c0 Compacting 1@1 + 1@2 files +2026/04/14-00:56:01.506551 7f6833fff6c0 Generated table #126@1: 9 keys, 6617 bytes +2026/04/14-00:56:01.506586 7f6833fff6c0 Compacted 1@1 + 1@2 files => 6617 bytes +2026/04/14-00:56:01.512723 7f6833fff6c0 compacted to: files[ 0 0 1 0 0 0 0 ] +2026/04/14-00:56:01.513072 7f6833fff6c0 Delete type=2 #121 +2026/04/14-00:56:01.513274 7f6833fff6c0 Delete type=2 #125 +2026/04/14-00:56:01.519560 7f6833fff6c0 Manual compaction at level-1 from '!items!null' @ 105 : 1 .. '!items!null' @ 0 : 0; will stop at (end) diff --git a/packs-system/anomalies/MANIFEST-000122 b/packs-system/anomalies/MANIFEST-000122 deleted file mode 100644 index 3a541c8..0000000 Binary files a/packs-system/anomalies/MANIFEST-000122 and /dev/null differ diff --git a/packs-system/anomalies/MANIFEST-000127 b/packs-system/anomalies/MANIFEST-000127 new file mode 100644 index 0000000..908b512 Binary files /dev/null and b/packs-system/anomalies/MANIFEST-000127 differ diff --git a/packs-system/anomalies/000124.log b/packs-system/pretires/000036.log similarity index 100% rename from packs-system/anomalies/000124.log rename to packs-system/pretires/000036.log diff --git a/packs-system/pretires/CURRENT b/packs-system/pretires/CURRENT index d95f027..29a53d8 100644 --- a/packs-system/pretires/CURRENT +++ b/packs-system/pretires/CURRENT @@ -1 +1 @@ -MANIFEST-000031 +MANIFEST-000035 diff --git a/packs-system/pretires/LOG b/packs-system/pretires/LOG index 30b472b..8e75b46 100644 --- a/packs-system/pretires/LOG +++ b/packs-system/pretires/LOG @@ -1,8 +1,3 @@ -2026/04/14-00:55:24.409141 7f68497ed6c0 Recovering log #29 -2026/04/14-00:55:24.424702 7f68497ed6c0 Delete type=3 #27 -2026/04/14-00:55:24.424755 7f68497ed6c0 Delete type=0 #29 -2026/04/14-00:56:01.473754 7f6833fff6c0 Level-0 table #34: started -2026/04/14-00:56:01.473797 7f6833fff6c0 Level-0 table #34: 0 bytes OK -2026/04/14-00:56:01.480607 7f6833fff6c0 Delete type=0 #32 -2026/04/14-00:56:01.502772 7f6833fff6c0 Manual compaction at level-0 from '!actors!6RZ6IzJUHm4dB5Ut' @ 72057594037927935 : 1 .. '!folders!MbFQgPdF6Gtbj5AU' @ 0 : 0; will stop at (end) -2026/04/14-00:56:01.502817 7f6833fff6c0 Manual compaction at level-1 from '!actors!6RZ6IzJUHm4dB5Ut' @ 72057594037927935 : 1 .. '!folders!MbFQgPdF6Gtbj5AU' @ 0 : 0; will stop at (end) +2026/04/14-10:43:54.291004 7fddd8fbd6c0 Recovering log #33 +2026/04/14-10:43:54.301929 7fddd8fbd6c0 Delete type=3 #31 +2026/04/14-10:43:54.301981 7fddd8fbd6c0 Delete type=0 #33 diff --git a/packs-system/pretires/LOG.old b/packs-system/pretires/LOG.old index 2b438c1..30b472b 100644 --- a/packs-system/pretires/LOG.old +++ b/packs-system/pretires/LOG.old @@ -1,8 +1,8 @@ -2026/04/14-00:42:19.965653 7f684a7ef6c0 Recovering log #25 -2026/04/14-00:42:19.975753 7f684a7ef6c0 Delete type=3 #23 -2026/04/14-00:42:19.975845 7f684a7ef6c0 Delete type=0 #25 -2026/04/14-00:50:27.823985 7f6833fff6c0 Level-0 table #30: started -2026/04/14-00:50:27.824016 7f6833fff6c0 Level-0 table #30: 0 bytes OK -2026/04/14-00:50:27.829926 7f6833fff6c0 Delete type=0 #28 -2026/04/14-00:50:27.836282 7f6833fff6c0 Manual compaction at level-0 from '!actors!6RZ6IzJUHm4dB5Ut' @ 72057594037927935 : 1 .. '!folders!MbFQgPdF6Gtbj5AU' @ 0 : 0; will stop at (end) -2026/04/14-00:50:27.846965 7f6833fff6c0 Manual compaction at level-1 from '!actors!6RZ6IzJUHm4dB5Ut' @ 72057594037927935 : 1 .. '!folders!MbFQgPdF6Gtbj5AU' @ 0 : 0; will stop at (end) +2026/04/14-00:55:24.409141 7f68497ed6c0 Recovering log #29 +2026/04/14-00:55:24.424702 7f68497ed6c0 Delete type=3 #27 +2026/04/14-00:55:24.424755 7f68497ed6c0 Delete type=0 #29 +2026/04/14-00:56:01.473754 7f6833fff6c0 Level-0 table #34: started +2026/04/14-00:56:01.473797 7f6833fff6c0 Level-0 table #34: 0 bytes OK +2026/04/14-00:56:01.480607 7f6833fff6c0 Delete type=0 #32 +2026/04/14-00:56:01.502772 7f6833fff6c0 Manual compaction at level-0 from '!actors!6RZ6IzJUHm4dB5Ut' @ 72057594037927935 : 1 .. '!folders!MbFQgPdF6Gtbj5AU' @ 0 : 0; will stop at (end) +2026/04/14-00:56:01.502817 7f6833fff6c0 Manual compaction at level-1 from '!actors!6RZ6IzJUHm4dB5Ut' @ 72057594037927935 : 1 .. '!folders!MbFQgPdF6Gtbj5AU' @ 0 : 0; will stop at (end) diff --git a/packs-system/pretires/MANIFEST-000031 b/packs-system/pretires/MANIFEST-000035 similarity index 65% rename from packs-system/pretires/MANIFEST-000031 rename to packs-system/pretires/MANIFEST-000035 index a699e50..a5758dd 100644 Binary files a/packs-system/pretires/MANIFEST-000031 and b/packs-system/pretires/MANIFEST-000035 differ diff --git a/packs-system/scenes/000072.log b/packs-system/scenes/000072.log deleted file mode 100644 index e69de29..0000000 diff --git a/packs-system/pretires/000033.log b/packs-system/scenes/000075.log similarity index 100% rename from packs-system/pretires/000033.log rename to packs-system/scenes/000075.log diff --git a/packs-system/scenes/CURRENT b/packs-system/scenes/CURRENT index bcf1079..f8d57cc 100644 --- a/packs-system/scenes/CURRENT +++ b/packs-system/scenes/CURRENT @@ -1 +1 @@ -MANIFEST-000070 +MANIFEST-000074 diff --git a/packs-system/scenes/LOG b/packs-system/scenes/LOG index 4132912..5ba95d6 100644 --- a/packs-system/scenes/LOG +++ b/packs-system/scenes/LOG @@ -1,8 +1,3 @@ -2026/04/14-00:55:24.444791 7f684a7ef6c0 Recovering log #68 -2026/04/14-00:55:24.460229 7f684a7ef6c0 Delete type=3 #66 -2026/04/14-00:55:24.460280 7f684a7ef6c0 Delete type=0 #68 -2026/04/14-00:56:01.496164 7f6833fff6c0 Level-0 table #73: started -2026/04/14-00:56:01.496194 7f6833fff6c0 Level-0 table #73: 0 bytes OK -2026/04/14-00:56:01.502678 7f6833fff6c0 Delete type=0 #71 -2026/04/14-00:56:01.502807 7f6833fff6c0 Manual compaction at level-0 from '!scenes!Jr7lGxYk2RETlXRv' @ 72057594037927935 : 1 .. '!scenes.tokens.delta.items!Jr7lGxYk2RETlXRv.6urwC5SVcou6UOAG.CTg4yBE12iMee1RU.BYT1CrA37R3Og0nu' @ 0 : 0; will stop at (end) -2026/04/14-00:56:01.513358 7f6833fff6c0 Manual compaction at level-1 from '!scenes!Jr7lGxYk2RETlXRv' @ 72057594037927935 : 1 .. '!scenes.tokens.delta.items!Jr7lGxYk2RETlXRv.6urwC5SVcou6UOAG.CTg4yBE12iMee1RU.BYT1CrA37R3Og0nu' @ 0 : 0; will stop at (end) +2026/04/14-10:43:54.317254 7fddd9fbf6c0 Recovering log #72 +2026/04/14-10:43:54.326872 7fddd9fbf6c0 Delete type=3 #70 +2026/04/14-10:43:54.326932 7fddd9fbf6c0 Delete type=0 #72 diff --git a/packs-system/scenes/LOG.old b/packs-system/scenes/LOG.old index 709df8c..4132912 100644 --- a/packs-system/scenes/LOG.old +++ b/packs-system/scenes/LOG.old @@ -1,8 +1,8 @@ -2026/04/14-00:42:19.992614 7f684a7ef6c0 Recovering log #64 -2026/04/14-00:42:20.003193 7f684a7ef6c0 Delete type=3 #62 -2026/04/14-00:42:20.003267 7f684a7ef6c0 Delete type=0 #64 -2026/04/14-00:50:27.830098 7f6833fff6c0 Level-0 table #69: started -2026/04/14-00:50:27.830137 7f6833fff6c0 Level-0 table #69: 0 bytes OK -2026/04/14-00:50:27.836136 7f6833fff6c0 Delete type=0 #67 -2026/04/14-00:50:27.836294 7f6833fff6c0 Manual compaction at level-0 from '!scenes!Jr7lGxYk2RETlXRv' @ 72057594037927935 : 1 .. '!scenes.tokens.delta.items!Jr7lGxYk2RETlXRv.6urwC5SVcou6UOAG.CTg4yBE12iMee1RU.BYT1CrA37R3Og0nu' @ 0 : 0; will stop at (end) -2026/04/14-00:50:27.846944 7f6833fff6c0 Manual compaction at level-1 from '!scenes!Jr7lGxYk2RETlXRv' @ 72057594037927935 : 1 .. '!scenes.tokens.delta.items!Jr7lGxYk2RETlXRv.6urwC5SVcou6UOAG.CTg4yBE12iMee1RU.BYT1CrA37R3Og0nu' @ 0 : 0; will stop at (end) +2026/04/14-00:55:24.444791 7f684a7ef6c0 Recovering log #68 +2026/04/14-00:55:24.460229 7f684a7ef6c0 Delete type=3 #66 +2026/04/14-00:55:24.460280 7f684a7ef6c0 Delete type=0 #68 +2026/04/14-00:56:01.496164 7f6833fff6c0 Level-0 table #73: started +2026/04/14-00:56:01.496194 7f6833fff6c0 Level-0 table #73: 0 bytes OK +2026/04/14-00:56:01.502678 7f6833fff6c0 Delete type=0 #71 +2026/04/14-00:56:01.502807 7f6833fff6c0 Manual compaction at level-0 from '!scenes!Jr7lGxYk2RETlXRv' @ 72057594037927935 : 1 .. '!scenes.tokens.delta.items!Jr7lGxYk2RETlXRv.6urwC5SVcou6UOAG.CTg4yBE12iMee1RU.BYT1CrA37R3Og0nu' @ 0 : 0; will stop at (end) +2026/04/14-00:56:01.513358 7f6833fff6c0 Manual compaction at level-1 from '!scenes!Jr7lGxYk2RETlXRv' @ 72057594037927935 : 1 .. '!scenes.tokens.delta.items!Jr7lGxYk2RETlXRv.6urwC5SVcou6UOAG.CTg4yBE12iMee1RU.BYT1CrA37R3Og0nu' @ 0 : 0; will stop at (end) diff --git a/packs-system/scenes/MANIFEST-000070 b/packs-system/scenes/MANIFEST-000074 similarity index 82% rename from packs-system/scenes/MANIFEST-000070 rename to packs-system/scenes/MANIFEST-000074 index 064e64d..be9becb 100644 Binary files a/packs-system/scenes/MANIFEST-000070 and b/packs-system/scenes/MANIFEST-000074 differ diff --git a/templates/chat-message.hbs b/templates/chat-message.hbs index 4f86441..c32e799 100644 --- a/templates/chat-message.hbs +++ b/templates/chat-message.hbs @@ -16,8 +16,8 @@ {{/if}} - {{#if statLabel}}{{statLabel}}{{/if}} - {{skillLabel}} + {{#if statLabel}}{{localize statLabel}}{{/if}} + {{localize skillLabel}} {{#if woundLabel}}⚠ {{woundLabel}}{{/if}} @@ -162,7 +162,7 @@ {{localize "CELESTOPOL.Roll.failure"}} {{#if isCombat}} {{#if (eq weaponType "melee")}} - {{localize "CELESTOPOL.Combat.failureHit"}} + {{#unless isNpcAttack}}{{localize "CELESTOPOL.Combat.failureHit"}}{{/unless}} {{else if isRangedDefense}} {{localize "CELESTOPOL.Combat.rangedDefenseFailure"}} {{else}} diff --git a/templates/npc-combat.hbs b/templates/npc-combat.hbs index c65bbcd..b530905 100644 --- a/templates/npc-combat.hbs +++ b/templates/npc-combat.hbs @@ -9,7 +9,7 @@ {{/if}} {{#each weapons as |item|}} -
+
{{item.name}} {{#if (eq item.system.type "melee")}}{{localize "CELESTOPOL.Weapon.typeMelee"}}{{else}}{{localize "CELESTOPOL.Weapon.typeDistance"}}{{/if}} @@ -18,6 +18,11 @@ {{#unless ../isEditMode}} {{/unless}} + + + {{#if ../isEditMode}}{{/if}}