20 Commits

Author SHA1 Message Date
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
e5653a4edc Latest modifications & changes
All checks were successful
Release Creation / build (release) Successful in 1m47s
2025-08-31 11:28:52 +02:00
527e33a805 Roll D12 for monsters, with enabled fields for attacks
All checks were successful
Release Creation / build (release) Successful in 1m22s
2025-06-10 20:37:46 +02:00
b5857cb3b7 Various fixes for v13
All checks were successful
Release Creation / build (release) Successful in 53s
2025-06-05 16:14:25 +02:00
7a06e8a5c9 Combat tab for v13
All checks were successful
Release Creation / build (release) Successful in 1m20s
2025-05-29 18:48:33 +02:00
75 changed files with 2883 additions and 1067 deletions

View File

@@ -1,6 +1,6 @@
name: Release Creation
on:
on:
release:
types: [published]
@@ -8,45 +8,56 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- run: echo "💡 The ${{ gitea.repository }} repository will cloned to the runner."
#- uses: actions/checkout@v3
- uses: RouxAntoine/checkout@v3.5.4
- run: echo "💡 The ${{ gitea.repository }} repository will cloned to the runner."
# get part of the tag after the `v`
- name: Extract tag version number
id: get_version
uses: battila7/get-version-action@v2
#- uses: actions/checkout@v3
- uses: RouxAntoine/checkout@v3.5.4
# Substitute the Manifest and Download URLs in the module.json
- name: Substitute Manifest and Download Links For Versioned Ones
id: sub_manifest_link_version
uses: microsoft/variable-substitution@v1
with:
files: 'system.json'
env:
version: ${{steps.get_version.outputs.version-without-v}}
url: https://www.uberwald.me/gitea/${{gitea.repository}}
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
# Create a zip file with all files required by the module to add to the release
- run: |
apt update -y
apt install -y zip
# get part of the tag after the `v`
- name: Extract tag version number
id: get_version
uses: battila7/get-version-action@v2
- 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
uses: https://github.com/actions/setup-go@v4
with:
go-version: '>=1.20.1'
- name: Use Go Action
id: use-go-action
uses: https://gitea.com/actions/release-action@main
with:
files: |-
./fvtt-lethal-fantasy-${{github.event.release.tag_name}}.zip
system.json
api_key: '${{secrets.ALLOW_PUSH_RELEASE}}'
# Substitute the Manifest and Download URLs in the module.json
- name: Substitute Manifest and Download Links For Versioned Ones
id: sub_manifest_link_version
uses: microsoft/variable-substitution@v1
with:
files: "system.json"
env:
version: ${{steps.get_version.outputs.version-without-v}}
url: https://www.uberwald.me/gitea/${{gitea.repository}}
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
# Create a zip file with all files required by the module to add to the release
- run: |
apt update -y
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
- name: setup go
uses: https://github.com/actions/setup-go@v4
with:
go-version: ">=1.20.1"
- name: Use Go Action
id: use-go-action
uses: https://gitea.com/actions/release-action@main
with:
files: |-
./fvtt-lethal-fantasy-${{github.event.release.tag_name}}.zip
system.json
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

