Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 841ed82277 | |||
| 968d156d09 | |||
| 59ff098fca | |||
| b8174d5e22 | |||
| 7f15450566 | |||
| 28fdaff2ec | |||
| 81584ed5d6 | |||
| 8c9a13faf1 |
Binary file not shown.
+227
-4
@@ -2974,7 +2974,7 @@ i.lethalfantasy {
|
||||
.message.fvtt-lethal-fantasy.dice-roll .result-section .d30-result .d30-header .d30-label {
|
||||
flex-grow: 1;
|
||||
font-weight: bold;
|
||||
color: #e0d5f0;
|
||||
color: #2a1a3a;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
font-size: calc(var(--font-size-standard) * 0.9);
|
||||
@@ -2986,11 +2986,11 @@ i.lethalfantasy {
|
||||
font-family: var(--font-primary);
|
||||
font-size: calc(var(--font-size-standard) * 1.5);
|
||||
font-weight: bold;
|
||||
color: #ff69b4;
|
||||
background: rgba(255, 105, 180, 0.1);
|
||||
color: #3d006e;
|
||||
background: rgba(255, 255, 255, 0.35);
|
||||
padding: 4px 12px;
|
||||
border-radius: 12px;
|
||||
border: 1px solid rgba(255, 105, 180, 0.3);
|
||||
border: 1px solid rgba(138, 43, 226, 0.4);
|
||||
}
|
||||
.lethalfantasy.dice-roll .result-section .d30-result .d30-message,
|
||||
.fvtt-lethal-fantasy.dice-roll .result-section .d30-result .d30-message,
|
||||
@@ -3994,3 +3994,226 @@ i.lethalfantasy {
|
||||
padding-left: 8px;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
/* -------------------------------------------------- */
|
||||
/* Dice Tray — injected into the Foundry chat sidebar */
|
||||
/* -------------------------------------------------- */
|
||||
.lf-dice-tray {
|
||||
padding: 6px 8px;
|
||||
background: linear-gradient(135deg, rgba(245, 232, 200, 0.97) 0%, rgba(238, 222, 185, 0.97) 100%), url("/systems/fvtt-lethal-fantasy/assets/ui/lethal_fantasy_background.webp") center / cover;
|
||||
border-top: 2px solid rgba(139, 69, 19, 0.5);
|
||||
border-bottom: 1px solid rgba(139, 69, 19, 0.25);
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
pointer-events: all;
|
||||
}
|
||||
.lf-dice-tray .lf-dt-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.lf-dice-tray .lf-dt-label {
|
||||
color: #3a2a10;
|
||||
font-size: 15px;
|
||||
flex-shrink: 0;
|
||||
opacity: 0.7;
|
||||
}
|
||||
.lf-dice-tray .lf-dt-count {
|
||||
width: 44px;
|
||||
flex-shrink: 0;
|
||||
padding: 3px 4px;
|
||||
background: rgba(139, 69, 19, 0.15);
|
||||
border: 1px solid rgba(139, 69, 19, 0.45);
|
||||
border-radius: 4px;
|
||||
color: #2a1a08;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
}
|
||||
.lf-dice-tray .lf-dt-count option {
|
||||
background: #f5ead0;
|
||||
color: #2a1a08;
|
||||
}
|
||||
.lf-dice-tray .lf-dt-count:focus {
|
||||
outline: none;
|
||||
border-color: rgba(139, 69, 19, 0.7);
|
||||
box-shadow: 0 0 4px rgba(139, 69, 19, 0.25);
|
||||
}
|
||||
.lf-dice-tray .lf-dt-dice {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 3px;
|
||||
flex: 1;
|
||||
}
|
||||
.lf-dice-tray .lf-dt-die-btn {
|
||||
padding: 3px 7px;
|
||||
background: rgba(139, 69, 19, 0.15);
|
||||
border: 1px solid rgba(139, 69, 19, 0.4);
|
||||
border-radius: 4px;
|
||||
color: #2a1a08;
|
||||
font-size: 10px;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
|
||||
line-height: 1.5;
|
||||
letter-spacing: 0.3px;
|
||||
}
|
||||
.lf-dice-tray .lf-dt-die-btn:hover {
|
||||
background: rgba(139, 69, 19, 0.35);
|
||||
border-color: rgba(139, 69, 19, 0.7);
|
||||
color: #5a2a00;
|
||||
box-shadow: 0 0 5px rgba(139, 69, 19, 0.3);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
.lf-dice-tray .lf-dt-die-btn:active {
|
||||
transform: translateY(0);
|
||||
box-shadow: none;
|
||||
background: rgba(139, 69, 19, 0.5);
|
||||
}
|
||||
.lf-dice-tray .lf-dt-explode-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 3px;
|
||||
cursor: pointer;
|
||||
color: rgba(160, 80, 20, 0.7);
|
||||
font-size: 14px;
|
||||
flex-shrink: 0;
|
||||
padding: 3px 6px;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 4px;
|
||||
transition: color 0.15s, border-color 0.15s, background 0.15s;
|
||||
}
|
||||
.lf-dice-tray .lf-dt-explode-label:hover {
|
||||
color: rgba(200, 100, 30, 0.9);
|
||||
border-color: rgba(139, 69, 19, 0.45);
|
||||
background: rgba(139, 69, 19, 0.12);
|
||||
}
|
||||
.lf-dice-tray .lf-dt-explode-label input[type="checkbox"] {
|
||||
appearance: none;
|
||||
width: 0;
|
||||
height: 0;
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
}
|
||||
.lf-dice-tray .lf-dt-explode-label input[type="checkbox"]:checked ~ i {
|
||||
color: #cc4400;
|
||||
filter: drop-shadow(0 0 4px rgba(200, 80, 0, 0.6));
|
||||
}
|
||||
.lf-dice-tray .lf-dt-explode-label:has(input:checked) {
|
||||
color: #cc4400;
|
||||
border-color: rgba(139, 69, 19, 0.55);
|
||||
background: rgba(139, 60, 10, 0.2);
|
||||
}
|
||||
/* Free roll chat card — styled to match regular system roll cards */
|
||||
.lf-free-roll-card {
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 6px 8px;
|
||||
background: linear-gradient(135deg, rgba(40, 30, 20, 0.7) 0%, rgba(30, 22, 15, 0.9) 100%);
|
||||
border-bottom: 2px solid rgba(139, 69, 19, 0.4);
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-header i {
|
||||
color: #c9b896;
|
||||
font-size: calc(var(--font-size-standard, 14px) * 1.1);
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-header .lf-frc-title-text {
|
||||
font-size: calc(var(--font-size-standard, 14px) * 0.85);
|
||||
color: #c9b896;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-header .lf-frc-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 2px 8px;
|
||||
background: rgba(139, 69, 19, 0.3);
|
||||
border: 1px solid rgba(139, 69, 19, 0.5);
|
||||
border-radius: 10px;
|
||||
font-size: calc(var(--font-size-standard, 14px) * 0.85);
|
||||
font-weight: 600;
|
||||
color: #d4c5a9;
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-dice {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
padding: 6px 8px;
|
||||
background: rgba(0, 0, 0, 0.15);
|
||||
border: 1px solid rgba(139, 69, 19, 0.3);
|
||||
border-top: none;
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-dice .lf-frc-die-chip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 3px 8px;
|
||||
background: rgba(139, 69, 19, 0.2);
|
||||
border: 1px solid rgba(139, 69, 19, 0.3);
|
||||
border-radius: 4px;
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-dice .lf-frc-die-chip .lf-frc-die-type {
|
||||
font-size: calc(var(--font-size-standard, 14px) * 0.85);
|
||||
font-weight: 600;
|
||||
color: #2a2a1a;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-dice .lf-frc-die-chip .lf-frc-die-sep {
|
||||
color: rgba(0, 0, 0, 0.35);
|
||||
font-weight: 300;
|
||||
font-size: calc(var(--font-size-standard, 14px) * 0.8);
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-dice .lf-frc-die-chip .lf-frc-die-val {
|
||||
font-weight: bold;
|
||||
color: #ffd700;
|
||||
font-size: calc(var(--font-size-standard, 14px) * 0.95);
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-dice .lf-frc-die-chip .lf-frc-die-val .lf-dt-explode-icon {
|
||||
font-size: 8px;
|
||||
color: #ffcc00;
|
||||
margin-left: 2px;
|
||||
vertical-align: super;
|
||||
text-shadow: 0 0 4px rgba(255, 200, 0, 0.8);
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-dice .lf-frc-die-chip.lf-frc-max {
|
||||
background: rgba(139, 90, 19, 0.35);
|
||||
border-color: rgba(200, 116, 42, 0.6);
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-dice .lf-frc-die-chip.lf-frc-max .lf-frc-die-val {
|
||||
color: #ff9a40;
|
||||
text-shadow: 0 0 6px rgba(200, 116, 42, 0.6);
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-dice .lf-frc-die-chip.lf-frc-min {
|
||||
background: rgba(139, 20, 20, 0.25);
|
||||
border-color: rgba(139, 34, 34, 0.5);
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-dice .lf-frc-die-chip.lf-frc-min .lf-frc-die-val {
|
||||
color: #ff6b6b;
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-total-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
padding: 6px 10px;
|
||||
background: linear-gradient(135deg, rgba(40, 30, 20, 0.6) 0%, rgba(20, 15, 10, 0.8) 100%);
|
||||
border: 2px solid rgba(139, 69, 19, 0.5);
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-total-bar .lf-frc-total-label {
|
||||
font-size: calc(var(--font-size-standard, 14px) * 0.85);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
color: #c9b896;
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-total-bar .lf-frc-total-value {
|
||||
font-family: var(--font-primary, serif);
|
||||
font-size: calc(var(--font-size-standard, 14px) * 1.6);
|
||||
font-weight: bold;
|
||||
color: #e8d5a0;
|
||||
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
+110
-4
@@ -152,6 +152,57 @@
|
||||
"wis": {
|
||||
"label": "Wisdom"
|
||||
}
|
||||
},
|
||||
"agility": {
|
||||
"label": "Agility"
|
||||
},
|
||||
"app": {
|
||||
"label": "Appearance"
|
||||
},
|
||||
"cha": {
|
||||
"label": "Charisma"
|
||||
},
|
||||
"con": {
|
||||
"label": "Constitution"
|
||||
},
|
||||
"contagion": {
|
||||
"label": "Contagion Save"
|
||||
},
|
||||
"dex": {
|
||||
"label": "Dexterity"
|
||||
},
|
||||
"dodge": {
|
||||
"label": "Dodge Save"
|
||||
},
|
||||
"dying": {
|
||||
"label": "Dying Challenge"
|
||||
},
|
||||
"int": {
|
||||
"label": "Intelligence"
|
||||
},
|
||||
"luc": {
|
||||
"label": "Luck"
|
||||
},
|
||||
"pain": {
|
||||
"label": "Pain Save"
|
||||
},
|
||||
"painCourage": {
|
||||
"label": "Pain/Courage Save"
|
||||
},
|
||||
"poison": {
|
||||
"label": "Poison Save"
|
||||
},
|
||||
"str": {
|
||||
"label": "Strength"
|
||||
},
|
||||
"toughness": {
|
||||
"label": "Toughness Save"
|
||||
},
|
||||
"will": {
|
||||
"label": "Willpower Save"
|
||||
},
|
||||
"wis": {
|
||||
"label": "Wisdom"
|
||||
}
|
||||
},
|
||||
"Monster": {
|
||||
@@ -250,6 +301,21 @@
|
||||
"wis": {
|
||||
"label": "Wisdom"
|
||||
}
|
||||
},
|
||||
"perception": {
|
||||
"label": "Perception"
|
||||
},
|
||||
"resistIntimidation": {
|
||||
"label": "Resist Intimidation"
|
||||
},
|
||||
"resistPerformance": {
|
||||
"label": "Resist Performance"
|
||||
},
|
||||
"resistTorture": {
|
||||
"label": "Resist Torture"
|
||||
},
|
||||
"stealth": {
|
||||
"label": "Stealth"
|
||||
}
|
||||
},
|
||||
"Delete": "Delete",
|
||||
@@ -319,6 +385,9 @@
|
||||
"divinityPoints": "Divinity points",
|
||||
"aetherPoints": "Aether points",
|
||||
"attacks": "Attacks",
|
||||
"attackMode": "Attack Mode",
|
||||
"meleeModeLabel": "Melee (8 attacks)",
|
||||
"rangedModeLabel": "Ranged (4 attacks)",
|
||||
"monster": "Monster",
|
||||
"Resist": "Resist",
|
||||
"resist": "Resist",
|
||||
@@ -429,7 +498,9 @@
|
||||
"wis": "WIS",
|
||||
"weapon-damage-medium": "Weapon damage medium",
|
||||
"weapon-damage-small": "Weapon damage small",
|
||||
"combatProgressionStart": "Combat start threshold"
|
||||
"combatProgressionStart": "Combat start threshold",
|
||||
"miracle": "Miracle",
|
||||
"titleStandard": "Standard Roll"
|
||||
},
|
||||
"Miracle": {
|
||||
"FIELDS": {
|
||||
@@ -519,7 +590,9 @@
|
||||
"save": "Save roll {save}",
|
||||
"success": "Success",
|
||||
"visibility": "Visibility",
|
||||
"favorDisfavor": "Favor/Disfavor"
|
||||
"favorDisfavor": "Favor/Disfavor",
|
||||
"displayArmor": "Target: {targetName} — Armor DR: {targetArmor} — Damage: {realDamage}",
|
||||
"resourceLost": "Resource spent"
|
||||
},
|
||||
"Save": {
|
||||
"FIELDS": {
|
||||
@@ -661,6 +734,9 @@
|
||||
"weaponClass": {
|
||||
"label": "Class"
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"weaponBonus": "Weapon bonus exceeds the allowed maximum (skill total / 10)"
|
||||
}
|
||||
},
|
||||
"Spell": {
|
||||
@@ -727,6 +803,13 @@
|
||||
"damageDice": {
|
||||
"label": "Damage dice"
|
||||
}
|
||||
},
|
||||
"Range": {
|
||||
"contact": "Contact",
|
||||
"distant": "Distant",
|
||||
"loin": "Far",
|
||||
"na": "N/A",
|
||||
"proche": "Close"
|
||||
}
|
||||
},
|
||||
"ToggleSheet": "Toggle mode",
|
||||
@@ -734,7 +817,11 @@
|
||||
"addEquipment": "New equipment",
|
||||
"addSpell": "New spells",
|
||||
"skill": "Skills list",
|
||||
"combatProgressionStart": "First attack of combat can succeed on a roll of 1 through this value. Resets to 1 for subsequent attacks."
|
||||
"combatProgressionStart": "First attack of combat can succeed on a roll of 1 through this value. Resets to 1 for subsequent attacks.",
|
||||
"addMiracle": "Add Miracle",
|
||||
"gifts": "Gifts list",
|
||||
"skills": "Skills list",
|
||||
"vulnerabilities": "Vulnerabilities list"
|
||||
},
|
||||
"Vulnerability": {
|
||||
"FIELDS": {
|
||||
@@ -893,6 +980,25 @@
|
||||
"cannotAct": "cannot act this second",
|
||||
"diceResult": "Dice result",
|
||||
"progressionCount": "Progression count:"
|
||||
},
|
||||
"EquipmentCategories": {
|
||||
"ClassKit": "Class Kit",
|
||||
"Clothing": "Clothing",
|
||||
"EssentialKit": "Essential Kit",
|
||||
"FoodDrink": "Food & Drink",
|
||||
"LandTransport": "Land Transport",
|
||||
"Light": "Light",
|
||||
"LoadBearing": "Load Bearing",
|
||||
"Misc": "Miscellaneous",
|
||||
"Mount": "Mount",
|
||||
"Music": "Music",
|
||||
"Sleeping": "Sleeping",
|
||||
"WaterTransport": "Water Transport"
|
||||
},
|
||||
"DiceTray": {
|
||||
"CountTitle": "Number of dice",
|
||||
"ExplodeTitle": "Exploding dice — re-roll on maximum value",
|
||||
"ChatTitle": "Free Roll"
|
||||
}
|
||||
},
|
||||
"TYPES": {
|
||||
@@ -913,4 +1019,4 @@
|
||||
"weapon": "Weapon"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+59
-8
@@ -250,6 +250,7 @@ Hooks.on(hookName, (message, html, data) => {
|
||||
const attackWeaponId = message.rolls[0]?.rollTarget?.weapon?.id || message.rolls[0]?.rollTarget?.weapon?._id
|
||||
const attackRollType = message.rolls[0]?.type
|
||||
const attackRollKey = message.rolls[0]?.rollTarget?.rollKey
|
||||
console.log(`[LF] request-defense-btn | attackRollType=${attackRollType} defender=${defenderName} defenderType=${combatant.actor?.type}`)
|
||||
const attackD30result = message.rolls[0]?.options?.D30result || null
|
||||
const attackD30message = message.rolls[0]?.options?.D30message || null
|
||||
const attackRerollContext = {
|
||||
@@ -264,6 +265,10 @@ Hooks.on(hookName, (message, html, data) => {
|
||||
}
|
||||
|
||||
// Préparer le message de demande de défense
|
||||
// Récupérer l'acteur attaquant pour vérifier le mode d'attaque
|
||||
const attacker = game.actors.get(attackerId)
|
||||
const isRangedAttack = attacker?.type === "monster" && attacker.system.attackMode === "ranged"
|
||||
|
||||
const defenseMsg = {
|
||||
type: "requestDefense",
|
||||
attackerName: attackerName,
|
||||
@@ -278,7 +283,8 @@ Hooks.on(hookName, (message, html, data) => {
|
||||
attackD30message: attackD30message,
|
||||
attackRerollContext: attackRerollContext,
|
||||
combatantId: combatantId,
|
||||
tokenId: tokenId
|
||||
tokenId: tokenId,
|
||||
isRanged: isRangedAttack
|
||||
}
|
||||
|
||||
// Envoyer le message socket à l'utilisateur contrôlant le combatant
|
||||
@@ -291,13 +297,16 @@ Hooks.on(hookName, (message, html, data) => {
|
||||
}
|
||||
|
||||
// Récupérer l'acteur attaquant pour vérifier qui l'a lancé
|
||||
const attacker = game.actors.get(attackerId)
|
||||
const attackerOwners = attacker ? game.users.filter(u => attacker.testUserPermission(u, "OWNER")).map(u => u.id) : []
|
||||
|
||||
// Monsters always need their owner (usually the GM) to roll a save/defense,
|
||||
// even if that owner also controls the attacker. Only skip for same-player PC-vs-PC.
|
||||
const defenderIsMonster = combatant.actor?.type === "monster"
|
||||
|
||||
let messageSent = false
|
||||
owners.forEach(owner => {
|
||||
// Ne pas afficher le dialogue à l'attaquant lui-même s'il contrôle aussi le défenseur
|
||||
if (attackerOwners.includes(owner.id) && owner.id === game.user.id) {
|
||||
// Don't let a player be both attacker and defender for their own PC, unless defending a monster.
|
||||
if (attackerOwners.includes(owner.id) && owner.id === game.user.id && !defenderIsMonster) {
|
||||
// Ne rien faire - on ne veut pas que l'attaquant se défende contre lui-même
|
||||
return
|
||||
}
|
||||
@@ -519,6 +528,7 @@ Hooks.on("createChatMessage", async (message) => {
|
||||
const shieldData = LethalFantasyUtils.getShieldReactionData(defender)
|
||||
let canRerollDefense = LethalFantasyUtils.hasD30Reroll(defenseD30message)
|
||||
let canShieldReact = !!shieldData
|
||||
let canAdHocShield = !shieldData
|
||||
|
||||
while (defenseRoll < attackRoll) {
|
||||
const currentGrit = Number(defender.system?.grit?.current) || 0
|
||||
@@ -566,6 +576,14 @@ Hooks.on("createChatMessage", async (message) => {
|
||||
icon: "fa-solid fa-shield",
|
||||
callback: () => "shieldReact"
|
||||
})
|
||||
} else if (canAdHocShield) {
|
||||
// No pre-configured shield — offer ad-hoc shield option (useful for monsters)
|
||||
buttons.push({
|
||||
action: "adHocShield",
|
||||
label: "Roll ad-hoc shield (choose dice + DR)",
|
||||
icon: "fa-solid fa-shield-halved",
|
||||
callback: () => "adHocShield"
|
||||
})
|
||||
}
|
||||
|
||||
buttons.push({
|
||||
@@ -583,7 +601,7 @@ Hooks.on("createChatMessage", async (message) => {
|
||||
<div class="combat-status">
|
||||
<p><strong>${attackerName}</strong> rolled <strong>${attackRoll}</strong></p>
|
||||
<p><strong>${defenderName}</strong> currently has <strong>${defenseRoll}</strong></p>
|
||||
${defenseD30message ? `<p class="bonus-info">D30 special: ${defenseD30message}</p>` : ""}
|
||||
${defenseD30message ? `<p class="bonus-info">D30 special: ${defenseD30message.description}</p>` : ""}
|
||||
</div>
|
||||
<p class="offer-text">Choose how to improve the defense before resolving the hit.</p>
|
||||
</div>
|
||||
@@ -635,7 +653,6 @@ Hooks.on("createChatMessage", async (message) => {
|
||||
canShieldReact = false
|
||||
|
||||
if (newDefenseTotal >= attackRoll) {
|
||||
// Shield roll tied or exceeded the attack — shield blocked
|
||||
shieldBlocked = true
|
||||
shieldReaction = {
|
||||
damageReduction: shieldData.damageReduction,
|
||||
@@ -647,7 +664,6 @@ Hooks.on("createChatMessage", async (message) => {
|
||||
`<p><strong>${defenderName}</strong> rolls <strong>${shieldData.label}</strong> and adds <strong>${shieldBonus}</strong> to defense (${newDefenseTotal} ≥ ${attackRoll}). <strong>Shield blocked the attack!</strong> Both armor DR and shield DR <strong>${shieldData.damageReduction}</strong> will apply to damage.</p>`
|
||||
)
|
||||
} else {
|
||||
// Shield roll not enough — hit still lands, armor DR only
|
||||
shieldReaction = null
|
||||
await createReactionMessage(
|
||||
defender,
|
||||
@@ -655,6 +671,35 @@ Hooks.on("createChatMessage", async (message) => {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
if (choice === "adHocShield") {
|
||||
const adHoc = await LethalFantasyUtils.promptAdHocShield(defenderName, attackRoll, defenseRoll)
|
||||
if (!adHoc) continue
|
||||
const shieldBonus = await LethalFantasyUtils.rollBonusDie(adHoc.formula, defender)
|
||||
const newDefenseTotal = defenseRoll + shieldBonus
|
||||
defenseRoll = newDefenseTotal
|
||||
canShieldReact = false
|
||||
canAdHocShield = false
|
||||
|
||||
if (newDefenseTotal >= attackRoll) {
|
||||
shieldBlocked = true
|
||||
shieldReaction = {
|
||||
damageReduction: adHoc.damageReduction,
|
||||
label: `${adHoc.formula.toUpperCase()} shield`,
|
||||
bonus: shieldBonus
|
||||
}
|
||||
await createReactionMessage(
|
||||
defender,
|
||||
`<p><strong>${defenderName}</strong> rolls <strong>${adHoc.formula.toUpperCase()}</strong> shield and adds <strong>${shieldBonus}</strong> to defense (${newDefenseTotal} ≥ ${attackRoll}). <strong>Shield blocked the attack!</strong> Both armor DR and shield DR <strong>${adHoc.damageReduction}</strong> will apply to damage.</p>`
|
||||
)
|
||||
} else {
|
||||
shieldReaction = null
|
||||
await createReactionMessage(
|
||||
defender,
|
||||
`<p><strong>${defenderName}</strong> rolls <strong>${adHoc.formula.toUpperCase()}</strong> shield and adds <strong>${shieldBonus}</strong> to defense (${newDefenseTotal} < ${attackRoll}). Shield did not block — normal hit, armor DR only.</p>`
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -710,7 +755,7 @@ Hooks.on("createChatMessage", async (message) => {
|
||||
<div class="combat-status">
|
||||
<p><strong>${attackerName}</strong> currently has <strong>${attackRollFinal}</strong></p>
|
||||
<p><strong>${defenderName}</strong> rolled <strong>${defenseRoll}</strong></p>
|
||||
${attackD30message ? `<p class="bonus-info">D30 special: ${attackD30message}</p>` : ""}
|
||||
${attackD30message ? `<p class="bonus-info">D30 special: ${attackD30message.description}</p>` : ""}
|
||||
</div>
|
||||
<p class="offer-text">Choose how to improve the attack before resolving the combat result.</p>
|
||||
</div>
|
||||
@@ -897,6 +942,12 @@ Hooks.on("hotbarDrop", (bar, data, slot) => {
|
||||
}
|
||||
})
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/**
|
||||
* Inject the Lethal Fantasy dice tray into the chat sidebar.
|
||||
*/
|
||||
Hooks.on("renderChatLog", (_chatLog, html) => applications.injectDiceTray(_chatLog, html))
|
||||
|
||||
/**
|
||||
* Register world usage statistics
|
||||
* @param {string} registerKey
|
||||
|
||||
@@ -9,4 +9,5 @@ export { default as LethalFantasySpellSheet } from "./sheets/spell-sheet.mjs"
|
||||
export { default as LethalFantasyEquipmentSheet } from "./sheets/equipment-sheet.mjs"
|
||||
export { default as LethalFantasyShieldSheet } from "./sheets/shield-sheet.mjs"
|
||||
export { default as LethalFantasyMiracleSheet } from "./sheets/miracle-sheet.mjs"
|
||||
export { injectDiceTray } from "./free-roll.mjs"
|
||||
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
/**
|
||||
* Free Dice Tray — injected into the Foundry chat sidebar.
|
||||
*
|
||||
* Provides a compact bar for GM and players to roll any standard die (d4–d30)
|
||||
* or its exploding variant (dXx) without needing an actor sheet.
|
||||
* Supports selecting how many dice to roll (1–9).
|
||||
*/
|
||||
|
||||
/** Standard dice available in Lethal Fantasy */
|
||||
const DICE_TYPES = ["d4", "d6", "d8", "d10", "d12", "d20", "d30"]
|
||||
|
||||
/**
|
||||
* Inject the dice tray bar into the ChatLog HTML.
|
||||
* Called from `Hooks.on("renderChatLog", ...)`.
|
||||
*
|
||||
* @param {Application} _chatLog
|
||||
* @param {HTMLElement|jQuery} html
|
||||
*/
|
||||
export function injectDiceTray(_chatLog, html) {
|
||||
const el = (html instanceof HTMLElement) ? html : (html[0] ?? html)
|
||||
if (!el?.querySelector) return
|
||||
if (el.querySelector(".lf-dice-tray")) return
|
||||
|
||||
const bar = document.createElement("div")
|
||||
bar.className = "lf-dice-tray"
|
||||
|
||||
const diceButtons = DICE_TYPES.map(d =>
|
||||
`<button type="button" class="lf-dt-die-btn" data-die="${d}" title="${d.toUpperCase()}">${d.toUpperCase()}</button>`
|
||||
).join("")
|
||||
|
||||
const countOptions = Array.from({ length: 9 }, (_, i) =>
|
||||
`<option value="${i + 1}">${i + 1}</option>`
|
||||
).join("")
|
||||
|
||||
bar.innerHTML = `
|
||||
<div class="lf-dt-row">
|
||||
<span class="lf-dt-label"><i class="fa-solid fa-dice"></i></span>
|
||||
<select class="lf-dt-count" title="${game.i18n.localize("LETHALFANTASY.DiceTray.CountTitle")}">
|
||||
${countOptions}
|
||||
</select>
|
||||
<div class="lf-dt-dice">${diceButtons}</div>
|
||||
<label class="lf-dt-explode-label" title="${game.i18n.localize("LETHALFANTASY.DiceTray.ExplodeTitle")}">
|
||||
<input type="checkbox" class="lf-dt-explode" />
|
||||
<i class="fa-solid fa-explosion"></i>
|
||||
</label>
|
||||
</div>
|
||||
`
|
||||
|
||||
bar.addEventListener("click", async ev => {
|
||||
const btn = ev.target.closest(".lf-dt-die-btn")
|
||||
if (!btn) return
|
||||
ev.stopPropagation()
|
||||
|
||||
const dieType = btn.dataset.die
|
||||
const count = parseInt(bar.querySelector(".lf-dt-count").value) || 1
|
||||
const explode = bar.querySelector(".lf-dt-explode").checked
|
||||
|
||||
try {
|
||||
await rollFreeDie(dieType, count, explode)
|
||||
} catch (err) {
|
||||
console.error("Lethal Fantasy | Dice Tray error:", err)
|
||||
ui.notifications?.error("Dice Tray roll failed — see console")
|
||||
}
|
||||
})
|
||||
|
||||
const anchor = el.querySelector(".chat-form")
|
||||
?? el.querySelector(".chat-message-form")
|
||||
?? el.querySelector("form")
|
||||
if (anchor) {
|
||||
anchor.parentElement.insertBefore(bar, anchor)
|
||||
} else {
|
||||
el.appendChild(bar)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Roll one or more dice of the given type and post the result to chat.
|
||||
* For exploding dice, follows the Lethal Fantasy rule: each exploded reroll
|
||||
* contributes (result − 1) to the total, same as all other system rolls.
|
||||
*
|
||||
* @param {string} dieType Die face, e.g. "d20"
|
||||
* @param {number} count Number of dice to roll (1–9)
|
||||
* @param {boolean} explode Whether to use the exploding variant (max triggers reroll at −1)
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
export async function rollFreeDie(dieType, count = 1, explode = false) {
|
||||
const sides = parseInt(dieType.replace("d", "")) || 20
|
||||
const baseFormula = `1d${sides}`
|
||||
const label = explode
|
||||
? `${count}${dieType.toUpperCase()}E`
|
||||
: `${count}${dieType.toUpperCase()}`
|
||||
|
||||
const dieLabel = dieType.toUpperCase()
|
||||
const dieChips = []
|
||||
let total = 0
|
||||
|
||||
for (let i = 0; i < count; i++) {
|
||||
const r0 = await new Roll(baseFormula).evaluate()
|
||||
if (game?.dice3d) await game.dice3d.showForRoll(r0, game.user, true)
|
||||
let diceResult = r0.dice[0].results[0].result
|
||||
dieChips.push({ label: dieLabel, value: diceResult, exploded: false })
|
||||
total += diceResult
|
||||
|
||||
if (explode) {
|
||||
while (diceResult === sides) {
|
||||
const rx = await new Roll(baseFormula).evaluate()
|
||||
if (game?.dice3d) await game.dice3d.showForRoll(rx, game.user, true)
|
||||
diceResult = rx.dice[0].results[0].result
|
||||
const contrib = diceResult - 1
|
||||
dieChips.push({ label: `${dieLabel}-1`, value: contrib, exploded: true })
|
||||
total += contrib
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const resultHtml = dieChips.map(chip => {
|
||||
const isMax = !chip.exploded && chip.value === sides
|
||||
const isMin = chip.value === 1
|
||||
const explodeIcon = chip.exploded ? `<i class="fa-solid fa-burst lf-dt-explode-icon"></i>` : ""
|
||||
const classes = ["lf-frc-die-chip", isMax ? "lf-frc-max" : "", isMin ? "lf-frc-min" : ""].filter(Boolean).join(" ")
|
||||
return `<div class="${classes}">
|
||||
<span class="lf-frc-die-type">${chip.label}</span>
|
||||
<span class="lf-frc-die-sep">→</span>
|
||||
<span class="lf-frc-die-val">${chip.value}${explodeIcon}</span>
|
||||
</div>`
|
||||
}).join("")
|
||||
|
||||
const totalLabel = game.i18n.localize("LETHALFANTASY.Label.total").toUpperCase()
|
||||
const content = `
|
||||
<div class="lf-free-roll-card">
|
||||
<div class="lf-frc-header">
|
||||
<i class="fa-solid fa-dice"></i>
|
||||
<span class="lf-frc-title-text">${game.i18n.localize("LETHALFANTASY.DiceTray.ChatTitle")}</span>
|
||||
<span class="lf-frc-badge">${label}</span>
|
||||
</div>
|
||||
<div class="lf-frc-dice">${resultHtml}</div>
|
||||
<div class="lf-frc-total-bar">
|
||||
<span class="lf-frc-total-label">${totalLabel}</span>
|
||||
<span class="lf-frc-total-value">${total}</span>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
|
||||
const rollMode = game.settings.get("core", "rollMode")
|
||||
const msgData = {
|
||||
speaker: ChatMessage.getSpeaker(),
|
||||
content,
|
||||
sound: CONFIG.sounds.dice,
|
||||
}
|
||||
ChatMessage.applyRollMode(msgData, rollMode)
|
||||
await ChatMessage.create(msgData)
|
||||
}
|
||||
@@ -1,152 +1,621 @@
|
||||
{
|
||||
"d30_dice_results": {
|
||||
"30": {
|
||||
"melee_attack": "Possible Lethal or Vital Strike or Add D20E to Attack",
|
||||
"ranged_attack": "Possible Lethal or Vital Strike or Add D20E to Attack",
|
||||
"melee_defense": "Possible Flawless or Legendary Defense or Add D20E to Defense",
|
||||
"arcane_spell_attack": "Possible Lethal or Vital Magical Strike or Add D20E to Spell Attack",
|
||||
"arcane_spell_defense": "Possible Spell Catastrophe or adds D20E to Spell Defense",
|
||||
"skill_rolls": "Skill Succeeds Regardless of Opposing Roll / Success at highest level / Matching 30s cancel each other out"
|
||||
"melee_attack": {
|
||||
"type": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"type": "special_strike",
|
||||
"options": [
|
||||
"lethal",
|
||||
"vital"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "bonus_dice",
|
||||
"dice": "D20E",
|
||||
"target": "attack"
|
||||
}
|
||||
],
|
||||
"description": "Possible Lethal or Vital Strike or Add D20E to Attack"
|
||||
},
|
||||
"ranged_attack": {
|
||||
"type": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"type": "special_strike",
|
||||
"options": [
|
||||
"lethal",
|
||||
"vital"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "bonus_dice",
|
||||
"dice": "D20E",
|
||||
"target": "attack"
|
||||
}
|
||||
],
|
||||
"description": "Possible Lethal or Vital Strike or Add D20E to Attack"
|
||||
},
|
||||
"melee_defense": {
|
||||
"type": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"type": "special_defense",
|
||||
"options": [
|
||||
"flawless",
|
||||
"legendary"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "bonus_dice",
|
||||
"dice": "D20E",
|
||||
"target": "defense"
|
||||
}
|
||||
],
|
||||
"description": "Possible Flawless or Legendary Defense or Add D20E to Defense"
|
||||
},
|
||||
"arcane_spell_attack": {
|
||||
"type": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"type": "special_strike",
|
||||
"options": [
|
||||
"lethal_magical",
|
||||
"vital_magical"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "bonus_dice",
|
||||
"dice": "D20E",
|
||||
"target": "spell_attack"
|
||||
}
|
||||
],
|
||||
"description": "Possible Lethal or Vital Magical Strike or Add D20E to Spell Attack"
|
||||
},
|
||||
"arcane_spell_defense": {
|
||||
"type": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"type": "spell_calamity"
|
||||
},
|
||||
{
|
||||
"type": "bonus_dice",
|
||||
"dice": "D20E",
|
||||
"target": "spell_defense"
|
||||
}
|
||||
],
|
||||
"description": "Possible Spell Catastrophe or adds D20E to Spell Defense"
|
||||
},
|
||||
"skill_rolls": {
|
||||
"type": "skill_auto_success",
|
||||
"description": "Skill Succeeds Regardless of Opposing Roll"
|
||||
},
|
||||
"ranged_defense": {
|
||||
"type": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"type": "special_defense",
|
||||
"options": [
|
||||
"flawless",
|
||||
"legendary"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "bonus_dice",
|
||||
"dice": "D20E",
|
||||
"target": "defense"
|
||||
}
|
||||
],
|
||||
"description": "Possible Flawless or Legendary Defense or Add D20E to Defense"
|
||||
}
|
||||
},
|
||||
"29": {
|
||||
"melee_attack": "Gain 1 Grit",
|
||||
"ranged_attack": "Gain 1 Grit",
|
||||
"melee_defense": "Gain 1 Grit",
|
||||
"arcane_spell_attack": "Gain 1 Grit",
|
||||
"arcane_spell_defense": "Gain 1 Grit",
|
||||
"skill_rolls": "Gain 1 Grit"
|
||||
"melee_attack": {
|
||||
"type": "gain_grit",
|
||||
"amount": 1,
|
||||
"description": "Gain 1 Grit"
|
||||
},
|
||||
"ranged_attack": {
|
||||
"type": "gain_grit",
|
||||
"amount": 1,
|
||||
"description": "Gain 1 Grit"
|
||||
},
|
||||
"melee_defense": {
|
||||
"type": "gain_grit",
|
||||
"amount": 1,
|
||||
"description": "Gain 1 Grit"
|
||||
},
|
||||
"arcane_spell_attack": {
|
||||
"type": "gain_grit",
|
||||
"amount": 1,
|
||||
"description": "Gain 1 Grit"
|
||||
},
|
||||
"arcane_spell_defense": {
|
||||
"type": "gain_grit",
|
||||
"amount": 1,
|
||||
"description": "Gain 1 Grit"
|
||||
},
|
||||
"skill_rolls": {
|
||||
"type": "gain_grit",
|
||||
"amount": 1,
|
||||
"description": "Gain 1 Grit"
|
||||
},
|
||||
"ranged_defense": {
|
||||
"type": "gain_grit",
|
||||
"amount": 1,
|
||||
"description": "Gain 1 Grit"
|
||||
}
|
||||
},
|
||||
"28": {
|
||||
"melee_attack": "Shield Destruction",
|
||||
"ranged_attack": "empty",
|
||||
"melee_defense": "empty",
|
||||
"arcane_spell_attack": "empty",
|
||||
"arcane_spell_defense": "empty",
|
||||
"skill_rolls": "empty"
|
||||
"melee_attack": {
|
||||
"type": "shield_destruction",
|
||||
"description": "Shield Destruction"
|
||||
}
|
||||
},
|
||||
"27": {
|
||||
"melee_attack": "Granted D6 (1-6) Attack Modifier for This Melee Attack",
|
||||
"ranged_attack": "Granted D6 (1-6) Attack Modifier for This Ranged Attack",
|
||||
"melee_defense": "Granted 1 Luck dice for Use in This Combat Only",
|
||||
"arcane_spell_attack": "No Spell Lethargy (the Aether Approves)",
|
||||
"arcane_spell_defense": "Caster Suffers Severe pain and will be under a flash of pain for 1D6E seconds",
|
||||
"skill_rolls": "Granted D6 (1-6) Skill Modifier for this Skill Attempt"
|
||||
"melee_attack": {
|
||||
"type": "bonus_dice",
|
||||
"dice": "D6",
|
||||
"target": "attack",
|
||||
"description": "Granted D6 (1-6) Attack Modifier for This Melee Attack"
|
||||
},
|
||||
"ranged_attack": {
|
||||
"type": "bonus_dice",
|
||||
"dice": "D6",
|
||||
"target": "attack",
|
||||
"description": "Granted D6 (1-6) Attack Modifier for This Ranged Attack"
|
||||
},
|
||||
"melee_defense": {
|
||||
"type": "luck_die",
|
||||
"scope": "combat",
|
||||
"description": "Granted 1 Luck dice for Use in This Combat Only"
|
||||
},
|
||||
"arcane_spell_attack": {
|
||||
"type": "no_lethargy",
|
||||
"description": "No Spell Lethargy the Aether Approves of Characters Efforts"
|
||||
},
|
||||
"arcane_spell_defense": {
|
||||
"type": "flash_of_pain",
|
||||
"duration_dice": "1D6E",
|
||||
"target": "caster",
|
||||
"description": "Caster Suffers Severe pain and will be under a flash of pain for 1D6E seconds"
|
||||
},
|
||||
"ranged_defense": {
|
||||
"type": "luck_die",
|
||||
"scope": "combat",
|
||||
"description": "Granted 1 Luck dice for Use in This Combat Only"
|
||||
}
|
||||
},
|
||||
"26": {
|
||||
"melee_attack": "Shield Destruction",
|
||||
"ranged_attack": "empty",
|
||||
"melee_defense": "empty",
|
||||
"arcane_spell_attack": "empty",
|
||||
"arcane_spell_defense": "empty",
|
||||
"skill_rolls": "empty"
|
||||
"melee_attack": {
|
||||
"type": "shield_destruction",
|
||||
"description": "Shield Destruction"
|
||||
}
|
||||
},
|
||||
"25": {
|
||||
"melee_attack": "Bleed, Knock-Back on Hit",
|
||||
"ranged_attack": "Bleed",
|
||||
"melee_defense": "Kick, Punch or Shield Bash",
|
||||
"arcane_spell_attack": "empty",
|
||||
"arcane_spell_defense": "empty",
|
||||
"skill_rolls": "Add 1 to Skill Roll"
|
||||
"skill_rolls": {
|
||||
"type": "bonus_flat",
|
||||
"amount": 1,
|
||||
"target": "skill",
|
||||
"description": "Add 1 to Skill Roll"
|
||||
}
|
||||
},
|
||||
"21": {
|
||||
"melee_attack": "Hit Inflicts Flash of Pain 1D6E seconds",
|
||||
"ranged_attack": "Hit Inflicts Flash of Pain 1D6E seconds",
|
||||
"melee_defense": "Defender Recovers or ignores any flash of pain",
|
||||
"arcane_spell_attack": "Magical Damage inflicts Flash of pain 1D6E seconds",
|
||||
"arcane_spell_defense": "Caster Suffers Severe pain and will be under a flash of pain for 1D6E seconds",
|
||||
"skill_rolls": "empty"
|
||||
"melee_attack": {
|
||||
"type": "flash_of_pain",
|
||||
"duration_dice": "1D6E",
|
||||
"target": "defender",
|
||||
"description": "Hit Inflicts Flash of Pain 1D6E seconds"
|
||||
},
|
||||
"ranged_attack": {
|
||||
"type": "flash_of_pain",
|
||||
"duration_dice": "1D6E",
|
||||
"target": "defender",
|
||||
"description": "Hit Inflicts Flash of Pain 1D6E seconds"
|
||||
},
|
||||
"melee_defense": {
|
||||
"type": "recover_pain",
|
||||
"description": "Defender Recovers or ignores any flash of pain"
|
||||
},
|
||||
"arcane_spell_attack": {
|
||||
"type": "flash_of_pain",
|
||||
"duration_dice": "1D6E",
|
||||
"target": "defender",
|
||||
"description": "Magical Damage inflicts Flash of pain 1D6E seconds"
|
||||
},
|
||||
"arcane_spell_defense": {
|
||||
"type": "flash_of_pain",
|
||||
"duration_dice": "1D6E",
|
||||
"target": "caster",
|
||||
"description": "Caster Suffers Severe pain and will be under a flash of pain for 1D6E seconds"
|
||||
},
|
||||
"skill_rolls": {
|
||||
"type": "bonus_dice",
|
||||
"dice": "D6",
|
||||
"target": "skill",
|
||||
"description": "Granted D6 (1-6) Skill Modifier for this Skill Attempt"
|
||||
},
|
||||
"ranged_defense": {
|
||||
"type": "recover_pain",
|
||||
"description": "Defender Recovers or ignores any flash of pain"
|
||||
}
|
||||
},
|
||||
"20": {
|
||||
"melee_attack": "Possible Vicious Strike. Bleed, Knock-back on Hit",
|
||||
"ranged_attack": "Possible Vicious Strike. Bleeding wound inflicted on hit.",
|
||||
"melee_defense": "Possible 20/20 defense (avoids Any Attack Except a Lethal Strike). Grants a Kick, Punch or Shield Bash counter",
|
||||
"arcane_spell_attack": "Possible Vicious Application of a Magical Attack",
|
||||
"arcane_spell_defense": "Possible 20/20 Spell defense (Saves Against Any Magical Attack Except a Lethal Magical Strike)",
|
||||
"skill_rolls": "20 Added to Skill Roll"
|
||||
"melee_attack": {
|
||||
"type": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"type": "special_strike",
|
||||
"options": [
|
||||
"vicious"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "bonus_dice",
|
||||
"dice": "D12",
|
||||
"target": "attack"
|
||||
}
|
||||
],
|
||||
"description": "Possible Vicious Strike or Add D12 to attack"
|
||||
},
|
||||
"ranged_attack": {
|
||||
"type": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"type": "special_strike",
|
||||
"options": [
|
||||
"vicious"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "bonus_dice",
|
||||
"dice": "D12",
|
||||
"target": "attack"
|
||||
}
|
||||
],
|
||||
"description": "Possible Vicious Strike or add D12 to attack"
|
||||
},
|
||||
"melee_defense": {
|
||||
"type": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"type": "special_defense",
|
||||
"options": [
|
||||
"perfect"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "bonus_dice",
|
||||
"dice": "D12",
|
||||
"target": "defense"
|
||||
}
|
||||
],
|
||||
"description": "Possible 20/20 defense that avoids Any Attack Except a Lethal Strike or adds D12 to defense"
|
||||
},
|
||||
"arcane_spell_attack": {
|
||||
"type": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"type": "special_strike",
|
||||
"options": [
|
||||
"vicious_magical"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "bonus_dice",
|
||||
"dice": "D12",
|
||||
"target": "spell_attack"
|
||||
}
|
||||
],
|
||||
"description": "Possible Vicious Application of a Magical Attack or add D12 to attack"
|
||||
},
|
||||
"arcane_spell_defense": {
|
||||
"type": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"type": "special_defense",
|
||||
"options": [
|
||||
"perfect_spell"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "bonus_dice",
|
||||
"dice": "D12",
|
||||
"target": "spell_defense"
|
||||
}
|
||||
],
|
||||
"description": "Possible 20/20 Spell defense that Saves Against Any Magical Attack Except a Lethal Magical Strike or add D12 to defense"
|
||||
},
|
||||
"skill_rolls": {
|
||||
"type": "bonus_flat",
|
||||
"amount": 20,
|
||||
"target": "skill",
|
||||
"description": "20 Added to Skill Roll"
|
||||
},
|
||||
"ranged_defense": {
|
||||
"type": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"type": "special_defense",
|
||||
"options": [
|
||||
"perfect"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "bonus_dice",
|
||||
"dice": "D12",
|
||||
"target": "defense"
|
||||
}
|
||||
],
|
||||
"description": "Possible 20/20 defense that avoids Any Attack Except a Lethal Strike or adds D12 to defense"
|
||||
}
|
||||
},
|
||||
"15": {
|
||||
"melee_attack": "Bleed, Knock-back on Hit",
|
||||
"ranged_attack": "Bleed",
|
||||
"melee_defense": "Kick, Punch or Shield Bash",
|
||||
"arcane_spell_attack": "empty",
|
||||
"arcane_spell_defense": "empty",
|
||||
"skill_rolls": "Add 1 to Skill Roll"
|
||||
},
|
||||
"13": {
|
||||
"melee_attack": "empty",
|
||||
"ranged_attack": "empty",
|
||||
"melee_defense": "empty",
|
||||
"arcane_spell_attack": "empty",
|
||||
"arcane_spell_defense": "empty",
|
||||
"skill_rolls": "empty"
|
||||
"melee_attack": {
|
||||
"type": "combo",
|
||||
"effects": [
|
||||
{
|
||||
"type": "bleed"
|
||||
},
|
||||
{
|
||||
"type": "knockback"
|
||||
}
|
||||
],
|
||||
"description": "Bleed, Knock-back on Hit"
|
||||
},
|
||||
"ranged_attack": {
|
||||
"type": "bleed",
|
||||
"description": "Bleed"
|
||||
},
|
||||
"melee_defense": {
|
||||
"type": "counter_attack",
|
||||
"options": [
|
||||
"kick",
|
||||
"punch",
|
||||
"shield_bash"
|
||||
],
|
||||
"description": "Kick, Punch or Shield Bash"
|
||||
},
|
||||
"skill_rolls": {
|
||||
"type": "bonus_flat",
|
||||
"amount": 1,
|
||||
"target": "skill",
|
||||
"description": "Add 1 to Skill Roll"
|
||||
},
|
||||
"ranged_defense": {
|
||||
"type": "counter_attack",
|
||||
"options": [
|
||||
"kick",
|
||||
"punch",
|
||||
"shield_bash"
|
||||
],
|
||||
"description": "Kick, Punch or Shield Bash"
|
||||
}
|
||||
},
|
||||
"13": {},
|
||||
"11": {
|
||||
"melee_attack": "Flurry Attack or Hit to Miss",
|
||||
"ranged_attack": "Roll 2x Damage Dice",
|
||||
"melee_defense": "empty",
|
||||
"arcane_spell_attack": "empty",
|
||||
"arcane_spell_defense": "empty",
|
||||
"skill_rolls": "empty"
|
||||
"melee_attack": {
|
||||
"type": "flurry",
|
||||
"condition": "hit_or_miss",
|
||||
"description": "Flurry Attack or Hit to Miss"
|
||||
},
|
||||
"ranged_attack": {
|
||||
"type": "double_damage_dice",
|
||||
"description": "Roll 2x Damage Dice"
|
||||
}
|
||||
},
|
||||
"10": {
|
||||
"melee_attack": "Bleed, Knock-back on Hit",
|
||||
"ranged_attack": "Bleed",
|
||||
"melee_defense": "Kick, Punch or Shield Bash",
|
||||
"arcane_spell_attack": "empty",
|
||||
"arcane_spell_defense": "empty",
|
||||
"skill_rolls": "Add 1 to Skill Roll"
|
||||
"melee_attack": {
|
||||
"type": "combo",
|
||||
"effects": [
|
||||
{
|
||||
"type": "bleed"
|
||||
},
|
||||
{
|
||||
"type": "knockback"
|
||||
}
|
||||
],
|
||||
"description": "Bleed, Knock-back on Hit"
|
||||
},
|
||||
"ranged_attack": {
|
||||
"type": "bleed",
|
||||
"description": "Bleed"
|
||||
},
|
||||
"melee_defense": {
|
||||
"type": "counter_attack",
|
||||
"options": [
|
||||
"kick",
|
||||
"punch",
|
||||
"shield_bash"
|
||||
],
|
||||
"description": "Kick, Punch or Shield Bash"
|
||||
},
|
||||
"skill_rolls": {
|
||||
"type": "bonus_flat",
|
||||
"amount": 1,
|
||||
"target": "skill",
|
||||
"description": "Add 1 to Skill Roll"
|
||||
},
|
||||
"ranged_defense": {
|
||||
"type": "counter_attack",
|
||||
"options": [
|
||||
"kick",
|
||||
"punch",
|
||||
"shield_bash"
|
||||
],
|
||||
"description": "Kick, Punch or Shield Bash"
|
||||
}
|
||||
},
|
||||
"8": {
|
||||
"melee_attack": "Mulligan, Can Choose to Re-roll This Attack",
|
||||
"ranged_attack": "Mulligan, Can Choose to Re-Roll This Attack",
|
||||
"melee_defense": "Mulligan, Can Choose to Re-Roll This Defense",
|
||||
"arcane_spell_attack": "Mulligan, Can Re-Roll This Spell Attack",
|
||||
"arcane_spell_defense": "Mulligan, Can Re-Roll This Spell Defense",
|
||||
"skill_rolls": "Mulligan, Can Re-Roll This Skill roll"
|
||||
"melee_attack": {
|
||||
"type": "mulligan",
|
||||
"description": "Mulligan, Can Choose to Re-roll This Attack"
|
||||
},
|
||||
"ranged_attack": {
|
||||
"type": "mulligan",
|
||||
"description": "Mulligan, Can Choose to Re-Roll This Attack"
|
||||
},
|
||||
"melee_defense": {
|
||||
"type": "mulligan",
|
||||
"description": "Mulligan, Can Choose to Re-Roll This Defense"
|
||||
},
|
||||
"arcane_spell_attack": {
|
||||
"type": "mulligan",
|
||||
"description": "Mulligan, Can Re-Roll This Spell Attack"
|
||||
},
|
||||
"arcane_spell_defense": {
|
||||
"type": "mulligan",
|
||||
"description": "Mulligan, Can Re-Roll This Spell Defense"
|
||||
},
|
||||
"skill_rolls": {
|
||||
"type": "mulligan",
|
||||
"description": "Mulligan, Can Re-Roll This Skill roll"
|
||||
},
|
||||
"ranged_defense": {
|
||||
"type": "mulligan",
|
||||
"description": "Mulligan, Can Choose to Re-Roll This Defense"
|
||||
}
|
||||
},
|
||||
"7": {
|
||||
"melee_attack": "Flurry Attack on Hit or Miss",
|
||||
"ranged_attack": "Roll 2x Double Damage Dice",
|
||||
"melee_defense": "empty",
|
||||
"arcane_spell_attack": "empty",
|
||||
"arcane_spell_defense": "empty",
|
||||
"skill_rolls": "empty"
|
||||
"melee_attack": {
|
||||
"type": "flurry",
|
||||
"condition": "hit_or_miss",
|
||||
"description": "Flurry Attack on Hit or Miss"
|
||||
},
|
||||
"ranged_attack": {
|
||||
"type": "double_damage_dice",
|
||||
"description": "Roll 2x Damage Dice"
|
||||
}
|
||||
},
|
||||
"5": {
|
||||
"melee_attack": "Bleed, Knock-back on Hit",
|
||||
"ranged_attack": "Bleed",
|
||||
"melee_defense": "Kick, Punch, or Shield Bash",
|
||||
"arcane_spell_attack": "empty",
|
||||
"arcane_spell_defense": "empty",
|
||||
"skill_rolls": "Add 1 to Skill Roll"
|
||||
"melee_attack": {
|
||||
"type": "combo",
|
||||
"effects": [
|
||||
{
|
||||
"type": "bleed"
|
||||
},
|
||||
{
|
||||
"type": "knockback"
|
||||
}
|
||||
],
|
||||
"description": "Bleed, Knock-back on Hit"
|
||||
},
|
||||
"ranged_attack": {
|
||||
"type": "bleed",
|
||||
"description": "Bleed"
|
||||
},
|
||||
"melee_defense": {
|
||||
"type": "counter_attack",
|
||||
"options": [
|
||||
"kick",
|
||||
"punch",
|
||||
"shield_bash"
|
||||
],
|
||||
"description": "Kick, Punch, or Shield Bash"
|
||||
},
|
||||
"skill_rolls": {
|
||||
"type": "bonus_flat",
|
||||
"amount": 1,
|
||||
"target": "skill",
|
||||
"description": "Add 1 to Skill Roll"
|
||||
},
|
||||
"ranged_defense": {
|
||||
"type": "counter_attack",
|
||||
"options": [
|
||||
"kick",
|
||||
"punch",
|
||||
"shield_bash"
|
||||
],
|
||||
"description": "Kick, Punch, or Shield Bash"
|
||||
}
|
||||
},
|
||||
"3": {
|
||||
"melee_attack": "Triple Damage",
|
||||
"ranged_attack": "Triple Damage",
|
||||
"melee_defense": "DR Tripled including Shield",
|
||||
"arcane_spell_attack": "Triple Damage on Spell Damage",
|
||||
"arcane_spell_defense": "D12 Added to Spell Defense Modifier",
|
||||
"skill_rolls": "empty"
|
||||
"melee_attack": {
|
||||
"type": "damage_multiplier",
|
||||
"multiplier": 3,
|
||||
"description": "Triple Damage"
|
||||
},
|
||||
"ranged_attack": {
|
||||
"type": "damage_multiplier",
|
||||
"multiplier": 3,
|
||||
"description": "Triple Damage"
|
||||
},
|
||||
"melee_defense": {
|
||||
"type": "dr_multiplier",
|
||||
"multiplier": 3,
|
||||
"includes_shield": true,
|
||||
"description": "DR Tripled including Shield"
|
||||
},
|
||||
"arcane_spell_attack": {
|
||||
"type": "damage_multiplier",
|
||||
"multiplier": 3,
|
||||
"description": "Triple Damage on Spell Damage"
|
||||
},
|
||||
"arcane_spell_defense": {
|
||||
"type": "bonus_dice",
|
||||
"dice": "D12",
|
||||
"target": "spell_defense",
|
||||
"description": "D12 Added to Spell Defense Modifier"
|
||||
},
|
||||
"ranged_defense": {
|
||||
"type": "dr_multiplier",
|
||||
"multiplier": 3,
|
||||
"includes_shield": true,
|
||||
"description": "DR Tripled including Shield"
|
||||
}
|
||||
},
|
||||
"2": {
|
||||
"melee_attack": "Double Damage",
|
||||
"ranged_attack": "Double Damage",
|
||||
"melee_defense": "DR Doubled including Shield",
|
||||
"arcane_spell_attack": "Double Damage on Spell Damage",
|
||||
"arcane_spell_defense": "D6 Added to Spell Defense Modifier",
|
||||
"skill_rolls": "empty"
|
||||
"melee_attack": {
|
||||
"type": "damage_multiplier",
|
||||
"multiplier": 2,
|
||||
"description": "Double Damage"
|
||||
},
|
||||
"ranged_attack": {
|
||||
"type": "damage_multiplier",
|
||||
"multiplier": 2,
|
||||
"description": "Double Damage"
|
||||
},
|
||||
"melee_defense": {
|
||||
"type": "dr_multiplier",
|
||||
"multiplier": 2,
|
||||
"includes_shield": true,
|
||||
"description": "DR Doubled including Shield"
|
||||
},
|
||||
"arcane_spell_attack": {
|
||||
"type": "damage_multiplier",
|
||||
"multiplier": 2,
|
||||
"description": "Double Damage on Spell Damage"
|
||||
},
|
||||
"arcane_spell_defense": {
|
||||
"type": "bonus_dice",
|
||||
"dice": "D6",
|
||||
"target": "spell_defense",
|
||||
"description": "D6 Added to Spell Defense Modifier"
|
||||
},
|
||||
"ranged_defense": {
|
||||
"type": "dr_multiplier",
|
||||
"multiplier": 2,
|
||||
"includes_shield": true,
|
||||
"description": "DR Doubled including Shield"
|
||||
}
|
||||
},
|
||||
"1": {
|
||||
"melee_attack": "empty",
|
||||
"ranged_attack": "Possible Fumble Ranged ammo is broken unrecoverable",
|
||||
"melee_defense": "empty",
|
||||
"arcane_spell_attack": "Possible Spell Calamity or Catastrophe",
|
||||
"arcane_spell_defense": "empty",
|
||||
"skill_rolls": "empty"
|
||||
"ranged_attack": {
|
||||
"type": "fumble",
|
||||
"detail": "ranged_ammo_broken",
|
||||
"description": "Possible Fumble Ranged ammo is broken unrecoverable"
|
||||
},
|
||||
"arcane_spell_attack": {
|
||||
"type": "spell_calamity",
|
||||
"description": "Possible Spell Calamity or Catastrophe"
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"flash_of_pain": "Causes the victim to defend with disfavor. They can only walk and cannot attack, cast spells, call miracles or perform skills.",
|
||||
"shield_destruction_condition": "Occurs only if damage exceeds the shields DR."
|
||||
"flash_of_pain": "Causes the victim to defend against melee and spell attacks with disfavor. They can only walk and cannot attack, cast spells, call miracles or perform skills.",
|
||||
"shield_destruction_condition": "Shield destruction occurs only if damage exceeds the shields DR.",
|
||||
"matching_30s": "Matching 30s on skill rolls cancel each other out and is resolved by the skill roll.",
|
||||
"skill_roll_30": "A 30 on a skill roll indicates success at highest level of the skill involved."
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -193,6 +193,7 @@ export const DICE_VALUES = {
|
||||
export const CHARACTERISTIC_ATTACK = ["str", "int", "wis", "dex"]
|
||||
export const CHARACTERISTIC_RANGED_ATTACK = ["int", "wis", "dex"]
|
||||
export const CHARACTERISTIC_DEFENSE = ["int", "wis", "dex"]
|
||||
export const CHARACTERISTIC_RANGED_DEFENSE = ["int", "wis", "dex"]
|
||||
export const CHARACTERISTIC_DAMAGE = ["str"]
|
||||
|
||||
export const DEFENSE_DICE_VALUES = {
|
||||
@@ -304,6 +305,7 @@ export const SYSTEM = {
|
||||
CHARACTERISTIC_ATTACK,
|
||||
CHARACTERISTIC_RANGED_ATTACK,
|
||||
CHARACTERISTIC_DEFENSE,
|
||||
CHARACTERISTIC_RANGED_DEFENSE,
|
||||
CHARACTERISTIC_DAMAGE,
|
||||
INITIATIVE_DICE_CHOICES_PER_CLASS,
|
||||
CHAR_CLASSES,
|
||||
|
||||
@@ -256,6 +256,8 @@ export default class LethalFantasyActor extends Actor {
|
||||
if (rollType === "weapon-defense") {
|
||||
rollTarget.armorDefense = this.getArmorDefenseValue()
|
||||
rollTarget.grantedDice = this.system.granted.defenseDice
|
||||
// Check if this is a ranged defense
|
||||
rollTarget.isRangedDefense = game.lethalFantasy?.nextDefenseData?.isRanged ?? false
|
||||
}
|
||||
}
|
||||
break
|
||||
|
||||
@@ -22,6 +22,7 @@ export default class D30Roll {
|
||||
MELEE_ATTACK: "melee_attack",
|
||||
RANGED_ATTACK: "ranged_attack",
|
||||
MELEE_DEFENSE: "melee_defense",
|
||||
RANGED_DEFENSE: "ranged_defense",
|
||||
ARCANE_SPELL_ATTACK: "arcane_spell_attack",
|
||||
ARCANE_SPELL_DEFENSE: "arcane_spell_defense",
|
||||
SKILL_ROLLS: "skill_rolls"
|
||||
@@ -47,26 +48,26 @@ export default class D30Roll {
|
||||
}
|
||||
|
||||
/**
|
||||
* Récupère le résultat d'un jet de D30
|
||||
* Récupère le résultat d'un jet de D30 sous forme d'objet structuré.
|
||||
* @param {number} diceValue La valeur du dé (1-30)
|
||||
* @param {string} rollType Le type de jet externe (ex: "weapon-attack", "spell-attack", etc.)
|
||||
* @param {Object} weapon L'arme ou l'objet utilisé (optionnel, nécessaire pour certains types)
|
||||
* @returns {string|null} Le résultat correspondant ou null si vide/non trouvé
|
||||
* @param {Object} options Options supplémentaires (optionnel)
|
||||
* @param {boolean} options.isRanged Si true, utilise ranged_defense au lieu de melee_defense
|
||||
* @returns {Object|null} L'objet effet `{ type, description, ...fields }` ou null si aucun effet
|
||||
*/
|
||||
static getResult(diceValue, rollType, weapon = null) {
|
||||
static getResult(diceValue, rollType, weapon = null, options = {}) {
|
||||
if (!this.resultsTable) {
|
||||
console.warn("D30Roll | Results table is not initialized. Call D30Roll.initialize() first.")
|
||||
return null
|
||||
}
|
||||
|
||||
// Validation des paramètres
|
||||
if (diceValue < 1 || diceValue > 30) {
|
||||
console.warn(`D30Roll | Invalid dice value: ${diceValue}. Must be between 1 and 30.`)
|
||||
return null
|
||||
}
|
||||
|
||||
// Convert external rollType to internal rollType
|
||||
const internalType = this.convertToInternalType(rollType, weapon)
|
||||
const internalType = this.convertToInternalType(rollType, weapon, options)
|
||||
|
||||
if (!internalType) {
|
||||
console.warn(`D30Roll | Could not convert roll type: ${rollType}`)
|
||||
@@ -85,22 +86,27 @@ export default class D30Roll {
|
||||
}
|
||||
|
||||
const result = resultEntry[internalType]
|
||||
return result ?? null
|
||||
}
|
||||
|
||||
// Retourne null si le résultat est "empty"
|
||||
if (result === "empty" || !result) {
|
||||
return null
|
||||
}
|
||||
|
||||
return result
|
||||
/**
|
||||
* Retourne le type d'effet d'un résultat D30.
|
||||
* @param {Object|null} result L'objet retourné par getResult()
|
||||
* @returns {string|null} Le type d'effet ou null
|
||||
*/
|
||||
static getEffectType(result) {
|
||||
return result?.type ?? null
|
||||
}
|
||||
|
||||
/**
|
||||
* Convertit un rollType externe en rollType interne
|
||||
* @param {string} externalType Le type de jet externe (ex: "weapon-attack")
|
||||
* @param {Object} weapon L'arme ou l'objet utilisé (optionnel)
|
||||
* @param {Object} options Options supplémentaires (optionnel)
|
||||
* @param {boolean} options.isRanged Si true, utilise ranged_defense au lieu de melee_defense
|
||||
* @returns {string|null} Le type interne correspondant ou null
|
||||
*/
|
||||
static convertToInternalType(externalType, weapon = null) {
|
||||
static convertToInternalType(externalType, weapon = null, options = {}) {
|
||||
// Attack types - need weapon to determine if melee or ranged
|
||||
if (externalType === "weapon-attack") {
|
||||
if (!weapon) {
|
||||
@@ -123,7 +129,7 @@ export default class D30Roll {
|
||||
|
||||
// Defense types
|
||||
if (externalType === "weapon-defense" || externalType === "monster-defense") {
|
||||
return this.ROLL_TYPES.MELEE_DEFENSE
|
||||
return options.isRanged ? this.ROLL_TYPES.RANGED_DEFENSE : this.ROLL_TYPES.MELEE_DEFENSE
|
||||
}
|
||||
|
||||
// Spell types
|
||||
@@ -177,11 +183,11 @@ export default class D30Roll {
|
||||
|
||||
/**
|
||||
* Vérifie si un résultat est vide
|
||||
* @param {string} result Le résultat à vérifier
|
||||
* @param {Object|null} result Le résultat à vérifier
|
||||
* @returns {boolean} True si le résultat est vide
|
||||
*/
|
||||
static isEmptyResult(result) {
|
||||
return !result || result === "empty"
|
||||
return !result || !result.type
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -189,11 +195,12 @@ export default class D30Roll {
|
||||
* @param {number} diceValue La valeur du dé (1-30)
|
||||
* @param {string} rollType Le type de jet externe
|
||||
* @param {Object} weapon L'arme ou l'objet utilisé (optionnel)
|
||||
* @param {Object} options Options supplémentaires (optionnel)
|
||||
* @returns {Object} Un objet avec le résultat et des informations de formatage
|
||||
*/
|
||||
static getFormattedResult(diceValue, rollType, weapon = null) {
|
||||
const result = this.getResult(diceValue, rollType, weapon)
|
||||
const internalType = this.convertToInternalType(rollType, weapon)
|
||||
static getFormattedResult(diceValue, rollType, weapon = null, options = {}) {
|
||||
const result = this.getResult(diceValue, rollType, weapon, options)
|
||||
const internalType = this.convertToInternalType(rollType, weapon, options)
|
||||
|
||||
return {
|
||||
value: diceValue,
|
||||
|
||||
@@ -182,6 +182,7 @@ export default class LethalFantasyRoll extends Roll {
|
||||
} else {
|
||||
options.rollTarget.value = options.rollTarget.defenseModifier
|
||||
options.rollTarget.charModifier = 0
|
||||
options.isRangedDefense = options.rollTarget.isRangedDefense ?? false
|
||||
}
|
||||
|
||||
} else if (options.rollType === "monster-skill") {
|
||||
@@ -219,8 +220,14 @@ export default class LethalFantasyRoll extends Roll {
|
||||
options.rollTarget.charModifier = options.rollTarget.combat.rangedAttackModifier
|
||||
}
|
||||
} else {
|
||||
options.rollTarget.value = options.rollTarget.combat.defenseModifier + options.rollTarget.weaponSkillModifier + options.rollTarget.weapon.system.bonuses.defenseBonus + options.rollTarget.armorDefense
|
||||
options.rollTarget.charModifier = options.rollTarget.combat.defenseModifier
|
||||
// For defense, check if it's a ranged defense
|
||||
const defenseModifier = options.rollTarget.isRangedDefense
|
||||
? options.rollTarget.combat.rangedDefenseModifier
|
||||
: options.rollTarget.combat.defenseModifier
|
||||
options.rollTarget.value = defenseModifier + options.rollTarget.weaponSkillModifier + options.rollTarget.weapon.system.bonuses.defenseBonus + options.rollTarget.armorDefense
|
||||
options.rollTarget.charModifier = defenseModifier
|
||||
// Store isRanged flag for D30 lookup
|
||||
options.isRangedDefense = options.rollTarget.isRangedDefense
|
||||
}
|
||||
|
||||
} else if (options.rollType === "spell" || options.rollType === "spell-attack" || options.rollType === "spell-power") {
|
||||
@@ -577,7 +584,8 @@ export default class LethalFantasyRoll extends Roll {
|
||||
const d30Message = D30Roll.getResult(
|
||||
rollD30.total,
|
||||
options.rollType,
|
||||
options.rollTarget?.weapon
|
||||
options.rollTarget?.weapon,
|
||||
{ isRanged: options.isRangedDefense }
|
||||
)
|
||||
options.D30message = d30Message
|
||||
}
|
||||
@@ -1105,6 +1113,7 @@ export default class LethalFantasyRoll extends Roll {
|
||||
// Merge rollContext object into options object
|
||||
options = { ...options, ...rollContext }
|
||||
options.rollName = "Ranged Defense"
|
||||
options.rollType = "weapon-defense"
|
||||
|
||||
const rollBase = new this(rollContext.movement, options.data, rollData)
|
||||
const rollModifier = new Roll(modifierFormula, options.data, rollData)
|
||||
@@ -1112,6 +1121,7 @@ export default class LethalFantasyRoll extends Roll {
|
||||
await rollBase.evaluate()
|
||||
let rollD30 = await new Roll("1D30").evaluate()
|
||||
options.D30result = rollD30.total
|
||||
options.D30message = D30Roll.getResult(rollD30.total, options.rollType, options.rollTarget?.weapon, { isRanged: true })
|
||||
|
||||
let badResult = 0
|
||||
if (rollContext.movement.includes("kh")) {
|
||||
@@ -1154,6 +1164,7 @@ export default class LethalFantasyRoll extends Roll {
|
||||
rollBase.options.rollTarget = options.rollTarget
|
||||
rollBase.options.titleFormula = `1D20E + ${modifierFormula}`
|
||||
rollBase.options.D30result = options.D30result
|
||||
rollBase.options.D30message = options.D30message
|
||||
rollBase.options.rollName = "Ranged Defense"
|
||||
rollBase.options.badResult = badResult
|
||||
rollBase.options.rollData = foundry.utils.duplicate(rollData)
|
||||
|
||||
@@ -152,6 +152,7 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod
|
||||
attackModifier: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
|
||||
rangedAttackModifier: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
|
||||
defenseModifier: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
|
||||
rangedDefenseModifier: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
|
||||
defenseBonus: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
|
||||
damageModifier: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
|
||||
armorHitPoints: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
|
||||
@@ -259,6 +260,12 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod
|
||||
this.combat.defenseModifier += chaDef.defense
|
||||
}
|
||||
|
||||
this.combat.rangedDefenseModifier = this.combat.defenseBonus
|
||||
for (let chaKey of SYSTEM.CHARACTERISTIC_RANGED_DEFENSE) {
|
||||
let chaDef = SYSTEM.CHARACTERISTICS_TABLES[chaKey].find(s => s.value === this.characteristics[chaKey].value)
|
||||
this.combat.rangedDefenseModifier += chaDef.defense
|
||||
}
|
||||
|
||||
this.combat.damageModifier = 0
|
||||
for (let chaKey of SYSTEM.CHARACTERISTIC_DAMAGE) {
|
||||
let chaDef = SYSTEM.CHARACTERISTICS_TABLES[chaKey].find(s => s.value === this.characteristics[chaKey].value)
|
||||
|
||||
@@ -127,6 +127,19 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
|
||||
attack2: attackField("2")
|
||||
})
|
||||
|
||||
schema.attackMode = new fields.StringField({
|
||||
required: true,
|
||||
nullable: false,
|
||||
initial: "melee",
|
||||
choices: { melee: "Melee", ranged: "Ranged" }
|
||||
})
|
||||
|
||||
schema.rangedAttacks = new fields.SchemaField({
|
||||
attack1: attackField("1"),
|
||||
attack2: attackField("2"),
|
||||
attack3: attackField("3"),
|
||||
attack4: attackField("4")
|
||||
})
|
||||
|
||||
return schema
|
||||
}
|
||||
@@ -165,14 +178,19 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
|
||||
switch (rollType) {
|
||||
case "monster-attack":
|
||||
case "monster-defense":
|
||||
case "monster-damage":
|
||||
rollTarget = foundry.utils.duplicate(this.attacks[rollKey])
|
||||
case "monster-damage": {
|
||||
const attacksSet = this.attackMode === "ranged" ? this.rangedAttacks : this.attacks
|
||||
rollTarget = foundry.utils.duplicate(attacksSet[rollKey])
|
||||
rollTarget.rollKey = rollKey
|
||||
if (rollType === "monster-defense") {
|
||||
rollTarget.isRangedDefense = game.lethalFantasy?.nextDefenseData?.isRanged ?? false
|
||||
}
|
||||
// Si damageModifier est fourni (depuis le chat), l'utiliser au lieu de celui de la fiche
|
||||
if (damageModifier !== undefined && rollType === "monster-damage") {
|
||||
rollTarget.damageModifier = damageModifier
|
||||
}
|
||||
break
|
||||
}
|
||||
case "monster-attack-hth":
|
||||
case "monster-defense-hth":
|
||||
case "monster-damage-hth":
|
||||
@@ -304,8 +322,9 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
|
||||
}
|
||||
|
||||
let hasAttack = false
|
||||
for (let key in this.attacks) {
|
||||
let attack = this.attacks[key]
|
||||
const attacksSet = this.attackMode === "ranged" ? this.rangedAttacks : this.attacks
|
||||
for (let key in attacksSet) {
|
||||
let attack = attacksSet[key]
|
||||
if (attack.enabled && attack.attackScore > 0 && attack.attackScore === roll.total) {
|
||||
hasAttack = true
|
||||
const messageContent = await foundry.applications.handlebars.renderTemplate(
|
||||
|
||||
+79
-4
@@ -235,6 +235,8 @@ export default class LethalFantasyUtils {
|
||||
|
||||
const isMonster = defender.type === "monster"
|
||||
|
||||
console.log(`[LF] showDefenseRequest | attackRollType=${attackRollType} isMonster=${isMonster} defender=${defender?.name}`)
|
||||
|
||||
// Spell/miracle attacks use saving throws instead of weapon defense
|
||||
const isSpellAttack = attackRollType === "spell-attack" || attackRollType === "miracle-attack"
|
||||
if (isSpellAttack) {
|
||||
@@ -266,6 +268,7 @@ export default class LethalFantasyUtils {
|
||||
content,
|
||||
buttons: [
|
||||
{
|
||||
action: "rollSave",
|
||||
label: "Roll Save",
|
||||
icon: "fa-solid fa-person-running",
|
||||
callback: (event, button) => button.form.elements.saveKey.value,
|
||||
@@ -301,7 +304,8 @@ export default class LethalFantasyUtils {
|
||||
|
||||
// Pour les monstres, récupérer les attaques activées
|
||||
if (isMonster) {
|
||||
const enabledAttacks = Object.entries(defender.system.attacks).filter(([key, attack]) => attack.enabled)
|
||||
const attacksSet = defender.system.attackMode === "ranged" ? defender.system.rangedAttacks : defender.system.attacks
|
||||
const enabledAttacks = Object.entries(attacksSet).filter(([key, attack]) => attack.enabled)
|
||||
|
||||
if (enabledAttacks.length === 0) {
|
||||
ui.notifications.warn("No enabled attacks available for defense")
|
||||
@@ -362,7 +366,8 @@ export default class LethalFantasyUtils {
|
||||
attackD30message,
|
||||
attackRerollContext,
|
||||
defenderId: defender.id,
|
||||
defenderTokenId
|
||||
defenderTokenId,
|
||||
isRanged: msg.isRanged
|
||||
}
|
||||
|
||||
defender.system.prepareMonsterRoll("monster-defense", result)
|
||||
@@ -434,7 +439,8 @@ export default class LethalFantasyUtils {
|
||||
attackD30message,
|
||||
attackRerollContext,
|
||||
defenderId: defender.id,
|
||||
defenderTokenId
|
||||
defenderTokenId,
|
||||
isRanged: msg.isRanged
|
||||
}
|
||||
|
||||
console.log("Storing defense data for character:", defender.id)
|
||||
@@ -445,7 +451,7 @@ export default class LethalFantasyUtils {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static hasD30Reroll(d30Message) {
|
||||
return /mulligan|re-?roll/i.test(d30Message || "")
|
||||
return d30Message?.type === "mulligan"
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@@ -524,6 +530,75 @@ export default class LethalFantasyUtils {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/**
|
||||
* Prompt the GM or player to choose an ad-hoc shield dice and DR value.
|
||||
* Used when the defender has no pre-configured shield equipment.
|
||||
* @param {string} defenderName
|
||||
* @param {number} attackRoll
|
||||
* @param {number} defenseRoll
|
||||
* @returns {Promise<{formula: string, damageReduction: number}|null>}
|
||||
*/
|
||||
static async promptAdHocShield(defenderName, attackRoll, defenseRoll) {
|
||||
const choices = this.getCombatBonusDiceChoices()
|
||||
const optionsHtml = choices.map(c => `<option value="${c}">${c.toUpperCase()}</option>`).join("")
|
||||
const content = `
|
||||
<div class="grit-luck-dialog">
|
||||
<div class="combat-status">
|
||||
<p><strong>${defenderName}</strong> uses a shield (not equipped)</p>
|
||||
<p>Attack: <strong>${attackRoll}</strong> — Current defense: <strong>${defenseRoll}</strong></p>
|
||||
</div>
|
||||
<div class="weapon-selection" style="margin-top:8px;">
|
||||
<label for="shield-dice">Shield dice:</label>
|
||||
<select id="shield-dice" name="shieldDice" style="width: 100%; margin-top: 4px;">
|
||||
${optionsHtml}
|
||||
</select>
|
||||
</div>
|
||||
<div class="weapon-selection" style="margin-top:8px;">
|
||||
<label for="shield-dr">Shield DR value:</label>
|
||||
<input id="shield-dr" name="shieldDR" type="number" min="0" value="0" style="width: 100%; margin-top: 4px;" />
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
|
||||
const raw = await foundry.applications.api.DialogV2.wait({
|
||||
window: { title: "Ad-hoc Shield Roll" },
|
||||
classes: ["lethalfantasy"],
|
||||
content,
|
||||
buttons: [
|
||||
{
|
||||
action: "roll",
|
||||
label: "Roll Shield",
|
||||
icon: "fa-solid fa-shield",
|
||||
callback: (event, button) => {
|
||||
const shieldDice = button.form?.elements?.shieldDice ?? button.closest("form")?.elements?.shieldDice
|
||||
const shieldDR = button.form?.elements?.shieldDR ?? button.closest("form")?.elements?.shieldDR
|
||||
return {
|
||||
formula: shieldDice?.value ?? "1d6",
|
||||
damageReduction: Number(shieldDR?.value) || 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
action: "cancel",
|
||||
label: "Cancel",
|
||||
icon: "fa-solid fa-xmark",
|
||||
callback: () => null
|
||||
}
|
||||
],
|
||||
rejectClose: false
|
||||
})
|
||||
|
||||
return raw ?? null
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/**
|
||||
* Roll a bonus die formula, optionally showing Dice So Nice animation and posting a chat message.
|
||||
* @param {string} formula
|
||||
* @param {Actor} actor
|
||||
* @param {Function} [messageContent]
|
||||
* @returns {Promise<number>}
|
||||
*/
|
||||
static async rollBonusDie(formula, actor, messageContent) {
|
||||
const roll = new Roll(formula)
|
||||
await roll.evaluate()
|
||||
|
||||
@@ -1 +1 @@
|
||||
MANIFEST-000559
|
||||
MANIFEST-000579
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2026/04/14-20:54:14.172569 7fc1dafbf6c0 Recovering log #557
|
||||
2026/04/14-20:54:14.184089 7fc1dafbf6c0 Delete type=3 #555
|
||||
2026/04/14-20:54:14.184186 7fc1dafbf6c0 Delete type=0 #557
|
||||
2026/04/14-21:31:09.240081 7fc1d8fbb6c0 Level-0 table #562: started
|
||||
2026/04/14-21:31:09.240104 7fc1d8fbb6c0 Level-0 table #562: 0 bytes OK
|
||||
2026/04/14-21:31:09.273756 7fc1d8fbb6c0 Delete type=0 #560
|
||||
2026/04/14-21:31:09.274050 7fc1d8fbb6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
|
||||
2026/04/14-21:31:09.274107 7fc1d8fbb6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
|
||||
2026/04/30-14:38:06.808992 7f3f35bff6c0 Recovering log #577
|
||||
2026/04/30-14:38:06.818757 7f3f35bff6c0 Delete type=3 #575
|
||||
2026/04/30-14:38:06.818831 7f3f35bff6c0 Delete type=0 #577
|
||||
2026/04/30-14:38:35.518816 7f3ee77fe6c0 Level-0 table #582: started
|
||||
2026/04/30-14:38:35.518836 7f3ee77fe6c0 Level-0 table #582: 0 bytes OK
|
||||
2026/04/30-14:38:35.525869 7f3ee77fe6c0 Delete type=0 #580
|
||||
2026/04/30-14:38:35.538258 7f3ee77fe6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
|
||||
2026/04/30-14:38:35.538288 7f3ee77fe6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2026/04/12-10:10:03.851531 7f20ed3fd6c0 Recovering log #553
|
||||
2026/04/12-10:10:03.861282 7f20ed3fd6c0 Delete type=3 #551
|
||||
2026/04/12-10:10:03.861341 7f20ed3fd6c0 Delete type=0 #553
|
||||
2026/04/12-11:08:03.389691 7f1e4ffff6c0 Level-0 table #558: started
|
||||
2026/04/12-11:08:03.389742 7f1e4ffff6c0 Level-0 table #558: 0 bytes OK
|
||||
2026/04/12-11:08:03.395757 7f1e4ffff6c0 Delete type=0 #556
|
||||
2026/04/12-11:08:03.415391 7f1e4ffff6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
|
||||
2026/04/12-11:08:03.415438 7f1e4ffff6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
|
||||
2026/04/29-20:13:54.005832 7fed937fe6c0 Recovering log #573
|
||||
2026/04/29-20:13:54.016172 7fed937fe6c0 Delete type=3 #571
|
||||
2026/04/29-20:13:54.016279 7fed937fe6c0 Delete type=0 #573
|
||||
2026/04/29-20:27:06.418200 7feb10fff6c0 Level-0 table #578: started
|
||||
2026/04/29-20:27:06.418231 7feb10fff6c0 Level-0 table #578: 0 bytes OK
|
||||
2026/04/29-20:27:06.424568 7feb10fff6c0 Delete type=0 #576
|
||||
2026/04/29-20:27:06.431809 7feb10fff6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
|
||||
2026/04/29-20:27:06.431871 7feb10fff6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
|
||||
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
MANIFEST-000556
|
||||
MANIFEST-000576
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2026/04/14-20:54:14.189613 7fc1d9fbd6c0 Recovering log #554
|
||||
2026/04/14-20:54:14.199454 7fc1d9fbd6c0 Delete type=3 #552
|
||||
2026/04/14-20:54:14.199515 7fc1d9fbd6c0 Delete type=0 #554
|
||||
2026/04/14-21:31:09.274309 7fc1d8fbb6c0 Level-0 table #559: started
|
||||
2026/04/14-21:31:09.274344 7fc1d8fbb6c0 Level-0 table #559: 0 bytes OK
|
||||
2026/04/14-21:31:09.316123 7fc1d8fbb6c0 Delete type=0 #557
|
||||
2026/04/14-21:31:09.426109 7fc1d8fbb6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
|
||||
2026/04/14-21:31:09.426138 7fc1d8fbb6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
|
||||
2026/04/30-14:38:06.823818 7f3f353fe6c0 Recovering log #574
|
||||
2026/04/30-14:38:06.834104 7f3f353fe6c0 Delete type=3 #572
|
||||
2026/04/30-14:38:06.834187 7f3f353fe6c0 Delete type=0 #574
|
||||
2026/04/30-14:38:35.525993 7f3ee77fe6c0 Level-0 table #579: started
|
||||
2026/04/30-14:38:35.526019 7f3ee77fe6c0 Level-0 table #579: 0 bytes OK
|
||||
2026/04/30-14:38:35.532067 7f3ee77fe6c0 Delete type=0 #577
|
||||
2026/04/30-14:38:35.538267 7f3ee77fe6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
|
||||
2026/04/30-14:38:35.538302 7f3ee77fe6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2026/04/12-10:10:03.864565 7f20ecbfc6c0 Recovering log #550
|
||||
2026/04/12-10:10:03.875268 7f20ecbfc6c0 Delete type=3 #548
|
||||
2026/04/12-10:10:03.875332 7f20ecbfc6c0 Delete type=0 #550
|
||||
2026/04/12-11:08:03.395874 7f1e4ffff6c0 Level-0 table #555: started
|
||||
2026/04/12-11:08:03.395896 7f1e4ffff6c0 Level-0 table #555: 0 bytes OK
|
||||
2026/04/12-11:08:03.401955 7f1e4ffff6c0 Delete type=0 #553
|
||||
2026/04/12-11:08:03.415404 7f1e4ffff6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
|
||||
2026/04/12-11:08:03.415431 7f1e4ffff6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
|
||||
2026/04/29-20:13:54.023030 7fed93fff6c0 Recovering log #570
|
||||
2026/04/29-20:13:54.032615 7fed93fff6c0 Delete type=3 #568
|
||||
2026/04/29-20:13:54.032677 7fed93fff6c0 Delete type=0 #570
|
||||
2026/04/29-20:27:06.286266 7feb10fff6c0 Level-0 table #575: started
|
||||
2026/04/29-20:27:06.286286 7feb10fff6c0 Level-0 table #575: 0 bytes OK
|
||||
2026/04/29-20:27:06.292048 7feb10fff6c0 Delete type=0 #573
|
||||
2026/04/29-20:27:06.299186 7feb10fff6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
|
||||
2026/04/29-20:27:06.299236 7feb10fff6c0 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-000561
|
||||
MANIFEST-000581
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2026/04/14-20:54:14.156150 7fc1d97bc6c0 Recovering log #559
|
||||
2026/04/14-20:54:14.166976 7fc1d97bc6c0 Delete type=3 #557
|
||||
2026/04/14-20:54:14.167099 7fc1d97bc6c0 Delete type=0 #559
|
||||
2026/04/14-21:31:09.203242 7fc1d8fbb6c0 Level-0 table #564: started
|
||||
2026/04/14-21:31:09.203283 7fc1d8fbb6c0 Level-0 table #564: 0 bytes OK
|
||||
2026/04/14-21:31:09.239957 7fc1d8fbb6c0 Delete type=0 #562
|
||||
2026/04/14-21:31:09.274032 7fc1d8fbb6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
|
||||
2026/04/14-21:31:09.274121 7fc1d8fbb6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
|
||||
2026/04/30-14:38:06.795186 7f3f353fe6c0 Recovering log #579
|
||||
2026/04/30-14:38:06.805935 7f3f353fe6c0 Delete type=3 #577
|
||||
2026/04/30-14:38:06.805994 7f3f353fe6c0 Delete type=0 #579
|
||||
2026/04/30-14:38:35.512680 7f3ee77fe6c0 Level-0 table #584: started
|
||||
2026/04/30-14:38:35.512729 7f3ee77fe6c0 Level-0 table #584: 0 bytes OK
|
||||
2026/04/30-14:38:35.518704 7f3ee77fe6c0 Delete type=0 #582
|
||||
2026/04/30-14:38:35.538247 7f3ee77fe6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
|
||||
2026/04/30-14:38:35.538281 7f3ee77fe6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2026/04/12-10:10:03.838632 7f20ee3ff6c0 Recovering log #555
|
||||
2026/04/12-10:10:03.848360 7f20ee3ff6c0 Delete type=3 #553
|
||||
2026/04/12-10:10:03.848406 7f20ee3ff6c0 Delete type=0 #555
|
||||
2026/04/12-11:08:03.402029 7f1e4ffff6c0 Level-0 table #560: started
|
||||
2026/04/12-11:08:03.402048 7f1e4ffff6c0 Level-0 table #560: 0 bytes OK
|
||||
2026/04/12-11:08:03.408790 7f1e4ffff6c0 Delete type=0 #558
|
||||
2026/04/12-11:08:03.415414 7f1e4ffff6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
|
||||
2026/04/12-11:08:03.415454 7f1e4ffff6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
|
||||
2026/04/29-20:13:53.990808 7fed927fc6c0 Recovering log #575
|
||||
2026/04/29-20:13:54.001559 7fed927fc6c0 Delete type=3 #573
|
||||
2026/04/29-20:13:54.001699 7fed927fc6c0 Delete type=0 #575
|
||||
2026/04/29-20:27:06.273802 7feb10fff6c0 Level-0 table #580: started
|
||||
2026/04/29-20:27:06.273877 7feb10fff6c0 Level-0 table #580: 0 bytes OK
|
||||
2026/04/29-20:27:06.280252 7feb10fff6c0 Delete type=0 #578
|
||||
2026/04/29-20:27:06.299161 7feb10fff6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
|
||||
2026/04/29-20:27:06.299217 7feb10fff6c0 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-000256
|
||||
MANIFEST-000276
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2026/04/14-20:54:14.216969 7fc1d97bc6c0 Recovering log #254
|
||||
2026/04/14-20:54:14.226830 7fc1d97bc6c0 Delete type=3 #252
|
||||
2026/04/14-20:54:14.226876 7fc1d97bc6c0 Delete type=0 #254
|
||||
2026/04/14-21:31:09.316377 7fc1d8fbb6c0 Level-0 table #259: started
|
||||
2026/04/14-21:31:09.316424 7fc1d8fbb6c0 Level-0 table #259: 0 bytes OK
|
||||
2026/04/14-21:31:09.353574 7fc1d8fbb6c0 Delete type=0 #257
|
||||
2026/04/14-21:31:09.426120 7fc1d8fbb6c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
|
||||
2026/04/14-21:31:09.426154 7fc1d8fbb6c0 Manual compaction at level-1 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
|
||||
2026/04/30-14:38:06.849252 7f3f353fe6c0 Recovering log #274
|
||||
2026/04/30-14:38:06.859072 7f3f353fe6c0 Delete type=3 #272
|
||||
2026/04/30-14:38:06.859126 7f3f353fe6c0 Delete type=0 #274
|
||||
2026/04/30-14:38:35.538433 7f3ee77fe6c0 Level-0 table #279: started
|
||||
2026/04/30-14:38:35.538452 7f3ee77fe6c0 Level-0 table #279: 0 bytes OK
|
||||
2026/04/30-14:38:35.544715 7f3ee77fe6c0 Delete type=0 #277
|
||||
2026/04/30-14:38:35.567736 7f3ee77fe6c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
|
||||
2026/04/30-14:38:35.567785 7f3ee77fe6c0 Manual compaction at level-1 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2026/04/12-10:10:03.889781 7f20ed3fd6c0 Recovering log #250
|
||||
2026/04/12-10:10:03.899549 7f20ed3fd6c0 Delete type=3 #248
|
||||
2026/04/12-10:10:03.899595 7f20ed3fd6c0 Delete type=0 #250
|
||||
2026/04/12-11:08:03.421462 7f1e4ffff6c0 Level-0 table #255: started
|
||||
2026/04/12-11:08:03.421486 7f1e4ffff6c0 Level-0 table #255: 0 bytes OK
|
||||
2026/04/12-11:08:03.427527 7f1e4ffff6c0 Delete type=0 #253
|
||||
2026/04/12-11:08:03.443589 7f1e4ffff6c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
|
||||
2026/04/12-11:08:03.443624 7f1e4ffff6c0 Manual compaction at level-1 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
|
||||
2026/04/29-20:13:54.051682 7fed937fe6c0 Recovering log #270
|
||||
2026/04/29-20:13:54.062010 7fed937fe6c0 Delete type=3 #268
|
||||
2026/04/29-20:13:54.062071 7fed937fe6c0 Delete type=0 #270
|
||||
2026/04/29-20:27:06.292128 7feb10fff6c0 Level-0 table #275: started
|
||||
2026/04/29-20:27:06.292152 7feb10fff6c0 Level-0 table #275: 0 bytes OK
|
||||
2026/04/29-20:27:06.299041 7feb10fff6c0 Delete type=0 #273
|
||||
2026/04/29-20:27:06.299199 7feb10fff6c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
|
||||
2026/04/29-20:27:06.299226 7feb10fff6c0 Manual compaction at level-1 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
|
||||
|
||||
BIN
Binary file not shown.
@@ -1 +1 @@
|
||||
MANIFEST-000555
|
||||
MANIFEST-000575
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2026/04/14-20:54:14.202677 7fc1da7be6c0 Recovering log #553
|
||||
2026/04/14-20:54:14.213358 7fc1da7be6c0 Delete type=3 #551
|
||||
2026/04/14-20:54:14.213482 7fc1da7be6c0 Delete type=0 #553
|
||||
2026/04/14-21:31:09.160202 7fc1d8fbb6c0 Level-0 table #558: started
|
||||
2026/04/14-21:31:09.160283 7fc1d8fbb6c0 Level-0 table #558: 0 bytes OK
|
||||
2026/04/14-21:31:09.203034 7fc1d8fbb6c0 Delete type=0 #556
|
||||
2026/04/14-21:31:09.274014 7fc1d8fbb6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
|
||||
2026/04/14-21:31:09.274091 7fc1d8fbb6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
|
||||
2026/04/30-14:38:06.836968 7f3ee7fff6c0 Recovering log #573
|
||||
2026/04/30-14:38:06.846980 7f3ee7fff6c0 Delete type=3 #571
|
||||
2026/04/30-14:38:06.847050 7f3ee7fff6c0 Delete type=0 #573
|
||||
2026/04/30-14:38:35.532186 7f3ee77fe6c0 Level-0 table #578: started
|
||||
2026/04/30-14:38:35.532209 7f3ee77fe6c0 Level-0 table #578: 0 bytes OK
|
||||
2026/04/30-14:38:35.538132 7f3ee77fe6c0 Delete type=0 #576
|
||||
2026/04/30-14:38:35.538276 7f3ee77fe6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
|
||||
2026/04/30-14:38:35.538295 7f3ee77fe6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2026/04/12-10:10:03.877445 7f20ee3ff6c0 Recovering log #549
|
||||
2026/04/12-10:10:03.887615 7f20ee3ff6c0 Delete type=3 #547
|
||||
2026/04/12-10:10:03.887678 7f20ee3ff6c0 Delete type=0 #549
|
||||
2026/04/12-11:08:03.408913 7f1e4ffff6c0 Level-0 table #554: started
|
||||
2026/04/12-11:08:03.408942 7f1e4ffff6c0 Level-0 table #554: 0 bytes OK
|
||||
2026/04/12-11:08:03.415303 7f1e4ffff6c0 Delete type=0 #552
|
||||
2026/04/12-11:08:03.415422 7f1e4ffff6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
|
||||
2026/04/12-11:08:03.415446 7f1e4ffff6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
|
||||
2026/04/29-20:13:54.036694 7fed92ffd6c0 Recovering log #569
|
||||
2026/04/29-20:13:54.047834 7fed92ffd6c0 Delete type=3 #567
|
||||
2026/04/29-20:13:54.047922 7fed92ffd6c0 Delete type=0 #569
|
||||
2026/04/29-20:27:06.280338 7feb10fff6c0 Level-0 table #574: started
|
||||
2026/04/29-20:27:06.280357 7feb10fff6c0 Level-0 table #574: 0 bytes OK
|
||||
2026/04/29-20:27:06.286179 7feb10fff6c0 Delete type=0 #572
|
||||
2026/04/29-20:27:06.299174 7feb10fff6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
|
||||
2026/04/29-20:27:06.299209 7feb10fff6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
|
||||
|
||||
BIN
Binary file not shown.
+246
@@ -88,3 +88,249 @@
|
||||
padding-left: 8px;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
/* -------------------------------------------------- */
|
||||
/* Dice Tray — injected into the Foundry chat sidebar */
|
||||
/* -------------------------------------------------- */
|
||||
|
||||
.lf-dice-tray {
|
||||
padding: 6px 8px;
|
||||
background:
|
||||
linear-gradient(135deg, rgba(245, 232, 200, 0.97) 0%, rgba(238, 222, 185, 0.97) 100%),
|
||||
url("/systems/fvtt-lethal-fantasy/assets/ui/lethal_fantasy_background.webp") center / cover;
|
||||
border-top: 2px solid rgba(139, 69, 19, 0.5);
|
||||
border-bottom: 1px solid rgba(139, 69, 19, 0.25);
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
pointer-events: all;
|
||||
|
||||
.lf-dt-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.lf-dt-label {
|
||||
color: #3a2a10;
|
||||
font-size: 15px;
|
||||
flex-shrink: 0;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.lf-dt-count {
|
||||
width: 44px;
|
||||
flex-shrink: 0;
|
||||
padding: 3px 4px;
|
||||
background: rgba(139, 69, 19, 0.15);
|
||||
border: 1px solid rgba(139, 69, 19, 0.45);
|
||||
border-radius: 4px;
|
||||
color: #2a1a08;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
|
||||
option { background: #f5ead0; color: #2a1a08; }
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
border-color: rgba(139, 69, 19, 0.7);
|
||||
box-shadow: 0 0 4px rgba(139, 69, 19, 0.25);
|
||||
}
|
||||
}
|
||||
|
||||
.lf-dt-dice {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 3px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.lf-dt-die-btn {
|
||||
padding: 3px 7px;
|
||||
background: rgba(139, 69, 19, 0.15);
|
||||
border: 1px solid rgba(139, 69, 19, 0.4);
|
||||
border-radius: 4px;
|
||||
color: #2a1a08;
|
||||
font-size: 10px;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
|
||||
line-height: 1.5;
|
||||
letter-spacing: 0.3px;
|
||||
|
||||
&:hover {
|
||||
background: rgba(139, 69, 19, 0.35);
|
||||
border-color: rgba(139, 69, 19, 0.7);
|
||||
color: #5a2a00;
|
||||
box-shadow: 0 0 5px rgba(139, 69, 19, 0.3);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: translateY(0);
|
||||
box-shadow: none;
|
||||
background: rgba(139, 69, 19, 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
.lf-dt-explode-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 3px;
|
||||
cursor: pointer;
|
||||
color: rgba(160, 80, 20, 0.7);
|
||||
font-size: 14px;
|
||||
flex-shrink: 0;
|
||||
padding: 3px 6px;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 4px;
|
||||
transition: color 0.15s, border-color 0.15s, background 0.15s;
|
||||
|
||||
&:hover {
|
||||
color: rgba(200, 100, 30, 0.9);
|
||||
border-color: rgba(139, 69, 19, 0.45);
|
||||
background: rgba(139, 69, 19, 0.12);
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
appearance: none;
|
||||
width: 0;
|
||||
height: 0;
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
|
||||
&:checked ~ i {
|
||||
color: #cc4400;
|
||||
filter: drop-shadow(0 0 4px rgba(200, 80, 0, 0.6));
|
||||
}
|
||||
}
|
||||
|
||||
&:has(input:checked) {
|
||||
color: #cc4400;
|
||||
border-color: rgba(139, 69, 19, 0.55);
|
||||
background: rgba(139, 60, 10, 0.2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Free roll chat card — styled to match regular system roll cards */
|
||||
.lf-free-roll-card {
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
|
||||
.lf-frc-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 6px 8px;
|
||||
background: linear-gradient(135deg, rgba(40, 30, 20, 0.7) 0%, rgba(30, 22, 15, 0.9) 100%);
|
||||
border-bottom: 2px solid rgba(139, 69, 19, 0.4);
|
||||
|
||||
i { color: #c9b896; font-size: calc(var(--font-size-standard, 14px) * 1.1); }
|
||||
|
||||
.lf-frc-title-text {
|
||||
font-size: calc(var(--font-size-standard, 14px) * 0.85);
|
||||
color: #c9b896;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.lf-frc-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 2px 8px;
|
||||
background: rgba(139, 69, 19, 0.3);
|
||||
border: 1px solid rgba(139, 69, 19, 0.5);
|
||||
border-radius: 10px;
|
||||
font-size: calc(var(--font-size-standard, 14px) * 0.85);
|
||||
font-weight: 600;
|
||||
color: #d4c5a9;
|
||||
}
|
||||
}
|
||||
|
||||
.lf-frc-dice {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
padding: 6px 8px;
|
||||
background: rgba(0, 0, 0, 0.15);
|
||||
border: 1px solid rgba(139, 69, 19, 0.3);
|
||||
border-top: none;
|
||||
|
||||
.lf-frc-die-chip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 3px 8px;
|
||||
background: rgba(139, 69, 19, 0.2);
|
||||
border: 1px solid rgba(139, 69, 19, 0.3);
|
||||
border-radius: 4px;
|
||||
|
||||
.lf-frc-die-type {
|
||||
font-size: calc(var(--font-size-standard, 14px) * 0.85);
|
||||
font-weight: 600;
|
||||
color: #2a2a1a;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.lf-frc-die-sep {
|
||||
color: rgba(0, 0, 0, 0.35);
|
||||
font-weight: 300;
|
||||
font-size: calc(var(--font-size-standard, 14px) * 0.8);
|
||||
}
|
||||
|
||||
.lf-frc-die-val {
|
||||
font-weight: bold;
|
||||
color: #ffd700;
|
||||
font-size: calc(var(--font-size-standard, 14px) * 0.95);
|
||||
|
||||
.lf-dt-explode-icon {
|
||||
font-size: 8px;
|
||||
color: #ffcc00;
|
||||
margin-left: 2px;
|
||||
vertical-align: super;
|
||||
text-shadow: 0 0 4px rgba(255, 200, 0, 0.8);
|
||||
}
|
||||
}
|
||||
|
||||
&.lf-frc-max {
|
||||
background: rgba(139, 90, 19, 0.35);
|
||||
border-color: rgba(200, 116, 42, 0.6);
|
||||
.lf-frc-die-val { color: #ff9a40; text-shadow: 0 0 6px rgba(200, 116, 42, 0.6); }
|
||||
}
|
||||
|
||||
&.lf-frc-min {
|
||||
background: rgba(139, 20, 20, 0.25);
|
||||
border-color: rgba(139, 34, 34, 0.5);
|
||||
.lf-frc-die-val { color: #ff6b6b; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.lf-frc-total-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
padding: 6px 10px;
|
||||
background: linear-gradient(135deg, rgba(40, 30, 20, 0.6) 0%, rgba(20, 15, 10, 0.8) 100%);
|
||||
border: 2px solid rgba(139, 69, 19, 0.5);
|
||||
|
||||
.lf-frc-total-label {
|
||||
font-size: calc(var(--font-size-standard, 14px) * 0.85);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
color: #c9b896;
|
||||
}
|
||||
|
||||
.lf-frc-total-value {
|
||||
font-family: var(--font-primary, serif);
|
||||
font-size: calc(var(--font-size-standard, 14px) * 1.6);
|
||||
font-weight: bold;
|
||||
color: #e8d5a0;
|
||||
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+4
-4
@@ -467,7 +467,7 @@
|
||||
.d30-label {
|
||||
flex-grow: 1;
|
||||
font-weight: bold;
|
||||
color: #e0d5f0;
|
||||
color: #2a1a3a;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
font-size: calc(var(--font-size-standard) * 0.9);
|
||||
@@ -477,11 +477,11 @@
|
||||
font-family: var(--font-primary);
|
||||
font-size: calc(var(--font-size-standard) * 1.5);
|
||||
font-weight: bold;
|
||||
color: #ff69b4;
|
||||
background: rgba(255, 105, 180, 0.1);
|
||||
color: #3d006e;
|
||||
background: rgba(255, 255, 255, 0.35);
|
||||
padding: 4px 12px;
|
||||
border-radius: 12px;
|
||||
border: 1px solid rgba(255, 105, 180, 0.3);
|
||||
border: 1px solid rgba(138, 43, 226, 0.4);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
"download": "#{DOWNLOAD}#",
|
||||
"url": "#{URL}#",
|
||||
"license": "LICENSE",
|
||||
"version": "13.0.0",
|
||||
"version": "14.0.0",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Uberwald",
|
||||
@@ -15,7 +15,7 @@
|
||||
],
|
||||
"compatibility": {
|
||||
"minimum": "13",
|
||||
"verified": "13"
|
||||
"verified": "14"
|
||||
},
|
||||
"esmodules": ["lethal-fantasy.mjs"],
|
||||
"styles": ["css/fvtt-lethal-fantasy.css"],
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
{{#if D30message}}
|
||||
<div class="d30-message">
|
||||
<i class="fa-solid fa-wand-magic-sparkles"></i>
|
||||
<span>{{D30message}}</span>
|
||||
<span>{{D30message.description}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
|
||||
@@ -18,7 +18,16 @@
|
||||
|
||||
<fieldset>
|
||||
<legend>{{localize "LETHALFANTASY.Label.attacks"}}</legend>
|
||||
<div class="attacks">
|
||||
<div class="attack-mode-selector">
|
||||
<label>{{localize "LETHALFANTASY.Label.attackMode"}}</label>
|
||||
<select name="system.attackMode">
|
||||
<option value="melee" {{#if (eq system.attackMode "melee")}}selected{{/if}}>{{localize "LETHALFANTASY.Label.meleeModeLabel"}}</option>
|
||||
<option value="ranged" {{#if (eq system.attackMode "ranged")}}selected{{/if}}>{{localize "LETHALFANTASY.Label.rangedModeLabel"}}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{{#if (eq system.attackMode "melee")}}
|
||||
<div class="attacks melee-attacks">
|
||||
{{#each system.attacks as |item key|}}
|
||||
<div class="attack" data-attack-key="{{key}}" >
|
||||
<div class="">
|
||||
@@ -64,6 +73,54 @@
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="attacks ranged-attacks">
|
||||
{{#each system.rangedAttacks as |item key|}}
|
||||
<div class="attack" data-attack-key="{{key}}" >
|
||||
<div class="">
|
||||
<input type="checkbox" name="system.rangedAttacks.{{item.key}}.enabled" {{checked item.enabled}} data-tooltip="Attack enabled/disabled" />
|
||||
</div>
|
||||
<div class="name">
|
||||
<input type="text" name="system.rangedAttacks.{{item.key}}.name" value="{{item.name}}" data-tooltip="Attack name" />
|
||||
</div>
|
||||
<div class="numeric">
|
||||
<input type="number" name="system.rangedAttacks.{{item.key}}.attackScore" value="{{item.attackScore}}" data-tooltip="Progression number" />
|
||||
</div>
|
||||
<div class="numeric">
|
||||
<input type="number" name="system.rangedAttacks.{{item.key}}.attackModifier" value="{{item.attackModifier}}" data-tooltip="Attack modifier" />
|
||||
</div>
|
||||
<div class="numeric">
|
||||
<input type="number" name="system.rangedAttacks.{{item.key}}.defenseModifier" value="{{item.defenseModifier}}" data-tooltip="Defense modifier"/>
|
||||
</div>
|
||||
<div class="damage-dice">
|
||||
<input type="text" name="system.rangedAttacks.{{item.key}}.damageDice" value="{{item.damageDice}}" data-tooltip="Damage dice"/>
|
||||
</div>
|
||||
<div class="numeric">
|
||||
<input type="number" name="system.rangedAttacks.{{item.key}}.damageModifier" value="{{item.damageModifier}}" data-tooltip="Damage modifier"/>
|
||||
</div>
|
||||
|
||||
<div class="attack-icons">
|
||||
|
||||
<a class="rollable" data-roll-type="monster-attack" data-roll-key="{{item.key}}" data-tooltip="Roll Attack">
|
||||
<i class="lf-roll-small fa-solid fa-bow-arrow" data-roll-type="monster-attack" data-roll-key="{{item.key}}"></i>
|
||||
</a>
|
||||
|
||||
<a class="rollable" data-roll-type="monster-defense" data-roll-key="{{item.key}}" data-tooltip="Roll Defense">
|
||||
<i class="fa-solid fa-shield-halved" data-roll-type="monster-defense" data-roll-key="{{item.key}}"></i>
|
||||
</a>
|
||||
|
||||
<a class="rollable" data-roll-type="monster-damage" data-roll-key="{{item.key}}"
|
||||
data-tooltip="Roll Damage">
|
||||
<i class="fa-regular fa-face-head-bandage" data-roll-type="monster-damage"
|
||||
data-roll-key="{{item.key}}"></i>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{/if}}
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
|
||||
Reference in New Issue
Block a user