Compare commits
38 Commits
13.0.23
...
141d6048e0
| Author | SHA1 | Date | |
|---|---|---|---|
| 141d6048e0 | |||
| ea7acf6bf8 | |||
| c20750caa7 | |||
| ce630feb51 | |||
| b35b684d50 | |||
| f6fb0b68b8 | |||
| e45edd60c4 | |||
| d389a85a9f | |||
| c217490a5b | |||
| 38eb1a8d3d | |||
| 4724cdf2bb | |||
| 6d06c8ddad | |||
| 2770774aa3 | |||
| e417b61625 | |||
| 9a8d580ef6 | |||
| 9ccb0f90f0 | |||
| 6cf0880ad3 | |||
| 96306623e5 | |||
| 7279cd752d | |||
| db3e8b5d35 | |||
| 54421e4a83 | |||
| ac44419b7a | |||
| a3fc0a42b9 | |||
| c8ce840e98 | |||
| 55a040062a | |||
| 1818a76499 | |||
| 55d1b41ca4 | |||
| 841ed82277 | |||
| 968d156d09 | |||
| 59ff098fca | |||
| b8174d5e22 | |||
| 7f15450566 | |||
| 28fdaff2ec | |||
| 81584ed5d6 | |||
| 8c9a13faf1 | |||
| 6c6c473147 | |||
| 2e2a917a45 | |||
| 343abc32e2 |
@@ -59,5 +59,5 @@ jobs:
|
||||
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"
|
||||
compatibility-minimum: "14"
|
||||
compatibility-verified: "14"
|
||||
|
||||
@@ -0,0 +1,62 @@
|
||||
# CLAUDE.md
|
||||
|
||||
This file provides guidance to Claude Code (claude.ai/code) when working with this repository.
|
||||
|
||||
## Overview
|
||||
|
||||
FoundryVTT v13+ game system for the **Lethal Fantasy RPG**. Entry point: `lethal-fantasy.mjs`.
|
||||
|
||||
## Commands
|
||||
|
||||
```bash
|
||||
# Compile LESS styles (styles/ -> css/)
|
||||
npx gulp css # one-shot
|
||||
npx gulp # compile + watch
|
||||
|
||||
# Lint
|
||||
npx eslint .
|
||||
|
||||
# Compendium pack management (LevelDB <-> YAML source)
|
||||
npm run pushLDBtoYML # export packs-system/ LevelDB -> source YAML
|
||||
npm run pullYMLtoLDB # import source YAML -> packs-system/ LevelDB
|
||||
```
|
||||
|
||||
No test suite exists.
|
||||
|
||||
## Architecture
|
||||
|
||||
Four layers in `module/`, all wired in `lethal-fantasy.mjs` via the `init` hook:
|
||||
|
||||
| Layer | Path | Purpose |
|
||||
|---|---|---|
|
||||
| Config | `module/config/` | Game constants. `SYSTEM` is `globalThis.SYSTEM` — always use `SYSTEM.*` for enumerations. |
|
||||
| Models | `module/models/` | `TypeDataModel` subclasses — data schemas per document type. |
|
||||
| Documents | `module/documents/` | Actor/Item/Roll/ChatMessage subclasses — game logic, roll processing, hooks. |
|
||||
| Applications | `module/applications/` | `ApplicationV2` sheets + custom combat tracker. |
|
||||
|
||||
**Actor types**: `character`, `monster`
|
||||
**Item types**: `skill`, `gift`, `vulnerability`, `weapon`, `armor`, `shield`, `spell`, `miracle`, `equipment`
|
||||
|
||||
Each layer has an `_module.mjs` barrel file that re-exports all classes from that layer.
|
||||
|
||||
Templates (`.hbs`) live in `templates/`. Styles are authored in LESS under `styles/` and compiled to `css/`.
|
||||
|
||||
### Key Patterns
|
||||
|
||||
- **Sheets**: Extend `HandlebarsApplicationMixin(foundry.applications.sheets.ActorSheetV2)` — imported from `foundry.applications.api`. **Not** the legacy `ActorSheet`. Child sheets (e.g. `character-sheet.mjs`) extend `base-actor-sheet.mjs` and override `static PARTS` and `DEFAULT_OPTIONS.actions`. Template paths are prefixed `systems/fvtt-lethal-fantasy/templates/`. Actor sheets have a play/edit toggle via `_sheetMode` and `SHEET_MODES`.
|
||||
- **Models**: `static defineSchema()` using `foundry.data.fields.*`. Field definitions derived from SYSTEM config objects.
|
||||
- **Rolls**: `LethalFantasyRoll` extends `Roll` with rich metadata via `this.options`. `D30Roll` is a separate class for D30 result tables (initialized in the `ready` hook).
|
||||
- **Socket**: Events use `game.socket.on(\`system.${SYSTEM.id}\`, ...)`. Multi-player attack-defense uses a global `pendingDefenses` Map.
|
||||
- **i18n**: All user-visible strings are keys in `lang/en.json` as `LETHALFANTASY.Category.Key`. Always use `game.i18n.localize(key)`.
|
||||
|
||||
### Compendium Packs
|
||||
|
||||
Five LevelDB packs in `packs-system/`: skills, equipment, gifts, vulnerabilities, spells-miracles. Use the `tools/` scripts to export/import editable YAML.
|
||||
|
||||
## Code Style
|
||||
|
||||
- No semicolons, double quotes, 2-space indent
|
||||
- JSDoc `/** */` required on all functions/classes
|
||||
- Max line length 180 (strings/templates exempt)
|
||||
- Arrow functions: omit parens for single param
|
||||
- ESLint + Prettier config in `eslint.config.mjs`
|
||||
Binary file not shown.
+452
-36
@@ -529,16 +529,16 @@ i.lethalfantasy {
|
||||
}
|
||||
.lethalfantasy .tab.character-combat .main-div .combat-details .combat-detail .armor-hp {
|
||||
margin-right: 4px;
|
||||
min-width: 10rem;
|
||||
max-width: 10rem;
|
||||
min-width: 11rem;
|
||||
max-width: 11rem;
|
||||
}
|
||||
.lethalfantasy .tab.character-combat .main-div .combat-details .combat-detail .armor-hp .name {
|
||||
min-width: 6rem;
|
||||
max-width: 6rem;
|
||||
}
|
||||
.lethalfantasy .tab.character-combat .main-div .combat-details .combat-detail .armor-hp .input {
|
||||
min-width: 2.5rem;
|
||||
max-width: 2.5rem;
|
||||
min-width: 3.5rem;
|
||||
max-width: 3.5rem;
|
||||
}
|
||||
.lethalfantasy .tab.character-combat .main-div .combat-details .combat-detail .granted {
|
||||
min-width: 8rem;
|
||||
@@ -1178,6 +1178,45 @@ i.lethalfantasy {
|
||||
margin-left: 4px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
.lethalfantasy .tab.monster-combat .ranged-attacks {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
.lethalfantasy .tab.monster-combat .ranged-attacks .attack .name {
|
||||
min-width: 10rem;
|
||||
max-width: 10rem;
|
||||
}
|
||||
.lethalfantasy .tab.monster-combat .ranged-attacks .attack .damage-dice {
|
||||
width: 5rem;
|
||||
max-width: 5rem;
|
||||
}
|
||||
.lethalfantasy .tab.monster-combat .ranged-attacks .ranged-weapon-range {
|
||||
margin-top: 8px;
|
||||
border-top: 1px solid var(--color-border-light-tertiary, #ccc);
|
||||
padding-top: 6px;
|
||||
}
|
||||
.lethalfantasy .tab.monster-combat .ranged-attacks .ranged-weapon-range > label {
|
||||
font-weight: bold;
|
||||
margin-bottom: 4px;
|
||||
display: block;
|
||||
}
|
||||
.lethalfantasy .tab.monster-combat .ranged-attacks .ranged-weapon-range .range-fields {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
}
|
||||
.lethalfantasy .tab.monster-combat .ranged-attacks .ranged-weapon-range .range-fields .range-field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.lethalfantasy .tab.monster-combat .ranged-attacks .ranged-weapon-range .range-fields .range-field label {
|
||||
font-size: 0.7rem;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.lethalfantasy .tab.monster-combat .ranged-attacks .ranged-weapon-range .range-fields .range-field input {
|
||||
width: 3.5rem;
|
||||
text-align: center;
|
||||
}
|
||||
.lethalfantasy .tab.monster-combat .armors {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
@@ -1988,9 +2027,12 @@ i.lethalfantasy {
|
||||
background: #4a4940 !important;
|
||||
color: #ffffff !important;
|
||||
}
|
||||
.lethalfantasy .grit-luck-dialog {
|
||||
color: var(--color-text-dark-primary, #191813);
|
||||
}
|
||||
.lethalfantasy .grit-luck-dialog .combat-status {
|
||||
padding: 12px;
|
||||
background: linear-gradient(to bottom, rgba(42, 41, 32, 0.8) 0%, rgba(26, 25, 16, 0.9) 100%);
|
||||
background: linear-gradient(to bottom, rgba(42, 41, 32, 0.88) 0%, rgba(26, 25, 16, 0.95) 100%);
|
||||
border: 1px solid rgba(212, 175, 55, 0.5);
|
||||
border-radius: 6px;
|
||||
margin-bottom: 16px;
|
||||
@@ -2010,11 +2052,25 @@ i.lethalfantasy {
|
||||
margin-top: 8px;
|
||||
}
|
||||
.lethalfantasy .grit-luck-dialog .offer-text {
|
||||
color: #f0e6d2;
|
||||
color: var(--color-text-dark-primary, #191813);
|
||||
font-size: calc(var(--font-size-standard) * 1);
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
margin: 0 0 8px 0;
|
||||
}
|
||||
.lethalfantasy .grit-luck-dialog .shield-warning {
|
||||
color: #7a4000;
|
||||
background: rgba(255, 160, 0, 0.12);
|
||||
border: 1px solid rgba(255, 160, 0, 0.4);
|
||||
border-radius: 5px;
|
||||
font-size: calc(var(--font-size-standard) * 0.88);
|
||||
padding: 6px 10px;
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
}
|
||||
.lethalfantasy .grit-luck-dialog .shield-warning i {
|
||||
color: #c07000;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.lethalfantasy .attack-result {
|
||||
padding: 16px;
|
||||
@@ -2105,31 +2161,66 @@ i.lethalfantasy {
|
||||
color: #d4af37;
|
||||
}
|
||||
.lethalfantasy .attack-result .attack-result-damage {
|
||||
display: flex;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 8px;
|
||||
justify-content: center;
|
||||
}
|
||||
.lethalfantasy .attack-result .attack-result-damage.single-btn {
|
||||
grid-template-columns: 1fr;
|
||||
max-width: 280px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.lethalfantasy .attack-result .attack-result-damage.spell-damage {
|
||||
grid-template-columns: 1fr;
|
||||
width: 100%;
|
||||
}
|
||||
.lethalfantasy .attack-result .attack-result-damage .roll-damage-btn {
|
||||
padding: 10px 16px;
|
||||
padding: 10px 14px;
|
||||
background: linear-gradient(to bottom, #8b0000 0%, #660000 100%);
|
||||
border: 1px solid #ff0000;
|
||||
border: 1px solid #4b0000;
|
||||
border-radius: 6px;
|
||||
color: #f0e6d2;
|
||||
font-weight: 600;
|
||||
font-size: calc(var(--font-size-standard) * 0.9);
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
||||
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.lethalfantasy .attack-result .attack-result-damage .roll-damage-btn::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: -100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
|
||||
transition: left 0.5s;
|
||||
}
|
||||
.lethalfantasy .attack-result .attack-result-damage .roll-damage-btn:hover::before {
|
||||
left: 100%;
|
||||
}
|
||||
.lethalfantasy .attack-result .attack-result-damage .roll-damage-btn i {
|
||||
font-size: calc(var(--font-size-standard) * 1.1);
|
||||
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.lethalfantasy .attack-result .attack-result-damage .roll-damage-btn:hover {
|
||||
background: linear-gradient(to bottom, #a00000 0%, #7b0000 100%);
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
|
||||
transform: translateY(-2px);
|
||||
border-color: #5b0000;
|
||||
}
|
||||
.lethalfantasy .attack-result .attack-result-damage .roll-damage-btn:active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
.lethalfantasy .attack-result .attack-result-damage .roll-damage-btn i {
|
||||
margin-right: 6px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), inset 0 1px 3px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
.lethalfantasy .equipment-content {
|
||||
font-family: var(--font-primary);
|
||||
@@ -2595,6 +2686,21 @@ i.lethalfantasy {
|
||||
max-width: 8rem;
|
||||
margin-left: 1rem;
|
||||
}
|
||||
.dialog-warning {
|
||||
margin: 0.4rem 0.2rem 0.2rem;
|
||||
padding: 0.35rem 0.5rem;
|
||||
border-left: 3px solid #c8941a;
|
||||
background: rgba(200, 148, 26, 0.12);
|
||||
border-radius: 3px;
|
||||
font-family: var(--font-secondary);
|
||||
font-size: calc(var(--font-size-standard) * 0.9);
|
||||
color: #7a5400;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.dialog-warning i {
|
||||
color: #c8941a;
|
||||
margin-right: 0.4rem;
|
||||
}
|
||||
.lethalfantasy.dice-roll,
|
||||
.fvtt-lethal-fantasy.dice-roll,
|
||||
.message.lethalfantasy.dice-roll,
|
||||
@@ -2974,7 +3080,7 @@ i.lethalfantasy {
|
||||
.message.fvtt-lethal-fantasy.dice-roll .result-section .d30-result .d30-header .d30-label {
|
||||
flex-grow: 1;
|
||||
font-weight: bold;
|
||||
color: #e0d5f0;
|
||||
color: #2a1a3a;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
font-size: calc(var(--font-size-standard) * 0.9);
|
||||
@@ -2986,11 +3092,11 @@ i.lethalfantasy {
|
||||
font-family: var(--font-primary);
|
||||
font-size: calc(var(--font-size-standard) * 1.5);
|
||||
font-weight: bold;
|
||||
color: #ff69b4;
|
||||
background: rgba(255, 105, 180, 0.1);
|
||||
color: #3d006e;
|
||||
background: rgba(255, 255, 255, 0.35);
|
||||
padding: 4px 12px;
|
||||
border-radius: 12px;
|
||||
border: 1px solid rgba(255, 105, 180, 0.3);
|
||||
border: 1px solid rgba(138, 43, 226, 0.4);
|
||||
}
|
||||
.lethalfantasy.dice-roll .result-section .d30-result .d30-message,
|
||||
.fvtt-lethal-fantasy.dice-roll .result-section .d30-result .d30-message,
|
||||
@@ -3174,16 +3280,10 @@ i.lethalfantasy {
|
||||
.message.lethalfantasy.dice-roll .damage-buttons .damage-buttons-grid,
|
||||
.message.fvtt-lethal-fantasy.dice-roll .damage-buttons .damage-buttons-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 8px;
|
||||
}
|
||||
.lethalfantasy.dice-roll .damage-buttons .damage-buttons-grid.monster-damage,
|
||||
.fvtt-lethal-fantasy.dice-roll .damage-buttons .damage-buttons-grid.monster-damage,
|
||||
.message.lethalfantasy.dice-roll .damage-buttons .damage-buttons-grid.monster-damage,
|
||||
.message.fvtt-lethal-fantasy.dice-roll .damage-buttons .damage-buttons-grid.monster-damage {
|
||||
grid-template-columns: 1fr;
|
||||
max-width: 280px;
|
||||
margin: 0 auto;
|
||||
gap: 8px;
|
||||
}
|
||||
.lethalfantasy.dice-roll .damage-buttons .damage-buttons-grid .damage-roll-btn,
|
||||
.fvtt-lethal-fantasy.dice-roll .damage-buttons .damage-buttons-grid .damage-roll-btn,
|
||||
@@ -3443,6 +3543,7 @@ i.lethalfantasy {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 8px;
|
||||
justify-items: center;
|
||||
}
|
||||
.lethalfantasy.dice-roll .d30-message,
|
||||
.fvtt-lethal-fantasy.dice-roll .d30-message,
|
||||
@@ -3889,35 +3990,74 @@ i.lethalfantasy {
|
||||
}
|
||||
.message .attack-result .attack-result-damage,
|
||||
.attack-result .attack-result-damage {
|
||||
display: flex;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 8px;
|
||||
justify-content: center;
|
||||
}
|
||||
.message .attack-result .attack-result-damage.single-btn,
|
||||
.attack-result .attack-result-damage.single-btn {
|
||||
grid-template-columns: 1fr;
|
||||
max-width: 280px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.message .attack-result .attack-result-damage.spell-damage,
|
||||
.attack-result .attack-result-damage.spell-damage {
|
||||
grid-template-columns: 1fr;
|
||||
width: 100%;
|
||||
}
|
||||
.message .attack-result .attack-result-damage .roll-damage-btn,
|
||||
.attack-result .attack-result-damage .roll-damage-btn {
|
||||
padding: 10px 16px;
|
||||
padding: 10px 14px;
|
||||
background: linear-gradient(to bottom, #8b0000 0%, #660000 100%);
|
||||
border: 1px solid #ff0000;
|
||||
border: 1px solid #4b0000;
|
||||
border-radius: 6px;
|
||||
color: #f0e6d2;
|
||||
font-weight: 600;
|
||||
font-size: calc(var(--font-size-standard) * 0.9);
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
||||
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.message .attack-result .attack-result-damage .roll-damage-btn::before,
|
||||
.attack-result .attack-result-damage .roll-damage-btn::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: -100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
|
||||
transition: left 0.5s;
|
||||
}
|
||||
.message .attack-result .attack-result-damage .roll-damage-btn:hover::before,
|
||||
.attack-result .attack-result-damage .roll-damage-btn:hover::before {
|
||||
left: 100%;
|
||||
}
|
||||
.message .attack-result .attack-result-damage .roll-damage-btn i,
|
||||
.attack-result .attack-result-damage .roll-damage-btn i {
|
||||
font-size: calc(var(--font-size-standard) * 1.1);
|
||||
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.message .attack-result .attack-result-damage .roll-damage-btn:hover,
|
||||
.attack-result .attack-result-damage .roll-damage-btn:hover {
|
||||
background: linear-gradient(to bottom, #a00000 0%, #7b0000 100%);
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
|
||||
transform: translateY(-2px);
|
||||
border-color: #5b0000;
|
||||
}
|
||||
.message .attack-result .attack-result-damage .roll-damage-btn:active,
|
||||
.attack-result .attack-result-damage .roll-damage-btn:active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
.message .attack-result .attack-result-damage .roll-damage-btn i,
|
||||
.attack-result .attack-result-damage .roll-damage-btn i {
|
||||
margin-right: 6px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), inset 0 1px 3px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
#token-hud .hp-loss-wrap {
|
||||
position: absolute;
|
||||
@@ -3994,3 +4134,279 @@ i.lethalfantasy {
|
||||
padding-left: 8px;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
/* Luck/Grit Styles */
|
||||
#token-hud .luck-grit-wrap {
|
||||
position: absolute;
|
||||
left: 75px;
|
||||
display: none;
|
||||
top: 50%;
|
||||
width: 80px;
|
||||
text-align: start;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
border: 1px solid rgba(139, 69, 19, 0.5);
|
||||
border-radius: 4px;
|
||||
padding: 4px 6px;
|
||||
transform: translate(-100%, -50%);
|
||||
}
|
||||
#token-hud .luck-grit-hud-active {
|
||||
display: block;
|
||||
}
|
||||
#token-hud .luck-grit-hud-disabled {
|
||||
display: none;
|
||||
}
|
||||
#token-hud .luck-grit-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
margin: 2px 0;
|
||||
}
|
||||
#token-hud .luck-grit-label {
|
||||
flex: 1;
|
||||
color: #c9b896;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
#token-hud .luck-grit-btn {
|
||||
width: 28px;
|
||||
height: 22px;
|
||||
padding: 0;
|
||||
background: rgba(139, 69, 19, 0.25);
|
||||
border: 1px solid rgba(139, 69, 19, 0.4);
|
||||
border-radius: 3px;
|
||||
color: #d4c5a9;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
line-height: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
#token-hud .luck-grit-btn:hover {
|
||||
background: rgba(139, 69, 19, 0.5);
|
||||
border-color: rgba(139, 69, 19, 0.7);
|
||||
}
|
||||
/* -------------------------------------------------- */
|
||||
/* Dice Tray — injected into the Foundry chat sidebar */
|
||||
/* -------------------------------------------------- */
|
||||
.lf-dice-tray {
|
||||
padding: 6px 8px;
|
||||
background: linear-gradient(135deg, rgba(245, 232, 200, 0.97) 0%, rgba(238, 222, 185, 0.97) 100%), url("/systems/fvtt-lethal-fantasy/assets/ui/lethal_fantasy_background.webp") center / cover;
|
||||
border-top: 2px solid rgba(139, 69, 19, 0.5);
|
||||
border-bottom: 1px solid rgba(139, 69, 19, 0.25);
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
pointer-events: all;
|
||||
}
|
||||
.lf-dice-tray .lf-dt-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.lf-dice-tray .lf-dt-label {
|
||||
color: #3a2a10;
|
||||
font-size: 15px;
|
||||
flex-shrink: 0;
|
||||
opacity: 0.7;
|
||||
}
|
||||
.lf-dice-tray .lf-dt-count {
|
||||
width: 44px;
|
||||
flex-shrink: 0;
|
||||
padding: 3px 4px;
|
||||
background: rgba(139, 69, 19, 0.15);
|
||||
border: 1px solid rgba(139, 69, 19, 0.45);
|
||||
border-radius: 4px;
|
||||
color: #2a1a08;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
}
|
||||
.lf-dice-tray .lf-dt-count option {
|
||||
background: #f5ead0;
|
||||
color: #2a1a08;
|
||||
}
|
||||
.lf-dice-tray .lf-dt-count:focus {
|
||||
outline: none;
|
||||
border-color: rgba(139, 69, 19, 0.7);
|
||||
box-shadow: 0 0 4px rgba(139, 69, 19, 0.25);
|
||||
}
|
||||
.lf-dice-tray .lf-dt-dice {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 3px;
|
||||
flex: 1;
|
||||
}
|
||||
.lf-dice-tray .lf-dt-die-btn {
|
||||
padding: 3px 7px;
|
||||
background: rgba(139, 69, 19, 0.15);
|
||||
border: 1px solid rgba(139, 69, 19, 0.4);
|
||||
border-radius: 4px;
|
||||
color: #2a1a08;
|
||||
font-size: 10px;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
|
||||
line-height: 1.5;
|
||||
letter-spacing: 0.3px;
|
||||
}
|
||||
.lf-dice-tray .lf-dt-die-btn:hover {
|
||||
background: rgba(139, 69, 19, 0.35);
|
||||
border-color: rgba(139, 69, 19, 0.7);
|
||||
color: #5a2a00;
|
||||
box-shadow: 0 0 5px rgba(139, 69, 19, 0.3);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
.lf-dice-tray .lf-dt-die-btn:active {
|
||||
transform: translateY(0);
|
||||
box-shadow: none;
|
||||
background: rgba(139, 69, 19, 0.5);
|
||||
}
|
||||
.lf-dice-tray .lf-dt-explode-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 3px;
|
||||
cursor: pointer;
|
||||
color: rgba(160, 80, 20, 0.7);
|
||||
font-size: 14px;
|
||||
flex-shrink: 0;
|
||||
padding: 3px 6px;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 4px;
|
||||
transition: color 0.15s, border-color 0.15s, background 0.15s;
|
||||
}
|
||||
.lf-dice-tray .lf-dt-explode-label:hover {
|
||||
color: rgba(200, 100, 30, 0.9);
|
||||
border-color: rgba(139, 69, 19, 0.45);
|
||||
background: rgba(139, 69, 19, 0.12);
|
||||
}
|
||||
.lf-dice-tray .lf-dt-explode-label input[type="checkbox"] {
|
||||
appearance: none;
|
||||
width: 0;
|
||||
height: 0;
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
}
|
||||
.lf-dice-tray .lf-dt-explode-label input[type="checkbox"]:checked ~ i {
|
||||
color: #cc4400;
|
||||
filter: drop-shadow(0 0 4px rgba(200, 80, 0, 0.6));
|
||||
}
|
||||
.lf-dice-tray .lf-dt-explode-label:has(input:checked) {
|
||||
color: #cc4400;
|
||||
border-color: rgba(139, 69, 19, 0.55);
|
||||
background: rgba(139, 60, 10, 0.2);
|
||||
}
|
||||
/* Free roll chat card — styled to match regular system roll cards */
|
||||
.lf-free-roll-card {
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 6px 8px;
|
||||
background: linear-gradient(135deg, rgba(40, 30, 20, 0.7) 0%, rgba(30, 22, 15, 0.9) 100%);
|
||||
border-bottom: 2px solid rgba(139, 69, 19, 0.4);
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-header i {
|
||||
color: #c9b896;
|
||||
font-size: calc(var(--font-size-standard, 14px) * 1.1);
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-header .lf-frc-title-text {
|
||||
font-size: calc(var(--font-size-standard, 14px) * 0.85);
|
||||
color: #c9b896;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-header .lf-frc-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 2px 8px;
|
||||
background: rgba(139, 69, 19, 0.3);
|
||||
border: 1px solid rgba(139, 69, 19, 0.5);
|
||||
border-radius: 10px;
|
||||
font-size: calc(var(--font-size-standard, 14px) * 0.85);
|
||||
font-weight: 600;
|
||||
color: #d4c5a9;
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-dice {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
padding: 6px 8px;
|
||||
background: rgba(0, 0, 0, 0.15);
|
||||
border: 1px solid rgba(139, 69, 19, 0.3);
|
||||
border-top: none;
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-dice .lf-frc-die-chip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 3px 8px;
|
||||
background: rgba(139, 69, 19, 0.2);
|
||||
border: 1px solid rgba(139, 69, 19, 0.3);
|
||||
border-radius: 4px;
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-dice .lf-frc-die-chip .lf-frc-die-type {
|
||||
font-size: calc(var(--font-size-standard, 14px) * 0.85);
|
||||
font-weight: 600;
|
||||
color: #2a2a1a;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-dice .lf-frc-die-chip .lf-frc-die-sep {
|
||||
color: rgba(0, 0, 0, 0.35);
|
||||
font-weight: 300;
|
||||
font-size: calc(var(--font-size-standard, 14px) * 0.8);
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-dice .lf-frc-die-chip .lf-frc-die-val {
|
||||
font-weight: bold;
|
||||
color: #ffd700;
|
||||
font-size: calc(var(--font-size-standard, 14px) * 0.95);
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-dice .lf-frc-die-chip .lf-frc-die-val .lf-dt-explode-icon {
|
||||
font-size: 8px;
|
||||
color: #ffcc00;
|
||||
margin-left: 2px;
|
||||
vertical-align: super;
|
||||
text-shadow: 0 0 4px rgba(255, 200, 0, 0.8);
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-dice .lf-frc-die-chip.lf-frc-max {
|
||||
background: rgba(139, 90, 19, 0.35);
|
||||
border-color: rgba(200, 116, 42, 0.6);
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-dice .lf-frc-die-chip.lf-frc-max .lf-frc-die-val {
|
||||
color: #ff9a40;
|
||||
text-shadow: 0 0 6px rgba(200, 116, 42, 0.6);
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-dice .lf-frc-die-chip.lf-frc-min {
|
||||
background: rgba(139, 20, 20, 0.25);
|
||||
border-color: rgba(139, 34, 34, 0.5);
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-dice .lf-frc-die-chip.lf-frc-min .lf-frc-die-val {
|
||||
color: #ff6b6b;
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-total-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
padding: 6px 10px;
|
||||
background: linear-gradient(135deg, rgba(40, 30, 20, 0.6) 0%, rgba(20, 15, 10, 0.8) 100%);
|
||||
border: 2px solid rgba(139, 69, 19, 0.5);
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-total-bar .lf-frc-total-label {
|
||||
font-size: calc(var(--font-size-standard, 14px) * 0.85);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
color: #c9b896;
|
||||
}
|
||||
.lf-free-roll-card .lf-frc-total-bar .lf-frc-total-value {
|
||||
font-family: var(--font-primary, serif);
|
||||
font-size: calc(var(--font-size-standard, 14px) * 1.6);
|
||||
font-weight: bold;
|
||||
color: #e8d5a0;
|
||||
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
|
||||
+193
-8
@@ -152,6 +152,57 @@
|
||||
"wis": {
|
||||
"label": "Wisdom"
|
||||
}
|
||||
},
|
||||
"agility": {
|
||||
"label": "Agility"
|
||||
},
|
||||
"app": {
|
||||
"label": "Appearance"
|
||||
},
|
||||
"cha": {
|
||||
"label": "Charisma"
|
||||
},
|
||||
"con": {
|
||||
"label": "Constitution"
|
||||
},
|
||||
"contagion": {
|
||||
"label": "Contagion Save"
|
||||
},
|
||||
"dex": {
|
||||
"label": "Dexterity"
|
||||
},
|
||||
"dodge": {
|
||||
"label": "Dodge Save"
|
||||
},
|
||||
"dying": {
|
||||
"label": "Dying Challenge"
|
||||
},
|
||||
"int": {
|
||||
"label": "Intelligence"
|
||||
},
|
||||
"luc": {
|
||||
"label": "Luck"
|
||||
},
|
||||
"pain": {
|
||||
"label": "Pain Save"
|
||||
},
|
||||
"painCourage": {
|
||||
"label": "Pain/Courage Save"
|
||||
},
|
||||
"poison": {
|
||||
"label": "Poison Save"
|
||||
},
|
||||
"str": {
|
||||
"label": "Strength"
|
||||
},
|
||||
"toughness": {
|
||||
"label": "Toughness Save"
|
||||
},
|
||||
"will": {
|
||||
"label": "Willpower Save"
|
||||
},
|
||||
"wis": {
|
||||
"label": "Wisdom"
|
||||
}
|
||||
},
|
||||
"Monster": {
|
||||
@@ -250,6 +301,21 @@
|
||||
"wis": {
|
||||
"label": "Wisdom"
|
||||
}
|
||||
},
|
||||
"perception": {
|
||||
"label": "Perception"
|
||||
},
|
||||
"resistIntimidation": {
|
||||
"label": "Resist Intimidation"
|
||||
},
|
||||
"resistPerformance": {
|
||||
"label": "Resist Performance"
|
||||
},
|
||||
"resistTorture": {
|
||||
"label": "Resist Torture"
|
||||
},
|
||||
"stealth": {
|
||||
"label": "Stealth"
|
||||
}
|
||||
},
|
||||
"Delete": "Delete",
|
||||
@@ -316,9 +382,12 @@
|
||||
"rollProgressionCount": "Roll progression count",
|
||||
"rollProgressionDice": "Roll progression/Lethargy dice",
|
||||
"earned": "Earned",
|
||||
"divinityPoints": "Divinity points",
|
||||
"divinityPoints": "Grace",
|
||||
"aetherPoints": "Aether points",
|
||||
"attacks": "Attacks",
|
||||
"attackMode": "Attack Mode",
|
||||
"meleeModeLabel": "Melee (8 attacks)",
|
||||
"rangedModeLabel": "Ranged (4 attacks)",
|
||||
"monster": "Monster",
|
||||
"Resist": "Resist",
|
||||
"resist": "Resist",
|
||||
@@ -393,8 +462,17 @@
|
||||
"notes": "Notes",
|
||||
"pc": "PC",
|
||||
"perception": "Perception",
|
||||
"pointBlank": "Point blank",
|
||||
"short": "Short",
|
||||
"medium": "Medium",
|
||||
"long": "Long",
|
||||
"extreme": "Extreme",
|
||||
"outOfSkill": "Out of skill",
|
||||
"range": "Range",
|
||||
"rangeDefenseDialog": "Ranged defense dialog",
|
||||
"rangeDefenseRoll": "Ranged defense roll",
|
||||
"rangeAttackDialog": "Ranged attack dialog",
|
||||
"rangeAttackRoll": "Ranged attack roll",
|
||||
"rangedAttackDefense": "Ranged attack defense",
|
||||
"resource": "Resource",
|
||||
"resources": "Resources",
|
||||
@@ -427,9 +505,42 @@
|
||||
"monster-defense": "Monster defense",
|
||||
"weapons": "Weapons",
|
||||
"wis": "WIS",
|
||||
"weapon-damage-medium": "Weapon damage medium",
|
||||
"weapon-damage-small": "Weapon damage small",
|
||||
"combatProgressionStart": "Combat start threshold"
|
||||
"combatProgressionStart": "Combat start threshold",
|
||||
"miracle": "Miracle",
|
||||
"titleStandard": "Standard Roll",
|
||||
"privateRoll": "Private Roll",
|
||||
"current": "Current",
|
||||
"max": "Max",
|
||||
"speed": "Speed",
|
||||
"bonuses": "Bonuses",
|
||||
"handToHandAttacks": "Hand To Hand Attacks",
|
||||
"beyondSkill": "Beyond Skill",
|
||||
"letItFly": "Let It Fly!",
|
||||
"class": "Class",
|
||||
"mortal": "Mortal",
|
||||
"alignment": "Alignment",
|
||||
"age": "Age",
|
||||
"height": "Height",
|
||||
"weight": "Weight",
|
||||
"eyes": "Eyes",
|
||||
"hair": "Hair",
|
||||
"magicUser": "Magic User",
|
||||
"clericUser": "Cleric User",
|
||||
"lastHdRoll": "Last HD roll",
|
||||
"naturalDR": "Natural DR",
|
||||
"magicalDR": "Magical DR",
|
||||
"saveBonus": "Save bonus (1/5 levels)",
|
||||
"spellBonus": "Spell bonus (1/5 levels)",
|
||||
"miracleBonus": "Miracle bonus (1/5 levels)",
|
||||
"devPointsTotal": "Dev. Points (Total)",
|
||||
"devPointsRem": "Dev. Points (Rem.)",
|
||||
"length": "Length",
|
||||
"vision": "Vision",
|
||||
"damageType": "Damage Type",
|
||||
"components": "Components",
|
||||
"coverRanged": "Cover vs ranged attacks",
|
||||
"standing": "Standing",
|
||||
"crouching": "Crouching"
|
||||
},
|
||||
"Miracle": {
|
||||
"FIELDS": {
|
||||
@@ -485,6 +596,15 @@
|
||||
},
|
||||
"savingThrow": {
|
||||
"label": "Saving throw"
|
||||
},
|
||||
"damageDiceOverpowered": {
|
||||
"label": "Overpowered Damage Dice"
|
||||
},
|
||||
"damageDiceOverpowered2": {
|
||||
"label": "Overpowered 2 Damage Dice"
|
||||
},
|
||||
"damageDice": {
|
||||
"label": "Damage Dice"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -519,7 +639,9 @@
|
||||
"save": "Save roll {save}",
|
||||
"success": "Success",
|
||||
"visibility": "Visibility",
|
||||
"favorDisfavor": "Favor/Disfavor"
|
||||
"favorDisfavor": "Favor/Disfavor",
|
||||
"displayArmor": "Target: {targetName} — Armor DR: {targetArmor} — Damage: {realDamage}",
|
||||
"resourceLost": "Resource spent"
|
||||
},
|
||||
"Save": {
|
||||
"FIELDS": {
|
||||
@@ -604,7 +726,8 @@
|
||||
"label": "Min"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"autoDestruction": "Auto-Destruction"
|
||||
},
|
||||
"Skill": {
|
||||
"Category": {
|
||||
@@ -661,6 +784,9 @@
|
||||
"weaponClass": {
|
||||
"label": "Class"
|
||||
}
|
||||
},
|
||||
"error": {
|
||||
"weaponBonus": "Weapon bonus exceeds the allowed maximum (skill total / 10)"
|
||||
}
|
||||
},
|
||||
"Spell": {
|
||||
@@ -700,6 +826,12 @@
|
||||
"cost": {
|
||||
"label": "Cost"
|
||||
},
|
||||
"costOverpowered": {
|
||||
"label": "Cost (Overpowered)"
|
||||
},
|
||||
"costOverpowered2": {
|
||||
"label": "Cost (Overpowered 2)"
|
||||
},
|
||||
"description": {
|
||||
"label": "Description"
|
||||
},
|
||||
@@ -723,7 +855,23 @@
|
||||
},
|
||||
"catalyst": {
|
||||
"label": "Catalyst"
|
||||
},
|
||||
"damageDice": {
|
||||
"label": "Damage dice"
|
||||
},
|
||||
"damageDiceOverpowered": {
|
||||
"label": "Overpowered Damage Dice"
|
||||
},
|
||||
"damageDiceOverpowered2": {
|
||||
"label": "Overpowered 2 Damage Dice"
|
||||
}
|
||||
},
|
||||
"Range": {
|
||||
"contact": "Contact",
|
||||
"distant": "Distant",
|
||||
"loin": "Far",
|
||||
"na": "N/A",
|
||||
"proche": "Close"
|
||||
}
|
||||
},
|
||||
"ToggleSheet": "Toggle mode",
|
||||
@@ -731,7 +879,11 @@
|
||||
"addEquipment": "New equipment",
|
||||
"addSpell": "New spells",
|
||||
"skill": "Skills list",
|
||||
"combatProgressionStart": "First attack of combat can succeed on a roll of 1 through this value. Resets to 1 for subsequent attacks."
|
||||
"combatProgressionStart": "First attack of combat can succeed on a roll of 1 through this value. Resets to 1 for subsequent attacks.",
|
||||
"addMiracle": "Add Miracle",
|
||||
"gifts": "Gifts list",
|
||||
"skills": "Skills list",
|
||||
"vulnerabilities": "Vulnerabilities list"
|
||||
},
|
||||
"Vulnerability": {
|
||||
"FIELDS": {
|
||||
@@ -746,7 +898,9 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"Warning": {},
|
||||
"Warning": {
|
||||
"defenseShieldOrder": "To avoid a hit without using the shield, roll Grit or Luck first — then roll the shield."
|
||||
},
|
||||
"Weapon": {
|
||||
"FIELDS": {
|
||||
"isAgile": {
|
||||
@@ -890,6 +1044,37 @@
|
||||
"cannotAct": "cannot act this second",
|
||||
"diceResult": "Dice result",
|
||||
"progressionCount": "Progression count:"
|
||||
},
|
||||
"Combat": {
|
||||
"RollMonsters": "Roll Monsters",
|
||||
"monstersNotRolledTitle": "Monsters Not Rolled",
|
||||
"monstersNotRolledMsg": "Monsters have not rolled this second. Proceed anyway?",
|
||||
"proceedYes": "Proceed",
|
||||
"proceedNo": "Cancel",
|
||||
"spellDRDialogTitle": "Spell Damage — Apply DR?",
|
||||
"spellDRDialogMsg": "Enter a damage reduction value to subtract, or click No DR to apply full damage.",
|
||||
"spellDRLabel": "DR:",
|
||||
"spellNoDR": "No DR",
|
||||
"spellApplyDR": "Apply DR"
|
||||
},
|
||||
"EquipmentCategories": {
|
||||
"ClassKit": "Class Kit",
|
||||
"Clothing": "Clothing",
|
||||
"EssentialKit": "Essential Kit",
|
||||
"FoodDrink": "Food & Drink",
|
||||
"LandTransport": "Land Transport",
|
||||
"Light": "Light",
|
||||
"LoadBearing": "Load Bearing",
|
||||
"Misc": "Miscellaneous",
|
||||
"Mount": "Mount",
|
||||
"Music": "Music",
|
||||
"Sleeping": "Sleeping",
|
||||
"WaterTransport": "Water Transport"
|
||||
},
|
||||
"DiceTray": {
|
||||
"CountTitle": "Number of dice",
|
||||
"ExplodeTitle": "Exploding dice — re-roll on maximum value",
|
||||
"ChatTitle": "Free Roll"
|
||||
}
|
||||
},
|
||||
"TYPES": {
|
||||
|
||||
+820
-410
File diff suppressed because it is too large
Load Diff
@@ -9,4 +9,5 @@ export { default as LethalFantasySpellSheet } from "./sheets/spell-sheet.mjs"
|
||||
export { default as LethalFantasyEquipmentSheet } from "./sheets/equipment-sheet.mjs"
|
||||
export { default as LethalFantasyShieldSheet } from "./sheets/shield-sheet.mjs"
|
||||
export { default as LethalFantasyMiracleSheet } from "./sheets/miracle-sheet.mjs"
|
||||
export { injectDiceTray } from "./free-roll.mjs"
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ export class LethalFantasyCombatTracker extends foundry.applications.sidebar.tab
|
||||
actions: {
|
||||
initiativePlus: LethalFantasyCombatTracker.#initiativePlus,
|
||||
initiativeMinus: LethalFantasyCombatTracker.#initiativeMinus,
|
||||
rollMonsterProgression: LethalFantasyCombatTracker.#rollMonsterProgression,
|
||||
},
|
||||
});
|
||||
|
||||
@@ -49,6 +50,15 @@ export class LethalFantasyCombatTracker extends foundry.applications.sidebar.tab
|
||||
c.update({ 'initiative': newInit });
|
||||
}
|
||||
|
||||
/**
|
||||
* Roll progression dice for all monster combatants that are eligible this round.
|
||||
* @param {Event} ev Click event.
|
||||
*/
|
||||
static async #rollMonsterProgression(ev) {
|
||||
ev.preventDefault();
|
||||
await game.combat.rollMonsterProgression();
|
||||
}
|
||||
|
||||
activateListeners(html) {
|
||||
super.activateListeners(html);
|
||||
// Display Combat settings
|
||||
@@ -109,18 +119,12 @@ export class LethalFantasyCombat extends Combat {
|
||||
}
|
||||
|
||||
async rollInitiative(ids, options) {
|
||||
console.log("%%%%%%%%% Roll Initiative", ids, options);
|
||||
|
||||
ids = typeof ids === "string" ? [ids] : ids;
|
||||
let messages = [];
|
||||
let rollMode = game.settings.get("core", "rollMode");
|
||||
|
||||
let updates = [];
|
||||
for (let cId of ids) {
|
||||
const c = this.combatants.get(cId);
|
||||
const playerOwner = game.users.find(u => u.active && !u.isGM && u.character?.id === c.actor.id);
|
||||
if (game.user.isGM && playerOwner) {
|
||||
console.log("Rolling initiative for", c.actor.name);
|
||||
game.socket.emit(`system.${SYSTEM.id}`, { type: "rollInitiative", userId: playerOwner.id, actorId: c.actor.id, combatId: this.id, combatantId: c.id });
|
||||
} else {
|
||||
await c.actor.system.rollInitiative(this.id, c.id);
|
||||
@@ -130,6 +134,36 @@ export class LethalFantasyCombat extends Combat {
|
||||
return this;
|
||||
}
|
||||
|
||||
/** Roll progression dice for all eligible monster combatants this round. Called manually by the GM. */
|
||||
async rollMonsterProgression() {
|
||||
const currentRound = this.round;
|
||||
const monsters = this.combatants.filter(c => c.actor?.type === "monster" && !c.isDefeated);
|
||||
|
||||
if (monsters.length === 0) {
|
||||
ui.notifications.warn("No monsters in combat.");
|
||||
return;
|
||||
}
|
||||
|
||||
let rolled = 0;
|
||||
for (let c of monsters) {
|
||||
if (c.initiative !== null && currentRound >= c.initiative) {
|
||||
await c.actor.system.rollProgressionDice(this.id, c.id);
|
||||
rolled++;
|
||||
}
|
||||
}
|
||||
|
||||
if (rolled === 0) {
|
||||
const earliest = monsters.reduce((min, c) => (c.initiative !== null && c.initiative < min) ? c.initiative : min, Infinity);
|
||||
if (earliest === Infinity) {
|
||||
ui.notifications.warn("Monsters have no initiative set. Roll initiative first.");
|
||||
} else {
|
||||
ui.notifications.info(`No monsters act yet — earliest monster initiative is ${earliest} (current round: ${currentRound}).`);
|
||||
}
|
||||
} else {
|
||||
this._monsterProgressionRolledRound = currentRound;
|
||||
}
|
||||
}
|
||||
|
||||
resetProgression(cId) {
|
||||
let c = this.combatants.get(cId);
|
||||
c.update({ 'system.progressionCount': 0 });
|
||||
@@ -151,15 +185,12 @@ export class LethalFantasyCombat extends Combat {
|
||||
}
|
||||
|
||||
async nextTurn() {
|
||||
console.log("NEXT TURN");
|
||||
|
||||
let turn = this.turn ?? -1;
|
||||
let skipDefeated = this.settings.skipDefeated;
|
||||
|
||||
// Determine the next turn number
|
||||
let next = null;
|
||||
for (let [i, t] of this.turns.entries()) {
|
||||
console.log("Turn", t);
|
||||
if (i <= turn) continue;
|
||||
if (skipDefeated && t.isDefeated) continue;
|
||||
next = i;
|
||||
@@ -183,7 +214,6 @@ export class LethalFantasyCombat extends Combat {
|
||||
this.turnsDone = false
|
||||
|
||||
let turn = this.turn === null ? null : 0; // Preserve the fact that it's no-one's turn currently.
|
||||
console.log("ROUND", this);
|
||||
|
||||
let advanceTime = Math.max(this.turns.length - this.turn, 0) * CONFIG.time.turnTime;
|
||||
advanceTime += CONFIG.time.roundTime;
|
||||
@@ -201,8 +231,24 @@ export class LethalFantasyCombat extends Combat {
|
||||
return this;
|
||||
}
|
||||
|
||||
// Warn if eligible monsters have not rolled progression dice this round
|
||||
const eligibleMonsters = this.combatants.filter(
|
||||
c => c.actor?.type === "monster" && !c.isDefeated && c.initiative !== null && this.round >= c.initiative
|
||||
);
|
||||
if (eligibleMonsters.length > 0 && this._monsterProgressionRolledRound !== this.round) {
|
||||
const proceed = await foundry.applications.api.DialogV2.confirm({
|
||||
window: { title: game.i18n.localize("LETHALFANTASY.Combat.monstersNotRolledTitle") },
|
||||
content: `<p>${game.i18n.localize("LETHALFANTASY.Combat.monstersNotRolledMsg")}</p>`,
|
||||
yes: { label: game.i18n.localize("LETHALFANTASY.Combat.proceedYes") },
|
||||
no: { label: game.i18n.localize("LETHALFANTASY.Combat.proceedNo") },
|
||||
rejectClose: false,
|
||||
});
|
||||
if (!proceed) return this;
|
||||
}
|
||||
|
||||
for (let c of this.combatants) {
|
||||
if (nextRound >= c.initiative) {
|
||||
if (c.actor.type === "monster") continue; // Monsters roll manually via the "Roll Monsters" button
|
||||
const playerOwner = game.users.find(u => u.active && !u.isGM && u.character?.id === c.actor.id);
|
||||
if (game.user.isGM && playerOwner) {
|
||||
game.socket.emit(`system.${SYSTEM.id}`, { type: "rollProgressionDice", userId: playerOwner.id, progressionCount: c.system.progressionCount + 1, actorId: c.actor.id, combatId: this.id, combatantId: c.id });
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
/**
|
||||
* Free Dice Tray — injected into the Foundry chat sidebar.
|
||||
*
|
||||
* Provides a compact bar for GM and players to roll any standard die (d4–d30)
|
||||
* or its exploding variant (dXx) without needing an actor sheet.
|
||||
* Supports selecting how many dice to roll (1–9).
|
||||
*/
|
||||
|
||||
/** Standard dice available in Lethal Fantasy */
|
||||
const DICE_TYPES = ["d4", "d6", "d8", "d10", "d12", "d20", "d30"]
|
||||
|
||||
/**
|
||||
* Inject the dice tray bar into the ChatLog HTML.
|
||||
* Called from `Hooks.on("renderChatLog", ...)`.
|
||||
*
|
||||
* @param {Application} _chatLog
|
||||
* @param {HTMLElement|jQuery} html
|
||||
*/
|
||||
export function injectDiceTray(_chatLog, html) {
|
||||
const el = (html instanceof HTMLElement) ? html : (html[0] ?? html)
|
||||
if (!el?.querySelector) return
|
||||
if (el.querySelector(".lf-dice-tray")) return
|
||||
|
||||
const bar = document.createElement("div")
|
||||
bar.className = "lf-dice-tray"
|
||||
|
||||
const diceButtons = DICE_TYPES.map(d =>
|
||||
`<button type="button" class="lf-dt-die-btn" data-die="${d}" title="${d.toUpperCase()}">${d.toUpperCase()}</button>`
|
||||
).join("")
|
||||
|
||||
const countOptions = Array.from({ length: 9 }, (_, i) =>
|
||||
`<option value="${i + 1}">${i + 1}</option>`
|
||||
).join("")
|
||||
|
||||
bar.innerHTML = `
|
||||
<div class="lf-dt-row">
|
||||
<span class="lf-dt-label"><i class="fa-solid fa-dice"></i></span>
|
||||
<select class="lf-dt-count" title="${game.i18n.localize("LETHALFANTASY.DiceTray.CountTitle")}">
|
||||
${countOptions}
|
||||
</select>
|
||||
<div class="lf-dt-dice">${diceButtons}</div>
|
||||
<label class="lf-dt-explode-label" title="${game.i18n.localize("LETHALFANTASY.DiceTray.ExplodeTitle")}">
|
||||
<input type="checkbox" class="lf-dt-explode" />
|
||||
<i class="fa-solid fa-explosion"></i>
|
||||
</label>
|
||||
</div>
|
||||
`
|
||||
|
||||
bar.addEventListener("click", async ev => {
|
||||
const btn = ev.target.closest(".lf-dt-die-btn")
|
||||
if (!btn) return
|
||||
ev.stopPropagation()
|
||||
|
||||
const dieType = btn.dataset.die
|
||||
const count = parseInt(bar.querySelector(".lf-dt-count").value) || 1
|
||||
const explode = bar.querySelector(".lf-dt-explode").checked
|
||||
|
||||
try {
|
||||
await rollFreeDie(dieType, count, explode)
|
||||
} catch (err) {
|
||||
console.error("Lethal Fantasy | Dice Tray error:", err)
|
||||
ui.notifications?.error("Dice Tray roll failed — see console")
|
||||
}
|
||||
})
|
||||
|
||||
const anchor = el.querySelector(".chat-form")
|
||||
?? el.querySelector(".chat-message-form")
|
||||
?? el.querySelector("form")
|
||||
if (anchor) {
|
||||
anchor.parentElement.insertBefore(bar, anchor)
|
||||
} else {
|
||||
el.appendChild(bar)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Roll one or more dice of the given type and post the result to chat.
|
||||
* For exploding dice, follows the Lethal Fantasy rule: each exploded reroll
|
||||
* contributes (result − 1) to the total, same as all other system rolls.
|
||||
*
|
||||
* @param {string} dieType Die face, e.g. "d20"
|
||||
* @param {number} count Number of dice to roll (1–9)
|
||||
* @param {boolean} explode Whether to use the exploding variant (max triggers reroll at −1)
|
||||
* @returns {Promise<void>}
|
||||
*/
|
||||
export async function rollFreeDie(dieType, count = 1, explode = false) {
|
||||
const sides = parseInt(dieType.replace("d", "")) || 20
|
||||
const baseFormula = `1d${sides}`
|
||||
const label = explode
|
||||
? `${count}${dieType.toUpperCase()}E`
|
||||
: `${count}${dieType.toUpperCase()}`
|
||||
|
||||
const dieLabel = dieType.toUpperCase()
|
||||
const dieChips = []
|
||||
let total = 0
|
||||
|
||||
for (let i = 0; i < count; i++) {
|
||||
const r0 = await new Roll(baseFormula).evaluate()
|
||||
if (game?.dice3d) await game.dice3d.showForRoll(r0, game.user, true)
|
||||
let diceResult = r0.dice[0].results[0].result
|
||||
dieChips.push({ label: dieLabel, value: diceResult, exploded: false })
|
||||
total += diceResult
|
||||
|
||||
if (explode) {
|
||||
while (diceResult === sides) {
|
||||
const rx = await new Roll(baseFormula).evaluate()
|
||||
if (game?.dice3d) await game.dice3d.showForRoll(rx, game.user, true)
|
||||
diceResult = rx.dice[0].results[0].result
|
||||
const contrib = diceResult - 1
|
||||
dieChips.push({ label: `${dieLabel}-1`, value: contrib, exploded: true })
|
||||
total += contrib
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const resultHtml = dieChips.map(chip => {
|
||||
const isMax = !chip.exploded && chip.value === sides
|
||||
const isMin = chip.value === 1
|
||||
const explodeIcon = chip.exploded ? `<i class="fa-solid fa-burst lf-dt-explode-icon"></i>` : ""
|
||||
const classes = ["lf-frc-die-chip", isMax ? "lf-frc-max" : "", isMin ? "lf-frc-min" : ""].filter(Boolean).join(" ")
|
||||
return `<div class="${classes}">
|
||||
<span class="lf-frc-die-type">${chip.label}</span>
|
||||
<span class="lf-frc-die-sep">→</span>
|
||||
<span class="lf-frc-die-val">${chip.value}${explodeIcon}</span>
|
||||
</div>`
|
||||
}).join("")
|
||||
|
||||
const totalLabel = game.i18n.localize("LETHALFANTASY.Label.total").toUpperCase()
|
||||
const content = `
|
||||
<div class="lf-free-roll-card">
|
||||
<div class="lf-frc-header">
|
||||
<i class="fa-solid fa-dice"></i>
|
||||
<span class="lf-frc-title-text">${game.i18n.localize("LETHALFANTASY.DiceTray.ChatTitle")}</span>
|
||||
<span class="lf-frc-badge">${label}</span>
|
||||
</div>
|
||||
<div class="lf-frc-dice">${resultHtml}</div>
|
||||
<div class="lf-frc-total-bar">
|
||||
<span class="lf-frc-total-label">${totalLabel}</span>
|
||||
<span class="lf-frc-total-value">${total}</span>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
|
||||
const rollMode = game.settings.get("core", "rollMode")
|
||||
// Normalize old-style rollMode keys (v12/v13) to new-style (v14), fallback to "public"
|
||||
const modeMap = { publicroll: "public", gmroll: "gm", blindroll: "blind", selfroll: "self" }
|
||||
const mode = modeMap[rollMode] ?? rollMode ?? "public"
|
||||
const msgData = {
|
||||
speaker: ChatMessage.getSpeaker(),
|
||||
content,
|
||||
sound: CONFIG.sounds.dice,
|
||||
mode,
|
||||
}
|
||||
await ChatMessage.create(msgData)
|
||||
}
|
||||
@@ -22,6 +22,7 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet
|
||||
divinityPointsMinus: LethalFantasyCharacterSheet.#onDivinityPointsMinus,
|
||||
aetherPointsPlus: LethalFantasyCharacterSheet.#onAetherPointsPlus,
|
||||
aetherPointsMinus: LethalFantasyCharacterSheet.#onAetherPointsMinus,
|
||||
rollSpellDamage: LethalFantasyCharacterSheet.#onRollSpellDamage,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -70,10 +71,10 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet
|
||||
biography: { id: "biography", group: "sheet", icon: "fa-solid fa-book", label: "LETHALFANTASY.Label.biography" },
|
||||
}
|
||||
if (this.actor.system.biodata.magicUser) {
|
||||
tabs.spells = { id: "spells", group: "sheet", icon: "fa-sharp-duotone fa-solid fa-wand-magic-sparkles", label: "LETHALFANTASY.Label.spells" }
|
||||
tabs.spells = { id: "spells", group: "sheet", icon: "fa-solid fa-wand-magic-sparkles", label: "LETHALFANTASY.Label.spells" }
|
||||
}
|
||||
if (this.actor.system.biodata.clericUser) {
|
||||
tabs.miracles = { id: "miracles", group: "sheet", icon: "fa-sharp-duotone fa-solid fa-hands-praying", label: "LETHALFANTASY.Label.miracles" }
|
||||
tabs.miracles = { id: "miracles", group: "sheet", icon: "fa-solid fa-hands-praying", label: "LETHALFANTASY.Label.miracles" }
|
||||
}
|
||||
for (const v of Object.values(tabs)) {
|
||||
v.active = this.tabGroups[v.group] === v.id
|
||||
@@ -172,7 +173,7 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet
|
||||
})
|
||||
if (!roll) return null
|
||||
|
||||
await roll.toMessage({}, { rollMode: roll.options.rollMode })
|
||||
await roll.toMessage({}, { messageMode: roll.options.rollMode })
|
||||
}
|
||||
|
||||
static async #onRollInitiative(event, target) {
|
||||
@@ -219,6 +220,75 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet
|
||||
this.actor.update({ "system.aetherPoints.value": points })
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles spell damage roll from the spell sheet tab.
|
||||
* Shows a DR dialog then rolls the appropriate damage formula.
|
||||
* @param {PointerEvent} event
|
||||
* @param {HTMLElement} target
|
||||
*/
|
||||
static async #onRollSpellDamage(event, target) {
|
||||
if (this.isEditMode) return
|
||||
const itemId = target.dataset.itemId
|
||||
const tier = target.dataset.damageTier
|
||||
const spell = this.actor.items.get(itemId)
|
||||
if (!spell) return
|
||||
|
||||
const formulaMap = {
|
||||
standard: spell.system.damageDice,
|
||||
overpowered: spell.system.damageDiceOverpowered,
|
||||
overpowered2: spell.system.damageDiceOverpowered2,
|
||||
}
|
||||
const formula = formulaMap[tier]
|
||||
if (!formula) return
|
||||
|
||||
const manualDR = await foundry.applications.api.DialogV2.wait({
|
||||
window: { title: game.i18n.localize("LETHALFANTASY.Combat.spellDRDialogTitle") },
|
||||
classes: ["lethalfantasy"],
|
||||
position: { width: 320 },
|
||||
content: `<div style="padding:0.5rem 0">
|
||||
<p style="margin-bottom:0.6rem">${game.i18n.localize("LETHALFANTASY.Combat.spellDRDialogMsg")}</p>
|
||||
<div style="display:flex;align-items:center;gap:0.5rem">
|
||||
<label style="font-weight:bold">${game.i18n.localize("LETHALFANTASY.Combat.spellDRLabel")}</label>
|
||||
<input type="number" name="manualDr" value="0" min="0" style="width:5rem"/>
|
||||
</div>
|
||||
</div>`,
|
||||
buttons: [
|
||||
{
|
||||
action: "noDR",
|
||||
label: game.i18n.localize("LETHALFANTASY.Combat.spellNoDR"),
|
||||
icon: "fa-solid fa-wand-magic-sparkles",
|
||||
callback: () => 0
|
||||
},
|
||||
{
|
||||
action: "applyDR",
|
||||
label: game.i18n.localize("LETHALFANTASY.Combat.spellApplyDR"),
|
||||
icon: "fa-solid fa-shield",
|
||||
callback: (event, button) => Number(button.form?.elements?.manualDr?.value) || 0
|
||||
},
|
||||
{
|
||||
action: "cancel",
|
||||
label: game.i18n.localize("LETHALFANTASY.Combat.proceedNo"),
|
||||
callback: () => "cancel"
|
||||
}
|
||||
],
|
||||
rejectClose: false
|
||||
})
|
||||
if (manualDR === null || manualDR === "cancel") return
|
||||
|
||||
const rollOpts = {
|
||||
type: "spell-damage",
|
||||
rollType: "spell-damage",
|
||||
rollName: `${spell.name} — ${formula}`,
|
||||
isDamage: true,
|
||||
rollData: { isDamage: true },
|
||||
manualDR,
|
||||
actorId: this.actor.id,
|
||||
actorName: this.actor.name,
|
||||
actorImage: this.actor.img
|
||||
}
|
||||
await LethalFantasyRoll.rollSpellDamageToMessage(formula, rollOpts)
|
||||
}
|
||||
|
||||
static #onCreateEquipment(event, target) {
|
||||
}
|
||||
|
||||
@@ -259,9 +329,11 @@ export default class LethalFantasyCharacterSheet extends LethalFantasyActorSheet
|
||||
|
||||
async _onRoll(event, target) {
|
||||
if (this.isEditMode) return
|
||||
const rollType = event.target.dataset.rollType
|
||||
let rollKey = event.target.dataset.rollKey;
|
||||
let rollDice = event.target.dataset?.rollDice;
|
||||
const el = event.currentTarget
|
||||
const rollType = el.dataset.rollType
|
||||
if (!rollType) return
|
||||
let rollKey = el.dataset.rollKey
|
||||
let rollDice = el.dataset.rollDice
|
||||
|
||||
this.actor.prepareRoll(rollType, rollKey, rollDice)
|
||||
|
||||
|
||||
@@ -111,11 +111,13 @@ export default class LethalFantasyMonsterSheet extends LethalFantasyActorSheet {
|
||||
})
|
||||
if (!roll) return null
|
||||
|
||||
await roll.toMessage({}, { rollMode: roll.options.rollMode })
|
||||
await roll.toMessage({}, { messageMode: roll.options.rollMode })
|
||||
}
|
||||
|
||||
static async #onRollInitiative(event, target) {
|
||||
await this.document.system.rollInitiative(event, target)
|
||||
const combat = game.combat
|
||||
const combatant = combat?.combatants.find(c => c.actorId === this.document.id)
|
||||
await this.document.system.rollInitiative(combat?.id, combatant?.id)
|
||||
}
|
||||
|
||||
getBestWeaponClassSkill(skills, rollType, multiplier = 1.0) {
|
||||
|
||||
@@ -1,152 +1,669 @@
|
||||
{
|
||||
"d30_dice_results": {
|
||||
"30": {
|
||||
"melee_attack": "Possible Lethal or Vital Strike or Add D20E to Attack",
|
||||
"ranged_attack": "Possible Lethal or Vital Strike or Add D20E to Attack",
|
||||
"melee_defense": "Possible Flawless or Legendary Defense or Add D20E to Defense",
|
||||
"arcane_spell_attack": "Possible Lethal or Vital Magical Strike or Add D20E to Spell Attack",
|
||||
"arcane_spell_defense": "Possible Spell Catastrophe or adds D20E to Spell Defense",
|
||||
"skill_rolls": "Skill Succeeds Regardless of Opposing Roll / Success at highest level / Matching 30s cancel each other out"
|
||||
"melee_attack": {
|
||||
"type": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"type": "special_strike",
|
||||
"options": [
|
||||
"lethal",
|
||||
"vital"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "bonus_dice",
|
||||
"dice": "D20E",
|
||||
"target": "attack"
|
||||
}
|
||||
],
|
||||
"description": "Possible Lethal or Vital Strike or Add D20E to Attack"
|
||||
},
|
||||
"ranged_attack": {
|
||||
"type": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"type": "special_strike",
|
||||
"options": [
|
||||
"lethal",
|
||||
"vital"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "bonus_dice",
|
||||
"dice": "D20E",
|
||||
"target": "attack"
|
||||
}
|
||||
],
|
||||
"description": "Possible Lethal or Vital Strike or Add D20E to Attack"
|
||||
},
|
||||
"melee_defense": {
|
||||
"type": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"type": "special_defense",
|
||||
"options": [
|
||||
"flawless",
|
||||
"legendary"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "bonus_dice",
|
||||
"dice": "D20E",
|
||||
"target": "defense"
|
||||
}
|
||||
],
|
||||
"description": "Possible Flawless or Legendary Defense or Add D20E to Defense"
|
||||
},
|
||||
"arcane_spell_attack": {
|
||||
"type": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"type": "special_strike",
|
||||
"options": [
|
||||
"lethal_magical",
|
||||
"vital_magical"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "bonus_dice",
|
||||
"dice": "D20E",
|
||||
"target": "spell_attack"
|
||||
}
|
||||
],
|
||||
"description": "Possible Lethal or Vital Magical Strike or Add D20E to Spell Attack"
|
||||
},
|
||||
"arcane_spell_defense": {
|
||||
"type": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"type": "spell_calamity"
|
||||
},
|
||||
{
|
||||
"type": "bonus_dice",
|
||||
"dice": "D20E",
|
||||
"target": "spell_defense"
|
||||
}
|
||||
],
|
||||
"description": "Possible Spell Catastrophe or adds D20E to Spell Defense"
|
||||
},
|
||||
"skill_rolls": {
|
||||
"type": "skill_auto_success",
|
||||
"description": "Skill Succeeds Regardless of Opposing Roll"
|
||||
},
|
||||
"ranged_defense": {
|
||||
"type": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"type": "special_defense",
|
||||
"options": [
|
||||
"flawless",
|
||||
"legendary"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "bonus_dice",
|
||||
"dice": "D20E",
|
||||
"target": "defense"
|
||||
}
|
||||
],
|
||||
"description": "Possible Flawless or Legendary Defense or Add D20E to Defense"
|
||||
},
|
||||
"saving_throws": {
|
||||
"type": "save_auto_success",
|
||||
"description": "Saving Throw Succeeds Regardless of Opposing Roll"
|
||||
}
|
||||
},
|
||||
"29": {
|
||||
"melee_attack": "Gain 1 Grit",
|
||||
"ranged_attack": "Gain 1 Grit",
|
||||
"melee_defense": "Gain 1 Grit",
|
||||
"arcane_spell_attack": "Gain 1 Grit",
|
||||
"arcane_spell_defense": "Gain 1 Grit",
|
||||
"skill_rolls": "Gain 1 Grit"
|
||||
"melee_attack": {
|
||||
"type": "gain_grit",
|
||||
"amount": 1,
|
||||
"description": "Gain 1 Grit"
|
||||
},
|
||||
"ranged_attack": {
|
||||
"type": "gain_grit",
|
||||
"amount": 1,
|
||||
"description": "Gain 1 Grit"
|
||||
},
|
||||
"melee_defense": {
|
||||
"type": "gain_grit",
|
||||
"amount": 1,
|
||||
"description": "Gain 1 Grit"
|
||||
},
|
||||
"arcane_spell_attack": {
|
||||
"type": "gain_grit",
|
||||
"amount": 1,
|
||||
"description": "Gain 1 Grit"
|
||||
},
|
||||
"arcane_spell_defense": {
|
||||
"type": "gain_grit",
|
||||
"amount": 1,
|
||||
"description": "Gain 1 Grit"
|
||||
},
|
||||
"skill_rolls": {
|
||||
"type": "gain_grit",
|
||||
"amount": 1,
|
||||
"description": "Gain 1 Grit"
|
||||
},
|
||||
"ranged_defense": {
|
||||
"type": "gain_grit",
|
||||
"amount": 1,
|
||||
"description": "Gain 1 Grit"
|
||||
},
|
||||
"saving_throws": {
|
||||
"type": "gain_grit",
|
||||
"amount": 1,
|
||||
"description": "Gain 1 Grit"
|
||||
}
|
||||
},
|
||||
"28": {
|
||||
"melee_attack": "Shield Destruction",
|
||||
"ranged_attack": "empty",
|
||||
"melee_defense": "empty",
|
||||
"arcane_spell_attack": "empty",
|
||||
"arcane_spell_defense": "empty",
|
||||
"skill_rolls": "empty"
|
||||
"melee_attack": {
|
||||
"type": "shield_destruction",
|
||||
"description": "Shield Destruction"
|
||||
}
|
||||
},
|
||||
"27": {
|
||||
"melee_attack": "Granted D6 (1-6) Attack Modifier for This Melee Attack",
|
||||
"ranged_attack": "Granted D6 (1-6) Attack Modifier for This Ranged Attack",
|
||||
"melee_defense": "Granted 1 Luck dice for Use in This Combat Only",
|
||||
"arcane_spell_attack": "No Spell Lethargy (the Aether Approves)",
|
||||
"arcane_spell_defense": "Caster Suffers Severe pain and will be under a flash of pain for 1D6E seconds",
|
||||
"skill_rolls": "Granted D6 (1-6) Skill Modifier for this Skill Attempt"
|
||||
"melee_attack": {
|
||||
"type": "bonus_dice",
|
||||
"dice": "D6",
|
||||
"target": "attack",
|
||||
"description": "Granted D6 (1-6) Attack Modifier for This Melee Attack"
|
||||
},
|
||||
"ranged_attack": {
|
||||
"type": "bonus_dice",
|
||||
"dice": "D6",
|
||||
"target": "attack",
|
||||
"description": "Granted D6 (1-6) Attack Modifier for This Ranged Attack"
|
||||
},
|
||||
"melee_defense": {
|
||||
"type": "luck_die",
|
||||
"scope": "combat",
|
||||
"description": "Granted 1 Luck dice for Use in This Combat Only"
|
||||
},
|
||||
"arcane_spell_attack": {
|
||||
"type": "no_lethargy",
|
||||
"description": "No Spell Lethargy the Aether Approves of Characters Efforts"
|
||||
},
|
||||
"arcane_spell_defense": {
|
||||
"type": "flash_of_pain",
|
||||
"duration_dice": "1D6E",
|
||||
"target": "caster",
|
||||
"description": "Caster Suffers Severe pain and will be under a flash of pain for 1D6E seconds"
|
||||
},
|
||||
"ranged_defense": {
|
||||
"type": "luck_die",
|
||||
"scope": "combat",
|
||||
"description": "Granted 1 Luck dice for Use in This Combat Only"
|
||||
}
|
||||
},
|
||||
"26": {
|
||||
"melee_attack": "Shield Destruction",
|
||||
"ranged_attack": "empty",
|
||||
"melee_defense": "empty",
|
||||
"arcane_spell_attack": "empty",
|
||||
"arcane_spell_defense": "empty",
|
||||
"skill_rolls": "empty"
|
||||
"melee_attack": {
|
||||
"type": "shield_destruction",
|
||||
"description": "Shield Destruction"
|
||||
}
|
||||
},
|
||||
"25": {
|
||||
"melee_attack": "Bleed, Knock-Back on Hit",
|
||||
"ranged_attack": "Bleed",
|
||||
"melee_defense": "Kick, Punch or Shield Bash",
|
||||
"arcane_spell_attack": "empty",
|
||||
"arcane_spell_defense": "empty",
|
||||
"skill_rolls": "Add 1 to Skill Roll"
|
||||
"skill_rolls": {
|
||||
"type": "bonus_flat",
|
||||
"amount": 1,
|
||||
"target": "skill",
|
||||
"description": "Add 1 to Skill Roll"
|
||||
},
|
||||
"saving_throws": {
|
||||
"type": "bonus_flat",
|
||||
"amount": 1,
|
||||
"target": "save",
|
||||
"description": "Add 1 to Saving Throw"
|
||||
}
|
||||
},
|
||||
"21": {
|
||||
"melee_attack": "Hit Inflicts Flash of Pain 1D6E seconds",
|
||||
"ranged_attack": "Hit Inflicts Flash of Pain 1D6E seconds",
|
||||
"melee_defense": "Defender Recovers or ignores any flash of pain",
|
||||
"arcane_spell_attack": "Magical Damage inflicts Flash of pain 1D6E seconds",
|
||||
"arcane_spell_defense": "Caster Suffers Severe pain and will be under a flash of pain for 1D6E seconds",
|
||||
"skill_rolls": "empty"
|
||||
"melee_attack": {
|
||||
"type": "flash_of_pain",
|
||||
"duration_dice": "1D6E",
|
||||
"target": "defender",
|
||||
"description": "Hit Inflicts Flash of Pain 1D6E seconds"
|
||||
},
|
||||
"ranged_attack": {
|
||||
"type": "flash_of_pain",
|
||||
"duration_dice": "1D6E",
|
||||
"target": "defender",
|
||||
"description": "Hit Inflicts Flash of Pain 1D6E seconds"
|
||||
},
|
||||
"melee_defense": {
|
||||
"type": "recover_pain",
|
||||
"description": "Defender Recovers or ignores any flash of pain"
|
||||
},
|
||||
"arcane_spell_attack": {
|
||||
"type": "flash_of_pain",
|
||||
"duration_dice": "1D6E",
|
||||
"target": "defender",
|
||||
"description": "Magical Damage inflicts Flash of pain 1D6E seconds"
|
||||
},
|
||||
"arcane_spell_defense": {
|
||||
"type": "flash_of_pain",
|
||||
"duration_dice": "1D6E",
|
||||
"target": "caster",
|
||||
"description": "Caster Suffers Severe pain and will be under a flash of pain for 1D6E seconds"
|
||||
},
|
||||
"skill_rolls": {
|
||||
"type": "bonus_dice",
|
||||
"dice": "D6",
|
||||
"target": "skill",
|
||||
"description": "Granted D6 (1-6) Skill Modifier for this Skill Attempt"
|
||||
},
|
||||
"ranged_defense": {
|
||||
"type": "recover_pain",
|
||||
"description": "Defender Recovers or ignores any flash of pain"
|
||||
},
|
||||
"saving_throws": {
|
||||
"type": "bonus_dice",
|
||||
"dice": "D6",
|
||||
"target": "save",
|
||||
"description": "Granted D6 (1-6) Saving Throw Modifier for this Saving Throw Attempt"
|
||||
}
|
||||
},
|
||||
"20": {
|
||||
"melee_attack": "Possible Vicious Strike. Bleed, Knock-back on Hit",
|
||||
"ranged_attack": "Possible Vicious Strike. Bleeding wound inflicted on hit.",
|
||||
"melee_defense": "Possible 20/20 defense (avoids Any Attack Except a Lethal Strike). Grants a Kick, Punch or Shield Bash counter",
|
||||
"arcane_spell_attack": "Possible Vicious Application of a Magical Attack",
|
||||
"arcane_spell_defense": "Possible 20/20 Spell defense (Saves Against Any Magical Attack Except a Lethal Magical Strike)",
|
||||
"skill_rolls": "20 Added to Skill Roll"
|
||||
"melee_attack": {
|
||||
"type": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"type": "special_strike",
|
||||
"options": [
|
||||
"vicious"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "bonus_dice",
|
||||
"dice": "D12",
|
||||
"target": "attack"
|
||||
}
|
||||
],
|
||||
"description": "Possible Vicious Strike or Add D12 to attack"
|
||||
},
|
||||
"ranged_attack": {
|
||||
"type": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"type": "special_strike",
|
||||
"options": [
|
||||
"vicious"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "bonus_dice",
|
||||
"dice": "D12",
|
||||
"target": "attack"
|
||||
}
|
||||
],
|
||||
"description": "Possible Vicious Strike or add D12 to attack"
|
||||
},
|
||||
"melee_defense": {
|
||||
"type": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"type": "special_defense",
|
||||
"options": [
|
||||
"perfect"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "bonus_dice",
|
||||
"dice": "D12",
|
||||
"target": "defense"
|
||||
}
|
||||
],
|
||||
"description": "Possible 20/20 defense that avoids Any Attack Except a Lethal Strike or adds D12 to defense"
|
||||
},
|
||||
"arcane_spell_attack": {
|
||||
"type": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"type": "special_strike",
|
||||
"options": [
|
||||
"vicious_magical"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "bonus_dice",
|
||||
"dice": "D12",
|
||||
"target": "spell_attack"
|
||||
}
|
||||
],
|
||||
"description": "Possible Vicious Application of a Magical Attack or add D12 to attack"
|
||||
},
|
||||
"arcane_spell_defense": {
|
||||
"type": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"type": "special_defense",
|
||||
"options": [
|
||||
"perfect_spell"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "bonus_dice",
|
||||
"dice": "D12",
|
||||
"target": "spell_defense"
|
||||
}
|
||||
],
|
||||
"description": "Possible 20/20 Spell defense that Saves Against Any Magical Attack Except a Lethal Magical Strike or add D12 to spell defense"
|
||||
},
|
||||
"skill_rolls": {
|
||||
"type": "bonus_flat",
|
||||
"amount": 20,
|
||||
"target": "skill",
|
||||
"description": "20 Added to Skill Roll"
|
||||
},
|
||||
"ranged_defense": {
|
||||
"type": "choice",
|
||||
"choices": [
|
||||
{
|
||||
"type": "special_defense",
|
||||
"options": [
|
||||
"perfect"
|
||||
]
|
||||
},
|
||||
{
|
||||
"type": "bonus_dice",
|
||||
"dice": "D12",
|
||||
"target": "defense"
|
||||
}
|
||||
],
|
||||
"description": "Possible 20/20 defense that avoids Any Attack Except a Lethal Strike or adds D12 to defense"
|
||||
},
|
||||
"saving_throws": {
|
||||
"type": "bonus_flat",
|
||||
"amount": 20,
|
||||
"target": "save",
|
||||
"description": "20 Added to Saving Throw"
|
||||
}
|
||||
},
|
||||
"15": {
|
||||
"melee_attack": "Bleed, Knock-back on Hit",
|
||||
"ranged_attack": "Bleed",
|
||||
"melee_defense": "Kick, Punch or Shield Bash",
|
||||
"arcane_spell_attack": "empty",
|
||||
"arcane_spell_defense": "empty",
|
||||
"skill_rolls": "Add 1 to Skill Roll"
|
||||
},
|
||||
"13": {
|
||||
"melee_attack": "empty",
|
||||
"ranged_attack": "empty",
|
||||
"melee_defense": "empty",
|
||||
"arcane_spell_attack": "empty",
|
||||
"arcane_spell_defense": "empty",
|
||||
"skill_rolls": "empty"
|
||||
"melee_attack": {
|
||||
"type": "combo",
|
||||
"effects": [
|
||||
{
|
||||
"type": "bleed"
|
||||
},
|
||||
{
|
||||
"type": "internal_injury"
|
||||
}
|
||||
],
|
||||
"description": "Bleed, Internal Injury on Hit"
|
||||
},
|
||||
"ranged_attack": {
|
||||
"type": "bleed",
|
||||
"description": "Bleed"
|
||||
},
|
||||
"melee_defense": {
|
||||
"type": "counter_attack",
|
||||
"options": [
|
||||
"kick",
|
||||
"punch"
|
||||
],
|
||||
"description": "Kick or Punch"
|
||||
},
|
||||
"skill_rolls": {
|
||||
"type": "bonus_flat",
|
||||
"amount": 1,
|
||||
"target": "skill",
|
||||
"description": "Add 1 to Skill Roll"
|
||||
},
|
||||
"ranged_defense": {
|
||||
"type": "counter_attack",
|
||||
"options": [
|
||||
"kick",
|
||||
"punch"
|
||||
],
|
||||
"description": "Kick or Punch"
|
||||
},
|
||||
"saving_throws": {
|
||||
"type": "bonus_flat",
|
||||
"amount": 1,
|
||||
"target": "save",
|
||||
"description": "Add 1 to Saving Throw"
|
||||
}
|
||||
},
|
||||
"13": {},
|
||||
"11": {
|
||||
"melee_attack": "Flurry Attack or Hit to Miss",
|
||||
"ranged_attack": "Roll 2x Damage Dice",
|
||||
"melee_defense": "empty",
|
||||
"arcane_spell_attack": "empty",
|
||||
"arcane_spell_defense": "empty",
|
||||
"skill_rolls": "empty"
|
||||
"melee_attack": {
|
||||
"type": "flurry",
|
||||
"condition": "hit_or_miss",
|
||||
"description": "Flurry Attack or Hit to Miss"
|
||||
},
|
||||
"ranged_attack": {
|
||||
"type": "double_damage_dice",
|
||||
"description": "Roll 2x Damage Dice"
|
||||
}
|
||||
},
|
||||
"10": {
|
||||
"melee_attack": "Bleed, Knock-back on Hit",
|
||||
"ranged_attack": "Bleed",
|
||||
"melee_defense": "Kick, Punch or Shield Bash",
|
||||
"arcane_spell_attack": "empty",
|
||||
"arcane_spell_defense": "empty",
|
||||
"skill_rolls": "Add 1 to Skill Roll"
|
||||
"melee_attack": {
|
||||
"type": "combo",
|
||||
"effects": [
|
||||
{
|
||||
"type": "bleed"
|
||||
},
|
||||
{
|
||||
"type": "internal_injury"
|
||||
}
|
||||
],
|
||||
"description": "Bleed, Internal Injury on Hit"
|
||||
},
|
||||
"ranged_attack": {
|
||||
"type": "bleed",
|
||||
"description": "Bleed"
|
||||
},
|
||||
"melee_defense": {
|
||||
"type": "counter_attack",
|
||||
"options": [
|
||||
"kick",
|
||||
"punch"
|
||||
],
|
||||
"description": "Kick or Punch"
|
||||
},
|
||||
"skill_rolls": {
|
||||
"type": "bonus_flat",
|
||||
"amount": 1,
|
||||
"target": "skill",
|
||||
"description": "Add 1 to Skill Roll"
|
||||
},
|
||||
"ranged_defense": {
|
||||
"type": "counter_attack",
|
||||
"options": [
|
||||
"kick",
|
||||
"punch"
|
||||
],
|
||||
"description": "Kick or Punch"
|
||||
},
|
||||
"saving_throws": {
|
||||
"type": "bonus_flat",
|
||||
"amount": 1,
|
||||
"target": "save",
|
||||
"description": "Add 1 to Saving Throw"
|
||||
}
|
||||
},
|
||||
"8": {
|
||||
"melee_attack": "Mulligan, Can Choose to Re-roll This Attack",
|
||||
"ranged_attack": "Mulligan, Can Choose to Re-Roll This Attack",
|
||||
"melee_defense": "Mulligan, Can Choose to Re-Roll This Defense",
|
||||
"arcane_spell_attack": "Mulligan, Can Re-Roll This Spell Attack",
|
||||
"arcane_spell_defense": "Mulligan, Can Re-Roll This Spell Defense",
|
||||
"skill_rolls": "Mulligan, Can Re-Roll This Skill roll"
|
||||
"melee_attack": {
|
||||
"type": "mulligan",
|
||||
"description": "Mulligan, Can Choose to Re-roll This Attack"
|
||||
},
|
||||
"ranged_attack": {
|
||||
"type": "mulligan",
|
||||
"description": "Mulligan, Can Choose to Re-Roll This Attack"
|
||||
},
|
||||
"melee_defense": {
|
||||
"type": "mulligan",
|
||||
"description": "Mulligan, Can Choose to Re-Roll This Defense"
|
||||
},
|
||||
"arcane_spell_attack": {
|
||||
"type": "mulligan",
|
||||
"description": "Mulligan, Can Re-Roll This Spell Attack"
|
||||
},
|
||||
"arcane_spell_defense": {
|
||||
"type": "mulligan",
|
||||
"description": "Mulligan, Can Re-Roll This Spell Defense"
|
||||
},
|
||||
"skill_rolls": {
|
||||
"type": "mulligan",
|
||||
"description": "Mulligan, Can Re-Roll This Skill roll"
|
||||
},
|
||||
"ranged_defense": {
|
||||
"type": "mulligan",
|
||||
"description": "Mulligan, Can Choose to Re-Roll This Defense"
|
||||
},
|
||||
"saving_throws": {
|
||||
"type": "mulligan",
|
||||
"description": "Mulligan, Can Re-Roll This Saving Throw"
|
||||
}
|
||||
},
|
||||
"7": {
|
||||
"melee_attack": "Flurry Attack on Hit or Miss",
|
||||
"ranged_attack": "Roll 2x Double Damage Dice",
|
||||
"melee_defense": "empty",
|
||||
"arcane_spell_attack": "empty",
|
||||
"arcane_spell_defense": "empty",
|
||||
"skill_rolls": "empty"
|
||||
"melee_attack": {
|
||||
"type": "flurry",
|
||||
"condition": "hit_or_miss",
|
||||
"description": "Flurry Attack on Hit or Miss"
|
||||
},
|
||||
"ranged_attack": {
|
||||
"type": "double_damage_dice",
|
||||
"description": "Roll 2x Damage Dice"
|
||||
}
|
||||
},
|
||||
"5": {
|
||||
"melee_attack": "Bleed, Knock-back on Hit",
|
||||
"ranged_attack": "Bleed",
|
||||
"melee_defense": "Kick, Punch, or Shield Bash",
|
||||
"arcane_spell_attack": "empty",
|
||||
"arcane_spell_defense": "empty",
|
||||
"skill_rolls": "Add 1 to Skill Roll"
|
||||
"melee_attack": {
|
||||
"type": "combo",
|
||||
"effects": [
|
||||
{
|
||||
"type": "bleed"
|
||||
},
|
||||
{
|
||||
"type": "internal_injury"
|
||||
}
|
||||
],
|
||||
"description": "Bleed, Internal Injury on Hit"
|
||||
},
|
||||
"ranged_attack": {
|
||||
"type": "bleed",
|
||||
"description": "Bleed"
|
||||
},
|
||||
"melee_defense": {
|
||||
"type": "counter_attack",
|
||||
"options": [
|
||||
"kick",
|
||||
"punch"
|
||||
],
|
||||
"description": "Kick or Punch"
|
||||
},
|
||||
"skill_rolls": {
|
||||
"type": "bonus_flat",
|
||||
"amount": 1,
|
||||
"target": "skill",
|
||||
"description": "Add 1 to Skill Roll"
|
||||
},
|
||||
"ranged_defense": {
|
||||
"type": "counter_attack",
|
||||
"options": [
|
||||
"kick",
|
||||
"punch"
|
||||
],
|
||||
"description": "Kick or Punch"
|
||||
},
|
||||
"saving_throws": {
|
||||
"type": "bonus_flat",
|
||||
"amount": 1,
|
||||
"target": "save",
|
||||
"description": "Add 1 to Saving Throw"
|
||||
}
|
||||
},
|
||||
"3": {
|
||||
"melee_attack": "Triple Damage",
|
||||
"ranged_attack": "Triple Damage",
|
||||
"melee_defense": "DR Tripled including Shield",
|
||||
"arcane_spell_attack": "Triple Damage on Spell Damage",
|
||||
"arcane_spell_defense": "D12 Added to Spell Defense Modifier",
|
||||
"skill_rolls": "empty"
|
||||
"melee_attack": {
|
||||
"type": "damage_multiplier",
|
||||
"multiplier": 3,
|
||||
"description": "Triple Damage"
|
||||
},
|
||||
"ranged_attack": {
|
||||
"type": "damage_multiplier",
|
||||
"multiplier": 3,
|
||||
"description": "Triple Damage"
|
||||
},
|
||||
"melee_defense": {
|
||||
"type": "dr_multiplier",
|
||||
"multiplier": 3,
|
||||
"includes_shield": true,
|
||||
"description": "DR Tripled including Shield"
|
||||
},
|
||||
"arcane_spell_attack": {
|
||||
"type": "damage_multiplier",
|
||||
"multiplier": 3,
|
||||
"description": "Triple Damage on Spell Damage"
|
||||
},
|
||||
"arcane_spell_defense": {
|
||||
"type": "bonus_dice",
|
||||
"dice": "D12",
|
||||
"target": "spell_defense",
|
||||
"description": "D12 Added to Spell Defense Modifier"
|
||||
},
|
||||
"ranged_defense": {
|
||||
"type": "dr_multiplier",
|
||||
"multiplier": 3,
|
||||
"includes_shield": true,
|
||||
"description": "DR Tripled including Shield"
|
||||
}
|
||||
},
|
||||
"2": {
|
||||
"melee_attack": "Double Damage",
|
||||
"ranged_attack": "Double Damage",
|
||||
"melee_defense": "DR Doubled including Shield",
|
||||
"arcane_spell_attack": "Double Damage on Spell Damage",
|
||||
"arcane_spell_defense": "D6 Added to Spell Defense Modifier",
|
||||
"skill_rolls": "empty"
|
||||
"melee_attack": {
|
||||
"type": "damage_multiplier",
|
||||
"multiplier": 2,
|
||||
"description": "Double Damage"
|
||||
},
|
||||
"ranged_attack": {
|
||||
"type": "damage_multiplier",
|
||||
"multiplier": 2,
|
||||
"description": "Double Damage"
|
||||
},
|
||||
"melee_defense": {
|
||||
"type": "dr_multiplier",
|
||||
"multiplier": 2,
|
||||
"includes_shield": true,
|
||||
"description": "DR Doubled including Shield"
|
||||
},
|
||||
"arcane_spell_attack": {
|
||||
"type": "damage_multiplier",
|
||||
"multiplier": 2,
|
||||
"description": "Double Damage on Spell Damage"
|
||||
},
|
||||
"arcane_spell_defense": {
|
||||
"type": "bonus_dice",
|
||||
"dice": "D6",
|
||||
"target": "spell_defense",
|
||||
"description": "D6 Added to Spell Defense Modifier"
|
||||
},
|
||||
"ranged_defense": {
|
||||
"type": "dr_multiplier",
|
||||
"multiplier": 2,
|
||||
"includes_shield": true,
|
||||
"description": "DR Doubled including Shield"
|
||||
}
|
||||
},
|
||||
"1": {
|
||||
"melee_attack": "empty",
|
||||
"ranged_attack": "Possible Fumble Ranged ammo is broken unrecoverable",
|
||||
"melee_defense": "empty",
|
||||
"arcane_spell_attack": "Possible Spell Calamity or Catastrophe",
|
||||
"arcane_spell_defense": "empty",
|
||||
"skill_rolls": "empty"
|
||||
"ranged_attack": {
|
||||
"type": "fumble",
|
||||
"detail": "ranged_ammo_broken",
|
||||
"description": "Possible Fumble Ranged ammo is broken unrecoverable"
|
||||
},
|
||||
"arcane_spell_attack": {
|
||||
"type": "spell_calamity",
|
||||
"description": "A possible spell calamity has occurred"
|
||||
},
|
||||
"melee_attack": {
|
||||
"type": "fumble",
|
||||
"detail": "melee_fumble",
|
||||
"description": "Possible Fumble"
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"flash_of_pain": "Causes the victim to defend with disfavor. They can only walk and cannot attack, cast spells, call miracles or perform skills.",
|
||||
"shield_destruction_condition": "Occurs only if damage exceeds the shields DR."
|
||||
"flash_of_pain": "Causes the victim to defend against melee and spell attacks with disfavor. They can only walk and cannot attack, cast spells, call miracles or perform skills.",
|
||||
"shield_destruction_condition": "Shield destruction occurs only if damage exceeds the shields DR.",
|
||||
"matching_30s": "Matching 30s on skill rolls cancel each other out and is resolved by the skill roll.",
|
||||
"skill_roll_30": "A 30 on a skill roll indicates success at highest level of the skill involved."
|
||||
}
|
||||
}
|
||||
@@ -85,11 +85,18 @@ export const RANGE_CHOICES = {
|
||||
"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" },
|
||||
"long": { label: "Long (Purple +7)", value: "+7" },
|
||||
"extreme": { label: "Extreme (Grey +9)", value: "+9" },
|
||||
"beyondskill": { label: "Beyond Skill (Blue +11)", value: "beyondskill" }
|
||||
}
|
||||
|
||||
export const ATTACKER_MOVEMENT_CHOICES = {
|
||||
"none": { label: "None / Stationary (D20E Favor)", favor: true, value: "2D20kh" },
|
||||
"walk": { label: "Walk (D20E)", value: "D20" },
|
||||
"incombat": { label: "In Combat (D20E)", value: "D20" },
|
||||
"run": { label: "Jog/Run/Sprint (D20E Disfavor)", disfavor: true, value: "2D20kl" }
|
||||
}
|
||||
|
||||
export const ATTACKER_AIM_CHOICES = {
|
||||
"simple": { label: "Simple (+0)", value: "0" },
|
||||
"careful": { label: "Careful (Red +5)", value: "+4" },
|
||||
@@ -193,6 +200,7 @@ export const DICE_VALUES = {
|
||||
export const CHARACTERISTIC_ATTACK = ["str", "int", "wis", "dex"]
|
||||
export const CHARACTERISTIC_RANGED_ATTACK = ["int", "wis", "dex"]
|
||||
export const CHARACTERISTIC_DEFENSE = ["int", "wis", "dex"]
|
||||
export const CHARACTERISTIC_RANGED_DEFENSE = ["int", "wis", "dex"]
|
||||
export const CHARACTERISTIC_DAMAGE = ["str"]
|
||||
|
||||
export const DEFENSE_DICE_VALUES = {
|
||||
@@ -304,6 +312,7 @@ export const SYSTEM = {
|
||||
CHARACTERISTIC_ATTACK,
|
||||
CHARACTERISTIC_RANGED_ATTACK,
|
||||
CHARACTERISTIC_DEFENSE,
|
||||
CHARACTERISTIC_RANGED_DEFENSE,
|
||||
CHARACTERISTIC_DAMAGE,
|
||||
INITIATIVE_DICE_CHOICES_PER_CLASS,
|
||||
CHAR_CLASSES,
|
||||
@@ -319,6 +328,7 @@ export const SYSTEM = {
|
||||
RANGE_CHOICES,
|
||||
FAVOR_CHOICES,
|
||||
ATTACKER_AIM_CHOICES,
|
||||
ATTACKER_MOVEMENT_CHOICES,
|
||||
MORTAL_CHOICES,
|
||||
SPELL_CRITICAL,
|
||||
MIRACLE_TYPES,
|
||||
|
||||
+50
-16
@@ -72,23 +72,32 @@ export default class LethalFantasyActor extends Actor {
|
||||
/* *************************************************/
|
||||
async applyDamage(hpLoss) {
|
||||
let hp = this.system.hp.value + hpLoss
|
||||
if (hp < 0) {
|
||||
hp = 0
|
||||
}
|
||||
this.update({ "system.hp.value": hp })
|
||||
}
|
||||
|
||||
/* *************************************************/
|
||||
computeDamageReduction() {
|
||||
// Pour les monstres, utiliser hp.damageResistance et combat.damageReduction
|
||||
getNaturalDR() {
|
||||
if (this.type === "monster") {
|
||||
let hpDR = Number(this.system.hp?.damageResistance) || 0
|
||||
return Number(this.system.hp?.damageResistance) || 0
|
||||
}
|
||||
return Number(this.system.biodata?.naturalDR) || 0
|
||||
}
|
||||
|
||||
/* *************************************************/
|
||||
getMagicDR() {
|
||||
if (this.type === "monster") return 0
|
||||
return Number(this.system.biodata?.magicDR) || 0
|
||||
}
|
||||
|
||||
/* *************************************************/
|
||||
computeDamageReduction() {
|
||||
if (this.type === "monster") {
|
||||
let hpDR = this.getNaturalDR()
|
||||
let combatDR = Number(this.system.combat?.damageReduction) || 0
|
||||
return hpDR + combatDR
|
||||
}
|
||||
// Pour les personnages, utiliser biodata et items
|
||||
let naturalDR = Number(this.system.biodata?.naturalDR) || 0
|
||||
let magicDR = Number(this.system.biodata?.magicDR) || 0
|
||||
let naturalDR = this.getNaturalDR()
|
||||
let magicDR = this.getMagicDR()
|
||||
let armorDR = this.getArmorDR()
|
||||
return naturalDR + magicDR + armorDR
|
||||
}
|
||||
@@ -153,7 +162,7 @@ export default class LethalFantasyActor extends Actor {
|
||||
}
|
||||
|
||||
/* *************************************************/
|
||||
async prepareRoll(rollType, rollKey, rollDice, defenderId, defenderTokenId, extraShieldDr = 0) {
|
||||
async prepareRoll(rollType, rollKey, rollDice, defenderId, defenderTokenId, extraShieldDr = 0, d30Effects = {}) {
|
||||
console.log("Preparing roll", rollType, rollKey, rollDice, defenderId)
|
||||
let rollTarget
|
||||
switch (rollType) {
|
||||
@@ -198,6 +207,29 @@ export default class LethalFantasyActor extends Actor {
|
||||
case "miracle-power":
|
||||
rollTarget = this.items.find((i) => (i.type === "miracle" || i.type == "spell") && i.id === rollKey)
|
||||
rollTarget.rollKey = rollKey
|
||||
// Read damage tier from combatant currentAction if available
|
||||
const activeCombatant = game.combat?.combatants?.find(c => c.actorId === this.id)
|
||||
const currentAction = activeCombatant?.getFlag(SYSTEM.id, "currentAction")
|
||||
const damageTier = currentAction?.damageTier || "standard"
|
||||
rollTarget.damageTier = damageTier
|
||||
if (rollType === "spell-attack" || rollType === "spell-power") {
|
||||
const tierCostMap = { standard: "cost", overpowered: "costOverpowered", overpowered2: "costOverpowered2" }
|
||||
const costField = tierCostMap[damageTier] || "cost"
|
||||
const cost = Number(rollTarget.system?.[costField]) || 0
|
||||
const currentAether = Number(this.system.aetherPoints?.value) || 0
|
||||
if (cost > currentAether) {
|
||||
ui.notifications.warn(`${this.name} cannot cast ${rollTarget.name}: insufficient Aether (needs ${cost}, has ${currentAether}).`)
|
||||
return
|
||||
}
|
||||
}
|
||||
if (rollType === "miracle-attack" || rollType === "miracle-power") {
|
||||
const cost = Number(rollTarget.system?.level) || 0
|
||||
const currentGrace = Number(this.system.divinityPoints?.value) || 0
|
||||
if (cost > currentGrace) {
|
||||
ui.notifications.warn(`${this.name} cannot invoke ${rollTarget.name}: insufficient Grace (needs ${cost}, has ${currentGrace}).`)
|
||||
return
|
||||
}
|
||||
}
|
||||
break
|
||||
case "shield-roll": {
|
||||
rollTarget = this.items.find((i) => i.type === "shield" && i.id === rollKey)
|
||||
@@ -206,8 +238,7 @@ export default class LethalFantasyActor extends Actor {
|
||||
rollTarget.rollKey = rollKey
|
||||
}
|
||||
break;
|
||||
case "weapon-damage-small":
|
||||
case "weapon-damage-medium":
|
||||
case "weapon-damage":
|
||||
case "weapon-attack":
|
||||
case "weapon-defense": {
|
||||
let weapon = this.items.find((i) => i.type === "weapon" && i.id === rollKey)
|
||||
@@ -245,9 +276,10 @@ export default class LethalFantasyActor extends Actor {
|
||||
weapon: weapon,
|
||||
weaponSkillModifier: skill.weaponSkillModifier,
|
||||
rollKey: rollKey,
|
||||
combat: foundry.utils.duplicate(this.system.combat)
|
||||
combat: foundry.utils.duplicate(this.system.combat),
|
||||
isRangedAttack: weapon.system.weaponType === "ranged"
|
||||
}
|
||||
if (rollType === "weapon-damage-small" || rollType === "weapon-damage-medium") {
|
||||
if (rollType === "weapon-damage") {
|
||||
rollTarget.grantedDice = this.system.granted.damageDice
|
||||
}
|
||||
if (rollType === "weapon-attack") {
|
||||
@@ -256,19 +288,21 @@ export default class LethalFantasyActor extends Actor {
|
||||
if (rollType === "weapon-defense") {
|
||||
rollTarget.armorDefense = this.getArmorDefenseValue()
|
||||
rollTarget.grantedDice = this.system.granted.defenseDice
|
||||
// Check if this is a ranged defense
|
||||
rollTarget.isRangedDefense = game.lethalFantasy?.nextDefenseData?.isRanged ?? false
|
||||
}
|
||||
}
|
||||
break
|
||||
default:
|
||||
ui.notifications.error(game.i18n.localize("LETHALFANTASY.Notifications.rollTypeNotFound") + String(rollType))
|
||||
break
|
||||
return
|
||||
}
|
||||
|
||||
// In all cases
|
||||
rollTarget.magicUser = this.system.biodata.magicUser
|
||||
rollTarget.actorModifiers = foundry.utils.duplicate(this.system.modifiers)
|
||||
rollTarget.actorLevel = this.system.biodata.level
|
||||
await this.system.roll(rollType, rollTarget, defenderId, defenderTokenId, extraShieldDr)
|
||||
await this.system.roll(rollType, rollTarget, defenderId, defenderTokenId, extraShieldDr, d30Effects)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -22,9 +22,11 @@ export default class D30Roll {
|
||||
MELEE_ATTACK: "melee_attack",
|
||||
RANGED_ATTACK: "ranged_attack",
|
||||
MELEE_DEFENSE: "melee_defense",
|
||||
RANGED_DEFENSE: "ranged_defense",
|
||||
ARCANE_SPELL_ATTACK: "arcane_spell_attack",
|
||||
ARCANE_SPELL_DEFENSE: "arcane_spell_defense",
|
||||
SKILL_ROLLS: "skill_rolls"
|
||||
SKILL_ROLLS: "skill_rolls",
|
||||
SAVING_THROWS: "saving_throws"
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -47,26 +49,26 @@ export default class D30Roll {
|
||||
}
|
||||
|
||||
/**
|
||||
* Récupère le résultat d'un jet de D30
|
||||
* Récupère le résultat d'un jet de D30 sous forme d'objet structuré.
|
||||
* @param {number} diceValue La valeur du dé (1-30)
|
||||
* @param {string} rollType Le type de jet externe (ex: "weapon-attack", "spell-attack", etc.)
|
||||
* @param {Object} weapon L'arme ou l'objet utilisé (optionnel, nécessaire pour certains types)
|
||||
* @returns {string|null} Le résultat correspondant ou null si vide/non trouvé
|
||||
* @param {Object} options Options supplémentaires (optionnel)
|
||||
* @param {boolean} options.isRanged Si true, utilise ranged_defense au lieu de melee_defense
|
||||
* @returns {Object|null} L'objet effet `{ type, description, ...fields }` ou null si aucun effet
|
||||
*/
|
||||
static getResult(diceValue, rollType, weapon = null) {
|
||||
static getResult(diceValue, rollType, weapon = null, options = {}) {
|
||||
if (!this.resultsTable) {
|
||||
console.warn("D30Roll | Results table is not initialized. Call D30Roll.initialize() first.")
|
||||
return null
|
||||
}
|
||||
|
||||
// Validation des paramètres
|
||||
if (diceValue < 1 || diceValue > 30) {
|
||||
console.warn(`D30Roll | Invalid dice value: ${diceValue}. Must be between 1 and 30.`)
|
||||
return null
|
||||
}
|
||||
|
||||
// Convert external rollType to internal rollType
|
||||
const internalType = this.convertToInternalType(rollType, weapon)
|
||||
const internalType = this.convertToInternalType(rollType, weapon, options)
|
||||
|
||||
if (!internalType) {
|
||||
console.warn(`D30Roll | Could not convert roll type: ${rollType}`)
|
||||
@@ -85,37 +87,41 @@ export default class D30Roll {
|
||||
}
|
||||
|
||||
const result = resultEntry[internalType]
|
||||
return result ?? null
|
||||
}
|
||||
|
||||
// Retourne null si le résultat est "empty"
|
||||
if (result === "empty" || !result) {
|
||||
return null
|
||||
}
|
||||
|
||||
return result
|
||||
/**
|
||||
* Retourne le type d'effet d'un résultat D30.
|
||||
* @param {Object|null} result L'objet retourné par getResult()
|
||||
* @returns {string|null} Le type d'effet ou null
|
||||
*/
|
||||
static getEffectType(result) {
|
||||
return result?.type ?? null
|
||||
}
|
||||
|
||||
/**
|
||||
* Convertit un rollType externe en rollType interne
|
||||
* @param {string} externalType Le type de jet externe (ex: "weapon-attack")
|
||||
* @param {Object} weapon L'arme ou l'objet utilisé (optionnel)
|
||||
* @param {Object} options Options supplémentaires (optionnel)
|
||||
* @param {boolean} options.isRanged Si true, utilise ranged_defense au lieu de melee_defense
|
||||
* @returns {string|null} Le type interne correspondant ou null
|
||||
*/
|
||||
static convertToInternalType(externalType, weapon = null) {
|
||||
static convertToInternalType(externalType, weapon = null, options = {}) {
|
||||
// Attack types - need weapon to determine if melee or ranged
|
||||
if (externalType === "weapon-attack") {
|
||||
if (!weapon) {
|
||||
console.warn("D30Roll | Weapon object required for weapon-attack type")
|
||||
return this.ROLL_TYPES.MELEE_ATTACK // Default to melee
|
||||
// Fall through to use options.isRanged if available, otherwise default melee
|
||||
}
|
||||
return weapon.system?.weaponType === "ranged"
|
||||
return (options.isRanged || weapon?.system?.weaponType === "ranged")
|
||||
? this.ROLL_TYPES.RANGED_ATTACK
|
||||
: this.ROLL_TYPES.MELEE_ATTACK
|
||||
}
|
||||
|
||||
// Monster attacks - default to melee
|
||||
// Monster attacks - check options.isRanged (set from rollTarget.attackMode) or weapon type
|
||||
if (externalType === "monster-attack") {
|
||||
// Check if weapon object has range information
|
||||
if (weapon?.system?.weaponType === "ranged") {
|
||||
if (options.isRanged || weapon?.system?.weaponType === "ranged") {
|
||||
return this.ROLL_TYPES.RANGED_ATTACK
|
||||
}
|
||||
return this.ROLL_TYPES.MELEE_ATTACK
|
||||
@@ -123,7 +129,7 @@ export default class D30Roll {
|
||||
|
||||
// Defense types
|
||||
if (externalType === "weapon-defense" || externalType === "monster-defense") {
|
||||
return this.ROLL_TYPES.MELEE_DEFENSE
|
||||
return options.isRanged ? this.ROLL_TYPES.RANGED_DEFENSE : this.ROLL_TYPES.MELEE_DEFENSE
|
||||
}
|
||||
|
||||
// Spell types
|
||||
@@ -132,11 +138,15 @@ export default class D30Roll {
|
||||
}
|
||||
|
||||
// Skill types
|
||||
if (externalType === "skill" || externalType === "monster-skill" ||
|
||||
externalType === "save" || externalType === "challenge") {
|
||||
if (externalType === "skill" || externalType === "monster-skill" || externalType === "challenge") {
|
||||
return this.ROLL_TYPES.SKILL_ROLLS
|
||||
}
|
||||
|
||||
// Saving throw types
|
||||
if (externalType === "save") {
|
||||
return options.isSpellSave ? this.ROLL_TYPES.ARCANE_SPELL_DEFENSE : this.ROLL_TYPES.SAVING_THROWS
|
||||
}
|
||||
|
||||
// If no match, return null
|
||||
console.warn(`D30Roll | Unknown external roll type: ${externalType}`)
|
||||
return null
|
||||
@@ -177,11 +187,11 @@ export default class D30Roll {
|
||||
|
||||
/**
|
||||
* Vérifie si un résultat est vide
|
||||
* @param {string} result Le résultat à vérifier
|
||||
* @param {Object|null} result Le résultat à vérifier
|
||||
* @returns {boolean} True si le résultat est vide
|
||||
*/
|
||||
static isEmptyResult(result) {
|
||||
return !result || result === "empty"
|
||||
return !result || !result.type
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -189,11 +199,12 @@ export default class D30Roll {
|
||||
* @param {number} diceValue La valeur du dé (1-30)
|
||||
* @param {string} rollType Le type de jet externe
|
||||
* @param {Object} weapon L'arme ou l'objet utilisé (optionnel)
|
||||
* @param {Object} options Options supplémentaires (optionnel)
|
||||
* @returns {Object} Un objet avec le résultat et des informations de formatage
|
||||
*/
|
||||
static getFormattedResult(diceValue, rollType, weapon = null) {
|
||||
const result = this.getResult(diceValue, rollType, weapon)
|
||||
const internalType = this.convertToInternalType(rollType, weapon)
|
||||
static getFormattedResult(diceValue, rollType, weapon = null, options = {}) {
|
||||
const result = this.getResult(diceValue, rollType, weapon, options)
|
||||
const internalType = this.convertToInternalType(rollType, weapon, options)
|
||||
|
||||
return {
|
||||
value: diceValue,
|
||||
|
||||
+304
-51
@@ -182,6 +182,7 @@ export default class LethalFantasyRoll extends Roll {
|
||||
} else {
|
||||
options.rollTarget.value = options.rollTarget.defenseModifier
|
||||
options.rollTarget.charModifier = 0
|
||||
options.isRangedDefense = options.rollTarget.isRangedDefense ?? false
|
||||
}
|
||||
|
||||
} else if (options.rollType === "monster-skill") {
|
||||
@@ -219,8 +220,14 @@ export default class LethalFantasyRoll extends Roll {
|
||||
options.rollTarget.charModifier = options.rollTarget.combat.rangedAttackModifier
|
||||
}
|
||||
} else {
|
||||
options.rollTarget.value = options.rollTarget.combat.defenseModifier + options.rollTarget.weaponSkillModifier + options.rollTarget.weapon.system.bonuses.defenseBonus + options.rollTarget.armorDefense
|
||||
options.rollTarget.charModifier = options.rollTarget.combat.defenseModifier
|
||||
// For defense, check if it's a ranged defense
|
||||
const defenseModifier = options.rollTarget.isRangedDefense
|
||||
? options.rollTarget.combat.rangedDefenseModifier
|
||||
: options.rollTarget.combat.defenseModifier
|
||||
options.rollTarget.value = defenseModifier + options.rollTarget.weaponSkillModifier + options.rollTarget.weapon.system.bonuses.defenseBonus + options.rollTarget.armorDefense
|
||||
options.rollTarget.charModifier = defenseModifier
|
||||
// Store isRanged flag for D30 lookup
|
||||
options.isRangedDefense = options.rollTarget.isRangedDefense
|
||||
}
|
||||
|
||||
} else if (options.rollType === "spell" || options.rollType === "spell-attack" || options.rollType === "spell-power") {
|
||||
@@ -230,6 +237,7 @@ export default class LethalFantasyRoll extends Roll {
|
||||
baseFormula = "D20"
|
||||
hasModifier = true
|
||||
hasChangeDice = false
|
||||
hasFavor = true
|
||||
options.rollTarget.value = options.rollTarget.actorModifiers.levelSpellModifier + options.rollTarget.actorModifiers.intSpellModifier
|
||||
options.rollTarget.charModifier = options.rollTarget.actorModifiers.intSpellModifier
|
||||
hasStaticModifier = options.rollType === "spell-power"
|
||||
@@ -246,6 +254,7 @@ export default class LethalFantasyRoll extends Roll {
|
||||
dice = "1D20"
|
||||
baseFormula = "D20"
|
||||
hasChangeDice = false
|
||||
hasFavor = true
|
||||
options.rollTarget.value = options.rollTarget.actorModifiers.levelMiracleModifier + options.rollTarget.actorModifiers.chaMiracleModifier
|
||||
options.rollTarget.charModifier = options.rollTarget.actorModifiers.chaMiracleModifier
|
||||
hasStaticModifier = options.rollType === "miracle-power"
|
||||
@@ -265,6 +274,7 @@ export default class LethalFantasyRoll extends Roll {
|
||||
hasChangeDice = false
|
||||
hasMaxValue = false
|
||||
hasExplode = false
|
||||
hasFavor = true
|
||||
options.rollTarget.value = 0
|
||||
|
||||
} else if (options.rollType.includes("weapon-damage")) {
|
||||
@@ -275,14 +285,12 @@ export default class LethalFantasyRoll extends Roll {
|
||||
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 = options.rollTarget.weapon.system.damage.damageM
|
||||
if (/NE$/i.test(dice)) {
|
||||
hasMaxValue = false
|
||||
hasExplode = false
|
||||
}
|
||||
dice = dice.replace("E", "")
|
||||
dice = dice.replace(/NE$/i, "").replace("E", "")
|
||||
baseFormula = dice
|
||||
|
||||
} else if (options.rollType.includes("monster-damage")) {
|
||||
@@ -295,6 +303,10 @@ export default class LethalFantasyRoll extends Roll {
|
||||
dice = options.rollTarget.damageDice
|
||||
dice = dice.replace("E", "")
|
||||
baseFormula = dice
|
||||
if (options.rollTarget.noExplode) {
|
||||
hasMaxValue = false
|
||||
hasExplode = false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -304,8 +316,8 @@ export default class LethalFantasyRoll extends Roll {
|
||||
hasModifier = false
|
||||
}
|
||||
|
||||
const rollModes = foundry.utils.duplicate(CONFIG.Dice.rollModes); // v12 : Object.fromEntries(Object.entries(CONFIG.Dice.rollModes).map(([key, value]) => [key, game.i18n.localize(value)]))
|
||||
console.log("Roll mode", rollModes)
|
||||
const rollModes = foundry.utils.duplicate(CONFIG.ChatMessage.modes);
|
||||
|
||||
|
||||
const fieldRollMode = new foundry.data.fields.StringField({
|
||||
choices: rollModes,
|
||||
@@ -320,6 +332,10 @@ export default class LethalFantasyRoll extends Roll {
|
||||
let modifier = "+0"
|
||||
let targetName
|
||||
|
||||
// True for any ranged attack: PC weapon (ranged type) or monster attack (ranged mode)
|
||||
const isRangedAttack = (options.rollType === "weapon-attack" && options.rollTarget?.weapon?.system?.weaponType === "ranged")
|
||||
|| (options.rollType === "monster-attack" && options.rollTarget?.attackMode === "ranged")
|
||||
|
||||
let dialogContext = {
|
||||
rollType: options.rollType,
|
||||
rollTarget: options.rollTarget,
|
||||
@@ -344,7 +360,8 @@ export default class LethalFantasyRoll extends Roll {
|
||||
modifier,
|
||||
saveSpell: false,
|
||||
favor: "none",
|
||||
targetName
|
||||
targetName,
|
||||
isRangedAttack
|
||||
}
|
||||
let rollContext
|
||||
if (options.rollContext) {
|
||||
@@ -354,7 +371,9 @@ export default class LethalFantasyRoll extends Roll {
|
||||
beyondSkill = !!rollContext.beyondSkill
|
||||
letItFly = !!rollContext.letItFly
|
||||
saveSpell = !!rollContext.saveSpell
|
||||
rollContext.visibility ||= rollContext.rollMode || game.settings.get("core", "rollMode")
|
||||
const _rawMode = rollContext.rollMode || game.settings.get("core", "rollMode")
|
||||
const _modeMap = { publicroll: "public", gmroll: "gm", blindroll: "blind", selfroll: "self" }
|
||||
rollContext.visibility ||= _modeMap[_rawMode] ?? _rawMode ?? "public"
|
||||
rollContext.modifier ||= modifier
|
||||
rollContext.favor ||= "none"
|
||||
rollContext.changeDice ||= `${dice}`
|
||||
@@ -374,7 +393,7 @@ export default class LethalFantasyRoll extends Roll {
|
||||
label: label,
|
||||
callback: (event, button, dialog) => {
|
||||
console.log("Roll context", event, button, dialog)
|
||||
let position = dialog.position
|
||||
let position = dialog?.position
|
||||
game.user.setFlag(SYSTEM.id, "roll-dialog-pos", foundry.utils.duplicate(position))
|
||||
const output = Array.from(button.form.elements).reduce((obj, input) => {
|
||||
if (input.name) obj[input.name] = input.value
|
||||
@@ -385,22 +404,22 @@ export default class LethalFantasyRoll extends Roll {
|
||||
},
|
||||
],
|
||||
actions: {
|
||||
"selectGranted": (event, button, dialog) => {
|
||||
"selectGranted": (event, button) => {
|
||||
hasGrantedDice = event.target.checked
|
||||
},
|
||||
"selectBeyondSkill": (event, button, dialog) => {
|
||||
"selectBeyondSkill": (event, button) => {
|
||||
beyondSkill = button.checked
|
||||
},
|
||||
"selectPointBlank": (event, button, dialog) => {
|
||||
"selectPointBlank": (event, button) => {
|
||||
pointBlank = button.checked
|
||||
},
|
||||
"selectLetItFly": (event, button, dialog) => {
|
||||
"selectLetItFly": (event, button) => {
|
||||
letItFly = button.checked
|
||||
},
|
||||
"saveSpellCheck": (event, button, dialog) => {
|
||||
"saveSpellCheck": (event, button) => {
|
||||
saveSpell = button.checked
|
||||
},
|
||||
"gotoToken": (event, button, dialog) => {
|
||||
"gotoToken": (event, button) => {
|
||||
let tokenId = $(button).data("tokenId")
|
||||
let token = canvas.tokens?.get(tokenId)
|
||||
if (token) {
|
||||
@@ -490,7 +509,8 @@ export default class LethalFantasyRoll extends Roll {
|
||||
rollContext.favor = "none"
|
||||
}
|
||||
|
||||
maxValue = Number(baseFormula.match(/\d+$/)[0]) // Update the max value agains
|
||||
const maxMatch = baseFormula ? baseFormula.match(/\d+$/) : null
|
||||
maxValue = maxMatch ? Number(maxMatch[0]) : 0
|
||||
|
||||
const rollData = {
|
||||
type: options.rollType,
|
||||
@@ -503,8 +523,6 @@ export default class LethalFantasyRoll extends Roll {
|
||||
rollMode: rollContext.visibility,
|
||||
hasTarget: options.hasTarget,
|
||||
isDamage: options.isDamage,
|
||||
damageSmall: options.damageSmall,
|
||||
damageMedium: options.damageMedium,
|
||||
pointBlank,
|
||||
beyondSkill,
|
||||
letItFly,
|
||||
@@ -573,11 +591,17 @@ export default class LethalFantasyRoll extends Roll {
|
||||
}
|
||||
options.D30result = rollD30.total
|
||||
|
||||
// Récupérer le message D30 correspondant
|
||||
// Compute isRanged for D30: covers defense (isRangedDefense), monster ranged attacks (attackMode),
|
||||
// and PC weapon attacks (isRangedAttack or weaponType)
|
||||
const isRangedForD30 = options.isRangedDefense
|
||||
|| options.rollTarget?.attackMode === "ranged"
|
||||
|| options.rollTarget?.isRangedAttack === true
|
||||
|| options.rollTarget?.weapon?.system?.weaponType === "ranged"
|
||||
const d30Message = D30Roll.getResult(
|
||||
rollD30.total,
|
||||
options.rollType,
|
||||
options.rollTarget?.weapon
|
||||
options.rollTarget?.weapon,
|
||||
{ isRanged: isRangedForD30, isSpellSave: saveSpell }
|
||||
)
|
||||
options.D30message = d30Message
|
||||
}
|
||||
@@ -596,9 +620,6 @@ export default class LethalFantasyRoll extends Roll {
|
||||
if (hasMaxValue) {
|
||||
while (diceResult === maxValue) {
|
||||
let r = await new Roll(baseFormula).evaluate()
|
||||
if (game?.dice3d) {
|
||||
await game.dice3d.showForRoll(r, game.user, true)
|
||||
}
|
||||
diceResult = r.dice[0].results[0].result
|
||||
diceResults.push({ dice: `${singleDice.toUpperCase()}-1`, value: diceResult - 1 })
|
||||
diceSum += (diceResult - 1)
|
||||
@@ -641,6 +662,10 @@ export default class LethalFantasyRoll extends Roll {
|
||||
rollBase.options.defenderId = options.defenderId
|
||||
rollBase.options.defenderTokenId = options.defenderTokenId
|
||||
rollBase.options.extraShieldDr = options.extraShieldDr || 0
|
||||
rollBase.options.damageTier = options.damageTier || "standard"
|
||||
rollBase.options.d30Bleed = options.d30Bleed || false
|
||||
rollBase.options.d30DamageMultiplier = options.d30DamageMultiplier || 1
|
||||
rollBase.options.d30DrMultiplier = options.d30DrMultiplier || 1
|
||||
|
||||
/**
|
||||
* A hook event that fires after the roll has been made.
|
||||
@@ -658,7 +683,7 @@ export default class LethalFantasyRoll extends Roll {
|
||||
|
||||
/* ***********************************************************/
|
||||
static async promptInitiative(options = {}) {
|
||||
const rollModes = foundry.utils.duplicate(CONFIG.Dice.rollModes); // v12 : Object.fromEntries(Object.entries(CONFIG.Dice.rollModes).map(([key, value]) => [key, game.i18n.localize(value)]))
|
||||
const rollModes = foundry.utils.duplicate(CONFIG.ChatMessage.modes); // v12 : Object.fromEntries(Object.entries(CONFIG.Dice.rollModes).map(([key, value]) => [key, game.i18n.localize(value)]))
|
||||
const fieldRollMode = new foundry.data.fields.StringField({
|
||||
choices: rollModes,
|
||||
blank: false,
|
||||
@@ -690,7 +715,7 @@ export default class LethalFantasyRoll extends Roll {
|
||||
buttons: [
|
||||
{
|
||||
label: label,
|
||||
callback: (event, button, dialog) => {
|
||||
callback: (event, button) => {
|
||||
const output = Array.from(button.form.elements).reduce((obj, input) => {
|
||||
if (input.name) obj[input.name] = input.value
|
||||
return obj
|
||||
@@ -712,8 +737,8 @@ export default class LethalFantasyRoll extends Roll {
|
||||
|
||||
let initRoll = new Roll(formula, options.data)
|
||||
await initRoll.evaluate()
|
||||
let msg = await initRoll.toMessage({ flavor: `Initiative for ${options.actorName}` }, { rollMode: rollContext.visibility })
|
||||
if (game?.dice3d) {
|
||||
let msg = await initRoll.toMessage({ flavor: `Initiative for ${options.actorName}` }, { messageMode: rollContext.visibility })
|
||||
if (game?.dice3d && initRoll.dice?.length) {
|
||||
await game.dice3d.waitFor3DAnimationByMessageID(msg.id)
|
||||
}
|
||||
|
||||
@@ -726,7 +751,7 @@ export default class LethalFantasyRoll extends Roll {
|
||||
/* ***********************************************************/
|
||||
static async promptCombatAction(options = {}) {
|
||||
|
||||
const rollModes = foundry.utils.duplicate(CONFIG.Dice.rollModes); // v12 : Object.fromEntries(Object.entries(CONFIG.Dice.rollModes).map(([key, value]) => [key, game.i18n.localize(value)]))
|
||||
const rollModes = foundry.utils.duplicate(CONFIG.ChatMessage.modes); // v12 : Object.fromEntries(Object.entries(CONFIG.Dice.rollModes).map(([key, value]) => [key, game.i18n.localize(value)]))
|
||||
const fieldRollMode = new foundry.data.fields.StringField({
|
||||
choices: rollModes,
|
||||
blank: false,
|
||||
@@ -755,10 +780,19 @@ export default class LethalFantasyRoll extends Roll {
|
||||
let buttons = []
|
||||
if (currentAction) {
|
||||
if (currentAction.type === "weapon") {
|
||||
let weaponLabel = "Roll progression dice"
|
||||
if (currentAction.rangedMode) {
|
||||
// Compute loading count from the speed formula (e.g. "3+1d6" → load=3)
|
||||
const speedStr = currentAction.system?.speed?.[currentAction.rangedMode] ?? ""
|
||||
const rangedLoad = currentAction.rangedLoad ?? (Number(speedStr.split("+")[0]) || 0)
|
||||
if (rangedLoad > 0 && !currentAction.weaponLoaded) {
|
||||
weaponLabel = "Load weapon"
|
||||
}
|
||||
}
|
||||
buttons.push({
|
||||
action: "roll",
|
||||
label: "Roll progression dice",
|
||||
callback: (event, button, dialog) => {
|
||||
label: weaponLabel,
|
||||
callback: (event, button) => {
|
||||
let pos = $('#combat-action-dialog').position()
|
||||
game.user.setFlag(SYSTEM.id, "combat-action-dialog-pos", pos)
|
||||
return "rollProgressionDice"
|
||||
@@ -784,7 +818,7 @@ export default class LethalFantasyRoll extends Roll {
|
||||
buttons.push({
|
||||
action: "roll",
|
||||
label: label,
|
||||
callback: (event, button, dialog) => {
|
||||
callback: (event, button) => {
|
||||
let pos = $('#combat-action-dialog').position()
|
||||
game.user.setFlag(SYSTEM.id, "combat-action-dialog-pos", foundry.utils.duplicate(pos))
|
||||
return "rollLethargyDice"
|
||||
@@ -795,7 +829,7 @@ export default class LethalFantasyRoll extends Roll {
|
||||
buttons.push({
|
||||
action: "roll",
|
||||
label: "Select action",
|
||||
callback: (event, button, dialog) => {
|
||||
callback: (event, button) => {
|
||||
let pos = $('#combat-action-dialog').position()
|
||||
game.user.setFlag(SYSTEM.id, "combat-action-dialog-pos", foundry.utils.duplicate(pos))
|
||||
const output = Array.from(button.form.elements).reduce((obj, input) => {
|
||||
@@ -810,7 +844,7 @@ export default class LethalFantasyRoll extends Roll {
|
||||
buttons.push({
|
||||
action: "cancel",
|
||||
label: "Other action, not listed here",
|
||||
callback: (event, button, dialog) => {
|
||||
callback: (event, button) => {
|
||||
let pos = $('#combat-action-dialog').position()
|
||||
game.user.setFlag(SYSTEM.id, "combat-action-dialog-pos", foundry.utils.duplicate(pos))
|
||||
return null;
|
||||
@@ -862,6 +896,29 @@ export default class LethalFantasyRoll extends Roll {
|
||||
actionItem.progressionCount = firstActionTaken ? 1 : (combatant.actor.system.combat?.combatProgressionStart ?? 1)
|
||||
if (!firstActionTaken) await combatant.setFlag(SYSTEM.id, "firstActionTaken", true)
|
||||
actionItem.rangedMode = rangedMode
|
||||
// If this is a spell/miracle with multiple damage tiers, prompt tier choice
|
||||
if (actionItem.system?.damageDice) {
|
||||
const tiers = [
|
||||
{ id: "standard", label: "Standard", dice: actionItem.system.damageDice },
|
||||
{ id: "overpowered", label: "Overpowered", dice: actionItem.system.damageDiceOverpowered },
|
||||
{ id: "overpowered2", label: "Overpowered 2", dice: actionItem.system.damageDiceOverpowered2 },
|
||||
].filter(t => t.dice)
|
||||
if (tiers.length > 1) {
|
||||
const tierChoice = await foundry.applications.api.DialogV2.wait({
|
||||
window: { title: "Choose Damage Tier" },
|
||||
classes: ["lethalfantasy"],
|
||||
content: `<div class="grit-luck-dialog"><p><strong>${selectedItem.name}</strong> has multiple damage tiers.</p><p>Choose which damage to use when the attack lands:</p></div>`,
|
||||
buttons: tiers.map(t => ({
|
||||
action: t.id,
|
||||
label: `${t.label} (${t.dice.toUpperCase()})`,
|
||||
icon: "fa-solid fa-wand-magic-sparkles",
|
||||
callback: () => t.id
|
||||
})),
|
||||
rejectClose: false
|
||||
})
|
||||
actionItem.damageTier = tierChoice || "standard"
|
||||
}
|
||||
}
|
||||
actionItem.castingTime = 1
|
||||
actionItem.spellStatus = "castingTime"
|
||||
// Set the flag on the combatant
|
||||
@@ -883,7 +940,8 @@ export default class LethalFantasyRoll extends Roll {
|
||||
await combatant.setFlag(SYSTEM.id, "currentAction", foundry.utils.duplicate(currentAction))
|
||||
return
|
||||
} else {
|
||||
let message = `Spell/Miracle ${currentAction.name} ready to be cast on next second !`
|
||||
// Last counting second — announce ready and transition immediately (no extra second consumed)
|
||||
let message = `Casting time : ${currentAction.name}, count : ${time}/${time} — ready to cast next second !`
|
||||
ChatMessage.create({ content: message, speaker: ChatMessage.getSpeaker({ actor: combatant.actor }) })
|
||||
currentAction.castingTime = 1
|
||||
currentAction.spellStatus = "toBeCasted"
|
||||
@@ -960,7 +1018,7 @@ export default class LethalFantasyRoll extends Roll {
|
||||
}
|
||||
// Range weapon loading
|
||||
if (!currentAction.weaponLoaded && currentAction.rangedLoad) {
|
||||
if (currentAction.progressionCount <= currentAction.rangedLoad) {
|
||||
if (currentAction.progressionCount < currentAction.rangedLoad) {
|
||||
let message = `Ranged weapon ${currentAction.name} is loading, loading count : ${currentAction.progressionCount}/${currentAction.rangedLoad}`
|
||||
ChatMessage.create({ content: message, speaker: ChatMessage.getSpeaker({ actor: combatant.actor }) })
|
||||
currentAction.progressionCount += 1
|
||||
@@ -983,7 +1041,7 @@ export default class LethalFantasyRoll extends Roll {
|
||||
|
||||
let max = roll.dice[0].faces - 1
|
||||
max = Math.min(currentAction.progressionCount, max)
|
||||
let msg = await roll.toMessage({ flavor: `Progression Roll for ${currentAction.name}, progression count : ${currentAction.progressionCount}/${max}` }, { rollMode: rollContext.visibility })
|
||||
let msg = await roll.toMessage({ flavor: `Progression Roll for ${currentAction.name}, progression count : ${currentAction.progressionCount}/${max}` }, { messageMode: rollContext.visibility })
|
||||
if (game?.dice3d) {
|
||||
await game.dice3d.waitFor3DAnimationByMessageID(msg.id)
|
||||
}
|
||||
@@ -1025,7 +1083,7 @@ export default class LethalFantasyRoll extends Roll {
|
||||
/* ***********************************************************/
|
||||
static async promptRangedDefense(options = {}) {
|
||||
|
||||
const rollModes = foundry.utils.duplicate(CONFIG.Dice.rollModes);
|
||||
const rollModes = foundry.utils.duplicate(CONFIG.ChatMessage.modes);
|
||||
const fieldRollMode = new foundry.data.fields.StringField({
|
||||
choices: rollModes,
|
||||
blank: false,
|
||||
@@ -1057,7 +1115,7 @@ export default class LethalFantasyRoll extends Roll {
|
||||
buttons: [
|
||||
{
|
||||
label: label,
|
||||
callback: (event, button, dialog) => {
|
||||
callback: (event, button) => {
|
||||
const output = Array.from(button.form.elements).reduce((obj, input) => {
|
||||
if (input.name) obj[input.name] = input.value
|
||||
return obj
|
||||
@@ -1105,6 +1163,9 @@ export default class LethalFantasyRoll extends Roll {
|
||||
// Merge rollContext object into options object
|
||||
options = { ...options, ...rollContext }
|
||||
options.rollName = "Ranged Defense"
|
||||
options.rollType = "weapon-defense"
|
||||
options.type = options.rollType // Required: this.type reads options.type
|
||||
options.rollMode = rollContext.visibility // Required: callers pass roll.options.rollMode to toMessage
|
||||
|
||||
const rollBase = new this(rollContext.movement, options.data, rollData)
|
||||
const rollModifier = new Roll(modifierFormula, options.data, rollData)
|
||||
@@ -1112,6 +1173,7 @@ export default class LethalFantasyRoll extends Roll {
|
||||
await rollBase.evaluate()
|
||||
let rollD30 = await new Roll("1D30").evaluate()
|
||||
options.D30result = rollD30.total
|
||||
options.D30message = D30Roll.getResult(rollD30.total, options.rollType, options.rollTarget?.weapon, { isRanged: true })
|
||||
|
||||
let badResult = 0
|
||||
if (rollContext.movement.includes("kh")) {
|
||||
@@ -1154,6 +1216,7 @@ export default class LethalFantasyRoll extends Roll {
|
||||
rollBase.options.rollTarget = options.rollTarget
|
||||
rollBase.options.titleFormula = `1D20E + ${modifierFormula}`
|
||||
rollBase.options.D30result = options.D30result
|
||||
rollBase.options.D30message = options.D30message
|
||||
rollBase.options.rollName = "Ranged Defense"
|
||||
rollBase.options.badResult = badResult
|
||||
rollBase.options.rollData = foundry.utils.duplicate(rollData)
|
||||
@@ -1170,6 +1233,161 @@ export default class LethalFantasyRoll extends Roll {
|
||||
return rollBase
|
||||
}
|
||||
|
||||
/**
|
||||
* Prompts the GM for ranged attack context (movement, range, target size, aim) when a monster
|
||||
* attacks with a ranged weapon, then evaluates an exploding D20 attack roll with the resulting modifiers.
|
||||
*
|
||||
* @param {Object} options Options for the roll.
|
||||
* @param {string} options.actorId The attacker actor ID.
|
||||
* @param {string} options.actorName The attacker actor name.
|
||||
* @param {Object} options.rollTarget The rollTarget containing attackModifier and related data.
|
||||
* @returns {Promise<LethalFantasyRoll|null>} The resulting roll, or null if cancelled.
|
||||
*/
|
||||
static async promptRangedAttack(options = {}) {
|
||||
const rollModes = foundry.utils.duplicate(CONFIG.ChatMessage.modes)
|
||||
const fieldRollMode = new foundry.data.fields.StringField({
|
||||
choices: rollModes,
|
||||
blank: false,
|
||||
default: "public",
|
||||
})
|
||||
|
||||
let dialogContext = {
|
||||
attackerMovementChoices: SYSTEM.ATTACKER_MOVEMENT_CHOICES,
|
||||
rangeChoices: SYSTEM.RANGE_CHOICES,
|
||||
sizeChoices: SYSTEM.SIZE_CHOICES,
|
||||
attackerAimChoices: SYSTEM.ATTACKER_AIM_CHOICES,
|
||||
movement: "none",
|
||||
range: "short",
|
||||
size: "+5",
|
||||
attackerAim: "simple",
|
||||
fieldRollMode,
|
||||
rollModes
|
||||
}
|
||||
|
||||
const content = await foundry.applications.handlebars.renderTemplate("systems/fvtt-lethal-fantasy/templates/range-attack-dialog.hbs", dialogContext)
|
||||
|
||||
const label = game.i18n.localize("LETHALFANTASY.Label.rangeAttackRoll")
|
||||
const rollContext = await foundry.applications.api.DialogV2.wait({
|
||||
window: { title: "Ranged Attack" },
|
||||
classes: ["lethalfantasy"],
|
||||
content,
|
||||
buttons: [
|
||||
{
|
||||
label,
|
||||
callback: (event, button) => {
|
||||
const output = Array.from(button.form.elements).reduce((obj, input) => {
|
||||
if (input.name) obj[input.name] = input.value
|
||||
return obj
|
||||
}, {})
|
||||
return output
|
||||
},
|
||||
},
|
||||
],
|
||||
rejectClose: false
|
||||
})
|
||||
|
||||
if (rollContext === null) return null
|
||||
|
||||
// Handle pointblank: attacker at point blank gets favor (standing still easier to aim)
|
||||
if (rollContext.range === "pointblank") {
|
||||
rollContext.movement = rollContext.movement.replace("kh", "")
|
||||
rollContext.movement = rollContext.movement.replace("kl", "")
|
||||
rollContext.movement += "kh" // Favor for attacker at point blank
|
||||
rollContext.range = "0"
|
||||
}
|
||||
// Handle beyondskill: extreme range gives disfavor to attacker
|
||||
if (rollContext.range === "beyondskill") {
|
||||
rollContext.movement = rollContext.movement.replace("kh", "")
|
||||
rollContext.movement = rollContext.movement.replace("kl", "")
|
||||
rollContext.movement += "kl" // Disfavor for attacker beyond skill range
|
||||
rollContext.range = "+11"
|
||||
}
|
||||
|
||||
// Compute contextual penalty: range + target_size, reduced by aim bonus and attack modifier
|
||||
const attackModifier = options.rollTarget?.attackModifier ?? 0
|
||||
const contextualPenalty = Number(rollContext.range) + Number(rollContext.size)
|
||||
const aimBonus = Number(rollContext.attackerAim || 0)
|
||||
const fullModifier = contextualPenalty - aimBonus - attackModifier
|
||||
|
||||
let modifierFormula
|
||||
if (fullModifier === 0) {
|
||||
modifierFormula = "0"
|
||||
} else {
|
||||
const modAbs = Math.abs(fullModifier)
|
||||
modifierFormula = `D${modAbs + 1} -1`
|
||||
}
|
||||
|
||||
const rollData = { ...rollContext }
|
||||
options = { ...options, ...rollContext }
|
||||
options.rollName = "Ranged Attack"
|
||||
options.rollType = options.rollType || "monster-attack"
|
||||
options.type = options.rollType // Required: this.type reads options.type, used to build weaponDamageOptions in toHTML
|
||||
options.rollMode = rollContext.visibility // Required: callers pass roll.options.rollMode to toMessage
|
||||
options.isRangedAttack = true
|
||||
|
||||
const rollBase = new this(rollContext.movement, options.data, rollData)
|
||||
const rollModifier = new Roll(modifierFormula, options.data, rollData)
|
||||
rollModifier.evaluate()
|
||||
await rollBase.evaluate()
|
||||
const rollD30 = await new Roll("1D30").evaluate()
|
||||
options.D30result = rollD30.total
|
||||
options.D30message = D30Roll.getResult(rollD30.total, options.rollType, undefined, { isRanged: true })
|
||||
|
||||
// Determine favor from dice formula
|
||||
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)
|
||||
}
|
||||
|
||||
const dice = rollContext.movement
|
||||
const maxValue = 20
|
||||
let rollTotal = -1
|
||||
let diceResults = []
|
||||
|
||||
let diceResult = rollBase.dice[0].results[0].result
|
||||
diceResults.push({ dice: `${dice.toUpperCase()}`, value: diceResult })
|
||||
let diceSum = diceResult
|
||||
// Exploding dice
|
||||
while (diceResult === maxValue) {
|
||||
const r = await new Roll(dice).evaluate()
|
||||
diceResult = r.dice[0].results[0].result
|
||||
diceResults.push({ dice: `${dice.toUpperCase()}-1`, value: diceResult - 1 })
|
||||
diceSum += (diceResult - 1)
|
||||
}
|
||||
|
||||
if (fullModifier !== 0) {
|
||||
diceResults.push({ dice: `${rollModifier.formula.toUpperCase()}`, value: rollModifier.total })
|
||||
if (fullModifier > 0) {
|
||||
// Net penalty: subtract from roll
|
||||
rollTotal = Math.max(diceSum - rollModifier.total, 0)
|
||||
} else {
|
||||
// Net bonus: add to roll
|
||||
rollTotal = diceSum + rollModifier.total
|
||||
}
|
||||
} else {
|
||||
rollTotal = diceSum
|
||||
}
|
||||
|
||||
rollBase.options = { ...rollBase.options, ...options }
|
||||
rollBase.options.resultType = undefined
|
||||
rollBase.options.rollTotal = rollTotal
|
||||
rollBase.options.diceResults = diceResults
|
||||
rollBase.options.rollTarget = options.rollTarget
|
||||
rollBase.options.titleFormula = `1D20E + ${modifierFormula}`
|
||||
rollBase.options.D30result = options.D30result
|
||||
rollBase.options.D30message = options.D30message
|
||||
rollBase.options.rollName = "Ranged Attack"
|
||||
rollBase.options.badResult = badResult
|
||||
rollBase.options.rollData = foundry.utils.duplicate(rollData)
|
||||
|
||||
return rollBase
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a title based on the given type.
|
||||
*
|
||||
@@ -1190,10 +1408,8 @@ export default class LethalFantasyRoll extends Roll {
|
||||
return `${game.i18n.localize("LETHALFANTASY.Label.weapon-attack")}`
|
||||
case "weapon-defense":
|
||||
return `${game.i18n.localize("LETHALFANTASY.Label.weapon-defense")}`
|
||||
case "weapon-damage-small":
|
||||
return `${game.i18n.localize("LETHALFANTASY.Label.weapon-damage-small")}`
|
||||
case "weapon-damage-medium":
|
||||
return `${game.i18n.localize("LETHALFANTASY.Label.weapon-damage-medium")}`
|
||||
case "weapon-damage":
|
||||
return `${game.i18n.localize("LETHALFANTASY.Label.weapon-damage")}`
|
||||
case "spell":
|
||||
case "spell-attack":
|
||||
case "spell-power":
|
||||
@@ -1254,7 +1470,6 @@ export default class LethalFantasyRoll extends Roll {
|
||||
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)
|
||||
@@ -1311,11 +1526,11 @@ export default class LethalFantasyRoll extends Roll {
|
||||
*
|
||||
* @param {Object} [messageData={}] Additional data to include in the message.
|
||||
* @param {Object} options Options for message creation.
|
||||
* @param {string} options.rollMode The mode of the roll (e.g., public, private).
|
||||
* @param {string} options.messageMode The mode of the roll (e.g., public, private).
|
||||
* @param {boolean} [options.create=true] Whether to create the message.
|
||||
* @returns {Promise} - A promise that resolves when the message is created.
|
||||
*/
|
||||
async toMessage(messageData = {}, { rollMode, create = true } = {}) {
|
||||
async toMessage(messageData = {}, { messageMode, create = true } = {}) {
|
||||
return await super.toMessage(
|
||||
{
|
||||
isSave: this.isSave,
|
||||
@@ -1333,8 +1548,46 @@ export default class LethalFantasyRoll extends Roll {
|
||||
rollData: this.rollData,
|
||||
...messageData,
|
||||
},
|
||||
{ rollMode, create },
|
||||
{ messageMode, create },
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Evaluate a spell/miracle damage formula with per-die explosion, then post to chat.
|
||||
* Explosion dice are shown manually via showForRoll; the main roll is shown automatically
|
||||
* by toMessage() (which triggers Dice So Nice via its createChatMessage hook).
|
||||
* Append "NE" to the formula to disable explosion.
|
||||
*
|
||||
* @param {string} formula Dice formula, e.g. "1d8", "2d6", "1d8NE"
|
||||
* @param {Object} rollOpts Options for LethalFantasyRoll (rollType, actorId, defenderId, etc.)
|
||||
* @returns {Promise<ChatMessage>}
|
||||
*/
|
||||
static async rollSpellDamageToMessage(formula, rollOpts) {
|
||||
const roll = new LethalFantasyRoll(formula, {}, rollOpts)
|
||||
await roll.evaluate()
|
||||
const shouldExplode = !/NE$/i.test(formula)
|
||||
const diceResults = []
|
||||
let diceSum = 0
|
||||
for (const term of roll.dice) {
|
||||
const singleDice = `1D${term.faces}`
|
||||
for (const r of term.results) {
|
||||
let diceResult = r.result
|
||||
diceResults.push({ dice: singleDice.toUpperCase(), value: diceResult })
|
||||
diceSum += diceResult
|
||||
if (shouldExplode && term.faces > 0) {
|
||||
while (diceResult === term.faces) {
|
||||
const xr = await new Roll(singleDice).evaluate()
|
||||
// Optional chaining guards against unexpected roll structure
|
||||
diceResult = xr.dice?.[0]?.results?.[0]?.result ?? (term.faces - 1)
|
||||
diceResults.push({ dice: `${singleDice.toUpperCase()}-1`, value: diceResult - 1 })
|
||||
diceSum += (diceResult - 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
roll.options.diceResults = diceResults
|
||||
roll.options.rollTotal = diceSum
|
||||
return roll.toMessage()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod
|
||||
}
|
||||
|
||||
schema.hp = new fields.SchemaField({
|
||||
value: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }),
|
||||
value: new fields.NumberField({ ...requiredInteger, initial: 1 }),
|
||||
max: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }),
|
||||
painDamage: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
|
||||
wounds: new fields.ArrayField(new fields.SchemaField(woundFieldSchema), {
|
||||
@@ -152,6 +152,7 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod
|
||||
attackModifier: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
|
||||
rangedAttackModifier: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
|
||||
defenseModifier: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
|
||||
rangedDefenseModifier: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
|
||||
defenseBonus: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
|
||||
damageModifier: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
|
||||
armorHitPoints: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
|
||||
@@ -259,6 +260,12 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod
|
||||
this.combat.defenseModifier += chaDef.defense
|
||||
}
|
||||
|
||||
this.combat.rangedDefenseModifier = this.combat.defenseBonus
|
||||
for (let chaKey of SYSTEM.CHARACTERISTIC_RANGED_DEFENSE) {
|
||||
let chaDef = SYSTEM.CHARACTERISTICS_TABLES[chaKey].find(s => s.value === this.characteristics[chaKey].value)
|
||||
this.combat.rangedDefenseModifier += chaDef.defense
|
||||
}
|
||||
|
||||
this.combat.damageModifier = 0
|
||||
for (let chaKey of SYSTEM.CHARACTERISTIC_DAMAGE) {
|
||||
let chaDef = SYSTEM.CHARACTERISTICS_TABLES[chaKey].find(s => s.value === this.characteristics[chaKey].value)
|
||||
@@ -274,7 +281,7 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod
|
||||
* @param {"="|"+"|"++"|"-"|"--"} rollAdvantage If there is an avantage (+), a disadvantage (-), a double advantage (++), a double disadvantage (--) or a normal roll (=).
|
||||
* @returns {Promise<null>} - A promise that resolves to null if the roll is cancelled.
|
||||
*/
|
||||
async roll(rollType, rollTarget, defenderId, defenderTokenId, extraShieldDr = 0) {
|
||||
async roll(rollType, rollTarget, defenderId, defenderTokenId, extraShieldDr = 0, d30Effects = {}) {
|
||||
const hasTarget = false
|
||||
let roll = await LethalFantasyRoll.prompt({
|
||||
rollType,
|
||||
@@ -286,11 +293,15 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod
|
||||
target: false,
|
||||
defenderId,
|
||||
defenderTokenId,
|
||||
extraShieldDr
|
||||
extraShieldDr,
|
||||
damageTier: rollTarget.damageTier || "standard",
|
||||
d30Bleed: d30Effects.d30Bleed || false,
|
||||
d30DamageMultiplier: d30Effects.d30DamageMultiplier || 1,
|
||||
d30DrMultiplier: d30Effects.d30DrMultiplier || 1
|
||||
})
|
||||
if (!roll) return null
|
||||
|
||||
await roll.toMessage({}, { rollMode: roll.options.rollMode })
|
||||
await roll.toMessage({}, { messageMode: roll.options.rollMode })
|
||||
}
|
||||
|
||||
async rollInitiative(combatId = undefined, combatantId = undefined) {
|
||||
@@ -311,7 +322,7 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod
|
||||
})
|
||||
if (!roll) return null
|
||||
|
||||
await roll.toMessage({}, { rollMode: roll.options.rollMode })
|
||||
await roll.toMessage({}, { messageMode: roll.options.rollMode })
|
||||
}
|
||||
|
||||
async rollProgressionDice(combatId, combatantId, rollProgressionCount) {
|
||||
@@ -349,6 +360,11 @@ export default class LethalFantasyCharacter extends foundry.abstract.TypeDataMod
|
||||
}
|
||||
}
|
||||
|
||||
if (weaponsChoices.length === 0) {
|
||||
ui.notifications.warn(`${this.parent.name} has no weapons or spells available for combat. Add a weapon to the character sheet first.`)
|
||||
return
|
||||
}
|
||||
|
||||
let roll = await LethalFantasyRoll.promptCombatAction({
|
||||
actorId: this.parent.id,
|
||||
actorName: this.parent.name,
|
||||
|
||||
@@ -35,6 +35,9 @@ export default class LethalFantasyMiracle extends foundry.abstract.TypeDataModel
|
||||
|
||||
schema.attackRoll = new fields.StringField({ required: true, initial: "" })
|
||||
schema.powerRoll = new fields.StringField({ required: true, initial: "" })
|
||||
schema.damageDice = new fields.StringField({ required: false, initial: "" })
|
||||
schema.damageDiceOverpowered = new fields.StringField({ required: false, initial: "" })
|
||||
schema.damageDiceOverpowered2 = new fields.StringField({ required: false, initial: "" })
|
||||
|
||||
return schema
|
||||
}
|
||||
|
||||
+86
-20
@@ -56,15 +56,33 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
|
||||
}, {}),
|
||||
)
|
||||
|
||||
const woundFieldSchema = {
|
||||
value: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
|
||||
duration: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
|
||||
description: new fields.StringField({ initial: "", required: false, nullable: true }),
|
||||
}
|
||||
|
||||
schema.hp = new fields.SchemaField({
|
||||
value: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }),
|
||||
value: new fields.NumberField({ ...requiredInteger, initial: 1 }),
|
||||
average: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }),
|
||||
max: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }),
|
||||
wounds: new fields.ArrayField(new fields.SchemaField(woundFieldSchema), {
|
||||
initial: [
|
||||
{ description: "", value: 0, duration: 0 },
|
||||
{ description: "", value: 0, duration: 0 },
|
||||
{ description: "", value: 0, duration: 0 },
|
||||
{ description: "", value: 0, duration: 0 },
|
||||
{ description: "", value: 0, duration: 0 },
|
||||
{ description: "", value: 0, duration: 0 },
|
||||
{ description: "", value: 0, duration: 0 },
|
||||
{ description: "", value: 0, duration: 0 }
|
||||
], min: 8
|
||||
}),
|
||||
damageResistance: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
|
||||
painDamage: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 })
|
||||
})
|
||||
|
||||
const attackField = (label) => {
|
||||
const attackField = (label, initialNoExplode = false) => {
|
||||
const schema = {
|
||||
key: new fields.StringField({ required: true, nullable: false, initial: `attack${label}` }),
|
||||
name: new fields.StringField({ required: true, nullable: false, initial: `Attack ${label}` }),
|
||||
@@ -74,6 +92,7 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
|
||||
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 }),
|
||||
noExplode: new fields.BooleanField({ initial: initialNoExplode, required: true, nullable: false }),
|
||||
}
|
||||
return new fields.SchemaField(schema, { label })
|
||||
}
|
||||
@@ -123,10 +142,32 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
|
||||
shieldDefenseDice: new fields.StringField({ required: true, nullable: false, initial: "d4" })
|
||||
})
|
||||
schema.combatHTH = new fields.SchemaField({
|
||||
attack1: attackField("1"),
|
||||
attack2: attackField("2")
|
||||
attack1: attackField("1", true),
|
||||
attack2: attackField("2", true)
|
||||
})
|
||||
|
||||
schema.attackMode = new fields.StringField({
|
||||
required: true,
|
||||
nullable: false,
|
||||
initial: "melee",
|
||||
choices: { melee: "Melee", ranged: "Ranged" }
|
||||
})
|
||||
|
||||
schema.rangedAttacks = new fields.SchemaField({
|
||||
attack1: attackField("1"),
|
||||
attack2: attackField("2"),
|
||||
attack3: attackField("3"),
|
||||
attack4: attackField("4")
|
||||
})
|
||||
|
||||
schema.rangedWeaponRange = new fields.SchemaField({
|
||||
pointBlank: new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }),
|
||||
short: new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }),
|
||||
medium: new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }),
|
||||
long: new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }),
|
||||
extreme: new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }),
|
||||
outOfSkill: new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 })
|
||||
})
|
||||
|
||||
return schema
|
||||
}
|
||||
@@ -141,8 +182,24 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
|
||||
* @param {"="|"+"|"++"|"-"|"--"} rollAdvantage If there is an avantage (+), a disadvantage (-), a double advantage (++), a double disadvantage (--) or a normal roll (=).
|
||||
* @returns {Promise<null>} - A promise that resolves to null if the roll is cancelled.
|
||||
*/
|
||||
async roll(rollType, rollTarget, defenderId = undefined, defenderTokenId = undefined, extraShieldDr = 0) {
|
||||
async roll(rollType, rollTarget, defenderId = undefined, defenderTokenId = undefined, extraShieldDr = 0, d30Effects = {}) {
|
||||
const hasTarget = false
|
||||
|
||||
// Ranged monster defense uses the ranged defense dialog (movement, range, size modifiers)
|
||||
if (rollType === "monster-defense" && rollTarget?.isRangedDefense === true) {
|
||||
let roll = await LethalFantasyRoll.promptRangedDefense({
|
||||
actorId: this.parent.id,
|
||||
actorName: this.parent.name,
|
||||
actorImage: this.parent.img,
|
||||
rollTarget,
|
||||
defenderId,
|
||||
defenderTokenId,
|
||||
})
|
||||
if (!roll) return null
|
||||
await roll.toMessage({}, { messageMode: roll.options.rollMode })
|
||||
return
|
||||
}
|
||||
|
||||
let roll = await LethalFantasyRoll.prompt({
|
||||
rollType,
|
||||
rollTarget,
|
||||
@@ -153,26 +210,36 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
|
||||
target: false,
|
||||
defenderId,
|
||||
defenderTokenId,
|
||||
extraShieldDr
|
||||
extraShieldDr,
|
||||
damageTier: rollTarget.damageTier || "standard",
|
||||
d30Bleed: d30Effects.d30Bleed || false,
|
||||
d30DamageMultiplier: d30Effects.d30DamageMultiplier || 1,
|
||||
d30DrMultiplier: d30Effects.d30DrMultiplier || 1
|
||||
})
|
||||
if (!roll) return null
|
||||
|
||||
await roll.toMessage({}, { rollMode: roll.options.rollMode })
|
||||
await roll.toMessage({}, { messageMode: roll.options.rollMode })
|
||||
}
|
||||
|
||||
async prepareMonsterRoll(rollType, rollKey, rollDice = undefined, tokenId = undefined, damageModifier = undefined, defenderId = undefined, defenderTokenId = undefined, extraShieldDr = 0) {
|
||||
async prepareMonsterRoll(rollType, rollKey, rollDice = undefined, tokenId = undefined, damageModifier = undefined, defenderId = undefined, defenderTokenId = undefined, extraShieldDr = 0, d30Effects = {}) {
|
||||
let rollTarget
|
||||
switch (rollType) {
|
||||
case "monster-attack":
|
||||
case "monster-defense":
|
||||
case "monster-damage":
|
||||
rollTarget = foundry.utils.duplicate(this.attacks[rollKey])
|
||||
case "monster-damage": {
|
||||
const attacksSet = this.attackMode === "ranged" ? this.rangedAttacks : this.attacks
|
||||
rollTarget = foundry.utils.duplicate(attacksSet[rollKey])
|
||||
rollTarget.rollKey = rollKey
|
||||
rollTarget.attackMode = this.attackMode
|
||||
if (rollType === "monster-defense") {
|
||||
rollTarget.isRangedDefense = game.lethalFantasy?.nextDefenseData?.isRanged ?? false
|
||||
}
|
||||
// Si damageModifier est fourni (depuis le chat), l'utiliser au lieu de celui de la fiche
|
||||
if (damageModifier !== undefined && rollType === "monster-damage") {
|
||||
rollTarget.damageModifier = damageModifier
|
||||
}
|
||||
break
|
||||
}
|
||||
case "monster-attack-hth":
|
||||
case "monster-defense-hth":
|
||||
case "monster-damage-hth":
|
||||
@@ -204,11 +271,10 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
|
||||
await roll.toMessage({
|
||||
flavor,
|
||||
speaker: ChatMessage.getSpeaker({ actor: this.parent })
|
||||
})
|
||||
}, { messageMode: roll.options.rollMode ?? game.settings.get("core", "rollMode") })
|
||||
return
|
||||
}
|
||||
case "weapon-damage-small":
|
||||
case "weapon-damage-medium":
|
||||
case "weapon-damage":
|
||||
case "weapon-attack":
|
||||
case "weapon-defense": {
|
||||
let weapon = this.actor.items.find((i) => i.type === "weapon" && i.id === rollKey)
|
||||
@@ -241,7 +307,7 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
|
||||
return
|
||||
}
|
||||
rollTarget = skill
|
||||
rollTarget.weapon = weapon
|
||||
rollTarget.weapon = foundry.utils.duplicate(weapon)
|
||||
rollTarget.weaponSkillModifier = skill.weaponSkillModifier
|
||||
rollTarget.rollKey = rollKey
|
||||
rollTarget.combat = foundry.utils.duplicate(this.combat)
|
||||
@@ -255,8 +321,7 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
|
||||
// In all cases
|
||||
if (rollTarget) {
|
||||
rollTarget.tokenId = tokenId
|
||||
console.log(rollTarget)
|
||||
await this.roll(rollType, rollTarget, defenderId, defenderTokenId, extraShieldDr)
|
||||
await this.roll(rollType, rollTarget, defenderId, defenderTokenId, extraShieldDr, d30Effects)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -276,7 +341,7 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
|
||||
})
|
||||
if (!roll) return null
|
||||
|
||||
await roll.toMessage({}, { rollMode: roll.options.rollMode })
|
||||
await roll.toMessage({}, { messageMode: roll.options.rollMode })
|
||||
}
|
||||
|
||||
async rollProgressionDice(combatId, combatantId) {
|
||||
@@ -288,7 +353,7 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
|
||||
return
|
||||
}
|
||||
|
||||
const rollModes = foundry.utils.duplicate(CONFIG.Dice.rollModes)
|
||||
const rollModes = foundry.utils.duplicate(CONFIG.ChatMessage.modes)
|
||||
const fieldRollMode = new foundry.data.fields.StringField({
|
||||
choices: rollModes,
|
||||
blank: false,
|
||||
@@ -304,8 +369,9 @@ export default class LethalFantasyMonster extends foundry.abstract.TypeDataModel
|
||||
}
|
||||
|
||||
let hasAttack = false
|
||||
for (let key in this.attacks) {
|
||||
let attack = this.attacks[key]
|
||||
const attacksSet = this.attackMode === "ranged" ? this.rangedAttacks : this.attacks
|
||||
for (let key in attacksSet) {
|
||||
let attack = attacksSet[key]
|
||||
if (attack.enabled && attack.attackScore > 0 && attack.attackScore === roll.total) {
|
||||
hasAttack = true
|
||||
const messageContent = await foundry.applications.handlebars.renderTemplate(
|
||||
|
||||
@@ -19,6 +19,8 @@ export default class LethalFantasySpell extends foundry.abstract.TypeDataModel {
|
||||
})
|
||||
|
||||
schema.cost = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 })
|
||||
schema.costOverpowered = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 })
|
||||
schema.costOverpowered2 = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 })
|
||||
schema.memorized = new fields.BooleanField({ required: true, initial: false })
|
||||
|
||||
schema.components = new fields.SchemaField({
|
||||
@@ -39,6 +41,9 @@ export default class LethalFantasySpell extends foundry.abstract.TypeDataModel {
|
||||
|
||||
schema.attackRoll = new fields.StringField({ required: true, initial: "" })
|
||||
schema.powerRoll = new fields.StringField({ required: true, initial: "" })
|
||||
schema.damageDice = new fields.StringField({ required: false, initial: "" })
|
||||
schema.damageDiceOverpowered = new fields.StringField({ required: false, initial: "" })
|
||||
schema.damageDiceOverpowered2 = new fields.StringField({ required: false, initial: "" })
|
||||
|
||||
return schema
|
||||
}
|
||||
|
||||
@@ -45,9 +45,9 @@ export default class LethalFantasySkill extends foundry.abstract.TypeDataModel {
|
||||
})
|
||||
|
||||
schema.bonuses = new fields.SchemaField({
|
||||
attackBonus: new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }),
|
||||
damageBonus: new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }),
|
||||
defenseBonus: new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 })
|
||||
attackBonus: new fields.NumberField({ ...requiredInteger, required: true, initial: 0 }),
|
||||
damageBonus: new fields.NumberField({ ...requiredInteger, required: true, initial: 0 }),
|
||||
defenseBonus: new fields.NumberField({ ...requiredInteger, required: true, initial: 0 })
|
||||
})
|
||||
|
||||
schema.encLoad = new fields.NumberField({ required: true, initial: 0, min: 0 })
|
||||
|
||||
+490
-29
@@ -105,6 +105,35 @@ export default class LethalFantasyUtils {
|
||||
$(html).find('.hp-gain-wrap')[2].classList.add('hp-gain-hud-disabled');
|
||||
}
|
||||
})
|
||||
|
||||
// Luck/Grit Buttons
|
||||
const luckGritButton = await foundry.applications.handlebars.renderTemplate('systems/fvtt-lethal-fantasy/templates/luck-grit-hud.hbs', {})
|
||||
$(html).find('div.left').append(luckGritButton);
|
||||
$(html).find('.lethal-luck-grit-hud').click((event) => {
|
||||
event.preventDefault();
|
||||
let wrap = $(html).find('.luck-grit-wrap')[0]
|
||||
if (wrap.classList.contains("luck-grit-hud-disabled")) {
|
||||
wrap.classList.add('luck-grit-hud-active');
|
||||
wrap.classList.remove('luck-grit-hud-disabled');
|
||||
} else {
|
||||
wrap.classList.remove('luck-grit-hud-active');
|
||||
wrap.classList.add('luck-grit-hud-disabled');
|
||||
}
|
||||
})
|
||||
$(html).find('.luck-grit-btn').click((event) => {
|
||||
event.preventDefault();
|
||||
if (token) {
|
||||
let tokenFull = canvas.tokens.placeables.find(t => t.id === token._id);
|
||||
let actor = tokenFull.actor;
|
||||
const resource = event.currentTarget.dataset.resource;
|
||||
const amount = Number(event.currentTarget.dataset.amount);
|
||||
const current = Number(foundry.utils.getProperty(actor.system, `${resource}.current`)) || 0;
|
||||
const newValue = Math.max(0, current + amount);
|
||||
actor.update({ [`system.${resource}.current`]: newValue });
|
||||
$(html).find('.luck-grit-wrap')[0].classList.remove('luck-grit-hud-active');
|
||||
$(html).find('.luck-grit-wrap')[0].classList.add('luck-grit-hud-disabled');
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@@ -145,6 +174,21 @@ export default class LethalFantasyUtils {
|
||||
LethalFantasyUtils.handleAttackerGritOffer(msg)
|
||||
}
|
||||
break
|
||||
case "applyBleeding":
|
||||
if (game.user.isGM) {
|
||||
actor = msg.tokenId
|
||||
? canvas.tokens?.placeables?.find(t => t.id === msg.tokenId)?.actor
|
||||
: game.actors.get(msg.actorId)
|
||||
if (actor && actor.system.hp?.wounds && msg.damage > 0) {
|
||||
const wounds = foundry.utils.duplicate(actor.system.hp.wounds)
|
||||
const slot = wounds.findIndex(w => !w.value && !w.duration)
|
||||
if (slot !== -1) {
|
||||
wounds[slot] = { value: msg.damage, duration: msg.damage, description: "Bleeding" }
|
||||
actor.update({ "system.hp.wounds": wounds })
|
||||
}
|
||||
}
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
@@ -235,9 +279,79 @@ export default class LethalFantasyUtils {
|
||||
|
||||
const isMonster = defender.type === "monster"
|
||||
|
||||
console.log(`[LF] showDefenseRequest | attackRollType=${attackRollType} isMonster=${isMonster} defender=${defender?.name}`)
|
||||
|
||||
// Spell/miracle attacks use saving throws instead of weapon defense
|
||||
const isSpellAttack = attackRollType === "spell-attack" || attackRollType === "miracle-attack"
|
||||
if (isSpellAttack) {
|
||||
const savesConfig = isMonster ? SYSTEM.MONSTER_SAVES : SYSTEM.SAVES
|
||||
const combatSaves = ["will", "dodge", "toughness"]
|
||||
const savesHTML = Object.values(savesConfig)
|
||||
.filter(s => combatSaves.includes(s.id))
|
||||
.map(s => `<option value="${s.id}">${game.i18n.localize(s.label)}</option>`)
|
||||
.join("")
|
||||
|
||||
const content = `
|
||||
<div class="defense-request-dialog">
|
||||
<div class="attack-info">
|
||||
<p><strong>${attackerName}</strong> targets <strong>${defenderName}</strong> with <strong>${weaponName}</strong>!</p>
|
||||
<p>Attack roll: <strong>${attackRoll}</strong></p>
|
||||
</div>
|
||||
<div class="weapon-selection">
|
||||
<label for="save-type">Choose saving throw:</label>
|
||||
<select id="save-type" name="saveKey" style="width: 100%; margin-top: 8px;">
|
||||
${savesHTML}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
|
||||
const result = await foundry.applications.api.DialogV2.wait({
|
||||
window: { title: "Saving Throw vs Spell" },
|
||||
classes: ["lethalfantasy"],
|
||||
content,
|
||||
buttons: [
|
||||
{
|
||||
action: "rollSave",
|
||||
label: "Roll Save",
|
||||
icon: "fa-solid fa-person-running",
|
||||
callback: (event, button) => button.form.elements.saveKey.value,
|
||||
},
|
||||
],
|
||||
rejectClose: false
|
||||
})
|
||||
|
||||
if (result) {
|
||||
game.lethalFantasy = game.lethalFantasy || {}
|
||||
game.lethalFantasy.nextDefenseData = {
|
||||
attackerId,
|
||||
attackRoll,
|
||||
attackerName,
|
||||
defenderName,
|
||||
attackWeaponId,
|
||||
attackRollType,
|
||||
attackRollKey,
|
||||
attackD30result,
|
||||
attackD30message,
|
||||
attackRerollContext,
|
||||
attackNaturalRoll: msg.attackNaturalRoll,
|
||||
damageTier: msg.damageTier,
|
||||
defenderId: defender.id,
|
||||
defenderTokenId
|
||||
}
|
||||
if (isMonster) {
|
||||
defender.system.prepareMonsterRoll("save", result)
|
||||
} else {
|
||||
defender.prepareRoll("save", result)
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// Pour les monstres, récupérer les attaques activées
|
||||
if (isMonster) {
|
||||
const enabledAttacks = Object.entries(defender.system.attacks).filter(([key, attack]) => attack.enabled)
|
||||
const attacksSet = defender.system.attackMode === "ranged" ? defender.system.rangedAttacks : defender.system.attacks
|
||||
const enabledAttacks = Object.entries(attacksSet).filter(([key, attack]) => attack.enabled)
|
||||
|
||||
if (enabledAttacks.length === 0) {
|
||||
ui.notifications.warn("No enabled attacks available for defense")
|
||||
@@ -256,7 +370,7 @@ export default class LethalFantasyUtils {
|
||||
<p>Attack roll: <strong>${attackRoll}</strong></p>
|
||||
</div>
|
||||
<div class="weapon-selection">
|
||||
<label for="defense-attack">Choose your defense attack:</label>
|
||||
<label for="defense-attack">Choose your defense weapon:</label>
|
||||
<select id="defense-attack" name="attackKey" style="width: 100%; margin-top: 8px;">
|
||||
${attacksHTML}
|
||||
</select>
|
||||
@@ -266,7 +380,7 @@ export default class LethalFantasyUtils {
|
||||
|
||||
// Afficher le dialogue
|
||||
const result = await foundry.applications.api.DialogV2.wait({
|
||||
window: { title: "Defense Roll" },
|
||||
window: { title: msg.isRanged ? "Ranged Defense Roll" : "Defense Roll" },
|
||||
classes: ["lethalfantasy"],
|
||||
content,
|
||||
buttons: [
|
||||
@@ -297,8 +411,11 @@ export default class LethalFantasyUtils {
|
||||
attackD30result,
|
||||
attackD30message,
|
||||
attackRerollContext,
|
||||
attackNaturalRoll: msg.attackNaturalRoll,
|
||||
damageTier: msg.damageTier,
|
||||
defenderId: defender.id,
|
||||
defenderTokenId
|
||||
defenderTokenId,
|
||||
isRanged: msg.isRanged
|
||||
}
|
||||
|
||||
defender.system.prepareMonsterRoll("monster-defense", result)
|
||||
@@ -306,6 +423,38 @@ export default class LethalFantasyUtils {
|
||||
return
|
||||
}
|
||||
|
||||
// Pour les personnages, récupérer les armes équipées
|
||||
// Si l'attaque est une attaque à distance, utiliser le dialogue de défense à distance
|
||||
if (msg.isRanged) {
|
||||
const { default: LethalFantasyRoll } = await import("./documents/roll.mjs")
|
||||
const roll = await LethalFantasyRoll.promptRangedDefense({
|
||||
actorId: defender.id,
|
||||
actorName: defender.name,
|
||||
actorImage: defender.img,
|
||||
})
|
||||
if (roll) {
|
||||
game.lethalFantasy = game.lethalFantasy || {}
|
||||
game.lethalFantasy.nextDefenseData = {
|
||||
attackerId,
|
||||
attackRoll,
|
||||
attackerName,
|
||||
defenderName,
|
||||
attackWeaponId,
|
||||
attackRollType,
|
||||
attackRollKey,
|
||||
attackD30result,
|
||||
attackD30message,
|
||||
attackRerollContext,
|
||||
damageTier: msg.damageTier,
|
||||
defenderId: defender.id,
|
||||
defenderTokenId,
|
||||
isRanged: true
|
||||
}
|
||||
await roll.toMessage({}, { messageMode: roll.options.rollMode })
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// Pour les personnages, récupérer les armes équipées
|
||||
const equippedWeapons = defender.items.filter(i =>
|
||||
i.type === "weapon" && i.system.equipped === true
|
||||
@@ -367,10 +516,13 @@ export default class LethalFantasyUtils {
|
||||
attackRollType,
|
||||
attackRollKey,
|
||||
attackD30result,
|
||||
attackD30message,
|
||||
attackRerollContext,
|
||||
defenderId: defender.id,
|
||||
defenderTokenId
|
||||
attackD30message,
|
||||
attackRerollContext,
|
||||
attackNaturalRoll: msg.attackNaturalRoll,
|
||||
damageTier: msg.damageTier,
|
||||
defenderId: defender.id,
|
||||
defenderTokenId,
|
||||
isRanged: msg.isRanged
|
||||
}
|
||||
|
||||
console.log("Storing defense data for character:", defender.id)
|
||||
@@ -381,7 +533,197 @@ export default class LethalFantasyUtils {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
static hasD30Reroll(d30Message) {
|
||||
return /mulligan|re-?roll/i.test(d30Message || "")
|
||||
return d30Message?.type === "mulligan"
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/**
|
||||
* Process D30 bonus dice for attack or defense.
|
||||
* Rolls and applies bonus dice BEFORE grit/luck/shield decisions.
|
||||
* For `choice` type results (D30=20, 30), shows dialog to choose between bonus dice and special effect.
|
||||
* For `bonus_dice` type results (D30=27, 2, 3), auto-rolls the dice.
|
||||
* @param {Object|null} d30Message The D30 result object
|
||||
* @param {"attack"|"defense"} side Whether processing the attack or defense side
|
||||
* @param {number|null} naturalRoll The natural D20 roll (for special strike type detection)
|
||||
* @param {Object} actor The actor (for dice3d display)
|
||||
* @returns {Promise<{modifier: number, specialEffect: string|null, specialName: string|null}>}
|
||||
*/
|
||||
static async processD30BonusDice(d30Message, side, naturalRoll = null, actor = null, canDialog = true) {
|
||||
if (!d30Message) return { modifier: 0, specialEffect: null, specialName: null }
|
||||
|
||||
const validTargets = side === "attack" ? ["attack", "spell_attack"] : ["defense", "spell_defense"]
|
||||
|
||||
// ── Simple bonus_dice type ── auto-roll if target matches
|
||||
if (d30Message.type === "bonus_dice") {
|
||||
if (!validTargets.includes(d30Message.target)) return { modifier: 0, specialEffect: null, specialName: null }
|
||||
const modifier = await this._rollD30BonusDie(d30Message.dice, actor, !canDialog)
|
||||
return { modifier, specialEffect: null, specialName: null }
|
||||
}
|
||||
|
||||
// ── Choice type ── present all options to the player
|
||||
if (d30Message.type === "choice") {
|
||||
// Try to find a bonus_dice option matching this side
|
||||
const autoBonus = d30Message.choices.find(c => c.type === "bonus_dice" && validTargets.includes(c.target))
|
||||
|
||||
// If we can't show dialogs (wrong client), auto-roll bonus dice if available
|
||||
if (!canDialog) {
|
||||
if (autoBonus) {
|
||||
const modifier = await this._rollD30BonusDie(autoBonus.dice, actor, true)
|
||||
return { modifier, specialEffect: null, specialName: null }
|
||||
}
|
||||
// No bonus dice available on this side — just report as flag
|
||||
const first = d30Message.choices[0]
|
||||
return { modifier: 0, specialEffect: "flag", specialName: first?.type || "choice" }
|
||||
}
|
||||
|
||||
const buttons = d30Message.choices.map(c => {
|
||||
let label
|
||||
let icon
|
||||
if (c.type === "bonus_dice") {
|
||||
label = `Roll ${c.dice.toUpperCase()} and add to ${side}`
|
||||
icon = "fa-solid fa-dice"
|
||||
} else if (c.type === "special_strike") {
|
||||
label = this._buildSpecialLabel(c, naturalRoll)
|
||||
icon = "fa-solid fa-star"
|
||||
} else if (c.type === "special_defense") {
|
||||
label = this._buildSpecialLabel(c, naturalRoll)
|
||||
icon = "fa-solid fa-shield-halved"
|
||||
} else {
|
||||
label = c.type.replace(/_/g, " ").replace(/\b\w/g, l => l.toUpperCase())
|
||||
icon = "fa-solid fa-question"
|
||||
}
|
||||
return {
|
||||
action: c.type,
|
||||
label,
|
||||
icon,
|
||||
callback: () => c
|
||||
}
|
||||
})
|
||||
|
||||
const choice = await foundry.applications.api.DialogV2.wait({
|
||||
window: { title: "D30 Special — Choose Effect" },
|
||||
classes: ["lethalfantasy"],
|
||||
content: `
|
||||
<div class="grit-luck-dialog">
|
||||
<p><strong>D30 result:</strong> ${d30Message.description}</p>
|
||||
<p>Choose how to use this result:</p>
|
||||
</div>
|
||||
`,
|
||||
buttons,
|
||||
rejectClose: false
|
||||
})
|
||||
|
||||
if (!choice) return { modifier: 0, specialEffect: null, specialName: null }
|
||||
|
||||
if (choice.type === "bonus_dice") {
|
||||
const modifier = await this._rollD30BonusDie(choice.dice, actor)
|
||||
return { modifier, specialEffect: null, specialName: null }
|
||||
}
|
||||
|
||||
if (choice.type === "special_strike" || choice.type === "special_defense") {
|
||||
return { modifier: 0, specialEffect: "auto", specialName: this._buildSpecialName(choice, naturalRoll) }
|
||||
}
|
||||
|
||||
// Non-standard choice (spell_calamity, etc.) — report it
|
||||
return { modifier: 0, specialEffect: "flag", specialName: choice.type }
|
||||
}
|
||||
|
||||
// ── Combo type (bleed / internal injury) — flag for wound creation
|
||||
if (d30Message.type === "combo") {
|
||||
const hasBleed = d30Message.effects?.some(e => e.type === "bleed" || e.type === "internal_injury")
|
||||
if (hasBleed) {
|
||||
return { modifier: 0, specialEffect: "bleed", specialName: "Bleeding/Internal Injury" }
|
||||
}
|
||||
}
|
||||
|
||||
// ── Damage multiplier type (2x/3x damage before DR)
|
||||
if (d30Message.type === "damage_multiplier") {
|
||||
return { modifier: 0, specialEffect: "damageMultiplier", specialName: `x${d30Message.multiplier} Damage`, multiplier: d30Message.multiplier }
|
||||
}
|
||||
|
||||
// ── DR multiplier type (2x/3x DR including shield)
|
||||
if (d30Message.type === "dr_multiplier") {
|
||||
return { modifier: 0, specialEffect: "drMultiplier", specialName: `x${d30Message.multiplier} DR`, multiplier: d30Message.multiplier }
|
||||
}
|
||||
|
||||
return { modifier: 0, specialEffect: null, specialName: null }
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/**
|
||||
* Roll a D30 bonus die and show with 3D dice if available.
|
||||
* @param {string} formula Dice formula (e.g. "D6", "D12", "D20E")
|
||||
* @param {Object} actor Actor for chat message speaker
|
||||
* @returns {Promise<number>} The roll total
|
||||
*/
|
||||
static async _rollD30BonusDie(formula, actor, silent = false) {
|
||||
const cleaned = formula.replace(/NE$/i, "").replace("E", "")
|
||||
const roll = new Roll(cleaned)
|
||||
await roll.evaluate()
|
||||
if (game?.dice3d) {
|
||||
await game.dice3d.showForRoll(roll, game.user, true)
|
||||
}
|
||||
if (!silent) {
|
||||
await ChatMessage.create({
|
||||
content: `<p>D30 bonus: rolled <strong>${cleaned.toUpperCase()}</strong> = <strong>${roll.total}</strong></p>`,
|
||||
speaker: ChatMessage.getSpeaker({ actor })
|
||||
})
|
||||
}
|
||||
return roll.total
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/**
|
||||
* Build a human-readable label for a special strike/defense choice in the D30 prompt.
|
||||
* @param {Object} specialChoice The choice object with type and options
|
||||
* @param {number|null} naturalRoll The natural D20 roll
|
||||
* @returns {string} Display label
|
||||
*/
|
||||
static _buildSpecialLabel(specialChoice, naturalRoll) {
|
||||
if (specialChoice.type === "special_strike") {
|
||||
if (specialChoice.options.includes("lethal")) {
|
||||
if (naturalRoll === 20) return "Lethal Strike (auto-hit)"
|
||||
if (naturalRoll >= 16 && naturalRoll <= 19) return "Vital Strike (auto-hit)"
|
||||
return "Lethal/Vital Strike (auto-hit)"
|
||||
}
|
||||
if (specialChoice.options.includes("vicious")) return "Vicious Strike (auto-hit)"
|
||||
return "Special Strike (auto-hit)"
|
||||
}
|
||||
if (specialChoice.type === "special_defense") {
|
||||
if (specialChoice.options.includes("perfect_spell")) return "Perfect Spell Defense (auto-block)"
|
||||
if (specialChoice.options.includes("flawless")) return "Flawless Defense (auto-block)"
|
||||
if (specialChoice.options.includes("legendary")) return "Legendary Defense (auto-block)"
|
||||
if (specialChoice.options.includes("perfect")) return "Perfect Defense (auto-block)"
|
||||
return "Special Defense (auto-block)"
|
||||
}
|
||||
return "Special Effect"
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/**
|
||||
* Build the special effect name based on the D30 result and natural roll.
|
||||
* @param {Object} specialChoice The choice object with type and options
|
||||
* @param {number|null} naturalRoll The natural D20 roll
|
||||
* @returns {string} The special effect name
|
||||
*/
|
||||
static _buildSpecialName(specialChoice, naturalRoll) {
|
||||
if (specialChoice.type === "special_strike") {
|
||||
if (specialChoice.options.includes("lethal")) {
|
||||
if (naturalRoll === 20) return "Lethal Strike"
|
||||
if (naturalRoll >= 16 && naturalRoll <= 19) return "Vital Strike"
|
||||
return "Lethal/Vital Strike"
|
||||
}
|
||||
if (specialChoice.options.includes("vicious")) return "Vicious Strike"
|
||||
return "Special Strike"
|
||||
}
|
||||
if (specialChoice.type === "special_defense") {
|
||||
if (specialChoice.options.includes("perfect_spell")) return "Perfect Spell Defense"
|
||||
if (specialChoice.options.includes("flawless")) return "Flawless Defense"
|
||||
if (specialChoice.options.includes("legendary")) return "Legendary Defense"
|
||||
if (specialChoice.options.includes("perfect")) return "Perfect Defense"
|
||||
return "Special Defense"
|
||||
}
|
||||
return "Special Effect"
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
@@ -440,11 +782,16 @@ export default class LethalFantasyUtils {
|
||||
content,
|
||||
buttons: [
|
||||
{
|
||||
action: "roll",
|
||||
label: "Roll Bonus Die",
|
||||
icon: "fa-solid fa-dice",
|
||||
callback: (event, button, dialog) => button.form.elements.bonusDie.value
|
||||
callback: (event, button) => {
|
||||
const sel = button.form?.elements?.bonusDie ?? button.closest("form")?.elements?.bonusDie
|
||||
return sel?.value ?? choices[0]
|
||||
}
|
||||
},
|
||||
{
|
||||
action: "cancel",
|
||||
label: "Cancel",
|
||||
icon: "fa-solid fa-xmark",
|
||||
callback: () => null
|
||||
@@ -455,6 +802,75 @@ export default class LethalFantasyUtils {
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/**
|
||||
* Prompt the GM or player to choose an ad-hoc shield dice and DR value.
|
||||
* Used when the defender has no pre-configured shield equipment.
|
||||
* @param {string} defenderName
|
||||
* @param {number} attackRoll
|
||||
* @param {number} defenseRoll
|
||||
* @returns {Promise<{formula: string, damageReduction: number}|null>}
|
||||
*/
|
||||
static async promptAdHocShield(defenderName, attackRoll, defenseRoll) {
|
||||
const choices = this.getCombatBonusDiceChoices()
|
||||
const optionsHtml = choices.map(c => `<option value="${c}">${c.toUpperCase()}</option>`).join("")
|
||||
const content = `
|
||||
<div class="grit-luck-dialog">
|
||||
<div class="combat-status">
|
||||
<p><strong>${defenderName}</strong> uses a shield (not equipped)</p>
|
||||
<p>Attack: <strong>${attackRoll}</strong> — Current defense: <strong>${defenseRoll}</strong></p>
|
||||
</div>
|
||||
<div class="weapon-selection" style="margin-top:8px;">
|
||||
<label for="shield-dice">Shield dice:</label>
|
||||
<select id="shield-dice" name="shieldDice" style="width: 100%; margin-top: 4px;">
|
||||
${optionsHtml}
|
||||
</select>
|
||||
</div>
|
||||
<div class="weapon-selection" style="margin-top:8px;">
|
||||
<label for="shield-dr">Shield DR value:</label>
|
||||
<input id="shield-dr" name="shieldDR" type="number" min="0" value="0" style="width: 100%; margin-top: 4px;" />
|
||||
</div>
|
||||
</div>
|
||||
`
|
||||
|
||||
const raw = await foundry.applications.api.DialogV2.wait({
|
||||
window: { title: "Ad-hoc Shield Roll" },
|
||||
classes: ["lethalfantasy"],
|
||||
content,
|
||||
buttons: [
|
||||
{
|
||||
action: "roll",
|
||||
label: "Roll Shield",
|
||||
icon: "fa-solid fa-shield",
|
||||
callback: (event, button) => {
|
||||
const shieldDice = button.form?.elements?.shieldDice ?? button.closest("form")?.elements?.shieldDice
|
||||
const shieldDR = button.form?.elements?.shieldDR ?? button.closest("form")?.elements?.shieldDR
|
||||
return {
|
||||
formula: shieldDice?.value ?? "1d6",
|
||||
damageReduction: Number(shieldDR?.value) || 0
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
action: "cancel",
|
||||
label: "Cancel",
|
||||
icon: "fa-solid fa-xmark",
|
||||
callback: () => null
|
||||
}
|
||||
],
|
||||
rejectClose: false
|
||||
})
|
||||
|
||||
return raw ?? null
|
||||
}
|
||||
|
||||
/* -------------------------------------------- */
|
||||
/**
|
||||
* Roll a bonus die formula, optionally showing Dice So Nice animation and posting a chat message.
|
||||
* @param {string} formula
|
||||
* @param {Actor} actor
|
||||
* @param {Function} [messageContent]
|
||||
* @returns {Promise<number>}
|
||||
*/
|
||||
static async rollBonusDie(formula, actor, messageContent) {
|
||||
const roll = new Roll(formula)
|
||||
await roll.evaluate()
|
||||
@@ -536,6 +952,7 @@ export default class LethalFantasyUtils {
|
||||
${totalBonus > 0 ? `<p class="bonus-info">Bonus already added: +${totalBonus}</p>` : ''}
|
||||
</div>
|
||||
<p class="offer-text">You are losing! Spend Grit or Luck to add 1D6 to your defense?</p>
|
||||
<p class="shield-warning"><i class="fa-solid fa-triangle-exclamation"></i> If you intend to use a shield, you must spend Grit or Luck <strong>first</strong> — the shield roll comes after.</p>
|
||||
</div>
|
||||
`
|
||||
|
||||
@@ -657,6 +1074,18 @@ export default class LethalFantasyUtils {
|
||||
/* -------------------------------------------- */
|
||||
static async compareAttackDefense(data) {
|
||||
console.log("compareAttackDefense called with:", data)
|
||||
|
||||
// Compute D30 effects from the attack D30 message directly.
|
||||
// This is more reliable than depending on the caller-provided values, which are
|
||||
// computed per-client and may differ between clients due to cross-client processing order.
|
||||
const d30DamageMultiplier = data.attackD30message?.type === "damage_multiplier"
|
||||
? data.attackD30message.multiplier
|
||||
: (data.d30DamageMultiplier || 1)
|
||||
const d30Bleed = data.attackD30message?.type === "combo"
|
||||
? (data.attackD30message.effects?.some(e => e.type === "bleed" || e.type === "internal_injury") ? "true" : "")
|
||||
: data.attackD30message?.type === "bleed" ? "true" : (data.d30Bleed || "")
|
||||
const d30DrMultiplier = data.d30DrMultiplier || 1
|
||||
|
||||
const outcome = data.outcome || (data.attackRoll > data.defenseRoll ? "hit" : "miss")
|
||||
const isAttackWin = outcome !== "miss"
|
||||
console.log("isAttackWin:", isAttackWin, "attackRoll:", data.attackRoll, "defenseRoll:", data.defenseRoll)
|
||||
@@ -667,23 +1096,48 @@ export default class LethalFantasyUtils {
|
||||
// Déterminer le type de dégâts à lancer
|
||||
if (data.attackRollType === "weapon-attack") {
|
||||
damageButton = `
|
||||
<div class="attack-result-damage">
|
||||
<button class="roll-damage-btn" data-attacker-id="${data.attackerId}" data-defender-id="${data.defenderId}" data-defender-token-id="${data.defenderTokenId || ""}" data-extra-shield-dr="${data.shieldDamageReduction || 0}" data-weapon-id="${data.attackWeaponId}" data-damage-type="small">
|
||||
<i class="fa-solid fa-dice-d6"></i> Damage (Small)
|
||||
</button>
|
||||
<button class="roll-damage-btn" data-attacker-id="${data.attackerId}" data-defender-id="${data.defenderId}" data-defender-token-id="${data.defenderTokenId || ""}" data-extra-shield-dr="${data.shieldDamageReduction || 0}" data-weapon-id="${data.attackWeaponId}" data-damage-type="medium">
|
||||
<i class="fa-solid fa-dice-d20"></i> Damage (Medium)
|
||||
<div class="attack-result-damage single-btn">
|
||||
<button class="roll-damage-btn" data-attacker-id="${data.attackerId}" data-defender-id="${data.defenderId}" data-defender-token-id="${data.defenderTokenId || ""}" data-extra-shield-dr="${data.shieldDamageReduction || 0}" data-weapon-id="${data.attackWeaponId}" data-damage-type="medium" data-d30-bleed="${d30Bleed}" data-d30-damage-mult="${d30DamageMultiplier}" data-d30-dr-mult="${d30DrMultiplier}">
|
||||
<i class="fa-solid fa-dice-d20"></i> Damage
|
||||
</button>
|
||||
</div>
|
||||
`
|
||||
} else if (data.attackRollType === "monster-attack") {
|
||||
damageButton = `
|
||||
<div class="attack-result-damage">
|
||||
<button class="roll-damage-btn" data-attacker-id="${data.attackerId}" data-defender-id="${data.defenderId}" data-defender-token-id="${data.defenderTokenId || ""}" data-extra-shield-dr="${data.shieldDamageReduction || 0}" data-attack-key="${data.attackRollKey}" data-damage-type="monster">
|
||||
<div class="attack-result-damage single-btn">
|
||||
<button class="roll-damage-btn" data-attacker-id="${data.attackerId}" data-defender-id="${data.defenderId}" data-defender-token-id="${data.defenderTokenId || ""}" data-extra-shield-dr="${data.shieldDamageReduction || 0}" data-attack-key="${data.attackRollKey}" data-damage-type="monster" data-d30-bleed="${d30Bleed}" data-d30-damage-mult="${d30DamageMultiplier}" data-d30-dr-mult="${d30DrMultiplier}">
|
||||
<i class="fa-solid fa-burst"></i> Damage
|
||||
</button>
|
||||
</div>
|
||||
`
|
||||
} else if (data.attackRollType === "spell-attack" || data.attackRollType === "miracle-attack") {
|
||||
const attacker = game.actors.get(data.attackerId)
|
||||
const spell = attacker?.items.get(data.attackWeaponId || data.attackRollKey)
|
||||
const chosenTier = data.damageTier || "standard"
|
||||
const allTiers = [
|
||||
{ id: "standard", formula: spell?.system?.damageDice, label: "Standard" },
|
||||
{ id: "overpowered", formula: spell?.system?.damageDiceOverpowered, label: "Overpowered" },
|
||||
{ id: "overpowered2", formula: spell?.system?.damageDiceOverpowered2, label: "Overpowered 2" },
|
||||
]
|
||||
const tiers = allTiers.filter(t => t.id === chosenTier && t.formula)
|
||||
if (tiers.length) {
|
||||
const buttons = tiers.map(t => {
|
||||
const escapedFormula = Handlebars.escapeExpression(t.formula)
|
||||
return `
|
||||
<button class="roll-damage-btn"
|
||||
data-attacker-id="${data.attackerId}"
|
||||
data-defender-id="${data.defenderId}"
|
||||
data-defender-token-id="${data.defenderTokenId || ""}"
|
||||
data-damage-type="spell"
|
||||
data-damage-formula="${escapedFormula}"
|
||||
data-d30-bleed="${d30Bleed}"
|
||||
data-d30-damage-mult="${d30DamageMultiplier}"
|
||||
data-d30-dr-mult="${d30DrMultiplier}">
|
||||
<i class="fa-solid fa-wand-magic-sparkles"></i> ${t.label} (${escapedFormula})
|
||||
</button>`
|
||||
}).join("")
|
||||
damageButton = `<div class="attack-result-damage spell-damage">${buttons}</div>`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -709,10 +1163,10 @@ export default class LethalFantasyUtils {
|
||||
</div>
|
||||
<div class="combat-result-text">
|
||||
${outcome === "shielded-hit"
|
||||
? `<i class="fa-solid fa-shield"></i> <strong>${data.attackerName}</strong> still hits <strong>${data.defenderName}</strong>, but shield DR <strong>${data.shieldDamageReduction || 0}</strong> reduces the damage.`
|
||||
? `<i class="fa-solid fa-shield"></i> <strong>${data.defenderName}</strong> has blocked with shield — apply armor DR + shield DR <strong>${data.shieldDamageReduction || 0}</strong>.`
|
||||
: isAttackWin
|
||||
? `<i class="fa-solid fa-circle-check"></i> <strong>${data.attackerName}</strong> hits <strong>${data.defenderName}</strong>!`
|
||||
: `<i class="fa-solid fa-shield-halved"></i> <strong>${data.defenderName}</strong> parries the attack!`
|
||||
: `<i class="fa-solid fa-shield-halved"></i> <strong>${data.defenderName}</strong> avoided the attack!`
|
||||
}
|
||||
</div>
|
||||
${damageButton}
|
||||
@@ -899,25 +1353,32 @@ 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) {
|
||||
if (!combatantId) {
|
||||
ui.notifications.error("No combatant selected")
|
||||
return
|
||||
}
|
||||
|
||||
let combatant = game.combat.combatants.get(combatantId)
|
||||
if (!combatant) {
|
||||
ui.notifications.error("Combatant not found")
|
||||
return
|
||||
// Try to find the target: first as a combat combatant, then as a scene token
|
||||
let targetActor = null
|
||||
if (game.combat) {
|
||||
const combatant = game.combat.combatants.get(combatantId)
|
||||
if (combatant) {
|
||||
targetActor = combatant.token?.actor || game.actors.get(combatant.actorId)
|
||||
}
|
||||
}
|
||||
if (!targetActor) {
|
||||
// Fall back to scene token lookup (non-combat tokens use tokenId as their combatantId)
|
||||
const token = canvas.tokens?.placeables?.find(t => t.id === combatantId)
|
||||
targetActor = token?.actor
|
||||
}
|
||||
|
||||
let targetActor = combatant.token?.actor || game.actors.get(combatant.actorId)
|
||||
if (!targetActor) {
|
||||
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
|
||||
// Use options.rollTotal (includes weapon modifier bonus) rather than roll.total (dice formula only)
|
||||
let damageTotal = message.rolls[0]?.options?.rollTotal ?? message.rolls[0]?.total ?? 0
|
||||
let weaponName = message.rolls[0]?.options?.rollName || "Unknown Weapon"
|
||||
|
||||
// Calculer les DR
|
||||
@@ -995,7 +1456,7 @@ export default class LethalFantasyUtils {
|
||||
ChatMessage.create({
|
||||
user: game.user.id,
|
||||
speaker: { alias: targetActor.name },
|
||||
rollMode: "gmroll",
|
||||
mode: "gm",
|
||||
content: messageContent
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
MANIFEST-000551
|
||||
MANIFEST-000631
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2026/04/12-00:56:41.816652 7f20ecbfc6c0 Recovering log #549
|
||||
2026/04/12-00:56:41.832396 7f20ecbfc6c0 Delete type=3 #547
|
||||
2026/04/12-00:56:41.832446 7f20ecbfc6c0 Delete type=0 #549
|
||||
2026/04/12-01:07:05.182307 7f1e4ffff6c0 Level-0 table #554: started
|
||||
2026/04/12-01:07:05.182364 7f1e4ffff6c0 Level-0 table #554: 0 bytes OK
|
||||
2026/04/12-01:07:05.188459 7f1e4ffff6c0 Delete type=0 #552
|
||||
2026/04/12-01:07:05.207103 7f1e4ffff6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
|
||||
2026/04/12-01:07:05.207149 7f1e4ffff6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
|
||||
2026/06/11-20:25:36.058631 7f37427ed6c0 Recovering log #629
|
||||
2026/06/11-20:25:36.068520 7f37427ed6c0 Delete type=3 #627
|
||||
2026/06/11-20:25:36.068574 7f37427ed6c0 Delete type=0 #629
|
||||
2026/06/11-20:41:45.938413 7f3740fff6c0 Level-0 table #634: started
|
||||
2026/06/11-20:41:45.938512 7f3740fff6c0 Level-0 table #634: 0 bytes OK
|
||||
2026/06/11-20:41:45.945312 7f3740fff6c0 Delete type=0 #632
|
||||
2026/06/11-20:41:45.965586 7f3740fff6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
|
||||
2026/06/11-20:41:45.965944 7f3740fff6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2026/04/11-21:32:22.595743 7f20ecbfc6c0 Recovering log #545
|
||||
2026/04/11-21:32:22.605266 7f20ecbfc6c0 Delete type=3 #543
|
||||
2026/04/11-21:32:22.605313 7f20ecbfc6c0 Delete type=0 #545
|
||||
2026/04/12-00:19:41.485614 7f1e4ffff6c0 Level-0 table #550: started
|
||||
2026/04/12-00:19:41.485662 7f1e4ffff6c0 Level-0 table #550: 0 bytes OK
|
||||
2026/04/12-00:19:41.492344 7f1e4ffff6c0 Delete type=0 #548
|
||||
2026/04/12-00:19:41.513106 7f1e4ffff6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
|
||||
2026/04/12-00:19:41.513142 7f1e4ffff6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
|
||||
2026/06/10-19:56:01.455200 7f301cbff6c0 Recovering log #625
|
||||
2026/06/10-19:56:01.464323 7f301cbff6c0 Delete type=3 #623
|
||||
2026/06/10-19:56:01.464355 7f301cbff6c0 Delete type=0 #625
|
||||
2026/06/10-20:16:07.843239 7f2fce7fc6c0 Level-0 table #630: started
|
||||
2026/06/10-20:16:07.843267 7f2fce7fc6c0 Level-0 table #630: 0 bytes OK
|
||||
2026/06/10-20:16:07.849298 7f2fce7fc6c0 Delete type=0 #628
|
||||
2026/06/10-20:16:07.849522 7f2fce7fc6c0 Manual compaction at level-0 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
|
||||
2026/06/10-20:16:07.849556 7f2fce7fc6c0 Manual compaction at level-1 from '!folders!ATr9wZhg5uTVTksM' @ 72057594037927935 : 1 .. '!items!zw9RQocTdz3HRjZK' @ 0 : 0; will stop at (end)
|
||||
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
MANIFEST-000548
|
||||
MANIFEST-000628
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2026/04/12-00:56:41.835571 7f20ee3ff6c0 Recovering log #546
|
||||
2026/04/12-00:56:41.850974 7f20ee3ff6c0 Delete type=3 #544
|
||||
2026/04/12-00:56:41.851033 7f20ee3ff6c0 Delete type=0 #546
|
||||
2026/04/12-01:07:05.194434 7f1e4ffff6c0 Level-0 table #551: started
|
||||
2026/04/12-01:07:05.194455 7f1e4ffff6c0 Level-0 table #551: 0 bytes OK
|
||||
2026/04/12-01:07:05.200694 7f1e4ffff6c0 Delete type=0 #549
|
||||
2026/04/12-01:07:05.207125 7f1e4ffff6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
|
||||
2026/04/12-01:07:05.207165 7f1e4ffff6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
|
||||
2026/06/11-20:25:36.074598 7f37437ef6c0 Recovering log #626
|
||||
2026/06/11-20:25:36.084983 7f37437ef6c0 Delete type=3 #624
|
||||
2026/06/11-20:25:36.085075 7f37437ef6c0 Delete type=0 #626
|
||||
2026/06/11-20:41:45.965954 7f3740fff6c0 Level-0 table #631: started
|
||||
2026/06/11-20:41:45.965991 7f3740fff6c0 Level-0 table #631: 0 bytes OK
|
||||
2026/06/11-20:41:45.972550 7f3740fff6c0 Delete type=0 #629
|
||||
2026/06/11-20:41:45.992980 7f3740fff6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
|
||||
2026/06/11-20:41:45.993323 7f3740fff6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2026/04/11-21:32:22.610678 7f20ed3fd6c0 Recovering log #542
|
||||
2026/04/11-21:32:22.621586 7f20ed3fd6c0 Delete type=3 #540
|
||||
2026/04/11-21:32:22.621657 7f20ed3fd6c0 Delete type=0 #542
|
||||
2026/04/12-00:19:41.492538 7f1e4ffff6c0 Level-0 table #547: started
|
||||
2026/04/12-00:19:41.492574 7f1e4ffff6c0 Level-0 table #547: 0 bytes OK
|
||||
2026/04/12-00:19:41.499243 7f1e4ffff6c0 Delete type=0 #545
|
||||
2026/04/12-00:19:41.513118 7f1e4ffff6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
|
||||
2026/04/12-00:19:41.513149 7f1e4ffff6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
|
||||
2026/06/10-19:56:01.470668 7f2fcffff6c0 Recovering log #622
|
||||
2026/06/10-19:56:01.480292 7f2fcffff6c0 Delete type=3 #620
|
||||
2026/06/10-19:56:01.480316 7f2fcffff6c0 Delete type=0 #622
|
||||
2026/06/10-20:16:07.810643 7f2fce7fc6c0 Level-0 table #627: started
|
||||
2026/06/10-20:16:07.810662 7f2fce7fc6c0 Level-0 table #627: 0 bytes OK
|
||||
2026/06/10-20:16:07.816355 7f2fce7fc6c0 Delete type=0 #625
|
||||
2026/06/10-20:16:07.823439 7f2fce7fc6c0 Manual compaction at level-0 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
|
||||
2026/06/10-20:16:07.823453 7f2fce7fc6c0 Manual compaction at level-1 from '!folders!yPWGvxHJbDNHVSnY' @ 72057594037927935 : 1 .. '!items!x5gLtqlW4sdDmHTd' @ 0 : 0; will stop at (end)
|
||||
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
MANIFEST-000553
|
||||
MANIFEST-000633
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2026/04/12-00:56:41.797453 7f20ed3fd6c0 Recovering log #551
|
||||
2026/04/12-00:56:41.813315 7f20ed3fd6c0 Delete type=3 #549
|
||||
2026/04/12-00:56:41.813371 7f20ed3fd6c0 Delete type=0 #551
|
||||
2026/04/12-01:07:05.200810 7f1e4ffff6c0 Level-0 table #556: started
|
||||
2026/04/12-01:07:05.200837 7f1e4ffff6c0 Level-0 table #556: 0 bytes OK
|
||||
2026/04/12-01:07:05.207008 7f1e4ffff6c0 Delete type=0 #554
|
||||
2026/04/12-01:07:05.207134 7f1e4ffff6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
|
||||
2026/04/12-01:07:05.207157 7f1e4ffff6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
|
||||
2026/06/11-20:25:36.041244 7f3742fee6c0 Recovering log #631
|
||||
2026/06/11-20:25:36.052153 7f3742fee6c0 Delete type=3 #629
|
||||
2026/06/11-20:25:36.052218 7f3742fee6c0 Delete type=0 #631
|
||||
2026/06/11-20:41:45.958653 7f3740fff6c0 Level-0 table #636: started
|
||||
2026/06/11-20:41:45.958703 7f3740fff6c0 Level-0 table #636: 0 bytes OK
|
||||
2026/06/11-20:41:45.965435 7f3740fff6c0 Delete type=0 #634
|
||||
2026/06/11-20:41:45.965798 7f3740fff6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
|
||||
2026/06/11-20:41:45.965918 7f3740fff6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2026/04/11-21:32:22.580345 7f20ee3ff6c0 Recovering log #547
|
||||
2026/04/11-21:32:22.590425 7f20ee3ff6c0 Delete type=3 #545
|
||||
2026/04/11-21:32:22.590495 7f20ee3ff6c0 Delete type=0 #547
|
||||
2026/04/12-00:19:41.520423 7f1e4ffff6c0 Level-0 table #552: started
|
||||
2026/04/12-00:19:41.520464 7f1e4ffff6c0 Level-0 table #552: 0 bytes OK
|
||||
2026/04/12-00:19:41.527028 7f1e4ffff6c0 Delete type=0 #550
|
||||
2026/04/12-00:19:41.543900 7f1e4ffff6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
|
||||
2026/04/12-00:19:41.554664 7f1e4ffff6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
|
||||
2026/06/10-19:56:01.439055 7f2fcffff6c0 Recovering log #627
|
||||
2026/06/10-19:56:01.451210 7f2fcffff6c0 Delete type=3 #625
|
||||
2026/06/10-19:56:01.451236 7f2fcffff6c0 Delete type=0 #627
|
||||
2026/06/10-20:16:07.804529 7f2fce7fc6c0 Level-0 table #632: started
|
||||
2026/06/10-20:16:07.804550 7f2fce7fc6c0 Level-0 table #632: 0 bytes OK
|
||||
2026/06/10-20:16:07.810504 7f2fce7fc6c0 Delete type=0 #630
|
||||
2026/06/10-20:16:07.823431 7f2fce7fc6c0 Manual compaction at level-0 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
|
||||
2026/06/10-20:16:07.823457 7f2fce7fc6c0 Manual compaction at level-1 from '!folders!7j8H7DbmBb9Uza2X' @ 72057594037927935 : 1 .. '!items!zt8s7564ep1La4XQ' @ 0 : 0; will stop at (end)
|
||||
|
||||
Binary file not shown.
@@ -1 +1 @@
|
||||
MANIFEST-000248
|
||||
MANIFEST-000328
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2026/04/12-00:56:41.870438 7f20ecbfc6c0 Recovering log #246
|
||||
2026/04/12-00:56:41.885745 7f20ecbfc6c0 Delete type=3 #244
|
||||
2026/04/12-00:56:41.885813 7f20ecbfc6c0 Delete type=0 #246
|
||||
2026/04/12-01:07:05.229253 7f1e4ffff6c0 Level-0 table #251: started
|
||||
2026/04/12-01:07:05.229286 7f1e4ffff6c0 Level-0 table #251: 0 bytes OK
|
||||
2026/04/12-01:07:05.235261 7f1e4ffff6c0 Delete type=0 #249
|
||||
2026/04/12-01:07:05.235386 7f1e4ffff6c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
|
||||
2026/04/12-01:07:05.245080 7f1e4ffff6c0 Manual compaction at level-1 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
|
||||
2026/06/11-20:25:36.103531 7f37437ef6c0 Recovering log #326
|
||||
2026/06/11-20:25:36.114200 7f37437ef6c0 Delete type=3 #324
|
||||
2026/06/11-20:25:36.114249 7f37437ef6c0 Delete type=0 #326
|
||||
2026/06/11-20:41:45.972686 7f3740fff6c0 Level-0 table #331: started
|
||||
2026/06/11-20:41:45.972724 7f3740fff6c0 Level-0 table #331: 0 bytes OK
|
||||
2026/06/11-20:41:45.979068 7f3740fff6c0 Delete type=0 #329
|
||||
2026/06/11-20:41:45.993007 7f3740fff6c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
|
||||
2026/06/11-20:41:45.993301 7f3740fff6c0 Manual compaction at level-1 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2026/04/11-21:32:22.642207 7f20edbfe6c0 Recovering log #242
|
||||
2026/04/11-21:32:22.652005 7f20edbfe6c0 Delete type=3 #240
|
||||
2026/04/11-21:32:22.652058 7f20edbfe6c0 Delete type=0 #242
|
||||
2026/04/12-00:19:41.506566 7f1e4ffff6c0 Level-0 table #247: started
|
||||
2026/04/12-00:19:41.506602 7f1e4ffff6c0 Level-0 table #247: 0 bytes OK
|
||||
2026/04/12-00:19:41.512971 7f1e4ffff6c0 Delete type=0 #245
|
||||
2026/04/12-00:19:41.513136 7f1e4ffff6c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
|
||||
2026/04/12-00:19:41.513162 7f1e4ffff6c0 Manual compaction at level-1 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
|
||||
2026/06/10-19:56:01.497944 7f301cbff6c0 Recovering log #322
|
||||
2026/06/10-19:56:01.506991 7f301cbff6c0 Delete type=3 #320
|
||||
2026/06/10-19:56:01.507034 7f301cbff6c0 Delete type=0 #322
|
||||
2026/06/10-20:16:07.829554 7f2fce7fc6c0 Level-0 table #327: started
|
||||
2026/06/10-20:16:07.829571 7f2fce7fc6c0 Level-0 table #327: 0 bytes OK
|
||||
2026/06/10-20:16:07.836328 7f2fce7fc6c0 Delete type=0 #325
|
||||
2026/06/10-20:16:07.849487 7f2fce7fc6c0 Manual compaction at level-0 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
|
||||
2026/06/10-20:16:07.849533 7f2fce7fc6c0 Manual compaction at level-1 from '!folders!37mu4dxsSuftlnmP' @ 72057594037927935 : 1 .. '!items!zKOpU34oLziGJW6y' @ 0 : 0; will stop at (end)
|
||||
|
||||
BIN
Binary file not shown.
@@ -1 +1 @@
|
||||
MANIFEST-000547
|
||||
MANIFEST-000627
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2026/04/12-00:56:41.853085 7f20ed3fd6c0 Recovering log #545
|
||||
2026/04/12-00:56:41.867862 7f20ed3fd6c0 Delete type=3 #543
|
||||
2026/04/12-00:56:41.867925 7f20ed3fd6c0 Delete type=0 #545
|
||||
2026/04/12-01:07:05.188580 7f1e4ffff6c0 Level-0 table #550: started
|
||||
2026/04/12-01:07:05.188606 7f1e4ffff6c0 Level-0 table #550: 0 bytes OK
|
||||
2026/04/12-01:07:05.194367 7f1e4ffff6c0 Delete type=0 #548
|
||||
2026/04/12-01:07:05.207115 7f1e4ffff6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
|
||||
2026/04/12-01:07:05.207142 7f1e4ffff6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
|
||||
2026/06/11-20:25:36.088952 7f37427ed6c0 Recovering log #625
|
||||
2026/06/11-20:25:36.100017 7f37427ed6c0 Delete type=3 #623
|
||||
2026/06/11-20:25:36.100073 7f37427ed6c0 Delete type=0 #625
|
||||
2026/06/11-20:41:45.945442 7f3740fff6c0 Level-0 table #630: started
|
||||
2026/06/11-20:41:45.945486 7f3740fff6c0 Level-0 table #630: 0 bytes OK
|
||||
2026/06/11-20:41:45.951778 7f3740fff6c0 Delete type=0 #628
|
||||
2026/06/11-20:41:45.965603 7f3740fff6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
|
||||
2026/06/11-20:41:45.965769 7f3740fff6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
2026/04/11-21:32:22.628476 7f20ecbfc6c0 Recovering log #541
|
||||
2026/04/11-21:32:22.638519 7f20ecbfc6c0 Delete type=3 #539
|
||||
2026/04/11-21:32:22.638582 7f20ecbfc6c0 Delete type=0 #541
|
||||
2026/04/12-00:19:41.499517 7f1e4ffff6c0 Level-0 table #546: started
|
||||
2026/04/12-00:19:41.499556 7f1e4ffff6c0 Level-0 table #546: 0 bytes OK
|
||||
2026/04/12-00:19:41.506406 7f1e4ffff6c0 Delete type=0 #544
|
||||
2026/04/12-00:19:41.513127 7f1e4ffff6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
|
||||
2026/04/12-00:19:41.513155 7f1e4ffff6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
|
||||
2026/06/10-19:56:01.483620 7f2fceffd6c0 Recovering log #621
|
||||
2026/06/10-19:56:01.493981 7f2fceffd6c0 Delete type=3 #619
|
||||
2026/06/10-19:56:01.494004 7f2fceffd6c0 Delete type=0 #621
|
||||
2026/06/10-20:16:07.797521 7f2fce7fc6c0 Level-0 table #626: started
|
||||
2026/06/10-20:16:07.797566 7f2fce7fc6c0 Level-0 table #626: 0 bytes OK
|
||||
2026/06/10-20:16:07.804440 7f2fce7fc6c0 Delete type=0 #624
|
||||
2026/06/10-20:16:07.823416 7f2fce7fc6c0 Manual compaction at level-0 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
|
||||
2026/06/10-20:16:07.823449 7f2fce7fc6c0 Manual compaction at level-1 from '!folders!mnO9OzE7BEE2KDfh' @ 72057594037927935 : 1 .. '!items!zkK6ixtCsCw3RH9X' @ 0 : 0; will stop at (end)
|
||||
|
||||
BIN
Binary file not shown.
@@ -387,11 +387,11 @@
|
||||
min-width: 6rem;
|
||||
max-width: 6rem;
|
||||
}
|
||||
min-width: 10rem;
|
||||
max-width: 10rem;
|
||||
min-width: 11rem;
|
||||
max-width: 11rem;
|
||||
.input {
|
||||
min-width: 2.5rem;
|
||||
max-width: 2.5rem;
|
||||
min-width: 3.5rem;
|
||||
max-width: 3.5rem;
|
||||
}
|
||||
}
|
||||
.granted {
|
||||
|
||||
+69
-12
@@ -145,9 +145,11 @@
|
||||
}
|
||||
|
||||
.grit-luck-dialog {
|
||||
color: var(--color-text-dark-primary, #191813);
|
||||
|
||||
.combat-status {
|
||||
padding: 12px;
|
||||
background: linear-gradient(to bottom, rgba(42, 41, 32, 0.8) 0%, rgba(26, 25, 16, 0.9) 100%);
|
||||
background: linear-gradient(to bottom, rgba(42, 41, 32, 0.88) 0%, rgba(26, 25, 16, 0.95) 100%);
|
||||
border: 1px solid rgba(212, 175, 55, 0.5);
|
||||
border-radius: 6px;
|
||||
margin-bottom: 16px;
|
||||
@@ -171,11 +173,27 @@
|
||||
}
|
||||
|
||||
.offer-text {
|
||||
color: #f0e6d2;
|
||||
color: var(--color-text-dark-primary, #191813);
|
||||
font-size: calc(var(--font-size-standard) * 1);
|
||||
text-align: center;
|
||||
font-weight: 600;
|
||||
margin: 0 0 8px 0;
|
||||
}
|
||||
|
||||
.shield-warning {
|
||||
color: #7a4000;
|
||||
background: rgba(255, 160, 0, 0.12);
|
||||
border: 1px solid rgba(255, 160, 0, 0.4);
|
||||
border-radius: 5px;
|
||||
font-size: calc(var(--font-size-standard) * 0.88);
|
||||
padding: 6px 10px;
|
||||
margin: 0;
|
||||
text-align: center;
|
||||
|
||||
i {
|
||||
color: #c07000;
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,33 +301,72 @@
|
||||
}
|
||||
|
||||
.attack-result-damage {
|
||||
display: flex;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 8px;
|
||||
justify-content: center;
|
||||
|
||||
&.single-btn {
|
||||
grid-template-columns: 1fr;
|
||||
max-width: 280px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
&.spell-damage {
|
||||
grid-template-columns: 1fr;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.roll-damage-btn {
|
||||
padding: 10px 16px;
|
||||
padding: 10px 14px;
|
||||
background: linear-gradient(to bottom, #8b0000 0%, #660000 100%);
|
||||
border: 1px solid #ff0000;
|
||||
border: 1px solid #4b0000;
|
||||
border-radius: 6px;
|
||||
color: #f0e6d2;
|
||||
font-weight: 600;
|
||||
font-size: calc(var(--font-size-standard) * 0.9);
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
||||
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: -100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
|
||||
transition: left 0.5s;
|
||||
}
|
||||
|
||||
&:hover::before {
|
||||
left: 100%;
|
||||
}
|
||||
|
||||
i {
|
||||
font-size: calc(var(--font-size-standard) * 1.1);
|
||||
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: linear-gradient(to bottom, #a00000 0%, #7b0000 100%);
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
|
||||
transform: translateY(-2px);
|
||||
border-color: #5b0000;
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
i {
|
||||
margin-right: 6px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), inset 0 1px 3px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+306
@@ -88,3 +88,309 @@
|
||||
padding-left: 8px;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
/* Luck/Grit Styles */
|
||||
#token-hud .luck-grit-wrap {
|
||||
position: absolute;
|
||||
left: 75px;
|
||||
display: none;
|
||||
top: 50%;
|
||||
width: 80px;
|
||||
text-align: start;
|
||||
background: rgba(0, 0, 0, 0.8);
|
||||
border: 1px solid rgba(139, 69, 19, 0.5);
|
||||
border-radius: 4px;
|
||||
padding: 4px 6px;
|
||||
transform: translate(-100%, -50%);
|
||||
}
|
||||
|
||||
#token-hud .luck-grit-hud-active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
#token-hud .luck-grit-hud-disabled {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#token-hud .luck-grit-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
margin: 2px 0;
|
||||
}
|
||||
|
||||
#token-hud .luck-grit-label {
|
||||
flex: 1;
|
||||
color: #c9b896;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
#token-hud .luck-grit-btn {
|
||||
width: 28px;
|
||||
height: 22px;
|
||||
padding: 0;
|
||||
background: rgba(139, 69, 19, 0.25);
|
||||
border: 1px solid rgba(139, 69, 19, 0.4);
|
||||
border-radius: 3px;
|
||||
color: #d4c5a9;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
line-height: 1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
&:hover {
|
||||
background: rgba(139, 69, 19, 0.5);
|
||||
border-color: rgba(139, 69, 19, 0.7);
|
||||
}
|
||||
}
|
||||
|
||||
/* -------------------------------------------------- */
|
||||
/* Dice Tray — injected into the Foundry chat sidebar */
|
||||
/* -------------------------------------------------- */
|
||||
|
||||
.lf-dice-tray {
|
||||
padding: 6px 8px;
|
||||
background:
|
||||
linear-gradient(135deg, rgba(245, 232, 200, 0.97) 0%, rgba(238, 222, 185, 0.97) 100%),
|
||||
url("/systems/fvtt-lethal-fantasy/assets/ui/lethal_fantasy_background.webp") center / cover;
|
||||
border-top: 2px solid rgba(139, 69, 19, 0.5);
|
||||
border-bottom: 1px solid rgba(139, 69, 19, 0.25);
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
pointer-events: all;
|
||||
|
||||
.lf-dt-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.lf-dt-label {
|
||||
color: #3a2a10;
|
||||
font-size: 15px;
|
||||
flex-shrink: 0;
|
||||
opacity: 0.7;
|
||||
}
|
||||
|
||||
.lf-dt-count {
|
||||
width: 44px;
|
||||
flex-shrink: 0;
|
||||
padding: 3px 4px;
|
||||
background: rgba(139, 69, 19, 0.15);
|
||||
border: 1px solid rgba(139, 69, 19, 0.45);
|
||||
border-radius: 4px;
|
||||
color: #2a1a08;
|
||||
font-size: 11px;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
|
||||
option { background: #f5ead0; color: #2a1a08; }
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
border-color: rgba(139, 69, 19, 0.7);
|
||||
box-shadow: 0 0 4px rgba(139, 69, 19, 0.25);
|
||||
}
|
||||
}
|
||||
|
||||
.lf-dt-dice {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 3px;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.lf-dt-die-btn {
|
||||
padding: 3px 7px;
|
||||
background: rgba(139, 69, 19, 0.15);
|
||||
border: 1px solid rgba(139, 69, 19, 0.4);
|
||||
border-radius: 4px;
|
||||
color: #2a1a08;
|
||||
font-size: 10px;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.1s;
|
||||
line-height: 1.5;
|
||||
letter-spacing: 0.3px;
|
||||
|
||||
&:hover {
|
||||
background: rgba(139, 69, 19, 0.35);
|
||||
border-color: rgba(139, 69, 19, 0.7);
|
||||
color: #5a2a00;
|
||||
box-shadow: 0 0 5px rgba(139, 69, 19, 0.3);
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: translateY(0);
|
||||
box-shadow: none;
|
||||
background: rgba(139, 69, 19, 0.5);
|
||||
}
|
||||
}
|
||||
|
||||
.lf-dt-explode-label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 3px;
|
||||
cursor: pointer;
|
||||
color: rgba(160, 80, 20, 0.7);
|
||||
font-size: 14px;
|
||||
flex-shrink: 0;
|
||||
padding: 3px 6px;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 4px;
|
||||
transition: color 0.15s, border-color 0.15s, background 0.15s;
|
||||
|
||||
&:hover {
|
||||
color: rgba(200, 100, 30, 0.9);
|
||||
border-color: rgba(139, 69, 19, 0.45);
|
||||
background: rgba(139, 69, 19, 0.12);
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
appearance: none;
|
||||
width: 0;
|
||||
height: 0;
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
|
||||
&:checked ~ i {
|
||||
color: #cc4400;
|
||||
filter: drop-shadow(0 0 4px rgba(200, 80, 0, 0.6));
|
||||
}
|
||||
}
|
||||
|
||||
&:has(input:checked) {
|
||||
color: #cc4400;
|
||||
border-color: rgba(139, 69, 19, 0.55);
|
||||
background: rgba(139, 60, 10, 0.2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Free roll chat card — styled to match regular system roll cards */
|
||||
.lf-free-roll-card {
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
|
||||
.lf-frc-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 6px 8px;
|
||||
background: linear-gradient(135deg, rgba(40, 30, 20, 0.7) 0%, rgba(30, 22, 15, 0.9) 100%);
|
||||
border-bottom: 2px solid rgba(139, 69, 19, 0.4);
|
||||
|
||||
i { color: #c9b896; font-size: calc(var(--font-size-standard, 14px) * 1.1); }
|
||||
|
||||
.lf-frc-title-text {
|
||||
font-size: calc(var(--font-size-standard, 14px) * 0.85);
|
||||
color: #c9b896;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.lf-frc-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 2px 8px;
|
||||
background: rgba(139, 69, 19, 0.3);
|
||||
border: 1px solid rgba(139, 69, 19, 0.5);
|
||||
border-radius: 10px;
|
||||
font-size: calc(var(--font-size-standard, 14px) * 0.85);
|
||||
font-weight: 600;
|
||||
color: #d4c5a9;
|
||||
}
|
||||
}
|
||||
|
||||
.lf-frc-dice {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 4px;
|
||||
padding: 6px 8px;
|
||||
background: rgba(0, 0, 0, 0.15);
|
||||
border: 1px solid rgba(139, 69, 19, 0.3);
|
||||
border-top: none;
|
||||
|
||||
.lf-frc-die-chip {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
padding: 3px 8px;
|
||||
background: rgba(139, 69, 19, 0.2);
|
||||
border: 1px solid rgba(139, 69, 19, 0.3);
|
||||
border-radius: 4px;
|
||||
|
||||
.lf-frc-die-type {
|
||||
font-size: calc(var(--font-size-standard, 14px) * 0.85);
|
||||
font-weight: 600;
|
||||
color: #2a2a1a;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
.lf-frc-die-sep {
|
||||
color: rgba(0, 0, 0, 0.35);
|
||||
font-weight: 300;
|
||||
font-size: calc(var(--font-size-standard, 14px) * 0.8);
|
||||
}
|
||||
|
||||
.lf-frc-die-val {
|
||||
font-weight: bold;
|
||||
color: #ffd700;
|
||||
font-size: calc(var(--font-size-standard, 14px) * 0.95);
|
||||
|
||||
.lf-dt-explode-icon {
|
||||
font-size: 8px;
|
||||
color: #ffcc00;
|
||||
margin-left: 2px;
|
||||
vertical-align: super;
|
||||
text-shadow: 0 0 4px rgba(255, 200, 0, 0.8);
|
||||
}
|
||||
}
|
||||
|
||||
&.lf-frc-max {
|
||||
background: rgba(139, 90, 19, 0.35);
|
||||
border-color: rgba(200, 116, 42, 0.6);
|
||||
.lf-frc-die-val { color: #ff9a40; text-shadow: 0 0 6px rgba(200, 116, 42, 0.6); }
|
||||
}
|
||||
|
||||
&.lf-frc-min {
|
||||
background: rgba(139, 20, 20, 0.25);
|
||||
border-color: rgba(139, 34, 34, 0.5);
|
||||
.lf-frc-die-val { color: #ff6b6b; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.lf-frc-total-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 8px;
|
||||
padding: 6px 10px;
|
||||
background: linear-gradient(135deg, rgba(40, 30, 20, 0.6) 0%, rgba(20, 15, 10, 0.8) 100%);
|
||||
border: 2px solid rgba(139, 69, 19, 0.5);
|
||||
|
||||
.lf-frc-total-label {
|
||||
font-size: calc(var(--font-size-standard, 14px) * 0.85);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
color: #c9b896;
|
||||
}
|
||||
|
||||
.lf-frc-total-value {
|
||||
font-family: var(--font-primary, serif);
|
||||
font-size: calc(var(--font-size-standard, 14px) * 1.6);
|
||||
font-weight: bold;
|
||||
color: #e8d5a0;
|
||||
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -410,6 +410,48 @@
|
||||
}
|
||||
}
|
||||
|
||||
.ranged-attacks {
|
||||
grid-template-columns: 1fr;
|
||||
.attack {
|
||||
.name {
|
||||
min-width: 10rem;
|
||||
max-width: 10rem;
|
||||
}
|
||||
.damage-dice {
|
||||
width: 5rem;
|
||||
max-width: 5rem;
|
||||
}
|
||||
}
|
||||
.ranged-weapon-range {
|
||||
margin-top: 8px;
|
||||
border-top: 1px solid var(--color-border-light-tertiary, #ccc);
|
||||
padding-top: 6px;
|
||||
> label {
|
||||
font-weight: bold;
|
||||
margin-bottom: 4px;
|
||||
display: block;
|
||||
}
|
||||
.range-fields {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
.range-field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
label {
|
||||
font-size: 0.7rem;
|
||||
white-space: nowrap;
|
||||
}
|
||||
input {
|
||||
width: 3.5rem;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.armors {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
|
||||
+73
-21
@@ -176,6 +176,22 @@
|
||||
}
|
||||
}
|
||||
|
||||
.dialog-warning {
|
||||
margin: 0.4rem 0.2rem 0.2rem;
|
||||
padding: 0.35rem 0.5rem;
|
||||
border-left: 3px solid #c8941a;
|
||||
background: rgba(200, 148, 26, 0.12);
|
||||
border-radius: 3px;
|
||||
font-family: var(--font-secondary);
|
||||
font-size: calc(var(--font-size-standard) * 0.9);
|
||||
color: #7a5400;
|
||||
line-height: 1.4;
|
||||
i {
|
||||
color: #c8941a;
|
||||
margin-right: 0.4rem;
|
||||
}
|
||||
}
|
||||
|
||||
.lethalfantasy,
|
||||
.fvtt-lethal-fantasy,
|
||||
.message.lethalfantasy,
|
||||
@@ -467,7 +483,7 @@
|
||||
.d30-label {
|
||||
flex-grow: 1;
|
||||
font-weight: bold;
|
||||
color: #e0d5f0;
|
||||
color: #2a1a3a;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
font-size: calc(var(--font-size-standard) * 0.9);
|
||||
@@ -477,11 +493,11 @@
|
||||
font-family: var(--font-primary);
|
||||
font-size: calc(var(--font-size-standard) * 1.5);
|
||||
font-weight: bold;
|
||||
color: #ff69b4;
|
||||
background: rgba(255, 105, 180, 0.1);
|
||||
color: #3d006e;
|
||||
background: rgba(255, 255, 255, 0.35);
|
||||
padding: 4px 12px;
|
||||
border-radius: 12px;
|
||||
border: 1px solid rgba(255, 105, 180, 0.3);
|
||||
border: 1px solid rgba(138, 43, 226, 0.4);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -631,15 +647,11 @@
|
||||
|
||||
.damage-buttons-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
grid-template-columns: 1fr;
|
||||
max-width: 280px;
|
||||
margin: 0 auto;
|
||||
gap: 8px;
|
||||
|
||||
&.monster-damage {
|
||||
grid-template-columns: 1fr;
|
||||
max-width: 280px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.damage-roll-btn {
|
||||
padding: 10px 14px;
|
||||
background: linear-gradient(to bottom, #8b4513 0%, #6b3410 100%);
|
||||
@@ -831,6 +843,7 @@
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 8px;
|
||||
justify-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1269,33 +1282,72 @@
|
||||
}
|
||||
|
||||
.attack-result-damage {
|
||||
display: flex;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
gap: 8px;
|
||||
justify-content: center;
|
||||
|
||||
&.single-btn {
|
||||
grid-template-columns: 1fr;
|
||||
max-width: 280px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
&.spell-damage {
|
||||
grid-template-columns: 1fr;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.roll-damage-btn {
|
||||
padding: 10px 16px;
|
||||
padding: 10px 14px;
|
||||
background: linear-gradient(to bottom, #8b0000 0%, #660000 100%);
|
||||
border: 1px solid #ff0000;
|
||||
border: 1px solid #4b0000;
|
||||
border-radius: 6px;
|
||||
color: #f0e6d2;
|
||||
font-weight: 600;
|
||||
font-size: calc(var(--font-size-standard) * 0.9);
|
||||
text-align: center;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
|
||||
box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 6px;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
&::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: -100%;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
|
||||
transition: left 0.5s;
|
||||
}
|
||||
|
||||
&:hover::before {
|
||||
left: 100%;
|
||||
}
|
||||
|
||||
i {
|
||||
font-size: calc(var(--font-size-standard) * 1.1);
|
||||
filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: linear-gradient(to bottom, #a00000 0%, #7b0000 100%);
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
|
||||
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.15);
|
||||
transform: translateY(-2px);
|
||||
border-color: #5b0000;
|
||||
}
|
||||
|
||||
&:active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
i {
|
||||
margin-right: 6px;
|
||||
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4), inset 0 1px 3px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -6,7 +6,7 @@
|
||||
"download": "#{DOWNLOAD}#",
|
||||
"url": "#{URL}#",
|
||||
"license": "LICENSE",
|
||||
"version": "13.0.0",
|
||||
"version": "14.0.0",
|
||||
"authors": [
|
||||
{
|
||||
"name": "Uberwald",
|
||||
@@ -15,7 +15,7 @@
|
||||
],
|
||||
"compatibility": {
|
||||
"minimum": "13",
|
||||
"verified": "13"
|
||||
"verified": "14"
|
||||
},
|
||||
"esmodules": ["lethal-fantasy.mjs"],
|
||||
"styles": ["css/fvtt-lethal-fantasy.css"],
|
||||
|
||||
@@ -9,95 +9,95 @@
|
||||
<legend>{{localize "LETHALFANTASY.Label.biodata"}}</legend>
|
||||
<div class="biodata">
|
||||
<div class="biodata-elem">
|
||||
<span class="name">Class</span>
|
||||
<span class="name">{{localize "LETHALFANTASY.Label.class"}}</span>
|
||||
{{formInput
|
||||
systemFields.biodata.fields.class
|
||||
value=system.biodata.class
|
||||
}}
|
||||
</div>
|
||||
<div class="biodata-elem">
|
||||
<span class="name">Level</span>
|
||||
<span class="name">{{localize "LETHALFANTASY.Label.level"}}</span>
|
||||
{{formInput
|
||||
systemFields.biodata.fields.level
|
||||
value=system.biodata.level
|
||||
}}
|
||||
</div>
|
||||
<div class="biodata-elem">
|
||||
<span class="name">Mortal</span>
|
||||
<span class="name">{{localize "LETHALFANTASY.Label.mortal"}}</span>
|
||||
{{formInput
|
||||
systemFields.biodata.fields.mortal
|
||||
value=system.biodata.mortal
|
||||
}}
|
||||
</div>
|
||||
<div class="biodata-elem">
|
||||
<span class="name">Alignment</span>
|
||||
<span class="name">{{localize "LETHALFANTASY.Label.alignment"}}</span>
|
||||
{{formInput
|
||||
systemFields.biodata.fields.alignment
|
||||
value=system.biodata.alignment
|
||||
}}
|
||||
</div>
|
||||
<div class="biodata-elem">
|
||||
<span class="name">Age</span>
|
||||
<span class="name">{{localize "LETHALFANTASY.Label.age"}}</span>
|
||||
{{formInput systemFields.biodata.fields.age value=system.biodata.age}}
|
||||
</div>
|
||||
<div class="biodata-elem">
|
||||
<span class="name">Height</span>
|
||||
<span class="name">{{localize "LETHALFANTASY.Label.height"}}</span>
|
||||
{{formInput
|
||||
systemFields.biodata.fields.height
|
||||
value=system.biodata.height
|
||||
}}
|
||||
</div>
|
||||
<div class="biodata-elem">
|
||||
<span class="name">Weight</span>
|
||||
<span class="name">{{localize "LETHALFANTASY.Label.weight"}}</span>
|
||||
{{formInput
|
||||
systemFields.biodata.fields.weight
|
||||
value=system.biodata.weight
|
||||
}}
|
||||
</div>
|
||||
<div class="biodata-elem">
|
||||
<span class="name">Eyes</span>
|
||||
<span class="name">{{localize "LETHALFANTASY.Label.eyes"}}</span>
|
||||
{{formInput
|
||||
systemFields.biodata.fields.eyes
|
||||
value=system.biodata.eyes
|
||||
}}
|
||||
</div>
|
||||
<div class="biodata-elem">
|
||||
<span class="name">Hair</span>
|
||||
<span class="name">{{localize "LETHALFANTASY.Label.hair"}}</span>
|
||||
{{formInput
|
||||
systemFields.biodata.fields.hair
|
||||
value=system.biodata.hair
|
||||
}}
|
||||
</div>
|
||||
<div class="biodata-elem">
|
||||
<span class="name">Dev. Points (Total)</span>
|
||||
<span class="name">{{localize "LETHALFANTASY.Label.devPointsTotal"}}</span>
|
||||
{{formInput
|
||||
systemFields.developmentPoints.fields.total
|
||||
value=system.developmentPoints.total
|
||||
}}
|
||||
</div>
|
||||
<div class="biodata-elem">
|
||||
<span class="name">Dev. Points (Rem.)</span>
|
||||
<span class="name">{{localize "LETHALFANTASY.Label.devPointsRem"}}</span>
|
||||
{{formInput
|
||||
systemFields.developmentPoints.fields.remaining
|
||||
value=system.developmentPoints.remaining
|
||||
}}
|
||||
</div>
|
||||
<div class="biodata-elem">
|
||||
<span class="name">Magic User</span>
|
||||
<span class="name">{{localize "LETHALFANTASY.Label.magicUser"}}</span>
|
||||
{{formInput
|
||||
systemFields.biodata.fields.magicUser
|
||||
value=system.biodata.magicUser
|
||||
}}
|
||||
</div>
|
||||
<div class="biodata-elem">
|
||||
<span class="name">Cleric User</span>
|
||||
<span class="name">{{localize "LETHALFANTASY.Label.clericUser"}}</span>
|
||||
{{formInput
|
||||
systemFields.biodata.fields.clericUser
|
||||
value=system.biodata.clericUser
|
||||
}}
|
||||
</div>
|
||||
<div class="biodata-elem">
|
||||
<span class="name">Save bonus (1/5levels)</span>
|
||||
<span class="name">{{localize "LETHALFANTASY.Label.saveBonus"}}</span>
|
||||
{{formInput
|
||||
systemFields.modifiers.fields.saveModifier
|
||||
value=system.modifiers.saveModifier
|
||||
@@ -107,7 +107,7 @@
|
||||
|
||||
{{#if system.biodata.magicUser}}
|
||||
<div class="biodata-elem">
|
||||
<span class="name">Spell bonus (1/5levels)</span>
|
||||
<span class="name">{{localize "LETHALFANTASY.Label.spellBonus"}}</span>
|
||||
{{formInput
|
||||
systemFields.modifiers.fields.levelSpellModifier
|
||||
value=system.modifiers.levelSpellModifier
|
||||
@@ -117,7 +117,7 @@
|
||||
{{/if}}
|
||||
{{#if system.biodata.clericUser}}
|
||||
<div class="biodata-elem">
|
||||
<span class="name">Miracle bonus (1/5levels)</span>
|
||||
<span class="name">{{localize "LETHALFANTASY.Label.miracleBonus"}}</span>
|
||||
{{formInput
|
||||
systemFields.modifiers.fields.levelMiracleModifier
|
||||
value=system.modifiers.levelMiracleModifier
|
||||
@@ -127,7 +127,7 @@
|
||||
{{/if}}
|
||||
|
||||
<div class="biodata-elem">
|
||||
<span class="name">Last HD roll</span>
|
||||
<span class="name">{{localize "LETHALFANTASY.Label.lastHdRoll"}}</span>
|
||||
{{formInput
|
||||
systemFields.biodata.fields.hpPerLevel
|
||||
value=system.biodata.hpPerLevel
|
||||
@@ -136,7 +136,7 @@
|
||||
</div>
|
||||
|
||||
<div class="biodata-elem">
|
||||
<span class="name">Natural DR</span>
|
||||
<span class="name">{{localize "LETHALFANTASY.Label.naturalDR"}}</span>
|
||||
{{formInput
|
||||
systemFields.biodata.fields.naturalDR
|
||||
value=system.biodata.naturalDR
|
||||
@@ -145,7 +145,7 @@
|
||||
</div>
|
||||
|
||||
<div class="biodata-elem">
|
||||
<span class="name">Magical DR</span>
|
||||
<span class="name">{{localize "LETHALFANTASY.Label.magicalDR"}}</span>
|
||||
{{formInput
|
||||
systemFields.biodata.fields.magicDR
|
||||
value=system.biodata.magicDR
|
||||
|
||||
@@ -87,16 +87,10 @@
|
||||
<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 class="rollable" data-roll-type="weapon-damage" data-roll-key="{{item.id}}"
|
||||
data-tooltip="Roll Damage">
|
||||
<i class="fa-regular fa-face-head-bandage" data-roll-type="weapon-damage"
|
||||
data-roll-key="{{item.id}}"></i>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
<legend>{{localize "LETHALFANTASY.Label.divinityPoints"}}</legend>
|
||||
<div class="miracle-details">
|
||||
<div class="miracle-detail">
|
||||
<span>Current</span>
|
||||
<span>{{localize "LETHALFANTASY.Label.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>
|
||||
<span>{{localize "LETHALFANTASY.Label.max"}}</span>
|
||||
{{formField systemFields.divinityPoints.fields.max value=system.divinityPoints.max localize=true
|
||||
disabled=isPlayMode}}
|
||||
</div>
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
<legend>{{localize "LETHALFANTASY.Label.aetherPoints"}}</legend>
|
||||
<div class="spell-details">
|
||||
<div class="spell-detail">
|
||||
<span>Current</span>
|
||||
<span>{{localize "LETHALFANTASY.Label.current"}}</span>
|
||||
{{formField systemFields.aetherPoints.fields.value value=system.aetherPoints.value localize=true}}
|
||||
<a data-action="aetherPointsPlus"><i class="fa-solid fa-hexagon-plus"></i></a>
|
||||
<a data-action="aetherPointsMinus"><i class="fa-solid fa-hexagon-minus"></i></a>
|
||||
|
||||
<span>Max</span>
|
||||
<span>{{localize "LETHALFANTASY.Label.max"}}</span>
|
||||
{{formField systemFields.aetherPoints.fields.max value=system.aetherPoints.max localize=true
|
||||
disabled=isPlayMode}}
|
||||
</div>
|
||||
@@ -37,6 +37,25 @@
|
||||
<i class="fa-duotone fa-solid fa-stars" data-roll-type="spell-power" data-roll-key="{{item.id}}"></i>
|
||||
</a>
|
||||
|
||||
{{#if item.system.damageDice}}
|
||||
<a data-action="rollSpellDamage" data-item-id="{{item.id}}" data-damage-tier="standard"
|
||||
data-tooltip="Spell Damage (Standard)">
|
||||
<i class="fa-solid fa-wand-magic-sparkles"></i>S
|
||||
</a>
|
||||
{{/if}}
|
||||
{{#if item.system.damageDiceOverpowered}}
|
||||
<a data-action="rollSpellDamage" data-item-id="{{item.id}}" data-damage-tier="overpowered"
|
||||
data-tooltip="Spell Damage (Overpowered)">
|
||||
<i class="fa-solid fa-wand-magic-sparkles"></i>O
|
||||
</a>
|
||||
{{/if}}
|
||||
{{#if item.system.damageDiceOverpowered2}}
|
||||
<a data-action="rollSpellDamage" data-item-id="{{item.id}}" data-damage-tier="overpowered2"
|
||||
data-tooltip="Spell Damage (Overpowered 2)">
|
||||
<i class="fa-solid fa-wand-magic-sparkles"></i>O2
|
||||
</a>
|
||||
{{/if}}
|
||||
|
||||
<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>
|
||||
|
||||
+11
-30
@@ -40,45 +40,39 @@
|
||||
{{#if (eq rollData.favor "favor")}}
|
||||
<div class="detail-badge favor-badge">
|
||||
<i class="fa-solid fa-sparkles"></i>
|
||||
<span>Favor</span>
|
||||
<span>{{localize "LETHALFANTASY.Label.favor"}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if (eq rollData.favor "disfavor")}}
|
||||
<div class="detail-badge disfavor-badge">
|
||||
<i class="fa-solid fa-skull"></i>
|
||||
<span>Disfavor</span>
|
||||
<span>{{localize "LETHALFANTASY.Label.disfavor"}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if rollData.letItFly}}
|
||||
<div class="detail-badge special-badge">
|
||||
<i class="fa-solid fa-bow-arrow"></i>
|
||||
<span>Let It Fly!</span>
|
||||
<span>{{localize "LETHALFANTASY.Label.letItFly"}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if rollData.pointBlank}}
|
||||
<div class="detail-badge special-badge">
|
||||
<i class="fa-solid fa-bullseye-arrow"></i>
|
||||
<span>Point Blank</span>
|
||||
<span>{{localize "LETHALFANTASY.Label.pointBlank"}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if rollData.beyondSkill}}
|
||||
<div class="detail-badge special-badge">
|
||||
<i class="fa-solid fa-target-lock"></i>
|
||||
<span>Beyond Skill</span>
|
||||
<span>{{localize "LETHALFANTASY.Label.beyondSkill"}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if rollData.damageSmall}}
|
||||
<div class="detail-badge damage-badge">
|
||||
<i class="fa-solid fa-dice-d6"></i>
|
||||
<span>{{localize "LETHALFANTASY.Label.weapon-damage-small"}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if rollData.damageMedium}}
|
||||
{{#if rollData.isDamage}}
|
||||
<div class="detail-badge damage-badge">
|
||||
<i class="fa-solid fa-dice-d20"></i>
|
||||
<span>{{localize "LETHALFANTASY.Label.weapon-damage-medium"}}</span>
|
||||
<span>{{localize "LETHALFANTASY.Label.weapon-damage"}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
@@ -111,7 +105,7 @@
|
||||
{{#unless isPrivate}}
|
||||
<div class="result-section">
|
||||
<div class="main-result">
|
||||
<div class="result-label">Total</div>
|
||||
<div class="result-label">{{localize "LETHALFANTASY.Label.total"}}</div>
|
||||
<div class="result-value {{#if (eq resultType 'success')}}success{{else}}failure{{/if}}">
|
||||
{{total}}
|
||||
</div>
|
||||
@@ -127,7 +121,7 @@
|
||||
{{#if D30message}}
|
||||
<div class="d30-message">
|
||||
<i class="fa-solid fa-wand-magic-sparkles"></i>
|
||||
<span>{{D30message}}</span>
|
||||
<span>{{D30message.description}}</span>
|
||||
</div>
|
||||
{{/if}}
|
||||
</div>
|
||||
@@ -177,7 +171,7 @@
|
||||
{{else}}
|
||||
<div class="private-result">
|
||||
<i class="fa-solid fa-eye-slash"></i>
|
||||
<span>Private Roll</span>
|
||||
<span>{{localize "LETHALFANTASY.Label.privateRoll"}}</span>
|
||||
</div>
|
||||
{{/unless}}
|
||||
|
||||
@@ -202,19 +196,6 @@
|
||||
}}+{{weaponDamageOptions.damageModifier}}{{/if}}
|
||||
</button>
|
||||
{{else}}
|
||||
{{#if weaponDamageOptions.damageS}}
|
||||
<button
|
||||
class="damage-roll-btn"
|
||||
data-weapon-id="{{weaponDamageOptions.weaponId}}"
|
||||
data-damage-type="small"
|
||||
data-damage-formula="{{weaponDamageOptions.damageS}}"
|
||||
data-is-monster="false"
|
||||
title="{{localize 'LETHALFANTASY.Label.rollDamage'}}"
|
||||
>
|
||||
<i class="fa-solid fa-dice-d6"></i>
|
||||
Damage Small
|
||||
</button>
|
||||
{{/if}}
|
||||
{{#if weaponDamageOptions.damageM}}
|
||||
<button
|
||||
class="damage-roll-btn"
|
||||
@@ -225,7 +206,7 @@
|
||||
title="{{localize 'LETHALFANTASY.Label.rollDamage'}}"
|
||||
>
|
||||
<i class="fa-solid fa-dice-d20"></i>
|
||||
Damage Medium
|
||||
{{localize "LETHALFANTASY.Label.damage"}}
|
||||
</button>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
@@ -13,6 +13,14 @@
|
||||
<span>{{ localize "COMBAT.End" }}</span>
|
||||
</button>
|
||||
|
||||
{{#if combat.round}}
|
||||
<button type="button" class="combat-control combat-control-lg" data-action="rollMonsterProgression"
|
||||
data-tooltip="{{ localize 'LETHALFANTASY.Combat.RollMonsters' }}">
|
||||
<i class="fa-solid fa-dragon" inert></i>
|
||||
<span>{{ localize "LETHALFANTASY.Combat.RollMonsters" }}</span>
|
||||
</button>
|
||||
{{/if}}
|
||||
|
||||
<!-- <button type="button" class="inline-control combat-control icon fa-solid fa-arrow-right" data-action="nextTurn"
|
||||
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"
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<div class="control-icon" data-action="lethal-luck-grit-hud">
|
||||
<i class="fa-solid fa-dice" title="Adjust Luck/Grit" style="width:36px;height:36px;display:flex;align-items:center;justify-content:center;font-size:18px;cursor:pointer"></i>
|
||||
|
||||
<div class="luck-grit-wrap luck-grit-hud-disabled">
|
||||
<div class="luck-grit-row">
|
||||
<span class="luck-grit-label">Luck</span>
|
||||
<button class="luck-grit-btn" data-resource="luck" data-amount="-1">−1</button>
|
||||
<button class="luck-grit-btn" data-resource="luck" data-amount="1">+1</button>
|
||||
</div>
|
||||
<div class="luck-grit-row">
|
||||
<span class="luck-grit-label">Grit</span>
|
||||
<button class="luck-grit-btn" data-resource="grit" data-amount="-1">−1</button>
|
||||
<button class="luck-grit-btn" data-resource="grit" data-amount="1">+1</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -7,7 +7,7 @@
|
||||
{{formField systemFields.miracleType value=system.miracleType}}
|
||||
{{formField systemFields.level value=system.level}}
|
||||
|
||||
<label>Components</label>
|
||||
<label>{{localize "LETHALFANTASY.Label.components"}}</label>
|
||||
<div class="shift-right">
|
||||
{{formField systemFields.components.fields.verbal value=system.components.verbal}}
|
||||
{{formField systemFields.components.fields.somatic value=system.components.somatic}}
|
||||
@@ -27,6 +27,9 @@
|
||||
{{formField systemFields.areaAffected value=system.areaAffected}}
|
||||
{{formField systemFields.duration value=system.duration}}
|
||||
{{formField systemFields.savingThrow value=system.savingThrow}}
|
||||
{{formField systemFields.damageDice value=system.damageDice}}
|
||||
{{formField systemFields.damageDiceOverpowered value=system.damageDiceOverpowered}}
|
||||
{{formField systemFields.damageDiceOverpowered2 value=system.damageDiceOverpowered2}}
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,23 +6,23 @@
|
||||
<div class="biodata">
|
||||
|
||||
<div class="biodata-elem">
|
||||
<span class="name">Alignment</span>
|
||||
<span class="name">{{localize "LETHALFANTASY.Label.alignment"}}</span>
|
||||
{{formInput systemFields.biodata.fields.alignment value=system.biodata.alignment }}
|
||||
</div>
|
||||
<div class="biodata-elem">
|
||||
<span class="name">Height</span>
|
||||
<span class="name">{{localize "LETHALFANTASY.Label.height"}}</span>
|
||||
{{formInput systemFields.biodata.fields.height value=system.biodata.height }}
|
||||
</div>
|
||||
<div class="biodata-elem">
|
||||
<span class="name">Weight</span>
|
||||
<span class="name">{{localize "LETHALFANTASY.Label.weight"}}</span>
|
||||
{{formInput systemFields.biodata.fields.weight value=system.biodata.weight }}
|
||||
</div>
|
||||
<div class="biodata-elem">
|
||||
<span class="name">Length</span>
|
||||
<span class="name">{{localize "LETHALFANTASY.Label.length"}}</span>
|
||||
{{formInput systemFields.biodata.fields.length value=system.biodata.length }}
|
||||
</div>
|
||||
<div class="biodata-elem">
|
||||
<span class="name">Vision</span>
|
||||
<span class="name">{{localize "LETHALFANTASY.Label.vision"}}</span>
|
||||
{{formInput systemFields.biodata.fields.vision value=system.biodata.vision }}
|
||||
</div>
|
||||
|
||||
|
||||
@@ -18,7 +18,16 @@
|
||||
|
||||
<fieldset>
|
||||
<legend>{{localize "LETHALFANTASY.Label.attacks"}}</legend>
|
||||
<div class="attacks">
|
||||
<div class="attack-mode-selector">
|
||||
<label>{{localize "LETHALFANTASY.Label.attackMode"}}</label>
|
||||
<select name="system.attackMode">
|
||||
<option value="melee" {{#if (eq system.attackMode "melee")}}selected{{/if}}>{{localize "LETHALFANTASY.Label.meleeModeLabel"}}</option>
|
||||
<option value="ranged" {{#if (eq system.attackMode "ranged")}}selected{{/if}}>{{localize "LETHALFANTASY.Label.rangedModeLabel"}}</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
{{#if (eq system.attackMode "melee")}}
|
||||
<div class="attacks melee-attacks">
|
||||
{{#each system.attacks as |item key|}}
|
||||
<div class="attack" data-attack-key="{{key}}" >
|
||||
<div class="">
|
||||
@@ -42,6 +51,9 @@
|
||||
<div class="numeric">
|
||||
<input type="number" name="system.attacks.{{item.key}}.damageModifier" value="{{item.damageModifier}}" data-tooltip="Damage modifier"/>
|
||||
</div>
|
||||
<div class="">
|
||||
<input type="checkbox" name="system.attacks.{{item.key}}.noExplode" {{checked item.noExplode}} data-tooltip="No exploding dice on damage" />
|
||||
</div>
|
||||
|
||||
<div class="attack-icons">
|
||||
|
||||
@@ -64,10 +76,91 @@
|
||||
</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="attacks ranged-attacks">
|
||||
{{#each system.rangedAttacks as |item key|}}
|
||||
<div class="attack" data-attack-key="{{key}}" >
|
||||
<div class="">
|
||||
<input type="checkbox" name="system.rangedAttacks.{{item.key}}.enabled" {{checked item.enabled}} data-tooltip="Attack enabled/disabled" />
|
||||
</div>
|
||||
<div class="name">
|
||||
<input type="text" name="system.rangedAttacks.{{item.key}}.name" value="{{item.name}}" data-tooltip="Attack name" />
|
||||
</div>
|
||||
<div class="numeric">
|
||||
<input type="number" name="system.rangedAttacks.{{item.key}}.attackScore" value="{{item.attackScore}}" data-tooltip="Progression number" />
|
||||
</div>
|
||||
<div class="numeric">
|
||||
<input type="number" name="system.rangedAttacks.{{item.key}}.attackModifier" value="{{item.attackModifier}}" data-tooltip="Attack modifier" />
|
||||
</div>
|
||||
<div class="numeric">
|
||||
<input type="number" name="system.rangedAttacks.{{item.key}}.defenseModifier" value="{{item.defenseModifier}}" data-tooltip="Defense modifier"/>
|
||||
</div>
|
||||
<div class="damage-dice">
|
||||
<input type="text" name="system.rangedAttacks.{{item.key}}.damageDice" value="{{item.damageDice}}" data-tooltip="Damage dice"/>
|
||||
</div>
|
||||
<div class="numeric">
|
||||
<input type="number" name="system.rangedAttacks.{{item.key}}.damageModifier" value="{{item.damageModifier}}" data-tooltip="Damage modifier"/>
|
||||
</div>
|
||||
<div class="">
|
||||
<input type="checkbox" name="system.rangedAttacks.{{item.key}}.noExplode" {{checked item.noExplode}} data-tooltip="No exploding dice on damage" />
|
||||
</div>
|
||||
|
||||
<div class="attack-icons">
|
||||
|
||||
<a class="rollable" data-roll-type="monster-attack" data-roll-key="{{item.key}}" data-tooltip="Roll Attack">
|
||||
<i class="lf-roll-small fa-solid fa-bow-arrow" data-roll-type="monster-attack" data-roll-key="{{item.key}}"></i>
|
||||
</a>
|
||||
|
||||
<a class="rollable" data-roll-type="monster-defense" data-roll-key="{{item.key}}" data-tooltip="Roll Defense">
|
||||
<i class="fa-solid fa-shield-halved" data-roll-type="monster-defense" data-roll-key="{{item.key}}"></i>
|
||||
</a>
|
||||
|
||||
<a class="rollable" data-roll-type="monster-damage" data-roll-key="{{item.key}}"
|
||||
data-tooltip="Roll Damage">
|
||||
<i class="fa-regular fa-face-head-bandage" data-roll-type="monster-damage"
|
||||
data-roll-key="{{item.key}}"></i>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
{{/each}}
|
||||
|
||||
<div class="ranged-weapon-range">
|
||||
<label>{{localize "LETHALFANTASY.Label.range"}}</label>
|
||||
<div class="range-fields">
|
||||
<div class="range-field">
|
||||
<label>{{localize "LETHALFANTASY.Label.pointBlank"}}</label>
|
||||
<input type="number" name="system.rangedWeaponRange.pointBlank" value="{{system.rangedWeaponRange.pointBlank}}" />
|
||||
</div>
|
||||
<div class="range-field">
|
||||
<label>{{localize "LETHALFANTASY.Label.short"}}</label>
|
||||
<input type="number" name="system.rangedWeaponRange.short" value="{{system.rangedWeaponRange.short}}" />
|
||||
</div>
|
||||
<div class="range-field">
|
||||
<label>{{localize "LETHALFANTASY.Label.medium"}}</label>
|
||||
<input type="number" name="system.rangedWeaponRange.medium" value="{{system.rangedWeaponRange.medium}}" />
|
||||
</div>
|
||||
<div class="range-field">
|
||||
<label>{{localize "LETHALFANTASY.Label.long"}}</label>
|
||||
<input type="number" name="system.rangedWeaponRange.long" value="{{system.rangedWeaponRange.long}}" />
|
||||
</div>
|
||||
<div class="range-field">
|
||||
<label>{{localize "LETHALFANTASY.Label.extreme"}}</label>
|
||||
<input type="number" name="system.rangedWeaponRange.extreme" value="{{system.rangedWeaponRange.extreme}}" />
|
||||
</div>
|
||||
<div class="range-field">
|
||||
<label>{{localize "LETHALFANTASY.Label.outOfSkill"}}</label>
|
||||
<input type="number" name="system.rangedWeaponRange.outOfSkill" value="{{system.rangedWeaponRange.outOfSkill}}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>Hand To Hand Attacks</legend>
|
||||
<legend>{{localize "LETHALFANTASY.Label.handToHandAttacks"}}</legend>
|
||||
<div class="attacks">
|
||||
{{#each system.combatHTH as |item key|}}
|
||||
<div class="attack" data-attack-key="{{key}}" >
|
||||
@@ -92,6 +185,9 @@
|
||||
<div class="numeric">
|
||||
<input type="number" name="system.combatHTH.{{item.key}}.damageModifier" value="{{item.damageModifier}}" data-tooltip="Damage modifier"/>
|
||||
</div>
|
||||
<div class="">
|
||||
<input type="checkbox" name="system.combatHTH.{{item.key}}.noExplode" {{checked item.noExplode}} data-tooltip="No exploding dice on damage" />
|
||||
</div>
|
||||
|
||||
<div class="attack-icons">
|
||||
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
<div class="lethalfantasy-range-defense-dialog">
|
||||
|
||||
<fieldSet class="">
|
||||
<legend>{{localize "LETHALFANTASY.Label.rangeAttackDialog"}}</legend>
|
||||
|
||||
<div class="field-section">
|
||||
<span class="field-name">Attacker Movement :</span>
|
||||
<select name="movement" data-tooltip-direction="UP">
|
||||
{{selectOptions attackerMovementChoices selected=movement}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="field-section">
|
||||
<span class="field-name">Range :</span>
|
||||
<select name="range" data-tooltip-direction="UP">
|
||||
{{selectOptions rangeChoices selected=range}}
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="field-section">
|
||||
<span class="field-name">Target Size :</span>
|
||||
<select name="size" data-tooltip-direction="UP">
|
||||
{{selectOptions sizeChoices selected=size}}
|
||||
</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>
|
||||
<span class="fieldset-centered">
|
||||
<select name="visibility">
|
||||
{{selectOptions rollModes selected=visibility localize=true}}
|
||||
</select>
|
||||
</span>
|
||||
</fieldSet>
|
||||
|
||||
</div>
|
||||
+40
-40
@@ -55,35 +55,33 @@
|
||||
<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 isRangedAttack}}
|
||||
<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}}
|
||||
@@ -91,6 +89,10 @@
|
||||
<div class="dialog-save">Add Granted Defense Dice
|
||||
<input type="checkbox" data-action="selectGranted" name="granted" />
|
||||
</div>
|
||||
<div class="dialog-warning">
|
||||
<i class="fa-solid fa-triangle-exclamation"></i>
|
||||
{{localize "LETHALFANTASY.Warning.defenseShieldOrder"}}
|
||||
</div>
|
||||
{{/if}}
|
||||
{{#if (match rollType "damage")}}
|
||||
<div class="dialog-save">Add Granted Damage Dice
|
||||
@@ -121,17 +123,15 @@
|
||||
</select>
|
||||
|
||||
{{#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}}
|
||||
<div>
|
||||
<span>Save against spell (+{{rollTarget.actorModifiers.saveModifier}})
|
||||
?</span>
|
||||
<input
|
||||
type="checkbox"
|
||||
name="saveSpellCheck"
|
||||
data-action="saveSpellCheck"
|
||||
/>
|
||||
</div>
|
||||
{{/if}}
|
||||
</fieldSet>
|
||||
{{/if}}
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
{{formField systemFields.hascover value=system.hascover}}
|
||||
|
||||
{{#if system.hascover}}
|
||||
<label>Cover vs ranged attacks</label>
|
||||
<label>{{localize "LETHALFANTASY.Label.coverRanged"}}</label>
|
||||
<div class="shift-right">
|
||||
<label>Standing </label>
|
||||
<label>{{localize "LETHALFANTASY.Label.standing"}}</label>
|
||||
<div class="flexrow">{{formField
|
||||
systemFields.standing.fields.min
|
||||
value=system.standing.min
|
||||
@@ -33,7 +33,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="shift-right">
|
||||
<label>Crouching</label>
|
||||
<label>{{localize "LETHALFANTASY.Label.crouching"}}</label>
|
||||
<div class="flexrow">{{formField
|
||||
systemFields.crouching.fields.min
|
||||
value=system.crouching.min
|
||||
|
||||
+6
-1
@@ -6,8 +6,10 @@
|
||||
|
||||
{{formField systemFields.level value=system.level}}
|
||||
{{formField systemFields.cost value=system.cost}}
|
||||
{{formField systemFields.costOverpowered value=system.costOverpowered}}
|
||||
{{formField systemFields.costOverpowered2 value=system.costOverpowered2}}
|
||||
|
||||
<label>Components</label>
|
||||
<label>{{localize "LETHALFANTASY.Label.components"}}</label>
|
||||
<div class="shift-right">
|
||||
{{formField systemFields.components.fields.verbal value=system.components.verbal}}
|
||||
{{formField systemFields.components.fields.somatic value=system.components.somatic}}
|
||||
@@ -30,6 +32,9 @@
|
||||
{{formField systemFields.savingThrow value=system.savingThrow}}
|
||||
{{formField systemFields.extraAetherPoints value=system.extraAetherPoints}}
|
||||
{{formField systemFields.criticalType value=system.criticalType}}
|
||||
{{formField systemFields.damageDice value=system.damageDice}}
|
||||
{{formField systemFields.damageDiceOverpowered value=system.damageDiceOverpowered}}
|
||||
{{formField systemFields.damageDiceOverpowered2 value=system.damageDiceOverpowered2}}
|
||||
|
||||
|
||||
<fieldset>
|
||||
|
||||
@@ -10,18 +10,14 @@
|
||||
{{formField systemFields.weaponType value=system.weaponType localize=true}}
|
||||
{{formField systemFields.weaponClass value=system.weaponClass localize=true}}
|
||||
|
||||
<label>Damage Type</label>
|
||||
<label>{{localize "LETHALFANTASY.Label.damageType"}}</label>
|
||||
<div class="shift-right">
|
||||
{{formField systemFields.damageType.fields.typeP value=system.damageType.typeP}}
|
||||
{{formField systemFields.damageType.fields.typeB value=system.damageType.typeB}}
|
||||
{{formField systemFields.damageType.fields.typeS value=system.damageType.typeS}}
|
||||
</div>
|
||||
|
||||
<label>Damage</label>
|
||||
<div class="shift-right">
|
||||
{{formField systemFields.damage.fields.damageS value=system.damage.damageS}}
|
||||
{{formField systemFields.damage.fields.damageM value=system.damage.damageM}}
|
||||
</div>
|
||||
{{formField systemFields.damage.fields.damageM value=system.damage.damageM label="LETHALFANTASY.Label.damage"}}
|
||||
|
||||
{{formField systemFields.applyStrengthDamageBonus value=system.applyStrengthDamageBonus localize=true}}
|
||||
|
||||
@@ -34,7 +30,7 @@
|
||||
{{/if}}
|
||||
|
||||
{{#if (eq system.weaponType "ranged")}}
|
||||
<label>Speed</label>
|
||||
<label>{{localize "LETHALFANTASY.Label.speed"}}</label>
|
||||
<div class="shift-right">
|
||||
{{formField systemFields.speed.fields.simpleAim value=system.speed.simpleAim}}
|
||||
{{formField systemFields.speed.fields.carefulAim value=system.speed.carefulAim}}
|
||||
@@ -47,7 +43,7 @@
|
||||
|
||||
{{formField systemFields.defense value=system.defense}}
|
||||
|
||||
<label>Range</label>
|
||||
<label>{{localize "LETHALFANTASY.Label.range"}}</label>
|
||||
<div class="shift-right">
|
||||
{{formField systemFields.weaponRange.fields.pointBlank value=system.weaponRange.pointBlank}}
|
||||
{{formField systemFields.weaponRange.fields.short value=system.weaponRange.short}}
|
||||
@@ -60,7 +56,7 @@
|
||||
|
||||
{{formField systemFields.equipped value=system.equipped}}
|
||||
|
||||
<label>Bonuses</label>
|
||||
<label>{{localize "LETHALFANTASY.Label.bonuses"}}</label>
|
||||
<div class="shift-right">
|
||||
{{formField systemFields.bonuses.fields.attackBonus value=system.bonuses.attackBonus}}
|
||||
{{formField systemFields.bonuses.fields.defenseBonus value=system.bonuses.defenseBonus}}
|
||||
|
||||
Reference in New Issue
Block a user