2 Commits

Author SHA1 Message Date
ff180ddd2e PC sheet review + dialog rolls update
All checks were successful
Release Creation / build (release) Successful in 1m3s
2025-05-25 14:35:18 +02:00
585b9a1ab5 Add rolls and new fixes
All checks were successful
Release Creation / build (release) Successful in 1m2s
2025-05-25 00:01:39 +02:00
31 changed files with 636 additions and 420 deletions

View File

@@ -9,7 +9,7 @@
:root {
--font-size-standard: 0.9rem;
--font-size-result: 1.4rem;
--background-image-base: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)), url("../assets/ui/sheet_background_01.webp");
--background-image-base: url("../assets/ui/sheet_background_01.webp");
--font-primary: "MinionProRegular";
--font-secondary: "MinionProRegular";
--font-title: "SupernaturalKnight";
@@ -28,6 +28,11 @@
height: 50px;
margin-left: 15px;
}
.scrollable-content {
max-height: 600px;
overflow-y: auto;
padding-right: 10px;
}
nav.tabs [data-tab] {
color: var(--title-color);
}
@@ -154,7 +159,7 @@ i.fvtt-hellborn {
background-color: var(--color-light-1);
}
.fvtt-hellborn .character-main {
background-color: var(--color-light-1);
/*background-color: var(--color-light-1);*/
display: flex;
}
.fvtt-hellborn .character-main .character-pc {
@@ -208,17 +213,24 @@ i.fvtt-hellborn {
align-items: center;
margin-bottom: 4px;
}
.fvtt-hellborn .character-main .character-pc .character-right .character-definition .splitted {
display: flex;
flex-direction: row;
gap: 4px;
}
.fvtt-hellborn .character-main .character-pc .character-right .character-definition label {
max-width: 4rem;
max-width: 5rem;
min-width: 5rem;
}
.fvtt-hellborn .character-main .character-pc .character-right .character-definition input {
min-width: 16rem;
max-width: 16rem;
text-align: left;
min-width: 9rem;
max-width: 9rem;
margin-bottom: auto;
}
.fvtt-hellborn .character-main .character-pc .character-right .character-definition .trait {
min-width: 13rem;
max-width: 13rem;
min-width: 7rem;
max-width: 7rem;
margin-right: 1rem;
margin-bottom: auto;
}
@@ -240,7 +252,7 @@ i.fvtt-hellborn {
min-width: 500px;
}
.fvtt-hellborn .character-main .character-stats {
background-color: var(--color-light-1);
/*background-color: var(--color-light-1);*/
display: flex;
flex-direction: column;
gap: 5px;
@@ -275,7 +287,7 @@ i.fvtt-hellborn {
min-width: 120px;
}
.fvtt-hellborn .tab.character-status .main-div {
background-color: var(--color-light-1);
/*background-color: var(--color-light-1);*/
display: grid;
grid-template-columns: 1fr;
}
@@ -283,6 +295,18 @@ i.fvtt-hellborn {
font-size: calc(var(--font-size-standard) * 1.4);
padding-left: 5px;
}
.fvtt-hellborn .tab.character-status .main-div .mortality {
display: flex;
align-items: center;
gap: 4px;
margin-left: 4px;
min-width: 12rem;
max-width: 12rem;
}
.fvtt-hellborn .tab.character-status .main-div .mortality label {
min-width: 5rem;
max-width: 5rem;
}
.fvtt-hellborn .tab.character-status .main-div .counters {
display: flex;
direction: column;
@@ -290,6 +314,14 @@ i.fvtt-hellborn {
gap: 4px;
margin-left: 4px;
}
.fvtt-hellborn .tab.character-status .main-div .counters .characteristics-label {
color: grey;
font-size: small;
}
.fvtt-hellborn .tab.character-status .main-div .counters label {
min-width: 4rem;
max-width: 4rem;
}
.fvtt-hellborn .tab.character-status .main-div .counters input {
min-width: 2.5rem;
max-width: 2.5rem;
@@ -348,8 +380,8 @@ i.fvtt-hellborn {
max-width: 5rem;
}
.fvtt-hellborn .tab.character-status .main-div .perks .perk .level {
min-width: 2rem;
max-width: 2rem;
min-width: 4rem;
max-width: 4rem;
}
.fvtt-hellborn .tab.character-status .main-div .perks .perk .name {
min-width: 10rem;
@@ -361,7 +393,7 @@ i.fvtt-hellborn {
margin: 4px 0 0 0;
}
.fvtt-hellborn .tab.character-maleficas .main-div {
background-color: var(--color-light-1);
/*background-color: var(--color-light-1);*/
display: grid;
grid-template-columns: 1fr;
}
@@ -391,12 +423,12 @@ i.fvtt-hellborn {
max-width: 12rem;
}
.fvtt-hellborn .tab.character-maleficas .main-div .maleficas .malefica .domain {
min-width: 6rem;
max-width: 6rem;
min-width: 5rem;
max-width: 5rem;
}
.fvtt-hellborn .tab.character-maleficas .main-div .maleficas .malefica .level {
min-width: 2rem;
max-width: 2rem;
min-width: 3rem;
max-width: 3rem;
}
.fvtt-hellborn .tab.character-maleficas .main-div .maleficas .malefica .item-img {
width: 24px;
@@ -405,7 +437,7 @@ i.fvtt-hellborn {
}
.fvtt-hellborn .tab.character-maleficas .main-div .rituals {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-columns: repeat(1, 1fr);
gap: 4px;
}
.fvtt-hellborn .tab.character-maleficas .main-div .rituals .ritual {
@@ -420,6 +452,10 @@ i.fvtt-hellborn {
min-width: 1.8rem;
max-width: 1.8rem;
}
.fvtt-hellborn .tab.character-maleficas .main-div .rituals .ritual .ingredients {
min-width: 26rem;
max-width: 26rem;
}
.fvtt-hellborn .tab.character-maleficas .main-div .rituals .ritual .name {
min-width: 12rem;
max-width: 12rem;
@@ -442,7 +478,7 @@ i.fvtt-hellborn {
margin: 4px 0 0 0;
}
.fvtt-hellborn .tab.character-equipment .main-div {
background-color: var(--color-light-1);
/*background-color: var(--color-light-1);*/
display: grid;
grid-template-columns: 1fr;
}
@@ -450,6 +486,32 @@ i.fvtt-hellborn {
font-size: calc(var(--font-size-standard) * 1.4);
padding-left: 5px;
}
.fvtt-hellborn .tab.character-equipment .main-div .limboes {
display: flex;
flex-direction: row;
}
.fvtt-hellborn .tab.character-equipment .main-div .limboes .limboes-layout {
display: flex;
flex-direction: column;
}
.fvtt-hellborn .tab.character-equipment .main-div .limboes .limboes-line {
display: flex;
flex-direction: row;
}
.fvtt-hellborn .tab.character-equipment .main-div .limboes .form-group {
display: flex;
flex-direction: row;
align-items: center;
gap: 4px;
margin-left: 4px;
min-width: 14rem;
max-width: 14rem;
}
.fvtt-hellborn .tab.character-equipment .main-div .limboes input {
text-align: left;
min-width: 6rem;
max-width: 6rem;
}
.fvtt-hellborn .tab.character-equipment .main-div .weapons {
display: grid;
grid-template-columns: repeat(1, 1fr);
@@ -473,8 +535,8 @@ i.fvtt-hellborn {
max-width: 1.8rem;
}
.fvtt-hellborn .tab.character-equipment .main-div .weapons .weapon .properties {
min-width: 24rem;
max-width: 24rem;
min-width: 21rem;
max-width: 21rem;
}
.fvtt-hellborn .tab.character-equipment .main-div .weapons .weapon .type {
min-width: 4rem;
@@ -569,7 +631,7 @@ i.fvtt-hellborn {
min-height: 150px;
}
.fvtt-hellborn .tab.character-biography .main-div {
background-color: var(--color-light-1);
/*background-color: var(--color-light-1);*/
display: grid;
grid-template-columns: 1fr;
}
@@ -642,11 +704,8 @@ i.fvtt-hellborn {
min-width: 6rem;
max-width: 6rem;
}
.fvtt-hellborn .tab.character-biography .main-div .biodata input .tarot {
min-width: 8rem;
max-width: 8rem;
}
.fvtt-hellborn .tab.character-biography .main-div .biodata input {
text-align: left;
min-width: 8rem;
max-width: 8rem;
}
@@ -1673,7 +1732,6 @@ i.fvtt-hellborn {
margin-left: 2rem;
}
.fvtt-hellborn .weapon-content .header {
background-color: var(--color-light-1);
display: flex;
}
.fvtt-hellborn .weapon-content .header img {
@@ -1682,7 +1740,6 @@ i.fvtt-hellborn {
}
.fvtt-hellborn .weapon-content fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
.fvtt-hellborn .weapon-content fieldset .form-group {
display: flex;
@@ -1770,7 +1827,6 @@ i.fvtt-hellborn {
}
.fvtt-hellborn .equipment-content fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
.fvtt-hellborn .equipment-content fieldset .form-group {
display: flex;
@@ -1785,7 +1841,6 @@ i.fvtt-hellborn {
max-width: 12rem;
}
.fvtt-hellborn .equipment-content .header {
background-color: var(--color-light-1);
display: flex;
}
.fvtt-hellborn .equipment-content .header img {
@@ -1869,7 +1924,6 @@ i.fvtt-hellborn {
}
.fvtt-hellborn .armor-content fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
.fvtt-hellborn .armor-content fieldset .form-group {
display: flex;
@@ -1952,7 +2006,6 @@ i.fvtt-hellborn {
}
.fvtt-hellborn .deal-content fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
.fvtt-hellborn .deal-content fieldset .form-group {
display: flex;
@@ -1972,7 +2025,6 @@ i.fvtt-hellborn {
max-width: 12rem;
}
.fvtt-hellborn .deal-content .header {
background-color: var(--color-light-1);
display: flex;
}
.fvtt-hellborn .deal-content .header img {
@@ -2048,7 +2100,6 @@ i.fvtt-hellborn {
}
.fvtt-hellborn .tarot-content fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
.fvtt-hellborn .tarot-content fieldset .form-group {
display: flex;
@@ -2068,7 +2119,6 @@ i.fvtt-hellborn {
max-width: 12rem;
}
.fvtt-hellborn .tarot-content .header {
background-color: var(--color-light-1);
display: flex;
}
.fvtt-hellborn .tarot-content .header img {
@@ -2144,7 +2194,6 @@ i.fvtt-hellborn {
}
.fvtt-hellborn .ritual-content fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
.fvtt-hellborn .ritual-content fieldset .form-group {
display: flex;
@@ -2164,7 +2213,6 @@ i.fvtt-hellborn {
max-width: 12rem;
}
.fvtt-hellborn .ritual-content .header {
background-color: var(--color-light-1);
display: flex;
}
.fvtt-hellborn .ritual-content .header img {
@@ -2240,7 +2288,6 @@ i.fvtt-hellborn {
}
.fvtt-hellborn .perk-content fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
.fvtt-hellborn .perk-content fieldset .form-group {
display: flex;
@@ -2260,7 +2307,6 @@ i.fvtt-hellborn {
max-width: 12rem;
}
.fvtt-hellborn .perk-content .header {
background-color: var(--color-light-1);
display: flex;
}
.fvtt-hellborn .perk-content .header img {
@@ -2336,7 +2382,6 @@ i.fvtt-hellborn {
}
.fvtt-hellborn .malefica-content fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
.fvtt-hellborn .malefica-content fieldset .form-group {
display: flex;
@@ -2355,7 +2400,6 @@ i.fvtt-hellborn {
max-width: 12rem;
}
.fvtt-hellborn .malefica-content .header {
background-color: var(--color-light-1);
display: flex;
}
.fvtt-hellborn .malefica-content .header img {
@@ -2431,7 +2475,6 @@ i.fvtt-hellborn {
}
.fvtt-hellborn .species-trait-content fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
}
.fvtt-hellborn .species-trait-content fieldset .form-group {
display: flex;
@@ -2451,7 +2494,6 @@ i.fvtt-hellborn {
max-width: 12rem;
}
.fvtt-hellborn .species-trait-content .header {
background-color: var(--color-light-1);
display: flex;
}
.fvtt-hellborn .species-trait-content .header img {
@@ -2469,22 +2511,23 @@ i.fvtt-hellborn {
font-family: var(--font-secondary);
font-size: calc(var(--font-size-standard) * 1.1);
}
.application.dialog.fvtt-cthulhu-eternal {
.application.dialog.fvtt-hellborn {
color: var(--color-dark-1);
background-color: var(--color-light-1);
}
.application.dialog.fvtt-cthulhu-eternal button {
.application.dialog.fvtt-hellborn button {
background-image: none;
background-color: var(--color-dark-6);
color: var(--color-light-1);
}
.application.dialog.fvtt-cthulhu-eternal input,
.application.dialog.fvtt-cthulhu-eternal select {
.application.dialog.fvtt-hellborn input,
.application.dialog.fvtt-hellborn select {
text-align: left;
background-color: rgba(0, 0, 0, 0.1);
border-color: var(--color-dark-6);
color: var(--color-dark-2);
}
.fvtt-cthulhu-eternal-roll-dialog fieldset {
.fvtt-hellborn-roll-dialog fieldset {
padding: 10px;
background-color: var(--color-light-1);
}
@@ -2562,12 +2605,17 @@ i.fvtt-hellborn {
margin-left: 4rem;
display: none;
}
.dice-roll .intro-chat .intro-right ul .result-unknown {
color: var(--color-dark-2);
font-family: var(--font-title);
font-size: var(--font-size-result);
}
.dice-roll .intro-chat .intro-right ul .result-success {
color: var(--color-success);
font-family: var(--font-title);
font-size: var(--font-size-result);
}
.dice-roll .intro-chat .intro-right ul .result-critical-success {
.dice-roll .intro-chat .intro-right ul .result-satanic-success {
color: var(--color-critical-success);
font-family: var(--font-title);
font-size: var(--font-size-result);
@@ -2577,7 +2625,7 @@ i.fvtt-hellborn {
font-family: var(--font-title);
font-size: var(--font-size-result);
}
.dice-roll .intro-chat .intro-right ul .result-critical-failure {
.dice-roll .intro-chat .intro-right ul .result-fiendish-failure {
color: var(--color-critical-failure);
font-family: var(--font-title);
font-size: var(--font-size-result);

View File

@@ -21,6 +21,18 @@
},
"Character": {
"FIELDS": {
"mortality": {
"label": "Mortality",
"current": {
"label": "Mortality"
}
},
"limboes": {
"label": "Limboes"
},
"ammo": {
"label": "Ammo"
},
"age": {
"label": "Age"
},
@@ -315,6 +327,13 @@
}
},
"Label": {
"titleStat": "Stat Roll Dialog",
"difficulty": "Difficulty",
"unknown": "Unknown",
"statRoll": "Stat Roll",
"stat": "Stat",
"formula": "Formula",
"characteristics": "Characteristics",
"deals": "Deals",
"tarot": "Tarot",
"backstory": "Backstory",
@@ -342,8 +361,11 @@
"combat": "Combat",
"Counters": "Counters",
"creature": "Creature",
"criticalFailure": "Critical Failure",
"criticalSuccess": "Critical Success",
"fiendishSuccess": "Fiendish Failure",
"satanicSuccess": "Satanic Success",
"bonus": "Bonus",
"penalty": "Penalty",
"quote": "Quote",
"current": "Curr.",
"damage": "Damage",
"damages": "Damages",

View File

@@ -32,7 +32,9 @@ export default class HellbornActorSheet extends HandlebarsApplicationMixin(found
editImage: HellbornActorSheet.#onEditImage,
toggleSheet: HellbornActorSheet.#onToggleSheet,
edit: HellbornActorSheet.#onItemEdit,
delete: HellbornActorSheet.#onItemDelete
delete: HellbornActorSheet.#onItemDelete,
updateCheckboxArray: HellbornActorSheet.#onUpdateCheckboxArray,
},
}
@@ -184,6 +186,18 @@ export default class HellbornActorSheet extends HandlebarsApplicationMixin(found
return fp.browse()
}
static #onUpdateCheckboxArray(event, target) {
console.log("Update checkbox array", event, target)
let arrayName = target.dataset.name
let arrayIdx = Number(target.dataset.index)
let dataPath = `system.mortality.${arrayName}`
let tab = foundry.utils.duplicate(this.document.system.mortality[arrayName])
tab[arrayIdx] = target.checked
this.actor.update( { [dataPath]: tab } )
// Dump
console.log("Array name", arrayName, arrayIdx, target.checked, dataPath)
}
/**
* Edit an existing item within the Actor
* Start with the uuid, if it's not found, fallback to the id (as Embedded item in the actor)

View File

@@ -73,6 +73,8 @@ export default class HellbornCharacterSheet extends HellbornActorSheet {
const doc = this.document
context.trait = doc.itemTypes['species-trait']?.[0]
context.upright = doc.itemTypes.tarot.find(t => t.system.orientation === "Upright")
context.downright = doc.itemTypes.tarot.find(t => t.system.orientation === "Downright")
return context
}
@@ -108,8 +110,6 @@ export default class HellbornCharacterSheet extends HellbornActorSheet {
case "biography":
context.tab = context.tabs.biography
context.deals = doc.itemTypes.deal
context.deals.sort((a, b) => a.name.localeCompare(b.name))
context.tarot = doc.itemTypes.tarot?.[0]
context.enrichedBackstory = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.backstory, { async: true })
context.enrichedAppearance = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.appearance, { async: true })
context.enrichedScars = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.scars, { async: true })
@@ -199,7 +199,7 @@ export default class HellbornCharacterSheet extends HellbornActorSheet {
const item = await fromUuid(data.uuid)
if (item.type === "tarot") {
// Delete the existing tarot item
const existingTarot = this.document.items.find(i => i.type === "tarot")
const existingTarot = this.document.items.find(i => i.type === "tarot" && i.system.orientation === item.system.orientation)
if (existingTarot) {
await existingTarot.delete()
// Display info message

View File

@@ -6,7 +6,7 @@ export default class HellbornTarotSheet extends HellbornItemSheet {
classes: ["tarot"],
position: {
width: 800,
height: 640
height: 800
},
window: {
contentClasses: ["tarot-content"],
@@ -23,8 +23,9 @@ export default class HellbornTarotSheet extends HellbornItemSheet {
/** @override */
async _prepareContext() {
const context = await super._prepareContext()
context.enrichedPositiveEffect = await TextEditor.enrichHTML(this.document.system.positiveEffect, { async: true })
context.enrichedNegativeEffect = await TextEditor.enrichHTML(this.document.system.negativeEffect, { async: true })
context.enrichedDescription = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.description, { async: true })
context.enrichedPositiveEffect = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.positiveEffect, { async: true })
context.enrichedNegativeEffect = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.negativeEffect, { async: true })
return context
}
}

View File

@@ -31,6 +31,25 @@ export const STATS = {
"soul": { id: "soul", label: "Soul" }
}
export const DIFFICULTY_CHOICES = {
"unknown": { id: "unknown", label: "Unknown", value: "0" },
"trivial": { id: "trivial", label: "Trivial", value: "7" },
"easy": { id: "easy", label: "Easy", value: "9" },
"normal": { id: "normal", label: "Normal", value: "11" },
"hard": { id: "hard", label: "Hard", value: "15" },
"very-hard": { id: "very-hard", label: "Very Hard", value: "18" },
"impossible": { id: "impossible", label: "Impossible", value: "20" }
}
export const CHOICE_ADVANTAGES_DISADVANTAGES ={
"0": { id: "0", label: "None", value: "0" },
"1": { id: "1", label: "One", value: "1" },
"2": { id: "2", label: "Two", value: "2" },
"3": { id: "3", label: "Three", value: "3" },
"4": { id: "4", label: "Four", value: "4" },
"5": { id: "5", label: "Five", value: "5" },
}
export const PERK_ROLES = {
"abbetor": { id: "abbetor", label: "Abbetor" },
"blade": { id: "blade", label: "Blade" },
@@ -71,33 +90,13 @@ export const WEAPON_TYPES = {
"ranged": { id: "ranged", label: "Ranged" },
}
export const RANGED_SUBTYPES = {
"pistols": { id: "pistols", label: "Pistols" },
"rifles": { id: "rifles", label: "Rifles" },
"shotguns": { id: "shotguns", label: "Shotguns" },
"submachineguns": { id: "submachineguns ", label: "Sub machine guns" },
"grenades": { id: "grenades", label: "Grenades" },
"heavy": { id: "heavy", label: "Heavy Weapons" },
}
export const ATTACK_MODIFIERS = {
"two-attacks": -1,
"aiming": 1,
"dim": -1,
"darkness": -2,
"prone": -1,
"cover": -2,
"recoil-first": -1,
"recoil-third": -2,
"aware": -1
}
export const MODIFIER_CHOICES = {
"easy": { id: "easy", label: "HELLBORN.Label.Easy", value :"1" },
"moderate": { id: "moderate", label: "HELLBORN.Label.Moderate", value: "0" },
"difficult": { id: "difficult", label: "HELLBORN.Label.Difficult", value: "-1" },
"formidable": { id: "formidable", label: "HELLBORN.Label.Formidable", value: "-2" },
"impossible": { id: "impossible", label: "HELLBORN.Label.Impossible", value: "-4" }
export const AMMO_TYPES = {
"blessed": { id: "blessed", label: "Blessed" },
"hollow-points": { id: "hollow-points", label: "Hollow Points" },
"incendiary": { id: "incendiary", label: "Incendiary" },
"poisoned": { id: "poisoned", label: "Poisoned" },
"rubber": { id: "rubber", label: "Rubber" },
"tesla": { id: "tesla", label: "Tesla" },
}
/**
@@ -112,9 +111,9 @@ export const SYSTEM = {
PERK_LEVELS,
MALEFICA_LEVELS,
MALEFICA_DOMAINS,
MODIFIER_CHOICES,
ATTACK_MODIFIERS,
WEAPON_TYPES,
RANGED_SUBTYPES,
AMMO_TYPES,
DIFFICULTY_CHOICES,
CHOICE_ADVANTAGES_DISADVANTAGES,
ASCII
}

View File

@@ -62,11 +62,7 @@ export default class HellbornRoll extends Roll {
static updateFullFormula(options) {
let fullFormula
if ( options.numericModifier >= 0) {
fullFormula = `${options.formula} + ${options.rollItem.value} + ${options.numericModifier}D`
} else {
fullFormula = `${options.formula} + ${options.rollItem.value} - ${Math.abs(options.numericModifier)}D`
}
fullFormula = `3D6 + ${options.nbAdvantages}D6kh - ${options.nbDisadvantages}D6kh + ${options.rollItem.value}`
$('#roll-dialog-full-formula').text(fullFormula)
options.fullFormula = fullFormula
}
@@ -86,81 +82,67 @@ export default class HellbornRoll extends Roll {
* @returns {Promise<Object|null>} The roll result or null if the dialog was cancelled.
*/
static async prompt(options = {}) {
let formula = "2d6"
let formula = `3D6 + 0D6KH - 0D6KH + ${options?.rollItem?.value}`
switch (options.rollType) {
case "skill":
case "stat":
break
case "damage":
let formula = options.rollItem.system.damage
let damageRoll = new Roll(formula)
await damageRoll.evaluate()
await damageRoll.toMessage({
flavor: `${options.rollItem.name} - Damage Roll`
});
return
{
let formula = options.rollItem.system.damage
let damageRoll = new Roll(formula)
await damageRoll.evaluate()
await damageRoll.toMessage({
flavor: `${options.rollItem.name} - Damage Roll`
});
return
}
case "weapon":
let actor = game.actors.get(options.actorId)
options.weapon = foundry.utils.duplicate(options.rollItem)
options.rollItem = actor.system.skills.combat
{
let actor = game.actors.get(options.actorId)
options.weapon = foundry.utils.duplicate(options.rollItem)
let statKey = "skin"
if (options.weapon.system.weaponType === "melee") {
if ( options.weapon.system.properties.toLowerCase().match("heavy") || options.weapon.system.properties.toLowerCase().match("oversized")) {
statKey = "flesh"
}
}
options.rollItem = actor.system.stats[statKey]
}
break
default:
break
}
const rollModes = Object.fromEntries(Object.entries(CONFIG.Dice.rollModes).map(([key, value]) => [key, game.i18n.localize(value)]))
const rollModes = foundry.utils.duplicate(CONFIG.Dice.rollModes)
const fieldRollMode = new foundry.data.fields.StringField({
choices: rollModes,
blank: false,
default: "public",
})
const choiceModifier = SYSTEM.MODIFIER_CHOICES
let choiceRangeModifier = {}
let rangeModifier = 0
if ( options.weapon) {
// Build the range modifiers
let range = SYSTEM.WEAPON_RANGE[options.weapon.system.rangeType]
for (let [key, value] of Object.entries(range.range)) {
choiceRangeModifier[key] = { label: `${key} (${value}D)`, value: value }
if (!rangeModifier && value) {
rangeModifier = value
}
}
}
let modifier = "0"
options.numericModifier = rangeModifier
let fullFormula = `${formula} + ${options.rollItem.value}`
if (options.isEncumbered) {
options.numericModifier += -1
fullFormula += ` - ${options.numericModifier}D`
} else {
options.numericModifier += 0
fullFormula += ` + ${options.numericModifier}D`
}
options.fullFormula = fullFormula
options.formula = formula
options.nbAdvantages = "0"
options.nbDisadvantages = "0"
let dialogContext = {
actorId: options.actorId,
actorName: options.actorName,
rollType: options.rollType,
rollItem: foundry.utils.duplicate(options.rollItem), // Object only, no class
fullFormula,
weapon: options?.weapon,
isEncumbered: options.isEncumbered,
talents: options.talents,
formula: formula,
fullFormula: formula,
rollModes,
fieldRollMode,
choiceModifier,
choiceRangeModifier,
rangeModifier,
formula,
choiceAdvantages: SYSTEM.CHOICE_ADVANTAGES_DISADVANTAGES,
choiceDisadvantages: SYSTEM.CHOICE_ADVANTAGES_DISADVANTAGES,
hasTarget: options.hasTarget,
modifier,
difficulty: "0",
nbAdvantages: "0",
nbDisadvantages: "0",
}
const content = await renderTemplate("systems/fvtt-hellborn/templates/roll-dialog.hbs", dialogContext)
const content = await foundry.applications.handlebars.renderTemplate("systems/fvtt-hellborn/templates/roll-dialog.hbs", dialogContext)
const title = HellbornRoll.createTitle(options.rollType, options.rollTarget)
const label = game.i18n.localize("HELLBORN.Roll.roll")
@@ -184,19 +166,19 @@ export default class HellbornRoll extends Roll {
},
rejectClose: false, // Click on Close button will not launch an error
render: (event, dialog) => {
$(".roll-skill-modifier").change(event => {
options.numericModifier += Number(event.target.value)
$(".roll-stat-advantages").change(event => {
options.nbAdvantages = Number(event.target.value)
HellbornRoll.updateFullFormula(options)
})
$(".roll-skill-range-modifier").change(event => {
options.numericModifier += Number(event.target.value)
$(".roll-stat-disadvantages").change(event => {
options.nbDisadvantages = Number(event.target.value)
HellbornRoll.updateFullFormula(options)
})
$(".select-combat-option").change(event => {
console.log(event)
let field = $(event.target).data("field")
let modifier = SYSTEM.ATTACK_MODIFIERS[field]
if ( event.target.checked) {
if (event.target.checked) {
options.numericModifier += modifier
} else {
options.numericModifier -= modifier
@@ -211,42 +193,55 @@ export default class HellbornRoll extends Roll {
let rollData = foundry.utils.mergeObject(foundry.utils.duplicate(options), rollContext)
rollData.rollMode = rollContext.visibility
// Update target score
rollData.targetScore = 8
if (Hooks.call("fvtt-hellborn.preRoll", options, rollData) === false) return
let diceFormula = `${2+Math.abs(options.numericModifier)}D6`
if ( options.numericModifier > 0 ) {
diceFormula += `kh2 + ${options.rollItem.value}`
} else {
diceFormula += `kl2 + ${options.rollItem.value}`
}
options.nbAdvantages = Number(options.nbAdvantages)
options.nbDisadvantages = Number(options.nbDisadvantages)
let diceFormula = `3D6 + ${options.nbAdvantages}D6kh - ${options.nbDisadvantages}D6kh + ${options.rollItem.value}`
const roll = new this(diceFormula, options.data, rollData)
await roll.evaluate()
console.log("Roll", rollData, roll)
options.difficulty = (rollData.difficulty === "unknown") ? 0 : (Number(rollData.difficulty) || 0)
roll.displayRollResult(roll, options, rollData)
roll.displayRollResult(roll, options, rollData, roll)
if (Hooks.call("fvtt-hellborn.Roll", options, rollData, roll) === false) return
return roll
}
displayRollResult(formula, options, rollData) {
// Compute the result quality
displayRollResult(formula, options, rollData, roll) {
let resultType = "failure"
if (this.total >= 8) {
if (options.difficulty === 0) {
resultType = "unknown"
} else if (this.total >= options.difficulty) {
resultType = "success"
// Detect if decimal == unit in the dire total result
}
// Compute the result quality
this.options.satanicSuccess = false
this.options.fiendishFailure = false
this.options.rollData = foundry.utils.duplicate(rollData)
if (resultType === "success") {
let nb6 = roll.terms[0].results.filter(r => r.result === 6).length
nb6 += roll.terms[3].total === 6 ? 1 : 0
this.options.satanicSuccess = nb6 >= 3
if (this.options.satanicSuccess) {
resultType = "success"
}
}
if (resultType === "failure") {
let nb1 = roll.terms[0].results.filter(r => r.result === 1).length
nb1 += roll.terms[5].total === 1 ? 1 : 0
this.options.fiendishFailure = nb1 >= 3
if (this.options.fiendishFailure) {
resultType = "failure"
}
}
this.options.resultType = resultType
this.options.isSuccess = resultType === "success"
this.options.isFailure = resultType === "failure"
this.options.isEncumbered = rollData.isEncumbered
this.options.rollData = foundry.utils.duplicate(rollData)
}
/**
@@ -258,8 +253,8 @@ export default class HellbornRoll extends Roll {
*/
static createTitle(type, target) {
switch (type) {
case "skill":
return `${game.i18n.localize("HELLBORN.Label.titleSkill")}`
case "stat":
return `${game.i18n.localize("HELLBORN.Label.titleStat")}`
case "weapon":
return `${game.i18n.localize("HELLBORN.Label.titleWeapon")}`
default:
@@ -270,7 +265,7 @@ export default class HellbornRoll extends Roll {
/** @override */
async render(chatOptions = {}) {
let chatData = await this._getChatCardData(chatOptions.isPrivate)
return await renderTemplate(this.constructor.CHAT_TEMPLATE, chatData)
return await foundry.applications.handlebars.renderTemplate(this.constructor.CHAT_TEMPLATE, chatData)
}
/**
@@ -317,7 +312,6 @@ export default class HellbornRoll extends Roll {
cardData.realDamage = this.realDamage
cardData.isPrivate = isPrivate
cardData.weapon = this.weapon
cardData.isEncumbered = this.isEncumbered
cardData.cssClass = cardData.css.join(" ")
cardData.tooltip = isPrivate ? "" : await this.getTooltip()

View File

@@ -56,9 +56,22 @@ export default class HellbornActor extends foundry.abstract.TypeDataModel {
schema.species = new fields.StringField({ required: true, nullable: false, initial: "" })
schema.trait = new fields.StringField({ required: true, nullable: false, initial: "" })
schema.limboes = new fields.StringField({ required: true, nullable: false, initial: "" })
schema.ammo = new fields.StringField({ required: true, nullable: false, initial: "" })
schema.ammoList = new fields.SchemaField(
Object.values(SYSTEM.AMMO_TYPES).reduce((obj, stat) => {
obj[stat.id] = new fields.StringField({ required: true, nullable: false, initial: "" })
return obj
}, {}),
)
schema.mortality = new fields.SchemaField({
current: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }),
max: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }),
/* Enabled: Array of 5 boolean field */
enabled: new fields.ArrayField(new fields.BooleanField(),
{ required: true, initial: [false, false, false, false, false], min:5, max:5 }),
current: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
max: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
})
schema.trauma = new fields.SchemaField({
@@ -134,7 +147,6 @@ export default class HellbornActor extends foundry.abstract.TypeDataModel {
actorId: this.parent.id,
actorName: this.parent.name,
actorImage: this.parent.img,
talents: this.parent.items.filter(i => i.type === "talent" && i.system.isAdvantage),
hasTarget,
target: opponentTarget
})

View File

@@ -5,7 +5,12 @@ export default class HellbornTarot extends foundry.abstract.TypeDataModel {
const fields = foundry.data.fields;
const schema = {};
schema.orientation = new fields.StringField({ required: true, initial: "Upright", choices: {"Upright": {label: "Upright"}, "Reversed": {label: "Reversed"}} });
schema.quote = new fields.StringField({ required: true, nullable: false, initial: "" });
schema.bonus = new fields.StringField({ required: true, nullable: false, initial: "" });
schema.penalty = new fields.StringField({ required: true, nullable: false, initial: "" });
schema.orientation = new fields.StringField({ required: true, initial: "Upright", choices: {"Upright": {label: "Upright"}, "Downright": {label: "Downright"}} });
schema.description = new fields.HTMLField({ required: true, textSearch: true })
schema.positiveEffect = new fields.HTMLField({ required: true, textSearch: true })
schema.negativeEffect = new fields.HTMLField({ required: true, textSearch: true })
schema.image = new fields.FilePathField({

View File

@@ -168,7 +168,22 @@ export default class HellbornUtils {
Handlebars.registerHelper('isCreature', function (key) {
return key === "creature" || key === "daemon";
})
Handlebars.registerHelper('getRomanLevel', function (level) {
if (level=== "highpowers") return "High";
if (level === "mastery") return "Mastery";
level = parseInt(level);
if (level === 0) return "I";
if (level === 1) return "II";
if (level === 2) return "III";
if (level === 3) return "IV";
if (level === 4) return "V";
if (level === 5) return "VI";
if (level === 6) return "VII";
if (level === 7) return "VIII";
if (level === 8) return "IX";
if (level === 9) return "X";
return level;
})
// Handle v12 removal of this helper
Handlebars.registerHelper('select', function (selected, options) {
const escapedValue = RegExp.escape(Handlebars.escapeExpression(selected));
@@ -178,21 +193,4 @@ export default class HellbornUtils {
});
}
static setupCSSRootVariables() {
const era = game.settings.get("fvtt-cthulhu-eternal", "settings-era")
let eraCSS = SYSTEM.ERA_CSS[era];
if (!eraCSS) eraCSS = SYSTEM.ERA_CSS["jazz"];
document.documentElement.style.setProperty('--font-size-standard', eraCSS.baseFontSize);
document.documentElement.style.setProperty('--font-size-title', eraCSS.titleFontSize);
document.documentElement.style.setProperty('--font-size-result', eraCSS.titleFontSize);
document.documentElement.style.setProperty('--font-primary', eraCSS.primaryFont);
document.documentElement.style.setProperty('--font-secondary', eraCSS.secondaryFont);
document.documentElement.style.setProperty('--font-title', eraCSS.titleFont);
document.documentElement.style.setProperty('--img-icon-color-filter', eraCSS.imgFilter);
document.documentElement.style.setProperty('--background-image-base', `linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)), url("../assets/ui/${era}_background_main.webp")`);
}
}

View File

@@ -13,7 +13,6 @@
fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
.form-group {
display: flex;
align-items: center;

View File

@@ -9,7 +9,7 @@
}
.character-main {
background-color: var(--color-light-1);
/*background-color: var(--color-light-1);*/
display: flex;
.character-pc {
@@ -70,17 +70,24 @@
align-items: center;
margin-bottom: 4px;
}
.splitted {
display: flex;
flex-direction: row;
gap: 4px;
}
label {
max-width: 4rem;
max-width: 5rem;
min-width: 5rem;
}
input {
min-width: 16rem;
max-width: 16rem;
text-align: left;
min-width: 9rem;
max-width: 9rem;
margin-bottom: auto;
}
.trait{
min-width: 13rem;
max-width: 13rem;
.trait {
min-width: 7rem;
max-width: 7rem;
margin-right: 1rem;
margin-bottom: auto;
}
@@ -108,7 +115,7 @@
}
.character-stats {
background-color: var(--color-light-1);
/*background-color: var(--color-light-1);*/
display: flex;
flex-direction: column;
gap: 5px;
@@ -139,7 +146,7 @@
}
.character-stats-play {
min-width:120px;
min-width: 120px;
}
.character-stats-edit {
@@ -148,7 +155,7 @@
}
.tab.character-status .main-div {
background-color: var(--color-light-1);
/*background-color: var(--color-light-1);*/
display: grid;
grid-template-columns: 1fr;
legend {
@@ -157,12 +164,33 @@
padding-left: 5px;
}
}
.mortality {
display: flex;
align-items: center;
gap: 4px;
margin-left: 4px;
min-width: 12rem;
max-width: 12rem;
label {
min-width: 5rem;
max-width: 5rem;
}
}
.counters {
display: flex;
direction: column;
align-items: center;
gap: 4px;
margin-left: 4px;
.characteristics-label{
color: grey;
font-size:small;
}
label {
min-width: 4rem;
max-width: 4rem;
}
input {
min-width: 2.5rem;
max-width: 2.5rem;
@@ -220,8 +248,8 @@
max-width: 5rem;
}
.level {
min-width: 2rem;
max-width: 2rem;
min-width: 4rem;
max-width: 4rem;
}
.name {
min-width: 10rem;
@@ -237,7 +265,7 @@
}
.tab.character-maleficas .main-div {
background-color: var(--color-light-1);
/*background-color: var(--color-light-1);*/
display: grid;
grid-template-columns: 1fr;
legend {
@@ -267,12 +295,12 @@
max-width: 12rem;
}
.domain {
min-width: 6rem;
max-width: 6rem;
min-width: 5rem;
max-width: 5rem;
}
.level {
min-width: 2rem;
max-width: 2rem;
min-width: 3rem;
max-width: 3rem;
}
.item-img {
width: 24px;
@@ -284,7 +312,7 @@
.rituals {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-columns: repeat(1, 1fr);
gap: 4px;
.ritual {
display: flex;
@@ -297,6 +325,10 @@
min-width: 1.8rem;
max-width: 1.8rem;
}
.ingredients {
min-width: 26rem;
max-width: 26rem;
}
.name {
min-width: 12rem;
max-width: 12rem;
@@ -320,12 +352,10 @@
}
}
}
}
.tab.character-equipment .main-div {
background-color: var(--color-light-1);
/*background-color: var(--color-light-1);*/
display: grid;
grid-template-columns: 1fr;
legend {
@@ -335,6 +365,33 @@
}
}
.limboes {
display: flex;
flex-direction: row;
.limboes-layout {
display: flex;
flex-direction: column;
}
.limboes-line {
display: flex;
flex-direction: row;
}
.form-group {
display: flex;
flex-direction: row;
align-items: center;
gap: 4px;
margin-left: 4px;
min-width: 14rem;
max-width: 14rem;
}
input {
text-align: left;
min-width: 6rem;
max-width: 6rem;
}
}
.weapons {
display: grid;
grid-template-columns: repeat(1, 1fr);
@@ -356,8 +413,8 @@
max-width: 1.8rem;
}
.properties {
min-width: 24rem;
max-width: 24rem;
min-width: 21rem;
max-width: 21rem;
}
.type {
min-width: 4rem;
@@ -459,7 +516,7 @@
}
.tab.character-biography .main-div {
background-color: var(--color-light-1);
/*background-color: var(--color-light-1);*/
display: grid;
grid-template-columns: 1fr;
legend {
@@ -469,7 +526,7 @@
}
}
.splitted-text {
display:flex;
display: flex;
flex-direction: row;
gap: 4px;
fieldset {
@@ -532,11 +589,8 @@
min-width: 14rem;
max-width: 14rem;
}
input .tarot {
min-width: 8rem;
max-width: 8rem;
}
input {
text-align: left;
min-width: 8rem;
max-width: 8rem;
}

View File

@@ -4,7 +4,6 @@
fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
.form-group {
display: flex;
align-items: center;
@@ -25,7 +24,6 @@
}
.header {
background-color: var(--color-light-1);
display: flex;
img {
width: 50px;

View File

@@ -4,7 +4,6 @@
fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
.form-group {
display: flex;
align-items: center;
@@ -22,7 +21,6 @@
}
.header {
background-color: var(--color-light-1);
display: flex;
img {
width: 50px;

View File

@@ -1,8 +1,7 @@
:root {
--font-size-standard: 0.9rem;
--font-size-result: 1.4rem;
--background-image-base: linear-gradient(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.8)),
url("../assets/ui/sheet_background_01.webp");
--background-image-base: url("../assets/ui/sheet_background_01.webp");
--font-primary: "MinionProRegular";
--font-secondary: "MinionProRegular";
--font-title: "SupernaturalKnight";
@@ -24,6 +23,12 @@
margin-left: 15px;
}
.scrollable-content {
max-height: 600px; // Définissez la hauteur maximale selon vos besoins
overflow-y: auto; // Active le défilement vertical quand nécessaire
padding-right: 10px; // Espace pour la barre de défilement
}
nav.tabs [data-tab] {
color: var(--title-color);
}

View File

@@ -4,7 +4,6 @@
fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
.form-group {
display: flex;
align-items: center;
@@ -26,7 +25,6 @@
}
.header {
background-color: var(--color-light-1);
display: flex;
img {
width: 50px;

View File

@@ -4,7 +4,6 @@
fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
.form-group {
display: flex;
align-items: center;
@@ -27,7 +26,6 @@
}
.header {
background-color: var(--color-light-1);
display: flex;
img {
width: 50px;

View File

@@ -4,7 +4,6 @@
fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
.form-group {
display: flex;
align-items: center;
@@ -25,7 +24,6 @@
}
.header {
background-color: var(--color-light-1);
display: flex;
img {
width: 50px;

View File

@@ -1,4 +1,4 @@
.application.dialog.fvtt-cthulhu-eternal {
.application.dialog.fvtt-hellborn {
color: var(--color-dark-1);
background-color: var(--color-light-1);
@@ -10,13 +10,14 @@
input,
select {
text-align: left;
background-color: rgba(0, 0, 0, 0.1);
border-color: var(--color-dark-6);
color: var(--color-dark-2);
}
}
.fvtt-cthulhu-eternal-roll-dialog {
.fvtt-hellborn-roll-dialog {
fieldset {
padding: 10px;
background-color: var(--color-light-1);
@@ -98,12 +99,17 @@
margin-left: 4rem;
display: none;
}
.result-unknown {
color: var(--color-dark-2);
font-family: var(--font-title);
font-size: var(--font-size-result);
}
.result-success {
color: var(--color-success);
font-family: var(--font-title);
font-size: var(--font-size-result);
}
.result-critical-success {
.result-satanic-success {
color: var(--color-critical-success);
font-family: var(--font-title);
font-size: var(--font-size-result);
@@ -113,7 +119,7 @@
font-family: var(--font-title);
font-size: var(--font-size-result);
}
.result-critical-failure {
.result-fiendish-failure {
color: var(--color-critical-failure);
font-family: var(--font-title);
font-size: var(--font-size-result);

View File

@@ -4,7 +4,6 @@
fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
.form-group {
display: flex;
align-items: center;
@@ -25,7 +24,6 @@
}
.header {
background-color: var(--color-light-1);
display: flex;
img {
width: 50px;

View File

@@ -4,7 +4,6 @@
fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
.form-group {
display: flex;
align-items: center;
@@ -25,7 +24,6 @@
}
.header {
background-color: var(--color-light-1);
display: flex;
img {
width: 50px;

View File

@@ -3,7 +3,6 @@
.item-sheet-common();
.header {
background-color: var(--color-light-1);
display: flex;
img {
width: 50px;
@@ -13,7 +12,6 @@
fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
.form-group {
display: flex;
align-items: center;

View File

@@ -45,7 +45,7 @@
"malefica": { "htmlFields": ["description"] },
"species-trait": { "htmlFields": ["description"] },
"ritual": { "htmlFields": ["description"] },
"tarot": { "htmlFields": ["description"] },
"tarot": { "htmlFields": ["description", "positiveEffect", "negativeEFfect"] },
"deal": { "htmlFields": ["description"] }
}
},

View File

@@ -41,18 +41,7 @@
{{formField systemFields.biodata.fields.birthplace value=system.biodata.birthplace rootId=partId
disabled=isPlayMode}}
</div>
<div class="experience">
<div class="form-group">
<label>{{localize "HELLBORN.Label.tarot"}}</label>
<input class="tarot" type="text" value="{{tarot.name}}" disabled >
<div class="controls">
<a data-tooltip="{{localize 'HELLBORN.Edit'}}" data-action="edit" data-item-id="{{tarot.id}}"
data-item-uuid="{{tarot.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'HELLBORN.Delete'}}" data-action="delete" data-item-id="{{tarot.id}}"
data-item-uuid="{{tarot.uuid}}"><i class="fas fa-trash"></i></a>
</div>
</div>
</div>
</fieldset>
<fieldset>

View File

@@ -1,88 +1,107 @@
<section class="tab character-{{tab.id}} {{tab.cssClass}}" data-tab="{{tab.id}}" data-group="{{tab.group}}">
<div class="main-div">
<fieldset>
<legend>{{localize "HELLBORN.Label.weapons"}}{{#if isEditMode}}
<a class="action" data-tooltip="{{localize "HELLBORN.Tooltip.addWeapon"}}" data-tooltip-direction="UP"><i
class="fas fa-plus" data-action="createWeapon"></i></a>{{/if}}
</legend>
<div class="weapons">
{{#each weapons as |item|}}
<div class="weapon item" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-drag="true">
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
<i class="fa-regular fa-dice"></i>
<div class="name rollable" data-roll-type="weapon" data-tooltip="{{{item.system.description}}}">
{{item.name}}
</div>
<span class="type" data-tooltip="Type">{{upperFirst item.system.weaponType}}</span>
<span class="properties" data-tooltip="Properties">{{upperFirst item.system.properties}}</span>
<fieldset>
<legend>{{localize "HELLBORN.Label.weapons"}}{{#if isEditMode}}
<a class="action" data-tooltip="{{localize " HELLBORN.Tooltip.addWeapon"}}" data-tooltip-direction="UP"><i
class="fas fa-plus" data-action="createWeapon"></i></a>{{/if}}
</legend>
<div class="weapons">
{{#each weapons as |item|}}
<div class="weapon item" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-drag="true">
<a class="damage rollable" data-tooltip="Damage" data-item-id="{{item.id}}" data-action="roll" data-roll-type="damage"
data-roll-value="{{item.system.damage}}">
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
<i class="fa-regular fa-dice"></i>
{{localize "HELLBORN.Label.damageShort"}} :
{{item.system.damage}}</a>
<div class="name rollable" data-roll-type="weapon" data-tooltip="{{{item.system.description}}}">
{{item.name}}
</div>
<span class="type" data-tooltip="Type">{{upperFirst item.system.weaponType}}</span>
<span class="properties" data-tooltip="Properties">{{upperFirst item.system.properties}}</span>
<div class="controls">
<a data-tooltip="{{localize 'HELLBORN.Edit'}}" data-action="edit" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'HELLBORN.Delete'}}" data-action="delete" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
<a class="damage rollable" data-tooltip="Damage" data-item-id="{{item.id}}" data-action="roll"
data-roll-type="damage" data-roll-value="{{item.system.damage}}">
<i class="fa-regular fa-dice"></i>
{{item.system.damage}}</a>
<div class="controls">
<a data-tooltip="{{localize 'HELLBORN.Edit'}}" data-action="edit" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'HELLBORN.Delete'}}" data-action="delete" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
</fieldset>
<fieldset>
<legend>{{localize "HELLBORN.Label.armors"}}{{#if isEditMode}}
<a class="action" data-tooltip="{{localize " HELLBORN.Tooltip.addArmor"}}" data-tooltip-direction="UP"><i
class="fas fa-plus" data-action="createArmor"></i></a>{{/if}}
</legend>
<div class="armors">
{{#each armors as |item|}}
<div class="armor item" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}">
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
<div class="name" data-tooltip="{{{item.system.description}}}">
{{item.name}}
</div>
<span class="bonus" data-tooltip="Bonus">{{item.system.bonus}}</span>
<span class="resilience" data-tooltip="Resilience">{{item.system.resilience}}</span>
<span class="reduction" data-tooltip="Reduction">{{item.system.reduction}}</span>
<div class="controls">
<a data-tooltip="{{localize 'HELLBORN.Edit'}}" data-action="edit" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'HELLBORN.Delete'}}" data-action="delete" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
</fieldset>
<fieldset>
<legend>{{localize "HELLBORN.Label.equipments"}}{{#if isEditMode}}
<a class="action" data-tooltip="{{localize " HELLBORN.Tooltip.addEquipment"}}" data-tooltip-direction="UP"><i
class="fas fa-plus" data-action="createEquipment"></i></a>{{/if}}
</legend>
<div class="equipments">
{{#each equipments as |item|}}
{{!log 'armor' this}}
<div class="equipment" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}">
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
<div class="name" data-tooltip="{{{item.system.description}}}">
{{item.name}}
</div>
<div class="controls">
<a data-tooltip="{{localize 'HELLBORN.Edit'}}" data-action="edit" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'HELLBORN.Delete'}}" data-action="delete" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
</fieldset>
<fieldset class="limboes">
<legend>Limboes and Ammo</legend>
<div class="limboes-layout">
<div class="limboes-line">
{{formField systemFields.limboes value=system.limboes rootId=partId disabled=isPlayMode}}
{{formField systemFields.ammo value=system.ammo rootId=partId disabled=isPlayMode}}
</div>
<div class="limboes-line">
{{#each system.ammoList as |ammo key|}}
<div class="ammo-item">
<span class="ammo-name">{{upperFirst key}}</span>
<input type="number" class="ammo-quantity" value="{{ammo}}" min="0" name="system.ammoList.{{key}}" />
</div>
{{/each}}
</div>
</div>
{{/each}}
</div>
</fieldset>
</fieldset>
<fieldset>
<legend>{{localize "HELLBORN.Label.armors"}}{{#if isEditMode}}
<a class="action" data-tooltip="{{localize "HELLBORN.Tooltip.addArmor"}}" data-tooltip-direction="UP"><i
class="fas fa-plus" data-action="createArmor"></i></a>{{/if}}
</legend>
<div class="armors">
{{#each armors as |item|}}
<div class="armor item" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}">
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
<div class="name" data-tooltip="{{{item.system.description}}}">
{{item.name}}
</div>
<span class="bonus" data-tooltip="Bonus">{{item.system.bonus}}</span>
<span class="resilience" data-tooltip="Resilience">{{item.system.resilience}}</span>
<span class="reduction" data-tooltip="Reduction">{{item.system.reduction}}</span>
<div class="controls">
<a data-tooltip="{{localize 'HELLBORN.Edit'}}" data-action="edit" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'HELLBORN.Delete'}}" data-action="delete" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
</fieldset>
<fieldset>
<legend>{{localize "HELLBORN.Label.equipments"}}{{#if isEditMode}}
<a class="action" data-tooltip="{{localize "HELLBORN.Tooltip.addEquipment"}}" data-tooltip-direction="UP"><i
class="fas fa-plus" data-action="createEquipment"></i></a>{{/if}}
</legend>
<div class="equipments">
{{#each equipments as |item|}}
{{!log 'armor' this}}
<div class="equipment" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}">
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
<div class="name" data-tooltip="{{{item.system.description}}}">
{{item.name}}
</div>
<div class="controls">
<a data-tooltip="{{localize 'HELLBORN.Edit'}}" data-action="edit" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'HELLBORN.Delete'}}" data-action="delete" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
</fieldset>
</div>
</div>
</section>

View File

@@ -19,21 +19,52 @@
</div>
<fieldset class="character-definition">
<div class="flexcol">
{{formField systemFields.pronouns value=system.pronouns rootId=partId disabled=isPlayMode}}
</div>
<div class="flexcol">
{{formField systemFields.species value=system.species rootId=partId disabled=isPlayMode}}
</div>
<div class="flexrow">
<div class="form-group">
<label>Trait</label>
<input class="trait" type="text" value="{{trait.name}}" disabled >
<div class="controls">
<a data-tooltip="{{localize 'HELLBORN.Edit'}}" data-action="edit" data-item-id="{{trait.id}}"
data-item-uuid="{{trait.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'HELLBORN.Delete'}}" data-action="delete" data-item-id="{{trait.id}}"
data-item-uuid="{{trait.uuid}}"><i class="fas fa-trash"></i></a>
<div class="splitted">
<div>
<div class="flexcol">
{{formField systemFields.pronouns value=system.pronouns rootId=partId disabled=isPlayMode}}
</div>
<div class="flexcol">
{{formField systemFields.species value=system.species rootId=partId disabled=isPlayMode}}
</div>
<div class="flexrow">
<div class="form-group">
<label>Trait</label>
<input class="trait" type="text" value="{{trait.name}}" disabled >
<div class="controls">
<a data-tooltip="{{localize 'HELLBORN.Edit'}}" data-action="edit" data-item-id="{{trait.id}}"
data-item-uuid="{{trait.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'HELLBORN.Delete'}}" data-action="delete" data-item-id="{{trait.id}}"
data-item-uuid="{{trait.uuid}}"><i class="fas fa-trash"></i></a>
</div>
</div>
</div>
</div>
<div>
<div class="flexrow">
<div class="form-group">
<label>Upright</label>
<input class="trait" type="text" value="{{upright.name}}" disabled >
<div class="controls">
<a data-tooltip="{{localize 'HELLBORN.Edit'}}" data-action="edit" data-item-id="{{upright.id}}"
data-item-uuid="{{upright.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'HELLBORN.Delete'}}" data-action="delete" data-item-id="{{upright.id}}"
data-item-uuid="{{upright.uuid}}"><i class="fas fa-trash"></i></a>
</div>
</div>
</div>
<div class="flexrow">
<div class="form-group">
<label>Reversed</label>
<input class="trait" type="text" value="{{downright.name}}" disabled >
<div class="controls">
<a data-tooltip="{{localize 'HELLBORN.Edit'}}" data-action="edit" data-item-id="{{downright.id}}"
data-item-uuid="{{downright.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'HELLBORN.Delete'}}" data-action="delete" data-item-id="{{downright.id}}"
data-item-uuid="{{downright.uuid}}"><i class="fas fa-trash"></i></a>
</div>
</div>
</div>
</div>
</div>
@@ -46,27 +77,27 @@
<fieldset class="character-stats character-stats-{{ifThen isPlayMode 'play' 'edit'}}">
<legend>{{localize "HELLBORN.Label.stats"}}</legend>
<div class="character-stat">
<label class="rollable" data-roll-type="stat" data-skill-id="flesh">{{localize
<label class="rollable" data-roll-type="stat" data-stat-id="flesh"><i class="fa-regular fa-dice"></i>{{localize
"HELLBORN.Label.flesh"}}</label>
{{formInput systemFields.stats.fields.flesh.fields.value value=system.stats.flesh.value rootId=partId disabled=isPlayMode type="number" }}
</div>
<div class="character-stat">
<label class="rollable" data-roll-type="stat" data-skill-id="skin">{{localize
<label class="rollable" data-roll-type="stat" data-stat-id="skin"><i class="fa-regular fa-dice"></i>{{localize
"HELLBORN.Label.skin"}}</label>
{{formInput systemFields.stats.fields.skin.fields.value value=system.stats.skin.value rootId=partId disabled=isPlayMode type="number" }}
</div>
<div class="character-stat">
<label class="rollable" data-roll-type="stat" data-skill-id="heart">{{localize
<label class="rollable" data-roll-type="stat" data-stat-id="heart"><i class="fa-regular fa-dice"></i>{{localize
"HELLBORN.Label.heart"}}</label>
{{formInput systemFields.stats.fields.heart.fields.value value=system.stats.heart.value rootId=partId disabled=isPlayMode type="number" }}
</div>
<div class="character-stat">
<label class="rollable" data-roll-type="stat" data-skill-id="mind">{{localize
<label class="rollable" data-roll-type="stat" data-stat-id="mind"><i class="fa-regular fa-dice"></i>{{localize
"HELLBORN.Label.mind"}}</label>
{{formInput systemFields.stats.fields.mind.fields.value value=system.stats.mind.value rootId=partId disabled=isPlayMode type="number" }}
</div>
<div class="character-stat">
<label class="rollable" data-roll-type="stat" data-skill-id="soul">{{localize
<label class="rollable" data-roll-type="stat" data-stat-id="soul"><i class="fa-regular fa-dice"></i>{{localize
"HELLBORN.Label.soul"}}</label>
{{formInput systemFields.stats.fields.soul.fields.value value=system.stats.soul.value rootId=partId disabled=isPlayMode type="number" }}
</div>

View File

@@ -16,7 +16,7 @@
{{item.name}}
</div>
<span class="domain" data-tooltip="Domain">{{upperFirst item.system.domain}}</span>
<span class="level" data-tooltip="Level">{{upperFirst item.system.level}}</span>
<span class="level" data-tooltip="Level">{{getRomanLevel item.system.level}}</span>
<div class="controls">
<a data-tooltip="{{localize 'HELLBORN.Edit'}}" data-action="edit" data-item-id="{{item.id}}"
@@ -43,6 +43,7 @@
<div class="name" data-roll-type="weapon" data-tooltip="{{{item.system.description}}}">
{{item.name}}
</div>
<span class="ingredients" data-tooltip="Ingredients">{{upperFirst item.system.ingredients}}</span>
<span class="difficulty" data-tooltip="Difficulty">{{upperFirst item.system.difficulty}}</span>
<span class="threshold" data-tooltip="Threshold">{{upperFirst item.system.threshold}}</span>
<span class="limit" data-tooltip="Limit">{{upperFirst item.system.limit}}</span>

View File

@@ -2,31 +2,32 @@
<div class="main-div">
<fieldset>
<legend>{{localize "HELLBORN.Label.Counters"}}</legend>
<legend>{{localize "HELLBORN.Label.characteristics"}}</legend>
<div class="counters">
<label>Trauma : </label>{{formInput systemFields.trauma.fields.current value=system.trauma.current}} /
{{formInput systemFields.trauma.fields.max value=system.trauma.max}}
<label> Darkness : </label>{{formInput systemFields.darkness.fields.current value=system.darkness.current}} /
{{formInput systemFields.darkness.fields.max value=system.darkness.max}}
{{formInput systemFields.darkness.fields.value value=system.darkness.value}}
<label> Defense : </label>{{formInput systemFields.defense.fields.base value=system.defense.base}}
{{formInput systemFields.defense.fields.bonus value=system.defense.bonus }}
{{formInput systemFields.defense.fields.total value=system.defense.total}}
{{formInput systemFields.defense.fields.resistance value=system.defense.resistance}}
<label> Movement : </label>{{formInput systemFields.movement.fields.base value=system.movement.base}}
{{formInput systemFields.movement.fields.reduce value=system.defense.reduce }}
</div>
</fieldset>
<div class="flexcol">
<div>
<label>Trauma : </label>{{formInput systemFields.trauma.fields.current value=system.trauma.current}} /
{{formInput systemFields.trauma.fields.max value=system.trauma.max}}
<fieldset>
<legend>{{localize "HELLBORN.Label.ailments"}}</legend>
<div class="ailments">
{{#each system.ailments as |item id|}}
<div class="ailment " data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-drag="false">
<label>{{item.label}}</label> <input type="checkbox" class="checkbox" name="system.ailments.{{id}}.enabled"
{{#if item.enabled}} checked {{/if}}>
<label> Darkness : </label>{{formInput systemFields.darkness.fields.current value=system.darkness.current}} /
{{formInput systemFields.darkness.fields.max value=system.darkness.max}}
{{formInput systemFields.darkness.fields.value value=system.darkness.value}}
<label> Defense : </label>{{formInput systemFields.defense.fields.base value=system.defense.base}}
{{formInput systemFields.defense.fields.bonus value=system.defense.bonus }}
{{formInput systemFields.defense.fields.total value=system.defense.total}}
{{formInput systemFields.defense.fields.resistance value=system.defense.resistance}}
<label> Movement : </label>{{formInput systemFields.movement.fields.base value=system.movement.base}}
{{formInput systemFields.movement.fields.reduce value=system.defense.reduce }}
</div>
<div class="flexrow characteristics-label">
<label>&nbsp;</label><span>Curr.</span><span>Max</span>
<label>&nbsp;</label><span>Curr.</span><span>Max</span><span>MaxDR</span>
<label>&nbsp;</label><span>Base</span><span>Armor</span><span>Total</span><span>Resi.</span>
<label>&nbsp;</label><span>Base</span><span>Redu.</span>
</div>
</div>
{{/each}}
</div>
</fieldset>
@@ -46,7 +47,7 @@
</div>
<span class="flavor" data-tooltip="Flavor text">{{upperFirst item.system.flavorText}}</span>
<span class="role" data-tooltip="Role">{{upperFirst item.system.role}}</span>
<span class="level" data-tooltip="Level">{{item.system.level}}</span>
<span class="level" data-tooltip="Level">{{getRomanLevel item.system.level}}</span>
<div class="controls">
<a data-tooltip="{{localize 'HELLBORN.Edit'}}" data-action="edit" data-item-id="{{item.id}}"
@@ -59,6 +60,25 @@
</div>
</fieldset>
<fieldset>
<legend>{{localize "HELLBORN.Label.ailments"}}</legend>
<div class="mortality">
<label>Mortality :</label>
{{#each system.mortality.enabled as |mortality idx|}}
<input class="mortality-checkbox" type="checkbox" data-action="updateCheckboxArray" data-index="{{@index}}"
data-name="enabled" {{#if mortality}} checked {{/if}}>
{{/each}}
</div>
<div class="ailments">
{{#each system.ailments as |item id|}}
<div class="ailment " data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" data-drag="false">
<label>{{item.label}}</label> <input type="checkbox" class="checkbox" name="system.ailments.{{id}}.enabled"
{{#if item.enabled}} checked {{/if}}>
</div>
{{/each}}
</div>
</fieldset>
</div>
</section>

View File

@@ -7,33 +7,52 @@
<div class="intro-right">
<ul>
{{#if (eq rollType "skill")}}
<li><strong>{{localize "HELLBORN.Label.skillRoll"}}</strong></li>
{{#if (eq rollType "stat")}}
<li><strong>{{localize "HELLBORN.Label.statRoll"}}</strong></li>
{{/if}}
{{#if weapon}}
<li><strong>Weapon : {{weapon.name}}</strong></li>
<li><strong>Properties : {{weapon.system.properties}}</strong></li>
{{/if}}
<li><strong>{{localize rollItem.label}} : {{fullFormula}}</strong></li>
<li><strong>{{localize rollItem.label}} : {{rollItem.value}}</strong></li>
{{#if isEncumbered}}
<li class="red-warning">Encumbered : -1D</li>
{{/if}}
<li>{{localize "HELLBORN.Label.difficulty"}} : {{difficulty}}</li>
<li>{{localize "HELLBORN.Label.modifier"}} : {{numericModifier}}D</li>
{{#if isSuccess}}
<li class="result-success">
{{localize "HELLBORN.Label.success"}}
{{#if (eq resultType "unknown")}}
<li class="result-unknown">
{{localize "HELLBORN.Label.unknown"}}
</li>
{{/if}}
{{else}}
{{#if isSuccess}}
{{#if satanicSuccess}}
<li class="result-satanic-success">
{{localize "HELLBORN.Label.satanicSuccess"}}
</li>
{{else}}
<li class="result-success">
{{localize "HELLBORN.Label.success"}}
</li>
{{/if}}
{{/if}}
{{#if isFailure}}
<li class="result-failure">
{{localize "HELLBORN.Label.failure"}}
</li>
{{#if isFailure}}
{{#if fiendishFailure}}
<li class="result-fiendish-failure">
{{localize "HELLBORN.Label.fiendishFailure"}}
</li>
{{else}}
<li class="result-failure">
{{localize "HELLBORN.Label.failure"}}
</li>
{{/if}}
{{/if}}
{{#if isCritical}}
{{/if}}
{{/if}}
</ul>
</div>

View File

@@ -2,46 +2,33 @@
<fieldSet>
{{#if (eq rollType "skill")}}
<legend>{{localize "HELLBORN.Label.skill"}}</legend>
{{#if (eq rollType "stat")}}
<legend>{{localize "HELLBORN.Label.stat"}}</legend>
{{/if}}
<div class="dialog-skill">{{localize rollItem.label}} : 2d6+{{rollItem.value}}</div>
<div class="dialog-stat">{{localize rollItem.label}} : 3d6+{{rollItem.value}}</div>
{{#if weapon}}
<div class="dialog-skill">Weapon : {{weapon.name}}</div>
{{/if}}
{{#if isEncumbered}}
<div class="dialog-skill red-warning">Encumbered : -1D</div>
<div class="dialog-stat">Weapon : {{weapon.name}}</div>
{{/if}}
</fieldSet>
<fieldSet class="dialog-modifier">
<legend>{{localize "HELLBORN.Label.modifier"}}</legend>
<legend>Advantages & Disadvantages</legend>
<select name="modifier" class="roll-skill-modifier">
{{selectOptions choiceModifier selected=modifier localize=true}}
<select name="nbadvantages" class="roll-stat-advantages">
{{selectOptions choiceAdvantages selected=nbAdvantages localize=true}}
</select>
<select name="nbdisadvantages" class="roll-stat-disadvantages">
{{selectOptions choiceDisadvantages selected=nbDisadvantages localize=true}}
</select>
{{#if weapon}}
<select name="range-modifier" class="roll-skill-range-modifier">
{{selectOptions choiceRangeModifier selected=rangeModifier}}
</select>
<ul>
<li>Two Attacks : <input type="checkbox" name="isAiming" data-field="two-attacks" class="select-combat-option"></li>
<li>Aiming : <input type="checkbox" data-field="aiming" class="select-combat-option"></li>
<li>Dim Lightning : <input type="checkbox" data-field="dim" class="select-combat-option"></li>
<li>Darkness : <input type="checkbox" data-field="darkness" class="select-combat-option"></li>
<li>Target Prone/Obscured : <input type="checkbox" data-field="prone" class="select-combat-option"></li>
<li>Target Cover : <input type="checkbox" data-field="cover" class="select-combat-option"></li>
<li>1/2 Auto Fire Recoil : <input type="checkbox" data-field="recoil-first" class="select-combat-option"></li>
<li>2+ Auto Fire Recoil : <input type="checkbox" data-field="recoil-third" class="select-combat-option"></li>
<li>Target Aware : <input type="checkbox" data-field="aware" class="select-combat-option"></li>
</ul>
{{/if}}
</fieldSet>
<fieldSet class="dialog-formula">
<legend>Difficulty</legend>
<input name="difficulty" class="roll-difficulty" type="number" value="{{difficulty}}">
</fieldSet>
<fieldSet class="dialog-formula">
@@ -52,7 +39,7 @@
<fieldSet>
<legend>{{localize "HELLBORN.Label.rollView"}}</legend>
<select name="visibility">
{{selectOptions rollModes selected=visibility}}
{{selectOptions rollModes selected=visibility localize=true}}
</select>
</fieldSet>

View File

@@ -9,8 +9,17 @@
</fieldset>
<fieldset>
<div class="flexrow">
<div class="flexrow scrollable-content">
<div class="flexcol">
<legend>{{localize "HELLBORN.Label.quote"}}</legend>
{{formInput systemFields.quote value=system.quote toggled=true}}
<legend>{{localize "HELLBORN.Label.bonus"}}</legend>
{{formInput systemFields.bonus value=system.bonus toggled=true}}
<legend>{{localize "HELLBORN.Label.penalty"}}</legend>
{{formInput systemFields.penalty value=system.penalty toggled=true}}
<legend>{{localize "HELLBORN.Label.description"}}</legend>
{{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description"
toggled=true}}
<legend>{{localize "HELLBORN.Label.positiveEffect"}}</legend>
{{formInput systemFields.positiveEffect enriched=enrichedPositiveEffect value=system.positiveEffect name="system.positiveEffect"
toggled=true}}