@@ -13,6 +13,16 @@
--font-secondary: "BaskervilleBold", serif;
--logo-standard: url("../assets/ui/lf_logo_small_02.webp");
}
.initiative-area {
min-width: 8rem;
max-width: 8rem;
display: flex;
flex-direction: row;
}
.initiative-area input {
min-width: 3rem;
max-width: 3rem;
}
#logo {
content: var(--logo-standard);
width: 50px;
@@ -73,9 +83,33 @@ i.lethalfantasy {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1.2);
}
.lethalfantasy .item-sheet-common {
overflow: auto;
}
.lethalfantasy .item-sheet-common .form-fields {
padding-top: 4px;
}
.lethalfantasy .item-sheet-common .form-group {
display: flex;
flex: 1;
flex-direction: row;
}
.lethalfantasy .item-sheet-common .form-group label {
align-content: center;
min-width: 10rem;
max-width: 10rem;
}
.lethalfantasy .item-sheet-common .form-group select,
.lethalfantasy .item-sheet-common .form-group input {
text-align: left;
min-width: 12rem;
max-width: 12rem;
}
.lethalfantasy .item-sheet-common .form-group input[type="checkbox"] {
min-width: 1.2rem;
max-width: 1.2rem;
margin-right: 0.5rem;
}
.lethalfantasy .item-sheet-common label {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1);
@@ -85,10 +119,6 @@ i.lethalfantasy {
align-self: flex-start;
padding: 0.1rem;
margin-right: 0.2rem;
/*border-color: black;
border-width: 1px;
border-style: solid;
border-radius: 2%;*/
}
.lethalfantasy .item-sheet-common .shift-right {
margin-left: 2rem;
@@ -102,6 +132,12 @@ i.lethalfantasy {
background-size: 100% 100%;
overflow: scroll;
}
.lethalfantasy .character-content nav.tabs [data-tab] {
color: #636060;
}
.lethalfantasy .character-content nav.tabs [data-tab].active {
color: #252424;
}
.lethalfantasy .character-content input:disabled,
.lethalfantasy .character-content select:disabled {
background-color: rgba(0, 0, 0, 0.2);
@@ -485,6 +521,9 @@ i.lethalfantasy {
min-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 {
min-width: 9rem;
}
@@ -646,7 +685,8 @@ i.lethalfantasy {
gap: 4px;
}
.lethalfantasy .tab.character-spells .main-div .spells .spell .item-img {
width: 24px;
min-width: 24px;
max-width: 24px;
height: 24px;
}
.lethalfantasy .tab.character-spells .main-div .spells .spell .name {
@@ -720,6 +760,12 @@ i.lethalfantasy {
background-size: 100% 100%;
overflow: scroll;
}
.lethalfantasy .monster-content nav.tabs [data-tab] {
color: #636060;
}
.lethalfantasy .monster-content nav.tabs [data-tab].active {
color: #252424;
}
.lethalfantasy .monster-content input:disabled,
.lethalfantasy .monster-content select:disabled {
background-color: rgba(0, 0, 0, 0.2);
@@ -1190,6 +1236,13 @@ i.lethalfantasy {
background-image: var(--background-image-base);
background-repeat: no-repeat;
background-size: 100% 100%;
overflow: auto;
}
.lethalfantasy .skill-content nav.tabs [data-tab] {
color: #636060;
}
.lethalfantasy .skill-content nav.tabs [data-tab].active {
color: #252424;
}
.lethalfantasy .skill-content input:disabled,
.lethalfantasy .skill-content select:disabled {
@@ -1234,6 +1287,27 @@ i.lethalfantasy {
.lethalfantasy .skill-content .form-fields {
padding-top: 4px;
}
.lethalfantasy .skill-content .form-group {
display: flex;
flex: 1;
flex-direction: row;
}
.lethalfantasy .skill-content .form-group label {
align-content: center;
min-width: 10rem;
max-width: 10rem;
}
.lethalfantasy .skill-content .form-group select,
.lethalfantasy .skill-content .form-group input {
text-align: left;
min-width: 12rem;
max-width: 12rem;
}
.lethalfantasy .skill-content .form-group input[type="checkbox"] {
min-width: 1.2rem;
max-width: 1.2rem;
margin-right: 0.5rem;
}
.lethalfantasy .skill-content label {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1);
@@ -1243,10 +1317,6 @@ i.lethalfantasy {
align-self: flex-start;
padding: 0.1rem;
margin-right: 0.2rem;
/*border-color: black;
border-width: 1px;
border-style: solid;
border-radius: 2%;*/
}
.lethalfantasy .skill-content .shift-right {
margin-left: 2rem;
@@ -1276,6 +1346,13 @@ i.lethalfantasy {
background-image: var(--background-image-base);
background-repeat: no-repeat;
background-size: 100% 100%;
overflow: auto;
}
.lethalfantasy .gift-content nav.tabs [data-tab] {
color: #636060;
}
.lethalfantasy .gift-content nav.tabs [data-tab].active {
color: #252424;
}
.lethalfantasy .gift-content input:disabled,
.lethalfantasy .gift-content select:disabled {
@@ -1320,6 +1397,27 @@ i.lethalfantasy {
.lethalfantasy .gift-content .form-fields {
padding-top: 4px;
}
.lethalfantasy .gift-content .form-group {
display: flex;
flex: 1;
flex-direction: row;
}
.lethalfantasy .gift-content .form-group label {
align-content: center;
min-width: 10rem;
max-width: 10rem;
}
.lethalfantasy .gift-content .form-group select,
.lethalfantasy .gift-content .form-group input {
text-align: left;
min-width: 12rem;
max-width: 12rem;
}
.lethalfantasy .gift-content .form-group input[type="checkbox"] {
min-width: 1.2rem;
max-width: 1.2rem;
margin-right: 0.5rem;
}
.lethalfantasy .gift-content label {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1);
@@ -1329,10 +1427,6 @@ i.lethalfantasy {
align-self: flex-start;
padding: 0.1rem;
margin-right: 0.2rem;
/*border-color: black;
border-width: 1px;
border-style: solid;
border-radius: 2%;*/
}
.lethalfantasy .gift-content .shift-right {
margin-left: 2rem;
@@ -1362,6 +1456,13 @@ i.lethalfantasy {
background-image: var(--background-image-base);
background-repeat: no-repeat;
background-size: 100% 100%;
overflow: auto;
}
.lethalfantasy .weapon-content nav.tabs [data-tab] {
color: #636060;
}
.lethalfantasy .weapon-content nav.tabs [data-tab].active {
color: #252424;
}
.lethalfantasy .weapon-content input:disabled,
.lethalfantasy .weapon-content select:disabled {
@@ -1406,6 +1507,27 @@ i.lethalfantasy {
.lethalfantasy .weapon-content .form-fields {
padding-top: 4px;
}
.lethalfantasy .weapon-content .form-group {
display: flex;
flex: 1;
flex-direction: row;
}
.lethalfantasy .weapon-content .form-group label {
align-content: center;
min-width: 10rem;
max-width: 10rem;
}
.lethalfantasy .weapon-content .form-group select,
.lethalfantasy .weapon-content .form-group input {
text-align: left;
min-width: 12rem;
max-width: 12rem;
}
.lethalfantasy .weapon-content .form-group input[type="checkbox"] {
min-width: 1.2rem;
max-width: 1.2rem;
margin-right: 0.5rem;
}
.lethalfantasy .weapon-content label {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1);
@@ -1415,10 +1537,6 @@ i.lethalfantasy {
align-self: flex-start;
padding: 0.1rem;
margin-right: 0.2rem;
/*border-color: black;
border-width: 1px;
border-style: solid;
border-radius: 2%;*/
}
.lethalfantasy .weapon-content .shift-right {
margin-left: 2rem;
@@ -1440,6 +1558,13 @@ i.lethalfantasy {
background-image: var(--background-image-base);
background-repeat: no-repeat;
background-size: 100% 100%;
overflow: auto;
}
.lethalfantasy .armor-content nav.tabs [data-tab] {
color: #636060;
}
.lethalfantasy .armor-content nav.tabs [data-tab].active {
color: #252424;
}
.lethalfantasy .armor-content input:disabled,
.lethalfantasy .armor-content select:disabled {
@@ -1484,6 +1609,27 @@ i.lethalfantasy {
.lethalfantasy .armor-content .form-fields {
padding-top: 4px;
}
.lethalfantasy .armor-content .form-group {
display: flex;
flex: 1;
flex-direction: row;
}
.lethalfantasy .armor-content .form-group label {
align-content: center;
min-width: 10rem;
max-width: 10rem;
}
.lethalfantasy .armor-content .form-group select,
.lethalfantasy .armor-content .form-group input {
text-align: left;
min-width: 12rem;
max-width: 12rem;
}
.lethalfantasy .armor-content .form-group input[type="checkbox"] {
min-width: 1.2rem;
max-width: 1.2rem;
margin-right: 0.5rem;
}
.lethalfantasy .armor-content label {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1);
@@ -1493,10 +1639,6 @@ i.lethalfantasy {
align-self: flex-start;
padding: 0.1rem;
margin-right: 0.2rem;
/*border-color: black;
border-width: 1px;
border-style: solid;
border-radius: 2%;*/
}
.lethalfantasy .armor-content .shift-right {
margin-left: 2rem;
@@ -1518,6 +1660,13 @@ i.lethalfantasy {
background-image: var(--background-image-base);
background-repeat: no-repeat;
background-size: 100% 100%;
overflow: auto;
}
.lethalfantasy .spell-content nav.tabs [data-tab] {
color: #636060;
}
.lethalfantasy .spell-content nav.tabs [data-tab].active {
color: #252424;
}
.lethalfantasy .spell-content input:disabled,
.lethalfantasy .spell-content select:disabled {
@@ -1562,6 +1711,27 @@ i.lethalfantasy {
.lethalfantasy .spell-content .form-fields {
padding-top: 4px;
}
.lethalfantasy .spell-content .form-group {
display: flex;
flex: 1;
flex-direction: row;
}
.lethalfantasy .spell-content .form-group label {
align-content: center;
min-width: 10rem;
max-width: 10rem;
}
.lethalfantasy .spell-content .form-group select,
.lethalfantasy .spell-content .form-group input {
text-align: left;
min-width: 12rem;
max-width: 12rem;
}
.lethalfantasy .spell-content .form-group input[type="checkbox"] {
min-width: 1.2rem;
max-width: 1.2rem;
margin-right: 0.5rem;
}
.lethalfantasy .spell-content label {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1);
@@ -1571,10 +1741,6 @@ i.lethalfantasy {
align-self: flex-start;
padding: 0.1rem;
margin-right: 0.2rem;
/*border-color: black;
border-width: 1px;
border-style: solid;
border-radius: 2%;*/
}
.lethalfantasy .spell-content .shift-right {
margin-left: 2rem;
@@ -1596,6 +1762,13 @@ i.lethalfantasy {
background-image: var(--background-image-base);
background-repeat: no-repeat;
background-size: 100% 100%;
overflow: auto;
}
.lethalfantasy .vulnerability-content nav.tabs [data-tab] {
color: #636060;
}
.lethalfantasy .vulnerability-content nav.tabs [data-tab].active {
color: #252424;
}
.lethalfantasy .vulnerability-content input:disabled,
.lethalfantasy .vulnerability-content select:disabled {
@@ -1640,6 +1813,27 @@ i.lethalfantasy {
.lethalfantasy .vulnerability-content .form-fields {
padding-top: 4px;
}
.lethalfantasy .vulnerability-content .form-group {
display: flex;
flex: 1;
flex-direction: row;
}
.lethalfantasy .vulnerability-content .form-group label {
align-content: center;
min-width: 10rem;
max-width: 10rem;
}
.lethalfantasy .vulnerability-content .form-group select,
.lethalfantasy .vulnerability-content .form-group input {
text-align: left;
min-width: 12rem;
max-width: 12rem;
}
.lethalfantasy .vulnerability-content .form-group input[type="checkbox"] {
min-width: 1.2rem;
max-width: 1.2rem;
margin-right: 0.5rem;
}
.lethalfantasy .vulnerability-content label {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1);
@@ -1649,10 +1843,6 @@ i.lethalfantasy {
align-self: flex-start;
padding: 0.1rem;
margin-right: 0.2rem;
/*border-color: black;
border-width: 1px;
border-style: solid;
border-radius: 2%;*/
}
.lethalfantasy .vulnerability-content .shift-right {
margin-left: 2rem;
@@ -1720,6 +1910,13 @@ i.lethalfantasy {
background-image: var(--background-image-base);
background-repeat: no-repeat;
background-size: 100% 100%;
overflow: auto;
}
.lethalfantasy .equipment-content nav.tabs [data-tab] {
color: #636060;
}
.lethalfantasy .equipment-content nav.tabs [data-tab].active {
color: #252424;
}
.lethalfantasy .equipment-content input:disabled,
.lethalfantasy .equipment-content select:disabled {
@@ -1764,6 +1961,27 @@ i.lethalfantasy {
.lethalfantasy .equipment-content .form-fields {
padding-top: 4px;
}
.lethalfantasy .equipment-content .form-group {
display: flex;
flex: 1;
flex-direction: row;
}
.lethalfantasy .equipment-content .form-group label {
align-content: center;
min-width: 10rem;
max-width: 10rem;
}
.lethalfantasy .equipment-content .form-group select,
.lethalfantasy .equipment-content .form-group input {
text-align: left;
min-width: 12rem;
max-width: 12rem;
}
.lethalfantasy .equipment-content .form-group input[type="checkbox"] {
min-width: 1.2rem;
max-width: 1.2rem;
margin-right: 0.5rem;
}
.lethalfantasy .equipment-content label {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1);
@@ -1773,10 +1991,6 @@ i.lethalfantasy {
align-self: flex-start;
padding: 0.1rem;
margin-right: 0.2rem;
/*border-color: black;
border-width: 1px;
border-style: solid;
border-radius: 2%;*/
}
.lethalfantasy .equipment-content .shift-right {
margin-left: 2rem;
@@ -1798,6 +2012,13 @@ i.lethalfantasy {
background-image: var(--background-image-base);
background-repeat: no-repeat;
background-size: 100% 100%;
overflow: auto;
}
.lethalfantasy .shield-content nav.tabs [data-tab] {
color: #636060;
}
.lethalfantasy .shield-content nav.tabs [data-tab].active {
color: #252424;
}
.lethalfantasy .shield-content input:disabled,
.lethalfantasy .shield-content select:disabled {
@@ -1842,6 +2063,27 @@ i.lethalfantasy {
.lethalfantasy .shield-content .form-fields {
padding-top: 4px;
}
.lethalfantasy .shield-content .form-group {
display: flex;
flex: 1;
flex-direction: row;
}
.lethalfantasy .shield-content .form-group label {
align-content: center;
min-width: 10rem;
max-width: 10rem;
}
.lethalfantasy .shield-content .form-group select,
.lethalfantasy .shield-content .form-group input {
text-align: left;
min-width: 12rem;
max-width: 12rem;
}
.lethalfantasy .shield-content .form-group input[type="checkbox"] {
min-width: 1.2rem;
max-width: 1.2rem;
margin-right: 0.5rem;
}
.lethalfantasy .shield-content label {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1);
@@ -1851,10 +2093,6 @@ i.lethalfantasy {
align-self: flex-start;
padding: 0.1rem;
margin-right: 0.2rem;
/*border-color: black;
border-width: 1px;
border-style: solid;
border-radius: 2%;*/
}
.lethalfantasy .shield-content .shift-right {
margin-left: 2rem;
@@ -1876,6 +2114,13 @@ i.lethalfantasy {
background-image: var(--background-image-base);
background-repeat: no-repeat;
background-size: 100% 100%;
overflow: auto;
}
.lethalfantasy .miracle-content nav.tabs [data-tab] {
color: #636060;
}
.lethalfantasy .miracle-content nav.tabs [data-tab].active {
color: #252424;
}
.lethalfantasy .miracle-content input:disabled,
.lethalfantasy .miracle-content select:disabled {
@@ -1920,6 +2165,27 @@ i.lethalfantasy {
.lethalfantasy .miracle-content .form-fields {
padding-top: 4px;
}
.lethalfantasy .miracle-content .form-group {
display: flex;
flex: 1;
flex-direction: row;
}
.lethalfantasy .miracle-content .form-group label {
align-content: center;
min-width: 10rem;
max-width: 10rem;
}
.lethalfantasy .miracle-content .form-group select,
.lethalfantasy .miracle-content .form-group input {
text-align: left;
min-width: 12rem;
max-width: 12rem;
}
.lethalfantasy .miracle-content .form-group input[type="checkbox"] {
min-width: 1.2rem;
max-width: 1.2rem;
margin-right: 0.5rem;
}
.lethalfantasy .miracle-content label {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1);
@@ -1929,10 +2195,6 @@ i.lethalfantasy {
align-self: flex-start;
padding: 0.1rem;
margin-right: 0.2rem;
/*border-color: black;
border-width: 1px;
border-style: solid;
border-radius: 2%;*/
}
.lethalfantasy .miracle-content .shift-right {
margin-left: 2rem;
@@ -1956,6 +2218,54 @@ i.lethalfantasy {
border-color: var(--color-dark-6);
color: var(--color-dark-2);
}
.application.dialog.lethalfantasy .apply-damage-dialog .dialog-content {
padding: 6px;
font-size: calc(var(--font-size-standard) * 1);
}
.application.dialog.lethalfantasy .apply-damage-dialog .dialog-content .header {
text-align: center;
padding: 4px;
margin-bottom: 6px;
background-color: rgba(0, 0, 0, 0.1);
border-radius: 3px;
}
.application.dialog.lethalfantasy .apply-damage-dialog .dialog-content .damage-summary {
display: flex;
justify-content: space-between;
align-items: center;
padding: 4px 6px;
margin-bottom: 6px;
background-color: rgba(139, 0, 0, 0.1);
border-radius: 3px;
}
.application.dialog.lethalfantasy .apply-damage-dialog .dialog-content .damage-summary .damage-value {
color: var(--color-level-error);
font-size: calc(var(--font-size-standard) * 1.2);
font-weight: bold;
}
.application.dialog.lethalfantasy .apply-damage-dialog .dialog-content .dr-summary {
display: flex;
justify-content: space-around;
gap: 4px;
padding: 3px;
margin-bottom: 6px;
font-size: calc(var(--font-size-standard) * 0.85);
background-color: rgba(0, 0, 0, 0.05);
border-radius: 3px;
}
.application.dialog.lethalfantasy .apply-damage-dialog .dialog-content .damage-options .option-line {
display: flex;
justify-content: space-between;
align-items: center;
padding: 3px 6px;
margin: 2px 0;
background-color: rgba(0, 0, 0, 0.05);
border-radius: 3px;
}
.application.dialog.lethalfantasy .apply-damage-dialog .dialog-content .damage-options .option-line strong {
color: var(--color-dark-1);
font-size: calc(var(--font-size-standard) * 1.05);
}
.lethalfantasy-roll-dialog fieldset {
padding: 4px;
}
@@ -1977,10 +2287,17 @@ i.lethalfantasy {
.lethalfantasy-range-defense-dialog fieldset {
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 {
margin-left: 0.5rem;
min-width: 10rem;
max-width: 10rem;
min-width: 12rem;
max-width: 12rem;
}
.lethalfantasy-range-defense-dialog .field-section {
display: flex;
@@ -1988,13 +2305,20 @@ i.lethalfantasy {
justify-content: left;
}
.lethalfantasy-range-defense-dialog .field-name {
width: 4rem;
min-width: 4rem;
max-width: 4rem;
width: 5rem;
min-width: 5rem;
max-width: 5em;
}
.dialog-form .form-footer {
padding: 4px;
gap: 4px;
}
.dialog-form .form-footer button {
min-width: 14rem;
min-height: 3.2rem;
min-width: 8rem;
min-height: 2rem;
padding: 2px 6px;
margin: 0;
font-size: calc(var(--font-size-standard) * 0.9);
}
.dialog-modifier {
display: flex;
@@ -2034,6 +2358,15 @@ i.lethalfantasy {
font-size: calc(var(--font-size-standard) * 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 {
flex-direction: column;
}
@@ -2078,6 +2411,111 @@ i.lethalfantasy {
font-size: calc(var(--font-size-standard) * 1);
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 .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 {
position: absolute;
left: 75px;
@@ -2109,8 +2547,9 @@ i.lethalfantasy {
padding-bottom: 0;
width: max-content;
margin: 0;
color: #252424;
}
#token-hud .hp-loss-wrap .hud-loss-hp-button-select {
padding-left: 8px;
font-size: 0.7rem;
font-size: 0.9rem;
}

View File

@@ -1,6 +1,6 @@
{
"COMBAT": {
"Round": "Second",
"Round": "Second {round}",
"Rounds": "Seconds",
"RoundNext": "Next second"
},
@@ -83,7 +83,7 @@
},
"challenges": {
"agility": {
"label": "Agility"
"label": "Dexterity"
},
"dying": {
"label": "Dying"
@@ -181,7 +181,7 @@
},
"challenges": {
"agility": {
"label": "Agility"
"label": "Dexterity"
},
"dying": {
"label": "Dying"
@@ -281,6 +281,9 @@
}
},
"Label": {
"agility": "Dexterity",
"applyDamage": "Apply damage to:",
"rollDamage": "Roll Damage",
"gotoToken": "Go to token",
"combatAction": "Combat action",
"currentAction": "Current ongoing action",
@@ -348,7 +351,7 @@
"cha": "CHA",
"challenge": "Challenge",
"challenges": {
"agility": "Agility",
"agility": "Dexterity",
"dying": "Dying",
"strength": "Strength"
},
@@ -420,7 +423,9 @@
"monster-damage": "Monster damage",
"monster-defense": "Monster defense",
"weapons": "Weapons",
"wis": "WIS"
"wis": "WIS",
"weapon-damage-medium": "Weapon damage medium",
"weapon-damage-small": "Weapon damage small"
},
"Miracle": {
"FIELDS": {
@@ -855,6 +860,20 @@
"melee": "Melee",
"ranged": "Ranged"
}
},
"Dialog": {
"applyDamageTo": "Apply damage to",
"weapon": "Weapon",
"totalDamage": "Total Damage",
"damageReduction": "Damage Reduction",
"armorDR": "Armor DR",
"shieldDR": "Shield DR",
"totalDR": "Total DR",
"selectOption": "Select damage application option",
"noDR": "No DR",
"withArmor": "With Armor DR only",
"withAll": "With Armor + Shield DR",
"damage": "damage"
}
},
"TYPES": {

View File

@@ -152,6 +152,65 @@ 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")
// 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
}
// 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) => {

View File

@@ -2,17 +2,53 @@
/* -------------------------------------------- */
export class LethalFantasyCombatTracker extends foundry.applications.sidebar.tabs.CombatTracker {
async getData(options) {
let data = await super.getData(options);
for (let u of data.turns) {
static PARTS = {
"header": {
"template": "systems/fvtt-lethal-fantasy/templates/combat-tracker-header-v2.hbs"
},
"tracker": {
"template": "systems/fvtt-lethal-fantasy/templates/combat-tracker-v2.hbs"
},
"footer": {
"template": "systems/fvtt-lethal-fantasy/templates/combat-tracker-footer-v2.hbs"
}
}
static DEFAULT_OPTIONS = foundry.utils.mergeObject(super.DEFAULT_OPTIONS, {
actions: {
initiativePlus: LethalFantasyCombatTracker.#initiativePlus,
initiativeMinus: LethalFantasyCombatTracker.#initiativeMinus,
},
});
async _prepareContext(options) {
let data = await super._prepareContext(options);
console?.log("Combat Tracker Data", data);
/*for (let u of data.turns) {
let c = game.combat.combatants.get(u.id);
u.progressionCount = c.system.progressionCount
u.isMonster = c.actor.type === "monster"
}
console.log("Combat Data", data);
console.log("Combat Data", data);*/
return data;
}
static #initiativePlus(ev) {
ev.preventDefault();
let cId = ev.target.closest(".combatant").dataset.combatantId;
let c = game.combat.combatants.get(cId);
c.update({ 'initiative': c.initiative + 1 });
console.log("Initiative Plus");
}
static #initiativeMinus(ev) {
ev.preventDefault();
let cId = ev.target.closest(".combatant").dataset.combatantId;
let c = game.combat.combatants.get(cId);
let newInit = Math.max(c.initiative - 1, 0);
c.update({ 'initiative': newInit });
}
activateListeners(html) {
super.activateListeners(html);
// Display Combat settings
@@ -21,7 +57,6 @@ export class LethalFantasyCombatTracker extends foundry.applications.sidebar.tab
let cId = ev.currentTarget.closest(".combatant").dataset.combatantId;
let c = game.combat.combatants.get(cId);
c.update({ 'initiative': c.initiative + 1 });
console.log("Initiative Plus");
});
html.find(".initiative-minus").click(ev => {
@@ -160,10 +195,10 @@ export class LethalFantasyCombat extends Combat {
}
for (let c of this.combatants) {
if ( nextRound >= c.initiative) {
if (nextRound >= c.initiative) {
let user = game.users.find(u => u.active && u.character && u.character.id === c.actor.id);
if (user?.hasPlayerOwner) {
game.socket.emit(`system.${SYSTEM.id}`, { type: "rollProgressionDice", progressionCount: c.system.progressionCount+1, actorId: c.actor.id, combatId: this.id, combatantId: c.id });
game.socket.emit(`system.${SYSTEM.id}`, { type: "rollProgressionDice", progressionCount: c.system.progressionCount + 1, actorId: c.actor.id, combatId: this.id, combatantId: c.id });
} else {
user = game.users.find(u => u.active && u.isGM);
c.actor.system.rollProgressionDice(this.id, c.id);

View File

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

View File

@@ -59,18 +59,15 @@ export default class LethalFantasyItemSheet extends HandlebarsApplicationMixin(f
/** @override */
async _prepareContext() {
let context = await super._prepareContext()
const contextLocal = {
fields: this.document.schema.fields,
systemFields: this.document.system.schema.fields,
item: this.document,
system: this.document.system,
source: this.document.toObject(),
enrichedDescription: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true }),
isEditMode: this.isEditMode,
isPlayMode: this.isPlayMode,
isEditable: this.isEditable,
}
context = mergeObject(context, contextLocal)
context.fields = this.document.schema.fields
context.systemFields = this.document.system.schema.fields
context.item = this.document
context.system = this.document.system
context.source = this.document.toObject()
context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true })
context.isEditMode = this.isEditMode
context.isPlayMode = this.isPlayMode
context.isEditable = this.isEditable
return context
}
@@ -97,7 +94,7 @@ export default class LethalFantasyItemSheet extends HandlebarsApplicationMixin(f
dragover: this._onDragOver.bind(this),
drop: this._onDrop.bind(this),
}
return new DragDrop(d)
return new foundry.applications.ux.DragDrop.implementation(d)
})
}

View File

@@ -95,6 +95,9 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet
const doc = this.document
switch (partId) {
case "main":
context.armorDR = this.actor.getArmorDR()
context.damageReduction = this.actor.computeDamageReduction()
context.damageReductionShield = this.actor.getShieldDR()
break
case "skills":
context.tab = context.tabs.skills
@@ -143,7 +146,7 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet
const data = foundry.applications.ux.TextEditor.implementation.getDragEventData(event)
// Handle different data types
if (data.type === "Item") {
if (data.type === "Item") {
const item = await fromUuid(data.uuid)
return this._onDropItem(item)
}
@@ -246,7 +249,6 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet
async _onRoll(event, target) {
if (this.isEditMode) return
console.log("Roll event", event)
const rollType = event.target.dataset.rollType
let rollKey = event.target.dataset.rollKey;
let rollDice = event.target.dataset?.rollDice;

View File

@@ -19,10 +19,4 @@ export default class LethalFantasyGiftSheet extends LethalFantasyItemSheet {
},
}
/** @override */
async _prepareContext() {
const context = await super._prepareContext()
context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true })
return context
}
}

View File

@@ -44,109 +44,121 @@ export const MONEY = {
}
export const MORTAL_CHOICES = {
"mankind": {label: "Mankind", id: "mankind", defenseBonus: 0},
"elf": {label: "Elf", id: "elf", defenseBonus: 0},
"dwarf": {label: "Dwarf", id: "dwarf", defenseBonus: 0},
"halfelf": {label: "Half-Elf", id: "halfelf", defenseBonus: 0},
"halforc": {label: "Half-Orc", id: "halforc", defenseBonus: 0},
"gnome": {label: "Gnome", id: "gnome", defenseBonus: 2},
"halflings": {label: "Halflings", id: "halflings", defenseBonus: 2}
"mankind": { label: "Mankind", id: "mankind", defenseBonus: 0 },
"elf": { label: "Elf", id: "elf", defenseBonus: 0 },
"dwarf": { label: "Dwarf", id: "dwarf", defenseBonus: 0 },
"halfelf": { label: "Half-Elf", id: "halfelf", defenseBonus: 0 },
"halforc": { label: "Half-Orc", id: "halforc", defenseBonus: 0 },
"gnome": { label: "Gnome", id: "gnome", defenseBonus: 2 },
"halflings": { label: "Halfling", id: "halflings", defenseBonus: 2 }
}
export const FAVOR_CHOICES = {
"none": {label: "None", value: "none"},
"favor": {label: "Favor", value: "favor"},
"disfavor": {label: "Disfavor", value: "disfavor"}
"none": { label: "None", value: "none" },
"favor": { label: "Favor", value: "favor" },
"disfavor": { label: "Disfavor", value: "disfavor" }
}
export const MOVEMENT_CHOICES = {
"none": {label: "None (D8E)", value: "D8"},
"walk": {label: "Walk (D10E)", value: "D10"},
"jog": {label: "Jog (D12E)", value: "D12"},
"run": {label: "Run (D20E)", value: "D20"},
"incombat": {label: "In Combat (D12E)", value: "D12"}
"none": { label: "None (D20E Disfavor)", disfavor: true, value: "2D20kl" },
"walk": { label: "Walk (D20E)", disfavor: true, value: "D20" },
"incombat": { label: "In Combat (D20E)", favor: false, value: "D20" },
"run": { label: "Jog/Run/Sprint (D20E Favor)", favor: true, value: "2D20kh" }
}
export const MOVE_DIRECTION_CHOICES = {
"none": {label: "None (+0)", value: "0"},
"away": {label: "Away (+4)", value: "+4"},
"toward": {label: "Toward (+0)", value: "0"},
"lateral": {label: "Lateral (+10)", value: "+10"}
"away": { label: "Away (+0)", value: "+0" },
"toward": { label: "Toward (0)", value: "0" },
"lateral": { label: "Lateral (Red +5)", value: "+5" },
"none": { label: "None (+0)", value: "0" },
}
export const SIZE_CHOICES = {
"tiny": {label: "Tiny (+10)", value: "+10"},
"small": {label: "Small (+5)", value: "+5"},
"medium": {label: "Medium (+0)", value: "0"},
"huge": {label: "Huge (-10)", value: "-10"}
"tiny": { label: "Tiny (Blue +11)", value: "+11" },
"small": { label: "Small (Purple +7)", value: "+7" },
"medium": { label: "Medium (Red +5)", value: "+5" },
"large": { label: "Large (Yellow +1)", value: "+1" },
"huge": { label: "Huge (0)", value: "0" }
}
export const RANGE_CHOICES = {
"pointblank": {label: "Point Blank (-5)", value: "-5"},
"short": {label: "Short (+0)", value: "0"},
"medium": {label: "Medium (+8)", value: "+8"},
"long": {label: "Long (+15)", value: "+15"},
"extreme": {label: "Extreme (+20)", value: "+20"},
"beyondskill": {label: "Beyond Skill (+25)", value: "+25"}
"pointblank": { label: "Point Blank (Special)", value: "pointblank" },
"short": { label: "Short (+0)", value: "0" },
"medium": { label: "Medium (Red +5)", value: "+5" },
"long": { label: "Long (Purle +7)", value: "+7" },
"extreme": { label: "Extreme (Grey +9)", value: "+9" },
"beyondskill": { label: "Beyond Skill (Blue +11)", value: "beyondskill" }
}
export const ATTACKER_AIM_CHOICES = {
"simple": {label: "Simple (+0)", value: "0"},
"careful": {label: "Careful (-4)", value: "-4"},
"focused": {label: "Focused (-8)", value: "-8"}
"simple": { label: "Simple (+0)", value: "0" },
"careful": { label: "Careful (Red +5)", value: "+4" },
"focused": { label: "Focused (Grey +9)", value: "+9" }
}
export const SPELL_LETHARGY_DICE = [
{dice: "D6", level: "1-5", value: "6", maxLevel: 5},
{dice: "D8", level: "6-10", value: "8", maxLevel: 10},
{dice: "D10", value: "10", level: "11-15", maxLevel: 15},
{dice: "D12", value: "12", level: "16-20", maxLevel: 20},
{dice: "D20", value: "20", level: "21-25", maxLevel: 25}
{ dice: "D6", level: "1-5", value: "6", maxLevel: 5 },
{ dice: "D8", level: "6-10", value: "8", maxLevel: 10 },
{ dice: "D10", value: "10", level: "11-15", maxLevel: 15 },
{ dice: "D12", value: "12", level: "16-20", maxLevel: 20 },
{ 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 = {
"untrained": [
{ "name": "Asleep or totally distracted (2D12)", "value": "2D12" },
{ "name": "Awake but unsuspecting (2D8)", "value": "2D8" },
{ "name": "Declared Ready on Alert (2D6)", "value": "2D6" },
{ "name": "Aware of the enemy, can hear them but not see (2D4)", "value": "2D4" },
{ "name": "Aware and know exactly where the enemy is (2D3)", "value": "2D3" }
/*{ "name": "Aware of the enemy, can hear them but not see (2D4)", "value": "2D4" },
{ "name": "Aware and know exactly where the enemy is (2D3)", "value": "2D3" }*/
],
"fighter": [
{ "name": "Asleep or totally distracted (1D12)", "value": "1D12" },
{ "name": "Awake but unsuspecting (1D8)", "value": "1D8" },
{ "name": "Declared Ready on Alert (1D6)", "value": "1D6" },
{ "name": "Aware of the enemy, can hear them but not see (1D4)", "value": "1D4" },
{ "name": "Aware and know exactly where the enemy is (1D3)", "value": "1D3" }
{ "name": "Declared Ready on Alert (1)", "value": "1" },
/*{ "name": "Aware of the enemy, can hear them but not see (1D4)", "value": "1D4" },
{ "name": "Aware and know exactly where the enemy is (1D3)", "value": "1D3" }*/
],
"rogue": [
{ "name": "Asleep or totally distracted (1D10)", "value": "1D10" },
{ "name": "Awake but unsuspecting (1D8)", "value": "1D8" },
{ "name": "Declared Ready on Alert (1D6)", "value": "1D6" },
{ "name": "Aware of the enemy, can hear them but not see (1D3)", "value": "1D3" },
{ "name": "Aware and know exactly where the enemy is (1D2)", "value": "1D2" }
{ "name": "Declared Ready on Alert (1)", "value": "1" },
/*{ "name": "Aware of the enemy, can hear them but not see (1D3)", "value": "1D3" },
{ "name": "Aware and know exactly where the enemy is (1D2)", "value": "1D2" }*/
],
"ranger": [
{ "name": "Asleep or totally distracted (1D10)", "value": "1D10" },
{ "name": "Awake but unsuspecting (1D8)", "value": "1D8" },
{ "name": "Declared Ready on Alert (1D6)", "value": "1D6" },
{ "name": "Aware of the enemy, can hear them but not see (1D4)", "value": "1D4" },
{ "name": "Aware and know exactly where the enemy is (1D3)", "value": "1D3"}
{ "name": "Declared Ready on Alert (1)", "value": "1" },
/*{ "name": "Aware of the enemy, can hear them but not see (1D4)", "value": "1D4" },
{ "name": "Aware and know exactly where the enemy is (1D3)", "value": "1D3" }*/
],
"cleric": [
{ "name": "Asleep or totally distracted (1D12)", "value": "1D12" },
{ "name": "Awake but unsuspecting (1D10)", "value": "1D10" },
{ "name": "Declared Ready on Alert (1D8)", "value": "1D8" },
{ "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": "Declared Ready on Alert (1)", "value": "1" },
/*{ "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" }*/
],
"magicuser": [
{ "name": "Sleeping to recover Aether Points (2D20)", "value": "2D20" },
{ "name": "Asleep or totally distracted (1D20)", "value": "1D20" },
{ "name": "Awake but unsuspecting (1D12)", "value": "1D12" },
{ "name": "Declared Ready on Alert (1D10)", "value": "1D10" },
{ "name": "Aware of the enemy, can hear them but not see (1D8)", "value": "1D8" },
{ "name": "Aware and know exactly where the enemy is (1D6)", "value": "1D6" }
{ "name": "Declared Ready on Alert (1)", "value": "1" },
/*{ "name": "Aware of the enemy, can hear them but not see (1D8)", "value": "1D8" },
{ "name": "Aware and know exactly where the enemy is (1D6)", "value": "1D6" }*/
]
}
@@ -160,12 +172,12 @@ export const CHAR_CLASSES = {
}
export const CHAR_CLASSES_DEFINES = {
"untrained": {id: "untrained", label: "Untrained"},
"fighter": {id: "fighter", label: "Fighter"},
"rogue": {id: "rogue", label: "Rogue"},
"ranger": {id: "ranger", label: "Ranger"},
"cleric": {id: "cleric", label: "Cleric"},
"magicuser": {id: "magicuser", label: "Magic User"}
"untrained": { id: "untrained", label: "Untrained" },
"fighter": { id: "fighter", label: "Fighter" },
"rogue": { id: "rogue", label: "Rogue" },
"ranger": { id: "ranger", label: "Ranger" },
"cleric": { id: "cleric", label: "Cleric" },
"magicuser": { id: "magicuser", label: "Magic User" }
}
export const DICE_VALUES = {
@@ -178,10 +190,10 @@ export const DICE_VALUES = {
"d20": "D20"
}
export const CHARACTERISTIC_ATTACK = [ "str", "int", "wis", "dex"]
export const CHARACTERISTIC_RANGED_ATTACK = [ "int", "wis", "dex"]
export const CHARACTERISTIC_DEFENSE = [ "int", "wis", "dex" ]
export const CHARACTERISTIC_DAMAGE = [ "str" ]
export const CHARACTERISTIC_ATTACK = ["str", "int", "wis", "dex"]
export const CHARACTERISTIC_RANGED_ATTACK = ["int", "wis", "dex"]
export const CHARACTERISTIC_DEFENSE = ["int", "wis", "dex"]
export const CHARACTERISTIC_DAMAGE = ["str"]
export const DEFENSE_DICE_VALUES = {
"0": "0",
@@ -217,41 +229,41 @@ export const SPELL_CRITICAL = {
}
export const CHOICE_MODIFIERS = {
"-9": "-9",
"-8": "-8",
"-7": "-7",
"-6": "-6",
"-5": "-5",
"-4": "-4",
"-3": "-3",
"-2": "-2",
"-1": "-1",
"+0": "0",
"+1": "+1",
"+2": "+2",
"+3": "+3",
"+4": "+4",
"+5": "+5",
"+6": "+6",
"+7": "+7",
"+8": "+8",
"+9": "+9",
"+10": "+10",
"+11": "+11",
"+12": "+12",
"+13": "+13",
"+14": "+14",
"+15": "+15",
"+16": "+16",
"+17": "+17",
"+18": "+18",
"+19": "+19",
"+20": "+20",
"+21": "+21",
"+22": "+22",
"+23": "+23",
"+24": "+24",
"+25": "+25"
"-9": "-9",
"-8": "-8",
"-7": "-7",
"-6": "-6",
"-5": "-5",
"-4": "-4",
"-3": "-3",
"-2": "-2",
"-1": "-1",
"+0": "0",
"+1": "+1",
"+2": "+2",
"+3": "+3",
"+4": "+4",
"+5": "+5",
"+6": "+6",
"+7": "+7",
"+8": "+8",
"+9": "+9",
"+10": "+10",
"+11": "+11",
"+12": "+12",
"+13": "+13",
"+14": "+14",
"+15": "+15",
"+16": "+16",
"+17": "+17",
"+18": "+18",
"+19": "+19",
"+20": "+20",
"+21": "+21",
"+22": "+22",
"+23": "+23",
"+24": "+24",
"+25": "+25"
}
export const ASCII = `
@@ -310,5 +322,6 @@ export const SYSTEM = {
MORTAL_CHOICES,
SPELL_CRITICAL,
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
}
@@ -79,7 +79,69 @@ export default class LethalFantasyActor extends Actor {
}
/* *************************************************/
async prepareRoll(rollType, rollKey, rollDice ) {
computeDamageReduction() {
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() {
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)
let rollTarget
switch (rollType) {
@@ -89,7 +151,7 @@ export default class LethalFantasyActor extends Actor {
formula: foundry.utils.duplicate(this.system.granted[rollKey]),
rollKey: rollKey
}
if ( rollTarget.formula === "" || rollTarget.formula === undefined) {
if (rollTarget.formula === "" || rollTarget.formula === undefined) {
rollTarget.formula = 0
}
break;
@@ -126,60 +188,64 @@ export default class LethalFantasyActor extends Actor {
rollTarget.rollKey = rollKey
break
case "shield-roll": {
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())
rollTarget.skill = shieldSkill
rollTarget.rollKey = 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())
rollTarget.skill = shieldSkill
rollTarget.rollKey = rollKey
}
break;
case "weapon-damage-small":
case "weapon-damage-medium":
case "weapon-attack":
case "weapon-defense": {
let weapon = this.items.find((i) => i.type === "weapon" && i.id === rollKey)
let skill
let skills = this.items.filter((i) => i.type === "skill" && i.name.toLowerCase() === weapon.name.toLowerCase())
let weapon = this.items.find((i) => i.type === "weapon" && i.id === rollKey)
let skill
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) {
skill = this.getBestWeaponClassSkill(skills, rollType, 1.0)
} else {
skills = this.items.filter((i) => i.type === "skill" && i.name.toLowerCase().replace(" skill", "") === weapon.name.toLowerCase())
skills = this.items.filter((i) => i.type === "skill" && i.system.category === "weapon" && i.system.weaponClass === weapon.system.weaponClass)
if (skills.length > 0) {
skill = this.getBestWeaponClassSkill(skills, rollType, 1.0)
skill = this.getBestWeaponClassSkill(skills, rollType, 0.5)
} 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) {
skill = this.getBestWeaponClassSkill(skills, rollType, 0.5)
skill = this.getBestWeaponClassSkill(skills, rollType, 0.25)
} else {
skills = this.items.filter((i) => i.type === "skill" && i.system.weaponClass.includes(SYSTEM.WEAPON_CATEGORIES[weapon.system.weaponClass]))
if (skills.length > 0) {
skill = this.getBestWeaponClassSkill(skills, rollType, 0.25)
} else {
ui.notifications.warn(game.i18n.localize("LETHALFANTASY.Notifications.skillNotFound"))
return
}
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
default:
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
}
get rollData() {
return this.options.rollData
}
/**
* Prompt the user with a dialog to configure and execute a roll.
*
@@ -124,21 +128,24 @@ export default class LethalFantasyRoll extends Roll {
let hasFavor = false
let hasMaxValue = true
let hasGrantedDice = false
let pointBlank = false
let letItFly = false
let saveSpell = false
let beyondSkill = false
let hasStaticModifier = false
let hasExplode = true
let actor = game.actors.get(options.actorId)
if (options.rollType === "challenge" || options.rollType === "save") {
options.rollName = game.i18n.localize(`LETHALFANTASY.Label.${options.rollTarget.rollKey}`)
hasD30 = options.rollType === "save"
if (options.rollTarget.rollKey === "dying") {
dice = options.rollTarget.value
maxValue = Number(options.rollTarget.value.match(/\d+/)[0])
hasModifier = false
hasChangeDice = true
hasFavor = true
} else {
dice = "1D20"
maxValue = 20
hasFavor = true
}
@@ -148,7 +155,6 @@ export default class LethalFantasyRoll extends Roll {
dice = options.rollTarget.formula
baseFormula = options.rollTarget.formula
hasModifier = false
maxValue = 100
hasMaxValue = false
hasChangeDice = false
hasFavor = false
@@ -158,7 +164,6 @@ export default class LethalFantasyRoll extends Roll {
options.rollName = options.rollTarget.name
dice = "1D20"
baseFormula = "D20"
maxValue = 20
hasModifier = true
hasChangeDice = false
hasFavor = true
@@ -172,29 +177,27 @@ export default class LethalFantasyRoll extends Roll {
} else if (options.rollType === "monster-skill") {
options.rollName = game.i18n.localize(`LETHALFANTASY.Label.${options.rollTarget.rollKey}`)
dice = "1D100"
baseFormula = "D100"
maxValue = 100
dice = "1D20"
baseFormula = "D20"
hasModifier = true
hasFavor = true
hasChangeDice = false
} else if (options.rollType === "skill") {
options.rollName = options.rollTarget.name
dice = "1D100"
baseFormula = "D100"
maxValue = 100
hasD30 = true
dice = "1D20"
baseFormula = "D20"
hasModifier = true
hasFavor = true
hasChangeDice = false
options.rollTarget.value = options.rollTarget.system.skillTotal
options.rollTarget.value = Math.floor(options.rollTarget.system.skillTotal / 10)
} else if (options.rollType === "weapon-attack" || options.rollType === "weapon-defense") {
hasD30 = true
options.rollName = options.rollTarget.name
dice = "1D20"
baseFormula = "D20"
maxValue = 20
hasModifier = true
hasChangeDice = false
hasFavor = true
@@ -207,7 +210,7 @@ export default class LethalFantasyRoll extends Roll {
options.rollTarget.charModifier = options.rollTarget.combat.rangedAttackModifier
}
} else {
options.rollTarget.value = options.rollTarget.combat.defenseModifier + options.rollTarget.weaponSkillModifier + options.rollTarget.weapon.system.bonuses.defenseBonus
options.rollTarget.value = options.rollTarget.combat.defenseModifier + options.rollTarget.weaponSkillModifier + options.rollTarget.weapon.system.bonuses.defenseBonus + options.rollTarget.armorDefense
options.rollTarget.charModifier = options.rollTarget.combat.defenseModifier
}
@@ -216,7 +219,6 @@ export default class LethalFantasyRoll extends Roll {
options.rollName = options.rollTarget.name
dice = "1D20"
baseFormula = "D20"
maxValue = 20
hasModifier = true
hasChangeDice = false
options.rollTarget.value = options.rollTarget.actorModifiers.levelSpellModifier + options.rollTarget.actorModifiers.intSpellModifier
@@ -234,7 +236,6 @@ export default class LethalFantasyRoll extends Roll {
options.rollName = options.rollTarget.name
dice = "1D20"
baseFormula = "D20"
maxValue = 20
hasChangeDice = false
options.rollTarget.value = options.rollTarget.actorModifiers.levelMiracleModifier + options.rollTarget.actorModifiers.chaMiracleModifier
options.rollTarget.charModifier = options.rollTarget.actorModifiers.chaMiracleModifier
@@ -259,19 +260,21 @@ export default class LethalFantasyRoll extends Roll {
} else if (options.rollType.includes("weapon-damage")) {
options.rollName = options.rollTarget.name
options.isDamage = true
hasModifier = true
hasChangeDice = false
let damageBonus = (options.rollTarget.weapon.system.applyStrengthDamageBonus) ? options.rollTarget.combat.damageModifier : 0
options.rollTarget.value = damageBonus + options.rollTarget.weaponSkillModifier + options.rollTarget.weapon.system.bonuses.damageBonus
options.rollTarget.charModifier = damageBonus
if (options.rollType.includes("small")) {
options.damageSmall = true
dice = options.rollTarget.weapon.system.damage.damageS
} else {
options.damageMedium = true
dice = options.rollTarget.weapon.system.damage.damageM
}
dice = dice.replace("E", "")
baseFormula = dice
maxValue = 20
} else if (options.rollType.includes("monster-damage")) {
options.rollName = options.rollTarget.name
@@ -282,7 +285,6 @@ export default class LethalFantasyRoll extends Roll {
dice = options.rollTarget.damageDice
dice = dice.replace("E", "")
baseFormula = dice
maxValue = 20
}
@@ -317,7 +319,10 @@ export default class LethalFantasyRoll extends Roll {
hasModifier,
hasFavor,
hasChangeDice,
pointBlank,
baseValue: options.rollTarget.value,
attackerAimChoices: SYSTEM.ATTACKER_AIM_CHOICES,
attackerAim: "0",
changeDice: `${dice}`,
fieldRollMode,
choiceModifier,
@@ -357,9 +362,21 @@ export default class LethalFantasyRoll extends Roll {
],
actions: {
"selectGranted": (event, button, dialog) => {
hasGrantedDice = true
hasGrantedDice = event.target.checked
},
"gotoToken" : (event, button, dialog) => {
"selectBeyondSkill": (event, button, dialog) => {
beyondSkill = button.checked
},
"selectPointBlank": (event, button, dialog) => {
pointBlank = button.checked
},
"selectLetItFly": (event, button, dialog) => {
letItFly = button.checked
},
"saveSpellCheck": (event, button, dialog) => {
saveSpell = button.checked
},
"gotoToken": (event, button, dialog) => {
let tokenId = $(button).data("tokenId")
let token = canvas.tokens?.get(tokenId)
if (token) {
@@ -375,6 +392,7 @@ export default class LethalFantasyRoll extends Roll {
// If the user cancels the dialog, exit
if (rollContext === null) return
console.log("rollContext", rollContext, hasGrantedDice)
rollContext.saveSpell = saveSpell // Update fucking flag
let fullModifier = 0
let titleFormula = ""
@@ -383,21 +401,19 @@ export default class LethalFantasyRoll extends Roll {
let bonus = Number(options.rollTarget.value)
fullModifier = rollContext.modifier === "" ? 0 : parseInt(rollContext.modifier, 10) + bonus
fullModifier += (rollContext.saveSpell) ? options.rollTarget.actorModifiers.saveModifier : 0
if (Number(rollContext.attackerAim) > 0) {
fullModifier += Number(rollContext.attackerAim)
}
if (fullModifier === 0) {
modifierFormula = "0"
} else {
if (options.rollType === "skill" || options.rollType === "monster-skill") {
modifierFormula = `${fullModifier}`
} else {
let modAbs = Math.abs(fullModifier)
modifierFormula = `D${modAbs + 1} - 1`
}
let modAbs = Math.abs(fullModifier)
modifierFormula = `D${modAbs + 1} - 1`
}
if (hasStaticModifier) {
modifierFormula += ` + ${options.rollTarget.staticModifier}`
}
// modifierFormula += ` + ${options.rollTarget.charModifier}`
let sign = fullModifier < 0 ? "-" : "+"
if (hasExplode) {
titleFormula = `${dice}E ${sign} ${modifierFormula}`
@@ -415,6 +431,14 @@ export default class LethalFantasyRoll extends Roll {
}
}
// Latest addition : favor choice at point blank range
if (pointBlank) {
rollContext.favor = "favor"
}
if (beyondSkill) {
rollContext.favor = "disfavor"
}
// Specific pain case
if (options.rollType === "save" && options.rollTarget.rollKey === "pain" || options.rollTarget.rollKey === "paincourage") {
baseFormula = options.rollTarget.rollDice
@@ -424,8 +448,21 @@ export default class LethalFantasyRoll extends Roll {
}
// 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
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
@@ -440,6 +477,12 @@ export default class LethalFantasyRoll extends Roll {
actorImage: options.actorImage,
rollMode: rollContext.visibility,
hasTarget: options.hasTarget,
isDamage: options.isDamage,
damageSmall: options.damageSmall,
damageMedium: options.damageMedium,
pointBlank,
beyondSkill,
letItFly,
hasGrantedDice,
titleFormula,
targetName,
@@ -466,15 +509,17 @@ export default class LethalFantasyRoll extends Roll {
if (rollContext.favor === "favor") {
rollFavor = new this(baseFormula, options.data, rollData)
await rollFavor.evaluate()
console.log("Rolling with favor", rollFavor)
if (game?.dice3d) {
game.dice3d.showForRoll(rollFavor, game.user, true)
}
if (rollFavor.result > rollBase.result) {
if (Number(rollFavor.result) > Number(rollBase.result)) {
badResult = rollBase.result
rollBase = rollFavor
} else {
badResult = rollFavor.result
}
rollFavor = null
}
if (rollContext.favor === "disfavor") {
@@ -483,12 +528,13 @@ export default class LethalFantasyRoll extends Roll {
if (game?.dice3d) {
game.dice3d.showForRoll(rollFavor, game.user, true)
}
if (rollFavor.result < rollBase.result) {
if (Number(rollFavor.result) < Number(rollBase.result)) {
badResult = rollBase.result
rollBase = rollFavor
} else {
badResult = rollFavor.result
}
rollFavor = null
}
if (hasD30) {
@@ -499,7 +545,7 @@ export default class LethalFantasyRoll extends Roll {
options.D30result = rollD30.total
}
let rollTotal = -1
let rollTotal = 0
let diceResults = []
let resultType
let diceSum = 0
@@ -524,7 +570,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)
await grantedRoll.evaluate()
if (game?.dice3d) {
@@ -537,12 +584,12 @@ export default class LethalFantasyRoll extends Roll {
if (fullModifier !== 0) {
diceResults.push({ dice: `${rollModifier.formula.toUpperCase()}`, value: rollModifier.total })
if (fullModifier < 0) {
rollTotal = Math.max(diceSum - rollModifier.total, 0)
rollTotal += Math.max(diceSum - rollModifier.total, 0)
} else {
rollTotal = diceSum + rollModifier.total
rollTotal += diceSum + rollModifier.total
}
} else {
rollTotal = diceSum
rollTotal += diceSum
}
rollBase.options.resultType = resultType
@@ -552,6 +599,7 @@ export default class LethalFantasyRoll extends Roll {
rollBase.options.titleFormula = titleFormula
rollBase.options.D30result = options.D30result
rollBase.options.badResult = badResult
rollBase.options.rollData = foundry.utils.duplicate(rollData)
/**
* A hook event that fires after the roll has been made.
@@ -590,7 +638,6 @@ export default class LethalFantasyRoll extends Roll {
fieldRollMode,
rollModes
}
console.log("CTX", dialogContext)
const content = await foundry.applications.handlebars.renderTemplate("systems/fvtt-lethal-fantasy/templates/roll-initiative-dialog.hbs", dialogContext)
@@ -625,7 +672,6 @@ export default class LethalFantasyRoll extends Roll {
let combat = game.combats.get(options.combatId)
combat.updateEmbeddedDocuments("Combatant", [{ _id: options.combatantId, initiative: initRoll.total, 'system.progressionCount': 0 }]);
}
}
/* ***********************************************************/
@@ -769,7 +815,7 @@ export default class LethalFantasyRoll extends Roll {
await combatant.setFlag(SYSTEM.id, "currentAction", actionItem)
let message = `${combatant.name} action : ${selectedItem.name}, start rolling progression dice or casting time`
ChatMessage.create({ content: message, speaker: ChatMessage.getSpeaker({ actor: combatant.actor }) })
rollContext = (actionItem.type == "weapon") ? "rollProgressionDice" : "rollLethargyDice" // Set the roll context to rollProgressionDice
rollContext = (actionItem.type === "weapon") ? "rollProgressionDice" : "rollLethargyDice" // Set the roll context to rollProgressionDice
currentAction = actionItem
}
@@ -888,9 +934,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({
choices: rollModes,
blank: false,
@@ -905,15 +951,14 @@ export default class LethalFantasyRoll extends Roll {
attackerAimChoices: SYSTEM.ATTACKER_AIM_CHOICES,
movement: "none",
moveDirection: "none",
size: "medium",
size: "+5",
range: "short",
attackerAim: "simple",
fieldRollMode,
rollModes
}
console.log("CTX", dialogContext)
const content = await 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)
const label = game.i18n.localize("LETHALFANTASY.Label.rangeDefenseRoll")
const rollContext = await foundry.applications.api.DialogV2.wait({
@@ -935,27 +980,41 @@ export default class LethalFantasyRoll extends Roll {
rejectClose: false // Click on Close button will not launch an error
})
// If the user cancels the dialog, exit
if (rollContext === null) return
console.log("RollContext", rollContext)
// Add disfavor/favor option if point blank range
if (rollContext.range === "pointblank") {
rollContext.movement = rollContext.movement.replace("kh", "")
rollContext.movement = rollContext.movement.replace("kl", "")
rollContext.movement += "kl" // Add the kl to the movement (disfavor for point blank range)
rollContext.range = "0"
}
if (rollContext.range === "beyondskill") {
rollContext.movement = rollContext.movement.replace("kh", "")
rollContext.movement = rollContext.movement.replace("kl", "")
rollContext.movement += "kh" // Add the kl to the movement (favor for point blank range)
rollContext.range = "+11"
}
// Build the final modifier
let fullModifier = Number(rollContext.moveDirection) +
Number(rollContext.size) +
Number(rollContext.range) +
Number(rollContext.attackerAim)
console.log("Modifier", fullModifier)
Number(rollContext?.attackerAim || 0)
let modifierFormula
if (fullModifier === 0) {
modifierFormula = "0"
} else {
let modAbs = Math.abs(fullModifier)
modifierFormula = `${modAbs}`
modifierFormula = `D${modAbs + 1} -1`
}
// If the user cancels the dialog, exit
if (rollContext === null) return
let rollData = { ...rollContext }
let options = { ...rollContext }
// Merge rollContext object into options object
options = { ...options, ...rollContext }
options.rollName = "Ranged Defense"
const rollBase = new this(rollContext.movement, options.data, rollData)
@@ -965,8 +1024,17 @@ export default class LethalFantasyRoll extends Roll {
let rollD30 = await new Roll("1D30").evaluate()
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 maxValue = Number(dice.match(/\d+$/)[0]) // Update the max value agains
let maxValue = 20 // As per latest changes (was : Number(dice.match(/\d+$/)[0])
let rollTotal = -1
let diceResults = []
let resultType
@@ -990,15 +1058,16 @@ export default class LethalFantasyRoll extends Roll {
} else {
rollTotal = diceSum
}
rollBase.options = { ...rollBase.options, ...options }
rollBase.options.resultType = resultType
rollBase.options.rollTotal = rollTotal
rollBase.options.diceResults = diceResults
rollBase.options.rollTarget = options.rollTarget
rollBase.options.titleFormula = `${dice}E + ${modifierFormula}`
rollBase.options.titleFormula = `1D20E + ${modifierFormula}`
rollBase.options.D30result = options.D30result
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.
* @function
@@ -1060,6 +1129,30 @@ export default class LethalFantasyRoll extends Roll {
* Generates the data required for rendering a roll chat card.
*/
async _getChatCardData(isPrivate) {
// Générer la liste des combatants de la scène
let combatants = []
if (game?.combat?.combatants && this.rollData?.isDamage) {
for (let c of game.combat.combatants) {
if (c.actorId !== this.actorId) {
combatants.push({ id: c.id, name: c.name })
}
}
}
// 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)
}
const cardData = {
css: [SYSTEM.id, "dice-roll"],
data: this.data,
@@ -1082,7 +1175,10 @@ export default class LethalFantasyRoll extends Roll {
targetArmor: this.targetArmor,
D30result: this.D30result,
badResult: this.badResult,
isPrivate: isPrivate
rollData: this.rollData,
isPrivate: isPrivate,
combatants: combatants,
weaponDamageOptions: weaponDamageOptions
}
cardData.cssClass = cardData.css.join(" ")
cardData.tooltip = isPrivate ? "" : await this.getTooltip()
@@ -1113,6 +1209,7 @@ export default class LethalFantasyRoll extends Roll {
targetArmor: this.targetArmor,
targetMalus: this.targetMalus,
realDamage: this.realDamage,
rollData: this.rollData,
...messageData,
},
{ 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 })
})
schema.granted = new fields.SchemaField({
attackDice: new fields.StringField({ required: true, nullable: false, initial: "" }),
defenseDice: new fields.StringField({ required: true, nullable: false, initial: "" }),
damageDice: new fields.StringField({ required: true, nullable: false, initial: "" })
attackDice: new fields.StringField({ required: true, nullable: false, initial: "0", choices: SYSTEM.GRANTED_DICE_CHOICES }),
defenseDice: new fields.StringField({ required: true, nullable: false, initial: "0", choices: SYSTEM.GRANTED_DICE_CHOICES }),
damageDice: new fields.StringField({ required: true, nullable: false, initial: "0", choices: SYSTEM.GRANTED_DICE_CHOICES })
})
schema.movement = new fields.SchemaField({
@@ -120,6 +120,8 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod
magicUser: new fields.BooleanField({ initial: false }),
clericUser: new fields.BooleanField({ initial: false }),
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({
@@ -179,13 +181,13 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod
if (!SYSTEM.MORTAL_CHOICES[data.biodata.mortal]) {
for (let key in SYSTEM.MORTAL_CHOICES) {
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
}
if ( data.biodata.mortal.toLowerCase().includes("shire")) {
if (data.biodata.mortal.toLowerCase().includes("shire")) {
data.biodata.mortal = "halflings"
}
if ( data.biodata.mortal.toLowerCase().includes("human")) {
if (data.biodata.mortal.toLowerCase().includes("human")) {
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.challenges.dying.value = conDef.stabilization_dice
this.saves.contagion.value = this.characteristics.con.value + this.modifiers.saveModifier
this.saves.poison.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.combat.attackModifier = 0
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 maxInit = Number(wisDef.init_cap) || 1000
console.log("Rolling initiative for", this)
let roll = await LethalFantasyRoll.promptInitiative({
actorId: this.parent.id,

View File

@@ -73,6 +73,7 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
defenseModifier: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
damageDice: new fields.StringField({ required: true, nullable: false, initial: "1D6" }),
damageModifier: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
enabled: new fields.BooleanField({ initial: true, required: true, nullable: false }),
}
return new fields.SchemaField(schema, { label })
}
@@ -108,9 +109,9 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
schema.biodata = new fields.SchemaField({
alignment: new fields.StringField({ required: true, nullable: false, initial: "" }),
vision: new fields.StringField({ required: true, nullable: false, initial: "" }),
height: new fields.StringField({ required: true, nullable: false, initial: "" }),
height: new fields.StringField({ required: true, nullable: false, initial: "" }),
length: new fields.StringField({ required: true, nullable: false, initial: "" }),
weight: new fields.StringField({ required: true, nullable: false, initial: "" })
weight: new fields.StringField({ required: true, nullable: false, initial: "" })
})
schema.combat = new fields.SchemaField({
attackModifier: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
@@ -170,7 +171,7 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
case "weapon-damage-small":
case "weapon-damage-medium":
case "weapon-attack":
case "weapon-defense":
case "weapon-defense": {
let weapon = this.actor.items.find((i) => i.type === "weapon" && i.id === rollKey)
let skill
let skills = this.actor.items.filter((i) => i.type === "skill" && i.name.toLowerCase() === weapon.name.toLowerCase())
@@ -205,6 +206,7 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
rollTarget.weaponSkillModifier = skill.weaponSkillModifier
rollTarget.rollKey = rollKey
rollTarget.combat = foundry.utils.duplicate(this.combat)
}
break
default:
ui.notifications.error(game.i18n.localize("LETHALFANTASY.Notifications.rollTypeNotFound") + String(rollType))
@@ -238,18 +240,18 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
async rollProgressionDice(combatId, combatantId) {
const rollModes = 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({
choices: rollModes,
blank: false,
default: "public",
})
let roll = new Roll("1D8")
let roll = new Roll("1D12")
await roll.evaluate()
let combatant = game.combats.get(combatId)?.combatants?.get(combatantId)
let msg = await roll.toMessage({ flavor: `Progression Roll for ${this.parent.name}` } )
let msg = await roll.toMessage({ flavor: `Progression Roll for ${this.parent.name}` })
if (game?.dice3d) {
await game.dice3d.waitFor3DAnimationByMessageID(msg.id)
}
@@ -257,14 +259,14 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
let hasAttack = false
for (let key in this.attacks) {
let attack = this.attacks[key]
if (attack.attackScore > 0 && attack.attackScore === roll.total) {
if (attack.enabled && attack.attackScore > 0 && attack.attackScore === roll.total) {
hasAttack = true
let message = game.i18n.format("LETHALFANTASY.Notifications.messageProgressionOKMonster", { isMonster: true, name: this.parent.name, weapon: attack.name, roll: roll.total })
ChatMessage.create({ content: message, speaker: ChatMessage.getSpeaker({ actor: this.parent }) })
let token = combatant?.token
this.prepareMonsterRoll("monster-attack", key, undefined, token?.id)
if ( token?.object ) {
token.object?.control({releaseOthers: true});
if (token?.object) {
token.object?.control({ releaseOthers: true });
return canvas.animatePan(token.object.center);
}
}
@@ -272,7 +274,7 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
if (!hasAttack) {
let message = game.i18n.format("LETHALFANTASY.Notifications.messageProgressionKOMonster", { isMonster: true, name: this.parent.name, roll: roll.total })
ChatMessage.create({ content: message, speaker: ChatMessage.getSpeaker({ actor: this.parent }) })
}
}
}

View File

@@ -6,9 +6,10 @@ export default class LethalFantasyShield extends foundry.abstract.TypeDataModel
const requiredInteger = { required: true, nullable: false, integer: 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.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({
min: new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }),

View File

@@ -22,43 +22,43 @@ export default class LethalFantasyUtils {
static setHookListeners() {
Hooks.on('renderTokenHUD', async (hud, html, token) => {
const lossHPButton = await foundry.applications.handlebars.renderTemplate('systems/fvtt-lethal-fantasy/templates/loss-hp-hud.hbs', {} )
const lossHPButton = await foundry.applications.handlebars.renderTemplate('systems/fvtt-lethal-fantasy/templates/loss-hp-hud.hbs', {})
$(html).find('div.left').append(lossHPButton);
$(html).find('img.lethal-hp-loss-hud').click((event) => {
event.preventDefault();
let hpMenu = $(html).find('.hp-loss-wrap')[0]
if (hpMenu.classList.contains("hp-loss-hud-disabled")) {
$(html).find('.hp-loss-wrap')[0].classList.add('hp-loss-hud-active');
$(html).find('.hp-loss-wrap')[0].classList.remove('hp-loss-hud-disabled');
$(html).find('.hp-loss-wrap')[1].classList.add('hp-loss-hud-active');
$(html).find('.hp-loss-wrap')[1].classList.remove('hp-loss-hud-disabled');
$(html).find('.hp-loss-wrap')[2].classList.add('hp-loss-hud-active');
$(html).find('.hp-loss-wrap')[2].classList.remove('hp-loss-hud-disabled');
} else {
$(html).find('.hp-loss-wrap')[0].classList.remove('hp-loss-hud-active');
$(html).find('.hp-loss-wrap')[0].classList.add('hp-loss-hud-disabled');
$(html).find('.hp-loss-wrap')[1].classList.remove('hp-loss-hud-active');
$(html).find('.hp-loss-wrap')[1].classList.add('hp-loss-hud-disabled');
$(html).find('.hp-loss-wrap')[2].classList.remove('hp-loss-hud-active');
$(html).find('.hp-loss-wrap')[2].classList.add('hp-loss-hud-disabled');
}
})
$(html).find('.loss-hp-hud-click').click((event) => {
event.preventDefault();
let hpLoss = event.currentTarget.dataset.hpValue;
if (token) {
let tokenFull = canvas.tokens.placeables.find( t => t.id === token._id);
console.log(tokenFull, token)
let actor = tokenFull.actor;
actor.applyDamage(Number(hpLoss));
$(html).find('.hp-loss-wrap')[0].classList.remove('hp-loss-hud-active');
$(html).find('.hp-loss-wrap')[0].classList.add('hp-loss-hud-disabled');
$(html).find('.hp-loss-wrap')[1].classList.remove('hp-loss-hud-active');
$(html).find('.hp-loss-wrap')[1].classList.add('hp-loss-hud-disabled');
$(html).find('.hp-loss-wrap')[2].classList.remove('hp-loss-hud-active');
$(html).find('.hp-loss-wrap')[2].classList.add('hp-loss-hud-disabled');
}
})
$(html).find('img.lethal-hp-loss-hud').click((event) => {
event.preventDefault();
let hpMenu = $(html).find('.hp-loss-wrap')[0]
if (hpMenu.classList.contains("hp-loss-hud-disabled")) {
$(html).find('.hp-loss-wrap')[0].classList.add('hp-loss-hud-active');
$(html).find('.hp-loss-wrap')[0].classList.remove('hp-loss-hud-disabled');
$(html).find('.hp-loss-wrap')[1].classList.add('hp-loss-hud-active');
$(html).find('.hp-loss-wrap')[1].classList.remove('hp-loss-hud-disabled');
$(html).find('.hp-loss-wrap')[2].classList.add('hp-loss-hud-active');
$(html).find('.hp-loss-wrap')[2].classList.remove('hp-loss-hud-disabled');
} else {
$(html).find('.hp-loss-wrap')[0].classList.remove('hp-loss-hud-active');
$(html).find('.hp-loss-wrap')[0].classList.add('hp-loss-hud-disabled');
$(html).find('.hp-loss-wrap')[1].classList.remove('hp-loss-hud-active');
$(html).find('.hp-loss-wrap')[1].classList.add('hp-loss-hud-disabled');
$(html).find('.hp-loss-wrap')[2].classList.remove('hp-loss-hud-active');
$(html).find('.hp-loss-wrap')[2].classList.add('hp-loss-hud-disabled');
}
})
$(html).find('.loss-hp-hud-click').click((event) => {
event.preventDefault();
let hpLoss = event.currentTarget.dataset.hpValue;
if (token) {
let tokenFull = canvas.tokens.placeables.find(t => t.id === token._id);
console.log(tokenFull, token)
let actor = tokenFull.actor;
actor.applyDamage(Number(hpLoss));
$(html).find('.hp-loss-wrap')[0].classList.remove('hp-loss-hud-active');
$(html).find('.hp-loss-wrap')[0].classList.add('hp-loss-hud-disabled');
$(html).find('.hp-loss-wrap')[1].classList.remove('hp-loss-hud-active');
$(html).find('.hp-loss-wrap')[1].classList.add('hp-loss-hud-disabled');
$(html).find('.hp-loss-wrap')[2].classList.remove('hp-loss-hud-active');
$(html).find('.hp-loss-wrap')[2].classList.add('hp-loss-hud-disabled');
}
})
})
}
@@ -246,4 +246,100 @@ export default class LethalFantasyUtils {
}
}
/* -------------------------------------------- */
static async applyDamage(message, event) {
// Récupérer les données du message
let combatantId = event.currentTarget.dataset.combatantId
if (!combatantId || !game.combat) {
ui.notifications.error("No combatant selected")
return
}
let combatant = game.combat.combatants.get(combatantId)
if (!combatant) {
ui.notifications.error("Combatant not found")
return
}
let targetActor = combatant.token?.actor || game.actors.get(combatant.actorId)
if (!targetActor) {
ui.notifications.error("Target actor not found")
return
}
// Récupérer les données de dégâts du message
let damageTotal = message.rolls[0]?.total || 0
let weaponName = message.rolls[0]?.options?.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-000336
MANIFEST-000465

View File

@@ -1,8 +1,8 @@
2025/05/14-09:18:06.447327 7f5ccd7fa6c0 Recovering log #334
2025/05/14-09:18:06.457498 7f5ccd7fa6c0 Delete type=3 #332
2025/05/14-09:18:06.457555 7f5ccd7fa6c0 Delete type=0 #334
2025/05/14-10:01:12.490342 7f5ccb7ff6c0 Level-0 table #339: started
2025/05/14-10:01:12.490385 7f5ccb7ff6c0 Level-0 table #339: 0 bytes OK
2025/05/14-10:01:12.496360 7f5ccb7ff6c0 Delete type=0 #337
2025/05/14-10:01:12.515162 7f5ccb7ff6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
2025/05/14-10:01:12.515209 7f5ccb7ff6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
2025/12/14-20:51:28.512263 7f17053ff6c0 Recovering log #462
2025/12/14-20:51:28.522433 7f17053ff6c0 Delete type=3 #460
2025/12/14-20:51:28.522511 7f17053ff6c0 Delete type=0 #462
2025/12/14-21:17:40.691121 7f16eeffd6c0 Level-0 table #468: started
2025/12/14-21:17:40.691177 7f16eeffd6c0 Level-0 table #468: 0 bytes OK
2025/12/14-21:17:40.697563 7f16eeffd6c0 Delete type=0 #466
2025/12/14-21:17:40.718082 7f16eeffd6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
2025/12/14-21:17:40.718119 7f16eeffd6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)

View File

@@ -1,8 +1,15 @@
2025/05/14-07:47:09.475124 7f5ccd7fa6c0 Recovering log #330
2025/05/14-07:47:09.486681 7f5ccd7fa6c0 Delete type=3 #328
2025/05/14-07:47:09.486812 7f5ccd7fa6c0 Delete type=0 #330
2025/05/14-08:06:15.866972 7f5ccb7ff6c0 Level-0 table #335: started
2025/05/14-08:06:15.867049 7f5ccb7ff6c0 Level-0 table #335: 0 bytes OK
2025/05/14-08:06:15.873425 7f5ccb7ff6c0 Delete type=0 #333
2025/05/14-08:06:15.893680 7f5ccb7ff6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
2025/05/14-08:06:15.893803 7f5ccb7ff6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
2025/12/14-09:09:25.826835 7f17053ff6c0 Recovering log #458
2025/12/14-09:09:25.838032 7f17053ff6c0 Delete type=3 #456
2025/12/14-09:09:25.838116 7f17053ff6c0 Delete type=0 #458
2025/12/14-20:45:56.707785 7f16eeffd6c0 Level-0 table #463: started
2025/12/14-20:45:56.710879 7f16eeffd6c0 Level-0 table #463: 1677 bytes OK
2025/12/14-20:45:56.716936 7f16eeffd6c0 Delete type=0 #461
2025/12/14-20:45:56.730287 7f16eeffd6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
2025/12/14-20:45:56.730345 7f16eeffd6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at '!items!VFHTlDVKj2yNJEWi' @ 1129 : 1
2025/12/14-20:45:56.730356 7f16eeffd6c0 Compacting 1@1 + 1@2 files
2025/12/14-20:45:56.736659 7f16eeffd6c0 Generated table #464@1: 485 keys, 217363 bytes
2025/12/14-20:45:56.736680 7f16eeffd6c0 Compacted 1@1 + 1@2 files => 217363 bytes
2025/12/14-20:45:56.742890 7f16eeffd6c0 compacted to: files[ 0 0 1 0 0 0 0 ]
2025/12/14-20:45:56.742996 7f16eeffd6c0 Delete type=2 #323
2025/12/14-20:45:56.743249 7f16eeffd6c0 Delete type=2 #463
2025/12/14-20:45:56.750017 7f16eeffd6c0 Manual compaction at level-1 from '!items!VFHTlDVKj2yNJEWi' @ 1129 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1 +1 @@
MANIFEST-000335
MANIFEST-000464

View File

@@ -1,8 +1,8 @@
2025/05/14-09:18:06.461139 7f5ccdffb6c0 Recovering log #333
2025/05/14-09:18:06.471748 7f5ccdffb6c0 Delete type=3 #331
2025/05/14-09:18:06.471810 7f5ccdffb6c0 Delete type=0 #333
2025/05/14-10:01:12.509221 7f5ccb7ff6c0 Level-0 table #338: started
2025/05/14-10:01:12.509244 7f5ccb7ff6c0 Level-0 table #338: 0 bytes OK
2025/05/14-10:01:12.515073 7f5ccb7ff6c0 Delete type=0 #336
2025/05/14-10:01:12.515202 7f5ccb7ff6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end)
2025/05/14-10:01:12.515252 7f5ccb7ff6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end)
2025/12/14-20:51:28.526428 7f16effff6c0 Recovering log #462
2025/12/14-20:51:28.536097 7f16effff6c0 Delete type=3 #460
2025/12/14-20:51:28.536151 7f16effff6c0 Delete type=0 #462
2025/12/14-21:17:40.711547 7f16eeffd6c0 Level-0 table #467: started
2025/12/14-21:17:40.711584 7f16eeffd6c0 Level-0 table #467: 0 bytes OK
2025/12/14-21:17:40.717934 7f16eeffd6c0 Delete type=0 #465
2025/12/14-21:17:40.718128 7f16eeffd6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
2025/12/14-21:17:40.718154 7f16eeffd6c0 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/05/14-07:47:09.493325 7f5ccc7f86c0 Recovering log #329
2025/05/14-07:47:09.503988 7f5ccc7f86c0 Delete type=3 #327
2025/05/14-07:47:09.504090 7f5ccc7f86c0 Delete type=0 #329
2025/05/14-08:06:15.873602 7f5ccb7ff6c0 Level-0 table #334: started
2025/05/14-08:06:15.873653 7f5ccb7ff6c0 Level-0 table #334: 0 bytes OK
2025/05/14-08:06:15.879920 7f5ccb7ff6c0 Delete type=0 #332
2025/05/14-08:06:15.893720 7f5ccb7ff6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end)
2025/05/14-08:06:15.893853 7f5ccb7ff6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!zjvGljrLk5SshC9D' @ 0 : 0; will stop at (end)
2025/12/14-09:09:25.859023 7f16ef7fe6c0 Recovering log #458
2025/12/14-09:09:25.869163 7f16ef7fe6c0 Delete type=3 #456
2025/12/14-09:09:25.869258 7f16ef7fe6c0 Delete type=0 #458
2025/12/14-20:45:56.717084 7f16eeffd6c0 Level-0 table #463: started
2025/12/14-20:45:56.717117 7f16eeffd6c0 Level-0 table #463: 0 bytes OK
2025/12/14-20:45:56.723011 7f16eeffd6c0 Delete type=0 #461
2025/12/14-20:45:56.730301 7f16eeffd6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
2025/12/14-20:45:56.743359 7f16eeffd6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1 +1 @@
MANIFEST-000335
MANIFEST-000466

View File

@@ -1,8 +1,8 @@
2025/05/14-09:18:06.433768 7f5ccc7f86c0 Recovering log #333
2025/05/14-09:18:06.444450 7f5ccc7f86c0 Delete type=3 #331
2025/05/14-09:18:06.444513 7f5ccc7f86c0 Delete type=0 #333
2025/05/14-10:01:12.502915 7f5ccb7ff6c0 Level-0 table #338: started
2025/05/14-10:01:12.502947 7f5ccb7ff6c0 Level-0 table #338: 0 bytes OK
2025/05/14-10:01:12.509102 7f5ccb7ff6c0 Delete type=0 #336
2025/05/14-10:01:12.515190 7f5ccb7ff6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
2025/05/14-10:01:12.515243 7f5ccb7ff6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
2025/12/14-20:51:28.497448 7f1704bfe6c0 Recovering log #464
2025/12/14-20:51:28.507553 7f1704bfe6c0 Delete type=3 #462
2025/12/14-20:51:28.507622 7f1704bfe6c0 Delete type=0 #464
2025/12/14-21:17:40.697721 7f16eeffd6c0 Level-0 table #469: started
2025/12/14-21:17:40.697764 7f16eeffd6c0 Level-0 table #469: 0 bytes OK
2025/12/14-21:17:40.703907 7f16eeffd6c0 Delete type=0 #467
2025/12/14-21:17:40.718096 7f16eeffd6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
2025/12/14-21:17:40.718137 7f16eeffd6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)

View File

@@ -1,8 +1,8 @@
2025/05/14-07:47:09.459336 7f5ccdffb6c0 Recovering log #329
2025/05/14-07:47:09.470303 7f5ccdffb6c0 Delete type=3 #327
2025/05/14-07:47:09.470418 7f5ccdffb6c0 Delete type=0 #329
2025/05/14-08:06:15.886675 7f5ccb7ff6c0 Level-0 table #334: started
2025/05/14-08:06:15.886731 7f5ccb7ff6c0 Level-0 table #334: 0 bytes OK
2025/05/14-08:06:15.893424 7f5ccb7ff6c0 Delete type=0 #332
2025/05/14-08:06:15.893775 7f5ccb7ff6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
2025/05/14-08:06:15.893909 7f5ccb7ff6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
2025/12/14-09:09:25.806646 7f16effff6c0 Recovering log #460
2025/12/14-09:09:25.817606 7f16effff6c0 Delete type=3 #458
2025/12/14-09:09:25.817666 7f16effff6c0 Delete type=0 #460
2025/12/14-20:45:56.701142 7f16eeffd6c0 Level-0 table #465: started
2025/12/14-20:45:56.701194 7f16eeffd6c0 Level-0 table #465: 0 bytes OK
2025/12/14-20:45:56.707652 7f16eeffd6c0 Delete type=0 #463
2025/12/14-20:45:56.730266 7f16eeffd6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
2025/12/14-20:45:56.730327 7f16eeffd6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)

Binary file not shown.

Binary file not shown.

View File

@@ -1 +1 @@
MANIFEST-000035
MANIFEST-000164

View File

@@ -1,8 +1,8 @@
2025/05/14-09:18:06.487926 7f5ccc7f86c0 Recovering log #33
2025/05/14-09:18:06.497838 7f5ccc7f86c0 Delete type=3 #31
2025/05/14-09:18:06.497894 7f5ccc7f86c0 Delete type=0 #33
2025/05/14-10:01:12.535301 7f5ccb7ff6c0 Level-0 table #38: started
2025/05/14-10:01:12.535349 7f5ccb7ff6c0 Level-0 table #38: 0 bytes OK
2025/05/14-10:01:12.541664 7f5ccb7ff6c0 Delete type=0 #36
2025/05/14-10:01:12.541942 7f5ccb7ff6c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
2025/05/14-10:01:12.541971 7f5ccb7ff6c0 Manual compaction at level-1 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
2025/12/14-20:51:28.551833 7f16ef7fe6c0 Recovering log #162
2025/12/14-20:51:28.562344 7f16ef7fe6c0 Delete type=3 #160
2025/12/14-20:51:28.562406 7f16ef7fe6c0 Delete type=0 #162
2025/12/14-21:17:40.735101 7f16eeffd6c0 Level-0 table #167: started
2025/12/14-21:17:40.735151 7f16eeffd6c0 Level-0 table #167: 0 bytes OK
2025/12/14-21:17:40.741604 7f16eeffd6c0 Delete type=0 #165
2025/12/14-21:17:40.771470 7f16eeffd6c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
2025/12/14-21:17:40.781560 7f16eeffd6c0 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/05/14-07:47:09.521604 7f5ccd7fa6c0 Recovering log #29
2025/05/14-07:47:09.533204 7f5ccd7fa6c0 Delete type=3 #27
2025/05/14-07:47:09.533353 7f5ccd7fa6c0 Delete type=0 #29
2025/05/14-08:06:15.894136 7f5ccb7ff6c0 Level-0 table #34: started
2025/05/14-08:06:15.894209 7f5ccb7ff6c0 Level-0 table #34: 0 bytes OK
2025/05/14-08:06:15.900873 7f5ccb7ff6c0 Delete type=0 #32
2025/05/14-08:06:15.921517 7f5ccb7ff6c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
2025/05/14-08:06:15.921613 7f5ccb7ff6c0 Manual compaction at level-1 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
2025/12/14-09:09:25.891410 7f17053ff6c0 Recovering log #158
2025/12/14-09:09:25.901634 7f17053ff6c0 Delete type=3 #156
2025/12/14-09:09:25.901690 7f17053ff6c0 Delete type=0 #158
2025/12/14-20:45:56.743394 7f16eeffd6c0 Level-0 table #163: started
2025/12/14-20:45:56.743431 7f16eeffd6c0 Level-0 table #163: 0 bytes OK
2025/12/14-20:45:56.749813 7f16eeffd6c0 Delete type=0 #161
2025/12/14-20:45:56.767206 7f16eeffd6c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
2025/12/14-20:45:56.791687 7f16eeffd6c0 Manual compaction at level-1 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)

Binary file not shown.

View File

@@ -1 +1 @@
MANIFEST-000335
MANIFEST-000463

View File

@@ -1,8 +1,8 @@
2025/05/14-09:18:06.475503 7f5cccff96c0 Recovering log #333
2025/05/14-09:18:06.485731 7f5cccff96c0 Delete type=3 #331
2025/05/14-09:18:06.485791 7f5cccff96c0 Delete type=0 #333
2025/05/14-10:01:12.496479 7f5ccb7ff6c0 Level-0 table #338: started
2025/05/14-10:01:12.496503 7f5ccb7ff6c0 Level-0 table #338: 0 bytes OK
2025/05/14-10:01:12.502768 7f5ccb7ff6c0 Delete type=0 #336
2025/05/14-10:01:12.515177 7f5ccb7ff6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
2025/05/14-10:01:12.515216 7f5ccb7ff6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
2025/12/14-20:51:28.538266 7f1704bfe6c0 Recovering log #461
2025/12/14-20:51:28.549289 7f1704bfe6c0 Delete type=3 #459
2025/12/14-20:51:28.549364 7f1704bfe6c0 Delete type=0 #461
2025/12/14-21:17:40.704054 7f16eeffd6c0 Level-0 table #466: started
2025/12/14-21:17:40.704085 7f16eeffd6c0 Level-0 table #466: 0 bytes OK
2025/12/14-21:17:40.711382 7f16eeffd6c0 Delete type=0 #464
2025/12/14-21:17:40.718108 7f16eeffd6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
2025/12/14-21:17:40.718145 7f16eeffd6c0 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/05/14-07:47:09.507023 7f5ccdffb6c0 Recovering log #329
2025/05/14-07:47:09.517849 7f5ccdffb6c0 Delete type=3 #327
2025/05/14-07:47:09.517975 7f5ccdffb6c0 Delete type=0 #329
2025/05/14-08:06:15.880220 7f5ccb7ff6c0 Level-0 table #334: started
2025/05/14-08:06:15.880293 7f5ccb7ff6c0 Level-0 table #334: 0 bytes OK
2025/05/14-08:06:15.886487 7f5ccb7ff6c0 Delete type=0 #332
2025/05/14-08:06:15.893747 7f5ccb7ff6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
2025/05/14-08:06:15.893881 7f5ccb7ff6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
2025/12/14-09:09:25.874671 7f16effff6c0 Recovering log #457
2025/12/14-09:09:25.886173 7f16effff6c0 Delete type=3 #455
2025/12/14-09:09:25.886272 7f16effff6c0 Delete type=0 #457
2025/12/14-20:45:56.723132 7f16eeffd6c0 Level-0 table #462: started
2025/12/14-20:45:56.723164 7f16eeffd6c0 Level-0 table #462: 0 bytes OK
2025/12/14-20:45:56.730108 7f16eeffd6c0 Delete type=0 #460
2025/12/14-20:45:56.730316 7f16eeffd6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
2025/12/14-20:45:56.743378 7f16eeffd6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)

View File

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

View File

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

View File

@@ -6,6 +6,17 @@
--logo-standard: url("../assets/ui/lf_logo_small_02.webp");
}
.initiative-area {
min-width: 8rem;
max-width: 8rem;
display: flex;
flex-direction: row;
input {
min-width: 3rem;
max-width: 3rem;
}
}
#logo {
content: var(--logo-standard);
width: 50px;

View File

@@ -35,9 +35,10 @@
padding-bottom: 0;
width: max-content;
margin: 0;
color:#252424;
}
#token-hud .hp-loss-wrap .hud-loss-hp-button-select {
padding-left: 8px;
font-size: 0.7rem;
font-size: 0.9rem;
}

View File

@@ -6,6 +6,14 @@
background-repeat: no-repeat;
background-size: 100% 100%;
nav.tabs [data-tab] {
color: #636060;
}
nav.tabs [data-tab].active {
color: #252424;
}
input:disabled,
select:disabled {
background-color: rgba(0, 0, 0, 0.2);
@@ -39,11 +47,11 @@
input,
select {
text-align: center;
font-size: calc(var(--font-size-standard) * 1.0);
font-size: calc(var(--font-size-standard) * 1);
}
select {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1.0);
font-size: calc(var(--font-size-standard) * 1);
}
}
@@ -67,23 +75,43 @@
padding-top: 4px;
}
overflow: auto;
.form-group {
display: flex;
flex: 1;
flex-direction: row;
label {
align-content: center;
min-width: 10rem;
max-width: 10rem;
}
select,
input {
text-align: left;
min-width: 12rem;
max-width: 12rem;
}
input[type="checkbox"] {
min-width: 1.2rem;
max-width: 1.2rem;
margin-right: 0.5rem;
}
}
label {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1.0);
font-size: calc(var(--font-size-standard) * 1);
flex: 50%;
}
.align-top {
align-self: flex-start;
padding: 0.1rem;
margin-right: 0.2rem;
/*border-color: black;
border-width: 1px;
border-style: solid;
border-radius: 2%;*/
}
.shift-right {
margin-left: 2rem;
}
}
}

View File

@@ -7,6 +7,65 @@
border-color: var(--color-dark-6);
color: var(--color-dark-2);
}
.apply-damage-dialog {
.dialog-content {
padding: 6px;
font-size: calc(var(--font-size-standard) * 1);
.header {
text-align: center;
padding: 4px;
margin-bottom: 6px;
background-color: rgba(0, 0, 0, 0.1);
border-radius: 3px;
}
.damage-summary {
display: flex;
justify-content: space-between;
align-items: center;
padding: 4px 6px;
margin-bottom: 6px;
background-color: rgba(139, 0, 0, 0.1);
border-radius: 3px;
.damage-value {
color: var(--color-level-error);
font-size: calc(var(--font-size-standard) * 1.2);
font-weight: bold;
}
}
.dr-summary {
display: flex;
justify-content: space-around;
gap: 4px;
padding: 3px;
margin-bottom: 6px;
font-size: calc(var(--font-size-standard) * 0.85);
background-color: rgba(0, 0, 0, 0.05);
border-radius: 3px;
}
.damage-options {
.option-line {
display: flex;
justify-content: space-between;
align-items: center;
padding: 3px 6px;
margin: 2px 0;
background-color: rgba(0, 0, 0, 0.05);
border-radius: 3px;
strong {
color: var(--color-dark-1);
font-size: calc(var(--font-size-standard) * 1.05);
}
}
}
}
}
}
.lethalfantasy-roll-dialog {
@@ -25,7 +84,6 @@
border-radius: 4px;
padding: 0.5rem;
}
}
.lethalfantasy-range-defense-dialog {
@@ -34,10 +92,17 @@
fieldset {
padding: 4px;
}
.fieldset-centered {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
}
select {
margin-left: 0.5rem;
min-width: 10rem;
max-width: 10rem;
min-width: 12rem;
max-width: 12rem;
}
.field-section {
display: flex;
@@ -45,18 +110,22 @@
justify-content: left;
}
.field-name {
width:4rem;
min-width: 4rem;
max-width: 4rem;
width: 5rem;
min-width: 5rem;
max-width: 5em;
}
}
.dialog-form {
.form-footer {
padding: 4px;
gap: 4px;
button {
min-width: 14rem;
min-height: 3.2rem;
min-width: 8rem;
min-height: 2rem;
padding: 2px 6px;
margin: 0;
font-size: calc(var(--font-size-standard) * 0.9);
}
}
}
@@ -87,7 +156,6 @@
}
}
.main,
.dialog-damage,
.dialog-resource,
@@ -99,8 +167,13 @@
justify-content: center;
align-items: center;
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);
select {
min-width: 8rem;
max-width: 8rem;
margin-left: 1rem;
}
}
&.dice-roll {
@@ -133,7 +206,7 @@
flex-direction: column;
.introText {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1.0);
font-size: calc(var(--font-size-standard) * 1);
width: 210px;
margin-left: 20px;
}
@@ -144,7 +217,127 @@
flex-direction: column;
justify-content: 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);
}
.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;
.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">
<fieldset>
<legend>{{localize "LETHALFANTASY.Label.biodata"}}</legend>
<div class="biodata">
<div class="biodata-elem">
<span class="name">Class</span>
{{formInput systemFields.biodata.fields.class value=system.biodata.class }}
</div>
<div class="biodata-elem">
<span class="name">Level</span>
{{formInput systemFields.biodata.fields.level value=system.biodata.level }}
</div>
<div class="biodata-elem">
<span class="name">Mortal</span>
{{formInput systemFields.biodata.fields.mortal value=system.biodata.mortal }}
</div>
<div class="biodata-elem">
<span class="name">Alignment</span>
{{formInput systemFields.biodata.fields.alignment value=system.biodata.alignment }}
</div>
<div class="biodata-elem">
<span class="name">Age</span>
{{formInput systemFields.biodata.fields.age value=system.biodata.age }}
</div>
<div class="biodata-elem">
<span class="name">Height</span>
{{formInput systemFields.biodata.fields.height value=system.biodata.height }}
</div>
<div class="biodata-elem">
<span class="name">Weight</span>
{{formInput systemFields.biodata.fields.weight value=system.biodata.weight }}
</div>
<div class="biodata-elem">
<span class="name">Eyes</span>
{{formInput systemFields.biodata.fields.eyes value=system.biodata.eyes }}
</div>
<div class="biodata-elem">
<span class="name">Hair</span>
{{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>
<fieldset>
<legend>{{localize "LETHALFANTASY.Label.biodata"}}</legend>
<div class="biodata">
<div class="biodata-elem">
<span class="name">Class</span>
{{formInput
systemFields.biodata.fields.class
value=system.biodata.class
}}
</div>
<div class="biodata-elem">
<span class="name">Level</span>
{{formInput
systemFields.biodata.fields.level
value=system.biodata.level
}}
</div>
<div class="biodata-elem">
<span class="name">Mortal</span>
{{formInput
systemFields.biodata.fields.mortal
value=system.biodata.mortal
}}
</div>
<div class="biodata-elem">
<span class="name">Alignment</span>
{{formInput
systemFields.biodata.fields.alignment
value=system.biodata.alignment
}}
</div>
<div class="biodata-elem">
<span class="name">Age</span>
{{formInput systemFields.biodata.fields.age value=system.biodata.age}}
</div>
<div class="biodata-elem">
<span class="name">Height</span>
{{formInput
systemFields.biodata.fields.height
value=system.biodata.height
}}
</div>
<div class="biodata-elem">
<span class="name">Weight</span>
{{formInput
systemFields.biodata.fields.weight
value=system.biodata.weight
}}
</div>
<div class="biodata-elem">
<span class="name">Eyes</span>
{{formInput
systemFields.biodata.fields.eyes
value=system.biodata.eyes
}}
</div>
<div class="biodata-elem">
<span class="name">Hair</span>
{{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}}
<div class="biodata-elem">
<span class="name">Spell bonus (1/5levels)</span>
{{formInput systemFields.modifiers.fields.levelSpellModifier value=system.modifiers.levelSpellModifier disabled=true}}
</div>
{{/if}}
{{#if system.biodata.clericUser}}
<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}}
{{#if system.biodata.magicUser}}
<div class="biodata-elem">
<span class="name">Spell bonus (1/5levels)</span>
{{formInput
systemFields.modifiers.fields.levelSpellModifier
value=system.modifiers.levelSpellModifier
disabled=true
}}
</div>
{{/if}}
{{#if system.biodata.clericUser}}
<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">
<span class="name">Last HD roll</span>
{{formInput systemFields.biodata.fields.hpPerLevel value=system.biodata.hpPerLevel disabled=true}}
</div>
<div class="biodata-elem">
<span class="name">Last HD roll</span>
{{formInput
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>
</fieldset>
<div class="biodata-elem">
<span class="name">Magical DR</span>
{{formInput
systemFields.biodata.fields.magicDR
value=system.biodata.magicDR
disabled=isPlayMode
}}
</div>
<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>
{{formInput systemFields.notes enriched=enrichedNotes value=system.notes name="system.notes" toggled=true}}
</fieldset>
<fieldset>
<legend>{{localize "LETHALFANTASY.Label.description"}}</legend>
{{formInput
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>
</section>

View File

@@ -1,161 +1,165 @@
<section class="tab character-{{tab.id}} {{tab.cssClass}}" data-tab="combat" data-group="sheet">
<div class="main-div">
<fieldset>
<legend>{{localize "LETHALFANTASY.Label.combatDetails"}}</legend>
<div class="combat-details">
<div class="combat-detail">
<fieldset>
<legend>{{localize "LETHALFANTASY.Label.combatDetails"}}</legend>
<div class="combat-details">
<div class="combat-detail">
<button class="action" data-action="rangedAttackDefense">
{{localize "LETHALFANTASY.Label.rangedAttackDefense"}}
</button>
<button class="action ranged-attack-button" data-action="rangedAttackDefense">
{{localize "LETHALFANTASY.Label.rangedAttackDefense"}}
</button>
<button class="action" data-action="rollInitiative">
{{localize "LETHALFANTASY.Label.rollInitiative"}}
</button>
<button class="action ranged-attack-button" data-action="rollInitiative">
{{localize "LETHALFANTASY.Label.rollInitiative"}}
</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 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>
</fieldset>
</fieldset>
<fieldset>
<legend>{{localize "LETHALFANTASY.Label.wounds"}}</legend>
<div class="wounds">
<fieldset>
<legend>{{localize "LETHALFANTASY.Label.wounds"}}</legend>
<div class="wounds">
{{#each system.hp.wounds as |wound idx|}}
<div class="wound">
Name:<input class="wound-description wound-data" type="text" data-type="String" data-index="{{@index}}" value="{{wound.description}}" data-name="description" >
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" >
Name:<input class="wound-description wound-data" type="text" data-type="String" data-index="{{@index}}"
value="{{wound.description}}" data-name="description">
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>
{{/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>
{{/each}}
</div>
</fieldset>
</fieldset>
<fieldset>
<legend>{{localize "LETHALFANTASY.Label.armors"}}</legend>
<div class="armors">
{{#each armors as |item|}}
<div class="armor" 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">{{item.system.defense}}</div>
<div class="item-detail" data-tooltip="Maximum movement">{{item.system.maximumMovement}}</div>
<div class="item-detail" data-tooltip="HP">{{item.system.hp}}</div>
<div class="item-detail" data-tooltip="Damage Reduction">{{item.system.damageReduction}}</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>
<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" data-tooltip="{{item.system.description}}">
{{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>
{{/each}}
</div>
{{/each}}
</div>
</fieldset>
</fieldset>
<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="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>
<fieldset>
<legend>{{localize "LETHALFANTASY.Label.armors"}}</legend>
<div class="armors">
{{#each armors as |item|}}
<div class="armor" 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">{{item.system.defense}}</div>
<div class="item-detail" data-tooltip="Maximum movement">{{item.system.maximumMovement}}</div>
<div class="item-detail" data-tooltip="HP">{{item.system.hp}}</div>
<div class="item-detail" data-tooltip="Damage Reduction">{{item.system.damageReduction}}</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>
{{/each}}
</div>
</fieldset>
<div>
</fieldset>
<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>

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}}
<fieldset>
@@ -6,163 +8,333 @@
<div class="character-pc character-pc-{{ifThen isPlayMode 'play' 'edit'}}">
<div class="character-left">
<div class="character-left-image">
<img class="character-img" src="{{actor.img}}" data-edit="img" data-action="editImage"
data-tooltip="{{actor.name}}" />
<img
class="character-img"
src="{{actor.img}}"
data-edit="img"
data-action="editImage"
data-tooltip="{{actor.name}}"
/>
</div>
<fieldset class="">
<div class="flexrow character-hp">
<span class="name">{{localize "LETHALFANTASY.Label.HP"}}</span>
{{formInput systemFields.hp.fields.value value=system.hp.value disabled=isPlayMode classes="character-hp-value"}}
{{formInput
systemFields.hp.fields.value
value=system.hp.value
disabled=isPlayMode
classes="character-hp-value"
}}
&nbsp;/&nbsp;
{{formInput systemFields.hp.fields.max value=system.hp.max disabled=isPlayMode classes="character-hp-value"}}
{{formInput
systemFields.hp.fields.max
value=system.hp.max
disabled=isPlayMode
classes="character-hp-value"
}}
</div>
<div class="flexrow character-hp">
<span class="name">{{localize "LETHALFANTASY.Label.grit"}}</span>
{{formInput systemFields.grit.fields.current value=system.grit.current disabled=isPlayMode
classes="character-hp"}}
{{formInput
systemFields.grit.fields.current
value=system.grit.current
disabled=isPlayMode
classes="character-hp"
}}
<span class="name">{{localize "LETHALFANTASY.Label.earned"}}</span>
{{formInput systemFields.grit.fields.earned value=system.grit.earned disabled=isPlayMode
classes="character-hp"}}
{{formInput
systemFields.grit.fields.earned
value=system.grit.earned
disabled=isPlayMode
classes="character-hp"
}}
</div>
<div class="flexrow character-hp">
<span class="name">{{localize "LETHALFANTASY.Label.luck"}}</span>
{{formInput systemFields.luck.fields.current value=system.luck.current disabled=isPlayMode
classes="character-hp"}}
{{formInput
systemFields.luck.fields.current
value=system.luck.current
disabled=isPlayMode
classes="character-hp"
}}
<span class="name">{{localize "LETHALFANTASY.Label.earned"}}</span>
{{formInput systemFields.luck.fields.earned value=system.luck.earned disabled=isPlayMode
classes="character-hp"}}
{{formInput
systemFields.luck.fields.earned
value=system.luck.earned
disabled=isPlayMode
classes="character-hp"
}}
</div>
<div class="flexrow ">
<span class="">{{localize "LETHALFANTASY.Label.damageResistanceShort"}}</span>
{{formInput systemFields.hp.fields.damageResistance value=system.hp.fields.damageResistance disabled=isPlayMode classes="character-hp"}}
</div>
<div class="flexrow">
<span class="" data-tooltip="Damage reduction">{{localize
"LETHALFANTASY.Label.damageResistanceShort"
}}
</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>
</div>
<div class="character-right">
<div class="character-name">
{{formInput fields.name value=source.name rootId=partId disabled=isPlayMode}}
<a class="control" data-action="toggleSheet" data-tooltip="LETHALFANTASY.ToggleSheet"
data-tooltip-direction="UP">
{{formInput
fields.name
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>
</a>
</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>
<div class="character-saves">
<div class="character-save">
<span class="name"><a class="rollable" data-roll-type="save" data-roll-key="will"><i
class="lf-roll-small fa-solid fa-dice-d20"></i>
<span class="name"><a
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"}}
</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">
<a class="rollable" data-roll-type="save" data-roll-key="dodge"><i
class="lf-roll-small fa-solid fa-dice-d20"></i>
<a
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"}}
</a>
</span>
{{formField systemFields.saves.fields.dodge.fields.value value=system.saves.dodge.value
disabled=true}}
{{formField
systemFields.saves.fields.dodge.fields.value
value=system.saves.dodge.value
disabled=true
}}
<span class="name">
<a class="rollable" data-roll-type="save" data-roll-key="toughness"><i
class="lf-roll-small fa-solid fa-dice-d20"></i>
<a
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"}}
</a>
</span>
{{formField systemFields.saves.fields.toughness.fields.value value=system.saves.toughness.value
disabled=true}}
{{formField
systemFields.saves.fields.toughness.fields.value
value=system.saves.toughness.value
disabled=true
}}
</div>
<div class="character-save">
<span class="name">
<a class="rollable" data-roll-type="save" data-roll-key="contagion"><i
class="lf-roll-small fa-solid fa-dice-d20"></i>
<a
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"}}
</a>
</span>
{{formField systemFields.saves.fields.contagion.fields.value value=system.saves.contagion.value
disabled=true}}
</span>
{{formField
systemFields.saves.fields.contagion.fields.value
value=system.saves.contagion.value
disabled=true
}}
<span class="name">
<a 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"}}
<a
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"}}
</a>
</span>
{{formField systemFields.saves.fields.poison.fields.value value=system.saves.poison.value
disabled=true }}
</span>
{{formField
systemFields.saves.fields.poison.fields.value
value=system.saves.poison.value
disabled=true
}}
<!--
<span class="name-pain">
<a class="rollable" data-roll-type="save" data-roll-key="pain" data-roll-dice="D12"><i
<a class="rollable" data-roll-type="save" data-roll-key="pain" data-roll-dice="D12"><i
class="lf-roll-small fa-solid fa-dice-d12"></i>
{{localize "LETHALFANTASY.Label.saves.pain"}}
{{localize "LETHALFANTASY.Label.saves.pain"}}
</a>
</span>
<span class="name-pain">
<a class="rollable" data-roll-type="save" data-roll-key="pain" data-roll-dice="D20"><i
<a class="rollable" data-roll-type="save" data-roll-key="pain" data-roll-dice="D20"><i
class="lf-roll-small fa-solid fa-dice-d20"></i>
{{localize "LETHALFANTASY.Label.saves.pain"}}
{{localize "LETHALFANTASY.Label.saves.pain"}}
</a>
</span>
</span>
{{formField systemFields.saves.fields.pain.fields.value value=system.saves.pain.value disabled=true}}
<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>
-->
</div>
</div>
</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>
<div class="character-challenges">
<div class="character-challenge">
<span class="name"><a class="rollable" data-roll-type="challenge" data-roll-key="str"><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="str"
><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
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="agility"
><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>
</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>
<div class="character-movements">
<div class="character-movement">
<span class="name">{{localize "LETHALFANTASY.Label.movement.walk"}}</span>
{{formField systemFields.movement.fields.walk value=system.movement.walk 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}}
<span class="name">{{localize
"LETHALFANTASY.Label.movement.walk"
}}</span>
{{formField
systemFields.movement.fields.walk
value=system.movement.walk
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 class="character-movement">
<span class="name">{{localize "LETHALFANTASY.Label.movement.jumpBroad"}}</span>
{{formField systemFields.jump.fields.broad 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}}
<span class="name">{{localize
"LETHALFANTASY.Label.movement.jumpBroad"
}}</span>
{{formField
systemFields.jump.fields.broad
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>
</fieldset>
@@ -171,70 +343,124 @@
</div>
</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>
<div class="character-characteristic">
<span>{{localize "LETHALFANTASY.Label.str"}}</span>
{{formField systemFields.characteristics.fields.str.fields.value value=system.characteristics.str.value
disabled=isPlayMode data-char-id="str" }}
{{formField systemFields.characteristics.fields.str.fields.percent value=system.characteristics.str.percent
disabled=isPlayMode type="number"}}
{{formField
systemFields.characteristics.fields.str.fields.value
value=system.characteristics.str.value
disabled=isPlayMode
data-char-id="str"
}}
{{formField
systemFields.characteristics.fields.str.fields.percent
value=system.characteristics.str.percent
disabled=isPlayMode
type="number"
}}
</div>
<div class="character-characteristic">
<span>{{localize "LETHALFANTASY.Label.int"}}</span>
{{formField systemFields.characteristics.fields.int.fields.value value=system.characteristics.int.value
disabled=isPlayMode data-char-id="int" }}
{{formField
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
disabled=isPlayMode type="number" }}
{{formField
systemFields.characteristics.fields.int.fields.percent
value=system.characteristics.int.percent
disabled=isPlayMode
type="number"
}}
</div>
<div class="character-characteristic">
<span>{{localize "LETHALFANTASY.Label.wis"}}</span>
{{formField systemFields.characteristics.fields.wis.fields.value value=system.characteristics.wis.value
disabled=isPlayMode data-char-id="wis" }}
{{formField
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
disabled=isPlayMode type="number"}}
{{formField
systemFields.characteristics.fields.wis.fields.percent
value=system.characteristics.wis.percent
disabled=isPlayMode
type="number"
}}
</div>
<div class="character-characteristic">
<span>{{localize "LETHALFANTASY.Label.dex"}}</span>
{{formField systemFields.characteristics.fields.dex.fields.value value=system.characteristics.dex.value
disabled=isPlayMode data-char-id="wis" }}
{{formField
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
disabled=isPlayMode type="number" }}
{{formField
systemFields.characteristics.fields.dex.fields.percent
value=system.characteristics.dex.percent
disabled=isPlayMode
type="number"
}}
</div>
<div class="character-characteristic">
<span>{{localize "LETHALFANTASY.Label.con"}}</span>
{{formField systemFields.characteristics.fields.con.fields.value value=system.characteristics.con.value
disabled=isPlayMode data-char-id="con" }}
{{formField
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
disabled=isPlayMode type="number"}}
{{formField
systemFields.characteristics.fields.con.fields.percent
value=system.characteristics.con.percent
disabled=isPlayMode
type="number"
}}
</div>
<div class="character-characteristic">
<span>{{localize "LETHALFANTASY.Label.cha"}}</span>
{{formField systemFields.characteristics.fields.cha.fields.value value=system.characteristics.cha.value
disabled=isPlayMode data-char-id="cha" }}
{{formField
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
disabled=isPlayMode type="number"}}
{{formField
systemFields.characteristics.fields.cha.fields.percent
value=system.characteristics.cha.percent
disabled=isPlayMode
type="number"
}}
</div>
<div class="character-characteristic">
<span>{{localize "LETHALFANTASY.Label.luc"}}</span>
{{formField systemFields.characteristics.fields.luc.fields.value value=system.characteristics.luc.value
disabled=isPlayMode data-char-id="luc" }}
{{formField
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
disabled=isPlayMode type="number"}}
</div>
<div class="character-characteristic">
<span>{{localize "LETHALFANTASY.Label.app"}}</span>
{{formField systemFields.characteristics.fields.app.fields.value value=system.characteristics.app.value
disabled=isPlayMode data-char-id="app" }}
{{formField systemFields.characteristics.fields.app.fields.percent value=system.characteristics.app.percent
disabled=isPlayMode type="number"}}
{{formField
systemFields.characteristics.fields.luc.fields.percent
value=system.characteristics.luc.percent
disabled=isPlayMode
type="number"
}}
</div>
</fieldset>

View File

@@ -1,52 +1,52 @@
<section class="tab character-{{tab.id}} {{tab.cssClass}}" data-tab="{{tab.id}}" data-group="{{tab.group}}">
<div class="main-div">
<fieldset>
<legend>{{localize "LETHALFANTASY.Label.divinityPoints"}}</legend>
<div class="miracle-details">
<div class="miracle-detail">
<span >Current</span>
{{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="divinityPointsMinus"><i class="fa-solid fa-hexagon-minus"></i></a>
<fieldset>
<legend>{{localize "LETHALFANTASY.Label.divinityPoints"}}</legend>
<div class="miracle-details">
<div class="miracle-detail">
<span>Current</span>
{{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="divinityPointsMinus"><i class="fa-solid fa-hexagon-minus"></i></a>
<span >Max</span>
{{formField systemFields.divinityPoints.fields.max value=system.divinityPoints.max localize=true disabled=isPlayMode}}
<span>Max</span>
{{formField systemFields.divinityPoints.fields.max value=system.divinityPoints.max localize=true
disabled=isPlayMode}}
</div>
</div>
</div>
</fieldset>
</fieldset>
<fieldset>
<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"
data-action="createMiracle"></i></a>{{/if}}</legend>
<div class="miracles">
{{#each miracles as |item|}}
<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}}" />
<div class="name" >
{{item.name}}
</div>
<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>
</a>
<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>
</a>
<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>
<fieldset>
<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"
data-action="createMiracle"></i></a>{{/if}}</legend>
<div class="miracles">
{{#each miracles as |item|}}
<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}}" />
<div class="name">
{{item.name}}
</div>
<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>
</a>
<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>
</a>
<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>
{{/each}}
</div>
</fieldset>
</div>
</fieldset>
</div>
</section>

View File

@@ -15,38 +15,37 @@
disabled=isPlayMode}}
</div>
</div>
</div>
</fieldset>
</fieldset>
<fieldset>
<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"
data-action="createSpell"></i></a>{{/if}}</legend>
<div class="spells">
{{#each spells as |item|}}
<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}}" />
<div class="name">
{{item.name}}
</div>
<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>
</a>
<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>
</a>
<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>
<fieldset>
<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"
data-action="createSpell"></i></a>{{/if}}</legend>
<div class="spells">
{{#each spells as |item|}}
<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}}" />
<div class="name">
{{item.name}}
</div>
<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>
</a>
<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>
</a>
<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>
{{/each}}
</div>
</fieldset>
</fieldset>
</div>
</section>

View File

@@ -1,4 +1,5 @@
{{!log 'chat-message' this}}
{{!log 'weaponDamageOptions' weaponDamageOptions}}
<div class="{{cssClass}}">
<div class="intro-chat">
<div class="intro-img">
@@ -6,67 +7,167 @@
</div>
<div class="intro-right">
<span>{{upperFirst rollName}}</span>
<span><STRONG>{{actingCharName}} - {{upperFirst rollName}}</STRONG></span>
{{#if (match rollType "attack")}}
<span>Attack roll !</span>
<span>Attack roll !</span>
{{/if}}
{{#if (match rollType "defense")}}
<span>Defense roll !</span>
<span>Defense roll !</span>
{{/if}}
{{#if (eq rollData.favor "favor")}}
<span><strong>Favor roll</strong></span>
{{/if}}
{{#if (eq rollData.favor "disfavor")}}
<span><strong>Disfavor roll</strong></span>
{{/if}}
{{#if badResult}}
<span>{{localize "LETHALFANTASY.Label.otherResult"}} : {{badResult}}</span>
<span><strong>{{localize "LETHALFANTASY.Label.otherResult"}}</strong>
:
{{badResult}}</span>
{{/if}}
{{#if rollTarget.weapon}}
<span>{{rollTarget.weapon.name}}</span>
<span>{{rollTarget.weapon.name}}</span>
{{/if}}
<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|}}
<span>{{result.dice}} : {{result.value}}</span>
<span>{{result.dice}} : {{result.value}}</span>
{{/each}}
</div>
</div>
{{#if isSave}}
<div class="result">
{{#if (eq resultType "success")}}
{{#if isPrivate}}?{{else}}{{localize "LETHALFANTASY.Roll.success"}}{{/if}}
{{else}}
{{#if isPrivate}}?{{else}}{{localize "LETHALFANTASY.Roll.failure"}}{{/if}}
{{/if}}
</div>
<div class="result">
{{#if (eq resultType "success")}}
{{#if isPrivate}}?{{else}}{{localize
"LETHALFANTASY.Roll.success"
}}{{/if}}
{{else}}
{{#if isPrivate}}?{{else}}{{localize
"LETHALFANTASY.Roll.failure"
}}{{/if}}
{{/if}}
</div>
{{/if}}
{{#if isResource}}
<div class="result">
{{#if (eq resultType "success")}}
{{#if isPrivate}}?{{else}}{{localize "LETHALFANTASY.Roll.success"}}{{/if}}
{{else}}
{{#if isPrivate}}?{{else}}{{localize "LETHALFANTASY.Roll.failure"}}{{#if isFailure}} ({{localize
"LETHALFANTASY.Roll.resourceLost"}}){{/if}}{{/if}}
{{/if}}
</div>
<div class="result">
{{#if (eq resultType "success")}}
{{#if isPrivate}}?{{else}}{{localize
"LETHALFANTASY.Roll.success"
}}{{/if}}
{{else}}
{{#if isPrivate}}?{{else}}{{localize "LETHALFANTASY.Roll.failure"}}{{#if
isFailure
}} ({{localize "LETHALFANTASY.Roll.resourceLost"}}){{/if}}{{/if}}
{{/if}}
</div>
{{/if}}
{{#if isDamage}}
<div>
{{#if (and isGM hasTarget)}}
{{{localize "LETHALFANTASY.Roll.displayArmor" targetName=targetName targetArmor=targetArmor realDamage=realDamage}}}
{{/if}}
</div>
<div>
{{#if (and isGM hasTarget)}}
{{{localize
"LETHALFANTASY.Roll.displayArmor"
targetName=targetName
targetArmor=targetArmor
realDamage=realDamage
}}}
{{/if}}
</div>
{{/if}}
{{#unless isPrivate}}
<div class="dice-result">
<h4 class="dice-total">{{total}}</h4>
</div>
{{#if D30result}}
<div class="dice-result">
<h4 class="dice-total">D30 result: {{D30result}}</h4>
</div>
{{/if}}
<div class="dice-result">
<h4 class="dice-total">{{total}}</h4>
</div>
{{#if D30result}}
<div class="dice-result">
<h4 class="dice-total">D30 result: {{D30result}}</h4>
</div>
{{/if}}
{{/unless}}
{{#if weaponDamageOptions}}
<div class="damage-buttons">
<div class="damage-buttons-title">{{localize
"LETHALFANTASY.Label.rollDamage"
}}</div>
<div class="damage-buttons-grid">
{{#if weaponDamageOptions.damageS}}
<button
class="damage-roll-btn"
data-weapon-id="{{weaponDamageOptions.weaponId}}"
data-damage-type="small"
data-damage-formula="{{weaponDamageOptions.damageS}}"
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}}"
title="{{localize 'LETHALFANTASY.Label.weapon-damage-medium'}}"
>
<i class="fa-solid fa-dice-d20"></i>
{{localize "LETHALFANTASY.Label.weapon-damage-medium"}}
</button>
{{/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>

View File

@@ -0,0 +1,39 @@
<nav class="combat-controls" data-tooltip-direction="UP">
{{~#if hasCombat~}}
{{!-- GM Controls --}}
{{#if user.isGM}}
{{#if combat.round}}
<!-- <button type="button" class="inline-control combat-control icon fa-solid fa-backward-step"
data-action="previousRound" data-tooltip aria-label="{{ localize "COMBAT.RoundPrev" }}"></button>
<button type="button" class="inline-control combat-control icon fa-solid fa-arrow-left" data-action="previousTurn"
data-tooltip aria-label="{{ localize "COMBAT.TurnPrev" }}"></button> -->
<button type="button" class="combat-control combat-control-lg" data-action="endCombat">
<i class="fa-solid fa-xmark" inert></i>
<span>{{ localize "COMBAT.End" }}</span>
</button>
<!-- <button type="button" class="inline-control combat-control icon fa-solid fa-arrow-right" data-action="nextTurn"
data-tooltip aria-label="{{ localize "COMBAT.TurnNext" }}"></button> -->
<button type="button" class="inline-control combat-control icon fa-solid fa-forward-step" data-action="nextRound"
data-tooltip aria-label="{{ localize "COMBAT.RoundNext" }}"></button>
{{else}}
<button type="button" class="combat-control combat-control-lg" data-action="startCombat">
<i class="fa-solid fa-swords" inert></i>
<span>{{ localize "COMBAT.Begin" }}</span>
</button>
{{/if}}
{{!-- Active Player Controls --}}
{{else if control}}
<!-- <button type="button" class="inline-control combat-control icon fa-solid fa-arrow-left" data-action="previousTurn"
data-tooltip aria-label="{{ localize "COMBAT.TurnPrev" }}"></button>
<button type="button" class="combat-control combat-control-lg" data-action="nextTurn">
<i class="fa-solid fa-check"></i>
<span>{{ localize "COMBAT.TurnEnd" }}</span>
</button>
<button type="button" class="inline-control combat-control icon fa-solid fa-arrow-right" data-action="nextTurn"
data-tooltip aria-label="{{ localize "COMBAT.TurnNext" }}"></button> -->
{{/if}}
{{/if}}
</nav>

View File

@@ -0,0 +1,92 @@
<header class="combat-tracker-header">
{{!-- Encounter Controls --}}
{{#if user.isGM}}
<nav class="encounters {{ css }}" aria-label="{{ localize "COMBAT.NavLabel" }}">
{{!-- Cycle Display --}}
{{#if displayCycle}}
<button type="button" class="inline-control icon fa-solid fa-plus" data-action="createCombat"
data-tooltip aria-label="{{ localize "COMBAT.Create" }}"></button>
<div class="cycle-combats">
<button type="button" class="inline-control icon fa-solid fa-caret-left" data-action="cycleCombat"
{{#if previousId}}data-combat-id="{{ previousId }}" {{else}}disabled{{/if}}
data-tooltip aria-label="{{ localize "COMBAT.EncounterPrevious" }}"></button>
<div class="encounter-count">
<span class="value">{{ currentIndex }}</span>
<span class="separator">&sol;</span>
<span class="max">{{ combats.length }}</span>
</div>
<button type="button" class="inline-control icon fa-solid fa-caret-right" data-action="cycleCombat"
{{#if nextId}}data-combat-id="{{ nextId }}" {{else}}disabled{{/if}}
data-tooltip aria-label="{{ localize "COMBAT.EncounterNext" }}"></button>
</div>
<button type="button" class="inline-control icon fa-solid fa-gear" data-action="trackerSettings"
data-tooltip aria-label="{{ localize "COMBAT.Settings" }}"></button>
{{!-- Tabbed Display --}}
{{else if combats.length}}
<button type="button" class="inline-control icon fa-solid fa-plus" data-action="createCombat"
data-tooltip aria-label="{{ localize "COMBAT.Create" }}"></button>
{{#each combats}}
<button type="button" class="inline-control {{#if active}}active{{/if}}" data-action="cycleCombat"
data-combat-id="{{ id }}">
{{ label }}
</button>
{{/each}}
<button type="button" class="inline-control icon fa-solid fa-gear" data-action="trackerSettings"
data-tooltip aria-label="{{ localize "COMBAT.Settings" }}"></button>
{{!-- No Combats --}}
{{else}}
<button type="button" class="combat-control-lg" data-action="createCombat">
<i class="fa-solid fa-plus" inert></i>
<span>{{ localize "COMBAT.Create" }}</span>
</button>
{{/if}}
</nav>
{{/if}}
<div class="encounter-controls {{#if hasCombat}}combat{{/if}}">
{{!-- Bulk Rolls --}}
<div class="control-buttons left flexrow">
{{#if user.isGM}}
<button type="button" class="inline-control combat-control icon fa-solid fa-users" data-action="rollAll"
{{#unless combat.turns.length}}disabled{{/unless}} data-tooltip="COMBAT.RollAll"
aria-label="{{ localize "COMBAT.RollAll" }}"></button>
<button type="button" class="inline-control combat-control icon fa-solid fa-users-cog" data-action="rollNPC"
{{#unless combat.turns.length}}disabled{{/unless}} data-tooltip="COMBAT.RollNPC"
aria-label="{{ localize "COMBAT.RollNPC" }}"></button>
{{else}}
<div class="spacer"></div>
<div class="spacer"></div>
{{/if}}
</div>
{{!-- Combat Status --}}
<strong class="encounter-title">
{{#if combats.length}}
{{#if combat.round}}
{{ localize "COMBAT.Round" round=combat.round }}
{{else}}
{{ localize "COMBAT.NotStarted" }}
{{/if}}
{{else}}
{{ localize "COMBAT.None" }}
{{/if}}
</strong>
{{!-- Combat Controls --}}
<div class="control-buttons right flexrow">
<div class="spacer"></div>
<button type="button" class="encounter-context-menu inline-control combat-control icon fa-solid fa-ellipsis-vertical"
{{#unless (and user.isGM hasCombat)}}disabled{{/unless}}></button>
</div>
</div>
</header>

View File

@@ -0,0 +1,81 @@
<ol class="combat-tracker plain">
{{#each turns}}
<li class="combatant {{ css }}" data-combatant-id="{{ id }}" data-action="activateCombatant">
{{!-- TODO: Targets --}}
{{!-- Image --}}
<img class="token-image" src="{{ img }}" alt="{{ name }}" loading="lazy">
{{!-- Name & Controls --}}
<div class="token-name">
<strong class="name">{{ name }}</strong>
<div class="combatant-controls">
{{#if @root.user.isGM}}
<button type="button" class="inline-control combatant-control icon fa-solid fa-eye-slash {{#if hidden}}active{{/if}}"
data-action="toggleHidden" data-tooltip aria-label="{{ localize "COMBAT.ToggleVis" }}"></button>
<button type="button" class="inline-control combatant-control icon fa-solid fa-skull {{#if isDefeated}}active{{/if}}"
data-action="toggleDefeated" data-tooltip
aria-label="{{ localize "COMBAT.ToggleDead" }}"></button>
{{/if}}
{{#if canPing}}
<button type="button" class="inline-control combatant-control icon fa-solid fa-bullseye-arrow"
data-action="pingCombatant" data-tooltip
aria-label="{{ localize "COMBAT.PingCombatant" }}"></button>
{{/if}}
{{#unless @root.user.isGM}}
<button type="button" class="inline-control combatant-control icon fa-solid fa-arrows-to-eye"
data-action="panToCombatant" data-tooltip
aria-label="{{ localize "COMBAT.PanToCombatant" }}"></button>
{{/unless}}
{{!-- TODO: Target Control --}}
<div class="token-effects" data-tooltip-html="{{ effects.tooltip }}">
{{#each effects.icons}}
<img class="token-effect" src="{{ img }}" alt="{{ name }}">
{{/each}}
</div>
</div>
</div>
{{!-- Resource --}}
{{#if resource includeZero=true}}
<div class="token-resource">
<span class="resource">{{ resource }}</span>
</div>
{{/if}}
{{!-- Initiative --}}
<div class="token-initiative initiative-area">
{{#if initiative includeZero=true}}
{{!-- Decimal Initiative --}}
{{#if @root.hasDecimals}}
<span>{{ initiative }}</span>
{{!-- Simple Initiative --}}
{{else}}
<input type="text" class="initiative-input" inputmode="numeric" pattern="^[+=\-]?\d*" value="{{ initiative }}"
aria-label="{{ localize "COMBAT.InitiativeScore" }}" {{#unless @root.user.isGM}}readonly{{/unless}}>
{{/if}}
{{#if isOwner}}
<a data-action="initiativePlus" class="initiative-plus" data-combatant-id="{{this.id}}"><i class="fa-solid fa-hexagon-plus"></i></a>
<a data-action="initiativeMinus" class="initiative-minus" data-combatant-id="{{this.id}}"><i class="fa-solid fa-hexagon-minus"></i></a>
{{/if}}
{{#if isMonster}}
<span class="initiative">-</span>
{{else}}
<span class="initiative" data-tooltip="Current max. progression counter">{{progressionCount}}</span>
{{/if}}
{{!-- Roll Initiative --}}
{{else if isOwner}}
<button type="button" class="combatant-control roll" data-action="rollInitiative" data-tooltip
aria-label="{{ localize "COMBAT.InitiativeRoll" }}"
style="--initiative-icon: url('{{ @root.initiativeIcon.icon }}'); --initiative-icon-hover: url('{{ @root.initiativeIcon.hover }}');"></button>
{{/if}}
</div>
</li>
{{/each}}
</ol>

View File

@@ -4,7 +4,7 @@
<legend>{{localize "LETHALFANTASY.Label.combatDetails"}}</legend>
<div class="combat-details">
<div class="combat-detail">
<button class="action" data-action="rangedAttackDefense">
{{localize "LETHALFANTASY.Label.rangedAttackDefense"}}
</button>
@@ -21,6 +21,9 @@
<div class="attacks">
{{#each system.attacks as |item key|}}
<div class="attack" data-attack-key="{{key}}" >
<div class="">
<input type="checkbox" name="system.attacks.{{item.key}}.enabled" value="{{item.enabled}}" data-tooltip="Attack enabled/disabled" />
</div>
<div class="name">
<input type="text" name="system.attacks.{{item.key}}.name" value="{{item.name}}" data-tooltip="Attack name" />
</div>

View File

@@ -13,13 +13,15 @@
<fieldset class="monster-characteristics monster-characteristics-{{ifThen isPlayMode 'play' 'edit'}}">
<div class="flexrow monster-hp">
<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;
{{formInput systemFields.hp.fields.max value=system.hp.max disabled=isPlayMode classes="monster-hp-value"}}
</div>
<div class="flexrow monster-hp">
<span class="damage-resistance">{{localize "LETHALFANTASY.Label.damageResistance"}}</span>
{{formInput systemFields.hp.fields.damageResistance value=system.hp.damageResistance disabled=isPlayMode classes="monster-hp-value"}}
{{formInput systemFields.hp.fields.damageResistance value=system.hp.damageResistance disabled=isPlayMode
classes="monster-hp-value"}}
</div>
</fieldset>
@@ -41,7 +43,8 @@
class="lf-roll-small fa-solid fa-dice-d20"></i>
{{localize "LETHALFANTASY.Label.saves.will"}}
</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">
<a class="rollable" data-roll-type="save" data-roll-key="dodge"><i
class="lf-roll-small fa-solid fa-dice-d20"></i>
@@ -65,20 +68,20 @@
class="lf-roll-small fa-solid fa-dice-d20"></i>
{{localize "LETHALFANTASY.Label.saves.contagion"}}
</a>
</span>
</span>
{{formField systemFields.saves.fields.contagion.fields.value value=system.saves.contagion.value
disabled=isPlayMode}}
<span class="name">
<a 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>
</span>
{{formField systemFields.saves.fields.poison.fields.value value=system.saves.poison.value
</span>
{{formField 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
class="lf-roll-small fa-solid fa-dice-d20"></i>
{{localize "LETHALFANTASY.Label.saves.paincourage"}}
@@ -88,7 +91,7 @@
<span data-tooltip="Pain save if wound exceeds">
{{formField systemFields.hp.fields.painDamage value=system.hp.painDamage disabled=isPlayMode tooltip="Pain Damage"}}
</span>
</span>-->
</div>
@@ -102,19 +105,22 @@
<span class="name"><a class="rollable" data-roll-type="monster-skill" data-roll-key="resistTorture"><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
{{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
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
{{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
<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
{{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
@@ -141,7 +147,7 @@
<span class="name">{{localize "LETHALFANTASY.Label.movement.walk"}}</span>
{{formField systemFields.movement.fields.walk value=system.movement.walk disabled=isPlayMode}}
<span class="name">{{localize "LETHALFANTASY.Label.movement.jog"}}</span>
{{formField systemFields.movement.fields.jog value=system.challenges.movement.jog disabled=isPlayMode}}
{{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>
@@ -157,7 +163,7 @@
<fieldset class="monster-characteristics monster-characteristics-{{ifThen isPlayMode 'play' 'edit'}}">
<legend>{{localize "LETHALFANTASY.Label.characteristics"}}</legend>
<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
disabled=isPlayMode data-char-id="int" }}

View File

@@ -32,21 +32,15 @@
</select>
</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>
<legend>{{localize "LETHALFANTASY.Roll.visibility"}}</legend>
<select name="visibility">
{{selectOptions rollModes selected=visibility localize=true}}
</select>
<span class="fieldset-centered">
<select name="visibility">
{{selectOptions rollModes selected=visibility localize=true}}
</select>
</span>
</fieldSet>
</div>

View File

@@ -1,90 +1,148 @@
<div class="lethalfantasy-roll-dialog">
<fieldSet class="">
<legend>{{localize (concat "LETHALFANTASY.Label." rollType)}} - {{actorName}}</legend>
<legend>{{localize (concat "LETHALFANTASY.Label." rollType)}}
-
{{actorName}}</legend>
{{#if rollTarget.tokenId}}
<div class="dialog-save">
<a class="goto-token-button" data-action="gotoToken" data-token-id="{{rollTarget.tokenId}}">{{localize "LETHALFANTASY.Label.gotoToken"}} </a>
</div>
<div class="dialog-save">
<a
class="goto-token-button"
data-action="gotoToken"
data-token-id="{{rollTarget.tokenId}}"
>{{localize "LETHALFANTASY.Label.gotoToken"}} </a>
</div>
{{/if}}
{{#if (match rollType "attack")}}
<div class="dialog-save">Attack roll ! - {{rollTarget.name}}</div>
<div class="dialog-save">Attack roll ! - {{rollTarget.name}}</div>
{{/if}}
{{#if (match rollType "defense")}}
<div class="dialog-save">Defense roll ! - {{rollTarget.name}}</div>
<div class="dialog-save">Defense roll ! - {{rollTarget.name}}</div>
{{/if}}
{{#if hasModifier}}
<div class="dialog-save">{{upperFirst rollName}} : {{baseFormula}} + {{baseValue}}</div>
<div class="dialog-save">{{upperFirst rollName}}
:
{{baseFormula}}
+
{{baseValue}}</div>
{{else}}
<div class="dialog-save">{{upperFirst rollName}} : {{baseFormula}}</div>
<div class="dialog-save">{{upperFirst rollName}} : {{baseFormula}}</div>
{{/if}}
{{#if rollTarget.weapon}}
<div class="dialog-save">{{localize "LETHALFANTASY.Label.baseModifier"}} : {{rollTarget.charModifier}}</div>
<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>
<div class="dialog-save">{{localize "LETHALFANTASY.Label.baseModifier"}}
:
{{rollTarget.charModifier}}</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 (match rollType "attack")}}
<div class="dialog-save">Add Granted Attack Dice
<input type="checkbox" data-action="selectGranted" name="granted" >
</div>
<div class="dialog-save">Add Granted Attack Dice
<input type="checkbox" data-action="selectGranted" name="granted" />
</div>
{{#if rollTarget.weapon}}
{{#if (eq rollTarget.weapon.system.weaponType "melee")}}{{else}}
<div class="dialog-save">Point Blank Range Attack
<input
type="checkbox"
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 (match rollType "defense")}}
<div class="dialog-save">Add Granted Defense Dice
<input type="checkbox" data-action="selectGranted" name="granted" >
</div>
<div class="dialog-save">Add Granted Defense Dice
<input type="checkbox" data-action="selectGranted" name="granted" />
</div>
{{/if}}
{{#if (match rollType "damage")}}
<div class="dialog-save">Add Granted Damage Dice
<input type="checkbox" data-action="selectGranted" name="granted" >
</div>
<div class="dialog-save">Add Granted Damage Dice
<input type="checkbox" data-action="selectGranted" name="granted" />
</div>
{{/if}}
{{#if rollTarget.staticModifier}}
<div class="dialog-save">Static modifier : +{{rollTarget.staticModifier}}</div>
<div class="dialog-save">Static modifier : +{{rollTarget.staticModifier}}</div>
{{/if}}
</fieldSet>
{{#if hasFavor}}
<fieldSet class="dialog-favor">
<legend>{{localize "LETHALFANTASY.Roll.favorDisfavor"}}</legend>
<select name="favor" class="favor-choice" data-tooltip-direction="UP">
{{selectOptions choiceFavor selected=favor}}
</select>
</fieldSet>
<fieldSet class="dialog-favor">
<legend>{{localize "LETHALFANTASY.Roll.favorDisfavor"}}</legend>
<select name="favor" class="favor-choice" data-tooltip-direction="UP">
{{selectOptions choiceFavor selected=favor}}
</select>
</fieldSet>
{{/if}}
{{#if hasModifier}}
<fieldSet class="dialog-modifier">
<legend>{{localize "LETHALFANTASY.Roll.modifierBonusMalus"}}</legend>
<select name="modifier" data-tooltip-direction="UP">
{{selectOptions choiceModifier selected=modifier}}
</select>
<fieldSet class="dialog-modifier">
<legend>{{localize "LETHALFANTASY.Roll.modifierBonusMalus"}}</legend>
<select name="modifier" data-tooltip-direction="UP">
{{selectOptions choiceModifier selected=modifier}}
</select>
{{#if (eq rollType "save")}}
{{#if rollTarget.magicUser}}
<div>
<span>Save against spell (+{{rollTarget.actorModifiers.saveModifier}}) ?</span>
<input type="checkbox" name="saveSpell" value="saveSpell">
</div>
{{/if}}
{{/if}}
</fieldSet>
{{#if (eq rollType "save")}}
{{#if rollTarget.magicUser}}
<div>
<span>Save against spell (+{{rollTarget.actorModifiers.saveModifier}})
?</span>
<input
type="checkbox"
name="saveSpellCheck"
data-action="saveSpellCheck"
/>
</div>
{{/if}}
{{/if}}
</fieldSet>
{{/if}}
{{#if hasChangeDice}}
<fieldSet class="dialog-modifier">
<legend>{{localize "LETHALFANTASY.Roll.changeDice"}}</legend>
<select name="changeDice" data-tooltip-direction="UP">
{{selectOptions choiceDice selected=changeDice}}
</select>
</fieldSet>
<fieldSet class="dialog-modifier">
<legend>{{localize "LETHALFANTASY.Roll.changeDice"}}</legend>
<select name="changeDice" data-tooltip-direction="UP">
{{selectOptions choiceDice selected=changeDice}}
</select>
</fieldSet>
{{/if}}
<fieldSet>
@@ -94,5 +152,4 @@
</select>
</fieldSet>
</div>

View File

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