diff --git a/css/fvtt-lethal-fantasy.css b/css/fvtt-lethal-fantasy.css index 2119d62..1996083 100644 --- a/css/fvtt-lethal-fantasy.css +++ b/css/fvtt-lethal-fantasy.css @@ -474,16 +474,33 @@ i.lethalfantasy { align-items: center; gap: 4px; } +.lethalfantasy .tab.character-combat .combat-details .combat-detail .input { + min-width: 2.5rem; + max-width: 2.5rem; +} .lethalfantasy .tab.character-combat .combat-details .combat-detail button { - min-width: 10rem; + min-width: 9rem; } .lethalfantasy .tab.character-combat .combat-details .combat-detail .armor-hp { - min-width: 20rem; - max-width: 20rem; + margin-right: 4px; + min-width: 10rem; + max-width: 10rem; +} +.lethalfantasy .tab.character-combat .combat-details .combat-detail .armor-hp .name { + min-width: 6rem; + max-width: 6rem; } .lethalfantasy .tab.character-combat .combat-details .combat-detail .armor-hp .input { - min-width: 3rem; - max-width: 3rem; + min-width: 2.5rem; + max-width: 2.5rem; +} +.lethalfantasy .tab.character-combat .combat-details .combat-detail .granted { + min-width: 8rem; + max-width: 8rem; +} +.lethalfantasy .tab.character-combat .combat-details .combat-detail .granted .input { + min-width: 2.5rem; + max-width: 2.5rem; } .lethalfantasy .tab.character-combat .wounds { display: grid; @@ -539,7 +556,7 @@ i.lethalfantasy { } .lethalfantasy .tab.character-combat .armors { display: grid; - grid-template-columns: repeat(3, 1fr); + grid-template-columns: repeat(2, 1fr); gap: 4px; } .lethalfantasy .tab.character-combat .armors .armor { @@ -555,6 +572,30 @@ i.lethalfantasy { .lethalfantasy .tab.character-combat .armors .name { min-width: 12rem; } +.lethalfantasy .tab.character-combat .armors .item-detail { + min-width: 2rem; +} +.lethalfantasy .tab.character-combat .shields { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 4px; +} +.lethalfantasy .tab.character-combat .shields .shield { + display: flex; + align-items: center; + gap: 4px; +} +.lethalfantasy .tab.character-combat .shields .shield .item-img { + width: 24px; + height: 24px; + margin: 4px 0 0 0; +} +.lethalfantasy .tab.character-combat .shields .item-detail { + min-width: 2rem; +} +.lethalfantasy .tab.character-combat .shields .name { + min-width: 12rem; +} .lethalfantasy .tab.character-spells { display: grid; grid-template-columns: 1fr; @@ -577,10 +618,11 @@ i.lethalfantasy { min-width: 10rem; } .lethalfantasy .tab.character-spells .spell-details .spell-detail .armor-hp { - min-width: 20rem; - max-width: 20rem; + min-width: 12rem; + max-width: 12rem; } .lethalfantasy .tab.character-spells .spell-details .spell-detail .armor-hp .input { + flex: 0; min-width: 3rem; max-width: 3rem; } @@ -743,6 +785,11 @@ i.lethalfantasy { min-width: 2.5rem; max-width: 2.5rem; } +.lethalfantasy .monster-main .monster-pc .monster-hp .damage-resistance { + flex: none; + min-width: 6rem; + max-width: 6rem; +} .lethalfantasy .monster-main .monster-pc .monster-hp input { flex: none; min-width: 2.2rem; @@ -1896,7 +1943,7 @@ i.lethalfantasy { color: var(--color-dark-2); } .lethalfantasy-roll-dialog fieldset { - padding: 10px; + padding: 4px; } .dialog-modifier { display: flex; @@ -1941,10 +1988,10 @@ i.lethalfantasy { } .dice-roll .dice-total, .dice-roll .dice-formula { - padding-top: 5px; + padding-top: 4px; } .dice-roll .dice-total { - margin-bottom: 5px; + margin-bottom: 4px; } .dice-roll .message-header { font-family: var(--font-primary); @@ -1958,7 +2005,7 @@ i.lethalfantasy { flex-direction: row; } .dice-roll .intro-chat .intro-img { - padding: 5px; + padding: 4px; width: 80px; align-self: center; } diff --git a/lang/en.json b/lang/en.json index 68f4ecf..53d0f27 100644 --- a/lang/en.json +++ b/lang/en.json @@ -168,6 +168,9 @@ }, "perception": { "label": "Perception" + }, + "stealth": { + "label": "Stealth" } }, "painCourage": { @@ -278,6 +281,14 @@ } }, "Label": { + "granted": "Granted Dice", + "shields": "Shields", + "armorHitPoints": "Armor hit points", + "grantedAttackDice": "Granted attack", + "grantedDamageDice": "Granted damage", + "grantedDefenseDice": "Granted defense", + "damageResistanceShort": "DR", + "stealth": "Stealth", "progressionDice": "Progression dice", "rollProgressionCount": "Roll progression count", "rollProgressionDice": "Roll progression dice", diff --git a/module/applications/sheets/character-sheet.mjs b/module/applications/sheets/character-sheet.mjs index 0c37264..a7ee211 100644 --- a/module/applications/sheets/character-sheet.mjs +++ b/module/applications/sheets/character-sheet.mjs @@ -119,12 +119,13 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet context.tab = context.tabs.combat context.weapons = doc.itemTypes.weapon context.armors = doc.itemTypes.armor + context.shields = doc.itemTypes.shield break case "equipment": context.tab = context.tabs.equipment context.equipments = doc.itemTypes.equipment break - case "biography": + case "biography": context.tab = context.tabs.biography context.enrichedDescription = await TextEditor.enrichHTML(doc.system.description, { async: true }) context.enrichedNotes = await TextEditor.enrichHTML(doc.system.notes, { async: true }) @@ -190,7 +191,7 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet static #onDivinityPointsMinus(event, target) { let points = this.actor.system.divinityPoints.value - points -= 1 + points -= 1 points = Math.max(points, 0) this.actor.update({ "system.divinityPoints.value": points }) } @@ -208,7 +209,7 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet points = Math.max(points, 0) this.actor.update({ "system.aetherPoints.value": points }) } - + static #onCreateEquipment(event, target) { } @@ -225,8 +226,8 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet 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 } ); - }) + this.actor.update({ "system.hp.wounds": tab }); + }) } super._onRender(); } @@ -279,6 +280,16 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet let rollTarget let rollKey = event.target.dataset.rollKey switch (rollType) { + case "granted": + rollTarget = { + name: rollKey, + formula: foundry.utils.duplicate(this.document.system.granted[rollKey]), + rollKey: rollKey + } + if ( rollTarget.formula === "" || rollTarget.formula === undefined) { + rollTarget.formula = 0 + } + break; case "challenge": rollTarget = foundry.utils.duplicate(this.document.system.challenges[rollKey]) rollTarget.rollKey = rollKey @@ -336,12 +347,21 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet console.error("Weapon or skill not found", weapon, skill) ui.notifications.warn(game.i18n.localize("LETHALFANTASY.Notifications.skillNotFound")) return - } + } rollTarget = skill rollTarget.weapon = weapon rollTarget.weaponSkillModifier = skill.weaponSkillModifier rollTarget.rollKey = rollKey rollTarget.combat = foundry.utils.duplicate(this.actor.system.combat) + if ( rollType === "weapon-damage-small" || rollType === "weapon-damage-medium") { + rollTarget.grantedDice = this.actor.system.granted.damageDice + } + if ( rollType === "weapon-attack") { + rollTarget.grantedDice = this.actor.system.granted.attackDice + } + if ( rollType === "weapon-defense") { + rollTarget.grantedDice = this.actor.system.granted.defenseDice + } break default: ui.notifications.error(game.i18n.localize("LETHALFANTASY.Notifications.rollTypeNotFound") + String(rollType)) @@ -351,7 +371,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) + console.log("ROLLTARGET", rollTarget) await this.document.system.roll(rollType, rollTarget) } // #endregion diff --git a/module/config/monster.mjs b/module/config/monster.mjs index 1e06bbb..1bb248e 100644 --- a/module/config/monster.mjs +++ b/module/config/monster.mjs @@ -25,6 +25,10 @@ export const MONSTER_RESIST = Object.freeze({ perception: { id: "perception", label: "LETHALFANTASY.Monster.perception.label" + }, + stealth: { + id: "stealth", + label: "LETHALFANTASY.Monster.stealth.label" } }) diff --git a/module/documents/actor.mjs b/module/documents/actor.mjs index 9d6d47d..c2870ea 100644 --- a/module/documents/actor.mjs +++ b/module/documents/actor.mjs @@ -17,7 +17,7 @@ export default class LethalFantasyActor extends Actor { const skills = await LethalFantasyUtils.loadCompendium("fvtt-lethal-fantasy.lf-skills") data.items = data.items || [] for (let skill of skills) { - if (skill.system.category === "layperson" || skill.system.category === "professional") { + if (skill.system.category === "layperson") { data.items.push(skill.toObject()) } } diff --git a/module/documents/roll.mjs b/module/documents/roll.mjs index df93c8e..74c3ced 100644 --- a/module/documents/roll.mjs +++ b/module/documents/roll.mjs @@ -122,6 +122,8 @@ export default class LethalFantasyRoll extends Roll { let hasChangeDice = false let hasD30 = false let hasFavor = false + let hasMaxValue = true + let hasGrantedDice = false if (options.rollType === "challenge" || options.rollType === "save") { options.rollName = options.rollTarget.rollKey @@ -138,6 +140,17 @@ export default class LethalFantasyRoll extends Roll { hasFavor = true } + } else if (options.rollType === "granted") { + hasD30 = false + options.rollName = `Granted ${options.rollTarget.rollKey}` + dice = options.rollTarget.formula + baseFormula = options.rollTarget.formula + hasModifier = false + maxValue = 100 + hasMaxValue = false + hasChangeDice = false + hasFavor = false + } else if (options.rollType === "monster-attack" || options.rollType === "monster-defense") { hasD30 = true options.rollName = options.rollTarget.name @@ -148,10 +161,10 @@ export default class LethalFantasyRoll extends Roll { hasChangeDice = false hasFavor = true if (options.rollType === "monster-attack") { - options.rollTarget.value = options.rollTarget.attackModifier + options.rollTarget.value = options.rollTarget.attackModifier options.rollTarget.charModifier = 0 } else { - options.rollTarget.value = options.rollTarget.defenseModifier + options.rollTarget.value = options.rollTarget.defenseModifier options.rollTarget.charModifier = 0 } @@ -170,7 +183,7 @@ export default class LethalFantasyRoll extends Roll { hasFavor = true hasChangeDice = false options.rollTarget.value = options.rollTarget.system.skillTotal - + } else if (options.rollType === "weapon-attack" || options.rollType === "weapon-defense") { hasD30 = true options.rollName = options.rollTarget.name @@ -224,7 +237,7 @@ export default class LethalFantasyRoll extends Roll { dice = dice.replace("E", "") baseFormula = dice maxValue = 20 - + } else if (options.rollType.includes("monster-damage")) { options.rollName = options.rollTarget.name hasModifier = true @@ -277,10 +290,9 @@ export default class LethalFantasyRoll extends Roll { hasTarget: options.hasTarget, modifier, saveSpell: false, - favor : "none", + favor: "none", targetName } - console.log("dialogContext", dialogContext) const content = await renderTemplate("systems/fvtt-lethal-fantasy/templates/roll-dialog.hbs", dialogContext) const title = LethalFantasyRoll.createTitle(options.rollType, options.rollTarget) @@ -301,26 +313,32 @@ export default class LethalFantasyRoll extends Roll { }, }, ], + actions: { + "selectGranted": (event, button, dialog) => { + hasGrantedDice = true + } + }, rejectClose: false // Click on Close button will not launch an error }) // If the user cancels the dialog, exit if (rollContext === null) return + console.log("rollContext", rollContext, hasGrantedDice) let fullModifier = 0 let titleFormula = "" dice = rollContext.changeDice || dice if (hasModifier) { - let bonus = Number(options.rollTarget.value) + let bonus = Number(options.rollTarget.value) fullModifier = rollContext.modifier === "" ? 0 : parseInt(rollContext.modifier, 10) + bonus - fullModifier += (rollContext.saveSpell) ? options.rollTarget.actorModifiers.saveModifier : 0 + fullModifier += (rollContext.saveSpell) ? options.rollTarget.actorModifiers.saveModifier : 0 if (fullModifier === 0) { modifierFormula = "0" } else { - if (options.rollType === "skill") { + if (options.rollType === "skill") { modifierFormula = `${fullModifier}` - } else { + } else { let modAbs = Math.abs(fullModifier) modifierFormula = `d${modAbs + 1} - 1` } @@ -346,7 +364,7 @@ export default class LethalFantasyRoll extends Roll { if (options.rollType === "save" && (options.rollTarget.rollKey === "pain" || options.rollTarget.rollKey === "poison" || options.rollTarget.rollKey === "contagion")) { hasD30 = false } - + maxValue = Number(baseFormula.match(/\d+$/)[0]) // Update the max value agains const rollData = { @@ -359,6 +377,7 @@ export default class LethalFantasyRoll extends Roll { actorImage: options.actorImage, rollMode: rollContext.visibility, hasTarget: options.hasTarget, + hasGrantedDice, titleFormula, targetName, ...rollContext, @@ -378,7 +397,7 @@ export default class LethalFantasyRoll extends Roll { const rollModifier = new Roll(modifierFormula, options.data, rollData) await rollModifier.evaluate() await rollBase.evaluate() - + let rollFavor let badResult if (rollContext.favor === "favor") { @@ -412,7 +431,7 @@ export default class LethalFantasyRoll extends Roll { if (hasD30) { let rollD30 = await new Roll("1D30").evaluate() if (game?.dice3d) { - game.dice3d.showForRoll(rollD30, game.user, true) + await game.dice3d.showForRoll(rollD30, game.user, true) } options.D30result = rollD30.total } @@ -428,14 +447,30 @@ export default class LethalFantasyRoll extends Roll { let diceResult = rollBase.dice[i].results[j].result diceResults.push({ dice: `${singleDice}`, value: diceResult }) diceSum += diceResult - while (diceResult === maxValue) { - let r = await new Roll(baseFormula).evaluate() - diceResult = r.dice[0].results[0].result - diceResults.push({ dice: `${singleDice}-1`, value: diceResult - 1 }) - diceSum += (diceResult - 1) + if (hasMaxValue) { + while (diceResult === maxValue) { + let r = await new Roll(baseFormula).evaluate() + if (game?.dice3d) { + await game.dice3d.showForRoll(r, game.user, true) + } + diceResult = r.dice[0].results[0].result + diceResults.push({ dice: `${singleDice}-1`, value: diceResult - 1 }) + diceSum += (diceResult - 1) + } } } } + + if ( hasGrantedDice) { + let grantedRoll = new Roll(options.rollTarget.grantedDice) + await grantedRoll.evaluate() + if (game?.dice3d) { + await game.dice3d.showForRoll(grantedRoll, game.user, true) + } + diceResults.push({ dice: `${options.rollTarget.grantedDice}`, value: grantedRoll.total }) + rollTotal += grantedRoll.total + } + if (fullModifier !== 0) { diceResults.push({ dice: `${rollModifier.formula}`, value: rollModifier.total }) if (fullModifier < 0) { @@ -477,9 +512,9 @@ export default class LethalFantasyRoll extends Roll { default: "public", }) - if ( SYSTEM.INITIATIVE_DICE_CHOICES_PER_CLASS[options.actorClass] ) { + if (SYSTEM.INITIATIVE_DICE_CHOICES_PER_CLASS[options.actorClass]) { options.initiativeDiceChoice = SYSTEM.INITIATIVE_DICE_CHOICES_PER_CLASS[options.actorClass] - } else { + } else { options.initiativeDiceChoice = SYSTEM.INITIATIVE_DICE_CHOICES_PER_CLASS["untrained"] } @@ -492,7 +527,7 @@ export default class LethalFantasyRoll extends Roll { rollModes } console.log("CTX", dialogContext) - + const content = await renderTemplate("systems/fvtt-lethal-fantasy/templates/roll-initiative-dialog.hbs", dialogContext) const label = game.i18n.localize("LETHALFANTASY.Label.initiative") @@ -517,31 +552,33 @@ export default class LethalFantasyRoll extends Roll { let initRoll = new Roll(`min(${rollContext.initiativeDice}, ${options.maxInit})`, options.data, rollContext) await initRoll.evaluate() - let msg = await initRoll.toMessage( {flavor: `Initiative for ${options.actorName}`}, {rollMode: rollContext.visibility} ) - await game.dice3d.waitFor3DAnimationByMessageID(msg.id) + let msg = await initRoll.toMessage({ flavor: `Initiative for ${options.actorName}` }, { rollMode: rollContext.visibility }) + if (game?.dice3d) { + await game.dice3d.waitFor3DAnimationByMessageID(msg.id) + } if (options.combatId && options.combatantId) { let combat = game.combats.get(options.combatId) - combat.updateEmbeddedDocuments("Combatant", [ { _id: options.combatantId, initiative: initRoll.total, 'system.progressionCount': 0 } ]); + combat.updateEmbeddedDocuments("Combatant", [{ _id: options.combatantId, initiative: initRoll.total, 'system.progressionCount': 0 }]); } } static async promptProgressionDice(options = {}) { - + const rollModes = Object.fromEntries(Object.entries(CONFIG.Dice.rollModes).map(([key, value]) => [key, game.i18n.localize(value)])) const fieldRollMode = new foundry.data.fields.StringField({ choices: rollModes, blank: false, default: "public", }) - let dialogContext = { + let dialogContext = { progressionDiceId: "", fieldRollMode, rollModes, ...options } - + console.log("CTX PROGRESSION", dialogContext) const content = await renderTemplate("systems/fvtt-lethal-fantasy/templates/roll-progression-dice-dialog.hbs", dialogContext) @@ -565,23 +602,23 @@ export default class LethalFantasyRoll extends Roll { }, { action: "cancel", - label: "Other action, no progression dice", - callback: (event, button, dialog) => { - return null; - } + label: "Other action, no progression dice", + callback: (event, button, dialog) => { + return null; + } } ], rejectClose: false // Click on Close button will not launch an error }) - + console.log("RollContext", rollContext) - if (rollContext === null || !rollContext?.progressionDiceId) { + if (rollContext === null || !rollContext?.progressionDiceId) { let combat = game.combats.get(options.combatId) let combatant = combat.combatants.get(options.combatantId) - combatant.update({ 'system.progressionCount': 1 }) + combatant.update({ 'system.progressionCount': 1 }) return } - + // Get the weapons from the actor items let actor = game.actors.get(options.actorId) let weapon = actor.items.find(i => i.type === "weapon" && i.id === rollContext.progressionDiceId) @@ -590,20 +627,22 @@ export default class LethalFantasyRoll extends Roll { let formula = weapon.system.combatProgressionDice let roll = new Roll(formula) await roll.evaluate() - + let max = roll.dice[0].faces - 1 max = Math.min(options.rollProgressionCount, max) - let msg = await roll.toMessage( {flavor: `Progression Roll for ${weapon.name}, progression count : ${options.rollProgressionCount}/${max}`}, {rollMode: rollContext.visibility} ) - await game.dice3d.waitFor3DAnimationByMessageID(msg.id) + let msg = await roll.toMessage({ flavor: `Progression Roll for ${weapon.name}, progression count : ${options.rollProgressionCount}/${max}` }, { rollMode: rollContext.visibility }) + if (game?.dice3d) { + await game.dice3d.waitFor3DAnimationByMessageID(msg.id) + } - if (roll.total <= max ) { + if (roll.total <= max) { // Notify that the player can act now with a chat message let message = game.i18n.format("LETHALFANTASY.Notifications.messageProgressionOK", { isMonster, name: actor.name, weapon: weapon.name, roll: roll.total }) ChatMessage.create({ content: message, speaker: ChatMessage.getSpeaker({ actor: actor }) }) // Update the combatant progression count let combat = game.combats.get(options.combatId) let combatant = combat.combatants.get(options.combatantId) - combatant.update({ 'system.progressionCount': 0 }) + combatant.update({ 'system.progressionCount': 0 }) } else { // Notify that the player cannot act now with a chat message let message = game.i18n.format("LETHALFANTASY.Notifications.messageProgressionKO", { isMonster, name: actor.name, weapon: weapon.name, roll: roll.total }) @@ -612,7 +651,7 @@ export default class LethalFantasyRoll extends Roll { } static async promptRangedDefense(rollTarget) { - + const rollModes = Object.fromEntries(Object.entries(CONFIG.Dice.rollModes).map(([key, value]) => [key, game.i18n.localize(value)])) const fieldRollMode = new foundry.data.fields.StringField({ choices: rollModes, @@ -621,11 +660,11 @@ export default class LethalFantasyRoll extends Roll { }) let dialogContext = { - movementChoices : SYSTEM.MOVEMENT_CHOICES, - moveDirectionChoices : SYSTEM.MOVE_DIRECTION_CHOICES, - sizeChoices : SYSTEM.SIZE_CHOICES, - rangeChoices : SYSTEM.RANGE_CHOICES, - attackerAimChoices : SYSTEM.ATTACKER_AIM_CHOICES, + movementChoices: SYSTEM.MOVEMENT_CHOICES, + moveDirectionChoices: SYSTEM.MOVE_DIRECTION_CHOICES, + sizeChoices: SYSTEM.SIZE_CHOICES, + rangeChoices: SYSTEM.RANGE_CHOICES, + attackerAimChoices: SYSTEM.ATTACKER_AIM_CHOICES, movement: "none", moveDirection: "none", size: "medium", @@ -657,15 +696,15 @@ export default class LethalFantasyRoll extends Roll { ], rejectClose: false // Click on Close button will not launch an error }) - + console.log("RollContext", rollContext) // Build the final modifier - let fullModifier = Number(rollContext.moveDirection) + - Number(rollContext.size) + - Number(rollContext.range) + + let fullModifier = Number(rollContext.moveDirection) + + Number(rollContext.size) + + Number(rollContext.range) + Number(rollContext.attackerAim) console.log("Modifier", fullModifier) - + let modifierFormula if (fullModifier === 0) { modifierFormula = "0" @@ -677,8 +716,8 @@ export default class LethalFantasyRoll extends Roll { // If the user cancels the dialog, exit if (rollContext === null) return - let rollData = {...rollContext} - let options = {...rollContext} + let rollData = { ...rollContext } + let options = { ...rollContext } options.rollName = "Ranged Defense" const rollBase = new this(rollContext.movement, options.data, rollData) @@ -758,7 +797,7 @@ export default class LethalFantasyRoll extends Roll { return `${game.i18n.localize("LETHALFANTASY.Label.weapon-damage-small")}` case "weapon-damage-medium": return `${game.i18n.localize("LETHALFANTASY.Label.weapon-damage-medium")}` - case "spell": + case "spell": return `${game.i18n.localize("LETHALFANTASY.Label.spell")}` default: return game.i18n.localize("LETHALFANTASY.Label.titleStandard") diff --git a/module/models/character.mjs b/module/models/character.mjs index d2e45c9..cc766c1 100644 --- a/module/models/character.mjs +++ b/module/models/character.mjs @@ -73,6 +73,7 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod { 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 }), + damageResistance: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }) }) schema.perception = new fields.SchemaField({ @@ -88,6 +89,12 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod earned: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), current: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }) }) + schema.granted = new fields.SchemaField({ + attackDice: new fields.StringField({ required: true, nullable: false, initial: "" }), + defenseDice: new fields.StringField({ required: true, nullable: false, initial: "" }), + damageDice: new fields.StringField({ required: true, nullable: false, initial: "" }) + }) + schema.movement = new fields.SchemaField({ walk: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), jog: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), @@ -111,6 +118,7 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod hair: new fields.StringField({ required: true, nullable: false, initial: "" }), magicUser: new fields.BooleanField({ initial: false }), clericUser: new fields.BooleanField({ initial: false }), + hpPerLevel: new fields.StringField({ required: true, nullable: false, initial: "" }), }) schema.modifiers = new fields.SchemaField({ diff --git a/module/models/monster.mjs b/module/models/monster.mjs index 7886bce..533ec77 100644 --- a/module/models/monster.mjs +++ b/module/models/monster.mjs @@ -60,6 +60,7 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel value: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }), average: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }), max: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }), + damageResistance: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }) }) const attackField = (label) => { @@ -102,9 +103,9 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel schema.biodata = new fields.SchemaField({ alignment: new fields.StringField({ required: true, nullable: false, initial: "" }), vision: new fields.StringField({ required: true, nullable: false, initial: "" }), - height: new fields.NumberField({ ...requiredInteger, initial: 170, min: 50 }), + height: new fields.StringField({ required: true, nullable: false, initial: "" }), length: new fields.StringField({ required: true, nullable: false, initial: "" }), - weight: new fields.NumberField({ ...requiredInteger, initial: 70, min: 0 }) + weight: new fields.StringField({ required: true, nullable: false, initial: "" }) }) schema.combat = new fields.SchemaField({ attackModifier: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), @@ -174,7 +175,9 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel await roll.evaluate() let max = rollProgressionCount let msg = await roll.toMessage({ flavor: `Progression Roll for ${this.parent.name}` } ) - await game.dice3d.waitFor3DAnimationByMessageID(msg.id) + if (game?.dice3d) { + await game.dice3d.waitFor3DAnimationByMessageID(msg.id) + } let hasAttack = false for (let key in this.attacks) { diff --git a/packs-system/lf-equipment/000084.log b/packs-system/lf-equipment/000088.log similarity index 100% rename from packs-system/lf-equipment/000084.log rename to packs-system/lf-equipment/000088.log diff --git a/packs-system/lf-equipment/CURRENT b/packs-system/lf-equipment/CURRENT index d4b9a0f..a43fb19 100644 --- a/packs-system/lf-equipment/CURRENT +++ b/packs-system/lf-equipment/CURRENT @@ -1 +1 @@ -MANIFEST-000082 +MANIFEST-000086 diff --git a/packs-system/lf-equipment/LOG b/packs-system/lf-equipment/LOG index 4abe1d9..af82383 100644 --- a/packs-system/lf-equipment/LOG +++ b/packs-system/lf-equipment/LOG @@ -1,8 +1,8 @@ -2025/01/18-18:45:51.397204 7f3b8bfff6c0 Recovering log #80 -2025/01/18-18:45:51.459450 7f3b8bfff6c0 Delete type=3 #78 -2025/01/18-18:45:51.459524 7f3b8bfff6c0 Delete type=0 #80 -2025/01/18-19:25:39.662101 7f3b8b3ff6c0 Level-0 table #85: started -2025/01/18-19:25:39.662133 7f3b8b3ff6c0 Level-0 table #85: 0 bytes OK -2025/01/18-19:25:39.686749 7f3b8b3ff6c0 Delete type=0 #83 -2025/01/18-19:25:39.734023 7f3b8b3ff6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zFrygJ2TnrxchBai' @ 0 : 0; will stop at (end) -2025/01/18-19:25:39.734056 7f3b8b3ff6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zFrygJ2TnrxchBai' @ 0 : 0; will stop at (end) +2025/01/19-20:28:04.294851 7f6e76ffd6c0 Recovering log #84 +2025/01/19-20:28:04.332992 7f6e76ffd6c0 Delete type=3 #82 +2025/01/19-20:28:04.333048 7f6e76ffd6c0 Delete type=0 #84 +2025/01/19-22:33:17.587402 7f6e753ff6c0 Level-0 table #89: started +2025/01/19-22:33:17.587446 7f6e753ff6c0 Level-0 table #89: 0 bytes OK +2025/01/19-22:33:17.593554 7f6e753ff6c0 Delete type=0 #87 +2025/01/19-22:33:17.612509 7f6e753ff6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zFrygJ2TnrxchBai' @ 0 : 0; will stop at (end) +2025/01/19-22:33:17.612553 7f6e753ff6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zFrygJ2TnrxchBai' @ 0 : 0; will stop at (end) diff --git a/packs-system/lf-equipment/LOG.old b/packs-system/lf-equipment/LOG.old index af34f3f..4abe1d9 100644 --- a/packs-system/lf-equipment/LOG.old +++ b/packs-system/lf-equipment/LOG.old @@ -1,8 +1,8 @@ -2025/01/18-09:15:00.143272 7f3b909f86c0 Recovering log #76 -2025/01/18-09:15:00.153506 7f3b909f86c0 Delete type=3 #74 -2025/01/18-09:15:00.153575 7f3b909f86c0 Delete type=0 #76 -2025/01/18-15:51:00.716946 7f3b8b3ff6c0 Level-0 table #81: started -2025/01/18-15:51:00.716985 7f3b8b3ff6c0 Level-0 table #81: 0 bytes OK -2025/01/18-15:51:00.727010 7f3b8b3ff6c0 Delete type=0 #79 -2025/01/18-15:51:00.756449 7f3b8b3ff6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zFrygJ2TnrxchBai' @ 0 : 0; will stop at (end) -2025/01/18-15:51:00.756506 7f3b8b3ff6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zFrygJ2TnrxchBai' @ 0 : 0; will stop at (end) +2025/01/18-18:45:51.397204 7f3b8bfff6c0 Recovering log #80 +2025/01/18-18:45:51.459450 7f3b8bfff6c0 Delete type=3 #78 +2025/01/18-18:45:51.459524 7f3b8bfff6c0 Delete type=0 #80 +2025/01/18-19:25:39.662101 7f3b8b3ff6c0 Level-0 table #85: started +2025/01/18-19:25:39.662133 7f3b8b3ff6c0 Level-0 table #85: 0 bytes OK +2025/01/18-19:25:39.686749 7f3b8b3ff6c0 Delete type=0 #83 +2025/01/18-19:25:39.734023 7f3b8b3ff6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zFrygJ2TnrxchBai' @ 0 : 0; will stop at (end) +2025/01/18-19:25:39.734056 7f3b8b3ff6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zFrygJ2TnrxchBai' @ 0 : 0; will stop at (end) diff --git a/packs-system/lf-equipment/MANIFEST-000082 b/packs-system/lf-equipment/MANIFEST-000082 deleted file mode 100644 index 2c315b7..0000000 Binary files a/packs-system/lf-equipment/MANIFEST-000082 and /dev/null differ diff --git a/packs-system/lf-equipment/MANIFEST-000086 b/packs-system/lf-equipment/MANIFEST-000086 new file mode 100644 index 0000000..daf6f76 Binary files /dev/null and b/packs-system/lf-equipment/MANIFEST-000086 differ diff --git a/packs-system/lf-gifts/000084.log b/packs-system/lf-gifts/000088.log similarity index 100% rename from packs-system/lf-gifts/000084.log rename to packs-system/lf-gifts/000088.log diff --git a/packs-system/lf-gifts/CURRENT b/packs-system/lf-gifts/CURRENT index d4b9a0f..a43fb19 100644 --- a/packs-system/lf-gifts/CURRENT +++ b/packs-system/lf-gifts/CURRENT @@ -1 +1 @@ -MANIFEST-000082 +MANIFEST-000086 diff --git a/packs-system/lf-gifts/LOG b/packs-system/lf-gifts/LOG index e0436ef..500ae51 100644 --- a/packs-system/lf-gifts/LOG +++ b/packs-system/lf-gifts/LOG @@ -1,8 +1,8 @@ -2025/01/18-18:45:51.461997 7f3b919fa6c0 Recovering log #80 -2025/01/18-18:45:51.515007 7f3b919fa6c0 Delete type=3 #78 -2025/01/18-18:45:51.515089 7f3b919fa6c0 Delete type=0 #80 -2025/01/18-19:25:39.714194 7f3b8b3ff6c0 Level-0 table #85: started -2025/01/18-19:25:39.714225 7f3b8b3ff6c0 Level-0 table #85: 0 bytes OK -2025/01/18-19:25:39.733891 7f3b8b3ff6c0 Delete type=0 #83 -2025/01/18-19:25:39.734043 7f3b8b3ff6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end) -2025/01/18-19:25:39.734069 7f3b8b3ff6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end) +2025/01/19-20:28:04.336215 7f6e767fc6c0 Recovering log #84 +2025/01/19-20:28:04.372498 7f6e767fc6c0 Delete type=3 #82 +2025/01/19-20:28:04.372572 7f6e767fc6c0 Delete type=0 #84 +2025/01/19-22:33:17.593695 7f6e753ff6c0 Level-0 table #89: started +2025/01/19-22:33:17.593726 7f6e753ff6c0 Level-0 table #89: 0 bytes OK +2025/01/19-22:33:17.600149 7f6e753ff6c0 Delete type=0 #87 +2025/01/19-22:33:17.612522 7f6e753ff6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end) +2025/01/19-22:33:17.612568 7f6e753ff6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end) diff --git a/packs-system/lf-gifts/LOG.old b/packs-system/lf-gifts/LOG.old index 03bf5fd..e0436ef 100644 --- a/packs-system/lf-gifts/LOG.old +++ b/packs-system/lf-gifts/LOG.old @@ -1,8 +1,8 @@ -2025/01/18-09:15:00.156518 7f3b911f96c0 Recovering log #76 -2025/01/18-09:15:00.166540 7f3b911f96c0 Delete type=3 #74 -2025/01/18-09:15:00.166606 7f3b911f96c0 Delete type=0 #76 -2025/01/18-15:51:00.736393 7f3b8b3ff6c0 Level-0 table #81: started -2025/01/18-15:51:00.736420 7f3b8b3ff6c0 Level-0 table #81: 0 bytes OK -2025/01/18-15:51:00.746678 7f3b8b3ff6c0 Delete type=0 #79 -2025/01/18-15:51:00.756477 7f3b8b3ff6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end) -2025/01/18-15:51:00.756525 7f3b8b3ff6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end) +2025/01/18-18:45:51.461997 7f3b919fa6c0 Recovering log #80 +2025/01/18-18:45:51.515007 7f3b919fa6c0 Delete type=3 #78 +2025/01/18-18:45:51.515089 7f3b919fa6c0 Delete type=0 #80 +2025/01/18-19:25:39.714194 7f3b8b3ff6c0 Level-0 table #85: started +2025/01/18-19:25:39.714225 7f3b8b3ff6c0 Level-0 table #85: 0 bytes OK +2025/01/18-19:25:39.733891 7f3b8b3ff6c0 Delete type=0 #83 +2025/01/18-19:25:39.734043 7f3b8b3ff6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end) +2025/01/18-19:25:39.734069 7f3b8b3ff6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end) diff --git a/packs-system/lf-gifts/MANIFEST-000082 b/packs-system/lf-gifts/MANIFEST-000082 deleted file mode 100644 index 14b9ded..0000000 Binary files a/packs-system/lf-gifts/MANIFEST-000082 and /dev/null differ diff --git a/packs-system/lf-gifts/MANIFEST-000086 b/packs-system/lf-gifts/MANIFEST-000086 new file mode 100644 index 0000000..1c96668 Binary files /dev/null and b/packs-system/lf-gifts/MANIFEST-000086 differ diff --git a/packs-system/lf-skills/000084.log b/packs-system/lf-skills/000088.log similarity index 100% rename from packs-system/lf-skills/000084.log rename to packs-system/lf-skills/000088.log diff --git a/packs-system/lf-skills/CURRENT b/packs-system/lf-skills/CURRENT index d4b9a0f..a43fb19 100644 --- a/packs-system/lf-skills/CURRENT +++ b/packs-system/lf-skills/CURRENT @@ -1 +1 @@ -MANIFEST-000082 +MANIFEST-000086 diff --git a/packs-system/lf-skills/LOG b/packs-system/lf-skills/LOG index c966443..89995d0 100644 --- a/packs-system/lf-skills/LOG +++ b/packs-system/lf-skills/LOG @@ -1,8 +1,8 @@ -2025/01/18-18:45:51.345613 7f3b911f96c0 Recovering log #80 -2025/01/18-18:45:51.394393 7f3b911f96c0 Delete type=3 #78 -2025/01/18-18:45:51.394460 7f3b911f96c0 Delete type=0 #80 -2025/01/18-19:25:39.686886 7f3b8b3ff6c0 Level-0 table #85: started -2025/01/18-19:25:39.686918 7f3b8b3ff6c0 Level-0 table #85: 0 bytes OK -2025/01/18-19:25:39.714065 7f3b8b3ff6c0 Delete type=0 #83 -2025/01/18-19:25:39.734034 7f3b8b3ff6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end) -2025/01/18-19:25:39.734062 7f3b8b3ff6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end) +2025/01/19-20:28:04.243940 7f6e777fe6c0 Recovering log #84 +2025/01/19-20:28:04.287892 7f6e777fe6c0 Delete type=3 #82 +2025/01/19-20:28:04.287949 7f6e777fe6c0 Delete type=0 #84 +2025/01/19-22:33:17.600271 7f6e753ff6c0 Level-0 table #89: started +2025/01/19-22:33:17.600297 7f6e753ff6c0 Level-0 table #89: 0 bytes OK +2025/01/19-22:33:17.606219 7f6e753ff6c0 Delete type=0 #87 +2025/01/19-22:33:17.612535 7f6e753ff6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end) +2025/01/19-22:33:17.612561 7f6e753ff6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end) diff --git a/packs-system/lf-skills/LOG.old b/packs-system/lf-skills/LOG.old index c41cd2b..c966443 100644 --- a/packs-system/lf-skills/LOG.old +++ b/packs-system/lf-skills/LOG.old @@ -1,8 +1,8 @@ -2025/01/18-09:15:00.130226 7f3b919fa6c0 Recovering log #76 -2025/01/18-09:15:00.139788 7f3b919fa6c0 Delete type=3 #74 -2025/01/18-09:15:00.139841 7f3b919fa6c0 Delete type=0 #76 -2025/01/18-15:51:00.746782 7f3b8b3ff6c0 Level-0 table #81: started -2025/01/18-15:51:00.746804 7f3b8b3ff6c0 Level-0 table #81: 0 bytes OK -2025/01/18-15:51:00.756314 7f3b8b3ff6c0 Delete type=0 #79 -2025/01/18-15:51:00.756497 7f3b8b3ff6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end) -2025/01/18-15:51:00.756534 7f3b8b3ff6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end) +2025/01/18-18:45:51.345613 7f3b911f96c0 Recovering log #80 +2025/01/18-18:45:51.394393 7f3b911f96c0 Delete type=3 #78 +2025/01/18-18:45:51.394460 7f3b911f96c0 Delete type=0 #80 +2025/01/18-19:25:39.686886 7f3b8b3ff6c0 Level-0 table #85: started +2025/01/18-19:25:39.686918 7f3b8b3ff6c0 Level-0 table #85: 0 bytes OK +2025/01/18-19:25:39.714065 7f3b8b3ff6c0 Delete type=0 #83 +2025/01/18-19:25:39.734034 7f3b8b3ff6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end) +2025/01/18-19:25:39.734062 7f3b8b3ff6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end) diff --git a/packs-system/lf-skills/MANIFEST-000082 b/packs-system/lf-skills/MANIFEST-000082 deleted file mode 100644 index 39bc5b0..0000000 Binary files a/packs-system/lf-skills/MANIFEST-000082 and /dev/null differ diff --git a/packs-system/lf-skills/MANIFEST-000086 b/packs-system/lf-skills/MANIFEST-000086 new file mode 100644 index 0000000..72d0462 Binary files /dev/null and b/packs-system/lf-skills/MANIFEST-000086 differ diff --git a/packs-system/lf-vulnerabilities/000084.log b/packs-system/lf-vulnerabilities/000088.log similarity index 100% rename from packs-system/lf-vulnerabilities/000084.log rename to packs-system/lf-vulnerabilities/000088.log diff --git a/packs-system/lf-vulnerabilities/CURRENT b/packs-system/lf-vulnerabilities/CURRENT index d4b9a0f..a43fb19 100644 --- a/packs-system/lf-vulnerabilities/CURRENT +++ b/packs-system/lf-vulnerabilities/CURRENT @@ -1 +1 @@ -MANIFEST-000082 +MANIFEST-000086 diff --git a/packs-system/lf-vulnerabilities/LOG b/packs-system/lf-vulnerabilities/LOG index 284dd59..6db8f7a 100644 --- a/packs-system/lf-vulnerabilities/LOG +++ b/packs-system/lf-vulnerabilities/LOG @@ -1,8 +1,8 @@ -2025/01/18-18:45:51.517293 7f3b909f86c0 Recovering log #80 -2025/01/18-18:45:51.568529 7f3b909f86c0 Delete type=3 #78 -2025/01/18-18:45:51.568609 7f3b909f86c0 Delete type=0 #80 -2025/01/18-19:25:39.636193 7f3b8b3ff6c0 Level-0 table #85: started -2025/01/18-19:25:39.636238 7f3b8b3ff6c0 Level-0 table #85: 0 bytes OK -2025/01/18-19:25:39.661963 7f3b8b3ff6c0 Delete type=0 #83 -2025/01/18-19:25:39.734012 7f3b8b3ff6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) -2025/01/18-19:25:39.734050 7f3b8b3ff6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) +2025/01/19-20:28:04.375979 7f6e75ffb6c0 Recovering log #84 +2025/01/19-20:28:04.418530 7f6e75ffb6c0 Delete type=3 #82 +2025/01/19-20:28:04.418601 7f6e75ffb6c0 Delete type=0 #84 +2025/01/19-22:33:17.606373 7f6e753ff6c0 Level-0 table #89: started +2025/01/19-22:33:17.606409 7f6e753ff6c0 Level-0 table #89: 0 bytes OK +2025/01/19-22:33:17.612385 7f6e753ff6c0 Delete type=0 #87 +2025/01/19-22:33:17.612545 7f6e753ff6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) +2025/01/19-22:33:17.612576 7f6e753ff6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) diff --git a/packs-system/lf-vulnerabilities/LOG.old b/packs-system/lf-vulnerabilities/LOG.old index 24e1664..284dd59 100644 --- a/packs-system/lf-vulnerabilities/LOG.old +++ b/packs-system/lf-vulnerabilities/LOG.old @@ -1,8 +1,8 @@ -2025/01/18-09:15:00.168890 7f3b8bfff6c0 Recovering log #76 -2025/01/18-09:15:00.178560 7f3b8bfff6c0 Delete type=3 #74 -2025/01/18-09:15:00.178618 7f3b8bfff6c0 Delete type=0 #76 -2025/01/18-15:51:00.727117 7f3b8b3ff6c0 Level-0 table #81: started -2025/01/18-15:51:00.727139 7f3b8b3ff6c0 Level-0 table #81: 0 bytes OK -2025/01/18-15:51:00.736271 7f3b8b3ff6c0 Delete type=0 #79 -2025/01/18-15:51:00.756464 7f3b8b3ff6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) -2025/01/18-15:51:00.756516 7f3b8b3ff6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) +2025/01/18-18:45:51.517293 7f3b909f86c0 Recovering log #80 +2025/01/18-18:45:51.568529 7f3b909f86c0 Delete type=3 #78 +2025/01/18-18:45:51.568609 7f3b909f86c0 Delete type=0 #80 +2025/01/18-19:25:39.636193 7f3b8b3ff6c0 Level-0 table #85: started +2025/01/18-19:25:39.636238 7f3b8b3ff6c0 Level-0 table #85: 0 bytes OK +2025/01/18-19:25:39.661963 7f3b8b3ff6c0 Delete type=0 #83 +2025/01/18-19:25:39.734012 7f3b8b3ff6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) +2025/01/18-19:25:39.734050 7f3b8b3ff6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) diff --git a/packs-system/lf-vulnerabilities/MANIFEST-000082 b/packs-system/lf-vulnerabilities/MANIFEST-000086 similarity index 73% rename from packs-system/lf-vulnerabilities/MANIFEST-000082 rename to packs-system/lf-vulnerabilities/MANIFEST-000086 index b9aede2..7897b29 100644 Binary files a/packs-system/lf-vulnerabilities/MANIFEST-000082 and b/packs-system/lf-vulnerabilities/MANIFEST-000086 differ diff --git a/styles/character.less b/styles/character.less index 540f67c..942e437 100644 --- a/styles/character.less +++ b/styles/character.less @@ -367,15 +367,32 @@ display: flex; align-items: center; gap: 4px; + .input { + min-width: 2.5rem; + max-width: 2.5rem; + } button { - min-width: 10rem; + min-width: 9rem; } .armor-hp { - min-width: 20rem; - max-width: 20rem; + margin-right: 4px; + .name { + min-width: 6rem; + max-width: 6rem; + } + min-width: 10rem; + max-width: 10rem; .input { - min-width: 3rem; - max-width: 3rem; + min-width: 2.5rem; + max-width: 2.5rem; + } + } + .granted { + min-width: 8rem; + max-width: 8rem; + .input { + min-width: 2.5rem; + max-width: 2.5rem; } } } @@ -436,7 +453,7 @@ } .armors { display: grid; - grid-template-columns: repeat(3, 1fr); + grid-template-columns: repeat(2, 1fr); gap: 4px; .armor { display: flex; @@ -451,7 +468,32 @@ .name { min-width: 12rem; } + .item-detail { + min-width:2rem; + } } + .shields { + display: grid; + grid-template-columns: repeat(2, 1fr); + gap: 4px; + .shield { + display: flex; + align-items: center; + gap: 4px; + .item-img { + width: 24px; + height: 24px; + margin: 4px 0 0 0; + } + } + .item-detail { + min-width:2rem; + } + .name { + min-width: 12rem; + } + } + } .tab.character-spells { @@ -476,9 +518,10 @@ min-width: 10rem; } .armor-hp { - min-width: 20rem; - max-width: 20rem; + min-width: 12rem; + max-width: 12rem; .input { + flex: 0; min-width: 3rem; max-width: 3rem; } diff --git a/styles/monster.less b/styles/monster.less index 75be617..2f03282 100644 --- a/styles/monster.less +++ b/styles/monster.less @@ -36,6 +36,11 @@ min-width: 2.5rem; max-width: 2.5rem; } + .damage-resistance { + flex: none; + min-width: 6rem; + max-width: 6rem; + } input { flex: none; min-width: 2.2rem; diff --git a/styles/roll.less b/styles/roll.less index 3cb7263..640424a 100644 --- a/styles/roll.less +++ b/styles/roll.less @@ -11,7 +11,7 @@ .lethalfantasy-roll-dialog { fieldset { - padding: 10px; + padding: 4px; } } @@ -62,10 +62,10 @@ .dice-total, .dice-formula { - padding-top: 5px; + padding-top: 4px; } .dice-total { - margin-bottom: 5px; + margin-bottom: 4px; } .message-header { font-family: var(--font-primary); @@ -78,7 +78,7 @@ display: flex; flex-direction: row; .intro-img { - padding: 5px; + padding: 4px; width: 80px; align-self: center; } diff --git a/system.json b/system.json index b39ccc9..52dfaa4 100644 --- a/system.json +++ b/system.json @@ -6,7 +6,7 @@ "download": "#{DOWNLOAD}#", "url": "#{URL}#", "license": "LICENSE", - "version": "12.0.20", + "version": "12.0.21", "authors": [ { "name": "Uberwald", diff --git a/templates/character-biography.hbs b/templates/character-biography.hbs index cd16088..793c1fa 100644 --- a/templates/character-biography.hbs +++ b/templates/character-biography.hbs @@ -69,6 +69,11 @@ {{/if}} +
+ HP/Level + {{formInput systemFields.biodata.fields.hpPerLevel value=system.biodata.hpPerLevel disabled=true}} +
+ diff --git a/templates/character-combat.hbs b/templates/character-combat.hbs index 4643de3..05c9b7d 100644 --- a/templates/character-combat.hbs +++ b/templates/character-combat.hbs @@ -13,9 +13,31 @@ {{localize "LETHALFANTASY.Label.rollInitiative"}} - {{formField systemFields.combat.fields.armorHitPoints value=system.combat.armorHitPoints localize=true classes="armor-hp"}} - - +
+ {{localize "LETHALFANTASY.Label.armorHitPoints"}} + {{formInput systemFields.combat.fields.armorHitPoints value=system.combat.armorHitPoints localize=true }} + + +
+ +
+ {{localize "LETHALFANTASY.Label.grantedAttackDice"}} + {{formInput systemFields.granted.fields.attackDice value=system.granted.attackDice disabled=isPlayMode }} +
+ +
+ {{localize "LETHALFANTASY.Label.grantedDefenseDice"}} + {{formInput systemFields.granted.fields.defenseDice value=system.granted.defenseDice disabled=isPlayMode }} +
+ +
+ {{localize "LETHALFANTASY.Label.grantedDamageDice"}} + {{formInput systemFields.granted.fields.damageDice value=system.granted.damageDice disabled=isPlayMode }} +
+ @@ -89,6 +111,10 @@
{{item.name}}
+
{{item.system.defense}}
+
{{item.system.maximumMovement}}
+
{{item.system.hp}}
+
{{item.system.damageReduction}}
@@ -101,14 +127,18 @@
- {{localize "LETHALFANTASY.Label.equipment"}} -
- {{#each equipments as |item|}} -
+ {{localize "LETHALFANTASY.Label.shields"}} +
+ {{#each shields as |item|}} +
{{item.name}}
+
{{item.system.defense}}
+
{{item.system.movementreduction}}
+
{{item.system.hascover}}
+
@@ -120,5 +150,4 @@
- \ No newline at end of file diff --git a/templates/character-main.hbs b/templates/character-main.hbs index ccb2e68..2b92b85 100644 --- a/templates/character-main.hbs +++ b/templates/character-main.hbs @@ -33,6 +33,13 @@ {{formInput systemFields.luck.fields.earned value=system.luck.earned disabled=isPlayMode classes="character-hp"}}
+ +
+ {{localize "LETHALFANTASY.Label.damageResistanceShort"}} + {{formInput systemFields.hp.fields.damageResistance value=system.hp.fields.damageResistance disabled=isPlayMode classes="character-hp"}} +
+ + diff --git a/templates/monster-main.hbs b/templates/monster-main.hbs index 5abf240..f1c5196 100644 --- a/templates/monster-main.hbs +++ b/templates/monster-main.hbs @@ -17,6 +17,10 @@  /  {{formInput systemFields.hp.fields.max value=system.hp.max disabled=isPlayMode classes="monster-hp-value"}} +
+ {{localize "LETHALFANTASY.Label.damageResistance"}} + {{formInput systemFields.hp.fields.damageResistance value=system.hp.damageResistance disabled=isPlayMode classes="monster-hp-value"}} +
@@ -115,6 +119,13 @@ {{formField systemFields.resists.fields.perception.fields.value value=system.resists.perception.value disabled=isPlayMode }} + + {{localize + "LETHALFANTASY.Label.stealth"}} + {{formField systemFields.resists.fields.stealth.fields.value value=system.resists.stealth.value + disabled=isPlayMode }} + diff --git a/templates/roll-dialog.hbs b/templates/roll-dialog.hbs index 94c3197..fc11f54 100644 --- a/templates/roll-dialog.hbs +++ b/templates/roll-dialog.hbs @@ -21,8 +21,26 @@
{{localize "LETHALFANTASY.Label.skill"}} : {{rollTarget.name}}
{{localize "LETHALFANTASY.Label.skillBonus"}} : {{rollTarget.weaponSkillModifier}}
{{/if}} + + {{#if (match rollType "attack")}} +
Add Granted Attack Dice + +
+ {{/if}} + {{#if (match rollType "defense")}} +
Add Granted Defense Dice + +
+ {{/if}} + {{#if (match rollType "damage")}} +
Add Granted Damage Dice + +
+ {{/if}} + + {{#if hasFavor}}
{{localize "LETHALFANTASY.Roll.favorDisfavor"}}