4 Commits

Author SHA1 Message Date
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
4bed84358b Enhance actor sheet
All checks were successful
Release Creation / build (release) Successful in 51s
2025-05-24 00:13:41 +02:00
666fb4c00a First release of actor sheet
All checks were successful
Release Creation / build (release) Successful in 1m11s
2025-05-23 22:39:42 +02:00
ef9c011186 Actor sheet, step 1 2025-05-23 00:26:00 +02:00
38 changed files with 2189 additions and 1662 deletions

BIN
assets/icons/deal.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

BIN
assets/icons/tarot.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -45,6 +45,8 @@ Hooks.once("init", function () {
malefica: models.HellbornMalefica,
equipment: models.HellbornEquipment,
armor: models.HellbornArmor,
deal: models.HellbornDeal,
tarot: models.HellbornTarot,
"species-trait": models.HellbornSpeciesTrait
}
@@ -62,6 +64,8 @@ Hooks.once("init", function () {
foundry.documents.collections.Items.registerSheet("fvtt-hellborn", applications.HellbornMaleficaSheet, { types: ["malefica"], makeDefault: true })
foundry.documents.collections.Items.registerSheet("fvtt-hellborn", applications.HellbornSpeciesTraitSheet, { types: ["species-trait"], makeDefault: true })
foundry.documents.collections.Items.registerSheet("fvtt-hellborn", applications.HellbornArmorSheet, { types: ["armor"], makeDefault: true })
foundry.documents.collections.Items.registerSheet("fvtt-hellborn", applications.HellbornTarotSheet, { types: ["tarot"], makeDefault: true })
foundry.documents.collections.Items.registerSheet("fvtt-hellborn", applications.HellbornDealSheet, { types: ["deal"], makeDefault: true })
// Other Document Configuration
CONFIG.ChatMessage.documentClass = documents.HellbornChatMessage

View File

@@ -1,41 +1,96 @@
{
"HELLBORN": {
"Armor": {
"FIELDS": {
"bonus": {
"label": "Bonus"
},
"cost": {
"label": "Cost"
},
"description": {
"label": "Description"
},
"reduction": {
"label": "Reduction"
},
"resilience": {
"label": "Resilience"
}
}
},
"Character": {
"FIELDS": {
"mortality": {
"label": "Mortality",
"current": {
"label": "Mortality"
}
},
"limboes": {
"label": "Limboes"
},
"ammo": {
"label": "Ammo"
},
"age": {
"label": "Age"
},
"archetype": {
"label": "Archetype"
},
"armor": {
"value": {
"label": "Protection"
}
},
"heroPoints": {
"label": "Hero Points"
},
"credits": {
"label": "Credits"
},
"enc": {
"label": "Enc",
"value": {
"label": "Enc Curr."
"biodata": {
"age": {
"label": "Age"
},
"max": {
"label": "Enc Max"
"birthplace": {
"label": "Birthplace"
},
"eyes": {
"label": "Eyes"
},
"gender": {
"label": "Gender"
},
"hair": {
"label": "Hair"
},
"height": {
"label": "Height"
},
"home": {
"label": "Home"
},
"label": "Biodata",
"weight": {
"label": "Weight"
}
},
"age": {
"label": "Age"
},
"birthplace": {
"label": "Birthplace"
},
"concept": {
"label": "Concept"
},
"species": {
"label": "Species"
"credits": {
"label": "Credits"
},
"archetype": {
"label": "Archetype"
"experience": {
"current": {
"label": "Current"
},
"training": {
"label": "Training"
},
"label": "Experience",
"total": {
"label": "Total"
}
},
"eyes": {
"label": "Eyes"
@@ -46,69 +101,45 @@
"hair": {
"label": "Hair"
},
"health": {
"label": "Stamina",
"staminaMax": {
"label": "Max"
},
"staminaValue": {
"label": "Cur."
},
"wounds": {
"label": "Wounds"
}
},
"height": {
"label": "Height"
},
"home": {
"label": "Home"
},
"biodata": {
"label": "Biodata",
"gender": {
"label": "Gender"
},
"height": {
"label": "Height"
},
"weight": {
"label": "Weight"
},
"age": {
"label": "Age"
},
"hair": {
"label": "Hair"
},
"eyes": {
"label": "Eyes"
},
"home": {
"label": "Home"
},
"birthplace": {
"label": "Birthplace"
}
"pronouns": {
"label": "Pronouns"
},
"rank": {
"label": "Rank",
"elite": {
"label": "Elite"
},
"experienced": {
"label": "Experienced"
},
"expert": {
"label": "Expert"
},
"veteran": {
"label": "Veteran"
},
"elite": {
"label": "Elite"
},
"label": "Rank",
"legend": {
"label": "Legend"
},
"veteran": {
"label": "Veteran"
}
},
"health": {
"staminaValue": {
"label": "Cur."
},
"staminaMax": {
"label": "Max"
},
"wounds": {
"label": "Wounds"
},
"label": "Stamina"
},
"skills:": {
"combat": {
"label": "Combat"
@@ -131,60 +162,17 @@
"vehicles": {
"label": "Vehicles"
}
},
"species": {
"label": "Species"
},
"trait": {
"label": "Trait"
}
}
},
"Creature": {
"Niche": {
"Prey": "Prey",
"Opportunist": "Opportunist",
"Herbivore": "Herbivore",
"Predator": "Predator"
},
"Size": {
"Tiny": "Tiny",
"Small": "Small",
"Medium": "Medium",
"Large": "Large",
"Huge": "Huge",
"Giant": "Giant",
"Titanic": "Titanic",
"Gargantuan": "Gargantuan"
},
"Terrain": {
"Cave": "Cave",
"Coast": "Coast",
"Desert": "Desert",
"Forest": "Forest",
"Jungle": "Jungle",
"Mountain": "Mountain",
"Plains": "Plains",
"Swamp": "Swamp",
"Urban": "Urban",
"Ocean": "Ocean",
"Coastal": "Coast",
"Mixed": "Mixed",
"River": "River",
"Ruins": "Ruins",
"Savannah": "Savannah",
"Shallows" : "Shallows"
},
"FIELDS": {
"damage": {
"label": "Damage"
},
"size": {
"label": "Size"
},
"numberAppearing": {
"label": "Number Appearing"
},
"terrain": {
"label": "Terrain"
},
"niche": {
"label": "Niche"
},
"biodata": {
"adaptedToHelplessness": {
"label": "Adapted to helplessness"
@@ -241,9 +229,18 @@
"label": "Strength"
}
},
"damage": {
"label": "Damage"
},
"damageBonus": {
"label": "Dmg.Bonus"
},
"niche": {
"label": "Niche"
},
"numberAppearing": {
"label": "Number Appearing"
},
"resources": {
"hand": {
"label": "Hand"
@@ -257,16 +254,56 @@
"stowed": {
"label": "Stowed"
}
},
"size": {
"label": "Size"
},
"terrain": {
"label": "Terrain"
}
},
"Niche": {
"Herbivore": "Herbivore",
"Opportunist": "Opportunist",
"Predator": "Predator",
"Prey": "Prey"
},
"Size": {
"Gargantuan": "Gargantuan",
"Giant": "Giant",
"Huge": "Huge",
"Large": "Large",
"Medium": "Medium",
"Small": "Small",
"Tiny": "Tiny",
"Titanic": "Titanic"
},
"Terrain": {
"Cave": "Cave",
"Coast": "Coast",
"Coastal": "Coast",
"Desert": "Desert",
"Forest": "Forest",
"Jungle": "Jungle",
"Mixed": "Mixed",
"Mountain": "Mountain",
"Ocean": "Ocean",
"Plains": "Plains",
"River": "River",
"Ruins": "Ruins",
"Savannah": "Savannah",
"Shallows": "Shallows",
"Swamp": "Swamp",
"Urban": "Urban"
}
},
"SpeciesTrait": {
"Deal": {
"FIELDS": {
"description": {
"label": "Description"
},
"isAdvantage": {
"label": "Provide advantage"
"promisor": {
"label": "Promisor"
}
}
},
@@ -289,6 +326,167 @@
}
}
},
"Label": {
"difficulty": "Difficulty",
"unknown": "Unknown",
"statRoll": "Stat Roll",
"stat": "Stat",
"formula": "Formula",
"characteristics": "Characteristics",
"deals": "Deals",
"tarot": "Tarot",
"backstory": "Backstory",
"scars": "Scars",
"likes": "Likes",
"dislikes": "Dislikes",
"fears": "Fears",
"vices": "Vices",
"goals": "Goals",
"ambitions": "Ambitions",
"values": "Values",
"bonds": "Bonds",
"abilities": "Abilities",
"Agility": "Agility",
"ailments": "Ailments",
"appearance": "Appearance",
"armor": "Armor",
"Armor": "Armor",
"armors": "Armors",
"biodata": "Biodata",
"biography": "Biography",
"capacity": "Capacity",
"cargo": "Cargo",
"character": "Character",
"combat": "Combat",
"Counters": "Counters",
"creature": "Creature",
"fiendishSuccess": "Fiendish Failure",
"satanicSuccess": "Satanic Success",
"bonus": "Bonus",
"penalty": "Penalty",
"quote": "Quote",
"current": "Curr.",
"damage": "Damage",
"damages": "Damages",
"damageShort": "Dmg",
"description": "Description",
"Details": "Details",
"Difficult": "Difficult (-1D)",
"Easy": "Easy (+1D)",
"equipment": "Equipment",
"equipments": "Equipment",
"experience": "Experience",
"failure": "Failure",
"finalScore": "Final Score",
"flesh": "Flesh",
"Formidable": "Formidable (-2D)",
"heart": "Heart",
"HP": "HP",
"implants": "Implants",
"Impossible": "Impossible (-4D)",
"knowledge": "Knowledge",
"languages": "Languages",
"maleficas": "Maleficas",
"malus": "Malus",
"max": "Max",
"maximum": "Maximum",
"mind": "Mind",
"Moderate": "Moderate (+0D)",
"modifications": "Modifications",
"modifier": "Modifier",
"multiplier": "Multiplier",
"negativeEffect": "Negative Effect",
"newAbility": "New Ability",
"newArmor": "New Armor",
"newCreatureAbility": "New Creature Ability",
"newCreatureTrait": "New Creature Trait",
"newEquipment": "New Equipment",
"newImplant": "New Implant",
"newLanguage": "New Language",
"newPsionic": "New Psionic",
"newSkill": "New Skill",
"newTalent": "New Talent",
"newTrait": "New Trait",
"newWeapon": "New Weapon",
"notes": "Notes",
"perks": "Perks",
"physical": "Physical",
"positiveEffect": "Positive Effect",
"psionics": "Psionics",
"Rank": "Rank",
"rituals": "Rituals",
"rollView": "Roll View",
"skill": "Skill",
"skillRoll": "Skill Roll",
"skills": "Skills",
"skin": "Skin",
"social": "Social",
"soul": "Soul",
"species": "Species",
"speciesTraits": "Species Traits",
"Stamina": "Stamina",
"starship": "Starship",
"stats": "Stats",
"status": "Status",
"stealth": "Stealth",
"success": "Success",
"talents": "Talents",
"targetScore": "Target Score",
"technology": "Technology",
"titleSkill": "Skill Roll",
"titleWeapon": "Weapon Roll",
"total": "Total",
"totalScore": "Total Score",
"traits": "Traits",
"trauma": "Trauma",
"Unarmed": "Unarmed",
"vehicle": "Vehicle",
"Vehicle": "Vehicle",
"vehicles": "Vehicles",
"weapons": "Weapons"
},
"Malefica": {
"FIELDS": {
"description": {
"label": "Description"
},
"domain": {
"label": "Domain"
},
"level": {
"label": "Level"
},
"range": {
"label": "Range"
},
"target": {
"label": "Target"
},
"time": {
"label": "Time"
}
}
},
"Notifications": {
"tarotDeleted": "Previous Tarot card deleted : ",
"speciesTraitDeleted": "Previous Species Trait deleted : "
},
"Perk": {
"FIELDS": {
"description": {
"label": "Description"
},
"flavorText": {
"label": "Flavor Text"
},
"level": {
"label": "Level"
},
"role": {
"label": "Role"
}
}
},
"Ritual": {
"FIELDS": {
"cost": {
@@ -300,8 +498,8 @@
"difficulty": {
"label": "Difficulty"
},
"threshold": {
"label": "Threshold"
"ingredients": {
"label": "Ingredients"
},
"limit": {
"label": "Limit"
@@ -309,131 +507,8 @@
"nbAttempts": {
"label": "Nb Attempts"
},
"ingredients": {
"label": "Ingredients"
}
}
},
"Label": {
"damages": "Damages",
"modifications": "Modifications",
"abilities": "Abilities",
"Details": "Details",
"traits": "Traits",
"capacity" : "Capacity",
"Agility" : "Agility",
"Armor": "Armor",
"cargo": "Cargo",
"vehicle": "Vehicle",
"starship": "Starship",
"Easy": "Easy (+1D)",
"Moderate": "Moderate (+0D)",
"Difficult": "Difficult (-1D)",
"Formidable": "Formidable (-2D)",
"Impossible": "Impossible (-4D)",
"combat": "Combat",
"physical": "Physical",
"social": "Social",
"stealth": "Stealth",
"technology": "Technology",
"vehicles": "Vehicles",
"knowledge": "Knowledge",
"Stamina": "Stamina",
"equipments": "Equipment",
"Rank": "Rank",
"HP": "HP",
"Unarmed": "Unarmed",
"Vehicle": "Vehicle",
"armor": "Armor",
"armors": "Armors",
"biodata": "Biodata",
"biography": "Biography",
"character": "Character",
"creature": "Creature",
"criticalFailure": "Critical Failure",
"criticalSuccess": "Critical Success",
"current": "Curr.",
"damage": "Damage",
"damageShort": "Dmg",
"description": "Description",
"equipment": "Equipment",
"experience": "Experience",
"failure": "Failure",
"finalScore": "Final Score",
"languages": "Languages",
"malus": "Malus",
"max": "Max",
"maximum": "Maximum",
"modifier": "Modifier",
"multiplier": "Multiplier",
"newArmor": "New Armor",
"newWeapon": "New Weapon",
"newTalent": "New Talent",
"newTrait": "New Trait",
"newAbility": "New Ability",
"newSkill": "New Skill",
"newImplant": "New Implant",
"newEquipment": "New Equipment",
"newLanguage": "New Language",
"newPsionic": "New Psionic",
"newCreatureAbility": "New Creature Ability",
"newCreatureTrait": "New Creature Trait",
"notes": "Notes",
"psionics": "Psionics",
"rollView": "Roll View",
"skill": "Skill",
"skillRoll": "Skill Roll",
"skills": "Skills",
"status": "Status",
"success": "Success",
"talents": "Talents",
"implants": "Implants",
"targetScore": "Target Score",
"titleSkill": "Skill Roll",
"titleWeapon": "Weapon Roll",
"total": "Total",
"totalScore": "Total Score",
"weapons": "Weapons"
},
"Notifications": {},
"Armor": {
"FIELDS": {
"bonus": {
"label": "Bonus"
},
"cost": {
"label": "Cost"
},
"description": {
"label": "Description"
},
"resilience": {
"label": "Resilience"
},
"reduction": {
"label": "Reduction"
}
}
},
"Malefica": {
"FIELDS": {
"description": {
"label": "Description"
},
"time": {
"label": "Time"
},
"range":{
"label": "Range"
},
"target": {
"label": "Target"
},
"level":{
"label": "Level"
},
"domain": {
"label": "Domain"
"threshold": {
"label": "Threshold"
}
}
},
@@ -442,46 +517,50 @@
"roll": "Roll",
"skill": "Skill"
},
"Perk": {
"SpeciesTrait": {
"FIELDS": {
"level": {
"label": "Level"
"description": {
"label": "Description"
},
"role": {
"label": "Role"
},
"flavorText": {
"label": "Flavor Text"
"isAdvantage": {
"label": "Provide advantage"
}
}
},
"Tarot": {
"FIELDS": {
"bonus": {
"label": "Bonus"
},
"description": {
"label": "Description"
},
"orientation": {
"label": "Orientation"
}
}
},
"ToggleSheet": "Toggle Sheet",
"Tooltip": {
"addTalent" : "Add Talent",
"addSkill" : "Add Skill",
"addWeapon" : "Add Weapon",
"addArmor" : "Add Armor",
"addEquipment" : "Add Equipment",
"addImplant" : "Add Implant",
"addLanguage" : "Add Language",
"addPsionic" : "Add Psionic",
"addCreatureAbility" : "Add Creature Ability",
"addCreatureTrait" : "Add Creature Trait",
"addArmor": "Add Armor",
"addCreatureAbility": "Add Creature Ability",
"addCreatureTrait": "Add Creature Trait",
"addEquipment": "Add Equipment",
"addImplant": "Add Implant",
"addLanguage": "Add Language",
"addPsionic": "Add Psionic",
"addSkill": "Add Skill",
"addTalent": "Add Talent",
"addWeapon": "Add Weapon",
"damages": "Enter current damages suffered"
},
"Vehicle": {
"FIELDS": {
"tonnage": {
"label": "Tonnage"
},
"agility": {
"label": "Agility"
},
"force": {
"label": "Force"
"armor": {
"label": "Armor"
},
"cargo": {
"label": "Cargo"
@@ -489,28 +568,34 @@
"cost": {
"label": "Cost"
},
"range": {
"label": "Range"
},
"speed": {
"label": "Speed"
},
"armor": {
"label": "Armor"
},
"crew": {
"label": "Crew"
},
"description": {
"label": "Description"
},
"force": {
"label": "Force"
},
"notes": {
"label": "Notes"
},
"range": {
"label": "Range"
},
"speed": {
"label": "Speed"
},
"tonnage": {
"label": "Tonnage"
}
}
},
"Weapon": {
"FIELDS": {
"ammo": {
"label": "Ammo"
},
"cost": {
"label": "Cost"
},
@@ -520,29 +605,26 @@
"description": {
"label": "Description"
},
"subType": {
"label": "Sub-Type"
"properties": {
"label": "Properties"
},
"range": {
"label": "Range"
},
"properties": {
"label": "Properties"
},
"ammo": {
"label": "Ammo"
"subType": {
"label": "Sub-Type"
},
"weaponType": {
"label": "Type"
}
},
"Range": {
"Handgun": "Handgun",
"Assault": "Assault",
"Handgun": "Handgun",
"HeavyWeapon": "Heavy Weapon",
"LongRange": "Long Range",
"Melee": "Melee",
"Rifle": "Rifle",
"HeavyWeapon": "Heavy Weapon",
"ThrownWeapon": "Thrown Weapon"
},
"Types": {
@@ -562,17 +644,15 @@
"vehicle": "Vehicle"
},
"Item": {
"species-trait": "Species Trait",
"armor": "Armor",
"deal": "Deal",
"equipment": "Equipment",
"ritual": "Ritual",
"malefica": "Malefica",
"perk": "Perk",
"weapon": "Weapon",
"armor": "Armor"
"ritual": "Ritual",
"species-trait": "Species Trait",
"tarot": "Tarot",
"weapon": "Weapon"
}
}
}

View File

@@ -9,3 +9,5 @@ export { default as HellbornSpeciesTraitSheet } from "./sheets/species-trait-she
export { default as HellbornPerkSheet } from "./sheets/perk-sheet.mjs"
export { default as HellbornMaleficaSheet } from "./sheets/malefica-sheet.mjs"
export { default as HellbornArmorSheet } from "./sheets/armor-sheet.mjs"
export { default as HellbornTarotSheet } from "./sheets/tarot-sheet.mjs"
export { default as HellbornDealSheet } from "./sheets/deal-sheet.mjs"

View File

@@ -66,8 +66,7 @@ export default class HellbornActorSheet extends HandlebarsApplicationMixin(found
actor: this.document,
system: this.document.system,
source: this.document.toObject(),
isEncumbered: this.document.system.isEncumbered(),
enrichedDescription: await TextEditor.enrichHTML(this.document.system.description, { async: true }),
enrichedBackstory: await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.backstory, { async: true }),
isEditMode: this.isEditMode,
isPlayMode: this.isPlayMode,
isEditable: this.isEditable,
@@ -99,7 +98,7 @@ export default class HellbornActorSheet extends HandlebarsApplicationMixin(found
dragover: this._onDragOver.bind(this),
drop: this._onDrop.bind(this),
}
return new DragDrop(d)
return new foundry.applications.ux.DragDrop.implementation(d)
})
}

View File

@@ -15,11 +15,9 @@ export default class HellbornCharacterSheet extends HellbornActorSheet {
createEquipment: HellbornCharacterSheet.#onCreateEquipment,
createArmor: HellbornCharacterSheet.#onCreateArmor,
createWeapon: HellbornCharacterSheet.#onCreateWeapon,
createTalent: HellbornCharacterSheet.#onCreateTalent,
createImplant: HellbornCharacterSheet.#onCreateImplant,
createPsionic: HellbornCharacterSheet.#onCreatePsionic,
createLanguage: HellbornCharacterSheet.#onCreateLanguage
createDeal: HellbornCharacterSheet.#onCreateDeal,
createMalefica: HellbornCharacterSheet.#onCreateMalefica,
createRitual: HellbornCharacterSheet.#onCreateRitual,
},
}
@@ -31,8 +29,11 @@ export default class HellbornCharacterSheet extends HellbornActorSheet {
tabs: {
template: "templates/generic/tab-navigation.hbs",
},
talents: {
template: "systems/fvtt-hellborn/templates/character-talents.hbs",
status: {
template: "systems/fvtt-hellborn/templates/character-status.hbs",
},
maleficas: {
template: "systems/fvtt-hellborn/templates/character-maleficas.hbs",
},
equipment: {
template: "systems/fvtt-hellborn/templates/character-equipment.hbs",
@@ -44,7 +45,7 @@ export default class HellbornCharacterSheet extends HellbornActorSheet {
/** @override */
tabGroups = {
sheet: "talents",
sheet: "status",
}
/**
@@ -53,7 +54,8 @@ export default class HellbornCharacterSheet extends HellbornActorSheet {
*/
#getTabs() {
const tabs = {
talents: { id: "talents", group: "sheet", icon: "fa-solid fa-compass", label: "HELLBORN.Label.talents" },
status: { id: "status", group: "sheet", icon: "fa-solid fa-compass", label: "HELLBORN.Label.status" },
maleficas: { id: "maleficas", group: "sheet", icon: "fa-solid fa-compass", label: "HELLBORN.Label.maleficas" },
equipment: { id: "equipment", group: "sheet", icon: "fa-solid fa-shapes", label: "HELLBORN.Label.equipment" },
biography: { id: "biography", group: "sheet", icon: "fa-solid fa-book", label: "HELLBORN.Label.biography" },
}
@@ -69,8 +71,10 @@ export default class HellbornCharacterSheet extends HellbornActorSheet {
const context = await super._prepareContext()
context.tabs = this.#getTabs()
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true })
context.enrichedNotes = await TextEditor.enrichHTML(this.document.system.notes, { async: true })
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
}
@@ -78,19 +82,21 @@ export default class HellbornCharacterSheet extends HellbornActorSheet {
/** @override */
async _preparePartContext(partId, context) {
const doc = this.document
context.systemFields = this.document.system.schema.fields
switch (partId) {
case "main":
break
case "talents":
context.tab = context.tabs.talents
context.talents = doc.itemTypes.talent
context.talents.sort((a, b) => a.name.localeCompare(b.name))
context.implants = doc.itemTypes.implant
context.implants.sort((a, b) => a.name.localeCompare(b.name))
context.psionics = doc.itemTypes.psionic
context.psionics.sort((a, b) => a.name.localeCompare(b.name))
context.languages = doc.itemTypes.language
context.languages.sort((a, b) => a.name.localeCompare(b.name))
case "status":
context.tab = context.tabs.status
context.perks = doc.itemTypes.perk
context.perks.sort((a, b) => a.name.localeCompare(b.name))
break;
case "maleficas":
context.tab = context.tabs.maleficas
context.maleficas = doc.itemTypes.malefica
context.maleficas.sort((a, b) => a.name.localeCompare(b.name))
context.rituals = doc.itemTypes.ritual
context.rituals.sort((a, b) => a.name.localeCompare(b.name))
break
case "equipment":
context.tab = context.tabs.equipment
@@ -103,10 +109,22 @@ export default class HellbornCharacterSheet extends HellbornActorSheet {
break
case "biography":
context.tab = context.tabs.biography
context.enrichedDescription = await TextEditor.enrichHTML(doc.system.description, { async: true })
context.enrichedNotes = await TextEditor.enrichHTML(doc.system.notes, { async: true })
context.deals = doc.itemTypes.deal
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 })
context.enrichedLikes = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.likes, { async: true })
context.enrichedDislikes = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.dislikes, { async: true })
context.enrichedFears = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.fears, { async: true })
context.enrichedVices = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.vices, { async: true })
context.enrichedGoals = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.goals, { async: true })
context.enrichedAmbitions = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.ambitions, { async: true })
context.enrichedValues = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.values, { async: true })
context.enrichedBonds = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.bonds, { async: true })
context.enrichedNotes = await foundry.applications.ux.TextEditor.implementation.enrichHTML(this.document.system.notes, { async: true })
break
}
console.log("context", context)
return context
}
@@ -115,6 +133,18 @@ export default class HellbornCharacterSheet extends HellbornActorSheet {
this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("HELLBORN.Label.newEquipment"), type: "equipment" }])
}
static #onCreateDeal(event, target) {
this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("HELLBORN.Label.newDeal"), type: "deal" }])
}
static #onCreateMalefica(event, target) {
this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("HELLBORN.Label.newMalefica"), type: "malefica" }])
}
static #onCreateRitual(event, target) {
this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("HELLBORN.Label.newRitual"), type: "ritual" }])
}
static #onCreateWeapon(event, target) {
this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("HELLBORN.Label.newWeapon"), type: "weapon" }])
}
@@ -123,21 +153,6 @@ export default class HellbornCharacterSheet extends HellbornActorSheet {
this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("HELLBORN.Label.newArmor"), type: "armor" }])
}
static #onCreateTalent(event, target) {
this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("HELLBORN.Label.newTalent"), type: "talent" }])
}
static #onCreateImplant(event, target) {
this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("HELLBORN.Label.newImplant"), type: "implant" }])
}
static #onCreatePsionic(event, target) {
this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("HELLBORN.Label.newPsionic"), type: "psionic" }])
}
static #onCreateLanguage(event, target) {
this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("HELLBORN.Label.newLanguage"), type: "language" }])
}
/**
@@ -158,10 +173,11 @@ export default class HellbornCharacterSheet extends HellbornActorSheet {
const rollType = $(event.currentTarget).data("roll-type")
let item
let li
let statKey
switch (rollType) {
case "skill":
let skillId = $(event.currentTarget).data("skill-id");
item = this.actor.system.skills[skillId];
case "stat":
statKey = $(event.currentTarget).data("stat-id");
item = this.actor.system.stats[statKey];
break
case "weapon":
case "damage":
@@ -176,14 +192,32 @@ export default class HellbornCharacterSheet extends HellbornActorSheet {
async _onDrop(event) {
if (!this.isEditable || !this.isEditMode) return
const data = TextEditor.getDragEventData(event)
const data = foundry.applications.ux.TextEditor.implementation.getDragEventData(event)
// Handle different data types
switch (data.type) {
case "Item":
const item = await fromUuid(data.uuid)
return super._onDropItem(item)
if (data.type === "Item") {
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" && i.system.orientation === item.system.orientation)
if (existingTarot) {
await existingTarot.delete()
// Display info message
ui.notifications.info(game.i18n.localize("HELLBORN.Notifications.tarotDeleted") + existingTarot.name)
}
}
if (item.type === "species-trait") {
// Check if the item is already in the actor
const existingTrait = this.document.items.find(i => i.type === "species-trait" && i.name === item.name)
if (existingTrait) {
await existingTrait.delete()
// Display info message
ui.notifications.info(game.i18n.localize("HELLBORN.Notifications.speciesTraitDeleted")+ existingTrait.name)
}
}
return super._onDropItem(item)
}
}
}

View File

@@ -0,0 +1,28 @@
import HellbornItemSheet from "./base-item-sheet.mjs"
export default class HellbornDealSheet extends HellbornItemSheet {
/** @override */
static DEFAULT_OPTIONS = {
classes: ["deal"],
position: {
width: 600,
},
window: {
contentClasses: ["deal-content"],
},
}
/** @override */
static PARTS = {
main: {
template: "systems/fvtt-hellborn/templates/deal.hbs",
},
}
/** @override */
async _prepareContext() {
const context = await super._prepareContext()
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true })
return context
}
}

