19 Commits

Author SHA1 Message Date
a06dfa0ae9 Update skills/shield DR
All checks were successful
Release Creation / build (release) Successful in 1m8s
2026-01-12 14:27:29 +01:00
0836cada75 Re-org folders and enhance minor CSS stuff 2026-01-04 09:21:21 +01:00
61ed1597e7 Add damage management and DR for monsters also
All checks were successful
Release Creation / build (release) Successful in 1m48s
2025-12-19 15:41:27 +01:00
96062c6fd9 Roll damages and so on
All checks were successful
Release Creation / build (release) Successful in 56s
2025-12-14 21:18:00 +01:00
f6b35536de Manage DR and damage roll 2025-12-14 20:48:33 +01:00
7d27562bb4 Fix DR and defense values
All checks were successful
Release Creation / build (release) Successful in 1m7s
2025-12-08 11:54:36 +01:00
64f2efdcb9 Fix last HD Roll
All checks were successful
Release Creation / build (release) Successful in 1m35s
2025-11-07 07:58:58 +01:00
66f7aade25 Fix jog + update compendiums
All checks were successful
Release Creation / build (release) Successful in 52s
2025-10-17 20:06:49 +02:00
8f682a1458 Auto-publish package on releas 2025-10-01 17:26:29 +02:00
fa3054f24b Some granted dice/favor fixes
All checks were successful
Release Creation / build (release) Successful in 2m48s
2025-10-01 17:17:33 +02:00
59a891630e Fix tooltip
All checks were successful
Release Creation / build (release) Successful in 38s
2025-09-20 09:34:13 +02:00
35b88b3914 Poison/Contagion fixes again
All checks were successful
Release Creation / build (release) Successful in 42s
2025-09-19 23:32:15 +02:00
cb8bcfd9ea Ranged defense fixes again
All checks were successful
Release Creation / build (release) Successful in 43s
2025-09-19 22:30:26 +02:00
eedce1a498 Latest fixes
All checks were successful
Release Creation / build (release) Successful in 46s
2025-09-17 07:47:40 +02:00
76a99fe33f Various fixes 2025-09-16 23:49:02 +02:00
59a39850ce Fix miracle/spell rolls + upadte compendiums
All checks were successful
Release Creation / build (release) Successful in 56s
2025-09-09 20:14:25 +02:00
6eeb391d1a Move aiming to attacker
All checks were successful
Release Creation / build (release) Successful in 1m9s
2025-09-05 23:26:11 +02:00
c7727076bf Various fixes and renamingé
All checks were successful
Release Creation / build (release) Successful in 1m30s
2025-09-02 21:06:33 +02:00
d0411f9ec9 Various fixes and renamingé 2025-09-02 18:17:31 +02:00
69 changed files with 2624 additions and 1020 deletions

View File

@@ -8,45 +8,56 @@ jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- run: echo "💡 The ${{ gitea.repository }} repository will cloned to the runner." - run: echo "💡 The ${{ gitea.repository }} repository will cloned to the runner."
#- uses: actions/checkout@v3 #- uses: actions/checkout@v3
- uses: RouxAntoine/checkout@v3.5.4 - uses: RouxAntoine/checkout@v3.5.4
# get part of the tag after the `v` # get part of the tag after the `v`
- name: Extract tag version number - name: Extract tag version number
id: get_version id: get_version
uses: battila7/get-version-action@v2 uses: battila7/get-version-action@v2
# Substitute the Manifest and Download URLs in the module.json # Substitute the Manifest and Download URLs in the module.json
- name: Substitute Manifest and Download Links For Versioned Ones - name: Substitute Manifest and Download Links For Versioned Ones
id: sub_manifest_link_version id: sub_manifest_link_version
uses: microsoft/variable-substitution@v1 uses: microsoft/variable-substitution@v1
with: with:
files: 'system.json' files: "system.json"
env: env:
version: ${{steps.get_version.outputs.version-without-v}} version: ${{steps.get_version.outputs.version-without-v}}
url: https://www.uberwald.me/gitea/${{gitea.repository}} url: https://www.uberwald.me/gitea/${{gitea.repository}}
manifest: https://www.uberwald.me/gitea/public/${{gitea.repository}}/releases/download/latest/system.json manifest: https://www.uberwald.me/gitea/public/${{gitea.repository}}/releases/download/latest/system.json
download: https://www.uberwald.me/gitea/${{gitea.repository}}/releases/download/${{github.event.release.tag_name}}/fvtt-lethal-fantasy-${{github.event.release.tag_name}}.zip download: https://www.uberwald.me/gitea/${{gitea.repository}}/releases/download/${{github.event.release.tag_name}}/fvtt-lethal-fantasy-${{github.event.release.tag_name}}.zip
# Create a zip file with all files required by the module to add to the release # Create a zip file with all files required by the module to add to the release
- run: | - run: |
apt update -y apt update -y
apt install -y zip apt install -y zip
- run: zip -r ./fvtt-lethal-fantasy-${{github.event.release.tag_name}}.zip system.json README.md LICENSE assets/ css/ lang/ module/ packs-system/ templates/ lethal-fantasy.mjs - run: zip -r ./fvtt-lethal-fantasy-${{github.event.release.tag_name}}.zip system.json README.md LICENSE assets/ css/ lang/ module/ packs-system/ templates/ lethal-fantasy.mjs
- name: setup go - name: setup go
uses: https://github.com/actions/setup-go@v4 uses: https://github.com/actions/setup-go@v4
with: with:
go-version: '>=1.20.1' go-version: ">=1.20.1"
- name: Use Go Action - name: Use Go Action
id: use-go-action id: use-go-action
uses: https://gitea.com/actions/release-action@main uses: https://gitea.com/actions/release-action@main
with: with:
files: |- files: |-
./fvtt-lethal-fantasy-${{github.event.release.tag_name}}.zip ./fvtt-lethal-fantasy-${{github.event.release.tag_name}}.zip
system.json system.json
api_key: '${{secrets.ALLOW_PUSH_RELEASE}}' api_key: "${{secrets.ALLOW_PUSH_RELEASE}}"
- name: Publish to Foundry server
uses: djlechuck/foundryvtt-publish-package-action@v1
with:
token: ${{ secrets.FOUNDRY_PUBLISH_KEY }}
id: "fvtt-lethal-fantasy"
version: ${{github.event.release.tag_name}}
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"
compatibility-minimum: "13"
compatibility-verified: "13"

5
changelog.md Normal file
View File

@@ -0,0 +1,5 @@
## v13.0.12
- Fix favor/disfavor
- Fix granted dice
- Cosmetic fixes

View File

