From 949755b680482d43ef278f16fdbc726a040317fa Mon Sep 17 00:00:00 2001 From: LeRatierBretonnien Date: Thu, 9 Jan 2025 22:26:37 +0100 Subject: [PATCH] Various updates --- css/fvtt-lethal-fantasy.css | 50 ++++++++++++++++++ lang/en.json | 14 +++-- .../applications/sheets/character-sheet.mjs | 38 +++++++++++-- module/config/system.mjs | 7 +++ module/documents/roll.mjs | 49 ++++++++++++++++- module/models/character.mjs | 4 +- module/models/skill.mjs | 2 - packs-system/lf-equipment/000008.log | 0 packs-system/lf-equipment/CURRENT | 1 + packs-system/lf-equipment/LOCK | 0 packs-system/lf-equipment/LOG | 7 +++ packs-system/lf-equipment/LOG.old | 5 ++ packs-system/lf-equipment/MANIFEST-000006 | Bin 0 -> 65 bytes packs-system/lf-gifts/000008.log | 0 packs-system/lf-gifts/CURRENT | 1 + packs-system/lf-gifts/LOCK | 0 packs-system/lf-gifts/LOG | 7 +++ packs-system/lf-gifts/LOG.old | 5 ++ packs-system/lf-gifts/MANIFEST-000006 | Bin 0 -> 65 bytes packs-system/lf-skills/000008.log | 0 packs-system/lf-skills/CURRENT | 1 + packs-system/lf-skills/LOCK | 0 packs-system/lf-skills/LOG | 7 +++ packs-system/lf-skills/LOG.old | 5 ++ packs-system/lf-skills/MANIFEST-000006 | Bin 0 -> 65 bytes packs-system/lf-vulnerabilities/000008.log | 0 packs-system/lf-vulnerabilities/CURRENT | 1 + packs-system/lf-vulnerabilities/LOCK | 0 packs-system/lf-vulnerabilities/LOG | 7 +++ packs-system/lf-vulnerabilities/LOG.old | 5 ++ .../lf-vulnerabilities/MANIFEST-000006 | Bin 0 -> 65 bytes styles/character.less | 39 ++++++++++++++ styles/roll.less | 14 +++++ templates/character-weapons.hbs | 18 ++++++- templates/chat-message.hbs | 5 ++ templates/roll-dialog.hbs | 10 +++- 36 files changed, 288 insertions(+), 14 deletions(-) create mode 100644 packs-system/lf-equipment/000008.log create mode 100644 packs-system/lf-equipment/CURRENT create mode 100644 packs-system/lf-equipment/LOCK create mode 100644 packs-system/lf-equipment/LOG create mode 100644 packs-system/lf-equipment/LOG.old create mode 100644 packs-system/lf-equipment/MANIFEST-000006 create mode 100644 packs-system/lf-gifts/000008.log create mode 100644 packs-system/lf-gifts/CURRENT create mode 100644 packs-system/lf-gifts/LOCK create mode 100644 packs-system/lf-gifts/LOG create mode 100644 packs-system/lf-gifts/LOG.old create mode 100644 packs-system/lf-gifts/MANIFEST-000006 create mode 100644 packs-system/lf-skills/000008.log create mode 100644 packs-system/lf-skills/CURRENT create mode 100644 packs-system/lf-skills/LOCK create mode 100644 packs-system/lf-skills/LOG create mode 100644 packs-system/lf-skills/LOG.old create mode 100644 packs-system/lf-skills/MANIFEST-000006 create mode 100644 packs-system/lf-vulnerabilities/000008.log create mode 100644 packs-system/lf-vulnerabilities/CURRENT create mode 100644 packs-system/lf-vulnerabilities/LOCK create mode 100644 packs-system/lf-vulnerabilities/LOG create mode 100644 packs-system/lf-vulnerabilities/LOG.old create mode 100644 packs-system/lf-vulnerabilities/MANIFEST-000006 diff --git a/css/fvtt-lethal-fantasy.css b/css/fvtt-lethal-fantasy.css index 3d0a975..884634c 100644 --- a/css/fvtt-lethal-fantasy.css +++ b/css/fvtt-lethal-fantasy.css @@ -500,6 +500,44 @@ i.lethalfantasy { align-items: center; gap: 10px; } +.lethalfantasy .tab.character-weapons .combat-details .combat-detail .armor-hp { + min-width: 20rem; + max-width: 20rem; +} +.lethalfantasy .tab.character-weapons .combat-details .combat-detail .armor-hp .input { + min-width: 3rem; + max-width: 3rem; +} +.lethalfantasy .tab.character-weapons .wounds { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 10px; +} +.lethalfantasy .tab.character-weapons .wounds .wound { + display: flex; + align-items: center; + gap: 10px; +} +.lethalfantasy .tab.character-weapons .wounds .wound .wound-description { + min-width: 16rem; + max-width: 16rem; +} +.lethalfantasy .tab.character-weapons .wounds .wound .wound-duration { + min-width: 3rem; + max-width: 3rem; +} +.lethalfantasy .tab.character-weapons .wounds .wound .wound-value { + min-width: 3rem; + max-width: 3rem; +} +.lethalfantasy .tab.character-weapons .wounds .wound .item-img { + width: 32px; + height: 32px; + margin: 5px 0 0 0; +} +.lethalfantasy .tab.character-weapons .wounds .wound .name { + min-width: 12rem; +} .lethalfantasy .tab.character-weapons .weapons { display: grid; grid-template-columns: repeat(2, 1fr); @@ -1517,6 +1555,18 @@ i.lethalfantasy { width: 60px; text-align: center; } +.dialog-favor { + display: flex; + justify-content: center; + align-items: center; +} +.dialog-favor select { + border: none; + background-color: rgba(0, 0, 0, 0.1); + color: var(--color-dark-2); + width: 120px; + text-align: center; +} .main, .dialog-damage, .dialog-resource, diff --git a/lang/en.json b/lang/en.json index 6ad4b62..ea59b69 100644 --- a/lang/en.json +++ b/lang/en.json @@ -146,6 +146,15 @@ } }, "Label": { + "favorResult": "Favor result", + "disfavorResult": "Disfavor result", + "otherResult": "Other result", + "disfavor": "Disfavor", + "favor": "Favor", + "wounds": "Wounds", + "name": "Name", + "hp": "HP", + "duration": "Duration", "combatDetails": "Combat details", "Challenges": "Challenges", "HP": "HP", @@ -292,9 +301,7 @@ "FIELDS": {} }, "Roll": { - "attack": "Jet d'attaque
{item}", "changeDice": "Change dice", - "damage": "Jet de dégâts
{item}", "failure": "Failure", "modifier": "Modifier", "modifierBonusMalus": "Modifier bonus/malus", @@ -302,7 +309,8 @@ "roll": "Roll", "save": "Save roll {save}", "success": "Success", - "visibility": "Visibility" + "visibility": "Visibility", + "favorDisfavor": "Favor/Disfavor" }, "Save": { "FIELDS": { diff --git a/module/applications/sheets/character-sheet.mjs b/module/applications/sheets/character-sheet.mjs index 5a392a2..2e40da3 100644 --- a/module/applications/sheets/character-sheet.mjs +++ b/module/applications/sheets/character-sheet.mjs @@ -15,6 +15,8 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet actions: { createEquipment: LethalFantasyCharacterSheet.#onCreateEquipment, rangedAttackDefense: LethalFantasyCharacterSheet.#onRangedAttackDefense, + armorHitPointsPlus: LethalFantasyCharacterSheet.#onArmorHitPointsPlus, + armorHitPointsMinus: LethalFantasyCharacterSheet.#onArmorHitPointsMinus, }, } @@ -138,10 +140,6 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet } } - async #onDropPathItem(item) { - await this.document.addPath(item) - } - static async #onRangedAttackDefense(event, target) { const hasTarget = false let roll = await LethalFantasyRoll.promptRangedDefense({ @@ -154,10 +152,40 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet await roll.toMessage({}, { rollMode: roll.options.rollMode }) } + static #onArmorHitPointsPlus(event, target) { + let armorHP = this.actor.system.combat.armorHitPoints + armorHP += 1 + this.actor.update({ "system.combat.armorHitPoints": armorHP }) + } + + static #onArmorHitPointsMinus(event, target) { + let armorHP = this.actor.system.combat.armorHitPoints + armorHP -= 1 + this.actor.update({ "system.combat.armorHitPoints": Math.max(armorHP, 0) }) + } static #onCreateEquipment(event, target) { } + _onRender(context, options) { + // Inputs with class `item-quantity` + const woundDescription = this.element.querySelectorAll('.wound-data') + for (const input of woundDescription) { + input.addEventListener("change", (e) => { + e.preventDefault(); + e.stopImmediatePropagation(); + const newValue = e.currentTarget.value + const index = e.currentTarget.dataset.index + const fieldName = e.currentTarget.dataset.name + let tab = foundry.utils.duplicate(this.actor.system.hp.wounds) + tab[index][fieldName] = newValue + console.log(tab, index, fieldName, newValue) + this.actor.update( { "system.hp.wounds": tab } ); + }) + } + super._onRender(); + } + getBestWeaponClassSkill(skills, rollType, multiplier = 1.0) { let maxValue = 0 let goodSkill = skills[0] @@ -278,7 +306,7 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet // In all cases rollTarget.magicUser = this.actor.system.biodata.magicUser rollTarget.actorModifiers = foundry.utils.duplicate(this.actor.system.modifiers) - + console.log(rollTarget) await this.document.system.roll(rollType, rollTarget) } // #endregion diff --git a/module/config/system.mjs b/module/config/system.mjs index 107afb4..ac26572 100644 --- a/module/config/system.mjs +++ b/module/config/system.mjs @@ -42,6 +42,12 @@ export const MONEY = { } } +export const FAVOR_CHOICES = { + "none": {label: "None", value: "none"}, + "favor": {label: "Favor", value: "favor"}, + "disfavor": {label: "Disfavor", value: "disfavor"} +} + export const MOVEMENT_CHOICES = { "none": {label: "None (D8E)", value: "D8"}, "walk": {label: "Walk (D10E)", value: "D10"}, @@ -192,5 +198,6 @@ export const SYSTEM = { MOVE_DIRECTION_CHOICES, SIZE_CHOICES, RANGE_CHOICES, + FAVOR_CHOICES, ATTACKER_AIM_CHOICES } diff --git a/module/documents/roll.mjs b/module/documents/roll.mjs index 9bdc6d0..c2cf584 100644 --- a/module/documents/roll.mjs +++ b/module/documents/roll.mjs @@ -92,6 +92,10 @@ export default class LethalFantasyRoll extends Roll { return this.options.D30result } + get badResult() { + return this.options.badResult + } + /** * Prompt the user with a dialog to configure and execute a roll. * @@ -117,6 +121,7 @@ export default class LethalFantasyRoll extends Roll { let hasModifier = true let hasChangeDice = false let hasD30 = false + let hasFavor = false if (options.rollType === "challenge" || options.rollType === "save") { options.rollName = options.rollTarget.rollKey @@ -137,6 +142,7 @@ export default class LethalFantasyRoll extends Roll { baseFormula = "D100" maxValue = 100 hasModifier = true + hasFavor = true hasChangeDice = false options.rollTarget.value = options.rollTarget.system.skillTotal @@ -148,6 +154,7 @@ export default class LethalFantasyRoll extends Roll { maxValue = 20 hasModifier = true hasChangeDice = false + hasFavor = true if (options.rollType === "weapon-attack") { options.rollTarget.value = options.rollTarget.combat.attackModifier + options.rollTarget.weaponSkillModifier options.rollTarget.charModifier = options.rollTarget.combat.attackModifier @@ -209,6 +216,7 @@ export default class LethalFantasyRoll extends Roll { const choiceModifier = SYSTEM.CHOICE_MODIFIERS const choiceDice = SYSTEM.CHOICE_DICE + const choiceFavor = SYSTEM.FAVOR_CHOICES let modifier = "+0" let targetName @@ -219,17 +227,20 @@ export default class LethalFantasyRoll extends Roll { rollName: options.rollName, rollModes, hasModifier, + hasFavor, hasChangeDice, baseValue: options.rollTarget.value, changeDice: `${dice}`, fieldRollMode, choiceModifier, choiceDice, + choiceFavor, baseFormula, dice, hasTarget: options.hasTarget, modifier, saveSpell: false, + favor : "none", targetName } console.log("dialogContext", dialogContext) @@ -322,12 +333,46 @@ export default class LethalFantasyRoll extends Roll { */ if (Hooks.call("fvtt-lethal-fantasy.preRoll", options, rollData) === false) return - const rollBase = new this(baseFormula, options.data, rollData) + let rollBase = new this(baseFormula, options.data, rollData) const rollModifier = new Roll(modifierFormula, options.data, rollData) rollModifier.evaluate() await rollBase.evaluate() + + let rollFavor + let badResult + if (rollContext.favor === "favor") { + rollFavor = new this(baseFormula, options.data, rollData) + await rollFavor.evaluate() + if (game?.dice3d) { + await game.dice3d.showForRoll(rollFavor, game.user, true) + } + if (rollFavor.result > rollBase.result) { + badResult = rollBase.result + rollBase = rollFavor + } else { + badResult = rollFavor.result + } + } + + if (rollContext.favor === "disfavor") { + rollFavor = new this(baseFormula, options.data, rollData) + await rollFavor.evaluate() + if (game?.dice3d) { + await game.dice3d.showForRoll(rollFavor, game.user, true) + } + if (rollFavor.result < rollBase.result) { + badResult = rollBase.result + rollBase = rollFavor + } else { + badResult = rollFavor.result + } + } + if (hasD30) { let rollD30 = await new Roll("1D30").evaluate() + if (game?.dice3d) { + await game.dice3d.showForRoll(rollFavor, game.user, true) + } options.D30result = rollD30.total } @@ -367,6 +412,7 @@ export default class LethalFantasyRoll extends Roll { rollBase.options.rollTarget = options.rollTarget rollBase.options.titleFormula = titleFormula rollBase.options.D30result = options.D30result + rollBase.options.badResult = badResult /** * A hook event that fires after the roll has been made. @@ -589,6 +635,7 @@ export default class LethalFantasyRoll extends Roll { targetName: this.targetName, targetArmor: this.targetArmor, D30result: this.D30result, + badResult: this.badResult, isPrivate: isPrivate } cardData.cssClass = cardData.css.join(" ") diff --git a/module/models/character.mjs b/module/models/character.mjs index 6ba5c82..e8e4f98 100644 --- a/module/models/character.mjs +++ b/module/models/character.mjs @@ -68,7 +68,9 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod value: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), max: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), painDamage: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), - wounds: new fields.ArrayField(new fields.SchemaField(woundFieldSchema ) ), + wounds: new fields.ArrayField(new fields.SchemaField(woundFieldSchema ) , { initial: [{description:"", value:0, duration:0},{description:"", value:0, duration:0}, + {description:"", value:0, duration:0},{description:"", value:0, duration:0},{description:"", value:0, duration:0},{description:"", value:0, duration:0}, + {description:"", value:0, duration:0},{description:"", value:0, duration:0}], min:8} ), }) schema.perception = new fields.SchemaField({ diff --git a/module/models/skill.mjs b/module/models/skill.mjs index 08420a6..9c37f35 100644 --- a/module/models/skill.mjs +++ b/module/models/skill.mjs @@ -31,9 +31,7 @@ export default class LethalFantasySkill extends foundry.abstract.TypeDataModel { validate(options) { let isError = super.validate(options) - console.log(this) let bonus = this._source.weaponBonus.attack + this._source.weaponBonus.defense + this._source.weaponBonus.damage - console.log(bonus, this._source.skillTotal) if (bonus > Math.floor(this._source.skillTotal / 10)) { ui.notifications.error(game.i18n.localize("LETHALFANTASY.Skill.error.weaponBonus")) isError = true diff --git a/packs-system/lf-equipment/000008.log b/packs-system/lf-equipment/000008.log new file mode 100644 index 0000000..e69de29 diff --git a/packs-system/lf-equipment/CURRENT b/packs-system/lf-equipment/CURRENT new file mode 100644 index 0000000..f7753e2 --- /dev/null +++ b/packs-system/lf-equipment/CURRENT @@ -0,0 +1 @@ +MANIFEST-000006 diff --git a/packs-system/lf-equipment/LOCK b/packs-system/lf-equipment/LOCK new file mode 100644 index 0000000..e69de29 diff --git a/packs-system/lf-equipment/LOG b/packs-system/lf-equipment/LOG new file mode 100644 index 0000000..dd695b3 --- /dev/null +++ b/packs-system/lf-equipment/LOG @@ -0,0 +1,7 @@ +2025/01/09-22:06:01.230631 7f0abbfff6c0 Recovering log #4 +2025/01/09-22:06:01.239976 7f0abbfff6c0 Delete type=3 #2 +2025/01/09-22:06:01.240081 7f0abbfff6c0 Delete type=0 #4 +2025/01/09-22:26:22.511134 7f0ab9bff6c0 Level-0 table #9: started +2025/01/09-22:26:22.511166 7f0ab9bff6c0 Level-0 table #9: 0 bytes OK +2025/01/09-22:26:22.540103 7f0ab9bff6c0 Delete type=0 #7 +2025/01/09-22:26:22.609664 7f0ab9bff6c0 Manual compaction at level-0 from 'undefined' @ 72057594037927935 : 1 .. 'undefined' @ 0 : 0; will stop at (end) diff --git a/packs-system/lf-equipment/LOG.old b/packs-system/lf-equipment/LOG.old new file mode 100644 index 0000000..7c8ea83 --- /dev/null +++ b/packs-system/lf-equipment/LOG.old @@ -0,0 +1,5 @@ +2025/01/09-20:31:12.531379 7f0abaffd6c0 Delete type=3 #1 +2025/01/09-22:05:02.668496 7f0ab9bff6c0 Level-0 table #5: started +2025/01/09-22:05:02.668533 7f0ab9bff6c0 Level-0 table #5: 0 bytes OK +2025/01/09-22:05:02.675350 7f0ab9bff6c0 Delete type=0 #3 +2025/01/09-22:05:02.689275 7f0ab9bff6c0 Manual compaction at level-0 from 'undefined' @ 72057594037927935 : 1 .. 'undefined' @ 0 : 0; will stop at (end) diff --git a/packs-system/lf-equipment/MANIFEST-000006 b/packs-system/lf-equipment/MANIFEST-000006 new file mode 100644 index 0000000000000000000000000000000000000000..97450be86f5fb90e46dddbf55e8d2014763a95fd GIT binary patch literal 65 zcmWIhx#Ncn10$nUPHI_dPD+xVQ)NkNd1i5{bAE0?Vo_pAe$lIi(_J_i7@62P8JIa( R7)&Z{9Y9 literal 0 HcmV?d00001 diff --git a/packs-system/lf-gifts/000008.log b/packs-system/lf-gifts/000008.log new file mode 100644 index 0000000..e69de29 diff --git a/packs-system/lf-gifts/CURRENT b/packs-system/lf-gifts/CURRENT new file mode 100644 index 0000000..f7753e2 --- /dev/null +++ b/packs-system/lf-gifts/CURRENT @@ -0,0 +1 @@ +MANIFEST-000006 diff --git a/packs-system/lf-gifts/LOCK b/packs-system/lf-gifts/LOCK new file mode 100644 index 0000000..e69de29 diff --git a/packs-system/lf-gifts/LOG b/packs-system/lf-gifts/LOG new file mode 100644 index 0000000..a73af80 --- /dev/null +++ b/packs-system/lf-gifts/LOG @@ -0,0 +1,7 @@ +2025/01/09-22:06:01.242474 7f0abb7fe6c0 Recovering log #4 +2025/01/09-22:06:01.252331 7f0abb7fe6c0 Delete type=3 #2 +2025/01/09-22:06:01.252401 7f0abb7fe6c0 Delete type=0 #4 +2025/01/09-22:26:22.580727 7f0ab9bff6c0 Level-0 table #9: started +2025/01/09-22:26:22.580760 7f0ab9bff6c0 Level-0 table #9: 0 bytes OK +2025/01/09-22:26:22.609536 7f0ab9bff6c0 Delete type=0 #7 +2025/01/09-22:26:22.609684 7f0ab9bff6c0 Manual compaction at level-0 from 'undefined' @ 72057594037927935 : 1 .. 'undefined' @ 0 : 0; will stop at (end) diff --git a/packs-system/lf-gifts/LOG.old b/packs-system/lf-gifts/LOG.old new file mode 100644 index 0000000..a46e09d --- /dev/null +++ b/packs-system/lf-gifts/LOG.old @@ -0,0 +1,5 @@ +2025/01/09-20:31:12.546769 7f0aba7fc6c0 Delete type=3 #1 +2025/01/09-22:05:02.682626 7f0ab9bff6c0 Level-0 table #5: started +2025/01/09-22:05:02.682649 7f0ab9bff6c0 Level-0 table #5: 0 bytes OK +2025/01/09-22:05:02.688999 7f0ab9bff6c0 Delete type=0 #3 +2025/01/09-22:05:02.689300 7f0ab9bff6c0 Manual compaction at level-0 from 'undefined' @ 72057594037927935 : 1 .. 'undefined' @ 0 : 0; will stop at (end) diff --git a/packs-system/lf-gifts/MANIFEST-000006 b/packs-system/lf-gifts/MANIFEST-000006 new file mode 100644 index 0000000000000000000000000000000000000000..97450be86f5fb90e46dddbf55e8d2014763a95fd GIT binary patch literal 65 zcmWIhx#Ncn10$nUPHI_dPD+xVQ)NkNd1i5{bAE0?Vo_pAe$lIi(_J_i7@62P8JIa( R7)&Z{9Y9 literal 0 HcmV?d00001 diff --git a/packs-system/lf-skills/000008.log b/packs-system/lf-skills/000008.log new file mode 100644 index 0000000..e69de29 diff --git a/packs-system/lf-skills/CURRENT b/packs-system/lf-skills/CURRENT new file mode 100644 index 0000000..f7753e2 --- /dev/null +++ b/packs-system/lf-skills/CURRENT @@ -0,0 +1 @@ +MANIFEST-000006 diff --git a/packs-system/lf-skills/LOCK b/packs-system/lf-skills/LOCK new file mode 100644 index 0000000..e69de29 diff --git a/packs-system/lf-skills/LOG b/packs-system/lf-skills/LOG new file mode 100644 index 0000000..f98007a --- /dev/null +++ b/packs-system/lf-skills/LOG @@ -0,0 +1,7 @@ +2025/01/09-22:06:01.218155 7f0abaffd6c0 Recovering log #4 +2025/01/09-22:06:01.228492 7f0abaffd6c0 Delete type=3 #2 +2025/01/09-22:06:01.228577 7f0abaffd6c0 Delete type=0 #4 +2025/01/09-22:26:22.540188 7f0ab9bff6c0 Level-0 table #9: started +2025/01/09-22:26:22.540210 7f0ab9bff6c0 Level-0 table #9: 0 bytes OK +2025/01/09-22:26:22.580587 7f0ab9bff6c0 Delete type=0 #7 +2025/01/09-22:26:22.609674 7f0ab9bff6c0 Manual compaction at level-0 from 'undefined' @ 72057594037927935 : 1 .. 'undefined' @ 0 : 0; will stop at (end) diff --git a/packs-system/lf-skills/LOG.old b/packs-system/lf-skills/LOG.old new file mode 100644 index 0000000..a817439 --- /dev/null +++ b/packs-system/lf-skills/LOG.old @@ -0,0 +1,5 @@ +2025/01/09-20:31:12.516007 7f0aba7fc6c0 Delete type=3 #1 +2025/01/09-22:05:02.675509 7f0ab9bff6c0 Level-0 table #5: started +2025/01/09-22:05:02.675540 7f0ab9bff6c0 Level-0 table #5: 0 bytes OK +2025/01/09-22:05:02.682505 7f0ab9bff6c0 Delete type=0 #3 +2025/01/09-22:05:02.689288 7f0ab9bff6c0 Manual compaction at level-0 from 'undefined' @ 72057594037927935 : 1 .. 'undefined' @ 0 : 0; will stop at (end) diff --git a/packs-system/lf-skills/MANIFEST-000006 b/packs-system/lf-skills/MANIFEST-000006 new file mode 100644 index 0000000000000000000000000000000000000000..97450be86f5fb90e46dddbf55e8d2014763a95fd GIT binary patch literal 65 zcmWIhx#Ncn10$nUPHI_dPD+xVQ)NkNd1i5{bAE0?Vo_pAe$lIi(_J_i7@62P8JIa( R7)&Z{9Y9 literal 0 HcmV?d00001 diff --git a/packs-system/lf-vulnerabilities/000008.log b/packs-system/lf-vulnerabilities/000008.log new file mode 100644 index 0000000..e69de29 diff --git a/packs-system/lf-vulnerabilities/CURRENT b/packs-system/lf-vulnerabilities/CURRENT new file mode 100644 index 0000000..f7753e2 --- /dev/null +++ b/packs-system/lf-vulnerabilities/CURRENT @@ -0,0 +1 @@ +MANIFEST-000006 diff --git a/packs-system/lf-vulnerabilities/LOCK b/packs-system/lf-vulnerabilities/LOCK new file mode 100644 index 0000000..e69de29 diff --git a/packs-system/lf-vulnerabilities/LOG b/packs-system/lf-vulnerabilities/LOG new file mode 100644 index 0000000..4f9a734 --- /dev/null +++ b/packs-system/lf-vulnerabilities/LOG @@ -0,0 +1,7 @@ +2025/01/09-22:06:01.254140 7f0aba7fc6c0 Recovering log #4 +2025/01/09-22:06:01.264214 7f0aba7fc6c0 Delete type=3 #2 +2025/01/09-22:06:01.264273 7f0aba7fc6c0 Delete type=0 #4 +2025/01/09-22:26:22.480492 7f0ab9bff6c0 Level-0 table #9: started +2025/01/09-22:26:22.480548 7f0ab9bff6c0 Level-0 table #9: 0 bytes OK +2025/01/09-22:26:22.511014 7f0ab9bff6c0 Delete type=0 #7 +2025/01/09-22:26:22.609652 7f0ab9bff6c0 Manual compaction at level-0 from 'undefined' @ 72057594037927935 : 1 .. 'undefined' @ 0 : 0; will stop at (end) diff --git a/packs-system/lf-vulnerabilities/LOG.old b/packs-system/lf-vulnerabilities/LOG.old new file mode 100644 index 0000000..db97fad --- /dev/null +++ b/packs-system/lf-vulnerabilities/LOG.old @@ -0,0 +1,5 @@ +2025/01/09-20:31:12.562459 7f0abaffd6c0 Delete type=3 #1 +2025/01/09-22:05:02.655239 7f0ab9bff6c0 Level-0 table #5: started +2025/01/09-22:05:02.655331 7f0ab9bff6c0 Level-0 table #5: 0 bytes OK +2025/01/09-22:05:02.668318 7f0ab9bff6c0 Delete type=0 #3 +2025/01/09-22:05:02.689254 7f0ab9bff6c0 Manual compaction at level-0 from 'undefined' @ 72057594037927935 : 1 .. 'undefined' @ 0 : 0; will stop at (end) diff --git a/packs-system/lf-vulnerabilities/MANIFEST-000006 b/packs-system/lf-vulnerabilities/MANIFEST-000006 new file mode 100644 index 0000000000000000000000000000000000000000..97450be86f5fb90e46dddbf55e8d2014763a95fd GIT binary patch literal 65 zcmWIhx#Ncn10$nUPHI_dPD+xVQ)NkNd1i5{bAE0?Vo_pAe$lIi(_J_i7@62P8JIa( R7)&Z{9Y9 literal 0 HcmV?d00001 diff --git a/styles/character.less b/styles/character.less index 62b8380..5122be6 100644 --- a/styles/character.less +++ b/styles/character.less @@ -405,6 +405,45 @@ display: flex; align-items: center; gap: 10px; + .armor-hp { + min-width: 20rem; + max-width: 20rem; + .input { + min-width: 3rem; + max-width: 3rem; + } + } + } + } + + .wounds { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 10px; + .wound { + display: flex; + align-items: center; + gap: 10px; + .wound-description { + min-width: 16rem; + max-width: 16rem; + } + .wound-duration { + min-width: 3rem; + max-width: 3rem; + } + .wound-value { + min-width: 3rem; + max-width: 3rem; + } + .item-img { + width: 32px; + height: 32px; + margin: 5px 0 0 0; + } + .name { + min-width: 12rem; + } } } diff --git a/styles/roll.less b/styles/roll.less index 807e023..3cb7263 100644 --- a/styles/roll.less +++ b/styles/roll.less @@ -28,6 +28,20 @@ } } +.dialog-favor { + display: flex; + justify-content: center; + align-items: center; + select { + border: none; + background-color: rgba(0, 0, 0, 0.1); + color: var(--color-dark-2); + width: 120px; + text-align: center; + } +} + + .main, .dialog-damage, .dialog-resource, diff --git a/templates/character-weapons.hbs b/templates/character-weapons.hbs index 258d0b2..c037867 100644 --- a/templates/character-weapons.hbs +++ b/templates/character-weapons.hbs @@ -6,11 +6,27 @@
- {{formField systemFields.combat.fields.armorHitPoints value=system.combat.armorHitPoints localize=true}} + + {{formField systemFields.combat.fields.armorHitPoints value=system.combat.armorHitPoints localize=true classes="armor-hp"}} + +
+
+ {{localize "LETHALFANTASY.Label.wounds"}} +
+ {{#each system.hp.wounds as |wound idx|}} +
+ Name: + HP: + Duration: +
+ {{/each}} +
+
+
{{localize "LETHALFANTASY.Label.weapons"}}
diff --git a/templates/chat-message.hbs b/templates/chat-message.hbs index 027ad32..217ad69 100644 --- a/templates/chat-message.hbs +++ b/templates/chat-message.hbs @@ -8,6 +8,11 @@
{{upperFirst rollName}} : {{upperCase rollTarget.rollKey}} + {{#if badResult}} + {{localize "LETHALFANTASY.Label.otherResult"}} : {{badResult}} + {{/if}} + + {{#if rollTarget.weapon}} {{rollTarget.weapon.name}} {{/if}} diff --git a/templates/roll-dialog.hbs b/templates/roll-dialog.hbs index 801774f..4e211a5 100644 --- a/templates/roll-dialog.hbs +++ b/templates/roll-dialog.hbs @@ -15,7 +15,15 @@ {{/if}}
- + {{#if hasFavor}} +
+ {{localize "LETHALFANTASY.Roll.favorDisfavor"}} + +
+ {{/if}} + {{#if hasModifier}}
{{localize "LETHALFANTASY.Roll.modifierBonusMalus"}}