View File

@@ -0,0 +1,31 @@
import HellbornItemSheet from "./base-item-sheet.mjs"
export default class HellbornTarotSheet extends HellbornItemSheet {
/** @override */
static DEFAULT_OPTIONS = {
classes: ["tarot"],
position: {
width: 800,
height: 800
},
window: {
contentClasses: ["tarot-content"],
},
}
/** @override */
static PARTS = {
main: {
template: "systems/fvtt-hellborn/templates/tarot.hbs",
},
}
/** @override */
async _prepareContext() {
const context = await super._prepareContext()
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

@@ -7,6 +7,49 @@ export const ASCII = `
`
export const AILMENTS = {
"bleeding": { id: "bleeding", label: "Bleeding" },
"blinded": { id: "blinded", label: "Blinded" },
"burning": { id: "burning", label: "Burning" },
"dazed": { id: "dazed", label: "Dazed" },
"deafened": { id: "deafened", label: "Deafened" },
"exposes": { id: "exposed", label: "Exposed" },
"mortally": { id: "mortal", label: "Mortal" },
"muted": { id: "muted", label: "Muted" },
"prone": { id: "prone", label: "Prone" },
"immobilized": { id: "immobilized", label: "Immobile" },
"shaken": { id: "shaken", label: "Shaken" },
"stunned": { id: "stunned", label: "Stunned" },
"winded": { id: "winded", label: "Winded" }
}
export const STATS = {
"flesh": { id: "flesh", label: "Flesh" },
"skin": { id: "skin", label: "Skin" },
"heart": { id: "heart", label: "Heart" },
"mind": { id: "mind", label: "Mind" },
"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" },
@@ -47,87 +90,6 @@ 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 TRIAGE_RESULTS = {
"none": { id: "none", dice:0, label: "HELLBORN.TriageResults.None" },
"death": { id: "death", dice:3, label: "HELLBORN.TriageResults.Death" },
"critical": { id: "critical", dice:4, label: "HELLBORN.TriageResults.Critical" },
"severe": { id: "severe", dice:7, label: "HELLBORN.TriageResults.Severe" },
"moderate": { id: "moderate", dice:10, label: "HELLBORN.TriageResults.Moderate" },
"fleshwound": { id: "fleshwound", dice:12, label: "HELLBORN.TriageResults.FleshWound" }
}
export const CREATURE_TERRAIN_TYPES = {
"cave": { id: "cave", label: "HELLBORN.Creature.Terrain.Cave", niche:0, size: 0 },
"coast": { id: "coast", label: "HELLBORN.Creature.Terrain.Coast", niche:1, size: 0 },
"desert": { id: "desert", label: "HELLBORN.Creature.Terrain.Desert", niche:-1, size: -1 },
"forest": { id: "forest", label: "HELLBORN.Creature.Terrain.Forest", niche:1, size: 1 },
"jungle": { id: "jungle", label: "HELLBORN.Creature.Terrain.Jungle", niche:1, size: 1 },
"mixed": { id: "mixed", label: "HELLBORN.Creature.Terrain.Mixed", niche:0, size: 0 },
"mountain": { id: "mountain", label: "HELLBORN.Creature.Terrain.Mountain", niche:-1, size: -1 },
"ocean": { id: "ocean", label: "HELLBORN.Creature.Terrain.Ocean", niche:-1, size: 1 },
"river": { id: "river", label: "HELLBORN.Creature.Terrain.River", niche:1, size: 0 },
"ruins": { id: "ruins", label: "HELLBORN.Creature.Terrain.Ruins", niche:0, size: 1 },
"savannah": { id: "savannah", label: "HELLBORN.Creature.Terrain.Savannah", niche:0, size: 1 },
"shallows": { id: "shallows", label: "HELLBORN.Creature.Terrain.Shallows", niche:1, size: 0 },
"swamp": { id: "swamp", label: "HELLBORN.Creature.Terrain.Swamp", niche:1, size: 1 }
}
export const CREATURE_NICHES = {
"prey": { id: "prey", label: "HELLBORN.Creature.Niche.Prey" },
"opportunist": { id: "opportunist", label: "HELLBORN.Creature.Niche.Opportunist" },
"herbivore": { id: "herbivore", label: "HELLBORN.Creature.Niche.Herbivore" },
"predator": { id: "predator", label: "HELLBORN.Creature.Niche.Predator" }
}
export const CREATURE_SIZES = {
"tiny": { id: "tiny", label: "HELLBORN.Creature.Size.Tiny" },
"small": { id: "small", label: "HELLBORN.Creature.Size.Small" },
"medium": { id: "medium", label: "HELLBORN.Creature.Size.Medium" },
"large": { id: "large", label: "HELLBORN.Creature.Size.Large" },
"giant": { id: "giant", label: "HELLBORN.Creature.Size.Giant" },
"titanic": { id: "titanic", label: "HELLBORN.Creature.Size.Titanic" }
}
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 STARSHIP_HULL = {
"pod": { id: "pod", label: "HELLBORN.Starship.Hull.Pod" },
"micro": { id: "micro", label: "HELLBORN.Starship.Hull.Micro" },
"small": { id: "small", label: "HELLBORN.Starship.Hull.Small" },
"scout": { id: "scout", label: "HELLBORN.Starship.Hull.Scout" },
"picket": { id: "picket", label: "HELLBORN.Starship.Hull.Picket" },
"destroyer": { id: "destroyer", label: "HELLBORN.Starship.Hull.Destroyer" },
"cruiser": { id: "cruiser", label: "HELLBORN.Starship.Hull.Cruiser" },
"battleship": { id: "battleship", label: "HELLBORN.Starship.Hull.Battleship" },
"carrier": { id: "carrier", label: "HELLBORN.Starship.Hull.Carrier" }
}
/**
* Include all constant definitions within the SYSTEM global export
@@ -135,18 +97,14 @@ export const STARSHIP_HULL = {
*/
export const SYSTEM = {
id: SYSTEM_ID,
AILMENTS,
STATS,
PERK_ROLES,
PERK_LEVELS,
MALEFICA_LEVELS,
MALEFICA_DOMAINS,
MODIFIER_CHOICES,
ATTACK_MODIFIERS,
WEAPON_TYPES,
RANGED_SUBTYPES,
TRIAGE_RESULTS,
CREATURE_TERRAIN_TYPES,
CREATURE_SIZES,
CREATURE_NICHES,
STARSHIP_HULL,
DIFFICULTY_CHOICES,
CHOICE_ADVANTAGES_DISADVANTAGES,
ASCII
}

View File

@@ -6,6 +6,8 @@ export const defaultItemImg = {
perk: "systems/fvtt-hellborn/assets/icons/perk.webp",
"species-trait": "systems/fvtt-hellborn/assets/icons/species-trait.webp",
armor: "systems/fvtt-hellborn/assets/icons/armor.webp",
deal: "systems/fvtt-hellborn/assets/icons/deal.webp",
tarot: "systems/fvtt-hellborn/assets/icons/tarot.webp",
}
export default class HellbornItem extends Item {

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,68 @@ 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,
difficultyChoices: SYSTEM.DIFFICULTY_CHOICES,
choiceAdvantages: SYSTEM.CHOICE_ADVANTAGES_DISADVANTAGES,
choiceDisadvantages: SYSTEM.CHOICE_ADVANTAGES_DISADVANTAGES,
hasTarget: options.hasTarget,
modifier,
difficulty: "unknown",
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 +167,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 +194,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 +254,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 +266,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 +313,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

@@ -8,3 +8,5 @@ export { default as HellbornMalefica } from "./malefica.mjs"
export { default as HellbornSpeciesTrait } from "./species-trait.mjs"
export { default as HellbornWeapon } from "./weapon.mjs"
export { default as HellbornArmor } from "./armor.mjs"
export { default as HellbornTarot } from "./tarot.mjs"
export { default as HellbornDeal } from "./deal.mjs"

View File

@@ -7,51 +7,106 @@ export default class HellbornActor extends foundry.abstract.TypeDataModel {
const requiredInteger = { required: true, nullable: false, integer: true }
const schema = {}
schema.description = new fields.HTMLField({ required: true, textSearch: true })
// Ailments
const ailmentField = (label) => {
const schema = {
enabled: new fields.BooleanField({ required: true, initial: false }),
label: new fields.StringField({ required: true, initial: label })
}
return new fields.SchemaField(schema, { label })
}
schema.ailments = new fields.SchemaField(
Object.values(SYSTEM.AILMENTS).reduce((obj, ailment) => {
obj[ailment.id] = ailmentField(ailment.label)
return obj
}, {}),
)
// Stats
const statField = (label) => {
const schema = {
label: new fields.StringField({ required: true, initial: label }),
value: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
}
return new fields.SchemaField(schema, { label })
}
schema.stats = new fields.SchemaField(
Object.values(SYSTEM.STATS).reduce((obj, stat) => {
obj[stat.id] = statField(stat.label)
return obj
}, {}),
)
schema.backstory = new fields.HTMLField({ required: true, textSearch: true })
schema.appearance = new fields.HTMLField({ required: true, textSearch: true })
schema.scars = new fields.HTMLField({ required: true, textSearch: true })
schema.likes = new fields.HTMLField({ required: true, textSearch: true })
schema.dislikes = new fields.HTMLField({ required: true, textSearch: true })
schema.fears = new fields.HTMLField({ required: true, textSearch: true })
schema.vices = new fields.HTMLField({ required: true, textSearch: true })
schema.goals = new fields.HTMLField({ required: true, textSearch: true })
schema.ambitions = new fields.HTMLField({ required: true, textSearch: true })
schema.values = new fields.HTMLField({ required: true, textSearch: true })
schema.bonds = new fields.HTMLField({ required: true, textSearch: true })
schema.notes = new fields.HTMLField({ required: true, textSearch: true })
schema.name = new fields.StringField({ required: true, nullable: false, initial: "" })
schema.pronouns = new fields.StringField({ required: true, nullable: false, initial: "" })
schema.species = new fields.StringField({ required: true, nullable: false, initial: "" })
schema.trait = new fields.StringField({ required: true, nullable: false, initial: "" })
schema.upright = new fields.StringField({ required: true, nullable: false, initial: "" })
schema.reversed = new fields.StringField({ required: true, nullable: false, initial: "" })
schema.heroPoints = new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 })
schema.limboes = new fields.StringField({ required: true, nullable: false, initial: "" })
schema.ammo = new fields.StringField({ required: true, nullable: false, initial: "" })
schema.health = new fields.SchemaField({
staminaValue: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }),
staminaMax: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }),
wounds: new fields.NumberField({ ...requiredInteger, initial:0, min: 0 }),
triageResults: new fields.StringField({ required: true, nullable: false, initial: "none", choices: SYSTEM.TRIAGE_RESULTS })
schema.mortality = new fields.SchemaField({
current: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
max: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
})
schema.enc = new fields.SchemaField({
value: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
max: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 })
schema.trauma = new fields.SchemaField({
current: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }),
max: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }),
})
schema.armor = new fields.SchemaField({
value: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 })
schema.darkness = new fields.SchemaField({
current: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }),
max: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }),
value: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }),
})
schema.credits = new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 })
schema.rank = new fields.SchemaField({
experienced: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0, max: 5 }),
expert: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0, max: 5 }),
veteran: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0, max: 5 }),
elite: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0, max: 5 }),
legend: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0, max: 5 })
schema.defense = new fields.SchemaField({
base: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
bonus: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
total: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
resistance: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
})
schema.movement = new fields.SchemaField({
base: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
reduce: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
})
schema.experience = new fields.SchemaField({
training: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
current: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }),
total: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 })
})
schema.biodata = new fields.SchemaField({
age: new fields.NumberField({ ...requiredInteger, initial: 15, min: 6 }),
height: new fields.NumberField({ ...requiredInteger, initial: 170, min: 50 }),
weight: new fields.NumberField({ ...requiredInteger, initial: 70, min: 1 }),
gender: new fields.StringField({ required: true, nullable: false, initial: "" }),
home: new fields.StringField({ required: true, nullable: false, initial: "" }),
birthplace: new fields.StringField({ required: true, nullable: false, initial: "" }),
height: new fields.NumberField({ ...requiredInteger, initial: 170, min: 50 }),
eyes: new fields.StringField({ required: true, nullable: false, initial: "" }),
hair: new fields.StringField({ required: true, nullable: false, initial: "" })
birthplace: new fields.StringField({ required: true, nullable: false, initial: "" }),
hair: new fields.StringField({ required: true, nullable: false, initial: "" }),
home: new fields.StringField({ required: true, nullable: false, initial: "" }),
weight: new fields.NumberField({ ...requiredInteger, initial: 70, min: 1 }),
apparentAge: new fields.NumberField({ ...requiredInteger, initial: 20, min: 1 }),
chronologicalAge: new fields.NumberField({ ...requiredInteger, initial: 20, min: 1 }),
dod: new fields.StringField({ required: true, nullable: false, initial: "" }),
soul: new fields.StringField({ required: true, nullable: false, initial: "" }),
aliases: new fields.StringField({ required: true, nullable: false, initial: "" })
})
return schema
@@ -65,10 +120,6 @@ export default class HellbornActor extends foundry.abstract.TypeDataModel {
}
isEncumbered() {
return this.enc.value > this.enc.max
}
/** */
/**
* Rolls a dice for a character.
@@ -86,7 +137,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
})

16
module/models/deal.mjs Normal file
View File

@@ -0,0 +1,16 @@
import { SYSTEM } from "../config/system.mjs";
export default class HellbornDeal extends foundry.abstract.TypeDataModel {
static defineSchema() {
const fields = foundry.data.fields;
const schema = {};
schema.promisor = new fields.StringField({ required: true, initial: "" });
schema.description = new fields.HTMLField({ required: true, textSearch: true })
return schema;
}
/** @override */
static LOCALIZATION_PREFIXES = ["HELLBORN.Deal"];
}