@@ -521,6 +521,9 @@ i.lethalfantasy {
min-width: 2.5rem; min-width: 2.5rem;
max-width: 2.5rem; max-width: 2.5rem;
} }
.lethalfantasy .tab.character-combat .main-div .combat-details .combat-detail .ranged-attack-button {
font-size: 0.8rem;
}
.lethalfantasy .tab.character-combat .main-div .combat-details .combat-detail button { .lethalfantasy .tab.character-combat .main-div .combat-details .combat-detail button {
min-width: 9rem; min-width: 9rem;
} }
@@ -682,7 +685,8 @@ i.lethalfantasy {
gap: 4px; gap: 4px;
} }
.lethalfantasy .tab.character-spells .main-div .spells .spell .item-img { .lethalfantasy .tab.character-spells .main-div .spells .spell .item-img {
width: 24px; min-width: 24px;
max-width: 24px;
height: 24px; height: 24px;
} }
.lethalfantasy .tab.character-spells .main-div .spells .spell .name { .lethalfantasy .tab.character-spells .main-div .spells .spell .name {
@@ -913,9 +917,10 @@ i.lethalfantasy {
flex: 1; flex: 1;
} }
.lethalfantasy .monster-main .monster-skills .monster-skill { .lethalfantasy .monster-main .monster-skills .monster-skill {
display: flex; display: grid;
grid-template-columns: repeat(3, auto 2.5rem);
gap: 0.5rem;
align-items: center; align-items: center;
margin-right: 0.5rem;
} }
.lethalfantasy .monster-main .monster-skills .monster-skill .rollable:hover, .lethalfantasy .monster-main .monster-skills .monster-skill .rollable:hover,
.lethalfantasy .monster-main .monster-skills .monster-skill .rollable:focus { .lethalfantasy .monster-main .monster-skills .monster-skill .rollable:focus {
@@ -927,12 +932,9 @@ i.lethalfantasy {
max-width: 2.5rem; max-width: 2.5rem;
} }
.lethalfantasy .monster-main .monster-skills .monster-skill .name { .lethalfantasy .monster-main .monster-skills .monster-skill .name {
flex: 1;
min-width: 3.2rem;
margin-left: 4px; margin-left: 4px;
} }
.lethalfantasy .monster-main .monster-skills .monster-skill .form-group { .lethalfantasy .monster-main .monster-skills .monster-skill .form-group {
flex: 1;
padding-left: 4px; padding-left: 4px;
} }
.lethalfantasy .monster-main .monster-skills .monster-skill .form-group .form-fields { .lethalfantasy .monster-main .monster-skills .monster-skill .form-group .form-fields {
@@ -947,8 +949,8 @@ i.lethalfantasy {
} }
.lethalfantasy .monster-main .monster-movements .monster-movement { .lethalfantasy .monster-main .monster-movements .monster-movement {
display: flex; display: flex;
align-items: center; flex-direction: column;
margin-right: 0.5rem; gap: 4px;
} }
.lethalfantasy .monster-main .monster-movements .monster-movement .rollable:hover, .lethalfantasy .monster-main .monster-movements .monster-movement .rollable:hover,
.lethalfantasy .monster-main .monster-movements .monster-movement .rollable:focus { .lethalfantasy .monster-main .monster-movements .monster-movement .rollable:focus {
@@ -2214,6 +2216,54 @@ i.lethalfantasy {
border-color: var(--color-dark-6); border-color: var(--color-dark-6);
color: var(--color-dark-2); color: var(--color-dark-2);
} }
.application.dialog.lethalfantasy .apply-damage-dialog .dialog-content {
padding: 6px;
font-size: calc(var(--font-size-standard) * 1);
}
.application.dialog.lethalfantasy .apply-damage-dialog .dialog-content .header {
text-align: center;
padding: 4px;
margin-bottom: 6px;
background-color: rgba(0, 0, 0, 0.1);
border-radius: 3px;
}
.application.dialog.lethalfantasy .apply-damage-dialog .dialog-content .damage-summary {
display: flex;
justify-content: space-between;
align-items: center;
padding: 4px 6px;
margin-bottom: 6px;
background-color: rgba(139, 0, 0, 0.1);
border-radius: 3px;
}
.application.dialog.lethalfantasy .apply-damage-dialog .dialog-content .damage-summary .damage-value {
color: var(--color-level-error);
font-size: calc(var(--font-size-standard) * 1.2);
font-weight: bold;
}
.application.dialog.lethalfantasy .apply-damage-dialog .dialog-content .dr-summary {
display: flex;
justify-content: space-around;
gap: 4px;
padding: 3px;
margin-bottom: 6px;
font-size: calc(var(--font-size-standard) * 0.85);
background-color: rgba(0, 0, 0, 0.05);
border-radius: 3px;
}
.application.dialog.lethalfantasy .apply-damage-dialog .dialog-content .damage-options .option-line {
display: flex;
justify-content: space-between;
align-items: center;
padding: 3px 6px;
margin: 2px 0;
background-color: rgba(0, 0, 0, 0.05);
border-radius: 3px;
}
.application.dialog.lethalfantasy .apply-damage-dialog .dialog-content .damage-options .option-line strong {
color: var(--color-dark-1);
font-size: calc(var(--font-size-standard) * 1.05);
}
.lethalfantasy-roll-dialog fieldset { .lethalfantasy-roll-dialog fieldset {
padding: 4px; padding: 4px;
} }
@@ -2235,10 +2285,17 @@ i.lethalfantasy {
.lethalfantasy-range-defense-dialog fieldset { .lethalfantasy-range-defense-dialog fieldset {
padding: 4px; padding: 4px;
} }
.lethalfantasy-range-defense-dialog .fieldset-centered {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
}
.lethalfantasy-range-defense-dialog select { .lethalfantasy-range-defense-dialog select {
margin-left: 0.5rem; margin-left: 0.5rem;
min-width: 10rem; min-width: 12rem;
max-width: 10rem; max-width: 12rem;
} }
.lethalfantasy-range-defense-dialog .field-section { .lethalfantasy-range-defense-dialog .field-section {
display: flex; display: flex;
@@ -2246,13 +2303,20 @@ i.lethalfantasy {
justify-content: left; justify-content: left;
} }
.lethalfantasy-range-defense-dialog .field-name { .lethalfantasy-range-defense-dialog .field-name {
width: 4rem; width: 5rem;
min-width: 4rem; min-width: 5rem;
max-width: 4rem; max-width: 5em;
}
.dialog-form .form-footer {
padding: 4px;
gap: 4px;
} }
.dialog-form .form-footer button { .dialog-form .form-footer button {
min-width: 14rem; min-width: 8rem;
min-height: 3.2rem; min-height: 2rem;
padding: 2px 6px;
margin: 0;
font-size: calc(var(--font-size-standard) * 0.9);
} }
.dialog-modifier { .dialog-modifier {
display: flex; display: flex;
@@ -2292,6 +2356,15 @@ i.lethalfantasy {
font-size: calc(var(--font-size-standard) * 1); font-size: calc(var(--font-size-standard) * 1);
color: var(--color-dark-1); color: var(--color-dark-1);
} }
.main select,
.dialog-damage select,
.dialog-resource select,
.dialog-challenge select,
.dialog-save select {
min-width: 8rem;
max-width: 8rem;
margin-left: 1rem;
}
.dice-roll { .dice-roll {
flex-direction: column; flex-direction: column;
} }
@@ -2336,6 +2409,115 @@ i.lethalfantasy {
font-size: calc(var(--font-size-standard) * 1); font-size: calc(var(--font-size-standard) * 1);
text-shadow: 0 0 10px var(--color-shadow-primary); text-shadow: 0 0 10px var(--color-shadow-primary);
} }
.dice-roll .damage-buttons {
width: 100%;
padding: 8px;
margin-top: 8px;
}
.dice-roll .damage-buttons .damage-buttons-title {
font-weight: bold;
margin-bottom: 8px;
font-size: calc(var(--font-size-standard) * 0.95);
text-align: center;
}
.dice-roll .damage-buttons .damage-buttons-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 6px;
padding: 8px;
background-color: rgba(0, 0, 0, 0.1);
border-radius: 5px;
}
.dice-roll .damage-buttons .damage-buttons-grid.monster-damage {
grid-template-columns: 1fr;
justify-items: center;
}
.dice-roll .damage-buttons .damage-buttons-grid .damage-roll-btn {
padding: 6px 10px;
background: linear-gradient(to bottom, #8b4513 0%, #6b3410 100%);
border: 1px solid #4b2408;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
color: #f0f0e0;
cursor: pointer;
border-radius: 4px;
font-size: calc(var(--font-size-standard) * 0.85);
font-weight: 500;
text-align: center;
transition: all 0.2s ease;
display: flex;
align-items: center;
justify-content: center;
gap: 4px;
}
.dice-roll .damage-buttons .damage-buttons-grid .damage-roll-btn i {
font-size: calc(var(--font-size-standard) * 1);
}
.dice-roll .damage-buttons .damage-buttons-grid .damage-roll-btn:hover {
background: linear-gradient(to bottom, #9b5523 0%, #7b4420 100%);
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
transform: translateY(-1px);
border-color: #5b3418;
}
.dice-roll .damage-buttons .damage-buttons-grid .damage-roll-btn:active {
transform: translateY(0);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.dice-roll .damage-result {
width: 100%;
padding: 8px;
}
.dice-roll .damage-result ul {
padding: 0;
margin: 0;
}
.dice-roll .damage-result .li-apply-wounds {
list-style: none;
margin-top: 10px;
padding: 0;
display: none;
}
.dice-roll .damage-result .li-apply-wounds > div:first-child {
font-weight: bold;
margin-bottom: 8px;
font-size: calc(var(--font-size-standard) * 0.95);
text-align: center;
}
.dice-roll .damage-result .li-apply-wounds .combatants-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 6px;
margin-top: 5px;
padding: 8px;
background-color: rgba(0, 0, 0, 0.1);
border-radius: 5px;
}
.dice-roll .damage-result .li-apply-wounds .combatants-grid .apply-wounds-btn {
padding: 6px 10px;
background: linear-gradient(to bottom, #5a5850 0%, #4b4a44 100%);
border: 1px solid #2b2a24;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
color: #f0f0e0;
cursor: pointer;
border-radius: 4px;
font-size: calc(var(--font-size-standard) * 0.85);
font-weight: 500;
text-align: center;
transition: all 0.2s ease;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
}
.dice-roll .damage-result .li-apply-wounds .combatants-grid .apply-wounds-btn:hover {
background: linear-gradient(to bottom, #6a6860 0%, #5a5850 100%);
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
transform: translateY(-1px);
border-color: #3b3a34;
}
.dice-roll .damage-result .li-apply-wounds .combatants-grid .apply-wounds-btn:active {
transform: translateY(0);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
#token-hud .hp-loss-wrap { #token-hud .hp-loss-wrap {
position: absolute; position: absolute;
left: 75px; left: 75px;

View File

@@ -83,7 +83,7 @@
}, },
"challenges": { "challenges": {
"agility": { "agility": {
"label": "Agility" "label": "Dexterity"
}, },
"dying": { "dying": {
"label": "Dying" "label": "Dying"
@@ -181,7 +181,7 @@
}, },
"challenges": { "challenges": {
"agility": { "agility": {
"label": "Agility" "label": "Dexterity"
}, },
"dying": { "dying": {
"label": "Dying" "label": "Dying"
@@ -281,6 +281,9 @@
} }
}, },
"Label": { "Label": {
"agility": "Dexterity",
"applyDamage": "Apply damage to:",
"rollDamage": "Roll Damage",
"gotoToken": "Go to token", "gotoToken": "Go to token",
"combatAction": "Combat action", "combatAction": "Combat action",
"currentAction": "Current ongoing action", "currentAction": "Current ongoing action",
@@ -303,8 +306,10 @@
"grantedAttackDice": "Granted attack", "grantedAttackDice": "Granted attack",
"grantedDamageDice": "Granted damage", "grantedDamageDice": "Granted damage",
"grantedDefenseDice": "Granted defense", "grantedDefenseDice": "Granted defense",
"damageResistance": "Damage resistance", "damageResistance": "DR",
"damageResistanceShort": "DR", "damageResistanceShort": "DR",
"shieldDamageReduction": "Shield DR",
"shieldDefenseDice": "Shield dice",
"stealth": "Stealth", "stealth": "Stealth",
"progressionDice": "Progression/Lethargy dice", "progressionDice": "Progression/Lethargy dice",
"rollProgressionCount": "Roll progression count", "rollProgressionCount": "Roll progression count",
@@ -348,7 +353,7 @@
"cha": "CHA", "cha": "CHA",
"challenge": "Challenge", "challenge": "Challenge",
"challenges": { "challenges": {
"agility": "Agility", "agility": "Dexterity",
"dying": "Dying", "dying": "Dying",
"strength": "Strength" "strength": "Strength"
}, },
@@ -420,7 +425,9 @@
"monster-damage": "Monster damage", "monster-damage": "Monster damage",
"monster-defense": "Monster defense", "monster-defense": "Monster defense",
"weapons": "Weapons", "weapons": "Weapons",
"wis": "WIS" "wis": "WIS",
"weapon-damage-medium": "Weapon damage medium",
"weapon-damage-small": "Weapon damage small"
}, },
"Miracle": { "Miracle": {
"FIELDS": { "FIELDS": {
@@ -552,7 +559,7 @@
"label": "Min" "label": "Min"
} }
}, },
"damagereduction": { "damageReduction": {
"label": "Damage reduction" "label": "Damage reduction"
}, },
"defense": { "defense": {
@@ -855,6 +862,20 @@
"melee": "Melee", "melee": "Melee",
"ranged": "Ranged" "ranged": "Ranged"
} }
},
"Dialog": {
"applyDamageTo": "Apply damage to",
"weapon": "Weapon",
"totalDamage": "Total Damage",
"damageReduction": "Damage Reduction",
"armorDR": "Armor DR",
"shieldDR": "Shield DR",
"totalDR": "Total DR",
"selectOption": "Select damage application option",
"noDR": "No DR",
"withArmor": "With Armor DR only",
"withAll": "With Armor + Shield DR",
"damage": "damage"
} }
}, },
"TYPES": { "TYPES": {

View File

@@ -152,6 +152,73 @@ Hooks.on(hookName, (message, html, data) => {
}) })
} }
} }
// Gestion du survol et du clic sur les boutons de dégâts pour les GMs
if (game.user.isGM) {
// Show damage buttons only for GM
$(html).find(".li-apply-wounds").each((i, btn) => {
btn.style.display = "block"
})
$(html).find(".apply-wounds-btn").hover(
function (event) {
// Mouse enter - select the token and pan to it
let combatantId = $(this).data("combatant-id")
if (combatantId && game.combat) {
let combatant = game.combat.combatants.get(combatantId)
if (combatant?.token) {
let token = canvas.tokens.get(combatant.token.id)
if (token) {
token.control({ releaseOthers: true })
canvas.animatePan(token.center)
}
}
}
},
function (event) {
// Mouse leave - release selection
canvas.tokens.releaseAll()
}
)
$(html).find(".apply-wounds-btn").click((event) => {
LethalFantasyUtils.applyDamage(message, event)
})
}
// Gestionnaire pour les boutons de jet de dégâts
$(html).find(".damage-roll-btn").click(async (event) => {
const button = $(event.currentTarget)
const weaponId = button.data("weapon-id")
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 qui a fait le jet initial
const actor = game.actors.get(message.rolls[0]?.actorId)
if (!actor) {
ui.notifications.error("Actor not found")
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)
})
}) })
Hooks.on("getCombatTrackerEntryContext", (html, options) => { Hooks.on("getCombatTrackerEntryContext", (html, options) => {

View File

@@ -140,7 +140,7 @@ export default class LethalFantasyActorSheet extends HandlebarsApplicationMixin(
if ("link" in event.target.dataset) return if ("link" in event.target.dataset) return
const el = event.currentTarget.closest('[data-drag="true"]') const el = event.currentTarget.closest('[data-drag="true"]')
const dragType = el.dataset.dragType const dragType = el?.dataset?.dragType
let dragData = {} let dragData = {}

View File

@@ -95,13 +95,26 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet
const doc = this.document const doc = this.document
switch (partId) { switch (partId) {
case "main": case "main":
context.armorDR = this.actor.getArmorDR()
context.damageReduction = this.actor.computeDamageReduction()
context.damageReductionShield = this.actor.getShieldDR()
break break
case "skills": case "skills": {
context.tab = context.tabs.skills context.tab = context.tabs.skills
context.skills = doc.itemTypes.skill context.skills = doc.itemTypes.skill
// Organiser les skills par catégorie
const categories = ['layperson', 'professional', 'weapon', 'armor', 'resist']
context.skillsByCategory = categories.map(cat => {
return {
category: cat,
label: `LETHALFANTASY.Skill.Category.${cat}`,
skills: context.skills.filter(s => s.system.category === cat)
}
}).filter(catData => catData.skills.length > 0)
context.gifts = doc.itemTypes.gift context.gifts = doc.itemTypes.gift
context.vulnerabilities = doc.itemTypes.vulnerability context.vulnerabilities = doc.itemTypes.vulnerability
break break
}
case "spells": case "spells":
context.tab = context.tabs.spells context.tab = context.tabs.spells
context.spells = doc.itemTypes.spell context.spells = doc.itemTypes.spell
@@ -143,7 +156,7 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet
const data = foundry.applications.ux.TextEditor.implementation.getDragEventData(event) const data = foundry.applications.ux.TextEditor.implementation.getDragEventData(event)
// Handle different data types // Handle different data types
if (data.type === "Item") { if (data.type === "Item") {
const item = await fromUuid(data.uuid) const item = await fromUuid(data.uuid)
return this._onDropItem(item) return this._onDropItem(item)
} }
@@ -246,7 +259,6 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet
async _onRoll(event, target) { async _onRoll(event, target) {
if (this.isEditMode) return if (this.isEditMode) return
console.log("Roll event", event)
const rollType = event.target.dataset.rollType const rollType = event.target.dataset.rollType
let rollKey = event.target.dataset.rollKey; let rollKey = event.target.dataset.rollKey;
let rollDice = event.target.dataset?.rollDice; let rollDice = event.target.dataset?.rollDice;

View File

@@ -162,9 +162,11 @@ export default class LethalFantasyMonsterSheet 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 rollable = event.target.closest('.rollable')
let rollKey = event.target.dataset.rollKey if (!rollable) return
let rollDice = event.target.dataset?.rollDice || "0" const rollType = rollable.dataset.rollType
let rollKey = rollable.dataset.rollKey
let rollDice = rollable.dataset?.rollDice || "0"
this.actor.system.prepareMonsterRoll(rollType, rollKey, rollDice) this.actor.system.prepareMonsterRoll(rollType, rollKey, rollDice)
} }
} }

View File

@@ -50,7 +50,7 @@ export const MORTAL_CHOICES = {
"halfelf": { label: "Half-Elf", id: "halfelf", defenseBonus: 0 }, "halfelf": { label: "Half-Elf", id: "halfelf", defenseBonus: 0 },
"halforc": { label: "Half-Orc", id: "halforc", defenseBonus: 0 }, "halforc": { label: "Half-Orc", id: "halforc", defenseBonus: 0 },
"gnome": { label: "Gnome", id: "gnome", defenseBonus: 2 }, "gnome": { label: "Gnome", id: "gnome", defenseBonus: 2 },
"halflings": { label: "Halflings", id: "halflings", defenseBonus: 2 } "halflings": { label: "Halfling", id: "halflings", defenseBonus: 2 }
} }
export const FAVOR_CHOICES = { export const FAVOR_CHOICES = {
@@ -92,8 +92,8 @@ export const RANGE_CHOICES = {
export const ATTACKER_AIM_CHOICES = { export const ATTACKER_AIM_CHOICES = {
"simple": { label: "Simple (+0)", value: "0" }, "simple": { label: "Simple (+0)", value: "0" },
"careful": { label: "Careful (Red -5)", value: "-4" }, "careful": { label: "Careful (Red +5)", value: "+4" },
"focused": { label: "Focused (Grey -9)", value: "-9" } "focused": { label: "Focused (Grey +9)", value: "+9" }
} }
export const SPELL_LETHARGY_DICE = [ export const SPELL_LETHARGY_DICE = [
@@ -104,6 +104,18 @@ export const SPELL_LETHARGY_DICE = [
{ dice: "D20", value: "20", level: "21-25", maxLevel: 25 } { dice: "D20", value: "20", level: "21-25", maxLevel: 25 }
] ]
export const GRANTED_DICE_CHOICES = {
"0": { label: "None", value: "0" },
"D2": { label: "D2", value: "D2" },
"D3": { label: "D3", value: "D3" },
"D4": { label: "D4", value: "D4" },
"D6": { label: "D6", value: "D6" },
"D8": { label: "D8", value: "D8" },
"D10": { label: "D10", value: "D10" },
"D12": { label: "D12", value: "D12" },
"D20": { label: "D20", value: "D20" }
}
export const INITIATIVE_DICE_CHOICES_PER_CLASS = { export const INITIATIVE_DICE_CHOICES_PER_CLASS = {
"untrained": [ "untrained": [
{ "name": "Asleep or totally distracted (2D12)", "value": "2D12" }, { "name": "Asleep or totally distracted (2D12)", "value": "2D12" },
@@ -136,7 +148,7 @@ export const INITIATIVE_DICE_CHOICES_PER_CLASS = {
"cleric": [ "cleric": [
{ "name": "Asleep or totally distracted (1D12)", "value": "1D12" }, { "name": "Asleep or totally distracted (1D12)", "value": "1D12" },
{ "name": "Awake but unsuspecting (1D10)", "value": "1D10" }, { "name": "Awake but unsuspecting (1D10)", "value": "1D10" },
{ "name": "Declared Ready on Alert (1D)", "value": "1D" }, { "name": "Declared Ready on Alert (1)", "value": "1" },
/*{ "name": "Aware of the enemy, can hear them but not see (1D6)", "value": "1D6" }, /*{ "name": "Aware of the enemy, can hear them but not see (1D6)", "value": "1D6" },
{ "name": "Aware and know exactly where the enemy is (1D4)", "value": "1D4" }*/ { "name": "Aware and know exactly where the enemy is (1D4)", "value": "1D4" }*/
], ],
@@ -310,5 +322,6 @@ export const SYSTEM = {
MORTAL_CHOICES, MORTAL_CHOICES,
SPELL_CRITICAL, SPELL_CRITICAL,
MIRACLE_TYPES, MIRACLE_TYPES,
SPELL_LETHARGY_DICE SPELL_LETHARGY_DICE,
GRANTED_DICE_CHOICES
} }

View File

@@ -65,7 +65,7 @@ export default class LethalFantasyActor extends Actor {
} }
} }
} }
goodSkill.weaponSkillModifier = maxValue * multiplier goodSkill.weaponSkillModifier = Math.ceil(maxValue * multiplier)
return goodSkill return goodSkill
} }
@@ -79,7 +79,81 @@ export default class LethalFantasyActor extends Actor {
} }
/* *************************************************/ /* *************************************************/
async prepareRoll(rollType, rollKey, rollDice ) { computeDamageReduction() {
// Pour les monstres, utiliser hp.damageResistance et combat.damageReduction
if (this.type === "monster") {
let hpDR = Number(this.system.hp?.damageResistance) || 0
let combatDR = Number(this.system.combat?.damageReduction) || 0
return hpDR + combatDR
}
// Pour les personnages, utiliser biodata et items
let naturalDR = Number(this.system.biodata?.naturalDR) || 0
let magicDR = Number(this.system.biodata?.magicDR) || 0
let armorDR = this.getArmorDR()
return naturalDR + magicDR + armorDR
}
/* *************************************************/
getShieldDR() {
// Pour les monstres, utiliser combat.shieldDamageReduction
if (this.type === "monster") {
return Number(this.system.combat?.shieldDamageReduction) || 0
}
// Pour les personnages, utiliser les items de type shield
let dr = 0
for (let item of this.items) {
if (item.type === "shield" && item.system.equipped) {
dr += Number(item.system.damageReduction)
}
}
return dr
}
/* *************************************************/
getArmorDR() {
let dr = 0
for (let item of this.items) {
if (item.type === "armor" && item.system.equipped) {
dr += Number(item.system.damageReduction)
}
}
return dr
}
/* *************************************************/
getArmorDefenseValue() {
let defenseValue = 0
for (let item of this.items) {
if (item.type === "armor" && item.system.equipped) {
defenseValue += Number(item.system.defense)
}
}
return defenseValue
}
/* *************************************************/
fuzzyNameSearchWeaponSkills(weaponName, weaponClass = null) {
// Get all weapon skills without the " skill" suffix
let skills = this.items.filter((i) => i.type === "skill" && i.system.weaponClass === weaponClass && i.system.category === "weapon")
// Remove parenthesis in the weapon name for better matching
weaponName = weaponName.replace(/\(.*?\)/g, "").trim()
// Now search if we find all the words of the weapon name in the skill name
skills = skills.filter((s) => {
let skillName = s.name.toLowerCase().replace(" skill", "").trim()
let wName = weaponName.toLowerCase().trim()
let wWords = wName.split(" ")
for (let w of wWords) {
if (!skillName.includes(w)) {
return false
}
}
return true
})
return skills
}
/* *************************************************/
async prepareRoll(rollType, rollKey, rollDice) {
console.log("Preparing roll", rollType, rollKey, rollDice) console.log("Preparing roll", rollType, rollKey, rollDice)
let rollTarget let rollTarget
switch (rollType) { switch (rollType) {
@@ -89,7 +163,7 @@ export default class LethalFantasyActor extends Actor {
formula: foundry.utils.duplicate(this.system.granted[rollKey]), formula: foundry.utils.duplicate(this.system.granted[rollKey]),
rollKey: rollKey rollKey: rollKey
} }
if ( rollTarget.formula === "" || rollTarget.formula === undefined) { if (rollTarget.formula === "" || rollTarget.formula === undefined) {
rollTarget.formula = 0 rollTarget.formula = 0
} }
break; break;
@@ -126,60 +200,64 @@ export default class LethalFantasyActor extends Actor {
rollTarget.rollKey = rollKey rollTarget.rollKey = rollKey
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)
let shieldSkill = this.items.find((i) => i.type === "skill" && i.name.toLowerCase() === rollTarget.name.toLowerCase()) let shieldSkill = this.items.find((i) => i.type === "skill" && i.name.toLowerCase() === rollTarget.name.toLowerCase())
rollTarget.skill = shieldSkill rollTarget.skill = shieldSkill
rollTarget.rollKey = rollKey rollTarget.rollKey = rollKey
} }
break; break;
case "weapon-damage-small": case "weapon-damage-small":
case "weapon-damage-medium": case "weapon-damage-medium":
case "weapon-attack": case "weapon-attack":
case "weapon-defense": { case "weapon-defense": {
let weapon = this.items.find((i) => i.type === "weapon" && i.id === rollKey) let weapon = this.items.find((i) => i.type === "weapon" && i.id === rollKey)
let skill let skill
let skills = this.items.filter((i) => i.type === "skill" && i.name.toLowerCase() === weapon.name.toLowerCase()) let skills = this.items.filter((i) => i.type === "skill" && i.system.category === "weapon" && i.name.toLowerCase() === weapon.name.toLowerCase())
if (skills.length > 0) {
skill = this.getBestWeaponClassSkill(skills, rollType, 1.0)
} else {
skills = this.fuzzyNameSearchWeaponSkills(weapon.name, weapon.system.weaponClass)
if (skills.length > 0) { if (skills.length > 0) {
skill = this.getBestWeaponClassSkill(skills, rollType, 1.0) skill = this.getBestWeaponClassSkill(skills, rollType, 1.0)
} else { } else {
skills = this.items.filter((i) => i.type === "skill" && i.name.toLowerCase().replace(" skill", "") === weapon.name.toLowerCase()) skills = this.items.filter((i) => i.type === "skill" && i.system.category === "weapon" && i.system.weaponClass === weapon.system.weaponClass)
if (skills.length > 0) { if (skills.length > 0) {
skill = this.getBestWeaponClassSkill(skills, rollType, 1.0) skill = this.getBestWeaponClassSkill(skills, rollType, 0.5)
} else { } else {
skills = this.items.filter((i) => i.type === "skill" && i.system.weaponClass === weapon.system.weaponClass) skills = this.items.filter((i) => i.type === "skill" && i.system.category === "weapon" && i.system.weaponClass.includes(SYSTEM.WEAPON_CATEGORIES[weapon.system.weaponClass]))
if (skills.length > 0) { if (skills.length > 0) {
skill = this.getBestWeaponClassSkill(skills, rollType, 0.5) skill = this.getBestWeaponClassSkill(skills, rollType, 0.25)
} else { } else {
skills = this.items.filter((i) => i.type === "skill" && i.system.weaponClass.includes(SYSTEM.WEAPON_CATEGORIES[weapon.system.weaponClass])) ui.notifications.warn(game.i18n.localize("LETHALFANTASY.Notifications.skillNotFound"))
if (skills.length > 0) { return
skill = this.getBestWeaponClassSkill(skills, rollType, 0.25)
} else {
ui.notifications.warn(game.i18n.localize("LETHALFANTASY.Notifications.skillNotFound"))
return
}
} }
} }
} }
if (!weapon || !skill) {
console.error("Weapon or skill not found", weapon, skill)
ui.notifications.warn(game.i18n.localize("LETHALFANTASY.Notifications.skillNotFound"))
return
}
rollTarget = skill
rollTarget.weapon = weapon
rollTarget.weaponSkillModifier = skill.weaponSkillModifier
rollTarget.rollKey = rollKey
rollTarget.combat = foundry.utils.duplicate(this.system.combat)
if ( rollType === "weapon-damage-small" || rollType === "weapon-damage-medium") {
rollTarget.grantedDice = this.system.granted.damageDice
}
if ( rollType === "weapon-attack") {
rollTarget.grantedDice = this.system.granted.attackDice
}
if ( rollType === "weapon-defense") {
rollTarget.grantedDice = this.system.granted.defenseDice
}
} }
if (!weapon || !skill) {
console.error("Weapon or skill not found", weapon, skill)
ui.notifications.warn(game.i18n.localize("LETHALFANTASY.Notifications.skillNotFound"))
return
}
// Créer un objet plain au lieu de modifier directement le skill
rollTarget = {
...skill,
weapon: weapon,
weaponSkillModifier: skill.weaponSkillModifier,
rollKey: rollKey,
combat: foundry.utils.duplicate(this.system.combat)
}
if (rollType === "weapon-damage-small" || rollType === "weapon-damage-medium") {
rollTarget.grantedDice = this.system.granted.damageDice
}
if (rollType === "weapon-attack") {
rollTarget.grantedDice = this.system.granted.attackDice
}
if (rollType === "weapon-defense") {
rollTarget.armorDefense = this.getArmorDefenseValue()
rollTarget.grantedDice = this.system.granted.defenseDice
}
}
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))

View File

@@ -96,6 +96,10 @@ export default class LethalFantasyRoll extends Roll {
return this.options.badResult return this.options.badResult
} }
get rollData() {
return this.options.rollData
}
/** /**
* Prompt the user with a dialog to configure and execute a roll. * Prompt the user with a dialog to configure and execute a roll.
* *
@@ -125,9 +129,12 @@ export default class LethalFantasyRoll extends Roll {
let hasMaxValue = true let hasMaxValue = true
let hasGrantedDice = false let hasGrantedDice = false
let pointBlank = false let pointBlank = false
let letItFly = false
let saveSpell = false
let beyondSkill = false let beyondSkill = false
let hasStaticModifier = false let hasStaticModifier = false
let hasExplode = true let hasExplode = true
let actor = game.actors.get(options.actorId)
if (options.rollType === "challenge" || options.rollType === "save") { if (options.rollType === "challenge" || options.rollType === "save") {
options.rollName = game.i18n.localize(`LETHALFANTASY.Label.${options.rollTarget.rollKey}`) options.rollName = game.i18n.localize(`LETHALFANTASY.Label.${options.rollTarget.rollKey}`)
@@ -178,6 +185,7 @@ export default class LethalFantasyRoll extends Roll {
} else if (options.rollType === "skill") { } else if (options.rollType === "skill") {
options.rollName = options.rollTarget.name options.rollName = options.rollTarget.name
hasD30 = true
dice = "1D20" dice = "1D20"
baseFormula = "D20" baseFormula = "D20"
hasModifier = true hasModifier = true
@@ -202,7 +210,7 @@ export default class LethalFantasyRoll extends Roll {
options.rollTarget.charModifier = options.rollTarget.combat.rangedAttackModifier options.rollTarget.charModifier = options.rollTarget.combat.rangedAttackModifier
} }
} else { } else {
options.rollTarget.value = options.rollTarget.combat.defenseModifier + options.rollTarget.weaponSkillModifier + options.rollTarget.weapon.system.bonuses.defenseBonus options.rollTarget.value = options.rollTarget.combat.defenseModifier + options.rollTarget.weaponSkillModifier + options.rollTarget.weapon.system.bonuses.defenseBonus + options.rollTarget.armorDefense
options.rollTarget.charModifier = options.rollTarget.combat.defenseModifier options.rollTarget.charModifier = options.rollTarget.combat.defenseModifier
} }
@@ -252,14 +260,17 @@ export default class LethalFantasyRoll extends Roll {
} else if (options.rollType.includes("weapon-damage")) { } else if (options.rollType.includes("weapon-damage")) {
options.rollName = options.rollTarget.name options.rollName = options.rollTarget.name
options.isDamage = true
hasModifier = true hasModifier = true
hasChangeDice = false hasChangeDice = false
let damageBonus = (options.rollTarget.weapon.system.applyStrengthDamageBonus) ? options.rollTarget.combat.damageModifier : 0 let damageBonus = (options.rollTarget.weapon.system.applyStrengthDamageBonus) ? options.rollTarget.combat.damageModifier : 0
options.rollTarget.value = damageBonus + options.rollTarget.weaponSkillModifier + options.rollTarget.weapon.system.bonuses.damageBonus options.rollTarget.value = damageBonus + options.rollTarget.weaponSkillModifier + options.rollTarget.weapon.system.bonuses.damageBonus
options.rollTarget.charModifier = damageBonus options.rollTarget.charModifier = damageBonus
if (options.rollType.includes("small")) { if (options.rollType.includes("small")) {
options.damageSmall = true
dice = options.rollTarget.weapon.system.damage.damageS dice = options.rollTarget.weapon.system.damage.damageS
} else { } else {
options.damageMedium = true
dice = options.rollTarget.weapon.system.damage.damageM dice = options.rollTarget.weapon.system.damage.damageM
} }
dice = dice.replace("E", "") dice = dice.replace("E", "")
@@ -267,6 +278,7 @@ export default class LethalFantasyRoll extends Roll {
} else if (options.rollType.includes("monster-damage")) { } else if (options.rollType.includes("monster-damage")) {
options.rollName = options.rollTarget.name options.rollName = options.rollTarget.name
options.isDamage = true
hasModifier = true hasModifier = true
hasChangeDice = false hasChangeDice = false
options.rollTarget.value = options.rollTarget.damageModifier options.rollTarget.value = options.rollTarget.damageModifier
@@ -310,6 +322,8 @@ export default class LethalFantasyRoll extends Roll {
hasChangeDice, hasChangeDice,
pointBlank, pointBlank,
baseValue: options.rollTarget.value, baseValue: options.rollTarget.value,
attackerAimChoices: SYSTEM.ATTACKER_AIM_CHOICES,
attackerAim: "0",
changeDice: `${dice}`, changeDice: `${dice}`,
fieldRollMode, fieldRollMode,
choiceModifier, choiceModifier,
@@ -349,7 +363,7 @@ export default class LethalFantasyRoll extends Roll {
], ],
actions: { actions: {
"selectGranted": (event, button, dialog) => { "selectGranted": (event, button, dialog) => {
hasGrantedDice = true hasGrantedDice = event.target.checked
}, },
"selectBeyondSkill": (event, button, dialog) => { "selectBeyondSkill": (event, button, dialog) => {
beyondSkill = button.checked beyondSkill = button.checked
@@ -357,6 +371,12 @@ export default class LethalFantasyRoll extends Roll {
"selectPointBlank": (event, button, dialog) => { "selectPointBlank": (event, button, dialog) => {
pointBlank = button.checked pointBlank = button.checked
}, },
"selectLetItFly": (event, button, dialog) => {
letItFly = button.checked
},
"saveSpellCheck": (event, button, dialog) => {
saveSpell = button.checked
},
"gotoToken": (event, button, dialog) => { "gotoToken": (event, button, dialog) => {
let tokenId = $(button).data("tokenId") let tokenId = $(button).data("tokenId")
let token = canvas.tokens?.get(tokenId) let token = canvas.tokens?.get(tokenId)
@@ -373,6 +393,7 @@ export default class LethalFantasyRoll extends Roll {
// If the user cancels the dialog, exit // If the user cancels the dialog, exit
if (rollContext === null) return if (rollContext === null) return
console.log("rollContext", rollContext, hasGrantedDice) console.log("rollContext", rollContext, hasGrantedDice)
rollContext.saveSpell = saveSpell // Update fucking flag
let fullModifier = 0 let fullModifier = 0
let titleFormula = "" let titleFormula = ""
@@ -381,6 +402,9 @@ export default class LethalFantasyRoll extends Roll {
let bonus = Number(options.rollTarget.value) let bonus = Number(options.rollTarget.value)
fullModifier = rollContext.modifier === "" ? 0 : parseInt(rollContext.modifier, 10) + bonus fullModifier = rollContext.modifier === "" ? 0 : parseInt(rollContext.modifier, 10) + bonus
fullModifier += (rollContext.saveSpell) ? options.rollTarget.actorModifiers.saveModifier : 0 fullModifier += (rollContext.saveSpell) ? options.rollTarget.actorModifiers.saveModifier : 0
if (Number(rollContext.attackerAim) > 0) {
fullModifier += Number(rollContext.attackerAim)
}
if (fullModifier === 0) { if (fullModifier === 0) {
modifierFormula = "0" modifierFormula = "0"
@@ -391,7 +415,6 @@ export default class LethalFantasyRoll extends Roll {
if (hasStaticModifier) { if (hasStaticModifier) {
modifierFormula += ` + ${options.rollTarget.staticModifier}` modifierFormula += ` + ${options.rollTarget.staticModifier}`
} }
// modifierFormula += ` + ${options.rollTarget.charModifier}`
let sign = fullModifier < 0 ? "-" : "+" let sign = fullModifier < 0 ? "-" : "+"
if (hasExplode) { if (hasExplode) {
titleFormula = `${dice}E ${sign} ${modifierFormula}` titleFormula = `${dice}E ${sign} ${modifierFormula}`
@@ -426,8 +449,21 @@ export default class LethalFantasyRoll extends Roll {
} }
// Specific pain/poison/contagion case // Specific pain/poison/contagion case
if (options.rollType === "save" && (options.rollTarget.rollKey === "pain" || options.rollTarget.rollKey === "paincourage" || options.rollTarget.rollKey === "poison" || options.rollTarget.rollKey === "contagion")) { if (options.rollType === "save" && (options.rollTarget.rollKey === "poison" || options.rollTarget.rollKey === "contagion")) {
hasD30 = false hasD30 = false
hasStaticModifier = true
modifierFormula = ` + ${Math.abs(fullModifier)}`
titleFormula = `${dice}E + ${Math.abs(fullModifier)}`
}
if (letItFly) {
baseFormula = "1D20"
titleFormula = `1D20E`
modifierFormula = "0"
fullModifier = 0
hasFavor = false
hasExplode = true
rollContext.favor = "none"
} }
maxValue = Number(baseFormula.match(/\d+$/)[0]) // Update the max value agains maxValue = Number(baseFormula.match(/\d+$/)[0]) // Update the max value agains
@@ -442,6 +478,12 @@ export default class LethalFantasyRoll extends Roll {
actorImage: options.actorImage, actorImage: options.actorImage,
rollMode: rollContext.visibility, rollMode: rollContext.visibility,
hasTarget: options.hasTarget, hasTarget: options.hasTarget,
isDamage: options.isDamage,
damageSmall: options.damageSmall,
damageMedium: options.damageMedium,
pointBlank,
beyondSkill,
letItFly,
hasGrantedDice, hasGrantedDice,
titleFormula, titleFormula,
targetName, targetName,
@@ -468,15 +510,17 @@ export default class LethalFantasyRoll extends Roll {
if (rollContext.favor === "favor") { if (rollContext.favor === "favor") {
rollFavor = new this(baseFormula, options.data, rollData) rollFavor = new this(baseFormula, options.data, rollData)
await rollFavor.evaluate() await rollFavor.evaluate()
console.log("Rolling with favor", rollFavor)
if (game?.dice3d) { if (game?.dice3d) {
game.dice3d.showForRoll(rollFavor, game.user, true) game.dice3d.showForRoll(rollFavor, game.user, true)
} }
if (rollFavor.result > rollBase.result) { if (Number(rollFavor.result) > Number(rollBase.result)) {
badResult = rollBase.result badResult = rollBase.result
rollBase = rollFavor rollBase = rollFavor
} else { } else {
badResult = rollFavor.result badResult = rollFavor.result
} }
rollFavor = null
} }
if (rollContext.favor === "disfavor") { if (rollContext.favor === "disfavor") {
@@ -485,12 +529,13 @@ export default class LethalFantasyRoll extends Roll {
if (game?.dice3d) { if (game?.dice3d) {
game.dice3d.showForRoll(rollFavor, game.user, true) game.dice3d.showForRoll(rollFavor, game.user, true)
} }
if (rollFavor.result < rollBase.result) { if (Number(rollFavor.result) < Number(rollBase.result)) {
badResult = rollBase.result badResult = rollBase.result
rollBase = rollFavor rollBase = rollFavor
} else { } else {
badResult = rollFavor.result badResult = rollFavor.result
} }
rollFavor = null
} }
if (hasD30) { if (hasD30) {
@@ -501,7 +546,7 @@ export default class LethalFantasyRoll extends Roll {
options.D30result = rollD30.total options.D30result = rollD30.total
} }
let rollTotal = -1 let rollTotal = 0
let diceResults = [] let diceResults = []
let resultType let resultType
let diceSum = 0 let diceSum = 0
@@ -526,7 +571,8 @@ export default class LethalFantasyRoll extends Roll {
} }
} }
if (hasGrantedDice) { if (hasGrantedDice && options.rollTarget.grantedDice && options.rollTarget.grantedDice !== "") {
titleFormula += ` + ${options.rollTarget.grantedDice.toUpperCase()}`
let grantedRoll = new Roll(options.rollTarget.grantedDice) let grantedRoll = new Roll(options.rollTarget.grantedDice)
await grantedRoll.evaluate() await grantedRoll.evaluate()
if (game?.dice3d) { if (game?.dice3d) {
@@ -539,12 +585,12 @@ export default class LethalFantasyRoll extends Roll {
if (fullModifier !== 0) { if (fullModifier !== 0) {
diceResults.push({ dice: `${rollModifier.formula.toUpperCase()}`, value: rollModifier.total }) diceResults.push({ dice: `${rollModifier.formula.toUpperCase()}`, value: rollModifier.total })
if (fullModifier < 0) { if (fullModifier < 0) {
rollTotal = Math.max(diceSum - rollModifier.total, 0) rollTotal += Math.max(diceSum - rollModifier.total, 0)
} else { } else {
rollTotal = diceSum + rollModifier.total rollTotal += diceSum + rollModifier.total
} }
} else { } else {
rollTotal = diceSum rollTotal += diceSum
} }
rollBase.options.resultType = resultType rollBase.options.resultType = resultType
@@ -554,6 +600,7 @@ export default class LethalFantasyRoll extends Roll {
rollBase.options.titleFormula = titleFormula rollBase.options.titleFormula = titleFormula
rollBase.options.D30result = options.D30result rollBase.options.D30result = options.D30result
rollBase.options.badResult = badResult rollBase.options.badResult = badResult
rollBase.options.rollData = foundry.utils.duplicate(rollData)
/** /**
* A hook event that fires after the roll has been made. * A hook event that fires after the roll has been made.
@@ -592,7 +639,6 @@ export default class LethalFantasyRoll extends Roll {
fieldRollMode, fieldRollMode,
rollModes rollModes
} }
console.log("CTX", dialogContext)
const content = await foundry.applications.handlebars.renderTemplate("systems/fvtt-lethal-fantasy/templates/roll-initiative-dialog.hbs", dialogContext) const content = await foundry.applications.handlebars.renderTemplate("systems/fvtt-lethal-fantasy/templates/roll-initiative-dialog.hbs", dialogContext)
@@ -627,7 +673,6 @@ export default class LethalFantasyRoll extends Roll {
let combat = game.combats.get(options.combatId) let combat = game.combats.get(options.combatId)
combat.updateEmbeddedDocuments("Combatant", [{ _id: options.combatantId, initiative: initRoll.total, 'system.progressionCount': 0 }]); combat.updateEmbeddedDocuments("Combatant", [{ _id: options.combatantId, initiative: initRoll.total, 'system.progressionCount': 0 }]);
} }
} }
/* ***********************************************************/ /* ***********************************************************/
@@ -890,9 +935,9 @@ export default class LethalFantasyRoll extends Roll {
} }
/* ***********************************************************/ /* ***********************************************************/
static async promptRangedDefense(rollTarget) { static async promptRangedDefense(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.Dice.rollModes);
const fieldRollMode = new foundry.data.fields.StringField({ const fieldRollMode = new foundry.data.fields.StringField({
choices: rollModes, choices: rollModes,
blank: false, blank: false,
@@ -907,13 +952,12 @@ export default class LethalFantasyRoll extends Roll {
attackerAimChoices: SYSTEM.ATTACKER_AIM_CHOICES, attackerAimChoices: SYSTEM.ATTACKER_AIM_CHOICES,
movement: "none", movement: "none",
moveDirection: "none", moveDirection: "none",
size: "medium", size: "+5",
range: "short", range: "short",
attackerAim: "simple", attackerAim: "simple",
fieldRollMode, fieldRollMode,
rollModes rollModes
} }
console.log("CTX", dialogContext)
const content = await foundry.applications.handlebars.renderTemplate("systems/fvtt-lethal-fantasy/templates/range-defense-dialog.hbs", dialogContext) const content = await foundry.applications.handlebars.renderTemplate("systems/fvtt-lethal-fantasy/templates/range-defense-dialog.hbs", dialogContext)
@@ -951,7 +995,7 @@ export default class LethalFantasyRoll extends Roll {
if (rollContext.range === "beyondskill") { if (rollContext.range === "beyondskill") {
rollContext.movement = rollContext.movement.replace("kh", "") rollContext.movement = rollContext.movement.replace("kh", "")
rollContext.movement = rollContext.movement.replace("kl", "") rollContext.movement = rollContext.movement.replace("kl", "")
rollContext.movement += "kh" // Add the kl to the movement (disfavor for point blank range) rollContext.movement += "kh" // Add the kl to the movement (favor for point blank range)
rollContext.range = "+11" rollContext.range = "+11"
} }
@@ -959,19 +1003,19 @@ export default class LethalFantasyRoll extends Roll {
let fullModifier = Number(rollContext.moveDirection) + let fullModifier = Number(rollContext.moveDirection) +
Number(rollContext.size) + Number(rollContext.size) +
Number(rollContext.range) + Number(rollContext.range) +
Number(rollContext.attackerAim) Number(rollContext?.attackerAim || 0)
console.log("Modifier", fullModifier)
let modifierFormula let modifierFormula
if (fullModifier === 0) { if (fullModifier === 0) {
modifierFormula = "0" modifierFormula = "0"
} else { } else {
let modAbs = Math.abs(fullModifier) let modAbs = Math.abs(fullModifier)
modifierFormula = `${modAbs}` modifierFormula = `D${modAbs + 1} -1`
} }
let rollData = { ...rollContext } let rollData = { ...rollContext }
let options = { ...rollContext } // Merge rollContext object into options object
options = { ...options, ...rollContext }
options.rollName = "Ranged Defense" options.rollName = "Ranged Defense"
const rollBase = new this(rollContext.movement, options.data, rollData) const rollBase = new this(rollContext.movement, options.data, rollData)
@@ -981,7 +1025,15 @@ export default class LethalFantasyRoll extends Roll {
let rollD30 = await new Roll("1D30").evaluate() let rollD30 = await new Roll("1D30").evaluate()
options.D30result = rollD30.total options.D30result = rollD30.total
let badResult = 0
if (rollContext.movement.includes("kh")) {
rollData.favor = "favor"
badResult = Math.min(rollBase.terms[0].results[0].result, rollBase.terms[0].results[1]?.result || 20)
}
if (rollContext.movement.includes("kl")) {
rollData.favor = "disfavor"
badResult = Math.max(rollBase.terms[0].results[0].result, rollBase.terms[0].results[1]?.result || 1)
}
let dice = rollContext.movement let dice = rollContext.movement
let maxValue = 20 // As per latest changes (was : Number(dice.match(/\d+$/)[0]) let maxValue = 20 // As per latest changes (was : Number(dice.match(/\d+$/)[0])
let rollTotal = -1 let rollTotal = -1
@@ -1007,15 +1059,16 @@ export default class LethalFantasyRoll extends Roll {
} else { } else {
rollTotal = diceSum rollTotal = diceSum
} }
rollBase.options = { ...rollBase.options, ...options }
rollBase.options.resultType = resultType rollBase.options.resultType = resultType
rollBase.options.rollTotal = rollTotal rollBase.options.rollTotal = rollTotal
rollBase.options.diceResults = diceResults rollBase.options.diceResults = diceResults
rollBase.options.rollTarget = options.rollTarget rollBase.options.rollTarget = options.rollTarget
rollBase.options.titleFormula = `${dice}E + ${modifierFormula}` rollBase.options.titleFormula = `1D20E + ${modifierFormula}`
rollBase.options.D30result = options.D30result rollBase.options.D30result = options.D30result
rollBase.options.rollName = "Ranged Defense" rollBase.options.rollName = "Ranged Defense"
rollBase.options.badResult = badResult
rollBase.options.rollData = foundry.utils.duplicate(rollData)
/** /**
* A hook event that fires after the roll has been made. * A hook event that fires after the roll has been made.
* @function * @function
@@ -1077,6 +1130,39 @@ export default class LethalFantasyRoll extends Roll {
* Generates the data required for rendering a roll chat card. * Generates the data required for rendering a roll chat card.
*/ */
async _getChatCardData(isPrivate) { async _getChatCardData(isPrivate) {
// Générer la liste des combatants de la scène
let combatants = []
if (game?.combat?.combatants && this.rollData?.isDamage) {
for (let c of game.combat.combatants) {
if (c.actorId !== this.actorId) {
combatants.push({ id: c.id, name: c.name })
}
}
}
// Récupérer les informations de l'arme pour les attaques réussies
let weaponDamageOptions = null
console.log("Roll type:", this.type, "rollTarget:", this.rollTarget, "Has weapon:", !!this.rollTarget?.weapon)
if (this.type === "weapon-attack" && this.rollTarget?.weapon) {
const weapon = this.rollTarget.weapon
weaponDamageOptions = {
weaponId: weapon._id || weapon.id,
weaponName: weapon.name,
damageS: weapon.system?.damage?.damageS,
damageM: weapon.system?.damage?.damageM
}
console.log("Weapon damage options:", weaponDamageOptions)
} else if (this.type === "monster-attack" && this.rollTarget) {
weaponDamageOptions = {
weaponId: this.rollTarget.rollKey,
weaponName: this.rollTarget.name,
damageFormula: this.rollTarget.damageDice,
damageModifier: this.rollTarget.damageModifier,
isMonster: true
}
console.log("Monster damage options:", weaponDamageOptions)
}
const cardData = { const cardData = {
css: [SYSTEM.id, "dice-roll"], css: [SYSTEM.id, "dice-roll"],
data: this.data, data: this.data,
@@ -1099,7 +1185,10 @@ export default class LethalFantasyRoll extends Roll {
targetArmor: this.targetArmor, targetArmor: this.targetArmor,
D30result: this.D30result, D30result: this.D30result,
badResult: this.badResult, badResult: this.badResult,
isPrivate: isPrivate rollData: this.rollData,
isPrivate: isPrivate,
combatants: combatants,
weaponDamageOptions: weaponDamageOptions
} }
cardData.cssClass = cardData.css.join(" ") cardData.cssClass = cardData.css.join(" ")
cardData.tooltip = isPrivate ? "" : await this.getTooltip() cardData.tooltip = isPrivate ? "" : await this.getTooltip()
@@ -1130,6 +1219,7 @@ export default class LethalFantasyRoll extends Roll {
targetArmor: this.targetArmor, targetArmor: this.targetArmor,
targetMalus: this.targetMalus, targetMalus: this.targetMalus,
realDamage: this.realDamage, realDamage: this.realDamage,
rollData: this.rollData,
...messageData, ...messageData,
}, },
{ rollMode: rollMode }, { rollMode: rollMode },

View File

@@ -90,9 +90,9 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod
current: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }) current: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 })
}) })
schema.granted = new fields.SchemaField({ schema.granted = new fields.SchemaField({
attackDice: new fields.StringField({ required: true, nullable: false, initial: "" }), attackDice: new fields.StringField({ required: true, nullable: false, initial: "0", choices: SYSTEM.GRANTED_DICE_CHOICES }),
defenseDice: new fields.StringField({ required: true, nullable: false, initial: "" }), defenseDice: new fields.StringField({ required: true, nullable: false, initial: "0", choices: SYSTEM.GRANTED_DICE_CHOICES }),
damageDice: new fields.StringField({ required: true, nullable: false, initial: "" }) damageDice: new fields.StringField({ required: true, nullable: false, initial: "0", choices: SYSTEM.GRANTED_DICE_CHOICES })
}) })
schema.movement = new fields.SchemaField({ schema.movement = new fields.SchemaField({
@@ -120,6 +120,8 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod
magicUser: new fields.BooleanField({ initial: false }), magicUser: new fields.BooleanField({ initial: false }),
clericUser: new fields.BooleanField({ initial: false }), clericUser: new fields.BooleanField({ initial: false }),
hpPerLevel: new fields.StringField({ required: true, nullable: false, initial: "" }), hpPerLevel: new fields.StringField({ required: true, nullable: false, initial: "" }),
naturalDR: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
magicDR: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
}) })
schema.modifiers = new fields.SchemaField({ schema.modifiers = new fields.SchemaField({
@@ -179,13 +181,13 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod
if (!SYSTEM.MORTAL_CHOICES[data.biodata.mortal]) { if (!SYSTEM.MORTAL_CHOICES[data.biodata.mortal]) {
for (let key in SYSTEM.MORTAL_CHOICES) { for (let key in SYSTEM.MORTAL_CHOICES) {
let mortal = SYSTEM.MORTAL_CHOICES[key] let mortal = SYSTEM.MORTAL_CHOICES[key]
if ( mortal.label.toLowerCase() === data.biodata.mortal.toLowerCase()) { if (mortal.label.toLowerCase() === data.biodata.mortal.toLowerCase()) {
data.biodata.mortal = mortal.id data.biodata.mortal = mortal.id
} }
if ( data.biodata.mortal.toLowerCase().includes("shire")) { if (data.biodata.mortal.toLowerCase().includes("shire")) {
data.biodata.mortal = "halflings" data.biodata.mortal = "halflings"
} }
if ( data.biodata.mortal.toLowerCase().includes("human")) { if (data.biodata.mortal.toLowerCase().includes("human")) {
data.biodata.mortal = "mankind" data.biodata.mortal = "mankind"
} }
} }
@@ -235,8 +237,8 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod
this.saves.toughness.value = conDef.toughness_save + this.modifiers.saveModifier this.saves.toughness.value = conDef.toughness_save + this.modifiers.saveModifier
this.challenges.dying.value = conDef.stabilization_dice this.challenges.dying.value = conDef.stabilization_dice
this.saves.contagion.value = this.characteristics.con.value + this.modifiers.saveModifier this.saves.contagion.value = this.characteristics.con.value;// + this.modifiers.saveModifier
this.saves.poison.value = this.characteristics.con.value + this.modifiers.saveModifier this.saves.poison.value = this.characteristics.con.value; // + this.modifiers.saveModifier
this.combat.attackModifier = 0 this.combat.attackModifier = 0
for (let chaKey of SYSTEM.CHARACTERISTIC_ATTACK) { for (let chaKey of SYSTEM.CHARACTERISTIC_ATTACK) {
@@ -293,7 +295,6 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod
let wisDef = SYSTEM.CHARACTERISTICS_TABLES.wis.find((c) => c.value === this.characteristics.wis.value) let wisDef = SYSTEM.CHARACTERISTICS_TABLES.wis.find((c) => c.value === this.characteristics.wis.value)
let maxInit = Number(wisDef.init_cap) || 1000 let maxInit = Number(wisDef.init_cap) || 1000
console.log("Rolling initiative for", this)
let roll = await LethalFantasyRoll.promptInitiative({ let roll = await LethalFantasyRoll.promptInitiative({
actorId: this.parent.id, actorId: this.parent.id,

View File

@@ -118,6 +118,9 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
defenseModifier: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), defenseModifier: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
damageModifier: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), damageModifier: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
armorHitPoints: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), armorHitPoints: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
damageReduction: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
shieldDamageReduction: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
shieldDefenseDice: new fields.StringField({ required: true, nullable: false, initial: "d4" })
}) })
@@ -150,7 +153,7 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
await roll.toMessage({}, { rollMode: roll.options.rollMode }) await roll.toMessage({}, { rollMode: roll.options.rollMode })
} }
async prepareMonsterRoll(rollType, rollKey, rollDice = undefined, tokenId = undefined) { async prepareMonsterRoll(rollType, rollKey, rollDice = undefined, tokenId = undefined, damageModifier = undefined) {
let rollTarget let rollTarget
switch (rollType) { switch (rollType) {
case "monster-attack": case "monster-attack":
@@ -158,6 +161,10 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
case "monster-damage": case "monster-damage":
rollTarget = foundry.utils.duplicate(this.attacks[rollKey]) rollTarget = foundry.utils.duplicate(this.attacks[rollKey])
rollTarget.rollKey = rollKey rollTarget.rollKey = rollKey
// Si damageModifier est fourni (depuis le chat), l'utiliser au lieu de celui de la fiche
if (damageModifier !== undefined && rollType === "monster-damage") {
rollTarget.damageModifier = damageModifier
}
break break
case "monster-skill": case "monster-skill":
rollTarget = foundry.utils.duplicate(this.resists[rollKey]) rollTarget = foundry.utils.duplicate(this.resists[rollKey])
@@ -168,6 +175,19 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
rollTarget.rollKey = rollKey rollTarget.rollKey = rollKey
rollTarget.rollDice = rollDice rollTarget.rollDice = rollDice
break break
case "shield-defense": {
// Lance directement le dé de défense du bouclier
const formula = rollDice || this.combat.shieldDefenseDice
const roll = new Roll(formula)
await roll.evaluate()
const flavor = game.i18n.localize("LETHALFANTASY.Label.shieldDefenseDice")
await roll.toMessage({
flavor,
speaker: ChatMessage.getSpeaker({ actor: this.parent })
})
return
}
case "weapon-damage-small": case "weapon-damage-small":
case "weapon-damage-medium": case "weapon-damage-medium":
case "weapon-attack": case "weapon-attack":
@@ -210,13 +230,15 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
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
rollTarget.tokenId = tokenId if (rollTarget) {
console.log(rollTarget) rollTarget.tokenId = tokenId
await this.roll(rollType, rollTarget) console.log(rollTarget)
await this.roll(rollType, rollTarget)
}
} }
async rollInitiative(combatId = undefined, combatantId = undefined) { async rollInitiative(combatId = undefined, combatantId = undefined) {

View File

@@ -6,9 +6,10 @@ export default class LethalFantasyShield extends foundry.abstract.TypeDataModel
const requiredInteger = { required: true, nullable: false, integer: true } const requiredInteger = { required: true, nullable: false, integer: true }
schema.description = new fields.HTMLField({ required: true, textSearch: true }) schema.description = new fields.HTMLField({ required: true, textSearch: true })
schema.defense = new fields.StringField({required: true, initial: "d4", choices: SYSTEM.SHIELD_DEFENSE_DICE}) schema.defense = new fields.StringField({ required: true, initial: "d4", choices: SYSTEM.SHIELD_DEFENSE_DICE })
schema.movementreduction = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }) schema.movementreduction = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 })
schema.hascover = new fields.BooleanField({ required: true, initial: false }) schema.hascover = new fields.BooleanField({ required: true, initial: false })
schema.damageReduction = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 })
schema.standing = new fields.SchemaField({ schema.standing = new fields.SchemaField({
min: new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }), min: new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }),

View File

@@ -22,43 +22,43 @@ export default class LethalFantasyUtils {
static setHookListeners() { static setHookListeners() {
Hooks.on('renderTokenHUD', async (hud, html, token) => { Hooks.on('renderTokenHUD', async (hud, html, token) => {
const lossHPButton = await foundry.applications.handlebars.renderTemplate('systems/fvtt-lethal-fantasy/templates/loss-hp-hud.hbs', {} ) const lossHPButton = await foundry.applications.handlebars.renderTemplate('systems/fvtt-lethal-fantasy/templates/loss-hp-hud.hbs', {})
$(html).find('div.left').append(lossHPButton); $(html).find('div.left').append(lossHPButton);
$(html).find('img.lethal-hp-loss-hud').click((event) => { $(html).find('img.lethal-hp-loss-hud').click((event) => {
event.preventDefault(); event.preventDefault();
let hpMenu = $(html).find('.hp-loss-wrap')[0] let hpMenu = $(html).find('.hp-loss-wrap')[0]
if (hpMenu.classList.contains("hp-loss-hud-disabled")) { if (hpMenu.classList.contains("hp-loss-hud-disabled")) {
$(html).find('.hp-loss-wrap')[0].classList.add('hp-loss-hud-active'); $(html).find('.hp-loss-wrap')[0].classList.add('hp-loss-hud-active');
$(html).find('.hp-loss-wrap')[0].classList.remove('hp-loss-hud-disabled'); $(html).find('.hp-loss-wrap')[0].classList.remove('hp-loss-hud-disabled');
$(html).find('.hp-loss-wrap')[1].classList.add('hp-loss-hud-active'); $(html).find('.hp-loss-wrap')[1].classList.add('hp-loss-hud-active');
$(html).find('.hp-loss-wrap')[1].classList.remove('hp-loss-hud-disabled'); $(html).find('.hp-loss-wrap')[1].classList.remove('hp-loss-hud-disabled');
$(html).find('.hp-loss-wrap')[2].classList.add('hp-loss-hud-active'); $(html).find('.hp-loss-wrap')[2].classList.add('hp-loss-hud-active');
$(html).find('.hp-loss-wrap')[2].classList.remove('hp-loss-hud-disabled'); $(html).find('.hp-loss-wrap')[2].classList.remove('hp-loss-hud-disabled');
} else { } else {
$(html).find('.hp-loss-wrap')[0].classList.remove('hp-loss-hud-active'); $(html).find('.hp-loss-wrap')[0].classList.remove('hp-loss-hud-active');
$(html).find('.hp-loss-wrap')[0].classList.add('hp-loss-hud-disabled'); $(html).find('.hp-loss-wrap')[0].classList.add('hp-loss-hud-disabled');
$(html).find('.hp-loss-wrap')[1].classList.remove('hp-loss-hud-active'); $(html).find('.hp-loss-wrap')[1].classList.remove('hp-loss-hud-active');
$(html).find('.hp-loss-wrap')[1].classList.add('hp-loss-hud-disabled'); $(html).find('.hp-loss-wrap')[1].classList.add('hp-loss-hud-disabled');
$(html).find('.hp-loss-wrap')[2].classList.remove('hp-loss-hud-active'); $(html).find('.hp-loss-wrap')[2].classList.remove('hp-loss-hud-active');
$(html).find('.hp-loss-wrap')[2].classList.add('hp-loss-hud-disabled'); $(html).find('.hp-loss-wrap')[2].classList.add('hp-loss-hud-disabled');
} }
}) })
$(html).find('.loss-hp-hud-click').click((event) => { $(html).find('.loss-hp-hud-click').click((event) => {
event.preventDefault(); event.preventDefault();
let hpLoss = event.currentTarget.dataset.hpValue; let hpLoss = event.currentTarget.dataset.hpValue;
if (token) { if (token) {
let tokenFull = canvas.tokens.placeables.find( t => t.id === token._id); let tokenFull = canvas.tokens.placeables.find(t => t.id === token._id);
console.log(tokenFull, token) console.log(tokenFull, token)
let actor = tokenFull.actor; let actor = tokenFull.actor;
actor.applyDamage(Number(hpLoss)); actor.applyDamage(Number(hpLoss));
$(html).find('.hp-loss-wrap')[0].classList.remove('hp-loss-hud-active'); $(html).find('.hp-loss-wrap')[0].classList.remove('hp-loss-hud-active');
$(html).find('.hp-loss-wrap')[0].classList.add('hp-loss-hud-disabled'); $(html).find('.hp-loss-wrap')[0].classList.add('hp-loss-hud-disabled');
$(html).find('.hp-loss-wrap')[1].classList.remove('hp-loss-hud-active'); $(html).find('.hp-loss-wrap')[1].classList.remove('hp-loss-hud-active');
$(html).find('.hp-loss-wrap')[1].classList.add('hp-loss-hud-disabled'); $(html).find('.hp-loss-wrap')[1].classList.add('hp-loss-hud-disabled');
$(html).find('.hp-loss-wrap')[2].classList.remove('hp-loss-hud-active'); $(html).find('.hp-loss-wrap')[2].classList.remove('hp-loss-hud-active');
$(html).find('.hp-loss-wrap')[2].classList.add('hp-loss-hud-disabled'); $(html).find('.hp-loss-wrap')[2].classList.add('hp-loss-hud-disabled');
} }
}) })
}) })
} }
@@ -246,4 +246,100 @@ export default class LethalFantasyUtils {
} }
} }
/* -------------------------------------------- */
static async applyDamage(message, event) {
// Récupérer les données du message
let combatantId = event.currentTarget.dataset.combatantId
if (!combatantId || !game.combat) {
ui.notifications.error("No combatant selected")
return
}
let combatant = game.combat.combatants.get(combatantId)
if (!combatant) {
ui.notifications.error("Combatant not found")
return
}
let targetActor = combatant.token?.actor || game.actors.get(combatant.actorId)
if (!targetActor) {
ui.notifications.error("Target actor not found")
return
}
// Récupérer les données de dégâts du message
let damageTotal = message.rolls[0]?.total || 0
let weaponName = message.rolls[0]?.options?.rollName || "Unknown Weapon"
// Calculer les DR
let armorDR = targetActor.computeDamageReduction() || 0
let shieldDR = targetActor.getShieldDR() || 0
let totalDR = armorDR + shieldDR
// Créer le dialogue
const content = await foundry.applications.handlebars.renderTemplate(
"systems/fvtt-lethal-fantasy/templates/apply-damage-dialog.hbs",
{
targetName: targetActor.name,
weaponName: weaponName,
damageTotal: damageTotal,
armorDR: armorDR,
shieldDR: shieldDR,
totalDR: totalDR,
damageNoDR: damageTotal,
damageWithArmor: Math.max(0, damageTotal - armorDR),
damageWithAll: Math.max(0, damageTotal - totalDR)
}
)
const result = await foundry.applications.api.DialogV2.wait({
window: { title: "Apply Damage" },
classes: ["lethalfantasy"],
position: { width: 280 },
content,
buttons: [
{
action: "noDR",
label: "No DR",
callback: () => ({ drType: "none", damage: damageTotal })
},
{
action: "armorDR",
label: "With Armor DR",
callback: () => ({ drType: "armor", damage: Math.max(0, damageTotal - armorDR) })
},
{
action: "allDR",
label: "With Armor + Shield DR",
callback: () => ({ drType: "all", damage: Math.max(0, damageTotal - totalDR) })
},
{
action: "cancel",
label: "Cancel",
callback: () => null
}
],
rejectClose: false
})
if (result && result.damage !== undefined) {
await targetActor.applyDamage(-result.damage)
// Message de confirmation
let drText = ""
if (result.drType === "armor") {
drText = ` (Armor DR: ${armorDR})`
} else if (result.drType === "all") {
drText = ` (Total DR: ${totalDR})`
}
ChatMessage.create({
user: game.user.id,
speaker: { alias: targetActor.name },
rollMode: "gmroll",
content: `${targetActor.name} takes ${result.damage} damage${drText} from ${weaponName}`
})
}
}
} }

