Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 96306623e5 | |||
| 7279cd752d | |||
| db3e8b5d35 | |||
| 54421e4a83 | |||
| ac44419b7a | |||
| a3fc0a42b9 | |||
| c8ce840e98 | |||
| 55a040062a | |||
| 1818a76499 | |||
| 55d1b41ca4 |
@@ -60,4 +60,4 @@ jobs:
|
|||||||
manifest: "https://www.uberwald.me/gitea/${{gitea.repository}}/releases/download/${{github.event.release.tag_name}}/system.json"
|
manifest: "https://www.uberwald.me/gitea/${{gitea.repository}}/releases/download/${{github.event.release.tag_name}}/system.json"
|
||||||
notes: "https://www.uberwald.me/gitea/public/fvtt-lethal-fantasy/raw/branch/main/changelog.md"
|
notes: "https://www.uberwald.me/gitea/public/fvtt-lethal-fantasy/raw/branch/main/changelog.md"
|
||||||
compatibility-minimum: "13"
|
compatibility-minimum: "13"
|
||||||
compatibility-verified: "13"
|
compatibility-verified: "14"
|
||||||
|
|||||||
@@ -1178,6 +1178,45 @@ i.lethalfantasy {
|
|||||||
margin-left: 4px;
|
margin-left: 4px;
|
||||||
margin-right: 4px;
|
margin-right: 4px;
|
||||||
}
|
}
|
||||||
|
.lethalfantasy .tab.monster-combat .ranged-attacks {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
.lethalfantasy .tab.monster-combat .ranged-attacks .attack .name {
|
||||||
|
min-width: 10rem;
|
||||||
|
max-width: 10rem;
|
||||||
|
}
|
||||||
|
.lethalfantasy .tab.monster-combat .ranged-attacks .attack .damage-dice {
|
||||||
|
width: 5rem;
|
||||||
|
max-width: 5rem;
|
||||||
|
}
|
||||||
|
.lethalfantasy .tab.monster-combat .ranged-attacks .ranged-weapon-range {
|
||||||
|
margin-top: 8px;
|
||||||
|
border-top: 1px solid var(--color-border-light-tertiary, #ccc);
|
||||||
|
padding-top: 6px;
|
||||||
|
}
|
||||||
|
.lethalfantasy .tab.monster-combat .ranged-attacks .ranged-weapon-range > label {
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.lethalfantasy .tab.monster-combat .ranged-attacks .ranged-weapon-range .range-fields {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 6px;
|
||||||
|
}
|
||||||
|
.lethalfantasy .tab.monster-combat .ranged-attacks .ranged-weapon-range .range-fields .range-field {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.lethalfantasy .tab.monster-combat .ranged-attacks .ranged-weapon-range .range-fields .range-field label {
|
||||||
|
font-size: 0.7rem;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
.lethalfantasy .tab.monster-combat .ranged-attacks .ranged-weapon-range .range-fields .range-field input {
|
||||||
|
width: 3.5rem;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
.lethalfantasy .tab.monster-combat .armors {
|
.lethalfantasy .tab.monster-combat .armors {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(3, 1fr);
|
grid-template-columns: repeat(3, 1fr);
|
||||||
@@ -2595,6 +2634,21 @@ i.lethalfantasy {
|
|||||||
max-width: 8rem;
|
max-width: 8rem;
|
||||||
margin-left: 1rem;
|
margin-left: 1rem;
|
||||||
}
|
}
|
||||||
|
.dialog-warning {
|
||||||
|
margin: 0.4rem 0.2rem 0.2rem;
|
||||||
|
padding: 0.35rem 0.5rem;
|
||||||
|
border-left: 3px solid #c8941a;
|
||||||
|
background: rgba(200, 148, 26, 0.12);
|
||||||
|
border-radius: 3px;
|
||||||
|
font-family: var(--font-secondary);
|
||||||
|
font-size: calc(var(--font-size-standard) * 0.9);
|
||||||
|
color: #7a5400;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
.dialog-warning i {
|
||||||
|
color: #c8941a;
|
||||||
|
margin-right: 0.4rem;
|
||||||
|
}
|
||||||
.lethalfantasy.dice-roll,
|
.lethalfantasy.dice-roll,
|
||||||
.fvtt-lethal-fantasy.dice-roll,
|
.fvtt-lethal-fantasy.dice-roll,
|
||||||
.message.lethalfantasy.dice-roll,
|
.message.lethalfantasy.dice-roll,
|
||||||
|
|||||||
+74
-4
@@ -382,7 +382,7 @@
|
|||||||
"rollProgressionCount": "Roll progression count",
|
"rollProgressionCount": "Roll progression count",
|
||||||
"rollProgressionDice": "Roll progression/Lethargy dice",
|
"rollProgressionDice": "Roll progression/Lethargy dice",
|
||||||
"earned": "Earned",
|
"earned": "Earned",
|
||||||
"divinityPoints": "Divinity points",
|
"divinityPoints": "Grace",
|
||||||
"aetherPoints": "Aether points",
|
"aetherPoints": "Aether points",
|
||||||
"attacks": "Attacks",
|
"attacks": "Attacks",
|
||||||
"attackMode": "Attack Mode",
|
"attackMode": "Attack Mode",
|
||||||
@@ -462,6 +462,13 @@
|
|||||||
"notes": "Notes",
|
"notes": "Notes",
|
||||||
"pc": "PC",
|
"pc": "PC",
|
||||||
"perception": "Perception",
|
"perception": "Perception",
|
||||||
|
"pointBlank": "Point blank",
|
||||||
|
"short": "Short",
|
||||||
|
"medium": "Medium",
|
||||||
|
"long": "Long",
|
||||||
|
"extreme": "Extreme",
|
||||||
|
"outOfSkill": "Out of skill",
|
||||||
|
"range": "Range",
|
||||||
"rangeDefenseDialog": "Ranged defense dialog",
|
"rangeDefenseDialog": "Ranged defense dialog",
|
||||||
"rangeDefenseRoll": "Ranged defense roll",
|
"rangeDefenseRoll": "Ranged defense roll",
|
||||||
"rangedAttackDefense": "Ranged attack defense",
|
"rangedAttackDefense": "Ranged attack defense",
|
||||||
@@ -500,7 +507,40 @@
|
|||||||
"weapon-damage-small": "Weapon damage small",
|
"weapon-damage-small": "Weapon damage small",
|
||||||
"combatProgressionStart": "Combat start threshold",
|
"combatProgressionStart": "Combat start threshold",
|
||||||
"miracle": "Miracle",
|
"miracle": "Miracle",
|
||||||
"titleStandard": "Standard Roll"
|
"titleStandard": "Standard Roll",
|
||||||
|
"privateRoll": "Private Roll",
|
||||||
|
"current": "Current",
|
||||||
|
"max": "Max",
|
||||||
|
"speed": "Speed",
|
||||||
|
"bonuses": "Bonuses",
|
||||||
|
"handToHandAttacks": "Hand To Hand Attacks",
|
||||||
|
"beyondSkill": "Beyond Skill",
|
||||||
|
"letItFly": "Let It Fly!",
|
||||||
|
"class": "Class",
|
||||||
|
"mortal": "Mortal",
|
||||||
|
"alignment": "Alignment",
|
||||||
|
"age": "Age",
|
||||||
|
"height": "Height",
|
||||||
|
"weight": "Weight",
|
||||||
|
"eyes": "Eyes",
|
||||||
|
"hair": "Hair",
|
||||||
|
"magicUser": "Magic User",
|
||||||
|
"clericUser": "Cleric User",
|
||||||
|
"lastHdRoll": "Last HD roll",
|
||||||
|
"naturalDR": "Natural DR",
|
||||||
|
"magicalDR": "Magical DR",
|
||||||
|
"saveBonus": "Save bonus (1/5 levels)",
|
||||||
|
"spellBonus": "Spell bonus (1/5 levels)",
|
||||||
|
"miracleBonus": "Miracle bonus (1/5 levels)",
|
||||||
|
"devPointsTotal": "Dev. Points (Total)",
|
||||||
|
"devPointsRem": "Dev. Points (Rem.)",
|
||||||
|
"length": "Length",
|
||||||
|
"vision": "Vision",
|
||||||
|
"damageType": "Damage Type",
|
||||||
|
"components": "Components",
|
||||||
|
"coverRanged": "Cover vs ranged attacks",
|
||||||
|
"standing": "Standing",
|
||||||
|
"crouching": "Crouching"
|
||||||
},
|
},
|
||||||
"Miracle": {
|
"Miracle": {
|
||||||
"FIELDS": {
|
"FIELDS": {
|
||||||
@@ -556,6 +596,15 @@
|
|||||||
},
|
},
|
||||||
"savingThrow": {
|
"savingThrow": {
|
||||||
"label": "Saving throw"
|
"label": "Saving throw"
|
||||||
|
},
|
||||||
|
"damageDiceOverpowered": {
|
||||||
|
"label": "Overpowered Damage Dice"
|
||||||
|
},
|
||||||
|
"damageDiceOverpowered2": {
|
||||||
|
"label": "Overpowered 2 Damage Dice"
|
||||||
|
},
|
||||||
|
"damageDice": {
|
||||||
|
"label": "Damage Dice"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -677,7 +726,8 @@
|
|||||||
"label": "Min"
|
"label": "Min"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
"autoDestruction": "Auto-Destruction"
|
||||||
},
|
},
|
||||||
"Skill": {
|
"Skill": {
|
||||||
"Category": {
|
"Category": {
|
||||||
@@ -802,6 +852,12 @@
|
|||||||
},
|
},
|
||||||
"damageDice": {
|
"damageDice": {
|
||||||
"label": "Damage dice"
|
"label": "Damage dice"
|
||||||
|
},
|
||||||
|
"damageDiceOverpowered": {
|
||||||
|
"label": "Overpowered Damage Dice"
|
||||||
|
},
|
||||||
|
"damageDiceOverpowered2": {
|
||||||
|
"label": "Overpowered 2 Damage Dice"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Range": {
|
"Range": {
|
||||||
@@ -836,7 +892,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"Warning": {},
|
"Warning": {
|
||||||
|
"defenseShieldOrder": "To avoid a hit without using the shield, roll Grit or Luck first — then roll the shield."
|
||||||
|
},
|
||||||
"Weapon": {
|
"Weapon": {
|
||||||
"FIELDS": {
|
"FIELDS": {
|
||||||
"isAgile": {
|
"isAgile": {
|
||||||
@@ -981,6 +1039,18 @@
|
|||||||
"diceResult": "Dice result",
|
"diceResult": "Dice result",
|
||||||
"progressionCount": "Progression count:"
|
"progressionCount": "Progression count:"
|
||||||
},
|
},
|
||||||
|
"Combat": {
|
||||||
|
"RollMonsters": "Roll Monsters",
|
||||||
|
"monstersNotRolledTitle": "Monsters Not Rolled",
|
||||||
|
"monstersNotRolledMsg": "Monsters have not rolled this second. Proceed anyway?",
|
||||||
|
"proceedYes": "Proceed",
|
||||||
|
"proceedNo": "Cancel",
|
||||||
|
"spellDRDialogTitle": "Spell Damage — Apply DR?",
|
||||||
|
"spellDRDialogMsg": "Enter a damage reduction value to subtract, or click No DR to apply full damage.",
|
||||||
|
"spellDRLabel": "DR:",
|
||||||
|
"spellNoDR": "No DR",
|
||||||
|
"spellApplyDR": "Apply DR"
|
||||||
|
},
|
||||||
"EquipmentCategories": {
|
"EquipmentCategories": {
|
||||||
"ClassKit": "Class Kit",
|
"ClassKit": "Class Kit",
|
||||||
"Clothing": "Clothing",
|
"Clothing": "Clothing",
|
||||||
|
|||||||
+317
-241
@@ -129,305 +129,310 @@ Hooks.once("ready", function () {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
// Test if version below 13
|
Hooks.on("renderChatMessageHTML", (message, html, data) => {
|
||||||
let hookName = "renderChatMessage"
|
|
||||||
if (foundry.utils.isNewerVersion(game.version, "12.0",)) {
|
|
||||||
hookName = "renderChatMessageHTML"
|
|
||||||
}
|
|
||||||
Hooks.on(hookName, (message, html, data) => {
|
|
||||||
const typeMessage = data.message.flags.lethalFantasy?.typeMessage
|
const typeMessage = data.message.flags.lethalFantasy?.typeMessage
|
||||||
// Message de demande de jet de dés
|
// Message de demande de jet de dés
|
||||||
if (typeMessage === "askRoll") {
|
if (typeMessage === "askRoll") {
|
||||||
// Affichage des boutons de jet de dés uniquement pour les joueurs
|
// Affichage des boutons de jet de dés uniquement pour les joueurs
|
||||||
if (game.user.isGM) {
|
if (game.user.isGM) {
|
||||||
html.find(".ask-roll-dice").each((i, btn) => {
|
for (const btn of html.querySelectorAll(".ask-roll-dice")) {
|
||||||
btn.style.display = "none"
|
btn.style.display = "none"
|
||||||
})
|
}
|
||||||
} else {
|
} else {
|
||||||
html.find(".ask-roll-dice").click((event) => {
|
for (const btn of html.querySelectorAll(".ask-roll-dice")) {
|
||||||
const btn = $(event.currentTarget)
|
btn.addEventListener("click", () => {
|
||||||
const type = btn.data("type")
|
const type = btn.dataset.type
|
||||||
const value = btn.data("value")
|
const value = btn.dataset.value
|
||||||
const avantage = btn.data("avantage") ?? "="
|
const avantage = btn.dataset.avantage ?? "="
|
||||||
const character = game.user.character
|
const character = game.user.character
|
||||||
if (type === SYSTEM.ROLL_TYPE.RESOURCE) character.rollResource(value)
|
if (type === SYSTEM.ROLL_TYPE.RESOURCE) character.rollResource(value)
|
||||||
else if (type === SYSTEM.ROLL_TYPE.SAVE) character.rollSave(value, avantage)
|
else if (type === SYSTEM.ROLL_TYPE.SAVE) character.rollSave(value, avantage)
|
||||||
})
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gestion du survol et du clic sur les boutons de dégâts pour les GMs
|
// Gestion du survol et du clic sur les boutons de dégâts pour les GMs
|
||||||
if (game.user.isGM) {
|
if (game.user.isGM) {
|
||||||
// Show damage buttons only for GM
|
// Show damage buttons only for GM
|
||||||
$(html).find(".li-apply-wounds").each((i, btn) => {
|
for (const btn of html.querySelectorAll(".li-apply-wounds")) {
|
||||||
btn.style.display = "block"
|
btn.style.display = "block"
|
||||||
})
|
}
|
||||||
|
|
||||||
$(html).find(".apply-wounds-btn").hover(
|
for (const btn of html.querySelectorAll(".apply-wounds-btn")) {
|
||||||
function (event) {
|
btn.addEventListener("mouseenter", () => {
|
||||||
// Mouse enter - select the token and pan to it
|
const combatantId = btn.dataset.combatantId
|
||||||
let combatantId = $(this).data("combatant-id")
|
|
||||||
if (combatantId && game.combat) {
|
if (combatantId && game.combat) {
|
||||||
let combatant = game.combat.combatants.get(combatantId)
|
const combatant = game.combat.combatants.get(combatantId)
|
||||||
if (combatant?.token) {
|
if (combatant?.token) {
|
||||||
let token = canvas.tokens.get(combatant.token.id)
|
const token = canvas.tokens.get(combatant.token.id)
|
||||||
if (token) {
|
if (token) {
|
||||||
token.control({ releaseOthers: true })
|
token.control({ releaseOthers: true })
|
||||||
canvas.animatePan(token.center)
|
canvas.animatePan(token.center)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
})
|
||||||
function (event) {
|
btn.addEventListener("mouseleave", () => canvas.tokens.releaseAll())
|
||||||
// Mouse leave - release selection
|
btn.addEventListener("click", event => LethalFantasyUtils.applyDamage(message, event))
|
||||||
canvas.tokens.releaseAll()
|
}
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
$(html).find(".apply-wounds-btn").click((event) => {
|
|
||||||
LethalFantasyUtils.applyDamage(message, event)
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Gestion du survol et du clic sur les boutons de défense
|
// Gestion du survol et du clic sur les boutons de défense
|
||||||
$(html).find(".request-defense-btn").hover(
|
for (const btn of html.querySelectorAll(".request-defense-btn")) {
|
||||||
function (event) {
|
btn.addEventListener("mouseenter", () => {
|
||||||
// Mouse enter - select the token and pan to it
|
const tokenId = btn.dataset.tokenId
|
||||||
let tokenId = $(this).data("token-id")
|
|
||||||
if (tokenId) {
|
if (tokenId) {
|
||||||
let token = canvas.tokens.get(tokenId)
|
const token = canvas.tokens.get(tokenId)
|
||||||
if (token) {
|
if (token) {
|
||||||
token.control({ releaseOthers: true })
|
token.control({ releaseOthers: true })
|
||||||
canvas.animatePan(token.center)
|
canvas.animatePan(token.center)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
})
|
||||||
function (event) {
|
btn.addEventListener("mouseleave", () => canvas.tokens.releaseAll())
|
||||||
// Mouse leave - release selection
|
|
||||||
canvas.tokens.releaseAll()
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
// Gestionnaire pour les boutons de demande de défense
|
// Gestionnaire pour les boutons de demande de défense
|
||||||
$(html).find(".request-defense-btn").off("click").on("click", (event) => {
|
btn.addEventListener("click", event => {
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
event.stopPropagation()
|
event.stopPropagation()
|
||||||
|
|
||||||
const button = $(event.currentTarget)
|
const combatantId = btn.dataset.combatantId
|
||||||
const combatantId = button.data("combatant-id")
|
const tokenId = btn.dataset.tokenId
|
||||||
const tokenId = button.data("token-id")
|
|
||||||
|
|
||||||
// Récupérer le combattant soit du combat, soit directement du token
|
// Récupérer le combattant soit du combat, soit directement du token
|
||||||
let combatant = null
|
let combatant = null
|
||||||
let token = null
|
let token = null
|
||||||
|
|
||||||
if (game.combat && combatantId) {
|
if (game.combat && combatantId) {
|
||||||
combatant = game.combat.combatants.get(combatantId)
|
combatant = game.combat.combatants.get(combatantId)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Si pas de combattant trouvé, chercher le token directement
|
// Si pas de combattant trouvé, chercher le token directement
|
||||||
if (!combatant && tokenId) {
|
if (!combatant && tokenId) {
|
||||||
token = canvas.tokens.get(tokenId)
|
token = canvas.tokens.get(tokenId)
|
||||||
if (token) {
|
if (token) {
|
||||||
// Créer un pseudo-combattant avec les infos du token
|
// Créer un pseudo-combattant avec les infos du token
|
||||||
combatant = {
|
combatant = {
|
||||||
actor: token.actor,
|
actor: token.actor,
|
||||||
name: token.name,
|
name: token.name,
|
||||||
token: token,
|
token: token,
|
||||||
actorId: token.actorId
|
actorId: token.actorId
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (!combatant) return
|
if (!combatant) return
|
||||||
|
|
||||||
// Récupérer les informations de l'attaquant depuis le message
|
// Récupérer les informations de l'attaquant depuis le message
|
||||||
const attackerName = message.rolls[0]?.actorName || "Unknown"
|
const attackerName = message.rolls[0]?.actorName || "Unknown"
|
||||||
const attackerId = message.rolls[0]?.actorId
|
const attackerId = message.rolls[0]?.actorId
|
||||||
const weaponName = message.rolls[0]?.rollName || "weapon"
|
const weaponName = message.rolls[0]?.rollName || "weapon"
|
||||||
const attackRoll = message.rolls[0]?.rollTotal || 0
|
const attackRoll = message.rolls[0]?.rollTotal || 0
|
||||||
const defenderName = combatant.name
|
const defenderName = combatant.name
|
||||||
const attackWeaponId = message.rolls[0]?.rollTarget?.weapon?.id || message.rolls[0]?.rollTarget?.weapon?._id
|
const attackWeaponId = message.rolls[0]?.rollTarget?.weapon?.id || message.rolls[0]?.rollTarget?.weapon?._id
|
||||||
const attackRollType = message.rolls[0]?.type
|
const attackRollType = message.rolls[0]?.type
|
||||||
const attackRollKey = message.rolls[0]?.rollTarget?.rollKey
|
const attackRollKey = message.rolls[0]?.rollTarget?.rollKey
|
||||||
console.log(`[LF] request-defense-btn | attackRollType=${attackRollType} defender=${defenderName} defenderType=${combatant.actor?.type}`)
|
console.log(`[LF] request-defense-btn | attackRollType=${attackRollType} defender=${defenderName} defenderType=${combatant.actor?.type}`)
|
||||||
const attackD30result = message.rolls[0]?.options?.D30result || null
|
const attackD30result = message.rolls[0]?.options?.D30result || null
|
||||||
const attackD30message = message.rolls[0]?.options?.D30message || null
|
const attackD30message = message.rolls[0]?.options?.D30message || null
|
||||||
const attackRerollContext = {
|
const attackRerollContext = {
|
||||||
rollType: message.rolls[0]?.options?.rollType,
|
rollType: message.rolls[0]?.options?.rollType,
|
||||||
rollTarget: foundry.utils.duplicate(message.rolls[0]?.options?.rollTarget ?? {}),
|
rollTarget: foundry.utils.duplicate(message.rolls[0]?.options?.rollTarget ?? {}),
|
||||||
actorId: message.rolls[0]?.options?.actorId,
|
actorId: message.rolls[0]?.options?.actorId,
|
||||||
actorName: message.rolls[0]?.options?.actorName,
|
actorName: message.rolls[0]?.options?.actorName,
|
||||||
actorImage: message.rolls[0]?.options?.actorImage,
|
actorImage: message.rolls[0]?.options?.actorImage,
|
||||||
defenderId: combatant.actor?.id || null,
|
defenderId: combatant.actor?.id || null,
|
||||||
defenderTokenId: tokenId || combatant.token?.id || null,
|
defenderTokenId: tokenId || combatant.token?.id || null,
|
||||||
rollContext: foundry.utils.duplicate(message.rolls[0]?.options?.rollData ?? {})
|
rollContext: foundry.utils.duplicate(message.rolls[0]?.options?.rollData ?? {})
|
||||||
}
|
}
|
||||||
|
|
||||||
// Préparer le message de demande de défense
|
// Préparer le message de demande de défense
|
||||||
// Récupérer l'acteur attaquant pour vérifier le mode d'attaque
|
// isRanged: true si le monstre était en mode ranged (via rollTarget.attackMode stocké dans le roll)
|
||||||
const attacker = game.actors.get(attackerId)
|
// OU si l'attaquant utilisait une arme ranged (weapon-attack avec weaponType === "ranged")
|
||||||
const isRangedAttack = attacker?.type === "monster" && attacker.system.attackMode === "ranged"
|
const attacker = game.actors.get(attackerId)
|
||||||
|
const rollTargetOptions = message.rolls[0]?.options?.rollTarget
|
||||||
|
const attackerWeapon = rollTargetOptions?.weapon
|
||||||
|
const isRangedAttack = (rollTargetOptions?.attackMode === "ranged")
|
||||||
|
|| (attacker?.type === "monster" && attacker.system.attackMode === "ranged")
|
||||||
|
|| (attackerWeapon?.system?.weaponType === "ranged")
|
||||||
|
|
||||||
const defenseMsg = {
|
const defenseMsg = {
|
||||||
type: "requestDefense",
|
type: "requestDefense",
|
||||||
attackerName: attackerName,
|
attackerName,
|
||||||
attackerId: attackerId,
|
attackerId,
|
||||||
defenderName: defenderName,
|
defenderName,
|
||||||
weaponName: weaponName,
|
weaponName,
|
||||||
attackRoll: attackRoll,
|
attackRoll,
|
||||||
attackWeaponId: attackWeaponId,
|
attackWeaponId,
|
||||||
attackRollType: attackRollType,
|
attackRollType,
|
||||||
attackRollKey: attackRollKey,
|
attackRollKey,
|
||||||
attackD30result: attackD30result,
|
attackD30result,
|
||||||
attackD30message: attackD30message,
|
attackD30message,
|
||||||
attackRerollContext: attackRerollContext,
|
attackRerollContext,
|
||||||
combatantId: combatantId,
|
combatantId,
|
||||||
tokenId: tokenId,
|
tokenId,
|
||||||
isRanged: isRangedAttack
|
isRanged: isRangedAttack
|
||||||
}
|
}
|
||||||
|
|
||||||
// Envoyer le message socket à l'utilisateur contrôlant le combatant
|
// Envoyer le message socket à l'utilisateur contrôlant le combatant
|
||||||
// Only consider active (online) users; fall back to any active GM for unowned/GM monsters.
|
// Only consider active (online) users; fall back to any active GM for unowned/GM monsters.
|
||||||
let owners = game.users.filter(u =>
|
let owners = game.users.filter(u => u.active && combatant.actor.testUserPermission(u, "OWNER"))
|
||||||
u.active && combatant.actor.testUserPermission(u, "OWNER")
|
if (owners.length === 0) {
|
||||||
)
|
owners = game.users.filter(u => u.active && u.isGM)
|
||||||
if (owners.length === 0) {
|
}
|
||||||
owners = game.users.filter(u => u.active && u.isGM)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Récupérer l'acteur attaquant pour vérifier qui l'a lancé
|
// Récupérer l'acteur attaquant pour vérifier qui l'a lancé
|
||||||
const attackerOwners = attacker ? game.users.filter(u => attacker.testUserPermission(u, "OWNER")).map(u => u.id) : []
|
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,
|
// 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.
|
// even if that owner also controls the attacker. Only skip for same-player PC-vs-PC.
|
||||||
const defenderIsMonster = combatant.actor?.type === "monster"
|
const defenderIsMonster = combatant.actor?.type === "monster"
|
||||||
|
|
||||||
let messageSent = false
|
let messageSent = false
|
||||||
owners.forEach(owner => {
|
owners.forEach(owner => {
|
||||||
// Don't let a player be both attacker and defender for their own PC, unless defending a monster.
|
// 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) {
|
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
|
// Ne rien faire - on ne veut pas que l'attaquant se défende contre lui-même
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if (owner.id === game.user.id) {
|
||||||
|
// Si l'utilisateur actuel est le propriétaire du défenseur (mais pas l'attaquant), appeler directement
|
||||||
|
LethalFantasyUtils.showDefenseRequest({ ...defenseMsg, userId: owner.id })
|
||||||
|
messageSent = true
|
||||||
|
} else {
|
||||||
|
// Sinon, envoyer via socket
|
||||||
|
game.socket.emit(`system.${SYSTEM.id}`, { ...defenseMsg, userId: owner.id })
|
||||||
|
messageSent = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
|
// Notification pour l'attaquant
|
||||||
|
if (messageSent) {
|
||||||
|
ui.notifications.info(`Defense request sent to ${defenderName}'s controller`)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// Gestionnaire pour les boutons de jet de dégâts (armes et résultats de combat)
|
||||||
|
for (const btn of html.querySelectorAll(".damage-roll-btn, .roll-damage-btn")) {
|
||||||
|
btn.addEventListener("click", async event => {
|
||||||
|
event.preventDefault()
|
||||||
|
event.stopPropagation()
|
||||||
|
|
||||||
|
const weaponId = btn.dataset.weaponId
|
||||||
|
const attackKey = btn.dataset.attackKey
|
||||||
|
const attackerId = btn.dataset.attackerId
|
||||||
|
const defenderId = btn.dataset.defenderId
|
||||||
|
const defenderTokenId = btn.dataset.defenderTokenId || null
|
||||||
|
const extraShieldDr = Number(btn.dataset.extraShieldDr || 0)
|
||||||
|
const damageType = btn.dataset.damageType
|
||||||
|
const damageFormula = btn.dataset.damageFormula
|
||||||
|
const damageModifier = btn.dataset.damageModifier
|
||||||
|
const isMonster = btn.dataset.isMonster
|
||||||
|
|
||||||
|
// Récupérer l'acteur (soit depuis le message, soit depuis attackerId)
|
||||||
|
const actor = attackerId ? game.actors.get(attackerId) : game.actors.get(message.rolls[0]?.actorId)
|
||||||
|
if (!actor) {
|
||||||
|
ui.notifications.error("Actor not found")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if (owner.id === game.user.id) {
|
// Pour les sorts, rouler les dés de dégâts avec DR manuelle optionnelle
|
||||||
// Si l'utilisateur actuel est le propriétaire du défenseur (mais pas l'attaquant), appeler directement
|
if (damageType === "spell" && damageFormula) {
|
||||||
LethalFantasyUtils.showDefenseRequest({ ...defenseMsg, userId: owner.id })
|
const manualDR = await foundry.applications.api.DialogV2.wait({
|
||||||
messageSent = true
|
window: { title: game.i18n.localize("LETHALFANTASY.Combat.spellDRDialogTitle") },
|
||||||
} else {
|
classes: ["lethalfantasy"],
|
||||||
// Sinon, envoyer via socket
|
position: { width: 320 },
|
||||||
game.socket.emit(`system.${SYSTEM.id}`, {
|
content: `<div style="padding:0.5rem 0">
|
||||||
...defenseMsg,
|
<p style="margin-bottom:0.6rem">${game.i18n.localize("LETHALFANTASY.Combat.spellDRDialogMsg")}</p>
|
||||||
userId: owner.id
|
<div style="display:flex;align-items:center;gap:0.5rem">
|
||||||
|
<label style="font-weight:bold">${game.i18n.localize("LETHALFANTASY.Combat.spellDRLabel")}</label>
|
||||||
|
<input type="number" name="manualDr" value="0" min="0" style="width:5rem"/>
|
||||||
|
</div>
|
||||||
|
</div>`,
|
||||||
|
buttons: [
|
||||||
|
{
|
||||||
|
action: "noDR",
|
||||||
|
label: game.i18n.localize("LETHALFANTASY.Combat.spellNoDR"),
|
||||||
|
icon: "fa-solid fa-wand-magic-sparkles",
|
||||||
|
callback: () => 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: "applyDR",
|
||||||
|
label: game.i18n.localize("LETHALFANTASY.Combat.spellApplyDR"),
|
||||||
|
icon: "fa-solid fa-shield",
|
||||||
|
callback: (event, button, dialog) => Number(dialog.querySelector("[name='manualDr']")?.value) || 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
action: "cancel",
|
||||||
|
label: game.i18n.localize("LETHALFANTASY.Combat.proceedNo"),
|
||||||
|
callback: () => null
|
||||||
|
}
|
||||||
|
],
|
||||||
|
rejectClose: false
|
||||||
})
|
})
|
||||||
messageSent = true
|
if (manualDR === null) return
|
||||||
|
const rollOpts = {
|
||||||
|
type: "spell-damage",
|
||||||
|
rollType: "spell-damage",
|
||||||
|
rollName: damageFormula,
|
||||||
|
isDamage: true,
|
||||||
|
rollData: { isDamage: true },
|
||||||
|
manualDR: manualDR,
|
||||||
|
defenderId,
|
||||||
|
defenderTokenId,
|
||||||
|
actorId: actor.id,
|
||||||
|
actorName: actor.name,
|
||||||
|
actorImage: actor.img
|
||||||
|
}
|
||||||
|
const roll = new LethalFantasyRoll(damageFormula, {}, rollOpts)
|
||||||
|
await roll.evaluate()
|
||||||
|
roll.options.rollTotal = roll.total
|
||||||
|
if (game?.dice3d) await game.dice3d.showForRoll(roll, game.user, true)
|
||||||
|
await roll.toMessage()
|
||||||
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Pour les boutons de résultat de combat (monster damage)
|
||||||
|
if (damageType === "monster" && attackKey) {
|
||||||
|
await actor.system.prepareMonsterRoll("monster-damage", attackKey, undefined, undefined, undefined, defenderId, defenderTokenId, extraShieldDr)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pour les monstres, utiliser prepareMonsterRoll
|
||||||
|
if (isMonster || actor.type === "monster") {
|
||||||
|
await actor.system.prepareMonsterRoll("monster-damage", weaponId, undefined, undefined, damageModifier)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Pour les personnages, récupérer l'arme
|
||||||
|
const weapon = actor.items.get(weaponId)
|
||||||
|
if (!weapon) {
|
||||||
|
ui.notifications.error("Weapon not found")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Lancer les dégâts avec la bonne méthode
|
||||||
|
const rollType = damageType === "small" ? "weapon-damage-small" : "weapon-damage-medium"
|
||||||
|
await actor.prepareRoll(rollType, weaponId, undefined, defenderId, defenderTokenId, extraShieldDr)
|
||||||
})
|
})
|
||||||
|
}
|
||||||
// Notification pour l'attaquant
|
|
||||||
if (messageSent) {
|
|
||||||
ui.notifications.info(`Defense request sent to ${defenderName}'s controller`)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// Gestionnaire pour les boutons de jet de dégâts (armes et résultats de combat)
|
|
||||||
$(html).find(".damage-roll-btn, .roll-damage-btn").off("click").on("click", async (event) => {
|
|
||||||
event.preventDefault()
|
|
||||||
event.stopPropagation()
|
|
||||||
|
|
||||||
const button = $(event.currentTarget)
|
|
||||||
const weaponId = button.data("weapon-id")
|
|
||||||
const attackKey = button.data("attack-key")
|
|
||||||
let attackerId = button.data("attacker-id")
|
|
||||||
const defenderId = button.data("defender-id")
|
|
||||||
const defenderTokenId = button.data("defender-token-id") || null
|
|
||||||
const extraShieldDr = Number(button.data("extra-shield-dr") || 0)
|
|
||||||
const damageType = button.data("damage-type")
|
|
||||||
const damageFormula = button.data("damage-formula")
|
|
||||||
const damageModifier = button.data("damage-modifier")
|
|
||||||
const isMonster = button.data("is-monster")
|
|
||||||
|
|
||||||
// Récupérer l'acteur (soit depuis le message, soit depuis attackerId)
|
|
||||||
let actor = attackerId ? game.actors.get(attackerId) : game.actors.get(message.rolls[0]?.actorId)
|
|
||||||
if (!actor) {
|
|
||||||
ui.notifications.error("Actor not found")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Pour les sorts, rouler les dés de dégâts avec option bypass DR
|
|
||||||
if (damageType === "spell" && damageFormula) {
|
|
||||||
const bypassArmor = await foundry.applications.api.DialogV2.confirm({
|
|
||||||
window: { title: "Spell Damage" },
|
|
||||||
classes: ["lethalfantasy"],
|
|
||||||
content: "<p>Does this spell's damage bypass armor DR?</p>",
|
|
||||||
yes: { label: "Yes (ignore armor)", icon: "fa-solid fa-wand-magic-sparkles" },
|
|
||||||
no: { label: "No (apply armor DR)", icon: "fa-solid fa-shield" }
|
|
||||||
})
|
|
||||||
const rollOpts = {
|
|
||||||
type: "spell-damage",
|
|
||||||
rollType: "spell-damage",
|
|
||||||
rollName: damageFormula,
|
|
||||||
isDamage: true,
|
|
||||||
rollData: { isDamage: true },
|
|
||||||
bypassArmor: bypassArmor ?? false,
|
|
||||||
defenderId,
|
|
||||||
defenderTokenId,
|
|
||||||
actorId: actor.id,
|
|
||||||
actorName: actor.name,
|
|
||||||
actorImage: actor.img
|
|
||||||
}
|
|
||||||
const roll = new LethalFantasyRoll(damageFormula, {}, rollOpts)
|
|
||||||
await roll.evaluate()
|
|
||||||
roll.options.rollTotal = roll.total
|
|
||||||
if (game?.dice3d) await game.dice3d.showForRoll(roll, game.user, true)
|
|
||||||
await roll.toMessage()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Pour les boutons de résultat de combat (monster damage)
|
|
||||||
if (damageType === "monster" && attackKey) {
|
|
||||||
await actor.system.prepareMonsterRoll("monster-damage", attackKey, undefined, undefined, undefined, defenderId, defenderTokenId, extraShieldDr)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Pour les monstres, utiliser prepareMonsterRoll
|
|
||||||
if (isMonster || actor.type === "monster") {
|
|
||||||
await actor.system.prepareMonsterRoll("monster-damage", weaponId, undefined, undefined, damageModifier)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Pour les personnages, récupérer l'arme
|
|
||||||
const weapon = actor.items.get(weaponId)
|
|
||||||
if (!weapon) {
|
|
||||||
ui.notifications.error("Weapon not found")
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
// Lancer les dégâts avec la bonne méthode
|
|
||||||
const rollType = damageType === "small" ? "weapon-damage-small" : "weapon-damage-medium"
|
|
||||||
await actor.prepareRoll(rollType, weaponId, undefined, defenderId, defenderTokenId, extraShieldDr)
|
|
||||||
})
|
|
||||||
|
|
||||||
// Masquer les boutons de dommages dans les messages de résultat de combat si l'utilisateur n'est pas l'attaquant
|
// Masquer les boutons de dommages dans les messages de résultat de combat si l'utilisateur n'est pas l'attaquant
|
||||||
$(html).find(".roll-damage-btn").each(function() {
|
for (const btn of html.querySelectorAll(".roll-damage-btn")) {
|
||||||
const button = $(this)
|
const attackerId = btn.dataset.attackerId
|
||||||
const attackerId = button.data("attacker-id")
|
|
||||||
|
|
||||||
if (attackerId) {
|
if (attackerId) {
|
||||||
const attacker = game.actors.get(attackerId)
|
const attacker = game.actors.get(attackerId)
|
||||||
// Masquer le bouton si l'utilisateur n'est pas GM et ne possède pas l'attaquant
|
// Masquer le bouton si l'utilisateur n'est pas GM et ne possède pas l'attaquant
|
||||||
if (!game.user.isGM && !attacker?.testUserPermission(game.user, "OWNER")) {
|
if (!game.user.isGM && !attacker?.testUserPermission(game.user, "OWNER")) {
|
||||||
button.hide()
|
btn.style.display = "none"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
Hooks.on("getCombatTrackerEntryContext", (html, options) => {
|
|
||||||
LethalFantasyUtils.pushCombatOptions(html, options);
|
|
||||||
});
|
|
||||||
|
|
||||||
// Hook pour ajouter les données d'attaque au message de défense
|
// Hook pour ajouter les données d'attaque au message de défense
|
||||||
Hooks.on("preCreateChatMessage", (message) => {
|
Hooks.on("preCreateChatMessage", (message) => {
|
||||||
const rollType = message.rolls[0]?.options?.rollType
|
const rollType = message.rolls[0]?.options?.rollType
|
||||||
@@ -823,6 +828,73 @@ Hooks.on("createChatMessage", async (message) => {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Hook: deduct aether when a spell-attack or spell-power roll is posted to chat
|
||||||
|
Hooks.on("createChatMessage", async (message) => {
|
||||||
|
if (!["spell-attack", "spell-power"].includes(message.rolls[0]?.options?.rollType)) return
|
||||||
|
|
||||||
|
const actorId = message.rolls[0]?.options?.actorId
|
||||||
|
if (!actorId) return
|
||||||
|
const actor = game.actors.get(actorId)
|
||||||
|
if (!actor) return
|
||||||
|
|
||||||
|
// Only the primary controller (player owner or GM) handles this
|
||||||
|
const activePlayerOwners = game.users.filter(u => u.active && !u.isGM && actor.testUserPermission(u, "OWNER"))
|
||||||
|
const isPrimary = activePlayerOwners.length > 0
|
||||||
|
? activePlayerOwners[0].id === game.user.id
|
||||||
|
: game.user.isGM
|
||||||
|
if (!isPrimary) return
|
||||||
|
|
||||||
|
const rollTarget = message.rolls[0]?.options?.rollTarget
|
||||||
|
const spellId = rollTarget?.id || rollTarget?._id
|
||||||
|
const spell = spellId ? actor.items.get(spellId) : null
|
||||||
|
if (!spell || spell.type !== "spell") return
|
||||||
|
|
||||||
|
const cost = Number(spell.system?.cost) || 0
|
||||||
|
if (cost <= 0) return
|
||||||
|
|
||||||
|
const currentAether = Number(actor.system.aetherPoints?.value) || 0
|
||||||
|
const newAether = Math.max(0, currentAether - cost)
|
||||||
|
await actor.update({ "system.aetherPoints.value": newAether })
|
||||||
|
|
||||||
|
await ChatMessage.create({
|
||||||
|
content: `<p>🔮 <strong>${actor.name}</strong> casts <em>${spell.name}</em> — spends <strong>${cost}</strong> Aether <span style="color:#888;">(${currentAether} → ${newAether})</span>.</p>`,
|
||||||
|
speaker: ChatMessage.getSpeaker({ actor })
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
// Hook: deduct grace when a miracle-attack or miracle-power roll is posted to chat
|
||||||
|
Hooks.on("createChatMessage", async (message) => {
|
||||||
|
if (!["miracle-attack", "miracle-power"].includes(message.rolls[0]?.options?.rollType)) return
|
||||||
|
|
||||||
|
const actorId = message.rolls[0]?.options?.actorId
|
||||||
|
if (!actorId) return
|
||||||
|
const actor = game.actors.get(actorId)
|
||||||
|
if (!actor) return
|
||||||
|
|
||||||
|
const activePlayerOwners = game.users.filter(u => u.active && !u.isGM && actor.testUserPermission(u, "OWNER"))
|
||||||
|
const isPrimary = activePlayerOwners.length > 0
|
||||||
|
? activePlayerOwners[0].id === game.user.id
|
||||||
|
: game.user.isGM
|
||||||
|
if (!isPrimary) return
|
||||||
|
|
||||||
|
const rollTarget = message.rolls[0]?.options?.rollTarget
|
||||||
|
const miracleId = rollTarget?.id || rollTarget?._id
|
||||||
|
const miracle = miracleId ? actor.items.get(miracleId) : null
|
||||||
|
if (!miracle || miracle.type !== "miracle") return
|
||||||
|
|
||||||
|
const cost = Number(miracle.system?.level) || 0
|
||||||
|
if (cost <= 0) return
|
||||||
|
|
||||||
|
const currentGrace = Number(actor.system.divinityPoints?.value) || 0
|
||||||
|
const newGrace = Math.max(0, currentGrace - cost)
|
||||||
|
await actor.update({ "system.divinityPoints.value": newGrace })
|
||||||
|
|
||||||
|
await ChatMessage.create({
|
||||||
|
content: `<p>✨ <strong>${actor.name}</strong> invokes <em>${miracle.name}</em> — spends <strong>${cost}</strong> Grace <span style="color:#888;">(${currentGrace} → ${newGrace})</span>.</p>`,
|
||||||
|
speaker: ChatMessage.getSpeaker({ actor })
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
// Hook pour appliquer automatiquement les dégâts si une cible est définie
|
// Hook pour appliquer automatiquement les dégâts si une cible est définie
|
||||||
Hooks.on("createChatMessage", async (message) => {
|
Hooks.on("createChatMessage", async (message) => {
|
||||||
// Vérifier si c'est un message de dégâts avec un defenderId
|
// Vérifier si c'est un message de dégâts avec un defenderId
|
||||||
@@ -876,12 +948,14 @@ Hooks.on("createChatMessage", async (message) => {
|
|||||||
const damageTotal = message.rolls[0]?.options?.rollTotal || message.rolls[0]?.total || 0
|
const damageTotal = message.rolls[0]?.options?.rollTotal || message.rolls[0]?.total || 0
|
||||||
const weaponName = message.rolls[0]?.options?.rollName || "Unknown Weapon"
|
const weaponName = message.rolls[0]?.options?.rollName || "Unknown Weapon"
|
||||||
const attackerName = message.rolls[0]?.options?.actorName || "Unknown Attacker"
|
const attackerName = message.rolls[0]?.options?.actorName || "Unknown Attacker"
|
||||||
|
const rollType = message.rolls[0]?.options?.rollType
|
||||||
|
|
||||||
// Calculer les DR
|
// Calculer les DR — les sorts utilisent une DR manuelle saisie par l'utilisateur
|
||||||
const bypassArmor = message.rolls[0]?.options?.bypassArmor || false
|
const isSpellDamage = rollType === "spell-damage"
|
||||||
const armorDR = bypassArmor ? 0 : (defender.computeDamageReduction() || 0)
|
const manualDR = message.rolls[0]?.options?.manualDR ?? 0
|
||||||
const extraShieldDr = Number(message.rolls[0]?.options?.extraShieldDr) || 0
|
const extraShieldDr = Number(message.rolls[0]?.options?.extraShieldDr) || 0
|
||||||
const totalDR = armorDR + extraShieldDr
|
const armorDR = isSpellDamage ? manualDR : (defender.computeDamageReduction() || 0)
|
||||||
|
const totalDR = isSpellDamage ? manualDR : armorDR + extraShieldDr
|
||||||
const finalDamage = Math.max(0, damageTotal - totalDR)
|
const finalDamage = Math.max(0, damageTotal - totalDR)
|
||||||
|
|
||||||
// Prefer the token ID stored in roll options (set at attack time when the exact token is known).
|
// Prefer the token ID stored in roll options (set at attack time when the exact token is known).
|
||||||
@@ -914,7 +988,9 @@ Hooks.on("createChatMessage", async (message) => {
|
|||||||
{
|
{
|
||||||
targetName: defender.name,
|
targetName: defender.name,
|
||||||
damage: finalDamage,
|
damage: finalDamage,
|
||||||
drText: bypassArmor ? "Armor DR bypassed (spell)" : (totalDR > 0 ? `Armor DR: ${armorDR}${extraShieldDr > 0 ? ` + Shield DR: ${extraShieldDr}` : ""}` : ""),
|
drText: isSpellDamage
|
||||||
|
? (manualDR > 0 ? `Spell DR: ${manualDR}` : "No DR applied")
|
||||||
|
: (totalDR > 0 ? `Armor DR: ${armorDR}${extraShieldDr > 0 ? ` + Shield DR: ${extraShieldDr}` : ""}` : ""),
|
||||||
weaponName: weaponName,
|
weaponName: weaponName,
|
||||||
attackerName: attackerName,
|
attackerName: attackerName,
|
||||||
rawDamage: damageTotal
|
rawDamage: damageTotal
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ export class LethalFantasyCombatTracker extends foundry.applications.sidebar.tab
|
|||||||
actions: {
|
actions: {
|
||||||
initiativePlus: LethalFantasyCombatTracker.#initiativePlus,
|
initiativePlus: LethalFantasyCombatTracker.#initiativePlus,
|
||||||
initiativeMinus: LethalFantasyCombatTracker.#initiativeMinus,
|
initiativeMinus: LethalFantasyCombatTracker.#initiativeMinus,
|
||||||
|
rollMonsterProgression: LethalFantasyCombatTracker.#rollMonsterProgression,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -49,6 +50,15 @@ export class LethalFantasyCombatTracker extends foundry.applications.sidebar.tab
|
|||||||
c.update({ 'initiative': newInit });
|
c.update({ 'initiative': newInit });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Roll progression dice for all monster combatants that are eligible this round.
|
||||||
|
* @param {Event} ev Click event.
|
||||||
|
*/
|
||||||
|
static async #rollMonsterProgression(ev) {
|
||||||
|
ev.preventDefault();
|
||||||
|
await game.combat.rollMonsterProgression();
|
||||||
|
}
|
||||||
|
|
||||||
activateListeners(html) {
|
activateListeners(html) {
|
||||||
super.activateListeners(html);
|
super.activateListeners(html);
|
||||||
// Display Combat settings
|
// Display Combat settings
|
||||||
@@ -109,18 +119,12 @@ export class LethalFantasyCombat extends Combat {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async rollInitiative(ids, options) {
|
async rollInitiative(ids, options) {
|
||||||
console.log("%%%%%%%%% Roll Initiative", ids, options);
|
|
||||||
|
|
||||||
ids = typeof ids === "string" ? [ids] : ids;
|
ids = typeof ids === "string" ? [ids] : ids;
|
||||||
let messages = [];
|
|
||||||
let rollMode = game.settings.get("core", "rollMode");
|
|
||||||
|
|
||||||
let updates = [];
|
|
||||||
for (let cId of ids) {
|
for (let cId of ids) {
|
||||||
const c = this.combatants.get(cId);
|
const c = this.combatants.get(cId);
|
||||||
const playerOwner = game.users.find(u => u.active && !u.isGM && u.character?.id === c.actor.id);
|
const playerOwner = game.users.find(u => u.active && !u.isGM && u.character?.id === c.actor.id);
|
||||||
if (game.user.isGM && playerOwner) {
|
if (game.user.isGM && playerOwner) {
|
||||||
console.log("Rolling initiative for", c.actor.name);
|
|
||||||
game.socket.emit(`system.${SYSTEM.id}`, { type: "rollInitiative", userId: playerOwner.id, actorId: c.actor.id, combatId: this.id, combatantId: c.id });
|
game.socket.emit(`system.${SYSTEM.id}`, { type: "rollInitiative", userId: playerOwner.id, actorId: c.actor.id, combatId: this.id, combatantId: c.id });
|
||||||
} else {
|
} else {
|
||||||
await c.actor.system.rollInitiative(this.id, c.id);
|
await c.actor.system.rollInitiative(this.id, c.id);
|
||||||
@@ -130,6 +134,36 @@ export class LethalFantasyCombat extends Combat {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Roll progression dice for all eligible monster combatants this round. Called manually by the GM. */
|
||||||
|
async rollMonsterProgression() {
|
||||||
|
const currentRound = this.round;
|
||||||
|
const monsters = this.combatants.filter(c => c.actor?.type === "monster" && !c.isDefeated);
|
||||||
|
|
||||||
|
if (monsters.length === 0) {
|
||||||
|
ui.notifications.warn("No monsters in combat.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let rolled = 0;
|
||||||
|
for (let c of monsters) {
|
||||||
|
if (c.initiative !== null && currentRound >= c.initiative) {
|
||||||
|
await c.actor.system.rollProgressionDice(this.id, c.id);
|
||||||
|
rolled++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rolled === 0) {
|
||||||
|
const earliest = monsters.reduce((min, c) => (c.initiative !== null && c.initiative < min) ? c.initiative : min, Infinity);
|
||||||
|
if (earliest === Infinity) {
|
||||||
|
ui.notifications.warn("Monsters have no initiative set. Roll initiative first.");
|
||||||
|
} else {
|
||||||
|
ui.notifications.info(`No monsters act yet — earliest monster initiative is ${earliest} (current round: ${currentRound}).`);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
this._monsterProgressionRolledRound = currentRound;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
resetProgression(cId) {
|
resetProgression(cId) {
|
||||||
let c = this.combatants.get(cId);
|
let c = this.combatants.get(cId);
|
||||||
c.update({ 'system.progressionCount': 0 });
|
c.update({ 'system.progressionCount': 0 });
|
||||||
@@ -151,15 +185,12 @@ export class LethalFantasyCombat extends Combat {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async nextTurn() {
|
async nextTurn() {
|
||||||
console.log("NEXT TURN");
|
|
||||||
|
|
||||||
let turn = this.turn ?? -1;
|
let turn = this.turn ?? -1;
|
||||||
let skipDefeated = this.settings.skipDefeated;
|
let skipDefeated = this.settings.skipDefeated;
|
||||||
|
|
||||||
// Determine the next turn number
|
// Determine the next turn number
|
||||||
let next = null;
|
let next = null;
|
||||||
for (let [i, t] of this.turns.entries()) {
|
for (let [i, t] of this.turns.entries()) {
|
||||||
console.log("Turn", t);
|
|
||||||
if (i <= turn) continue;
|
if (i <= turn) continue;
|
||||||
if (skipDefeated && t.isDefeated) continue;
|
if (skipDefeated && t.isDefeated) continue;
|
||||||
next = i;
|
next = i;
|
||||||
@@ -183,7 +214,6 @@ export class LethalFantasyCombat extends Combat {
|
|||||||
this.turnsDone = false
|
this.turnsDone = false
|
||||||
|
|
||||||
let turn = this.turn === null ? null : 0; // Preserve the fact that it's no-one's turn currently.
|
let turn = this.turn === null ? null : 0; // Preserve the fact that it's no-one's turn currently.
|
||||||
console.log("ROUND", this);
|
|
||||||
|
|
||||||
let advanceTime = Math.max(this.turns.length - this.turn, 0) * CONFIG.time.turnTime;
|
let advanceTime = Math.max(this.turns.length - this.turn, 0) * CONFIG.time.turnTime;
|
||||||
advanceTime += CONFIG.time.roundTime;
|
advanceTime += CONFIG.time.roundTime;
|
||||||
@@ -201,8 +231,24 @@ export class LethalFantasyCombat extends Combat {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Warn if eligible monsters have not rolled progression dice this round
|
||||||
|
const eligibleMonsters = this.combatants.filter(
|
||||||
|
c => c.actor?.type === "monster" && !c.isDefeated && c.initiative !== null && this.round >= c.initiative
|
||||||
|
);
|
||||||
|
if (eligibleMonsters.length > 0 && this._monsterProgressionRolledRound !== this.round) {
|
||||||
|
const proceed = await foundry.applications.api.DialogV2.confirm({
|
||||||
|
window: { title: game.i18n.localize("LETHALFANTASY.Combat.monstersNotRolledTitle") },
|
||||||
|
content: `<p>${game.i18n.localize("LETHALFANTASY.Combat.monstersNotRolledMsg")}</p>`,
|
||||||
|
yes: { label: game.i18n.localize("LETHALFANTASY.Combat.proceedYes") },
|
||||||
|
no: { label: game.i18n.localize("LETHALFANTASY.Combat.proceedNo") },
|
||||||
|
rejectClose: false,
|
||||||
|
});
|
||||||
|
if (!proceed) return this;
|
||||||
|
}
|
||||||
|
|
||||||
for (let c of this.combatants) {
|
for (let c of this.combatants) {
|
||||||
if (nextRound >= c.initiative) {
|
if (nextRound >= c.initiative) {
|
||||||
|
if (c.actor.type === "monster") continue; // Monsters roll manually via the "Roll Monsters" button
|
||||||
const playerOwner = game.users.find(u => u.active && !u.isGM && u.character?.id === c.actor.id);
|
const playerOwner = game.users.find(u => u.active && !u.isGM && u.character?.id === c.actor.id);
|
||||||
if (game.user.isGM && playerOwner) {
|
if (game.user.isGM && playerOwner) {
|
||||||
game.socket.emit(`system.${SYSTEM.id}`, { type: "rollProgressionDice", userId: playerOwner.id, progressionCount: c.system.progressionCount + 1, actorId: c.actor.id, combatId: this.id, combatantId: c.id });
|
game.socket.emit(`system.${SYSTEM.id}`, { type: "rollProgressionDice", userId: playerOwner.id, progressionCount: c.system.progressionCount + 1, actorId: c.actor.id, combatId: this.id, combatantId: c.id });
|
||||||
|
|||||||
@@ -142,11 +142,14 @@ export async function rollFreeDie(dieType, count = 1, explode = false) {
|
|||||||
`
|
`
|
||||||
|
|
||||||
const rollMode = game.settings.get("core", "rollMode")
|
const rollMode = game.settings.get("core", "rollMode")
|
||||||
|
// Normalize old-style rollMode keys (v12/v13) to new-style (v14), fallback to "public"
|
||||||
|
const modeMap = { publicroll: "public", gmroll: "gm", blindroll: "blind", selfroll: "self" }
|
||||||
|
const mode = modeMap[rollMode] ?? rollMode ?? "public"
|
||||||
const msgData = {
|
const msgData = {
|
||||||
speaker: ChatMessage.getSpeaker(),
|
speaker: ChatMessage.getSpeaker(),
|
||||||
content,
|
content,
|
||||||
sound: CONFIG.sounds.dice,
|
sound: CONFIG.sounds.dice,
|
||||||
|
mode,
|
||||||
}
|
}
|
||||||
ChatMessage.applyRollMode(msgData, rollMode)
|
|
||||||
await ChatMessage.create(msgData)
|
await ChatMessage.create(msgData)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -172,7 +172,7 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet
|
|||||||
})
|
})
|
||||||
if (!roll) return null
|
if (!roll) return null
|
||||||
|
|
||||||
await roll.toMessage({}, { rollMode: roll.options.rollMode })
|
await roll.toMessage({}, { messageMode: roll.options.rollMode })
|
||||||
}
|
}
|
||||||
|
|
||||||
static async #onRollInitiative(event, target) {
|
static async #onRollInitiative(event, target) {
|
||||||
@@ -259,9 +259,11 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet
|
|||||||
|
|
||||||
async _onRoll(event, target) {
|
async _onRoll(event, target) {
|
||||||
if (this.isEditMode) return
|
if (this.isEditMode) return
|
||||||
const rollType = event.target.dataset.rollType
|
const el = event.currentTarget
|
||||||
let rollKey = event.target.dataset.rollKey;
|
const rollType = el.dataset.rollType
|
||||||
let rollDice = event.target.dataset?.rollDice;
|
if (!rollType) return
|
||||||
|
let rollKey = el.dataset.rollKey
|
||||||
|
let rollDice = el.dataset.rollDice
|
||||||
|
|
||||||
this.actor.prepareRoll(rollType, rollKey, rollDice)
|
this.actor.prepareRoll(rollType, rollKey, rollDice)
|
||||||
|
|
||||||
|
|||||||
@@ -111,11 +111,13 @@ export default class LethalFantasyMonsterSheet extends LethalFantasyActorSheet {
|
|||||||
})
|
})
|
||||||
if (!roll) return null
|
if (!roll) return null
|
||||||
|
|
||||||
await roll.toMessage({}, { rollMode: roll.options.rollMode })
|
await roll.toMessage({}, { messageMode: roll.options.rollMode })
|
||||||
}
|
}
|
||||||
|
|
||||||
static async #onRollInitiative(event, target) {
|
static async #onRollInitiative(event, target) {
|
||||||
await this.document.system.rollInitiative(event, target)
|
const combat = game.combat
|
||||||
|
const combatant = combat?.combatants.find(c => c.actorId === this.document.id)
|
||||||
|
await this.document.system.rollInitiative(combat?.id, combatant?.id)
|
||||||
}
|
}
|
||||||
|
|
||||||
getBestWeaponClassSkill(skills, rollType, multiplier = 1.0) {
|
getBestWeaponClassSkill(skills, rollType, multiplier = 1.0) {
|
||||||
|
|||||||
@@ -198,6 +198,22 @@ export default class LethalFantasyActor extends Actor {
|
|||||||
case "miracle-power":
|
case "miracle-power":
|
||||||
rollTarget = this.items.find((i) => (i.type === "miracle" || i.type == "spell") && i.id === rollKey)
|
rollTarget = this.items.find((i) => (i.type === "miracle" || i.type == "spell") && i.id === rollKey)
|
||||||
rollTarget.rollKey = rollKey
|
rollTarget.rollKey = rollKey
|
||||||
|
if (rollType === "spell-attack" || rollType === "spell-power") {
|
||||||
|
const cost = Number(rollTarget.system?.cost) || 0
|
||||||
|
const currentAether = Number(this.system.aetherPoints?.value) || 0
|
||||||
|
if (cost > currentAether) {
|
||||||
|
ui.notifications.warn(`${this.name} cannot cast ${rollTarget.name}: insufficient Aether (needs ${cost}, has ${currentAether}).`)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (rollType === "miracle-attack" || rollType === "miracle-power") {
|
||||||
|
const cost = Number(rollTarget.system?.level) || 0
|
||||||
|
const currentGrace = Number(this.system.divinityPoints?.value) || 0
|
||||||
|
if (cost > currentGrace) {
|
||||||
|
ui.notifications.warn(`${this.name} cannot invoke ${rollTarget.name}: insufficient Grace (needs ${cost}, has ${currentGrace}).`)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
break
|
break
|
||||||
case "shield-roll": {
|
case "shield-roll": {
|
||||||
rollTarget = this.items.find((i) => i.type === "shield" && i.id === rollKey)
|
rollTarget = this.items.find((i) => i.type === "shield" && i.id === rollKey)
|
||||||
@@ -263,7 +279,7 @@ export default class LethalFantasyActor extends Actor {
|
|||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
ui.notifications.error(game.i18n.localize("LETHALFANTASY.Notifications.rollTypeNotFound") + String(rollType))
|
ui.notifications.error(game.i18n.localize("LETHALFANTASY.Notifications.rollTypeNotFound") + String(rollType))
|
||||||
break
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// In all cases
|
// In all cases
|
||||||
|
|||||||
+25
-13
@@ -272,6 +272,7 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
hasChangeDice = false
|
hasChangeDice = false
|
||||||
hasMaxValue = false
|
hasMaxValue = false
|
||||||
hasExplode = false
|
hasExplode = false
|
||||||
|
hasFavor = true
|
||||||
options.rollTarget.value = 0
|
options.rollTarget.value = 0
|
||||||
|
|
||||||
} else if (options.rollType.includes("weapon-damage")) {
|
} else if (options.rollType.includes("weapon-damage")) {
|
||||||
@@ -289,7 +290,11 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
options.damageMedium = true
|
options.damageMedium = true
|
||||||
dice = options.rollTarget.weapon.system.damage.damageM
|
dice = options.rollTarget.weapon.system.damage.damageM
|
||||||
}
|
}
|
||||||
dice = dice.replace("E", "")
|
if (/NE$/i.test(dice)) {
|
||||||
|
hasMaxValue = false
|
||||||
|
hasExplode = false
|
||||||
|
}
|
||||||
|
dice = dice.replace(/NE$/i, "").replace("E", "")
|
||||||
baseFormula = dice
|
baseFormula = dice
|
||||||
|
|
||||||
} else if (options.rollType.includes("monster-damage")) {
|
} else if (options.rollType.includes("monster-damage")) {
|
||||||
@@ -302,6 +307,10 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
dice = options.rollTarget.damageDice
|
dice = options.rollTarget.damageDice
|
||||||
dice = dice.replace("E", "")
|
dice = dice.replace("E", "")
|
||||||
baseFormula = dice
|
baseFormula = dice
|
||||||
|
if (options.rollTarget.noExplode) {
|
||||||
|
hasMaxValue = false
|
||||||
|
hasExplode = false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -311,8 +320,8 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
hasModifier = false
|
hasModifier = false
|
||||||
}
|
}
|
||||||
|
|
||||||
const rollModes = foundry.utils.duplicate(CONFIG.Dice.rollModes); // v12 : Object.fromEntries(Object.entries(CONFIG.Dice.rollModes).map(([key, value]) => [key, game.i18n.localize(value)]))
|
const rollModes = foundry.utils.duplicate(CONFIG.ChatMessage.modes);
|
||||||
console.log("Roll mode", rollModes)
|
|
||||||
|
|
||||||
const fieldRollMode = new foundry.data.fields.StringField({
|
const fieldRollMode = new foundry.data.fields.StringField({
|
||||||
choices: rollModes,
|
choices: rollModes,
|
||||||
@@ -361,7 +370,9 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
beyondSkill = !!rollContext.beyondSkill
|
beyondSkill = !!rollContext.beyondSkill
|
||||||
letItFly = !!rollContext.letItFly
|
letItFly = !!rollContext.letItFly
|
||||||
saveSpell = !!rollContext.saveSpell
|
saveSpell = !!rollContext.saveSpell
|
||||||
rollContext.visibility ||= rollContext.rollMode || game.settings.get("core", "rollMode")
|
const _rawMode = rollContext.rollMode || game.settings.get("core", "rollMode")
|
||||||
|
const _modeMap = { publicroll: "public", gmroll: "gm", blindroll: "blind", selfroll: "self" }
|
||||||
|
rollContext.visibility ||= _modeMap[_rawMode] ?? _rawMode ?? "public"
|
||||||
rollContext.modifier ||= modifier
|
rollContext.modifier ||= modifier
|
||||||
rollContext.favor ||= "none"
|
rollContext.favor ||= "none"
|
||||||
rollContext.changeDice ||= `${dice}`
|
rollContext.changeDice ||= `${dice}`
|
||||||
@@ -497,7 +508,8 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
rollContext.favor = "none"
|
rollContext.favor = "none"
|
||||||
}
|
}
|
||||||
|
|
||||||
maxValue = Number(baseFormula.match(/\d+$/)[0]) // Update the max value agains
|
const maxMatch = baseFormula ? baseFormula.match(/\d+$/) : null
|
||||||
|
maxValue = maxMatch ? Number(maxMatch[0]) : 0
|
||||||
|
|
||||||
const rollData = {
|
const rollData = {
|
||||||
type: options.rollType,
|
type: options.rollType,
|
||||||
@@ -666,7 +678,7 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
|
|
||||||
/* ***********************************************************/
|
/* ***********************************************************/
|
||||||
static async promptInitiative(options = {}) {
|
static async promptInitiative(options = {}) {
|
||||||
const rollModes = foundry.utils.duplicate(CONFIG.Dice.rollModes); // v12 : Object.fromEntries(Object.entries(CONFIG.Dice.rollModes).map(([key, value]) => [key, game.i18n.localize(value)]))
|
const rollModes = foundry.utils.duplicate(CONFIG.ChatMessage.modes); // v12 : Object.fromEntries(Object.entries(CONFIG.Dice.rollModes).map(([key, value]) => [key, game.i18n.localize(value)]))
|
||||||
const fieldRollMode = new foundry.data.fields.StringField({
|
const fieldRollMode = new foundry.data.fields.StringField({
|
||||||
choices: rollModes,
|
choices: rollModes,
|
||||||
blank: false,
|
blank: false,
|
||||||
@@ -720,7 +732,7 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
|
|
||||||
let initRoll = new Roll(formula, options.data)
|
let initRoll = new Roll(formula, options.data)
|
||||||
await initRoll.evaluate()
|
await initRoll.evaluate()
|
||||||
let msg = await initRoll.toMessage({ flavor: `Initiative for ${options.actorName}` }, { rollMode: rollContext.visibility })
|
let msg = await initRoll.toMessage({ flavor: `Initiative for ${options.actorName}` }, { messageMode: rollContext.visibility })
|
||||||
if (game?.dice3d && initRoll.dice?.length) {
|
if (game?.dice3d && initRoll.dice?.length) {
|
||||||
await game.dice3d.waitFor3DAnimationByMessageID(msg.id)
|
await game.dice3d.waitFor3DAnimationByMessageID(msg.id)
|
||||||
}
|
}
|
||||||
@@ -734,7 +746,7 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
/* ***********************************************************/
|
/* ***********************************************************/
|
||||||
static async promptCombatAction(options = {}) {
|
static async promptCombatAction(options = {}) {
|
||||||
|
|
||||||
const rollModes = foundry.utils.duplicate(CONFIG.Dice.rollModes); // v12 : Object.fromEntries(Object.entries(CONFIG.Dice.rollModes).map(([key, value]) => [key, game.i18n.localize(value)]))
|
const rollModes = foundry.utils.duplicate(CONFIG.ChatMessage.modes); // v12 : Object.fromEntries(Object.entries(CONFIG.Dice.rollModes).map(([key, value]) => [key, game.i18n.localize(value)]))
|
||||||
const fieldRollMode = new foundry.data.fields.StringField({
|
const fieldRollMode = new foundry.data.fields.StringField({
|
||||||
choices: rollModes,
|
choices: rollModes,
|
||||||
blank: false,
|
blank: false,
|
||||||
@@ -991,7 +1003,7 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
|
|
||||||
let max = roll.dice[0].faces - 1
|
let max = roll.dice[0].faces - 1
|
||||||
max = Math.min(currentAction.progressionCount, max)
|
max = Math.min(currentAction.progressionCount, max)
|
||||||
let msg = await roll.toMessage({ flavor: `Progression Roll for ${currentAction.name}, progression count : ${currentAction.progressionCount}/${max}` }, { rollMode: rollContext.visibility })
|
let msg = await roll.toMessage({ flavor: `Progression Roll for ${currentAction.name}, progression count : ${currentAction.progressionCount}/${max}` }, { messageMode: rollContext.visibility })
|
||||||
if (game?.dice3d) {
|
if (game?.dice3d) {
|
||||||
await game.dice3d.waitFor3DAnimationByMessageID(msg.id)
|
await game.dice3d.waitFor3DAnimationByMessageID(msg.id)
|
||||||
}
|
}
|
||||||
@@ -1033,7 +1045,7 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
/* ***********************************************************/
|
/* ***********************************************************/
|
||||||
static async promptRangedDefense(options = {}) {
|
static async promptRangedDefense(options = {}) {
|
||||||
|
|
||||||
const rollModes = foundry.utils.duplicate(CONFIG.Dice.rollModes);
|
const rollModes = foundry.utils.duplicate(CONFIG.ChatMessage.modes);
|
||||||
const fieldRollMode = new foundry.data.fields.StringField({
|
const fieldRollMode = new foundry.data.fields.StringField({
|
||||||
choices: rollModes,
|
choices: rollModes,
|
||||||
blank: false,
|
blank: false,
|
||||||
@@ -1322,11 +1334,11 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
*
|
*
|
||||||
* @param {Object} [messageData={}] Additional data to include in the message.
|
* @param {Object} [messageData={}] Additional data to include in the message.
|
||||||
* @param {Object} options Options for message creation.
|
* @param {Object} options Options for message creation.
|
||||||
* @param {string} options.rollMode The mode of the roll (e.g., public, private).
|
* @param {string} options.messageMode The mode of the roll (e.g., public, private).
|
||||||
* @param {boolean} [options.create=true] Whether to create the message.
|
* @param {boolean} [options.create=true] Whether to create the message.
|
||||||
* @returns {Promise} - A promise that resolves when the message is created.
|
* @returns {Promise} - A promise that resolves when the message is created.
|
||||||
*/
|
*/
|
||||||
async toMessage(messageData = {}, { rollMode, create = true } = {}) {
|
async toMessage(messageData = {}, { messageMode, create = true } = {}) {
|
||||||
return await super.toMessage(
|
return await super.toMessage(
|
||||||
{
|
{
|
||||||
isSave: this.isSave,
|
isSave: this.isSave,
|
||||||
@@ -1344,7 +1356,7 @@ export default class LethalFantasyRoll extends Roll {
|
|||||||
rollData: this.rollData,
|
rollData: this.rollData,
|
||||||
...messageData,
|
...messageData,
|
||||||
},
|
},
|
||||||
{ rollMode, create },
|
{ messageMode, create },
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -297,7 +297,7 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod
|
|||||||
})
|
})
|
||||||
if (!roll) return null
|
if (!roll) return null
|
||||||
|
|
||||||
await roll.toMessage({}, { rollMode: roll.options.rollMode })
|
await roll.toMessage({}, { messageMode: roll.options.rollMode })
|
||||||
}
|
}
|
||||||
|
|
||||||
async rollInitiative(combatId = undefined, combatantId = undefined) {
|
async rollInitiative(combatId = undefined, combatantId = undefined) {
|
||||||
@@ -318,7 +318,7 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod
|
|||||||
})
|
})
|
||||||
if (!roll) return null
|
if (!roll) return null
|
||||||
|
|
||||||
await roll.toMessage({}, { rollMode: roll.options.rollMode })
|
await roll.toMessage({}, { messageMode: roll.options.rollMode })
|
||||||
}
|
}
|
||||||
|
|
||||||
async rollProgressionDice(combatId, combatantId, rollProgressionCount) {
|
async rollProgressionDice(combatId, combatantId, rollProgressionCount) {
|
||||||
@@ -356,6 +356,11 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (weaponsChoices.length === 0) {
|
||||||
|
ui.notifications.warn(`${this.parent.name} has no weapons or spells available for combat. Add a weapon to the character sheet first.`)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
let roll = await LethalFantasyRoll.promptCombatAction({
|
let roll = await LethalFantasyRoll.promptCombatAction({
|
||||||
actorId: this.parent.id,
|
actorId: this.parent.id,
|
||||||
actorName: this.parent.name,
|
actorName: this.parent.name,
|
||||||
|
|||||||
@@ -35,6 +35,9 @@ export default class LethalFantasyMiracle extends foundry.abstract.TypeDataModel
|
|||||||
|
|
||||||
schema.attackRoll = new fields.StringField({ required: true, initial: "" })
|
schema.attackRoll = new fields.StringField({ required: true, initial: "" })
|
||||||
schema.powerRoll = new fields.StringField({ required: true, initial: "" })
|
schema.powerRoll = new fields.StringField({ required: true, initial: "" })
|
||||||
|
schema.damageDice = new fields.StringField({ required: false, initial: "" })
|
||||||
|
schema.damageDiceOverpowered = new fields.StringField({ required: false, initial: "" })
|
||||||
|
schema.damageDiceOverpowered2 = new fields.StringField({ required: false, initial: "" })
|
||||||
|
|
||||||
return schema
|
return schema
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
|
|||||||
painDamage: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 })
|
painDamage: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 })
|
||||||
})
|
})
|
||||||
|
|
||||||
const attackField = (label) => {
|
const attackField = (label, initialNoExplode = false) => {
|
||||||
const schema = {
|
const schema = {
|
||||||
key: new fields.StringField({ required: true, nullable: false, initial: `attack${label}` }),
|
key: new fields.StringField({ required: true, nullable: false, initial: `attack${label}` }),
|
||||||
name: new fields.StringField({ required: true, nullable: false, initial: `Attack ${label}` }),
|
name: new fields.StringField({ required: true, nullable: false, initial: `Attack ${label}` }),
|
||||||
@@ -74,6 +74,7 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
|
|||||||
damageDice: new fields.StringField({ required: true, nullable: false, initial: "1D6" }),
|
damageDice: new fields.StringField({ required: true, nullable: false, initial: "1D6" }),
|
||||||
damageModifier: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
|
damageModifier: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
|
||||||
enabled: new fields.BooleanField({ initial: true, required: true, nullable: false }),
|
enabled: new fields.BooleanField({ initial: true, required: true, nullable: false }),
|
||||||
|
noExplode: new fields.BooleanField({ initial: initialNoExplode, required: true, nullable: false }),
|
||||||
}
|
}
|
||||||
return new fields.SchemaField(schema, { label })
|
return new fields.SchemaField(schema, { label })
|
||||||
}
|
}
|
||||||
@@ -123,8 +124,8 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
|
|||||||
shieldDefenseDice: new fields.StringField({ required: true, nullable: false, initial: "d4" })
|
shieldDefenseDice: new fields.StringField({ required: true, nullable: false, initial: "d4" })
|
||||||
})
|
})
|
||||||
schema.combatHTH = new fields.SchemaField({
|
schema.combatHTH = new fields.SchemaField({
|
||||||
attack1: attackField("1"),
|
attack1: attackField("1", true),
|
||||||
attack2: attackField("2")
|
attack2: attackField("2", true)
|
||||||
})
|
})
|
||||||
|
|
||||||
schema.attackMode = new fields.StringField({
|
schema.attackMode = new fields.StringField({
|
||||||
@@ -141,6 +142,15 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
|
|||||||
attack4: attackField("4")
|
attack4: attackField("4")
|
||||||
})
|
})
|
||||||
|
|
||||||
|
schema.rangedWeaponRange = new fields.SchemaField({
|
||||||
|
pointBlank: new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }),
|
||||||
|
short: new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }),
|
||||||
|
medium: new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }),
|
||||||
|
long: new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }),
|
||||||
|
extreme: new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }),
|
||||||
|
outOfSkill: new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 })
|
||||||
|
})
|
||||||
|
|
||||||
return schema
|
return schema
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,7 +180,7 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
|
|||||||
})
|
})
|
||||||
if (!roll) return null
|
if (!roll) return null
|
||||||
|
|
||||||
await roll.toMessage({}, { rollMode: roll.options.rollMode })
|
await roll.toMessage({}, { messageMode: roll.options.rollMode })
|
||||||
}
|
}
|
||||||
|
|
||||||
async prepareMonsterRoll(rollType, rollKey, rollDice = undefined, tokenId = undefined, damageModifier = undefined, defenderId = undefined, defenderTokenId = undefined, extraShieldDr = 0) {
|
async prepareMonsterRoll(rollType, rollKey, rollDice = undefined, tokenId = undefined, damageModifier = undefined, defenderId = undefined, defenderTokenId = undefined, extraShieldDr = 0) {
|
||||||
@@ -182,6 +192,7 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
|
|||||||
const attacksSet = this.attackMode === "ranged" ? this.rangedAttacks : this.attacks
|
const attacksSet = this.attackMode === "ranged" ? this.rangedAttacks : this.attacks
|
||||||
rollTarget = foundry.utils.duplicate(attacksSet[rollKey])
|
rollTarget = foundry.utils.duplicate(attacksSet[rollKey])
|
||||||
rollTarget.rollKey = rollKey
|
rollTarget.rollKey = rollKey
|
||||||
|
rollTarget.attackMode = this.attackMode
|
||||||
if (rollType === "monster-defense") {
|
if (rollType === "monster-defense") {
|
||||||
rollTarget.isRangedDefense = game.lethalFantasy?.nextDefenseData?.isRanged ?? false
|
rollTarget.isRangedDefense = game.lethalFantasy?.nextDefenseData?.isRanged ?? false
|
||||||
}
|
}
|
||||||
@@ -222,7 +233,7 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
|
|||||||
await roll.toMessage({
|
await roll.toMessage({
|
||||||
flavor,
|
flavor,
|
||||||
speaker: ChatMessage.getSpeaker({ actor: this.parent })
|
speaker: ChatMessage.getSpeaker({ actor: this.parent })
|
||||||
})
|
}, { messageMode: roll.options.rollMode ?? game.settings.get("core", "rollMode") })
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
case "weapon-damage-small":
|
case "weapon-damage-small":
|
||||||
@@ -259,7 +270,7 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
rollTarget = skill
|
rollTarget = skill
|
||||||
rollTarget.weapon = weapon
|
rollTarget.weapon = foundry.utils.duplicate(weapon)
|
||||||
rollTarget.weaponSkillModifier = skill.weaponSkillModifier
|
rollTarget.weaponSkillModifier = skill.weaponSkillModifier
|
||||||
rollTarget.rollKey = rollKey
|
rollTarget.rollKey = rollKey
|
||||||
rollTarget.combat = foundry.utils.duplicate(this.combat)
|
rollTarget.combat = foundry.utils.duplicate(this.combat)
|
||||||
@@ -273,7 +284,6 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
|
|||||||
// In all cases
|
// In all cases
|
||||||
if (rollTarget) {
|
if (rollTarget) {
|
||||||
rollTarget.tokenId = tokenId
|
rollTarget.tokenId = tokenId
|
||||||
console.log(rollTarget)
|
|
||||||
await this.roll(rollType, rollTarget, defenderId, defenderTokenId, extraShieldDr)
|
await this.roll(rollType, rollTarget, defenderId, defenderTokenId, extraShieldDr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -294,7 +304,7 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
|
|||||||
})
|
})
|
||||||
if (!roll) return null
|
if (!roll) return null
|
||||||
|
|
||||||
await roll.toMessage({}, { rollMode: roll.options.rollMode })
|
await roll.toMessage({}, { messageMode: roll.options.rollMode })
|
||||||
}
|
}
|
||||||
|
|
||||||
async rollProgressionDice(combatId, combatantId) {
|
async rollProgressionDice(combatId, combatantId) {
|
||||||
@@ -306,7 +316,7 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
const rollModes = foundry.utils.duplicate(CONFIG.Dice.rollModes)
|
const rollModes = foundry.utils.duplicate(CONFIG.ChatMessage.modes)
|
||||||
const fieldRollMode = new foundry.data.fields.StringField({
|
const fieldRollMode = new foundry.data.fields.StringField({
|
||||||
choices: rollModes,
|
choices: rollModes,
|
||||||
blank: false,
|
blank: false,
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ export default class LethalFantasySpell extends foundry.abstract.TypeDataModel {
|
|||||||
schema.attackRoll = new fields.StringField({ required: true, initial: "" })
|
schema.attackRoll = new fields.StringField({ required: true, initial: "" })
|
||||||
schema.powerRoll = new fields.StringField({ required: true, initial: "" })
|
schema.powerRoll = new fields.StringField({ required: true, initial: "" })
|
||||||
schema.damageDice = new fields.StringField({ required: false, initial: "" })
|
schema.damageDice = new fields.StringField({ required: false, initial: "" })
|
||||||
|
schema.damageDiceOverpowered = new fields.StringField({ required: false, initial: "" })
|
||||||
|
schema.damageDiceOverpowered2 = new fields.StringField({ required: false, initial: "" })
|
||||||
|
|
||||||
return schema
|
return schema
|
||||||
}
|
}
|
||||||
|
|||||||
+69
-26
@@ -334,7 +334,7 @@ export default class LethalFantasyUtils {
|
|||||||
|
|
||||||
// Afficher le dialogue
|
// Afficher le dialogue
|
||||||
const result = await foundry.applications.api.DialogV2.wait({
|
const result = await foundry.applications.api.DialogV2.wait({
|
||||||
window: { title: "Defense Roll" },
|
window: { title: msg.isRanged ? "Ranged Defense Roll" : "Defense Roll" },
|
||||||
classes: ["lethalfantasy"],
|
classes: ["lethalfantasy"],
|
||||||
content,
|
content,
|
||||||
buttons: [
|
buttons: [
|
||||||
@@ -375,6 +375,37 @@ export default class LethalFantasyUtils {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Pour les personnages, récupérer les armes équipées
|
||||||
|
// Si l'attaque est une attaque à distance, utiliser le dialogue de défense à distance
|
||||||
|
if (msg.isRanged) {
|
||||||
|
const { default: LethalFantasyRoll } = await import("./documents/roll.mjs")
|
||||||
|
const roll = await LethalFantasyRoll.promptRangedDefense({
|
||||||
|
actorId: defender.id,
|
||||||
|
actorName: defender.name,
|
||||||
|
actorImage: defender.img,
|
||||||
|
})
|
||||||
|
if (roll) {
|
||||||
|
game.lethalFantasy = game.lethalFantasy || {}
|
||||||
|
game.lethalFantasy.nextDefenseData = {
|
||||||
|
attackerId,
|
||||||
|
attackRoll,
|
||||||
|
attackerName,
|
||||||
|
defenderName,
|
||||||
|
attackWeaponId,
|
||||||
|
attackRollType,
|
||||||
|
attackRollKey,
|
||||||
|
attackD30result,
|
||||||
|
attackD30message,
|
||||||
|
attackRerollContext,
|
||||||
|
defenderId: defender.id,
|
||||||
|
defenderTokenId,
|
||||||
|
isRanged: true
|
||||||
|
}
|
||||||
|
await roll.toMessage({}, { messageMode: roll.options.rollMode })
|
||||||
|
}
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// Pour les personnages, récupérer les armes équipées
|
// Pour les personnages, récupérer les armes équipées
|
||||||
const equippedWeapons = defender.items.filter(i =>
|
const equippedWeapons = defender.items.filter(i =>
|
||||||
i.type === "weapon" && i.system.equipped === true
|
i.type === "weapon" && i.system.equipped === true
|
||||||
@@ -831,20 +862,25 @@ export default class LethalFantasyUtils {
|
|||||||
} else if (data.attackRollType === "spell-attack" || data.attackRollType === "miracle-attack") {
|
} else if (data.attackRollType === "spell-attack" || data.attackRollType === "miracle-attack") {
|
||||||
const attacker = game.actors.get(data.attackerId)
|
const attacker = game.actors.get(data.attackerId)
|
||||||
const spell = attacker?.items.get(data.attackWeaponId)
|
const spell = attacker?.items.get(data.attackWeaponId)
|
||||||
const damageDice = spell?.system?.damageDice
|
const tiers = [
|
||||||
if (damageDice) {
|
{ formula: spell?.system?.damageDice, label: "Standard" },
|
||||||
damageButton = `
|
{ formula: spell?.system?.damageDiceOverpowered, label: "Overpowered" },
|
||||||
<div class="attack-result-damage">
|
{ formula: spell?.system?.damageDiceOverpowered2, label: "Overpowered 2" },
|
||||||
<button class="roll-damage-btn"
|
].filter(t => t.formula)
|
||||||
data-attacker-id="${data.attackerId}"
|
if (tiers.length) {
|
||||||
data-defender-id="${data.defenderId}"
|
const buttons = tiers.map(t => {
|
||||||
data-defender-token-id="${data.defenderTokenId || ""}"
|
const escapedFormula = Handlebars.escapeExpression(t.formula)
|
||||||
data-damage-type="spell"
|
return `
|
||||||
data-damage-formula="${damageDice}">
|
<button class="roll-damage-btn"
|
||||||
<i class="fa-solid fa-wand-magic-sparkles"></i> Spell Damage (${damageDice})
|
data-attacker-id="${data.attackerId}"
|
||||||
</button>
|
data-defender-id="${data.defenderId}"
|
||||||
</div>
|
data-defender-token-id="${data.defenderTokenId || ""}"
|
||||||
`
|
data-damage-type="spell"
|
||||||
|
data-damage-formula="${escapedFormula}">
|
||||||
|
<i class="fa-solid fa-wand-magic-sparkles"></i> ${t.label} (${escapedFormula})
|
||||||
|
</button>`
|
||||||
|
}).join("")
|
||||||
|
damageButton = `<div class="attack-result-damage">${buttons}</div>`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -871,10 +907,10 @@ export default class LethalFantasyUtils {
|
|||||||
</div>
|
</div>
|
||||||
<div class="combat-result-text">
|
<div class="combat-result-text">
|
||||||
${outcome === "shielded-hit"
|
${outcome === "shielded-hit"
|
||||||
? `<i class="fa-solid fa-shield"></i> <strong>${data.attackerName}</strong> hits <strong>${data.defenderName}</strong>, but the shield blocked — apply armor DR + shield DR <strong>${data.shieldDamageReduction || 0}</strong>.`
|
? `<i class="fa-solid fa-shield"></i> <strong>${data.defenderName}</strong> has blocked with shield — apply armor DR + shield DR <strong>${data.shieldDamageReduction || 0}</strong>.`
|
||||||
: isAttackWin
|
: isAttackWin
|
||||||
? `<i class="fa-solid fa-circle-check"></i> <strong>${data.attackerName}</strong> hits <strong>${data.defenderName}</strong>!`
|
? `<i class="fa-solid fa-circle-check"></i> <strong>${data.attackerName}</strong> hits <strong>${data.defenderName}</strong>!`
|
||||||
: `<i class="fa-solid fa-shield-halved"></i> <strong>${data.defenderName}</strong> parries the attack!`
|
: `<i class="fa-solid fa-shield-halved"></i> <strong>${data.defenderName}</strong> avoided the attack!`
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
${damageButton}
|
${damageButton}
|
||||||
@@ -1061,25 +1097,32 @@ export default class LethalFantasyUtils {
|
|||||||
static async applyDamage(message, event) {
|
static async applyDamage(message, event) {
|
||||||
// Récupérer les données du message
|
// Récupérer les données du message
|
||||||
let combatantId = event.currentTarget.dataset.combatantId
|
let combatantId = event.currentTarget.dataset.combatantId
|
||||||
if (!combatantId || !game.combat) {
|
if (!combatantId) {
|
||||||
ui.notifications.error("No combatant selected")
|
ui.notifications.error("No combatant selected")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
let combatant = game.combat.combatants.get(combatantId)
|
// Try to find the target: first as a combat combatant, then as a scene token
|
||||||
if (!combatant) {
|
let targetActor = null
|
||||||
ui.notifications.error("Combatant not found")
|
if (game.combat) {
|
||||||
return
|
const combatant = game.combat.combatants.get(combatantId)
|
||||||
|
if (combatant) {
|
||||||
|
targetActor = combatant.token?.actor || game.actors.get(combatant.actorId)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!targetActor) {
|
||||||
|
// Fall back to scene token lookup (non-combat tokens use tokenId as their combatantId)
|
||||||
|
const token = canvas.tokens?.placeables?.find(t => t.id === combatantId)
|
||||||
|
targetActor = token?.actor
|
||||||
}
|
}
|
||||||
|
|
||||||
let targetActor = combatant.token?.actor || game.actors.get(combatant.actorId)
|
|
||||||
if (!targetActor) {
|
if (!targetActor) {
|
||||||
ui.notifications.error("Target actor not found")
|
ui.notifications.error("Target actor not found")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
// Récupérer les données de dégâts du message
|
// Récupérer les données de dégâts du message
|
||||||
let damageTotal = message.rolls[0]?.total || 0
|
// Use options.rollTotal (includes weapon modifier bonus) rather than roll.total (dice formula only)
|
||||||
|
let damageTotal = message.rolls[0]?.options?.rollTotal ?? message.rolls[0]?.total ?? 0
|
||||||
let weaponName = message.rolls[0]?.options?.rollName || "Unknown Weapon"
|
let weaponName = message.rolls[0]?.options?.rollName || "Unknown Weapon"
|
||||||
|
|
||||||
// Calculer les DR
|
// Calculer les DR
|
||||||
@@ -1157,7 +1200,7 @@ export default class LethalFantasyUtils {
|
|||||||
ChatMessage.create({
|
ChatMessage.create({
|
||||||
user: game.user.id,
|
user: game.user.id,
|
||||||
speaker: { alias: targetActor.name },
|
speaker: { alias: targetActor.name },
|
||||||
rollMode: "gmroll",
|
mode: "gm",
|
||||||
content: messageContent
|
content: messageContent
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
MANIFEST-000579
|
MANIFEST-000599
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
2026/04/30-14:38:06.808992 7f3f35bff6c0 Recovering log #577
|
2026/05/18-17:40:11.769288 7f5a477fe6c0 Recovering log #597
|
||||||
2026/04/30-14:38:06.818757 7f3f35bff6c0 Delete type=3 #575
|
2026/05/18-17:40:11.780605 7f5a477fe6c0 Delete type=3 #595
|
||||||
2026/04/30-14:38:06.818831 7f3f35bff6c0 Delete type=0 #577
|
2026/05/18-17:40:11.780699 7f5a477fe6c0 Delete type=0 #597
|
||||||
2026/04/30-14:38:35.518816 7f3ee77fe6c0 Level-0 table #582: started
|
2026/05/18-20:25:54.228818 7f5a467fc6c0 Level-0 table #602: started
|
||||||
2026/04/30-14:38:35.518836 7f3ee77fe6c0 Level-0 table #582: 0 bytes OK
|
2026/05/18-20:25:54.230037 7f5a467fc6c0 Level-0 table #602: 0 bytes OK
|
||||||
2026/04/30-14:38:35.525869 7f3ee77fe6c0 Delete type=0 #580
|
2026/05/18-20:25:54.236369 7f5a467fc6c0 Delete type=0 #600
|
||||||
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/05/18-20:25:54.251050 7f5a467fc6c0 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)
|
2026/05/18-20:25:54.251106 7f5a467fc6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
2026/04/29-20:13:54.005832 7fed937fe6c0 Recovering log #573
|
2026/05/18-07:32:52.671725 7f5a94bff6c0 Recovering log #593
|
||||||
2026/04/29-20:13:54.016172 7fed937fe6c0 Delete type=3 #571
|
2026/05/18-07:32:52.684619 7f5a94bff6c0 Delete type=3 #591
|
||||||
2026/04/29-20:13:54.016279 7fed937fe6c0 Delete type=0 #573
|
2026/05/18-07:32:52.684760 7f5a94bff6c0 Delete type=0 #593
|
||||||
2026/04/29-20:27:06.418200 7feb10fff6c0 Level-0 table #578: started
|
2026/05/18-07:58:12.225439 7f5a467fc6c0 Level-0 table #598: started
|
||||||
2026/04/29-20:27:06.418231 7feb10fff6c0 Level-0 table #578: 0 bytes OK
|
2026/05/18-07:58:12.225593 7f5a467fc6c0 Level-0 table #598: 0 bytes OK
|
||||||
2026/04/29-20:27:06.424568 7feb10fff6c0 Delete type=0 #576
|
2026/05/18-07:58:12.232817 7f5a467fc6c0 Delete type=0 #596
|
||||||
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/05/18-07:58:12.252837 7f5a467fc6c0 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)
|
2026/05/18-07:58:12.252955 7f5a467fc6c0 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-000576
|
MANIFEST-000596
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
2026/04/30-14:38:06.823818 7f3f353fe6c0 Recovering log #574
|
2026/05/18-17:40:11.793894 7f5a94bff6c0 Recovering log #594
|
||||||
2026/04/30-14:38:06.834104 7f3f353fe6c0 Delete type=3 #572
|
2026/05/18-17:40:11.804447 7f5a94bff6c0 Delete type=3 #592
|
||||||
2026/04/30-14:38:06.834187 7f3f353fe6c0 Delete type=0 #574
|
2026/05/18-17:40:11.804549 7f5a94bff6c0 Delete type=0 #594
|
||||||
2026/04/30-14:38:35.525993 7f3ee77fe6c0 Level-0 table #579: started
|
2026/05/18-20:25:54.236611 7f5a467fc6c0 Level-0 table #599: started
|
||||||
2026/04/30-14:38:35.526019 7f3ee77fe6c0 Level-0 table #579: 0 bytes OK
|
2026/05/18-20:25:54.236652 7f5a467fc6c0 Level-0 table #599: 0 bytes OK
|
||||||
2026/04/30-14:38:35.532067 7f3ee77fe6c0 Delete type=0 #577
|
2026/05/18-20:25:54.243997 7f5a467fc6c0 Delete type=0 #597
|
||||||
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/05/18-20:25:54.251069 7f5a467fc6c0 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)
|
2026/05/18-20:25:54.264439 7f5a467fc6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
2026/04/29-20:13:54.023030 7fed93fff6c0 Recovering log #570
|
2026/05/18-07:32:52.700651 7f5a477fe6c0 Recovering log #590
|
||||||
2026/04/29-20:13:54.032615 7fed93fff6c0 Delete type=3 #568
|
2026/05/18-07:32:52.712680 7f5a477fe6c0 Delete type=3 #588
|
||||||
2026/04/29-20:13:54.032677 7fed93fff6c0 Delete type=0 #570
|
2026/05/18-07:32:52.712814 7f5a477fe6c0 Delete type=0 #590
|
||||||
2026/04/29-20:27:06.286266 7feb10fff6c0 Level-0 table #575: started
|
2026/05/18-07:58:12.232998 7f5a467fc6c0 Level-0 table #595: started
|
||||||
2026/04/29-20:27:06.286286 7feb10fff6c0 Level-0 table #575: 0 bytes OK
|
2026/05/18-07:58:12.233130 7f5a467fc6c0 Level-0 table #595: 0 bytes OK
|
||||||
2026/04/29-20:27:06.292048 7feb10fff6c0 Delete type=0 #573
|
2026/05/18-07:58:12.244133 7f5a467fc6c0 Delete type=0 #593
|
||||||
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/05/18-07:58:12.252873 7f5a467fc6c0 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)
|
2026/05/18-07:58:12.252977 7f5a467fc6c0 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-000581
|
MANIFEST-000601
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
2026/04/30-14:38:06.795186 7f3f353fe6c0 Recovering log #579
|
2026/05/18-17:40:11.749971 7f5a46ffd6c0 Recovering log #599
|
||||||
2026/04/30-14:38:06.805935 7f3f353fe6c0 Delete type=3 #577
|
2026/05/18-17:40:11.761423 7f5a46ffd6c0 Delete type=3 #597
|
||||||
2026/04/30-14:38:06.805994 7f3f353fe6c0 Delete type=0 #579
|
2026/05/18-17:40:11.761520 7f5a46ffd6c0 Delete type=0 #599
|
||||||
2026/04/30-14:38:35.512680 7f3ee77fe6c0 Level-0 table #584: started
|
2026/05/18-20:25:54.219239 7f5a467fc6c0 Level-0 table #604: started
|
||||||
2026/04/30-14:38:35.512729 7f3ee77fe6c0 Level-0 table #584: 0 bytes OK
|
2026/05/18-20:25:54.219522 7f5a467fc6c0 Level-0 table #604: 0 bytes OK
|
||||||
2026/04/30-14:38:35.518704 7f3ee77fe6c0 Delete type=0 #582
|
2026/05/18-20:25:54.228610 7f5a467fc6c0 Delete type=0 #602
|
||||||
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/05/18-20:25:54.251028 7f5a467fc6c0 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)
|
2026/05/18-20:25:54.251085 7f5a467fc6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
2026/04/29-20:13:53.990808 7fed927fc6c0 Recovering log #575
|
2026/05/18-07:32:52.650924 7f5a47fff6c0 Recovering log #595
|
||||||
2026/04/29-20:13:54.001559 7fed927fc6c0 Delete type=3 #573
|
2026/05/18-07:32:52.662191 7f5a47fff6c0 Delete type=3 #593
|
||||||
2026/04/29-20:13:54.001699 7fed927fc6c0 Delete type=0 #575
|
2026/05/18-07:32:52.662331 7f5a47fff6c0 Delete type=0 #595
|
||||||
2026/04/29-20:27:06.273802 7feb10fff6c0 Level-0 table #580: started
|
2026/05/18-07:58:12.218060 7f5a467fc6c0 Level-0 table #600: started
|
||||||
2026/04/29-20:27:06.273877 7feb10fff6c0 Level-0 table #580: 0 bytes OK
|
2026/05/18-07:58:12.218402 7f5a467fc6c0 Level-0 table #600: 0 bytes OK
|
||||||
2026/04/29-20:27:06.280252 7feb10fff6c0 Delete type=0 #578
|
2026/05/18-07:58:12.225237 7f5a467fc6c0 Delete type=0 #598
|
||||||
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/05/18-07:58:12.244392 7f5a467fc6c0 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)
|
2026/05/18-07:58:12.252899 7f5a467fc6c0 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-000276
|
MANIFEST-000296
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
2026/04/30-14:38:06.849252 7f3f353fe6c0 Recovering log #274
|
2026/05/18-17:40:11.831491 7f5a94bff6c0 Recovering log #294
|
||||||
2026/04/30-14:38:06.859072 7f3f353fe6c0 Delete type=3 #272
|
2026/05/18-17:40:11.842913 7f5a94bff6c0 Delete type=3 #292
|
||||||
2026/04/30-14:38:06.859126 7f3f353fe6c0 Delete type=0 #274
|
2026/05/18-17:40:11.843005 7f5a94bff6c0 Delete type=0 #294
|
||||||
2026/04/30-14:38:35.538433 7f3ee77fe6c0 Level-0 table #279: started
|
2026/05/18-20:25:54.257813 7f5a467fc6c0 Level-0 table #299: started
|
||||||
2026/04/30-14:38:35.538452 7f3ee77fe6c0 Level-0 table #279: 0 bytes OK
|
2026/05/18-20:25:54.257869 7f5a467fc6c0 Level-0 table #299: 0 bytes OK
|
||||||
2026/04/30-14:38:35.544715 7f3ee77fe6c0 Delete type=0 #277
|
2026/05/18-20:25:54.264186 7f5a467fc6c0 Delete type=0 #297
|
||||||
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/05/18-20:25:54.267118 7f5a467fc6c0 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)
|
2026/05/18-20:25:54.296812 7f5a467fc6c0 Manual compaction at level-1 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
2026/04/29-20:13:54.051682 7fed937fe6c0 Recovering log #270
|
2026/05/18-07:32:52.738234 7f5a477fe6c0 Recovering log #290
|
||||||
2026/04/29-20:13:54.062010 7fed937fe6c0 Delete type=3 #268
|
2026/05/18-07:32:52.749839 7f5a477fe6c0 Delete type=3 #288
|
||||||
2026/04/29-20:13:54.062071 7fed937fe6c0 Delete type=0 #270
|
2026/05/18-07:32:52.749970 7f5a477fe6c0 Delete type=0 #290
|
||||||
2026/04/29-20:27:06.292128 7feb10fff6c0 Level-0 table #275: started
|
2026/05/18-07:58:12.253340 7f5a467fc6c0 Level-0 table #295: started
|
||||||
2026/04/29-20:27:06.292152 7feb10fff6c0 Level-0 table #275: 0 bytes OK
|
2026/05/18-07:58:12.253449 7f5a467fc6c0 Level-0 table #295: 0 bytes OK
|
||||||
2026/04/29-20:27:06.299041 7feb10fff6c0 Delete type=0 #273
|
2026/05/18-07:58:12.261029 7f5a467fc6c0 Delete type=0 #293
|
||||||
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/05/18-07:58:12.286385 7f5a467fc6c0 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)
|
2026/05/18-07:58:12.286487 7f5a467fc6c0 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-000575
|
MANIFEST-000595
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
2026/04/30-14:38:06.836968 7f3ee7fff6c0 Recovering log #573
|
2026/05/18-17:40:11.812004 7f5a47fff6c0 Recovering log #593
|
||||||
2026/04/30-14:38:06.846980 7f3ee7fff6c0 Delete type=3 #571
|
2026/05/18-17:40:11.823277 7f5a47fff6c0 Delete type=3 #591
|
||||||
2026/04/30-14:38:06.847050 7f3ee7fff6c0 Delete type=0 #573
|
2026/05/18-17:40:11.823388 7f5a47fff6c0 Delete type=0 #593
|
||||||
2026/04/30-14:38:35.532186 7f3ee77fe6c0 Level-0 table #578: started
|
2026/05/18-20:25:54.244177 7f5a467fc6c0 Level-0 table #598: started
|
||||||
2026/04/30-14:38:35.532209 7f3ee77fe6c0 Level-0 table #578: 0 bytes OK
|
2026/05/18-20:25:54.244222 7f5a467fc6c0 Level-0 table #598: 0 bytes OK
|
||||||
2026/04/30-14:38:35.538132 7f3ee77fe6c0 Delete type=0 #576
|
2026/05/18-20:25:54.250810 7f5a467fc6c0 Delete type=0 #596
|
||||||
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/05/18-20:25:54.251096 7f5a467fc6c0 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)
|
2026/05/18-20:25:54.264461 7f5a467fc6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
2026/04/29-20:13:54.036694 7fed92ffd6c0 Recovering log #569
|
2026/05/18-07:32:52.720162 7f5a94bff6c0 Recovering log #589
|
||||||
2026/04/29-20:13:54.047834 7fed92ffd6c0 Delete type=3 #567
|
2026/05/18-07:32:52.731519 7f5a94bff6c0 Delete type=3 #587
|
||||||
2026/04/29-20:13:54.047922 7fed92ffd6c0 Delete type=0 #569
|
2026/05/18-07:32:52.731690 7f5a94bff6c0 Delete type=0 #589
|
||||||
2026/04/29-20:27:06.280338 7feb10fff6c0 Level-0 table #574: started
|
2026/05/18-07:58:12.244424 7f5a467fc6c0 Level-0 table #594: started
|
||||||
2026/04/29-20:27:06.280357 7feb10fff6c0 Level-0 table #574: 0 bytes OK
|
2026/05/18-07:58:12.244618 7f5a467fc6c0 Level-0 table #594: 0 bytes OK
|
||||||
2026/04/29-20:27:06.286179 7feb10fff6c0 Delete type=0 #572
|
2026/05/18-07:58:12.252579 7f5a467fc6c0 Delete type=0 #592
|
||||||
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/05/18-07:58:12.252922 7f5a467fc6c0 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)
|
2026/05/18-07:58:12.252996 7f5a467fc6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
|
||||||
|
|||||||
BIN
Binary file not shown.
@@ -410,6 +410,48 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ranged-attacks {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
.attack {
|
||||||
|
.name {
|
||||||
|
min-width: 10rem;
|
||||||
|
max-width: 10rem;
|
||||||
|
}
|
||||||
|
.damage-dice {
|
||||||
|
width: 5rem;
|
||||||
|
max-width: 5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.ranged-weapon-range {
|
||||||
|
margin-top: 8px;
|
||||||
|
border-top: 1px solid var(--color-border-light-tertiary, #ccc);
|
||||||
|
padding-top: 6px;
|
||||||
|
> label {
|
||||||
|
font-weight: bold;
|
||||||
|
margin-bottom: 4px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
.range-fields {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
gap: 6px;
|
||||||
|
.range-field {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
label {
|
||||||
|
font-size: 0.7rem;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
input {
|
||||||
|
width: 3.5rem;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.armors {
|
.armors {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(3, 1fr);
|
grid-template-columns: repeat(3, 1fr);
|
||||||
|
|||||||
@@ -176,6 +176,22 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dialog-warning {
|
||||||
|
margin: 0.4rem 0.2rem 0.2rem;
|
||||||
|
padding: 0.35rem 0.5rem;
|
||||||
|
border-left: 3px solid #c8941a;
|
||||||
|
background: rgba(200, 148, 26, 0.12);
|
||||||
|
border-radius: 3px;
|
||||||
|
font-family: var(--font-secondary);
|
||||||
|
font-size: calc(var(--font-size-standard) * 0.9);
|
||||||
|
color: #7a5400;
|
||||||
|
line-height: 1.4;
|
||||||
|
i {
|
||||||
|
color: #c8941a;
|
||||||
|
margin-right: 0.4rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.lethalfantasy,
|
.lethalfantasy,
|
||||||
.fvtt-lethal-fantasy,
|
.fvtt-lethal-fantasy,
|
||||||
.message.lethalfantasy,
|
.message.lethalfantasy,
|
||||||
|
|||||||
@@ -9,95 +9,95 @@
|
|||||||
<legend>{{localize "LETHALFANTASY.Label.biodata"}}</legend>
|
<legend>{{localize "LETHALFANTASY.Label.biodata"}}</legend>
|
||||||
<div class="biodata">
|
<div class="biodata">
|
||||||
<div class="biodata-elem">
|
<div class="biodata-elem">
|
||||||
<span class="name">Class</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.class"}}</span>
|
||||||
{{formInput
|
{{formInput
|
||||||
systemFields.biodata.fields.class
|
systemFields.biodata.fields.class
|
||||||
value=system.biodata.class
|
value=system.biodata.class
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div class="biodata-elem">
|
<div class="biodata-elem">
|
||||||
<span class="name">Level</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.level"}}</span>
|
||||||
{{formInput
|
{{formInput
|
||||||
systemFields.biodata.fields.level
|
systemFields.biodata.fields.level
|
||||||
value=system.biodata.level
|
value=system.biodata.level
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div class="biodata-elem">
|
<div class="biodata-elem">
|
||||||
<span class="name">Mortal</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.mortal"}}</span>
|
||||||
{{formInput
|
{{formInput
|
||||||
systemFields.biodata.fields.mortal
|
systemFields.biodata.fields.mortal
|
||||||
value=system.biodata.mortal
|
value=system.biodata.mortal
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div class="biodata-elem">
|
<div class="biodata-elem">
|
||||||
<span class="name">Alignment</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.alignment"}}</span>
|
||||||
{{formInput
|
{{formInput
|
||||||
systemFields.biodata.fields.alignment
|
systemFields.biodata.fields.alignment
|
||||||
value=system.biodata.alignment
|
value=system.biodata.alignment
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div class="biodata-elem">
|
<div class="biodata-elem">
|
||||||
<span class="name">Age</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.age"}}</span>
|
||||||
{{formInput systemFields.biodata.fields.age value=system.biodata.age}}
|
{{formInput systemFields.biodata.fields.age value=system.biodata.age}}
|
||||||
</div>
|
</div>
|
||||||
<div class="biodata-elem">
|
<div class="biodata-elem">
|
||||||
<span class="name">Height</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.height"}}</span>
|
||||||
{{formInput
|
{{formInput
|
||||||
systemFields.biodata.fields.height
|
systemFields.biodata.fields.height
|
||||||
value=system.biodata.height
|
value=system.biodata.height
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div class="biodata-elem">
|
<div class="biodata-elem">
|
||||||
<span class="name">Weight</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.weight"}}</span>
|
||||||
{{formInput
|
{{formInput
|
||||||
systemFields.biodata.fields.weight
|
systemFields.biodata.fields.weight
|
||||||
value=system.biodata.weight
|
value=system.biodata.weight
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div class="biodata-elem">
|
<div class="biodata-elem">
|
||||||
<span class="name">Eyes</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.eyes"}}</span>
|
||||||
{{formInput
|
{{formInput
|
||||||
systemFields.biodata.fields.eyes
|
systemFields.biodata.fields.eyes
|
||||||
value=system.biodata.eyes
|
value=system.biodata.eyes
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div class="biodata-elem">
|
<div class="biodata-elem">
|
||||||
<span class="name">Hair</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.hair"}}</span>
|
||||||
{{formInput
|
{{formInput
|
||||||
systemFields.biodata.fields.hair
|
systemFields.biodata.fields.hair
|
||||||
value=system.biodata.hair
|
value=system.biodata.hair
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div class="biodata-elem">
|
<div class="biodata-elem">
|
||||||
<span class="name">Dev. Points (Total)</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.devPointsTotal"}}</span>
|
||||||
{{formInput
|
{{formInput
|
||||||
systemFields.developmentPoints.fields.total
|
systemFields.developmentPoints.fields.total
|
||||||
value=system.developmentPoints.total
|
value=system.developmentPoints.total
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div class="biodata-elem">
|
<div class="biodata-elem">
|
||||||
<span class="name">Dev. Points (Rem.)</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.devPointsRem"}}</span>
|
||||||
{{formInput
|
{{formInput
|
||||||
systemFields.developmentPoints.fields.remaining
|
systemFields.developmentPoints.fields.remaining
|
||||||
value=system.developmentPoints.remaining
|
value=system.developmentPoints.remaining
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div class="biodata-elem">
|
<div class="biodata-elem">
|
||||||
<span class="name">Magic User</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.magicUser"}}</span>
|
||||||
{{formInput
|
{{formInput
|
||||||
systemFields.biodata.fields.magicUser
|
systemFields.biodata.fields.magicUser
|
||||||
value=system.biodata.magicUser
|
value=system.biodata.magicUser
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div class="biodata-elem">
|
<div class="biodata-elem">
|
||||||
<span class="name">Cleric User</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.clericUser"}}</span>
|
||||||
{{formInput
|
{{formInput
|
||||||
systemFields.biodata.fields.clericUser
|
systemFields.biodata.fields.clericUser
|
||||||
value=system.biodata.clericUser
|
value=system.biodata.clericUser
|
||||||
}}
|
}}
|
||||||
</div>
|
</div>
|
||||||
<div class="biodata-elem">
|
<div class="biodata-elem">
|
||||||
<span class="name">Save bonus (1/5levels)</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.saveBonus"}}</span>
|
||||||
{{formInput
|
{{formInput
|
||||||
systemFields.modifiers.fields.saveModifier
|
systemFields.modifiers.fields.saveModifier
|
||||||
value=system.modifiers.saveModifier
|
value=system.modifiers.saveModifier
|
||||||
@@ -107,7 +107,7 @@
|
|||||||
|
|
||||||
{{#if system.biodata.magicUser}}
|
{{#if system.biodata.magicUser}}
|
||||||
<div class="biodata-elem">
|
<div class="biodata-elem">
|
||||||
<span class="name">Spell bonus (1/5levels)</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.spellBonus"}}</span>
|
||||||
{{formInput
|
{{formInput
|
||||||
systemFields.modifiers.fields.levelSpellModifier
|
systemFields.modifiers.fields.levelSpellModifier
|
||||||
value=system.modifiers.levelSpellModifier
|
value=system.modifiers.levelSpellModifier
|
||||||
@@ -117,7 +117,7 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if system.biodata.clericUser}}
|
{{#if system.biodata.clericUser}}
|
||||||
<div class="biodata-elem">
|
<div class="biodata-elem">
|
||||||
<span class="name">Miracle bonus (1/5levels)</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.miracleBonus"}}</span>
|
||||||
{{formInput
|
{{formInput
|
||||||
systemFields.modifiers.fields.levelMiracleModifier
|
systemFields.modifiers.fields.levelMiracleModifier
|
||||||
value=system.modifiers.levelMiracleModifier
|
value=system.modifiers.levelMiracleModifier
|
||||||
@@ -127,7 +127,7 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<div class="biodata-elem">
|
<div class="biodata-elem">
|
||||||
<span class="name">Last HD roll</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.lastHdRoll"}}</span>
|
||||||
{{formInput
|
{{formInput
|
||||||
systemFields.biodata.fields.hpPerLevel
|
systemFields.biodata.fields.hpPerLevel
|
||||||
value=system.biodata.hpPerLevel
|
value=system.biodata.hpPerLevel
|
||||||
@@ -136,7 +136,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="biodata-elem">
|
<div class="biodata-elem">
|
||||||
<span class="name">Natural DR</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.naturalDR"}}</span>
|
||||||
{{formInput
|
{{formInput
|
||||||
systemFields.biodata.fields.naturalDR
|
systemFields.biodata.fields.naturalDR
|
||||||
value=system.biodata.naturalDR
|
value=system.biodata.naturalDR
|
||||||
@@ -145,7 +145,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="biodata-elem">
|
<div class="biodata-elem">
|
||||||
<span class="name">Magical DR</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.magicalDR"}}</span>
|
||||||
{{formInput
|
{{formInput
|
||||||
systemFields.biodata.fields.magicDR
|
systemFields.biodata.fields.magicDR
|
||||||
value=system.biodata.magicDR
|
value=system.biodata.magicDR
|
||||||
|
|||||||
@@ -5,12 +5,12 @@
|
|||||||
<legend>{{localize "LETHALFANTASY.Label.divinityPoints"}}</legend>
|
<legend>{{localize "LETHALFANTASY.Label.divinityPoints"}}</legend>
|
||||||
<div class="miracle-details">
|
<div class="miracle-details">
|
||||||
<div class="miracle-detail">
|
<div class="miracle-detail">
|
||||||
<span>Current</span>
|
<span>{{localize "LETHALFANTASY.Label.current"}}</span>
|
||||||
{{formField systemFields.divinityPoints.fields.value value=system.divinityPoints.value localize=true}}
|
{{formField systemFields.divinityPoints.fields.value value=system.divinityPoints.value localize=true}}
|
||||||
<a data-action="divinityPointsPlus"><i class="fa-solid fa-hexagon-plus"></i></a>
|
<a data-action="divinityPointsPlus"><i class="fa-solid fa-hexagon-plus"></i></a>
|
||||||
<a data-action="divinityPointsMinus"><i class="fa-solid fa-hexagon-minus"></i></a>
|
<a data-action="divinityPointsMinus"><i class="fa-solid fa-hexagon-minus"></i></a>
|
||||||
|
|
||||||
<span>Max</span>
|
<span>{{localize "LETHALFANTASY.Label.max"}}</span>
|
||||||
{{formField systemFields.divinityPoints.fields.max value=system.divinityPoints.max localize=true
|
{{formField systemFields.divinityPoints.fields.max value=system.divinityPoints.max localize=true
|
||||||
disabled=isPlayMode}}
|
disabled=isPlayMode}}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -5,12 +5,12 @@
|
|||||||
<legend>{{localize "LETHALFANTASY.Label.aetherPoints"}}</legend>
|
<legend>{{localize "LETHALFANTASY.Label.aetherPoints"}}</legend>
|
||||||
<div class="spell-details">
|
<div class="spell-details">
|
||||||
<div class="spell-detail">
|
<div class="spell-detail">
|
||||||
<span>Current</span>
|
<span>{{localize "LETHALFANTASY.Label.current"}}</span>
|
||||||
{{formField systemFields.aetherPoints.fields.value value=system.aetherPoints.value localize=true}}
|
{{formField systemFields.aetherPoints.fields.value value=system.aetherPoints.value localize=true}}
|
||||||
<a data-action="aetherPointsPlus"><i class="fa-solid fa-hexagon-plus"></i></a>
|
<a data-action="aetherPointsPlus"><i class="fa-solid fa-hexagon-plus"></i></a>
|
||||||
<a data-action="aetherPointsMinus"><i class="fa-solid fa-hexagon-minus"></i></a>
|
<a data-action="aetherPointsMinus"><i class="fa-solid fa-hexagon-minus"></i></a>
|
||||||
|
|
||||||
<span>Max</span>
|
<span>{{localize "LETHALFANTASY.Label.max"}}</span>
|
||||||
{{formField systemFields.aetherPoints.fields.max value=system.aetherPoints.max localize=true
|
{{formField systemFields.aetherPoints.fields.max value=system.aetherPoints.max localize=true
|
||||||
disabled=isPlayMode}}
|
disabled=isPlayMode}}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -40,32 +40,32 @@
|
|||||||
{{#if (eq rollData.favor "favor")}}
|
{{#if (eq rollData.favor "favor")}}
|
||||||
<div class="detail-badge favor-badge">
|
<div class="detail-badge favor-badge">
|
||||||
<i class="fa-solid fa-sparkles"></i>
|
<i class="fa-solid fa-sparkles"></i>
|
||||||
<span>Favor</span>
|
<span>{{localize "LETHALFANTASY.Label.favor"}}</span>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if (eq rollData.favor "disfavor")}}
|
{{#if (eq rollData.favor "disfavor")}}
|
||||||
<div class="detail-badge disfavor-badge">
|
<div class="detail-badge disfavor-badge">
|
||||||
<i class="fa-solid fa-skull"></i>
|
<i class="fa-solid fa-skull"></i>
|
||||||
<span>Disfavor</span>
|
<span>{{localize "LETHALFANTASY.Label.disfavor"}}</span>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if rollData.letItFly}}
|
{{#if rollData.letItFly}}
|
||||||
<div class="detail-badge special-badge">
|
<div class="detail-badge special-badge">
|
||||||
<i class="fa-solid fa-bow-arrow"></i>
|
<i class="fa-solid fa-bow-arrow"></i>
|
||||||
<span>Let It Fly!</span>
|
<span>{{localize "LETHALFANTASY.Label.letItFly"}}</span>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if rollData.pointBlank}}
|
{{#if rollData.pointBlank}}
|
||||||
<div class="detail-badge special-badge">
|
<div class="detail-badge special-badge">
|
||||||
<i class="fa-solid fa-bullseye-arrow"></i>
|
<i class="fa-solid fa-bullseye-arrow"></i>
|
||||||
<span>Point Blank</span>
|
<span>{{localize "LETHALFANTASY.Label.pointBlank"}}</span>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if rollData.beyondSkill}}
|
{{#if rollData.beyondSkill}}
|
||||||
<div class="detail-badge special-badge">
|
<div class="detail-badge special-badge">
|
||||||
<i class="fa-solid fa-target-lock"></i>
|
<i class="fa-solid fa-target-lock"></i>
|
||||||
<span>Beyond Skill</span>
|
<span>{{localize "LETHALFANTASY.Label.beyondSkill"}}</span>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@
|
|||||||
{{#unless isPrivate}}
|
{{#unless isPrivate}}
|
||||||
<div class="result-section">
|
<div class="result-section">
|
||||||
<div class="main-result">
|
<div class="main-result">
|
||||||
<div class="result-label">Total</div>
|
<div class="result-label">{{localize "LETHALFANTASY.Label.total"}}</div>
|
||||||
<div class="result-value {{#if (eq resultType 'success')}}success{{else}}failure{{/if}}">
|
<div class="result-value {{#if (eq resultType 'success')}}success{{else}}failure{{/if}}">
|
||||||
{{total}}
|
{{total}}
|
||||||
</div>
|
</div>
|
||||||
@@ -177,7 +177,7 @@
|
|||||||
{{else}}
|
{{else}}
|
||||||
<div class="private-result">
|
<div class="private-result">
|
||||||
<i class="fa-solid fa-eye-slash"></i>
|
<i class="fa-solid fa-eye-slash"></i>
|
||||||
<span>Private Roll</span>
|
<span>{{localize "LETHALFANTASY.Label.privateRoll"}}</span>
|
||||||
</div>
|
</div>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
|
||||||
|
|||||||
@@ -13,6 +13,14 @@
|
|||||||
<span>{{ localize "COMBAT.End" }}</span>
|
<span>{{ localize "COMBAT.End" }}</span>
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
{{#if combat.round}}
|
||||||
|
<button type="button" class="combat-control combat-control-lg" data-action="rollMonsterProgression"
|
||||||
|
data-tooltip="{{ localize 'LETHALFANTASY.Combat.RollMonsters' }}">
|
||||||
|
<i class="fa-solid fa-dragon" inert></i>
|
||||||
|
<span>{{ localize "LETHALFANTASY.Combat.RollMonsters" }}</span>
|
||||||
|
</button>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<!-- <button type="button" class="inline-control combat-control icon fa-solid fa-arrow-right" data-action="nextTurn"
|
<!-- <button type="button" class="inline-control combat-control icon fa-solid fa-arrow-right" data-action="nextTurn"
|
||||||
data-tooltip aria-label="{{ localize "COMBAT.TurnNext" }}"></button> -->
|
data-tooltip aria-label="{{ localize "COMBAT.TurnNext" }}"></button> -->
|
||||||
<button type="button" class="inline-control combat-control icon fa-solid fa-forward-step" data-action="nextRound"
|
<button type="button" class="inline-control combat-control icon fa-solid fa-forward-step" data-action="nextRound"
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
{{formField systemFields.miracleType value=system.miracleType}}
|
{{formField systemFields.miracleType value=system.miracleType}}
|
||||||
{{formField systemFields.level value=system.level}}
|
{{formField systemFields.level value=system.level}}
|
||||||
|
|
||||||
<label>Components</label>
|
<label>{{localize "LETHALFANTASY.Label.components"}}</label>
|
||||||
<div class="shift-right">
|
<div class="shift-right">
|
||||||
{{formField systemFields.components.fields.verbal value=system.components.verbal}}
|
{{formField systemFields.components.fields.verbal value=system.components.verbal}}
|
||||||
{{formField systemFields.components.fields.somatic value=system.components.somatic}}
|
{{formField systemFields.components.fields.somatic value=system.components.somatic}}
|
||||||
@@ -27,6 +27,9 @@
|
|||||||
{{formField systemFields.areaAffected value=system.areaAffected}}
|
{{formField systemFields.areaAffected value=system.areaAffected}}
|
||||||
{{formField systemFields.duration value=system.duration}}
|
{{formField systemFields.duration value=system.duration}}
|
||||||
{{formField systemFields.savingThrow value=system.savingThrow}}
|
{{formField systemFields.savingThrow value=system.savingThrow}}
|
||||||
|
{{formField systemFields.damageDice value=system.damageDice}}
|
||||||
|
{{formField systemFields.damageDiceOverpowered value=system.damageDiceOverpowered}}
|
||||||
|
{{formField systemFields.damageDiceOverpowered2 value=system.damageDiceOverpowered2}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,23 +6,23 @@
|
|||||||
<div class="biodata">
|
<div class="biodata">
|
||||||
|
|
||||||
<div class="biodata-elem">
|
<div class="biodata-elem">
|
||||||
<span class="name">Alignment</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.alignment"}}</span>
|
||||||
{{formInput systemFields.biodata.fields.alignment value=system.biodata.alignment }}
|
{{formInput systemFields.biodata.fields.alignment value=system.biodata.alignment }}
|
||||||
</div>
|
</div>
|
||||||
<div class="biodata-elem">
|
<div class="biodata-elem">
|
||||||
<span class="name">Height</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.height"}}</span>
|
||||||
{{formInput systemFields.biodata.fields.height value=system.biodata.height }}
|
{{formInput systemFields.biodata.fields.height value=system.biodata.height }}
|
||||||
</div>
|
</div>
|
||||||
<div class="biodata-elem">
|
<div class="biodata-elem">
|
||||||
<span class="name">Weight</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.weight"}}</span>
|
||||||
{{formInput systemFields.biodata.fields.weight value=system.biodata.weight }}
|
{{formInput systemFields.biodata.fields.weight value=system.biodata.weight }}
|
||||||
</div>
|
</div>
|
||||||
<div class="biodata-elem">
|
<div class="biodata-elem">
|
||||||
<span class="name">Length</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.length"}}</span>
|
||||||
{{formInput systemFields.biodata.fields.length value=system.biodata.length }}
|
{{formInput systemFields.biodata.fields.length value=system.biodata.length }}
|
||||||
</div>
|
</div>
|
||||||
<div class="biodata-elem">
|
<div class="biodata-elem">
|
||||||
<span class="name">Vision</span>
|
<span class="name">{{localize "LETHALFANTASY.Label.vision"}}</span>
|
||||||
{{formInput systemFields.biodata.fields.vision value=system.biodata.vision }}
|
{{formInput systemFields.biodata.fields.vision value=system.biodata.vision }}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -51,6 +51,9 @@
|
|||||||
<div class="numeric">
|
<div class="numeric">
|
||||||
<input type="number" name="system.attacks.{{item.key}}.damageModifier" value="{{item.damageModifier}}" data-tooltip="Damage modifier"/>
|
<input type="number" name="system.attacks.{{item.key}}.damageModifier" value="{{item.damageModifier}}" data-tooltip="Damage modifier"/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="">
|
||||||
|
<input type="checkbox" name="system.attacks.{{item.key}}.noExplode" {{checked item.noExplode}} data-tooltip="No exploding dice on damage" />
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="attack-icons">
|
<div class="attack-icons">
|
||||||
|
|
||||||
@@ -98,6 +101,9 @@
|
|||||||
<div class="numeric">
|
<div class="numeric">
|
||||||
<input type="number" name="system.rangedAttacks.{{item.key}}.damageModifier" value="{{item.damageModifier}}" data-tooltip="Damage modifier"/>
|
<input type="number" name="system.rangedAttacks.{{item.key}}.damageModifier" value="{{item.damageModifier}}" data-tooltip="Damage modifier"/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="">
|
||||||
|
<input type="checkbox" name="system.rangedAttacks.{{item.key}}.noExplode" {{checked item.noExplode}} data-tooltip="No exploding dice on damage" />
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="attack-icons">
|
<div class="attack-icons">
|
||||||
|
|
||||||
@@ -119,12 +125,42 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
{{/each}}
|
{{/each}}
|
||||||
|
|
||||||
|
<div class="ranged-weapon-range">
|
||||||
|
<label>{{localize "LETHALFANTASY.Label.range"}}</label>
|
||||||
|
<div class="range-fields">
|
||||||
|
<div class="range-field">
|
||||||
|
<label>{{localize "LETHALFANTASY.Label.pointBlank"}}</label>
|
||||||
|
<input type="number" name="system.rangedWeaponRange.pointBlank" value="{{system.rangedWeaponRange.pointBlank}}" />
|
||||||
|
</div>
|
||||||
|
<div class="range-field">
|
||||||
|
<label>{{localize "LETHALFANTASY.Label.short"}}</label>
|
||||||
|
<input type="number" name="system.rangedWeaponRange.short" value="{{system.rangedWeaponRange.short}}" />
|
||||||
|
</div>
|
||||||
|
<div class="range-field">
|
||||||
|
<label>{{localize "LETHALFANTASY.Label.medium"}}</label>
|
||||||
|
<input type="number" name="system.rangedWeaponRange.medium" value="{{system.rangedWeaponRange.medium}}" />
|
||||||
|
</div>
|
||||||
|
<div class="range-field">
|
||||||
|
<label>{{localize "LETHALFANTASY.Label.long"}}</label>
|
||||||
|
<input type="number" name="system.rangedWeaponRange.long" value="{{system.rangedWeaponRange.long}}" />
|
||||||
|
</div>
|
||||||
|
<div class="range-field">
|
||||||
|
<label>{{localize "LETHALFANTASY.Label.extreme"}}</label>
|
||||||
|
<input type="number" name="system.rangedWeaponRange.extreme" value="{{system.rangedWeaponRange.extreme}}" />
|
||||||
|
</div>
|
||||||
|
<div class="range-field">
|
||||||
|
<label>{{localize "LETHALFANTASY.Label.outOfSkill"}}</label>
|
||||||
|
<input type="number" name="system.rangedWeaponRange.outOfSkill" value="{{system.rangedWeaponRange.outOfSkill}}" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>Hand To Hand Attacks</legend>
|
<legend>{{localize "LETHALFANTASY.Label.handToHandAttacks"}}</legend>
|
||||||
<div class="attacks">
|
<div class="attacks">
|
||||||
{{#each system.combatHTH as |item key|}}
|
{{#each system.combatHTH as |item key|}}
|
||||||
<div class="attack" data-attack-key="{{key}}" >
|
<div class="attack" data-attack-key="{{key}}" >
|
||||||
@@ -149,6 +185,9 @@
|
|||||||
<div class="numeric">
|
<div class="numeric">
|
||||||
<input type="number" name="system.combatHTH.{{item.key}}.damageModifier" value="{{item.damageModifier}}" data-tooltip="Damage modifier"/>
|
<input type="number" name="system.combatHTH.{{item.key}}.damageModifier" value="{{item.damageModifier}}" data-tooltip="Damage modifier"/>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="">
|
||||||
|
<input type="checkbox" name="system.combatHTH.{{item.key}}.noExplode" {{checked item.noExplode}} data-tooltip="No exploding dice on damage" />
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="attack-icons">
|
<div class="attack-icons">
|
||||||
|
|
||||||
|
|||||||
@@ -91,6 +91,10 @@
|
|||||||
<div class="dialog-save">Add Granted Defense Dice
|
<div class="dialog-save">Add Granted Defense Dice
|
||||||
<input type="checkbox" data-action="selectGranted" name="granted" />
|
<input type="checkbox" data-action="selectGranted" name="granted" />
|
||||||
</div>
|
</div>
|
||||||
|
<div class="dialog-warning">
|
||||||
|
<i class="fa-solid fa-triangle-exclamation"></i>
|
||||||
|
{{localize "LETHALFANTASY.Warning.defenseShieldOrder"}}
|
||||||
|
</div>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{#if (match rollType "damage")}}
|
{{#if (match rollType "damage")}}
|
||||||
<div class="dialog-save">Add Granted Damage Dice
|
<div class="dialog-save">Add Granted Damage Dice
|
||||||
|
|||||||
@@ -22,9 +22,9 @@
|
|||||||
{{formField systemFields.hascover value=system.hascover}}
|
{{formField systemFields.hascover value=system.hascover}}
|
||||||
|
|
||||||
{{#if system.hascover}}
|
{{#if system.hascover}}
|
||||||
<label>Cover vs ranged attacks</label>
|
<label>{{localize "LETHALFANTASY.Label.coverRanged"}}</label>
|
||||||
<div class="shift-right">
|
<div class="shift-right">
|
||||||
<label>Standing </label>
|
<label>{{localize "LETHALFANTASY.Label.standing"}}</label>
|
||||||
<div class="flexrow">{{formField
|
<div class="flexrow">{{formField
|
||||||
systemFields.standing.fields.min
|
systemFields.standing.fields.min
|
||||||
value=system.standing.min
|
value=system.standing.min
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="shift-right">
|
<div class="shift-right">
|
||||||
<label>Crouching</label>
|
<label>{{localize "LETHALFANTASY.Label.crouching"}}</label>
|
||||||
<div class="flexrow">{{formField
|
<div class="flexrow">{{formField
|
||||||
systemFields.crouching.fields.min
|
systemFields.crouching.fields.min
|
||||||
value=system.crouching.min
|
value=system.crouching.min
|
||||||
|
|||||||
+3
-1
@@ -7,7 +7,7 @@
|
|||||||
{{formField systemFields.level value=system.level}}
|
{{formField systemFields.level value=system.level}}
|
||||||
{{formField systemFields.cost value=system.cost}}
|
{{formField systemFields.cost value=system.cost}}
|
||||||
|
|
||||||
<label>Components</label>
|
<label>{{localize "LETHALFANTASY.Label.components"}}</label>
|
||||||
<div class="shift-right">
|
<div class="shift-right">
|
||||||
{{formField systemFields.components.fields.verbal value=system.components.verbal}}
|
{{formField systemFields.components.fields.verbal value=system.components.verbal}}
|
||||||
{{formField systemFields.components.fields.somatic value=system.components.somatic}}
|
{{formField systemFields.components.fields.somatic value=system.components.somatic}}
|
||||||
@@ -31,6 +31,8 @@
|
|||||||
{{formField systemFields.extraAetherPoints value=system.extraAetherPoints}}
|
{{formField systemFields.extraAetherPoints value=system.extraAetherPoints}}
|
||||||
{{formField systemFields.criticalType value=system.criticalType}}
|
{{formField systemFields.criticalType value=system.criticalType}}
|
||||||
{{formField systemFields.damageDice value=system.damageDice}}
|
{{formField systemFields.damageDice value=system.damageDice}}
|
||||||
|
{{formField systemFields.damageDiceOverpowered value=system.damageDiceOverpowered}}
|
||||||
|
{{formField systemFields.damageDiceOverpowered2 value=system.damageDiceOverpowered2}}
|
||||||
|
|
||||||
|
|
||||||
<fieldset>
|
<fieldset>
|
||||||
|
|||||||
@@ -10,14 +10,14 @@
|
|||||||
{{formField systemFields.weaponType value=system.weaponType localize=true}}
|
{{formField systemFields.weaponType value=system.weaponType localize=true}}
|
||||||
{{formField systemFields.weaponClass value=system.weaponClass localize=true}}
|
{{formField systemFields.weaponClass value=system.weaponClass localize=true}}
|
||||||
|
|
||||||
<label>Damage Type</label>
|
<label>{{localize "LETHALFANTASY.Label.damageType"}}</label>
|
||||||
<div class="shift-right">
|
<div class="shift-right">
|
||||||
{{formField systemFields.damageType.fields.typeP value=system.damageType.typeP}}
|
{{formField systemFields.damageType.fields.typeP value=system.damageType.typeP}}
|
||||||
{{formField systemFields.damageType.fields.typeB value=system.damageType.typeB}}
|
{{formField systemFields.damageType.fields.typeB value=system.damageType.typeB}}
|
||||||
{{formField systemFields.damageType.fields.typeS value=system.damageType.typeS}}
|
{{formField systemFields.damageType.fields.typeS value=system.damageType.typeS}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<label>Damage</label>
|
<label>{{localize "LETHALFANTASY.Label.damage"}}</label>
|
||||||
<div class="shift-right">
|
<div class="shift-right">
|
||||||
{{formField systemFields.damage.fields.damageS value=system.damage.damageS}}
|
{{formField systemFields.damage.fields.damageS value=system.damage.damageS}}
|
||||||
{{formField systemFields.damage.fields.damageM value=system.damage.damageM}}
|
{{formField systemFields.damage.fields.damageM value=system.damage.damageM}}
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{#if (eq system.weaponType "ranged")}}
|
{{#if (eq system.weaponType "ranged")}}
|
||||||
<label>Speed</label>
|
<label>{{localize "LETHALFANTASY.Label.speed"}}</label>
|
||||||
<div class="shift-right">
|
<div class="shift-right">
|
||||||
{{formField systemFields.speed.fields.simpleAim value=system.speed.simpleAim}}
|
{{formField systemFields.speed.fields.simpleAim value=system.speed.simpleAim}}
|
||||||
{{formField systemFields.speed.fields.carefulAim value=system.speed.carefulAim}}
|
{{formField systemFields.speed.fields.carefulAim value=system.speed.carefulAim}}
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
{{formField systemFields.defense value=system.defense}}
|
{{formField systemFields.defense value=system.defense}}
|
||||||
|
|
||||||
<label>Range</label>
|
<label>{{localize "LETHALFANTASY.Label.range"}}</label>
|
||||||
<div class="shift-right">
|
<div class="shift-right">
|
||||||
{{formField systemFields.weaponRange.fields.pointBlank value=system.weaponRange.pointBlank}}
|
{{formField systemFields.weaponRange.fields.pointBlank value=system.weaponRange.pointBlank}}
|
||||||
{{formField systemFields.weaponRange.fields.short value=system.weaponRange.short}}
|
{{formField systemFields.weaponRange.fields.short value=system.weaponRange.short}}
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
|
|
||||||
{{formField systemFields.equipped value=system.equipped}}
|
{{formField systemFields.equipped value=system.equipped}}
|
||||||
|
|
||||||
<label>Bonuses</label>
|
<label>{{localize "LETHALFANTASY.Label.bonuses"}}</label>
|
||||||
<div class="shift-right">
|
<div class="shift-right">
|
||||||
{{formField systemFields.bonuses.fields.attackBonus value=system.bonuses.attackBonus}}
|
{{formField systemFields.bonuses.fields.attackBonus value=system.bonuses.attackBonus}}
|
||||||
{{formField systemFields.bonuses.fields.defenseBonus value=system.bonuses.defenseBonus}}
|
{{formField systemFields.bonuses.fields.defenseBonus value=system.bonuses.defenseBonus}}
|
||||||
|
|||||||
Reference in New Issue
Block a user