27
module/models/tarot.mjs Normal file
View File

@@ -0,0 +1,27 @@
import { SYSTEM } from "../config/system.mjs";
export default class HellbornTarot extends foundry.abstract.TypeDataModel {
static defineSchema() {
const fields = foundry.data.fields;
const schema = {};
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({
required: false,
categories: ["IMAGE"],
default: "icons/svg/treasure.svg",
})
return schema;
}
/** @override */
static LOCALIZATION_PREFIXES = ["HELLBORN.Tarot"];
}

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));

View File

@@ -57,17 +57,6 @@
flex: none;
}
}
/*.character-dmax-edit {
input {
display: flex;
width: 60px;
font-size: calc(var(--font-size-standard) * 1.4);
align-items: center;
justify-content: center;
padding: 0 5px 0 5px;
text-align: center;
}
}*/
}
.character-right {
@@ -75,17 +64,25 @@
flex-direction: column;
gap: 5px;
.character-spec {
label {
max-width: 6rem;
.character-definition {
.form-group {
display: flex;
align-items: center;
margin-bottom: 4px;
}
.hero-armor {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 4px;
input {
max-width: 3rem;
}
label {
max-width: 4rem;
}
input {
min-width: 16rem;
max-width: 16rem;
margin-bottom: auto;
}
.trait {
min-width: 13rem;
max-width: 13rem;
margin-right: 1rem;
margin-bottom: auto;
}
}
.character-name {
@@ -110,17 +107,17 @@
min-width: 500px;
}
.character-skills {
.character-stats {
background-color: var(--color-light-1);
display: flex;
flex-direction: column;
gap: 5px;
flex: 1;
.character-skill {
.character-stat {
display: flex;
align-items: center;
.icon-skill {
.icon-stat {
width: 24px;
height: 24px;
margin-right: 4px;
@@ -131,98 +128,26 @@
cursor: pointer;
}
.rollable {
min-width: 4.5rem;
max-width: 4.5rem;
min-width: 3.5rem;
max-width: 3.5rem;
}
.char-text {
margin-left: 0.5rem;
}
.d100 {
flex: 0;
max-width: 0.6rem;
}
.form-group {
flex: 0;
padding-left: 5px;
.form-fields {
font-size: 1.1rem;
flex: none;
width: 40px;
}
input {
min-width: 2.5rem;
max-width: 2.5rem;
}
}
}
.character-skill-play {
min-width: 225px;
.character-stats-play {
min-width: 120px;
}
.character-skill-edit {
min-width: 225px;
.character-stats-edit {
min-width: 120px;
}
}
.character-biography {
background-color: var(--color-light-1);
prose-mirror.inactive {
min-height: 40px;
}
prose-mirror.active {
min-height: 150px;
}
.field-label {
margin-left: 8px;
}
.rank {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 8px;
label {
min-width: 6rem;
}
input {
max-width: 4rem;
}
}
.biodata {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 8px;
label {
min-width: 12rem;
}
}
.resources {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 8px;
label {
min-width: 8rem;
}
}
.features,
.biodata {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 8px;
label {
min-width: 3rem;
}
.feature {
display: flex;
align-items: center;
gap: 4px;
min-width: 18rem;
max-width: 18rem;
}
}
}
.tab.character-skills {
.tab.character-status .main-div {
background-color: var(--color-light-1);
display: grid;
grid-template-columns: 1fr;
@@ -232,137 +157,42 @@
padding-left: 5px;
}
}
.skills {
display: grid;
grid-template-columns: repeat(3, 1fr);
.mortality {
display: flex;
align-items: center;
gap: 4px;
.skill {
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;
input {
min-width: 2.5rem;
max-width: 2.5rem;
}
}
.ailments {
display: grid;
grid-template-columns: repeat(5, 1fr);
gap: 4px;
.ailment {
display: flex;
align-items: center;
gap: 4px;
margin-left: 4px;
min-width: 12.3rem;
max-width: 12.3rem;
.rollable:hover,
.rollable:focus {
text-shadow: 0 0 8px var(--color-shadow-primary);
cursor: pointer;
}
.controls {
font-size: 0.7rem;
min-width: 1.8rem;
max-width: 1.8rem;
}
.score {
min-width: 1.2rem;
max-width: 1.2rem;
}
.name {
min-width: 10rem;
max-width: 10rem;
}
.item-img {
width: 24px;
height: 24px;
margin: 4px 0 0 0;
}
}
}
}
.tab.character-status {
background-color: var(--color-light-1);
display: grid;
grid-template-columns: 1fr;
legend {
a {
font-size: calc(var(--font-size-standard) * 1.4);
padding-left: 5px;
}
}
.bonds {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 4px;
.bond {
display: flex;
align-items: center;
gap: 4px;
min-width: 18rem;
max-width: 18rem;
.controls {
font-size: 0.7rem;
min-width: 1.8rem;
max-width: 1.8rem;
}
.name {
min-width: 12rem;
max-width: 12rem;
}
.type {
min-width: 6rem;
max-width: 6rem;
}
.level {
min-width: 2rem;
max-width: 2rem;
}
.item-img {
width: 24px;
height: 24px;
margin: 4px 0 0 0;
}
}
}
.motivations {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 4px;
.motivation {
display: flex;
align-items: center;
gap: 4px;
min-width: 14rem;
max-width: 14rem;
.controls {
font-size: 0.7rem;
min-width: 1.8rem;
max-width: 1.8rem;
}
.name {
min-width: 12rem;
max-width: 12rem;
}
.item-img {
width: 24px;
height: 24px;
margin: 4px 0 0 0;
}
}
}
.mentaldisorders {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 4px;
.mentaldisorder {
display: flex;
align-items: center;
gap: 4px;
min-width: 18rem;
max-width: 18rem;
.controls {
font-size: 0.7rem;
min-width: 1.8rem;
max-width: 1.8rem;
}
.name {
min-width: 14rem;
max-width: 14rem;
}
.cured {
min-width: 8rem;
max-width: 8rem;
label {
min-width: 5rem;
max-width: 5rem;
}
@@ -373,25 +203,42 @@
}
}
}
.injuries {
.perks {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-columns: repeat(1, 1fr);
gap: 4px;
.injury {
.perk {
display: flex;
align-items: center;
gap: 4px;
min-width: 16rem;
max-width: 16rem;
margin-left: 4px;
min-width: 20rem;
max-width: 20rem;
.rollable:hover,
.rollable:focus {
text-shadow: 0 0 8px var(--color-shadow-primary);
cursor: pointer;
}
.controls {
font-size: 0.7rem;
min-width: 1.8rem;
max-width: 1.8rem;
}
.flavor {
min-width: 24rem;
max-width: 24rem;
}
.role {
min-width: 5rem;
max-width: 5rem;
}
.level {
min-width: 4rem;
max-width: 4rem;
}
.name {
min-width: 14rem;
max-width: 14rem;
min-width: 10rem;
max-width: 10rem;
}
.item-img {
width: 24px;
@@ -402,7 +249,7 @@
}
}
.tab.character-talents {
.tab.character-maleficas .main-div {
background-color: var(--color-light-1);
display: grid;
grid-template-columns: 1fr;
@@ -413,33 +260,32 @@
}
}
.talents {
.maleficas {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 4px;
.talent {
.malefica {
display: flex;
align-items: center;
gap: 4px;
min-width: 13rem;
max-width: 13rem;
.rollable:hover,
.rollable:focus {
text-shadow: 0 0 8px var(--color-shadow-primary);
cursor: pointer;
}
min-width: 18rem;
max-width: 18rem;
.controls {
font-size: 0.7rem;
min-width: 1.8rem;
max-width: 1.8rem;
}
.damage {
min-width: 6rem;
max-width: 6rem;
}
.name {
min-width: 10rem;
max-width: 10rem;
min-width: 12rem;
max-width: 12rem;
}
.domain {
min-width: 5rem;
max-width: 5rem;
}
.level {
min-width: 3rem;
max-width: 3rem;
}
.item-img {
width: 24px;
@@ -449,33 +295,40 @@
}
}
.languages {
.rituals {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-columns: repeat(1, 1fr);
gap: 4px;
.language {
.ritual {
display: flex;
align-items: center;
gap: 4px;
min-width: 13rem;
max-width: 13rem;
.rollable:hover,
.rollable:focus {
text-shadow: 0 0 8px var(--color-shadow-primary);
cursor: pointer;
}
min-width: 14rem;
max-width: 14rem;
.controls {
font-size: 0.7rem;
min-width: 1.8rem;
max-width: 1.8rem;
}
.damage {
min-width: 6rem;
max-width: 6rem;
.ingredients {
min-width: 26rem;
max-width: 26rem;
}
.name {
min-width: 10rem;
max-width: 10rem;
min-width: 12rem;
max-width: 12rem;
}
.difficulty {
min-width: 2rem;
max-width: 2rem;
}
.threshold {
min-width: 2rem;
max-width: 2rem;
}
.limit {
min-width: 2rem;
max-width: 2rem;
}
.item-img {
width: 24px;
@@ -484,46 +337,9 @@
}
}
}
.psionics {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 4px;
.psionic {
display: flex;
align-items: center;
gap: 4px;
min-width: 13rem;
max-width: 13rem;
.rollable:hover,
.rollable:focus {
text-shadow: 0 0 8px var(--color-shadow-primary);
cursor: pointer;
}
.controls {
font-size: 0.7rem;
min-width: 1.8rem;
max-width: 1.8rem;
}
.damage {
min-width: 6rem;
max-width: 6rem;
}
.name {
min-width: 10rem;
max-width: 10rem;
}
.item-img {
width: 24px;
height: 24px;
margin: 4px 0 0 0;
}
}
}
}
.tab.character-equipment {
.tab.character-equipment .main-div {
background-color: var(--color-light-1);
display: grid;
grid-template-columns: 1fr;
@@ -533,59 +349,28 @@
padding-left: 5px;
}
}
.encumbrance {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 4px;
.limboes {
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 {
max-width: 4rem;
}
.encumbered {
color: red;
font-weight: bold;
min-width: 8rem;
max-width: 8rem;
}
}
.implants {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 4px;
.implant {
display: flex;
align-items: center;
gap: 4px;
min-width: 13rem;
max-width: 13rem;
.rollable:hover,
.rollable:focus {
text-shadow: 0 0 8px var(--color-shadow-primary);
cursor: pointer;
}
.controls {
font-size: 0.7rem;
min-width: 1.8rem;
max-width: 1.8rem;
}
.damage {
min-width: 6rem;
max-width: 6rem;
}
.name {
min-width: 10rem;
max-width: 10rem;
}
.item-img {
width: 24px;
height: 24px;
margin: 4px 0 0 0;
}
}
}
.weapons {
display: grid;
grid-template-columns: repeat(2, 1fr);
grid-template-columns: repeat(1, 1fr);
gap: 4px;
.weapon {
display: flex;
@@ -603,13 +388,21 @@
min-width: 1.8rem;
max-width: 1.8rem;
}
.properties {
min-width: 21rem;
max-width: 21rem;
}
.type {
min-width: 4rem;
max-width: 4rem;
}
.damage {
min-width: 6rem;
max-width: 6rem;
}
.name {
min-width: 10rem;
max-width: 10rem;
min-width: 12rem;
max-width: 12rem;
}
.item-img {
width: 24px;
@@ -618,7 +411,7 @@
}
}
}
.armors {
display: grid;
grid-template-columns: repeat(2, 1fr);
@@ -634,13 +427,21 @@
min-width: 1.8rem;
max-width: 1.8rem;
}
.protection {
min-width: 6rem;
max-width: 6rem;
.bonus {
min-width: 2rem;
max-width: 2rem;
}
.resilience {
min-width: 2rem;
max-width: 2rem;
}
.reduction {
min-width: 2rem;
max-width: 2rem;
}
.name {
min-width: 10rem;
max-width: 10rem;
min-width: 13.5rem;
max-width: 13.5rem;
}
.item-img {
width: 24px;
@@ -671,8 +472,8 @@
max-width: 1.8rem;
}
.name {
min-width: 10rem;
max-width: 10rem;
min-width: 12rem;
max-width: 12rem;
}
.item-img {
width: 24px;
@@ -689,3 +490,95 @@
min-height: 150px;
}
}
.tab.character-biography .main-div {
background-color: var(--color-light-1);
display: grid;
grid-template-columns: 1fr;
legend {
a {
font-size: calc(var(--font-size-standard) * 1.4);
padding-left: 5px;
}
}
.splitted-text {
display: flex;
flex-direction: row;
gap: 4px;
fieldset {
width: 100%;
}
}
.deals {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 4px;
.deal {
display: flex;
align-items: center;
gap: 4px;
margin-left: 4px;
min-width: 12rem;
max-width: 12rem;
.rollable:hover,
.rollable:focus {
text-shadow: 0 0 8px var(--color-shadow-primary);
cursor: pointer;
}
.controls {
font-size: 0.7rem;
min-width: 1.8rem;
max-width: 1.8rem;
}
.name {
min-width: 10rem;
max-width: 10rem;
}
.item-img {
width: 24px;
height: 24px;
margin: 4px 0 0 0;
}
}
}
.biodata {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 4px;
.experience {
display: flex;
flex-direction: row;
align-items: center;
gap: 4px;
margin-left: 4px;
}
.form-group {
label {
min-width: 6rem;
max-width: 6rem;
}
display: flex;
flex-direction: row;
align-items: center;
gap: 4px;
margin-left: 4px;
min-width: 14rem;
max-width: 14rem;
}
input .tarot {
min-width: 8rem;
max-width: 8rem;
}
input {
min-width: 8rem;
max-width: 8rem;
}
}
prose-mirror.inactive {
min-height: 40px;
}
prose-mirror.active {
min-height: 150px;
}
}

39
styles/deal.less Normal file
View File

@@ -0,0 +1,39 @@
.deal-content {
.sheet-common();
.item-sheet-common();
fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
.form-group {
display: flex;
align-items: center;
}
.form-group.long-input input {
min-width: 24rem;
max-width: 24rem;
text-align: left;
}
.form-group input {
min-width: 12rem;
max-width: 12rem;
}
.form-group select {
min-width: 12rem;
max-width: 12rem;
}
}
.header {
background-color: var(--color-light-1);
display: flex;
img {
width: 50px;
height: 50px;
}
}
label {
flex: 10%;
}
}

View File

@@ -9,6 +9,8 @@
@import "weapon.less";
@import "equipment.less";
@import "armor.less";
@import "deal.less";
@import "tarot.less";
@import "ritual.less";
@import "perk.less";
@import "malefica.less";

View File

@@ -2,7 +2,7 @@
--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/ftl_nomad_background_01.webp");
url("../assets/ui/sheet_background_01.webp");
--font-primary: "MinionProRegular";
--font-secondary: "MinionProRegular";
--font-title: "SupernaturalKnight";
@@ -16,16 +16,6 @@
--color-critical-failure: rgb(141, 32, 231);
}
.d100 {
width: 18px;
height: 18px;
color: black;
border-width: 0px;
}
.item .thumbnail,
.item-img {
}
#logo {
content: var(--logo-standard);
@@ -34,15 +24,25 @@
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);
}
#pause > img {
content: var(--logo-standard);
height: 192px;
height: 256px;
width: 256px;
top: -45px;
left: calc(50% - 96px);
}
i.fvtt-ftl-nomad {
i.fvtt-hellborn {
width: 36px;
height: 36px;
background-image: var(--logo-standard);
@@ -55,7 +55,7 @@ i.fvtt-ftl-nomad {
transition: 0.3s;
}
.application.dialog.fvtt-ftl-nomad {
.application.dialog.fvtt-hellborn {
font-family: var(--font-primary);
font-size: calc(var(--font-size-standard) * 1.0);
background-image: var(--background-image-base);

View File

@@ -9,8 +9,6 @@
display: flex;
align-items: center;
}
.form-group label {
}
.form-group.long-input input {
min-width: 24rem;
max-width: 24rem;

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);
@@ -16,7 +16,7 @@
}
}
.fvtt-cthulhu-eternal-roll-dialog {
.fvtt-hellborn-roll-dialog {
fieldset {
padding: 10px;
background-color: var(--color-light-1);
@@ -98,12 +98,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 +118,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

@@ -5,6 +5,23 @@
fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
.form-group {
display: flex;
align-items: center;
}
.form-group.long-input input {
min-width: 24rem;
max-width: 24rem;
text-align: left;
}
.form-group input {
min-width: 12rem;
max-width: 12rem;
}
.form-group select {
min-width: 12rem;
max-width: 12rem;
}
}
.header {

39
styles/tarot.less Normal file
View File

@@ -0,0 +1,39 @@
.tarot-content {
.sheet-common();
.item-sheet-common();
fieldset {
margin-top: 8px;
background-color: var(--color-light-1);
.form-group {
display: flex;
align-items: center;
}
.form-group.long-input input {
min-width: 24rem;
max-width: 24rem;
text-align: left;
}
.form-group input {
min-width: 12rem;
max-width: 12rem;
}
.form-group select {
min-width: 12rem;
max-width: 12rem;
}
}
.header {
background-color: var(--color-light-1);
display: flex;
img {
width: 50px;
height: 50px;
}
}
label {
flex: 10%;
}
}

View File

@@ -33,7 +33,7 @@
],
"documentTypes": {
"Actor": {
"character": { "htmlFields": ["description", "notes"] },
"character": { "htmlFields": ["backstory", "notes", "appearance", "scars", "likes", "dislikes", "fears", "vices", "goals", "ammbitions", "values", "bonds"] },
"monster": { "htmlFields": ["description", "notes"] },
"vehicle": { "htmlFields": ["description", "notes"] }
},
@@ -44,7 +44,9 @@
"equipment": { "htmlFields": ["description"] },
"malefica": { "htmlFields": ["description"] },
"species-trait": { "htmlFields": ["description"] },
"ritual": { "htmlFields": ["description"] }
"ritual": { "htmlFields": ["description"] },
"tarot": { "htmlFields": ["description", "positiveEffect", "negativeEFfect"] },
"deal": { "htmlFields": ["description"] }
}
},
"packs": [

View File

@@ -1,34 +1,154 @@
<section class="tab character-{{tab.id}} {{tab.cssClass}}" data-tab="{{tab.id}}" data-group="{{tab.group}}">
<div class="main-div">
<fieldset class="rank">
<legend>Rank</legend>
{{formField systemFields.rank.fields.experienced value=system.rank.experienced type="number" rootId=partId disabled=isPlayMode}}
{{formField systemFields.rank.fields.expert value=system.rank.expert type="number" rootId=partId disabled=isPlayMode}}
{{formField systemFields.rank.fields.veteran value=system.rank.veteran type="number" rootId=partId disabled=isPlayMode}}
{{formField systemFields.rank.fields.elite value=system.rank.elite type="number" rootId=partId disabled=isPlayMode}}
{{formField systemFields.rank.fields.legend value=system.rank.legend type="number" rootId=partId disabled=isPlayMode}}
<fieldset class="biodata">
<legend>{{localize "HELLBORN.Label.experience"}}</legend>
<div class="experience">
{{formField systemFields.experience.fields.current value=system.experience.current type="number" rootId=partId
disabled=isPlayMode}}
{{formField systemFields.experience.fields.total value=system.experience.total type="number" rootId=partId
disabled=isPlayMode}}
{{formField systemFields.experience.fields.training value=system.experience.training type="number" rootId=partId
disabled=isPlayMode}}
</div>
</fieldset>
<fieldset class="biodata">
<legend>{{localize "HELLBORN.Label.biodata"}}</legend>
{{formField systemFields.biodata.fields.gender value=system.biodata.gender rootId=partId disabled=isPlayMode classes="short"}}
{{formField systemFields.biodata.fields.age value=system.biodata.age rootId=partId disabled=isPlayMode classes="short"}}
{{formField systemFields.biodata.fields.height value=system.biodata.height rootId=partId disabled=isPlayMode classes="short"}}
{{formField systemFields.biodata.fields.weight value=system.biodata.weight rootId=partId disabled=isPlayMode classes="short"}}
{{formField systemFields.biodata.fields.eyes value=system.biodata.eyes rootId=partId disabled=isPlayMode classes="short"}}
{{formField systemFields.biodata.fields.hair value=system.biodata.hair rootId=partId disabled=isPlayMode classes="short"}}
{{formField systemFields.biodata.fields.home value=system.biodata.home rootId=partId disabled=isPlayMode}}
{{formField systemFields.biodata.fields.birthplace value=system.biodata.birthplace rootId=partId disabled=isPlayMode}}
<legend>{{localize "HELLBORN.Label.biodata"}}</legend>
<div class="experience">
{{formField systemFields.biodata.fields.gender value=system.biodata.gender rootId=partId disabled=isPlayMode}}
</div>
<div class="experience">
{{formField systemFields.biodata.fields.age value=system.biodata.age rootId=partId disabled=isPlayMode}}
</div>
<div class="experience">
{{formField systemFields.biodata.fields.height value=system.biodata.height rootId=partId disabled=isPlayMode}}
</div>
<div class="experience">
{{formField systemFields.biodata.fields.weight value=system.biodata.weight rootId=partId disabled=isPlayMode}}
</div>
<div class="experience">
{{formField systemFields.biodata.fields.eyes value=system.biodata.eyes rootId=partId disabled=isPlayMode}}
</div>
<div class="experience">
{{formField systemFields.biodata.fields.hair value=system.biodata.hair rootId=partId disabled=isPlayMode}}
</div>
<div class="experience">
{{formField systemFields.biodata.fields.home value=system.biodata.home rootId=partId disabled=isPlayMode}}
</div>
<div class="experience">
{{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>
<legend>{{localize "HELLBORN.Label.description"}}</legend>
{{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description" toggled=true}}
<legend>{{localize "HELLBORN.Label.deals"}}{{#if isEditMode}}
<a class="action" data-tooltip="{{localize "HELLBORN.Tooltip.addDeals"}}" data-tooltip-direction="UP"><i
class="fas fa-plus" data-action="createDeal"></i></a>{{/if}}
</legend>
<div class="deals">
{{#each deals as |item|}}
<div class="deal" 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>
<legend>{{localize "HELLBORN.Label.notes"}}</legend>
{{formInput systemFields.notes enriched=enrichedNotes value=system.notes name="system.notes" toggled=true}}
<legend>{{localize "HELLBORN.Label.backstory"}}</legend>
{{formInput systemFields.backstory enriched=enrichedBackstory value=system.backstory name="system.backstory" toggled=true}}
</fieldset>
<div class="splitted-text">
<fieldset>
<legend>{{localize "HELLBORN.Label.appearance"}}</legend>
{{formInput systemFields.appearance enriched=enrichedAppearance value=system.appearance name="system.appearance"
toggled=true}}
</fieldset>
<fieldset>
<legend>{{localize "HELLBORN.Label.scars"}}</legend>
{{formInput systemFields.scars enriched=scars value=system.scars name="system.scars"
toggled=true}}
</fieldset>
</div>
<div class="splitted-text">
<fieldset>
<legend>{{localize "HELLBORN.Label.likes"}}</legend>
{{formInput systemFields.likes enriched=enrichedLikes value=system.likes name="system.likes"
toggled=true}}
</fieldset>
<fieldset>
<legend>{{localize "HELLBORN.Label.dislikes"}}</legend>
{{formInput systemFields.dislikes enriched=enrichedDislikes value=system.dislikes name="system.dislikes"
toggled=true}}
</fieldset>
</div>
<div class="splitted-text">
<fieldset>
<legend>{{localize "HELLBORN.Label.fears"}}</legend>
{{formInput systemFields.fears enriched=enrichedFears value=system.fears name="system.fears"
toggled=true}}
</fieldset>
<fieldset>
<legend>{{localize "HELLBORN.Label.vices"}}</legend>
{{formInput systemFields.vices enriched=enrichedVices value=system.vices name="system.vices"
toggled=true}}
</fieldset>
</div>
<div class="splitted-text">
<fieldset>
<legend>{{localize "HELLBORN.Label.goals"}}</legend>
{{formInput systemFields.goals enriched=enrichedGoals value=system.goals name="system.goals"
toggled=true}}
</fieldset>
<fieldset>
<legend>{{localize "HELLBORN.Label.ambitions"}}</legend>
{{formInput systemFields.ambitions enriched=enrichedAmbitions value=system.ambitions name="system.ambitions"
toggled=true}}
</fieldset>
</div>
<div class="splitted-text">
<fieldset>
<legend>{{localize "HELLBORN.Label.values"}}</legend>
{{formInput systemFields.values enriched=enrichedValues value=system.values name="system.values"
toggled=true}}
</fieldset>
<fieldset>
<legend>{{localize "HELLBORN.Label.bonds"}}</legend>
{{formInput systemFields.bonds enriched=enrichedBonds value=system.bonds name="system.bonds"
toggled=true}}
</fieldset>
</div>
</div>
</section>

View File

@@ -1,14 +1,5 @@
<section class="tab character-{{tab.id}} {{tab.cssClass}}" data-tab="{{tab.id}}" data-group="{{tab.group}}">
<fieldset class="encumbrance">
{{#if isEncumbered}}
{{formField systemFields.enc.fields.value value=system.enc.value rootId=partId disabled=true classes="encumbered"}}
{{else }}
{{formField systemFields.enc.fields.value value=system.enc.value rootId=partId disabled=true}}
{{/if}}
{{formField systemFields.enc.fields.max value=system.enc.max rootId=partId disabled=isPlayMode}}
{{formField systemFields.credits value=system.credits rootId=partId }}
</fieldset>
<div class="main-div">
<fieldset>
<legend>{{localize "HELLBORN.Label.weapons"}}{{#if isEditMode}}
@@ -24,12 +15,14 @@
<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>
<i class="fa-regular fa-dice"></i>
<a class="damage rollable" data-item-id="{{item.id}}" data-action="roll" data-roll-type="damage"
<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}}">
{{localize "HELLBORN.Label.damageShort"}} :
<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>
@@ -53,41 +46,10 @@
<div class="name" data-tooltip="{{{item.system.description}}}">
{{item.name}}
</div>
<span class="protection">{{localize "HELLBORN.Label.armor"}} : {{item.system.protection}}</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>
<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>
<fieldset>
<legend>{{localize "HELLBORN.Label.implants"}}{{#if isEditMode}}
<a class="action" data-tooltip="{{localize "HELLBORN.Tooltip.addTalent"}}" data-tooltip-direction="UP"><i
class="fas fa-plus" data-action="createImplant"></i></a>{{/if}}
</legend>
<div class="implants">
{{#each implants as |item|}}
{{!log 'weapon' this}}
<div class="implant 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}}" />
<img src="systems/fvtt-cthulhu-eternal/assets/ui/d100.svg" class="d100" />
<div class="name" data-roll-type="weapon" data-tooltip="{{{item.system.description}}}">
{{item.name}}
</div>
<img src="systems/fvtt-cthulhu-eternal/assets/ui/d100.svg" class="d100" />
<a class="damage rollable" data-item-id="{{item.id}}" data-action="roll" data-roll-type="damage"
data-roll-value="{{item.system.damage}}">
{{#if item.system.isAdvantage}}
<i data-tooltip="Provides advantage" class="fas fa-circle-chevron-up"></i>
{{else}}
{{/if}}
<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>
@@ -123,4 +85,11 @@
</div>
</fieldset>
<fieldset class="limboes">
<legend>Limbos & Ammo</legend>
{{formField systemFields.limboes value=system.limboes rootId=partId disabled=isPlayMode}}
{{formField systemFields.ammo value=system.ammo rootId=partId disabled=isPlayMode}}
</fieldset>
</div>
</section>

View File

@@ -8,16 +8,6 @@
<img class="character-img" src="{{actor.img}}" data-edit="img" data-action="editImage"
data-tooltip="{{actor.name}}" />
</div>
<fieldset class="character-hp">
<legend>{{localize "HELLBORN.Label.Stamina"}}</legend>
<div class="flexrow">
{{formField systemFields.health.fields.staminaValue value=system.health.staminaValue}}
{{formField systemFields.health.fields.staminaMax value=system.health.staminaMax rootId=partId disabled=true}}
</div>
<div class="flexrow">
{{formField systemFields.health.fields.wounds value=system.health.wounds }}
</div>
</fieldset>
</div>
<div class="character-right">
@@ -28,13 +18,46 @@
</a>
</div>
<fieldset class="character-spec">
{{formField systemFields.concept value=system.concept rootId=partId disabled=isPlayMode}}
{{formField systemFields.species value=system.species rootId=partId disabled=isPlayMode}}
{{formField systemFields.archetype value=system.archetype rootId=partId disabled=isPlayMode}}
<div class="hero-armor">
{{formField systemFields.heroPoints value=system.heroPoints rootId=partId }}
{{formField systemFields.armor.fields.value value=system.armor.value rootId=partId disabled=isPlayMode}}
<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>
</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 class="flexrow">
<div class="form-group">
<label>Downright</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>
</fieldset>
@@ -42,58 +65,33 @@
</div>
</fieldset>
<fieldset class="character-skills character-skills-{{ifThen isPlayMode 'play' 'edit'}}">
<legend>{{localize "HELLBORN.Label.skills"}}</legend>
<div class="character-skill">
<img src="systems/fvtt-ftl-nomad/assets/icons/icon_combat.svg" class="icon-skill" />
<label class="rollable" data-roll-type="skill" data-skill-id="combat">{{localize
"HELLBORN.Label.combat"}}</label>
{{formInput systemFields.skills.fields.combat.fields.value value=system.skills.combat.value rootId=partId disabled=isPlayMode type="number" }}
<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-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-skill">
<img src="systems/fvtt-ftl-nomad/assets/icons/icon_knowledge.svg" class="icon-skill" />
<label class="rollable" data-roll-type="skill" data-skill-id="knowledge">{{localize
"HELLBORN.Label.knowledge"}}</label>
{{formInput systemFields.skills.fields.knowledge.fields.value value=system.skills.knowledge.value
rootId=partId disabled=isPlayMode type="number"}}
<div class="character-stat">
<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-skill">
<img src="systems/fvtt-ftl-nomad/assets/icons/icon_social.svg" class="icon-skill" />
<label class="rollable" data-roll-type="skill" data-skill-id="social">{{localize
"HELLBORN.Label.social"}}</label>
{{formInput systemFields.skills.fields.social.fields.value value=system.skills.social.value
rootId=partId disabled=isPlayMode type="number"}}
<div class="character-stat">
<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-skill">
<img src="systems/fvtt-ftl-nomad/assets/icons/icon_physical.svg" class="icon-skill" />
<label class="rollable" data-roll-type="skill" data-skill-id="physical">{{localize
"HELLBORN.Label.physical"}}</label>
{{formInput systemFields.skills.fields.physical.fields.value value=system.skills.physical.value
rootId=partId disabled=isPlayMode type="number"}}
<div class="character-stat">
<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-skill">
<img src="systems/fvtt-ftl-nomad/assets/icons/icon_stealth.svg" class="icon-skill" />
<label class="rollable" data-roll-type="skill" data-skill-id="stealth">{{localize
"HELLBORN.Label.stealth"}}</label>
{{formInput systemFields.skills.fields.stealth.fields.value value=system.skills.stealth.value
rootId=partId disabled=isPlayMode type="number"}}
</div>
<div class="character-skill">
<img src="systems/fvtt-ftl-nomad/assets/icons/icon_vehicles.svg" class="icon-skill" />
<label class="rollable" data-roll-type="skill" data-skill-id="vehicles">{{localize
"HELLBORN.Label.vehicles"}}</label>
{{formInput systemFields.skills.fields.vehicles.fields.value value=system.skills.vehicles.value
rootId=partId disabled=isPlayMode type="number"}}
</div>
<div class="character-skill">
<img src="systems/fvtt-ftl-nomad/assets/icons/icon_technology.svg" class="icon-skill" />
<label class="rollable" data-roll-type="skill" data-skill-id="technology">{{localize
"HELLBORN.Label.technology"}}</label>
{{formInput systemFields.skills.fields.technology.fields.value value=system.skills.technology.value
rootId=partId disabled=isPlayMode type="number"}}
<div class="character-stat">
<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>
</fieldset>
</section>

View File

@@ -0,0 +1,62 @@
<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.maleficas"}}{{#if isEditMode}}
<a class="action" data-tooltip="{{localize "HELLBORN.Tooltip.addMalefica"}}" data-tooltip-direction="UP"><i
class="fas fa-plus" data-action="createMalefica"></i></a>{{/if}}
</legend>
<div class="maleficas">
{{#each maleficas as |item|}}
{{!log 'weapon' this}}
<div class="malefica 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}}" />
<!--<img src="systems/fvtt-cthulhu-eternal/assets/ui/d100.svg" class="d100" />-->
<div class="name" data-roll-type="malefica" data-tooltip="{{{item.system.description}}}">
{{item.name}}
</div>
<span class="domain" data-tooltip="Domain">{{upperFirst item.system.domain}}</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}}"
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.rituals"}}{{#if isEditMode}}
<a class="action" data-tooltip="{{localize "HELLBORN.Tooltip.addRitual"}}" data-tooltip-direction="UP"><i
class="fas fa-plus" data-action="createRitual"></i></a>{{/if}}
</legend>
<div class="rituals">
{{#each rituals as |item|}}
<div class="ritual 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}}" />
<!--<img src="systems/fvtt-cthulhu-eternal/assets/ui/d100.svg" class="d100" />-->
<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>
<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>
</section>

View File

@@ -0,0 +1,68 @@
<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.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>
<fieldset>
<legend>{{localize "HELLBORN.Label.perks"}}{{#if isEditMode}}
<a class="action" data-tooltip="{{localize " HELLBORN.Tooltip.addPerk"}}" data-tooltip-direction="UP"><i
class="fas fa-plus" data-action="createPerk"></i></a>{{/if}}
</legend>
<div class="perks">
{{#each perks as |item|}}
<div class="perk 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}}" />
<!-- <img src="systems/fvtt-cthulhu-eternal/assets/ui/d100.svg" class="d100" />-->
<div class="name" data-roll-type="perk" data-tooltip="{{{item.system.description}}}">
{{item.name}}
</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">{{getRomanLevel item.system.level}}</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.ailments"}}</legend>
<div class="mortality">
<label>Mortality :</label>
{{formInput systemFields.mortality.fields.current value=system.mortality.current rootId=partId disabled=isPlayMode classes="mortality"}}
</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

@@ -1,106 +0,0 @@
<section class="tab character-{{tab.id}} {{tab.cssClass}}" data-tab="{{tab.id}}" data-group="{{tab.group}}">
<fieldset>
<legend>{{localize "HELLBORN.Label.talents"}}{{#if isEditMode}}
<a class="action" data-tooltip="{{localize "HELLBORN.Tooltip.addTalent"}}" data-tooltip-direction="UP"><i
class="fas fa-plus" data-action="createTalent"></i></a>{{/if}}
</legend>
<div class="talents">
{{#each talents as |item|}}
{{!log 'weapon' this}}
<div class="talent 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}}" />
<img src="systems/fvtt-cthulhu-eternal/assets/ui/d100.svg" class="d100" />
<div class="name" data-roll-type="weapon" data-tooltip="{{{item.system.description}}}">
{{item.name}}
</div>
<img src="systems/fvtt-cthulhu-eternal/assets/ui/d100.svg" class="d100" />
<a class="damage rollable" data-item-id="{{item.id}}" data-action="roll" data-roll-type="damage"
data-roll-value="{{item.system.damage}}">
{{#if item.system.isAdvantage}}
<i data-tooltip="Provides advantage" class="fas fa-circle-chevron-up"></i>
{{else}}
{{/if}}
<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.psionics"}}{{#if isEditMode}}
<a class="action" data-tooltip="{{localize "HELLBORN.Tooltip.addImplant"}}" data-tooltip-direction="UP"><i
class="fas fa-plus" data-action="createPsionic"></i></a>{{/if}}
</legend>
<div class="psionics">
{{#each psionics as |item|}}
{{!log 'weapon' this}}
<div class="psionic 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}}" />
<img src="systems/fvtt-cthulhu-eternal/assets/ui/d100.svg" class="d100" />
<div class="name" data-roll-type="weapon" data-tooltip="{{{item.system.description}}}">
{{item.name}}
</div>
<img src="systems/fvtt-cthulhu-eternal/assets/ui/d100.svg" class="d100" />
<a class="damage rollable" data-item-id="{{item.id}}" data-action="roll" data-roll-type="damage"
data-roll-value="{{item.system.damage}}">
{{#if item.system.isAdvantage}}
<i data-tooltip="Provides advantage" class="fas fa-circle-chevron-up"></i>
{{else}}
{{/if}}
<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.languages"}}{{#if isEditMode}}
<a class="action" data-tooltip="{{localize "HELLBORN.Tooltip.addLanguage"}}" data-tooltip-direction="UP"><i
class="fas fa-plus" data-action="createLanguage"></i></a>{{/if}}
</legend>
<div class="languages">
{{#each languages as |item|}}
{{!log 'weapon' this}}
<div class="language 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}}" />
<img src="systems/fvtt-cthulhu-eternal/assets/ui/d100.svg" class="d100" />
<div class="name" data-roll-type="weapon" data-tooltip="{{{item.system.description}}}">
{{item.name}}
</div>
<img src="systems/fvtt-cthulhu-eternal/assets/ui/d100.svg" class="d100" />
<a class="damage rollable" data-item-id="{{item.id}}" data-action="roll" data-roll-type="damage"
data-roll-value="{{item.system.damage}}">
{{#if item.system.isAdvantage}}
<i data-tooltip="Provides advantage" class="fas fa-circle-chevron-up"></i>
{{else}}
{{/if}}
<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>
</section>

View File

@@ -7,8 +7,8 @@
<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}}
@@ -16,24 +16,42 @@
<li><strong>Weapon : {{weapon.name}}</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>

17
templates/deal.hbs Normal file
View File

@@ -0,0 +1,17 @@
<section>
<div class="header">
<img class="item-img" src="{{item.img}}" data-edit="img" data-action="editImage" data-tooltip="{{item.name}}" />
{{formInput fields.name value=source.name}}
</div>
<fieldset>
{{formField systemFields.promisor value=system.promisor localize=true }}
</fieldset>
<fieldset>
<legend>{{localize "HELLBORN.Label.description"}}</legend>
{{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description"
toggled=true}}
</fieldset>
</section>

View File

@@ -2,46 +2,35 @@
<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>
<select name="difficulty" class="roll-difficulty">
{{selectOptions difficultyChoices selected=difficulty localize=true}}
</select>
</fieldSet>
<fieldSet class="dialog-formula">
@@ -52,7 +41,7 @@
<fieldSet>
<legend>{{localize "HELLBORN.Label.rollView"}}</legend>
<select name="visibility">
{{selectOptions rollModes selected=visibility}}
{{selectOptions rollModes selected=visibility localize=true}}
</select>
</fieldSet>

37
templates/tarot.hbs Normal file
View File

@@ -0,0 +1,37 @@
<section>
<div class="header">
<img class="item-img" src="{{item.img}}" data-edit="img" data-action="editImage" data-tooltip="{{item.name}}" />
{{formInput fields.name value=source.name}}
</div>
<fieldset>
{{formField systemFields.orientation value=system.orientation localize=true }}
</fieldset>
<fieldset>
<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}}
<legend>{{localize "HELLBORN.Label.negativeEffect"}}</legend>
{{formInput systemFields.negativeEffect enriched=enrichedNegativeEffect value=system.negativeEffect name="system.negativeEffect"
toggled=true}}
</div>
<div>
<img src="{{system.image}}" class="item-img" data-edit="image" data-action="editImage" data-tooltip="{{localize "HELLBORN.Label.imageTooltip"}}"/>
{{formField systemFields.image value=system.image localize=true }}
</div>
</div>
</fieldset>
</section>