View File

@@ -1 +1 @@
MANIFEST-000380 MANIFEST-000498

View File

@@ -1,8 +1,15 @@
2025/08/31-11:02:02.192092 7facb3fff6c0 Recovering log #378 2026/01/12-14:22:56.040680 7fd462ffd6c0 Recovering log #496
2025/08/31-11:02:02.202398 7facb3fff6c0 Delete type=3 #376 2026/01/12-14:22:56.051263 7fd462ffd6c0 Delete type=3 #494
2025/08/31-11:02:02.202444 7facb3fff6c0 Delete type=0 #378 2026/01/12-14:22:56.051335 7fd462ffd6c0 Delete type=0 #496
2025/08/31-11:28:03.032642 7facb27ff6c0 Level-0 table #383: started 2026/01/12-14:27:05.789368 7fd4627fc6c0 Level-0 table #501: started
2025/08/31-11:28:03.032856 7facb27ff6c0 Level-0 table #383: 0 bytes OK 2026/01/12-14:27:05.793070 7fd4627fc6c0 Level-0 table #501: 26835 bytes OK
2025/08/31-11:28:03.039646 7facb27ff6c0 Delete type=0 #381 2026/01/12-14:27:05.799160 7fd4627fc6c0 Delete type=0 #499
2025/08/31-11:28:03.047372 7facb27ff6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end) 2026/01/12-14:27:05.815143 7fd4627fc6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
2025/08/31-11:28:03.047539 7facb27ff6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end) 2026/01/12-14:27:05.815173 7fd4627fc6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at '!items!zFrygJ2TnrxchBai' @ 1178 : 1
2026/01/12-14:27:05.815179 7fd4627fc6c0 Compacting 1@1 + 1@2 files
2026/01/12-14:27:05.821137 7fd4627fc6c0 Generated table #502@1: 486 keys, 220368 bytes
2026/01/12-14:27:05.821151 7fd4627fc6c0 Compacted 1@1 + 1@2 files => 220368 bytes
2026/01/12-14:27:05.827440 7fd4627fc6c0 compacted to: files[ 0 0 1 0 0 0 0 ]
2026/01/12-14:27:05.827535 7fd4627fc6c0 Delete type=2 #489
2026/01/12-14:27:05.828221 7fd4627fc6c0 Delete type=2 #501
2026/01/12-14:27:05.839529 7fd4627fc6c0 Manual compaction at level-1 from '!items!zFrygJ2TnrxchBai' @ 1178 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)

