Manage DR and damage roll
This commit is contained in:
@@ -2218,6 +2218,54 @@ i.lethalfantasy {
|
||||
border-color: var(--color-dark-6);
|
||||
color: var(--color-dark-2);
|
||||
}
|
||||
.application.dialog.lethalfantasy .apply-damage-dialog .dialog-content {
|
||||
padding: 6px;
|
||||
font-size: calc(var(--font-size-standard) * 1);
|
||||
}
|
||||
.application.dialog.lethalfantasy .apply-damage-dialog .dialog-content .header {
|
||||
text-align: center;
|
||||
padding: 4px;
|
||||
margin-bottom: 6px;
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
border-radius: 3px;
|
||||
}
|
||||
.application.dialog.lethalfantasy .apply-damage-dialog .dialog-content .damage-summary {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 4px 6px;
|
||||
margin-bottom: 6px;
|
||||
background-color: rgba(139, 0, 0, 0.1);
|
||||
border-radius: 3px;
|
||||
}
|
||||
.application.dialog.lethalfantasy .apply-damage-dialog .dialog-content .damage-summary .damage-value {
|
||||
color: var(--color-level-error);
|
||||
font-size: calc(var(--font-size-standard) * 1.2);
|
||||
font-weight: bold;
|
||||
}
|
||||
.application.dialog.lethalfantasy .apply-damage-dialog .dialog-content .dr-summary {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
gap: 4px;
|
||||
padding: 3px;
|
||||
margin-bottom: 6px;
|
||||
font-size: calc(var(--font-size-standard) * 0.85);
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
border-radius: 3px;
|
||||
}
|
||||
.application.dialog.lethalfantasy .apply-damage-dialog .dialog-content .damage-options .option-line {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 3px 6px;
|
||||
margin: 2px 0;
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
border-radius: 3px;
|
||||
}
|
||||
.application.dialog.lethalfantasy .apply-damage-dialog .dialog-content .damage-options .option-line strong {
|
||||
color: var(--color-dark-1);
|
||||
font-size: calc(var(--font-size-standard) * 1.05);
|
||||
}
|
||||
.lethalfantasy-roll-dialog fieldset {
|
||||
padding: 4px;
|
||||
}
|
||||
@@ -2261,9 +2309,16 @@ i.lethalfantasy {
|
||||
min-width: 5rem;
|
||||
max-width: 5em;
|
||||
}
|
||||
.dialog-form .form-footer {
|
||||
padding: 4px;
|
||||
gap: 4px;
|
||||
}
|
||||
.dialog-form .form-footer button {
|
||||
min-width: 14rem;
|
||||
min-height: 3.2rem;
|
||||
min-width: 8rem;
|
||||
min-height: 2rem;
|
||||
padding: 2px 6px;
|
||||
margin: 0;
|
||||
font-size: calc(var(--font-size-standard) * 0.9);
|
||||
}
|
||||
.dialog-modifier {
|
||||
display: flex;
|
||||
@@ -2356,6 +2411,62 @@ i.lethalfantasy {
|
||||
font-size: calc(var(--font-size-standard) * 1);
|
||||
text-shadow: 0 0 10px var(--color-shadow-primary);
|
||||
}
|
||||
.dice-roll .damage-result {
|
||||
width: 100%;
|
||||
padding: 8px;
|
||||
}
|
||||
.dice-roll .damage-result ul {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
.dice-roll .damage-result .li-apply-wounds {
|
||||
list-style: none;
|
||||
margin-top: 10px;
|
||||
padding: 0;
|
||||
display: none;
|
||||
}
|
||||
.dice-roll .damage-result .li-apply-wounds > div:first-child {
|
||||
font-weight: bold;
|
||||
margin-bottom: 8px;
|
||||
font-size: calc(var(--font-size-standard) * 0.95);
|
||||
text-align: center;
|
||||
}
|
||||
.dice-roll .damage-result .li-apply-wounds .combatants-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 6px;
|
||||
margin-top: 5px;
|
||||
padding: 8px;
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
border-radius: 5px;
|
||||
}
|
||||
.dice-roll .damage-result .li-apply-wounds .combatants-grid .apply-wounds-btn {
|
||||
padding: 6px 10px;
|
||||
background: linear-gradient(to bottom, #5a5850 0%, #4b4a44 100%);
|
||||
border: 1px solid #2b2a24;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
||||
color: #f0f0e0;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
font-size: calc(var(--font-size-standard) * 0.85);
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
transition: all 0.2s ease;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 100%;
|
||||
}
|
||||
.dice-roll .damage-result .li-apply-wounds .combatants-grid .apply-wounds-btn:hover {
|
||||
background: linear-gradient(to bottom, #6a6860 0%, #5a5850 100%);
|
||||
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
|
||||
transform: translateY(-1px);
|
||||
border-color: #3b3a34;
|
||||
}
|
||||
.dice-roll .damage-result .li-apply-wounds .combatants-grid .apply-wounds-btn:active {
|
||||
transform: translateY(0);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
#token-hud .hp-loss-wrap {
|
||||
position: absolute;
|
||||
left: 75px;
|
||||
|
||||
19
lang/en.json
19
lang/en.json
@@ -282,6 +282,7 @@
|
||||
},
|
||||
"Label": {
|
||||
"agility": "Dexterity",
|
||||
"applyDamage": "Apply damage to:",
|
||||
"gotoToken": "Go to token",
|
||||
"combatAction": "Combat action",
|
||||
"currentAction": "Current ongoing action",
|
||||
@@ -421,7 +422,9 @@
|
||||
"monster-damage": "Monster damage",
|
||||
"monster-defense": "Monster defense",
|
||||
"weapons": "Weapons",
|
||||
"wis": "WIS"
|
||||
"wis": "WIS",
|
||||
"weapon-damage-medium": "Weapon damage medium",
|
||||
"weapon-damage-small": "Weapon damage small"
|
||||
},
|
||||
"Miracle": {
|
||||
"FIELDS": {
|
||||
@@ -856,6 +859,20 @@
|
||||
"melee": "Melee",
|
||||
"ranged": "Ranged"
|
||||
}
|
||||
},
|
||||
"Dialog": {
|
||||
"applyDamageTo": "Apply damage to",
|
||||
"weapon": "Weapon",
|
||||
"totalDamage": "Total Damage",
|
||||
"damageReduction": "Damage Reduction",
|
||||
"armorDR": "Armor DR",
|
||||
"shieldDR": "Shield DR",
|
||||
"totalDR": "Total DR",
|
||||
"selectOption": "Select damage application option",
|
||||
"noDR": "No DR",
|
||||
"withArmor": "With Armor DR only",
|
||||
"withAll": "With Armor + Shield DR",
|
||||
"damage": "damage"
|
||||
}
|
||||
},
|
||||
"TYPES": {
|
||||
|
||||
@@ -152,6 +152,39 @@ Hooks.on(hookName, (message, html, data) => {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Gestion du survol et du clic sur les boutons de dégâts pour les GMs
|
||||
if (game.user.isGM) {
|
||||
// Show damage buttons only for GM
|
||||
$(html).find(".li-apply-wounds").each((i, btn) => {
|
||||
btn.style.display = "block"
|
||||
})
|
||||
|
||||
$(html).find(".apply-wounds-btn").hover(
|
||||
function (event) {
|
||||
// Mouse enter - select the token and pan to it
|
||||
let combatantId = $(this).data("combatant-id")
|
||||
if (combatantId && game.combat) {
|
||||
let combatant = game.combat.combatants.get(combatantId)
|
||||
if (combatant?.token) {
|
||||
let token = canvas.tokens.get(combatant.token.id)
|
||||
if (token) {
|
||||
token.control({ releaseOthers: true })
|
||||
canvas.animatePan(token.center)
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
function (event) {
|
||||
// Mouse leave - release selection
|
||||
canvas.tokens.releaseAll()
|
||||
}
|
||||
)
|
||||
|
||||
$(html).find(".apply-wounds-btn").click((event) => {
|
||||
LethalFantasyUtils.applyDamage(message, event)
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
Hooks.on("getCombatTrackerEntryContext", (html, options) => {
|
||||
|
||||
@@ -65,7 +65,7 @@ export default class LethalFantasyActor extends Actor {
|
||||
}
|
||||
}
|
||||
}
|
||||
goodSkill.weaponSkillModifier = maxValue * multiplier
|
||||
goodSkill.weaponSkillModifier = Math.ceil(maxValue * multiplier)
|
||||
return goodSkill
|
||||
}
|
||||
|
||||
@@ -119,6 +119,27 @@ export default class LethalFantasyActor extends Actor {
|
||||
return defenseValue
|
||||
}
|
||||
|
||||
/* *************************************************/
|
||||
fuzzyNameSearchWeaponSkills(weaponName, weaponClass=null) {
|
||||
// Get all weapon skills without the " skill" suffix
|
||||
let skills = this.items.filter((i) => i.type === "skill" && i.system.weaponClass === weaponClass && i.system.category === "weapon")
|
||||
// Remove parenthesis in the weapon name for better matching
|
||||
weaponName = weaponName.replace(/\(.*?\)/g, "").trim()
|
||||
// Now search if we find all the words of the weapon name in the skill name
|
||||
skills = skills.filter((s) => {
|
||||
let skillName = s.name.toLowerCase().replace(" skill", "").trim()
|
||||
let wName = weaponName.toLowerCase().trim()
|
||||
let wWords = wName.split(" ")
|
||||
for (let w of wWords) {
|
||||
if (!skillName.includes(w)) {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
})
|
||||
return skills
|
||||
}
|
||||
|
||||
/* *************************************************/
|
||||
async prepareRoll(rollType, rollKey, rollDice) {
|
||||
console.log("Preparing roll", rollType, rollKey, rollDice)
|
||||
@@ -179,19 +200,19 @@ export default class LethalFantasyActor extends Actor {
|
||||
case "weapon-defense": {
|
||||
let weapon = this.items.find((i) => i.type === "weapon" && i.id === rollKey)
|
||||
let skill
|
||||
let skills = this.items.filter((i) => i.type === "skill" && i.name.toLowerCase() === weapon.name.toLowerCase())
|
||||
let skills = this.items.filter((i) => i.type === "skill" && i.system.category === "weapon" && i.name.toLowerCase() === weapon.name.toLowerCase())
|
||||
if (skills.length > 0) {
|
||||
skill = this.getBestWeaponClassSkill(skills, rollType, 1.0)
|
||||
} else {
|
||||
skills = this.items.filter((i) => i.type === "skill" && i.name.toLowerCase().replace(" skill", "") === weapon.name.toLowerCase())
|
||||
skills = this.fuzzyNameSearchWeaponSkills(weapon.name, weapon.system.weaponClass)
|
||||
if (skills.length > 0) {
|
||||
skill = this.getBestWeaponClassSkill(skills, rollType, 1.0)
|
||||
} else {
|
||||
skills = this.items.filter((i) => i.type === "skill" && i.system.weaponClass === weapon.system.weaponClass)
|
||||
skills = this.items.filter((i) => i.type === "skill" && i.system.category === "weapon" && i.system.weaponClass === weapon.system.weaponClass)
|
||||
if (skills.length > 0) {
|
||||
skill = this.getBestWeaponClassSkill(skills, rollType, 0.5)
|
||||
} else {
|
||||
skills = this.items.filter((i) => i.type === "skill" && i.system.weaponClass.includes(SYSTEM.WEAPON_CATEGORIES[weapon.system.weaponClass]))
|
||||
skills = this.items.filter((i) => i.type === "skill" && i.system.category === "weapon" && i.system.weaponClass.includes(SYSTEM.WEAPON_CATEGORIES[weapon.system.weaponClass]))
|
||||
if (skills.length > 0) {
|
||||
skill = this.getBestWeaponClassSkill(skills, rollType, 0.25)
|
||||
} else {
|
||||
|
||||
@@ -260,14 +260,17 @@ export default class LethalFantasyRoll extends Roll {
|
||||
|
||||
} else if (options.rollType.includes("weapon-damage")) {
|
||||
options.rollName = options.rollTarget.name
|
||||
options.isDamage = true
|
||||
hasModifier = true
|
||||
hasChangeDice = false
|
||||
let damageBonus = (options.rollTarget.weapon.system.applyStrengthDamageBonus) ? options.rollTarget.combat.damageModifier : 0
|
||||
options.rollTarget.value = damageBonus + options.rollTarget.weaponSkillModifier + options.rollTarget.weapon.system.bonuses.damageBonus
|
||||
options.rollTarget.charModifier = damageBonus
|
||||
if (options.rollType.includes("small")) {
|
||||
options.damageSmall = true
|
||||
dice = options.rollTarget.weapon.system.damage.damageS
|
||||
} else {
|
||||
options.damageMedium = true
|
||||
dice = options.rollTarget.weapon.system.damage.damageM
|
||||
}
|
||||
dice = dice.replace("E", "")
|
||||
@@ -474,6 +477,9 @@ export default class LethalFantasyRoll extends Roll {
|
||||
actorImage: options.actorImage,
|
||||
rollMode: rollContext.visibility,
|
||||
hasTarget: options.hasTarget,
|
||||
isDamage: options.isDamage,
|
||||
damageSmall: options.damageSmall,
|
||||
damageMedium: options.damageMedium,
|
||||
pointBlank,
|
||||
beyondSkill,
|
||||
letItFly,
|
||||
@@ -1123,6 +1129,16 @@ export default class LethalFantasyRoll extends Roll {
|
||||
* Generates the data required for rendering a roll chat card.
|
||||
*/
|
||||
async _getChatCardData(isPrivate) {
|
||||
// Générer la liste des combatants de la scène
|
||||
let combatants = []
|
||||
if (game?.combat?.combatants && this.rollData?.isDamage) {
|
||||
for (let c of game.combat.combatants) {
|
||||
if (c.actorId !== this.actorId) {
|
||||
combatants.push({ id: c.id, name: c.name })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const cardData = {
|
||||
css: [SYSTEM.id, "dice-roll"],
|
||||
data: this.data,
|
||||
@@ -1146,7 +1162,8 @@ export default class LethalFantasyRoll extends Roll {
|
||||
D30result: this.D30result,
|
||||
badResult: this.badResult,
|
||||
rollData: this.rollData,
|
||||
isPrivate: isPrivate
|
||||
isPrivate: isPrivate,
|
||||
combatants: combatants
|
||||
}
|
||||
cardData.cssClass = cardData.css.join(" ")
|
||||
cardData.tooltip = isPrivate ? "" : await this.getTooltip()
|
||||
|
||||
168
module/utils.mjs
168
module/utils.mjs
@@ -22,43 +22,43 @@ export default class LethalFantasyUtils {
|
||||
static setHookListeners() {
|
||||
|
||||
Hooks.on('renderTokenHUD', async (hud, html, token) => {
|
||||
const lossHPButton = await foundry.applications.handlebars.renderTemplate('systems/fvtt-lethal-fantasy/templates/loss-hp-hud.hbs', {} )
|
||||
const lossHPButton = await foundry.applications.handlebars.renderTemplate('systems/fvtt-lethal-fantasy/templates/loss-hp-hud.hbs', {})
|
||||
$(html).find('div.left').append(lossHPButton);
|
||||
$(html).find('img.lethal-hp-loss-hud').click((event) => {
|
||||
event.preventDefault();
|
||||
let hpMenu = $(html).find('.hp-loss-wrap')[0]
|
||||
if (hpMenu.classList.contains("hp-loss-hud-disabled")) {
|
||||
$(html).find('.hp-loss-wrap')[0].classList.add('hp-loss-hud-active');
|
||||
$(html).find('.hp-loss-wrap')[0].classList.remove('hp-loss-hud-disabled');
|
||||
$(html).find('.hp-loss-wrap')[1].classList.add('hp-loss-hud-active');
|
||||
$(html).find('.hp-loss-wrap')[1].classList.remove('hp-loss-hud-disabled');
|
||||
$(html).find('.hp-loss-wrap')[2].classList.add('hp-loss-hud-active');
|
||||
$(html).find('.hp-loss-wrap')[2].classList.remove('hp-loss-hud-disabled');
|
||||
} else {
|
||||
$(html).find('.hp-loss-wrap')[0].classList.remove('hp-loss-hud-active');
|
||||
$(html).find('.hp-loss-wrap')[0].classList.add('hp-loss-hud-disabled');
|
||||
$(html).find('.hp-loss-wrap')[1].classList.remove('hp-loss-hud-active');
|
||||
$(html).find('.hp-loss-wrap')[1].classList.add('hp-loss-hud-disabled');
|
||||
$(html).find('.hp-loss-wrap')[2].classList.remove('hp-loss-hud-active');
|
||||
$(html).find('.hp-loss-wrap')[2].classList.add('hp-loss-hud-disabled');
|
||||
}
|
||||
})
|
||||
$(html).find('.loss-hp-hud-click').click((event) => {
|
||||
event.preventDefault();
|
||||
let hpLoss = event.currentTarget.dataset.hpValue;
|
||||
if (token) {
|
||||
let tokenFull = canvas.tokens.placeables.find( t => t.id === token._id);
|
||||
console.log(tokenFull, token)
|
||||
let actor = tokenFull.actor;
|
||||
actor.applyDamage(Number(hpLoss));
|
||||
$(html).find('.hp-loss-wrap')[0].classList.remove('hp-loss-hud-active');
|
||||
$(html).find('.hp-loss-wrap')[0].classList.add('hp-loss-hud-disabled');
|
||||
$(html).find('.hp-loss-wrap')[1].classList.remove('hp-loss-hud-active');
|
||||
$(html).find('.hp-loss-wrap')[1].classList.add('hp-loss-hud-disabled');
|
||||
$(html).find('.hp-loss-wrap')[2].classList.remove('hp-loss-hud-active');
|
||||
$(html).find('.hp-loss-wrap')[2].classList.add('hp-loss-hud-disabled');
|
||||
}
|
||||
})
|
||||
$(html).find('img.lethal-hp-loss-hud').click((event) => {
|
||||
event.preventDefault();
|
||||
let hpMenu = $(html).find('.hp-loss-wrap')[0]
|
||||
if (hpMenu.classList.contains("hp-loss-hud-disabled")) {
|
||||
$(html).find('.hp-loss-wrap')[0].classList.add('hp-loss-hud-active');
|
||||
$(html).find('.hp-loss-wrap')[0].classList.remove('hp-loss-hud-disabled');
|
||||
$(html).find('.hp-loss-wrap')[1].classList.add('hp-loss-hud-active');
|
||||
$(html).find('.hp-loss-wrap')[1].classList.remove('hp-loss-hud-disabled');
|
||||
$(html).find('.hp-loss-wrap')[2].classList.add('hp-loss-hud-active');
|
||||
$(html).find('.hp-loss-wrap')[2].classList.remove('hp-loss-hud-disabled');
|
||||
} else {
|
||||
$(html).find('.hp-loss-wrap')[0].classList.remove('hp-loss-hud-active');
|
||||
$(html).find('.hp-loss-wrap')[0].classList.add('hp-loss-hud-disabled');
|
||||
$(html).find('.hp-loss-wrap')[1].classList.remove('hp-loss-hud-active');
|
||||
$(html).find('.hp-loss-wrap')[1].classList.add('hp-loss-hud-disabled');
|
||||
$(html).find('.hp-loss-wrap')[2].classList.remove('hp-loss-hud-active');
|
||||
$(html).find('.hp-loss-wrap')[2].classList.add('hp-loss-hud-disabled');
|
||||
}
|
||||
})
|
||||
$(html).find('.loss-hp-hud-click').click((event) => {
|
||||
event.preventDefault();
|
||||
let hpLoss = event.currentTarget.dataset.hpValue;
|
||||
if (token) {
|
||||
let tokenFull = canvas.tokens.placeables.find(t => t.id === token._id);
|
||||
console.log(tokenFull, token)
|
||||
let actor = tokenFull.actor;
|
||||
actor.applyDamage(Number(hpLoss));
|
||||
$(html).find('.hp-loss-wrap')[0].classList.remove('hp-loss-hud-active');
|
||||
$(html).find('.hp-loss-wrap')[0].classList.add('hp-loss-hud-disabled');
|
||||
$(html).find('.hp-loss-wrap')[1].classList.remove('hp-loss-hud-active');
|
||||
$(html).find('.hp-loss-wrap')[1].classList.add('hp-loss-hud-disabled');
|
||||
$(html).find('.hp-loss-wrap')[2].classList.remove('hp-loss-hud-active');
|
||||
$(html).find('.hp-loss-wrap')[2].classList.add('hp-loss-hud-disabled');
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -246,4 +246,100 @@ export default class LethalFantasyUtils {
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static async applyDamage(message, event) {
|
||||
// Récupérer les données du message
|
||||
let combatantId = event.currentTarget.dataset.combatantId
|
||||
if (!combatantId || !game.combat) {
|
||||
ui.notifications.error("No combatant selected")
|
||||
return
|
||||
}
|
||||
|
||||
let combatant = game.combat.combatants.get(combatantId)
|
||||
if (!combatant) {
|
||||
ui.notifications.error("Combatant not found")
|
||||
return
|
||||
}
|
||||
|
||||
let targetActor = combatant.token?.actor || game.actors.get(combatant.actorId)
|
||||
if (!targetActor) {
|
||||
ui.notifications.error("Target actor not found")
|
||||
return
|
||||
}
|
||||
|
||||
// Récupérer les données de dégâts du message
|
||||
let damageTotal = message.rolls[0]?.total || 0
|
||||
let weaponName = message.rolls[0]?.options?.rollTarget?.weapon?.name || "Unknown Weapon"
|
||||
|
||||
// Calculer les DR
|
||||
let armorDR = targetActor.computeDamageReduction() || 0
|
||||
let shieldDR = targetActor.getShieldDR() || 0
|
||||
let totalDR = armorDR + shieldDR
|
||||
|
||||
// Créer le dialogue
|
||||
const content = await foundry.applications.handlebars.renderTemplate(
|
||||
"systems/fvtt-lethal-fantasy/templates/apply-damage-dialog.hbs",
|
||||
{
|
||||
targetName: targetActor.name,
|
||||
weaponName: weaponName,
|
||||
damageTotal: damageTotal,
|
||||
armorDR: armorDR,
|
||||
shieldDR: shieldDR,
|
||||
totalDR: totalDR,
|
||||
damageNoDR: damageTotal,
|
||||
damageWithArmor: Math.max(0, damageTotal - armorDR),
|
||||
damageWithAll: Math.max(0, damageTotal - totalDR)
|
||||
}
|
||||
)
|
||||
|
||||
const result = await foundry.applications.api.DialogV2.wait({
|
||||
window: { title: "Apply Damage" },
|
||||
classes: ["lethalfantasy"],
|
||||
position: { width: 280 },
|
||||
content,
|
||||
buttons: [
|
||||
{
|
||||
action: "noDR",
|
||||
label: "No DR",
|
||||
callback: () => ({ drType: "none", damage: damageTotal })
|
||||
},
|
||||
{
|
||||
action: "armorDR",
|
||||
label: "With Armor DR",
|
||||
callback: () => ({ drType: "armor", damage: Math.max(0, damageTotal - armorDR) })
|
||||
},
|
||||
{
|
||||
action: "allDR",
|
||||
label: "With Armor + Shield DR",
|
||||
callback: () => ({ drType: "all", damage: Math.max(0, damageTotal - totalDR) })
|
||||
},
|
||||
{
|
||||
action: "cancel",
|
||||
label: "Cancel",
|
||||
callback: () => null
|
||||
}
|
||||
],
|
||||
rejectClose: false
|
||||
})
|
||||
|
||||
if (result && result.damage !== undefined) {
|
||||
await targetActor.applyDamage(-result.damage)
|
||||
|
||||
// Message de confirmation
|
||||
let drText = ""
|
||||
if (result.drType === "armor") {
|
||||
drText = ` (Armor DR: ${armorDR})`
|
||||
} else if (result.drType === "all") {
|
||||
drText = ` (Total DR: ${totalDR})`
|
||||
}
|
||||
|
||||
ChatMessage.create({
|
||||
user: game.user.id,
|
||||
speaker: { alias: targetActor.name },
|
||||
rollMode: "gmroll",
|
||||
content: `${targetActor.name} takes ${result.damage} damage${drText} from ${weaponName}`
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
MANIFEST-000456
|
||||
MANIFEST-000460
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
2025/12/06-15:17:13.631288 7f19dd7fa6c0 Recovering log #454
|
||||
2025/12/06-15:17:13.737044 7f19dd7fa6c0 Delete type=3 #452
|
||||
2025/12/06-15:17:13.737119 7f19dd7fa6c0 Delete type=0 #454
|
||||
2025/12/06-16:41:02.244527 7f19dbff76c0 Level-0 table #459: started
|
||||
2025/12/06-16:41:02.244570 7f19dbff76c0 Level-0 table #459: 0 bytes OK
|
||||
2025/12/06-16:41:02.281825 7f19dbff76c0 Delete type=0 #457
|
||||
2025/12/06-16:41:02.281990 7f19dbff76c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
|
||||
2025/12/06-16:41:02.282024 7f19dbff76c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
|
||||
2025/12/14-09:09:25.826835 7f17053ff6c0 Recovering log #458
|
||||
2025/12/14-09:09:25.838032 7f17053ff6c0 Delete type=3 #456
|
||||
2025/12/14-09:09:25.838116 7f17053ff6c0 Delete type=0 #458
|
||||
2025/12/14-20:45:56.707785 7f16eeffd6c0 Level-0 table #463: started
|
||||
2025/12/14-20:45:56.710879 7f16eeffd6c0 Level-0 table #463: 1677 bytes OK
|
||||
2025/12/14-20:45:56.716936 7f16eeffd6c0 Delete type=0 #461
|
||||
2025/12/14-20:45:56.730287 7f16eeffd6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
|
||||
2025/12/14-20:45:56.730345 7f16eeffd6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at '!items!VFHTlDVKj2yNJEWi' @ 1129 : 1
|
||||
2025/12/14-20:45:56.730356 7f16eeffd6c0 Compacting 1@1 + 1@2 files
|
||||
2025/12/14-20:45:56.736659 7f16eeffd6c0 Generated table #464@1: 485 keys, 217363 bytes
|
||||
2025/12/14-20:45:56.736680 7f16eeffd6c0 Compacted 1@1 + 1@2 files => 217363 bytes
|
||||
2025/12/14-20:45:56.742890 7f16eeffd6c0 compacted to: files[ 0 0 1 0 0 0 0 ]
|
||||
2025/12/14-20:45:56.742996 7f16eeffd6c0 Delete type=2 #323
|
||||
2025/12/14-20:45:56.743249 7f16eeffd6c0 Delete type=2 #463
|
||||
2025/12/14-20:45:56.750017 7f16eeffd6c0 Manual compaction at level-1 from '!items!VFHTlDVKj2yNJEWi' @ 1129 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2025/11/07-07:57:26.850226 7f14baffd6c0 Recovering log #450
|
||||
2025/11/07-07:57:26.860132 7f14baffd6c0 Delete type=3 #448
|
||||
2025/11/07-07:57:26.860209 7f14baffd6c0 Delete type=0 #450
|
||||
2025/11/07-07:58:43.705140 7f14b8ff96c0 Level-0 table #455: started
|
||||
2025/11/07-07:58:43.705171 7f14b8ff96c0 Level-0 table #455: 0 bytes OK
|
||||
2025/11/07-07:58:43.711108 7f14b8ff96c0 Delete type=0 #453
|
||||
2025/11/07-07:58:43.724495 7f14b8ff96c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
|
||||
2025/11/07-07:58:43.724532 7f14b8ff96c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
|
||||
2025/12/06-15:17:13.631288 7f19dd7fa6c0 Recovering log #454
|
||||
2025/12/06-15:17:13.737044 7f19dd7fa6c0 Delete type=3 #452
|
||||
2025/12/06-15:17:13.737119 7f19dd7fa6c0 Delete type=0 #454
|
||||
2025/12/06-16:41:02.244527 7f19dbff76c0 Level-0 table #459: started
|
||||
2025/12/06-16:41:02.244570 7f19dbff76c0 Level-0 table #459: 0 bytes OK
|
||||
2025/12/06-16:41:02.281825 7f19dbff76c0 Delete type=0 #457
|
||||
2025/12/06-16:41:02.281990 7f19dbff76c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
|
||||
2025/12/06-16:41:02.282024 7f19dbff76c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
|
||||
|
||||
Binary file not shown.
BIN
packs-system/lf-equipment/MANIFEST-000460
Normal file
BIN
packs-system/lf-equipment/MANIFEST-000460
Normal file
Binary file not shown.
@@ -1 +1 @@
|
||||
MANIFEST-000456
|
||||
MANIFEST-000460
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2025/12/06-15:17:13.747297 7f19dc7f86c0 Recovering log #454
|
||||
2025/12/06-15:17:13.857630 7f19dc7f86c0 Delete type=3 #452
|
||||
2025/12/06-15:17:13.857707 7f19dc7f86c0 Delete type=0 #454
|
||||
2025/12/06-16:41:02.159042 7f19dbff76c0 Level-0 table #459: started
|
||||
2025/12/06-16:41:02.159069 7f19dbff76c0 Level-0 table #459: 0 bytes OK
|
||||
2025/12/06-16:41:02.201619 7f19dbff76c0 Delete type=0 #457
|
||||
2025/12/06-16:41:02.281970 7f19dbff76c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
|
||||
2025/12/06-16:41:02.282008 7f19dbff76c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
|
||||
2025/12/14-09:09:25.859023 7f16ef7fe6c0 Recovering log #458
|
||||
2025/12/14-09:09:25.869163 7f16ef7fe6c0 Delete type=3 #456
|
||||
2025/12/14-09:09:25.869258 7f16ef7fe6c0 Delete type=0 #458
|
||||
2025/12/14-20:45:56.717084 7f16eeffd6c0 Level-0 table #463: started
|
||||
2025/12/14-20:45:56.717117 7f16eeffd6c0 Level-0 table #463: 0 bytes OK
|
||||
2025/12/14-20:45:56.723011 7f16eeffd6c0 Delete type=0 #461
|
||||
2025/12/14-20:45:56.730301 7f16eeffd6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
|
||||
2025/12/14-20:45:56.743359 7f16eeffd6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2025/11/07-07:57:26.863923 7f14b9ffb6c0 Recovering log #450
|
||||
2025/11/07-07:57:26.873909 7f14b9ffb6c0 Delete type=3 #448
|
||||
2025/11/07-07:57:26.873962 7f14b9ffb6c0 Delete type=0 #450
|
||||
2025/11/07-07:58:43.711204 7f14b8ff96c0 Level-0 table #455: started
|
||||
2025/11/07-07:58:43.711230 7f14b8ff96c0 Level-0 table #455: 0 bytes OK
|
||||
2025/11/07-07:58:43.718265 7f14b8ff96c0 Delete type=0 #453
|
||||
2025/11/07-07:58:43.724502 7f14b8ff96c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
|
||||
2025/11/07-07:58:43.724539 7f14b8ff96c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
|
||||
2025/12/06-15:17:13.747297 7f19dc7f86c0 Recovering log #454
|
||||
2025/12/06-15:17:13.857630 7f19dc7f86c0 Delete type=3 #452
|
||||
2025/12/06-15:17:13.857707 7f19dc7f86c0 Delete type=0 #454
|
||||
2025/12/06-16:41:02.159042 7f19dbff76c0 Level-0 table #459: started
|
||||
2025/12/06-16:41:02.159069 7f19dbff76c0 Level-0 table #459: 0 bytes OK
|
||||
2025/12/06-16:41:02.201619 7f19dbff76c0 Delete type=0 #457
|
||||
2025/12/06-16:41:02.281970 7f19dbff76c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
|
||||
2025/12/06-16:41:02.282008 7f19dbff76c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
|
||||
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
MANIFEST-000458
|
||||
MANIFEST-000462
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2025/12/06-15:17:13.504137 7f19ddffb6c0 Recovering log #456
|
||||
2025/12/06-15:17:13.609897 7f19ddffb6c0 Delete type=3 #454
|
||||
2025/12/06-15:17:13.609952 7f19ddffb6c0 Delete type=0 #456
|
||||
2025/12/06-16:41:02.201733 7f19dbff76c0 Level-0 table #461: started
|
||||
2025/12/06-16:41:02.201761 7f19dbff76c0 Level-0 table #461: 0 bytes OK
|
||||
2025/12/06-16:41:02.244399 7f19dbff76c0 Delete type=0 #459
|
||||
2025/12/06-16:41:02.281980 7f19dbff76c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
|
||||
2025/12/06-16:41:02.282016 7f19dbff76c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
|
||||
2025/12/14-09:09:25.806646 7f16effff6c0 Recovering log #460
|
||||
2025/12/14-09:09:25.817606 7f16effff6c0 Delete type=3 #458
|
||||
2025/12/14-09:09:25.817666 7f16effff6c0 Delete type=0 #460
|
||||
2025/12/14-20:45:56.701142 7f16eeffd6c0 Level-0 table #465: started
|
||||
2025/12/14-20:45:56.701194 7f16eeffd6c0 Level-0 table #465: 0 bytes OK
|
||||
2025/12/14-20:45:56.707652 7f16eeffd6c0 Delete type=0 #463
|
||||
2025/12/14-20:45:56.730266 7f16eeffd6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
|
||||
2025/12/14-20:45:56.730327 7f16eeffd6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2025/11/07-07:57:26.836688 7f14b97fa6c0 Recovering log #451
|
||||
2025/11/07-07:57:26.847365 7f14b97fa6c0 Delete type=3 #449
|
||||
2025/11/07-07:57:26.847456 7f14b97fa6c0 Delete type=0 #451
|
||||
2025/11/07-07:58:43.699007 7f14b8ff96c0 Level-0 table #457: started
|
||||
2025/11/07-07:58:43.699056 7f14b8ff96c0 Level-0 table #457: 0 bytes OK
|
||||
2025/11/07-07:58:43.705029 7f14b8ff96c0 Delete type=0 #455
|
||||
2025/11/07-07:58:43.724484 7f14b8ff96c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
|
||||
2025/11/07-07:58:43.724525 7f14b8ff96c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
|
||||
2025/12/06-15:17:13.504137 7f19ddffb6c0 Recovering log #456
|
||||
2025/12/06-15:17:13.609897 7f19ddffb6c0 Delete type=3 #454
|
||||
2025/12/06-15:17:13.609952 7f19ddffb6c0 Delete type=0 #456
|
||||
2025/12/06-16:41:02.201733 7f19dbff76c0 Level-0 table #461: started
|
||||
2025/12/06-16:41:02.201761 7f19dbff76c0 Level-0 table #461: 0 bytes OK
|
||||
2025/12/06-16:41:02.244399 7f19dbff76c0 Delete type=0 #459
|
||||
2025/12/06-16:41:02.281980 7f19dbff76c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
|
||||
2025/12/06-16:41:02.282016 7f19dbff76c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
|
||||
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
MANIFEST-000156
|
||||
MANIFEST-000160
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2025/12/06-15:17:13.990000 7f19dcff96c0 Recovering log #154
|
||||
2025/12/06-15:17:14.078163 7f19dcff96c0 Delete type=3 #152
|
||||
2025/12/06-15:17:14.078227 7f19dcff96c0 Delete type=0 #154
|
||||
2025/12/06-16:41:02.444766 7f19dbff76c0 Level-0 table #159: started
|
||||
2025/12/06-16:41:02.444810 7f19dbff76c0 Level-0 table #159: 0 bytes OK
|
||||
2025/12/06-16:41:02.474131 7f19dbff76c0 Delete type=0 #157
|
||||
2025/12/06-16:41:02.619626 7f19dbff76c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
|
||||
2025/12/06-16:41:02.668537 7f19dbff76c0 Manual compaction at level-1 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
|
||||
2025/12/14-09:09:25.891410 7f17053ff6c0 Recovering log #158
|
||||
2025/12/14-09:09:25.901634 7f17053ff6c0 Delete type=3 #156
|
||||
2025/12/14-09:09:25.901690 7f17053ff6c0 Delete type=0 #158
|
||||
2025/12/14-20:45:56.743394 7f16eeffd6c0 Level-0 table #163: started
|
||||
2025/12/14-20:45:56.743431 7f16eeffd6c0 Level-0 table #163: 0 bytes OK
|
||||
2025/12/14-20:45:56.749813 7f16eeffd6c0 Delete type=0 #161
|
||||
2025/12/14-20:45:56.767206 7f16eeffd6c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
|
||||
2025/12/14-20:45:56.791687 7f16eeffd6c0 Manual compaction at level-1 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2025/11/07-07:57:26.889185 7f14ba7fc6c0 Recovering log #150
|
||||
2025/11/07-07:57:26.898546 7f14ba7fc6c0 Delete type=3 #148
|
||||
2025/11/07-07:57:26.898639 7f14ba7fc6c0 Delete type=0 #150
|
||||
2025/11/07-07:58:43.718395 7f14b8ff96c0 Level-0 table #155: started
|
||||
2025/11/07-07:58:43.718429 7f14b8ff96c0 Level-0 table #155: 0 bytes OK
|
||||
2025/11/07-07:58:43.724414 7f14b8ff96c0 Delete type=0 #153
|
||||
2025/11/07-07:58:43.724518 7f14b8ff96c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
|
||||
2025/11/07-07:58:43.724544 7f14b8ff96c0 Manual compaction at level-1 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
|
||||
2025/12/06-15:17:13.990000 7f19dcff96c0 Recovering log #154
|
||||
2025/12/06-15:17:14.078163 7f19dcff96c0 Delete type=3 #152
|
||||
2025/12/06-15:17:14.078227 7f19dcff96c0 Delete type=0 #154
|
||||
2025/12/06-16:41:02.444766 7f19dbff76c0 Level-0 table #159: started
|
||||
2025/12/06-16:41:02.444810 7f19dbff76c0 Level-0 table #159: 0 bytes OK
|
||||
2025/12/06-16:41:02.474131 7f19dbff76c0 Delete type=0 #157
|
||||
2025/12/06-16:41:02.619626 7f19dbff76c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
|
||||
2025/12/06-16:41:02.668537 7f19dbff76c0 Manual compaction at level-1 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
|
||||
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
MANIFEST-000455
|
||||
MANIFEST-000459
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2025/12/06-15:17:13.870724 7f19ddffb6c0 Recovering log #453
|
||||
2025/12/06-15:17:13.958289 7f19ddffb6c0 Delete type=3 #451
|
||||
2025/12/06-15:17:13.958388 7f19ddffb6c0 Delete type=0 #453
|
||||
2025/12/06-16:41:02.118716 7f19dbff76c0 Level-0 table #458: started
|
||||
2025/12/06-16:41:02.121944 7f19dbff76c0 Level-0 table #458: 0 bytes OK
|
||||
2025/12/06-16:41:02.158936 7f19dbff76c0 Delete type=0 #456
|
||||
2025/12/06-16:41:02.281954 7f19dbff76c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
|
||||
2025/12/06-16:41:02.282000 7f19dbff76c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
|
||||
2025/12/14-09:09:25.874671 7f16effff6c0 Recovering log #457
|
||||
2025/12/14-09:09:25.886173 7f16effff6c0 Delete type=3 #455
|
||||
2025/12/14-09:09:25.886272 7f16effff6c0 Delete type=0 #457
|
||||
2025/12/14-20:45:56.723132 7f16eeffd6c0 Level-0 table #462: started
|
||||
2025/12/14-20:45:56.723164 7f16eeffd6c0 Level-0 table #462: 0 bytes OK
|
||||
2025/12/14-20:45:56.730108 7f16eeffd6c0 Delete type=0 #460
|
||||
2025/12/14-20:45:56.730316 7f16eeffd6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
|
||||
2025/12/14-20:45:56.743378 7f16eeffd6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2025/11/07-07:57:26.876181 7f14b97fa6c0 Recovering log #449
|
||||
2025/11/07-07:57:26.886933 7f14b97fa6c0 Delete type=3 #447
|
||||
2025/11/07-07:57:26.887010 7f14b97fa6c0 Delete type=0 #449
|
||||
2025/11/07-07:58:43.747501 7f14b8ff96c0 Level-0 table #454: started
|
||||
2025/11/07-07:58:43.747545 7f14b8ff96c0 Level-0 table #454: 0 bytes OK
|
||||
2025/11/07-07:58:43.754307 7f14b8ff96c0 Delete type=0 #452
|
||||
2025/11/07-07:58:43.772388 7f14b8ff96c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
|
||||
2025/11/07-07:58:43.785957 7f14b8ff96c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
|
||||
2025/12/06-15:17:13.870724 7f19ddffb6c0 Recovering log #453
|
||||
2025/12/06-15:17:13.958289 7f19ddffb6c0 Delete type=3 #451
|
||||
2025/12/06-15:17:13.958388 7f19ddffb6c0 Delete type=0 #453
|
||||
2025/12/06-16:41:02.118716 7f19dbff76c0 Level-0 table #458: started
|
||||
2025/12/06-16:41:02.121944 7f19dbff76c0 Level-0 table #458: 0 bytes OK
|
||||
2025/12/06-16:41:02.158936 7f19dbff76c0 Delete type=0 #456
|
||||
2025/12/06-16:41:02.281954 7f19dbff76c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
|
||||
2025/12/06-16:41:02.282000 7f19dbff76c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
|
||||
|
||||
Binary file not shown.
@@ -1,33 +1,34 @@
|
||||
&.fortune {
|
||||
img {
|
||||
border: 0px;
|
||||
}
|
||||
.intro-chat {
|
||||
border-radius: 20px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
.intro-img {
|
||||
padding: 5px;
|
||||
width: 80px;
|
||||
align-self: center;
|
||||
}
|
||||
.intro-right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.introText {
|
||||
font-family: var(--font-secondary);
|
||||
font-size: calc(var(--font-size-standard) * 1.2);
|
||||
width: 210px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
.button.control, .fortune-accepted {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: calc(var(--font-size-standard) * 1.3);
|
||||
img {
|
||||
border: 0px;
|
||||
}
|
||||
.intro-chat {
|
||||
border-radius: 20px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
.intro-img {
|
||||
padding: 5px;
|
||||
width: 80px;
|
||||
align-self: center;
|
||||
}
|
||||
.intro-right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.introText {
|
||||
font-family: var(--font-secondary);
|
||||
font-size: calc(var(--font-size-standard) * 1.2);
|
||||
width: 210px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
.button.control,
|
||||
.fortune-accepted {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
font-size: calc(var(--font-size-standard) * 1.3);
|
||||
}
|
||||
}
|
||||
|
||||
&.ask-roll {
|
||||
@@ -37,4 +38,4 @@
|
||||
justify-content: center;
|
||||
font-family: var(--font-secondary);
|
||||
font-size: calc(var(--font-size-standard) * 1.2);
|
||||
}
|
||||
}
|
||||
|
||||
132
styles/roll.less
132
styles/roll.less
@@ -7,6 +7,65 @@
|
||||
border-color: var(--color-dark-6);
|
||||
color: var(--color-dark-2);
|
||||
}
|
||||
|
||||
.apply-damage-dialog {
|
||||
.dialog-content {
|
||||
padding: 6px;
|
||||
font-size: calc(var(--font-size-standard) * 1);
|
||||
|
||||
.header {
|
||||
text-align: center;
|
||||
padding: 4px;
|
||||
margin-bottom: 6px;
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.damage-summary {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 4px 6px;
|
||||
margin-bottom: 6px;
|
||||
background-color: rgba(139, 0, 0, 0.1);
|
||||
border-radius: 3px;
|
||||
|
||||
.damage-value {
|
||||
color: var(--color-level-error);
|
||||
font-size: calc(var(--font-size-standard) * 1.2);
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
.dr-summary {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
gap: 4px;
|
||||
padding: 3px;
|
||||
margin-bottom: 6px;
|
||||
font-size: calc(var(--font-size-standard) * 0.85);
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.damage-options {
|
||||
.option-line {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 3px 6px;
|
||||
margin: 2px 0;
|
||||
background-color: rgba(0, 0, 0, 0.05);
|
||||
border-radius: 3px;
|
||||
|
||||
strong {
|
||||
color: var(--color-dark-1);
|
||||
font-size: calc(var(--font-size-standard) * 1.05);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.lethalfantasy-roll-dialog {
|
||||
@@ -59,9 +118,14 @@
|
||||
|
||||
.dialog-form {
|
||||
.form-footer {
|
||||
padding: 4px;
|
||||
gap: 4px;
|
||||
button {
|
||||
min-width: 14rem;
|
||||
min-height: 3.2rem;
|
||||
min-width: 8rem;
|
||||
min-height: 2rem;
|
||||
padding: 2px 6px;
|
||||
margin: 0;
|
||||
font-size: calc(var(--font-size-standard) * 0.9);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -156,4 +220,68 @@
|
||||
font-size: calc(var(--font-size-standard) * 1);
|
||||
text-shadow: 0 0 10px var(--color-shadow-primary);
|
||||
}
|
||||
|
||||
.damage-result {
|
||||
width: 100%;
|
||||
padding: 8px;
|
||||
|
||||
ul {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.li-apply-wounds {
|
||||
list-style: none;
|
||||
margin-top: 10px;
|
||||
padding: 0;
|
||||
display: none;
|
||||
|
||||
> div:first-child {
|
||||
font-weight: bold;
|
||||
margin-bottom: 8px;
|
||||
font-size: calc(var(--font-size-standard) * 0.95);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.combatants-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 6px;
|
||||
margin-top: 5px;
|
||||
padding: 8px;
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
border-radius: 5px;
|
||||
|
||||
.apply-wounds-btn {
|
||||
padding: 6px 10px;
|
||||
background: linear-gradient(to bottom, #5a5850 0%, #4b4a44 100%);
|
||||
border: 1px solid #2b2a24;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
||||
color: #f0f0e0;
|
||||
cursor: pointer;
|
||||
border-radius: 4px;
|
||||
font-size: calc(var(--font-size-standard) * 0.85);
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
transition: all 0.2s ease;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
max-width: 100%;
|
||||
|
||||
&:hover {
|
||||
background: linear-gradient(to bottom, #6a6860 0%, #5a5850 100%);
|
||||
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
|
||||
transform: translateY(-1px);
|
||||
border-color: #3b3a34;
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: translateY(0);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
37
templates/apply-damage-dialog.hbs
Normal file
37
templates/apply-damage-dialog.hbs
Normal file
@@ -0,0 +1,37 @@
|
||||
<div class="apply-damage-dialog">
|
||||
<div class="dialog-content">
|
||||
<div class="header">
|
||||
<strong>{{targetName}}</strong>
|
||||
-
|
||||
{{weaponName}}
|
||||
</div>
|
||||
|
||||
<div class="damage-summary">
|
||||
<span class="label">{{localize
|
||||
"LETHALFANTASY.Dialog.totalDamage"
|
||||
}}:</span>
|
||||
<span class="damage-value">{{damageTotal}}</span>
|
||||
</div>
|
||||
|
||||
<div class="dr-summary">
|
||||
<span>{{localize "LETHALFANTASY.Dialog.armorDR"}}: {{armorDR}}</span>
|
||||
<span>{{localize "LETHALFANTASY.Dialog.shieldDR"}}: {{shieldDR}}</span>
|
||||
<span class="total">DR: <strong>{{totalDR}}</strong></span>
|
||||
</div>
|
||||
|
||||
<div class="damage-options">
|
||||
<div class="option-line">
|
||||
<span>{{localize "LETHALFANTASY.Dialog.noDR"}}</span>
|
||||
<strong>{{damageNoDR}}</strong>
|
||||
</div>
|
||||
<div class="option-line">
|
||||
<span>{{localize "LETHALFANTASY.Dialog.withArmor"}}</span>
|
||||
<strong>{{damageWithArmor}}</strong>
|
||||
</div>
|
||||
<div class="option-line">
|
||||
<span>{{localize "LETHALFANTASY.Dialog.withAll"}}</span>
|
||||
<strong>{{damageWithAll}}</strong>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -9,80 +9,130 @@
|
||||
<span><STRONG>{{actingCharName}} - {{upperFirst rollName}}</STRONG></span>
|
||||
|
||||
{{#if (match rollType "attack")}}
|
||||
<span>Attack roll !</span>
|
||||
<span>Attack roll !</span>
|
||||
{{/if}}
|
||||
{{#if (match rollType "defense")}}
|
||||
<span>Defense roll !</span>
|
||||
<span>Defense roll !</span>
|
||||
{{/if}}
|
||||
|
||||
{{#if (eq rollData.favor "favor")}}
|
||||
<span><strong>Favor roll</strong></span>
|
||||
<span><strong>Favor roll</strong></span>
|
||||
{{/if}}
|
||||
{{#if (eq rollData.favor "disfavor")}}
|
||||
<span><strong>Disfavor roll</strong></span>
|
||||
<span><strong>Disfavor roll</strong></span>
|
||||
{{/if}}
|
||||
{{#if badResult}}
|
||||
<span><strong>{{localize "LETHALFANTASY.Label.otherResult"}}</strong> : {{badResult}}</span>
|
||||
<span><strong>{{localize "LETHALFANTASY.Label.otherResult"}}</strong>
|
||||
:
|
||||
{{badResult}}</span>
|
||||
{{/if}}
|
||||
|
||||
{{#if rollTarget.weapon}}
|
||||
<span>{{rollTarget.weapon.name}}</span>
|
||||
<span>{{rollTarget.weapon.name}}</span>
|
||||
{{/if}}
|
||||
|
||||
{{#if rollData.isDamage}}
|
||||
<span><strong>Damage Roll</strong></span>
|
||||
{{/if}}
|
||||
{{#if rollData.damageSmall}}
|
||||
<span><strong>{{localize
|
||||
"LETHALFANTASY.Label.weapon-damage-small"
|
||||
}}</strong></span>
|
||||
{{/if}}
|
||||
{{#if rollData.damageMedium}}
|
||||
<span><strong>{{localize
|
||||
"LETHALFANTASY.Label.weapon-damage-medium"
|
||||
}}</strong></span>
|
||||
{{/if}}
|
||||
|
||||
{{#if rollData.letItFly}}
|
||||
<span>Let It Fly attack ! </span>
|
||||
<span>Let It Fly attack ! </span>
|
||||
{{/if}}
|
||||
{{#if rollData.pointBlank}}
|
||||
<span>Point Blank Range Attack !</span>
|
||||
<span>Point Blank Range Attack !</span>
|
||||
{{/if}}
|
||||
{{#if rollData.beyondSkill}}
|
||||
<span>Beyond Skill Range Attack !</span>
|
||||
<span>Beyond Skill Range Attack !</span>
|
||||
{{/if}}
|
||||
|
||||
<span><strong>Formula</strong> : {{titleFormula}}</span>
|
||||
|
||||
{{#each diceResults as |result|}}
|
||||
<span>{{result.dice}} : {{result.value}}</span>
|
||||
<span>{{result.dice}} : {{result.value}}</span>
|
||||
{{/each}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{{#if isSave}}
|
||||
<div class="result">
|
||||
{{#if (eq resultType "success")}}
|
||||
{{#if isPrivate}}?{{else}}{{localize "LETHALFANTASY.Roll.success"}}{{/if}}
|
||||
{{else}}
|
||||
{{#if isPrivate}}?{{else}}{{localize "LETHALFANTASY.Roll.failure"}}{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="result">
|
||||
{{#if (eq resultType "success")}}
|
||||
{{#if isPrivate}}?{{else}}{{localize
|
||||
"LETHALFANTASY.Roll.success"
|
||||
}}{{/if}}
|
||||
{{else}}
|
||||
{{#if isPrivate}}?{{else}}{{localize
|
||||
"LETHALFANTASY.Roll.failure"
|
||||
}}{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if isResource}}
|
||||
<div class="result">
|
||||
{{#if (eq resultType "success")}}
|
||||
{{#if isPrivate}}?{{else}}{{localize "LETHALFANTASY.Roll.success"}}{{/if}}
|
||||
{{else}}
|
||||
{{#if isPrivate}}?{{else}}{{localize "LETHALFANTASY.Roll.failure"}}{{#if isFailure}} ({{localize
|
||||
"LETHALFANTASY.Roll.resourceLost"}}){{/if}}{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="result">
|
||||
{{#if (eq resultType "success")}}
|
||||
{{#if isPrivate}}?{{else}}{{localize
|
||||
"LETHALFANTASY.Roll.success"
|
||||
}}{{/if}}
|
||||
{{else}}
|
||||
{{#if isPrivate}}?{{else}}{{localize "LETHALFANTASY.Roll.failure"}}{{#if
|
||||
isFailure
|
||||
}} ({{localize "LETHALFANTASY.Roll.resourceLost"}}){{/if}}{{/if}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if isDamage}}
|
||||
<div>
|
||||
{{#if (and isGM hasTarget)}}
|
||||
{{{localize "LETHALFANTASY.Roll.displayArmor" targetName=targetName targetArmor=targetArmor realDamage=realDamage}}}
|
||||
{{/if}}
|
||||
</div>
|
||||
<div>
|
||||
{{#if (and isGM hasTarget)}}
|
||||
{{{localize
|
||||
"LETHALFANTASY.Roll.displayArmor"
|
||||
targetName=targetName
|
||||
targetArmor=targetArmor
|
||||
realDamage=realDamage
|
||||
}}}
|
||||
{{/if}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#unless isPrivate}}
|
||||
<div class="dice-result">
|
||||
<h4 class="dice-total">{{total}}</h4>
|
||||
</div>
|
||||
{{#if D30result}}
|
||||
<div class="dice-result">
|
||||
<h4 class="dice-total">D30 result: {{D30result}}</h4>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="dice-result">
|
||||
<h4 class="dice-total">{{total}}</h4>
|
||||
</div>
|
||||
{{#if D30result}}
|
||||
<div class="dice-result">
|
||||
<h4 class="dice-total">D30 result: {{D30result}}</h4>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{/unless}}
|
||||
|
||||
{{#if rollData.isDamage}}
|
||||
<div class="damage-result">
|
||||
<ul>
|
||||
<li class="li-apply-wounds">
|
||||
<div>{{localize "LETHALFANTASY.Label.applyDamage"}}</div>
|
||||
<div class="combatants-grid">
|
||||
{{#each combatants}}
|
||||
<button
|
||||
class="apply-wounds-btn"
|
||||
data-combatant-id="{{this.id}}"
|
||||
title="{{this.name}}"
|
||||
>
|
||||
{{this.name}}
|
||||
</button>
|
||||
{{/each}}
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user