diff --git a/css/fvtt-ftl-nomad.css b/css/fvtt-ftl-nomad.css index 6a83175..47a4fde 100644 --- a/css/fvtt-ftl-nomad.css +++ b/css/fvtt-ftl-nomad.css @@ -2250,6 +2250,88 @@ i.fvtt-cthulhu-eternal { .fvtt-ftl-nomad .equipment-content label { flex: 10%; } +.fvtt-ftl-nomad .implant-content { + font-family: var(--font-primary); + font-size: calc(var(--font-size-standard) * 1); + color: var(--color-dark-1); + background-image: var(--background-image-base); + background-repeat: no-repeat; + background-size: 100% 100%; +} +.fvtt-ftl-nomad .implant-content input:disabled, +.fvtt-ftl-nomad .implant-content select:disabled { + background-color: rgba(0, 0, 0, 0.2); + border-color: transparent; + color: var(--color-dark-3); +} +.fvtt-ftl-nomad .implant-content input, +.fvtt-ftl-nomad .implant-content select { + background-color: rgba(0, 0, 0, 0.1); + border-color: var(--color-dark-6); + color: var(--color-dark-2); +} +.fvtt-ftl-nomad .implant-content input[name="name"] { + height: 40px; + margin-right: 10px; + font-family: var(--font-secondary); + font-size: calc(var(--font-size-standard) * 1); + font-weight: bold; + border: none; +} +.fvtt-ftl-nomad .implant-content fieldset { + margin-bottom: 4px; + border-radius: 4px; +} +.fvtt-ftl-nomad .implant-content .form-fields input, +.fvtt-ftl-nomad .implant-content .form-fields select { + text-align: center; + font-size: calc(var(--font-size-standard) * 1); +} +.fvtt-ftl-nomad .implant-content .form-fields select { + font-family: var(--font-secondary); + font-size: calc(var(--font-size-standard) * 1); +} +.fvtt-ftl-nomad .implant-content legend { + font-family: var(--font-secondary); + font-size: calc(var(--font-size-standard) * 1.2); + font-weight: bold; + letter-spacing: 1px; +} +.fvtt-ftl-nomad .implant-content .form-fields { + padding-top: 4px; +} +.fvtt-ftl-nomad .implant-content label { + font-family: var(--font-secondary); + font-size: calc(var(--font-size-standard) * 1); + flex: 50%; +} +.fvtt-ftl-nomad .implant-content .align-top { + align-self: flex-start; + padding: 0.1rem; + margin-right: 0.2rem; + /*border-color: black; + border-width: 1px; + border-style: solid; + border-radius: 2%;*/ +} +.fvtt-ftl-nomad .implant-content .shift-right { + margin-left: 2rem; +} +.fvtt-ftl-nomad .implant-content fieldset { + margin-top: 8px; + background-color: var(--color-light-1); +} +.fvtt-ftl-nomad .implant-content .header { + background-color: var(--color-light-1); + display: flex; +} +.fvtt-ftl-nomad .implant-content .header img { + width: 50px; + height: 50px; +} +.fvtt-ftl-nomad .implant-content label { + flex: 10%; +} .fvtt-ftl-nomad .language-content { font-family: var(--font-primary); font-size: calc(var(--font-size-standard) * 1); diff --git a/fvtt-ftl-nomad.mjs b/fvtt-ftl-nomad.mjs index ec14fd6..d44808b 100644 --- a/fvtt-ftl-nomad.mjs +++ b/fvtt-ftl-nomad.mjs @@ -34,7 +34,7 @@ Hooks.once("init", function () { CONFIG.Actor.dataModels = { protagonist: models.FTLNomadCharacter, vehicle: models.FTLNomadVehicle, - creature: models.FTLNomadNPC, + creature: models.FTLNomadCreature, starship: models.FTLNomadStarship } @@ -46,7 +46,9 @@ Hooks.once("init", function () { talent: models.FTLNomadTalent, language: models.FTLNomadLanguage, equipment: models.FTLNomadEquipment, - implant: models.FTLNomadImplant + implant: models.FTLNomadImplant, + "creature-trait": models.FTLNomadCreatureTrait, + "creature-ability": models.FTLNomadCreatureAbility } // Register sheet application classes @@ -86,8 +88,7 @@ Hooks.once("init", function () { FTLNomadUtils.registerSettings() FTLNomadUtils.registerHandlebarsHelpers() - FTLNomadUtils.setupCSSRootVariables() - + console.info("FTL Nomad | System Initialized") }) diff --git a/lang/en.json b/lang/en.json index e4ad6c9..8d65e2d 100644 --- a/lang/en.json +++ b/lang/en.json @@ -160,12 +160,6 @@ } } }, - "Insanity": { - "None": "None", - "Flee": "Flee", - "Submit": "Submit", - "Struggle": "Struggle" - }, "Skill": { "Unnatural": "Unnatural", "Melee": "Melee Weapons", @@ -198,100 +192,91 @@ } } }, - "Gear": { + "Equipment": { "FIELDS": { - "resourceLevel": { - "label": "Resource level" + "techAge": { + "label": "Tech Age" }, - "state": { - "label": "State" + "description": { + "label": "Description" }, - "settings": { - "label": "Settings era" + "enc": { + "label": "Enc" + }, + "cost": { + "label": "Cost" } } }, - "Injury": { + "Psionic": { "FIELDS": { "description": { "label": "Description" + }, + "isAdvantage" :{ + "label": "Provide advantage" } } }, "Weapon": { - "WeaponType": { - "melee": "Melee", - "rangedprimitive": "Ranged Primitive", - "rangedthrown": "Ranged Thrown", - "rangedfirearm": "Ranged Firearm", - "unarmed": "Unarmed" + "Types": { + "Melee": "Melee", + "Projectile": "Projectile", + "Energy": "Energy", + "Heavy": "Heavy", + "Grenade": "Grenade/Explosive", + "Vehicle": "Vehicle" }, - "WeaponSubtype": { - "basicfirearm": "Basic Firearm", - "pistol": "Pistol", - "shotgun": "Shotgun", - "submachinegun": "Submachinegun", - "riflecarabine": "Rifle/Carabine" + "Range": { + "Melee": "Melee", + "Handgun": "Handgun", + "Rifle": "Rifle", + "LongRange": "Long Range" }, "FIELDS": { - "hasDirectSkill": { - "label": "Has direct skill" + "techAge": { + "label": "Tech Age" }, - "directSkillValue": { - "label": "Direct skill value" - }, - "state": { - "label": "State" - }, - "settings": { - "label": "Settings era" + "rangeType": { + "label": "Range" }, "weaponType": { "label": "Type" }, - "weaponSubtype": { - "label": "Firearm Subtype" - }, "damage": { "label": "Damage" }, + "enc": { + "label": "Enc" + }, + "cost": { + "label": "Cost" + }, "description": { "label": "Description" - }, - "baseRange": { - "label": "Base range" - }, - "rangeUnit": { - "label": "Range unit" - }, - "killRadius": { - "label": "Kill radius" - }, - "lethality": { - "label": "Lethality" - }, - "resourceLevel": { - "label": "Resource level" - }, - "armorPiercing": { - "label": "Armor piercing" } } }, "Armor": { "FIELDS": { - "settings": { - "label": "Settings Era" + "techAge": { + "label": "Tech Age" }, "protection": { "label": "Protection" }, - "resourceLevel": { - "label": "Resource level" + "description": { + "label": "Description" + }, + "enc": { + "label": "Enc" + }, + "cost": { + "label": "Cost" } } }, - "Motivation": { + "Language": { "FIELDS": { "description": { "label": "Description" @@ -326,30 +311,43 @@ } } }, - "MentalDisorder": { + "CreatureTrait": { "FIELDS": { "description": { "label": "Description" }, - "cured": { - "label": "Cured" + "isAdvantage": { + "label": "Provide advantage" } } }, - "Bond": { + "CreatureAbility": { "FIELDS": { - "bondType": { - "label": "Type" + "description": { + "label": "Description" + }, + "isAdvantage": { + "label": "Provide advantage" + } + } + }, + "Implant": { + "FIELDS": { + "techAge": { + "label": "Tech Age" }, "description": { "label": "Description" }, - "value": { - "label": "Value" + "enc": { + "label": "Enc" + }, + "cost": { + "label": "Cost" } } }, - "Arcane": { + "Starship": { "FIELDS": { "value": { "label": "Value" @@ -359,90 +357,10 @@ } } }, - "Archetype": { + "Talent": { "FIELDS": { - "settings": { - "label": "Settings era" - }, - "value": { - "label": "Value" - }, - "description": { - "label": "Description" - } - } - }, - "BondType": { - "individual": "Individual", - "community": "Community" - }, - "Harshness": { - "normal": "Normal", - "harsh": "Harsh", - "veryHarsh": "Very Harsh" - }, - "Tome": { - "FIELDS": { - "language": { - "label": "Language" - }, - "settings": { - "label": "Settings" - }, - "studyTime": { - "label": "Study Time" - }, - "sanLoss": { - "label": "SAN Loss" - }, - "unnaturalSkill": { - "label": "Unnatural Skill" - }, - "rituals": { - "label": "Rituals" - }, - "minimumEra": { - "label": "Minimum Era" - }, - "otherBenefits": { - "label": "Other Benefits" - }, - "creationDate": { - "label": "Creation Date" - }, - "description": { - "label": "Description" - } - }, - "Label": { - "tomeDetails": "Tome Details" - }, - "Button": { - "addRitual": "Add Ritual" - } - }, - "Ritual": { - "Simple": "Simple", - "Complex": "Complex", - "Elaborate": "Elaborate", - "FIELDS": { - "ritualType": { - "label": "Type" - }, - "studyTime": { - "label": "Study time" - }, - "studySAN": { - "label": "Study SAN" - }, - "activationTime": { - "label": "Activation time" - }, - "activationSAN": { - "label": "Activation SAN" - }, - "activationWP": { - "label": "Activation WP" + "isAdvantage": { + "label": "Provide advantage" }, "description": { "label": "Description" @@ -451,64 +369,20 @@ }, "Label": { "creature": "Creature", - "Rituals": "Rituals", - "Tomes": "Tomes", - "otherBenefits": "Other Benefits", "Unarmed": "Unarmed", - "Cured": "Cured", - "Uncured": "Uncured", - "nudgedRoll": "Nudged Roll", - "selectNewValue": "Select the new value", - "wpCost": "WP Cost", - "Hand": "Hand", - "Stowed": "Stowed", - "Storage": "Storage", - "resourceRating": "Resource rating", - "Resources": "Resources", "multiplier": "Multiplier", - "setBP": "Set BP", "Vehicle": "Vehicle", - "Speed": "Speed", - "Slow": "Slow", - "Fast": "Fast", - "Average": "Average", - "None": "None", - "Pristine": "Pristine", - "Worn": "Worn", - "Junk": "Junk", - "resources": "Resources", - "resourceChecks": "Resource Checks", - "sanBPShort": "BP", - "tempInsanity": "Temp. Insanity", - "distinguishingFeatures": "Distinguishing Features", "titleSkill": "Skill Roll", "titleWeapon": "Weapon Roll", - "titleCharacteristic": "Characteristic Roll", - "titleSAN": "SAN Roll", "biodata": "Biodata", "skill": "Skill", "modifier": "Modifier", "rollView": "Roll View", - "protagonist": "Protagonist", - "characteristics": "Characteristics", + "character": "Character", "description": "Description", - "strShort": "STR", - "dexShort": "DEX", - "intShort": "INT", - "powShort": "POW", - "conShort": "CON", - "chaShort": "CHA", - "strLong": "Strength", - "dexLong": "Dexterity", - "intLong": "Intelligence", - "powLong": "Power", - "conLong": "Constitution", - "chaLong": "Charisma", "total": "Total", "skills": "Skills", - "gear": "Gear", "damage": "Damage", - "resource": "Resource", "armor": "Armor", "malus": "Malus", "experience": "Experience", @@ -518,53 +392,24 @@ "notes": "Notes", "weapons": "Weapons", "HP": "HP", - "SAN": "SAN", "current": "Current", "max": "Max", - "recovery": "Recovery", - "violence" : "Violence", - "helplessness": "Helplessness", - "breakingPoint": "Breaking Point", - "willpower": "Willpower", "totalScore": "Total Score", - "exhausted": "Exhausted", "skillRoll": "Skill Roll", - "charRoll": "Characteristic Roll", "finalScore": "Final Score", "failure": "Failure", "success": "Success", "criticalSuccess": "Critical Success", "criticalFailure": "Critical Failure", - "Characteristic": "Characteristic", - "characteristic": "Characteristic", "targetScore": "Target Score", - "gears": "Gears", "armors": "Armors", - "motivations": "Motivations", - "mentalDisorders": "Mental Disorders", - "bonds": "Bonds", - "arcane": "Arcane", - "archetypes": "Archetypes", - "bondType": "Bond Type", - "injuries": "Injuries", + "psionics": "Psionics", + "talents": "Talents", + "languages": "Languages", "damageShort": "Dmg", "status": "Status", - "mentaldisorders": "Mental Disorders", - "newBond": "New Bond", - "newMotivation": "New Motivation", - "newMentalDisorder": "New Mental Disorder", "newWeapon": "New Weapon", - "newArmor": "New Armor", - "newInjury": "New Injury", - "newGear": "New Gear", - "newArcane": "New Arcane", - "newArchetype": "New Archetype", - "newSkill": "New Skill", - "newTome": "New Tome", - "newRitual": "New Ritual" - }, - "ChatMessage": { - "exhausted": "Your protagonist is exhausted. He loses [[/r 1d6]] Willpower Points." + "newArmor": "New Armor" }, "Edit": "Edit", "Delete": "Delete", @@ -575,21 +420,13 @@ "Roll": { "skill": "Skill", "roll": "Roll", - "applyNudge": "Apply", - "cancel": "Cancel", - "nudgeRoll": "Nudge Roll" + "cancel": "Cancel" }, "Tooltip": { - "sanBP": ">5 SAN lost in one roll, temporary insanity. If SAN less reaches BP = a Disorder unconscious Breaking and AND reset BP.", - "setBP": "Set the current Breaking Point based on the current SAN value" }, "Chat": { }, "Notifications": { - "NoWeaponSkill": "No weapon skill found for this weapon. Check Weapon definition or available skills/era", - "NoWeaponType": "No weapon type found for this weapon subtype. Check Weapon definition or available skills/era", - "skillAlreadyExists": "Skill already exists", - "WrongEra": "The era of the item does not match the ear of the system" } } } diff --git a/module/applications/_module.mjs b/module/applications/_module.mjs index d7f7bf8..7761018 100644 --- a/module/applications/_module.mjs +++ b/module/applications/_module.mjs @@ -6,7 +6,7 @@ export { default as FTLNomadLanguageSheet } from "./sheets/language-sheet.mjs" export { default as FTLNomadTalentSheet } from "./sheets/talent-sheet.mjs" export { default as FTLNomadCharacterSheet } from "./sheets/character-sheet.mjs" export { default as FTLNomadEquipmentSheet } from "./sheets/equipment-sheet.mjs" -export { default as FTLNomadNPCSheet } from "./sheets/creature-sheet.mjs" +export { default as FTLNomadCreatureSheet } from "./sheets/creature-sheet.mjs" export { default as FTLNomadImplantSheet } from "./sheets/implant-sheet.mjs" export { default as FTLNomadStarshipSheet } from "./sheets/starship-sheet.mjs" export { default as FTLNomadCreatureTraitSheet } from "./sheets/creature-trait-sheet.mjs" diff --git a/module/applications/sheets/armor-sheet.mjs b/module/applications/sheets/armor-sheet.mjs index 8df0b19..6e0955d 100644 --- a/module/applications/sheets/armor-sheet.mjs +++ b/module/applications/sheets/armor-sheet.mjs @@ -15,13 +15,15 @@ export default class FTLNomadArmorSheet extends FTLNomadItemSheet { /** @override */ static PARTS = { main: { - template: "systems/fvtt-cthulhu-eternal/templates/armor.hbs", + template: "systems/fvtt-ftl-nomad/templates/armor.hbs", }, } /** @override */ async _prepareContext() { const context = await super._prepareContext() + context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true }) + return context } } diff --git a/module/applications/sheets/creature-sheet.mjs b/module/applications/sheets/creature-sheet.mjs index ddd7d9a..611e650 100644 --- a/module/applications/sheets/creature-sheet.mjs +++ b/module/applications/sheets/creature-sheet.mjs @@ -1,6 +1,6 @@ import FTLNomadActorSheet from "./base-actor-sheet.mjs" -export default class FTLNomadNPCSheet extends FTLNomadActorSheet { +export default class FTLNomadCreatureSheet extends FTLNomadActorSheet { /** @override */ static DEFAULT_OPTIONS = { classes: ["npc"], @@ -12,9 +12,9 @@ export default class FTLNomadNPCSheet extends FTLNomadActorSheet { contentClasses: ["npc-content"], }, actions: { - createArmor: FTLNomadNPCSheet.#onCreateArmor, - createWeapon: FTLNomadNPCSheet.#onCreateWeapon, - createSkill: FTLNomadNPCSheet.#onCreateSkill, + createArmor: FTLNomadCreatureSheet.#onCreateArmor, + createWeapon: FTLNomadCreatureSheet.#onCreateWeapon, + createSkill: FTLNomadCreatureSheet.#onCreateSkill, }, } @@ -22,16 +22,16 @@ export default class FTLNomadNPCSheet extends FTLNomadActorSheet { /** @override */ static PARTS = { main: { - template: "systems/fvtt-cthulhu-eternal/templates/npc-main.hbs", + template: "systems/fvtt-ftl-nomad/templates/creature-main.hbs", }, tabs: { template: "templates/generic/tab-navigation.hbs", }, skills: { - template: "systems/fvtt-cthulhu-eternal/templates/npc-skills.hbs", + template: "systems/fvtt-ftl-nomad/templates/creature-skills.hbs", }, biography: { - template: "systems/fvtt-cthulhu-eternal/templates/npc-biography.hbs", + template: "systems/fvtt-ftl-nomad/templates/creature-biography.hbs", }, } diff --git a/module/applications/sheets/equipment-sheet.mjs b/module/applications/sheets/equipment-sheet.mjs index 5cb5888..b4760ff 100644 --- a/module/applications/sheets/equipment-sheet.mjs +++ b/module/applications/sheets/equipment-sheet.mjs @@ -15,13 +15,14 @@ export default class FTLNomadEquipmentSheet extends FTLNomadItemSheet { /** @override */ static PARTS = { main: { - template: "systems/fvtt-cthulhu-eternal/templates/equipment.hbs", + template: "systems/fvtt-ftl-nomad/templates/equipment.hbs", }, } /** @override */ async _prepareContext() { const context = await super._prepareContext() + context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true }) return context } } diff --git a/module/applications/sheets/implant-sheet.mjs b/module/applications/sheets/implant-sheet.mjs index 25c0fc1..24ad720 100644 --- a/module/applications/sheets/implant-sheet.mjs +++ b/module/applications/sheets/implant-sheet.mjs @@ -15,7 +15,7 @@ export default class FTLNomadImplantSheet extends FTLNomadItemSheet { /** @override */ static PARTS = { main: { - template: "systems/fvtt-cthulhu-eternal/templates/implant.hbs", + template: "systems/fvtt-ftl-nomad/templates/implant.hbs", }, } diff --git a/module/applications/sheets/language-sheet.mjs b/module/applications/sheets/language-sheet.mjs index f387771..4173173 100644 --- a/module/applications/sheets/language-sheet.mjs +++ b/module/applications/sheets/language-sheet.mjs @@ -15,7 +15,7 @@ export default class FTLNomadLanguageSheet extends FTLNomadItemSheet { /** @override */ static PARTS = { main: { - template: "systems/fvtt-cthulhu-eternal/templates/language.hbs", + template: "systems/fvtt-ftl-nomad/templates/language.hbs", }, } diff --git a/module/applications/sheets/psionic-sheet.mjs b/module/applications/sheets/psionic-sheet.mjs index 15eeb23..55a000c 100644 --- a/module/applications/sheets/psionic-sheet.mjs +++ b/module/applications/sheets/psionic-sheet.mjs @@ -15,7 +15,7 @@ export default class FTLNomadPsionicSheet extends FTLNomadItemSheet { /** @override */ static PARTS = { main: { - template: "systems/fvtt-cthulhu-eternal/templates/psionic.hbs", + template: "systems/fvtt-ftl-nomad/templates/psionic.hbs", }, } diff --git a/module/applications/sheets/weapon-sheet.mjs b/module/applications/sheets/weapon-sheet.mjs index 60844e6..96948a5 100644 --- a/module/applications/sheets/weapon-sheet.mjs +++ b/module/applications/sheets/weapon-sheet.mjs @@ -15,7 +15,7 @@ export default class FTLNomadWeaponSheet extends FTLNomadItemSheet { /** @override */ static PARTS = { main: { - template: "systems/fvtt-cthulhu-eternal/templates/weapon.hbs", + template: "systems/fvtt-ftl-nomad/templates/weapon.hbs", }, } } diff --git a/module/config/system.mjs b/module/config/system.mjs index 0e4700f..72bc07b 100644 --- a/module/config/system.mjs +++ b/module/config/system.mjs @@ -1,29 +1,18 @@ export const SYSTEM_ID = "fvtt-ftl-nomad" export const ASCII = ` -░ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄ ▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄ ▄ ▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄ ▄ ▄▄▄▄▄▄▄▄▄▄▄ -▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌ ▐░░░░░░░░░░░▌▐░▌ ▐░▌▐░░░░░░░░░░░▌▐░░▌ ▐░▌ ▐░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌ ▐░▌▐░░░░░░░░░░░▌ -▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀▀▀ ▀▀▀▀█░█▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌ ▀▀▀▀█░█▀▀▀▀ ▐░▌ ▐░▌▐░█▀▀▀▀▀▀▀█░▌▐░▌░▌ ▐░▌ ▐░▌ ▀▀▀▀█░█▀▀▀▀ ▐░█▀▀▀▀▀▀▀▀▀ ▐░▌ ▐░▌ ▀▀▀▀█░█▀▀▀▀ -▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌▐░▌▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ -▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄▄▄ ▐░▌ ▐░█▄▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄█░▌ ▐░▌ ▐░█▄▄▄▄▄▄▄█░▌▐░█▄▄▄▄▄▄▄█░▌▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▄▄▄▄▄▄▄▄ ▐░█▄▄▄▄▄▄▄█░▌ ▐░▌ -▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌ ▐░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌ ▐░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌▐░░░░░░░░▌▐░░░░░░░░░░░▌ ▐░▌ -▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀▀▀▀█░▌ ▀▀▀▀▀▀▀▀▀█░▌ ▐░▌ ▐░█▀▀▀▀▀▀▀▀▀ ▐░█▀▀▀▀█░█▀▀ ▐░▌ ▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀█░▌▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀█░▌ ▐░▌ -▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌▐░▌ ▐░▌▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌ ▐░▌ -▐░▌ ▐░▌ ▐░▌ ▄▄▄▄▄▄▄▄▄█░▌ ▐░▌ ▐░█▄▄▄▄▄▄▄▄▄ ▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌▐░▌ ▐░▐░▌ ▐░█▄▄▄▄▄▄▄▄▄ ▄▄▄▄█░█▄▄▄▄ ▐░█▄▄▄▄▄▄▄█░▌▐░▌ ▐░▌ ▐░▌ -▐░▌ ▐░▌ ▐░▌▐░░░░░░░░░░░▌ ▐░▌ ▐░░░░░░░░░░░▌▐░▌ ▐░▌ ▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌▐░▌ ▐░░▌ ▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░░▌▐░▌ ▐░▌ ▐░▌ - ▀ ▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀ ▀ ▀ ▀ ▀ ▀ ▀ ▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀ ▀ - ▄▄ ▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄ ▄▄ ▄▄▄▄▄▄▄▄▄▄▄ ▄▄▄▄▄▄▄▄▄▄ -▐░░▌ ▐░▌▐░░░░░░░░░░░▌▐░░▌ ▐░░▌▐░░░░░░░░░░░▌▐░░░░░░░░░░▌ -▐░▌░▌ ▐░▌▐░█▀▀▀▀▀▀▀█░▌▐░▌░▌ ▐░▐░▌▐░█▀▀▀▀▀▀▀█░▌▐░█▀▀▀▀▀▀▀█░▌ -▐░▌▐░▌ ▐░▌▐░▌ ▐░▌▐░▌▐░▌ ▐░▌▐░▌▐░▌ ▐░▌▐░▌ ▐░▌ -▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌▐░▌ ▐░▐░▌ ▐░▌▐░█▄▄▄▄▄▄▄█░▌▐░▌ ▐░▌ -▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌▐░▌ ▐░▌ ▐░▌▐░░░░░░░░░░░▌▐░▌ ▐░▌ -▐░▌ ▐░▌ ▐░▌▐░▌ ▐░▌▐░▌ ▀ ▐░▌▐░█▀▀▀▀▀▀▀█░▌▐░▌ ▐░▌ -▐░▌ ▐░▌▐░▌▐░▌ ▐░▌▐░▌ ▐░▌▐░▌ ▐░▌▐░▌ ▐░▌ -▐░▌ ▐░▐░▌▐░█▄▄▄▄▄▄▄█░▌▐░▌ ▐░▌▐░▌ ▐░▌▐░█▄▄▄▄▄▄▄█░▌ -▐░▌ ▐░░▌▐░░░░░░░░░░░▌▐░▌ ▐░▌▐░▌ ▐░▌▐░░░░░░░░░░▌ - ▀ ▀▀ ▀▀▀▀▀▀▀▀▀▀▀ ▀ ▀ ▀ ▀ ▀▀▀▀▀▀▀▀▀▀ - ` + +░▒▓████████▓▒░▒▓████████▓▒░▒▓█▓▒░ ░▒▓███████▓▒░ ░▒▓██████▓▒░░▒▓██████████████▓▒░ ░▒▓██████▓▒░░▒▓███████▓▒░ +░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓██▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ +░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓██▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ +░▒▓██████▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓████████▓▒░▒▓█▓▒░░▒▓█▓▒░ +░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓██▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ +░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓██▓▒░ ░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░ +░▒▓█▓▒░ ░▒▓█▓▒░ ░▒▓████████▓▒░ ░▒▓█▓▒░░▒▓█▓▒░░▒▓██████▓▒░░▒▓█▓▒░░▒▓█▓▒░░▒▓█▓▒░▒▓█▓▒░░▒▓█▓▒░▒▓███████▓▒░ + + + +` export const SKILLS = { "combat": { id: "combat", label: "FTLNOMAD.Skill.Combat" }, @@ -52,11 +41,61 @@ export const TECH_AGES = { "cosmic": { id: "cosmic", label: "FTLNOMAD.TechAge.Cosmic", level: 13 } } + +export const WEAPON_TYPES = { + "melee": { id: "melee", label: "FTLNOMAD.Weapon.Types.Melee" }, + "projectile": { id: "projectile", label: "FTLNOMAD.Weapon.Types.Projectile" }, + "energy": { id: "energy", label: "FTLNOMAD.Weapon.Types.Energy" }, + "heavy": { id: "heavy", label: "FTLNOMAD.Weapon.Types.Heavy" }, + "grenade": { id: "grenade", label: "FTLNOMAD.Weapon.Types.Grenade" }, + "vehicle": { id: "vehicle", label: "FTLNOMAD.Weapon.Types.Vehicle" } +} export const WEAPON_RANGE = { "melee": { id: "melee", label: "FTLNOMAD.Weapon.Range.Melee" }, "handgun": { id: "handgun", label: "FTLNOMAD.Weapon.Range.Handgun" }, "rifle": { id: "rifle", label: "FTLNOMAD.Weapon.Range.Rifle" }, - "longrange": { id: "longrange", label: "FTLNOMAD.Weapon.Range.LongRange" }, + "longrange": { id: "longrange", label: "FTLNOMAD.Weapon.Range.LongRange" } +} + +export const TRIAGE_RESULTS = { + "none": { id: "none", dice:0, label: "FTLNOMAD.TriageResults.None" }, + "death": { id: "death", dice:3, label: "FTLNOMAD.TriageResults.Death" }, + "critical": { id: "critical", dice:4, label: "FTLNOMAD.TriageResults.Critical" }, + "severe": { id: "severe", dice:7, label: "FTLNOMAD.TriageResults.Severe" }, + "moderate": { id: "moderate", dice:10, label: "FTLNOMAD.TriageResults.Moderate" }, + "fleshwound": { id: "fleshwound", dice:12, label: "FTLNOMAD.TriageResults.FleshWound" } +} + +export const CREATURE_TERRAIN_TYPES = { + "cave": { id: "cave", label: "FTLNOMAD.Creature.Terrain.Cave", niche:0, size: 0 }, + "coast": { id: "coast", label: "FTLNOMAD.Creature.Terrain.Coast", niche:1, size: 0 }, + "desert": { id: "desert", label: "FTLNOMAD.Creature.Terrain.Desert", niche:-1, size: -1 }, + "forest": { id: "forest", label: "FTLNOMAD.Creature.Terrain.Forest", niche:1, size: 1 }, + "jungle": { id: "jungle", label: "FTLNOMAD.Creature.Terrain.Jungle", niche:1, size: 1 }, + "mixed": { id: "mixed", label: "FTLNOMAD.Creature.Terrain.Mixed", niche:0, size: 0 }, + "mountain": { id: "mountain", label: "FTLNOMAD.Creature.Terrain.Mountain", niche:-1, size: -1 }, + "ocean": { id: "ocean", label: "FTLNOMAD.Creature.Terrain.Ocean", niche:-1, size: 1 }, + "river": { id: "river", label: "FTLNOMAD.Creature.Terrain.River", niche:1, size: 0 }, + "ruins": { id: "ruins", label: "FTLNOMAD.Creature.Terrain.Ruins", niche:0, size: 1 }, + "savannah": { id: "savannah", label: "FTLNOMAD.Creature.Terrain.Savannah", niche:0, size: 1 }, + "shallows": { id: "shallows", label: "FTLNOMAD.Creature.Terrain.Shallows", niche:1, size: 0 }, + "swamp": { id: "swamp", label: "FTLNOMAD.Creature.Terrain.Swamp", niche:1, size: 1 } +} + +export const CREATURE_NICHES = { + "prey": { id: "prey", label: "FTLNOMAD.Creature.Niche.Prey" }, + "opportunist": { id: "opportunist", label: "FTLNOMAD.Creature.Niche.Opportunist" }, + "herbivore": { id: "herbivore", label: "FTLNOMAD.Creature.Niche.Herbivore" }, + "predator": { id: "predator", label: "FTLNOMAD.Creature.Niche.Predator" } +} + +export const CREATURE_SIZES = { + "tiny": { id: "tiny", label: "FTLNOMAD.Creature.Size.Tiny" }, + "small": { id: "small", label: "FTLNOMAD.Creature.Size.Small" }, + "medium": { id: "medium", label: "FTLNOMAD.Creature.Size.Medium" }, + "large": { id: "large", label: "FTLNOMAD.Creature.Size.Large" }, + "giant": { id: "giant", label: "FTLNOMAD.Creature.Size.Giant" }, + "titanic": { id: "titanic", label: "FTLNOMAD.Creature.Size.Titanic" } } /** @@ -66,7 +105,11 @@ export const WEAPON_RANGE = { export const SYSTEM = { id: SYSTEM_ID, TECH_AGES, + WEAPON_TYPES, WEAPON_RANGE, + TRIAGE_RESULTS, + CREATURE_TERRAIN_TYPES, + CREATURE_SIZES, SKILLS, ASCII } diff --git a/module/models/armor.mjs b/module/models/armor.mjs index 44b81ef..88f78a8 100644 --- a/module/models/armor.mjs +++ b/module/models/armor.mjs @@ -7,7 +7,7 @@ export default class FTLNomadArmor extends foundry.abstract.TypeDataModel { schema.description = new fields.HTMLField({ required: true, textSearch: true }) - schema.techage = new fields.StringField({ required: true, choices: SYSTEM.TECH_AGES, initial : "latenuclear" }) + schema.techAge = new fields.StringField({ required: true, choices: SYSTEM.TECH_AGES, initial : "lateatomic" }) schema.protection = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }) schema.enc = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }) schema.cost = new fields.NumberField({ required: true, initial: 0, min: 0 }) diff --git a/module/models/character.mjs b/module/models/character.mjs index 98a7da7..21bf424 100644 --- a/module/models/character.mjs +++ b/module/models/character.mjs @@ -17,7 +17,7 @@ export default class FTLNomadProtagonist extends foundry.abstract.TypeDataModel // Carac const skillField = (label) => { const schema = { - value: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), + value: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0, max: 5 }), } return new fields.SchemaField(schema, { label }) } @@ -29,177 +29,48 @@ export default class FTLNomadProtagonist extends foundry.abstract.TypeDataModel }, {}), ) - schema.wp = new fields.SchemaField({ + schema.heroPoints = new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }) + + 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: 1, min: 0 }), + triageResults: new fields.StringField({ required: true, nullable: false, initial: "none", choices: SYSTEM.TRIAGE_RESULTS }) + }) + + schema.enc = new fields.SchemaField({ value: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), - max: new fields.NumberField({ ...requiredInteger, initial: 3, min: 0 }), - exhausted: new fields.BooleanField({ required: true, initial: false }) + max: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }) }) - schema.hp = new fields.SchemaField({ - value: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }), - max: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }), - stunned: new fields.BooleanField({ required: true, initial: false }) - }) - - schema.san = new fields.SchemaField({ - value: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), - max: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), - recovery: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), - violence: new fields.ArrayField(new fields.BooleanField(), { required: true, initial: [false, false, false], min:3, max:3}), - helplessness: new fields.ArrayField(new fields.BooleanField(), { required: true, initial: [false, false, false], min:3, max:3 }), - breakingPoint: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), - insanity: new fields.StringField({ required: true, nullable: false, initial: "none", choices:SYSTEM.INSANITY }), - }) - - schema.damageBonus = new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }) - - schema.resources = new fields.SchemaField({ - value: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), // Unused but kept for compatibility - permanentRating: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), - hand: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), - currentHand: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), - stowed: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), - currentStowed: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), - storage: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), - currentStorage: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), - checks: new fields.ArrayField(new fields.BooleanField(), { required: true, initial: [false, false, false], min:3, max:3 }), - nbValidChecks: new fields.NumberField({ ...requiredInteger, initial: 0, 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.biodata = new fields.SchemaField({ age: new fields.NumberField({ ...requiredInteger, initial: 15, min: 6 }), - archetype: new fields.StringField({ required: true, nullable: false, initial: "" }), height: new fields.NumberField({ ...requiredInteger, initial: 170, min: 50 }), 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: "" }), eyes: new fields.StringField({ required: true, nullable: false, initial: "" }), - hair: new fields.StringField({ required: true, nullable: false, initial: "" }), - harshness: new fields.StringField({ required: true, nullable: false, initial: "normal", choices:SYSTEM.HARSHNESS }), - adaptedToViolence: new fields.BooleanField({ required: true, initial: false }), - adaptedToHelplessness: new fields.BooleanField({ required: true, initial: false }) + hair: new fields.StringField({ required: true, nullable: false, initial: "" }) }) return schema } /** @override */ - static LOCALIZATION_PREFIXES = ["FTLNOMAD.Protagonist"] + static LOCALIZATION_PREFIXES = ["FTLNOMAD.Character"] prepareDerivedData() { super.prepareDerivedData(); - let updates = {} - if ( this.wp.max !== this.characteristics.pow.value) { - updates[`system.wp.max`] = this.characteristics.pow.value - } - let hpMax = Math.round((this.characteristics.con.value + this.characteristics.str.value) / 2) - if ( this.hp.max !== hpMax) { - updates[`system.hp.max`] = hpMax - } - - // Get Unnatural skill for MAX SAN - let unnatural = this.parent.items.find(i => i.type === "skill" && i.name.toLowerCase() === game.i18n.localize("FTLNOMAD.Skill.Unnatural").toLowerCase()) - let minus = 0 - if (unnatural) { - minus = unnatural.system.skillTotal - } - let maxSan = Math.max(99 - minus, 0) - if ( this.san.max !== maxSan) { - updates[`system.san.max`] = maxSan - } - - let recoverySan = this.characteristics.pow.value * 5 - if (recoverySan > this.san.max) { - recoverySan = this.san.max - } - if ( this.san.recovery !== recoverySan) { - updates[`system.san.recovery`] = recoverySan - } - - let dmgBonus = 0 - if (this.characteristics.str.value <= 4) { - dmgBonus = -2 - } else if (this.characteristics.str.value <= 8) { - dmgBonus = -1 - } else if (this.characteristics.str.value <= 12) { - dmgBonus = 0 - } else if (this.characteristics.str.value <= 16) { - dmgBonus = 1 - } else if (this.characteristics.str.value <= 20) { - dmgBonus = 2 - } - if ( this.damageBonus !== dmgBonus) { - updates[`system.damageBonus`] = dmgBonus - } - - // Sanity check - if (this.san.value > this.san.max) { - updates[`system.san.value`] = this.san.max - } - if (this.wp.value > this.wp.max) { - updates[`system.wp.value`] = this.wp.max - } - if (this.hp.value > this.hp.max) { - updates[`system.hp.value`] = this.hp.max - } - - if (this.resources.permanentRating < 0) { - updates[`system.resources.permanentRating`] = 0 - } - - let resourceIndex = Math.max(Math.min(this.resources.permanentRating, 20), 0) - let breakdown = SYSTEM.RESOURCE_BREAKDOWN[resourceIndex] - if (this.resources.hand !== breakdown.hand) { - updates[`system.resources.hand`] = breakdown.hand - } - if (this.resources.stowed !== breakdown.stowed) { - updates[`system.resources.stowed`] = breakdown.stowed - } - if (this.resources.storage !== breakdown.storage) { - updates[`system.resources.storage`] = breakdown.storage + (this.resources.permanentRating - resourceIndex) - } - if (this.resources.nbValidChecks !== breakdown.checks) { - updates[`system.resources.nbValidChecks`] = breakdown.checks - } - - if (Object.keys(updates).length > 0) { - this.parent.update(updates) - } - } - - isLowWP() { - return this.wp.value <= 2 - } - - isZeroWP() { - return this.wp.value === 0 - } - - isExhausted() { - return this.wp.exhausted - } - - modifyWP(value) { - let updates = {} - let wp = Math.max(Math.min(this.wp.value + value, this.wp.max), 0) - if ( this.wp.value !== wp) { - updates[`system.wp.value`] = wp - } - if (Object.keys(updates).length > 0) { - this.parent.update(updates) - } - } - - setBP() { - let updates = {} - let bp = Math.max(this.san.value - this.characteristics.pow.value, 0) - if ( this.san.breakingPoint !== bp) { - updates[`system.san.breakingPoint`] = bp - } - if (Object.keys(updates).length > 0) { - this.parent.update(updates) - } } /** */ @@ -216,9 +87,6 @@ export default class FTLNomadProtagonist extends foundry.abstract.TypeDataModel let roll = await CthulhuEternalRoll.prompt({ rollType, rollItem, - isLowWP: this.isLowWP(), - isZeroWP: this.isZeroWP(), - isExhausted: this.isExhausted(), actorId: this.parent.id, actorName: this.parent.name, actorImage: this.parent.img, diff --git a/module/models/creature-ability.mjs b/module/models/creature-ability.mjs index 8f274f0..d4b9895 100644 --- a/module/models/creature-ability.mjs +++ b/module/models/creature-ability.mjs @@ -5,12 +5,12 @@ export default class FTLNomadCreatureAbility extends foundry.abstract.TypeDataMo const fields = foundry.data.fields; const schema = {}; - schema.isadvantage = new fields.BooleanField({ required: true, initial: false }); + schema.isAdvantage = new fields.BooleanField({ required: true, initial: false }); schema.description = new fields.HTMLField({ required: true, textSearch: true }) return schema; } /** @override */ - static LOCALIZATION_PREFIXES = ["FTLNomad.CreatureAbility"]; + static LOCALIZATION_PREFIXES = ["FTLNOMAD.CreatureAbility"]; } \ No newline at end of file diff --git a/module/models/creature-trait.mjs b/module/models/creature-trait.mjs index 5f417c8..15e2385 100644 --- a/module/models/creature-trait.mjs +++ b/module/models/creature-trait.mjs @@ -5,12 +5,12 @@ export default class FTLNomadCreatureTrait extends foundry.abstract.TypeDataMode const fields = foundry.data.fields; const schema = {}; - schema.isadvantage = new fields.BooleanField({ required: true, initial: false }); + schema.isAdvantage = new fields.BooleanField({ required: true, initial: false }); schema.description = new fields.HTMLField({ required: true, textSearch: true }) return schema; } /** @override */ - static LOCALIZATION_PREFIXES = ["FTLNomad.CreatureTrait"]; + static LOCALIZATION_PREFIXES = ["FTLNOMAD.CreatureTrait"]; } \ No newline at end of file diff --git a/module/models/creature.mjs b/module/models/creature.mjs index 9cee692..9e13bd8 100644 --- a/module/models/creature.mjs +++ b/module/models/creature.mjs @@ -7,38 +7,31 @@ export default class FTLNomadCreature extends foundry.abstract.TypeDataModel { const requiredInteger = { required: true, nullable: false, integer: true } const schema = {} - // Carac - const characteristicField = (label) => { + const skillField = (label) => { const schema = { - value: new fields.NumberField({ ...requiredInteger, initial: 3, min: 0 }), - feature: new fields.StringField({ required: true, nullable: false, initial: "" }) + value: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0, max: 5 }), + enabled: new fields.BooleanField({ required: true, initial: true }), } return new fields.SchemaField(schema, { label }) } - schema.characteristics = new fields.SchemaField( - Object.values(SYSTEM.CHARACTERISTICS).reduce((obj, characteristic) => { - obj[characteristic.id] = characteristicField(characteristic.label) + schema.skills = new fields.SchemaField( + Object.values(SYSTEM.SKILLS).reduce((obj, characteristic) => { + obj[characteristic.id] = skillField(characteristic.label) return obj }, {}), ) - schema.wp = new fields.SchemaField({ - value: new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }), - max: new fields.NumberField({ ...requiredInteger, initial: 3, min: 0 }), - exhausted: new fields.BooleanField({ required: true, initial: false }) - }) + schema.terrain = new fields.StringField({ required: true, nullable: false, initial: "cave", choices: SYSTEM.CREATURE_TERRAIN_TYPES }) + schema.niche = new fields.StringField({ required: true, nullable: false, initial: "prey", choices: SYSTEM.CREATURE_NICHES }) + schema.size = new fields.StringField({ required: true, nullable: false, initial: "small", choices: SYSTEM.CREATURE_SIZES }) - schema.hp = new fields.SchemaField({ - value: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }), - max: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }) + schema.numberAppearing = new fields.StringField({ required: true, initial: "1d6" }) + schema.health = new fields.SchemaField({ + staminaValue: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }), + staminaMax: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }), }) - schema.movement = new fields.StringField({ required: true, initial: "" }) - schema.sanLoss = new fields.StringField({ required: true, initial: "1/1D6" }) - - schema.armor = new fields.StringField({ required: true, initial: "" }) - schema.size = new fields.StringField({ required: true, initial: "medium", choices: SYSTEM.CREATURE_SIZE }) - schema.damageBonus = new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }) + schema.damage = new fields.StringField({ required: true, initial: "1d6" }) schema.description = new fields.HTMLField({ required: true, textSearch: true }) schema.notes = new fields.HTMLField({ required: true, textSearch: true }) @@ -47,7 +40,7 @@ export default class FTLNomadCreature extends foundry.abstract.TypeDataModel { } /** @override */ - static LOCALIZATION_PREFIXES = ["FTLNOMAD.NPC"] + static LOCALIZATION_PREFIXES = ["FTLNOMAD.Creature"] /** */ /** diff --git a/module/models/equipment.mjs b/module/models/equipment.mjs index 409e6cc..023fc48 100644 --- a/module/models/equipment.mjs +++ b/module/models/equipment.mjs @@ -8,7 +8,7 @@ export default class FTLNomadEquipment extends foundry.abstract.TypeDataModel { schema.description = new fields.HTMLField({ required: true, textSearch: true }) - schema.techage = new fields.StringField({ required: true, choices: SYSTEM.TECH_AGES, initial : "latenuclear" }) + schema.techAge = new fields.StringField({ required: true, choices: SYSTEM.TECH_AGES, initial : "lateatomic" }) schema.enc = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }) schema.cost = new fields.NumberField({ required: true, initial: 0, min: 0 }) diff --git a/module/models/implant.mjs b/module/models/implant.mjs index ca4f15b..63fa80c 100644 --- a/module/models/implant.mjs +++ b/module/models/implant.mjs @@ -8,7 +8,7 @@ export default class FTLNomadImplant extends foundry.abstract.TypeDataModel { schema.description = new fields.HTMLField({ required: true, textSearch: true }) - schema.techage = new fields.StringField({ required: true, choices: SYSTEM.TECH_AGES, initial : "latenuclear" }) + schema.techAge = new fields.StringField({ required: true, choices: SYSTEM.TECH_AGES, initial : "lateatomic" }) schema.enc = new fields.NumberField({ ...requiredInteger, required: true, initial: 0, min: 0 }) schema.cost = new fields.NumberField({ required: true, initial: 0, min: 0 }) diff --git a/module/models/starship.mjs b/module/models/starship.mjs index 49b964b..1e40dfd 100644 --- a/module/models/starship.mjs +++ b/module/models/starship.mjs @@ -26,6 +26,6 @@ export default class FTLNomadStarship extends foundry.abstract.TypeDataModel { } /** @override */ - static LOCALIZATION_PREFIXES = ["FTLNomad.Starship"] + static LOCALIZATION_PREFIXES = ["FTLNOMAD.Starship"] } diff --git a/module/models/talent.mjs b/module/models/talent.mjs index 5add64e..1521da0 100644 --- a/module/models/talent.mjs +++ b/module/models/talent.mjs @@ -5,7 +5,7 @@ export default class FTLNomadTalent extends foundry.abstract.TypeDataModel { const fields = foundry.data.fields; const schema = {}; - schema.isadvantage = new fields.BooleanField({ required: true, initial: false }); + schema.isAdvantage = new fields.BooleanField({ required: true, initial: false }); schema.description = new fields.HTMLField({ required: true, textSearch: true }) @@ -13,5 +13,5 @@ export default class FTLNomadTalent extends foundry.abstract.TypeDataModel { } /** @override */ - static LOCALIZATION_PREFIXES = ["FTLNomad.Talent"]; + static LOCALIZATION_PREFIXES = ["FTLNOMAD.Talent"]; } \ No newline at end of file diff --git a/module/models/vehicle.mjs b/module/models/vehicle.mjs index 630a634..ab2da4d 100644 --- a/module/models/vehicle.mjs +++ b/module/models/vehicle.mjs @@ -7,19 +7,18 @@ export default class FTLNomadVehicle extends foundry.abstract.TypeDataModel { const requiredInteger = { required: true, nullable: false, integer: true } const schema = {} - schema.hp = new fields.SchemaField({ - value: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }), - max: new fields.NumberField({ ...requiredInteger, initial: 1, min: 0 }) - }) + schema.agility = new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }) + schema.armor = new fields.StringField({ required: true, initial: "" }) + schema.cargo = new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }) + schema.crew = new fields.NumberField({ ...requiredInteger, initial: 1, min: 1 }) + schema.force = new fields.NumberField({ ...requiredInteger, initial: 1, min: 1 }) + schema.range = new fields.StringField({ required: true, initial: "1d6" }) + schema.speed = new fields.StringField({ required: true, initial: "1d6" }) + schema.techAge = new fields.StringField({ required: true, initial: "1d6" }) + schema.tonnage = new fields.NumberField({ required: true, initial: 1, min: 0 }) - schema.armor = new fields.NumberField({ ...requiredInteger, initial: 0, min: 0 }) - schema.surfaceSpeed = new fields.StringField({ required: true, initial: "slow", choices: SYSTEM.VEHICLE_SPEED }) - schema.airSpeed = new fields.StringField({ required: true, initial: "none", choices: SYSTEM.VEHICLE_SPEED }) - schema.state = new fields.StringField({ required: true, initial: "pristine", choices: SYSTEM.EQUIPMENT_STATES }) + schema.cost = new fields.NumberField({ required: true, initial: 0, min: 0 }) - schema.crew = new fields.ArrayField(new fields.StringField(), { required: false, initial: [], min:0 }) - schema.resourceLevel = new fields.NumberField({ required: true, initial: 0, min: 0 }) - schema.description = new fields.HTMLField({ required: true, textSearch: true }) schema.notes = new fields.HTMLField({ required: true, textSearch: true }) @@ -27,6 +26,6 @@ export default class FTLNomadVehicle extends foundry.abstract.TypeDataModel { } /** @override */ - static LOCALIZATION_PREFIXES = ["FTLNomad.Vehicle"] + static LOCALIZATION_PREFIXES = ["FTLNOMAD.Vehicle"] } diff --git a/module/models/weapon.mjs b/module/models/weapon.mjs index 8b65181..662ed7f 100644 --- a/module/models/weapon.mjs +++ b/module/models/weapon.mjs @@ -7,7 +7,9 @@ export default class FTLNomadWeapon extends foundry.abstract.TypeDataModel { const requiredInteger = { required: true, nullable: false, integer: true } schema.description = new fields.HTMLField({ required: true, textSearch: true }) - + + schema.techAge = new fields.StringField({ required: true, choices: SYSTEM.TECH_AGES, initial : "lateatomic" }) + schema.weaponType = new fields.StringField({ required: true, initial: "melee", choices: SYSTEM.WEAPON_TYPES }) schema.rangeType = new fields.StringField({ required: true, initial: "melee", choices: SYSTEM.WEAPON_RANGE }) schema.damage = new fields.StringField({required: true, initial: "1d6"}) diff --git a/styles/fvtt-ftl-nomad.less b/styles/fvtt-ftl-nomad.less index dbf730e..7229a7e 100644 --- a/styles/fvtt-ftl-nomad.less +++ b/styles/fvtt-ftl-nomad.less @@ -10,6 +10,7 @@ @import "weapon.less"; @import "armor.less"; @import "equipment.less"; + @import "implant.less"; @import "language.less"; @import "psionic.less"; @import "talent.less"; diff --git a/templates/armor.hbs b/templates/armor.hbs index 2ab138f..2f5bec2 100644 --- a/templates/armor.hbs +++ b/templates/armor.hbs @@ -6,20 +6,15 @@
- + \ No newline at end of file diff --git a/templates/creature-ability.hbs b/templates/creature-ability.hbs index 2804ac8..e4f83a8 100644 --- a/templates/creature-ability.hbs +++ b/templates/creature-ability.hbs @@ -5,17 +5,13 @@ + \ No newline at end of file diff --git a/templates/creature-trait.hbs b/templates/creature-trait.hbs index 275871f..d97ad40 100644 --- a/templates/creature-trait.hbs +++ b/templates/creature-trait.hbs @@ -5,7 +5,7 @@