View File

@@ -1,8 +1,8 @@
2025/08/30-18:23:53.067582 7facb3fff6c0 Recovering log #374 2026/01/04-22:23:04.765915 7f93ebfff6c0 Recovering log #492
2025/08/30-18:23:53.077306 7facb3fff6c0 Delete type=3 #372 2026/01/04-22:23:04.775983 7f93ebfff6c0 Delete type=3 #490
2025/08/30-18:23:53.077503 7facb3fff6c0 Delete type=0 #374 2026/01/04-22:23:04.776035 7f93ebfff6c0 Delete type=0 #492
2025/08/30-18:45:52.226055 7facb27ff6c0 Level-0 table #379: started 2026/01/04-22:40:50.964348 7f93e9ffb6c0 Level-0 table #497: started
2025/08/30-18:45:52.226081 7facb27ff6c0 Level-0 table #379: 0 bytes OK 2026/01/04-22:40:50.964370 7f93e9ffb6c0 Level-0 table #497: 0 bytes OK
2025/08/30-18:45:52.233470 7facb27ff6c0 Delete type=0 #377 2026/01/04-22:40:50.975783 7f93e9ffb6c0 Delete type=0 #495
2025/08/30-18:45:52.233679 7facb27ff6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end) 2026/01/04-22:40:50.986019 7f93e9ffb6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
2025/08/30-18:45:52.233706 7facb27ff6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end) 2026/01/04-22:40:50.986046 7f93e9ffb6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1 +1 @@
MANIFEST-000379 MANIFEST-000496

View File

@@ -1,8 +1,8 @@
2025/08/31-11:02:02.206543 7facb37fe6c0 Recovering log #377 2026/01/12-14:22:56.057091 7fd4637fe6c0 Recovering log #494
2025/08/31-11:02:02.215835 7facb37fe6c0 Delete type=3 #375 2026/01/12-14:22:56.067553 7fd4637fe6c0 Delete type=3 #492
2025/08/31-11:02:02.215878 7facb37fe6c0 Delete type=0 #377 2026/01/12-14:22:56.067610 7fd4637fe6c0 Delete type=0 #494
2025/08/31-11:28:03.017058 7facb27ff6c0 Level-0 table #382: started 2026/01/12-14:27:05.799253 7fd4627fc6c0 Level-0 table #499: started
2025/08/31-11:28:03.017435 7facb27ff6c0 Level-0 table #382: 0 bytes OK 2026/01/12-14:27:05.799272 7fd4627fc6c0 Level-0 table #499: 0 bytes OK
2025/08/31-11:28:03.023891 7facb27ff6c0 Delete type=0 #380 2026/01/12-14:27:05.805798 7fd4627fc6c0 Delete type=0 #497
2025/08/31-11:28:03.047213 7facb27ff6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end) 2026/01/12-14:27:05.815153 7fd4627fc6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
2025/08/31-11:28:03.047451 7facb27ff6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end) 2026/01/12-14:27:05.828314 7fd4627fc6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)

View File

@@ -1,8 +1,8 @@
2025/08/30-18:23:53.081675 7facb91fa6c0 Recovering log #373 2026/01/04-22:23:04.780744 7f93eb7fe6c0 Recovering log #490
2025/08/30-18:23:53.092658 7facb91fa6c0 Delete type=3 #371 2026/01/04-22:23:04.790510 7f93eb7fe6c0 Delete type=3 #488
2025/08/30-18:23:53.092710 7facb91fa6c0 Delete type=0 #373 2026/01/04-22:23:04.790582 7f93eb7fe6c0 Delete type=0 #490
2025/08/30-18:45:52.213593 7facb27ff6c0 Level-0 table #378: started 2026/01/04-22:40:50.951234 7f93e9ffb6c0 Level-0 table #495: started
2025/08/30-18:45:52.213631 7facb27ff6c0 Level-0 table #378: 0 bytes OK 2026/01/04-22:40:50.951256 7f93e9ffb6c0 Level-0 table #495: 0 bytes OK
2025/08/30-18:45:52.219786 7facb27ff6c0 Delete type=0 #376 2026/01/04-22:40:50.964192 7f93e9ffb6c0 Delete type=0 #493
2025/08/30-18:45:52.233655 7facb27ff6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end) 2026/01/04-22:40:50.986007 7f93e9ffb6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
2025/08/30-18:45:52.233694 7facb27ff6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end) 2026/01/04-22:40:50.986038 7f93e9ffb6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1 +1 @@
MANIFEST-000379 MANIFEST-000499

View File

@@ -1,8 +1,15 @@
2025/08/31-11:02:02.179303 7facb91fa6c0 Recovering log #377 2026/01/12-14:22:56.026652 7fd478fff6c0 Recovering log #497
2025/08/31-11:02:02.189376 7facb91fa6c0 Delete type=3 #375 2026/01/12-14:22:56.036317 7fd478fff6c0 Delete type=3 #495
2025/08/31-11:02:02.189457 7facb91fa6c0 Delete type=0 #377 2026/01/12-14:22:56.036373 7fd478fff6c0 Delete type=0 #497
2025/08/31-11:28:03.039915 7facb27ff6c0 Level-0 table #382: started 2026/01/12-14:27:05.805895 7fd4627fc6c0 Level-0 table #502: started
2025/08/31-11:28:03.039961 7facb27ff6c0 Level-0 table #382: 0 bytes OK 2026/01/12-14:27:05.809094 7fd4627fc6c0 Level-0 table #502: 1650 bytes OK
2025/08/31-11:28:03.046598 7facb27ff6c0 Delete type=0 #380 2026/01/12-14:27:05.815051 7fd4627fc6c0 Delete type=0 #500
2025/08/31-11:28:03.047412 7facb27ff6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end) 2026/01/12-14:27:05.815162 7fd4627fc6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
2025/08/31-11:28:03.047575 7facb27ff6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end) 2026/01/12-14:27:05.828330 7fd4627fc6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at '!items!3cU5wW47VwlEPNqj' @ 736 : 1
2026/01/12-14:27:05.828340 7fd4627fc6c0 Compacting 1@1 + 1@2 files
2026/01/12-14:27:05.833408 7fd4627fc6c0 Generated table #503@1: 91 keys, 118712 bytes
2026/01/12-14:27:05.833433 7fd4627fc6c0 Compacted 1@1 + 1@2 files => 118712 bytes
2026/01/12-14:27:05.839289 7fd4627fc6c0 compacted to: files[ 0 0 1 0 0 0 0 ]
2026/01/12-14:27:05.839370 7fd4627fc6c0 Delete type=2 #494
2026/01/12-14:27:05.839480 7fd4627fc6c0 Delete type=2 #502
2026/01/12-14:27:05.852151 7fd4627fc6c0 Manual compaction at level-1 from '!items!3cU5wW47VwlEPNqj' @ 736 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)

View File

@@ -1,8 +1,8 @@
2025/08/30-18:23:53.054593 7facb89f96c0 Recovering log #373 2026/01/04-22:23:04.753572 7f93ea7fc6c0 Recovering log #492
2025/08/30-18:23:53.065011 7facb89f96c0 Delete type=3 #371 2026/01/04-22:23:04.763198 7f93ea7fc6c0 Delete type=3 #490
2025/08/30-18:23:53.065091 7facb89f96c0 Delete type=0 #373 2026/01/04-22:23:04.763251 7f93ea7fc6c0 Delete type=0 #492
2025/08/30-18:45:52.219947 7facb27ff6c0 Level-0 table #378: started 2026/01/04-22:40:50.941164 7f93e9ffb6c0 Level-0 table #498: started
2025/08/30-18:45:52.219975 7facb27ff6c0 Level-0 table #378: 0 bytes OK 2026/01/04-22:40:50.941212 7f93e9ffb6c0 Level-0 table #498: 0 bytes OK
2025/08/30-18:45:52.225942 7facb27ff6c0 Delete type=0 #376 2026/01/04-22:40:50.951122 7f93e9ffb6c0 Delete type=0 #496
2025/08/30-18:45:52.233667 7facb27ff6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end) 2026/01/04-22:40:50.985987 7f93e9ffb6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
2025/08/30-18:45:52.233700 7facb27ff6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end) 2026/01/04-22:40:50.986053 7f93e9ffb6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)

Binary file not shown.

Binary file not shown.

View File

@@ -1 +1 @@
MANIFEST-000079 MANIFEST-000196

View File

@@ -1,8 +1,8 @@
2025/08/31-11:02:02.230091 7facb3fff6c0 Recovering log #77 2026/01/12-14:22:56.089280 7fd478fff6c0 Recovering log #194
2025/08/31-11:02:02.240519 7facb3fff6c0 Delete type=3 #75 2026/01/12-14:22:56.099242 7fd478fff6c0 Delete type=3 #192
2025/08/31-11:02:02.240600 7facb3fff6c0 Delete type=0 #77 2026/01/12-14:22:56.099341 7fd478fff6c0 Delete type=0 #194
2025/08/31-11:28:03.047734 7facb27ff6c0 Level-0 table #82: started 2026/01/12-14:27:05.839539 7fd4627fc6c0 Level-0 table #199: started
2025/08/31-11:28:03.047973 7facb27ff6c0 Level-0 table #82: 0 bytes OK 2026/01/12-14:27:05.839559 7fd4627fc6c0 Level-0 table #199: 0 bytes OK
2025/08/31-11:28:03.055122 7facb27ff6c0 Delete type=0 #80 2026/01/12-14:27:05.845408 7fd4627fc6c0 Delete type=0 #197
2025/08/31-11:28:03.086906 7facb27ff6c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end) 2026/01/12-14:27:05.858412 7fd4627fc6c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
2025/08/31-11:28:03.086956 7facb27ff6c0 Manual compaction at level-1 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end) 2026/01/12-14:27:05.864408 7fd4627fc6c0 Manual compaction at level-1 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)

View File

@@ -1,8 +1,8 @@
2025/08/30-18:23:53.106927 7facb3fff6c0 Recovering log #73 2026/01/04-22:23:04.807684 7f93ebfff6c0 Recovering log #190
2025/08/30-18:23:53.116922 7facb3fff6c0 Delete type=3 #71 2026/01/04-22:23:04.818050 7f93ebfff6c0 Delete type=3 #188
2025/08/30-18:23:53.116996 7facb3fff6c0 Delete type=0 #73 2026/01/04-22:23:04.818118 7f93ebfff6c0 Delete type=0 #190
2025/08/30-18:45:52.206763 7facb27ff6c0 Level-0 table #78: started 2026/01/04-22:40:51.016662 7f93e9ffb6c0 Level-0 table #195: started
2025/08/30-18:45:52.206840 7facb27ff6c0 Level-0 table #78: 0 bytes OK 2026/01/04-22:40:51.016694 7f93e9ffb6c0 Level-0 table #195: 0 bytes OK
2025/08/30-18:45:52.213448 7facb27ff6c0 Delete type=0 #76 2026/01/04-22:40:51.026652 7f93e9ffb6c0 Delete type=0 #193
2025/08/30-18:45:52.233641 7facb27ff6c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end) 2026/01/04-22:40:51.026790 7f93e9ffb6c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
2025/08/30-18:45:52.233688 7facb27ff6c0 Manual compaction at level-1 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end) 2026/01/04-22:40:51.026806 7f93e9ffb6c0 Manual compaction at level-1 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)

Binary file not shown.

View File

@@ -1 +1 @@
MANIFEST-000379 MANIFEST-000495

View File

@@ -1,8 +1,8 @@
2025/08/31-11:02:02.217898 7facb91fa6c0 Recovering log #377 2026/01/12-14:22:56.075339 7fd463fff6c0 Recovering log #493
2025/08/31-11:02:02.227818 7facb91fa6c0 Delete type=3 #375 2026/01/12-14:22:56.084731 7fd463fff6c0 Delete type=3 #491
2025/08/31-11:02:02.227879 7facb91fa6c0 Delete type=0 #377 2026/01/12-14:22:56.084798 7fd463fff6c0 Delete type=0 #493
2025/08/31-11:28:03.024048 7facb27ff6c0 Level-0 table #382: started 2026/01/12-14:27:05.782342 7fd4627fc6c0 Level-0 table #498: started
2025/08/31-11:28:03.024094 7facb27ff6c0 Level-0 table #382: 0 bytes OK 2026/01/12-14:27:05.782393 7fd4627fc6c0 Level-0 table #498: 0 bytes OK
2025/08/31-11:28:03.032021 7facb27ff6c0 Delete type=0 #380 2026/01/12-14:27:05.789274 7fd4627fc6c0 Delete type=0 #496
2025/08/31-11:28:03.047310 7facb27ff6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) 2026/01/12-14:27:05.815132 7fd4627fc6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
2025/08/31-11:28:03.047492 7facb27ff6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) 2026/01/12-14:27:05.828301 7fd4627fc6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)

View File

@@ -1,8 +1,8 @@
2025/08/30-18:23:53.094395 7facb89f96c0 Recovering log #373 2026/01/04-22:23:04.794525 7f93ea7fc6c0 Recovering log #489
2025/08/30-18:23:53.104578 7facb89f96c0 Delete type=3 #371 2026/01/04-22:23:04.804229 7f93ea7fc6c0 Delete type=3 #487
2025/08/30-18:23:53.104646 7facb89f96c0 Delete type=0 #373 2026/01/04-22:23:04.804296 7f93ea7fc6c0 Delete type=0 #489
2025/08/30-18:45:52.233837 7facb27ff6c0 Level-0 table #378: started 2026/01/04-22:40:50.975950 7f93e9ffb6c0 Level-0 table #494: started
2025/08/30-18:45:52.233866 7facb27ff6c0 Level-0 table #378: 0 bytes OK 2026/01/04-22:40:50.975985 7f93e9ffb6c0 Level-0 table #494: 0 bytes OK
2025/08/30-18:45:52.239911 7facb27ff6c0 Delete type=0 #376 2026/01/04-22:40:50.985836 7f93e9ffb6c0 Delete type=0 #492
2025/08/30-18:45:52.263164 7facb27ff6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) 2026/01/04-22:40:50.986029 7f93e9ffb6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
2025/08/30-18:45:52.263199 7facb27ff6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end) 2026/01/04-22:40:50.986073 7f93e9ffb6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)

View File

@@ -4,7 +4,6 @@
overflow: scroll; overflow: scroll;
} }
.character-main { .character-main {
display: flex; display: flex;
@@ -46,7 +45,7 @@
min-width: 2.2rem; min-width: 2.2rem;
max-width: 2.2rem; max-width: 2.2rem;
margin-left: 4px; margin-left: 4px;
font-size: calc(var(--font-size-standard) * 1.0); font-size: calc(var(--font-size-standard) * 1);
} }
.character-hp-max { .character-hp-max {
clear: both; clear: both;
@@ -58,7 +57,7 @@
input { input {
width: 3.2rem; width: 3.2rem;
text-align: center; text-align: center;
font-size: calc(var(--font-size-standard) * 1.0); font-size: calc(var(--font-size-standard) * 1);
} }
} }
} }
@@ -223,7 +222,7 @@
} }
} }
.tab.character-biography .main-div{ .tab.character-biography .main-div {
.biodata { .biodata {
display: grid; display: grid;
grid-template-columns: repeat(4, 1fr); grid-template-columns: repeat(4, 1fr);
@@ -253,7 +252,7 @@
} }
} }
.tab.character-skills .main-div{ .tab.character-skills .main-div {
display: grid; display: grid;
grid-template-columns: 1fr; grid-template-columns: 1fr;
legend { legend {
@@ -376,6 +375,9 @@
min-width: 2.5rem; min-width: 2.5rem;
max-width: 2.5rem; max-width: 2.5rem;
} }
.ranged-attack-button {
font-size: 0.8rem;
}
button { button {
min-width: 9rem; min-width: 9rem;
} }
@@ -474,7 +476,7 @@
min-width: 12rem; min-width: 12rem;
} }
.item-detail { .item-detail {
min-width:2rem; min-width: 2rem;
} }
} }
.shields { .shields {
@@ -493,13 +495,12 @@
} }
} }
.item-detail { .item-detail {
min-width:2.5rem; min-width: 2.5rem;
} }
.name { .name {
min-width: 12rem; min-width: 12rem;
} }
} }
} }
.tab.character-spells .main-div { .tab.character-spells .main-div {
@@ -535,7 +536,6 @@
} }
} }
.spells { .spells {
display: grid; display: grid;
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(2, 1fr);
@@ -546,7 +546,8 @@
align-items: center; align-items: center;
gap: 4px; gap: 4px;
.item-img { .item-img {
width: 24px; min-width: 24px;
max-width: 24px;
height: 24px; height: 24px;
} }
.name { .name {

View File

@@ -1,33 +1,34 @@
&.fortune { &.fortune {
img { img {
border: 0px; border: 0px;
} }
.intro-chat { .intro-chat {
border-radius: 20px; border-radius: 20px;
display: flex; display: flex;
flex-direction: row; flex-direction: row;
.intro-img { .intro-img {
padding: 5px; padding: 5px;
width: 80px; width: 80px;
align-self: center; align-self: center;
} }
.intro-right { .intro-right {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.introText { .introText {
font-family: var(--font-secondary); font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1.2); font-size: calc(var(--font-size-standard) * 1.2);
width: 210px; width: 210px;
text-align: center; text-align: center;
}
}
}
.button.control, .fortune-accepted {
display: flex;
justify-content: center;
align-items: center;
font-size: calc(var(--font-size-standard) * 1.3);
} }
}
}
.button.control,
.fortune-accepted {
display: flex;
justify-content: center;
align-items: center;
font-size: calc(var(--font-size-standard) * 1.3);
}
} }
&.ask-roll { &.ask-roll {

View File

@@ -47,7 +47,7 @@ i.lethalfantasy {
.application.dialog.lethalfantasy { .application.dialog.lethalfantasy {
font-family: var(--font-primary); font-family: var(--font-primary);
font-size: calc(var(--font-size-standard) * 1.0); font-size: calc(var(--font-size-standard) * 1);
background-image: var(--background-image-base); background-image: var(--background-image-base);
button:hover { button:hover {
background: var(--color-dark-6); background: var(--color-dark-6);
@@ -70,12 +70,12 @@ i.lethalfantasy {
background-size: 100% 100%; background-size: 100% 100%;
} }
.combat-sidebar li.combatant .token-initiative .initiative{ .combat-sidebar li.combatant .token-initiative .initiative {
margin-right: 16px; margin-right: 16px;
} }
.combat-sidebar li.combatant .token-initiative { .combat-sidebar li.combatant .token-initiative {
flex:none; flex: none;
} }
.initiative-minus { .initiative-minus {
margin-right: 8px; margin-right: 8px;

View File

@@ -25,7 +25,6 @@
gap: 10px; gap: 10px;
flex: 1; flex: 1;
.monster-hp { .monster-hp {
display: flex; display: flex;
gap: 4px; gap: 4px;
@@ -46,7 +45,7 @@
min-width: 2.2rem; min-width: 2.2rem;
max-width: 2.2rem; max-width: 2.2rem;
margin-left: 4px; margin-left: 4px;
font-size: calc(var(--font-size-standard) * 1.0); font-size: calc(var(--font-size-standard) * 1);
} }
.character-hp-max { .character-hp-max {
clear: both; clear: both;
@@ -58,7 +57,7 @@
input { input {
width: 3.2rem; width: 3.2rem;
text-align: center; text-align: center;
font-size: calc(var(--font-size-standard) * 1.0); font-size: calc(var(--font-size-standard) * 1);
} }
} }
} }
@@ -121,9 +120,11 @@
flex: 1; flex: 1;
.monster-skill { .monster-skill {
display: flex; display: grid;
grid-template-columns: repeat(3, auto 2.5rem);
gap: 0.5rem;
align-items: center; align-items: center;
margin-right: 0.5rem;
.rollable:hover, .rollable:hover,
.rollable:focus { .rollable:focus {
text-shadow: 0 0 8px var(--color-shadow-primary); text-shadow: 0 0 8px var(--color-shadow-primary);
@@ -134,12 +135,9 @@
max-width: 2.5rem; max-width: 2.5rem;
} }
.name { .name {
flex: 1;
min-width: 3.2rem;
margin-left: 4px; margin-left: 4px;
} }
.form-group { .form-group {
flex: 1;
padding-left: 4px; padding-left: 4px;
.form-fields { .form-fields {
flex: none; flex: none;
@@ -157,8 +155,9 @@
.monster-movement { .monster-movement {
display: flex; display: flex;
align-items: center; flex-direction: column;
margin-right: 0.5rem; gap: 4px;
.rollable:hover, .rollable:hover,
.rollable:focus { .rollable:focus {
text-shadow: 0 0 8px var(--color-shadow-primary); text-shadow: 0 0 8px var(--color-shadow-primary);
@@ -252,7 +251,7 @@
} }
} }
.tab.monster-skills .main-div{ .tab.monster-skills .main-div {
display: grid; display: grid;
grid-template-columns: 1fr; grid-template-columns: 1fr;
legend { legend {

View File

@@ -7,6 +7,65 @@
border-color: var(--color-dark-6); border-color: var(--color-dark-6);
color: var(--color-dark-2); color: var(--color-dark-2);
} }
.apply-damage-dialog {
.dialog-content {
padding: 6px;
font-size: calc(var(--font-size-standard) * 1);
.header {
text-align: center;
padding: 4px;
margin-bottom: 6px;
background-color: rgba(0, 0, 0, 0.1);
border-radius: 3px;
}
.damage-summary {
display: flex;
justify-content: space-between;
align-items: center;
padding: 4px 6px;
margin-bottom: 6px;
background-color: rgba(139, 0, 0, 0.1);
border-radius: 3px;
.damage-value {
color: var(--color-level-error);
font-size: calc(var(--font-size-standard) * 1.2);
font-weight: bold;
}
}
.dr-summary {
display: flex;
justify-content: space-around;
gap: 4px;
padding: 3px;
margin-bottom: 6px;
font-size: calc(var(--font-size-standard) * 0.85);
background-color: rgba(0, 0, 0, 0.05);
border-radius: 3px;
}
.damage-options {
.option-line {
display: flex;
justify-content: space-between;
align-items: center;
padding: 3px 6px;
margin: 2px 0;
background-color: rgba(0, 0, 0, 0.05);
border-radius: 3px;
strong {
color: var(--color-dark-1);
font-size: calc(var(--font-size-standard) * 1.05);
}
}
}
}
}
} }
.lethalfantasy-roll-dialog { .lethalfantasy-roll-dialog {
@@ -25,7 +84,6 @@
border-radius: 4px; border-radius: 4px;
padding: 0.5rem; padding: 0.5rem;
} }
} }
.lethalfantasy-range-defense-dialog { .lethalfantasy-range-defense-dialog {
@@ -34,10 +92,17 @@
fieldset { fieldset {
padding: 4px; padding: 4px;
} }
.fieldset-centered {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
}
select { select {
margin-left: 0.5rem; margin-left: 0.5rem;
min-width: 10rem; min-width: 12rem;
max-width: 10rem; max-width: 12rem;
} }
.field-section { .field-section {
display: flex; display: flex;
@@ -45,18 +110,22 @@
justify-content: left; justify-content: left;
} }
.field-name { .field-name {
width:4rem; width: 5rem;
min-width: 4rem; min-width: 5rem;
max-width: 4rem; max-width: 5em;
} }
} }
.dialog-form { .dialog-form {
.form-footer { .form-footer {
padding: 4px;
gap: 4px;
button { button {
min-width: 14rem; min-width: 8rem;
min-height: 3.2rem; min-height: 2rem;
padding: 2px 6px;
margin: 0;
font-size: calc(var(--font-size-standard) * 0.9);
} }
} }
} }
@@ -87,7 +156,6 @@
} }
} }
.main, .main,
.dialog-damage, .dialog-damage,
.dialog-resource, .dialog-resource,
@@ -99,8 +167,13 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
font-family: var(--font-secondary); font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1.0); font-size: calc(var(--font-size-standard) * 1);
color: var(--color-dark-1); color: var(--color-dark-1);
select {
min-width: 8rem;
max-width: 8rem;
margin-left: 1rem;
}
} }
&.dice-roll { &.dice-roll {
@@ -133,7 +206,7 @@
flex-direction: column; flex-direction: column;
.introText { .introText {
font-family: var(--font-secondary); font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1.0); font-size: calc(var(--font-size-standard) * 1);
width: 210px; width: 210px;
margin-left: 20px; margin-left: 20px;
} }
@@ -144,7 +217,132 @@
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
font-size: calc(var(--font-size-standard) * 1.0); font-size: calc(var(--font-size-standard) * 1);
text-shadow: 0 0 10px var(--color-shadow-primary); text-shadow: 0 0 10px var(--color-shadow-primary);
} }
.damage-buttons {
width: 100%;
padding: 8px;
margin-top: 8px;
.damage-buttons-title {
font-weight: bold;
margin-bottom: 8px;
font-size: calc(var(--font-size-standard) * 0.95);
text-align: center;
}
.damage-buttons-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 6px;
padding: 8px;
background-color: rgba(0, 0, 0, 0.1);
border-radius: 5px;
&.monster-damage {
grid-template-columns: 1fr;
justify-items: center;
}
.damage-roll-btn {
padding: 6px 10px;
background: linear-gradient(to bottom, #8b4513 0%, #6b3410 100%);
border: 1px solid #4b2408;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
color: #f0f0e0;
cursor: pointer;
border-radius: 4px;
font-size: calc(var(--font-size-standard) * 0.85);
font-weight: 500;
text-align: center;
transition: all 0.2s ease;
display: flex;
align-items: center;
justify-content: center;
gap: 4px;
i {
font-size: calc(var(--font-size-standard) * 1);
}
&:hover {
background: linear-gradient(to bottom, #9b5523 0%, #7b4420 100%);
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
transform: translateY(-1px);
border-color: #5b3418;
}
&:active {
transform: translateY(0);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
}
}
}
.damage-result {
width: 100%;
padding: 8px;
ul {
padding: 0;
margin: 0;
}
.li-apply-wounds {
list-style: none;
margin-top: 10px;
padding: 0;
display: none;
> div:first-child {
font-weight: bold;
margin-bottom: 8px;
font-size: calc(var(--font-size-standard) * 0.95);
text-align: center;
}
.combatants-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 6px;
margin-top: 5px;
padding: 8px;
background-color: rgba(0, 0, 0, 0.1);
border-radius: 5px;
.apply-wounds-btn {
padding: 6px 10px;
background: linear-gradient(to bottom, #5a5850 0%, #4b4a44 100%);
border: 1px solid #2b2a24;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
color: #f0f0e0;
cursor: pointer;
border-radius: 4px;
font-size: calc(var(--font-size-standard) * 0.85);
font-weight: 500;
text-align: center;
transition: all 0.2s ease;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 100%;
&:hover {
background: linear-gradient(to bottom, #6a6860 0%, #5a5850 100%);
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
transform: translateY(-1px);
border-color: #3b3a34;
}
&:active {
transform: translateY(0);
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
}
}
}
}
} }

View File

@@ -0,0 +1,37 @@
<div class="apply-damage-dialog">
<div class="dialog-content">
<div class="header">
<strong>{{targetName}}</strong>
-
{{weaponName}}
</div>
<div class="damage-summary">
<span class="label">{{localize
"LETHALFANTASY.Dialog.totalDamage"
}}:</span>
<span class="damage-value">{{damageTotal}}</span>
</div>
<div class="dr-summary">
<span>{{localize "LETHALFANTASY.Dialog.armorDR"}}: {{armorDR}}</span>
<span>{{localize "LETHALFANTASY.Dialog.shieldDR"}}: {{shieldDR}}</span>
<span class="total">DR: <strong>{{totalDR}}</strong></span>
</div>
<div class="damage-options">
<div class="option-line">
<span>{{localize "LETHALFANTASY.Dialog.noDR"}}</span>
<strong>{{damageNoDR}}</strong>
</div>
<div class="option-line">
<span>{{localize "LETHALFANTASY.Dialog.withArmor"}}</span>
<strong>{{damageWithArmor}}</strong>
</div>
<div class="option-line">
<span>{{localize "LETHALFANTASY.Dialog.withAll"}}</span>
<strong>{{damageWithAll}}</strong>
</div>
</div>
</div>
</div>

View File

@@ -1,97 +1,180 @@
<section class="tab character-{{tab.id}} {{tab.cssClass}}" data-tab="{{tab.id}}" data-group="{{tab.group}}"> <section
class="tab character-{{tab.id}} {{tab.cssClass}}"
data-tab="{{tab.id}}"
data-group="{{tab.group}}"
>
<div class="main-div"> <div class="main-div">
<fieldset> <fieldset>
<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">Class</span>
{{formInput systemFields.biodata.fields.class value=system.biodata.class }} {{formInput
</div> systemFields.biodata.fields.class
<div class="biodata-elem"> value=system.biodata.class
<span class="name">Level</span> }}
{{formInput systemFields.biodata.fields.level value=system.biodata.level }} </div>
</div> <div class="biodata-elem">
<div class="biodata-elem"> <span class="name">Level</span>
<span class="name">Mortal</span> {{formInput
{{formInput systemFields.biodata.fields.mortal value=system.biodata.mortal }} systemFields.biodata.fields.level
</div> value=system.biodata.level
<div class="biodata-elem"> }}
<span class="name">Alignment</span> </div>
{{formInput systemFields.biodata.fields.alignment value=system.biodata.alignment }} <div class="biodata-elem">
</div> <span class="name">Mortal</span>
<div class="biodata-elem"> {{formInput
<span class="name">Age</span> systemFields.biodata.fields.mortal
{{formInput systemFields.biodata.fields.age value=system.biodata.age }} value=system.biodata.mortal
</div> }}
<div class="biodata-elem"> </div>
<span class="name">Height</span> <div class="biodata-elem">
{{formInput systemFields.biodata.fields.height value=system.biodata.height }} <span class="name">Alignment</span>
</div> {{formInput
<div class="biodata-elem"> systemFields.biodata.fields.alignment
<span class="name">Weight</span> value=system.biodata.alignment
{{formInput systemFields.biodata.fields.weight value=system.biodata.weight }} }}
</div> </div>
<div class="biodata-elem"> <div class="biodata-elem">
<span class="name">Eyes</span> <span class="name">Age</span>
{{formInput systemFields.biodata.fields.eyes value=system.biodata.eyes }} {{formInput systemFields.biodata.fields.age value=system.biodata.age}}
</div> </div>
<div class="biodata-elem"> <div class="biodata-elem">
<span class="name">Hair</span> <span class="name">Height</span>
{{formInput systemFields.biodata.fields.hair value=system.biodata.hair }} {{formInput
</div> systemFields.biodata.fields.height
<div class="biodata-elem"> value=system.biodata.height
<span class="name">Dev. Points (Total)</span> }}
{{formInput systemFields.developmentPoints.fields.total value=system.developmentPoints.total }} </div>
</div> <div class="biodata-elem">
<div class="biodata-elem"> <span class="name">Weight</span>
<span class="name">Dev. Points (Rem.)</span> {{formInput
{{formInput systemFields.developmentPoints.fields.remaining value=system.developmentPoints.remaining }} systemFields.biodata.fields.weight
</div> value=system.biodata.weight
<div class="biodata-elem"> }}
<span class="name">Magic User</span> </div>
{{formInput systemFields.biodata.fields.magicUser value=system.biodata.magicUser }} <div class="biodata-elem">
</div> <span class="name">Eyes</span>
<div class="biodata-elem"> {{formInput
<span class="name">Cleric User</span> systemFields.biodata.fields.eyes
{{formInput systemFields.biodata.fields.clericUser value=system.biodata.clericUser }} value=system.biodata.eyes
</div> }}
<div class="biodata-elem"> </div>
<span class="name">Save bonus (1/5levels)</span> <div class="biodata-elem">
{{formInput systemFields.modifiers.fields.saveModifier value=system.modifiers.saveModifier disabled=true}} <span class="name">Hair</span>
</div> {{formInput
systemFields.biodata.fields.hair
value=system.biodata.hair
}}
</div>
<div class="biodata-elem">
<span class="name">Dev. Points (Total)</span>
{{formInput
systemFields.developmentPoints.fields.total
value=system.developmentPoints.total
}}
</div>
<div class="biodata-elem">
<span class="name">Dev. Points (Rem.)</span>
{{formInput
systemFields.developmentPoints.fields.remaining
value=system.developmentPoints.remaining
}}
</div>
<div class="biodata-elem">
<span class="name">Magic User</span>
{{formInput
systemFields.biodata.fields.magicUser
value=system.biodata.magicUser
}}
</div>
<div class="biodata-elem">
<span class="name">Cleric User</span>
{{formInput
systemFields.biodata.fields.clericUser
value=system.biodata.clericUser
}}
</div>
<div class="biodata-elem">
<span class="name">Save bonus (1/5levels)</span>
{{formInput
systemFields.modifiers.fields.saveModifier
value=system.modifiers.saveModifier
disabled=true
}}
</div>
{{#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">Spell bonus (1/5levels)</span>
{{formInput systemFields.modifiers.fields.levelSpellModifier value=system.modifiers.levelSpellModifier disabled=true}} {{formInput
</div> systemFields.modifiers.fields.levelSpellModifier
{{/if}} value=system.modifiers.levelSpellModifier
{{#if system.biodata.clericUser}} disabled=true
<div class="biodata-elem"> }}
<span class="name">Miracle bonus (1/5levels)</span> </div>
{{formInput systemFields.modifiers.fields.levelMiracleModifier value=system.modifiers.levelMiracleModifier disabled=true}} {{/if}}
</div> {{#if system.biodata.clericUser}}
{{/if}} <div class="biodata-elem">
<span class="name">Miracle bonus (1/5levels)</span>
{{formInput
systemFields.modifiers.fields.levelMiracleModifier
value=system.modifiers.levelMiracleModifier
disabled=true
}}
</div>
{{/if}}
<div class="biodata-elem"> <div class="biodata-elem">
<span class="name">Last HD roll</span> <span class="name">Last HD roll</span>
{{formInput systemFields.biodata.fields.hpPerLevel value=system.biodata.hpPerLevel disabled=true}} {{formInput
</div> systemFields.biodata.fields.hpPerLevel
value=system.biodata.hpPerLevel
disabled=isPlayMode
}}
</div>
<div class="biodata-elem">
<span class="name">Natural DR</span>
{{formInput
systemFields.biodata.fields.naturalDR
value=system.biodata.naturalDR
disabled=isPlayMode
}}
</div>
</div> <div class="biodata-elem">
</fieldset> <span class="name">Magical DR</span>
{{formInput
systemFields.biodata.fields.magicDR
value=system.biodata.magicDR
disabled=isPlayMode
}}
</div>
<fieldset> </fieldset>
<legend>{{localize "LETHALFANTASY.Label.description"}}</legend>
{{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description"
toggled=true}}
</fieldset>
<fieldset> <fieldset>
<legend>{{localize "LETHALFANTASY.Label.notes"}}</legend> <legend>{{localize "LETHALFANTASY.Label.description"}}</legend>
{{formInput systemFields.notes enriched=enrichedNotes value=system.notes name="system.notes" toggled=true}} {{formInput
</fieldset> systemFields.description
enriched=enrichedDescription
value=system.description
name="system.description"
toggled=true
}}
</fieldset>
<fieldset>
<legend>{{localize "LETHALFANTASY.Label.notes"}}</legend>
{{formInput
systemFields.notes
enriched=enrichedNotes
value=system.notes
name="system.notes"
toggled=true
}}
</fieldset>
</div> </div>
</section> </section>

View File

@@ -1,161 +1,165 @@
<section class="tab character-{{tab.id}} {{tab.cssClass}}" data-tab="combat" data-group="sheet"> <section class="tab character-{{tab.id}} {{tab.cssClass}}" data-tab="combat" data-group="sheet">
<div class="main-div"> <div class="main-div">
<fieldset> <fieldset>
<legend>{{localize "LETHALFANTASY.Label.combatDetails"}}</legend> <legend>{{localize "LETHALFANTASY.Label.combatDetails"}}</legend>
<div class="combat-details"> <div class="combat-details">
<div class="combat-detail"> <div class="combat-detail">
<button class="action" data-action="rangedAttackDefense"> <button class="action ranged-attack-button" data-action="rangedAttackDefense">
{{localize "LETHALFANTASY.Label.rangedAttackDefense"}} {{localize "LETHALFANTASY.Label.rangedAttackDefense"}}
</button> </button>
<button class="action" data-action="rollInitiative"> <button class="action ranged-attack-button" data-action="rollInitiative">
{{localize "LETHALFANTASY.Label.rollInitiative"}} {{localize "LETHALFANTASY.Label.rollInitiative"}}
</button> </button>
<div class="flexrow armor-hp">
<span class="name">{{localize "LETHALFANTASY.Label.armorHitPoints"}}</span>
{{formInput systemFields.combat.fields.armorHitPoints value=system.combat.armorHitPoints localize=true }}
<a data-action="armorHitPointsPlus"><i class="fa-solid fa-hexagon-plus"></i></a>
<a data-action="armorHitPointsMinus"><i class="fa-solid fa-hexagon-minus"></i></a>
</div>
<div class="flexrow granted">
<span class="">{{localize
"LETHALFANTASY.Label.grantedAttackDice"}}</a></span>
{{formInput systemFields.granted.fields.attackDice value=system.granted.attackDice disabled=isPlayMode }}
</div>
<div class="flexrow granted ">
<span class="">{{localize
"LETHALFANTASY.Label.grantedDefenseDice"}}</a></span>
{{formInput systemFields.granted.fields.defenseDice value=system.granted.defenseDice disabled=isPlayMode }}
</div>
<div class="flexrow granted">
<span class="">{{localize
"LETHALFANTASY.Label.grantedDamageDice"}}</a></span>
{{formInput systemFields.granted.fields.damageDice value=system.granted.damageDice disabled=isPlayMode }}
</div>
<div class="flexrow armor-hp">
<span class="name">{{localize "LETHALFANTASY.Label.armorHitPoints"}}</span>
{{formInput systemFields.combat.fields.armorHitPoints value=system.combat.armorHitPoints localize=true }}
<a data-action="armorHitPointsPlus"><i class="fa-solid fa-hexagon-plus"></i></a>
<a data-action="armorHitPointsMinus"><i class="fa-solid fa-hexagon-minus"></i></a>
</div> </div>
<div class="flexrow granted">
<span class=""><a class="rollable" data-roll-type="granted" data-roll-key="attackDice"><i
class="lf-roll-small fa-solid fa-dice-d20"></i>{{localize "LETHALFANTASY.Label.grantedAttackDice"}}</a></span>
{{formInput systemFields.granted.fields.attackDice value=system.granted.attackDice disabled=isPlayMode }}
</div>
<div class="flexrow granted ">
<span class=""><a class="rollable" data-roll-type="granted" data-roll-key="defenseDice"><i
class="lf-roll-small fa-solid fa-dice-d20"></i>{{localize "LETHALFANTASY.Label.grantedDefenseDice"}}</a></span>
{{formInput systemFields.granted.fields.defenseDice value=system.granted.defenseDice disabled=isPlayMode }}
</div>
<div class="flexrow granted">
<span class=""><a class="rollable" data-roll-type="granted" data-roll-key="damageDice"><i
class="lf-roll-small fa-solid fa-dice-d20"></i>{{localize "LETHALFANTASY.Label.grantedDamageDice"}}</a></span>
{{formInput systemFields.granted.fields.damageDice value=system.granted.damageDice disabled=isPlayMode }}
</div>
</div> </div>
</div> </fieldset>
</fieldset>
<fieldset> <fieldset>
<legend>{{localize "LETHALFANTASY.Label.wounds"}}</legend> <legend>{{localize "LETHALFANTASY.Label.wounds"}}</legend>
<div class="wounds"> <div class="wounds">
{{#each system.hp.wounds as |wound idx|}} {{#each system.hp.wounds as |wound idx|}}
<div class="wound"> <div class="wound">
Name:<input class="wound-description wound-data" type="text" data-type="String" data-index="{{@index}}" value="{{wound.description}}" data-name="description" > Name:<input class="wound-description wound-data" type="text" data-type="String" data-index="{{@index}}"
Duration:<input class="wound-duration wound-data" type="text" data-type="Number" data-index="{{@index}}" value="{{wound.duration}}" data-name="duration" > value="{{wound.description}}" data-name="description">
HP:<input class="wound-value wound-data" type="text" data-type="Number" data-index="{{@index}}" value="{{wound.value}}" data-name="value" > Duration:<input class="wound-duration wound-data" type="text" data-type="Number" data-index="{{@index}}"
value="{{wound.duration}}" data-name="duration">
HP:<input class="wound-value wound-data" type="text" data-type="Number" data-index="{{@index}}"
value="{{wound.value}}" data-name="value">
</div> </div>
{{/each}} {{/each}}
</div>
</fieldset>
<fieldset>
<legend>{{localize "LETHALFANTASY.Label.weapons"}}</legend>
<div class="weapons">
{{#each weapons as |item|}}
<div class="weapon" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-drag="true"
data-drag-type="damage">
{{#if (ne item.img "icons/svg/item-bag.svg")}}
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
{{/if}}
<div class="name">
{{item.name}}
</div>
<div class="attack-icons">
<a class="rollable" data-roll-type="weapon-attack" data-roll-key="{{item.id}}" data-tooltip="Roll Attack">
<i class="lf-roll-small fa-solid fa-swords" data-roll-type="weapon-attack" data-roll-key="{{item.id}}"></i>
</a>
<a class="rollable" data-roll-type="weapon-defense" data-roll-key="{{item.id}}" data-tooltip="Roll Defense">
<i class="fa-solid fa-shield-halved" data-roll-type="weapon-defense" data-roll-key="{{item.id}}"></i>
</a>
<a class="rollable" data-roll-type="weapon-damage-small" data-roll-key="{{item.id}}"
data-tooltip="Roll Damage (Small)">
<i class="fa-regular fa-face-head-bandage" data-roll-type="weapon-damage-small"
data-roll-key="{{item.id}}"></i>S
</a>
<a class="rollable" data-roll-type="weapon-damage-medium" data-roll-key="{{item.id}}"
data-tooltip="Roll Damage (Medium)">
<i class="fa-regular fa-face-head-bandage" data-roll-type="weapon-damage-medium"
data-roll-key="{{item.id}}"></i>M
</a>
</div>
<div class="controls">
<a data-tooltip="{{localize 'LETHALFANTASY.Edit'}}" data-action="edit" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'LETHALFANTASY.Delete'}}" data-action="delete" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
</div>
</div> </div>
{{/each}} </fieldset>
</div>
</fieldset>
<fieldset> <fieldset>
<legend>{{localize "LETHALFANTASY.Label.armors"}}</legend> <legend>{{localize "LETHALFANTASY.Label.weapons"}}</legend>
<div class="armors"> <div class="weapons">
{{#each armors as |item|}} {{#each weapons as |item|}}
<div class="armor" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}"> <div class="weapon" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-drag="true"
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" /> data-drag-type="damage">
<div class="name" data-tooltip="{{{item.system.description}}}"> {{#if (ne item.img "icons/svg/item-bag.svg")}}
{{item.name}} <img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
</div> {{/if}}
<div class="item-detail" data-tooltip="Defense">{{item.system.defense}}</div> <div class="name" data-tooltip="{{item.system.description}}">
<div class="item-detail" data-tooltip="Maximum movement">{{item.system.maximumMovement}}</div> {{item.name}}
<div class="item-detail" data-tooltip="HP">{{item.system.hp}}</div> </div>
<div class="item-detail" data-tooltip="Damage Reduction">{{item.system.damageReduction}}</div> <div class="attack-icons">
<div class="controls">
<a data-tooltip="{{localize 'LETHALFANTASY.Edit'}}" data-action="edit" data-item-id="{{item.id}}" <a class="rollable" data-roll-type="weapon-attack" data-roll-key="{{item.id}}" data-tooltip="Roll Attack">
data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a> <i class="lf-roll-small fa-solid fa-swords" data-roll-type="weapon-attack"
<a data-tooltip="{{localize 'LETHALFANTASY.Delete'}}" data-action="delete" data-item-id="{{item.id}}" data-roll-key="{{item.id}}"></i>
data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a> </a>
<a class="rollable" data-roll-type="weapon-defense" data-roll-key="{{item.id}}" data-tooltip="Roll Defense">
<i class="fa-solid fa-shield-halved" data-roll-type="weapon-defense" data-roll-key="{{item.id}}"></i>
</a>
<a class="rollable" data-roll-type="weapon-damage-small" data-roll-key="{{item.id}}"
data-tooltip="Roll Damage (Small)">
<i class="fa-regular fa-face-head-bandage" data-roll-type="weapon-damage-small"
data-roll-key="{{item.id}}"></i>S
</a>
<a class="rollable" data-roll-type="weapon-damage-medium" data-roll-key="{{item.id}}"
data-tooltip="Roll Damage (Medium)">
<i class="fa-regular fa-face-head-bandage" data-roll-type="weapon-damage-medium"
data-roll-key="{{item.id}}"></i>M
</a>
</div>
<div class="controls">
<a data-tooltip="{{localize 'LETHALFANTASY.Edit'}}" data-action="edit" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'LETHALFANTASY.Delete'}}" data-action="delete" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
</div>
</div> </div>
{{/each}}
</div> </div>
{{/each}} </fieldset>
</div>
</fieldset>
<fieldset> <fieldset>
<legend>{{localize "LETHALFANTASY.Label.shields"}}</legend> <legend>{{localize "LETHALFANTASY.Label.armors"}}</legend>
<div class="shields"> <div class="armors">
{{#each shields as |item|}} {{#each armors as |item|}}
<div class="shield" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}"> <div class="armor" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}">
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" /> <img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
<div class="name" data-tooltip="{{{item.system.description}}}"> <div class="name" data-tooltip="{{item.system.description}}">
{{item.name}} {{item.name}}
</div> </div>
<div class="item-detail" data-tooltip="Defense"> <div class="item-detail" data-tooltip="Defense">{{item.system.defense}}</div>
<a class="rollable" data-roll-type="shield-roll" data-roll-key="{{item.id}}" data-tooltip="Shield Defense"> <div class="item-detail" data-tooltip="Maximum movement">{{item.system.maximumMovement}}</div>
<i class="lf-roll-small fa-solid fa-shield" data-roll-type="shield-roll" data-roll-key="{{item.id}}"></i> <div class="item-detail" data-tooltip="HP">{{item.system.hp}}</div>
{{upperFirst item.system.defense}} <div class="item-detail" data-tooltip="Damage Reduction">{{item.system.damageReduction}}</div>
</a> <div class="item-detail" data-tooltip={{#if item.system.equipped}}"Equipped"{{else}}"Not Equipped"{{/if}}>{{#if item.system.equipped}}<i class="fas fa-check"></i>{{else}}<i class="fas fa-times"></i>{{/if}}</div>
<div class="controls">
</div> <a data-tooltip="{{localize 'LETHALFANTASY.Edit'}}" data-action="edit" data-item-id="{{item.id}}"
<div class="item-detail" data-tooltip="Movement reduction">{{item.system.movementreduction}}</div> data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
<div class="item-detail" data-tooltip="Has cover">{{#if item.system.hascover}}Cover{{/if}}</div> <a data-tooltip="{{localize 'LETHALFANTASY.Delete'}}" data-action="delete" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
<div class="controls"> </div>
<a data-tooltip="{{localize 'LETHALFANTASY.Edit'}}" data-action="edit" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'LETHALFANTASY.Delete'}}" data-action="delete" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
</div> </div>
{{/each}}
</div> </div>
{{/each}} </fieldset>
</div>
</fieldset>
<div>
<fieldset>
<legend>{{localize "LETHALFANTASY.Label.shields"}}</legend>
<div class="shields">
{{#each shields as |item|}}
<div class="shield" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}">
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
<div class="name" data-tooltip="{{item.system.description}}">
{{item.name}}
</div>
<div class="item-detail" data-tooltip="Defense">
<a class="rollable" data-roll-type="shield-roll" data-roll-key="{{item.id}}" data-tooltip="Shield Defense">
<i class="lf-roll-small fa-solid fa-shield" data-roll-type="shield-roll" data-roll-key="{{item.id}}"></i>
{{upperFirst item.system.defense}}
</a>
</div>
<div class="item-detail" data-tooltip="Movement reduction">{{item.system.movementreduction}}</div>
<div class="item-detail" data-tooltip="Has cover">{{#if item.system.hascover}}Cover{{/if}}</div>
<div class="item-detail" data-tooltip={{#if item.system.equipped}}"Equipped"{{else}}"Not Equipped"{{/if}}>{{#if item.system.equipped}}<i class="fas fa-check"></i>{{else}}<i class="fas fa-times"></i>{{/if}}</div>
<div class="controls">
<a data-tooltip="{{localize 'LETHALFANTASY.Edit'}}" data-action="edit" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'LETHALFANTASY.Delete'}}" data-action="delete" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
</fieldset>
</div>
</section> </section>

View File

@@ -1,4 +1,6 @@
<section class="character-main character-main-{{ifThen isPlayMode 'play' 'edit'}}"> <section
class="character-main character-main-{{ifThen isPlayMode 'play' 'edit'}}"
>
{{log "character-main" this}} {{log "character-main" this}}
<fieldset> <fieldset>
@@ -6,99 +8,189 @@
<div class="character-pc character-pc-{{ifThen isPlayMode 'play' 'edit'}}"> <div class="character-pc character-pc-{{ifThen isPlayMode 'play' 'edit'}}">
<div class="character-left"> <div class="character-left">
<div class="character-left-image"> <div class="character-left-image">
<img class="character-img" src="{{actor.img}}" data-edit="img" data-action="editImage" <img
data-tooltip="{{actor.name}}" /> class="character-img"
src="{{actor.img}}"
data-edit="img"
data-action="editImage"
data-tooltip="{{actor.name}}"
/>
</div> </div>
<fieldset class=""> <fieldset class="">
<div class="flexrow character-hp"> <div class="flexrow character-hp">
<span class="name">{{localize "LETHALFANTASY.Label.HP"}}</span> <span class="name">{{localize "LETHALFANTASY.Label.HP"}}</span>
{{formInput systemFields.hp.fields.value value=system.hp.value disabled=isPlayMode {{formInput
classes="character-hp-value"}} systemFields.hp.fields.value
value=system.hp.value
disabled=isPlayMode
classes="character-hp-value"
}}
&nbsp;/&nbsp; &nbsp;/&nbsp;
{{formInput systemFields.hp.fields.max value=system.hp.max disabled=isPlayMode {{formInput
classes="character-hp-value"}} systemFields.hp.fields.max
value=system.hp.max
disabled=isPlayMode
classes="character-hp-value"
}}
</div> </div>
<div class="flexrow character-hp"> <div class="flexrow character-hp">
<span class="name">{{localize "LETHALFANTASY.Label.grit"}}</span> <span class="name">{{localize "LETHALFANTASY.Label.grit"}}</span>
{{formInput systemFields.grit.fields.current value=system.grit.current disabled=isPlayMode {{formInput
classes="character-hp"}} systemFields.grit.fields.current
value=system.grit.current
disabled=isPlayMode
classes="character-hp"
}}
<span class="name">{{localize "LETHALFANTASY.Label.earned"}}</span> <span class="name">{{localize "LETHALFANTASY.Label.earned"}}</span>
{{formInput systemFields.grit.fields.earned value=system.grit.earned disabled=isPlayMode {{formInput
classes="character-hp"}} systemFields.grit.fields.earned
value=system.grit.earned
disabled=isPlayMode
classes="character-hp"
}}
</div> </div>
<div class="flexrow character-hp"> <div class="flexrow character-hp">
<span class="name">{{localize "LETHALFANTASY.Label.luck"}}</span> <span class="name">{{localize "LETHALFANTASY.Label.luck"}}</span>
{{formInput systemFields.luck.fields.current value=system.luck.current disabled=isPlayMode {{formInput
classes="character-hp"}} systemFields.luck.fields.current
value=system.luck.current
disabled=isPlayMode
classes="character-hp"
}}
<span class="name">{{localize "LETHALFANTASY.Label.earned"}}</span> <span class="name">{{localize "LETHALFANTASY.Label.earned"}}</span>
{{formInput systemFields.luck.fields.earned value=system.luck.earned disabled=isPlayMode {{formInput
classes="character-hp"}} systemFields.luck.fields.earned
value=system.luck.earned
disabled=isPlayMode
classes="character-hp"
}}
</div> </div>
<div class="flexrow "> <div class="flexrow">
<span class="">{{localize "LETHALFANTASY.Label.damageResistanceShort"}}</span> <span class="" data-tooltip="Damage reduction">{{localize
{{formInput systemFields.hp.fields.damageResistance value=system.hp.fields.damageResistance "LETHALFANTASY.Label.damageResistanceShort"
disabled=isPlayMode classes="character-hp"}} }}
</div> </span>
<input
type="text"
class="character-damage-reduction"
data-tooltip="DR (armor+natural+magical)"
disabled
value={{damageReduction}}
/>
<input
type="text"
class="character-damage-reduction"
data-tooltip="DR (shield)"
disabled
value={{damageReductionShield}}
/>
</div>
</fieldset> </fieldset>
</div> </div>
<div class="character-right"> <div class="character-right">
<div class="character-name"> <div class="character-name">
{{formInput fields.name value=source.name rootId=partId disabled=isPlayMode}} {{formInput
<a class="control" data-action="toggleSheet" data-tooltip="LETHALFANTASY.ToggleSheet" fields.name
data-tooltip-direction="UP"> value=source.name
rootId=partId
disabled=isPlayMode
}}
<a
class="control"
data-action="toggleSheet"
data-tooltip="LETHALFANTASY.ToggleSheet"
data-tooltip-direction="UP"
>
<i class="fa-solid fa-user-{{ifThen isPlayMode 'lock' 'pen'}}"></i> <i class="fa-solid fa-user-{{ifThen isPlayMode 'lock' 'pen'}}"></i>
</a> </a>
</div> </div>
<fieldset class="character-characteristics character-characteristics-{{ifThen isPlayMode 'play' 'edit'}}"> <fieldset
class="character-characteristics character-characteristics-{{ifThen
isPlayMode
'play'
'edit'
}}"
>
<legend>{{localize "LETHALFANTASY.Label.Saves"}}</legend> <legend>{{localize "LETHALFANTASY.Label.Saves"}}</legend>
<div class="character-saves"> <div class="character-saves">
<div class="character-save"> <div class="character-save">
<span class="name"><a class="rollable" data-roll-type="save" data-roll-key="will"><i <span class="name"><a
class="lf-roll-small fa-solid fa-dice-d20"></i> class="rollable"
data-roll-type="save"
data-roll-key="will"
><i class="lf-roll-small fa-solid fa-dice-d20"></i>
{{localize "LETHALFANTASY.Label.saves.will"}} {{localize "LETHALFANTASY.Label.saves.will"}}
</a></span> </a></span>
{{formField systemFields.saves.fields.will.fields.value value=system.saves.will.value disabled=true}} {{formField
systemFields.saves.fields.will.fields.value
value=system.saves.will.value
disabled=true
}}
<span class="name"> <span class="name">
<a class="rollable" data-roll-type="save" data-roll-key="dodge"><i <a
class="lf-roll-small fa-solid fa-dice-d20"></i> class="rollable"
data-roll-type="save"
data-roll-key="dodge"
><i class="lf-roll-small fa-solid fa-dice-d20"></i>
{{localize "LETHALFANTASY.Label.saves.dodge"}} {{localize "LETHALFANTASY.Label.saves.dodge"}}
</a> </a>
</span> </span>
{{formField systemFields.saves.fields.dodge.fields.value value=system.saves.dodge.value {{formField
disabled=true}} systemFields.saves.fields.dodge.fields.value
value=system.saves.dodge.value
disabled=true
}}
<span class="name"> <span class="name">
<a class="rollable" data-roll-type="save" data-roll-key="toughness"><i <a
class="lf-roll-small fa-solid fa-dice-d20"></i> class="rollable"
data-roll-type="save"
data-roll-key="toughness"
><i class="lf-roll-small fa-solid fa-dice-d20"></i>
{{localize "LETHALFANTASY.Label.saves.toughness"}} {{localize "LETHALFANTASY.Label.saves.toughness"}}
</a> </a>
</span> </span>
{{formField systemFields.saves.fields.toughness.fields.value value=system.saves.toughness.value {{formField
disabled=true}} systemFields.saves.fields.toughness.fields.value
value=system.saves.toughness.value
disabled=true
}}
</div> </div>
<div class="character-save"> <div class="character-save">
<span class="name"> <span class="name">
<a class="rollable" data-roll-type="save" data-roll-key="contagion"><i <a
class="lf-roll-small fa-solid fa-dice-d20"></i> class="rollable"
data-roll-type="save"
data-roll-key="contagion"
><i class="lf-roll-small fa-solid fa-dice-d20"></i>
{{localize "LETHALFANTASY.Label.saves.contagion"}} {{localize "LETHALFANTASY.Label.saves.contagion"}}
</a> </a>
</span> </span>
{{formField systemFields.saves.fields.contagion.fields.value value=system.saves.contagion.value {{formField
disabled=true}} systemFields.saves.fields.contagion.fields.value
value=system.saves.contagion.value
disabled=true
}}
<span class="name"> <span class="name">
<a class="rollable" data-roll-type="save" data-roll-key="poison"><i <a
class="lf-roll-small fa-solid fa-dice-d20"></i> class="rollable"
data-roll-type="save"
data-roll-key="poison"
><i class="lf-roll-small fa-solid fa-dice-d20"></i>
{{localize "LETHALFANTASY.Label.saves.poison"}} {{localize "LETHALFANTASY.Label.saves.poison"}}
</a> </a>
</span> </span>
{{formField systemFields.saves.fields.poison.fields.value value=system.saves.poison.value {{formField
disabled=true }} systemFields.saves.fields.poison.fields.value
value=system.saves.poison.value
disabled=true
}}
<!-- <!--
<span class="name-pain"> <span class="name-pain">
@@ -125,51 +217,124 @@
</div> </div>
</fieldset> </fieldset>
<fieldset class="character-characteristics character-characteristics-{{ifThen isPlayMode 'play' 'edit'}}"> <fieldset
class="character-characteristics character-characteristics-{{ifThen
isPlayMode
'play'
'edit'
}}"
>
<legend>{{localize "LETHALFANTASY.Label.Challenges"}}</legend> <legend>{{localize "LETHALFANTASY.Label.Challenges"}}</legend>
<div class="character-challenges"> <div class="character-challenges">
<div class="character-challenge"> <div class="character-challenge">
<span class="name"><a class="rollable" data-roll-type="challenge" data-roll-key="str"><i <span class="name"><a
class="lf-roll-small fa-solid fa-dice-d20"></i>{{localize class="rollable"
"LETHALFANTASY.Label.challenges.strength"}}</a></span> data-roll-type="challenge"
{{formField systemFields.challenges.fields.str.fields.value value=system.challenges.str.value data-roll-key="str"
disabled=true ><i class="lf-roll-small fa-solid fa-dice-d20"></i>{{localize
"LETHALFANTASY.Label.challenges.strength"
}}</a></span>
{{formField
systemFields.challenges.fields.str.fields.value
value=system.challenges.str.value
disabled=true
}} }}
<span class="name"><a class="rollable" data-roll-type="challenge" data-roll-key="agility"><i <span class="name"><a
class="lf-roll-small fa-solid fa-dice-d20"></i>{{localize class="rollable"
"LETHALFANTASY.Label.challenges.agility"}}</a></span> data-roll-type="challenge"
{{formField systemFields.challenges.fields.agility.fields.value value=system.challenges.agility.value data-roll-key="agility"
disabled=true ><i class="lf-roll-small fa-solid fa-dice-d20"></i>{{localize
"LETHALFANTASY.Label.challenges.agility"
}}</a></span>
{{formField
systemFields.challenges.fields.agility.fields.value
value=system.challenges.agility.value
disabled=true
}}
<span class="name"><a
class="rollable"
data-roll-type="challenge"
data-roll-key="dying"
><i class="lf-roll-small fa-solid fa-dice-d20"></i>{{localize
"LETHALFANTASY.Label.challenges.dying"
}}</a></span>
{{formField
systemFields.challenges.fields.dying.fields.value
value=system.challenges.dying.value
disabled=true
}} }}
<span class="name"><a class="rollable" data-roll-type="challenge" data-roll-key="dying"><i
class="lf-roll-small fa-solid fa-dice-d20"></i>{{localize
"LETHALFANTASY.Label.challenges.dying"}}</a></span>
{{formField systemFields.challenges.fields.dying.fields.value value=system.challenges.dying.value
disabled=true }}
</div> </div>
</div> </div>
</fieldset> </fieldset>
<fieldset class="character-characteristics character-characteristics-{{ifThen isPlayMode 'play' 'edit'}}"> <fieldset
class="character-characteristics character-characteristics-{{ifThen
isPlayMode
'play'
'edit'
}}"
>
<legend>{{localize "LETHALFANTASY.Label.Movement"}}</legend> <legend>{{localize "LETHALFANTASY.Label.Movement"}}</legend>
<div class="character-movements"> <div class="character-movements">
<div class="character-movement"> <div class="character-movement">
<span class="name">{{localize "LETHALFANTASY.Label.movement.walk"}}</span> <span class="name">{{localize
{{formField systemFields.movement.fields.walk value=system.movement.walk disabled=isPlayMode}} "LETHALFANTASY.Label.movement.walk"
<span class="name">{{localize "LETHALFANTASY.Label.movement.jog"}}</span> }}</span>
{{formField systemFields.movement.fields.jog value=system.movement.jog disabled=isPlayMode}} {{formField
<span class="name">{{localize "LETHALFANTASY.Label.movement.run"}}</span> systemFields.movement.fields.walk
{{formField systemFields.movement.fields.run value=system.movement.run disabled=isPlayMode}} value=system.movement.walk
<span class="name">{{localize "LETHALFANTASY.Label.movement.sprint"}}</span> disabled=isPlayMode
{{formField systemFields.movement.fields.sprint value=system.movement.sprint disabled=isPlayMode}} }}
<span class="name">{{localize
"LETHALFANTASY.Label.movement.jog"
}}</span>
{{formField
systemFields.movement.fields.jog
value=system.movement.jog
disabled=isPlayMode
}}
<span class="name">{{localize
"LETHALFANTASY.Label.movement.run"
}}</span>
{{formField
systemFields.movement.fields.run
value=system.movement.run
disabled=isPlayMode
}}
<span class="name">{{localize
"LETHALFANTASY.Label.movement.sprint"
}}</span>
{{formField
systemFields.movement.fields.sprint
value=system.movement.sprint
disabled=isPlayMode
}}
</div> </div>
<div class="character-movement"> <div class="character-movement">
<span class="name">{{localize "LETHALFANTASY.Label.movement.jumpBroad"}}</span> <span class="name">{{localize
{{formField systemFields.jump.fields.broad value=system.jump.broad disabled=isPlayMode}} "LETHALFANTASY.Label.movement.jumpBroad"
<span class="name">{{localize "LETHALFANTASY.Label.movement.jumpRunning"}}</span> }}</span>
{{formField systemFields.jump.fields.running value=system.jump.running disabled=isPlayMode}} {{formField
<span class="name">{{localize "LETHALFANTASY.Label.movement.jumpVertical"}}</span> systemFields.jump.fields.broad
{{formField systemFields.jump.fields.vertical value=system.jump.vertical disabled=isPlayMode}} value=system.jump.broad
disabled=isPlayMode
}}
<span class="name">{{localize
"LETHALFANTASY.Label.movement.jumpRunning"
}}</span>
{{formField
systemFields.jump.fields.running
value=system.jump.running
disabled=isPlayMode
}}
<span class="name">{{localize
"LETHALFANTASY.Label.movement.jumpVertical"
}}</span>
{{formField
systemFields.jump.fields.vertical
value=system.jump.vertical
disabled=isPlayMode
}}
</div> </div>
</div> </div>
</fieldset> </fieldset>
@@ -178,62 +343,124 @@
</div> </div>
</fieldset> </fieldset>
<fieldset class="character-characteristics character-characteristics-{{ifThen isPlayMode 'play' 'edit'}}"> <fieldset
class="character-characteristics character-characteristics-{{ifThen
isPlayMode
'play'
'edit'
}}"
>
<legend>{{localize "LETHALFANTASY.Label.characteristics"}}</legend> <legend>{{localize "LETHALFANTASY.Label.characteristics"}}</legend>
<div class="character-characteristic"> <div class="character-characteristic">
<span>{{localize "LETHALFANTASY.Label.str"}}</span> <span>{{localize "LETHALFANTASY.Label.str"}}</span>
{{formField systemFields.characteristics.fields.str.fields.value value=system.characteristics.str.value {{formField
disabled=isPlayMode data-char-id="str" }} systemFields.characteristics.fields.str.fields.value
{{formField systemFields.characteristics.fields.str.fields.percent value=system.characteristics.str.percent value=system.characteristics.str.value
disabled=isPlayMode type="number"}} disabled=isPlayMode
data-char-id="str"
}}
{{formField
systemFields.characteristics.fields.str.fields.percent
value=system.characteristics.str.percent
disabled=isPlayMode
type="number"
}}
</div> </div>
<div class="character-characteristic"> <div class="character-characteristic">
<span>{{localize "LETHALFANTASY.Label.int"}}</span> <span>{{localize "LETHALFANTASY.Label.int"}}</span>
{{formField systemFields.characteristics.fields.int.fields.value value=system.characteristics.int.value {{formField
disabled=isPlayMode data-char-id="int" }} systemFields.characteristics.fields.int.fields.value
value=system.characteristics.int.value
disabled=isPlayMode
data-char-id="int"
}}
{{formField systemFields.characteristics.fields.int.fields.percent value=system.characteristics.int.percent {{formField
disabled=isPlayMode type="number" }} systemFields.characteristics.fields.int.fields.percent
value=system.characteristics.int.percent
disabled=isPlayMode
type="number"
}}
</div> </div>
<div class="character-characteristic"> <div class="character-characteristic">
<span>{{localize "LETHALFANTASY.Label.wis"}}</span> <span>{{localize "LETHALFANTASY.Label.wis"}}</span>
{{formField systemFields.characteristics.fields.wis.fields.value value=system.characteristics.wis.value {{formField
disabled=isPlayMode data-char-id="wis" }} systemFields.characteristics.fields.wis.fields.value
value=system.characteristics.wis.value
disabled=isPlayMode
data-char-id="wis"
}}
{{formField systemFields.characteristics.fields.wis.fields.percent value=system.characteristics.wis.percent {{formField
disabled=isPlayMode type="number"}} systemFields.characteristics.fields.wis.fields.percent
value=system.characteristics.wis.percent
disabled=isPlayMode
type="number"
}}
</div> </div>
<div class="character-characteristic"> <div class="character-characteristic">
<span>{{localize "LETHALFANTASY.Label.dex"}}</span> <span>{{localize "LETHALFANTASY.Label.dex"}}</span>
{{formField systemFields.characteristics.fields.dex.fields.value value=system.characteristics.dex.value {{formField
disabled=isPlayMode data-char-id="wis" }} systemFields.characteristics.fields.dex.fields.value
value=system.characteristics.dex.value
disabled=isPlayMode
data-char-id="wis"
}}
{{formField systemFields.characteristics.fields.dex.fields.percent value=system.characteristics.dex.percent {{formField
disabled=isPlayMode type="number" }} systemFields.characteristics.fields.dex.fields.percent
value=system.characteristics.dex.percent
disabled=isPlayMode
type="number"
}}
</div> </div>
<div class="character-characteristic"> <div class="character-characteristic">
<span>{{localize "LETHALFANTASY.Label.con"}}</span> <span>{{localize "LETHALFANTASY.Label.con"}}</span>
{{formField systemFields.characteristics.fields.con.fields.value value=system.characteristics.con.value {{formField
disabled=isPlayMode data-char-id="con" }} systemFields.characteristics.fields.con.fields.value
value=system.characteristics.con.value
disabled=isPlayMode
data-char-id="con"
}}
{{formField systemFields.characteristics.fields.con.fields.percent value=system.characteristics.con.percent {{formField
disabled=isPlayMode type="number"}} systemFields.characteristics.fields.con.fields.percent
value=system.characteristics.con.percent
disabled=isPlayMode
type="number"
}}
</div> </div>
<div class="character-characteristic"> <div class="character-characteristic">
<span>{{localize "LETHALFANTASY.Label.cha"}}</span> <span>{{localize "LETHALFANTASY.Label.cha"}}</span>
{{formField systemFields.characteristics.fields.cha.fields.value value=system.characteristics.cha.value {{formField
disabled=isPlayMode data-char-id="cha" }} systemFields.characteristics.fields.cha.fields.value
value=system.characteristics.cha.value
disabled=isPlayMode
data-char-id="cha"
}}
{{formField systemFields.characteristics.fields.cha.fields.percent value=system.characteristics.cha.percent {{formField
disabled=isPlayMode type="number"}} systemFields.characteristics.fields.cha.fields.percent
value=system.characteristics.cha.percent
disabled=isPlayMode
type="number"
}}
</div> </div>
<div class="character-characteristic"> <div class="character-characteristic">
<span>{{localize "LETHALFANTASY.Label.luc"}}</span> <span>{{localize "LETHALFANTASY.Label.luc"}}</span>
{{formField systemFields.characteristics.fields.luc.fields.value value=system.characteristics.luc.value {{formField
disabled=isPlayMode data-char-id="luc" }} systemFields.characteristics.fields.luc.fields.value
value=system.characteristics.luc.value
disabled=isPlayMode
data-char-id="luc"
}}
{{formField systemFields.characteristics.fields.luc.fields.percent value=system.characteristics.luc.percent {{formField
disabled=isPlayMode type="number"}} systemFields.characteristics.fields.luc.fields.percent
value=system.characteristics.luc.percent
disabled=isPlayMode
type="number"
}}
</div> </div>
</fieldset> </fieldset>

View File

@@ -1,52 +1,52 @@
<section class="tab character-{{tab.id}} {{tab.cssClass}}" data-tab="{{tab.id}}" data-group="{{tab.group}}"> <section class="tab character-{{tab.id}} {{tab.cssClass}}" data-tab="{{tab.id}}" data-group="{{tab.group}}">
<div class="main-div"> <div class="main-div">
<fieldset> <fieldset>
<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>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>Max</span>
{{formField systemFields.divinityPoints.fields.max value=system.divinityPoints.max localize=true disabled=isPlayMode}} {{formField systemFields.divinityPoints.fields.max value=system.divinityPoints.max localize=true
disabled=isPlayMode}}
</div> </div>
</div> </div>
</div> </fieldset>
</fieldset>
<fieldset> <fieldset>
<legend>{{localize "LETHALFANTASY.Label.miracles"}}{{#if isEditMode}}<a class="action" data-tooltip="{{localize " <legend>{{localize "LETHALFANTASY.Label.miracles"}}{{#if isEditMode}}<a class="action" data-tooltip="{{localize "
LETHALFANTASY.Tooltip.addMiracle"}}" data-tooltip-direction="UP"><i class="fas fa-plus" LETHALFANTASY.Tooltip.addMiracle"}}" data-tooltip-direction="UP"><i class="fas fa-plus"
data-action="createMiracle"></i></a>{{/if}}</legend> data-action="createMiracle"></i></a>{{/if}}</legend>
<div class="miracles"> <div class="miracles">
{{#each miracles as |item|}} {{#each miracles as |item|}}
<div class="miracle" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-drag="true" > <div class="miracle" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-drag="true">
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" /> <img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
<div class="name" > <div class="name">
{{item.name}} {{item.name}}
</div> </div>
<a class="rollable" data-roll-type="miracle-attack" data-roll-key="{{item.id}}" data-tooltip="Miracle Attack"> <a class="rollable" data-roll-type="miracle-attack" data-roll-key="{{item.id}}" data-tooltip="Miracle Attack">
<i class="lf-roll-small fa-solid fa-swords" data-roll-type="miracle-attack" data-roll-key="{{item.id}}"></i> <i class="lf-roll-small fa-solid fa-swords" data-roll-type="miracle-attack" data-roll-key="{{item.id}}"></i>
</a> </a>
<a class="rollable" data-roll-type="miracle-power" data-roll-key="{{item.id}}" data-tooltip="Miracle Power"> <a class="rollable" data-roll-type="miracle-power" data-roll-key="{{item.id}}" data-tooltip="Miracle Power">
<i class="fa-duotone fa-solid fa-stars" data-roll-type="miracle-power" data-roll-key="{{item.id}}"></i> <i class="fa-duotone fa-solid fa-stars" data-roll-type="miracle-power" data-roll-key="{{item.id}}"></i>
</a> </a>
<div class="controls"> <div class="controls">
<a data-tooltip="{{localize 'LETHALFANTASY.Edit'}}" data-action="edit" data-item-id="{{item.id}}" <a data-tooltip="{{localize 'LETHALFANTASY.Edit'}}" data-action="edit" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a> data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'LETHALFANTASY.Delete'}}" data-action="delete" data-item-id="{{item.id}}" <a data-tooltip="{{localize 'LETHALFANTASY.Delete'}}" data-action="delete" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a> data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
</div>
</div> </div>
{{/each}}
</div> </div>
{{/each}} </fieldset>
</div> </div>
</fieldset>
</div>
</section> </section>

View File

@@ -1,73 +1,145 @@
<section class="tab character-{{tab.id}} {{tab.cssClass}}" data-tab="skills" data-group="sheet"> <section
class="tab character-{{tab.id}} {{tab.cssClass}}"
data-tab="skills"
data-group="sheet"
>
<div class="main-div"> <div class="main-div">
<fieldset> {{#each skillsByCategory as |categoryData|}}
<legend data-tooltip="{{localize " LETHALFANTASY.Tooltip.skills"}}" data-tooltip-direction="UP">{{localize <fieldset>
"LETHALFANTASY.Label.skills"}}</legend> <legend
<div class="skills"> data-tooltip="{{localize ' LETHALFANTASY.Tooltip.skills'}}"
{{#each skills as |item|}} data-tooltip-direction="UP"
<div class="skill " data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}"> >{{localize categoryData.label}}</legend>
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" /> <div class="skills">
<div class="name"> {{#each categoryData.skills as |item|}}
<a class="rollable" data-roll-type="skill" data-roll-key="{{item.id}}"> <div
<i class="lf-roll-small fa-duotone fa-solid fa-dice-d10"></i> class="skill"
{{item.name}} data-item-id="{{item.id}}"
</a> data-item-uuid="{{item.uuid}}"
>
<img
class="item-img"
src="{{item.img}}"
data-tooltip="{{item.name}}"
/>
<div class="name">
<a
class="rollable"
data-roll-type="skill"
data-roll-key="{{item.id}}"
>
<i class="lf-roll-small fa-duotone fa-solid fa-dice-d10"></i>
{{item.name}}
</a>
</div>
<div class="score">
+{{item.system.skillTotal}}
</div>
<div class="controls">
<a
data-tooltip="{{localize 'LETHALFANTASY.Edit'}}"
data-action="edit"
data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"
><i class="fas fa-edit"></i></a>
<a
data-tooltip="{{localize 'LETHALFANTASY.Delete'}}"
data-action="delete"
data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"
><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div> </div>
<div class="score"> </fieldset>
+{{item.system.skillTotal}} {{/each}}
</div>
<div class="controls">
<a data-tooltip="{{localize 'LETHALFANTASY.Edit'}}" data-action="edit" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'LETHALFANTASY.Delete'}}" data-action="delete" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
</fieldset>
<fieldset> <fieldset>
<legend data-tooltip="{{localize " LETHALFANTASY.Tooltip.gifts"}}" data-tooltip-direction="UP">{{localize <legend
"LETHALFANTASY.Label.gifts"}}</legend> data-tooltip="{{localize ' LETHALFANTASY.Tooltip.gifts'}}"
<div class="gifts"> data-tooltip-direction="UP"
{{#each gifts as |item|}} >{{localize "LETHALFANTASY.Label.gifts"}}</legend>
<div class="gift " data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}"> <div class="gifts">
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" /> {{#each gifts as |item|}}
<div class="name" data-tooltip="{{{item.description}}}<br><br>{{item.path}}" data-tooltip-direction="UP"> <div
{{item.name}} class="gift"
</div> data-item-id="{{item.id}}"
<div class="controls"> data-item-uuid="{{item.uuid}}"
<a data-tooltip="{{localize 'LETHALFANTASY.Edit'}}" data-action="edit" data-item-id="{{item.id}}" >
data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a> <img
<a data-tooltip="{{localize 'LETHALFANTASY.Delete'}}" data-action="delete" data-item-id="{{item.id}}" class="item-img"
data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a> src="{{item.img}}"
</div> data-tooltip="{{item.name}}"
/>
<div
class="name"
data-tooltip="{{{item.description}}}<br><br>{{item.path}}"
data-tooltip-direction="UP"
>
{{item.name}}
</div>
<div class="controls">
<a
data-tooltip="{{localize 'LETHALFANTASY.Edit'}}"
data-action="edit"
data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"
><i class="fas fa-edit"></i></a>
<a
data-tooltip="{{localize 'LETHALFANTASY.Delete'}}"
data-action="delete"
data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"
><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div> </div>
{{/each}} </fieldset>
</div>
</fieldset>
<fieldset> <fieldset>
<legend data-tooltip="{{localize " LETHALFANTASY.Tooltip.vulnerabilities"}}" data-tooltip-direction="UP">{{localize <legend
"LETHALFANTASY.Label.vulnerabilities"}}</legend> data-tooltip="{{localize ' LETHALFANTASY.Tooltip.vulnerabilities'}}"
<div class="vulnerabilities"> data-tooltip-direction="UP"
{{#each vulnerabilities as |item|}} >{{localize "LETHALFANTASY.Label.vulnerabilities"}}</legend>
<div class="vulnerability " data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}"> <div class="vulnerabilities">
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" /> {{#each vulnerabilities as |item|}}
<div class="name" data-tooltip="{{{item.description}}}<br><br>{{item.path}}" data-tooltip-direction="UP"> <div
{{item.name}} class="vulnerability"
</div> data-item-id="{{item.id}}"
<div class="controls"> data-item-uuid="{{item.uuid}}"
<a data-tooltip="{{localize 'LETHALFANTASY.Edit'}}" data-action="edit" data-item-id="{{item.id}}" >
data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a> <img
<a data-tooltip="{{localize 'LETHALFANTASY.Delete'}}" data-action="delete" data-item-id="{{item.id}}" class="item-img"
data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a> src="{{item.img}}"
</div> data-tooltip="{{item.name}}"
/>
<div
class="name"
data-tooltip="{{{item.description}}}<br><br>{{item.path}}"
data-tooltip-direction="UP"
>
{{item.name}}
</div>
<div class="controls">
<a
data-tooltip="{{localize 'LETHALFANTASY.Edit'}}"
data-action="edit"
data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"
><i class="fas fa-edit"></i></a>
<a
data-tooltip="{{localize 'LETHALFANTASY.Delete'}}"
data-action="delete"
data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"
><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div> </div>
{{/each}} </fieldset>
</div> </div>
</fieldset>
</div>
</section> </section>

View File

@@ -15,38 +15,37 @@
disabled=isPlayMode}} disabled=isPlayMode}}
</div> </div>
</div> </div>
</div> </fieldset>
</fieldset>
<fieldset> <fieldset>
<legend>{{localize "LETHALFANTASY.Label.spells"}}{{#if isEditMode}}<a class="action" data-tooltip="{{localize " <legend>{{localize "LETHALFANTASY.Label.spells"}}{{#if isEditMode}}<a class="action" data-tooltip="{{localize "
LETHALFANTASY.Tooltip.addSpell"}}" data-tooltip-direction="UP"><i class="fas fa-plus" LETHALFANTASY.Tooltip.addSpell"}}" data-tooltip-direction="UP"><i class="fas fa-plus"
data-action="createSpell"></i></a>{{/if}}</legend> data-action="createSpell"></i></a>{{/if}}</legend>
<div class="spells"> <div class="spells">
{{#each spells as |item|}} {{#each spells as |item|}}
<div class="spell" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-drag="true"> <div class="spell" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-drag="true">
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" /> <img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
<div class="name"> <div class="name">
{{item.name}} {{item.name}}
</div> </div>
<a class="rollable" data-roll-type="spell-attack" data-roll-key="{{item.id}}" data-tooltip="Spell Attack"> <a class="rollable" data-roll-type="spell-attack" data-roll-key="{{item.id}}" data-tooltip="Spell Attack">
<i class="lf-roll-small fa-solid fa-swords" data-roll-type="spell-attack" data-roll-key="{{item.id}}"></i> <i class="lf-roll-small fa-solid fa-swords" data-roll-type="spell-attack" data-roll-key="{{item.id}}"></i>
</a> </a>
<a class="rollable" data-roll-type="spell-power" data-roll-key="{{item.id}}" data-tooltip="Spell Power"> <a class="rollable" data-roll-type="spell-power" data-roll-key="{{item.id}}" data-tooltip="Spell Power">
<i class="fa-duotone fa-solid fa-stars" data-roll-type="spell-power" data-roll-key="{{item.id}}"></i> <i class="fa-duotone fa-solid fa-stars" data-roll-type="spell-power" data-roll-key="{{item.id}}"></i>
</a> </a>
<div class="controls"> <div class="controls">
<a data-tooltip="{{localize 'LETHALFANTASY.Edit'}}" data-action="edit" data-item-id="{{item.id}}" <a data-tooltip="{{localize 'LETHALFANTASY.Edit'}}" data-action="edit" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a> data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'LETHALFANTASY.Delete'}}" data-action="delete" data-item-id="{{item.id}}" <a data-tooltip="{{localize 'LETHALFANTASY.Delete'}}" data-action="delete" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a> data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
</div>
</div> </div>
{{/each}}
</div> </div>
{{/each}} </fieldset>
</div>
</fieldset>
</div> </div>
</section> </section>

View File

@@ -1,4 +1,5 @@
{{!log 'chat-message' this}} {{!log 'chat-message' this}}
{{!log 'weaponDamageOptions' weaponDamageOptions}}
<div class="{{cssClass}}"> <div class="{{cssClass}}">
<div class="intro-chat"> <div class="intro-chat">
<div class="intro-img"> <div class="intro-img">
@@ -6,67 +7,187 @@
</div> </div>
<div class="intro-right"> <div class="intro-right">
<span>{{actingCharName}} - {{upperFirst rollName}}</span> <span><STRONG>{{actingCharName}} - {{upperFirst rollName}}</STRONG></span>
{{#if (match rollType "attack")}} {{#if (match rollType "attack")}}
<span>Attack roll !</span> <span>Attack roll !</span>
{{/if}} {{/if}}
{{#if (match rollType "defense")}} {{#if (match rollType "defense")}}
<span>Defense roll !</span> <span>Defense roll !</span>
{{/if}} {{/if}}
{{#if (eq rollData.favor "favor")}}
<span><strong>Favor roll</strong></span>
{{/if}}
{{#if (eq rollData.favor "disfavor")}}
<span><strong>Disfavor roll</strong></span>
{{/if}}
{{#if badResult}} {{#if badResult}}
<span>{{localize "LETHALFANTASY.Label.otherResult"}} : {{badResult}}</span> <span><strong>{{localize "LETHALFANTASY.Label.otherResult"}}</strong>
:
{{badResult}}</span>
{{/if}} {{/if}}
{{#if rollTarget.weapon}} {{#if rollTarget.weapon}}
<span>{{rollTarget.weapon.name}}</span> <span>{{rollTarget.weapon.name}}</span>
{{/if}} {{/if}}
<span>Formula : {{titleFormula}}</span> {{#if rollData.isDamage}}
<span><strong>Damage Roll</strong></span>
{{/if}}
{{#if rollData.damageSmall}}
<span><strong>{{localize
"LETHALFANTASY.Label.weapon-damage-small"
}}</strong></span>
{{/if}}
{{#if rollData.damageMedium}}
<span><strong>{{localize
"LETHALFANTASY.Label.weapon-damage-medium"
}}</strong></span>
{{/if}}
{{#if rollData.letItFly}}
<span>Let It Fly attack ! </span>
{{/if}}
{{#if rollData.pointBlank}}
<span>Point Blank Range Attack !</span>
{{/if}}
{{#if rollData.beyondSkill}}
<span>Beyond Skill Range Attack !</span>
{{/if}}
<span><strong>Formula</strong> : {{titleFormula}}</span>
{{#each diceResults as |result|}} {{#each diceResults as |result|}}
<span>{{result.dice}} : {{result.value}}</span> <span>{{result.dice}} : {{result.value}}</span>
{{/each}} {{/each}}
</div> </div>
</div> </div>
{{#if isSave}} {{#if isSave}}
<div class="result"> <div class="result">
{{#if (eq resultType "success")}} {{#if (eq resultType "success")}}
{{#if isPrivate}}?{{else}}{{localize "LETHALFANTASY.Roll.success"}}{{/if}} {{#if isPrivate}}?{{else}}{{localize
{{else}} "LETHALFANTASY.Roll.success"
{{#if isPrivate}}?{{else}}{{localize "LETHALFANTASY.Roll.failure"}}{{/if}} }}{{/if}}
{{/if}} {{else}}
</div> {{#if isPrivate}}?{{else}}{{localize
"LETHALFANTASY.Roll.failure"
}}{{/if}}
{{/if}}
</div>
{{/if}} {{/if}}
{{#if isResource}} {{#if isResource}}
<div class="result"> <div class="result">
{{#if (eq resultType "success")}} {{#if (eq resultType "success")}}
{{#if isPrivate}}?{{else}}{{localize "LETHALFANTASY.Roll.success"}}{{/if}} {{#if isPrivate}}?{{else}}{{localize
{{else}} "LETHALFANTASY.Roll.success"
{{#if isPrivate}}?{{else}}{{localize "LETHALFANTASY.Roll.failure"}}{{#if isFailure}} ({{localize }}{{/if}}
"LETHALFANTASY.Roll.resourceLost"}}){{/if}}{{/if}} {{else}}
{{/if}} {{#if isPrivate}}?{{else}}{{localize "LETHALFANTASY.Roll.failure"}}{{#if
</div> isFailure
}} ({{localize "LETHALFANTASY.Roll.resourceLost"}}){{/if}}{{/if}}
{{/if}}
</div>
{{/if}} {{/if}}
{{#if isDamage}} {{#if isDamage}}
<div> <div>
{{#if (and isGM hasTarget)}} {{#if (and isGM hasTarget)}}
{{{localize "LETHALFANTASY.Roll.displayArmor" targetName=targetName targetArmor=targetArmor realDamage=realDamage}}} {{{localize
{{/if}} "LETHALFANTASY.Roll.displayArmor"
</div> targetName=targetName
targetArmor=targetArmor
realDamage=realDamage
}}}
{{/if}}
</div>
{{/if}} {{/if}}
{{#unless isPrivate}} {{#unless isPrivate}}
<div class="dice-result"> <div class="dice-result">
<h4 class="dice-total">{{total}}</h4> <h4 class="dice-total">{{total}}</h4>
</div> </div>
{{#if D30result}} {{#if D30result}}
<div class="dice-result"> <div class="dice-result">
<h4 class="dice-total">D30 result: {{D30result}}</h4> <h4 class="dice-total">D30 result: {{D30result}}</h4>
</div> </div>
{{/if}} {{/if}}
{{/unless}} {{/unless}}
{{#if weaponDamageOptions}}
<div class="damage-buttons">
<div class="damage-buttons-title">{{localize
"LETHALFANTASY.Label.rollDamage"
}}</div>
<div class="damage-buttons-grid {{#if weaponDamageOptions.isMonster}}monster-damage{{/if}}">
{{#if weaponDamageOptions.isMonster}}
<button
class="damage-roll-btn"
data-weapon-id="{{weaponDamageOptions.weaponId}}"
data-damage-type="monster"
data-damage-formula="{{weaponDamageOptions.damageFormula}}"
data-damage-modifier="{{weaponDamageOptions.damageModifier}}"
data-is-monster="true"
title="{{weaponDamageOptions.weaponName}}"
>
<i class="fa-solid fa-dice"></i>
Damage:
{{weaponDamageOptions.damageFormula}}{{#if
weaponDamageOptions.damageModifier
}}+{{weaponDamageOptions.damageModifier}}{{/if}}
</button>
{{else}}
{{#if weaponDamageOptions.damageS}}
<button
class="damage-roll-btn"
data-weapon-id="{{weaponDamageOptions.weaponId}}"
data-damage-type="small"
data-damage-formula="{{weaponDamageOptions.damageS}}"
data-is-monster="false"
title="{{localize 'LETHALFANTASY.Label.weapon-damage-small'}}"
>
<i class="fa-solid fa-dice-d6"></i>
{{localize "LETHALFANTASY.Label.weapon-damage-small"}}
</button>
{{/if}}
{{#if weaponDamageOptions.damageM}}
<button
class="damage-roll-btn"
data-weapon-id="{{weaponDamageOptions.weaponId}}"
data-damage-type="medium"
data-damage-formula="{{weaponDamageOptions.damageM}}"
data-is-monster="false"
title="{{localize 'LETHALFANTASY.Label.weapon-damage-medium'}}"
>
<i class="fa-solid fa-dice-d20"></i>
{{localize "LETHALFANTASY.Label.weapon-damage-medium"}}
</button>
{{/if}}
{{/if}}
</div>
</div>
{{/if}}
{{#if rollData.isDamage}}
<div class="damage-result">
<ul>
<li class="li-apply-wounds">
<div>{{localize "LETHALFANTASY.Label.applyDamage"}}</div>
<div class="combatants-grid">
{{#each combatants}}
<button
class="apply-wounds-btn"
data-combatant-id="{{this.id}}"
title="{{this.name}}"
>
{{this.name}}
</button>
{{/each}}
</div>
</li>
</ul>
</div>
{{/if}}
</div> </div>

View File

@@ -6,79 +6,177 @@
<div class="monster-pc monster-pc-{{ifThen isPlayMode 'play' 'edit'}}"> <div class="monster-pc monster-pc-{{ifThen isPlayMode 'play' 'edit'}}">
<div class="monster-left"> <div class="monster-left">
<div class="monster-left-image"> <div class="monster-left-image">
<img class="monster-img" src="{{actor.img}}" data-edit="img" data-action="editImage" <img
data-tooltip="{{actor.name}}" /> class="monster-img"
src="{{actor.img}}"
data-edit="img"
data-action="editImage"
data-tooltip="{{actor.name}}"
/>
</div> </div>
<fieldset class="monster-characteristics monster-characteristics-{{ifThen isPlayMode 'play' 'edit'}}"> <fieldset
class="monster-characteristics monster-characteristics-{{ifThen
isPlayMode
'play'
'edit'
}}"
>
<div class="flexrow monster-hp"> <div class="flexrow monster-hp">
<span class="name">{{localize "LETHALFANTASY.Label.HP"}}</span> <span class="name">{{localize "LETHALFANTASY.Label.HP"}}</span>
{{formInput systemFields.hp.fields.value value=system.hp.value disabled=isPlayMode classes="monster-hp-value"}} {{formInput
systemFields.hp.fields.value
value=system.hp.value
disabled=isPlayMode
classes="monster-hp-value"
}}
&nbsp;/&nbsp; &nbsp;/&nbsp;
{{formInput systemFields.hp.fields.max value=system.hp.max disabled=isPlayMode classes="monster-hp-value"}} {{formInput
systemFields.hp.fields.max
value=system.hp.max
disabled=isPlayMode
classes="monster-hp-value"
}}
</div> </div>
<div class="flexrow monster-hp"> <div class="flexrow monster-hp">
<span class="damage-resistance">{{localize "LETHALFANTASY.Label.damageResistance"}}</span> <span class="name">{{localize
{{formInput systemFields.hp.fields.damageResistance value=system.hp.damageResistance disabled=isPlayMode classes="monster-hp-value"}} "LETHALFANTASY.Label.damageResistance"
}}</span>
{{formInput
systemFields.hp.fields.damageResistance
value=system.hp.damageResistance
disabled=isPlayMode
classes="monster-hp-value"
}}
<span class="name">{{localize
"LETHALFANTASY.Label.shieldDamageReduction"
}}</span>
{{formInput
systemFields.combat.fields.shieldDamageReduction
value=system.combat.shieldDamageReduction
disabled=isPlayMode
classes="monster-hp-value"
}}
</div>
<div class="flexrow monster-hp">
<span class="name"><a
class="rollable"
data-roll-type="shield-defense"
data-roll-dice={{system.combat.shieldDefenseDice}}
><i class="lf-roll-small fa-solid fa-dice-d20"></i>{{localize
"LETHALFANTASY.Label.shieldDefenseDice"
}}</a></span>
{{formInput
systemFields.combat.fields.shieldDefenseDice
value=system.combat.shieldDefenseDice
disabled=isPlayMode
classes="monster-hp-value"
}}
</div> </div>
</fieldset> </fieldset>
</div> </div>
<div class="monster-right"> <div class="monster-right">
<div class="monster-name"> <div class="monster-name">
{{formInput fields.name value=source.name rootId=partId disabled=isPlayMode}} {{formInput
<a class="control" data-action="toggleSheet" data-tooltip="LETHALFANTASY.ToggleSheet" fields.name
data-tooltip-direction="UP"> value=source.name
rootId=partId
disabled=isPlayMode
}}
<a
class="control"
data-action="toggleSheet"
data-tooltip="LETHALFANTASY.ToggleSheet"
data-tooltip-direction="UP"
>
<i class="fa-solid fa-user-{{ifThen isPlayMode 'lock' 'pen'}}"></i> <i class="fa-solid fa-user-{{ifThen isPlayMode 'lock' 'pen'}}"></i>
</a> </a>
</div> </div>
<fieldset class="monster-characteristics monster-characteristics-{{ifThen isPlayMode 'play' 'edit'}}"> <fieldset
class="monster-characteristics monster-characteristics-{{ifThen
isPlayMode
'play'
'edit'
}}"
>
<legend>{{localize "LETHALFANTASY.Label.Saves"}}</legend> <legend>{{localize "LETHALFANTASY.Label.Saves"}}</legend>
<div class="monster-saves"> <div class="monster-saves">
<div class="monster-save"> <div class="monster-save">
<span class="name"><a class="rollable" data-roll-type="save" data-roll-key="will"><i <span class="name"><a
class="lf-roll-small fa-solid fa-dice-d20"></i> class="rollable"
data-roll-type="save"
data-roll-key="will"
><i class="lf-roll-small fa-solid fa-dice-d20"></i>
{{localize "LETHALFANTASY.Label.saves.will"}} {{localize "LETHALFANTASY.Label.saves.will"}}
</a></span> </a></span>
{{formField systemFields.saves.fields.will.fields.value value=system.saves.will.value disabled=isPlayMode }} {{formField
systemFields.saves.fields.will.fields.value
value=system.saves.will.value
disabled=isPlayMode
}}
<span class="name"> <span class="name">
<a class="rollable" data-roll-type="save" data-roll-key="dodge"><i <a
class="lf-roll-small fa-solid fa-dice-d20"></i> class="rollable"
data-roll-type="save"
data-roll-key="dodge"
><i class="lf-roll-small fa-solid fa-dice-d20"></i>
{{localize "LETHALFANTASY.Label.saves.dodge"}} {{localize "LETHALFANTASY.Label.saves.dodge"}}
</a> </a>
</span> </span>
{{formField systemFields.saves.fields.dodge.fields.value value=system.saves.dodge.value {{formField
disabled=isPlayMode}} systemFields.saves.fields.dodge.fields.value
value=system.saves.dodge.value
disabled=isPlayMode
}}
<span class="name"> <span class="name">
<a class="rollable" data-roll-type="save" data-roll-key="toughness"><i <a
class="lf-roll-small fa-solid fa-dice-d20"></i> class="rollable"
data-roll-type="save"
data-roll-key="toughness"
><i class="lf-roll-small fa-solid fa-dice-d20"></i>
{{localize "LETHALFANTASY.Label.saves.toughness"}} {{localize "LETHALFANTASY.Label.saves.toughness"}}
</a> </a>
</span> </span>
{{formField systemFields.saves.fields.toughness.fields.value value=system.saves.toughness.value {{formField
disabled=isPlayMode}} systemFields.saves.fields.toughness.fields.value
value=system.saves.toughness.value
disabled=isPlayMode
}}
</div> </div>
<div class="monster-save"> <div class="monster-save">
<span class="name"> <span class="name">
<a class="rollable" data-roll-type="save" data-roll-key="contagion"><i <a
class="lf-roll-small fa-solid fa-dice-d20"></i> class="rollable"
data-roll-type="save"
data-roll-key="contagion"
><i class="lf-roll-small fa-solid fa-dice-d20"></i>
{{localize "LETHALFANTASY.Label.saves.contagion"}} {{localize "LETHALFANTASY.Label.saves.contagion"}}
</a> </a>
</span> </span>
{{formField systemFields.saves.fields.contagion.fields.value value=system.saves.contagion.value {{formField
disabled=isPlayMode}} systemFields.saves.fields.contagion.fields.value
value=system.saves.contagion.value
disabled=isPlayMode
}}
<span class="name"> <span class="name">
<a class="rollable" data-roll-type="save" data-roll-key="poison"><i <a
class="lf-roll-small fa-solid fa-dice-d20"></i> class="rollable"
{{localize "LETHALFANTASY.Label.saves.poison"}} data-roll-type="save"
data-roll-key="poison"
><i class="lf-roll-small fa-solid fa-dice-d20"></i>
{{localize "LETHALFANTASY.Label.saves.poison"}}
</a> </a>
</span> </span>
{{formField systemFields.saves.fields.poison.fields.value value=system.saves.poison.value {{formField
disabled=isPlayMode }} systemFields.saves.fields.poison.fields.value
value=system.saves.poison.value
disabled=isPlayMode
}}
<span class="name"> <!-- <span class="name">
<a class="rollable" data-roll-type="save" data-roll-key="paincourage" data-roll-dice="D20" data-tooltip="Pain/Courage check on wound of..."><i <a class="rollable" data-roll-type="save" data-roll-key="paincourage" data-roll-dice="D20" data-tooltip="Pain/Courage check on wound of..."><i
class="lf-roll-small fa-solid fa-dice-d20"></i> class="lf-roll-small fa-solid fa-dice-d20"></i>
{{localize "LETHALFANTASY.Label.saves.paincourage"}} {{localize "LETHALFANTASY.Label.saves.paincourage"}}
@@ -88,65 +186,88 @@
<span data-tooltip="Pain save if wound exceeds"> <span data-tooltip="Pain save if wound exceeds">
{{formField systemFields.hp.fields.painDamage value=system.hp.painDamage disabled=isPlayMode tooltip="Pain Damage"}} {{formField systemFields.hp.fields.painDamage value=system.hp.painDamage disabled=isPlayMode tooltip="Pain Damage"}}
</span> </span>-->
</div> </div>
</div> </div>
</fieldset> </fieldset>
<fieldset class="monster-characteristics monster-characteristics-{{ifThen isPlayMode 'play' 'edit'}}"> <fieldset
class="monster-characteristics monster-characteristics-{{ifThen
isPlayMode
'play'
'edit'
}}"
>
<legend>{{localize "LETHALFANTASY.Label.skills"}}</legend> <legend>{{localize "LETHALFANTASY.Label.skills"}}</legend>
<div class="monster-skills"> <div class="monster-skills">
<div class="monster-skill"> <div class="monster-skill">
<span class="name"><a class="rollable" data-roll-type="monster-skill" data-roll-key="resistTorture"><i <span class="name"><a
class="lf-roll-small fa-solid fa-dice-d20"></i>{{localize class="rollable"
"LETHALFANTASY.Label.resistTorture"}}</a></span> data-roll-type="monster-skill"
{{formField systemFields.resists.fields.resistTorture.fields.value value=system.resists.resistTorture.value data-roll-key="resistTorture"
disabled=isPlayMode ><i class="lf-roll-small fa-solid fa-dice-d20"></i>{{localize
"LETHALFANTASY.Label.resistTorture"
}}</a></span>
{{formField
systemFields.resists.fields.resistTorture.fields.value
value=system.resists.resistTorture.value
disabled=isPlayMode
}} }}
<span class="name"><a class="rollable" data-roll-type="monster-skill" data-roll-key="resistPerformance"><i <span class="name"><a
class="lf-roll-small fa-solid fa-dice-d20"></i>{{localize class="rollable"
"LETHALFANTASY.Label.resistPerformance"}}</a></span> data-roll-type="monster-skill"
{{formField systemFields.resists.fields.resistPerformance.fields.value value=system.resists.resistPerformance.value data-roll-key="resistPerformance"
disabled=isPlayMode ><i class="lf-roll-small fa-solid fa-dice-d20"></i>{{localize
"LETHALFANTASY.Label.resistPerformance"
}}</a></span>
{{formField
systemFields.resists.fields.resistPerformance.fields.value
value=system.resists.resistPerformance.value
disabled=isPlayMode
}}
<span class="name"><a
class="rollable"
data-roll-type="monster-skill"
data-roll-key="resistIntimidation"
><i class="lf-roll-small fa-solid fa-dice-d20"></i>{{localize
"LETHALFANTASY.Label.resistIntimidation"
}}</a></span>
{{formField
systemFields.resists.fields.resistIntimidation.fields.value
value=system.resists.resistIntimidation.value
disabled=isPlayMode
}} }}
<span class="name"><a class="rollable" data-roll-type="monster-skill" data-roll-key="resistIntimidation"><i
class="lf-roll-small fa-solid fa-dice-d20"></i>{{localize
"LETHALFANTASY.Label.resistIntimidation"}}</a></span>
{{formField systemFields.resists.fields.resistIntimidation.fields.value value=system.resists.resistIntimidation.value
disabled=isPlayMode }}
<span class="name"><a class="rollable" data-roll-type="monster-skill" data-roll-key="perception"><i
class="lf-roll-small fa-solid fa-dice-d20"></i>{{localize
"LETHALFANTASY.Label.perception"}}</a></span>
{{formField systemFields.resists.fields.perception.fields.value value=system.resists.perception.value
disabled=isPlayMode }}
<span class="name"><a class="rollable" data-roll-type="monster-skill" data-roll-key="stealth"><i
class="lf-roll-small fa-solid fa-dice-d20"></i>{{localize
"LETHALFANTASY.Label.stealth"}}</a></span>
{{formField systemFields.resists.fields.stealth.fields.value value=system.resists.stealth.value
disabled=isPlayMode }}
</div> </div>
</div> <div class="monster-skill">
</fieldset> <span class="name"><a
class="rollable"
data-roll-type="monster-skill"
data-roll-key="perception"
><i class="lf-roll-small fa-solid fa-dice-d20"></i>{{localize
"LETHALFANTASY.Label.perception"
}}</a></span>
{{formField
systemFields.resists.fields.perception.fields.value
value=system.resists.perception.value
disabled=isPlayMode
}}
<span class="name"><a
<fieldset class="monster-characteristics monster-characteristics-{{ifThen isPlayMode 'play' 'edit'}}"> class="rollable"
<legend>{{localize "LETHALFANTASY.Label.Movement"}}</legend> data-roll-type="monster-skill"
<div class="monster-movements"> data-roll-key="stealth"
<div class="monster-movement"> ><i class="lf-roll-small fa-solid fa-dice-d20"></i>{{localize
<span class="name">{{localize "LETHALFANTASY.Label.movement.walk"}}</span> "LETHALFANTASY.Label.stealth"
{{formField systemFields.movement.fields.walk value=system.movement.walk disabled=isPlayMode}} }}</a></span>
<span class="name">{{localize "LETHALFANTASY.Label.movement.jog"}}</span> {{formField
{{formField systemFields.movement.fields.jog value=system.challenges.movement.jog disabled=isPlayMode}} systemFields.resists.fields.stealth.fields.value
<span class="name">{{localize "LETHALFANTASY.Label.movement.run"}}</span> value=system.resists.stealth.value
{{formField systemFields.movement.fields.run value=system.movement.run disabled=isPlayMode}} disabled=isPlayMode
<span class="name">{{localize "LETHALFANTASY.Label.movement.sprint"}}</span> }}
{{formField systemFields.movement.fields.sprint value=system.movement.sprint disabled=isPlayMode}}
</div> </div>
</div> </div>
</fieldset> </fieldset>
@@ -154,23 +275,91 @@
</div> </div>
</fieldset> </fieldset>
<fieldset class="monster-characteristics monster-characteristics-{{ifThen isPlayMode 'play' 'edit'}}"> <fieldset
class="monster-characteristics monster-characteristics-{{ifThen
isPlayMode
'play'
'edit'
}}"
>
<legend>{{localize "LETHALFANTASY.Label.characteristics"}}</legend> <legend>{{localize "LETHALFANTASY.Label.characteristics"}}</legend>
<div class="monster-characteristic"> <div class="monster-characteristic">
<span>x{{localize "LETHALFANTASY.Label.int"}}</span> <span>{{localize "LETHALFANTASY.Label.int"}}</span>
{{formField systemFields.characteristics.fields.int.fields.value value=system.characteristics.int.value {{formField
disabled=isPlayMode data-char-id="int" }} systemFields.characteristics.fields.int.fields.value
value=system.characteristics.int.value
disabled=isPlayMode
data-char-id="int"
}}
{{formField systemFields.characteristics.fields.int.fields.percent value=system.characteristics.int.percent {{formField
disabled=isPlayMode type="number" }} systemFields.characteristics.fields.int.fields.percent
value=system.characteristics.int.percent
disabled=isPlayMode
type="number"
}}
</div> </div>
<div class="monster-characteristic"> <div class="monster-characteristic">
<span>{{localize "LETHALFANTASY.Label.dex"}}</span> <span>{{localize "LETHALFANTASY.Label.dex"}}</span>
{{formField systemFields.characteristics.fields.dex.fields.value value=system.characteristics.dex.value {{formField
disabled=isPlayMode data-char-id="wis" }} systemFields.characteristics.fields.dex.fields.value
value=system.characteristics.dex.value
disabled=isPlayMode
data-char-id="wis"
}}
{{formField systemFields.characteristics.fields.dex.fields.percent value=system.characteristics.dex.percent {{formField
disabled=isPlayMode type="number" }} systemFields.characteristics.fields.dex.fields.percent
value=system.characteristics.dex.percent
disabled=isPlayMode
type="number"
}}
</div>
<legend>{{localize "LETHALFANTASY.Label.Movement"}}</legend>
<div class="monster-movements">
<div class="monster-movement">
<div class="flexrow monster-hp">
<span class="name">{{localize
"LETHALFANTASY.Label.movement.walk"
}}</span>
{{formField
systemFields.movement.fields.walk
value=system.movement.walk
disabled=isPlayMode
}}
</div>
<div class="flexrow monster-hp">
<span class="name">{{localize
"LETHALFANTASY.Label.movement.jog"
}}</span>
{{formField
systemFields.movement.fields.jog
value=system.movement.jog
disabled=isPlayMode
}}
</div>
<div class="flexrow monster-hp">
<span class="name">{{localize
"LETHALFANTASY.Label.movement.run"
}}</span>
{{formField
systemFields.movement.fields.run
value=system.movement.run
disabled=isPlayMode
}}
</div>
<div class="flexrow monster-hp">
<span class="name">{{localize
"LETHALFANTASY.Label.movement.sprint"
}}</span>
{{formField
systemFields.movement.fields.sprint
value=system.movement.sprint
disabled=isPlayMode
}}
</div>
</div>
</div> </div>
</fieldset> </fieldset>

View File

@@ -32,21 +32,15 @@
</select> </select>
</div> </div>
<div class="field-section">
<span class="field-name">Aim :</span>
<select name="attackerAim" data-tooltip-direction="UP">
{{selectOptions attackerAimChoices selected=attackerAim}}
</select>
</div>
</fieldSet> </fieldSet>
<fieldSet> <fieldSet>
<legend>{{localize "LETHALFANTASY.Roll.visibility"}}</legend> <legend>{{localize "LETHALFANTASY.Roll.visibility"}}</legend>
<select name="visibility"> <span class="fieldset-centered">
{{selectOptions rollModes selected=visibility localize=true}} <select name="visibility">
</select> {{selectOptions rollModes selected=visibility localize=true}}
</select>
</span>
</fieldSet> </fieldSet>
</div> </div>

View File

@@ -1,97 +1,148 @@
<div class="lethalfantasy-roll-dialog"> <div class="lethalfantasy-roll-dialog">
<fieldSet class=""> <fieldSet class="">
<legend>{{localize (concat "LETHALFANTASY.Label." rollType)}} - {{actorName}}</legend> <legend>{{localize (concat "LETHALFANTASY.Label." rollType)}}
-
{{actorName}}</legend>
{{#if rollTarget.tokenId}} {{#if rollTarget.tokenId}}
<div class="dialog-save"> <div class="dialog-save">
<a class="goto-token-button" data-action="gotoToken" data-token-id="{{rollTarget.tokenId}}">{{localize <a
"LETHALFANTASY.Label.gotoToken"}} </a> class="goto-token-button"
</div> data-action="gotoToken"
data-token-id="{{rollTarget.tokenId}}"
>{{localize "LETHALFANTASY.Label.gotoToken"}} </a>
</div>
{{/if}} {{/if}}
{{#if (match rollType "attack")}} {{#if (match rollType "attack")}}
<div class="dialog-save">Attack roll ! - {{rollTarget.name}}</div> <div class="dialog-save">Attack roll ! - {{rollTarget.name}}</div>
{{/if}} {{/if}}
{{#if (match rollType "defense")}} {{#if (match rollType "defense")}}
<div class="dialog-save">Defense roll ! - {{rollTarget.name}}</div> <div class="dialog-save">Defense roll ! - {{rollTarget.name}}</div>
{{/if}} {{/if}}
{{#if hasModifier}} {{#if hasModifier}}
<div class="dialog-save">{{upperFirst rollName}} : {{baseFormula}} + {{baseValue}}</div> <div class="dialog-save">{{upperFirst rollName}}
:
{{baseFormula}}
+
{{baseValue}}</div>
{{else}} {{else}}
<div class="dialog-save">{{upperFirst rollName}} : {{baseFormula}}</div> <div class="dialog-save">{{upperFirst rollName}} : {{baseFormula}}</div>
{{/if}} {{/if}}
{{#if rollTarget.weapon}} {{#if rollTarget.weapon}}
<div class="dialog-save">{{localize "LETHALFANTASY.Label.baseModifier"}} : {{rollTarget.charModifier}}</div> <div class="dialog-save">{{localize "LETHALFANTASY.Label.baseModifier"}}
<div class="dialog-save">{{localize "LETHALFANTASY.Label.weapon"}} : {{rollTarget.weapon.name}}</div> :
<div class="dialog-save">{{localize "LETHALFANTASY.Label.skill"}} : {{rollTarget.name}}</div> {{rollTarget.charModifier}}</div>
<div class="dialog-save">{{localize "LETHALFANTASY.Label.skillBonus"}} : {{rollTarget.weaponSkillModifier}}</div> {{#if (match rollType "defense")}}
<div class="dialog-save">Armor defense modifier :
{{rollTarget.armorDefense}}</div>
{{/if}}
<div class="dialog-save">{{localize "LETHALFANTASY.Label.weapon"}}
:
{{rollTarget.weapon.name}}</div>
<div class="dialog-save">{{localize "LETHALFANTASY.Label.skill"}}
:
{{rollTarget.name}}</div>
<div class="dialog-save">{{localize "LETHALFANTASY.Label.skillBonus"}}
:
{{rollTarget.weaponSkillModifier}}</div>
{{/if}} {{/if}}
{{#if (match rollType "attack")}} {{#if (match rollType "attack")}}
<div class="dialog-save">Add Granted Attack Dice <div class="dialog-save">Add Granted Attack Dice
<input type="checkbox" data-action="selectGranted" name="granted"> <input type="checkbox" data-action="selectGranted" name="granted" />
</div> </div>
<div class="dialog-save">Point Blank Range Attack {{#if rollTarget.weapon}}
<input type="checkbox" data-action="selectPointBlank" name="pointBlank"> {{#if (eq rollTarget.weapon.system.weaponType "melee")}}{{else}}
</div> <div class="dialog-save">Point Blank Range Attack
<div class="dialog-save">Beyon Skill Range Attack <input
<input type="checkbox" data-action="selectBeyondSkill" name="beyondSkill"> type="checkbox"
</div> data-action="selectPointBlank"
name="pointBlankV"
/>
</div>
<div class="dialog-save">Beyond Skill Range Attack
<input
type="checkbox"
data-action="selectBeyondSkill"
name="beyondSkillV"
/>
</div>
<div class="dialog-save">Let it Fly (Pure D20E)
<input
type="checkbox"
data-action="selectLetItFly"
name="letItFlyV"
/>
</div>
<div class="dialog-save">Aiming
<select name="attackerAim" data-tooltip-direction="UP">
{{selectOptions attackerAimChoices selected=attackerAim}}
</select>
</div>
{{/if}}
{{/if}}
{{/if}} {{/if}}
{{#if (match rollType "defense")}} {{#if (match rollType "defense")}}
<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>
{{/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
<input type="checkbox" data-action="selectGranted" name="granted"> <input type="checkbox" data-action="selectGranted" name="granted" />
</div> </div>
{{/if}} {{/if}}
{{#if rollTarget.staticModifier}} {{#if rollTarget.staticModifier}}
<div class="dialog-save">Static modifier : +{{rollTarget.staticModifier}}</div> <div class="dialog-save">Static modifier : +{{rollTarget.staticModifier}}</div>
{{/if}} {{/if}}
</fieldSet> </fieldSet>
{{#if hasFavor}} {{#if hasFavor}}
<fieldSet class="dialog-favor"> <fieldSet class="dialog-favor">
<legend>{{localize "LETHALFANTASY.Roll.favorDisfavor"}}</legend> <legend>{{localize "LETHALFANTASY.Roll.favorDisfavor"}}</legend>
<select name="favor" class="favor-choice" data-tooltip-direction="UP"> <select name="favor" class="favor-choice" data-tooltip-direction="UP">
{{selectOptions choiceFavor selected=favor}} {{selectOptions choiceFavor selected=favor}}
</select> </select>
</fieldSet> </fieldSet>
{{/if}} {{/if}}
{{#if hasModifier}} {{#if hasModifier}}
<fieldSet class="dialog-modifier"> <fieldSet class="dialog-modifier">
<legend>{{localize "LETHALFANTASY.Roll.modifierBonusMalus"}}</legend> <legend>{{localize "LETHALFANTASY.Roll.modifierBonusMalus"}}</legend>
<select name="modifier" data-tooltip-direction="UP"> <select name="modifier" data-tooltip-direction="UP">
{{selectOptions choiceModifier selected=modifier}} {{selectOptions choiceModifier selected=modifier}}
</select> </select>
{{#if (eq rollType "save")}} {{#if (eq rollType "save")}}
{{#if rollTarget.magicUser}} {{#if rollTarget.magicUser}}
<div> <div>
<span>Save against spell (+{{rollTarget.actorModifiers.saveModifier}}) ?</span> <span>Save against spell (+{{rollTarget.actorModifiers.saveModifier}})
<input type="checkbox" name="saveSpell" value="saveSpell"> ?</span>
</div> <input
{{/if}} type="checkbox"
{{/if}} name="saveSpellCheck"
</fieldSet> data-action="saveSpellCheck"
/>
</div>
{{/if}}
{{/if}}
</fieldSet>
{{/if}} {{/if}}
{{#if hasChangeDice}} {{#if hasChangeDice}}
<fieldSet class="dialog-modifier"> <fieldSet class="dialog-modifier">
<legend>{{localize "LETHALFANTASY.Roll.changeDice"}}</legend> <legend>{{localize "LETHALFANTASY.Roll.changeDice"}}</legend>
<select name="changeDice" data-tooltip-direction="UP"> <select name="changeDice" data-tooltip-direction="UP">
{{selectOptions choiceDice selected=changeDice}} {{selectOptions choiceDice selected=changeDice}}
</select> </select>
</fieldSet> </fieldSet>
{{/if}} {{/if}}
<fieldSet> <fieldSet>
@@ -101,5 +152,4 @@
</select> </select>
</fieldSet> </fieldSet>
</div> </div>

View File

@@ -1,6 +1,12 @@
<section> <section>
<div class="header"> <div class="header">
<img class="item-img" src="{{item.img}}" data-edit="img" data-action="editImage" data-tooltip="{{item.name}}" /> <img
class="item-img"
src="{{item.img}}"
data-edit="img"
data-action="editImage"
data-tooltip="{{item.name}}"
/>
{{formInput fields.name value=source.name}} {{formInput fields.name value=source.name}}
</div> </div>
@@ -8,28 +14,37 @@
<div class="align-top"> <div class="align-top">
{{formField systemFields.defense value=system.defense}} {{formField systemFields.defense value=system.defense}}
{{formField systemFields.damageReduction value=system.damageReduction}}
<div class="shift-right">&nbsp; <div class="shift-right">&nbsp;
</div> </div>
{{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>Cover vs ranged attacks</label>
<div class="shift-right"> <div class="shift-right">
<label>Standing </label> <label>Standing </label>
<div class="flexrow">{{formField systemFields.standing.fields.min value=system.standing.min}} &nbsp;...&nbsp;30 <div class="flexrow">{{formField
systemFields.standing.fields.min
value=system.standing.min
}}
&nbsp;...&nbsp;30
</div>
</div>
<div class="shift-right">
<label>Crouching</label>
<div class="flexrow">{{formField
systemFields.crouching.fields.min
value=system.crouching.min
}}
&nbsp;...&nbsp;30</div>
</div> </div>
</div>
<div class="shift-right">
<label>Crouching</label>
<div class="flexrow">{{formField systemFields.crouching.fields.min value=system.crouching.min}}
&nbsp;...&nbsp;30</div>
</div>
{{/if}} {{/if}}
</div> </div>
<div class="align-top"> <div class="align-top">
<label>Destruction</label> <!-- <label>Destruction</label>
<div class="shift-right"> <div class="shift-right">
{{formField systemFields.destruction.fields.bashing value=system.destruction.bashing}} {{formField systemFields.destruction.fields.bashing value=system.destruction.bashing}}
{{formField systemFields.destruction.fields.slashing value=system.destruction.slashing}} {{formField systemFields.destruction.fields.slashing value=system.destruction.slashing}}
@@ -41,7 +56,7 @@
{{formField systemFields.autodestruction.fields.bashing value=system.autodestruction.bashing}} {{formField systemFields.autodestruction.fields.bashing value=system.autodestruction.bashing}}
{{formField systemFields.autodestruction.fields.slashing value=system.autodestruction.slashing}} {{formField systemFields.autodestruction.fields.slashing value=system.autodestruction.slashing}}
{{formField systemFields.autodestruction.fields.piercing value=system.autodestruction.piercing}} {{formField systemFields.autodestruction.fields.piercing value=system.autodestruction.piercing}}
</div> </div> -->
{{formField systemFields.equipped value=system.equipped}} {{formField systemFields.equipped value=system.equipped}}
@@ -53,15 +68,14 @@
</div> </div>
</div> </div>
<fieldset> <fieldset>
<legend>{{localize "LETHALFANTASY.Label.description"}}</legend> <legend>{{localize "LETHALFANTASY.Label.description"}}</legend>
{{formInput {{formInput
systemFields.description systemFields.description
enriched=enrichedDescription enriched=enrichedDescription
value=system.description value=system.description
name="system.description" name="system.description"
toggled="false" toggled="false"
}} }}
</fieldset> </fieldset>
</section> </section>