diff --git a/.idea/codeStyles/Project.xml b/.idea/codeStyles/Project.xml new file mode 100644 index 0000000..4b76211 --- /dev/null +++ b/.idea/codeStyles/Project.xml @@ -0,0 +1,56 @@ + + + + \ No newline at end of file diff --git a/.idea/codeStyles/codeStyleConfig.xml b/.idea/codeStyles/codeStyleConfig.xml index a55e7a1..79ee123 100644 --- a/.idea/codeStyles/codeStyleConfig.xml +++ b/.idea/codeStyles/codeStyleConfig.xml @@ -1,5 +1,5 @@ - \ No newline at end of file diff --git a/.idea/prettier.xml b/.idea/prettier.xml new file mode 100644 index 0000000..727b8b5 --- /dev/null +++ b/.idea/prettier.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..b03998d --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,6 @@ +{ + "bracketSpacing": true, + "tabWidth": 4, + "trailingComma": "none", + "semi": false +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 399de2c..4eb8701 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,52 @@ -## Pre-release 0.0.X -**April 14th 2021** -- Added dynamic token image setting -- Added drow race - -**April 12th 2021** -- Added subtype grafts -- Added master/good skills added from creature subtype grafts -- Added innate spells from creature subtype grafts -- Added more junk items \ No newline at end of file +## 0.1.6 +### Added +- Construct type monsters +- Monsters can now have ranged weapon + +### Changed +- Under the hood refactor + +### Fixed +- Save bonuses should now be properly applied + +# 0.1.5 +###Changed +- Added description to elf creature type graft when choosing elf race + +## 0.1.4 +###Added +- Hobgoblin race +- Vermin type monsters + +###Changed +- No longer generates additional "junk" items for monsters, only NPCs +- Max CR is now `5` + +###Fixed +- Bug which prevented the correct amount of good/master skills being assigned + +## 0.1.3 +###Added +- Populator panel +- Half-elf, Half-orc, gnoll race +- Basic animal monster generation (CR `1/3` to `3`) + +###Changed +- Unique names for Lashunta +- Token name set to match actor +- Brute adjustment special ability now affects attack damage + +###Fixed +- Fixed bug with automatic token icons +- Typo in half-orc race +- Adjustment abilities are now being randomized +- Fixed bug with special ability count + +## Pre-release +###Added +- Dynamic token image setting +- Drow race +- Subtype grafts +- Master/good skills added from creature subtype grafts +- Innate spells from creature subtype grafts +- More junk items \ No newline at end of file diff --git a/README.md b/README.md index 0b40185..95e41d9 100644 --- a/README.md +++ b/README.md @@ -7,13 +7,13 @@ Populate your Starfinder world with life of all shapes and sizes. - Intelligently randomizes the token image of NPCs when placed in a scene (optional setting, *off* by default) ## FAQ: -*Q: Does Populator just pick a random race?* +*Q: Does Populator just pick a random race when quickly making an NPC?* -**A: No I follow the distribution of races found on Absalom Station. This is also why I am focusing on a subset of races for now. This will soon be customizable.** +**A: No I follow the distribution of races found on Absalom Station. As of `0.1.X` you can create an NPC of your specific desired race. *Q: What races does populator currently support?* -**A: Android, Dwarf, Drow, Gnome, Gnoll, Human, Halfling, Kasatha, Lashunta, Nuar, Skittermander, Shirren, Vesk, Ysoki** +**A: Android, Dwarf, Drow, Gnome, Gnoll, Half-Elf, Half-Orc, Halfling, Human, Hobgoblin, Kasatha, Lashunta, Nuar, Skittermander, Shirren, Vesk, Ysoki** *Q: So how do you pick attribute and skill modifiers?* @@ -25,7 +25,7 @@ Populate your Starfinder world with life of all shapes and sizes. *Q: Why doesn't populator generate monsters though!?* -**A: Because that's hard and I haven't done it yet** +**A: ~~Because that's hard and I haven't done it yet~~ Work is underway, you can experiment with what's currently live to create basic monsters starting in release `0.1.X` ** *Q: This would be way better if it did this other specific thing!* diff --git a/dist/Adjuster.js b/dist/Adjuster.js new file mode 100644 index 0000000..e45e0d1 --- /dev/null +++ b/dist/Adjuster.js @@ -0,0 +1,2 @@ +"use strict"; +//# sourceMappingURL=Adjuster.js.map \ No newline at end of file diff --git a/dist/Adjuster.js.map b/dist/Adjuster.js.map new file mode 100644 index 0000000..69f8a1a --- /dev/null +++ b/dist/Adjuster.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Adjuster.js","sourceRoot":"","sources":["../src/models/Adjuster.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/IGoods.js b/dist/IGoods.js new file mode 100644 index 0000000..8abd473 --- /dev/null +++ b/dist/IGoods.js @@ -0,0 +1,2 @@ +"use strict"; +//# sourceMappingURL=IGoods.js.map \ No newline at end of file diff --git a/dist/IGoods.js.map b/dist/IGoods.js.map new file mode 100644 index 0000000..9433f68 --- /dev/null +++ b/dist/IGoods.js.map @@ -0,0 +1 @@ +{"version":3,"file":"IGoods.js","sourceRoot":"","sources":["../src/models/Interfaces/IGoods.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/IItem.js b/dist/IItem.js new file mode 100644 index 0000000..b8e4dcb --- /dev/null +++ b/dist/IItem.js @@ -0,0 +1,2 @@ +"use strict"; +//# sourceMappingURL=IItem.js.map \ No newline at end of file diff --git a/dist/IItem.js.map b/dist/IItem.js.map new file mode 100644 index 0000000..5c6afbd --- /dev/null +++ b/dist/IItem.js.map @@ -0,0 +1 @@ +{"version":3,"file":"IItem.js","sourceRoot":"","sources":["../src/models/Interfaces/IItem.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/IMainArrayRow.js b/dist/IMainArrayRow.js new file mode 100644 index 0000000..c420112 --- /dev/null +++ b/dist/IMainArrayRow.js @@ -0,0 +1,2 @@ +"use strict"; +//# sourceMappingURL=IMainArrayRow.js.map \ No newline at end of file diff --git a/dist/IMainArrayRow.js.map b/dist/IMainArrayRow.js.map new file mode 100644 index 0000000..860edb9 --- /dev/null +++ b/dist/IMainArrayRow.js.map @@ -0,0 +1 @@ +{"version":3,"file":"IMainArrayRow.js","sourceRoot":"","sources":["../src/models/Interfaces/IMainArrayRow.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/IWeapon.js b/dist/IWeapon.js new file mode 100644 index 0000000..75dd84f --- /dev/null +++ b/dist/IWeapon.js @@ -0,0 +1,2 @@ +"use strict"; +//# sourceMappingURL=IWeapon.js.map \ No newline at end of file diff --git a/dist/IWeapon.js.map b/dist/IWeapon.js.map new file mode 100644 index 0000000..4975963 --- /dev/null +++ b/dist/IWeapon.js.map @@ -0,0 +1 @@ +{"version":3,"file":"IWeapon.js","sourceRoot":"","sources":["../src/models/Interfaces/IWeapon.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/ItemFactory.js b/dist/ItemFactory.js deleted file mode 100644 index a94955e..0000000 --- a/dist/ItemFactory.js +++ /dev/null @@ -1,78 +0,0 @@ -import { Randomizer } from "./Randomizer.js"; -import { Items } from "./data/Items.js"; -export class ItemFactory { - // Default is 3 - static makeItemCollection(size = 3) { - var itemCollection = []; - // Every NPC has 2 random items (for now, may change) - for (var i = 0; i < size; i++) { - let items = [ - { item: Items.credStickTemplate, percentage: 0.05 }, - { item: Items.upbTemplate, percentage: 0.05 }, - { item: Items.lighterTemplate, percentage: 0.05 }, - { item: Items.purfumeTemplate, percentage: 0.05 }, - { item: Items.intoxicantMinorTemplate, percentage: 0.05 }, - { item: ItemFactory.makeJunk(), percentage: 0.75 } - ]; - itemCollection.push(Randomizer.pickWinningItem(items).item); - } - return itemCollection; - } - static makeJunk() { - var junkItem = Items.junk[Math.floor(Math.random() * Items.junk.length)]; - return { - "name": junkItem.name, - "type": "goods", - "data": { - "description": { - "chat": "", - "gmnotes": "", - "short": "", - "value": "

" + junkItem.description + "

", - "unidentified": "" - }, - "source": "Populator", - "type": "", - "quantity": 1, - "bulk": "L", - "price": 0, - "level": 1, - "attuned": false, - "equipped": false, - "equippable": false, - "identified": true, - "attributes": { - "sturdy": false, - "customBuilt": false, - "size": "medium", - "dex": { - "mod": "" - }, - "hp": { - "value": 6, - "max": "" - }, - "hardness": { - "value": "" - }, - "ac": { - "value": "" - } - }, - "modifiers": [], - "damage": { - "parts": [] - }, - "critical": { - "parts": [] - }, - "abilityMods": { - "parts": [] - } - }, - "flags": {}, - "effects": [] - }; - } -} -//# sourceMappingURL=ItemFactory.js.map \ No newline at end of file diff --git a/dist/ItemFactory.js.map b/dist/ItemFactory.js.map deleted file mode 100644 index d9bd8ce..0000000 --- a/dist/ItemFactory.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"ItemFactory.js","sourceRoot":"","sources":["../src/ItemFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAExC,MAAM,OAAO,WAAW;IAEpB,eAAe;IACf,MAAM,CAAC,kBAAkB,CAAC,IAAI,GAAG,CAAC;QAE9B,IAAI,cAAc,GAAG,EAAE,CAAC;QACxB,qDAAqD;QACrD,KAAI,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;YAE1B,IAAI,KAAK,GAAG;gBACR,EAAC,IAAI,EAAE,KAAK,CAAC,iBAAiB,EAAE,UAAU,EAAE,IAAI,EAAC;gBACjD,EAAC,IAAI,EAAE,KAAK,CAAC,WAAW,EAAE,UAAU,EAAE,IAAI,EAAC;gBAC3C,EAAC,IAAI,EAAE,KAAK,CAAC,eAAe,EAAE,UAAU,EAAE,IAAI,EAAC;gBAC/C,EAAC,IAAI,EAAE,KAAK,CAAC,eAAe,EAAE,UAAU,EAAE,IAAI,EAAC;gBAC/C,EAAC,IAAI,EAAE,KAAK,CAAC,uBAAuB,EAAE,UAAU,EAAE,IAAI,EAAC;gBACvD,EAAC,IAAI,EAAE,WAAW,CAAC,QAAQ,EAAE,EAAE,UAAU,EAAE,IAAI,EAAC;aACnD,CAAA;YAED,cAAc,CAAC,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC,IAAI,CAAE,CAAC;SAChE;QACD,OAAO,cAAc,CAAC;IAC1B,CAAC;IAED,MAAM,CAAC,QAAQ;QAEX,IAAI,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC;QAEzE,OAAO;YACH,MAAM,EAAE,QAAQ,CAAC,IAAI;YACrB,MAAM,EAAE,OAAO;YACf,MAAM,EAAE;gBACJ,aAAa,EAAE;oBACX,MAAM,EAAE,EAAE;oBACV,SAAS,EAAE,EAAE;oBACb,OAAO,EAAE,EAAE;oBACX,OAAO,EAAE,KAAK,GAAG,QAAQ,CAAC,WAAW,GAAG,MAAM;oBAC9C,cAAc,EAAE,EAAE;iBACrB;gBACD,QAAQ,EAAE,WAAW;gBACrB,MAAM,EAAE,EAAE;gBACV,UAAU,EAAE,CAAC;gBACb,MAAM,EAAE,GAAG;gBACX,OAAO,EAAE,CAAC;gBACV,OAAO,EAAE,CAAC;gBACV,SAAS,EAAE,KAAK;gBAChB,UAAU,EAAE,KAAK;gBACjB,YAAY,EAAE,KAAK;gBACnB,YAAY,EAAE,IAAI;gBAClB,YAAY,EAAE;oBACV,QAAQ,EAAE,KAAK;oBACf,aAAa,EAAE,KAAK;oBACpB,MAAM,EAAE,QAAQ;oBAChB,KAAK,EAAE;wBACH,KAAK,EAAE,EAAE;qBACZ;oBACD,IAAI,EAAE;wBACF,OAAO,EAAE,CAAC;wBACV,KAAK,EAAE,EAAE;qBACZ;oBACD,UAAU,EAAE;wBACR,OAAO,EAAE,EAAE;qBACd;oBACD,IAAI,EAAE;wBACF,OAAO,EAAE,EAAE;qBACd;iBACJ;gBACD,WAAW,EAAE,EAAE;gBACf,QAAQ,EAAE;oBACN,OAAO,EAAE,EAAE;iBACd;gBACD,UAAU,EAAE;oBACR,OAAO,EAAE,EAAE;iBACd;gBACD,aAAa,EAAE;oBACX,OAAO,EAAE,EAAE;iBACd;aACJ;YACD,OAAO,EAAE,EAAE;YACX,SAAS,EAAE,EAAE;SAChB,CAAA;IACL,CAAC;CACJ"} \ No newline at end of file diff --git a/dist/MainArrayRow.js b/dist/MainArrayRow.js new file mode 100644 index 0000000..5ccde06 --- /dev/null +++ b/dist/MainArrayRow.js @@ -0,0 +1,2 @@ +"use strict"; +//# sourceMappingURL=MainArrayRow.js.map \ No newline at end of file diff --git a/dist/MainArrayRow.js.map b/dist/MainArrayRow.js.map new file mode 100644 index 0000000..4d3fad2 --- /dev/null +++ b/dist/MainArrayRow.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MainArrayRow.js","sourceRoot":"","sources":["../src/models/MainArrayRow.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/NPCFactory.js b/dist/NPCFactory.js deleted file mode 100644 index 741d353..0000000 --- a/dist/NPCFactory.js +++ /dev/null @@ -1,383 +0,0 @@ -import { Utils } from "./utils/Uils.js"; -import { Grafts } from "./data/Grafts.js"; -import { ItemFactory } from "./ItemFactory.js"; -import { MonsterCreation } from "./data/MonsterCreation.js"; -import { BundledRaces, Races } from "./data/Races.js"; -import { Randomizer } from "./Randomizer.js"; -import { WeaponFactory } from "./WeaponFactory.js"; -export class NPCFactory { - // Produces a non-hostile NPC from a subset of races - static async makeNonHostile(options = { CR: "1/3", dynamicTokenImages: false, race: null, gender: null }) { - let actorData = { name: "Generated Actor", type: "npc" }; - let actor = await Actor.create(actorData); - let actorDescription = {}; - actorDescription["data.details.biography.value"] = "

Created by Populator.

"; - await actor.update(actorDescription); - let context = { - options: options, - itemsToAdd: [], - arrays: { main: null, attack: null }, - // Skills - masterSkill: [], - goodSkill: [], - // Attacks - hasNaturalWeapons: false - }; - // Look up array - context.arrays.main = MonsterCreation.arrays.expert.main[options.CR]; - context.arrays.attack = MonsterCreation.arrays.expert.attack[options.CR]; - // Fill in details - await this.setNameGenderAndRace(actor, context); - await this.setDetails(actor, context); - await this.setAttributes(actor, context); - await this.setGrafts(actor, context); - await this.setSkills(actor, context); - await this.setWeapons(actor, context); - await this.setInventory(actor, context); - await this.setToken(actor, context); - // Add all items - let actorUpdate = {}; - actorUpdate["items"] = context.itemsToAdd; - await actor.update(actorUpdate); - } - static async setNameGenderAndRace(actor, context) { - if (!context.options.race) { - context.options.race = Randomizer.randomRace(); - } - if (!context.options.gender) { - context.options.gender = Randomizer.randomGender(); - } - let actorUpdate = {}; - var raceData; - // We stub in gnolls until they are included in sfrpg - if (context.options.race.name == "gnoll") { - raceData = BundledRaces.gnoll; - } - else { - raceData = await Utils.fuzzyFindRaceAsync(context.options.race.name); - } - // Race item - await this.clean(raceData); - context.itemsToAdd.push(raceData); - // Gender - actorUpdate["data.details.raceAndGrafts"] = context.options.gender + " " + context.options.race.name + ", grafts:"; // Grafts will be filled in as applied - // Name - actorUpdate["name"] = Randomizer.randomName(context.options.race.name, context.options.gender); - // Update actor - await actor.update(actorUpdate); - } - static async setDetails(actor, context) { - let race = Races.nonCombatantRaces[context.options.race.name]; - let actorUpdate = {}; - // Source - actorUpdate["data.details.source"] = "Populator"; - // CR - var CR = context.options.CR; - if (CR === "1/3") { - CR = (1 / 3); - } - if (CR === "1/2") { - CR = 0.5; - } - actorUpdate["data.details.cr"] = CR; - // Alignment - actorUpdate["data.details.alignment"] = Randomizer.randomAlignment(); - // Languages - var languages = ["common"]; - if (race.languages) { - languages.push(...race.languages); - } - actorUpdate["data.traits.languages.value"] = languages; - // Update actor - await actor.update(actorUpdate); - } - static async setAttributes(actor, context) { - var _a; - let array = context.arrays.main; - let actorUpdate = {}; - // Size - actorUpdate["data.traits.size"] = context.options.race.size; - // Hands - if (context.options.race.arms != undefined) { - actorUpdate["data.attributes.arms"] = context.options.race.arms; - } - // Reach - // TODO: Reach should be decided by grafts - actorUpdate["data.attributes.reach"] = 5; - // Set HP - actorUpdate["data.attributes.hp.value"] = array.HP; - actorUpdate["data.attributes.hp.max"] = array.HP; - // Set SP (should be 0) - actorUpdate["data.attributes.sp.max"] = 0; - // Set RP (should be 0) - actorUpdate["data.attributes.rp.max"] = 0; - // Set KAC - actorUpdate["data.attributes.kac.value"] = array.KAC; - // Set EAC - actorUpdate["data.attributes.eac.value"] = array.EAC; - // Set reflex save - actorUpdate["data.attributes.reflex.bonus"] = array.reflex; - // Set fort save - actorUpdate["data.attributes.fort.bonus"] = array.fort; - // Set will save - actorUpdate["data.attributes.will.bonus"] = array.will; - // Set ability modifiers - var attributes = ["cha", "con", "dex", "int", "str", "wis"]; - // We randomize which abilities are buffed - Utils.shuffleArray(attributes); - actorUpdate["data.abilities." + attributes[0] + ".mod"] = array.abilityMods[0]; - actorUpdate["data.abilities." + attributes[1] + ".mod"] = array.abilityMods[1]; - actorUpdate["data.abilities." + attributes[2] + ".mod"] = array.abilityMods[2]; - // Set initiative modifier (be dex modifier) - actorUpdate["data.attributes.init.total"] = (_a = actorUpdate["data.abilities.dex.mod"]) !== null && _a !== void 0 ? _a : 0; - // Update actor - await actor.update(actorUpdate); - } - static async setGrafts(actor, context) { - let actorUpdate = {}; - let race = context.options.race; - await this.applyCreatureTypeGraft(actor, context, race.creatureTypeGraft); - if (race.creatureSubtypeGraft) { - await this.applyCreatureSubtypeGraft(actor, context, race.creatureSubtypeGraft); - // Apply type in "()" format - actorUpdate["data.details.type"] = race.creatureTypeGraft.name + " (" + race.creatureSubtypeGraft + ")"; - } - else { - // Apply type in "" format - actorUpdate["data.details.type"] = race.creatureTypeGraft.name; - } - // Update actor - await actor.update(actorUpdate); - } - static async applyCreatureTypeGraft(actor, context, graft) { - let actorUpdate = {}; - if (graft === Grafts.creatureType.humanoid) { - // Applies a +2 to a random saving throw - var saves = ["reflex", "fort", "will"]; - Utils.shuffleArray(saves); - let save = saves[0]; - actorUpdate["data.attributes." + save + ".bonus"] = actor.data.data.attributes[save].value + 2; - } - else if (graft === Grafts.creatureType.monstrousHumanoid) { - // Applies a +2 to reflex & will - // TODO: +1 to all attacks - actorUpdate["data.attributes.reflex.bonus"] = actor.data.data.attributes.reflex.value + 2; - actorUpdate["data.attributes.will.bonus"] = actor.data.data.attributes.will.value + 2; - // Set traits - actorUpdate["data.traits.senses"] = "darkvision 60 ft."; - } - actorUpdate["data.details.raceAndGrafts"] = actor.data.data.details.raceAndGrafts + " " + graft.name; - // Update actor - await actor.update(actorUpdate); - } - static async applyCreatureSubtypeGraft(actor, context, graft) { - let actorUpdate = {}; - // Set as 1 per day - function addOncePerDayInnateSpell(spell) { - spell.data.uses.value = 1; - spell.data.uses.max = 1; - spell.data.uses.per = "day"; - spell.data.preparation.mode = "innate"; - context.itemsToAdd.push(spell); - } - function addAtWillInnateSpell(spell) { - spell.data.preparation.mode = "innate"; - context.itemsToAdd.push(spell); - } - if (graft === Grafts.creatureSubtype.android) { - //Senses - actorUpdate["data.traits.senses"] = "darkvision 60 ft.; low-light vision"; - } - else if (graft === Grafts.creatureSubtype.dwarf) { - //Senses - actorUpdate["data.traits.senses"] = "darkvision 60 ft."; - } - else if (graft === Grafts.creatureSubtype.elf) { - // Elves can be `drow`, `elven` or `half-elven` race - // NOTE: Currently assumes `drow` - // TODO: Implement traits for elf/half-elf races - //Senses - actorUpdate["data.traits.senses"] = "darkvision 60 ft."; - // Drow magic at will innate spells - let dancingLights = await Utils.fuzzyFindSpellAsync("dancing lights"); - let detectMagic = await Utils.fuzzyFindSpellAsync("detect magic"); - addAtWillInnateSpell(dancingLights); - addAtWillInnateSpell(detectMagic); - // Add immunities - actorUpdate["data.traits.ci.custom"] = "drow immunities"; - // Perception as a master skill - context.masterSkill.push("per"); - } - else if (graft === Grafts.creatureSubtype.gnoll) { - // Senses - actorUpdate["data.traits.senses"] = "blindsense (scent) 30 ft.; darvision 60 ft."; - // Natural weapons - context.hasNaturalWeapons = true; - // Survival as a master skill - context.masterSkill.push("sur"); - } - else if (graft === Grafts.creatureSubtype.gnome) { - //Senses - actorUpdate["data.traits.senses"] = "low-light vision"; - // Gnome magic once per day innate spells - let dancingLights = await Utils.fuzzyFindSpellAsync("dancing lights"); - let ghostSound = await Utils.fuzzyFindSpellAsync("ghost sound"); - let tokenSpell = await Utils.fuzzyFindSpellAsync("token spell"); - addOncePerDayInnateSpell(dancingLights); - addOncePerDayInnateSpell(ghostSound); - addOncePerDayInnateSpell(tokenSpell); - // Culture as a master skill - context.masterSkill.push("cul"); - } - else if (graft === Grafts.creatureSubtype.halfling) { - // Perception and Stealth as master skills - context.masterSkill.push("ste"); - context.masterSkill.push("per"); - // Athletics and Acrobatics as good skills - context.goodSkill.push("acr"); - context.goodSkill.push("ath"); - } - else if (graft === Grafts.creatureSubtype.human) { - // Nothing applied - } - else if (graft === Grafts.creatureSubtype.kasatha) { - // Acrobatics and Athletics master skills - context.masterSkill.push("acr"); - context.masterSkill.push("ath"); - // culture as good skills - context.goodSkill.push("cul"); - } - else if (graft === Grafts.creatureSubtype.lashunta) { - // Languages - actorUpdate["data.traits.languages.custom"] = "limited telepathy 30 ft."; - // Innate spells - let detectThoughts = await Utils.fuzzyFindSpellAsync("detect thoughts"); - let daze = await Utils.fuzzyFindSpellAsync("daze"); - let psychokineticHand = await Utils.fuzzyFindSpellAsync("psychokinetic hand"); - addOncePerDayInnateSpell(detectThoughts); - addAtWillInnateSpell(daze); - addAtWillInnateSpell(psychokineticHand); - } - else if (graft === Grafts.creatureSubtype.shirren) { - // Languages - actorUpdate["data.traits.languages.custom"] = "limited telepathy 30 ft."; - // Culture and Diplomacy as good skills - context.goodSkill.push("cul"); - context.goodSkill.push("dip"); - } - else if (graft === Grafts.creatureSubtype.skittermander) { - // Nothing applied - } - else if (graft === Grafts.creatureSubtype.vesk) { - //Senses - actorUpdate["data.traits.senses"] = "low-light vision"; - // Natural weapons - context.hasNaturalWeapons = true; - } - else if (graft === Grafts.creatureSubtype.ysoki) { - //Senses - actorUpdate["data.traits.senses"] = "darkvision 60 ft."; - // Engineering and stealth as master skills - context.masterSkill.push("eng"); - context.masterSkill.push("ste"); - // Survival as good skill - context.goodSkill.push("sur"); - } - // Append subtype graft to graft list - actorUpdate["data.details.raceAndGrafts"] = actor.data.data.details.raceAndGrafts + ", " + graft; - // Update actor - await actor.update(actorUpdate); - } - static async setSkills(actor, context) { - let array = context.arrays.main; - let actorUpdate = {}; - // All skills minus perception (always a `good` skill, and profession) - // TODO: Support profession skills - var skillsToBuff = ["acr", "ath", "blu", "com", "cul", "dip", "dis", "eng", "int", "lsc", "med", "mys", "phs", "pil", "sen", "sle", "ste", "sur"]; - // Remove any skills we are buffing due to grafts - skillsToBuff = skillsToBuff.filter(function (skill) { - return !context.masterSkill.includes(skill) && !context.goodSkill.includes(skill); - }); - Utils.shuffleArray(skillsToBuff); - // Apply good skill mod to perception - actorUpdate["data.skills.per.mod"] = array.goodSkill.mod; - actorUpdate["data.skills.per.enabled"] = true; - // NOTE: We do this step after the above buff to perception as some grafts make perception a master skill and - // we want that to override the above in that case. - // Apply fixed master/good skills (from grafts) - for (let masterSkill of context.masterSkill) { - actorUpdate["data.skills." + masterSkill + ".mod"] = array.masterSkill.mod; - actorUpdate["data.skills." + masterSkill + ".enabled"] = true; - } - for (let goodSkill of context.goodSkill) { - actorUpdate["data.skills." + goodSkill + ".mod"] = array.goodSkill.mod; - actorUpdate["data.skills." + goodSkill + ".enabled"] = true; - } - // Apply master / good skill mod to random skills (from an array of skills missing graft skills + perception) - var skillIndex = 0; // Used to track progress through array of skills - // Apply mod to master skills - for (let i = 0; i < array.masterSkill.count; i++) { - let skill = skillsToBuff[skillIndex]; - actorUpdate["data.skills." + skill + ".mod"] = array.masterSkill.mod; - actorUpdate["data.skills." + skill + ".enabled"] = true; - skillIndex++; - } - // Apply mod to good skills - for (let i = 0; i < array.goodSkill.count; i++) { - let skill = skillsToBuff[skillIndex]; - actorUpdate["data.skills." + skill + ".mod"] = array.goodSkill.mod; - actorUpdate["data.skills." + skill + ".enabled"] = true; - skillIndex++; - } - // Update actor - await actor.update(actorUpdate); - } - static async setWeapons(actor, context) { - let attackArray = context.arrays.attack; - let highAttackBonus = attackArray.high; - // Add natural weapons or generic unarmed strike - if (context.hasNaturalWeapons === true) { - let naturalWeapons = WeaponFactory.makeNaturalWeapons(); - naturalWeapons.data.attackBonus = highAttackBonus; - naturalWeapons.data.damage = { - "parts": [ - [ - attackArray.standard, - "bludgeoning" - ] - ] - }; - // TODO: If CR3+ add 1.5x (rounded down) to damage - context.itemsToAdd.push(naturalWeapons); - } - else { - // All NPCs have unarmed strike unless they are equiped with natural weapons - let unarmedStrike = WeaponFactory.makeUnarmedStrike(); - unarmedStrike.data.attackBonus = highAttackBonus; - context.itemsToAdd.push(unarmedStrike); - } - } - static async setInventory(actor, context) { - let items = ItemFactory.makeItemCollection(); - context.itemsToAdd.push(...items); - } - static async setToken(actor, context) { - let actorUpdate = {}; - actorUpdate["token.randomImg"] = false; - if (context.options.dynamicTokenImages) { - actorUpdate["token.img"] = "populator/" + context.options.race.name + "/" + context.options.gender + "/*"; - actorUpdate["token.randomImg"] = true; - } - actorUpdate["token.actorLink"] = true; - actorUpdate["token.disposition"] = 0; // Neutral by default - // Update actor - await actor.update(actorUpdate); - } - static async clean(item) { - if (item["_id"]) { - item["sourceId"] = item["_id"]; - delete item["_id"]; - } - } -} -//# sourceMappingURL=NPCFactory.js.map \ No newline at end of file diff --git a/dist/NPCFactory.js.map b/dist/NPCFactory.js.map deleted file mode 100644 index 0bedd3e..0000000 --- a/dist/NPCFactory.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"NPCFactory.js","sourceRoot":"","sources":["../src/NPCFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAO,kBAAkB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC9C,OAAO,EAAE,eAAe,EAAE,MAAO,2BAA2B,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAO,iBAAiB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAGnD,MAAM,OAAO,UAAU;IAEnB,oDAAoD;IACpD,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,GAAG,EAAC,EAAE,EAAE,KAAK,EAAE,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b,IAAI,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;YAC/B,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC;SACtB;IACL,CAAC;CACJ"} \ No newline at end of file diff --git a/dist/Populator.js b/dist/Populator.js index 8d3dfef..6468fbb 100644 --- a/dist/Populator.js +++ b/dist/Populator.js @@ -1,5 +1,6 @@ -import { NPCFactory } from './NPCFactory.js'; +import { NPCFactory } from "./factories/NPCFactory.js"; import PopulatorPanelController from "./controllers/PopulatorPanelController.js"; +import NPCCreationContext from "./models/NPCCreationContext.js"; export class Populator { static ensurePopulateVisible() { if (!game.user.isGM) { @@ -10,25 +11,17 @@ export class Populator { return; } const actorsPanel = document.getElementById("actors"); - const actorFooter = actorsPanel.getElementsByClassName("directory-footer")[0]; + const actorFooter = actorsPanel === null || actorsPanel === void 0 ? void 0 : actorsPanel.getElementsByClassName("directory-footer")[0]; if (actorFooter) { populatorButton = document.createElement("button"); populatorButton.innerHTML = `Populator`; - populatorButton.onclick = ev => Populator.populateClicked(); - populatorButton.oncontextmenu = ev => Populator.populateRightClicked(); + populatorButton.onclick = (ev) => Populator.populateClicked(); + populatorButton.oncontextmenu = (ev) => Populator.populateRightClicked(); const createEntityButton = actorFooter.getElementsByClassName("create-entity")[0]; actorFooter.insertBefore(populatorButton, createEntityButton); } } static async populateClicked() { - // Settings - const defaultCR = game.settings.get("foundryvtt-sfrpg-populator", "defaultCR"); - const dynamicTokenImages = game.settings.get("foundryvtt-sfrpg-populator", "dynamicTokenImages"); - let options = { CR: defaultCR, dynamicTokenImages: dynamicTokenImages, race: null, gender: null }; - await NPCFactory.makeNonHostile(options); - ui.notifications.info("NPC created.", { permanent: false }); - } - static async populateRightClicked() { // Open monster wizard panel //let monsterWizardPanelController = new MonsterWizardPanel1Controller(new NPCCreationContext()); //monsterWizardPanelController.render(true); @@ -36,5 +29,21 @@ export class Populator { let populatorPanel = new PopulatorPanelController(); populatorPanel.render(true); } + static async populateRightClicked() { + // Settings + const defaultCR = game.settings.get("foundryvtt-sfrpg-populator", "defaultCR"); + const dynamicTokenImages = game.settings.get("foundryvtt-sfrpg-populator", "dynamicTokenImages"); + let options = { + CR: defaultCR, + dynamicTokenImages: dynamicTokenImages, + race: null, + gender: null, + }; + let context = new NPCCreationContext(); + context.CR = defaultCR; + context.tokenOptions.dynamicImage = dynamicTokenImages; + await NPCFactory.makeNonHostile(context); + ui.notifications.info("NPC created.", { permanent: false }); + } } //# sourceMappingURL=Populator.js.map \ No newline at end of file diff --git a/dist/Populator.js.map b/dist/Populator.js.map index ff1c8f4..7f08efe 100644 --- a/dist/Populator.js.map +++ b/dist/Populator.js.map @@ -1 +1 @@ -{"version":3,"file":"Populator.js","sourceRoot":"","sources":["../src/Populator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAC5C,OAAO,wBAAwB,MAAM,2CAA2C,CAAC;AAKjF,MAAM,OAAO,SAAS;IAElB,MAAM,CAAC,qBAAqB;QACxB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE;YACjB,OAAO;SACV;QACD,IAAI,eAAe,GAAG,QAAQ,CAAC,cAAc,CAAC,kBAAkB,CAAC,CAAC;QAClE,IAAI,eAAe,IAAI,IAAI,EAAE;YACzB,OAAO;SACV;QACD,MAAM,WAAW,GAAG,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;QACtD,MAAM,WAAW,GAAG,WAAW,CAAC,sBAAsB,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC;QAC9E,IAAI,WAAW,EAAE;YACb,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;YACnD,eAAe,CAAC,SAAS,GAAG,sEAAsE,CAAC;YACnG,eAAe,CAAC,OAAO,GAAG,EAAE,CAAC,EAAE,CAAC,SAAS,CAAC,eAAe,EAAE,CAAC;YAC5D,eAAe,CAAC,aAAa,GAAG,EA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,IAAI,CAAC,QAAQ,CAAC,GAAG,CACxC,4BAA4B,EAC5B,oBAAoB,CACvB,CAAA;QAED,IAAI,OAAO,GAAG;YACV,EAAE,EAAE,SAAS;YACb,kBAAkB,EAAE,kBAAkB;YACtC,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,IAAI;SACf,CAAA;QAED,IAAI,OAAO,GAAG,IAAI,kBAAkB,EAAE,CAAA;QACtC,OAAO,CAAC,EAAE,GAAG,SAAS,CAAA;QACtB,OAAO,CAAC,YAAY,CAAC,YAAY,GAAG,kBAAkB,CAAA;QAEtD,MAAM,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,CAAA;QACxC,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAA;IAC/D,CAAC;CACJ"} \ No newline at end of file diff --git a/dist/Randomizer.js b/dist/Randomizer.js index 38635a2..cf879d7 100644 --- a/dist/Randomizer.js +++ b/dist/Randomizer.js @@ -18,22 +18,32 @@ export class Randomizer { return alignmentDistribution.name; } // NOTE: For now we assume male if no gender provided - static randomName(forRace = null, gender = "male") { + static randomName(context) { + var _a, _b; + let race = context.race; + let creatureType = (_a = context.creatureTypeGraft) === null || _a === void 0 ? void 0 : _a.name; + let gender = (_b = context.gender) !== null && _b !== void 0 ? _b : "male"; var format = Names.default.format; var names = Names.default; // Default is human sounding names // If a race is specified and we have special names for that race - if (forRace && Names[forRace] != undefined) { - names = Names[forRace]; + if (race && Names[race] != undefined) { + names = Names[race]; + } + // Otherwise use creature type to generate name + else if (Names[creatureType] != undefined) { + names = Names[creatureType]; } // var first = names.male.first; // Default is male sounding names var last = names.last; // Gender specific first names - if (gender == "male") { } // do nothing + if (gender == "male") { + } // do nothing else if (gender == "female" && names.female != undefined) { first = names.female.first; } - else if (names.other != undefined) { // If any other gender, and we have `other` defined for the race + else if (names.other != undefined) { + // If any other gender, and we have `other` defined for the race first = names.other.first; } let firstName = first[Math.floor(Math.random() * first.length)]; diff --git a/dist/Randomizer.js.map b/dist/Randomizer.js.map index 1ba9cb9..1e8ed38 100644 --- a/dist/Randomizer.js.map +++ b/dist/Randomizer.js.map @@ -1 +1 @@ -{"version":3,"file":"Randomizer.js","sourceRoot":"","sources":["../src/Randomizer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAA;AAEtD,MAAM,OAAO,UAAU;IAEnB,MAAM,CAAC,UAAU;QACb,IAAI,gBAAgB,GAAG,UAAU,CAAC,eAAe,CAAC,aAAa,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3F,IAAI,IAAI,GAAG,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAC1D,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,YAAY;QACf,IAAI,kBAAkB,GAAG,UAAU,CAAC,eAAe,CAAC,aAAa,CAAC,mBAAmB,CAAC,OAAO,CAAC,CAAC;QAC/F,IAAI,MAAM,GAAG,kBAAkB,CAAC,IAAI,CAAC;QACrC,OAAO,MAAM,CAAC;IAClB,CAAC;IAED,MAAM,CAAC,eAAe;QAClB,IAAI,qBAAqB,GAAG,UAAU,CAAC,eAAe,CAAC,aAAa,CAAC,sBAAsB,CAAC,OAAO,CAAC,CAAC;QACrG,OAAO,qBAAqB,CAAC,IAAI,CAAC;IACtC,CAAC;IAED,qDAAqD;IACrD,MAAM,CAAC,UAAU,CAAC,OAAO,GAAG,IAAI,EAAE,MAAM,GAAG,MAAM;QAE7C,IAAI,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC;QAClC,IAAI,KAAK,GAAG,KAAK,CAAC,OAAO,CAA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"} \ No newline at end of file diff --git a/dist/UniversalCreatureRules.js b/dist/UniversalCreatureRules.js new file mode 100644 index 0000000..0601594 --- /dev/null +++ b/dist/UniversalCreatureRules.js @@ -0,0 +1,2 @@ +"use strict"; +//# sourceMappingURL=UniversalCreatureRules.js.map \ No newline at end of file diff --git a/dist/UniversalCreatureRules.js.map b/dist/UniversalCreatureRules.js.map new file mode 100644 index 0000000..db62a7f --- /dev/null +++ b/dist/UniversalCreatureRules.js.map @@ -0,0 +1 @@ +{"version":3,"file":"UniversalCreatureRules.js","sourceRoot":"","sources":["../src/data/UniversalCreatureRules.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/WeaponFactory.js b/dist/WeaponFactory.js deleted file mode 100644 index c568deb..0000000 --- a/dist/WeaponFactory.js +++ /dev/null @@ -1,423 +0,0 @@ -export class WeaponFactory { - static makeUnarmedStrike() { - return unarmedStrikeTemplate; - } - static makeNaturalWeapons() { - return naturalWeaponsTemplate; - } -} -// Templates -const unarmedStrikeTemplate = { - "name": "Unarmed strike", - "type": "weapon", - "data": { - "description": { - "chat": "", - "gmnotes": "", - "short": "", - "value": "

An unarmed strike can be dealt with any limb or appendage. Unarmed strikes deal nonlethal damage, and the damage from an unarmed strike is considered weapon damage for the purposes of effects that give you a bonus to weapon damage rolls.

", - "unidentified": "" - }, - "source": "CRB pg. 190", - "type": "", - "quantity": null, - "bulk": "-", - "price": 0, - "level": 0, - "attuned": false, - "equipped": true, - "equippable": false, - "identified": true, - "attributes": { - "sturdy": false, - "customBuilt": false, - "size": "medium", - "dex": { - "mod": "" - }, - "hp": { - "value": 6, - "max": "" - }, - "hardness": { - "value": "" - }, - "ac": { - "value": "" - } - }, - "activation": { - "type": "action", - "cost": 1, - "condition": "" - }, - "duration": { - "value": "", - "units": "" - }, - "target": { - "value": "", - "type": "" - }, - "area": { - "value": null, - "units": null, - "shape": "", - "effect": "" - }, - "range": { - "value": null, - "units": "touch", - "additional": "", - "per": "" - }, - "uses": { - "value": 0, - "max": 0, - "per": "" - }, - "isActive": null, - "ability": "", - "actionType": "mwak", - "attackBonus": 0, - "chatFlavor": "", - "critical": { - "parts": [], - "effect": "" - }, - "damage": { - "parts": [ - [ - "1d3", - "bludgeoning" - ] - ] - }, - "formula": "", - "save": { - "type": "", - "dc": "", - "descriptor": "negate" - }, - "descriptors": [], - "capacity": { - "value": 0, - "max": 0 - }, - "usage": { - "value": 0, - "per": "" - }, - "modifiers": [], - "container": { - "contents": [], - "storage": [], - "isOpen": true - }, - "weaponType": "basicM", - "weaponCategory": "", - "special": "", - "properties": { - "one": false, - "two": false, - "amm": false, - "aeon": false, - "analog": false, - "antibiological": false, - "archaic": true, - "aurora": false, - "automatic": false, - "blast": false, - "block": false, - "boost": false, - "breach": false, - "breakdown": false, - "bright": false, - "cluster": false, - "conceal": false, - "deconstruct": false, - "deflect": false, - "disarm": false, - "double": false, - "drainCharge": false, - "echo": false, - "entangle": false, - "explode": false, - "extinguish": false, - "feint": false, - "fiery": false, - "firstArc": false, - "flexibleLine": false, - "force": false, - "freeHands": false, - "fueled": false, - "grapple": false, - "gravitation": false, - "guided": false, - "harrying": false, - "holyWater": false, - "hybrid": false, - "ignite": false, - "indirect": false, - "injection": false, - "integrated": false, - "line": false, - "living": false, - "lockdown": false, - "mind-affecting": false, - "mine": false, - "mire": false, - "modal": false, - "necrotic": false, - "nonlethal": true, - "operative": false, - "penetrating": false, - "polarize": false, - "polymorphic": false, - "powered": false, - "professional": false, - "punchGun": false, - "qreload": false, - "radioactive": false, - "reach": false, - "recall": false, - "regrowth": false, - "relic": false, - "reposition": false, - "shape": false, - "shatter": false, - "shells": false, - "shield": false, - "sniper": false, - "stun": false, - "subtle": false, - "sunder": false, - "swarm": false, - "tail": false, - "teleportive": false, - "thought": false, - "throttle": false, - "thrown": false, - "trip": false, - "unbalancing": false, - "underwater": false, - "unwieldy": false, - "variantBoost": false, - "wideLine": false - }, - "proficient": true, - "abilityMods": { - "parts": [] - } - }, - "flags": {}, - "effects": [] -}; -const naturalWeaponsTemplate = { - "name": "Unarmed strike (natural weapons)", - "type": "weapon", - "data": { - "description": { - "chat": "", - "gmnotes": "", - "short": "", - "value": "

A special unarmed strike that deals lethal damage, doesn’t count as archaic, and threatens squares. Gain a special version of the Weapon Specialization feat with this unarmed strike at 3rd level, allowing them to add 1–1/2 × their character level to their damage rolls for this unarmed strike (instead of just adding their character level, as usual).

", - "unidentified": "" - }, - "source": "CRB pg. 190", - "type": "", - "quantity": null, - "bulk": "-", - "price": 0, - "level": 0, - "attuned": false, - "equipped": true, - "equippable": false, - "identified": true, - "attributes": { - "sturdy": false, - "customBuilt": false, - "size": "medium", - "dex": { - "mod": "" - }, - "hp": { - "value": 6, - "max": "" - }, - "hardness": { - "value": "" - }, - "ac": { - "value": "" - } - }, - "activation": { - "type": "action", - "cost": 1, - "condition": "" - }, - "duration": { - "value": "", - "units": "" - }, - "target": { - "value": "", - "type": "" - }, - "area": { - "value": null, - "units": null, - "shape": "", - "effect": "" - }, - "range": { - "value": null, - "units": "touch", - "additional": "", - "per": "" - }, - "uses": { - "value": 0, - "max": 0, - "per": "" - }, - "isActive": null, - "ability": "", - "actionType": "mwak", - "attackBonus": 0, - "chatFlavor": "", - "critical": { - "parts": [], - "effect": "" - }, - "damage": { - "parts": [ - [ - "1d3", - "bludgeoning" - ] - ] - }, - "formula": "", - "save": { - "type": "", - "dc": "", - "descriptor": "negate" - }, - "descriptors": [], - "capacity": { - "value": 0, - "max": 0 - }, - "usage": { - "value": 0, - "per": "" - }, - "modifiers": [], - "container": { - "contents": [], - "storage": [], - "isOpen": true - }, - "weaponType": "basicM", - "weaponCategory": "", - "special": "", - "properties": { - "one": false, - "two": false, - "amm": false, - "aeon": false, - "analog": false, - "antibiological": false, - "archaic": false, - "aurora": false, - "automatic": false, - "blast": false, - "block": false, - "boost": false, - "breach": false, - "breakdown": false, - "bright": false, - "cluster": false, - "conceal": false, - "deconstruct": false, - "deflect": false, - "disarm": false, - "double": false, - "drainCharge": false, - "echo": false, - "entangle": false, - "explode": false, - "extinguish": false, - "feint": false, - "fiery": false, - "firstArc": false, - "flexibleLine": false, - "force": false, - "freeHands": false, - "fueled": false, - "grapple": false, - "gravitation": false, - "guided": false, - "harrying": false, - "holyWater": false, - "hybrid": false, - "ignite": false, - "indirect": false, - "injection": false, - "integrated": false, - "line": false, - "living": false, - "lockdown": false, - "mind-affecting": false, - "mine": false, - "mire": false, - "modal": false, - "necrotic": false, - "nonlethal": false, - "operative": false, - "penetrating": false, - "polarize": false, - "polymorphic": false, - "powered": false, - "professional": false, - "punchGun": false, - "qreload": false, - "radioactive": false, - "reach": false, - "recall": false, - "regrowth": false, - "relic": false, - "reposition": false, - "shape": false, - "shatter": false, - "shells": false, - "shield": false, - "sniper": false, - "stun": false, - "subtle": false, - "sunder": false, - "swarm": false, - "tail": false, - "teleportive": false, - "thought": false, - "throttle": false, - "thrown": false, - "trip": false, - "unbalancing": false, - "underwater": false, - "unwieldy": false, - "variantBoost": false, - "wideLine": false - }, - "proficient": true, - "abilityMods": { - "parts": [] - } - }, - "flags": {}, - "img": "icons/svg/mystery-man.svg", - "effects": [] -}; -//# sourceMappingURL=WeaponFactory.js.map \ No newline at end of file diff --git a/dist/WeaponFactory.js.map b/dist/WeaponFactory.js.map deleted file mode 100644 index cdcdc20..0000000 --- a/dist/WeaponFactory.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"WeaponFactory.js","sourceRoot":"","sources":["../src/WeaponFactory.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,aAAa;IAEtB,MAAM,CAAC,iBAAiB;QACpB,OAAO,qBAAqB,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,kBAAkB;QACrB,OAAO,sBAAsB,CAAC;IAClC,CAAC;CACJ;AAED,YAAY;AACZ,MAAM,qBAAqB,GAAG;IAC1B,MAAM,EAAE,gBAAgB;IACxB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE;QACJ,aAAa,EAAE;YACX,MAAM,EAAE,EAAE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M,EAAE,KAAK;YACb,OAAO,EAAE,KAAK;YACd,UAAU,EAAE,KAAK;YACjB,WAAW,EAAE,KAAK;YAClB,WAAW,EAAE,KAAK;YAClB,aAAa,EAAE,KAAK;YACpB,UAAU,EAAE,KAAK;YACjB,aAAa,EAAE,KAAK;YACpB,SAAS,EAAE,KAAK;YAChB,cAAc,EAAE,KAAK;YACrB,UAAU,EAAE,KAAK;YACjB,SAAS,EAAE,KAAK;YAChB,aAAa,EAAE,KAAK;YACpB,OAAO,EAAE,KAAK;YACd,QAAQ,EAAE,KAAK;YACf,UAAU,EAAE,KAAK;YACjB,OAAO,EAAE,KAAK;YACd,YAAY,EAAE,KAAK;YACnB,OAAO,EAAE,KAAK;YACd,SAAS,EAAE,KAAK;YAChB,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE,KAAK;YACf,MAAM,EAAE,KAAK;YACb,QAAQ,EAAE,KAAK;YACf,QAAQ,EAAE,KAAK;YACf,OAAO,EAAE,KAAK;YACd,MAAM,EAAE,KAAK;YACb,aAAa,EAAE,KAAK;YACpB,SAAS,EAAE,KAAK;YAChB,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;YACf,MAAM,EAAE,KAAK;YACb,aAAa,EAAE,KAAK;YACpB,YAAY,EAAE,KAAK;YACnB,UAAU,EAAE,KAAK;YACjB,cAAc,EAAE,KAAK;YACrB,UAAU,EAAE,KAAK;SACpB;QACD,YAAY,EAAE,IAAI;QAClB,aAAa,EAAE;YACX,OAAO,EAAE,EAAE;SACd;KACJ;IACD,OAAO,EAAE,EAAE;IACX,KAAK,EAAE,2BAA2B;IAClC,SAAS,EAAE,EAAE;CAChB,CAAA"} \ No newline at end of file diff --git a/dist/controllers/MonsterWizardPanel1Controller.js b/dist/controllers/MonsterWizardPanel1Controller.js index 6239e33..bb02cd8 100644 --- a/dist/controllers/MonsterWizardPanel1Controller.js +++ b/dist/controllers/MonsterWizardPanel1Controller.js @@ -9,6 +9,7 @@ export default class MonsterWizardPanel1Controller extends FormApplication { static get defaultOptions() { return mergeObject(super.defaultOptions, { id: "populator-panel", + classes: ["sfrpg"], template: "modules/foundryvtt-sfrpg-populator/templates/MonsterWizardPanel_1.html", width: 300, height: 300, @@ -24,7 +25,10 @@ export default class MonsterWizardPanel1Controller extends FormApplication { */ activateListeners(html) { // Listener for when a day is clicked - html.find(".nextButton").on('click', this.onNextButtonClicked.bind(this)); + ; + html + .find(".nextButton") + .on("click", this.onNextButtonClicked.bind(this)); //html.find('select[name="selectedArray"]').change(this.onSelectedArrayChanged.bind(this)); } /** diff --git a/dist/controllers/MonsterWizardPanel1Controller.js.map b/dist/controllers/MonsterWizardPanel1Controller.js.map index ec944e8..2d831b8 100644 --- a/dist/controllers/MonsterWizardPanel1Controller.js.map +++ b/dist/controllers/MonsterWizardPanel1Controller.js.map @@ -1 +1 @@ -{"version":3,"file":"MonsterWizardPanel1Controller.js","sourceRoot":"","sources":["../../src/controllers/MonsterWizardPanel1Controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,EAAE,EAAE,eAAe,EAAC,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C,OAAO,6BAA6B,MAAM,oCAAoC,CAAC;AAE/E,MAAM,CAAC,OAAO,OAAO,6BAA8B,SAAQ,eAAe;IAGtE,YAAY,OAA2B;QACnC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;IAC3B,CAAC;IAED,MAAM,KAAK,cAAc;QACrB,OAAO,WAAW,CAAC,KAAK,CAAC,cAAc,EAAG;YACtC,EAAE,EAAE,iBAAiB;YACrB,QAAQ,EAAE,wEAAwE;YAClF,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,GAAG;YACX,WAAW,EAAE,IAAI;YACjB,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,sBAAsB;SAChC,CAAC,CAAC;IACP,CAAC;IAED;;;;OAIG;IACI,iBAAiB,CAAC,IAAyB;QAC9C,qCAAqC;QAC5B,IAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;QACpF,2FAA2F;IAC/F,CAAC;IAED;;;;;OAKG;IACH,OAAO,CAAC,OAAO,GAAG,EAAE;QAChB,OAAO,WAAW,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE;YAChC,OAAO,EAAE,OAAO;YAChB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI;YACpB,MAAM,EAAE,eAAe,CAAC,MAAM;YAC9B,GAAG,EAAE,EAAE;YACP,aAAa,EAAE,MAAM,CAAC,YAAY;SACrC,CAAC,CAAC;IACP,CAAC;IAED,mBAAmB,CAAC,CAAQ;QAExB,IAAI,4BAA4B,GAAG,IAAI,6BAA6B,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnF,4BAA4B,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAE9C,CAAC;IACD,KAAK,CAAC,sBAAsB,CAAC,CAAQ;QACjC,gBAAgB;QAChB,0DAA0D;QAC1D,oBAAoB;QACpB,EAAE;IACN,CAAC;CACJ"} \ No newline at end of file +{"version":3,"file":"MonsterWizardPanel1Controller.js","sourceRoot":"","sources":["../../src/controllers/MonsterWizardPanel1Controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAA;AAChE,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAE1C,OAAO,6BAA6B,MAAM,oCAAoC,CAAA;AAE9E,MAAM,CAAC,OAAO,OAAO,6BAA8B,SAAQ,eAAe;IAGtE,YAAY,OAA2B;QACnC,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IAC1B,CAAC;IAED,MAAM,KAAK,cAAc;QACrB,OAAO,WAAW,CAAC,KAAK,CAAC,cAAc,EAAE;YACrC,EAAE,EAAE,iBAAiB;YACrB,OAAO,EAAE,CAAC,OAAO,CAAC;YAClB,QAAQ,EACJ,wEAAwE;YAC5E,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,GAAG;YACX,WAAW,EAAE,IAAI;YACjB,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,sBAAsB;SAChC,CAAC,CAAA;IACN,CAAC;IAED;;;;OAIG;IACI,iBAAiB,CAAC,IAAyB;QAC9C,qCAAqC;QACrC,CAAC;QAAS,IAAK;aACV,IAAI,CAAC,aAAa,CAAC;aACnB,EAAE,CAAC,OAAO,EAAE,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAA;QACrD,2FAA2F;IAC/F,CAAC;IAED;;;;;OAKG;IACH,OAAO,CAAC,OAAO,GAAG,EAAE;QAChB,OAAO,WAAW,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE;YAChC,OAAO,EAAE,OAAO;YAChB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI;YACpB,MAAM,EAAE,eAAe,CAAC,MAAM;YAC9B,GAAG,EAAE,EAAE;YACP,aAAa,EAAE,MAAM,CAAC,YAAY;SACrC,CAAC,CAAA;IACN,CAAC;IAED,mBAAmB,CAAC,CAAQ;QACxB,IAAI,4BAA4B,GAAG,IAAI,6BAA6B,CAChE,IAAI,CAAC,OAAO,CACf,CAAA;QACD,4BAA4B,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC7C,CAAC;IACD,KAAK,CAAC,sBAAsB,CAAC,CAAQ;QACjC,gBAAgB;QAChB,0DAA0D;QAC1D,oBAAoB;QACpB,EAAE;IACN,CAAC;CACJ"} \ No newline at end of file diff --git a/dist/controllers/MonsterWizardPanel2Controller.js b/dist/controllers/MonsterWizardPanel2Controller.js index 7ab5541..444a84d 100644 --- a/dist/controllers/MonsterWizardPanel2Controller.js +++ b/dist/controllers/MonsterWizardPanel2Controller.js @@ -5,6 +5,7 @@ export default class MonsterWizardPanel2Controller extends FormApplication { static get defaultOptions() { return mergeObject(super.defaultOptions, { id: "populator-panel", + classes: ["sfrpg"], template: "modules/foundryvtt-sfrpg-populator/templates/MonsterWizardPanel_2.html", width: 300, height: 300, diff --git a/dist/controllers/MonsterWizardPanel2Controller.js.map b/dist/controllers/MonsterWizardPanel2Controller.js.map index b90964a..275480b 100644 --- a/dist/controllers/MonsterWizardPanel2Controller.js.map +++ b/dist/controllers/MonsterWizardPanel2Controller.js.map @@ -1 +1 @@ -{"version":3,"file":"MonsterWizardPanel2Controller.js","sourceRoot":"","sources":["../../src/controllers/MonsterWizardPanel2Controller.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,OAAO,6BAA8B,SAAQ,eAAe;IAEtE,YAAY,OAA2B;QACnC,KAAK,EAAE,CAAC;IACZ,CAAC;IAED,MAAM,KAAK,cAAc;QACrB,OAAO,WAAW,CAAC,KAAK,CAAC,cAAc,EAAG;YACtC,EAAE,EAAE,iBAAiB;YACrB,QAAQ,EAAE,wEAAwE;YAClF,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,GAAG;YACX,WAAW,EAAE,IAAI;YACjB,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,sBAAsB;SAChC,CAAC,CAAC;IACP,CAAC;IAED;;;;OAIG;IACI,iBAAiB,CAAC,IAAyB,IAAG,CAAC;IAEtD;;;;;OAKG;IACH,OAAO,CAAC,OAAO,GAAG,EAAE;QAChB,OAAO,WAAW,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE;YAChC,OAAO,EAAE,OAAO;YAChB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI;SACvB,CAAC,CAAC;IACP,CAAC;CAEJ"} \ No newline at end of file +{"version":3,"file":"MonsterWizardPanel2Controller.js","sourceRoot":"","sources":["../../src/controllers/MonsterWizardPanel2Controller.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,OAAO,6BAA8B,SAAQ,eAAe;IACtE,YAAY,OAA2B;QACnC,KAAK,EAAE,CAAA;IACX,CAAC;IAED,MAAM,KAAK,cAAc;QACrB,OAAO,WAAW,CAAC,KAAK,CAAC,cAAc,EAAE;YACrC,EAAE,EAAE,iBAAiB;YACrB,OAAO,EAAE,CAAC,OAAO,CAAC;YAClB,QAAQ,EACJ,wEAAwE;YAC5E,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,GAAG;YACX,WAAW,EAAE,IAAI;YACjB,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,sBAAsB;SAChC,CAAC,CAAA;IACN,CAAC;IAED;;;;OAIG;IACI,iBAAiB,CAAC,IAAyB,IAAG,CAAC;IAEtD;;;;;OAKG;IACH,OAAO,CAAC,OAAO,GAAG,EAAE;QAChB,OAAO,WAAW,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE;YAChC,OAAO,EAAE,OAAO;YAChB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI;SACvB,CAAC,CAAA;IACN,CAAC;CACJ"} \ No newline at end of file diff --git a/dist/controllers/PopulatorPanelController.js b/dist/controllers/PopulatorPanelController.js index c51de95..140d6f4 100644 --- a/dist/controllers/PopulatorPanelController.js +++ b/dist/controllers/PopulatorPanelController.js @@ -1,18 +1,27 @@ import { Races } from "../data/Races.js"; -import { NPCFactory } from "../NPCFactory.js"; -import MonsterWizardPanel1Controller from "./MonsterWizardPanel1Controller.js"; +import { NPCFactory } from "../factories/NPCFactory.js"; import NPCCreationContext from "../models/NPCCreationContext.js"; +import { Grafts } from "../data/Grafts.js"; +import { CreatureTypeGenerationOptions } from "../data/Generator.js"; +import { Subtype, Type } from "../data/Types.js"; export default class PopulatorPanelController extends Application { static get defaultOptions() { return mergeObject(super.defaultOptions, { id: "populator-panel", + classes: ["sfrpg"], template: "modules/foundryvtt-sfrpg-populator/templates/PopulatorPanel.html", width: 300, - height: 300, + height: 350, minimizable: true, resizable: true, title: "Populator", - tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }] + tabs: [ + { + navSelector: ".sheet-tabs", + contentSelector: ".sheet-body", + initial: "description" + } + ] }); } /** @@ -25,7 +34,8 @@ export default class PopulatorPanelController extends Application { return mergeObject(super.getData(), { options: options, isGM: game.user.isGM, - NPCRaces: Races.nonCombatantRaces + NPCRaces: Races.nonCombatantRaces, + supportedCreatureTypes: CreatureTypeGenerationOptions }); } /** @@ -35,29 +45,75 @@ export default class PopulatorPanelController extends Application { */ activateListeners(html) { // Listener for when a day is clicked - html.find(".npcGenerationButton").on('click', this.npcGenerationButtonClicked.bind(this)); - html.find(".monsterGenerationButton").on('click', this.monsterGenerationButtonClicked.bind(this)); + ; + html + .find(".npcGenerationButton") + .on("click", this.npcGenerationButtonClicked.bind(this)); + html + .find(".monsterGenerationButton") + .on("click", this.monsterGenerationButtonClicked.bind(this)); } /** - * Click event when a users clicks on a test button + * Click event when a users clicks on the NPC button * @param {Event} e The click event */ async npcGenerationButtonClicked(e) { - let npcRaceSelectValue = this.element.find('#npcRaceSelect').find(":selected").val(); + let npcRaceSelectValue = this.element + .find("#npcRaceSelect") + .find(":selected") + .val(); let selectedRace = npcRaceSelectValue; // Settings const defaultCR = game.settings.get("foundryvtt-sfrpg-populator", "defaultCR"); const dynamicTokenImages = game.settings.get("foundryvtt-sfrpg-populator", "dynamicTokenImages"); - let options = { CR: defaultCR, dynamicTokenImages: dynamicTokenImages, race: null, gender: null }; - // Quickly creates a specific race - as selected by user - options.race = Races.nonCombatantRaces[selectedRace]; - await NPCFactory.makeNonHostile(options); + // Context + let context = new NPCCreationContext(); + context.CR = defaultCR; + // Validates selected race name + if (Races.nonCombatantRaces[selectedRace]) { + context.race = selectedRace; + } + context.tokenOptions.dynamicImage = dynamicTokenImages; + await NPCFactory.makeNonHostile(context); ui.notifications.info("NPC created.", { permanent: false }); } - monsterGenerationButtonClicked(e) { + /** + * Click event when a users clicks on the Monster button + * @param {Event} e The click event + */ + async monsterGenerationButtonClicked(e) { + var _a; + let monsterTypeSelectValue = this.element + .find("#monsterTypeSelect") + .find(":selected") + .val(); + let selectedType = monsterTypeSelectValue; + // Settings + const defaultCR = game.settings.get("foundryvtt-sfrpg-populator", "defaultCR"); + const dynamicTokenImages = game.settings.get("foundryvtt-sfrpg-populator", "dynamicTokenImages"); + // Context + let context = new NPCCreationContext(); + context.CR = defaultCR; + // Validates selected type + if (Grafts.creatureType[selectedType]) { + let generatorOption = CreatureTypeGenerationOptions[selectedType]; + let typeKey = Type[generatorOption.type]; + context.creatureTypeGraft = Grafts.creatureType[typeKey]; + // TODO: For now we just use the 1st (and only) subttype associated with type + if (((_a = generatorOption.subtypes) === null || _a === void 0 ? void 0 : _a.length) == 1) { + let subtypeKey = Subtype[generatorOption.subtypes[0]]; + context.creatureSubtypeGrafts = [ + Grafts.creatureSubtype[subtypeKey] + ]; + } + context.universalCreatureRules = + generatorOption.universalCreatureRules; + } + await NPCFactory.makeHostile(context); + ui.notifications.info("NPC created.", { permanent: false }); // Open monster wizard panel - let monsterWizardPanelController = new MonsterWizardPanel1Controller(new NPCCreationContext()); - monsterWizardPanelController.render(true); + //let monsterWizardPanelController = new MonsterWizardPanel1Controller(new NPCCreationContext()); + //monsterWizardPanelController.render(true); } } //# sourceMappingURL=PopulatorPanelController.js.map \ No newline at end of file diff --git a/dist/controllers/PopulatorPanelController.js.map b/dist/controllers/PopulatorPanelController.js.map index 7d820a1..472ff4a 100644 --- a/dist/controllers/PopulatorPanelController.js.map +++ b/dist/controllers/PopulatorPanelController.js.map @@ -1 +1 @@ -{"version":3,"file":"PopulatorPanelController.js","sourceRoot":"","sources":["../../src/controllers/PopulatorPanelController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,6BAA6B,MAAM,oCAAoC,CAAC;AAC/E,OAAO,kBAAkB,MA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C/F,IAAI,YAAY,GAAW,kBAA4B,CAAC;QAExD,WAAW;QACX,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,4BAA4B,EAAE,WAAW,CAAC,CAAC;QAC/E,MAAM,kBAAkB,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,4BAA4B,EAAE,oBAAoB,CAAC,CAAC;QAEjG,IAAI,OAAO,GAAG,EAAE,EAAE,EAAE,SAAS,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAC,CAAC;QAEjG,wDAAwD;QACxD,OAAO,CAAC,IAAI,GAAG,KAAK,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;QAErD,MAAM,UAAU,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;QACzC,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;IAChE,CAAC;IAEO,8BAA8B,CAAC,CAAQ;QAC3C,4BAA4B;QAC5B,IAAI,4BAA4B,GAAG,IAAI,6BAA6B,CAAC,IAAI,kBAAkB,EAAE,CAAC,CAAC;QAC/F,4BAA4B,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAC9C,CAAC;CACJ"} \ No newline at end of file +{"version":3,"file":"PopulatorPanelController.js","sourceRoot":"","sources":["../../src/controllers/PopulatorPanelController.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAA;AAEvD,OAAO,kBAEN,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAG1C,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAA;AACpE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;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CAAA;QACtC,OAAO,CAAC,EAAE,GAAG,SAAS,CAAA;QAEtB,0BAA0B;QAC1B,IAAI,MAAM,CAAC,YAAY,CAAC,YAAY,CAAC,EAAE;YACnC,IAAI,eAAe,GAAG,6BAA6B,CAAC,YAAY,CAAC,CAAA;YACjE,IAAI,OAAO,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAA;YAExC,OAAO,CAAC,iBAAiB,GAAG,MAAM,CAAC,YAAY,CAAC,OAAO,CAAC,CAAA;YAExD,6EAA6E;YAC7E,IAAI,CAAA,MAAA,eAAe,CAAC,QAAQ,0CAAE,MAAM,KAAI,CAAC,EAAE;gBACvC,IAAI,UAAU,GAAG,OAAO,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;gBACrD,OAAO,CAAC,qBAAqB,GAAG;oBAC5B,MAAM,CAAC,eAAe,CAAC,UAAU,CAAC;iBACrC,CAAA;aACJ;YAED,OAAO,CAAC,sBAAsB;gBAC1B,eAAe,CAAC,sBAAsB,CAAA;SAC7C;QAED,MAAM,UAAU,CAAC,WAAW,CAAC,OAAO,CAAC,CAAA;QACrC,EAAE,CAAC,aAAa,CAAC,IAAI,CAAC,cAAc,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAA;QAE3D,4BAA4B;QAC5B,iGAAiG;QACjG,4CAA4C;IAChD,CAAC;CACJ"} \ No newline at end of file diff --git a/dist/data/AbilityScore.js b/dist/data/AbilityScore.js new file mode 100644 index 0000000..3fe7eb3 --- /dev/null +++ b/dist/data/AbilityScore.js @@ -0,0 +1,10 @@ +export var AbilityScore; +(function (AbilityScore) { + AbilityScore["charisma"] = "cha"; + AbilityScore["constituion"] = "con"; + AbilityScore["dexterity"] = "dex"; + AbilityScore["intelligence"] = "int"; + AbilityScore["strength"] = "str"; + AbilityScore["wisdom"] = "wis"; +})(AbilityScore || (AbilityScore = {})); +//# sourceMappingURL=AbilityScore.js.map \ No newline at end of file diff --git a/dist/data/AbilityScore.js.map b/dist/data/AbilityScore.js.map new file mode 100644 index 0000000..36639c1 --- /dev/null +++ b/dist/data/AbilityScore.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AbilityScore.js","sourceRoot":"","sources":["../../src/data/AbilityScore.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,YAOX;AAPD,WAAY,YAAY;IACpB,gCAAgB,CAAA;IAChB,mCAAmB,CAAA;IACnB,iCAAiB,CAAA;IACjB,oCAAoB,CAAA;IACpB,gCAAgB,CAAA;IAChB,8BAAc,CAAA;AAClB,CAAC,EAPW,YAAY,KAAZ,YAAY,QAOvB"} \ No newline at end of file diff --git a/dist/data/AbilityScores.js b/dist/data/AbilityScores.js new file mode 100644 index 0000000..4a8e2c5 --- /dev/null +++ b/dist/data/AbilityScores.js @@ -0,0 +1,10 @@ +export var AbilityScore; +(function (AbilityScore) { + AbilityScore["charisma"] = "cha"; + AbilityScore["constituion"] = "con"; + AbilityScore["dexterity"] = "dex"; + AbilityScore["intelligence"] = "int"; + AbilityScore["strength"] = "str"; + AbilityScore["wisdom"] = "wis"; +})(AbilityScore || (AbilityScore = {})); +//# sourceMappingURL=AbilityScores.js.map \ No newline at end of file diff --git a/dist/data/AbilityScores.js.map b/dist/data/AbilityScores.js.map new file mode 100644 index 0000000..53f9332 --- /dev/null +++ b/dist/data/AbilityScores.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AbilityScores.js","sourceRoot":"","sources":["../../src/data/AbilityScores.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,YAOX;AAPD,WAAY,YAAY;IACpB,gCAAgB,CAAA;IAChB,mCAAmB,CAAA;IACnB,iCAAiB,CAAA;IACjB,oCAAoB,CAAA;IACpB,gCAAgB,CAAA;IAChB,8BAAc,CAAA;AAClB,CAAC,EAPW,YAAY,KAAZ,YAAY,QAOvB"} \ No newline at end of file diff --git a/dist/data/Biography.js b/dist/data/Biography.js index 53059e4..3ae204a 100644 --- a/dist/data/Biography.js +++ b/dist/data/Biography.js @@ -2,6 +2,134 @@ export const Biography = { // Collection of professions (inspired by the Alien Character Cards from Paizo) professions: [], // Collection of personality traits (inspired by the Alien Character Cards from Paizo) - personalityTraits: [] + personalityTraits: [ + "abrasive", + "abrupt", + "absentminded", + "adaptable", + "adventurous", + "aggressive", + "agreeable", + "alert", + "aloof", + "ambitious", + "amoral", + "amusing", + "angry", + "anxious", + "apathetic", + "argumentative", + "articulate", + "artificial", + "ascetic", + "assertive", + "athletic", + "attractive", + "authoritarian", + "avant-garde", + "barbaric", + "benevolent", + "bizarre", + "blunt", + "boisterous", + "brilliant", + "businesslike", + "busy", + "calculating", + "callous", + "calm", + "captivating", + "careless", + "caring", + "casual", + "cautious", + "cerebral", + "charismatic", + "charming", + "cheerful", + "childish", + "clean", + "clever", + "clumsy", + "coarse", + "cold", + "compassionate", + "competitive", + "compulsive", + "confident", + "conformist", + "confused", + "conscientious", + "conservative", + "considerate", + "contemplative", + "conventional", + "cooperative", + "courageous", + "courteous", + "cowardly", + "crafty", + "crass", + "creative", + "cruel", + "cultured", + "curious", + "cute", + "cynical", + "daring", + "decadent", + "deceitful", + "decisive", + "dedicated", + "delicate", + "demanding", + "desperate", + "despondent", + "destructive", + "determined", + "devious", + "disloyal", + "disobedient", + "disorderly", + "disrespectful", + "dissolute", + "domineering", + "dramatic", + "dull", + "dutiful", + "ebullient", + "educated", + "egocentric", + "elegant", + "eloquent", + "emotional", + "empathetic", + "energetic", + "enigmatic", + "enthusiastic", + "envious", + "erratic", + "erudite", + "excitable", + "extravagant", + "faithful", + "faithless", + "fanatical", + "fatalistic", + "fickle", + "focused", + "foolish", + "forgetful", + "forgiving", + "formal", + "forthright", + "friendly", + "generous", + "glamorous", + "gloomy", + "greedy", + "grim", + "gullible" + ] }; //# sourceMappingURL=Biography.js.map \ No newline at end of file diff --git a/dist/data/Biography.js.map b/dist/data/Biography.js.map index f334c62..79ac9e9 100644 --- a/dist/data/Biography.js.map +++ b/dist/data/Biography.js.map @@ -1 +1 @@ -{"version":3,"file":"Biography.js","sourceRoot":"","sources":["../../src/data/Biography.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG;IAErB,+EAA+E;IAC/E,WAAW,EAAE,EAAE;IACf,sFAAsF;IACtF,iBAAiB,EAAC,EAAE;CACvB,CAAA"} \ No newline at end of file +{"version":3,"file":"Biography.js","sourceRoot":"","sources":["../../src/data/Biography.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG;IACrB,+EAA+E;IAC/E,WAAW,EAAE,EAAE;IACf,sFAAsF;IACtF,iBAAiB,EAAE;QACf,UAAU;QACV,QAAQ;QACR,cAAc;QACd,WAAW;QACX,aAAa;QACb,YAAY;QACZ,WAAW;QACX,OAAO;QACP,OAAO;QACP,WAAW;QACX,QAAQ;QACR,SAAS;QACT,OAAO;QACP,SAAS;QACT,WAAW;QACX,eAAe;QACf,YAAY;QACZ,YAAY;QACZ,SAAS;QACT,WAAW;QACX,UAAU;QACV,YAAY;QACZ,eAAe;QACf,aAAa;QACb,UAAU;QACV,YAAY;QACZ,SAAS;QACT,OAAO;QACP,YAAY;QACZ,WAAW;QACX,cAAc;QACd,MAAM;QACN,aAAa;QACb,SAAS;QACT,MAAM;QACN,aAAa;QACb,UAAU;QACV,QAAQ;QACR,QAAQ;QACR,UAAU;QACV,UAAU;QACV,aAAa;QACb,UAAU;QACV,UAAU;QACV,UAAU;QACV,OAAO;QACP,QAAQ;QACR,QAAQ;QACR,QAAQ;QACR,MAAM;QACN,eAAe;QACf,aAAa;QACb,YAAY;QACZ,WAAW;QACX,YAAY;QACZ,UAAU;QACV,eAAe;QACf,cAAc;QACd,aAAa;QACb,eAAe;QACf,cAAc;QACd,aAAa;QACb,YAAY;QACZ,WAAW;QACX,UAAU;QACV,QAAQ;QACR,OAAO;QACP,UAAU;QACV,OAAO;QACP,UAAU;QACV,SAAS;QACT,MAAM;QACN,SAAS;QACT,QAAQ;QACR,UAAU;QACV,WAAW;QACX,UAAU;QACV,WAAW;QACX,UAAU;QACV,WAAW;QACX,WAAW;QACX,YAAY;QACZ,aAAa;QACb,YAAY;QACZ,SAAS;QACT,UAAU;QACV,aAAa;QACb,YAAY;QACZ,eAAe;QACf,WAAW;QACX,aAAa;QACb,UAAU;QACV,MAAM;QACN,SAAS;QACT,WAAW;QACX,UAAU;QACV,YAAY;QACZ,SAAS;QACT,UAAU;QACV,WAAW;QACX,YAAY;QACZ,WAAW;QACX,WAAW;QACX,cAAc;QACd,SAAS;QACT,SAAS;QACT,SAAS;QACT,WAAW;QACX,aAAa;QACb,UAAU;QACV,WAAW;QACX,WAAW;QACX,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,WAAW;QACX,WAAW;QACX,QAAQ;QACR,YAAY;QACZ,UAAU;QACV,UAAU;QACV,WAAW;QACX,QAAQ;QACR,QAAQ;QACR,MAAM;QACN,UAAU;KACb;CACJ,CAAA"} \ No newline at end of file diff --git a/dist/data/Generator.js b/dist/data/Generator.js new file mode 100644 index 0000000..55403f6 --- /dev/null +++ b/dist/data/Generator.js @@ -0,0 +1,27 @@ +import { Subtype, Type } from "./Types.js"; +import { MonsterCreation } from "./MonsterCreation.js"; +/// Used to store mapping between +export class CreatureTypeGenerationOption { + constructor(type, subtypes, + // We've hard coded the first creature rule to be natural weapons + // TODO: Only spend one special ability on natural weapons if no other weapon profile generation option is selected + universalCreatureRules = [ + MonsterCreation.specialAbilities.universalCreatureRule + .naturalWeapons + ]) { + this.type = type; + this.subtypes = subtypes; + this.universalCreatureRules = universalCreatureRules; + } +} +/// Generator Settings +export const CreatureTypeGenerationOptions = { + animal: new CreatureTypeGenerationOption(Type.animal), + ooze: new CreatureTypeGenerationOption(Type.ooze), + vermin: new CreatureTypeGenerationOption(Type.vermin), + construct: new CreatureTypeGenerationOption(Type.construct, [Subtype.technological], [ + MonsterCreation.specialAbilities.universalCreatureRule + .integratedWeapons + ]) +}; +//# sourceMappingURL=Generator.js.map \ No newline at end of file diff --git a/dist/data/Generator.js.map b/dist/data/Generator.js.map new file mode 100644 index 0000000..75f22a7 --- /dev/null +++ b/dist/data/Generator.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Generator.js","sourceRoot":"","sources":["../../src/data/Generator.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAE1C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAEtD,iCAAiC;AACjC,MAAM,OAAO,4BAA4B;IAKrC,YACI,IAAU,EACV,QAAgC;IAChC,iEAAiE;IACjE,mHAAmH;IACnH,yBAAkD;QAC9C,eAAe,CAAC,gBAAgB,CAAC,qBAAqB;aACjD,cAAc;KACtB;QAED,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QACxB,IAAI,CAAC,sBAAsB,GAAG,sBAAsB,CAAA;IACxD,CAAC;CACJ;AAED,sBAAsB;AACtB,MAAM,CAAC,MAAM,6BAA6B,GAAG;IACzC,MAAM,EAAE,IAAI,4BAA4B,CAAC,IAAI,CAAC,MAAM,CAAC;IACrD,IAAI,EAAE,IAAI,4BAA4B,CAAC,IAAI,CAAC,IAAI,CAAC;IACjD,MAAM,EAAE,IAAI,4BAA4B,CAAC,IAAI,CAAC,MAAM,CAAC;IACrD,SAAS,EAAE,IAAI,4BAA4B,CACvC,IAAI,CAAC,SAAS,EACd,CAAC,OAAO,CAAC,aAAa,CAAC,EACvB;QACI,eAAe,CAAC,gBAAgB,CAAC,qBAAqB;aACjD,iBAAiB;KACzB,CACJ;CACJ,CAAA"} \ No newline at end of file diff --git a/dist/data/Grafts.js b/dist/data/Grafts.js index 564befb..3649b5b 100644 --- a/dist/data/Grafts.js +++ b/dist/data/Grafts.js @@ -1,24 +1,56 @@ import CreatureTypeGraft from "../models/CreatureTypeGraft.js"; +import CreatureSubtypeGraft from "../models/CreatureSubtypeGraft.js"; +import { Subtype, Type } from "./Types.js"; export const Grafts = { creatureType: { - animal: new CreatureTypeGraft("animal"), - humanoid: new CreatureTypeGraft("humanoid"), - monstrousHumanoid: new CreatureTypeGraft("monstrous humanoid") + animal: new CreatureTypeGraft(Type[Type.animal], "An animal is a living, nonhumanoid creature, usually a vertebrate with no magical abilities and no innate capacity for language or culture.\n" + + "
Traits: Low-light vision; set Intelligence modifier to –4 or –5.\n" + + "
Adjustments: +2 to Fortitude and Reflex saving throws.", false), + construct: new CreatureTypeGraft(Type[Type.construct], "A construct is a magically animated object or an artificially created creature." + + "
Traits: Darkvision 60 ft., low-light vision, construct immunities, unliving; set Constitution modifier to —; must have either the magical or technological subtype; if the construct is mindless, set Intelligence modifier to — and add mindless." + + "
Adjustments: –2 to all saving throws, +1 to attack rolls."), + humanoid: new CreatureTypeGraft(Type[Type.humanoid], "A humanoid usually has two arms, two legs, and one head, or it has a humanlike torso, arms, and a head. Humanoids have few or no supernatural or extraordinary abilities, but most can speak and usually have well-developed societies.\n" + + "
Traits: Must have a subtype that matches its race (such as human, lashunta, or shirren) or that is related to its race (such as goblinoid).\n" + + "
Adjustments: +2 to one type of saving throw."), + monstrousHumanoid: new CreatureTypeGraft(Type[Type["monstrous humanoid"]], "Monstrous humanoids are similar to humanoids, but they have monstrous or animalistic features. They often have magical abilities as well.\n" + + "
Traits: Darkvision 60 ft.\n" + + "
Adjustments: +2 to Reflex and Will saving throws, +1 to attack rolls."), + ooze: new CreatureTypeGraft(Type[Type.ooze], "An ooze is an amorphous or mutable creature.\n" + + "
Traits: Blindsight, mindless, ooze immunities, sightless; set Intelligence modifier to —.\n" + + "
Adjustments: +2 to Fortitude saving throws, –2 to Reflex and Will saving throws, no master or good skills unless the creature would have them naturally, rather than through training.", false), + vermin: new CreatureTypeGraft(Type[Type.vermin], "This type includes insects, arachnids, other arthropods, worms, and similar invertebrates.\n" + + "
Traits: Darkvision 60 ft., mindless; set Intelligence modifier to —.\n" + + "
Adjustments: +2 to Fortitude saving throws.", false) }, creatureSubtype: { - android: "android", - dwarf: "dwarf", - elf: "elf", - gnome: "gnome", - gnoll: "gnoll", - halfling: "hafling", - human: "human", - kasatha: "kasatha", - lashunta: "lashunta", - shirren: "shirren", - skittermander: "skittermander", - vesk: "vesk", - ysoki: "ysoki" + android: new CreatureSubtypeGraft(Subtype[Subtype.android], "This subtype is applied to androids and creatures related to androids.\n" + + "
Traits: Most creatures with this subtype gain darkvision 60 ft. and low-light vision; if the NPC is of the android race (Starfinder Core Rulebook 42), it also gains the constructed, flat affect, and upgrade slot racial traits."), + dwarf: new CreatureSubtypeGraft(Subtype[Subtype.dwarf], "This subtype is applied to dwarves and creatures related to dwarves.\n" + + "
Traits: Most creatures with this subtype gain darkvision 60 ft.; if the NPC is of the dwarven race (Starfinder Core Rulebook 506), it also gains the slow but steady, stonecunning, traditional enemies, and weapon familiarity racial traits."), + elf: new CreatureSubtypeGraft(Subtype[Subtype.elf], "This subtype is applied to elves and creatures related to elves.\n" + + "
Traits: Most creatures with this subtype gain low-light vision and gain Perception as an additional master skill; if the NPC is of the drow race (see page 42), it gains darkvision 60 ft. instead of low-light vision, as well as the drow immunities, drow magic, and light blindness racial traits; if the NPC is of the elven race (Starfinder Core Rulebook 507), it gains the elven immunities and elven magic racial traits and Mysticism as a master skill; if the NPC is of the half-elven race (Starfinder Core Rulebook 509), it gains the elven blood racial trait and an extra good skill.\n"), + gnome: new CreatureSubtypeGraft(Subtype[Subtype.gnome], "This subtype is applied to gnomes and creatures related to gnomes.\n" + + "
Traits: Low-light vision; if the NPC is of the gnome race (Starfinder Core Rulebook 508) it also gains the eternal hope and gnome magic racial traits\n" + + "and Culture as a master skill."), + gnoll: new CreatureSubtypeGraft(Subtype[Subtype.gnoll], "This subtype is applied to gnolls and creatures related to gnolls.\n" + + "
Traits: Blindsense (scent) 30 ft., darkvision 60 ft.; if the NPC is of the gnoll race (see Starfinder Alien Character Cards), it also gains the natural weapons and rugged travel racial traits and Survival as a master skill."), + goblinoid: new CreatureSubtypeGraft(Subtype[Subtype.goblinoid], "This subtype is applied to humanoids of various goblinoid subspecies, such as hobgoblins.\n" + + "
Traits: Darkvision 60 ft.; if the NPC is of the hobgoblin race (see page 76), it also gains the battle hardened racial trait and Intimidate and Stealth as master skills; if the NPC is of the kanabo race (see page 89), it gains the armor savant and kanabo magic racial traits."), + halfling: new CreatureSubtypeGraft(Subtype[Subtype.halfling], "This subtype is applied to halflings and creatures related to halflings.\n" + + "
Traits: None; if the NPC is of the halfling race (Starfinder Core Rulebook 511), it gains the halfling luck and sneaky racial traits, Perception and Stealth as master skills, and Acrobatics and Athletics as good skills."), + human: new CreatureSubtypeGraft(Subtype[Subtype.human], "This subtype is applied to humans and creatures related to humans.\n" + + "
Traits: None; if the NPC is of the human race (Starfinder Core Rulebook 44), it gains an additional special ability of any type and an additional good skill."), + kasatha: new CreatureSubtypeGraft(Subtype[Subtype.kasatha], "This subtype is applied to kasathas and creatures related to kasathas.\n" + + "
Traits: None; if the NPC is of the kasatha race (Starfinder Core Rulebook 46), it gains the desert stride and four-armed racial traits, Acrobatics and Athletics as master skills, and Culture as a good skill."), + lashunta: new CreatureSubtypeGraft(Subtype[Subtype.lashunta], "This subtype is applied to lashuntas and creatures related to lashuntas.\n" + + "
Traits: None; if the NPC is of the lashunta race (Starfinder Core Rulebook 48), it gains the limited telepathy racial trait and can cast the following spells as spell-like abilities: 1/day— detect thoughts; at will—daze and psychokinetic hand."), + orc: new CreatureSubtypeGraft(Subtype[Subtype.orc], "This subtype is applied to orcs and creatures who are related to orcs.\n" + + "
Traits: Most creatures of this subtype gain darkvision 60 ft. and the ferocity universal creature rule; if the creature is of the half-orc race (Starfinder Core Rulebook 510), it also gains Intimidate and Survival as master skills."), + shirren: new CreatureSubtypeGraft(Subtype[Subtype.shirren], "This subtype is applied to shirrens and creatures related to shirrens.
Traits: Blindsense (vibration) 30 ft.; if the NPC is of the shirren race (Starfinder Core Rulebook 50), it also gains the communalism and limited telepathy racial traits and Culture and Diplomacy as good skills."), + skittermander: new CreatureSubtypeGraft(Subtype[Subtype.skittermander], "This subtype is applied to skittermanders and creatures related to skittermanders.
Traits:Traits: Low-light vision; if the NPC is of the skittermander race (see page 106), it also gains the grappler, hyper, and six- armed racial traits."), + technological: new CreatureSubtypeGraft(Subtype[Subtype.technological], "A number of subtypes don’t have full entries. Those that don’t grant additional abilities to creatures are listed below."), + vesk: new CreatureSubtypeGraft(Subtype[Subtype.vesk], "This subtype is applied to vesk and creatures related to vesk.
Traits: Low-light vision; if the NPC is of the vesk race (Starfinder Core Rulebook 52), it also gains the armor savant, fearless, and natural weapons racial traits."), + ysoki: new CreatureSubtypeGraft(Subtype[Subtype.ysoki], "This subtype is applied to ysoki and creatures related to ysoki.
Traits: Darkvision 60 ft.; if the NPC is of the ysoki race (Starfinder Core Rulebook 54), it also gains the cheek pouches and moxie racial traits, Engineering and Stealth as master skills, and Survival as a good skill.") } }; //# sourceMappingURL=Grafts.js.map \ No newline at end of file diff --git a/dist/data/Grafts.js.map b/dist/data/Grafts.js.map index 58b27bb..6d5f030 100644 --- a/dist/data/Grafts.js.map +++ b/dist/data/Grafts.js.map @@ -1 +1 @@ -{"version":3,"file":"Grafts.js","sourceRoot":"","sources":["../../src/data/Grafts.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,gCAAgC,CAAC;AAE/D,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB,YAAY,EAAE;QACV,MAAM,EAAE,IAAI,iBAAiB,CAAC,QAAQ,CAAC;QACvC,QAAQ,EAAE,IAAI,iBAAiB,CAAC,UAAU,CAAC;QAC3C,iBAAiB,EAAE,IAAI,iBAAiB,CAAC,oBAAoB,CAAC;KACjE;IACC,eAAe,EAAE;QACf,OAAO,EAAE,SAAS;QAClB,KAAK,EAAE,OAAO;QACd,GAAG,EAAE,KAAK;QACV,KAAK,EAAE,OAAO;QACd,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,OAAO;QACd,OAAO,EAAE,SAAS;QAClB,QAAQ,EAAE,UAAU;QACpB,OAAO,EAAE,SAAS;QAClB,aAAa,EAAE,eAAe;QAC9B,IAAI,EAAE,MAAM;QACZ,KAAK,EAAE,OAAO;KACjB;CACJ,CAAC"} \ No newline at end of file +{"version":3,"file":"Grafts.js","sourceRoot":"","sources":["../../src/data/Grafts.ts"],"names":[],"mappings":"AAAA,OAAO,iBAAiB,MAAM,gCAAgC,CAAA;AAC9D,OAAO,oBAAoB,MAAM,mCAAmC,CAAA;AACpE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,YAAY,CAAA;AAE1C,MAAM,CAAC,MAAM,MAAM,GAAG;IAClB,YAAY,EAAE;QACV,MAAM,EAAE,IAAI,iBAAiB,CACzB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EACjB,+IAA+I;YAC3I,gFAAgF;YAChF,oEAAoE,EACxE,KAAK,CACR;QACD,SAAS,EAAE,IAAI,iBAAiB,CAC5B,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,EACpB,iFAAiF;YAC7E,gQAAgQ;YAChQ,uEAAuE,CAC9E;QACD,QAAQ,EAAE,IAAI,iBAAiB,CAC3B,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,EACnB,2OAA2O;YACvO,2JAA2J;YAC3J,0DAA0D,CACjE;QACD,iBAAiB,EAAE,IAAI,iBAAiB,CACpC,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,EAChC,6IAA6I;YACzI,yCAAyC;YACzC,mFAAmF,CAC1F;QACD,IAAI,EAAE,IAAI,iBAAiB,CACvB,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EACf,gDAAgD;YAC5C,yGAAyG;YACzG,oMAAoM,EACxM,KAAK,CACR;QACD,MAAM,EAAE,IAAI,iBAAiB,CACzB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,EACjB,8FAA8F;YAC1F,oFAAoF;YACpF,yDAAyD,EAC7D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pB,0EAA0E;YACtE,qPAAqP,CAC5P;QACD,OAAO,EAAE,IAAI,oBAAoB,CAC7B,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,EACxB,wSAAwS,CAC3S;QACD,aAAa,EAAE,IAAI,oBAAoB,CACnC,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,EAC9B,8PAA8P,CACjQ;QACD,aAAa,EAAE,IAAI,oBAAoB,CACnC,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,EAC9B,0HAA0H,CAC7H;QACD,IAAI,EAAE,IAAI,oBAAoB,CAC1B,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,EACrB,iPAAiP,CACpP;QACD,KAAK,EAAE,IAAI,oBAAoB,CAC3B,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,EACtB,ySAAyS,CAC5S;KACJ;CACJ,CAAA"} \ No newline at end of file diff --git a/dist/data/Items.js b/dist/data/Items.js index d495889..92c5caf 100644 --- a/dist/data/Items.js +++ b/dist/data/Items.js @@ -1,299 +1,612 @@ export const Items = { junk: [ { name: "Old ticket to see Strawberry Machine Cake", description: "" }, - { name: "EJ Corp branded stapler", description: "'Take it to the EJ' is written on the bottom of this red stapler." }, + { + name: "EJ Corp branded stapler", + description: "'Take it to the EJ' is written on the bottom of this red stapler." + }, { name: "Paper folder covered by random stickers", description: "" }, { name: "Small hand mirror", description: "A smudged mirror." }, { name: "Duct tape", description: "" }, { name: "Personal datapad", description: "" }, { name: "Walking stick", description: "" }, - { name: "Bottle of water", description: "Water in a plastic bottle. Mostly empty." }, - { name: "Stylus", description: "A stylus for an unrecognized technological device." }, - { name: "Memory card", description: "A memory card for an unrecognized technological device." }, + { + name: "Bottle of water", + description: "Water in a plastic bottle. Mostly empty." + }, + { + name: "Stylus", + description: "A stylus for an unrecognized technological device." + }, + { + name: "Memory card", + description: "A memory card for an unrecognized technological device." + }, { name: "Black marker", description: "A slightly used marker." }, { name: "Red marker", description: "A slightly used marker." }, { name: "Blue marker", description: "A slightly used marker." }, { name: "Blank paper", description: "A sheet of blank paper." }, - { name: "Broken battery cell", description: "A battery cell in need of repair and out of power." }, - { name: "Keychain", description: "A keychain holding keys for a series of unknown archaic locks." }, + { + name: "Broken battery cell", + description: "A battery cell in need of repair and out of power." + }, + { + name: "Keychain", + description: "A keychain holding keys for a series of unknown archaic locks." + }, { name: "Headphones", description: "A wired set of headphones." }, - { name: "A faux-gold ring", description: "Some strange elven script is written inside the band." }, - { name: "Lint", description: "An accumulation of fibers and other materials." }, - { name: "ID card", description: "A semi-official ID card proving membership in a local club." }, - { name: "Candy", description: "Wrapped candy which appears to be from a restaurant." }, - { name: "Paper clips", description: "Two paper clips." } - ], - // Templates - // NOTE: Various items used to generate inventory for NPCs - credStickTemplate: { - "name": "Credstick (25 credits)", - "type": "goods", - "data": { - "description": { - "chat": "", - "gmnotes": "", - "short": "", - "value": "

Fortunately, the widespread use of the credstick circumvents
issues related to spending and storing currency. Flat and roughly
the size of a @Compendium[sfrpg.races.AMBcyDZDtJ1OOzh3]{Human} finger, ranging from cheap and disposable to
elaborate works of art, credsticks are a convenient way to carry
and spend money.

", - "unidentified": "" + { + name: "A faux-gold ring", + description: "Some strange elven script is written inside the band." + }, + { + name: "Lint", + description: "An accumulation of fibers and other materials." + }, + { + name: "ID card", + description: "A semi-official ID card proving membership in a local club." + }, + { + name: "Candy", + description: "Wrapped candy which appears to be from a restaurant." + }, + { name: "Paper clips", description: "Two paper clips." }, + { name: "Onyx hair comb", description: "A jet black hair comb." }, + { + name: "Jar of dried seeds", + description: "A jar containing a few dried seeds." + } + ] +}; +// Templates +// Some Items are easier to store as template which are modified/customized rather than searching compendiums +// NOTE: Various items used to generate inventory for NPCs +export const backpackTemplate = { + name: "Backpack, Consumer", + type: "container", + data: { + description: { + chat: "", + gmnotes: "", + short: "", + value: '

When wearing a properly fitted consumer backpack, you treat your Strength score as 1 higher for the purpose of determining your carrying capacity. 

', + unidentified: "" + }, + source: "Core Rulebook, pg 230", + type: "", + quantity: 1, + bulk: "1", + price: 3, + level: 1, + attuned: false, + equipped: false, + equippable: false, + identified: true, + attributes: { + sturdy: false, + customBuilt: false, + size: "medium", + dex: { + mod: "" + }, + hp: { + value: 6, + max: "" + }, + hardness: { + value: "" }, - "source": "CRB pg. 166", - "type": "", - "quantity": 1, - "bulk": "L", - "price": 25, - "level": 1, - "attuned": false, - "equipped": false, - "equippable": false, - "identified": true, - "attributes": { - "sturdy": false, - "customBuilt": false, - "size": "medium", - "dex": { - "mod": "" - }, - "hp": { - "value": 6, - "max": "" - }, - "hardness": { - "value": "" - }, - "ac": { - "value": "" + ac: { + value: "" + } + }, + modifiers: [ + { + name: "Backpack, Consumer", + modifier: 1, + type: "enhancement", + effectType: "bulk", + valueAffected: "", + enabled: true, + source: "Core Rulebook, pg 230", + notes: "", + modifierType: "constant", + condition: "", + subtab: "misc", + _id: "395f0b72-1b0a-4845-ac86-f5dc5ce847f8" + } + ], + container: { + contents: [], + storage: [ + { + type: "bulk", + subtype: "", + amount: 2, + acceptsType: [ + "weapon", + "equipment", + "goods", + "consumable", + "container", + "technological", + "fusion", + "upgrade", + "augmentation", + "magic" + ], + affectsEncumbrance: true, + weightProperty: "bulk" } + ], + isOpen: true + }, + equippedBulkMultiplier: 0, + acceptedItemTypes: { + weapon: true, + equipment: true, + goods: true, + consumable: true, + container: true, + technological: true, + fusion: true, + upgrade: true, + augmentation: true + }, + damage: { + parts: [] + }, + critical: { + parts: [] + }, + abilityMods: { + parts: [] + } + }, + flags: {}, + img: "systems/sfrpg/icons/equipment/goods/backpack-consumer.jpg", + effects: [], + storage: { + type: "bulk", + amount: 2, + affectsEncumbrance: true + }, + weapon: true, + equipment: true, + consumable: true, + goods: true, + container: true, + hybrid: false, + magic: true, + technological: true, + fusion: true, + upgrade: true, + spell: false, + augmentation: true, + shield: false, + weaponAccessory: false, + vehicleAttack: false, + vehicleSystem: false +}; +export const canteenTemplate = { + name: "Canteen", + type: "goods", + data: { + description: { + chat: "", + gmnotes: "", + short: "", + value: '

This hollow plastic or metal container can hold up to a half gallon of liquid. 

', + unidentified: "" + }, + source: "Armory", + type: "", + quantity: 1, + bulk: "L", + price: 1, + level: 1, + attuned: false, + equipped: false, + equippable: false, + identified: true, + attributes: { + sturdy: false, + customBuilt: false, + size: "medium", + dex: { + mod: "" }, - "modifiers": [], - "damage": { - "parts": [] + hp: { + value: 6, + max: "" }, - "critical": { - "parts": [] + hardness: { + value: "" }, - "abilityMods": { - "parts": [] + ac: { + value: "" } }, - "flags": {}, - "img": "systems/sfrpg/icons/equipment/goods/credstick.jpg", - "effects": [] + modifiers: [], + damage: { + parts: [] + }, + critical: { + parts: [] + }, + abilityMods: { + parts: [] + } }, - upbTemplate: { - "name": "UPB (25)", - "type": "goods", - "data": { - "description": { - "chat": "", - "gmnotes": "", - "short": "", - "value": "

A universal polymer base, or UPB, is the basis for most technology in the Pact Worlds, the Veskarium, and many other systems. Each UPB is a tiny multifunction component, not much larger than a grain of rice, capable of being configured to act as a brace, capacitor, circuit, diode, fastener, insulator, lens, modulator, pipe, resistor, and dozens of other constituent parts. UPBs can even be spun out into fabric, broken down into component chemicals, reconstituted into new chemicals, or supplemented with base materials (such as dirt or sand) to form massive braces or walls. The right combination of hundreds or even thousands of UPBs can create everything from a comm unit to a laser weapon to powered armor. In their raw form, UPBs have a bulk of 1 per 1,000 UPBs, though when aligned and configured they can easily take up less bulk, and when configured for a specific purpose that calls for a minimum size and bracing (possibly combining them with inert materials), they can have a higher bulk.

UPBs are so ubiquitous that they are usable as currency in many major settlements and trade hubs. While credsticks are a more convenient and secure way to carry value, UPBs have the advantage of direct utility and untraceability. They are a popular way to pay smugglers and criminals, but they are also useful for trade missions to systems with UPB technology that don’t use credits as currency. The value of the Pact Worlds’ credit is based on the economic utility of a single UPB.

", - "unidentified": "" - }, - "source": "CRB pg. 233", - "type": "", - "quantity": 1, - "bulk": "1", - "price": 25, - "level": 1, - "attuned": false, - "equipped": false, - "equippable": false, - "identified": true, - "attributes": { - "sturdy": false, - "customBuilt": false, - "size": "medium", - "dex": { - "mod": "" - }, - "hp": { - "value": 6, - "max": "" - }, - "hardness": { - "value": "" - }, - "ac": { - "value": "" - } + flags: {}, + img: "systems/sfrpg/icons/equipment/goods/canteen.jpg", + effects: [] +}; +export const credStickTemplate = { + name: "Credstick (25 credits)", + type: "goods", + data: { + description: { + chat: "", + gmnotes: "", + short: "", + value: '

Fortunately, the widespread use of the credstick circumvents
issues related to spending and storing currency. Flat and roughly
the size of a @Compendium[sfrpg.races.AMBcyDZDtJ1OOzh3]{Human} finger, ranging from cheap and disposable to
elaborate works of art, credsticks are a convenient way to carry
and spend money.

', + unidentified: "" + }, + source: "CRB pg. 166", + type: "", + quantity: 1, + bulk: "L", + price: 25, + level: 1, + attuned: false, + equipped: false, + equippable: false, + identified: true, + attributes: { + sturdy: false, + customBuilt: false, + size: "medium", + dex: { + mod: "" }, - "modifiers": [], - "damage": { - "parts": [] + hp: { + value: 6, + max: "" }, - "critical": { - "parts": [] + hardness: { + value: "" }, - "abilityMods": { - "parts": [] + ac: { + value: "" } }, - "flags": {}, - "img": "systems/sfrpg/icons/equipment/goods/upb.jpg", - "effects": [] + modifiers: [], + damage: { + parts: [] + }, + critical: { + parts: [] + }, + abilityMods: { + parts: [] + } }, - lighterTemplate: { - "name": "Lighter", - "type": "goods", - "data": { - "description": { - "chat": "", - "gmnotes": "", - "short": "", - "value": "

A lighter is a small canister containing a pressurized flammable liquid gas. When the lighter is activated, an electric arc ignites the gas, creating a tiny flame. You can light a small flame (such as a candle) as a swift action. Lighting a full fire is at least a full action or more, depending on the size and fuel of the fire. 

", - "unidentified": "" + flags: {}, + img: "systems/sfrpg/icons/equipment/goods/credstick.jpg", + effects: [] +}; +export const upbTemplate = { + name: "UPB (25)", + type: "goods", + data: { + description: { + chat: "", + gmnotes: "", + short: "", + value: "

A universal polymer base, or UPB, is the basis for most technology in the Pact Worlds, the Veskarium, and many other systems. Each UPB is a tiny multifunction component, not much larger than a grain of rice, capable of being configured to act as a brace, capacitor, circuit, diode, fastener, insulator, lens, modulator, pipe, resistor, and dozens of other constituent parts. UPBs can even be spun out into fabric, broken down into component chemicals, reconstituted into new chemicals, or supplemented with base materials (such as dirt or sand) to form massive braces or walls. The right combination of hundreds or even thousands of UPBs can create everything from a comm unit to a laser weapon to powered armor. In their raw form, UPBs have a bulk of 1 per 1,000 UPBs, though when aligned and configured they can easily take up less bulk, and when configured for a specific purpose that calls for a minimum size and bracing (possibly combining them with inert materials), they can have a higher bulk.

UPBs are so ubiquitous that they are usable as currency in many major settlements and trade hubs. While credsticks are a more convenient and secure way to carry value, UPBs have the advantage of direct utility and untraceability. They are a popular way to pay smugglers and criminals, but they are also useful for trade missions to systems with UPB technology that don’t use credits as currency. The value of the Pact Worlds’ credit is based on the economic utility of a single UPB.

", + unidentified: "" + }, + source: "CRB pg. 233", + type: "", + quantity: 1, + bulk: "1", + price: 25, + level: 1, + attuned: false, + equipped: false, + equippable: false, + identified: true, + attributes: { + sturdy: false, + customBuilt: false, + size: "medium", + dex: { + mod: "" }, - "source": "Armory", - "type": "", - "quantity": 1, - "bulk": "L", - "price": 1, - "level": 1, - "attuned": false, - "equipped": false, - "equippable": false, - "identified": true, - "attributes": { - "sturdy": false, - "customBuilt": false, - "size": "medium", - "dex": { - "mod": "" - }, - "hp": { - "value": 6, - "max": "" - }, - "hardness": { - "value": "" - }, - "ac": { - "value": "" - } + hp: { + value: 6, + max: "" }, - "modifiers": [], - "damage": { - "parts": [] + hardness: { + value: "" }, - "critical": { - "parts": [] + ac: { + value: "" + } + }, + modifiers: [], + damage: { + parts: [] + }, + critical: { + parts: [] + }, + abilityMods: { + parts: [] + } + }, + flags: {}, + img: "systems/sfrpg/icons/equipment/goods/upb.jpg", + effects: [] +}; +export const lighterTemplate = { + name: "Lighter", + type: "goods", + data: { + description: { + chat: "", + gmnotes: "", + short: "", + value: '

A lighter is a small canister containing a pressurized flammable liquid gas. When the lighter is activated, an electric arc ignites the gas, creating a tiny flame. You can light a small flame (such as a candle) as a swift action. Lighting a full fire is at least a full action or more, depending on the size and fuel of the fire. 

', + unidentified: "" + }, + source: "Armory", + type: "", + quantity: 1, + bulk: "L", + price: 1, + level: 1, + attuned: false, + equipped: false, + equippable: false, + identified: true, + attributes: { + sturdy: false, + customBuilt: false, + size: "medium", + dex: { + mod: "" + }, + hp: { + value: 6, + max: "" + }, + hardness: { + value: "" }, - "abilityMods": { - "parts": [] + ac: { + value: "" } }, - "flags": {}, - "img": "systems/sfrpg/icons/equipment/goods/lighter.jpg", - "effects": [] + modifiers: [], + damage: { + parts: [] + }, + critical: { + parts: [] + }, + abilityMods: { + parts: [] + } }, - purfumeTemplate: { - "name": "Perfume, Standard", - "type": "goods", - "data": { - "description": { - "chat": "", - "gmnotes": "", - "short": "", - "value": "

Perfume

\n

There is an immeasurable variety of perfumes and colognes in the galaxy, most tailored to the aesthetics of specific races with olfactory senses. A single dose of perfume lasts 1 hour, and a typical bottle of perfume contains 10 doses.

\n

 

\n

Standard aromas have a pleasant smell and can convey an air of hygiene, status, and wealth.

", - "unidentified": "" + flags: {}, + img: "systems/sfrpg/icons/equipment/goods/lighter.jpg", + effects: [] +}; +export const purfumeTemplate = { + name: "Perfume, Standard", + type: "goods", + data: { + description: { + chat: "", + gmnotes: "", + short: "", + value: "

Perfume

\n

There is an immeasurable variety of perfumes and colognes in the galaxy, most tailored to the aesthetics of specific races with olfactory senses. A single dose of perfume lasts 1 hour, and a typical bottle of perfume contains 10 doses.

\n

 

\n

Standard aromas have a pleasant smell and can convey an air of hygiene, status, and wealth.

", + unidentified: "" + }, + source: "AR pg. 131", + type: "", + quantity: 1, + bulk: "L", + price: 50, + level: 1, + attuned: false, + equipped: false, + equippable: false, + identified: true, + attributes: { + sturdy: false, + customBuilt: false, + size: "medium", + dex: { + mod: "" }, - "source": "AR pg. 131", - "type": "", - "quantity": 1, - "bulk": "L", - "price": 50, - "level": 1, - "attuned": false, - "equipped": false, - "equippable": false, - "identified": true, - "attributes": { - "sturdy": false, - "customBuilt": false, - "size": "medium", - "dex": { - "mod": "" - }, - "hp": { - "value": 6, - "max": "" - }, - "hardness": { - "value": "" - }, - "ac": { - "value": "" - } + hp: { + value: 6, + max: "" + }, + hardness: { + value: "" + }, + ac: { + value: "" + } + }, + modifiers: [], + damage: { + parts: [] + }, + critical: { + parts: [] + }, + abilityMods: { + parts: [] + } + }, + flags: {}, + img: "systems/sfrpg/icons/equipment/magic%20items/serum-of-appearance-change.jpg", + effects: [] +}; +export const intoxicantMinorTemplate = { + name: "Intoxicant, Minor", + type: "goods", + data: { + description: { + chat: "", + gmnotes: "", + short: "", + value: '

The price and bulk listed here is of a single serving of an intoxicating beverage or inhaled substance, which in the Pact Worlds is most often alcohol or tobacco. An intoxicant’s potency can be minor or superior. A minor intoxicant might be beer or wine, which takes a few servings to cause any physiological effects. A superior intoxicant is usually a strong spirit, such as whiskey, that can start producing effects after a single serving. Unlike @Compendium[sfrpg.rules.aKqRtg165rAly1Cc]{Drugs}, intoxicants are usually not addictive, although a GM might rule that a PC who partakes of too much of an intoxicant on a regular basis might begin to suffer the effects of an addictive @Compendium[sfrpg.rules.aKqRtg165rAly1Cc]{Drug} (as described in @Compendium[sfrpg.rules.JaRMioj4isNp7r1P]{Afflictions} on page 417). 

', + unidentified: "" + }, + source: "Core Rulebook", + type: "", + quantity: 1, + bulk: "L", + price: 1, + level: 1, + attuned: false, + equipped: false, + equippable: false, + identified: true, + attributes: { + sturdy: false, + customBuilt: false, + size: "medium", + dex: { + mod: "" }, - "modifiers": [], - "damage": { - "parts": [] + hp: { + value: 6, + max: "" }, - "critical": { - "parts": [] + hardness: { + value: "" }, - "abilityMods": { - "parts": [] + ac: { + value: "" } }, - "flags": {}, - "img": "systems/sfrpg/icons/equipment/magic%20items/serum-of-appearance-change.jpg", - "effects": [] + modifiers: [], + damage: { + parts: [] + }, + critical: { + parts: [] + }, + abilityMods: { + parts: [] + } }, - intoxicantMinorTemplate: { - "name": "Intoxicant, Minor", - "type": "goods", - "data": { - "description": { - "chat": "", - "gmnotes": "", - "short": "", - "value": "

The price and bulk listed here is of a single serving of an intoxicating beverage or inhaled substance, which in the Pact Worlds is most often alcohol or tobacco. An intoxicant’s potency can be minor or superior. A minor intoxicant might be beer or wine, which takes a few servings to cause any physiological effects. A superior intoxicant is usually a strong spirit, such as whiskey, that can start producing effects after a single serving. Unlike @Compendium[sfrpg.rules.aKqRtg165rAly1Cc]{Drugs}, intoxicants are usually not addictive, although a GM might rule that a PC who partakes of too much of an intoxicant on a regular basis might begin to suffer the effects of an addictive @Compendium[sfrpg.rules.aKqRtg165rAly1Cc]{Drug} (as described in @Compendium[sfrpg.rules.JaRMioj4isNp7r1P]{Afflictions} on page 417). 

", - "unidentified": "" + flags: {}, + img: "systems/sfrpg/icons/equipment/goods/intoxicant.jpg", + effects: [] +}; +export const religiousSymbolTemplate = { + name: "Religious Symbol", + type: "goods", + data: { + description: { + chat: "", + gmnotes: "", + short: "", + value: '

A religious symbol is a physical representation of a sacred image associated with a specific deity or religion, often worn as an amulet or badge. Each deity and religion has its own unique religious symbol. Religious symbols are usually mass-produced from cheap materials, such as plastic or thin metal, but they can be crafted out of other materials as well, with prices dependent on the material used. This item can also be used to represent badges or symbols of nonreligious organizations and groups. 

', + unidentified: "" + }, + source: "Armory", + type: "", + quantity: 1, + bulk: "L", + price: 2, + level: 1, + attuned: false, + equipped: false, + equippable: false, + identified: true, + attributes: { + sturdy: false, + customBuilt: false, + size: "medium", + dex: { + mod: "" }, - "source": "Core Rulebook", - "type": "", - "quantity": 1, - "bulk": "L", - "price": 1, - "level": 1, - "attuned": false, - "equipped": false, - "equippable": false, - "identified": true, - "attributes": { - "sturdy": false, - "customBuilt": false, - "size": "medium", - "dex": { - "mod": "" - }, - "hp": { - "value": 6, - "max": "" - }, - "hardness": { - "value": "" - }, - "ac": { - "value": "" - } + hp: { + value: 6, + max: "" }, - "modifiers": [], - "damage": { - "parts": [] + hardness: { + value: "" }, - "critical": { - "parts": [] + ac: { + value: "" + } + }, + modifiers: [], + damage: { + parts: [] + } + }, + flags: {}, + img: "systems/sfrpg/icons/equipment/goods/religious-symbol.jpg", + effects: [] +}; +export const ropeTemplate = { + name: "Rope", + type: "goods", + data: { + description: { + chat: "", + gmnotes: "", + short: "", + value: '

Synthetic rope is exceptionally durable, elastic, and specifically designed to be easy to grip and climb. Although it lacks the strength and durability of cable lines, synthetic rope is significantly cheaper and lighter than those alternatives. 

', + unidentified: "" + }, + source: "AR pg. 131", + type: "", + quantity: 1, + bulk: "L", + price: 1, + level: 1, + attuned: false, + equipped: false, + equippable: false, + identified: true, + attributes: { + sturdy: false, + customBuilt: false, + size: "medium", + dex: { + mod: "" + }, + hp: { + value: 6, + max: "" }, - "abilityMods": { - "parts": [] + hardness: { + value: "" + }, + ac: { + value: "" } }, - "flags": {}, - "img": "systems/sfrpg/icons/equipment/goods/intoxicant.jpg", - "effects": [] - } + modifiers: [], + damage: { + parts: [] + } + }, + flags: {}, + img: "systems/sfrpg/icons/equipment/goods/rope.jpg", + effects: [] }; //# sourceMappingURL=Items.js.map \ No newline at end of file diff --git a/dist/data/Items.js.map b/dist/data/Items.js.map index ddbbe4d..5ba6042 100644 --- a/dist/data/Items.js.map +++ b/dist/data/Items.js.map @@ -1 +1 @@ -{"version":3,"file":"Items.js","sourceRoot":"","sources":["../../src/data/Items.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG;IAEjB,IAAI,EAAE;QACF,EAAC,IAAI,EAAC,2CAA2C,EAAE,WAAW,EAAE,EAAE,EAAC;QACnE,EAAC,IAAI,EAAC,yBAAyB,EAAE,WAAW,EAAE,mEAAmE,EAAC;QAClH,EAAC,IAAI,EAAC,yCAAyC,EAAE,WAAW,EAAE,EAAE,EAAC;QACjE,EAAC,IAAI,EAAC,mBAAmB,EAAE,WAAW,EAAE,mBAAmB,EAAC;QAC5D,EAAC,IAAI,EAAC,WAAW,EAAE,WAAW,EAAE,EAAE,EAAC;QACnC,EAAC,IAAI,EAAC,kBAAk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AE,EAAE;aACd;SACJ;QACD,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,oDAAoD;QAC3D,SAAS,EAAE,EAAE;KAChB;CACJ,CAAA"} \ No newline at end of file +{"version":3,"file":"Items.js","sourceRoot":"","sources":["../../src/data/Items.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG;IACjB,IAAI,EAAE;QACF,EAAE,IAAI,EAAE,2CAA2C,EAAE,WAAW,EAAE,EAAE,EAAE;QACtE;YACI,IAAI,EAAE,yBAAyB;YAC/B,WAAW,EACP,mEAAmE;SAC1E;QACD,EAAE,IAAI,EAAE,yCAAyC,EAAE,WAAW,EAAE,EAAE,EAAE;QACpE,EAAE,IAAI,EAAE,mBAAmB,EAAE,WAAW,EAAE,mBAAmB,EAAE;QAC/D,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE,EAAE,EAAE;QACtC,EAAE,IAAI,EAAE,kBAAkB,EAAE,WAAW,EAAE,EAAE,EAAE;QAC7C,EAAE,IAAI,EAAE,eAAe,EAAE,WAAW,EAAE,EAAE,EAAE;QAC1C;YACI,IAAI,EAAE,iBAAiB;YACvB,WAAW,EAAE,0CAA0C;SAC1D;QACD;YACI,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,oDAAoD;SACpE;QACD;YACI,IAAI,EAAE,aAAa;YACnB,WAAW,EACP,yDAAyD;SAChE;QACD,EAAE,IAAI,EAAE,cAAc,EAAE,WAAW,EAAE,yBAAyB,EAAE;QAChE,EAAE,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,yBAAyB,EAAE;QAC9D,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,yBAAyB,EAAE;QAC/D,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,yBAAyB,EAAE;QAC/D;YACI,IAAI,EAAE,qBAAqB;YAC3B,WAAW,EAAE,oDAAoD;SACpE;QACD;YACI,IAAI,EAAE,UAAU;YAChB,WAAW,EACP,gEAA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GAAG,EAAE,8CAA8C;IACnD,OAAO,EAAE,EAAE;CACJ,CAAA"} \ No newline at end of file diff --git a/dist/data/MonsterCreation.js b/dist/data/MonsterCreation.js index afbbee8..8914ede 100644 --- a/dist/data/MonsterCreation.js +++ b/dist/data/MonsterCreation.js @@ -1,37 +1,393 @@ -export const CR = ["1/3", "1/2", "1", "2"]; +import { UniversalCreatureRules } from "./universal creature rules/UniversalCreatureRules.js"; +import AdjustmentSpecialAbility from "../models/AdjustmentSpecialAbility.js"; +/// List of creature combat ratings +export const CR = [ + "1/3", + "1/2", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10" +]; +// List of creature save types +export var Save; +(function (Save) { + Save["fortitude"] = "fort"; + Save["reflex"] = "reflex"; + Save["willpower"] = "will"; +})(Save || (Save = {})); +/// List of creature gender identities +export var Gender; +(function (Gender) { + Gender["male"] = "male"; + Gender["female"] = "female"; + Gender["nonBinary"] = "non-binary"; +})(Gender || (Gender = {})); +/// List of creature sizes +export var Size; +(function (Size) { + Size[Size["small"] = 0] = "small"; + Size[Size["medium"] = 1] = "medium"; + Size[Size["large"] = 2] = "large"; +})(Size || (Size = {})); +/// List of Monster Reference Symbols +export var MonsterReferenceSymbol; +(function (MonsterReferenceSymbol) { + MonsterReferenceSymbol[MonsterReferenceSymbol["combatant"] = 0] = "combatant"; + MonsterReferenceSymbol[MonsterReferenceSymbol["expert"] = 1] = "expert"; + MonsterReferenceSymbol[MonsterReferenceSymbol["spellcaster"] = 2] = "spellcaster"; +})(MonsterReferenceSymbol || (MonsterReferenceSymbol = {})); +export var MonsterSkillType; +(function (MonsterSkillType) { + MonsterSkillType[MonsterSkillType["good"] = 0] = "good"; + MonsterSkillType[MonsterSkillType["master"] = 1] = "master"; +})(MonsterSkillType || (MonsterSkillType = {})); +/// Collection of monster creation statistics and special abilities used to generate new creatures export const MonsterCreation = { arrays: { // Expert Arrays expert: { - name: "expert", + name: MonsterReferenceSymbol.expert, main: { - "1/3": { CR: CR[0], EAC: 10, KAC: 11, fort: 0, reflex: 0, will: 2, HP: 6, abilityMods: [3, 1, 0], masterSkill: { count: 3, mod: 7 }, goodSkill: { count: 2, mod: 3 } }, - "1/2": { CR: CR[1], EAC: 10, KAC: 11, fort: 0, reflex: 0, will: 3, HP: 12, abilityMods: [3, 2, 1], masterSkill: { count: 3, mod: 9 }, goodSkill: { count: 2, mod: 4 } }, - "1": { CR: CR[2], EAC: 11, KAC: 12, fort: 1, reflex: 1, will: 4, HP: 17, abilityMods: [4, 2, 1], masterSkill: { count: 3, mod: 10 }, goodSkill: { count: 2, mod: 5 } }, - "2": { CR: CR[3], EAC: 13, KAC: 14, fort: 1, reflex: 1, will: 5, HP: 23, abilityMods: [4, 2, 1], masterSkill: { count: 3, mod: 12 }, goodSkill: { count: 2, mod: 7 } } + "1/3": { + CR: CR[0], + EAC: 10, + KAC: 11, + fort: 0, + reflex: 0, + will: 2, + HP: 6, + abilityMods: [3, 1, 0], + specialAbilities: 1, + masterSkill: { count: 3, mod: 7 }, + goodSkill: { count: 2, mod: 3 } + }, + "1/2": { + CR: CR[1], + EAC: 10, + KAC: 11, + fort: 0, + reflex: 0, + will: 3, + HP: 12, + abilityMods: [3, 2, 1], + specialAbilities: 1, + masterSkill: { count: 3, mod: 9 }, + goodSkill: { count: 2, mod: 4 } + }, + "1": { + CR: CR[2], + EAC: 11, + KAC: 12, + fort: 1, + reflex: 1, + will: 4, + HP: 17, + abilityMods: [4, 2, 1], + specialAbilities: 1, + masterSkill: { count: 3, mod: 10 }, + goodSkill: { count: 2, mod: 5 } + }, + "2": { + CR: CR[3], + EAC: 13, + KAC: 14, + fort: 1, + reflex: 1, + will: 5, + HP: 23, + abilityMods: [4, 2, 1], + specialAbilities: 1, + masterSkill: { count: 3, mod: 12 }, + goodSkill: { count: 2, mod: 7 } + }, + "3": { + CR: CR[4], + EAC: 14, + KAC: 15, + fort: 2, + reflex: 2, + will: 6, + HP: 35, + abilityMods: [4, 2, 1], + specialAbilities: 2, + masterSkill: { count: 3, mod: 13 }, + goodSkill: { count: 2, mod: 8 } + }, + "4": { + CR: CR[5], + EAC: 16, + KAC: 17, + fort: 3, + reflex: 3, + will: 7, + HP: 45, + abilityMods: [5, 3, 1], + specialAbilities: 2, + masterSkill: { count: 3, mod: 15 }, + goodSkill: { count: 2, mod: 10 } + }, + "5": { + CR: CR[6], + EAC: 17, + KAC: 18, + fort: 4, + reflex: 4, + will: 8, + HP: 65, + abilityMods: [5, 3, 2], + specialAbilities: 2, + masterSkill: { count: 3, mod: 16 }, + goodSkill: { count: 2, mod: 11 } + } }, attack: { - "1/3": { high: 2, low: 0, energy: "1d4", kinetic: "1d4", standard: "1d4 + @abilities.str.mod" }, - "1/2": { high: 4, low: 2, energy: "1d4", kinetic: "1d4", standard: "1d4 + @abilities.str.mod" }, - "1": { high: 6, low: 4, energy: "1d4+1", kinetic: "1d4+1", standard: "1d4 + 1 + @abilities.str.mod" }, - "2": { high: 8, low: 6, energy: "1d4+2", kinetic: "1d4+2", standard: "1d4 + 2 + @abilities.str.mod" } + "1/3": { + high: 2, + low: 0, + energy: "1d4", + kinetic: "1d4", + standard: "1d4 + @abilities.str.mod" + }, + "1/2": { + high: 4, + low: 2, + energy: "1d4", + kinetic: "1d4", + standard: "1d4 + @abilities.str.mod" + }, + "1": { + high: 6, + low: 4, + energy: "1d4+1", + kinetic: "1d4+1", + standard: "1d4 + 1 + @abilities.str.mod" + }, + "2": { + high: 8, + low: 6, + energy: "1d4+2", + kinetic: "1d4+2", + standard: "1d4 + 2 + @abilities.str.mod" + }, + "3": { + high: 9, + low: 7, + energy: "1d4+3", + kinetic: "1d4+3", + standard: "1d4 + 3 + @abilities.str.mod" + }, + "4": { + high: 10, + low: 8, + energy: "1d4+4", + kinetic: "1d4+4", + standard: "1d4 + 4 + @abilities.str.mod" + }, + "5": { + high: 12, + low: 10, + energy: "1d4+5", + kinetic: "1d6+5", + standard: "1d4 + 5 + @abilities.str.mod" + }, + "6": { + high: 14, + low: 12, + energy: "1d6+6", + kinetic: "1d8+6", + standard: "1d6 + 6 + @abilities.str.mod" + }, + "7": { + high: 15, + low: 13, + energy: "1d8+7", + kinetic: "1d12+7", + standard: "1d8 + 7 + @abilities.str.mod" + } } }, combatant: { - name: "combatant", + name: MonsterReferenceSymbol.combatant, main: { - "1/3": { CR: CR[0], EAC: 10, KAC: 12, fort: 1, reflex: 1, will: 0, HP: 6, abilityMods: [3, 1, 0], masterSkill: { count: 1, mod: 7 }, goodSkill: { count: 2, mod: 3 } }, - "1/2": { CR: CR[1], EAC: 10, KAC: 12, fort: 2, reflex: 2, will: 0, HP: 13, abilityMods: [3, 2, 1], masterSkill: { count: 1, mod: 9 }, goodSkill: { count: 2, mod: 4 } }, - "1": { CR: CR[2], EAC: 11, KAC: 13, fort: 3, reflex: 3, will: 1, HP: 20, abilityMods: [4, 2, 1], masterSkill: { count: 1, mod: 10 }, goodSkill: { count: 2, mod: 5 } }, - "2": { CR: CR[3], EAC: 13, KAC: 15, fort: 4, reflex: 4, will: 1, HP: 25, abilityMods: [4, 2, 1], masterSkill: { count: 1, mod: 12 }, goodSkill: { count: 2, mod: 7 } } + "1/3": { + CR: CR[0], + EAC: 10, + KAC: 12, + fort: 1, + reflex: 1, + will: 0, + HP: 6, + abilityMods: [3, 1, 0], + specialAbilities: 1, + masterSkill: { count: 1, mod: 7 }, + goodSkill: { count: 2, mod: 3 } + }, + "1/2": { + CR: CR[1], + EAC: 10, + KAC: 12, + fort: 2, + reflex: 2, + will: 0, + HP: 13, + abilityMods: [3, 2, 1], + specialAbilities: 1, + masterSkill: { count: 1, mod: 9 }, + goodSkill: { count: 2, mod: 4 } + }, + "1": { + CR: CR[2], + EAC: 11, + KAC: 13, + fort: 3, + reflex: 3, + will: 1, + HP: 20, + abilityMods: [4, 2, 1], + specialAbilities: 1, + masterSkill: { count: 1, mod: 10 }, + goodSkill: { count: 2, mod: 5 } + }, + "2": { + CR: CR[3], + EAC: 13, + KAC: 15, + fort: 4, + reflex: 4, + will: 1, + HP: 25, + abilityMods: [4, 2, 1], + specialAbilities: 2, + masterSkill: { count: 1, mod: 12 }, + goodSkill: { count: 2, mod: 7 } + }, + "3": { + CR: CR[4], + EAC: 14, + KAC: 16, + fort: 5, + reflex: 5, + will: 2, + HP: 40, + abilityMods: [4, 2, 1], + specialAbilities: 2, + masterSkill: { count: 1, mod: 13 }, + goodSkill: { count: 2, mod: 8 } + }, + "4": { + CR: CR[5], + EAC: 16, + KAC: 18, + fort: 6, + reflex: 6, + will: 3, + HP: 50, + abilityMods: [5, 3, 1], + specialAbilities: 2, + masterSkill: { count: 1, mod: 15 }, + goodSkill: { count: 2, mod: 10 } + }, + "5": { + CR: CR[6], + EAC: 17, + KAC: 19, + fort: 7, + reflex: 7, + will: 4, + HP: 70, + abilityMods: [5, 3, 2], + specialAbilities: 2, + masterSkill: { count: 1, mod: 16 }, + goodSkill: { count: 2, mod: 11 } + } }, attack: { - "1/3": { high: 4, low: 1, energy: "1d4", kinetic: "1d4", standard: "1d6 + @abilities.str.mod" }, - "1/2": { high: 6, low: 3, energy: "1d4", kinetic: "1d6", standard: "1d6 + @abilities.str.mod" }, - "1": { high: 8, low: 5, energy: "1d4+1", kinetic: "1d6+1", standard: "1d6 + 1 + @abilities.str.mod" }, - "2": { high: 10, low: 7, energy: "1d4+2", kinetic: "1d6+2", standard: "1d6 + 2 + @abilities.str.mod" } + "1/3": { + high: 4, + low: 1, + energy: "1d4", + kinetic: "1d4", + standard: "1d6 + @abilities.str.mod" + }, + "1/2": { + high: 6, + low: 3, + energy: "1d4", + kinetic: "1d6", + standard: "1d6 + @abilities.str.mod" + }, + "1": { + high: 8, + low: 5, + energy: "1d4+1", + kinetic: "1d6+1", + standard: "1d6 + 1 + @abilities.str.mod" + }, + "2": { + high: 10, + low: 7, + energy: "1d4+2", + kinetic: "1d6+2", + standard: "1d6 + 2 + @abilities.str.mod" + }, + "3": { + high: 11, + low: 8, + energy: "1d4+3", + kinetic: "1d6+3", + standard: "1d6 + 3 + @abilities.str.mod" + }, + "4": { + high: 12, + low: 9, + energy: "1d4+4", + kinetic: "1d6+4", + standard: "1d6 + 4 + @abilities.str.mod" + }, + "5": { + high: 14, + low: 11, + energy: "1d6+5", + kinetic: "1d8+5", + standard: "1d6 + 5 + @abilities.str.mod" + }, + "6": { + high: 16, + low: 13, + energy: "1d10+6", + kinetic: "2d6+6", + standard: "1d8 + 6 + @abilities.str.mod" + }, + "7": { + high: 17, + low: 14, + energy: "2d6+7", + kinetic: "2d8+7", + standard: "2d6 + 7 + @abilities.str.mod" + } } } + }, + specialAbilities: { + universalCreatureRule: { + ferocity: UniversalCreatureRules.ferocity, + naturalWeapons: UniversalCreatureRules.naturalWeapons, + integratedWeapons: UniversalCreatureRules.integratedWeapons + }, + adjustment: { + brute: new AdjustmentSpecialAbility("brute", "Use the low attack value for the NPC’s main attack, but determine the attack’s damage as if the NPC’s CR were 2 higher (adding the extra damage from weapon specialization). This special ability has a greater impact at higher CRs."), + extraHitPoints: new AdjustmentSpecialAbility("extra hit points", "Increase the NPC’s HP by 20%."), + saveBoost: new AdjustmentSpecialAbility("save boost", "Increase all saving throw bonuses by 1 or one saving throw bonus by 3."), + //TODO: Secondary Magic + skillful: new AdjustmentSpecialAbility("skillful", "Increase all master and good skill bonuses by 1.") + } } }; //# sourceMappingURL=MonsterCreation.js.map \ No newline at end of file diff --git a/dist/data/MonsterCreation.js.map b/dist/data/MonsterCreation.js.map index 4c32d20..8652f7c 100644 --- a/dist/data/MonsterCreation.js.map +++ b/dist/data/MonsterCreation.js.map @@ -1 +1 @@ -{"version":3,"file":"MonsterCreation.js","sourceRoot":"","sources":["../../src/data/MonsterCreation.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;AAE1C,MAAM,CAAC,MAAM,eAAe,GAAG;IAE3B,MAAM,EAAE;QACJ,gBAAgB;QAChB,MAAM,EAAE;YACJ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E;oBACP,MAAM,EAAE,OAAO;oBACf,OAAO,EAAE,OAAO;oBAChB,QAAQ,EAAE,8BAA8B;iBAC1B;gBAClB,GAAG,EAAE;oBACD,IAAI,EAAE,EAAE;oBACR,GAAG,EAAE,EAAE;oBACP,MAAM,EAAE,QAAQ;oBAChB,OAAO,EAAE,OAAO;oBAChB,QAAQ,EAAE,8BAA8B;iBAC1B;gBAClB,GAAG,EAAE;oBACD,IAAI,EAAE,EAAE;oBACR,GAAG,EAAE,EAAE;oBACP,MAAM,EAAE,OAAO;oBACf,OAAO,EAAE,OAAO;oBAChB,QAAQ,EAAE,8BAA8B;iBAC1B;aACrB;SACJ;KACJ;IACD,gBAAgB,EAAE;QACd,qBAAqB,EAAE;YACnB,QAAQ,EAAE,sBAAsB,CAAC,QAAQ;YACzC,cAAc,EAAE,sBAAsB,CAAC,cAAc;YACrD,iBAAiB,EAAE,sBAAsB,CAAC,iBAAiB;SAC9D;QACD,UAAU,EAAE;YACR,KAAK,EAAE,IAAI,wBAAwB,CAC/B,OAAO,EACP,uOAAuO,CAC1O;YACD,cAAc,EAAE,IAAI,wBAAwB,CACxC,kBAAkB,EAClB,+BAA+B,CAClC;YACD,SAAS,EAAE,IAAI,wBAAwB,CACnC,YAAY,EACZ,wEAAwE,CAC3E;YACD,uBAAuB;YACvB,QAAQ,EAAE,IAAI,wBAAwB,CAClC,UAAU,EACV,kDAAkD,CACrD;SACJ;KACJ;CACJ,CAAA"} \ No newline at end of file diff --git a/dist/data/Names.js b/dist/data/Names.js index 5f6d70f..ab9c5a3 100644 --- a/dist/data/Names.js +++ b/dist/data/Names.js @@ -2,41 +2,366 @@ export const Names = {}; // TODO: Currently best suited in JavaScript, too much boilerplate involved in expressing in TypeScript. Should re-evaluate in future when more experienced. // NOTE: Default is also used for human names // Default -Names.default = { male: {}, female: {}, other: {} }; -Names.default.format = "{0} {1}"; +Names.default = { format: "{0} {1}", male: {}, female: {}, other: {} }; Names.default.other.first = ["Sam", "Riley"]; -Names.default.male.first = ["Adrian", "Alex", "Alfred", "Bob", "Dale", "George", "John", "Jordan", "Jovan", "Tom", "Reginald", "Ryan"].concat(Names.default.other.first); -Names.default.female.first = ["Alice", "Cara", "Jenn", "Tess", "Rachel", "Rebecca", "Tina", "Trish"].concat(Names.default.other.first); -Names.default.last = ["Adamson", "Black", "Johnson", "Mason", "Thompson", "Slat", "Stone", "Richards", "Ronson", "Watson", "White"]; +Names.default.male.first = [ + "Adrian", + "Alex", + "Alfred", + "Bob", + "Dale", + "George", + "John", + "Jordan", + "Jovan", + "Tom", + "Reginald", + "Ryan" +].concat(Names.default.other.first); +Names.default.female.first = [ + "Alice", + "Cara", + "Jenn", + "Tess", + "Rachel", + "Rebecca", + "Tina", + "Trish" +].concat(Names.default.other.first); +Names.default.last = [ + "Adamson", + "Black", + "Johnson", + "Mason", + "Thompson", + "Slat", + "Stone", + "Richards", + "Ronson", + "Watson", + "White" +]; // Exotic Names.exotic = { male: {}, female: {}, other: {} }; Names.exotic.format = "{0}{1}"; -Names.exotic.other.first = ["Abrog", "Amiell", "Egnils", "Eskas", "Folta", "Kusi", "Lessaith", "Nukteins", "Oltah", "Qharruits", "Qhihrer", "Sea", "Sugik", "Tasosh", "Throlphirs", "Vu"]; +Names.exotic.other.first = [ + "Abrog", + "Amiell", + "Egnils", + "Eskas", + "Folta", + "Kusi", + "Lessaith", + "Nukteins", + "Oltah", + "Qharruits", + "Qhihrer", + "Sea", + "Sugik", + "Tasosh", + "Throlphirs", + "Vu" +]; Names.exotic.male.first = Names.exotic.other.first; Names.exotic.female.first = Names.exotic.other.first; -Names.exotic.denominator = ["'a", "-a", " a", "a", "bo", "cha", "'o", "oyo", "s", "", "", "", "", "", "", "", ""]; // Denominators are appended onto name without a space +Names.exotic.denominator = [ + "'a", + "-a", + " a", + "a", + "bo", + "cha", + "'o", + "oyo", + "s", + "", + "", + "", + "", + "", + "", + "", + "" +]; // Denominators are appended onto name without a space Names.exotic.last = [""]; // No last names // Android Names.android = { male: {} }; Names.android.format = "{0}{1}"; -Names.android.male.first = ["Article", "Avoph", "Burst", "Clarity", "Fluke", "Mercy", "Magic", "Mode", "Requiem", "Simple", "Wisdom", "Union"]; -Names.android.denominator = ["-0", "-1", "-2", "-3", "-4", "-55", "-7", "-12", "-64", "-99", "", "", "", ""]; // Denominators are appended onto name without a space +Names.android.male.first = [ + "Article", + "Avoph", + "Burst", + "Clarity", + "Fluke", + "Mercy", + "Magic", + "Mode", + "Requiem", + "Simple", + "Wisdom", + "Union" +]; +Names.android.denominator = [ + "-0", + "-1", + "-2", + "-3", + "-4", + "-55", + "-7", + "-12", + "-64", + "-99", + "", + "", + "", + "" +]; // Denominators are appended onto name without a space Names.android.last = [""]; // No last names // Dwarf Names.dwarf = { male: {}, female: {} }; -Names.dwarf.male.first = ["Luldream", "Ginik", "Grolgulir", "Nodrac", "Turgrol", "Yarbud"]; -Names.dwarf.female.first = ["Lokhubela", "Hozzida", "Gotribera", "Sarsolda", "Yagraeda", "Yarohilda"]; -Names.dwarf.last = ["Barrelshoulder", "Bristleshield", "Bronzemaker", "Coalstone", "Ironcview", "Koboldbow", "Largebrow", "Orebreaker", "Wraithgranite"]; +Names.dwarf.male.first = [ + "Luldream", + "Ginik", + "Grolgulir", + "Nodrac", + "Turgrol", + "Yarbud" +]; +Names.dwarf.female.first = [ + "Lokhubela", + "Hozzida", + "Gotribera", + "Sarsolda", + "Yagraeda", + "Yarohilda" +]; +Names.dwarf.last = [ + "Barrelshoulder", + "Bristleshield", + "Bronzemaker", + "Coalstone", + "Ironcview", + "Koboldbow", + "Largebrow", + "Orebreaker", + "Wraithgranite" +]; +// Drow Names.drow = { male: {}, female: {} }; -Names.drow.male.first = ["Arcavato", "Dantrag", "Dresmorlin", "Dro", "Drovic", "Duagloth", "Durdyn", "Firyin", "Kaelmourn", "Gogloth", "Nyloth", "Merrryn", "Mirrendier", "Naltel", "Pharnox", "Syrendross", "Rizraen", "Zov"]; -Names.drow.female.first = ["Ahlysaaria", "Belmarniss", "Cylellinth", "Drada", "Dralia", "Drisinil", "Ilvaria", "Johysis", "Jysdra", "Jhaelnitra", "Loscivia", "Ghina", "Neerda", "Tyvorhan", "Ulumbralya", "Volundeil"]; -Names.drow.last = ["Abaeir", "Abbylan", "Argith", "Baenre", "Beltaulur", "Blaerabban", "Blundyth", "Chaulssin", "Coborel", "Coloara", "Cormrael", "Daevion'lyr", "Dalael", "Dhalmass", "Dryaalis", "Dyrr", "Duskryn", "Mizzrarran", "Mizzrear", "T'orgh", "Vrinn", "Zaphresz", "Zauviir", "Zolond"]; -Names.drow.denominator = [" of House Zeizerer", " of House Arabani", " of House Cyrocaust", " of House Xicton", " of House Blasfamus", "", "", "", "", "", "", "", "", "", "", ""]; // Denominators are appended onto name without a space +Names.drow.male.first = [ + "Arcavato", + "Dantrag", + "Dresmorlin", + "Dro", + "Drovic", + "Duagloth", + "Durdyn", + "Firyin", + "Kaelmourn", + "Gogloth", + "Nyloth", + "Merrryn", + "Mirrendier", + "Naltel", + "Pharnox", + "Syrendross", + "Rizraen", + "Zov" +]; +Names.drow.female.first = [ + "Ahlysaaria", + "Belmarniss", + "Cylellinth", + "Drada", + "Dralia", + "Drisinil", + "Ilvaria", + "Johysis", + "Jysdra", + "Jhaelnitra", + "Loscivia", + "Ghina", + "Neerda", + "Tyvorhan", + "Ulumbralya", + "Volundeil" +]; +Names.drow.last = [ + "Abaeir", + "Abbylan", + "Argith", + "Baenre", + "Beltaulur", + "Blaerabban", + "Blundyth", + "Chaulssin", + "Coborel", + "Coloara", + "Cormrael", + "Daevion'lyr", + "Dalael", + "Dhalmass", + "Dryaalis", + "Dyrr", + "Duskryn", + "Mizzrarran", + "Mizzrear", + "T'orgh", + "Vrinn", + "Zaphresz", + "Zauviir", + "Zolond" +]; +Names.drow.denominator = [ + " of House Zeizerer", + " of House Arabani", + " of House Cyrocaust", + " of House Xicton", + " of House Blasfamus", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" +]; // Denominators are appended onto name without a space +// Elf +Names.elf = { male: {}, female: {} }; +Names.elf.male.first = [ + "Cul", + "Elvoss", + "Fin", + "Keis", + "Krel", + "Hom", + "Icvin", + "Mas", + "Mass", + "Nem", + "Nothi", + "Sass", + "Tasil", + "Utham", + "Vir", + "Zeis", + "Zemuglogom" +]; +Names.elf.female.first = [ + "Arri", + "Acae", + "Alle", + "Ila", + "Phali", + "Phaves", + "Saahhil", + "Sinnis", + "Sumanrin", + "Yarnis", + "Vuha", + "Ulma" +]; +Names.elf.last = [ + "Car", + "Das", + "Essu", + "Kor", + "Kos", + "Jier", + "Mis", + "Oreldlun", + "Sam", + "Sharliphos", + "Veeclor", + "Yurayu", + "Vam", + "Vuna" +]; +// Half-elf (uses default names) +// Half-orc +Names.halfOrc = { male: {}, female: {} }; +Names.halfOrc.male.first = [ + "Bazzosk", + "Bros", + "Buk", + "Hezrulm", + "Ogdig", + "Purg" +]; +Names.halfOrc.female.first = [ + "Rabla", + "Habre", + "Hedli", + "Ohralru", + "Rzela", + "Vabla" +]; +Names.halfOrc.last = [ + "Bak", + "Ber", + "Dazro", + "Dom", + "Ekaxle", + "Jirvi", + "Jom", + "Juxlanrev", + "Revomutsky", + "Rozkum", + "Tondrerem", + "Som", + "Soshky", + "Wiz", + "Vux" +]; // Halfling Names.halfling = { male: {}, female: {} }; -Names.halfling.male.first = ["Balderic", "Drogo", "Filbo", "Samwise", "Sorbo"].concat(Names.default.male.first); //Default first names are appropriate for halflings as well -Names.halfling.female.first = ["Berenga", "Hilda", "Lalia", "Sherry", "Pamphila"].concat(Names.default.female.first); //Default first names are appropriate for halflings as well -Names.halfling.last = ["Biggums", "Boulderhill", "Gardner", "Goodchild", "Langham", "Oakbottom", "Smallburrow", "Thornburrow", "Underhill", "Undertree"]; +Names.halfling.male.first = [ + "Balderic", + "Drogo", + "Filbo", + "Samwise", + "Sorbo" +].concat(Names.default.male.first); //Default first names are appropriate for halflings as well +Names.halfling.female.first = [ + "Berenga", + "Hilda", + "Lalia", + "Sherry", + "Pamphila" +].concat(Names.default.female.first); //Default first names are appropriate for halflings as well +Names.halfling.last = [ + "Biggums", + "Boulderhill", + "Gardner", + "Goodchild", + "Langham", + "Oakbottom", + "Smallburrow", + "Thornburrow", + "Underhill", + "Undertree" +]; +// Hobgoblin +Names.hobgoblin = { male: {} }; +Names.hobgoblin.male.first = [ + "Dithik", + "Drarud", + "Ettod", + "Ketreng", + "Ditrer", + "Kerdun", + "Nogtod", + "Relbim", + "Radret", + "Sakhang", + "Talbin" +]; +Names.hobgoblin.last = [""]; // No last names // Gnoll Names.gnoll = { male: {}, female: {}, other: {} }; Names.gnoll.other.first = ["Ot", "Sru", "Gnet"]; @@ -45,15 +370,71 @@ Names.gnoll.female.first = ["Byz", "Meih", "Nyhn", "Thiar"].concat(Names.gnoll.o Names.gnoll.last = [""]; // No last names // Gnome Names.gnome = { male: {}, female: {}, other: {} }; -Names.gnome.other.first = ["Glakpap", "Gnefipnoc", "Hednibyl", "Mansbikuc", "Mawugbert", "Zulmen"]; -Names.gnome.male.first = ["Blakweda", "Clilbefut", "Shaimbess", "Shelben", "Wanudlym"].concat(Names.gnome.other.first); -Names.gnome.female.first = ["Boovikort", "Gobkirt", "Slunsmat", "Wupnic", "Zemzap"].concat(Names.gnome.other.first); +Names.gnome.other.first = [ + "Glakpap", + "Gnefipnoc", + "Hednibyl", + "Mansbikuc", + "Mawugbert", + "Zulmen" +]; +Names.gnome.male.first = [ + "Blakweda", + "Clilbefut", + "Shaimbess", + "Shelben", + "Wanudlym" +].concat(Names.gnome.other.first); +Names.gnome.female.first = [ + "Boovikort", + "Gobkirt", + "Slunsmat", + "Wupnic", + "Zemzap" +].concat(Names.gnome.other.first); Names.gnome.last = [""]; // No last names // Kasatha Names.kasatha = { male: {} }; -Names.kasatha.male.first = ["Cas", "De Holetif", "Gotaldus", "Jatsol", "Jiltof", "Maecran", "Mahas", "Nilaltrom", "Tursal", "Tyemsil", "Zuna"]; // All Kasatha names are non-gendered +Names.kasatha.male.first = [ + "Cas", + "De Holetif", + "Gotaldus", + "Jatsol", + "Jiltof", + "Maecran", + "Mahas", + "Nilaltrom", + "Tursal", + "Tyemsil", + "Zuna" +]; // All Kasatha names are non-gendered Names.kasatha.last = [""]; // No last names // Lashunta (uses default names) +Names.lashunta = { male: {} }; +Names.lashunta.male.first = [ + "All", + "Dasel", + "Doles", + "Eieny", + "Iss", + "Ma", + "Mekafi", + "Niamas", + "Novo", + "Os", + "Thirenes", + "Seva", + "Taeoss", + "Te", + "Thofudol", + "Tonell", + "Vila", + "Zhaloloss", + "Zhefuh", + "Zinell", + "Zhohi" +]; // All Lashunta names are non-gendered +Names.lashunta.last = [""]; // No last names // Naur (uses exotic names) Names.nuar = Names.exotic; // Shirren (uses exotic names) @@ -63,4 +444,90 @@ Names.skittermander = Names.exotic; // Vesk (uses exotic names) Names.vesk = Names.exotic; // Ysoki (uses default names) +// Creature type names +Names.animal = { male: {} }; +Names.animal.format = "{0}{1}"; +Names.animal.male.first = [ + "Astra", + "Barnn", + "Coyo", + "Cy", + "Flam", + "Hippo", + "Mega", + "Neo", + "Ovi", + "Omni" +]; // Used for first half of animal name +Names.animal.last = ["iguano", "raptor", "aroo", "", ""]; // Used for second half of animal name +Names.animal.denominator = [ + "don", + "saur", + "oda", + "opus", + "amimus", + "mander", + "", + "", + "", + "", + "", + "" +]; // Used as an optional suffix in the animal name +// +Names.construct = { male: {} }; +Names.construct.format = "{0}{1}"; +Names.construct.male.first = ["Buzz", "Zap", "Shoot", "Swoosh"]; +Names.construct.last = ["bot", "inator"]; +Names.construct.denominator = [ + "", + " 0", + " 1", + " 2", + " 3", + " 4", + " 5", + " 6", + " 2000", + " 3000" +]; +// +Names.ooze = { male: {} }; +Names.ooze.format = "{0}"; +Names.ooze.male.first = [ + "Bloop", + "Boop", + "Brupp", + "Brzz", + "Floop", + "Froop", + "Fzzz", + "Goop", + "Gzzz", + "Sloop", + "Szzz", + "Zoop", + "Zzt" +]; +Names.ooze.last = []; // Only uses first names +// +Names.vermin = { male: {} }; +Names.vermin.format = "{0}{1}"; +Names.vermin.male.first = [ + "Archae", + "Anthi", + "Anobi", + "Bembi", + "Cleri", + "Chrysi", + "Evani", + "Ichneu", + "Lepido", + "Manto", + "Mega", + "Trogo", + "Xylo" +]; // Used for first half of animal name +Names.vermin.last = ["bio", "dea", "mero", "somelidae", "tera"]; // Used for second half of vermin name +Names.vermin.denominator = ["pede", " spider", " worm", "", "", ""]; //# sourceMappingURL=Names.js.map \ No newline at end of file diff --git a/dist/data/Names.js.map b/dist/data/Names.js.map index 12bdae2..34cfd75 100644 --- a/dist/data/Names.js.map +++ b/dist/data/Names.js.map @@ -1 +1 @@ -{"version":3,"file":"Names.js","sourceRoot":"","sources":["../../src/data/Names.js"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;AACxB,4JAA4J;AAC5J,6CAA6C;AAC7C,UAAU;AACV,KAAK,CAAC,OAAO,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;AACpD,KAAK,CAAC,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;AACjC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;AAC7C,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,GAAG,CAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,CAAE,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;AAC3K,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,GAAG,CAAE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,M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,MAAM;IACN,OAAO;IACP,OAAO;IACP,MAAM;IACN,MAAM;IACN,MAAM;IACN,OAAO;IACP,MAAM;IACN,MAAM;IACN,KAAK;CACR,CAAA;AACD,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,EAAE,CAAA,CAAC,wBAAwB;AAC7C,EAAE;AACF,KAAK,CAAC,MAAM,GAAG,EAAE,IAAI,EAAE,EAAE,EAAE,CAAA;AAC3B,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,QAAQ,CAAA;AAC9B,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,GAAG;IACtB,QAAQ;IACR,OAAO;IACP,OAAO;IACP,OAAO;IACP,OAAO;IACP,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,MAAM;IACN,OAAO;IACP,MAAM;CACT,CAAA,CAAC,qCAAqC;AACvC,KAAK,CAAC,MAAM,CAAC,IAAI,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,CAAC,CAAA,CAAC,sCAAsC;AACtG,KAAK,CAAC,MAAM,CAAC,WAAW,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC,CAAA"} \ No newline at end of file diff --git a/dist/data/Personality.js b/dist/data/Personality.js deleted file mode 100644 index 8e86cb4..0000000 --- a/dist/data/Personality.js +++ /dev/null @@ -1 +0,0 @@ -//# sourceMappingURL=Personality.js.map \ No newline at end of file diff --git a/dist/data/Personality.js.map b/dist/data/Personality.js.map deleted file mode 100644 index cef0b7b..0000000 --- a/dist/data/Personality.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"Personality.js","sourceRoot":"","sources":["../../src/data/Personality.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/data/Probabilities.js b/dist/data/Probabilities.js index a450ad3..a72f4e8 100644 --- a/dist/data/Probabilities.js +++ b/dist/data/Probabilities.js @@ -1,3 +1,4 @@ +import { Gender } from "./MonsterCreation.js"; export const Probabilities = { // This distribution is based on my assumption that 50% of characters are good, 40% are bad and 10% are evil. // TODO: Allow customization of these values @@ -14,8 +15,8 @@ export const Probabilities = { // Evil { name: "LE", percentage: 0.4 }, { name: "NE", percentage: 0.3 }, - { name: "CE", percentage: 0.3 } - ] + { name: "CE", percentage: 0.3 }, + ], }, // The default distribution of races in a neutral environment when generating a humanoid // NOTE: Currently based on Absalom Station settlement distribution @@ -25,29 +26,32 @@ export const Probabilities = { default: [ { name: "android", percentage: 0.09 }, { name: "dwarf", percentage: 0.04 }, - { name: "drow", percentage: 0.02 }, - { name: "human", percentage: 0.46 }, + { name: "drow", percentage: 0.01 }, + { name: "elf", percentage: 0.01 }, { name: "kasatha", percentage: 0.04 }, - { name: "gnoll", percentage: 0.02 }, + { name: "gnoll", percentage: 0.01 }, { name: "gnome", percentage: 0.02 }, + { name: "halfElf", percentage: 0.01 }, + { name: "halfOrc", percentage: 0.01 }, { name: "halfling", percentage: 0.04 }, + { name: "human", percentage: 0.46 }, { name: "lashunta", percentage: 0.07 }, { name: "nuar", percentage: 0.01 }, { name: "shirren", percentage: 0.05 }, - { name: "skittermander", percentage: 0.02 }, + { name: "skittermander", percentage: 0.01 }, { name: "ysoki", percentage: 0.09 }, - { name: "vesk", percentage: 0.03 } - ] + { name: "vesk", percentage: 0.03 }, + ], }, // NOTE: Extrapolated from 2019 Canadian census: https://www12.statcan.gc.ca/census-recensement/2021/ref/98-20-0002/982000022020002-eng.cfm // TODO: Allow customization if your world has a different distribution // NOTE: Should consider gender distributions by race, ie. Drow is a matriarchal society genderDistributions: { default: [ - { name: "male", percentage: 0.49 }, - { name: "female", percentage: 0.50 }, - { name: "non-binary", percentage: 0.01 } - ] - } + { name: Gender.male, percentage: 0.49 }, + { name: Gender.female, percentage: 0.5 }, + { name: Gender.nonBinary, percentage: 0.01 }, + ], + }, }; //# sourceMappingURL=Probabilities.js.map \ No newline at end of file diff --git a/dist/data/Probabilities.js.map b/dist/data/Probabilities.js.map index c6b4975..ba6db79 100644 --- a/dist/data/Probabilities.js.map +++ b/dist/data/Probabilities.js.map @@ -1 +1 @@ -{"version":3,"file":"Probabilities.js","sourceRoot":"","sources":["../../src/data/Probabilities.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG;IAEzB,6GAA6G;IAC7G,4CAA4C;IAC5C,sBAAsB,EAAG;QACrB,OAAO,EAAE;YACL,OAAO;YACP,EAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAC;YAC9B,EAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAC;YAC9B,EAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAC;YAC9B,UAAU;YACV,EAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAC;YAC9B,EAAC,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,IAAI,EAAC;YAC7B,EAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAC;YAC9B,OAAO;YACP,EAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAC;YAC7B,EAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAC;YAC7B,EAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,EAAC;SAChC;KACJ;IACD,wFAAwF;IACxF,mEAAmE;IACnE,oEAAoE;IACpE,4CAA4C;IAC5C,iBAAiB,EAAE;QACf,OAAO,EAAE;YACL,EAAC,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAC;YACnC,EAAC,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAC;YACjC,EAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAC;YAChC,EAAC,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAC;YACjC,EAAC,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAC;YACnC,EAAC,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAC;YACjC,EAAC,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAC;YACjC,EAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAC;YACpC,EAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAC;YACpC,EAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAC;YAChC,EAAC,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAC;YACnC,EAAC,IAAI,EAAE,eAAe,EAAE,UAAU,EAAE,IAAI,EAAC;YACzC,EAAC,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAC;YACjC,EAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAC;SACnC;KACJ;IACD,2IAA2I;IAC3I,uEAAuE;IACvE,wFAAwF;IACxF,mBAAmB,EAAE;QACjB,OAAO,EAAE;YACL,EAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAC;YAChC,EAAC,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAC;YAClC,EAAC,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,IAAI,EAAC;SACzC;KACJ;CACJ,CAAC"} \ No newline at end of file +{"version":3,"file":"Probabilities.js","sourceRoot":"","sources":["../../src/data/Probabilities.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAE7C,MAAM,CAAC,MAAM,aAAa,GAAG;IACzB,6GAA6G;IAC7G,4CAA4C;IAC5C,sBAAsB,EAAE;QACpB,OAAO,EAAE;YACL,OAAO;YACP,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE;YAChC,EAAE,IAAI,EAAE,IAA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E,IAAI,EAAE;YACnC,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE;YACtC,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE;YAClC,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE;YACrC,EAAE,IAAI,EAAE,eAAe,EAAE,UAAU,EAAE,IAAI,EAAE;YAC3C,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE;YACnC,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE;SACrC;KACJ;IACD,2IAA2I;IAC3I,uEAAuE;IACvE,wFAAwF;IACxF,mBAAmB,EAAE;QACjB,OAAO,EAAE;YACL,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE;YACvC,EAAE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE;YACxC,EAAE,IAAI,EAAE,MAAM,CAAC,SAAS,EAAE,UAAU,EAAE,IAAI,EAAE;SAC/C;KACJ;CACJ,CAAA"} \ No newline at end of file diff --git a/dist/data/Races.js b/dist/data/Races.js index 9016bad..6c27641 100644 --- a/dist/data/Races.js +++ b/dist/data/Races.js @@ -1,21 +1,27 @@ import { Grafts } from "./Grafts.js"; +import Race from "../models/Race.js"; +import { Size } from "./MonsterCreation.js"; export const Races = { // A list of humanoid type races which will randomly be generated (generally for non-combat NPCs) nonCombatantRaces: { - "android": { name: "android", size: "medium", creatureTypeGraft: Grafts.creatureType.humanoid, creatureSubtypeGraft: Grafts.creatureSubtype.android }, - "dwarf": { name: "dwarf", size: "medium", languages: ["dwarven"], creatureTypeGraft: Grafts.creatureType.humanoid, creatureSubtypeGraft: Grafts.creatureSubtype.dwarf }, - "drow": { name: "drow", size: "medium", languages: ["drow"], creatureTypeGraft: Grafts.creatureType.humanoid, creatureSubtypeGraft: Grafts.creatureSubtype.elf }, - "gnome": { name: "gnome", size: "small", languages: ["gnome"], creatureTypeGraft: Grafts.creatureType.humanoid, creatureSubtypeGraft: Grafts.creatureSubtype.gnome }, - "gnoll": { name: "gnoll", size: "medium", customLanguages: ["gnoll"], creatureTypeGraft: Grafts.creatureType.humanoid, creatureSubtypeGraft: Grafts.creatureSubtype.gnoll }, - "human": { name: "human", size: "medium", creatureTypeGraft: Grafts.creatureType.humanoid, creatureSubtypeGraft: Grafts.creatureSubtype.human }, - "halfling": { name: "halfling", size: "small", languages: ["halfling"], creatureTypeGraft: Grafts.creatureType.humanoid, creatureSubtypeGraft: Grafts.creatureSubtype.halfling }, - "kasatha": { name: "kasatha", size: "medium", arms: 4, languages: ["kasatha"], creatureTypeGraft: Grafts.creatureType.humanoid, creatureSubtypeGraft: Grafts.creatureSubtype.kasatha }, - "lashunta": { name: "lashunta", size: "medium", languages: ["castrovelian"], creatureTypeGraft: Grafts.creatureType.humanoid, creatureSubtypeGraft: Grafts.creatureSubtype.lashunta }, - "nuar": { name: "nuar", size: "medium", creatureTypeGraft: Grafts.creatureType.monstrousHumanoid }, - "skittermander": { name: "skittermander", size: "small", arms: 6, creatureTypeGraft: Grafts.creatureType.humanoid, creatureSubtypeGraft: Grafts.creatureSubtype.skittermander }, - "shirren": { name: "shirren", size: "medium", languages: ["shirren"], creatureTypeGraft: Grafts.creatureType.humanoid, creatureSubtypeGraft: Grafts.creatureSubtype.shirren }, - "vesk": { name: "vesk", size: "medium", languages: ["vesk"], creatureTypeGraft: Grafts.creatureType.humanoid, creatureSubtypeGraft: Grafts.creatureSubtype.vesk }, - "ysoki": { name: "ysoki", size: "small", languages: ["akiton", "ysoki"], creatureTypeGraft: Grafts.creatureType.humanoid, creatureSubtypeGraft: Grafts.creatureSubtype.ysoki } + android: new Race("android", Size.medium, Grafts.creatureType.humanoid, Grafts.creatureSubtype.android), + dwarf: new Race("dwarf", Size.medium, Grafts.creatureType.humanoid, Grafts.creatureSubtype.dwarf, ["dwarven"]), + drow: new Race("drow", Size.medium, Grafts.creatureType.humanoid, Grafts.creatureSubtype.elf, ["drow"]), + elf: new Race("elf", Size.medium, Grafts.creatureType.humanoid, Grafts.creatureSubtype.elf, ["elven"]), + gnome: new Race("gnome", Size.small, Grafts.creatureType.humanoid, Grafts.creatureSubtype.gnome, ["gnome"]), + gnoll: new Race("gnoll", Size.medium, Grafts.creatureType.humanoid, Grafts.creatureSubtype.gnoll, undefined, ["gnoll"]), + hobgoblin: new Race("hobgoblin", Size.medium, Grafts.creatureType.humanoid, Grafts.creatureSubtype.goblinoid, undefined, ["goblin"]), + human: new Race("human", Size.medium, Grafts.creatureType.humanoid, Grafts.creatureSubtype.human), + halfOrc: new Race("half-orc", Size.medium, Grafts.creatureType.humanoid, [Grafts.creatureSubtype.human, Grafts.creatureSubtype.orc], ["orc"]), + halfElf: new Race("half-elf", Size.medium, Grafts.creatureType.humanoid, [Grafts.creatureSubtype.human, Grafts.creatureSubtype.elf], ["elven"]), + halfling: new Race("halfling", Size.small, Grafts.creatureType.humanoid, Grafts.creatureSubtype.halfling, ["halfling"]), + kasatha: new Race("kasatha", Size.medium, Grafts.creatureType.humanoid, Grafts.creatureSubtype.kasatha, ["kasatha"], undefined, 4), + lashunta: new Race("lashunta", Size.medium, Grafts.creatureType.humanoid, Grafts.creatureSubtype.lashunta, ["castrovelian"]), + nuar: new Race("nuar", Size.medium, Grafts.creatureType.monstrousHumanoid), + skittermander: new Race("skittermander", Size.small, Grafts.creatureType.humanoid, Grafts.creatureSubtype.skittermander, undefined, undefined, 6), + shirren: new Race("shirren", Size.medium, Grafts.creatureType.humanoid, Grafts.creatureSubtype.shirren, ["shirren"]), + vesk: new Race("vesk", Size.medium, Grafts.creatureType.humanoid, Grafts.creatureSubtype.vesk, ["vesk"]), + ysoki: new Race("ysoki", Size.small, Grafts.creatureType.humanoid, Grafts.creatureSubtype.ysoki, ["akiton", "ysoki"]) } }; // The version of sfrpg the player is using may not have the new races included in the Alien Races Cards @@ -23,66 +29,57 @@ export const Races = { // (as the version of sfrpg which is compatible with 0.8.X will have these races) export const BundledRaces = { gnoll: { - "name": "Gnoll", - "type": "race", - "data": { - "description": { - "chat": "", - "gmnotes": "", - "short": "", - "value": "

Gnolls are hyena-headed humanoids with reputation as bloodthirsty raiders, scavengers, and cannibals. They are capable hunters who respect pwoer and strength over station or role, and most gnolls would believe their own survival takes precedence over any kind of morality.

\n

Ability Adjustments +2 Str, +2 Con, -2 Int
Hit Points 6

\n

Size and Type

\n

Gnolls are Medium humanoids with the gnoll subtype.

\n

Self-Sufficient

\n

Gnolls receive a +2 racial bonus to Surival checks.

\n

Blindsense

\n

Gnolls have blindsense (scent) with a range of 30 feet.

\n

Darkvision

\n

Gnolls can see up to 60 feet in the dark. See page 263 for more information.

\n

Rugged Travel

\n

Each time they move, gnolls can move through the first square of nonmagical difficult terrain at their normal speed.

\n

Natural Weapons

\n

Gnolls can attack with a special unarmed strike that deals lethal damage, doesn’t count as archaic, and threatens squares. Gnoll gain a special version of the Weapon Specialization feat with this unarmed strike at 3rd level, allowing them to add 1–1/2 × their character level to their damage rolls for this unarmed strike (instead of just adding their character level, as usual).

\n

 

", - "unidentified": "" + name: "Gnoll", + type: "race", + data: { + description: { + chat: "", + gmnotes: "", + short: "", + value: "

Gnolls are hyena-headed humanoids with reputation as bloodthirsty raiders, scavengers, and cannibals. They are capable hunters who respect pwoer and strength over station or role, and most gnolls would believe their own survival takes precedence over any kind of morality.

\n

Ability Adjustments +2 Str, +2 Con, -2 Int
Hit Points 6

\n

Size and Type

\n

Gnolls are Medium humanoids with the gnoll subtype.

\n

Self-Sufficient

\n

Gnolls receive a +2 racial bonus to Surival checks.

\n

Blindsense

\n

Gnolls have blindsense (scent) with a range of 30 feet.

\n

Darkvision

\n

Gnolls can see up to 60 feet in the dark. See page 263 for more information.

\n

Rugged Travel

\n

Each time they move, gnolls can move through the first square of nonmagical difficult terrain at their normal speed.

\n

Natural Weapons

\n

Gnolls can attack with a special unarmed strike that deals lethal damage, doesn’t count as archaic, and threatens squares. Gnoll gain a special version of the Weapon Specialization feat with this unarmed strike at 3rd level, allowing them to add 1–1/2 × their character level to their damage rolls for this unarmed strike (instead of just adding their character level, as usual).

\n

 

", + unidentified: "" }, - "source": "ACD", - "type": "humanoid", - "modifiers": [ + source: "ACD", + type: "humanoid", + modifiers: [ { - "name": "Self-sufficient", - "modifier": "2", - "type": "racial", - "effectType": "skill", - "valueAffected": "sur", - "enabled": true, - "source": "Racial", - "notes": "Gnolls gain a +2 racial bonus to Survival checks.", - "modifierType": "constant", - "condition": "", - "subtab": "misc", - "max": 2, - "_id": "58a26466-6333-4d6b-91f0-49ef03c52fb6" + name: "Self-sufficient", + modifier: "2", + type: "racial", + effectType: "skill", + valueAffected: "sur", + enabled: true, + source: "Racial", + notes: "Gnolls gain a +2 racial bonus to Survival checks.", + modifierType: "constant", + condition: "", + subtab: "misc", + max: 2, + _id: "58a26466-6333-4d6b-91f0-49ef03c52fb6" } ], - "hp": { - "value": 6, - "min": 1 + hp: { + value: 6, + min: 1 }, - "abilityMods": { - "parts": [ - [ - 2, - "str" - ], - [ - 2, - "con" - ], - [ - -2, - "int" - ] + abilityMods: { + parts: [ + [2, "str"], + [2, "con"], + [-2, "int"] ] }, - "size": "medium", - "subtype": "gnoll", - "damage": { - "parts": [] + size: "medium", + subtype: "gnoll", + damage: { + parts: [] }, - "critical": { - "parts": [] + critical: { + parts: [] } }, - "flags": {}, - "effects": [] + flags: {}, + effects: [] } }; //# sourceMappingURL=Races.js.map \ No newline at end of file diff --git a/dist/data/Races.js.map b/dist/data/Races.js.map index ff5d49b..06f69c3 100644 --- a/dist/data/Races.js.map +++ b/dist/data/Races.js.map @@ -1 +1 @@ -{"version":3,"file":"Races.js","sourceRoot":"","sources":["../../src/data/Races.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC,MAAM,CAAC,MAAM,KAAK,GAAG;IACjB,iGAAiG;IACjG,iBAAiB,EAAE;QAC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L;wBACI,CAAC;wBACD,KAAK;qBACR;oBACD;wBACI,CAAC;wBACD,KAAK;qBACR;oBACD;wBACI,CAAC,CAAC;wBACF,KAAK;qBACR;iBACJ;aACJ;YACD,MAAM,EAAE,QAAQ;YAChB,SAAS,EAAE,OAAO;YAClB,QAAQ,EAAE;gBACN,OAAO,EAAE,EAAE;aACd;YACD,UAAU,EAAE;gBACR,OAAO,EAAE,EAAE;aACd;SACJ;QACD,OAAO,EAAE,EAAE;QACX,SAAS,EAAE,EAAE;KAChB;CACJ,CAAA"} \ No newline at end of file +{"version":3,"file":"Races.js","sourceRoot":"","sources":["../../src/data/Races.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AACpC,OAAO,IAAI,MAAM,mBAAmB,CAAA;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAE3C,MAAM,CAAC,MAAM,KAAK,GAAG;IACjB,iGAAiG;IACjG,iBAAiB,EAAE;QACf,OAAO,EAAE,IAAI,IAAI,CACb,SAAS,EACT,IAAI,CAAC,MAAM,EACX,MAAM,CAAC,YAAY,CAAC,QAAQ,EAC5B,MAAM,CAAC,eAAe,CAAC,OAAO,CACjC;QACD,KAAK,EAAE,IAAI,IAAI,CACX,OAAO,EACP,IAAI,CAAC,MAAM,EACX,MAAM,CAAC,YAAY,CAAC,QAAQ,EAC5B,MAAM,CAAC,eAAe,CAAC,KAAK,EAC5B,CAAC,SAAS,CAAC,CACd;QACD,IAAI,EAAE,IAAI,IAAI,CACV,MAAM,EACN,IAAI,CAAC,MAAM,EACX,MAAM,CAAC,YAAY,CAAC,QAAQ,EAC5B,MAAM,CAAC,eAAe,CAAC,GAAG,EAC1B,CAAC,MAAM,CAAC,CACX;QACD,GAAG,EAAE,IAAI,IAAI,CACT,KAAK,EACL,IAAI,CAAC,MAAM,EACX,MAAM,CAAC,YAAY,CAAC,QAAQ,EAC5B,MAAM,CAAC,eAAe,CAAC,GAAG,E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;AAED,wGAAwG;AACxG,sHAAsH;AACtH,iFAAiF;AACjF,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,KAAK,EAAE;QACH,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,MAAM;QACZ,IAAI,EAAE;YACF,WAAW,EAAE;gBACT,IAAI,EAAE,EAAE;gBACR,OAAO,EAAE,EAAE;gBACX,KAAK,EAAE,EAAE;gBACT,KAAK,EACD,k0CAAk0C;gBACt0C,YAAY,EAAE,EAAE;aACnB;YACD,MAAM,EAAE,KAAK;YACb,IAAI,EAAE,UAAU;YAChB,SAAS,EAAE;gBACP;oBACI,IAAI,EAAE,iBAAiB;oBACvB,QAAQ,EAAE,GAAG;oBACb,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE,OAAO;oBACnB,aAAa,EAAE,KAAK;oBACpB,OAAO,EAAE,IAAI;oBACb,MAAM,EAAE,QAAQ;oBAChB,KAAK,EAAE,mDAAmD;oBAC1D,YAAY,EAAE,UAAU;oBACxB,SAAS,EAAE,EAAE;oBACb,MAAM,EAAE,MAAM;oBACd,GAAG,EAAE,CAAC;oBACN,GAAG,EAAE,sCAAsC;iBAC9C;aACJ;YACD,EAAE,EAAE;gBACA,KAAK,EAAE,CAAC;gBACR,GAAG,EAAE,CAAC;aACT;YACD,WAAW,EAAE;gBACT,KAAK,EAAE;oBACH,CAAC,CAAC,EAAE,KAAK,CAAC;oBACV,CAAC,CAAC,EAAE,KAAK,CAAC;oBACV,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC;iBACd;aACJ;YACD,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,OAAO;YAChB,MAAM,EAAE;gBACJ,KAAK,EAAE,EAAE;aACZ;YACD,QAAQ,EAAE;gBACN,KAAK,EAAE,EAAE;aACZ;SACJ;QACD,KAAK,EAAE,EAAE;QACT,OAAO,EAAE,EAAE;KACd;CACJ,CAAA"} \ No newline at end of file diff --git a/dist/data/Skills.js b/dist/data/Skills.js new file mode 100644 index 0000000..d3b08b5 --- /dev/null +++ b/dist/data/Skills.js @@ -0,0 +1,23 @@ +export var Skill; +(function (Skill) { + Skill["acrobatics"] = "acr"; + Skill["athletics"] = "ath"; + Skill["bluff"] = "blu"; + Skill["computers"] = "com"; + Skill["culture"] = "cul"; + Skill["diplomacy"] = "dip"; + Skill["disguise"] = "dis"; + Skill["engineering"] = "eng"; + Skill["intimidate"] = "int"; + Skill["lifeSience"] = "lsc"; + Skill["medicine"] = "med"; + Skill["mysticism"] = "mys"; + Skill["perception"] = "per"; + Skill["physicalScience"] = "phs"; + Skill["piloting"] = "pil"; + Skill["senseMotive"] = "sen"; + Skill["sleightOfHand"] = "sle"; + Skill["stealth"] = "ste"; + Skill["survival"] = "sur"; +})(Skill || (Skill = {})); +//# sourceMappingURL=Skills.js.map \ No newline at end of file diff --git a/dist/data/Skills.js.map b/dist/data/Skills.js.map new file mode 100644 index 0000000..e1bda9f --- /dev/null +++ b/dist/data/Skills.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Skills.js","sourceRoot":"","sources":["../../src/data/Skills.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,KAoBX;AApBD,WAAY,KAAK;IACb,2BAAkB,CAAA;IAClB,0BAAiB,CAAA;IACjB,sBAAa,CAAA;IACb,0BAAiB,CAAA;IACjB,wBAAe,CAAA;IACf,0BAAiB,CAAA;IACjB,yBAAgB,CAAA;IAChB,4BAAmB,CAAA;IACnB,2BAAkB,CAAA;IAClB,2BAAkB,CAAA;IAClB,yBAAgB,CAAA;IAChB,0BAAiB,CAAA;IACjB,2BAAkB,CAAA;IAClB,gCAAuB,CAAA;IACvB,yBAAgB,CAAA;IAChB,4BAAmB,CAAA;IACnB,8BAAqB,CAAA;IACrB,wBAAe,CAAA;IACf,yBAAgB,CAAA;AACpB,CAAC,EApBW,KAAK,KAAL,KAAK,QAoBhB"} \ No newline at end of file diff --git a/dist/data/Types.js b/dist/data/Types.js new file mode 100644 index 0000000..c0c7ae2 --- /dev/null +++ b/dist/data/Types.js @@ -0,0 +1,38 @@ +/// List of creature types +export var Type; +(function (Type) { + Type[Type["aberration"] = 0] = "aberration"; + Type[Type["animal"] = 1] = "animal"; + Type[Type["construct"] = 2] = "construct"; + Type[Type["dragon"] = 3] = "dragon"; + Type[Type["fey"] = 4] = "fey"; + Type[Type["humanoid"] = 5] = "humanoid"; + Type[Type["magical beast"] = 6] = "magical beast"; + Type[Type["monstrous humanoid"] = 7] = "monstrous humanoid"; + Type[Type["ooze"] = 8] = "ooze"; + Type[Type["outsider"] = 9] = "outsider"; + Type[Type["plant"] = 10] = "plant"; + Type[Type["undead"] = 11] = "undead"; + Type[Type["vermin"] = 12] = "vermin"; +})(Type || (Type = {})); +/// List of creature subtypes +export var Subtype; +(function (Subtype) { + Subtype[Subtype["android"] = 0] = "android"; + Subtype[Subtype["dwarf"] = 1] = "dwarf"; + Subtype[Subtype["elf"] = 2] = "elf"; + Subtype[Subtype["gnome"] = 3] = "gnome"; + Subtype[Subtype["gnoll"] = 4] = "gnoll"; + Subtype[Subtype["goblinoid"] = 5] = "goblinoid"; + Subtype[Subtype["halfling"] = 6] = "halfling"; + Subtype[Subtype["human"] = 7] = "human"; + Subtype[Subtype["kasatha"] = 8] = "kasatha"; + Subtype[Subtype["lashunta"] = 9] = "lashunta"; + Subtype[Subtype["orc"] = 10] = "orc"; + Subtype[Subtype["shirren"] = 11] = "shirren"; + Subtype[Subtype["skittermander"] = 12] = "skittermander"; + Subtype[Subtype["technological"] = 13] = "technological"; + Subtype[Subtype["vesk"] = 14] = "vesk"; + Subtype[Subtype["ysoki"] = 15] = "ysoki"; +})(Subtype || (Subtype = {})); +//# sourceMappingURL=Types.js.map \ No newline at end of file diff --git a/dist/data/Types.js.map b/dist/data/Types.js.map new file mode 100644 index 0000000..ed61dd2 --- /dev/null +++ b/dist/data/Types.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Types.js","sourceRoot":"","sources":["../../src/data/Types.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAC1B,MAAM,CAAN,IAAY,IAcX;AAdD,WAAY,IAAI;IACZ,2CAAU,CAAA;IACV,mCAAM,CAAA;IACN,yCAAS,CAAA;IACT,mCAAM,CAAA;IACN,6BAAG,CAAA;IACH,uCAAQ,CAAA;IACR,iDAAe,CAAA;IACf,2DAAoB,CAAA;IACpB,+BAAI,CAAA;IACJ,uCAAQ,CAAA;IACR,kCAAK,CAAA;IACL,oCAAM,CAAA;IACN,oCAAM,CAAA;AACV,CAAC,EAdW,IAAI,KAAJ,IAAI,QAcf;AAED,6BAA6B;AAC7B,MAAM,CAAN,IAAY,OAiBX;AAjBD,WAAY,OAAO;IACf,2CAAO,CAAA;IACP,uCAAK,CAAA;IACL,mCAAG,CAAA;IACH,uCAAK,CAAA;IACL,uCAAK,CAAA;IACL,+CAAS,CAAA;IACT,6CAAQ,CAAA;IACR,uCAAK,CAAA;IACL,2CAAO,CAAA;IACP,6CAAQ,CAAA;IACR,oCAAG,CAAA;IACH,4CAAO,CAAA;IACP,wDAAa,CAAA;IACb,wDAAa,CAAA;IACb,sCAAI,CAAA;IACJ,wCAAK,CAAA;AACT,CAAC,EAjBW,OAAO,KAAP,OAAO,QAiBlB"} \ No newline at end of file diff --git a/dist/data/UniversalCreatureRules.js b/dist/data/UniversalCreatureRules.js new file mode 100644 index 0000000..fb62547 --- /dev/null +++ b/dist/data/UniversalCreatureRules.js @@ -0,0 +1,12 @@ +/// Collection of universal creature rules which are applied by various means (creature type grafts, special abilities, etc) +import UniversalCreatureRule from "../models/UniversalCreatureRule.js"; +export const UniversalCreatureRules = { + ferocity: new UniversalCreatureRule("ferocity", "When the creature is brought to 0 Hit Points, it can fight on for 1 more round. It can act normally until the end of its next turn; if it has 0 HP at that point, it dies. If it would lose further Hit Points before this, it ceases to be able to act and dies."), + integratedWeapons: new UniversalCreatureRule("integrated weapons", "The creature’s weapons are manufactured weapons, not natural weapons, and they are integrated into its frame. A creature can’t be disarmed of these weapons, though they can be removed and used if the creature is dead."), + mindless: new UniversalCreatureRule("mindless", "The creature has no Intelligence score or modifier and is immune to mind-affecting effects. Any DCs or other statistics that rely on an Intelligence score treat the creature as having a score of 10 (+0).\n" + + "Guidelines: Mindless creatures usually have fewer good skills and no master skills. Their skills should be based on inborn abilities, since they’re incapable of training."), + naturalWeapons: new UniversalCreatureRule("natural weapons", "Natural weapons (and natural attacks), such as acid spit, bite, claw, or slam don’t require ammunition and can’t be disarmed or sundered."), + sightless: new UniversalCreatureRule("sightless", "The creature does not use any visual senses and is thus never subject to any effect that requires the creature to see a target or effect. Sightless creatures normally have some form of blindsight to compensate for their sightlessness, but if not, they are assumed to be able to operate as well as a creature with normal vision unless the creature’s description says otherwise."), + unliving: new UniversalCreatureRule("unliving", "The creature has no Constitution score or modifier. Any DCs or other statistics that rely on a Constitution score treat the creature as having a score of 10 (+0). The creature is immediately destroyed when it reaches 0 Hit Points. An unliving creature doesn’t heal damage naturally, but a construct can be repaired with the right tools. Spells such as make whole can heal constructs, and magic effects can heal undead. An unliving creature with fast healing (see page 154) still benefits from that ability. Unliving creatures don’t breathe, eat, or sleep. They can’t be raised or resurrected, except through the use of miracle, wish, or a similar effect that specifically works on unliving creatures.") +}; +//# sourceMappingURL=UniversalCreatureRules.js.map \ No newline at end of file diff --git a/dist/data/UniversalCreatureRules.js.map b/dist/data/UniversalCreatureRules.js.map new file mode 100644 index 0000000..b7f80d9 --- /dev/null +++ b/dist/data/UniversalCreatureRules.js.map @@ -0,0 +1 @@ +{"version":3,"file":"UniversalCreatureRules.js","sourceRoot":"","sources":["../../src/data/UniversalCreatureRules.ts"],"names":[],"mappings":"AAAA,4HAA4H;AAC5H,OAAO,qBAAqB,MAAM,oCAAoC,CAAA;AAEtE,MAAM,CAAC,MAAM,sBAAsB,GAAG;IAClC,QAAQ,EAAE,IAAI,qBAAqB,CAC/B,UAAU,EACV,mQAAmQ,CACtQ;IACD,iBAAiB,EAAE,IAAI,qBAAqB,CACxC,oBAAoB,EACpB,2NAA2N,CAC9N;IACD,QAAQ,EAAE,IAAI,qBAAqB,CAC/B,UAAU,EACV,+MAA+M;QAC3M,4KAA4K,CACnL;IACD,cAAc,EAAE,IAAI,qBAAqB,CACrC,iBAAiB,EACjB,2IAA2I,CAC9I;IACD,SAAS,EAAE,IAAI,qBAAqB,CAChC,WAAW,EACX,0XAA0X,CAC7X;IACD,QAAQ,EAAE,IAAI,qBAAqB,CAC/B,UAAU,EACV,8rBAA8rB,CACjsB;CACJ,CAAA"} \ No newline at end of file diff --git a/dist/data/Weapons.js b/dist/data/Weapons.js new file mode 100644 index 0000000..001b443 --- /dev/null +++ b/dist/data/Weapons.js @@ -0,0 +1,407 @@ +// Weapon Templates +// Some weapons are easier to store as template which are modified/customized rather than searching compendiums +export const unarmedStrikeTemplate = { + name: "Unarmed strike", + type: "weapon", + data: { + description: { + chat: "", + gmnotes: "", + short: "", + value: "

An unarmed strike can be dealt with any limb or appendage. Unarmed strikes deal nonlethal damage, and the damage from an unarmed strike is considered weapon damage for the purposes of effects that give you a bonus to weapon damage rolls.

", + unidentified: "" + }, + source: "CRB pg. 190", + type: "", + quantity: null, + bulk: "-", + price: 0, + level: 0, + attuned: false, + equipped: true, + equippable: false, + identified: true, + attributes: { + sturdy: false, + customBuilt: false, + size: "medium", + dex: { + mod: "" + }, + hp: { + value: 6, + max: "" + }, + hardness: { + value: "" + }, + ac: { + value: "" + } + }, + activation: { + type: "action", + cost: 1, + condition: "" + }, + duration: { + value: "", + units: "" + }, + target: { + value: "", + type: "" + }, + area: { + value: null, + units: null, + shape: "", + effect: "" + }, + range: { + value: null, + units: "touch", + additional: "", + per: "" + }, + uses: { + value: 0, + max: 0, + per: "" + }, + isActive: null, + ability: "", + actionType: "mwak", + attackBonus: 0, + chatFlavor: "", + critical: { + parts: [], + effect: "" + }, + damage: { + parts: [["1d3", "bludgeoning"]] + }, + formula: "", + save: { + type: "", + dc: "", + descriptor: "negate" + }, + descriptors: [], + capacity: { + value: 0, + max: 0 + }, + usage: { + value: 0, + per: "" + }, + modifiers: [], + container: { + contents: [], + storage: [], + isOpen: true + }, + weaponType: "basicM", + weaponCategory: "", + special: "", + properties: { + one: false, + two: false, + amm: false, + aeon: false, + analog: false, + antibiological: false, + archaic: true, + aurora: false, + automatic: false, + blast: false, + block: false, + boost: false, + breach: false, + breakdown: false, + bright: false, + cluster: false, + conceal: false, + deconstruct: false, + deflect: false, + disarm: false, + double: false, + drainCharge: false, + echo: false, + entangle: false, + explode: false, + extinguish: false, + feint: false, + fiery: false, + firstArc: false, + flexibleLine: false, + force: false, + freeHands: false, + fueled: false, + grapple: false, + gravitation: false, + guided: false, + harrying: false, + holyWater: false, + hybrid: false, + ignite: false, + indirect: false, + injection: false, + integrated: false, + line: false, + living: false, + lockdown: false, + "mind-affecting": false, + mine: false, + mire: false, + modal: false, + necrotic: false, + nonlethal: true, + operative: false, + penetrating: false, + polarize: false, + polymorphic: false, + powered: false, + professional: false, + punchGun: false, + qreload: false, + radioactive: false, + reach: false, + recall: false, + regrowth: false, + relic: false, + reposition: false, + shape: false, + shatter: false, + shells: false, + shield: false, + sniper: false, + stun: false, + subtle: false, + sunder: false, + swarm: false, + tail: false, + teleportive: false, + thought: false, + throttle: false, + thrown: false, + trip: false, + unbalancing: false, + underwater: false, + unwieldy: false, + variantBoost: false, + wideLine: false + }, + proficient: true, + abilityMods: { + parts: [] + } + }, + flags: {}, + effects: [] +}; +export const naturalWeaponsTemplate = { + name: "Unarmed strike (natural weapons)", + type: "weapon", + data: { + description: { + chat: "", + gmnotes: "", + short: "", + value: "

Natural weapons (and natural attacks) such as acid spit, bite, claw, or slam don’t require ammunition and can’t be disarmed or sundered.\n" + + "In addition, a player character with this ability can attack with a special unarmed strike that deals lethal damage, doesn’t count as archaic, and threatens squares. They also gain a special version of the Weapon Specialization feat with this unarmed strike at 3rd level, allowing them to add 1–1/2 × their character level to their damage rolls for this unarmed strike (instead of just adding their character level as usual).

", + unidentified: "" + }, + source: "CRB pg. 190", + type: "", + quantity: null, + bulk: "-", + price: 0, + level: 0, + attuned: false, + equipped: true, + equippable: false, + identified: true, + attributes: { + sturdy: false, + customBuilt: false, + size: "medium", + dex: { + mod: "" + }, + hp: { + value: 6, + max: "" + }, + hardness: { + value: "" + }, + ac: { + value: "" + } + }, + activation: { + type: "action", + cost: 1, + condition: "" + }, + duration: { + value: "", + units: "" + }, + target: { + value: "", + type: "" + }, + area: { + value: null, + units: null, + shape: "", + effect: "" + }, + range: { + value: null, + units: "touch", + additional: "", + per: "" + }, + uses: { + value: 0, + max: 0, + per: "" + }, + isActive: null, + ability: "", + actionType: "mwak", + attackBonus: 0, + chatFlavor: "", + critical: { + parts: [], + effect: "" + }, + damage: { + parts: [["1d3", "bludgeoning"]] + }, + formula: "", + save: { + type: "", + dc: "", + descriptor: "negate" + }, + descriptors: [], + capacity: { + value: 0, + max: 0 + }, + usage: { + value: 0, + per: "" + }, + modifiers: [], + container: { + contents: [], + storage: [], + isOpen: true + }, + weaponType: "basicM", + weaponCategory: "", + special: "", + properties: { + one: false, + two: false, + amm: false, + aeon: false, + analog: false, + antibiological: false, + archaic: false, + aurora: false, + automatic: false, + blast: false, + block: false, + boost: false, + breach: false, + breakdown: false, + bright: false, + cluster: false, + conceal: false, + deconstruct: false, + deflect: false, + disarm: false, + double: false, + drainCharge: false, + echo: false, + entangle: false, + explode: false, + extinguish: false, + feint: false, + fiery: false, + firstArc: false, + flexibleLine: false, + force: false, + freeHands: false, + fueled: false, + grapple: false, + gravitation: false, + guided: false, + harrying: false, + holyWater: false, + hybrid: false, + ignite: false, + indirect: false, + injection: false, + integrated: false, + line: false, + living: false, + lockdown: false, + "mind-affecting": false, + mine: false, + mire: false, + modal: false, + necrotic: false, + nonlethal: false, + operative: false, + penetrating: false, + polarize: false, + polymorphic: false, + powered: false, + professional: false, + punchGun: false, + qreload: false, + radioactive: false, + reach: false, + recall: false, + regrowth: false, + relic: false, + reposition: false, + shape: false, + shatter: false, + shells: false, + shield: false, + sniper: false, + stun: false, + subtle: false, + sunder: false, + swarm: false, + tail: false, + teleportive: false, + thought: false, + throttle: false, + thrown: false, + trip: false, + unbalancing: false, + underwater: false, + unwieldy: false, + variantBoost: false, + wideLine: false + }, + proficient: true, + abilityMods: { + parts: [] + } + }, + flags: {}, + img: "icons/svg/mystery-man.svg", + effects: [] +}; +//# sourceMappingURL=Weapons.js.map \ No newline at end of file diff --git a/dist/data/Weapons.js.map b/dist/data/Weapons.js.map new file mode 100644 index 0000000..f66369c --- /dev/null +++ b/dist/data/Weapons.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Weapons.js","sourceRoot":"","sources":["../../src/data/Weapons.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,+GAA+G;AAC/G,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACjC,IAAI,EAAE,gBAAgB;IACtB,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE;QACF,WAAW,EAAE;YACT,IAAI,EAAE,EAAE;YACR,OAAO,EAAE,EAAE;YACX,KAAK,EAAE,EAAE;YACT,KAAK,EACD,sPAAsP;YAC1P,YAAY,EAAE,EAAE;SACnB;QACD,MAAM,EAAE,aAAa;QACrB,IAAI,EAAE,EAAE;QACR,QAAQ,EAAE,IAAI;QACd,IAAI,EAAE,GAAG;QACT,KAAK,EAAE,CAAC;QACR,KAAK,EAAE,CAAC;QACR,OAAO,EAAE,KAAK;QACd,QAAQ,EAAE,IAAI;QACd,UAAU,EAAE,KAAK;QACjB,UAAU,EAAE,IAAI;QAChB,UAAU,EAAE;YACR,MAAM,EAAE,KAAK;YACb,WAAW,EAAE,KAAK;YAClB,IAAI,EAAE,QAAQ;YACd,GAAG,EAAE;gBACD,GAAG,EAAE,EAAE;aACV;YACD,EAAE,EAAE;gBACA,KAAK,EAAE,CAAC;gBACR,GAAG,EAAE,EAAE;aACV;YACD,QAAQ,EAAE;gBACN,KAAK,EAAE,EAAE;aACZ;YACD,EAAE,EAAE;gBACA,KAAK,EAAE,EAAE;aACZ;SACJ;QACD,UAAU,EAAE;YACR,IAA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MAAM,EAAE,KAAK;YACb,IAAI,EAAE,KAAK;YACX,WAAW,EAAE,KAAK;YAClB,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,KAAK;YACf,YAAY,EAAE,KAAK;YACnB,QAAQ,EAAE,KAAK;SAClB;QACD,UAAU,EAAE,IAAI;QAChB,WAAW,EAAE;YACT,KAAK,EAAE,EAAE;SACZ;KACJ;IACD,KAAK,EAAE,EAAE;IACT,GAAG,EAAE,2BAA2B;IAChC,OAAO,EAAE,EAAE;CACH,CAAA"} \ No newline at end of file diff --git a/dist/data/adjusters/CommonAdjusters.js b/dist/data/adjusters/CommonAdjusters.js new file mode 100644 index 0000000..621f1a5 --- /dev/null +++ b/dist/data/adjusters/CommonAdjusters.js @@ -0,0 +1,20 @@ +import SenseAdjuster from "../../models/adjusters/SenseAdjuster.js"; +import ImmunityAdjuster from "../../models/adjusters/ImmunityAdjuster.js"; +export const CommonAdjusters = { + Immunities: { + constructImmunities: new ImmunityAdjuster({ + addConditionImmunity: ["construct immunities"] + }), + drowImmunities: new ImmunityAdjuster({ + addConditionImmunity: ["drow immunities"] + }), + elvenImmunities: new ImmunityAdjuster({ + addConditionImmunity: ["elven immunities"] + }) + }, + Senses: { + darkVision60ft: new SenseAdjuster({ addSense: ["darkvision 60 ft."] }), + lowLightVision: new SenseAdjuster({ addSense: ["low-light vision"] }) + } +}; +//# sourceMappingURL=CommonAdjusters.js.map \ No newline at end of file diff --git a/dist/data/adjusters/CommonAdjusters.js.map b/dist/data/adjusters/CommonAdjusters.js.map new file mode 100644 index 0000000..791e01e --- /dev/null +++ b/dist/data/adjusters/CommonAdjusters.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CommonAdjusters.js","sourceRoot":"","sources":["../../../src/data/adjusters/CommonAdjusters.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,yCAAyC,CAAA;AACnE,OAAO,gBAAgB,MAAM,4CAA4C,CAAA;AAEzE,MAAM,CAAC,MAAM,eAAe,GAAG;IAC3B,UAAU,EAAE;QACR,mBAAmB,EAAE,IAAI,gBAAgB,CAAC;YACtC,oBAAoB,EAAE,CAAC,sBAAsB,CAAC;SACjD,CAAC;QACF,cAAc,EAAE,IAAI,gBAAgB,CAAC;YACjC,oBAAoB,EAAE,CAAC,iBAAiB,CAAC;SAC5C,CAAC;QACF,eAAe,EAAE,IAAI,gBAAgB,CAAC;YAClC,oBAAoB,EAAE,CAAC,kBAAkB,CAAC;SAC7C,CAAC;KACL;IACD,MAAM,EAAE;QACJ,cAAc,EAAE,IAAI,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAC,mBAAmB,CAAC,EAAE,CAAC;QACtE,cAAc,EAAE,IAAI,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAC,kBAAkB,CAAC,EAAE,CAAC;KACxE;CACJ,CAAA"} \ No newline at end of file diff --git a/dist/data/adjusters/SharedAdjusters.js b/dist/data/adjusters/SharedAdjusters.js new file mode 100644 index 0000000..ff5a0be --- /dev/null +++ b/dist/data/adjusters/SharedAdjusters.js @@ -0,0 +1,36 @@ +import SenseAdjuster from "../../models/adjusters/SenseAdjuster.js"; +import ImmunityAdjuster from "../../models/adjusters/ImmunityAdjuster.js"; +import SaveAdjuster from "../../models/adjusters/SaveAdjuster.js"; +import { Save } from "../MonsterCreation.js"; +export const SharedAdjusters = { + Immunities: { + constructImmunities: new ImmunityAdjuster({ + addConditionImmunity: "construct immunities" + }), + drowImmunities: new ImmunityAdjuster({ + addConditionImmunity: "drow immunities" + }), + elvenImmunities: new ImmunityAdjuster({ + addConditionImmunity: "elven immunities" + }), + mindAffectingEffects: new ImmunityAdjuster({ + addConditionImmunity: "mind-affecting effects" + }) + }, + Saves: { + // Quickly add 2 to saves + fortitudePlus2: new SaveAdjuster({ mutateSave: [Save.fortitude, 2] }), + reflexPlus2: new SaveAdjuster({ mutateSave: [Save.reflex, 2] }), + willpowerPlus2: new SaveAdjuster({ mutateSave: [Save.willpower, 2] }), + // Quickly removes 2 to saves + fortitudeMinus2: new SaveAdjuster({ mutateSave: [Save.fortitude, -2] }), + reflexMinus2: new SaveAdjuster({ mutateSave: [Save.reflex, -2] }), + willpowerMinus2: new SaveAdjuster({ mutateSave: [Save.willpower, -2] }) + }, + Senses: { + blindsight: new SenseAdjuster({ addSense: ["blindsight"] }), + darkVision60ft: new SenseAdjuster({ addSense: ["darkvision 60 ft."] }), + lowLightVision: new SenseAdjuster({ addSense: ["low-light vision"] }) + } +}; +//# sourceMappingURL=SharedAdjusters.js.map \ No newline at end of file diff --git a/dist/data/adjusters/SharedAdjusters.js.map b/dist/data/adjusters/SharedAdjusters.js.map new file mode 100644 index 0000000..6231329 --- /dev/null +++ b/dist/data/adjusters/SharedAdjusters.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SharedAdjusters.js","sourceRoot":"","sources":["../../../src/data/adjusters/SharedAdjusters.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,yCAAyC,CAAA;AACnE,OAAO,gBAAgB,MAAM,4CAA4C,CAAA;AACzE,OAAO,YAAY,MAAM,wCAAwC,CAAA;AACjE,OAAO,EAAE,IAAI,EAAE,MAAM,uBAAuB,CAAA;AAE5C,MAAM,CAAC,MAAM,eAAe,GAAG;IAC3B,UAAU,EAAE;QACR,mBAAmB,EAAE,IAAI,gBAAgB,CAAC;YACtC,oBAAoB,EAAE,sBAAsB;SAC/C,CAAC;QACF,cAAc,EAAE,IAAI,gBAAgB,CAAC;YACjC,oBAAoB,EAAE,iBAAiB;SAC1C,CAAC;QACF,eAAe,EAAE,IAAI,gBAAgB,CAAC;YAClC,oBAAoB,EAAE,kBAAkB;SAC3C,CAAC;QACF,oBAAoB,EAAE,IAAI,gBAAgB,CAAC;YACvC,oBAAoB,EAAE,wBAAwB;SACjD,CAAC;KACL;IACD,KAAK,EAAE;QACH,yBAAyB;QACzB,cAAc,EAAE,IAAI,YAAY,CAAC,EAAE,UAAU,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC;QACrE,WAAW,EAAE,IAAI,YAAY,CAAC,EAAE,UAAU,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC;QAC/D,cAAc,EAAE,IAAI,YAAY,CAAC,EAAE,UAAU,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC;QACrE,6BAA6B;QAC7B,eAAe,EAAE,IAAI,YAAY,CAAC,EAAE,UAAU,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACvE,YAAY,EAAE,IAAI,YAAY,CAAC,EAAE,UAAU,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjE,eAAe,EAAE,IAAI,YAAY,CAAC,EAAE,UAAU,EAAE,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC1E;IACD,MAAM,EAAE;QACJ,UAAU,EAAE,IAAI,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAC,YAAY,CAAC,EAAE,CAAC;QAC3D,cAAc,EAAE,IAAI,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAC,mBAAmB,CAAC,EAAE,CAAC;QACtE,cAAc,EAAE,IAAI,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAC,kBAAkB,CAAC,EAAE,CAAC;KACxE;CACJ,CAAA"} \ No newline at end of file diff --git a/dist/data/universal creature rules/UniversalCreatureRules.js b/dist/data/universal creature rules/UniversalCreatureRules.js new file mode 100644 index 0000000..2f169ec --- /dev/null +++ b/dist/data/universal creature rules/UniversalCreatureRules.js @@ -0,0 +1,12 @@ +/// Collection of universal creature rules which are applied by various means (creature type grafts, special abilities, etc) +import UniversalCreatureRule from "../../models/UniversalCreatureRule.js"; +export const UniversalCreatureRules = { + ferocity: new UniversalCreatureRule("ferocity", "When the creature is brought to 0 Hit Points, it can fight on for 1 more round. It can act normally until the end of its next turn; if it has 0 HP at that point, it dies. If it would lose further Hit Points before this, it ceases to be able to act and dies."), + integratedWeapons: new UniversalCreatureRule("integrated weapons", "The creature’s weapons are manufactured weapons, not natural weapons, and they are integrated into its frame. A creature can’t be disarmed of these weapons, though they can be removed and used if the creature is dead."), + mindless: new UniversalCreatureRule("mindless", "The creature has no Intelligence score or modifier and is immune to mind-affecting effects. Any DCs or other statistics that rely on an Intelligence score treat the creature as having a score of 10 (+0).\n" + + "Guidelines: Mindless creatures usually have fewer good skills and no master skills. Their skills should be based on inborn abilities, since they’re incapable of training."), + naturalWeapons: new UniversalCreatureRule("natural weapons", "Natural weapons (and natural attacks), such as acid spit, bite, claw, or slam don’t require ammunition and can’t be disarmed or sundered."), + sightless: new UniversalCreatureRule("sightless", "The creature does not use any visual senses and is thus never subject to any effect that requires the creature to see a target or effect. Sightless creatures normally have some form of blindsight to compensate for their sightlessness, but if not, they are assumed to be able to operate as well as a creature with normal vision unless the creature’s description says otherwise."), + unliving: new UniversalCreatureRule("unliving", "The creature has no Constitution score or modifier. Any DCs or other statistics that rely on a Constitution score treat the creature as having a score of 10 (+0). The creature is immediately destroyed when it reaches 0 Hit Points. An unliving creature doesn’t heal damage naturally, but a construct can be repaired with the right tools. Spells such as make whole can heal constructs, and magic effects can heal undead. An unliving creature with fast healing (see page 154) still benefits from that ability. Unliving creatures don’t breathe, eat, or sleep. They can’t be raised or resurrected, except through the use of miracle, wish, or a similar effect that specifically works on unliving creatures.") +}; +//# sourceMappingURL=UniversalCreatureRules.js.map \ No newline at end of file diff --git a/dist/data/universal creature rules/UniversalCreatureRules.js.map b/dist/data/universal creature rules/UniversalCreatureRules.js.map new file mode 100644 index 0000000..ee3de11 --- /dev/null +++ b/dist/data/universal creature rules/UniversalCreatureRules.js.map @@ -0,0 +1 @@ +{"version":3,"file":"UniversalCreatureRules.js","sourceRoot":"","sources":["../../../src/data/universal creature rules/UniversalCreatureRules.ts"],"names":[],"mappings":"AAAA,4HAA4H;AAC5H,OAAO,qBAAqB,MAAM,uCAAuC,CAAA;AAEzE,MAAM,CAAC,MAAM,sBAAsB,GAAG;IAClC,QAAQ,EAAE,IAAI,qBAAqB,CAC/B,UAAU,EACV,mQAAmQ,CACtQ;IACD,iBAAiB,EAAE,IAAI,qBAAqB,CACxC,oBAAoB,EACpB,2NAA2N,CAC9N;IACD,QAAQ,EAAE,IAAI,qBAAqB,CAC/B,UAAU,EACV,+MAA+M;QAC3M,4KAA4K,CACnL;IACD,cAAc,EAAE,IAAI,qBAAqB,CACrC,iBAAiB,EACjB,2IAA2I,CAC9I;IACD,SAAS,EAAE,IAAI,qBAAqB,CAChC,WAAW,EACX,0XAA0X,CAC7X;IACD,QAAQ,EAAE,IAAI,qBAAqB,CAC/B,UAAU,EACV,8rBAA8rB,CACjsB;CACJ,CAAA"} \ No newline at end of file diff --git a/dist/dialogs/PopulateDialog.js b/dist/dialogs/PopulateDialog.js deleted file mode 100644 index e927e15..0000000 --- a/dist/dialogs/PopulateDialog.js +++ /dev/null @@ -1,3 +0,0 @@ -export class PopulateDialog extends Dialog { -} -//# sourceMappingURL=PopulateDialog.js.map \ No newline at end of file diff --git a/dist/dialogs/PopulateDialog.js.map b/dist/dialogs/PopulateDialog.js.map deleted file mode 100644 index 5737634..0000000 --- a/dist/dialogs/PopulateDialog.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"file":"PopulateDialog.js","sourceRoot":"","sources":["../../src/dialogs/PopulateDialog.ts"],"names":[],"mappings":"AACA,MAAM,OAAO,cAAe,SAAQ,MAAM;CAEzC"} \ No newline at end of file diff --git a/dist/factories/BiographyFactory.js b/dist/factories/BiographyFactory.js new file mode 100644 index 0000000..1db5222 --- /dev/null +++ b/dist/factories/BiographyFactory.js @@ -0,0 +1,25 @@ +import { Utils } from "../utils/Uils.js"; +import { Biography } from "../data/Biography.js"; +export class BiographyFactory { + // NOTE: Consider refactoring to only provide needed parameters and remove dependancy on `NPCCreationContext` + static makeBiography(actor, context) { + var biography = ""; + if (context.generatePersonality) { + let personalityTraits = Biography.personalityTraits; + Utils.shuffleArray(personalityTraits); + biography += + "

" + + actor.name + + " is a " + + personalityTraits[0] + + " " + + context.race + + " who identifies as " + + context.gender + + ".

"; + } + biography += "

Created by Populator.

"; + return biography; + } +} +//# sourceMappingURL=BiographyFactory.js.map \ No newline at end of file diff --git a/dist/factories/BiographyFactory.js.map b/dist/factories/BiographyFactory.js.map new file mode 100644 index 0000000..d34b058 --- /dev/null +++ b/dist/factories/BiographyFactory.js.map @@ -0,0 +1 @@ +{"version":3,"file":"BiographyFactory.js","sourceRoot":"","sources":["../../src/factories/BiographyFactory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAEhD,MAAM,OAAO,gBAAgB;IACzB,6GAA6G;IACtG,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,OAA2B;QAC1D,IAAI,SAAS,GAAW,EAAE,CAAA;QAE1B,IAAI,OAAO,CAAC,mBAAmB,EAAE;YAC7B,IAAI,iBAAiB,GAAG,SAAS,CAAC,iBAAiB,CAAA;YACnD,KAAK,CAAC,YAAY,CAAC,iBAAiB,CAAC,CAAA;YAErC,SAAS;gBACL,KAAK;oBACL,KAAK,CAAC,IAAI;oBACV,QAAQ;oBACR,iBAAiB,CAAC,CAAC,CAAC;oBACpB,GAAG;oBACH,OAAO,CAAC,IAAI;oBACZ,qBAAqB;oBACrB,OAAO,CAAC,MAAM;oBACd,OAAO,CAAA;SACd;QAED,SAAS,IAAI,qCAAqC,CAAA;QAClD,OAAO,SAAS,CAAA;IACpB,CAAC;CACJ"} \ No newline at end of file diff --git a/dist/factories/ItemFactory.js b/dist/factories/ItemFactory.js new file mode 100644 index 0000000..6ff0d54 --- /dev/null +++ b/dist/factories/ItemFactory.js @@ -0,0 +1,119 @@ +import { Randomizer } from "../Randomizer.js"; +import { backpackTemplate, canteenTemplate, credStickTemplate, intoxicantMinorTemplate, Items, lighterTemplate, purfumeTemplate, religiousSymbolTemplate, ropeTemplate, upbTemplate } from "../data/Items.js"; +import { Utils } from "../utils/Uils.js"; +export class ItemFactory { + // Default size is 3 + static makeItemCollection(size = 3) { + var itemCollection = []; + // Every NPC has 2 random items (for now, may change) + for (var i = 0; i < size; i++) { + let items = [ + { item: backpackTemplate, percentage: 0.03 }, + { item: canteenTemplate, percentage: 0.03 }, + { item: credStickTemplate, percentage: 0.03 }, + { item: upbTemplate, percentage: 0.03 }, + { item: lighterTemplate, percentage: 0.03 }, + { item: ropeTemplate, percentage: 0.03 }, + { item: purfumeTemplate, percentage: 0.03 }, + { item: intoxicantMinorTemplate, percentage: 0.03 }, + { item: ItemFactory.makeReligiousSymbol(), percentage: 0.06 }, + { item: ItemFactory.makeJunk(), percentage: 0.7 } + ]; + let winning = Randomizer.pickWinningItem(items).item; + itemCollection.push(winning); + } + return itemCollection; + } + static makeReligiousSymbol() { + let religiousSymbol = Object.assign({}, religiousSymbolTemplate); + var gods = [ + "Abadar", + "Angradd", + "Arshea", + "Asmodeus", + "Besmara", + "Calistria", + "Damoritosh", + "Desna", + "Eldest", + "Eloritu", + "Groetus", + "Hylax", + "Ibra", + "Iomedae", + "Lamashtu", + "Lao Shu Po", + "Lissala", + "Nyarlathotep", + "Oras", + "Pharasma", + "Sarenrae", + "Talavet", + "The Devourer", + "Urgathoa", + "Weydan", + "Yaraesa", + "Zon-Kuthon" + ]; + Utils.shuffleArray(gods); + religiousSymbol.name += " (" + gods[0] + ")"; + return religiousSymbol; + } + static makeJunk() { + var junkItem = Items.junk[Math.floor(Math.random() * Items.junk.length)]; + return { + name: junkItem.name, + type: "goods", + data: { + description: { + chat: "", + gmnotes: "", + short: "", + value: "

" + junkItem.description + "

", + unidentified: "" + }, + source: "Populator", + type: "", + quantity: 1, + bulk: "L", + price: 0, + level: 1, + attuned: false, + equipped: false, + equippable: false, + identified: true, + attributes: { + sturdy: false, + customBuilt: false, + size: "medium", + dex: { + mod: "" + }, + hp: { + value: 6, + max: "" + }, + hardness: { + value: "" + }, + ac: { + value: "" + } + }, + modifiers: [], + damage: { + parts: [] + }, + critical: { + parts: [] + }, + abilityMods: { + parts: [] + } + }, + flags: {}, + effects: [] + }; + } +} +//# sourceMappingURL=ItemFactory.js.map \ No newline at end of file diff --git a/dist/factories/ItemFactory.js.map b/dist/factories/ItemFactory.js.map new file mode 100644 index 0000000..ce43468 --- /dev/null +++ b/dist/factories/ItemFactory.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ItemFactory.js","sourceRoot":"","sources":["../../src/factories/ItemFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,EACH,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,uBAAuB,EACvB,KAAK,EACL,eAAe,EACf,eAAe,EACf,uBAAuB,EACvB,YAAY,EACZ,WAAW,EACd,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAExC,MAAM,OAAO,WAAW;IACpB,oBAAoB;IACb,MAAM,CAAC,kBAAkB,CAAC,IAAI,GAAG,CAAC;QACrC,IAAI,cAAc,GAAY,EAAa,CAAA;QAC3C,qDAAqD;QACrD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE;YAC3B,IAAI,KAAK,GAAG;gBACR,EAAE,IAAI,EAAE,gBAAgB,EAAE,UAAU,EAAE,IAAI,EAAE;gBAC5C,EAAE,IAAI,EAAE,eAAe,EAAE,UAAU,EAAE,IAAI,EAAE;gBAC3C,EAAE,IAAI,EAAE,iBAAiB,EAAE,UAAU,EAAE,IAAI,EAAE;gBAC7C,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAAE;gBACvC,EAAE,IAAI,EAAE,eAAe,EAAE,UAAU,EAAE,IAAI,EAAE;gBAC3C,E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file mode 100644 index 0000000..49059f7 --- /dev/null +++ b/dist/factories/NPCFactory.js @@ -0,0 +1,1128 @@ +import { Utils } from "../utils/Uils.js"; +import { Grafts } from "../data/Grafts.js"; +import { ItemFactory } from "./ItemFactory.js"; +import { CR, MonsterCreation, MonsterReferenceSymbol, MonsterSkillType, Save, Size } from "../data/MonsterCreation.js"; +import { BundledRaces, Races } from "../data/Races.js"; +import { Randomizer } from "../Randomizer.js"; +import { WeaponFactory } from "./WeaponFactory.js"; +import { BiographyFactory } from "./BiographyFactory.js"; +import { CreatureTypeGenerationOptions } from "../data/Generator.js"; +import { UniversalCreatureRules } from "../data/universal creature rules/UniversalCreatureRules.js"; +import SkillAdjuster from "../models/adjusters/SkillAdjuster.js"; +import { Skill } from "../data/Skills.js"; +import SenseAdjuster from "../models/adjusters/SenseAdjuster.js"; +import { apply } from "../models/Interfaces/IApplyable.js"; +import { SharedAdjusters } from "../data/adjusters/SharedAdjusters.js"; +import SaveAdjuster from "../models/adjusters/SaveAdjuster.js"; +import AbilityScoreAdjuster from "../models/adjusters/AbilityScoreAdjuster.js"; +import { AbilityScore } from "../data/AbilityScores.js"; +export class NPCFactory { + // Produces a non-hostile NPC from a subset of races + static async makeNonHostile(context) { + let actorData = { name: "Generated Actor", type: "npc" }; + let actor = await Actor.create(actorData); + // Non-combatants are always experts + context.monsterReferenceSymbol = MonsterReferenceSymbol.expert; + await this.setRace(actor, context); + await this.makeNPC(actor, context); + } + static async makeHostile(context) { + let actorData = { name: "Generated Actor", type: "npc" }; + let actor = await Actor.create(actorData); + // If no type set we randomly generate + if (!context.creatureTypeGraft) { + // Randomizes creature type + let supportedMonsterTypes = CreatureTypeGenerationOptions; + Utils.shuffleArray(supportedMonsterTypes); + context.creatureTypeGraft = supportedMonsterTypes[0].typeGraft; + } + // TODO: Pick a random subtype (or none) + // We don't generate "junk" items for monsters + context.generateAdditionalItems = false; + // Monsters generally don't have personalities + context.generatePersonality = false; + await this.makeNPC(actor, context); + } + // Private + static async makeNPC(actor, context) { + // Grab appropriate array rows + let monsterReferenceSymbol = MonsterReferenceSymbol[context.monsterReferenceSymbol]; + let mainArrayRow = Object.assign({}, MonsterCreation.arrays[monsterReferenceSymbol].main[context.CR]); + let attackArrayRow = Object.assign({}, MonsterCreation.arrays[monsterReferenceSymbol].attack[context.CR]); + context.mainArrayRow = mainArrayRow; + context.attackArrayRow = attackArrayRow; + // Fill in details + await this.setGenderAndName(actor, context); + await this.setDetails(actor, context); + await this.setGrafts(actor, context); + await this.setSpecialAbilities(actor, context); + await this.setAttributes(actor, context); + await this.setVulnerabilitiesAndImmunities(actor, context); + await this.setSkills(actor, context); + await this.setWeapons(actor, context); + await this.setInventory(actor, context); + await this.setSenses(actor, context); + await this.setToken(actor, context); + await this.setAbout(actor, context); + } + static async setRace(actor, context) { + let actorUpdate = {}; + let logEntries = []; + if (!context.race) { + let randomRace = Randomizer.randomRace(); + context.race = randomRace.name; + logEntries.push([ + "Chose race " + randomRace.name + " at random.", + "" + ]); + } + else { + logEntries.push(["Race " + context.race + " chosen.", ""]); + } + // Set grafts for race + let race = Races.nonCombatantRaces[context.race]; + context.creatureTypeGraft = race.creatureTypeGraft; + context.creatureSubtypeGrafts = race.creatureSubtypeGrafts; + var raceData; + // We stub in gnolls until they are included in sfrpg + if (context.race == "gnoll") { + raceData = BundledRaces.gnoll; + } + else { + raceData = await Utils.fuzzyFindRaceAsync(race.name); + } + // Race item + await this.clean(raceData); + context.itemsToAdd.push(raceData); + // Update actor + await actor.update(actorUpdate); + // Update log + context.log.push(...logEntries); + } + static async setGenderAndName(actor, context) { + let actorUpdate = {}; + let logEntries = []; + // Gender + if (!context.gender) { + let randomGender = Randomizer.randomGender(); + context.gender = randomGender; + logEntries.push([ + "Chose gender " + randomGender + " at random.", + "" + ]); + } + else { + logEntries.push(["Gender " + context.gender + " chosen.", ""]); + } + // Race and Grafts label + let raceText = context.race + ? " " + Races.nonCombatantRaces[context.race].name + : ""; + actorUpdate["data.details.raceAndGrafts"] = + context.gender + raceText + ", grafts:"; // Grafts will be filled in as applied + // Name + let randomName = Randomizer.randomName(context); + actorUpdate["name"] = randomName; + logEntries.push([" Generated name " + randomName + " at random.", ""]); + // Update actor + await actor.update(actorUpdate); + // Update log + context.log.push(...logEntries); + } + static async setDetails(actor, context) { + var _a; + let logEntries = []; + var race; + if (context.race) + race = Races.nonCombatantRaces[context.race]; + let actorUpdate = {}; + // Source + actorUpdate["data.details.source"] = "Populator"; + // CR + var CR; + if (context.CR === "1/3") { + CR = 1 / 3; + } + else if (context.CR === "1/2") { + CR = 0.5; + } + else { + CR = parseFloat(context.CR); + } + actorUpdate["data.details.cr"] = CR; + // Alignment + let randomAlignment = Randomizer.randomAlignment(); + actorUpdate["data.details.alignment"] = randomAlignment; + logEntries.push([ + "Chose alignment " + randomAlignment + " at random.", + "" + ]); + // Languages + // NOTE: Only applies languages if this creature type has the intelligence capacity for language + if ((_a = context.creatureTypeGraft) === null || _a === void 0 ? void 0 : _a.capicityForLanguage) { + var languages = ["common"]; + if (race === null || race === void 0 ? void 0 : race.languages) { + languages.push(...race.languages); + } + actorUpdate["data.traits.languages.value"] = languages; + } + // Update actor + await actor.update(actorUpdate); + // Update log + context.log.push(...logEntries); + } + static async setGrafts(actor, context) { + if (!context.creatureTypeGraft) + return; + let logEntries = []; + let actorUpdate = {}; + try { + await this.applyCreatureTypeGraft(actor, context, context.creatureTypeGraft); + if (context.creatureSubtypeGrafts) { + let subtypes = []; + for (let creatureSubtypeGraft of context.creatureSubtypeGrafts) { + // Adds subtypes to an array to construct type + subtypes.push(creatureSubtypeGraft.name); + await this.applyCreatureSubtypeGraft(actor, context, creatureSubtypeGraft); + } + // Apply type in "()" format + actorUpdate["data.details.type"] = + context.creatureTypeGraft.name + + " (" + + subtypes.join() + + ")"; + logEntries.push([ + "Set type based on " + + context.creatureTypeGraft.name + + " creature type graft, " + + subtypes.join() + + " subtype grafts.", + "" + ]); + } + else { + // Apply type in "" format + actorUpdate["data.details.type"] = + context.creatureTypeGraft.name; + logEntries.push([ + "Set type based on " + + context.creatureTypeGraft.name + + " creature type graft.", + "" + ]); + } + // Update actor + await actor.update(actorUpdate); + } + catch (e) { + logEntries.push([ + "Failed to set grafts.", + "Exception:" + e + "" + ]); + } + // Update log + context.log.push(...logEntries); + } + static async setSpecialAbilities(actor, context) { + // Update log + context.log.push([ + "Applying " + + context.mainArrayRow.specialAbilities + + " special abilities.", + "" + ]); + try { + var amountOfSpecialAbilities = context.mainArrayRow.specialAbilities; + // First we check for chosen universal creature rules (specifically natural weapons or integrated weapons) + // TODO: Expand to other universal creature rules + if (context.universalCreatureRules.includes(MonsterCreation.specialAbilities.universalCreatureRule + .naturalWeapons)) { + // Flag that we'll generate a `bite` / `slam` / `claws` attack + context.naturalWeapons.enabled = true; + context.naturalWeapons.racial = false; + // This takes up one of our special abilities, reduce by 1 + amountOfSpecialAbilities -= 1; + context.log.push([ + "Applying Natural Weapons (Ex) special abilities as chosen. NOTE: Populator will auto-choose Natural Weapons as the 1st special ability of any monster which doesn't have gear and weapons to attack with.", + UniversalCreatureRules.naturalWeapons.description + ]); + } + // + if (context.universalCreatureRules.includes(MonsterCreation.specialAbilities.universalCreatureRule + .integratedWeapons)) { + // Add integrated weapons feature + let integratedWeapons = await Utils.fuzzyFindUniversalCreatureRule("integrated weapons"); + context.itemsToAdd.push(integratedWeapons); + // Set flag to add a weapon during item generation + context.rangedWeapon.enabled = true; + // This takes up one of our special abilities, reduce by 1 + amountOfSpecialAbilities -= 1; + context.log.push([ + "Applying Integrated Weapons (Ex) universal creature rule as a special abilities as chosen. NOTE: Populator will auto-choose Integrated Weapons as the 1st special ability of any construct type monster.", + UniversalCreatureRules.integratedWeapons.description + ]); + } + // NOTE: Currently chooses 1+ Adjustment Special Abilities + let adjustmentSpecialAbilities = Object.values(MonsterCreation.specialAbilities.adjustment); + Utils.shuffleArray(adjustmentSpecialAbilities); + // We apply 1+ special abilities + for (var i = 0; i < amountOfSpecialAbilities; i++) { + // get special ability + let adjustmentSpecialAbility = adjustmentSpecialAbilities[i]; + // Apply special ability + await this.applyAdjustmentSpecialAbility(actor, context, adjustmentSpecialAbility); + } + } + catch (e) { + context.log.push([ + "Failed to set special abilities.", + "Exception:" + e + "" + ]); + } + } + static async setAttributes(actor, context) { + var _a; + let logEntries = []; + var race; + if (context.race) + race = Races.nonCombatantRaces[context.race]; + let array = context.mainArrayRow; + let actorUpdate = {}; + // Size + actorUpdate["data.traits.size"] = (race === null || race === void 0 ? void 0 : race.size) + ? Size[race.size] + : Size[Size.medium]; // We default to medium size + // Hands + if ((race === null || race === void 0 ? void 0 : race.arms) != undefined) { + actorUpdate["data.attributes.arms"] = race.arms; + } + // Reach + // TODO: Reach should be decided by grafts + actorUpdate["data.attributes.reach"] = 5; + // Set HP + actorUpdate["data.attributes.hp.value"] = array.HP; + actorUpdate["data.attributes.hp.max"] = array.HP; + // Set SP (should be 0) + actorUpdate["data.attributes.sp.max"] = 0; + // Set RP (should be 0) + actorUpdate["data.attributes.rp.max"] = 0; + // Set KAC + actorUpdate["data.attributes.kac.value"] = array.KAC; + // Set EAC + actorUpdate["data.attributes.eac.value"] = array.EAC; + // Set reflex save + actorUpdate["data.attributes.reflex.bonus"] = array.reflex; + // Set fort save + actorUpdate["data.attributes.fort.bonus"] = array.fort; + // Set will save + actorUpdate["data.attributes.will.bonus"] = array.will; + // Set ability modifiers + // all abilities + var abilities = ["cha", "con", "dex", "int", "str", "wis"]; + // First set hard-coded ability modifiers + for (let ability of context.abilities) { + let i = abilities.indexOf(ability[0]); + // Remove from our array of abilities to randomly improve + if (i) { + actorUpdate["data.abilities." + ability[0] + ".mod"] = + ability[1]; + abilities.splice(i, 1); + logEntries.push([ + "Increased " + + ability[0] + + " ability by " + + ability[1] + + " as dictated by graft/special ability.", + "" + ]); + } + } + // We randomize which abilities are buffed + Utils.shuffleArray(abilities); + actorUpdate["data.abilities." + abilities[0] + ".mod"] = + array.abilityMods[0]; + actorUpdate["data.abilities." + abilities[1] + ".mod"] = + array.abilityMods[1]; + actorUpdate["data.abilities." + abilities[2] + ".mod"] = + array.abilityMods[2]; + logEntries.push([ + "Increased " + + abilities[0] + + " ability (chosen randomly) by " + + array.abilityMods[0] + + " as dictated by array.", + "" + ]); + logEntries.push([ + "Increased " + + abilities[1] + + " ability (chosen randomly) by " + + array.abilityMods[1] + + " as dictated by array.", + "" + ]); + logEntries.push([ + "Increased " + + abilities[2] + + " ability (chosen randomly) by " + + array.abilityMods[2] + + " as dictated by array.", + "" + ]); + // Set initiative modifier (be dex modifier) + let initiative = (_a = actorUpdate["data.abilities.dex.mod"]) !== null && _a !== void 0 ? _a : 0; + actorUpdate["data.attributes.init.total"] = initiative; + logEntries.push([ + "Set initiative as " + + initiative + + " to match dex modifier (if no dex modifier defaults to 0).", + "Unless you increase it with the Improved Initiative feat, a graft, or an ad hoc adjustment, the NPC’s\n" + + "initiative bonus is equal to its Dexterity modifier." + ]); + // Update actor + await actor.update(actorUpdate); + // Update log + context.log.push(...logEntries); + } + static async setVulnerabilitiesAndImmunities(actor, context) { + let logEntries = []; + let actorUpdate = {}; + actorUpdate["data.traits.ci.custom"] = context.conditionImmunities.join(";"); + // Update actor + await actor.update(actorUpdate); + // Update log + context.log.push(...logEntries); + } + static async setSkills(actor, context) { + let array = context.mainArrayRow; + let actorUpdate = {}; + // All skills minus perception (always a `good` skill, and profession) + // TODO: Support profession skills + var skillsToBuff = [ + "acr", + "ath", + "blu", + "com", + "cul", + "dip", + "dis", + "eng", + "int", + "lsc", + "med", + "mys", + "phs", + "pil", + "sen", + "sle", + "ste", + "sur" + ]; + // Remove any skills we are buffing due to grafts + skillsToBuff = skillsToBuff.filter(function (skill) { + return (!context.masterSkills.includes(skill) && + !context.goodSkills.includes(skill)); + }); + Utils.shuffleArray(skillsToBuff); + // Apply good skill mod to perception + actorUpdate["data.skills.per.mod"] = array.goodSkill.mod; + actorUpdate["data.skills.per.enabled"] = true; + // NOTE: We do this step after the above buff to perception as some grafts make perception a master skill and + // we want that to override the above in that case. + // Apply fixed master/good skills (from grafts) + for (let masterSkill of context.masterSkills) { + actorUpdate["data.skills." + masterSkill + ".mod"] = + array.masterSkill.mod; + actorUpdate["data.skills." + masterSkill + ".enabled"] = true; + } + for (let goodSkill of context.goodSkills) { + actorUpdate["data.skills." + goodSkill + ".mod"] = + array.goodSkill.mod; + actorUpdate["data.skills." + goodSkill + ".enabled"] = true; + } + // Apply master / good skill mod to random skills (from an array of skills missing graft skills + perception) + var skillIndex = 0; // Used to track progress through array of skills + // Apply mod to master skills + for (let i = 0; i < array.masterSkill.count; i++) { + let skill = skillsToBuff[skillIndex]; + actorUpdate["data.skills." + skill + ".mod"] = array.masterSkill.mod; + actorUpdate["data.skills." + skill + ".enabled"] = true; + skillIndex++; + } + // Apply mod to good skills + for (let i = 0; i < array.goodSkill.count; i++) { + let skill = skillsToBuff[skillIndex]; + actorUpdate["data.skills." + skill + ".mod"] = array.goodSkill.mod; + actorUpdate["data.skills." + skill + ".enabled"] = true; + skillIndex++; + } + // Update actor + await actor.update(actorUpdate); + } + static async setWeapons(actor, context) { + let attackArray = MonsterCreation.arrays.expert.attack[context.CR]; + let highAttackBonus = attackArray.high; + let lowAttackBonus = attackArray.low; + // Add natural weapons or generic unarmed strike + if (context.naturalWeapons.enabled === true) { + let naturalWeapons = WeaponFactory.makeNaturalWeapons(); + // Unlocked by the universal creature rule rather than a racial feature + if (context.naturalWeapons.racial === false) { + naturalWeapons.name = "slam"; + // TODO: bite, claw, or slam + // TODO: Different damage types depending on slam, bite or claw + } + naturalWeapons.data.attackBonus = highAttackBonus; + naturalWeapons.data.damage = { + parts: [[attackArray.standard, "bludgeoning"]] + }; + context.itemsToAdd.push(naturalWeapons); + } + else { + // All NPCs have unarmed strike unless they are equipped with natural weapons + let unarmedStrike = WeaponFactory.makeUnarmedStrike(); + // We use the low attack for built in unarmed strikes as they should never be the primary attack of a combatant + unarmedStrike.data.attackBonus = lowAttackBonus; + context.itemsToAdd.push(unarmedStrike); + } + // Generate ranged weapons + if (context.rangedWeapon.enabled) { + let laserPistol = await WeaponFactory.makeLaserPistol(context.CR); + if (laserPistol) { + laserPistol.data.equipped = true; + laserPistol.data.proficient = true; // Should always be proficient with equipped weapons + laserPistol.data.ability = ""; // Should not be modified by any ability + laserPistol.data.attackBonus = highAttackBonus; + laserPistol.data.damage = { + parts: [[attackArray.energy, "fire"]] + }; + context.itemsToAdd.push(laserPistol); + } + } + } + static async setInventory(actor, context) { + if (context.generateAdditionalItems) { + let items = ItemFactory.makeItemCollection(); + context.itemsToAdd.push(...items); + } + // Add all items + let actorUpdate = {}; + actorUpdate["items"] = context.itemsToAdd; + await actor.update(actorUpdate); + } + static async setToken(actor, context) { + var _a, _b; + let actorUpdate = {}; + actorUpdate["token.randomImg"] = false; + if ((_a = context.tokenOptions) === null || _a === void 0 ? void 0 : _a.dynamicImage) { + var path; + // Either set path as race + gender or creature type + if (context.race) + path = "populator/" + context.race + "/" + context.gender + "/*"; + else if (context.creatureTypeGraft) + path = "populator/" + ((_b = context.creatureTypeGraft) === null || _b === void 0 ? void 0 : _b.name) + "/*"; + if (path) { + actorUpdate["token.img"] = path; + actorUpdate["token.randomImg"] = true; + } + } + actorUpdate["token.name"] = actor.name; // Set token name to match actor name + actorUpdate["token.actorLink"] = true; + actorUpdate["token.disposition"] = 0; // Neutral by default + // Update actor + await actor.update(actorUpdate); + } + static async setSenses(actor, context) { + let actorUpdate = {}; + if (context.senses.length > 0) { + actorUpdate["data.traits.senses"] = context.senses.join(", "); + } + await actor.update(actorUpdate); + } + static async setAbout(actor, context) { + let actorUpdate = {}; + // biography + var biography = BiographyFactory.makeBiography(actor, context); + actorUpdate["data.details.biography.value"] = biography; + // gm notes + var gmNotes = ""; + for (let entry of context.log) { + gmNotes += "

" + entry[0] + "

"; + if (entry[1] != "") { + gmNotes += "
" + entry[1] + "
"; + } + } + actorUpdate["data.details.biography.gmNotes"] = gmNotes; + // Update actor + await actor.update(actorUpdate); + } + static async applyCreatureTypeGraft(actor, context, graft) { + let logEntries = []; + let actorUpdate = {}; + if (graft === Grafts.creatureType.animal) { + // Applies either a -4 or -5 (randomly) as intelligence score + let intelligenceMods = [-4, -5]; + Utils.shuffleArray(intelligenceMods); + await apply(actor, context, + //Senses + SharedAdjusters.Senses.lowLightVision, + // Applies a +2 to reflex & fortitude + SharedAdjusters.Saves.reflexPlus2, SharedAdjusters.Saves.fortitudePlus2, new AbilityScoreAdjuster({ + setAbilityScore: [ + AbilityScore.intelligence, + intelligenceMods[0] + ] + })); + // TODO: This has a chance of overwriting one of the randomly boosted ability scores, we should reassign the overwritten value to another stat + logEntries.push([ + "Applied animal type graft. Added low-light vision, +2 to reflex/fort save, set " + + intelligenceMods[0] + + " to intelligence (chosen at random between -4 and -5).", + Grafts.creatureType.animal.description + ]); + } + else if (graft === Grafts.creatureType.construct) { + await apply(actor, context, + //Senses + SharedAdjusters.Senses.darkVision60ft, SharedAdjusters.Senses.lowLightVision, + // Immunities + SharedAdjusters.Immunities.constructImmunities, + // Saves (-2 to all) + SharedAdjusters.Saves.reflexMinus2, SharedAdjusters.Saves.willpowerMinus2, SharedAdjusters.Saves.fortitudeMinus2); + // Constitution + context.abilities.push(["con", 0]); // NOTE: Should be no constitution but sfrpg doesn't yet support + // Unliving + await this.applyUniversalCreatureRule(actor, context, UniversalCreatureRules.unliving); + // Attacks + context.attackArrayRow.high += 1; + context.attackArrayRow.low += 1; + logEntries.push([ + "Applied construct type graft. Added darkvision 60 ft. and low-light vision, -2 to all saves, +1 to all attacks, added unliving universal creature rule.", + Grafts.creatureType.construct.description + ]); + } + else if (graft === Grafts.creatureType.humanoid) { + // Applies a +2 to a random saving throw + var saves = [Save.reflex, Save.fortitude, Save.willpower]; + Utils.shuffleArray(saves); + let save = saves[0]; // random save + await new SaveAdjuster({ mutateSave: [save, 2] }).apply(actor, context); + logEntries.push([ + "Applied humanoid type graft. Added +2 to " + + saves[0] + + " save (chosen at random).", + Grafts.creatureType.humanoid.description + ]); + } + else if (graft === Grafts.creatureType.monstrousHumanoid) { + await apply(actor, context, + // Senses + SharedAdjusters.Senses.darkVision60ft, + // Applies a +2 to reflex & will + SharedAdjusters.Saves.reflexPlus2, SharedAdjusters.Saves.willpowerPlus2); + // Add +1 to all attacks + context.attackArrayRow.high += 1; + context.attackArrayRow.low += 1; + logEntries.push([ + "Applied monstrous humanoid type graft. Added darkvision, +2 to reflex/will saves and +1 to all attacks.", + Grafts.creatureType.monstrousHumanoid.description + ]); + } + else if (graft === Grafts.creatureType.ooze) { + apply(actor, context, + //Senses + SharedAdjusters.Senses.blindsight, + // Saves (+2 to fortitude save, -2 reflex save) + SharedAdjusters.Saves.fortitudePlus2, SharedAdjusters.Saves.reflexMinus2, + // Skills (No master or good skills, except perception which everything usually has) + new SkillAdjuster({ + setMonsterSkillCount: [MonsterSkillType.master, 0] + }), new SkillAdjuster({ + setMonsterSkillCount: [MonsterSkillType.good, 0] + }), + // Mindless - no intelligence + // TODO: This has a chance of overwriting one of the randomly boosted ability scores, we should reassign the overwritten value to another stat + new AbilityScoreAdjuster({ + setAbilityScore: [AbilityScore.intelligence, 0] + })); + await this.applyUniversalCreatureRule(actor, context, UniversalCreatureRules.mindless); + // Sightless + await this.applyUniversalCreatureRule(actor, context, UniversalCreatureRules.sightless); + logEntries.push([ + "Applied ooze type graft. Added blindsight, +2 to fort save, -2 to reflex save, set - as intelligence, added mindless and sightless universal creature rule, reduced good and master skills to 0 (except perception).", + Grafts.creatureType.ooze.description + ]); + } + else if (graft === Grafts.creatureType.vermin) { + await apply(actor, context, + //Senses + SharedAdjusters.Senses.darkVision60ft, + // Saves (2 to fortitude saves) + SharedAdjusters.Saves.fortitudePlus2); + // Mindless, no intelligence + // TODO: This has a chance of overwriting one of the randomly boosted ability scores, we should reassign the overwritten value to another stat + context.abilities.push(["int", 0]); + await this.applyUniversalCreatureRule(actor, context, UniversalCreatureRules.mindless); + logEntries.push([ + "Applied vermin type graft. Added darkvision, +2 to fort save, set - as intelligence, added mindless universal creature rule.", + Grafts.creatureType.vermin.description + ]); + } + actorUpdate["data.details.raceAndGrafts"] = + actor.data.data.details.raceAndGrafts + " " + graft.name; + // Update actor + await actor.update(actorUpdate); + // Update log + context.log.push(...logEntries); + } + static async applyCreatureSubtypeGraft(actor, context, graft) { + let logEntries = []; + let actorUpdate = {}; + // Set as 1 per day + function addOncePerDayInnateSpell(spell) { + spell.data.uses.value = 1; + spell.data.uses.max = 1; + spell.data.uses.per = "day"; + spell.data.preparation.mode = "innate"; + context.itemsToAdd.push(spell); + } + function addAtWillInnateSpell(spell) { + spell.data.preparation.mode = "innate"; + context.itemsToAdd.push(spell); + } + if (graft === Grafts.creatureSubtype.android) { + //Senses + await apply(actor, context, SharedAdjusters.Senses.darkVision60ft, SharedAdjusters.Senses.lowLightVision); + logEntries.push([ + "Applied android subtype graft. Added darkvision 60ft. and low-light vision.", + Grafts.creatureSubtype.android.description + ]); + } + else if (graft === Grafts.creatureSubtype.dwarf) { + //Senses + await apply(actor, context, SharedAdjusters.Senses.darkVision60ft); + logEntries.push([ + "Applied dwarf subtype graft. Added darkvision 60ft.", + Grafts.creatureSubtype.dwarf.description + ]); + } + else if (graft === Grafts.creatureSubtype.elf) { + // Elves can be `drow`, `elven` or `half-elven` race + // All elves: + await new SkillAdjuster({ + // Perception as a master skill + setSkillAsMonsterSkill: [ + Skill.perception, + MonsterSkillType.master + ] + }).apply(actor, context); + if (context.race == "elf") { + await apply(actor, context, + // Senses + SharedAdjusters.Senses.lowLightVision, + // Mysticism as a master skill + new SkillAdjuster({ + setSkillAsMonsterSkill: [ + Skill.mysticism, + MonsterSkillType.master + ] + }), + // Add immunities + SharedAdjusters.Immunities.elvenImmunities); + logEntries.push([ + "Applied elf subtype graft. elf race selected so added elven immunities, and mysticism as a master skill.", + Grafts.creatureSubtype.elf.description + ]); + } + if (context.race == "drow") { + await apply(actor, context, + //Senses + SharedAdjusters.Senses.darkVision60ft, // Replaces low-light vision + // Add immunities + SharedAdjusters.Immunities.drowImmunities); + // Drow magic at will innate spells + let dancingLights = await Utils.fuzzyFindSpellAsync("dancing lights"); + let detectMagic = await Utils.fuzzyFindSpellAsync("detect magic"); + addAtWillInnateSpell(dancingLights); + addAtWillInnateSpell(detectMagic); + logEntries.push([ + "Applied elf subtype graft. drow race selected so added darkvision 60ft., perception as a master skill, dacing lights and detect magic as innate spells, added drow immunities.", + Grafts.creatureSubtype.elf.description + ]); + } + else if (context.race == "halfElf") { + await apply(actor, context, SharedAdjusters.Senses.lowLightVision); + // Half-elves gain an extra good skill + context.mainArrayRow.goodSkill.count += 1; + logEntries.push([ + "Applied elf subtype graft. half-elf race selected so added low-light vision, perception as a master skill, and one additional good skill.", + Grafts.creatureSubtype.elf.description + ]); + } + } + else if (graft === Grafts.creatureSubtype.gnoll) { + // Senses + await apply(actor, context, SharedAdjusters.Senses.darkVision60ft, new SenseAdjuster({ addSense: ["blindsense (scent) 30 ft."] }), + // Survival as a master skill + new SkillAdjuster({ + setSkillAsMonsterSkill: [ + Skill.survival, + MonsterSkillType.master + ] + })); + // Natural weapons + context.naturalWeapons.enabled = true; + context.naturalWeapons.racial = true; + logEntries.push([ + "Applied gnoll subtype graft. Added blindsense (scent) 30 ft., darkvision 60ft., natural weapons, survival as a master skill.", + Grafts.creatureSubtype.gnoll.description + ]); + } + else if (graft === Grafts.creatureSubtype.halfling) { + await apply(actor, context, + // Perception and Stealth as master skills + new SkillAdjuster({ + setSkillAsMonsterSkill: [ + Skill.stealth, + MonsterSkillType.master + ] + }), new SkillAdjuster({ + setSkillAsMonsterSkill: [ + Skill.perception, + MonsterSkillType.master + ] + }), + // Athletics and Acrobatics as good skills + new SkillAdjuster({ + setSkillAsMonsterSkill: [ + Skill.acrobatics, + MonsterSkillType.good + ] + }), new SkillAdjuster({ + setSkillAsMonsterSkill: [ + Skill.athletics, + MonsterSkillType.good + ] + })); + logEntries.push([ + "Applied halfing subtype graft. Added perception and stealth as master skills and acrobatics and athletics as good skills.", + Grafts.creatureSubtype.halfling.description + ]); + } + else if (graft === Grafts.creatureSubtype.human) { + if (context.race == Races.nonCombatantRaces.human.name) { + context.mainArrayRow.specialAbilities += 1; + context.mainArrayRow.goodSkill.count += 1; + logEntries.push([ + "Applied human subtype graft. Added an additional special ability and an additional good skill.", + Grafts.creatureSubtype.human.description + ]); + } + // For half-elf, half-orc, etc + else { + logEntries.push([ + "Applied human subtype graft (no modifications).", + Grafts.creatureSubtype.human.description + ]); + } + } + else if (graft === Grafts.creatureSubtype.gnome) { + await apply(actor, context, + //Senses + SharedAdjusters.Senses.lowLightVision, + // Culture as a master skill + new SkillAdjuster({ + setSkillAsMonsterSkill: [ + Skill.culture, + MonsterSkillType.master + ] + })); + // Gnome magic once per day innate spells + let dancingLights = await Utils.fuzzyFindSpellAsync("dancing lights"); + let ghostSound = await Utils.fuzzyFindSpellAsync("ghost sound"); + let tokenSpell = await Utils.fuzzyFindSpellAsync("token spell"); + addOncePerDayInnateSpell(dancingLights); + addOncePerDayInnateSpell(ghostSound); + addOncePerDayInnateSpell(tokenSpell); + logEntries.push([ + "Applied gnome subtype graft. Added dancing lights, ghost sound, and token spell as once-per-day innate spells and added culture as a master skill.", + Grafts.creatureSubtype.gnome.description + ]); + } + else if (graft === Grafts.creatureSubtype.goblinoid) { + // NOTE: AA1 has a different definition of the goblinoid subtype, should handle either + // TODO: Check if space goblin, hobgoblin or kanabo + // NOTE: For now we assume hobgoblin + await apply(actor, context, + //Senses + SharedAdjusters.Senses.darkVision60ft, + // Intimidate and stealth as a master skill + new SkillAdjuster({ + setSkillAsMonsterSkill: [ + [Skill.intimidate, Skill.stealth], + MonsterSkillType.master + ] + })); + } + else if (graft === Grafts.creatureSubtype.orc) { + // TODO: Check if race is half-orc, and only then apply + await apply(actor, context, + // Senses + SharedAdjusters.Senses.darkVision60ft, + // Intimidate and Survival are master skills + new SkillAdjuster({ + setSkillAsMonsterSkill: [ + [Skill.intimidate, Skill.survival], + MonsterSkillType.master + ] + })); + logEntries.push([ + "Applied orc subtype graft. Added darkvision 60 ft and intimidate and survival as master skills.", + Grafts.creatureSubtype.orc.description + ]); + } + else if (graft === Grafts.creatureSubtype.kasatha) { + // Acrobatics and Athletics master skills + await apply(actor, context, + // Acrobatics and Athletics are master skills + new SkillAdjuster({ + setSkillAsMonsterSkill: [ + [Skill.acrobatics, Skill.athletics], + MonsterSkillType.master + ] + }), + // Culture is a good skill + new SkillAdjuster({ + setSkillAsMonsterSkill: [ + [Skill.culture], + MonsterSkillType.good + ] + })); + logEntries.push([ + "Applied kasatha subtype graft. Added acrobatics and atheletics as a master skill, culture as a good skill.", + Grafts.creatureSubtype.kasatha.description + ]); + } + else if (graft === Grafts.creatureSubtype.lashunta) { + // Languages + actorUpdate["data.traits.languages.custom"] = + "limited telepathy 30 ft."; + // Innate spells + let detectThoughts = await Utils.fuzzyFindSpellAsync("detect thoughts"); + let daze = await Utils.fuzzyFindSpellAsync("daze"); + let psychokineticHand = await Utils.fuzzyFindSpellAsync("psychokinetic hand"); + addOncePerDayInnateSpell(detectThoughts); + addAtWillInnateSpell(daze); + addAtWillInnateSpell(psychokineticHand); + logEntries.push([ + "Applied lashunta subtype graft. Added limited telepathy 30 ft., detect thoughts as a once per day innate spell and added daze and psychokinetic hand as innate spells.", + Grafts.creatureSubtype.lashunta.description + ]); + } + else if (graft === Grafts.creatureSubtype.shirren) { + await apply(actor, context, + //Senses + new SenseAdjuster({ + addSense: "blindsense (vibration) 30 ft." + }), + // Culture and Diplomacy as good skills + new SkillAdjuster({ + setSkillAsMonsterSkill: [ + [Skill.culture, Skill.diplomacy], + MonsterSkillType.good + ] + })); + // Languages + actorUpdate["data.traits.languages.custom"] = + "limited telepathy 30 ft."; + logEntries.push([ + "Applied shirren subtype graft. Added blindsense (vibration) 30 ft., limited telepathy 30 ft., culture and diplomacy as good skills.", + Grafts.creatureSubtype.shirren.description + ]); + } + else if (graft === Grafts.creatureSubtype.skittermander) { + //Senses + await apply(actor, context, SharedAdjusters.Senses.lowLightVision); + logEntries.push([ + "Applied skittermander subtype graft. Added low-light vision.", + Grafts.creatureSubtype.skittermander.description + ]); + } + else if (graft === Grafts.creatureSubtype.technological) { + // No modifications + logEntries.push([ + "Applied technological subtype graft (no modifications).", + Grafts.creatureSubtype.technological.description + ]); + } + else if (graft === Grafts.creatureSubtype.vesk) { + await apply(actor, context, + //Senses + SharedAdjusters.Senses.lowLightVision); + // Natural weapons + context.naturalWeapons.enabled = true; + context.naturalWeapons.racial = true; + logEntries.push([ + "Applied vesk subtype graft. Added low-light vision and natural weapons.", + Grafts.creatureSubtype.vesk.description + ]); + } + else if (graft === Grafts.creatureSubtype.ysoki) { + await apply(actor, context, + //Senses + SharedAdjusters.Senses.darkVision60ft, + // Skills (Engineering and stealth as master skills) + new SkillAdjuster({ + setSkillAsMonsterSkill: [ + [Skill.engineering, Skill.stealth], + MonsterSkillType.master + ] + }), + // Survival as good skill + new SkillAdjuster({ + setSkillAsMonsterSkill: [ + Skill.survival, + MonsterSkillType.good + ] + })); + logEntries.push([ + "Applied ysoki subtype graft. Added darkvision 60 ft., added engineering and stealth as master skills and added survival as a good skill.", + Grafts.creatureSubtype.ysoki.description + ]); + } + // Append subtype graft to graft list + actorUpdate["data.details.raceAndGrafts"] = + actor.data.data.details.raceAndGrafts + ", " + graft.name; + // Update actor + await actor.update(actorUpdate); + // Update log + context.log.push(...logEntries); + } + static async applyUniversalCreatureRule(actor, context, universalCreatureRule) { + if (universalCreatureRule == UniversalCreatureRules.mindless) { + await apply(actor, context, + // Immunities + SharedAdjusters.Immunities.mindAffectingEffects, + // Skills - set 0 master skills + new SkillAdjuster({ + setMonsterSkillCount: [MonsterSkillType.master, 0] + }), + // Reduce good skills by 1 + new SkillAdjuster({ + mutateMonsterSkill: [MonsterSkillType.good, -1] + }), + // No intelligence + // TODO: This has a chance of overwriting one of the randomly boosted ability scores, we should reassign the overwritten value to another stat + new AbilityScoreAdjuster({ + setAbilityScore: [AbilityScore.intelligence, 0] + })); + // Update log + context.log.push([ + "Applied mindless universal creature rule. Reduced good skills by 1, reduced master skills to 0, added mind-affecting effects to condition immunities.", + UniversalCreatureRules.mindless.description + ]); + } + else if (universalCreatureRule == UniversalCreatureRules.sightless) { + // Uses default implementation + // TODO: Reumove one all UCR can depend on default/subclass implementation + let output = await universalCreatureRule.apply(actor, context); + context.log.push(output); + } + else if (universalCreatureRule == UniversalCreatureRules.unliving) { + await apply(actor, context, + // No constitution + // TODO: This has a chance of overwriting one of the randomly boosted ability scores, we should reassign the overwritten value to another stat + // TODO: Should support `-` in the future but not yet supported by SFRPG + new AbilityScoreAdjuster({ + setAbilityScore: [AbilityScore.constituion, 0] + })); + // Update log + context.log.push([ + "Applied unliving universal creature rule, set constitution to `-` .", + UniversalCreatureRules.unliving.description + ]); + } + } + static async applyAdjustmentSpecialAbility(actor, context, adjustmentSpecialAbility) { + let logEntries = []; + let actorUpdate = {}; + // Brute - Use the low attack value for the NPC’s main attack, but determine the attack’s damage as if the NPC’s CR were 2 higher (adding the extra damage from weapon specialization). This special ability has a greater impact at higher CRs. + if (adjustmentSpecialAbility === + MonsterCreation.specialAbilities.adjustment.brute) { + context.attackArrayRow.high = context.attackArrayRow.low; + // Get attack rows higher + let indexOfCR = CR.indexOf(context.CR); + let indexOfCRPlus2 = indexOfCR + 2; + let CRPlus2 = CR[indexOfCRPlus2]; + var monsterReferenceSymbol = MonsterReferenceSymbol[context.monsterReferenceSymbol]; + let attackArrayRowPlus2 = MonsterCreation.arrays[monsterReferenceSymbol].attack[CRPlus2]; + // Buff all damage by 2 CRs + context.attackArrayRow.kinetic = attackArrayRowPlus2.kinetic; + context.attackArrayRow.energy = attackArrayRowPlus2.energy; + context.attackArrayRow.standard = attackArrayRowPlus2.standard; + logEntries.push([ + "Applied brute adjustment special ability. Set high attack bonus value to low attack bonus, increased damage by 2 rows in the array.", + MonsterCreation.specialAbilities.adjustment.brute.description + ]); + } + //Increase all saving throw bonuses by 1 or one saving throw bonus by 3. + else if (adjustmentSpecialAbility === + MonsterCreation.specialAbilities.adjustment.saveBoost) { + // Will we increase all 3 by 1 or 1 by 3 + var randomChoice = Math.random() < 0.5; + if (randomChoice) { + // Applies a +1 to all saves + apply(actor, context, new SaveAdjuster({ mutateSave: [Save.reflex, 1] }), new SaveAdjuster({ mutateSave: [Save.willpower, 1] }), new SaveAdjuster({ mutateSave: [Save.fortitude, 1] })); + logEntries.push([ + "Applied save boost adjustment special ability. +1 to all saves (chose this option at random).", + MonsterCreation.specialAbilities.adjustment.saveBoost + .description + ]); + } + else { + // Apply +3 to one save + let saves = [Save.reflex, Save.willpower, Save.fortitude]; + Utils.shuffleArray(saves); + await new SaveAdjuster({ mutateSave: [saves[0], 3] }).apply(actor, context); + logEntries.push([ + "Applied save boost adjustment special ability. +3 to " + + saves[0] + + " save (chose this option at random).", + MonsterCreation.specialAbilities.adjustment.saveBoost + .description + ]); + } + } + // Increase all master and good skill bonuses by 1 + else if (adjustmentSpecialAbility === + MonsterCreation.specialAbilities.adjustment.skillful) { + context.mainArrayRow.masterSkill.mod += 1; + context.mainArrayRow.goodSkill.mod += 1; + logEntries.push([ + "Applied skillful adjustment special ability. +1 to all master and good skills.", + MonsterCreation.specialAbilities.adjustment.skillful.description + ]); + } + //Increase the NPC’s HP by 20% + else if (adjustmentSpecialAbility === + MonsterCreation.specialAbilities.adjustment.extraHitPoints) { + context.mainArrayRow.HP = Math.floor(context.mainArrayRow.HP * 1.2); + logEntries.push([ + "Applied extra hit points adjustment special ability. Added 20% more HP.", + MonsterCreation.specialAbilities.adjustment.extraHitPoints + .description + ]); + } + // Update actor + await actor.update(actorUpdate); + // Log + context.log.push(...logEntries); + } + static async clean(item) { + if (item["_id"]) { + item["sourceId"] = item["_id"]; + delete item["_id"]; + } + } +} +//# sourceMappingURL=NPCFactory.js.map \ No newline at end of file diff --git a/dist/factories/NPCFactory.js.map b/dist/factories/NPCFactory.js.map new file mode 100644 index 0000000..b913738 --- /dev/null +++ b/dist/factories/NPCFactory.js.map @@ -0,0 +1 @@ +{"version":3,"file":"NPCFactory.js","sourceRoot":"","sources":["../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BAAgB,CAAC,UAAU,CAAC,cAAc;qBACrD,WAAW;aACnB,CAAC,CAAA;SACL;QAED,eAAe;QACf,MAAM,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,CAAA;QAE/B,MAAM;QACN,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC,CAAA;IACnC,CAAC;IAEO,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI;QAC3B,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE;YACb,IAAI,CAAC,UAAU,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAA;YAC9B,OAAO,IAAI,CAAC,KAAK,CAAC,CAAA;SACrB;IACL,CAAC;CACJ"} \ No newline at end of file diff --git a/dist/factories/WeaponFactory.js b/dist/factories/WeaponFactory.js new file mode 100644 index 0000000..a53cded --- /dev/null +++ b/dist/factories/WeaponFactory.js @@ -0,0 +1,46 @@ +import { Utils } from "../utils/Uils.js"; +import { naturalWeaponsTemplate, unarmedStrikeTemplate } from "../data/Weapons.js"; +export class WeaponFactory { + static makeUnarmedStrike() { + return unarmedStrikeTemplate; + } + static makeNaturalWeapons() { + return naturalWeaponsTemplate; + } + // Generates a CR appropriate laser pistol + static async makeLaserPistol(forCR) { + var pistolName = "laser pistol, azimuth"; // level 1 laser pistol + switch (forCR) { + // CR 1/3 to 5 covered by default value + case "6": + case "7": + case "8": + pistolName = "laser pistol, corona"; + break; + case "9": + case "10": + case "11": + pistolName = "laser pistol, aphelion"; + break; + case "12": + case "13": + pistolName = "laser pistol, perihelion"; + break; + case "14": + case "15": + case "16": + pistolName = "laser pistol, parallax"; + break; + case "17": + case "18": + case "19": + case "20": + pistolName = "laser pistol, zenith"; + } + let laserPistol = await Utils.fuzzyFindItemAsync(pistolName); + if (laserPistol) { + return laserPistol; + } + } +} +//# sourceMappingURL=WeaponFactory.js.map \ No newline at end of file diff --git a/dist/factories/WeaponFactory.js.map b/dist/factories/WeaponFactory.js.map new file mode 100644 index 0000000..c590a03 --- /dev/null +++ b/dist/factories/WeaponFactory.js.map @@ -0,0 +1 @@ +{"version":3,"file":"WeaponFactory.js","sourceRoot":"","sources":["../../src/factories/WeaponFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AACxC,OAAO,EACH,sBAAsB,EACtB,qBAAqB,EACxB,MAAM,oBAAoB,CAAA;AAE3B,MAAM,OAAO,aAAa;IACf,MAAM,CAAC,iBAAiB;QAC3B,OAAO,qBAAqB,CAAA;IAChC,CAAC;IAEM,MAAM,CAAC,kBAAkB;QAC5B,OAAO,sBAAsB,CAAA;IACjC,CAAC;IAED,0CAA0C;IACnC,MAAM,CAAC,KAAK,CAAC,eAAe,CAC/B,KAAa;QAEb,IAAI,UAAU,GAAG,uBAAuB,CAAA,CAAC,uBAAuB;QAChE,QAAQ,KAAK,EAAE;YACX,uCAAuC;YACvC,KAAK,GAAG,CAAC;YACT,KAAK,GAAG,CAAC;YACT,KAAK,GAAG;gBACJ,UAAU,GAAG,sBAAsB,CAAA;gBACnC,MAAK;YACT,KAAK,GAAG,CAAC;YACT,KAAK,IAAI,CAAC;YACV,KAAK,IAAI;gBACL,UAAU,GAAG,wBAAwB,CAAA;gBACrC,MAAK;YACT,KAAK,IAAI,CAAC;YACV,KAAK,IAAI;gBACL,UAAU,GAAG,0BAA0B,CAAA;gBACvC,MAAK;YACT,KAAK,IAAI,CAAC;YACV,KAAK,IAAI,CAAC;YACV,KAAK,IAAI;gBACL,UAAU,GAAG,wBAAwB,CAAA;gBACrC,MAAK;YACT,KAAK,IAAI,CAAC;YACV,KAAK,IAAI,CAAC;YACV,KAAK,IAAI,CAAC;YACV,KAAK,IAAI;gBACL,UAAU,GAAG,sBAAsB,CAAA;SAC1C;QAED,IAAI,WAAW,GAAG,MAAM,KAAK,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAA;QAC5D,IAAI,WAAW,EAAE;YACb,OAAO,WAAsB,CAAA;SAChC;IACL,CAAC;CACJ"} \ No newline at end of file diff --git a/dist/models/Adjuster.js b/dist/models/Adjuster.js new file mode 100644 index 0000000..f81e4b8 --- /dev/null +++ b/dist/models/Adjuster.js @@ -0,0 +1,8 @@ +class Adjuster { + apply(actor, context) { + // stub + return ["", ""]; + } +} +export {}; +//# sourceMappingURL=Adjuster.js.map \ No newline at end of file diff --git a/dist/models/Adjuster.js.map b/dist/models/Adjuster.js.map new file mode 100644 index 0000000..73d09bf --- /dev/null +++ b/dist/models/Adjuster.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Adjuster.js","sourceRoot":"","sources":["../../src/models/Adjuster.ts"],"names":[],"mappings":"AAGA,MAAe,QAAQ;IACnB,KAAK,CAAC,KAAK,EAAE,OAA2B;QACpC,OAAO;QACP,OAAO,CAAC,EAAE,EAAC,EAAE,CAAC,CAAA;IAClB,CAAC;CACJ"} \ No newline at end of file diff --git a/dist/models/AdjustmentSpecialAbility.js b/dist/models/AdjustmentSpecialAbility.js new file mode 100644 index 0000000..ff5ee2f --- /dev/null +++ b/dist/models/AdjustmentSpecialAbility.js @@ -0,0 +1,11 @@ +export default class AdjustmentSpecialAbility { + constructor(name, description) { + this.name = name; + this.description = description; + } + async apply(actor, context) { + // Stub + return ["", ""]; + } +} +//# sourceMappingURL=AdjustmentSpecialAbility.js.map \ No newline at end of file diff --git a/dist/models/AdjustmentSpecialAbility.js.map b/dist/models/AdjustmentSpecialAbility.js.map new file mode 100644 index 0000000..bf93dab --- /dev/null +++ b/dist/models/AdjustmentSpecialAbility.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AdjustmentSpecialAbility.js","sourceRoot":"","sources":["../../src/models/AdjustmentSpecialAbility.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,OAAO,OAAO,wBAAwB;IAIzC,YAAY,IAAY,EAAE,WAAmB;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;IAClC,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,OAA2B;QAC1C,OAAO;QACP,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;IACnB,CAAC;CACJ"} \ No newline at end of file diff --git a/dist/models/CreatureSubtypeGraft.js b/dist/models/CreatureSubtypeGraft.js new file mode 100644 index 0000000..50fe410 --- /dev/null +++ b/dist/models/CreatureSubtypeGraft.js @@ -0,0 +1,7 @@ +export default class CreatureSubtypeGraft { + constructor(name, description) { + this.name = name; + this.description = description; + } +} +//# sourceMappingURL=CreatureSubtypeGraft.js.map \ No newline at end of file diff --git a/dist/models/CreatureSubtypeGraft.js.map b/dist/models/CreatureSubtypeGraft.js.map new file mode 100644 index 0000000..e487b82 --- /dev/null +++ b/dist/models/CreatureSubtypeGraft.js.map @@ -0,0 +1 @@ +{"version":3,"file":"CreatureSubtypeGraft.js","sourceRoot":"","sources":["../../src/models/CreatureSubtypeGraft.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,oBAAoB;IAGrC,YAAY,IAAY,EAAE,WAAmB;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;IAClC,CAAC;CACJ"} \ No newline at end of file diff --git a/dist/models/CreatureTypeGraft.js b/dist/models/CreatureTypeGraft.js index f561f5b..4e5a464 100644 --- a/dist/models/CreatureTypeGraft.js +++ b/dist/models/CreatureTypeGraft.js @@ -1,6 +1,8 @@ export default class CreatureTypeGraft { - constructor(name) { + constructor(name, description, capicityForLanguage = true) { this.name = name; + this.description = description; + this.capicityForLanguage = capicityForLanguage; } } //# sourceMappingURL=CreatureTypeGraft.js.map \ No newline at end of file diff --git a/dist/models/CreatureTypeGraft.js.map b/dist/models/CreatureTypeGraft.js.map index fb9d107..c98bc7d 100644 --- a/dist/models/CreatureTypeGraft.js.map +++ b/dist/models/CreatureTypeGraft.js.map @@ -1 +1 @@ -{"version":3,"file":"CreatureTypeGraft.js","sourceRoot":"","sources":["../../src/models/CreatureTypeGraft.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,iBAAiB;IAElC,YAAY,IAAY;QACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;CACJ"} \ No newline at end of file +{"version":3,"file":"CreatureTypeGraft.js","sourceRoot":"","sources":["../../src/models/CreatureTypeGraft.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,OAAO,iBAAiB;IAMlC,YACI,IAAY,EACZ,WAAmB,EACnB,sBAA+B,IAAI;QAEnC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;QAC9B,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAA;IAClD,CAAC;CACJ"} \ No newline at end of file diff --git a/dist/models/IMainArrayRow.js b/dist/models/IMainArrayRow.js new file mode 100644 index 0000000..c420112 --- /dev/null +++ b/dist/models/IMainArrayRow.js @@ -0,0 +1,2 @@ +"use strict"; +//# sourceMappingURL=IMainArrayRow.js.map \ No newline at end of file diff --git a/dist/models/IMainArrayRow.js.map b/dist/models/IMainArrayRow.js.map new file mode 100644 index 0000000..3433d8d --- /dev/null +++ b/dist/models/IMainArrayRow.js.map @@ -0,0 +1 @@ +{"version":3,"file":"IMainArrayRow.js","sourceRoot":"","sources":["../../src/models/IMainArrayRow.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/models/Interfaces/IApplyable.js b/dist/models/Interfaces/IApplyable.js new file mode 100644 index 0000000..2ee47e3 --- /dev/null +++ b/dist/models/Interfaces/IApplyable.js @@ -0,0 +1,8 @@ +export async function apply(actor, context, ...applyables) { + for (let applyable of applyables) { + await applyable.apply(actor, context); + } + // TODO: Collect output + return ["", ""]; +} +//# sourceMappingURL=IApplyable.js.map \ No newline at end of file diff --git a/dist/models/Interfaces/IApplyable.js.map b/dist/models/Interfaces/IApplyable.js.map new file mode 100644 index 0000000..fc54a39 --- /dev/null +++ b/dist/models/Interfaces/IApplyable.js.map @@ -0,0 +1 @@ +{"version":3,"file":"IApplyable.js","sourceRoot":"","sources":["../../../src/models/Interfaces/IApplyable.ts"],"names":[],"mappings":"AAMA,MAAM,CAAC,KAAK,UAAU,KAAK,CACvB,KAAK,EACL,OAA2B,EAC3B,GAAG,UAAwB;IAE3B,KAAK,IAAI,SAAS,IAAI,UAAU,EAAE;QAC9B,MAAM,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;KACxC;IAED,uBAAuB;IACvB,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;AACnB,CAAC"} \ No newline at end of file diff --git a/dist/models/Interfaces/IAttackArrayRow.js b/dist/models/Interfaces/IAttackArrayRow.js new file mode 100644 index 0000000..2114fec --- /dev/null +++ b/dist/models/Interfaces/IAttackArrayRow.js @@ -0,0 +1,2 @@ +"use strict"; +//# sourceMappingURL=IAttackArrayRow.js.map \ No newline at end of file diff --git a/dist/models/Interfaces/IAttackArrayRow.js.map b/dist/models/Interfaces/IAttackArrayRow.js.map new file mode 100644 index 0000000..6509977 --- /dev/null +++ b/dist/models/Interfaces/IAttackArrayRow.js.map @@ -0,0 +1 @@ +{"version":3,"file":"IAttackArrayRow.js","sourceRoot":"","sources":["../../../src/models/Interfaces/IAttackArrayRow.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/models/Interfaces/IGoods.js b/dist/models/Interfaces/IGoods.js new file mode 100644 index 0000000..8abd473 --- /dev/null +++ b/dist/models/Interfaces/IGoods.js @@ -0,0 +1,2 @@ +"use strict"; +//# sourceMappingURL=IGoods.js.map \ No newline at end of file diff --git a/dist/models/Interfaces/IGoods.js.map b/dist/models/Interfaces/IGoods.js.map new file mode 100644 index 0000000..be2d7c0 --- /dev/null +++ b/dist/models/Interfaces/IGoods.js.map @@ -0,0 +1 @@ +{"version":3,"file":"IGoods.js","sourceRoot":"","sources":["../../../src/models/Interfaces/IGoods.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/models/Interfaces/IItem.js b/dist/models/Interfaces/IItem.js new file mode 100644 index 0000000..b8e4dcb --- /dev/null +++ b/dist/models/Interfaces/IItem.js @@ -0,0 +1,2 @@ +"use strict"; +//# sourceMappingURL=IItem.js.map \ No newline at end of file diff --git a/dist/models/Interfaces/IItem.js.map b/dist/models/Interfaces/IItem.js.map new file mode 100644 index 0000000..b33296c --- /dev/null +++ b/dist/models/Interfaces/IItem.js.map @@ -0,0 +1 @@ +{"version":3,"file":"IItem.js","sourceRoot":"","sources":["../../../src/models/Interfaces/IItem.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/models/Interfaces/IMainArrayRow.js b/dist/models/Interfaces/IMainArrayRow.js new file mode 100644 index 0000000..c420112 --- /dev/null +++ b/dist/models/Interfaces/IMainArrayRow.js @@ -0,0 +1,2 @@ +"use strict"; +//# sourceMappingURL=IMainArrayRow.js.map \ No newline at end of file diff --git a/dist/models/Interfaces/IMainArrayRow.js.map b/dist/models/Interfaces/IMainArrayRow.js.map new file mode 100644 index 0000000..c87ea42 --- /dev/null +++ b/dist/models/Interfaces/IMainArrayRow.js.map @@ -0,0 +1 @@ +{"version":3,"file":"IMainArrayRow.js","sourceRoot":"","sources":["../../../src/models/Interfaces/IMainArrayRow.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/models/Interfaces/ISpecialAbility.js b/dist/models/Interfaces/ISpecialAbility.js new file mode 100644 index 0000000..639e8d4 --- /dev/null +++ b/dist/models/Interfaces/ISpecialAbility.js @@ -0,0 +1,2 @@ +export {}; +//# sourceMappingURL=ISpecialAbility.js.map \ No newline at end of file diff --git a/dist/models/Interfaces/ISpecialAbility.js.map b/dist/models/Interfaces/ISpecialAbility.js.map new file mode 100644 index 0000000..21d6ced --- /dev/null +++ b/dist/models/Interfaces/ISpecialAbility.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ISpecialAbility.js","sourceRoot":"","sources":["../../../src/models/Interfaces/ISpecialAbility.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/models/Interfaces/IWeapon.js b/dist/models/Interfaces/IWeapon.js new file mode 100644 index 0000000..75dd84f --- /dev/null +++ b/dist/models/Interfaces/IWeapon.js @@ -0,0 +1,2 @@ +"use strict"; +//# sourceMappingURL=IWeapon.js.map \ No newline at end of file diff --git a/dist/models/Interfaces/IWeapon.js.map b/dist/models/Interfaces/IWeapon.js.map new file mode 100644 index 0000000..ca741b3 --- /dev/null +++ b/dist/models/Interfaces/IWeapon.js.map @@ -0,0 +1 @@ +{"version":3,"file":"IWeapon.js","sourceRoot":"","sources":["../../../src/models/Interfaces/IWeapon.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/models/Interfaces/MainArrayRow.js b/dist/models/Interfaces/MainArrayRow.js new file mode 100644 index 0000000..5ccde06 --- /dev/null +++ b/dist/models/Interfaces/MainArrayRow.js @@ -0,0 +1,2 @@ +"use strict"; +//# sourceMappingURL=MainArrayRow.js.map \ No newline at end of file diff --git a/dist/models/Interfaces/MainArrayRow.js.map b/dist/models/Interfaces/MainArrayRow.js.map new file mode 100644 index 0000000..347174c --- /dev/null +++ b/dist/models/Interfaces/MainArrayRow.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MainArrayRow.js","sourceRoot":"","sources":["../../../src/models/Interfaces/MainArrayRow.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/models/Interfaces/items/IGoods.js b/dist/models/Interfaces/items/IGoods.js new file mode 100644 index 0000000..8abd473 --- /dev/null +++ b/dist/models/Interfaces/items/IGoods.js @@ -0,0 +1,2 @@ +"use strict"; +//# sourceMappingURL=IGoods.js.map \ No newline at end of file diff --git a/dist/models/Interfaces/items/IGoods.js.map b/dist/models/Interfaces/items/IGoods.js.map new file mode 100644 index 0000000..57c81d8 --- /dev/null +++ b/dist/models/Interfaces/items/IGoods.js.map @@ -0,0 +1 @@ +{"version":3,"file":"IGoods.js","sourceRoot":"","sources":["../../../../src/models/Interfaces/items/IGoods.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/models/Interfaces/items/IItem.js b/dist/models/Interfaces/items/IItem.js new file mode 100644 index 0000000..b8e4dcb --- /dev/null +++ b/dist/models/Interfaces/items/IItem.js @@ -0,0 +1,2 @@ +"use strict"; +//# sourceMappingURL=IItem.js.map \ No newline at end of file diff --git a/dist/models/Interfaces/items/IItem.js.map b/dist/models/Interfaces/items/IItem.js.map new file mode 100644 index 0000000..eca1edd --- /dev/null +++ b/dist/models/Interfaces/items/IItem.js.map @@ -0,0 +1 @@ +{"version":3,"file":"IItem.js","sourceRoot":"","sources":["../../../../src/models/Interfaces/items/IItem.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/models/Interfaces/items/IWeapon.js b/dist/models/Interfaces/items/IWeapon.js new file mode 100644 index 0000000..75dd84f --- /dev/null +++ b/dist/models/Interfaces/items/IWeapon.js @@ -0,0 +1,2 @@ +"use strict"; +//# sourceMappingURL=IWeapon.js.map \ No newline at end of file diff --git a/dist/models/Interfaces/items/IWeapon.js.map b/dist/models/Interfaces/items/IWeapon.js.map new file mode 100644 index 0000000..0b508c2 --- /dev/null +++ b/dist/models/Interfaces/items/IWeapon.js.map @@ -0,0 +1 @@ +{"version":3,"file":"IWeapon.js","sourceRoot":"","sources":["../../../../src/models/Interfaces/items/IWeapon.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/models/MainArrayRow.js b/dist/models/MainArrayRow.js new file mode 100644 index 0000000..5ccde06 --- /dev/null +++ b/dist/models/MainArrayRow.js @@ -0,0 +1,2 @@ +"use strict"; +//# sourceMappingURL=MainArrayRow.js.map \ No newline at end of file diff --git a/dist/models/MainArrayRow.js.map b/dist/models/MainArrayRow.js.map new file mode 100644 index 0000000..11d3ead --- /dev/null +++ b/dist/models/MainArrayRow.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MainArrayRow.js","sourceRoot":"","sources":["../../src/models/MainArrayRow.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/dist/models/NPCCreationContext.js b/dist/models/NPCCreationContext.js index 4958217..b9340a4 100644 --- a/dist/models/NPCCreationContext.js +++ b/dist/models/NPCCreationContext.js @@ -1,6 +1,35 @@ +import { CR, MonsterReferenceSymbol } from "../data/MonsterCreation.js"; export default class NPCCreationContext { constructor() { - this.creatureTypeGraft = null; + this.CR = CR[0]; // defaults to lowest CR + this.monsterReferenceSymbol = MonsterReferenceSymbol.combatant; // defaults to combatant + this.tokenOptions = new TokenOptions(false); + // Skills - in addition to the array master/good skills + this.masterSkills = []; + this.goodSkills = []; + // Abilities - locked ability modifiers from grafts/special abilities + this.abilities = []; // `null` refers to no ability ie. mindless (not yet implemented in SFRPG) + // Senses + this.senses = []; + // Immunities + this.damageImmunities = []; + this.conditionImmunities = []; + // Special abilities + this.universalCreatureRules = []; + // Item generation + this.naturalWeapons = { enabled: false, racial: false }; + this.rangedWeapon = { enabled: false }; // NOTE: This will be fleshed out and expanded over time + this.itemsToAdd = []; + this.generateAdditionalItems = true; // Generates "junk" and character appropriate items + // Biography + this.generatePersonality = true; // Will try to generate a biography for the creature, generally only used for non-combat NPCs + // Debugging / auditing + this.log = []; // We record each mutation applied + } +} +export class TokenOptions { + constructor(dynamicImage) { + this.dynamicImage = dynamicImage; } } //# sourceMappingURL=NPCCreationContext.js.map \ No newline at end of file diff --git a/dist/models/NPCCreationContext.js.map b/dist/models/NPCCreationContext.js.map index 865d105..da4d9ca 100644 --- a/dist/models/NPCCreationContext.js.map +++ b/dist/models/NPCCreationContext.js.map @@ -1 +1 @@ -{"version":3,"file":"NPCCreationContext.js","sourceRoot":"","sources":["../../src/models/NPCCreationContext.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,OAAO,OAAO,kBAAkB;IAKnC;QACI,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;IAClC,CAAC;CACJ"} \ No newline at end of file +{"version":3,"file":"NPCCreationContext.js","sourceRoot":"","sources":["../../src/models/NPCCreationContext.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,EAAE,EAAU,sBAAsB,EAAE,MAAM,4BAA4B,CAAA;AAE/E,MAAM,CAAC,OAAO,OAAO,kBAAkB;IAkCnC;QA/BO,OAAE,GAAW,EAAE,CAAC,CAAC,CAAC,CAAA,CAAC,wBAAwB;QAG3C,2BAAsB,GACzB,sBAAsB,CAAC,SAAS,CAAA,CAAC,wBAAwB;QACtD,iBAAY,GAAiB,IAAI,YAAY,CAAC,KAAK,CAAC,CAAA;QAI3D,uDAAuD;QAChD,iBAAY,GAAa,EAAE,CAAA;QAC3B,eAAU,GAAa,EAAE,CAAA;QAChC,qEAAqE;QAC9D,cAAS,GAA8B,EAAE,CAAA,CAAC,0EAA0E;QAC3H,SAAS;QACF,WAAM,GAAa,EAAE,CAAA;QAC5B,aAAa;QACN,qBAAgB,GAAa,EAAE,CAAA;QAC/B,wBAAmB,GAAa,EAAE,CAAA;QACzC,oBAAoB;QACb,2BAAsB,GAAU,EAAE,CAAA;QACzC,kBAAkB;QACX,mBAAc,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,CAAA;QAClD,iBAAY,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,CAAA,CAAC,wDAAwD;QAC1F,eAAU,GAAU,EAAE,CAAA;QACtB,4BAAuB,GAAG,IAAI,CAAA,CAAC,mDAAmD;QACzF,YAAY;QACL,wBAAmB,GAAG,IAAI,CAAA,CAAC,6FAA6F;QAC/H,uBAAuB;QAChB,QAAG,GAAuB,EAAE,CAAA,CAAC,kCAAkC;IAEvD,CAAC;CACnB;AAED,MAAM,OAAO,YAAY;IAErB,YAAY,YAAqB;QAC7B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAA;IACpC,CAAC;CACJ"} \ No newline at end of file diff --git a/dist/models/Race.js b/dist/models/Race.js new file mode 100644 index 0000000..0d63d32 --- /dev/null +++ b/dist/models/Race.js @@ -0,0 +1,17 @@ +export default class Race { + constructor(name, size, creatureTypeGraft, creatureSubtypeGrafts = [], languages, customLanguages, arms) { + this.arms = 2; + this.name = name; + this.size = size; + this.creatureTypeGraft = creatureTypeGraft; + this.languages = languages; + // Supports arrays and non-arrays + if (Array.isArray(creatureSubtypeGrafts)) { + this.creatureSubtypeGrafts = creatureSubtypeGrafts; + } + else { + this.creatureSubtypeGrafts = [creatureSubtypeGrafts]; + } + } +} +//# sourceMappingURL=Race.js.map \ No newline at end of file diff --git a/dist/models/Race.js.map b/dist/models/Race.js.map new file mode 100644 index 0000000..4c9f048 --- /dev/null +++ b/dist/models/Race.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Race.js","sourceRoot":"","sources":["../../src/models/Race.ts"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,OAAO,IAAI;IAQrB,YACI,IAAY,EACZ,IAAU,EACV,iBAAoC,EACpC,wBAE6B,EAAE,EAC/B,SAAoB,EACpB,eAA0B,EAC1B,IAAa;QAdjB,SAAI,GAAW,CAAC,CAAA;QAgBZ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,iBAAiB,GAAG,iBAAiB,CAAA;QAC1C,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;QAE1B,iCAAiC;QACjC,IAAI,KAAK,CAAC,OAAO,CAAC,qBAAqB,CAAC,EAAE;YACtC,IAAI,CAAC,qBAAqB,GAAG,qBAAqB,CAAA;SACrD;aAAM;YACH,IAAI,CAAC,qBAAqB,GAAG,CAAC,qBAAqB,CAAC,CAAA;SACvD;IACL,CAAC;CACJ"} \ No newline at end of file diff --git a/dist/models/UniversalCreatureRule.js b/dist/models/UniversalCreatureRule.js new file mode 100644 index 0000000..2519940 --- /dev/null +++ b/dist/models/UniversalCreatureRule.js @@ -0,0 +1,21 @@ +import { Utils } from "../utils/Uils.js"; +export default class UniversalCreatureRule { + constructor(name, description) { + this.name = name; + this.description = description; + } + async apply(actor, context) { + // By default when applied will add the appropriate feature to npc + let feature = await Utils.fuzzyFindUniversalCreatureRule(this.name); + if (feature) + context.itemsToAdd.push(feature); + // Default is just a basic log indicating no modifications + return [ + "Applied " + + this.name + + " universal creature rule (no modifications).", + this.description + ]; + } +} +//# sourceMappingURL=UniversalCreatureRule.js.map \ No newline at end of file diff --git a/dist/models/UniversalCreatureRule.js.map b/dist/models/UniversalCreatureRule.js.map new file mode 100644 index 0000000..3ca6266 --- /dev/null +++ b/dist/models/UniversalCreatureRule.js.map @@ -0,0 +1 @@ +{"version":3,"file":"UniversalCreatureRule.js","sourceRoot":"","sources":["../../src/models/UniversalCreatureRule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAGxC,MAAM,CAAC,OAAO,OAAO,qBAAqB;IAItC,YAAY,IAAY,EAAE,WAAmB;QACzC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QAChB,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;IAClC,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,OAA2B;QAC1C,kEAAkE;QAClE,IAAI,OAAO,GAAG,MAAM,KAAK,CAAC,8BAA8B,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QACnE,IAAI,OAAO;YAAE,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;QAE7C,0DAA0D;QAC1D,OAAO;YACH,aAAa;gBACT,IAAI,CAAC,IAAI;gBACT,kDAAkD;YACtD,IAAI,CAAC,WAAW;SACnB,CAAA;IACL,CAAC;CACJ"} \ No newline at end of file diff --git a/dist/models/adjusters/AbilityScoreAdjuster.js b/dist/models/adjusters/AbilityScoreAdjuster.js new file mode 100644 index 0000000..d36757f --- /dev/null +++ b/dist/models/adjusters/AbilityScoreAdjuster.js @@ -0,0 +1,19 @@ +import Adjuster from "./Adjuster.js"; +export default class AbilityScoreAdjuster extends Adjuster { + // Set ability score value + constructor(abilityScoreAdjuster = {}) { + super(); + Object.assign(this, abilityScoreAdjuster); + } + async apply(actor, context) { + if (this.setAbilityScore) { + context.abilities.push([ + this.setAbilityScore[0], + this.setAbilityScore[1] + ]); + } + // TODO: Construct log from individual adjustors + return ["", ""]; + } +} +//# sourceMappingURL=AbilityScoreAdjuster.js.map \ No newline at end of file diff --git a/dist/models/adjusters/AbilityScoreAdjuster.js.map b/dist/models/adjusters/AbilityScoreAdjuster.js.map new file mode 100644 index 0000000..6e22eff --- /dev/null +++ b/dist/models/adjusters/AbilityScoreAdjuster.js.map @@ -0,0 +1 @@ +{"version":3,"file":"AbilityScoreAdjuster.js","sourceRoot":"","sources":["../../../src/models/adjusters/AbilityScoreAdjuster.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,eAAe,CAAA;AAKpC,MAAM,CAAC,OAAO,OAAO,oBAAqB,SAAQ,QAAQ;IAGtD,0BAA0B;IAC1B,YAAY,uBAAsD,EAAE;QAChE,KAAK,EAAE,CAAA;QACP,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAA;IAC7C,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,OAA2B;QAC1C,IAAI,IAAI,CAAC,eAAe,EAAE;YACtB,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC;gBACnB,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;gBACvB,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC;aAC1B,CAAC,CAAA;SACL;QACD,gDAAgD;QAChD,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;IACnB,CAAC;CACJ"} \ No newline at end of file diff --git a/dist/models/adjusters/Adjuster.js b/dist/models/adjusters/Adjuster.js new file mode 100644 index 0000000..4fe4dc8 --- /dev/null +++ b/dist/models/adjusters/Adjuster.js @@ -0,0 +1,7 @@ +export default class Adjuster { + async apply(actor, context) { + // stub + return ["", ""]; + } +} +//# sourceMappingURL=Adjuster.js.map \ No newline at end of file diff --git a/dist/models/adjusters/Adjuster.js.map b/dist/models/adjusters/Adjuster.js.map new file mode 100644 index 0000000..7844b54 --- /dev/null +++ b/dist/models/adjusters/Adjuster.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Adjuster.js","sourceRoot":"","sources":["../../../src/models/adjusters/Adjuster.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,OAAO,OAAgB,QAAQ;IAClC,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,OAA2B;QAC1C,OAAO;QACP,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;IACnB,CAAC;CACJ"} \ No newline at end of file diff --git a/dist/models/adjusters/ImmunityAdjuster.js b/dist/models/adjusters/ImmunityAdjuster.js new file mode 100644 index 0000000..901ef39 --- /dev/null +++ b/dist/models/adjusters/ImmunityAdjuster.js @@ -0,0 +1,21 @@ +import Adjuster from "./Adjuster.js"; +export default class ImmunityAdjuster extends Adjuster { + // Set number of good / master skills + constructor(immunityAdjuster = {}) { + super(); + Object.assign(this, immunityAdjuster); + } + async apply(actor, context) { + if (this.addConditionImmunity) { + if (Array.isArray(this.addConditionImmunity)) { + context.conditionImmunities.push(this.addConditionImmunity[0]); + } + else { + context.conditionImmunities.push(this.addConditionImmunity); + } + } + // TODO: Construct log from individual adjustors + return ["", ""]; + } +} +//# sourceMappingURL=ImmunityAdjuster.js.map \ No newline at end of file diff --git a/dist/models/adjusters/ImmunityAdjuster.js.map b/dist/models/adjusters/ImmunityAdjuster.js.map new file mode 100644 index 0000000..9604f8a --- /dev/null +++ b/dist/models/adjusters/ImmunityAdjuster.js.map @@ -0,0 +1 @@ +{"version":3,"file":"ImmunityAdjuster.js","sourceRoot":"","sources":["../../../src/models/adjusters/ImmunityAdjuster.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,eAAe,CAAA;AAIpC,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,QAAQ;IAGlD,qCAAqC;IACrC,YAAY,mBAA8C,EAAE;QACxD,KAAK,EAAE,CAAA;QACP,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,gBAAgB,CAAC,CAAA;IACzC,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,OAA2B;QAC1C,IAAI,IAAI,CAAC,oBAAoB,EAAE;YAC3B,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,oBAAoB,CAAC,EAAE;gBAC1C,OAAO,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAA;aACjE;iBAAM;gBACH,OAAO,CAAC,mBAAmB,CAAC,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAA;aAC9D;SACJ;QACD,gDAAgD;QAChD,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;IACnB,CAAC;CACJ"} \ No newline at end of file diff --git a/dist/models/adjusters/SaveAdjuster.js b/dist/models/adjusters/SaveAdjuster.js new file mode 100644 index 0000000..763f66b --- /dev/null +++ b/dist/models/adjusters/SaveAdjuster.js @@ -0,0 +1,18 @@ +import Adjuster from "./Adjuster.js"; +export default class SaveAdjuster extends Adjuster { + // Set number of good / master skills + constructor(saveAdjuster = {}) { + super(); + Object.assign(this, saveAdjuster); + } + async apply(actor, context) { + if (this.mutateSave) { + let array = context.mainArrayRow; + let currentSave = array[this.mutateSave[0]]; + array[this.mutateSave[0]] = currentSave + this.mutateSave[1]; + } + // TODO: Construct log from individual adjustors + return ["", ""]; + } +} +//# sourceMappingURL=SaveAdjuster.js.map \ No newline at end of file diff --git a/dist/models/adjusters/SaveAdjuster.js.map b/dist/models/adjusters/SaveAdjuster.js.map new file mode 100644 index 0000000..c5b33d1 --- /dev/null +++ b/dist/models/adjusters/SaveAdjuster.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SaveAdjuster.js","sourceRoot":"","sources":["../../../src/models/adjusters/SaveAdjuster.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,eAAe,CAAA;AAKpC,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,QAAQ;IAG9C,qCAAqC;IACrC,YAAY,eAAsC,EAAE;QAChD,KAAK,EAAE,CAAA;QACP,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,YAAY,CAAC,CAAA;IACrC,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,OAA2B;QAC1C,IAAI,IAAI,CAAC,UAAU,EAAE;YACjB,IAAI,KAAK,GAAG,OAAO,CAAC,YAAY,CAAA;YAChC,IAAI,WAAW,GAAG,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAA;YAC3C,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;SAC/D;QAED,gDAAgD;QAChD,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;IACnB,CAAC;CACJ"} \ No newline at end of file diff --git a/dist/models/adjusters/SenseAdjuster.js b/dist/models/adjusters/SenseAdjuster.js new file mode 100644 index 0000000..cb1c794 --- /dev/null +++ b/dist/models/adjusters/SenseAdjuster.js @@ -0,0 +1,21 @@ +import Adjuster from "./Adjuster.js"; +export default class SenseAdjuster extends Adjuster { + // Set number of good / master skills + constructor(senseAdjuster = {}) { + super(); + Object.assign(this, senseAdjuster); + } + async apply(actor, context) { + if (this.addSense) { + if (Array.isArray(this.addSense)) { + context.senses.push(this.addSense[0]); + } + else { + context.senses.push(this.addSense); + } + } + // TODO: Construct log from individual adjustors + return ["", ""]; + } +} +//# sourceMappingURL=SenseAdjuster.js.map \ No newline at end of file diff --git a/dist/models/adjusters/SenseAdjuster.js.map b/dist/models/adjusters/SenseAdjuster.js.map new file mode 100644 index 0000000..8b4c541 --- /dev/null +++ b/dist/models/adjusters/SenseAdjuster.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SenseAdjuster.js","sourceRoot":"","sources":["../../../src/models/adjusters/SenseAdjuster.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,eAAe,CAAA;AAIpC,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,QAAQ;IAG/C,qCAAqC;IACrC,YAAY,gBAAwC,EAAE;QAClD,KAAK,EAAE,CAAA;QACP,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,aAAa,CAAC,CAAA;IACtC,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,OAA2B;QAC1C,IAAI,IAAI,CAAC,QAAQ,EAAE;YACf,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE;gBAC9B,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAA;aACxC;iBAAM;gBACH,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;aACrC;SACJ;QAED,gDAAgD;QAChD,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;IACnB,CAAC;CACJ"} \ No newline at end of file diff --git a/dist/models/adjusters/SkillAdjuster.js b/dist/models/adjusters/SkillAdjuster.js new file mode 100644 index 0000000..85f2657 --- /dev/null +++ b/dist/models/adjusters/SkillAdjuster.js @@ -0,0 +1,57 @@ +import Adjuster from "./Adjuster.js"; +import { MonsterSkillType } from "../../data/MonsterCreation.js"; +export default class SkillAdjuster extends Adjuster { + // Set number of good / master skills + constructor(skillAdjuster = {}) { + super(); + Object.assign(this, skillAdjuster); + } + async apply(actor, context) { + // Set number of good / master skills + if (this.setMonsterSkillCount) { + if (this.setMonsterSkillCount[0] == MonsterSkillType.good) { + // set good skill count + context.mainArrayRow.goodSkill.count = this.setMonsterSkillCount[1]; + } + else { + // set master skill count + context.mainArrayRow.masterSkill.count = this.setMonsterSkillCount[1]; + } + } + // Set a specific skill as a good/master skill + if (this.setSkillAsMonsterSkill) { + let skill = this.setSkillAsMonsterSkill[0]; + if (this.setSkillAsMonsterSkill[1] == MonsterSkillType.master) { + if (Array.isArray(skill)) { + context.masterSkills.push(...skill); + } + else { + context.masterSkills.push(skill); + } + } + else { + if (Array.isArray(skill)) { + context.goodSkills.push(...skill); + } + else { + context.goodSkills.push(skill); + } + } + } + // Adjust the skill value applied to good/master skills + if (this.mutateMonsterSkill) { + if (this.mutateMonsterSkill[0] == MonsterSkillType.good) { + // adjust good skill count + context.mainArrayRow.goodSkill.count += this.mutateMonsterSkill[1]; + } + else { + // set master skill count + context.mainArrayRow.masterSkill.count += this.mutateMonsterSkill[1]; + } + } + // TODO: MutateSkillValue logic + // TODO: Construct log from individual adjustors + return ["", ""]; + } +} +//# sourceMappingURL=SkillAdjuster.js.map \ No newline at end of file diff --git a/dist/models/adjusters/SkillAdjuster.js.map b/dist/models/adjusters/SkillAdjuster.js.map new file mode 100644 index 0000000..3141e2e --- /dev/null +++ b/dist/models/adjusters/SkillAdjuster.js.map @@ -0,0 +1 @@ +{"version":3,"file":"SkillAdjuster.js","sourceRoot":"","sources":["../../../src/models/adjusters/SkillAdjuster.ts"],"names":[],"mappings":"AAEA,OAAO,QAAQ,MAAM,eAAe,CAAA;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAA;AAYhE,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,QAAQ;IAM/C,qCAAqC;IACrC,YAAY,gBAAwC,EAAE;QAClD,KAAK,EAAE,CAAA;QACP,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,aAAa,CAAC,CAAA;IACtC,CAAC;IAED,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,OAA2B;QAC1C,qCAAqC;QACrC,IAAI,IAAI,CAAC,oBAAoB,EAAE;YAC3B,IAAI,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,IAAI,gBAAgB,CAAC,IAAI,EAAE;gBACvD,uBAAuB;gBACvB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AC,CAAC,CAAC,CAAA;aACvE;SACJ;QAED,+BAA+B;QAE/B,gDAAgD;QAChD,OAAO,CAAC,EAAE,EAAE,EAAE,CAAC,CAAA;IACnB,CAAC;CACJ"} \ No newline at end of file diff --git a/dist/utils/Setup.js b/dist/utils/Setup.js index c9c3c8f..3b2ff30 100644 --- a/dist/utils/Setup.js +++ b/dist/utils/Setup.js @@ -6,7 +6,7 @@ Hooks.on("renderSidebarTab", async (app) => { } }); // Adds options -Hooks.once('init', async function () { +Hooks.once("init", async function () { // Default CR game.settings.register("foundryvtt-sfrpg-populator", "defaultCR", { name: "Default CR", @@ -19,13 +19,16 @@ Hooks.once('init', async function () { "1/3": "CR 1/3", "1/2": "CR 1/2", "1": "CR 1", - "2": "CR 2" + "2": "CR 2", + "3": "CR 3", + "4": "CR 4", + "5": "CR 5" } }); // Use dynamic token images (requires specific folder structure in foundry data) game.settings.register("foundryvtt-sfrpg-populator", "dynamicTokenImages", { name: "Dynamic token images (Experimental)", - hint: "When enabled the token will be assigned a random image from \\populator\\\\. See the README.md on Github for an example.", + hint: "When enabled the token will be assigned a random image from \\populator\\\\ or \\populator\\. See the README.md on Github for an example.", scope: "client", config: true, default: false, diff --git a/dist/utils/Setup.js.map b/dist/utils/Setup.js.map index 0c0d6d2..a9f6e9d 100644 --- a/dist/utils/Setup.js.map +++ b/dist/utils/Setup.js.map @@ -1 +1 @@ -{"version":3,"file":"Setup.js","sourceRoot":"","sources":["../../src/utils/Setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAK5C,2CAA2C;AAC3C,KAAK,CAAC,EAAE,CAAC,kBAAkB,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;IACvC,IAAI,GAAG,CAAC,OAAO,CAAC,EAAE,IAAI,QAAQ,EAAE;QAC5B,SAAS,CAAC,qBAAqB,EAAE,CAAC;KACrC;AACL,CAAC,CAAC,CAAC;AAEH,eAAe;AACf,KAAK,CAAC,IA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AC9D,IAAI,EAAE,YAAY;QAClB,IAAI,EAAE,8CAA8C;QACpD,KAAK,EAAE,QAAQ;QACf,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE;YACL,KAAK,EAAE,QAAQ;YACf,KAAK,EAAE,QAAQ;YACf,GAAG,EAAE,MAAM;YACX,GAAG,EAAE,MAAM;YACX,GAAG,EAAE,MAAM;YACX,GAAG,EAAE,MAAM;YACX,GAAG,EAAE,MAAM;SACd;KACJ,CAAC,CAAA;IACF,gFAAgF;IAChF,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,4BAA4B,EAAE,oBAAoB,EAAE;QACvE,IAAI,EAAE,qCAAqC;QAC3C,IAAI,EACA,kLAAkL;QACtL,KAAK,EAAE,QAAQ;QACf,MAAM,EAAE,IAAI;QACZ,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,MAAM;QACZ,OAAO,EAAE;YACL,KAAK,EAAE,IAAI;YACX,IAAI,EAAE,KAAK;SACd;KACJ,CAAC,CAAA;AACN,CAAC,CAAC,CAAA"} \ No newline at end of file diff --git a/dist/utils/StringFormat.js b/dist/utils/StringFormat.js index fde7b6c..8cb3223 100644 --- a/dist/utils/StringFormat.js +++ b/dist/utils/StringFormat.js @@ -6,11 +6,8 @@ export class StringFormat { static stringFormat(format) { var args = Array.prototype.slice.call(arguments, 1); return format.replace(/{(\d+)}/g, function (match, number) { - return typeof args[number] != 'undefined' - ? args[number] - : match; + return typeof args[number] != "undefined" ? args[number] : match; }); } - ; } //# sourceMappingURL=StringFormat.js.map \ No newline at end of file diff --git a/dist/utils/StringFormat.js.map b/dist/utils/StringFormat.js.map index f52771d..f7e5271 100644 --- a/dist/utils/StringFormat.js.map +++ b/dist/utils/StringFormat.js.map @@ -1 +1 @@ -{"version":3,"file":"StringFormat.js","sourceRoot":"","sources":["../../src/utils/StringFormat.js"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,iGAAiG;AACjG,6FAA6F;AAC7F,MAAM,OAAO,YAAY;IACrB,6FAA6F;IAC7F,MAAM,CAAC,YAAY,CAAC,MAAM;QACtB,IAAI,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC;QACpD,OAAO,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,UAAS,KAAK,EAAE,MAAM;YACpD,OAAO,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,WAAW;gBACrC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC;gBACd,CAAC,CAAC,KAAK,CACN;QACT,CAAC,CAAC,CAAC;IACP,CAAC;IAAA,CAAC;CACL"} \ No newline at end of file +{"version":3,"file":"StringFormat.js","sourceRoot":"","sources":["../../src/utils/StringFormat.js"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,iGAAiG;AACjG,6FAA6F;AAC7F,MAAM,OAAO,YAAY;IACrB,6FAA6F;IAC7F,MAAM,CAAC,YAAY,CAAC,MAAM;QACtB,IAAI,IAAI,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAA;QACnD,OAAO,MAAM,CAAC,OAAO,CAAC,UAAU,EAAE,UAAU,KAAK,EAAE,MAAM;YACrD,OAAO,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,KAAK,CAAA;QACpE,CAAC,CAAC,CAAA;IACN,CAAC;CACJ"} \ No newline at end of file diff --git a/dist/utils/Uils.js b/dist/utils/Uils.js index 29cdb5e..83c97a7 100644 --- a/dist/utils/Uils.js +++ b/dist/utils/Uils.js @@ -28,7 +28,7 @@ export class Utils { Utils.log("No search string specified."); return null; } - let compendium = game.packs.find(element => element.metadata.name.includes(compendiumName)); + let compendium = game.packs.find((element) => element.metadata.name.includes(compendiumName)); if (compendium == undefined) { Utils.log("Could not find compendium named " + compendiumName + "."); return null; @@ -36,13 +36,20 @@ export class Utils { // Let the compendium load await compendium.getIndex(); let rawString = this.parseSubtext(searchString)[0]; - let terms = rawString.toLowerCase().replace("(ex)", "").replace("(su)", "").replace("(sp)", "").trim().replace(/[*,;()\[\]'"]/g, "").split(' '); + let terms = rawString + .toLowerCase() + .replace("(ex)", "") + .replace("(su)", "") + .replace("(sp)", "") + .trim() + .replace(/[*,;()\[\]'"]/g, "") + .split(" "); let entryWeWant = null; for (let entry of compendium.index) { var rawEntryName = this.parseSubtext(entry.name)[0]; // TODO: Don't need to do this every iteration in the loop can set state `babeleActive` somewhere above // A translation module is active - if ((_a = game.modules.get('babele')) === null || _a === void 0 ? void 0 : _a.active) { + if ((_a = game.modules.get("babele")) === null || _a === void 0 ? void 0 : _a.active) { for (let key in compendium.translations) { let translation = compendium.translations[key]; if (translation.name == entry.name) { @@ -51,8 +58,13 @@ export class Utils { } } } - let entryName = rawEntryName.toLowerCase().replace("(ex)", "").replace("(su)", "").replace("(sp)", "").trim(); - let entryTerms = entryName.replace(/[*,;()\[\]'"]/g, "").split(' '); + let entryName = rawEntryName + .toLowerCase() + .replace("(ex)", "") + .replace("(su)", "") + .replace("(sp)", "") + .trim(); + let entryTerms = entryName.replace(/[*,;()\[\]'"]/g, "").split(" "); if (terms.length !== entryTerms.length) { continue; } @@ -109,6 +121,9 @@ export class Utils { raceName = raceName.replace(" /", "/"); return this.fuzzyFindCompendiumAsync("races", raceName); } + static async fuzzyFindUniversalCreatureRule(universalCreatureRuleName) { + return await this.fuzzyFindCompendiumAsync("universal-creature-rules", universalCreatureRuleName); + } static async fuzzyFindSpellAsync(spellName) { spellName = spellName.replace("/ ", "/"); spellName = spellName.replace(" /", "/"); @@ -119,11 +134,13 @@ export class Utils { } } Utils.parseSubtext = (value) => { - let startSubtextIndex = value.indexOf('('); - let endSubtextIndex = value.indexOf(')'); + let startSubtextIndex = value.indexOf("("); + let endSubtextIndex = value.indexOf(")"); if (startSubtextIndex > -1 && endSubtextIndex > startSubtextIndex) { let baseValue = value.substring(0, startSubtextIndex).trim(); - let subValue = value.substring(startSubtextIndex + 1, endSubtextIndex).trim(); + let subValue = value + .substring(startSubtextIndex + 1, endSubtextIndex) + .trim(); return [baseValue, subValue]; } else { diff --git a/dist/utils/Uils.js.map b/dist/utils/Uils.js.map index 66e76cc..0e8643f 100644 --- a/dist/utils/Uils.js.map +++ b/dist/utils/Uils.js.map @@ -1 +1 @@ -{"version":3,"file":"Uils.js","sourceRoot":"","sources":["../../src/utils/Uils.ts"],"names":[],"mappings":"AAAA,QAAQ;AACR,sHAAsH;AACtH,mGAAmG;AACnG,MAAM,OAAO,KAAK;IAEd,kEAAkE;IAClE,MAAM,CAAC,YAAY,CAAC,KAAK;QACrB,KAAK,IAAI,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,EAAE;YACvC,IAAI,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YAC5C,IAAI,IAAI,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACpB,KAAK,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACpB,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;SACnB;IACL,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,SAAS,EAAE,cAAc,GAAG,IAAI;QAC1D,IAAI,cAAc,EAAE;YAChB,OAAO,MAAM,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;SACrC;QACD,OAAO,MAAM,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,WAAW,EAAE,CAAC,CAAC;IAClE,CAAC;IAED,+HAA+H;IAC/H,MAAM,CAAC,KAAK,CAAC,wBAAwB,CAAC,cAAc,EAAE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,CAAC,wBAAwB,CACtC,0BAA0B,EAC1B,yBAAyB,CAC5B,CAAA;IACL,CAAC;IAED,MAAM,CAAC,KAAK,CAAC,mBAAmB,CAAC,SAAS;QACtC,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;QACxC,SAAS,GAAG,SAAS,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAA;QACxC,OAAO,IAAI,CAAC,wBAAwB,CAAC,QAAQ,EAAE,SAAS,CAAC,CAAA;IAC7D,CAAC;IAgBD,MAAM,CAAC,GAAG,CAAC,OAAO;QACd,OAAO,CAAC,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,CAAA;IACzC,CAAC;;AAhBM,kBAAY,GAAG,CAAC,KAAK,EAAE,EAAE;IAC5B,IAAI,iBAAiB,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;IAC1C,IAAI,eAAe,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,CAAA;IACxC,IAAI,iBAAiB,GAAG,CAAC,CAAC,IAAI,eAAe,GAAG,iBAAiB,EAAE;QAC/D,IAAI,SAAS,GAAG,KAAK,CAAC,SAAS,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC,IAAI,EAAE,CAAA;QAC5D,IAAI,QAAQ,GAAG,KAAK;aACf,SAAS,CAAC,iBAAiB,GAAG,CAAC,EAAE,eAAe,CAAC;aACjD,IAAI,EAAE,CAAA;QACX,OAAO,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAA;KAC/B;SAAM;QACH,OAAO,CAAC,KAAK,CAAC,CAAA;KACjB;AACL,CAAC,CAAA"} \ No newline at end of file diff --git a/example folder structure.zip b/example folder structure.zip index 826d8aa..8122c76 100644 Binary files a/example folder structure.zip and b/example folder structure.zip differ diff --git a/package-lock.json b/package-lock.json index ec34beb..bdc2e8c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5,7 +5,143 @@ "packages": { "": { "devDependencies": { - "foundry-pc-types": "gitlab:foundry-projects/foundry-pc/foundry-pc-types" + "eslint": "^7.24.0", + "foundry-pc-types": "gitlab:foundry-projects/foundry-pc/foundry-pc-types", + "prettier": "2.2.1", + "tippy.js": "^6.2.5", + "ts-node": "^9.1.1" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.10.4" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", + "dev": true + }, + "node_modules/@babel/highlight": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", + "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.12.11", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", + "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", + "dev": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/@eslint/eslintrc/node_modules/globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "dependencies": { + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@eslint/eslintrc/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" } }, "node_modules/@pixi/accessibility": { @@ -389,6 +525,16 @@ "url": "^0.11.0" } }, + "node_modules/@popperjs/core": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.9.2.tgz", + "integrity": "sha512-VZMYa7+fXHdwIq1TDhSXoVmSPEGM/aa+6Aiq3nVVJ9bXr24zScr+NlKFKC3iPljA7ho/GAZr+d2jOf5GIRC30Q==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/popperjs" + } + }, "node_modules/@types/howler": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/@types/howler/-/howler-2.2.2.tgz", @@ -425,212 +571,1625 @@ "@types/jquery": "*" } }, - "node_modules/earcut": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.2.tgz", - "integrity": "sha512-eZoZPPJcUHnfRZ0PjLvx2qBordSiO8ofC3vt+qACLM95u+4DovnbYNpQtJh0DNsWj8RnxrQytD4WA8gj5cRIaQ==", - "dev": true - }, - "node_modules/es6-promise-polyfill": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/es6-promise-polyfill/-/es6-promise-polyfill-1.2.0.tgz", - "integrity": "sha1-84kl8jyz4+jObNqP93T867sJDN4=", - "dev": true + "node_modules/acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } }, - "node_modules/eventemitter3": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", - "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==", - "dev": true + "node_modules/acorn-jsx": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "dev": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } }, - "node_modules/foundry-pc-types": { - "version": "0.1.0", - "resolved": "git+ssh://git@gitlab.com/foundry-projects/foundry-pc/foundry-pc-types.git#c343bddbb845e89d5f9d39ac4219d339f2edd05b", + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, - "license": "MIT", "dependencies": { - "@types/howler": "^2.2.1", - "@types/jquery": "^3.5.1", - "@types/socket.io-client": "^1.4.33", - "@types/tinymce": "^4.5.24", - "handlebars": "^4.7.6", - "pixi.js": "^5.3.4" + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" } }, - "node_modules/handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "node_modules/ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "dependencies": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "wordwrap": "^1.0.0" - }, - "bin": { - "handlebars": "bin/handlebars" + "color-convert": "^2.0.1" }, "engines": { - "node": ">=0.4.7" + "node": ">=8" }, - "optionalDependencies": { - "uglify-js": "^3.1.4" + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" } }, - "node_modules/ismobilejs": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ismobilejs/-/ismobilejs-1.1.1.tgz", - "integrity": "sha512-VaFW53yt8QO61k2WJui0dHf4SlL8lxBofUuUmwBo0ljPk0Drz2TiuDW4jo3wDcv41qy/SxrJ+VAzJ/qYqsmzRw==", + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", "dev": true }, - "node_modules/mini-signals": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mini-signals/-/mini-signals-1.2.0.tgz", - "integrity": "sha1-RbCAE8X65RokqhqTXNMXye1yHXQ=", - "dev": true + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } }, - "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "node_modules/astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "node_modules/call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "dev": true, - "engines": { - "node": ">=0.10.0" + "dependencies": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/parse-uri": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/parse-uri/-/parse-uri-1.0.3.tgz", - "integrity": "sha512-upMnGxNcm+45So85HoguwZTVZI9u11i36DdxJfGF2HYWS2eh3TIx7+/tTi7qrEq15qzGkVhsKjesau+kCk48pA==", + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", "dev": true, "engines": { - "node": ">= 0.10" + "node": ">=6" } }, - "node_modules/pixi.js": { - "version": "5.3.9", - "resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-5.3.9.tgz", - "integrity": "sha512-MLczwbhFmFBXImy9TlUbjnQb8nQK3Zez/UHs2z3cBqXDLx9wSZ0kwJbeY4XAWuJNy3WeZtqKeDoteonNaDxMUQ==", + "node_modules/chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", "dev": true, "dependencies": { - "@pixi/accessibility": "5.3.9", - "@pixi/app": "5.3.9", - "@pixi/constants": "5.3.9", - "@pixi/core": "5.3.9", - "@pixi/display": "5.3.9", - "@pixi/extract": "5.3.9", - "@pixi/filter-alpha": "5.3.9", - "@pixi/filter-blur": "5.3.9", - "@pixi/filter-color-matrix": "5.3.9", - "@pixi/filter-displacement": "5.3.9", - "@pixi/filter-fxaa": "5.3.9", - "@pixi/filter-noise": "5.3.9", - "@pixi/graphics": "5.3.9", - "@pixi/interaction": "5.3.9", - "@pixi/loaders": "5.3.9", - "@pixi/math": "5.3.9", - "@pixi/mesh": "5.3.9", - "@pixi/mesh-extras": "5.3.9", - "@pixi/mixin-cache-as-bitmap": "5.3.9", - "@pixi/mixin-get-child-by-name": "5.3.9", - "@pixi/mixin-get-global-position": "5.3.9", - "@pixi/particles": "5.3.9", - "@pixi/polyfill": "5.3.9", - "@pixi/prepare": "5.3.9", - "@pixi/runner": "5.3.9", - "@pixi/settings": "5.3.9", - "@pixi/sprite": "5.3.9", - "@pixi/sprite-animated": "5.3.9", - "@pixi/sprite-tiling": "5.3.9", - "@pixi/spritesheet": "5.3.9", - "@pixi/text": "5.3.9", - "@pixi/text-bitmap": "5.3.9", - "@pixi/ticker": "5.3.9", - "@pixi/utils": "5.3.9" + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" }, "funding": { - "type": "opencollective", - "url": "https://opencollective.com/pixijs" + "url": "https://github.com/chalk/chalk?sponsor=1" } }, - "node_modules/punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "dev": true }, - "node_modules/querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, "engines": { - "node": ">=0.4.x" + "node": ">= 8" } }, - "node_modules/resource-loader": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/resource-loader/-/resource-loader-3.0.1.tgz", - "integrity": "sha512-fBuCRbEHdLCI1eglzQhUv9Rrdcmqkydr1r6uHE2cYHvRBrcLXeSmbE/qI/urFt8rPr/IGxir3BUwM5kUK8XoyA==", + "node_modules/debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "dependencies": { - "mini-signals": "^1.2.0", - "parse-uri": "^1.0.0" + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "node_modules/deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", "dev": true, "engines": { - "node": ">=0.10.0" + "node": ">=0.3.1" } }, - "node_modules/uglify-js": { - "version": "3.13.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.4.tgz", - "integrity": "sha512-kv7fCkIXyQIilD5/yQy8O+uagsYIOt5cZvs890W40/e/rvjMSzJw81o9Bg0tkURxzZBROtDQhW2LFjOGoK3RZw==", + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", "dev": true, - "optional": true, - "bin": { - "uglifyjs": "bin/uglifyjs" + "dependencies": { + "esutils": "^2.0.2" }, "engines": { - "node": ">=0.8.0" + "node": ">=6.0.0" } }, - "node_modules/url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "node_modules/earcut": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.2.tgz", + "integrity": "sha512-eZoZPPJcUHnfRZ0PjLvx2qBordSiO8ofC3vt+qACLM95u+4DovnbYNpQtJh0DNsWj8RnxrQytD4WA8gj5cRIaQ==", + "dev": true + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "dependencies": { + "ansi-colors": "^4.1.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/es6-promise-polyfill": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/es6-promise-polyfill/-/es6-promise-polyfill-1.2.0.tgz", + "integrity": "sha1-84kl8jyz4+jObNqP93T867sJDN4=", + "dev": true + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/eslint": { + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.24.0.tgz", + "integrity": "sha512-k9gaHeHiFmGCDQ2rEfvULlSLruz6tgfA8DEn+rY9/oYPFFTlz55mM/Q/Rij1b2Y42jwZiK3lXvNTw6w6TXzcKQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash": "^4.17.21", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.4", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "dependencies": { + "eslint-visitor-keys": "^1.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/eslint-utils/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "dev": true, + "dependencies": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/espree/node_modules/eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", + "dev": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esquery/node_modules/estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esrecurse/node_modules/estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eventemitter3": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", + "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==", + "dev": true + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "dependencies": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", + "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", + "dev": true + }, + "node_modules/foundry-pc-types": { + "version": "0.1.0", + "resolved": "git+ssh://git@gitlab.com/foundry-projects/foundry-pc/foundry-pc-types.git#c343bddbb845e89d5f9d39ac4219d339f2edd05b", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/howler": "^2.2.1", + "@types/jquery": "^3.5.1", + "@types/socket.io-client": "^1.4.33", + "@types/tinymce": "^4.5.24", + "handlebars": "^4.7.6", + "pixi.js": "^5.3.4" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "node_modules/get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/globals": { + "version": "13.8.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.8.0.tgz", + "integrity": "sha512-rHtdA6+PDBIjeEvA91rpqzEvk/k3/i7EeNQiryiWuJH0Hw9cpyJMAt2jtbAwUaRdhD+573X4vWw6IcjKPasi9Q==", + "dev": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/handlebars": { + "version": "4.7.7", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", + "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", + "dev": true, + "dependencies": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-boolean-object": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", + "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", + "dev": true, + "dependencies": { + "call-bind": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number-object": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", + "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "node_modules/ismobilejs": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ismobilejs/-/ismobilejs-1.1.1.tgz", + "integrity": "sha512-VaFW53yt8QO61k2WJui0dHf4SlL8lxBofUuUmwBo0ljPk0Drz2TiuDW4jo3wDcv41qy/SxrJ+VAzJ/qYqsmzRw==", + "dev": true + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "node_modules/lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "dev": true + }, + "node_modules/lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", + "dev": true + }, + "node_modules/lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", + "dev": true + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "node_modules/mini-signals": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/mini-signals/-/mini-signals-1.2.0.tgz", + "integrity": "sha1-RbCAE8X65RokqhqTXNMXye1yHXQ=", + "dev": true + }, + "node_modules/minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "dependencies": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/parse-uri": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/parse-uri/-/parse-uri-1.0.3.tgz", + "integrity": "sha512-upMnGxNcm+45So85HoguwZTVZI9u11i36DdxJfGF2HYWS2eh3TIx7+/tTi7qrEq15qzGkVhsKjesau+kCk48pA==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/pixi.js": { + "version": "5.3.9", + "resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-5.3.9.tgz", + "integrity": "sha512-MLczwbhFmFBXImy9TlUbjnQb8nQK3Zez/UHs2z3cBqXDLx9wSZ0kwJbeY4XAWuJNy3WeZtqKeDoteonNaDxMUQ==", + "dev": true, + "dependencies": { + "@pixi/accessibility": "5.3.9", + "@pixi/app": "5.3.9", + "@pixi/constants": "5.3.9", + "@pixi/core": "5.3.9", + "@pixi/display": "5.3.9", + "@pixi/extract": "5.3.9", + "@pixi/filter-alpha": "5.3.9", + "@pixi/filter-blur": "5.3.9", + "@pixi/filter-color-matrix": "5.3.9", + "@pixi/filter-displacement": "5.3.9", + "@pixi/filter-fxaa": "5.3.9", + "@pixi/filter-noise": "5.3.9", + "@pixi/graphics": "5.3.9", + "@pixi/interaction": "5.3.9", + "@pixi/loaders": "5.3.9", + "@pixi/math": "5.3.9", + "@pixi/mesh": "5.3.9", + "@pixi/mesh-extras": "5.3.9", + "@pixi/mixin-cache-as-bitmap": "5.3.9", + "@pixi/mixin-get-child-by-name": "5.3.9", + "@pixi/mixin-get-global-position": "5.3.9", + "@pixi/particles": "5.3.9", + "@pixi/polyfill": "5.3.9", + "@pixi/prepare": "5.3.9", + "@pixi/runner": "5.3.9", + "@pixi/settings": "5.3.9", + "@pixi/sprite": "5.3.9", + "@pixi/sprite-animated": "5.3.9", + "@pixi/sprite-tiling": "5.3.9", + "@pixi/spritesheet": "5.3.9", + "@pixi/text": "5.3.9", + "@pixi/text-bitmap": "5.3.9", + "@pixi/ticker": "5.3.9", + "@pixi/utils": "5.3.9" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/pixijs" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", + "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + }, + "node_modules/querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true, + "engines": { + "node": ">=0.4.x" + } + }, + "node_modules/regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/mysticatea" + } + }, + "node_modules/require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/resource-loader": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/resource-loader/-/resource-loader-3.0.1.tgz", + "integrity": "sha512-fBuCRbEHdLCI1eglzQhUv9Rrdcmqkydr1r6uHE2cYHvRBrcLXeSmbE/qI/urFt8rPr/IGxir3BUwM5kUK8XoyA==", + "dev": true, + "dependencies": { + "mini-signals": "^1.2.0", + "parse-uri": "^1.0.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/slice-ansi?sponsor=1" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "node_modules/string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/table": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/table/-/table-6.3.1.tgz", + "integrity": "sha512-kNpMVSN4fj9KY4G6tNDVIT59uaG8ZELGQ+cmFSqivmWkCXJLd00VfRmtyHa8X7AeM75PQ/6/TtEtWjTDs1jXJw==", + "dev": true, + "dependencies": { + "ajv": "^8.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "lodash.clonedeep": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0" + }, + "engines": { + "node": ">=10.0.0" + } + }, + "node_modules/table/node_modules/ajv": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.1.0.tgz", + "integrity": "sha512-B/Sk2Ix7A36fs/ZkuGLIR86EdjbgR6fsAcbx9lOP/QBSXujDNbVmIS/U4Itz5k8fPFDeVZl/zQ/gJW4Jrq6XjQ==", + "dev": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/table/node_modules/json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "node_modules/tippy.js": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/tippy.js/-/tippy.js-6.3.1.tgz", + "integrity": "sha512-JnFncCq+rF1dTURupoJ4yPie5Cof978inW6/4S6kmWV7LL9YOSEVMifED3KdrVPEG+Z/TFH2CDNJcQEfaeuQww==", + "dev": true, + "dependencies": { + "@popperjs/core": "^2.8.3" + } + }, + "node_modules/ts-node": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz", + "integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==", + "dev": true, + "dependencies": { + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.17", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "typescript": ">=2.7" + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typescript": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz", + "integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==", + "dev": true, + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/uglify-js": { + "version": "3.13.4", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.4.tgz", + "integrity": "sha512-kv7fCkIXyQIilD5/yQy8O+uagsYIOt5cZvs890W40/e/rvjMSzJw81o9Bg0tkURxzZBROtDQhW2LFjOGoK3RZw==", + "dev": true, + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/uri-js/node_modules/punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", "dev": true, "dependencies": { "punycode": "1.3.2", "querystring": "0.2.0" } }, + "node_modules/v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", "dev": true + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "engines": { + "node": ">=6" + } } }, "dependencies": { + "@babel/code-frame": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", + "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.12.11", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", + "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==", + "dev": true + }, + "@babel/highlight": { + "version": "7.13.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", + "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.12.11", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@eslint/eslintrc": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.4.0.tgz", + "integrity": "sha512-2ZPCc+uNbjV5ERJr+aKSPRwZgKd2z11x0EgLvb1PURmUrn9QNRXFqje0Ldq454PfAVyaJYyrDvvIKSFP4NnBog==", + "dev": true, + "requires": { + "ajv": "^6.12.4", + "debug": "^4.1.1", + "espree": "^7.3.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.2.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "strip-json-comments": "^3.1.1" + }, + "dependencies": { + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + } + } + }, "@pixi/accessibility": { "version": "5.3.9", "resolved": "https://registry.npmjs.org/@pixi/accessibility/-/accessibility-5.3.9.tgz", @@ -1008,6 +2567,12 @@ "url": "^0.11.0" } }, + "@popperjs/core": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.9.2.tgz", + "integrity": "sha512-VZMYa7+fXHdwIq1TDhSXoVmSPEGM/aa+6Aiq3nVVJ9bXr24zScr+NlKFKC3iPljA7ho/GAZr+d2jOf5GIRC30Q==", + "dev": true + }, "@types/howler": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/@types/howler/-/howler-2.2.2.tgz", @@ -1029,31 +2594,384 @@ "integrity": "sha512-7EJYyKTL7tFR8+gDbB6Wwz/arpGa0Mywk1TJbNzKzHtzbwVmY4HR9WqS5VV7dsBUKQmPNr192jHr/VpBluj/hg==", "dev": true }, - "@types/socket.io-client": { - "version": "1.4.36", - "resolved": "https://registry.npmjs.org/@types/socket.io-client/-/socket.io-client-1.4.36.tgz", - "integrity": "sha512-ZJWjtFBeBy1kRSYpVbeGYTElf6BqPQUkXDlHHD4k/42byCN5Rh027f4yARHCink9sKAkbtGZXEAmR0ZCnc2/Ag==", + "@types/socket.io-client": { + "version": "1.4.36", + "resolved": "https://registry.npmjs.org/@types/socket.io-client/-/socket.io-client-1.4.36.tgz", + "integrity": "sha512-ZJWjtFBeBy1kRSYpVbeGYTElf6BqPQUkXDlHHD4k/42byCN5Rh027f4yARHCink9sKAkbtGZXEAmR0ZCnc2/Ag==", + "dev": true + }, + "@types/tinymce": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/@types/tinymce/-/tinymce-4.6.0.tgz", + "integrity": "sha512-zpW6p/O1CXW9OrDnc+3tlFSGr1+TpTYgudc2vYXgk1KeWwwbK+t3p8cecb1fj0NJN987oMxSoQP13iabBd2fsA==", + "dev": true, + "requires": { + "@types/jquery": "*" + } + }, + "acorn": { + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", + "dev": true + }, + "acorn-jsx": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", + "dev": true, + "requires": {} + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true + }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "astral-regex": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", + "dev": true + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "earcut": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.2.tgz", + "integrity": "sha512-eZoZPPJcUHnfRZ0PjLvx2qBordSiO8ofC3vt+qACLM95u+4DovnbYNpQtJh0DNsWj8RnxrQytD4WA8gj5cRIaQ==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "enquirer": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.3.6.tgz", + "integrity": "sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg==", + "dev": true, + "requires": { + "ansi-colors": "^4.1.1" + } + }, + "es6-promise-polyfill": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/es6-promise-polyfill/-/es6-promise-polyfill-1.2.0.tgz", + "integrity": "sha1-84kl8jyz4+jObNqP93T867sJDN4=", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "eslint": { + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.24.0.tgz", + "integrity": "sha512-k9gaHeHiFmGCDQ2rEfvULlSLruz6tgfA8DEn+rY9/oYPFFTlz55mM/Q/Rij1b2Y42jwZiK3lXvNTw6w6TXzcKQ==", + "dev": true, + "requires": { + "@babel/code-frame": "7.12.11", + "@eslint/eslintrc": "^0.4.0", + "ajv": "^6.10.0", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "enquirer": "^2.3.5", + "eslint-scope": "^5.1.1", + "eslint-utils": "^2.1.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", + "esquery": "^1.4.0", + "esutils": "^2.0.2", + "file-entry-cache": "^6.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^13.6.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash": "^4.17.21", + "minimatch": "^3.0.4", + "natural-compare": "^1.4.0", + "optionator": "^0.9.1", + "progress": "^2.0.0", + "regexpp": "^3.1.0", + "semver": "^7.2.1", + "strip-ansi": "^6.0.0", + "strip-json-comments": "^3.1.0", + "table": "^6.0.4", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + } + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } + } + }, + "eslint-visitor-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "dev": true + }, + "espree": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", + "dev": true, + "requires": { + "acorn": "^7.4.0", + "acorn-jsx": "^5.3.1", + "eslint-visitor-keys": "^1.3.0" + }, + "dependencies": { + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + } + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", "dev": true }, - "@types/tinymce": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/@types/tinymce/-/tinymce-4.6.0.tgz", - "integrity": "sha512-zpW6p/O1CXW9OrDnc+3tlFSGr1+TpTYgudc2vYXgk1KeWwwbK+t3p8cecb1fj0NJN987oMxSoQP13iabBd2fsA==", + "esquery": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.4.0.tgz", + "integrity": "sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==", "dev": true, "requires": { - "@types/jquery": "*" + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } } }, - "earcut": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/earcut/-/earcut-2.2.2.tgz", - "integrity": "sha512-eZoZPPJcUHnfRZ0PjLvx2qBordSiO8ofC3vt+qACLM95u+4DovnbYNpQtJh0DNsWj8RnxrQytD4WA8gj5cRIaQ==", + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true }, - "es6-promise-polyfill": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/es6-promise-polyfill/-/es6-promise-polyfill-1.2.0.tgz", - "integrity": "sha1-84kl8jyz4+jObNqP93T867sJDN4=", + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true }, "eventemitter3": { @@ -1062,6 +2980,49 @@ "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==", "dev": true }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "requires": { + "flat-cache": "^3.0.4" + } + }, + "flat-cache": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", + "dev": true, + "requires": { + "flatted": "^3.1.0", + "rimraf": "^3.0.2" + } + }, + "flatted": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.1.tgz", + "integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==", + "dev": true + }, "foundry-pc-types": { "version": "git+ssh://git@gitlab.com/foundry-projects/foundry-pc/foundry-pc-types.git#c343bddbb845e89d5f9d39ac4219d339f2edd05b", "dev": true, @@ -1075,6 +3036,67 @@ "pixi.js": "^5.3.4" } }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "get-intrinsic": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", + "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + } + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "globals": { + "version": "13.8.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.8.0.tgz", + "integrity": "sha512-rHtdA6+PDBIjeEvA91rpqzEvk/k3/i7EeNQiryiWuJH0Hw9cpyJMAt2jtbAwUaRdhD+573X4vWw6IcjKPasi9Q==", + "dev": true, + "requires": { + "type-fest": "^0.20.2" + } + }, "handlebars": { "version": "4.7.7", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", @@ -1088,24 +3110,229 @@ "wordwrap": "^1.0.0" } }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "has-symbols": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", + "dev": true + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "is-boolean-object": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.0.tgz", + "integrity": "sha512-a7Uprx8UtD+HWdyYwnD1+ExtTgqQtD2k/1yJgtXP6wnMm8byhkoTZRl+95LLThpzNZJ5aEvi46cdH+ayMFRwmA==", + "dev": true, + "requires": { + "call-bind": "^1.0.0" + } + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-number-object": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.4.tgz", + "integrity": "sha512-zohwelOAur+5uXtk8O3GPQ1eAcu4ZX3UwxQhUlfFFMNpUd83gXgjbhJh6HmB6LUNV/ieOLQuDwJO3dWJosUeMw==", + "dev": true + }, + "is-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, "ismobilejs": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ismobilejs/-/ismobilejs-1.1.1.tgz", "integrity": "sha512-VaFW53yt8QO61k2WJui0dHf4SlL8lxBofUuUmwBo0ljPk0Drz2TiuDW4jo3wDcv41qy/SxrJ+VAzJ/qYqsmzRw==", "dev": true }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, + "lodash.clonedeep": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", + "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=", + "dev": true + }, + "lodash.flatten": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flatten/-/lodash.flatten-4.4.0.tgz", + "integrity": "sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8=", + "dev": true + }, + "lodash.truncate": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/lodash.truncate/-/lodash.truncate-4.4.2.tgz", + "integrity": "sha1-WjUNoLERO4N+z//VgSy+WNbq4ZM=", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, "mini-signals": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mini-signals/-/mini-signals-1.2.0.tgz", "integrity": "sha1-RbCAE8X65RokqhqTXNMXye1yHXQ=", "dev": true }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, "minimist": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, "neo-async": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", @@ -1118,12 +3345,56 @@ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", "dev": true }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "optionator": { + "version": "0.9.1", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", + "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "dev": true, + "requires": { + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0", + "word-wrap": "^1.2.3" + } + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, "parse-uri": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/parse-uri/-/parse-uri-1.0.3.tgz", "integrity": "sha512-upMnGxNcm+45So85HoguwZTVZI9u11i36DdxJfGF2HYWS2eh3TIx7+/tTi7qrEq15qzGkVhsKjesau+kCk48pA==", "dev": true }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, "pixi.js": { "version": "5.3.9", "resolved": "https://registry.npmjs.org/pixi.js/-/pixi.js-5.3.9.tgz", @@ -1166,6 +3437,24 @@ "@pixi/utils": "5.3.9" } }, + "prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true + }, + "prettier": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", + "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", + "dev": true + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, "punycode": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", @@ -1178,6 +3467,24 @@ "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", "dev": true }, + "regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "dev": true + }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, "resource-loader": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/resource-loader/-/resource-loader-3.0.1.tgz", @@ -1188,12 +3495,195 @@ "parse-uri": "^1.0.0" } }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "slice-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + } + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true }, + "source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "string-width": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", + "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "table": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/table/-/table-6.3.1.tgz", + "integrity": "sha512-kNpMVSN4fj9KY4G6tNDVIT59uaG8ZELGQ+cmFSqivmWkCXJLd00VfRmtyHa8X7AeM75PQ/6/TtEtWjTDs1jXJw==", + "dev": true, + "requires": { + "ajv": "^8.0.1", + "is-boolean-object": "^1.1.0", + "is-number-object": "^1.0.4", + "is-string": "^1.0.5", + "lodash.clonedeep": "^4.5.0", + "lodash.flatten": "^4.4.0", + "lodash.truncate": "^4.4.2", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0" + }, + "dependencies": { + "ajv": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.1.0.tgz", + "integrity": "sha512-B/Sk2Ix7A36fs/ZkuGLIR86EdjbgR6fsAcbx9lOP/QBSXujDNbVmIS/U4Itz5k8fPFDeVZl/zQ/gJW4Jrq6XjQ==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", + "uri-js": "^4.2.2" + } + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "tippy.js": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/tippy.js/-/tippy.js-6.3.1.tgz", + "integrity": "sha512-JnFncCq+rF1dTURupoJ4yPie5Cof978inW6/4S6kmWV7LL9YOSEVMifED3KdrVPEG+Z/TFH2CDNJcQEfaeuQww==", + "dev": true, + "requires": { + "@popperjs/core": "^2.8.3" + } + }, + "ts-node": { + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz", + "integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==", + "dev": true, + "requires": { + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "source-map-support": "^0.5.17", + "yn": "3.1.1" + } + }, + "type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "requires": { + "prelude-ls": "^1.2.1" + } + }, + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true + }, + "typescript": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz", + "integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==", + "dev": true, + "peer": true + }, "uglify-js": { "version": "3.13.4", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.13.4.tgz", @@ -1201,6 +3691,23 @@ "dev": true, "optional": true }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + } + } + }, "url": { "version": "0.11.0", "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", @@ -1211,11 +3718,50 @@ "querystring": "0.2.0" } }, + "v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, "wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", "dev": true + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true } } } diff --git a/package.json b/package.json index 003f578..3f08924 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,11 @@ { - "devDependencies": { - "foundry-pc-types": "gitlab:foundry-projects/foundry-pc/foundry-pc-types" - } + "name": "foundryvtt-sfrpg-populator", + "description": "Foundry VTT module for Starfinder which helps create aliens of all shapes and sizes.", + "devDependencies": { + "eslint": "^7.24.0", + "foundry-pc-types": "gitlab:foundry-projects/foundry-pc/foundry-pc-types", + "prettier": "2.2.1", + "tippy.js": "^6.2.5", + "ts-node": "^9.1.1" + } } diff --git a/src/ItemFactory.ts b/src/ItemFactory.ts deleted file mode 100644 index 8d9e041..0000000 --- a/src/ItemFactory.ts +++ /dev/null @@ -1,85 +0,0 @@ -import { Randomizer } from "./Randomizer.js"; -import { Items } from "./data/Items.js"; - -export class ItemFactory { - - // Default is 3 - static makeItemCollection(size = 3) { - - var itemCollection = []; - // Every NPC has 2 random items (for now, may change) - for(var i = 0; i < size; i++) { - - let items = [ - {item: Items.credStickTemplate, percentage: 0.05}, - {item: Items.upbTemplate, percentage: 0.05}, - {item: Items.lighterTemplate, percentage: 0.05}, - {item: Items.purfumeTemplate, percentage: 0.05}, - {item: Items.intoxicantMinorTemplate, percentage: 0.05}, - {item: ItemFactory.makeJunk(), percentage: 0.75} - ] - - itemCollection.push(Randomizer.pickWinningItem(items).item ); - } - return itemCollection; - } - - static makeJunk() { - - var junkItem = Items.junk[Math.floor(Math.random() * Items.junk.length)]; - - return { - "name": junkItem.name, - "type": "goods", - "data": { - "description": { - "chat": "", - "gmnotes": "", - "short": "", - "value": "

" + junkItem.description + "

", - "unidentified": "" - }, - "source": "Populator", - "type": "", - "quantity": 1, - "bulk": "L", - "price": 0, - "level": 1, - "attuned": false, - "equipped": false, - "equippable": false, - "identified": true, - "attributes": { - "sturdy": false, - "customBuilt": false, - "size": "medium", - "dex": { - "mod": "" - }, - "hp": { - "value": 6, - "max": "" - }, - "hardness": { - "value": "" - }, - "ac": { - "value": "" - } - }, - "modifiers": [], - "damage": { - "parts": [] - }, - "critical": { - "parts": [] - }, - "abilityMods": { - "parts": [] - } - }, - "flags": {}, - "effects": [] - } - } -} \ No newline at end of file diff --git a/src/NPCFactory.ts b/src/NPCFactory.ts deleted file mode 100644 index 69754f1..0000000 --- a/src/NPCFactory.ts +++ /dev/null @@ -1,458 +0,0 @@ -import { Utils } from "./utils/Uils.js"; -import { Grafts } from "./data/Grafts.js"; -import { ItemFactory } from "./ItemFactory.js" -import { MonsterCreation } from "./data/MonsterCreation.js"; -import { BundledRaces, Races } from "./data/Races.js"; -import { Randomizer } from "./Randomizer.js"; -import { WeaponFactory } from "./WeaponFactory.js"; -import CreatureTypeGraft from "./models/CreatureTypeGraft.js"; - -export class NPCFactory { - - // Produces a non-hostile NPC from a subset of races - static async makeNonHostile(options = {CR: "1/3", dynamicTokenImages: false, race: null, gender: null}) { - - let actorData = {name: "Generated Actor", type: "npc"}; - let actor = await Actor.create(actorData); - - let actorDescription = {}; - actorDescription["data.details.biography.value"] = "

Created by Populator.

"; - await actor.update(actorDescription); - - let context = { - options: options, - itemsToAdd: [], - arrays: {main: null, attack: null}, - // Skills - masterSkill: [], // In addition to the array master skills - goodSkill: [], // In addition to the array good skills - // Attacks - hasNaturalWeapons: false - }; - - // Look up array - context.arrays.main = MonsterCreation.arrays.expert.main[options.CR]; - context.arrays.attack = MonsterCreation.arrays.expert.attack[options.CR]; - - // Fill in details - await this.setNameGenderAndRace(actor, context); - await this.setDetails(actor, context); - await this.setAttributes(actor, context); - await this.setGrafts(actor, context); - await this.setSkills(actor, context); - await this.setWeapons(actor, context); - await this.setInventory(actor, context); - await this.setToken(actor, context); - - // Add all items - let actorUpdate = {}; - actorUpdate["items"] = context.itemsToAdd; - await actor.update(actorUpdate); - } - - static async setNameGenderAndRace(actor, context) { - - if (!context.options.race) { - context.options.race = Randomizer.randomRace(); - } - - if(!context.options.gender) { - context.options.gender = Randomizer.randomGender(); - } - - let actorUpdate = {}; - var raceData; - // We stub in gnolls until they are included in sfrpg - if (context.options.race.name == "gnoll") { - - raceData = BundledRaces.gnoll; - } - else { - raceData = await Utils.fuzzyFindRaceAsync(context.options.race.name); - } - - - // Race item - await this.clean(raceData); - context.itemsToAdd.push(raceData); - - // Gender - actorUpdate["data.details.raceAndGrafts"] = context.options.gender + " " + context.options.race.name + ", grafts:"; // Grafts will be filled in as applied - - // Name - actorUpdate["name"] = Randomizer.randomName(context.options.race.name, context.options.gender); - - // Update actor - await actor.update(actorUpdate); - } - - static async setDetails(actor, context) { - - let race = Races.nonCombatantRaces[context.options.race.name]; - let actorUpdate = {}; - - // Source - actorUpdate["data.details.source"] = "Populator"; - - // CR - var CR = context.options.CR; - - if (CR === "1/3") { CR = (1/3); } - if (CR === "1/2") { CR = 0.5; } - - actorUpdate["data.details.cr"] = CR; - - // Alignment - actorUpdate["data.details.alignment"] = Randomizer.randomAlignment(); - - // Languages - var languages = ["common"]; - if (race.languages) { - languages.push(...race.languages); - } - actorUpdate["data.traits.languages.value"] = languages; - - // Update actor - await actor.update(actorUpdate); - } - - static async setAttributes(actor, context) { - - let array = context.arrays.main; - let actorUpdate = {}; - - // Size - actorUpdate["data.traits.size"] = context.options.race.size; - - // Hands - if(context.options.race.arms != undefined) { - actorUpdate["data.attributes.arms"] = context.options.race.arms; - } - - // Reach - // TODO: Reach should be decided by grafts - actorUpdate["data.attributes.reach"] = 5; - - // Set HP - actorUpdate["data.attributes.hp.value"] = array.HP; - actorUpdate["data.attributes.hp.max"] = array.HP; - - // Set SP (should be 0) - actorUpdate["data.attributes.sp.max"] = 0; - - // Set RP (should be 0) - actorUpdate["data.attributes.rp.max"] = 0; - - // Set KAC - actorUpdate["data.attributes.kac.value"] = array.KAC; - - // Set EAC - actorUpdate["data.attributes.eac.value"] = array.EAC; - - // Set reflex save - actorUpdate["data.attributes.reflex.bonus"] = array.reflex; - - // Set fort save - actorUpdate["data.attributes.fort.bonus"] = array.fort; - - // Set will save - actorUpdate["data.attributes.will.bonus"] = array.will; - - // Set ability modifiers - var attributes = ["cha", "con", "dex", "int", "str", "wis"]; - - // We randomize which abilities are buffed - Utils.shuffleArray(attributes); - - actorUpdate["data.abilities." + attributes[0] + ".mod"] = array.abilityMods[0]; - actorUpdate["data.abilities." + attributes[1] + ".mod"] = array.abilityMods[1]; - actorUpdate["data.abilities." + attributes[2] + ".mod"] = array.abilityMods[2]; - - // Set initiative modifier (be dex modifier) - actorUpdate["data.attributes.init.total"] = actorUpdate["data.abilities.dex.mod"] ?? 0; - - // Update actor - await actor.update(actorUpdate); - } - - static async setGrafts(actor, context) { - - let actorUpdate = {}; - let race = context.options.race; - await this.applyCreatureTypeGraft(actor,context, race.creatureTypeGraft); - - if(race.creatureSubtypeGraft) { - await this.applyCreatureSubtypeGraft(actor, context, race.creatureSubtypeGraft); - // Apply type in "()" format - actorUpdate["data.details.type"] = race.creatureTypeGraft.name + " (" + race.creatureSubtypeGraft + ")"; - } - else { - // Apply type in "" format - actorUpdate["data.details.type"] = race.creatureTypeGraft.name; - } - - // Update actor - await actor.update(actorUpdate); - } - - static async applyCreatureTypeGraft(actor, context, graft: CreatureTypeGraft) { - let actorUpdate = {}; - - if (graft === Grafts.creatureType.humanoid) { - // Applies a +2 to a random saving throw - var saves = ["reflex","fort", "will"]; - Utils.shuffleArray(saves); - - let save = saves[0]; - actorUpdate["data.attributes." + save + ".bonus"] = actor.data.data.attributes[save].value + 2; - - } - else if (graft === Grafts.creatureType.monstrousHumanoid) { - // Applies a +2 to reflex & will - // TODO: +1 to all attacks - actorUpdate["data.attributes.reflex.bonus"] = actor.data.data.attributes.reflex.value + 2; - actorUpdate["data.attributes.will.bonus"] = actor.data.data.attributes.will.value + 2; - - // Set traits - actorUpdate["data.traits.senses"] = "darkvision 60 ft."; - } - - actorUpdate["data.details.raceAndGrafts"] = actor.data.data.details.raceAndGrafts + " " + graft.name; - - // Update actor - await actor.update(actorUpdate); - } - - static async applyCreatureSubtypeGraft(actor, context, graft) { - let actorUpdate = {}; - - // Set as 1 per day - function addOncePerDayInnateSpell(spell) { - spell.data.uses.value = 1; - spell.data.uses.max = 1; - spell.data.uses.per = "day"; - spell.data.preparation.mode = "innate"; - context.itemsToAdd.push(spell); - } - - function addAtWillInnateSpell(spell) { - spell.data.preparation.mode = "innate"; - context.itemsToAdd.push(spell); - } - - if (graft === Grafts.creatureSubtype.android) { - //Senses - actorUpdate["data.traits.senses"] = "darkvision 60 ft.; low-light vision"; - } - else if (graft === Grafts.creatureSubtype.dwarf) { - //Senses - actorUpdate["data.traits.senses"] = "darkvision 60 ft."; - } - else if (graft === Grafts.creatureSubtype.elf) { - // Elves can be `drow`, `elven` or `half-elven` race - // NOTE: Currently assumes `drow` - // TODO: Implement traits for elf/half-elf races - //Senses - actorUpdate["data.traits.senses"] = "darkvision 60 ft."; - // Drow magic at will innate spells - let dancingLights = await Utils.fuzzyFindSpellAsync("dancing lights"); - let detectMagic = await Utils.fuzzyFindSpellAsync("detect magic"); - addAtWillInnateSpell(dancingLights); - addAtWillInnateSpell(detectMagic); - // Add immunities - actorUpdate["data.traits.ci.custom"] = "drow immunities"; - // Perception as a master skill - context.masterSkill.push("per"); - } - else if (graft === Grafts.creatureSubtype.gnoll) { - // Senses - actorUpdate["data.traits.senses"] = "blindsense (scent) 30 ft.; darvision 60 ft."; - // Natural weapons - context.hasNaturalWeapons = true; - // Survival as a master skill - context.masterSkill.push("sur"); - } - else if (graft === Grafts.creatureSubtype.gnome) { - //Senses - actorUpdate["data.traits.senses"] = "low-light vision"; - // Gnome magic once per day innate spells - let dancingLights = await Utils.fuzzyFindSpellAsync("dancing lights"); - let ghostSound = await Utils.fuzzyFindSpellAsync("ghost sound"); - let tokenSpell = await Utils.fuzzyFindSpellAsync("token spell"); - addOncePerDayInnateSpell(dancingLights); - addOncePerDayInnateSpell(ghostSound); - addOncePerDayInnateSpell(tokenSpell); - // Culture as a master skill - context.masterSkill.push("cul"); - } - else if (graft === Grafts.creatureSubtype.halfling) { - // Perception and Stealth as master skills - context.masterSkill.push("ste"); - context.masterSkill.push("per"); - // Athletics and Acrobatics as good skills - context.goodSkill.push("acr"); - context.goodSkill.push("ath"); - } - else if (graft === Grafts.creatureSubtype.human) { - // Nothing applied - } - else if (graft === Grafts.creatureSubtype.kasatha) { - // Acrobatics and Athletics master skills - context.masterSkill.push("acr"); - context.masterSkill.push("ath"); - // culture as good skills - context.goodSkill.push("cul"); - } - else if (graft === Grafts.creatureSubtype.lashunta) { - // Languages - actorUpdate["data.traits.languages.custom"] = "limited telepathy 30 ft."; - // Innate spells - let detectThoughts = await Utils.fuzzyFindSpellAsync("detect thoughts"); - let daze = await Utils.fuzzyFindSpellAsync("daze"); - let psychokineticHand = await Utils.fuzzyFindSpellAsync("psychokinetic hand"); - addOncePerDayInnateSpell(detectThoughts); - addAtWillInnateSpell(daze); - addAtWillInnateSpell(psychokineticHand); - } - else if (graft === Grafts.creatureSubtype.shirren) { - // Languages - actorUpdate["data.traits.languages.custom"] = "limited telepathy 30 ft."; - // Culture and Diplomacy as good skills - context.goodSkill.push("cul"); - context.goodSkill.push("dip"); - } - else if (graft === Grafts.creatureSubtype.skittermander) { - // Nothing applied - } - else if (graft === Grafts.creatureSubtype.vesk) { - //Senses - actorUpdate["data.traits.senses"] = "low-light vision"; - // Natural weapons - context.hasNaturalWeapons = true; - } - else if (graft === Grafts.creatureSubtype.ysoki) { - //Senses - actorUpdate["data.traits.senses"] = "darkvision 60 ft."; - // Engineering and stealth as master skills - context.masterSkill.push("eng"); - context.masterSkill.push("ste"); - // Survival as good skill - context.goodSkill.push("sur"); - } - - // Append subtype graft to graft list - actorUpdate["data.details.raceAndGrafts"] = actor.data.data.details.raceAndGrafts + ", " + graft; - - // Update actor - await actor.update(actorUpdate); - } - - static async setSkills(actor, context) { - let array = context.arrays.main; - let actorUpdate = {}; - - // All skills minus perception (always a `good` skill, and profession) - // TODO: Support profession skills - var skillsToBuff = ["acr", "ath", "blu", "com", "cul", "dip", "dis", "eng", "int", "lsc", "med", "mys", "phs", "pil", "sen", "sle", "ste", "sur"]; - - // Remove any skills we are buffing due to grafts - skillsToBuff = skillsToBuff.filter(function(skill) { - return !context.masterSkill.includes(skill) && !context.goodSkill.includes(skill); - }) - - Utils.shuffleArray(skillsToBuff); - - // Apply good skill mod to perception - actorUpdate["data.skills.per.mod"] = array.goodSkill.mod; - actorUpdate["data.skills.per.enabled"] = true; - - // NOTE: We do this step after the above buff to perception as some grafts make perception a master skill and - // we want that to override the above in that case. - // Apply fixed master/good skills (from grafts) - for (let masterSkill of context.masterSkill) { - actorUpdate["data.skills." + masterSkill + ".mod"] = array.masterSkill.mod; - actorUpdate["data.skills." + masterSkill + ".enabled"] = true; - } - for (let goodSkill of context.goodSkill) { - actorUpdate["data.skills." + goodSkill + ".mod"] = array.goodSkill.mod; - actorUpdate["data.skills." + goodSkill + ".enabled"] = true; - } - - // Apply master / good skill mod to random skills (from an array of skills missing graft skills + perception) - var skillIndex = 0; // Used to track progress through array of skills - // Apply mod to master skills - for (let i = 0; i < array.masterSkill.count; i++) - { - let skill = skillsToBuff[skillIndex]; - actorUpdate["data.skills." + skill + ".mod"] = array.masterSkill.mod; - actorUpdate["data.skills." + skill + ".enabled"] = true; - skillIndex++; - } - // Apply mod to good skills - for (let i = 0; i < array.goodSkill.count; i++) - { - let skill = skillsToBuff[skillIndex]; - actorUpdate["data.skills." + skill + ".mod"] = array.goodSkill.mod; - actorUpdate["data.skills." + skill + ".enabled"] = true; - skillIndex++; - } - - // Update actor - await actor.update(actorUpdate); - } - - static async setWeapons(actor, context) { - let attackArray = context.arrays.attack; - let highAttackBonus = attackArray.high; - - // Add natural weapons or generic unarmed strike - if (context.hasNaturalWeapons === true) { - let naturalWeapons = WeaponFactory.makeNaturalWeapons(); - naturalWeapons.data.attackBonus = highAttackBonus; - naturalWeapons.data.damage = { - "parts": [ - [ - attackArray.standard, - "bludgeoning" - ] - ] - } - // TODO: If CR3+ add 1.5x (rounded down) to damage - context.itemsToAdd.push(naturalWeapons); - } - else { - // All NPCs have unarmed strike unless they are equiped with natural weapons - let unarmedStrike = WeaponFactory.makeUnarmedStrike(); - unarmedStrike.data.attackBonus = highAttackBonus; - context.itemsToAdd.push(unarmedStrike); - } - } - - static async setInventory(actor, context) { - - let items = ItemFactory.makeItemCollection(); - context.itemsToAdd.push(...items); - } - - static async setToken(actor, context) { - let actorUpdate = {}; - actorUpdate["token.randomImg"] = false; - if (context.options.dynamicTokenImages) { - actorUpdate["token.img"] = "populator/" + context.options.race.name + "/" + context.options.gender + "/*"; - actorUpdate["token.randomImg"] = true; - } - - actorUpdate["token.actorLink"] = true; - actorUpdate["token.disposition"] = 0; // Neutral by default - - // Update actor - await actor.update(actorUpdate); - } - - static async clean(item) { - if (item["_id"]) { - item["sourceId"] = item["_id"]; - delete item["_id"]; - } - } -} \ No newline at end of file diff --git a/src/Populator.ts b/src/Populator.ts index 829ec7f..71a580b 100644 --- a/src/Populator.ts +++ b/src/Populator.ts @@ -1,52 +1,70 @@ -import { Races } from "./data/Races.js"; -import { NPCFactory } from './NPCFactory.js' -import PopulatorPanelController from "./controllers/PopulatorPanelController.js"; -import MonsterWizardPanel1Controller from "./controllers/MonsterWizardPanel1Controller.js"; -import NPCCreationContext from "./models/NPCCreationContext.js"; -declare var game; +import { NPCFactory } from "./factories/NPCFactory.js" +import PopulatorPanelController from "./controllers/PopulatorPanelController.js" +import MonsterWizardPanel1Controller from "./controllers/MonsterWizardPanel1Controller.js" +import NPCCreationContext, { + TokenOptions, +} from "./models/NPCCreationContext.js" +declare var game export class Populator { - static ensurePopulateVisible() { if (!game.user.isGM) { - return; + return } - let populatorButton = document.getElementById("populator-button"); + let populatorButton = document.getElementById("populator-button") if (populatorButton != null) { - return; + return } - const actorsPanel = document.getElementById("actors"); - const actorFooter = actorsPanel.getElementsByClassName("directory-footer")[0]; + const actorsPanel = document.getElementById("actors") + const actorFooter = actorsPanel?.getElementsByClassName( + "directory-footer" + )[0] if (actorFooter) { - populatorButton = document.createElement("button"); - populatorButton.innerHTML = `Populator`; - populatorButton.onclick = ev => Populator.populateClicked(); - populatorButton.oncontextmenu = ev => Populator.populateRightClicked(); - const createEntityButton = actorFooter.getElementsByClassName("create-entity")[0]; - actorFooter.insertBefore(populatorButton, createEntityButton); + populatorButton = document.createElement("button") + populatorButton.innerHTML = `Populator` + populatorButton.onclick = (ev) => Populator.populateClicked() + populatorButton.oncontextmenu = (ev) => + Populator.populateRightClicked() + const createEntityButton = actorFooter.getElementsByClassName( + "create-entity" + )[0] + actorFooter.insertBefore(populatorButton, createEntityButton) } } static async populateClicked() { + // Open monster wizard panel + //let monsterWizardPanelController = new MonsterWizardPanel1Controller(new NPCCreationContext()); + //monsterWizardPanelController.render(true); - // Settings - const defaultCR = game.settings.get("foundryvtt-sfrpg-populator", "defaultCR"); - const dynamicTokenImages = game.settings.get("foundryvtt-sfrpg-populator", "dynamicTokenImages"); - - let options = { CR: defaultCR, dynamicTokenImages: dynamicTokenImages, race: null, gender: null}; - - await NPCFactory.makeNonHostile(options); - ui.notifications.info("NPC created.", { permanent: false }); + // Open populator panel + let populatorPanel = new PopulatorPanelController() + populatorPanel.render(true) } static async populateRightClicked() { + // Settings + const defaultCR = game.settings.get( + "foundryvtt-sfrpg-populator", + "defaultCR" + ) + const dynamicTokenImages = game.settings.get( + "foundryvtt-sfrpg-populator", + "dynamicTokenImages" + ) - // Open monster wizard panel - //let monsterWizardPanelController = new MonsterWizardPanel1Controller(new NPCCreationContext()); - //monsterWizardPanelController.render(true); + let options = { + CR: defaultCR, + dynamicTokenImages: dynamicTokenImages, + race: null, + gender: null, + } - // Open populator panel - let populatorPanel = new PopulatorPanelController(); - populatorPanel.render(true); + let context = new NPCCreationContext() + context.CR = defaultCR + context.tokenOptions.dynamicImage = dynamicTokenImages + + await NPCFactory.makeNonHostile(context) + ui.notifications.info("NPC created.", { permanent: false }) } -} \ No newline at end of file +} diff --git a/src/Randomizer.ts b/src/Randomizer.ts index 2a6774b..1c9e9ca 100644 --- a/src/Randomizer.ts +++ b/src/Randomizer.ts @@ -1,77 +1,97 @@ -import { Races } from "./data/Races.js"; -import { Probabilities } from "./data/Probabilities.js"; -import { Names } from "./data/Names.js"; +import { Races } from "./data/Races.js" +import { Probabilities } from "./data/Probabilities.js" +import { Names } from "./data/Names.js" import { StringFormat } from "./utils/StringFormat.js" +import Race from "./models/Race.js" +import { Gender } from "./data/MonsterCreation.js" +import NPCCreationContext from "./models/NPCCreationContext.js" export class Randomizer { - - static randomRace() { - let raceDistribution = Randomizer.pickWinningItem(Probabilities.raceDistributions.default); - let race = Races.nonCombatantRaces[raceDistribution.name]; - return race; + static randomRace(): Race { + let raceDistribution = Randomizer.pickWinningItem( + Probabilities.raceDistributions.default + ) + let race = Races.nonCombatantRaces[raceDistribution.name] + return race } - static randomGender() { - let genderDistribution = Randomizer.pickWinningItem(Probabilities.genderDistributions.default); - let gender = genderDistribution.name; - return gender; + static randomGender(): Gender { + let genderDistribution = Randomizer.pickWinningItem( + Probabilities.genderDistributions.default + ) + let gender = genderDistribution.name + return gender } static randomAlignment() { - let alignmentDistribution = Randomizer.pickWinningItem(Probabilities.alignmentDistributions.default); - return alignmentDistribution.name; + let alignmentDistribution = Randomizer.pickWinningItem( + Probabilities.alignmentDistributions.default + ) + return alignmentDistribution.name } // NOTE: For now we assume male if no gender provided - static randomName(forRace = null, gender = "male") { + static randomName(context: NPCCreationContext) { + let race: string | undefined = context.race + let creatureType = context.creatureTypeGraft?.name + let gender: string = context.gender ?? "male" - var format = Names.default.format; - var names = Names.default; // Default is human sounding names + var format = Names.default.format + var names = Names.default // Default is human sounding names // If a race is specified and we have special names for that race - if (forRace && Names[forRace] != undefined) { - names = Names[forRace]; + if (race && Names[race] != undefined) { + names = Names[race] + } + // Otherwise use creature type to generate name + else if (Names[creatureType] != undefined) { + names = Names[creatureType] } + // - var first = names.male.first; // Default is male sounding names - var last = names.last; + var first = names.male.first // Default is male sounding names + var last = names.last // Gender specific first names - if (gender == "male") {} // do nothing + if (gender == "male") { + } // do nothing else if (gender == "female" && names.female != undefined) { - first = names.female.first; - } - else if (names.other != undefined) { // If any other gender, and we have `other` defined for the race - first = names.other.first; + first = names.female.first + } else if (names.other != undefined) { + // If any other gender, and we have `other` defined for the race + first = names.other.first } - let firstName = first[Math.floor(Math.random() * first.length)]; - let lastName = last[Math.floor(Math.random() * last.length)]; + let firstName = first[Math.floor(Math.random() * first.length)] + let lastName = last[Math.floor(Math.random() * last.length)] // If the name style has a unique format use it instead if (names.format) { - format = names.format; + format = names.format } // Generate the full name with the name format - let fullName = StringFormat.stringFormat(format, firstName, lastName); + let fullName = StringFormat.stringFormat(format, firstName, lastName) // Denominators get appended to the end of names regardless of name format (ie. "Jordo-6" has the "-6" denominator) - if(names.denominator) { - let denominator = names.denominator[Math.floor(Math.random() * names.denominator.length)]; - fullName = fullName + denominator; + if (names.denominator) { + let denominator = + names.denominator[ + Math.floor(Math.random() * names.denominator.length) + ] + fullName = fullName + denominator } - return fullName; + return fullName } static pickWinningItem(data) { - var winner = Math.random(); - var threshold = 0; + var winner = Math.random() + var threshold = 0 for (let i = 0; i < data.length; i++) { - threshold += parseFloat(data[i].percentage); + threshold += parseFloat(data[i].percentage) if (threshold > winner) { return data[i] } } } -} \ No newline at end of file +} diff --git a/src/WeaponFactory.ts b/src/WeaponFactory.ts deleted file mode 100644 index 963551a..0000000 --- a/src/WeaponFactory.ts +++ /dev/null @@ -1,425 +0,0 @@ -export class WeaponFactory { - - static makeUnarmedStrike() { - return unarmedStrikeTemplate; - } - - static makeNaturalWeapons() { - return naturalWeaponsTemplate; - } -} - -// Templates -const unarmedStrikeTemplate = { - "name": "Unarmed strike", - "type": "weapon", - "data": { - "description": { - "chat": "", - "gmnotes": "", - "short": "", - "value": "

An unarmed strike can be dealt with any limb or appendage. Unarmed strikes deal nonlethal damage, and the damage from an unarmed strike is considered weapon damage for the purposes of effects that give you a bonus to weapon damage rolls.

", - "unidentified": "" - }, - "source": "CRB pg. 190", - "type": "", - "quantity": null, - "bulk": "-", - "price": 0, - "level": 0, - "attuned": false, - "equipped": true, - "equippable": false, - "identified": true, - "attributes": { - "sturdy": false, - "customBuilt": false, - "size": "medium", - "dex": { - "mod": "" - }, - "hp": { - "value": 6, - "max": "" - }, - "hardness": { - "value": "" - }, - "ac": { - "value": "" - } - }, - "activation": { - "type": "action", - "cost": 1, - "condition": "" - }, - "duration": { - "value": "", - "units": "" - }, - "target": { - "value": "", - "type": "" - }, - "area": { - "value": null, - "units": null, - "shape": "", - "effect": "" - }, - "range": { - "value": null, - "units": "touch", - "additional": "", - "per": "" - }, - "uses": { - "value": 0, - "max": 0, - "per": "" - }, - "isActive": null, - "ability": "", - "actionType": "mwak", - "attackBonus": 0, - "chatFlavor": "", - "critical": { - "parts": [], - "effect": "" - }, - "damage": { - "parts": [ - [ - "1d3", - "bludgeoning" - ] - ] - }, - "formula": "", - "save": { - "type": "", - "dc": "", - "descriptor": "negate" - }, - "descriptors": [], - "capacity": { - "value": 0, - "max": 0 - }, - "usage": { - "value": 0, - "per": "" - }, - "modifiers": [], - "container": { - "contents": [], - "storage": [], - "isOpen": true - }, - "weaponType": "basicM", - "weaponCategory": "", - "special": "", - "properties": { - "one": false, - "two": false, - "amm": false, - "aeon": false, - "analog": false, - "antibiological": false, - "archaic": true, - "aurora": false, - "automatic": false, - "blast": false, - "block": false, - "boost": false, - "breach": false, - "breakdown": false, - "bright": false, - "cluster": false, - "conceal": false, - "deconstruct": false, - "deflect": false, - "disarm": false, - "double": false, - "drainCharge": false, - "echo": false, - "entangle": false, - "explode": false, - "extinguish": false, - "feint": false, - "fiery": false, - "firstArc": false, - "flexibleLine": false, - "force": false, - "freeHands": false, - "fueled": false, - "grapple": false, - "gravitation": false, - "guided": false, - "harrying": false, - "holyWater": false, - "hybrid": false, - "ignite": false, - "indirect": false, - "injection": false, - "integrated": false, - "line": false, - "living": false, - "lockdown": false, - "mind-affecting": false, - "mine": false, - "mire": false, - "modal": false, - "necrotic": false, - "nonlethal": true, - "operative": false, - "penetrating": false, - "polarize": false, - "polymorphic": false, - "powered": false, - "professional": false, - "punchGun": false, - "qreload": false, - "radioactive": false, - "reach": false, - "recall": false, - "regrowth": false, - "relic": false, - "reposition": false, - "shape": false, - "shatter": false, - "shells": false, - "shield": false, - "sniper": false, - "stun": false, - "subtle": false, - "sunder": false, - "swarm": false, - "tail": false, - "teleportive": false, - "thought": false, - "throttle": false, - "thrown": false, - "trip": false, - "unbalancing": false, - "underwater": false, - "unwieldy": false, - "variantBoost": false, - "wideLine": false - }, - "proficient": true, - "abilityMods": { - "parts": [] - } - }, - "flags": {}, - "effects": [] -} -const naturalWeaponsTemplate = { - "name": "Unarmed strike (natural weapons)", - "type": "weapon", - "data": { - "description": { - "chat": "", - "gmnotes": "", - "short": "", - "value": "

A special unarmed strike that deals lethal damage, doesn’t count as archaic, and threatens squares. Gain a special version of the Weapon Specialization feat with this unarmed strike at 3rd level, allowing them to add 1–1/2 × their character level to their damage rolls for this unarmed strike (instead of just adding their character level, as usual).

", - "unidentified": "" - }, - "source": "CRB pg. 190", - "type": "", - "quantity": null, - "bulk": "-", - "price": 0, - "level": 0, - "attuned": false, - "equipped": true, - "equippable": false, - "identified": true, - "attributes": { - "sturdy": false, - "customBuilt": false, - "size": "medium", - "dex": { - "mod": "" - }, - "hp": { - "value": 6, - "max": "" - }, - "hardness": { - "value": "" - }, - "ac": { - "value": "" - } - }, - "activation": { - "type": "action", - "cost": 1, - "condition": "" - }, - "duration": { - "value": "", - "units": "" - }, - "target": { - "value": "", - "type": "" - }, - "area": { - "value": null, - "units": null, - "shape": "", - "effect": "" - }, - "range": { - "value": null, - "units": "touch", - "additional": "", - "per": "" - }, - "uses": { - "value": 0, - "max": 0, - "per": "" - }, - "isActive": null, - "ability": "", - "actionType": "mwak", - "attackBonus": 0, - "chatFlavor": "", - "critical": { - "parts": [], - "effect": "" - }, - "damage": { - "parts": [ - [ - "1d3", - "bludgeoning" - ] - ] - }, - "formula": "", - "save": { - "type": "", - "dc": "", - "descriptor": "negate" - }, - "descriptors": [], - "capacity": { - "value": 0, - "max": 0 - }, - "usage": { - "value": 0, - "per": "" - }, - "modifiers": [], - "container": { - "contents": [], - "storage": [], - "isOpen": true - }, - "weaponType": "basicM", - "weaponCategory": "", - "special": "", - "properties": { - "one": false, - "two": false, - "amm": false, - "aeon": false, - "analog": false, - "antibiological": false, - "archaic": false, - "aurora": false, - "automatic": false, - "blast": false, - "block": false, - "boost": false, - "breach": false, - "breakdown": false, - "bright": false, - "cluster": false, - "conceal": false, - "deconstruct": false, - "deflect": false, - "disarm": false, - "double": false, - "drainCharge": false, - "echo": false, - "entangle": false, - "explode": false, - "extinguish": false, - "feint": false, - "fiery": false, - "firstArc": false, - "flexibleLine": false, - "force": false, - "freeHands": false, - "fueled": false, - "grapple": false, - "gravitation": false, - "guided": false, - "harrying": false, - "holyWater": false, - "hybrid": false, - "ignite": false, - "indirect": false, - "injection": false, - "integrated": false, - "line": false, - "living": false, - "lockdown": false, - "mind-affecting": false, - "mine": false, - "mire": false, - "modal": false, - "necrotic": false, - "nonlethal": false, - "operative": false, - "penetrating": false, - "polarize": false, - "polymorphic": false, - "powered": false, - "professional": false, - "punchGun": false, - "qreload": false, - "radioactive": false, - "reach": false, - "recall": false, - "regrowth": false, - "relic": false, - "reposition": false, - "shape": false, - "shatter": false, - "shells": false, - "shield": false, - "sniper": false, - "stun": false, - "subtle": false, - "sunder": false, - "swarm": false, - "tail": false, - "teleportive": false, - "thought": false, - "throttle": false, - "thrown": false, - "trip": false, - "unbalancing": false, - "underwater": false, - "unwieldy": false, - "variantBoost": false, - "wideLine": false - }, - "proficient": true, - "abilityMods": { - "parts": [] - } - }, - "flags": {}, - "img": "icons/svg/mystery-man.svg", - "effects": [] -} \ No newline at end of file diff --git a/src/controllers/MonsterWizardPanel1Controller.ts b/src/controllers/MonsterWizardPanel1Controller.ts index ae2e974..cb24226 100644 --- a/src/controllers/MonsterWizardPanel1Controller.ts +++ b/src/controllers/MonsterWizardPanel1Controller.ts @@ -1,26 +1,28 @@ -import {CR, MonsterCreation} from "../data/MonsterCreation.js"; -import { Grafts } from "../data/Grafts.js"; +import { CR, MonsterCreation } from "../data/MonsterCreation.js" +import { Grafts } from "../data/Grafts.js" import NPCCreationContext from "../models/NPCCreationContext.js" -import MonsterWizardPanel2Controller from "./MonsterWizardPanel2Controller.js"; +import MonsterWizardPanel2Controller from "./MonsterWizardPanel2Controller.js" export default class MonsterWizardPanel1Controller extends FormApplication { + private context: NPCCreationContext - private context: NPCCreationContext; constructor(context: NPCCreationContext) { - super(); - this.context = context; + super() + this.context = context } static get defaultOptions() { - return mergeObject(super.defaultOptions, { + return mergeObject(super.defaultOptions, { id: "populator-panel", - template: "modules/foundryvtt-sfrpg-populator/templates/MonsterWizardPanel_1.html", + classes: ["sfrpg"], + template: + "modules/foundryvtt-sfrpg-populator/templates/MonsterWizardPanel_1.html", width: 300, height: 300, minimizable: true, resizable: true, title: "Create Monster (1/2)" - }); + }) } /** @@ -30,7 +32,9 @@ export default class MonsterWizardPanel1Controller extends FormApplication { */ public activateListeners(html: JQuery) { // Listener for when a day is clicked - (html).find(".nextButton").on('click', this.onNextButtonClicked.bind(this)); + ;(html) + .find(".nextButton") + .on("click", this.onNextButtonClicked.bind(this)) //html.find('select[name="selectedArray"]').change(this.onSelectedArrayChanged.bind(this)); } @@ -47,14 +51,14 @@ export default class MonsterWizardPanel1Controller extends FormApplication { arrays: MonsterCreation.arrays, CRs: CR, creatureTypes: Grafts.creatureType - }); + }) } onNextButtonClicked(e: Event) { - - let monsterWizardPanelController = new MonsterWizardPanel2Controller(this.context); - monsterWizardPanelController.render(true); - + let monsterWizardPanelController = new MonsterWizardPanel2Controller( + this.context + ) + monsterWizardPanelController.render(true) } async onSelectedArrayChanged(e: Event) { //e.target.value @@ -62,4 +66,4 @@ export default class MonsterWizardPanel1Controller extends FormApplication { //this.render(true); // } -} \ No newline at end of file +} diff --git a/src/controllers/MonsterWizardPanel2Controller.ts b/src/controllers/MonsterWizardPanel2Controller.ts index a7ff309..304e2be 100644 --- a/src/controllers/MonsterWizardPanel2Controller.ts +++ b/src/controllers/MonsterWizardPanel2Controller.ts @@ -1,21 +1,22 @@ -import NPCCreationContext from "../models/NPCCreationContext.js"; +import NPCCreationContext from "../models/NPCCreationContext.js" export default class MonsterWizardPanel2Controller extends FormApplication { - constructor(context: NPCCreationContext) { - super(); + super() } static get defaultOptions() { - return mergeObject(super.defaultOptions, { + return mergeObject(super.defaultOptions, { id: "populator-panel", - template: "modules/foundryvtt-sfrpg-populator/templates/MonsterWizardPanel_2.html", + classes: ["sfrpg"], + template: + "modules/foundryvtt-sfrpg-populator/templates/MonsterWizardPanel_2.html", width: 300, height: 300, minimizable: true, resizable: true, title: "Create Monster (2/2)" - }); + }) } /** @@ -35,7 +36,6 @@ export default class MonsterWizardPanel2Controller extends FormApplication { return mergeObject(super.getData(), { options: options, isGM: game.user.isGM - }); + }) } - -} \ No newline at end of file +} diff --git a/src/controllers/PopulatorPanelController.ts b/src/controllers/PopulatorPanelController.ts index e93080b..6c38379 100644 --- a/src/controllers/PopulatorPanelController.ts +++ b/src/controllers/PopulatorPanelController.ts @@ -1,22 +1,38 @@ -import { Races } from "../data/Races.js"; -import { NPCFactory } from "../NPCFactory.js"; -import MonsterWizardPanel1Controller from "./MonsterWizardPanel1Controller.js"; -import NPCCreationContext from "../models/NPCCreationContext.js"; +import { Races } from "../data/Races.js" +import { NPCFactory } from "../factories/NPCFactory.js" +import MonsterWizardPanel1Controller from "./MonsterWizardPanel1Controller.js" +import NPCCreationContext, { + TokenOptions +} from "../models/NPCCreationContext.js" +import { Grafts } from "../data/Grafts.js" +import { MonsterCreation } from "../data/MonsterCreation.js" +import CreatureTypeGraft from "../models/CreatureTypeGraft.js" +import { CreatureTypeGenerationOptions } from "../data/Generator.js" +import { Subtype, Type } from "../data/Types.js" +import CreatureSubtypeGraft from "../models/CreatureSubtypeGraft.js" export default class PopulatorPanelController extends Application { - static get defaultOptions() { - return mergeObject(super.defaultOptions, { + return mergeObject(super.defaultOptions, { id: "populator-panel", - template: "modules/foundryvtt-sfrpg-populator/templates/PopulatorPanel.html", + classes: ["sfrpg"], + template: + "modules/foundryvtt-sfrpg-populator/templates/PopulatorPanel.html", width: 300, - height: 300, + height: 350, minimizable: true, resizable: true, title: "Populator", - tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "description" }] - }); + tabs: [ + { + navSelector: ".sheet-tabs", + contentSelector: ".sheet-body", + initial: "description" + } + ] + }) } + /** * Retrieves Data to be used in rendering template. * @@ -27,8 +43,9 @@ export default class PopulatorPanelController extends Application { return mergeObject(super.getData(), { options: options, isGM: game.user.isGM, - NPCRaces: Races.nonCombatantRaces - }); + NPCRaces: Races.nonCombatantRaces, + supportedCreatureTypes: CreatureTypeGenerationOptions + }) } /** @@ -38,34 +55,95 @@ export default class PopulatorPanelController extends Application { */ public activateListeners(html: JQuery) { // Listener for when a day is clicked - (html).find(".npcGenerationButton").on('click', this.npcGenerationButtonClicked.bind(this)); - (html).find(".monsterGenerationButton").on('click', this.monsterGenerationButtonClicked.bind(this)); + ;(html) + .find(".npcGenerationButton") + .on("click", this.npcGenerationButtonClicked.bind(this)) + ;(html) + .find(".monsterGenerationButton") + .on("click", this.monsterGenerationButtonClicked.bind(this)) } /** - * Click event when a users clicks on a test button + * Click event when a users clicks on the NPC button * @param {Event} e The click event */ private async npcGenerationButtonClicked(e: Event) { + let npcRaceSelectValue = (this.element) + .find("#npcRaceSelect") + .find(":selected") + .val() + let selectedRace: string = npcRaceSelectValue as string + + // Settings + const defaultCR = game.settings.get( + "foundryvtt-sfrpg-populator", + "defaultCR" + ) + const dynamicTokenImages = game.settings.get( + "foundryvtt-sfrpg-populator", + "dynamicTokenImages" + ) - let npcRaceSelectValue = (this.element).find('#npcRaceSelect').find(":selected").val(); - let selectedRace: string = npcRaceSelectValue as string; + // Context + let context = new NPCCreationContext() + context.CR = defaultCR + // Validates selected race name + if (Races.nonCombatantRaces[selectedRace]) { + context.race = selectedRace + } + context.tokenOptions.dynamicImage = dynamicTokenImages + + await NPCFactory.makeNonHostile(context) + ui.notifications.info("NPC created.", { permanent: false }) + } + /** + * Click event when a users clicks on the Monster button + * @param {Event} e The click event + */ + private async monsterGenerationButtonClicked(e: Event) { + let monsterTypeSelectValue = (this.element) + .find("#monsterTypeSelect") + .find(":selected") + .val() + let selectedType: string = monsterTypeSelectValue as string // Settings - const defaultCR = game.settings.get("foundryvtt-sfrpg-populator", "defaultCR"); - const dynamicTokenImages = game.settings.get("foundryvtt-sfrpg-populator", "dynamicTokenImages"); + const defaultCR = game.settings.get( + "foundryvtt-sfrpg-populator", + "defaultCR" + ) + const dynamicTokenImages = game.settings.get( + "foundryvtt-sfrpg-populator", + "dynamicTokenImages" + ) - let options = { CR: defaultCR, dynamicTokenImages: dynamicTokenImages, race: null, gender: null}; + // Context + let context = new NPCCreationContext() + context.CR = defaultCR - // Quickly creates a specific race - as selected by user - options.race = Races.nonCombatantRaces[selectedRace]; + // Validates selected type + if (Grafts.creatureType[selectedType]) { + let generatorOption = CreatureTypeGenerationOptions[selectedType] + let typeKey = Type[generatorOption.type] - await NPCFactory.makeNonHostile(options); - ui.notifications.info("NPC created.", { permanent: false }); - } + context.creatureTypeGraft = Grafts.creatureType[typeKey] + + // TODO: For now we just use the 1st (and only) subttype associated with type + if (generatorOption.subtypes?.length == 1) { + let subtypeKey = Subtype[generatorOption.subtypes[0]] + context.creatureSubtypeGrafts = [ + Grafts.creatureSubtype[subtypeKey] + ] + } + + context.universalCreatureRules = + generatorOption.universalCreatureRules + } + + await NPCFactory.makeHostile(context) + ui.notifications.info("NPC created.", { permanent: false }) - private monsterGenerationButtonClicked(e: Event) { // Open monster wizard panel - let monsterWizardPanelController = new MonsterWizardPanel1Controller(new NPCCreationContext()); - monsterWizardPanelController.render(true); + //let monsterWizardPanelController = new MonsterWizardPanel1Controller(new NPCCreationContext()); + //monsterWizardPanelController.render(true); } -} \ No newline at end of file +} diff --git a/src/data/AbilityScores.ts b/src/data/AbilityScores.ts new file mode 100644 index 0000000..221658e --- /dev/null +++ b/src/data/AbilityScores.ts @@ -0,0 +1,8 @@ +export enum AbilityScore { + charisma = "cha", + constituion = "con", + dexterity = "dex", + intelligence = "int", + strength = "str", + wisdom = "wis" +} diff --git a/src/data/Biography.ts b/src/data/Biography.ts index 18d852b..173ab25 100644 --- a/src/data/Biography.ts +++ b/src/data/Biography.ts @@ -1,7 +1,134 @@ export const Biography = { - // Collection of professions (inspired by the Alien Character Cards from Paizo) professions: [], // Collection of personality traits (inspired by the Alien Character Cards from Paizo) - personalityTraits:[] + personalityTraits: [ + "abrasive", + "abrupt", + "absentminded", + "adaptable", + "adventurous", + "aggressive", + "agreeable", + "alert", + "aloof", + "ambitious", + "amoral", + "amusing", + "angry", + "anxious", + "apathetic", + "argumentative", + "articulate", + "artificial", + "ascetic", + "assertive", + "athletic", + "attractive", + "authoritarian", + "avant-garde", + "barbaric", + "benevolent", + "bizarre", + "blunt", + "boisterous", + "brilliant", + "businesslike", + "busy", + "calculating", + "callous", + "calm", + "captivating", + "careless", + "caring", + "casual", + "cautious", + "cerebral", + "charismatic", + "charming", + "cheerful", + "childish", + "clean", + "clever", + "clumsy", + "coarse", + "cold", + "compassionate", + "competitive", + "compulsive", + "confident", + "conformist", + "confused", + "conscientious", + "conservative", + "considerate", + "contemplative", + "conventional", + "cooperative", + "courageous", + "courteous", + "cowardly", + "crafty", + "crass", + "creative", + "cruel", + "cultured", + "curious", + "cute", + "cynical", + "daring", + "decadent", + "deceitful", + "decisive", + "dedicated", + "delicate", + "demanding", + "desperate", + "despondent", + "destructive", + "determined", + "devious", + "disloyal", + "disobedient", + "disorderly", + "disrespectful", + "dissolute", + "domineering", + "dramatic", + "dull", + "dutiful", + "ebullient", + "educated", + "egocentric", + "elegant", + "eloquent", + "emotional", + "empathetic", + "energetic", + "enigmatic", + "enthusiastic", + "envious", + "erratic", + "erudite", + "excitable", + "extravagant", + "faithful", + "faithless", + "fanatical", + "fatalistic", + "fickle", + "focused", + "foolish", + "forgetful", + "forgiving", + "formal", + "forthright", + "friendly", + "generous", + "glamorous", + "gloomy", + "greedy", + "grim", + "gullible" + ] } diff --git a/src/data/Generator.ts b/src/data/Generator.ts new file mode 100644 index 0000000..b572b37 --- /dev/null +++ b/src/data/Generator.ts @@ -0,0 +1,43 @@ +import { Grafts } from "./Grafts.js" +import CreatureTypeGraft from "../models/CreatureTypeGraft.js" +import CreatureSubtypeGraft from "../models/CreatureSubtypeGraft.js" +import { Subtype, Type } from "./Types.js" +import UniversalCreatureRule from "../models/UniversalCreatureRule.js" +import { MonsterCreation } from "./MonsterCreation.js" + +/// Used to store mapping between +export class CreatureTypeGenerationOption { + type: Type + subtypes: Subtype[] | undefined + universalCreatureRules: any[] + + constructor( + type: Type, + subtypes?: Subtype[] | undefined, + // We've hard coded the first creature rule to be natural weapons + // TODO: Only spend one special ability on natural weapons if no other weapon profile generation option is selected + universalCreatureRules: UniversalCreatureRule[] = [ + MonsterCreation.specialAbilities.universalCreatureRule + .naturalWeapons + ] + ) { + this.type = type + this.subtypes = subtypes + this.universalCreatureRules = universalCreatureRules + } +} + +/// Generator Settings +export const CreatureTypeGenerationOptions = { + animal: new CreatureTypeGenerationOption(Type.animal), + ooze: new CreatureTypeGenerationOption(Type.ooze), + vermin: new CreatureTypeGenerationOption(Type.vermin), + construct: new CreatureTypeGenerationOption( + Type.construct, + [Subtype.technological], + [ + MonsterCreation.specialAbilities.universalCreatureRule + .integratedWeapons + ] + ) +} diff --git a/src/data/Grafts.ts b/src/data/Grafts.ts index dd76e42..5e52ce9 100644 --- a/src/data/Grafts.ts +++ b/src/data/Grafts.ts @@ -1,24 +1,125 @@ -import CreatureTypeGraft from "../models/CreatureTypeGraft.js"; +import CreatureTypeGraft from "../models/CreatureTypeGraft.js" +import CreatureSubtypeGraft from "../models/CreatureSubtypeGraft.js" +import { Subtype, Type } from "./Types.js" export const Grafts = { creatureType: { - animal: new CreatureTypeGraft("animal"), - humanoid: new CreatureTypeGraft("humanoid"), - monstrousHumanoid: new CreatureTypeGraft("monstrous humanoid") + animal: new CreatureTypeGraft( + Type[Type.animal], + "An animal is a living, nonhumanoid creature, usually a vertebrate with no magical abilities and no innate capacity for language or culture.\n" + + "
Traits: Low-light vision; set Intelligence modifier to –4 or –5.\n" + + "
Adjustments: +2 to Fortitude and Reflex saving throws.", + false + ), + construct: new CreatureTypeGraft( + Type[Type.construct], + "A construct is a magically animated object or an artificially created creature." + + "
Traits: Darkvision 60 ft., low-light vision, construct immunities, unliving; set Constitution modifier to —; must have either the magical or technological subtype; if the construct is mindless, set Intelligence modifier to — and add mindless." + + "
Adjustments: –2 to all saving throws, +1 to attack rolls." + ), + humanoid: new CreatureTypeGraft( + Type[Type.humanoid], + "A humanoid usually has two arms, two legs, and one head, or it has a humanlike torso, arms, and a head. Humanoids have few or no supernatural or extraordinary abilities, but most can speak and usually have well-developed societies.\n" + + "
Traits: Must have a subtype that matches its race (such as human, lashunta, or shirren) or that is related to its race (such as goblinoid).\n" + + "
Adjustments: +2 to one type of saving throw." + ), + monstrousHumanoid: new CreatureTypeGraft( + Type[Type["monstrous humanoid"]], + "Monstrous humanoids are similar to humanoids, but they have monstrous or animalistic features. They often have magical abilities as well.\n" + + "
Traits: Darkvision 60 ft.\n" + + "
Adjustments: +2 to Reflex and Will saving throws, +1 to attack rolls." + ), + ooze: new CreatureTypeGraft( + Type[Type.ooze], + "An ooze is an amorphous or mutable creature.\n" + + "
Traits: Blindsight, mindless, ooze immunities, sightless; set Intelligence modifier to —.\n" + + "
Adjustments: +2 to Fortitude saving throws, –2 to Reflex and Will saving throws, no master or good skills unless the creature would have them naturally, rather than through training.", + false + ), + vermin: new CreatureTypeGraft( + Type[Type.vermin], + "This type includes insects, arachnids, other arthropods, worms, and similar invertebrates.\n" + + "
Traits: Darkvision 60 ft., mindless; set Intelligence modifier to —.\n" + + "
Adjustments: +2 to Fortitude saving throws.", + false + ) + }, + creatureSubtype: { + android: new CreatureSubtypeGraft( + Subtype[Subtype.android], + "This subtype is applied to androids and creatures related to androids.\n" + + "
Traits: Most creatures with this subtype gain darkvision 60 ft. and low-light vision; if the NPC is of the android race (Starfinder Core Rulebook 42), it also gains the constructed, flat affect, and upgrade slot racial traits." + ), + dwarf: new CreatureSubtypeGraft( + Subtype[Subtype.dwarf], + "This subtype is applied to dwarves and creatures related to dwarves.\n" + + "
Traits: Most creatures with this subtype gain darkvision 60 ft.; if the NPC is of the dwarven race (Starfinder Core Rulebook 506), it also gains the slow but steady, stonecunning, traditional enemies, and weapon familiarity racial traits." + ), + elf: new CreatureSubtypeGraft( + Subtype[Subtype.elf], + "This subtype is applied to elves and creatures related to elves.\n" + + "
Traits: Most creatures with this subtype gain low-light vision and gain Perception as an additional master skill; if the NPC is of the drow race (see page 42), it gains darkvision 60 ft. instead of low-light vision, as well as the drow immunities, drow magic, and light blindness racial traits; if the NPC is of the elven race (Starfinder Core Rulebook 507), it gains the elven immunities and elven magic racial traits and Mysticism as a master skill; if the NPC is of the half-elven race (Starfinder Core Rulebook 509), it gains the elven blood racial trait and an extra good skill.\n" + ), + gnome: new CreatureSubtypeGraft( + Subtype[Subtype.gnome], + "This subtype is applied to gnomes and creatures related to gnomes.\n" + + "
Traits: Low-light vision; if the NPC is of the gnome race (Starfinder Core Rulebook 508) it also gains the eternal hope and gnome magic racial traits\n" + + "and Culture as a master skill." + ), + gnoll: new CreatureSubtypeGraft( + Subtype[Subtype.gnoll], + "This subtype is applied to gnolls and creatures related to gnolls.\n" + + "
Traits: Blindsense (scent) 30 ft., darkvision 60 ft.; if the NPC is of the gnoll race (see Starfinder Alien Character Cards), it also gains the natural weapons and rugged travel racial traits and Survival as a master skill." + ), + goblinoid: new CreatureSubtypeGraft( + Subtype[Subtype.goblinoid], + "This subtype is applied to humanoids of various goblinoid subspecies, such as hobgoblins.\n" + + "
Traits: Darkvision 60 ft.; if the NPC is of the hobgoblin race (see page 76), it also gains the battle hardened racial trait and Intimidate and Stealth as master skills; if the NPC is of the kanabo race (see page 89), it gains the armor savant and kanabo magic racial traits." + ), + halfling: new CreatureSubtypeGraft( + Subtype[Subtype.halfling], + "This subtype is applied to halflings and creatures related to halflings.\n" + + "
Traits: None; if the NPC is of the halfling race (Starfinder Core Rulebook 511), it gains the halfling luck and sneaky racial traits, Perception and Stealth as master skills, and Acrobatics and Athletics as good skills." + ), + human: new CreatureSubtypeGraft( + Subtype[Subtype.human], + "This subtype is applied to humans and creatures related to humans.\n" + + "
Traits: None; if the NPC is of the human race (Starfinder Core Rulebook 44), it gains an additional special ability of any type and an additional good skill." + ), + kasatha: new CreatureSubtypeGraft( + Subtype[Subtype.kasatha], + "This subtype is applied to kasathas and creatures related to kasathas.\n" + + "
Traits: None; if the NPC is of the kasatha race (Starfinder Core Rulebook 46), it gains the desert stride and four-armed racial traits, Acrobatics and Athletics as master skills, and Culture as a good skill." + ), + lashunta: new CreatureSubtypeGraft( + Subtype[Subtype.lashunta], + "This subtype is applied to lashuntas and creatures related to lashuntas.\n" + + "
Traits: None; if the NPC is of the lashunta race (Starfinder Core Rulebook 48), it gains the limited telepathy racial trait and can cast the following spells as spell-like abilities: 1/day— detect thoughts; at will—daze and psychokinetic hand." + ), + orc: new CreatureSubtypeGraft( + Subtype[Subtype.orc], + "This subtype is applied to orcs and creatures who are related to orcs.\n" + + "
Traits: Most creatures of this subtype gain darkvision 60 ft. and the ferocity universal creature rule; if the creature is of the half-orc race (Starfinder Core Rulebook 510), it also gains Intimidate and Survival as master skills." + ), + shirren: new CreatureSubtypeGraft( + Subtype[Subtype.shirren], + "This subtype is applied to shirrens and creatures related to shirrens.
Traits: Blindsense (vibration) 30 ft.; if the NPC is of the shirren race (Starfinder Core Rulebook 50), it also gains the communalism and limited telepathy racial traits and Culture and Diplomacy as good skills." + ), + skittermander: new CreatureSubtypeGraft( + Subtype[Subtype.skittermander], + "This subtype is applied to skittermanders and creatures related to skittermanders.
Traits:Traits: Low-light vision; if the NPC is of the skittermander race (see page 106), it also gains the grappler, hyper, and six- armed racial traits." + ), + technological: new CreatureSubtypeGraft( + Subtype[Subtype.technological], + "A number of subtypes don’t have full entries. Those that don’t grant additional abilities to creatures are listed below." + ), + vesk: new CreatureSubtypeGraft( + Subtype[Subtype.vesk], + "This subtype is applied to vesk and creatures related to vesk.
Traits: Low-light vision; if the NPC is of the vesk race (Starfinder Core Rulebook 52), it also gains the armor savant, fearless, and natural weapons racial traits." + ), + ysoki: new CreatureSubtypeGraft( + Subtype[Subtype.ysoki], + "This subtype is applied to ysoki and creatures related to ysoki.
Traits: Darkvision 60 ft.; if the NPC is of the ysoki race (Starfinder Core Rulebook 54), it also gains the cheek pouches and moxie racial traits, Engineering and Stealth as master skills, and Survival as a good skill." + ) } - , creatureSubtype: { - android: "android", - dwarf: "dwarf", - elf: "elf", - gnome: "gnome", - gnoll: "gnoll", - halfling: "hafling", - human: "human", - kasatha: "kasatha", - lashunta: "lashunta", - shirren: "shirren", - skittermander: "skittermander", - vesk: "vesk", - ysoki: "ysoki" - } -}; \ No newline at end of file +} diff --git a/src/data/Items.ts b/src/data/Items.ts index 11aeb1b..7eb924c 100644 --- a/src/data/Items.ts +++ b/src/data/Items.ts @@ -1,300 +1,626 @@ export const Items = { - junk: [ - {name:"Old ticket to see Strawberry Machine Cake", description: ""}, - {name:"EJ Corp branded stapler", description: "'Take it to the EJ' is written on the bottom of this red stapler."}, - {name:"Paper folder covered by random stickers", description: ""}, - {name:"Small hand mirror", description: "A smudged mirror."}, - {name:"Duct tape", description: ""}, - {name:"Personal datapad", description: ""}, - {name:"Walking stick", description: ""}, - {name:"Bottle of water", description: "Water in a plastic bottle. Mostly empty."}, - {name:"Stylus", description: "A stylus for an unrecognized technological device."}, - {name:"Memory card", description: "A memory card for an unrecognized technological device."}, - {name:"Black marker", description: "A slightly used marker."}, - {name:"Red marker", description: "A slightly used marker."}, - {name:"Blue marker", description: "A slightly used marker."}, - {name:"Blank paper", description: "A sheet of blank paper."}, - {name:"Broken battery cell", description: "A battery cell in need of repair and out of power."}, - {name:"Keychain", description: "A keychain holding keys for a series of unknown archaic locks."}, - {name:"Headphones", description: "A wired set of headphones."}, - {name:"A faux-gold ring", description: "Some strange elven script is written inside the band."}, - {name:"Lint", description: "An accumulation of fibers and other materials."}, - {name:"ID card", description: "A semi-official ID card proving membership in a local club."}, - {name:"Candy", description: "Wrapped candy which appears to be from a restaurant."}, - {name:"Paper clips", description: "Two paper clips."} - ], - // Templates - // NOTE: Various items used to generate inventory for NPCs - credStickTemplate: { - "name": "Credstick (25 credits)", - "type": "goods", - "data": { - "description": { - "chat": "", - "gmnotes": "", - "short": "", - "value": "

Fortunately, the widespread use of the credstick circumvents
issues related to spending and storing currency. Flat and roughly
the size of a @Compendium[sfrpg.races.AMBcyDZDtJ1OOzh3]{Human} finger, ranging from cheap and disposable to
elaborate works of art, credsticks are a convenient way to carry
and spend money.

", - "unidentified": "" + { name: "Old ticket to see Strawberry Machine Cake", description: "" }, + { + name: "EJ Corp branded stapler", + description: + "'Take it to the EJ' is written on the bottom of this red stapler." + }, + { name: "Paper folder covered by random stickers", description: "" }, + { name: "Small hand mirror", description: "A smudged mirror." }, + { name: "Duct tape", description: "" }, + { name: "Personal datapad", description: "" }, + { name: "Walking stick", description: "" }, + { + name: "Bottle of water", + description: "Water in a plastic bottle. Mostly empty." + }, + { + name: "Stylus", + description: "A stylus for an unrecognized technological device." + }, + { + name: "Memory card", + description: + "A memory card for an unrecognized technological device." + }, + { name: "Black marker", description: "A slightly used marker." }, + { name: "Red marker", description: "A slightly used marker." }, + { name: "Blue marker", description: "A slightly used marker." }, + { name: "Blank paper", description: "A sheet of blank paper." }, + { + name: "Broken battery cell", + description: "A battery cell in need of repair and out of power." + }, + { + name: "Keychain", + description: + "A keychain holding keys for a series of unknown archaic locks." + }, + { name: "Headphones", description: "A wired set of headphones." }, + { + name: "A faux-gold ring", + description: "Some strange elven script is written inside the band." + }, + { + name: "Lint", + description: "An accumulation of fibers and other materials." + }, + { + name: "ID card", + description: + "A semi-official ID card proving membership in a local club." + }, + { + name: "Candy", + description: "Wrapped candy which appears to be from a restaurant." + }, + { name: "Paper clips", description: "Two paper clips." }, + { name: "Onyx hair comb", description: "A jet black hair comb." }, + { + name: "Jar of dried seeds", + description: "A jar containing a few dried seeds." + } + ] +} + +// Templates +// Some Items are easier to store as template which are modified/customized rather than searching compendiums +// NOTE: Various items used to generate inventory for NPCs +export const backpackTemplate = { + name: "Backpack, Consumer", + type: "container", + data: { + description: { + chat: "", + gmnotes: "", + short: "", + value: + '

When wearing a properly fitted consumer backpack, you treat your Strength score as 1 higher for the purpose of determining your carrying capacity. 

', + unidentified: "" + }, + source: "Core Rulebook, pg 230", + type: "", + quantity: 1, + bulk: "1", + price: 3, + level: 1, + attuned: false, + equipped: false, + equippable: false, + identified: true, + attributes: { + sturdy: false, + customBuilt: false, + size: "medium", + dex: { + mod: "" }, - "source": "CRB pg. 166", - "type": "", - "quantity": 1, - "bulk": "L", - "price": 25, - "level": 1, - "attuned": false, - "equipped": false, - "equippable": false, - "identified": true, - "attributes": { - "sturdy": false, - "customBuilt": false, - "size": "medium", - "dex": { - "mod": "" - }, - "hp": { - "value": 6, - "max": "" - }, - "hardness": { - "value": "" - }, - "ac": { - "value": "" + hp: { + value: 6, + max: "" + }, + hardness: { + value: "" + }, + ac: { + value: "" + } + }, + modifiers: [ + { + name: "Backpack, Consumer", + modifier: 1, + type: "enhancement", + effectType: "bulk", + valueAffected: "", + enabled: true, + source: "Core Rulebook, pg 230", + notes: "", + modifierType: "constant", + condition: "", + subtab: "misc", + _id: "395f0b72-1b0a-4845-ac86-f5dc5ce847f8" + } + ], + container: { + contents: [], + storage: [ + { + type: "bulk", + subtype: "", + amount: 2, + acceptsType: [ + "weapon", + "equipment", + "goods", + "consumable", + "container", + "technological", + "fusion", + "upgrade", + "augmentation", + "magic" + ], + affectsEncumbrance: true, + weightProperty: "bulk" } + ], + isOpen: true + }, + equippedBulkMultiplier: 0, + acceptedItemTypes: { + weapon: true, + equipment: true, + goods: true, + consumable: true, + container: true, + technological: true, + fusion: true, + upgrade: true, + augmentation: true + }, + damage: { + parts: [] + }, + critical: { + parts: [] + }, + abilityMods: { + parts: [] + } + }, + flags: {}, + img: "systems/sfrpg/icons/equipment/goods/backpack-consumer.jpg", + effects: [], + storage: { + type: "bulk", + amount: 2, + affectsEncumbrance: true + }, + weapon: true, + equipment: true, + consumable: true, + goods: true, + container: true, + hybrid: false, + magic: true, + technological: true, + fusion: true, + upgrade: true, + spell: false, + augmentation: true, + shield: false, + weaponAccessory: false, + vehicleAttack: false, + vehicleSystem: false +} +export const canteenTemplate = { + name: "Canteen", + type: "goods", + data: { + description: { + chat: "", + gmnotes: "", + short: "", + value: + '

This hollow plastic or metal container can hold up to a half gallon of liquid. 

', + unidentified: "" + }, + source: "Armory", + type: "", + quantity: 1, + bulk: "L", + price: 1, + level: 1, + attuned: false, + equipped: false, + equippable: false, + identified: true, + attributes: { + sturdy: false, + customBuilt: false, + size: "medium", + dex: { + mod: "" }, - "modifiers": [], - "damage": { - "parts": [] + hp: { + value: 6, + max: "" }, - "critical": { - "parts": [] + hardness: { + value: "" }, - "abilityMods": { - "parts": [] + ac: { + value: "" } }, - "flags": {}, - "img": "systems/sfrpg/icons/equipment/goods/credstick.jpg", - "effects": [] + modifiers: [], + damage: { + parts: [] + }, + critical: { + parts: [] + }, + abilityMods: { + parts: [] + } }, - upbTemplate: { - "name": "UPB (25)", - "type": "goods", - "data": { - "description": { - "chat": "", - "gmnotes": "", - "short": "", - "value": "

A universal polymer base, or UPB, is the basis for most technology in the Pact Worlds, the Veskarium, and many other systems. Each UPB is a tiny multifunction component, not much larger than a grain of rice, capable of being configured to act as a brace, capacitor, circuit, diode, fastener, insulator, lens, modulator, pipe, resistor, and dozens of other constituent parts. UPBs can even be spun out into fabric, broken down into component chemicals, reconstituted into new chemicals, or supplemented with base materials (such as dirt or sand) to form massive braces or walls. The right combination of hundreds or even thousands of UPBs can create everything from a comm unit to a laser weapon to powered armor. In their raw form, UPBs have a bulk of 1 per 1,000 UPBs, though when aligned and configured they can easily take up less bulk, and when configured for a specific purpose that calls for a minimum size and bracing (possibly combining them with inert materials), they can have a higher bulk.

UPBs are so ubiquitous that they are usable as currency in many major settlements and trade hubs. While credsticks are a more convenient and secure way to carry value, UPBs have the advantage of direct utility and untraceability. They are a popular way to pay smugglers and criminals, but they are also useful for trade missions to systems with UPB technology that don’t use credits as currency. The value of the Pact Worlds’ credit is based on the economic utility of a single UPB.

", - "unidentified": "" - }, - "source": "CRB pg. 233", - "type": "", - "quantity": 1, - "bulk": "1", - "price": 25, - "level": 1, - "attuned": false, - "equipped": false, - "equippable": false, - "identified": true, - "attributes": { - "sturdy": false, - "customBuilt": false, - "size": "medium", - "dex": { - "mod": "" - }, - "hp": { - "value": 6, - "max": "" - }, - "hardness": { - "value": "" - }, - "ac": { - "value": "" - } + flags: {}, + img: "systems/sfrpg/icons/equipment/goods/canteen.jpg", + effects: [] +} as IGoods +export const credStickTemplate = { + name: "Credstick (25 credits)", + type: "goods", + data: { + description: { + chat: "", + gmnotes: "", + short: "", + value: + '

Fortunately, the widespread use of the credstick circumvents
issues related to spending and storing currency. Flat and roughly
the size of a @Compendium[sfrpg.races.AMBcyDZDtJ1OOzh3]{Human} finger, ranging from cheap and disposable to
elaborate works of art, credsticks are a convenient way to carry
and spend money.

', + unidentified: "" + }, + source: "CRB pg. 166", + type: "", + quantity: 1, + bulk: "L", + price: 25, + level: 1, + attuned: false, + equipped: false, + equippable: false, + identified: true, + attributes: { + sturdy: false, + customBuilt: false, + size: "medium", + dex: { + mod: "" }, - "modifiers": [], - "damage": { - "parts": [] + hp: { + value: 6, + max: "" }, - "critical": { - "parts": [] + hardness: { + value: "" }, - "abilityMods": { - "parts": [] + ac: { + value: "" } }, - "flags": {}, - "img": "systems/sfrpg/icons/equipment/goods/upb.jpg", - "effects": [] + modifiers: [], + damage: { + parts: [] + }, + critical: { + parts: [] + }, + abilityMods: { + parts: [] + } }, - lighterTemplate: { - "name": "Lighter", - "type": "goods", - "data": { - "description": { - "chat": "", - "gmnotes": "", - "short": "", - "value": "

A lighter is a small canister containing a pressurized flammable liquid gas. When the lighter is activated, an electric arc ignites the gas, creating a tiny flame. You can light a small flame (such as a candle) as a swift action. Lighting a full fire is at least a full action or more, depending on the size and fuel of the fire. 

", - "unidentified": "" + flags: {}, + img: "systems/sfrpg/icons/equipment/goods/credstick.jpg", + effects: [] +} as IGoods +export const upbTemplate = { + name: "UPB (25)", + type: "goods", + data: { + description: { + chat: "", + gmnotes: "", + short: "", + value: + "

A universal polymer base, or UPB, is the basis for most technology in the Pact Worlds, the Veskarium, and many other systems. Each UPB is a tiny multifunction component, not much larger than a grain of rice, capable of being configured to act as a brace, capacitor, circuit, diode, fastener, insulator, lens, modulator, pipe, resistor, and dozens of other constituent parts. UPBs can even be spun out into fabric, broken down into component chemicals, reconstituted into new chemicals, or supplemented with base materials (such as dirt or sand) to form massive braces or walls. The right combination of hundreds or even thousands of UPBs can create everything from a comm unit to a laser weapon to powered armor. In their raw form, UPBs have a bulk of 1 per 1,000 UPBs, though when aligned and configured they can easily take up less bulk, and when configured for a specific purpose that calls for a minimum size and bracing (possibly combining them with inert materials), they can have a higher bulk.

UPBs are so ubiquitous that they are usable as currency in many major settlements and trade hubs. While credsticks are a more convenient and secure way to carry value, UPBs have the advantage of direct utility and untraceability. They are a popular way to pay smugglers and criminals, but they are also useful for trade missions to systems with UPB technology that don’t use credits as currency. The value of the Pact Worlds’ credit is based on the economic utility of a single UPB.

", + unidentified: "" + }, + source: "CRB pg. 233", + type: "", + quantity: 1, + bulk: "1", + price: 25, + level: 1, + attuned: false, + equipped: false, + equippable: false, + identified: true, + attributes: { + sturdy: false, + customBuilt: false, + size: "medium", + dex: { + mod: "" }, - "source": "Armory", - "type": "", - "quantity": 1, - "bulk": "L", - "price": 1, - "level": 1, - "attuned": false, - "equipped": false, - "equippable": false, - "identified": true, - "attributes": { - "sturdy": false, - "customBuilt": false, - "size": "medium", - "dex": { - "mod": "" - }, - "hp": { - "value": 6, - "max": "" - }, - "hardness": { - "value": "" - }, - "ac": { - "value": "" - } + hp: { + value: 6, + max: "" + }, + hardness: { + value: "" + }, + ac: { + value: "" + } + }, + modifiers: [], + damage: { + parts: [] + }, + critical: { + parts: [] + }, + abilityMods: { + parts: [] + } + }, + flags: {}, + img: "systems/sfrpg/icons/equipment/goods/upb.jpg", + effects: [] +} as IGoods +export const lighterTemplate = { + name: "Lighter", + type: "goods", + data: { + description: { + chat: "", + gmnotes: "", + short: "", + value: + '

A lighter is a small canister containing a pressurized flammable liquid gas. When the lighter is activated, an electric arc ignites the gas, creating a tiny flame. You can light a small flame (such as a candle) as a swift action. Lighting a full fire is at least a full action or more, depending on the size and fuel of the fire. 

', + unidentified: "" + }, + source: "Armory", + type: "", + quantity: 1, + bulk: "L", + price: 1, + level: 1, + attuned: false, + equipped: false, + equippable: false, + identified: true, + attributes: { + sturdy: false, + customBuilt: false, + size: "medium", + dex: { + mod: "" }, - "modifiers": [], - "damage": { - "parts": [] + hp: { + value: 6, + max: "" }, - "critical": { - "parts": [] + hardness: { + value: "" }, - "abilityMods": { - "parts": [] + ac: { + value: "" } }, - "flags": {}, - "img": "systems/sfrpg/icons/equipment/goods/lighter.jpg", - "effects": [] + modifiers: [], + damage: { + parts: [] + }, + critical: { + parts: [] + }, + abilityMods: { + parts: [] + } }, - purfumeTemplate: { - "name": "Perfume, Standard", - "type": "goods", - "data": { - "description": { - "chat": "", - "gmnotes": "", - "short": "", - "value": "

Perfume

\n

There is an immeasurable variety of perfumes and colognes in the galaxy, most tailored to the aesthetics of specific races with olfactory senses. A single dose of perfume lasts 1 hour, and a typical bottle of perfume contains 10 doses.

\n

 

\n

Standard aromas have a pleasant smell and can convey an air of hygiene, status, and wealth.

", - "unidentified": "" + flags: {}, + img: "systems/sfrpg/icons/equipment/goods/lighter.jpg", + effects: [] +} as IGoods +export const purfumeTemplate = { + name: "Perfume, Standard", + type: "goods", + data: { + description: { + chat: "", + gmnotes: "", + short: "", + value: + "

Perfume

\n

There is an immeasurable variety of perfumes and colognes in the galaxy, most tailored to the aesthetics of specific races with olfactory senses. A single dose of perfume lasts 1 hour, and a typical bottle of perfume contains 10 doses.

\n

 

\n

Standard aromas have a pleasant smell and can convey an air of hygiene, status, and wealth.

", + unidentified: "" + }, + source: "AR pg. 131", + type: "", + quantity: 1, + bulk: "L", + price: 50, + level: 1, + attuned: false, + equipped: false, + equippable: false, + identified: true, + attributes: { + sturdy: false, + customBuilt: false, + size: "medium", + dex: { + mod: "" }, - "source": "AR pg. 131", - "type": "", - "quantity": 1, - "bulk": "L", - "price": 50, - "level": 1, - "attuned": false, - "equipped": false, - "equippable": false, - "identified": true, - "attributes": { - "sturdy": false, - "customBuilt": false, - "size": "medium", - "dex": { - "mod": "" - }, - "hp": { - "value": 6, - "max": "" - }, - "hardness": { - "value": "" - }, - "ac": { - "value": "" - } + hp: { + value: 6, + max: "" + }, + hardness: { + value: "" + }, + ac: { + value: "" + } + }, + modifiers: [], + damage: { + parts: [] + }, + critical: { + parts: [] + }, + abilityMods: { + parts: [] + } + }, + flags: {}, + img: + "systems/sfrpg/icons/equipment/magic%20items/serum-of-appearance-change.jpg", + effects: [] +} as IGoods +export const intoxicantMinorTemplate = { + name: "Intoxicant, Minor", + type: "goods", + data: { + description: { + chat: "", + gmnotes: "", + short: "", + value: + '

The price and bulk listed here is of a single serving of an intoxicating beverage or inhaled substance, which in the Pact Worlds is most often alcohol or tobacco. An intoxicant’s potency can be minor or superior. A minor intoxicant might be beer or wine, which takes a few servings to cause any physiological effects. A superior intoxicant is usually a strong spirit, such as whiskey, that can start producing effects after a single serving. Unlike @Compendium[sfrpg.rules.aKqRtg165rAly1Cc]{Drugs}, intoxicants are usually not addictive, although a GM might rule that a PC who partakes of too much of an intoxicant on a regular basis might begin to suffer the effects of an addictive @Compendium[sfrpg.rules.aKqRtg165rAly1Cc]{Drug} (as described in @Compendium[sfrpg.rules.JaRMioj4isNp7r1P]{Afflictions} on page 417). 

', + unidentified: "" + }, + source: "Core Rulebook", + type: "", + quantity: 1, + bulk: "L", + price: 1, + level: 1, + attuned: false, + equipped: false, + equippable: false, + identified: true, + attributes: { + sturdy: false, + customBuilt: false, + size: "medium", + dex: { + mod: "" }, - "modifiers": [], - "damage": { - "parts": [] + hp: { + value: 6, + max: "" }, - "critical": { - "parts": [] + hardness: { + value: "" }, - "abilityMods": { - "parts": [] + ac: { + value: "" } }, - "flags": {}, - "img": "systems/sfrpg/icons/equipment/magic%20items/serum-of-appearance-change.jpg", - "effects": [] + modifiers: [], + damage: { + parts: [] + }, + critical: { + parts: [] + }, + abilityMods: { + parts: [] + } }, - intoxicantMinorTemplate: { - "name": "Intoxicant, Minor", - "type": "goods", - "data": { - "description": { - "chat": "", - "gmnotes": "", - "short": "", - "value": "

The price and bulk listed here is of a single serving of an intoxicating beverage or inhaled substance, which in the Pact Worlds is most often alcohol or tobacco. An intoxicant’s potency can be minor or superior. A minor intoxicant might be beer or wine, which takes a few servings to cause any physiological effects. A superior intoxicant is usually a strong spirit, such as whiskey, that can start producing effects after a single serving. Unlike @Compendium[sfrpg.rules.aKqRtg165rAly1Cc]{Drugs}, intoxicants are usually not addictive, although a GM might rule that a PC who partakes of too much of an intoxicant on a regular basis might begin to suffer the effects of an addictive @Compendium[sfrpg.rules.aKqRtg165rAly1Cc]{Drug} (as described in @Compendium[sfrpg.rules.JaRMioj4isNp7r1P]{Afflictions} on page 417). 

", - "unidentified": "" + flags: {}, + img: "systems/sfrpg/icons/equipment/goods/intoxicant.jpg", + effects: [] +} as IGoods +export const religiousSymbolTemplate = { + name: "Religious Symbol", + type: "goods", + data: { + description: { + chat: "", + gmnotes: "", + short: "", + value: + '

A religious symbol is a physical representation of a sacred image associated with a specific deity or religion, often worn as an amulet or badge. Each deity and religion has its own unique religious symbol. Religious symbols are usually mass-produced from cheap materials, such as plastic or thin metal, but they can be crafted out of other materials as well, with prices dependent on the material used. This item can also be used to represent badges or symbols of nonreligious organizations and groups. 

', + unidentified: "" + }, + source: "Armory", + type: "", + quantity: 1, + bulk: "L", + price: 2, + level: 1, + attuned: false, + equipped: false, + equippable: false, + identified: true, + attributes: { + sturdy: false, + customBuilt: false, + size: "medium", + dex: { + mod: "" }, - "source": "Core Rulebook", - "type": "", - "quantity": 1, - "bulk": "L", - "price": 1, - "level": 1, - "attuned": false, - "equipped": false, - "equippable": false, - "identified": true, - "attributes": { - "sturdy": false, - "customBuilt": false, - "size": "medium", - "dex": { - "mod": "" - }, - "hp": { - "value": 6, - "max": "" - }, - "hardness": { - "value": "" - }, - "ac": { - "value": "" - } + hp: { + value: 6, + max: "" }, - "modifiers": [], - "damage": { - "parts": [] + hardness: { + value: "" }, - "critical": { - "parts": [] + ac: { + value: "" + } + }, + modifiers: [], + damage: { + parts: [] + } + }, + flags: {}, + img: "systems/sfrpg/icons/equipment/goods/religious-symbol.jpg", + effects: [] +} as IGoods +export const ropeTemplate = { + name: "Rope", + type: "goods", + data: { + description: { + chat: "", + gmnotes: "", + short: "", + value: + '

Synthetic rope is exceptionally durable, elastic, and specifically designed to be easy to grip and climb. Although it lacks the strength and durability of cable lines, synthetic rope is significantly cheaper and lighter than those alternatives. 

', + unidentified: "" + }, + source: "AR pg. 131", + type: "", + quantity: 1, + bulk: "L", + price: 1, + level: 1, + attuned: false, + equipped: false, + equippable: false, + identified: true, + attributes: { + sturdy: false, + customBuilt: false, + size: "medium", + dex: { + mod: "" + }, + hp: { + value: 6, + max: "" }, - "abilityMods": { - "parts": [] + hardness: { + value: "" + }, + ac: { + value: "" } }, - "flags": {}, - "img": "systems/sfrpg/icons/equipment/goods/intoxicant.jpg", - "effects": [] - } -} - + modifiers: [], + damage: { + parts: [] + } + }, + flags: {}, + img: "systems/sfrpg/icons/equipment/goods/rope.jpg", + effects: [] +} as IGoods diff --git a/src/data/MonsterCreation.ts b/src/data/MonsterCreation.ts index d496dad..35d3af1 100644 --- a/src/data/MonsterCreation.ts +++ b/src/data/MonsterCreation.ts @@ -1,38 +1,407 @@ -export const CR = ["1/3", "1/2", "1", "2"] +import UniversalCreatureRule from "../models/UniversalCreatureRule.js" +import { UniversalCreatureRules } from "./universal creature rules/UniversalCreatureRules.js" +import AdjustmentSpecialAbility from "../models/AdjustmentSpecialAbility.js" -export const MonsterCreation = { +/// List of creature combat ratings +export const CR = [ + "1/3", + "1/2", + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10" +] + +// List of creature save types +export enum Save { + fortitude = "fort", + reflex = "reflex", + willpower = "will" +} + +/// List of creature gender identities +export enum Gender { + male = "male", + female = "female", + nonBinary = "non-binary" +} + +/// List of creature sizes +export enum Size { + small, + medium, + large +} + +/// List of Monster Reference Symbols +export enum MonsterReferenceSymbol { + combatant, + expert, + spellcaster +} +export enum MonsterSkillType { + good, + master +} + +/// Collection of monster creation statistics and special abilities used to generate new creatures +export const MonsterCreation = { arrays: { // Expert Arrays expert: { - name: "expert", + name: MonsterReferenceSymbol.expert, main: { - "1/3": {CR: CR[0], EAC: 10, KAC: 11, fort: 0, reflex: 0, will: 2, HP: 6, abilityMods: [3,1,0], masterSkill: {count: 3, mod: 7}, goodSkill: {count: 2, mod: 3} }, - "1/2": {CR: CR[1], EAC: 10, KAC: 11, fort: 0, reflex: 0, will: 3, HP: 12 , abilityMods: [3,2,1], masterSkill: {count: 3, mod: 9}, goodSkill: {count: 2, mod: 4} }, - "1": {CR: CR[2], EAC: 11, KAC: 12, fort: 1, reflex: 1, will: 4, HP: 17 , abilityMods: [4,2,1], masterSkill: {count: 3, mod: 10}, goodSkill: {count: 2, mod: 5} }, - "2": {CR: CR[3], EAC: 13, KAC: 14, fort: 1, reflex: 1, will: 5, HP: 23 , abilityMods: [4,2,1], masterSkill: {count: 3, mod: 12}, goodSkill: {count: 2, mod: 7} } + "1/3": { + CR: CR[0], + EAC: 10, + KAC: 11, + fort: 0, + reflex: 0, + will: 2, + HP: 6, + abilityMods: [3, 1, 0], + specialAbilities: 1, + masterSkill: { count: 3, mod: 7 }, + goodSkill: { count: 2, mod: 3 } + } as IMainArrayRow, + "1/2": { + CR: CR[1], + EAC: 10, + KAC: 11, + fort: 0, + reflex: 0, + will: 3, + HP: 12, + abilityMods: [3, 2, 1], + specialAbilities: 1, + masterSkill: { count: 3, mod: 9 }, + goodSkill: { count: 2, mod: 4 } + } as IMainArrayRow, + "1": { + CR: CR[2], + EAC: 11, + KAC: 12, + fort: 1, + reflex: 1, + will: 4, + HP: 17, + abilityMods: [4, 2, 1], + specialAbilities: 1, + masterSkill: { count: 3, mod: 10 }, + goodSkill: { count: 2, mod: 5 } + } as IMainArrayRow, + "2": { + CR: CR[3], + EAC: 13, + KAC: 14, + fort: 1, + reflex: 1, + will: 5, + HP: 23, + abilityMods: [4, 2, 1], + specialAbilities: 1, + masterSkill: { count: 3, mod: 12 }, + goodSkill: { count: 2, mod: 7 } + } as IMainArrayRow, + "3": { + CR: CR[4], + EAC: 14, + KAC: 15, + fort: 2, + reflex: 2, + will: 6, + HP: 35, + abilityMods: [4, 2, 1], + specialAbilities: 2, + masterSkill: { count: 3, mod: 13 }, + goodSkill: { count: 2, mod: 8 } + } as IMainArrayRow, + "4": { + CR: CR[5], + EAC: 16, + KAC: 17, + fort: 3, + reflex: 3, + will: 7, + HP: 45, + abilityMods: [5, 3, 1], + specialAbilities: 2, + masterSkill: { count: 3, mod: 15 }, + goodSkill: { count: 2, mod: 10 } + } as IMainArrayRow, + "5": { + CR: CR[6], + EAC: 17, + KAC: 18, + fort: 4, + reflex: 4, + will: 8, + HP: 65, + abilityMods: [5, 3, 2], + specialAbilities: 2, + masterSkill: { count: 3, mod: 16 }, + goodSkill: { count: 2, mod: 11 } + } as IMainArrayRow }, attack: { - "1/3": {high: 2, low: 0, energy: "1d4", kinetic: "1d4", standard: "1d4 + @abilities.str.mod" }, - "1/2": {high: 4, low: 2, energy: "1d4", kinetic: "1d4", standard: "1d4 + @abilities.str.mod" }, - "1": {high: 6, low: 4, energy: "1d4+1", kinetic: "1d4+1", standard: "1d4 + 1 + @abilities.str.mod" }, - "2": {high: 8, low: 6, energy: "1d4+2", kinetic: "1d4+2", standard: "1d4 + 2 + @abilities.str.mod" } + "1/3": { + high: 2, + low: 0, + energy: "1d4", + kinetic: "1d4", + standard: "1d4 + @abilities.str.mod" + } as IMainArrayRow, + "1/2": { + high: 4, + low: 2, + energy: "1d4", + kinetic: "1d4", + standard: "1d4 + @abilities.str.mod" + } as IMainArrayRow, + "1": { + high: 6, + low: 4, + energy: "1d4+1", + kinetic: "1d4+1", + standard: "1d4 + 1 + @abilities.str.mod" + } as IMainArrayRow, + "2": { + high: 8, + low: 6, + energy: "1d4+2", + kinetic: "1d4+2", + standard: "1d4 + 2 + @abilities.str.mod" + } as IMainArrayRow, + "3": { + high: 9, + low: 7, + energy: "1d4+3", + kinetic: "1d4+3", + standard: "1d4 + 3 + @abilities.str.mod" + } as IMainArrayRow, + "4": { + high: 10, + low: 8, + energy: "1d4+4", + kinetic: "1d4+4", + standard: "1d4 + 4 + @abilities.str.mod" + } as IMainArrayRow, + "5": { + high: 12, + low: 10, + energy: "1d4+5", + kinetic: "1d6+5", + standard: "1d4 + 5 + @abilities.str.mod" + } as IMainArrayRow, + "6": { + high: 14, + low: 12, + energy: "1d6+6", + kinetic: "1d8+6", + standard: "1d6 + 6 + @abilities.str.mod" + } as IMainArrayRow, + "7": { + high: 15, + low: 13, + energy: "1d8+7", + kinetic: "1d12+7", + standard: "1d8 + 7 + @abilities.str.mod" + } as IMainArrayRow } }, combatant: { - name: "combatant", + name: MonsterReferenceSymbol.combatant, main: { - "1/3": {CR: CR[0], EAC: 10, KAC: 12, fort: 1, reflex: 1, will: 0, HP: 6, abilityMods: [3,1,0], masterSkill: {count: 1, mod: 7}, goodSkill: {count: 2, mod: 3} }, - "1/2": {CR: CR[1], EAC: 10, KAC: 12, fort: 2, reflex: 2, will: 0, HP: 13 , abilityMods: [3,2,1], masterSkill: {count: 1, mod: 9}, goodSkill: {count: 2, mod: 4} }, - "1": {CR: CR[2], EAC: 11, KAC: 13, fort: 3, reflex: 3, will: 1, HP: 20 , abilityMods: [4,2,1], masterSkill: {count: 1, mod: 10}, goodSkill: {count: 2, mod: 5} }, - "2": {CR: CR[3], EAC: 13, KAC: 15, fort: 4, reflex: 4, will: 1, HP: 25 , abilityMods: [4,2,1], masterSkill: {count: 1, mod: 12}, goodSkill: {count: 2, mod: 7} } + "1/3": { + CR: CR[0], + EAC: 10, + KAC: 12, + fort: 1, + reflex: 1, + will: 0, + HP: 6, + abilityMods: [3, 1, 0], + specialAbilities: 1, + masterSkill: { count: 1, mod: 7 }, + goodSkill: { count: 2, mod: 3 } + } as IMainArrayRow, + "1/2": { + CR: CR[1], + EAC: 10, + KAC: 12, + fort: 2, + reflex: 2, + will: 0, + HP: 13, + abilityMods: [3, 2, 1], + specialAbilities: 1, + masterSkill: { count: 1, mod: 9 }, + goodSkill: { count: 2, mod: 4 } + } as IMainArrayRow, + "1": { + CR: CR[2], + EAC: 11, + KAC: 13, + fort: 3, + reflex: 3, + will: 1, + HP: 20, + abilityMods: [4, 2, 1], + specialAbilities: 1, + masterSkill: { count: 1, mod: 10 }, + goodSkill: { count: 2, mod: 5 } + } as IMainArrayRow, + "2": { + CR: CR[3], + EAC: 13, + KAC: 15, + fort: 4, + reflex: 4, + will: 1, + HP: 25, + abilityMods: [4, 2, 1], + specialAbilities: 2, + masterSkill: { count: 1, mod: 12 }, + goodSkill: { count: 2, mod: 7 } + } as IMainArrayRow, + "3": { + CR: CR[4], + EAC: 14, + KAC: 16, + fort: 5, + reflex: 5, + will: 2, + HP: 40, + abilityMods: [4, 2, 1], + specialAbilities: 2, + masterSkill: { count: 1, mod: 13 }, + goodSkill: { count: 2, mod: 8 } + } as IMainArrayRow, + "4": { + CR: CR[5], + EAC: 16, + KAC: 18, + fort: 6, + reflex: 6, + will: 3, + HP: 50, + abilityMods: [5, 3, 1], + specialAbilities: 2, + masterSkill: { count: 1, mod: 15 }, + goodSkill: { count: 2, mod: 10 } + } as IMainArrayRow, + "5": { + CR: CR[6], + EAC: 17, + KAC: 19, + fort: 7, + reflex: 7, + will: 4, + HP: 70, + abilityMods: [5, 3, 2], + specialAbilities: 2, + masterSkill: { count: 1, mod: 16 }, + goodSkill: { count: 2, mod: 11 } + } as IMainArrayRow }, attack: { - "1/3": {high: 4, low: 1, energy: "1d4", kinetic: "1d4", standard: "1d6 + @abilities.str.mod" }, - "1/2": {high: 6, low: 3, energy: "1d4", kinetic: "1d6", standard: "1d6 + @abilities.str.mod" }, - "1": {high: 8, low: 5, energy: "1d4+1", kinetic: "1d6+1", standard: "1d6 + 1 + @abilities.str.mod" }, - "2": {high: 10, low: 7, energy: "1d4+2", kinetic: "1d6+2", standard: "1d6 + 2 + @abilities.str.mod" } + "1/3": { + high: 4, + low: 1, + energy: "1d4", + kinetic: "1d4", + standard: "1d6 + @abilities.str.mod" + } as IMainArrayRow, + "1/2": { + high: 6, + low: 3, + energy: "1d4", + kinetic: "1d6", + standard: "1d6 + @abilities.str.mod" + } as IMainArrayRow, + "1": { + high: 8, + low: 5, + energy: "1d4+1", + kinetic: "1d6+1", + standard: "1d6 + 1 + @abilities.str.mod" + } as IMainArrayRow, + "2": { + high: 10, + low: 7, + energy: "1d4+2", + kinetic: "1d6+2", + standard: "1d6 + 2 + @abilities.str.mod" + } as IMainArrayRow, + "3": { + high: 11, + low: 8, + energy: "1d4+3", + kinetic: "1d6+3", + standard: "1d6 + 3 + @abilities.str.mod" + } as IMainArrayRow, + "4": { + high: 12, + low: 9, + energy: "1d4+4", + kinetic: "1d6+4", + standard: "1d6 + 4 + @abilities.str.mod" + } as IMainArrayRow, + "5": { + high: 14, + low: 11, + energy: "1d6+5", + kinetic: "1d8+5", + standard: "1d6 + 5 + @abilities.str.mod" + } as IMainArrayRow, + "6": { + high: 16, + low: 13, + energy: "1d10+6", + kinetic: "2d6+6", + standard: "1d8 + 6 + @abilities.str.mod" + } as IMainArrayRow, + "7": { + high: 17, + low: 14, + energy: "2d6+7", + kinetic: "2d8+7", + standard: "2d6 + 7 + @abilities.str.mod" + } as IMainArrayRow } } + }, + specialAbilities: { + universalCreatureRule: { + ferocity: UniversalCreatureRules.ferocity, + naturalWeapons: UniversalCreatureRules.naturalWeapons, + integratedWeapons: UniversalCreatureRules.integratedWeapons + }, + adjustment: { + brute: new AdjustmentSpecialAbility( + "brute", + "Use the low attack value for the NPC’s main attack, but determine the attack’s damage as if the NPC’s CR were 2 higher (adding the extra damage from weapon specialization). This special ability has a greater impact at higher CRs." + ), + extraHitPoints: new AdjustmentSpecialAbility( + "extra hit points", + "Increase the NPC’s HP by 20%." + ), + saveBoost: new AdjustmentSpecialAbility( + "save boost", + "Increase all saving throw bonuses by 1 or one saving throw bonus by 3." + ), + //TODO: Secondary Magic + skillful: new AdjustmentSpecialAbility( + "skillful", + "Increase all master and good skill bonuses by 1." + ) + } } -}; \ No newline at end of file +} diff --git a/src/data/Names.js b/src/data/Names.js index 74efd7a..f363e37 100644 --- a/src/data/Names.js +++ b/src/data/Names.js @@ -1,65 +1,537 @@ -export const Names = {}; +export const Names = {} // TODO: Currently best suited in JavaScript, too much boilerplate involved in expressing in TypeScript. Should re-evaluate in future when more experienced. // NOTE: Default is also used for human names + // Default -Names.default = { male: {}, female: {}, other: {} }; -Names.default.format = "{0} {1}"; -Names.default.other.first = ["Sam", "Riley"]; -Names.default.male.first = [ "Adrian", "Alex", "Alfred", "Bob", "Dale", "George", "John", "Jordan", "Jovan", "Tom", "Reginald", "Ryan" ].concat(Names.default.other.first); -Names.default.female.first = [ "Alice", "Cara", "Jenn", "Tess", "Rachel", "Rebecca", "Tina", "Trish" ].concat(Names.default.other.first); -Names.default.last = [ "Adamson", "Black", "Johnson", "Mason", "Thompson", "Slat", "Stone", "Richards", "Ronson", "Watson", "White" ]; +Names.default = { format: "{0} {1}", male: {}, female: {}, other: {} } +Names.default.other.first = ["Sam", "Riley"] +Names.default.male.first = [ + "Adrian", + "Alex", + "Alfred", + "Bob", + "Dale", + "George", + "John", + "Jordan", + "Jovan", + "Tom", + "Reginald", + "Ryan" +].concat(Names.default.other.first) +Names.default.female.first = [ + "Alice", + "Cara", + "Jenn", + "Tess", + "Rachel", + "Rebecca", + "Tina", + "Trish" +].concat(Names.default.other.first) +Names.default.last = [ + "Adamson", + "Black", + "Johnson", + "Mason", + "Thompson", + "Slat", + "Stone", + "Richards", + "Ronson", + "Watson", + "White" +] // Exotic -Names.exotic = { male: {}, female: {}, other: {} }; -Names.exotic.format = "{0}{1}"; -Names.exotic.other.first = [ "Abrog", "Amiell", "Egnils", "Eskas", "Folta", "Kusi", "Lessaith", "Nukteins", "Oltah", "Qharruits", "Qhihrer", "Sea", "Sugik", "Tasosh", "Throlphirs", "Vu"]; -Names.exotic.male.first = Names.exotic.other.first; -Names.exotic.female.first = Names.exotic.other.first; -Names.exotic.denominator = ["'a", "-a", " a", "a", "bo", "cha", "'o", "oyo", "s", "", "", "", "", "", "", "", ""]; // Denominators are appended onto name without a space -Names.exotic.last = [""]; // No last names +Names.exotic = { male: {}, female: {}, other: {} } +Names.exotic.format = "{0}{1}" +Names.exotic.other.first = [ + "Abrog", + "Amiell", + "Egnils", + "Eskas", + "Folta", + "Kusi", + "Lessaith", + "Nukteins", + "Oltah", + "Qharruits", + "Qhihrer", + "Sea", + "Sugik", + "Tasosh", + "Throlphirs", + "Vu" +] +Names.exotic.male.first = Names.exotic.other.first +Names.exotic.female.first = Names.exotic.other.first +Names.exotic.denominator = [ + "'a", + "-a", + " a", + "a", + "bo", + "cha", + "'o", + "oyo", + "s", + "", + "", + "", + "", + "", + "", + "", + "" +] // Denominators are appended onto name without a space +Names.exotic.last = [""] // No last names // Android -Names.android = { male: {}}; -Names.android.format = "{0}{1}"; -Names.android.male.first = [ "Article", "Avoph", "Burst", "Clarity", "Fluke", "Mercy", "Magic", "Mode", "Requiem", "Simple", "Wisdom", "Union" ]; -Names.android.denominator = ["-0", "-1", "-2", "-3","-4","-55","-7", "-12", "-64","-99", "", "", "", ""]; // Denominators are appended onto name without a space -Names.android.last = [""]; // No last names +Names.android = { male: {} } +Names.android.format = "{0}{1}" +Names.android.male.first = [ + "Article", + "Avoph", + "Burst", + "Clarity", + "Fluke", + "Mercy", + "Magic", + "Mode", + "Requiem", + "Simple", + "Wisdom", + "Union" +] +Names.android.denominator = [ + "-0", + "-1", + "-2", + "-3", + "-4", + "-55", + "-7", + "-12", + "-64", + "-99", + "", + "", + "", + "" +] // Denominators are appended onto name without a space +Names.android.last = [""] // No last names // Dwarf -Names.dwarf = { male: {}, female: {} }; -Names.dwarf.male.first = [ "Luldream", "Ginik", "Grolgulir", "Nodrac", "Turgrol", "Yarbud" ]; -Names.dwarf.female.first = [ "Lokhubela", "Hozzida", "Gotribera", "Sarsolda", "Yagraeda", "Yarohilda" ]; -Names.dwarf.last = [ "Barrelshoulder", "Bristleshield", "Bronzemaker", "Coalstone", "Ironcview", "Koboldbow", "Largebrow", "Orebreaker", "Wraithgranite" ]; -Names.drow = { male: {}, female: {} }; -Names.drow.male.first = [ "Arcavato", "Dantrag", "Dresmorlin", "Dro", "Drovic", "Duagloth", "Durdyn", "Firyin", "Kaelmourn", "Gogloth", "Nyloth", "Merrryn", "Mirrendier", "Naltel", "Pharnox", "Syrendross", "Rizraen", "Zov"]; -Names.drow.female.first = [ "Ahlysaaria", "Belmarniss", "Cylellinth", "Drada", "Dralia", "Drisinil", "Ilvaria", "Johysis", "Jysdra", "Jhaelnitra", "Loscivia", "Ghina", "Neerda" , "Tyvorhan", "Ulumbralya", "Volundeil" ]; -Names.drow.last = [ "Abaeir", "Abbylan", "Argith", "Baenre", "Beltaulur", "Blaerabban", "Blundyth", "Chaulssin", "Coborel", "Coloara", "Cormrael", "Daevion'lyr", "Dalael", "Dhalmass", "Dryaalis", "Dyrr", "Duskryn", "Mizzrarran", "Mizzrear", "T'orgh", "Vrinn", "Zaphresz", "Zauviir", "Zolond" ]; -Names.drow.denominator = [" of House Zeizerer", " of House Arabani", " of House Cyrocaust", " of House Xicton", " of House Blasfamus", "", "", "", "", "", "", "", "", "", "", ""]; // Denominators are appended onto name without a space +Names.dwarf = { male: {}, female: {} } +Names.dwarf.male.first = [ + "Luldream", + "Ginik", + "Grolgulir", + "Nodrac", + "Turgrol", + "Yarbud" +] +Names.dwarf.female.first = [ + "Lokhubela", + "Hozzida", + "Gotribera", + "Sarsolda", + "Yagraeda", + "Yarohilda" +] +Names.dwarf.last = [ + "Barrelshoulder", + "Bristleshield", + "Bronzemaker", + "Coalstone", + "Ironcview", + "Koboldbow", + "Largebrow", + "Orebreaker", + "Wraithgranite" +] +// Drow +Names.drow = { male: {}, female: {} } +Names.drow.male.first = [ + "Arcavato", + "Dantrag", + "Dresmorlin", + "Dro", + "Drovic", + "Duagloth", + "Durdyn", + "Firyin", + "Kaelmourn", + "Gogloth", + "Nyloth", + "Merrryn", + "Mirrendier", + "Naltel", + "Pharnox", + "Syrendross", + "Rizraen", + "Zov" +] +Names.drow.female.first = [ + "Ahlysaaria", + "Belmarniss", + "Cylellinth", + "Drada", + "Dralia", + "Drisinil", + "Ilvaria", + "Johysis", + "Jysdra", + "Jhaelnitra", + "Loscivia", + "Ghina", + "Neerda", + "Tyvorhan", + "Ulumbralya", + "Volundeil" +] +Names.drow.last = [ + "Abaeir", + "Abbylan", + "Argith", + "Baenre", + "Beltaulur", + "Blaerabban", + "Blundyth", + "Chaulssin", + "Coborel", + "Coloara", + "Cormrael", + "Daevion'lyr", + "Dalael", + "Dhalmass", + "Dryaalis", + "Dyrr", + "Duskryn", + "Mizzrarran", + "Mizzrear", + "T'orgh", + "Vrinn", + "Zaphresz", + "Zauviir", + "Zolond" +] +Names.drow.denominator = [ + " of House Zeizerer", + " of House Arabani", + " of House Cyrocaust", + " of House Xicton", + " of House Blasfamus", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "", + "" +] // Denominators are appended onto name without a space +// Elf +Names.elf = { male: {}, female: {} } +Names.elf.male.first = [ + "Cul", + "Elvoss", + "Fin", + "Keis", + "Krel", + "Hom", + "Icvin", + "Mas", + "Mass", + "Nem", + "Nothi", + "Sass", + "Tasil", + "Utham", + "Vir", + "Zeis", + "Zemuglogom" +] +Names.elf.female.first = [ + "Arri", + "Acae", + "Alle", + "Ila", + "Phali", + "Phaves", + "Saahhil", + "Sinnis", + "Sumanrin", + "Yarnis", + "Vuha", + "Ulma" +] +Names.elf.last = [ + "Car", + "Das", + "Essu", + "Kor", + "Kos", + "Jier", + "Mis", + "Oreldlun", + "Sam", + "Sharliphos", + "Veeclor", + "Yurayu", + "Vam", + "Vuna" +] +// Half-elf (uses default names) +// Half-orc +Names.halfOrc = { male: {}, female: {} } +Names.halfOrc.male.first = [ + "Bazzosk", + "Bros", + "Buk", + "Hezrulm", + "Ogdig", + "Purg" +] +Names.halfOrc.female.first = [ + "Rabla", + "Habre", + "Hedli", + "Ohralru", + "Rzela", + "Vabla" +] +Names.halfOrc.last = [ + "Bak", + "Ber", + "Dazro", + "Dom", + "Ekaxle", + "Jirvi", + "Jom", + "Juxlanrev", + "Revomutsky", + "Rozkum", + "Tondrerem", + "Som", + "Soshky", + "Wiz", + "Vux" +] // Halfling -Names.halfling = { male: {}, female: {} }; -Names.halfling.male.first = ["Balderic", "Drogo", "Filbo", "Samwise", "Sorbo"].concat(Names.default.male.first); //Default first names are appropriate for halflings as well -Names.halfling.female.first = ["Berenga", "Hilda", "Lalia", "Sherry", "Pamphila"].concat(Names.default.female.first); //Default first names are appropriate for halflings as well -Names.halfling.last = [ "Biggums", "Boulderhill", "Gardner", "Goodchild", "Langham", "Oakbottom", "Smallburrow", "Thornburrow", "Underhill", "Undertree"]; +Names.halfling = { male: {}, female: {} } +Names.halfling.male.first = [ + "Balderic", + "Drogo", + "Filbo", + "Samwise", + "Sorbo" +].concat(Names.default.male.first) //Default first names are appropriate for halflings as well +Names.halfling.female.first = [ + "Berenga", + "Hilda", + "Lalia", + "Sherry", + "Pamphila" +].concat(Names.default.female.first) //Default first names are appropriate for halflings as well +Names.halfling.last = [ + "Biggums", + "Boulderhill", + "Gardner", + "Goodchild", + "Langham", + "Oakbottom", + "Smallburrow", + "Thornburrow", + "Underhill", + "Undertree" +] +// Hobgoblin +Names.hobgoblin = { male: {} } +Names.hobgoblin.male.first = [ + "Dithik", + "Drarud", + "Ettod", + "Ketreng", + "Ditrer", + "Kerdun", + "Nogtod", + "Relbim", + "Radret", + "Sakhang", + "Talbin" +] +Names.hobgoblin.last = [""] // No last names // Gnoll -Names.gnoll = { male: {}, female: {}, other: {} }; -Names.gnoll.other.first = ["Ot", "Sru", "Gnet"]; -Names.gnoll.male.first = ["Gryzat", "Gnekerk", "Triak", "Uk"].concat(Names.gnoll.other.first); -Names.gnoll.female.first = ["Byz", "Meih", "Nyhn", "Thiar"].concat(Names.gnoll.other.first); -Names.gnoll.last = [ "" ]; // No last names +Names.gnoll = { male: {}, female: {}, other: {} } +Names.gnoll.other.first = ["Ot", "Sru", "Gnet"] +Names.gnoll.male.first = ["Gryzat", "Gnekerk", "Triak", "Uk"].concat( + Names.gnoll.other.first +) +Names.gnoll.female.first = ["Byz", "Meih", "Nyhn", "Thiar"].concat( + Names.gnoll.other.first +) +Names.gnoll.last = [""] // No last names // Gnome -Names.gnome = { male: {}, female: {}, other: {} }; -Names.gnome.other.first = ["Glakpap", "Gnefipnoc", "Hednibyl", "Mansbikuc", "Mawugbert", "Zulmen"]; -Names.gnome.male.first = ["Blakweda", "Clilbefut", "Shaimbess", "Shelben", "Wanudlym"].concat(Names.gnome.other.first); -Names.gnome.female.first = ["Boovikort", "Gobkirt", "Slunsmat", "Wupnic", "Zemzap"].concat(Names.gnome.other.first); -Names.gnome.last = [ "" ]; // No last names +Names.gnome = { male: {}, female: {}, other: {} } +Names.gnome.other.first = [ + "Glakpap", + "Gnefipnoc", + "Hednibyl", + "Mansbikuc", + "Mawugbert", + "Zulmen" +] +Names.gnome.male.first = [ + "Blakweda", + "Clilbefut", + "Shaimbess", + "Shelben", + "Wanudlym" +].concat(Names.gnome.other.first) +Names.gnome.female.first = [ + "Boovikort", + "Gobkirt", + "Slunsmat", + "Wupnic", + "Zemzap" +].concat(Names.gnome.other.first) +Names.gnome.last = [""] // No last names // Kasatha -Names.kasatha = { male: {} }; -Names.kasatha.male.first = [ "Cas", "De Holetif", "Gotaldus", "Jatsol", "Jiltof", "Maecran", "Mahas", "Nilaltrom", "Tursal", "Tyemsil", "Zuna" ]; // All Kasatha names are non-gendered -Names.kasatha.last = [ "" ]; // No last names +Names.kasatha = { male: {} } +Names.kasatha.male.first = [ + "Cas", + "De Holetif", + "Gotaldus", + "Jatsol", + "Jiltof", + "Maecran", + "Mahas", + "Nilaltrom", + "Tursal", + "Tyemsil", + "Zuna" +] // All Kasatha names are non-gendered +Names.kasatha.last = [""] // No last names // Lashunta (uses default names) +Names.lashunta = { male: {} } +Names.lashunta.male.first = [ + "All", + "Dasel", + "Doles", + "Eieny", + "Iss", + "Ma", + "Mekafi", + "Niamas", + "Novo", + "Os", + "Thirenes", + "Seva", + "Taeoss", + "Te", + "Thofudol", + "Tonell", + "Vila", + "Zhaloloss", + "Zhefuh", + "Zinell", + "Zhohi" +] // All Lashunta names are non-gendered +Names.lashunta.last = [""] // No last names // Naur (uses exotic names) -Names.nuar = Names.exotic; +Names.nuar = Names.exotic // Shirren (uses exotic names) -Names.shirren = Names.exotic; +Names.shirren = Names.exotic // Skittermander (uses exotic names) -Names.skittermander = Names.exotic; +Names.skittermander = Names.exotic // Vesk (uses exotic names) -Names.vesk = Names.exotic; -// Ysoki (uses default names) \ No newline at end of file +Names.vesk = Names.exotic +// Ysoki (uses default names) +// Creature type names +Names.animal = { male: {} } +Names.animal.format = "{0}{1}" +Names.animal.male.first = [ + "Astra", + "Barnn", + "Coyo", + "Cy", + "Flam", + "Hippo", + "Mega", + "Neo", + "Ovi", + "Omni" +] // Used for first half of animal name +Names.animal.last = ["iguano", "raptor", "aroo", "", ""] // Used for second half of animal name +Names.animal.denominator = [ + "don", + "saur", + "oda", + "opus", + "amimus", + "mander", + "", + "", + "", + "", + "", + "" +] // Used as an optional suffix in the animal name +// +Names.construct = { male: {} } +Names.construct.format = "{0}{1}" +Names.construct.male.first = ["Buzz", "Zap", "Shoot", "Swoosh"] +Names.construct.last = ["bot", "inator"] +Names.construct.denominator = [ + "", + " 0", + " 1", + " 2", + " 3", + " 4", + " 5", + " 6", + " 2000", + " 3000" +] +// +Names.ooze = { male: {} } +Names.ooze.format = "{0}" +Names.ooze.male.first = [ + "Bloop", + "Boop", + "Brupp", + "Brzz", + "Floop", + "Froop", + "Fzzz", + "Goop", + "Gzzz", + "Sloop", + "Szzz", + "Zoop", + "Zzt" +] +Names.ooze.last = [] // Only uses first names +// +Names.vermin = { male: {} } +Names.vermin.format = "{0}{1}" +Names.vermin.male.first = [ + "Archae", + "Anthi", + "Anobi", + "Bembi", + "Cleri", + "Chrysi", + "Evani", + "Ichneu", + "Lepido", + "Manto", + "Mega", + "Trogo", + "Xylo" +] // Used for first half of animal name +Names.vermin.last = ["bio", "dea", "mero", "somelidae", "tera"] // Used for second half of vermin name +Names.vermin.denominator = ["pede", " spider", " worm", "", "", ""] diff --git a/src/data/Probabilities.ts b/src/data/Probabilities.ts index 63c93e4..405e1fb 100644 --- a/src/data/Probabilities.ts +++ b/src/data/Probabilities.ts @@ -1,22 +1,23 @@ -export const Probabilities = { +import { Gender } from "./MonsterCreation.js" +export const Probabilities = { // This distribution is based on my assumption that 50% of characters are good, 40% are bad and 10% are evil. // TODO: Allow customization of these values - alignmentDistributions : { + alignmentDistributions: { default: [ // Good - {name: "LG", percentage: 0.17}, - {name: "NG", percentage: 0.17}, - {name: "CG", percentage: 0.16}, + { name: "LG", percentage: 0.17 }, + { name: "NG", percentage: 0.17 }, + { name: "CG", percentage: 0.16 }, // Neutral - {name: "LN", percentage: 0.14}, - {name: "N", percentage: 0.13}, - {name: "CN", percentage: 0.13}, + { name: "LN", percentage: 0.14 }, + { name: "N", percentage: 0.13 }, + { name: "CN", percentage: 0.13 }, // Evil - {name: "LE", percentage: 0.4}, - {name: "NE", percentage: 0.3}, - {name: "CE", percentage: 0.3} - ] + { name: "LE", percentage: 0.4 }, + { name: "NE", percentage: 0.3 }, + { name: "CE", percentage: 0.3 }, + ], }, // The default distribution of races in a neutral environment when generating a humanoid // NOTE: Currently based on Absalom Station settlement distribution @@ -24,30 +25,33 @@ export const Probabilities = { // TODO: Allow customization of these values raceDistributions: { default: [ - {name: "android", percentage: 0.09}, - {name: "dwarf", percentage: 0.04}, - {name: "drow", percentage: 0.02}, // This, Gnoll, and Skittermanders represents the 6% "other" for now - {name: "human", percentage: 0.46}, - {name: "kasatha", percentage: 0.04}, - {name: "gnoll", percentage: 0.02}, // This, Drow, and Skittermanders represents the 6% "other" for now - {name: "gnome", percentage: 0.02}, - {name: "halfling", percentage: 0.04}, - {name: "lashunta", percentage: 0.07}, - {name: "nuar", percentage: 0.01}, - {name: "shirren", percentage: 0.05}, - {name: "skittermander", percentage: 0.02}, // This, Gnoll, and Drow represent the 6% "other" for now - {name: "ysoki", percentage: 0.09}, - {name: "vesk", percentage: 0.03} - ] + { name: "android", percentage: 0.09 }, + { name: "dwarf", percentage: 0.04 }, + { name: "drow", percentage: 0.01 }, // Represents part of the 6% "other" for now + { name: "elf", percentage: 0.01 }, // Represents part of the 6% "other" for now + { name: "kasatha", percentage: 0.04 }, + { name: "gnoll", percentage: 0.01 }, // Represents part of the 6% "other" for now + { name: "gnome", percentage: 0.02 }, + { name: "halfElf", percentage: 0.01 }, // Represents part of the 6% "other" for now + { name: "halfOrc", percentage: 0.01 }, // Represents part of the 6% "other" for now + { name: "halfling", percentage: 0.04 }, + { name: "human", percentage: 0.46 }, + { name: "lashunta", percentage: 0.07 }, + { name: "nuar", percentage: 0.01 }, + { name: "shirren", percentage: 0.05 }, + { name: "skittermander", percentage: 0.01 }, // Represents part of the 6% "other" for now + { name: "ysoki", percentage: 0.09 }, + { name: "vesk", percentage: 0.03 }, + ], }, // NOTE: Extrapolated from 2019 Canadian census: https://www12.statcan.gc.ca/census-recensement/2021/ref/98-20-0002/982000022020002-eng.cfm // TODO: Allow customization if your world has a different distribution // NOTE: Should consider gender distributions by race, ie. Drow is a matriarchal society genderDistributions: { default: [ - {name: "male", percentage: 0.49}, - {name: "female", percentage: 0.50}, - {name: "non-binary", percentage: 0.01} - ] - } -}; + { name: Gender.male, percentage: 0.49 }, + { name: Gender.female, percentage: 0.5 }, + { name: Gender.nonBinary, percentage: 0.01 }, + ], + }, +} diff --git a/src/data/Races.ts b/src/data/Races.ts index f5079bc..0f7f986 100644 --- a/src/data/Races.ts +++ b/src/data/Races.ts @@ -1,89 +1,197 @@ -import { Grafts } from "./Grafts.js"; +import { Grafts } from "./Grafts.js" +import Race from "../models/Race.js" +import { Size } from "./MonsterCreation.js" export const Races = { // A list of humanoid type races which will randomly be generated (generally for non-combat NPCs) nonCombatantRaces: { - "android": {name:"android", size: "medium", creatureTypeGraft: Grafts.creatureType.humanoid, creatureSubtypeGraft: Grafts.creatureSubtype.android}, - "dwarf": {name:"dwarf", size: "medium", languages: ["dwarven"], creatureTypeGraft: Grafts.creatureType.humanoid , creatureSubtypeGraft: Grafts.creatureSubtype.dwarf}, - "drow": {name:"drow", size: "medium", languages: ["drow"], creatureTypeGraft: Grafts.creatureType.humanoid , creatureSubtypeGraft: Grafts.creatureSubtype.elf}, - "gnome": {name:"gnome", size: "small", languages: ["gnome"], creatureTypeGraft: Grafts.creatureType.humanoid, creatureSubtypeGraft: Grafts.creatureSubtype.gnome}, - "gnoll": {name:"gnoll", size: "medium", customLanguages: ["gnoll"], creatureTypeGraft: Grafts.creatureType.humanoid, creatureSubtypeGraft: Grafts.creatureSubtype.gnoll}, - "human": {name:"human", size: "medium", creatureTypeGraft: Grafts.creatureType.humanoid, creatureSubtypeGraft: Grafts.creatureSubtype.human}, - "halfling": {name:"halfling", size: "small", languages: ["halfling"], creatureTypeGraft: Grafts.creatureType.humanoid, creatureSubtypeGraft: Grafts.creatureSubtype.halfling}, - "kasatha": {name:"kasatha", size: "medium", arms: 4, languages: ["kasatha"], creatureTypeGraft: Grafts.creatureType.humanoid, creatureSubtypeGraft: Grafts.creatureSubtype.kasatha}, - "lashunta": {name:"lashunta", size: "medium", languages: ["castrovelian"], creatureTypeGraft: Grafts.creatureType.humanoid, creatureSubtypeGraft: Grafts.creatureSubtype.lashunta}, - "nuar": {name:"nuar", size: "medium", creatureTypeGraft: Grafts.creatureType.monstrousHumanoid}, - "skittermander": {name: "skittermander", size: "small", arms: 6, creatureTypeGraft: Grafts.creatureType.humanoid, creatureSubtypeGraft: Grafts.creatureSubtype.skittermander}, - "shirren": {name: "shirren", size: "medium", languages: ["shirren"], creatureTypeGraft: Grafts.creatureType.humanoid, creatureSubtypeGraft: Grafts.creatureSubtype.shirren}, - "vesk": {name:"vesk", size: "medium", languages: ["vesk"], creatureTypeGraft: Grafts.creatureType.humanoid, creatureSubtypeGraft: Grafts.creatureSubtype.vesk}, - "ysoki": {name:"ysoki", size: "small", languages: ["akiton", "ysoki"], creatureTypeGraft: Grafts.creatureType.humanoid, creatureSubtypeGraft: Grafts.creatureSubtype.ysoki} + android: new Race( + "android", + Size.medium, + Grafts.creatureType.humanoid, + Grafts.creatureSubtype.android + ), + dwarf: new Race( + "dwarf", + Size.medium, + Grafts.creatureType.humanoid, + Grafts.creatureSubtype.dwarf, + ["dwarven"] + ), + drow: new Race( + "drow", + Size.medium, + Grafts.creatureType.humanoid, + Grafts.creatureSubtype.elf, + ["drow"] + ), + elf: new Race( + "elf", + Size.medium, + Grafts.creatureType.humanoid, + Grafts.creatureSubtype.elf, + ["elven"] + ), + gnome: new Race( + "gnome", + Size.small, + Grafts.creatureType.humanoid, + Grafts.creatureSubtype.gnome, + ["gnome"] + ), + gnoll: new Race( + "gnoll", + Size.medium, + Grafts.creatureType.humanoid, + Grafts.creatureSubtype.gnoll, + undefined, + ["gnoll"] + ), + hobgoblin: new Race( + "hobgoblin", + Size.medium, + Grafts.creatureType.humanoid, + Grafts.creatureSubtype.goblinoid, + undefined, + ["goblin"] + ), + human: new Race( + "human", + Size.medium, + Grafts.creatureType.humanoid, + Grafts.creatureSubtype.human + ), + halfOrc: new Race( + "half-orc", + Size.medium, + Grafts.creatureType.humanoid, + [Grafts.creatureSubtype.human, Grafts.creatureSubtype.orc], + ["orc"] + ), + halfElf: new Race( + "half-elf", + Size.medium, + Grafts.creatureType.humanoid, + [Grafts.creatureSubtype.human, Grafts.creatureSubtype.elf], + ["elven"] + ), + halfling: new Race( + "halfling", + Size.small, + Grafts.creatureType.humanoid, + Grafts.creatureSubtype.halfling, + ["halfling"] + ), + kasatha: new Race( + "kasatha", + Size.medium, + Grafts.creatureType.humanoid, + Grafts.creatureSubtype.kasatha, + ["kasatha"], + undefined, + 4 + ), + lashunta: new Race( + "lashunta", + Size.medium, + Grafts.creatureType.humanoid, + Grafts.creatureSubtype.lashunta, + ["castrovelian"] + ), + nuar: new Race( + "nuar", + Size.medium, + Grafts.creatureType.monstrousHumanoid + ), + skittermander: new Race( + "skittermander", + Size.small, + Grafts.creatureType.humanoid, + Grafts.creatureSubtype.skittermander, + undefined, + undefined, + 6 + ), + shirren: new Race( + "shirren", + Size.medium, + Grafts.creatureType.humanoid, + Grafts.creatureSubtype.shirren, + ["shirren"] + ), + vesk: new Race( + "vesk", + Size.medium, + Grafts.creatureType.humanoid, + Grafts.creatureSubtype.vesk, + ["vesk"] + ), + ysoki: new Race( + "ysoki", + Size.small, + Grafts.creatureType.humanoid, + Grafts.creatureSubtype.ysoki, + ["akiton", "ysoki"] + ) } -}; +} // The version of sfrpg the player is using may not have the new races included in the Alien Races Cards // I've bundled them here temporarily, will be removed when this module migrates to 0.8.X as a minimum Foundry version // (as the version of sfrpg which is compatible with 0.8.X will have these races) export const BundledRaces = { gnoll: { - "name": "Gnoll", - "type": "race", - "data": { - "description": { - "chat": "", - "gmnotes": "", - "short": "", - "value": "

Gnolls are hyena-headed humanoids with reputation as bloodthirsty raiders, scavengers, and cannibals. They are capable hunters who respect pwoer and strength over station or role, and most gnolls would believe their own survival takes precedence over any kind of morality.

\n

Ability Adjustments +2 Str, +2 Con, -2 Int
Hit Points 6

\n

Size and Type

\n

Gnolls are Medium humanoids with the gnoll subtype.

\n

Self-Sufficient

\n

Gnolls receive a +2 racial bonus to Surival checks.

\n

Blindsense

\n

Gnolls have blindsense (scent) with a range of 30 feet.

\n

Darkvision

\n

Gnolls can see up to 60 feet in the dark. See page 263 for more information.

\n

Rugged Travel

\n

Each time they move, gnolls can move through the first square of nonmagical difficult terrain at their normal speed.

\n

Natural Weapons

\n

Gnolls can attack with a special unarmed strike that deals lethal damage, doesn’t count as archaic, and threatens squares. Gnoll gain a special version of the Weapon Specialization feat with this unarmed strike at 3rd level, allowing them to add 1–1/2 × their character level to their damage rolls for this unarmed strike (instead of just adding their character level, as usual).

\n

 

", - "unidentified": "" + name: "Gnoll", + type: "race", + data: { + description: { + chat: "", + gmnotes: "", + short: "", + value: + "

Gnolls are hyena-headed humanoids with reputation as bloodthirsty raiders, scavengers, and cannibals. They are capable hunters who respect pwoer and strength over station or role, and most gnolls would believe their own survival takes precedence over any kind of morality.

\n

Ability Adjustments +2 Str, +2 Con, -2 Int
Hit Points 6

\n

Size and Type

\n

Gnolls are Medium humanoids with the gnoll subtype.

\n

Self-Sufficient

\n

Gnolls receive a +2 racial bonus to Surival checks.

\n

Blindsense

\n

Gnolls have blindsense (scent) with a range of 30 feet.

\n

Darkvision

\n

Gnolls can see up to 60 feet in the dark. See page 263 for more information.

\n

Rugged Travel

\n

Each time they move, gnolls can move through the first square of nonmagical difficult terrain at their normal speed.

\n

Natural Weapons

\n

Gnolls can attack with a special unarmed strike that deals lethal damage, doesn’t count as archaic, and threatens squares. Gnoll gain a special version of the Weapon Specialization feat with this unarmed strike at 3rd level, allowing them to add 1–1/2 × their character level to their damage rolls for this unarmed strike (instead of just adding their character level, as usual).

\n

 

", + unidentified: "" }, - "source": "ACD", - "type": "humanoid", - "modifiers": [ + source: "ACD", + type: "humanoid", + modifiers: [ { - "name": "Self-sufficient", - "modifier": "2", - "type": "racial", - "effectType": "skill", - "valueAffected": "sur", - "enabled": true, - "source": "Racial", - "notes": "Gnolls gain a +2 racial bonus to Survival checks.", - "modifierType": "constant", - "condition": "", - "subtab": "misc", - "max": 2, - "_id": "58a26466-6333-4d6b-91f0-49ef03c52fb6" + name: "Self-sufficient", + modifier: "2", + type: "racial", + effectType: "skill", + valueAffected: "sur", + enabled: true, + source: "Racial", + notes: "Gnolls gain a +2 racial bonus to Survival checks.", + modifierType: "constant", + condition: "", + subtab: "misc", + max: 2, + _id: "58a26466-6333-4d6b-91f0-49ef03c52fb6" } ], - "hp": { - "value": 6, - "min": 1 + hp: { + value: 6, + min: 1 }, - "abilityMods": { - "parts": [ - [ - 2, - "str" - ], - [ - 2, - "con" - ], - [ - -2, - "int" - ] + abilityMods: { + parts: [ + [2, "str"], + [2, "con"], + [-2, "int"] ] }, - "size": "medium", - "subtype": "gnoll", - "damage": { - "parts": [] + size: "medium", + subtype: "gnoll", + damage: { + parts: [] }, - "critical": { - "parts": [] + critical: { + parts: [] } }, - "flags": {}, - "effects": [] + flags: {}, + effects: [] } } diff --git a/src/data/Skills.ts b/src/data/Skills.ts new file mode 100644 index 0000000..c2991be --- /dev/null +++ b/src/data/Skills.ts @@ -0,0 +1,21 @@ +export enum Skill { + acrobatics = "acr", + athletics = "ath", + bluff = "blu", + computers = "com", + culture = "cul", + diplomacy = "dip", + disguise = "dis", + engineering = "eng", + intimidate = "int", + lifeSience = "lsc", + medicine = "med", + mysticism = "mys", + perception = "per", + physicalScience = "phs", + piloting = "pil", + senseMotive = "sen", + sleightOfHand = "sle", + stealth = "ste", + survival = "sur" +} diff --git a/src/data/Types.ts b/src/data/Types.ts new file mode 100644 index 0000000..51e9b6c --- /dev/null +++ b/src/data/Types.ts @@ -0,0 +1,36 @@ +/// List of creature types +export enum Type { + aberration, + animal, + construct, + dragon, + fey, + humanoid, + "magical beast", + "monstrous humanoid", + ooze, + outsider, + plant, + undead, + vermin +} + +/// List of creature subtypes +export enum Subtype { + android, + dwarf, + elf, + gnome, + gnoll, + goblinoid, + halfling, + human, + kasatha, + lashunta, + orc, + shirren, + skittermander, + technological, + vesk, + ysoki +} diff --git a/src/data/Weapons.ts b/src/data/Weapons.ts new file mode 100644 index 0000000..e3bf896 --- /dev/null +++ b/src/data/Weapons.ts @@ -0,0 +1,408 @@ +// Weapon Templates +// Some weapons are easier to store as template which are modified/customized rather than searching compendiums +export const unarmedStrikeTemplate = { + name: "Unarmed strike", + type: "weapon", + data: { + description: { + chat: "", + gmnotes: "", + short: "", + value: + "

An unarmed strike can be dealt with any limb or appendage. Unarmed strikes deal nonlethal damage, and the damage from an unarmed strike is considered weapon damage for the purposes of effects that give you a bonus to weapon damage rolls.

", + unidentified: "" + }, + source: "CRB pg. 190", + type: "", + quantity: null, + bulk: "-", + price: 0, + level: 0, + attuned: false, + equipped: true, + equippable: false, + identified: true, + attributes: { + sturdy: false, + customBuilt: false, + size: "medium", + dex: { + mod: "" + }, + hp: { + value: 6, + max: "" + }, + hardness: { + value: "" + }, + ac: { + value: "" + } + }, + activation: { + type: "action", + cost: 1, + condition: "" + }, + duration: { + value: "", + units: "" + }, + target: { + value: "", + type: "" + }, + area: { + value: null, + units: null, + shape: "", + effect: "" + }, + range: { + value: null, + units: "touch", + additional: "", + per: "" + }, + uses: { + value: 0, + max: 0, + per: "" + }, + isActive: null, + ability: "", + actionType: "mwak", + attackBonus: 0, + chatFlavor: "", + critical: { + parts: [], + effect: "" + }, + damage: { + parts: [["1d3", "bludgeoning"]] + }, + formula: "", + save: { + type: "", + dc: "", + descriptor: "negate" + }, + descriptors: [], + capacity: { + value: 0, + max: 0 + }, + usage: { + value: 0, + per: "" + }, + modifiers: [], + container: { + contents: [], + storage: [], + isOpen: true + }, + weaponType: "basicM", + weaponCategory: "", + special: "", + properties: { + one: false, + two: false, + amm: false, + aeon: false, + analog: false, + antibiological: false, + archaic: true, + aurora: false, + automatic: false, + blast: false, + block: false, + boost: false, + breach: false, + breakdown: false, + bright: false, + cluster: false, + conceal: false, + deconstruct: false, + deflect: false, + disarm: false, + double: false, + drainCharge: false, + echo: false, + entangle: false, + explode: false, + extinguish: false, + feint: false, + fiery: false, + firstArc: false, + flexibleLine: false, + force: false, + freeHands: false, + fueled: false, + grapple: false, + gravitation: false, + guided: false, + harrying: false, + holyWater: false, + hybrid: false, + ignite: false, + indirect: false, + injection: false, + integrated: false, + line: false, + living: false, + lockdown: false, + "mind-affecting": false, + mine: false, + mire: false, + modal: false, + necrotic: false, + nonlethal: true, + operative: false, + penetrating: false, + polarize: false, + polymorphic: false, + powered: false, + professional: false, + punchGun: false, + qreload: false, + radioactive: false, + reach: false, + recall: false, + regrowth: false, + relic: false, + reposition: false, + shape: false, + shatter: false, + shells: false, + shield: false, + sniper: false, + stun: false, + subtle: false, + sunder: false, + swarm: false, + tail: false, + teleportive: false, + thought: false, + throttle: false, + thrown: false, + trip: false, + unbalancing: false, + underwater: false, + unwieldy: false, + variantBoost: false, + wideLine: false + }, + proficient: true, + abilityMods: { + parts: [] + } + }, + flags: {}, + effects: [] +} as IWeapon +export const naturalWeaponsTemplate = { + name: "Unarmed strike (natural weapons)", + type: "weapon", + data: { + description: { + chat: "", + gmnotes: "", + short: "", + value: + "

Natural weapons (and natural attacks) such as acid spit, bite, claw, or slam don’t require ammunition and can’t be disarmed or sundered.\n" + + "In addition, a player character with this ability can attack with a special unarmed strike that deals lethal damage, doesn’t count as archaic, and threatens squares. They also gain a special version of the Weapon Specialization feat with this unarmed strike at 3rd level, allowing them to add 1–1/2 × their character level to their damage rolls for this unarmed strike (instead of just adding their character level as usual).

", + unidentified: "" + }, + source: "CRB pg. 190", + type: "", + quantity: null, + bulk: "-", + price: 0, + level: 0, + attuned: false, + equipped: true, + equippable: false, + identified: true, + attributes: { + sturdy: false, + customBuilt: false, + size: "medium", + dex: { + mod: "" + }, + hp: { + value: 6, + max: "" + }, + hardness: { + value: "" + }, + ac: { + value: "" + } + }, + activation: { + type: "action", + cost: 1, + condition: "" + }, + duration: { + value: "", + units: "" + }, + target: { + value: "", + type: "" + }, + area: { + value: null, + units: null, + shape: "", + effect: "" + }, + range: { + value: null, + units: "touch", + additional: "", + per: "" + }, + uses: { + value: 0, + max: 0, + per: "" + }, + isActive: null, + ability: "", + actionType: "mwak", + attackBonus: 0, + chatFlavor: "", + critical: { + parts: [], + effect: "" + }, + damage: { + parts: [["1d3", "bludgeoning"]] + }, + formula: "", + save: { + type: "", + dc: "", + descriptor: "negate" + }, + descriptors: [], + capacity: { + value: 0, + max: 0 + }, + usage: { + value: 0, + per: "" + }, + modifiers: [], + container: { + contents: [], + storage: [], + isOpen: true + }, + weaponType: "basicM", + weaponCategory: "", + special: "", + properties: { + one: false, + two: false, + amm: false, + aeon: false, + analog: false, + antibiological: false, + archaic: false, + aurora: false, + automatic: false, + blast: false, + block: false, + boost: false, + breach: false, + breakdown: false, + bright: false, + cluster: false, + conceal: false, + deconstruct: false, + deflect: false, + disarm: false, + double: false, + drainCharge: false, + echo: false, + entangle: false, + explode: false, + extinguish: false, + feint: false, + fiery: false, + firstArc: false, + flexibleLine: false, + force: false, + freeHands: false, + fueled: false, + grapple: false, + gravitation: false, + guided: false, + harrying: false, + holyWater: false, + hybrid: false, + ignite: false, + indirect: false, + injection: false, + integrated: false, + line: false, + living: false, + lockdown: false, + "mind-affecting": false, + mine: false, + mire: false, + modal: false, + necrotic: false, + nonlethal: false, + operative: false, + penetrating: false, + polarize: false, + polymorphic: false, + powered: false, + professional: false, + punchGun: false, + qreload: false, + radioactive: false, + reach: false, + recall: false, + regrowth: false, + relic: false, + reposition: false, + shape: false, + shatter: false, + shells: false, + shield: false, + sniper: false, + stun: false, + subtle: false, + sunder: false, + swarm: false, + tail: false, + teleportive: false, + thought: false, + throttle: false, + thrown: false, + trip: false, + unbalancing: false, + underwater: false, + unwieldy: false, + variantBoost: false, + wideLine: false + }, + proficient: true, + abilityMods: { + parts: [] + } + }, + flags: {}, + img: "icons/svg/mystery-man.svg", + effects: [] +} as IWeapon diff --git a/src/data/adjusters/SharedAdjusters.ts b/src/data/adjusters/SharedAdjusters.ts new file mode 100644 index 0000000..24a8506 --- /dev/null +++ b/src/data/adjusters/SharedAdjusters.ts @@ -0,0 +1,36 @@ +import SenseAdjuster from "../../models/adjusters/SenseAdjuster.js" +import ImmunityAdjuster from "../../models/adjusters/ImmunityAdjuster.js" +import SaveAdjuster from "../../models/adjusters/SaveAdjuster.js" +import { Save } from "../MonsterCreation.js" + +export const SharedAdjusters = { + Immunities: { + constructImmunities: new ImmunityAdjuster({ + addConditionImmunity: "construct immunities" + }), + drowImmunities: new ImmunityAdjuster({ + addConditionImmunity: "drow immunities" + }), + elvenImmunities: new ImmunityAdjuster({ + addConditionImmunity: "elven immunities" + }), + mindAffectingEffects: new ImmunityAdjuster({ + addConditionImmunity: "mind-affecting effects" + }) + }, + Saves: { + // Quickly add 2 to saves + fortitudePlus2: new SaveAdjuster({ mutateSave: [Save.fortitude, 2] }), + reflexPlus2: new SaveAdjuster({ mutateSave: [Save.reflex, 2] }), + willpowerPlus2: new SaveAdjuster({ mutateSave: [Save.willpower, 2] }), + // Quickly removes 2 to saves + fortitudeMinus2: new SaveAdjuster({ mutateSave: [Save.fortitude, -2] }), + reflexMinus2: new SaveAdjuster({ mutateSave: [Save.reflex, -2] }), + willpowerMinus2: new SaveAdjuster({ mutateSave: [Save.willpower, -2] }) + }, + Senses: { + blindsight: new SenseAdjuster({ addSense: ["blindsight"] }), + darkVision60ft: new SenseAdjuster({ addSense: ["darkvision 60 ft."] }), + lowLightVision: new SenseAdjuster({ addSense: ["low-light vision"] }) + } +} diff --git a/src/data/universal creature rules/UniversalCreatureRules.ts b/src/data/universal creature rules/UniversalCreatureRules.ts new file mode 100644 index 0000000..3cf791e --- /dev/null +++ b/src/data/universal creature rules/UniversalCreatureRules.ts @@ -0,0 +1,30 @@ +/// Collection of universal creature rules which are applied by various means (creature type grafts, special abilities, etc) +import UniversalCreatureRule from "../../models/UniversalCreatureRule.js" + +export const UniversalCreatureRules = { + ferocity: new UniversalCreatureRule( + "ferocity", + "When the creature is brought to 0 Hit Points, it can fight on for 1 more round. It can act normally until the end of its next turn; if it has 0 HP at that point, it dies. If it would lose further Hit Points before this, it ceases to be able to act and dies." + ), + integratedWeapons: new UniversalCreatureRule( + "integrated weapons", + "The creature’s weapons are manufactured weapons, not natural weapons, and they are integrated into its frame. A creature can’t be disarmed of these weapons, though they can be removed and used if the creature is dead." + ), + mindless: new UniversalCreatureRule( + "mindless", + "The creature has no Intelligence score or modifier and is immune to mind-affecting effects. Any DCs or other statistics that rely on an Intelligence score treat the creature as having a score of 10 (+0).\n" + + "Guidelines: Mindless creatures usually have fewer good skills and no master skills. Their skills should be based on inborn abilities, since they’re incapable of training." + ), + naturalWeapons: new UniversalCreatureRule( + "natural weapons", + "Natural weapons (and natural attacks), such as acid spit, bite, claw, or slam don’t require ammunition and can’t be disarmed or sundered." + ), + sightless: new UniversalCreatureRule( + "sightless", + "The creature does not use any visual senses and is thus never subject to any effect that requires the creature to see a target or effect. Sightless creatures normally have some form of blindsight to compensate for their sightlessness, but if not, they are assumed to be able to operate as well as a creature with normal vision unless the creature’s description says otherwise." + ), + unliving: new UniversalCreatureRule( + "unliving", + "The creature has no Constitution score or modifier. Any DCs or other statistics that rely on a Constitution score treat the creature as having a score of 10 (+0). The creature is immediately destroyed when it reaches 0 Hit Points. An unliving creature doesn’t heal damage naturally, but a construct can be repaired with the right tools. Spells such as make whole can heal constructs, and magic effects can heal undead. An unliving creature with fast healing (see page 154) still benefits from that ability. Unliving creatures don’t breathe, eat, or sleep. They can’t be raised or resurrected, except through the use of miracle, wish, or a similar effect that specifically works on unliving creatures." + ) +} diff --git a/src/factories/BiographyFactory.ts b/src/factories/BiographyFactory.ts new file mode 100644 index 0000000..4ad902e --- /dev/null +++ b/src/factories/BiographyFactory.ts @@ -0,0 +1,29 @@ +import NPCCreationContext from "../models/NPCCreationContext.js" +import { Utils } from "../utils/Uils.js" +import { Biography } from "../data/Biography.js" + +export class BiographyFactory { + // NOTE: Consider refactoring to only provide needed parameters and remove dependancy on `NPCCreationContext` + public static makeBiography(actor, context: NPCCreationContext) { + var biography: string = "" + + if (context.generatePersonality) { + let personalityTraits = Biography.personalityTraits + Utils.shuffleArray(personalityTraits) + + biography += + "

" + + actor.name + + " is a " + + personalityTraits[0] + + " " + + context.race + + " who identifies as " + + context.gender + + ".

" + } + + biography += "

Created by Populator.

" + return biography + } +} diff --git a/src/factories/ItemFactory.ts b/src/factories/ItemFactory.ts new file mode 100644 index 0000000..b3bf830 --- /dev/null +++ b/src/factories/ItemFactory.ts @@ -0,0 +1,133 @@ +import { Randomizer } from "../Randomizer.js" +import { + backpackTemplate, + canteenTemplate, + credStickTemplate, + intoxicantMinorTemplate, + Items, + lighterTemplate, + purfumeTemplate, + religiousSymbolTemplate, + ropeTemplate, + upbTemplate +} from "../data/Items.js" +import { Utils } from "../utils/Uils.js" + +export class ItemFactory { + // Default size is 3 + public static makeItemCollection(size = 3): IItem[] { + var itemCollection: IItem[] = [] as IItem[] + // Every NPC has 2 random items (for now, may change) + for (var i = 0; i < size; i++) { + let items = [ + { item: backpackTemplate, percentage: 0.03 }, + { item: canteenTemplate, percentage: 0.03 }, + { item: credStickTemplate, percentage: 0.03 }, + { item: upbTemplate, percentage: 0.03 }, + { item: lighterTemplate, percentage: 0.03 }, + { item: ropeTemplate, percentage: 0.03 }, + { item: purfumeTemplate, percentage: 0.03 }, + { item: intoxicantMinorTemplate, percentage: 0.03 }, + { item: ItemFactory.makeReligiousSymbol(), percentage: 0.06 }, + { item: ItemFactory.makeJunk(), percentage: 0.7 } + ] + + let winning = Randomizer.pickWinningItem(items).item + itemCollection.push(winning) + } + return itemCollection + } + + private static makeReligiousSymbol(): IGoods { + let religiousSymbol = Object.assign({}, religiousSymbolTemplate) + var gods = [ + "Abadar", + "Angradd", + "Arshea", + "Asmodeus", + "Besmara", + "Calistria", + "Damoritosh", + "Desna", + "Eldest", + "Eloritu", + "Groetus", + "Hylax", + "Ibra", + "Iomedae", + "Lamashtu", + "Lao Shu Po", + "Lissala", + "Nyarlathotep", + "Oras", + "Pharasma", + "Sarenrae", + "Talavet", + "The Devourer", + "Urgathoa", + "Weydan", + "Yaraesa", + "Zon-Kuthon" + ] + Utils.shuffleArray(gods) + religiousSymbol.name += " (" + gods[0] + ")" + return religiousSymbol + } + + private static makeJunk(): IGoods { + var junkItem = Items.junk[Math.floor(Math.random() * Items.junk.length)] + return { + name: junkItem.name, + type: "goods", + data: { + description: { + chat: "", + gmnotes: "", + short: "", + value: "

" + junkItem.description + "

", + unidentified: "" + }, + source: "Populator", + type: "", + quantity: 1, + bulk: "L", + price: 0, + level: 1, + attuned: false, + equipped: false, + equippable: false, + identified: true, + attributes: { + sturdy: false, + customBuilt: false, + size: "medium", + dex: { + mod: "" + }, + hp: { + value: 6, + max: "" + }, + hardness: { + value: "" + }, + ac: { + value: "" + } + }, + modifiers: [], + damage: { + parts: [] + }, + critical: { + parts: [] + }, + abilityMods: { + parts: [] + } + }, + flags: {}, + effects: [] + } as IGoods + } +} diff --git a/src/factories/NPCFactory.ts b/src/factories/NPCFactory.ts new file mode 100644 index 0000000..7a0a884 --- /dev/null +++ b/src/factories/NPCFactory.ts @@ -0,0 +1,1448 @@ +import { Utils } from "../utils/Uils.js" +import { Grafts } from "../data/Grafts.js" +import { ItemFactory } from "./ItemFactory.js" +import { + CR, + MonsterCreation, + MonsterReferenceSymbol, + MonsterSkillType, + Save, + Size +} from "../data/MonsterCreation.js" +import { BundledRaces, Races } from "../data/Races.js" +import { Randomizer } from "../Randomizer.js" +import { WeaponFactory } from "./WeaponFactory.js" +import CreatureTypeGraft from "../models/CreatureTypeGraft.js" +import CreatureSubtypeGraft from "../models/CreatureSubtypeGraft.js" +import NPCCreationContext from "../models/NPCCreationContext.js" +import Race from "../models/Race.js" +import { BiographyFactory } from "./BiographyFactory.js" +import UniversalCreatureRule from "../models/UniversalCreatureRule.js" +import { CreatureTypeGenerationOptions } from "../data/Generator.js" +import { UniversalCreatureRules } from "../data/universal creature rules/UniversalCreatureRules.js" +import SkillAdjuster from "../models/adjusters/SkillAdjuster.js" +import { Skill } from "../data/Skills.js" +import SenseAdjuster from "../models/adjusters/SenseAdjuster.js" +import { apply } from "../models/Interfaces/IApplyable.js" +import { SharedAdjusters } from "../data/adjusters/SharedAdjusters.js" +import SaveAdjuster from "../models/adjusters/SaveAdjuster.js" +import AbilityScoreAdjuster from "../models/adjusters/AbilityScoreAdjuster.js" +import { AbilityScore } from "../data/AbilityScores.js" + +export class NPCFactory { + // Produces a non-hostile NPC from a subset of races + public static async makeNonHostile(context: NPCCreationContext) { + let actorData = { name: "Generated Actor", type: "npc" } + let actor = await Actor.create(actorData) + + // Non-combatants are always experts + context.monsterReferenceSymbol = MonsterReferenceSymbol.expert + + await this.setRace(actor, context) + await this.makeNPC(actor, context) + } + + public static async makeHostile(context: NPCCreationContext) { + let actorData = { name: "Generated Actor", type: "npc" } + let actor = await Actor.create(actorData) + + // If no type set we randomly generate + if (!context.creatureTypeGraft) { + // Randomizes creature type + let supportedMonsterTypes = CreatureTypeGenerationOptions + Utils.shuffleArray(supportedMonsterTypes) + context.creatureTypeGraft = supportedMonsterTypes[0].typeGraft + } + + // TODO: Pick a random subtype (or none) + + // We don't generate "junk" items for monsters + context.generateAdditionalItems = false + // Monsters generally don't have personalities + context.generatePersonality = false + + await this.makeNPC(actor, context) + } + + // Private + private static async makeNPC(actor, context: NPCCreationContext) { + // Grab appropriate array rows + let monsterReferenceSymbol = + MonsterReferenceSymbol[context.monsterReferenceSymbol] + + let mainArrayRow = Object.assign( + {}, + MonsterCreation.arrays[monsterReferenceSymbol].main[context.CR] + ) + let attackArrayRow = Object.assign( + {}, + MonsterCreation.arrays[monsterReferenceSymbol].attack[context.CR] + ) + + context.mainArrayRow = mainArrayRow + context.attackArrayRow = attackArrayRow + + // Fill in details + await this.setGenderAndName(actor, context) + await this.setDetails(actor, context) + await this.setGrafts(actor, context) + await this.setSpecialAbilities(actor, context) + await this.setAttributes(actor, context) + await this.setVulnerabilitiesAndImmunities(actor, context) + await this.setSkills(actor, context) + await this.setWeapons(actor, context) + await this.setInventory(actor, context) + await this.setSenses(actor, context) + await this.setToken(actor, context) + await this.setAbout(actor, context) + } + + private static async setRace(actor, context: NPCCreationContext) { + let actorUpdate = {} + let logEntries: [string, string][] = [] + + if (!context.race) { + let randomRace = Randomizer.randomRace() + context.race = randomRace.name + logEntries.push([ + "Chose race " + randomRace.name + " at random.", + "" + ]) + } else { + logEntries.push(["Race " + context.race + " chosen.", ""]) + } + + // Set grafts for race + let race = Races.nonCombatantRaces[context.race] + context.creatureTypeGraft = race.creatureTypeGraft + context.creatureSubtypeGrafts = race.creatureSubtypeGrafts + + var raceData + // We stub in gnolls until they are included in sfrpg + if (context.race == "gnoll") { + raceData = BundledRaces.gnoll + } else { + raceData = await Utils.fuzzyFindRaceAsync(race.name) + } + + // Race item + await this.clean(raceData) + context.itemsToAdd.push(raceData) + + // Update actor + await actor.update(actorUpdate) + + // Update log + context.log.push(...logEntries) + } + + private static async setGenderAndName(actor, context: NPCCreationContext) { + let actorUpdate = {} + let logEntries: [string, string][] = [] + + // Gender + if (!context.gender) { + let randomGender = Randomizer.randomGender() + context.gender = randomGender + logEntries.push([ + "Chose gender " + randomGender + " at random.", + "" + ]) + } else { + logEntries.push(["Gender " + context.gender + " chosen.", ""]) + } + + // Race and Grafts label + let raceText = context.race + ? " " + Races.nonCombatantRaces[context.race].name + : "" + actorUpdate["data.details.raceAndGrafts"] = + context.gender + raceText + ", grafts:" // Grafts will be filled in as applied + + // Name + let randomName = Randomizer.randomName(context) + actorUpdate["name"] = randomName + logEntries.push([" Generated name " + randomName + " at random.", ""]) + + // Update actor + await actor.update(actorUpdate) + + // Update log + context.log.push(...logEntries) + } + + private static async setDetails(actor, context: NPCCreationContext) { + let logEntries: [string, string][] = [] + var race: Race | undefined + if (context.race) race = Races.nonCombatantRaces[context.race] + let actorUpdate = {} + + // Source + actorUpdate["data.details.source"] = "Populator" + + // CR + var CR: number + if (context.CR === "1/3") { + CR = 1 / 3 + } else if (context.CR === "1/2") { + CR = 0.5 + } else { + CR = parseFloat(context.CR) + } + actorUpdate["data.details.cr"] = CR + + // Alignment + let randomAlignment = Randomizer.randomAlignment() + actorUpdate["data.details.alignment"] = randomAlignment + logEntries.push([ + "Chose alignment " + randomAlignment + " at random.", + "" + ]) + + // Languages + // NOTE: Only applies languages if this creature type has the intelligence capacity for language + if (context.creatureTypeGraft?.capicityForLanguage) { + var languages = ["common"] + if (race?.languages) { + languages.push(...race.languages) + } + + actorUpdate["data.traits.languages.value"] = languages + } + + // Update actor + await actor.update(actorUpdate) + + // Update log + context.log.push(...logEntries) + } + + private static async setGrafts(actor, context: NPCCreationContext) { + if (!context.creatureTypeGraft) return + let logEntries: [string, string][] = [] + let actorUpdate = {} + + try { + await this.applyCreatureTypeGraft( + actor, + context, + context.creatureTypeGraft + ) + + if (context.creatureSubtypeGrafts) { + let subtypes: string[] = [] + for (let creatureSubtypeGraft of context.creatureSubtypeGrafts) { + // Adds subtypes to an array to construct type + subtypes.push(creatureSubtypeGraft.name) + + await this.applyCreatureSubtypeGraft( + actor, + context, + creatureSubtypeGraft + ) + } + + // Apply type in "()" format + actorUpdate["data.details.type"] = + context.creatureTypeGraft.name + + " (" + + subtypes.join() + + ")" + + logEntries.push([ + "Set type based on " + + context.creatureTypeGraft.name + + " creature type graft, " + + subtypes.join() + + " subtype grafts.", + "" + ]) + } else { + // Apply type in "" format + actorUpdate["data.details.type"] = + context.creatureTypeGraft.name + logEntries.push([ + "Set type based on " + + context.creatureTypeGraft.name + + " creature type graft.", + "" + ]) + } + + // Update actor + await actor.update(actorUpdate) + } catch (e) { + logEntries.push([ + "Failed to set grafts.", + "Exception:" + e + "" + ]) + } + + // Update log + context.log.push(...logEntries) + } + + private static async setSpecialAbilities( + actor, + context: NPCCreationContext + ) { + // Update log + context.log.push([ + "Applying " + + context.mainArrayRow.specialAbilities + + " special abilities.", + "" + ]) + + try { + var amountOfSpecialAbilities = context.mainArrayRow.specialAbilities + + // First we check for chosen universal creature rules (specifically natural weapons or integrated weapons) + // TODO: Expand to other universal creature rules + if ( + context.universalCreatureRules.includes( + MonsterCreation.specialAbilities.universalCreatureRule + .naturalWeapons + ) + ) { + // Flag that we'll generate a `bite` / `slam` / `claws` attack + context.naturalWeapons.enabled = true + context.naturalWeapons.racial = false + // This takes up one of our special abilities, reduce by 1 + amountOfSpecialAbilities -= 1 + + context.log.push([ + "Applying Natural Weapons (Ex) special abilities as chosen. NOTE: Populator will auto-choose Natural Weapons as the 1st special ability of any monster which doesn't have gear and weapons to attack with.", + UniversalCreatureRules.naturalWeapons.description + ]) + } + // + if ( + context.universalCreatureRules.includes( + MonsterCreation.specialAbilities.universalCreatureRule + .integratedWeapons + ) + ) { + // Add integrated weapons feature + let integratedWeapons = await Utils.fuzzyFindUniversalCreatureRule( + "integrated weapons" + ) + context.itemsToAdd.push(integratedWeapons) + + // Set flag to add a weapon during item generation + context.rangedWeapon.enabled = true + + // This takes up one of our special abilities, reduce by 1 + amountOfSpecialAbilities -= 1 + + context.log.push([ + "Applying Integrated Weapons (Ex) universal creature rule as a special abilities as chosen. NOTE: Populator will auto-choose Integrated Weapons as the 1st special ability of any construct type monster.", + UniversalCreatureRules.integratedWeapons.description + ]) + } + + // NOTE: Currently chooses 1+ Adjustment Special Abilities + let adjustmentSpecialAbilities: any[] = Object.values( + MonsterCreation.specialAbilities.adjustment + ) + Utils.shuffleArray(adjustmentSpecialAbilities) + + // We apply 1+ special abilities + for (var i = 0; i < amountOfSpecialAbilities; i++) { + // get special ability + let adjustmentSpecialAbility = adjustmentSpecialAbilities[i] + // Apply special ability + await this.applyAdjustmentSpecialAbility( + actor, + context, + adjustmentSpecialAbility + ) + } + } catch (e) { + context.log.push([ + "Failed to set special abilities.", + "Exception:" + e + "" + ]) + } + } + + private static async setAttributes(actor, context: NPCCreationContext) { + let logEntries: [string, string][] = [] + var race: Race | undefined + if (context.race) race = Races.nonCombatantRaces[context.race] + let array = context.mainArrayRow + let actorUpdate = {} + + // Size + actorUpdate["data.traits.size"] = race?.size + ? Size[race.size] + : Size[Size.medium] // We default to medium size + + // Hands + if (race?.arms != undefined) { + actorUpdate["data.attributes.arms"] = race.arms + } + + // Reach + // TODO: Reach should be decided by grafts + actorUpdate["data.attributes.reach"] = 5 + + // Set HP + actorUpdate["data.attributes.hp.value"] = array.HP + actorUpdate["data.attributes.hp.max"] = array.HP + + // Set SP (should be 0) + actorUpdate["data.attributes.sp.max"] = 0 + + // Set RP (should be 0) + actorUpdate["data.attributes.rp.max"] = 0 + + // Set KAC + actorUpdate["data.attributes.kac.value"] = array.KAC + + // Set EAC + actorUpdate["data.attributes.eac.value"] = array.EAC + + // Set reflex save + actorUpdate["data.attributes.reflex.bonus"] = array.reflex + + // Set fort save + actorUpdate["data.attributes.fort.bonus"] = array.fort + + // Set will save + actorUpdate["data.attributes.will.bonus"] = array.will + + // Set ability modifiers + // all abilities + var abilities = ["cha", "con", "dex", "int", "str", "wis"] + // First set hard-coded ability modifiers + for (let ability of context.abilities) { + let i = abilities.indexOf(ability[0]) + // Remove from our array of abilities to randomly improve + if (i) { + actorUpdate["data.abilities." + ability[0] + ".mod"] = + ability[1] + abilities.splice(i, 1) + logEntries.push([ + "Increased " + + ability[0] + + " ability by " + + ability[1] + + " as dictated by graft/special ability.", + "" + ]) + } + } + + // We randomize which abilities are buffed + Utils.shuffleArray(abilities) + + actorUpdate["data.abilities." + abilities[0] + ".mod"] = + array.abilityMods[0] + actorUpdate["data.abilities." + abilities[1] + ".mod"] = + array.abilityMods[1] + actorUpdate["data.abilities." + abilities[2] + ".mod"] = + array.abilityMods[2] + + logEntries.push([ + "Increased " + + abilities[0] + + " ability (chosen randomly) by " + + array.abilityMods[0] + + " as dictated by array.", + "" + ]) + logEntries.push([ + "Increased " + + abilities[1] + + " ability (chosen randomly) by " + + array.abilityMods[1] + + " as dictated by array.", + "" + ]) + logEntries.push([ + "Increased " + + abilities[2] + + " ability (chosen randomly) by " + + array.abilityMods[2] + + " as dictated by array.", + "" + ]) + + // Set initiative modifier (be dex modifier) + let initiative = actorUpdate["data.abilities.dex.mod"] ?? 0 + actorUpdate["data.attributes.init.total"] = initiative + logEntries.push([ + "Set initiative as " + + initiative + + " to match dex modifier (if no dex modifier defaults to 0).", + "Unless you increase it with the Improved Initiative feat, a graft, or an ad hoc adjustment, the NPC’s\n" + + "initiative bonus is equal to its Dexterity modifier." + ]) + + // Update actor + await actor.update(actorUpdate) + + // Update log + context.log.push(...logEntries) + } + + private static async setVulnerabilitiesAndImmunities( + actor, + context: NPCCreationContext + ) { + let logEntries: [string, string][] = [] + let actorUpdate = {} + + actorUpdate["data.traits.ci.custom"] = context.conditionImmunities.join( + ";" + ) + + // Update actor + await actor.update(actorUpdate) + + // Update log + context.log.push(...logEntries) + } + + private static async setSkills(actor, context: NPCCreationContext) { + let array = context.mainArrayRow + let actorUpdate = {} + + // All skills minus perception (always a `good` skill, and profession) + // TODO: Support profession skills + var skillsToBuff = [ + "acr", + "ath", + "blu", + "com", + "cul", + "dip", + "dis", + "eng", + "int", + "lsc", + "med", + "mys", + "phs", + "pil", + "sen", + "sle", + "ste", + "sur" + ] + + // Remove any skills we are buffing due to grafts + skillsToBuff = skillsToBuff.filter(function (skill) { + return ( + !context.masterSkills.includes(skill) && + !context.goodSkills.includes(skill) + ) + }) + + Utils.shuffleArray(skillsToBuff) + + // Apply good skill mod to perception + actorUpdate["data.skills.per.mod"] = array.goodSkill.mod + actorUpdate["data.skills.per.enabled"] = true + + // NOTE: We do this step after the above buff to perception as some grafts make perception a master skill and + // we want that to override the above in that case. + // Apply fixed master/good skills (from grafts) + for (let masterSkill of context.masterSkills) { + actorUpdate["data.skills." + masterSkill + ".mod"] = + array.masterSkill.mod + actorUpdate["data.skills." + masterSkill + ".enabled"] = true + } + for (let goodSkill of context.goodSkills) { + actorUpdate["data.skills." + goodSkill + ".mod"] = + array.goodSkill.mod + actorUpdate["data.skills." + goodSkill + ".enabled"] = true + } + + // Apply master / good skill mod to random skills (from an array of skills missing graft skills + perception) + var skillIndex = 0 // Used to track progress through array of skills + // Apply mod to master skills + for (let i = 0; i < array.masterSkill.count; i++) { + let skill = skillsToBuff[skillIndex] + actorUpdate["data.skills." + skill + ".mod"] = array.masterSkill.mod + actorUpdate["data.skills." + skill + ".enabled"] = true + skillIndex++ + } + // Apply mod to good skills + for (let i = 0; i < array.goodSkill.count; i++) { + let skill = skillsToBuff[skillIndex] + actorUpdate["data.skills." + skill + ".mod"] = array.goodSkill.mod + actorUpdate["data.skills." + skill + ".enabled"] = true + skillIndex++ + } + + // Update actor + await actor.update(actorUpdate) + } + + private static async setWeapons(actor, context: NPCCreationContext) { + let attackArray = MonsterCreation.arrays.expert.attack[context.CR] + let highAttackBonus = attackArray.high + let lowAttackBonus = attackArray.low + + // Add natural weapons or generic unarmed strike + if (context.naturalWeapons.enabled === true) { + let naturalWeapons = WeaponFactory.makeNaturalWeapons() + + // Unlocked by the universal creature rule rather than a racial feature + if (context.naturalWeapons.racial === false) { + naturalWeapons.name = "slam" + // TODO: bite, claw, or slam + // TODO: Different damage types depending on slam, bite or claw + } + + naturalWeapons.data.attackBonus = highAttackBonus + naturalWeapons.data.damage = { + parts: [[attackArray.standard, "bludgeoning"]] + } + + context.itemsToAdd.push(naturalWeapons) + } else { + // All NPCs have unarmed strike unless they are equipped with natural weapons + let unarmedStrike = WeaponFactory.makeUnarmedStrike() + // We use the low attack for built in unarmed strikes as they should never be the primary attack of a combatant + unarmedStrike.data.attackBonus = lowAttackBonus + context.itemsToAdd.push(unarmedStrike) + } + + // Generate ranged weapons + if (context.rangedWeapon.enabled) { + let laserPistol = await WeaponFactory.makeLaserPistol(context.CR) + if (laserPistol) { + laserPistol.data.equipped = true + laserPistol.data.proficient = true // Should always be proficient with equipped weapons + laserPistol.data.ability = "" // Should not be modified by any ability + laserPistol.data.attackBonus = highAttackBonus + laserPistol.data.damage = { + parts: [[attackArray.energy, "fire"]] + } + context.itemsToAdd.push(laserPistol) + } + } + } + + private static async setInventory(actor, context: NPCCreationContext) { + if (context.generateAdditionalItems) { + let items = ItemFactory.makeItemCollection() + context.itemsToAdd.push(...items) + } + + // Add all items + let actorUpdate = {} + actorUpdate["items"] = context.itemsToAdd + await actor.update(actorUpdate) + } + + private static async setToken(actor, context: NPCCreationContext) { + let actorUpdate = {} + actorUpdate["token.randomImg"] = false + + if (context.tokenOptions?.dynamicImage) { + var path: string | undefined + // Either set path as race + gender or creature type + if (context.race) + path = "populator/" + context.race + "/" + context.gender + "/*" + else if (context.creatureTypeGraft) + path = "populator/" + context.creatureTypeGraft?.name + "/*" + + if (path) { + actorUpdate["token.img"] = path + actorUpdate["token.randomImg"] = true + } + } + + actorUpdate["token.name"] = actor.name // Set token name to match actor name + actorUpdate["token.actorLink"] = true + actorUpdate["token.disposition"] = 0 // Neutral by default + + // Update actor + await actor.update(actorUpdate) + } + + private static async setSenses(actor, context: NPCCreationContext) { + let actorUpdate = {} + + if (context.senses.length > 0) { + actorUpdate["data.traits.senses"] = context.senses.join(", ") + } + + await actor.update(actorUpdate) + } + + private static async setAbout(actor, context: NPCCreationContext) { + let actorUpdate = {} + + // biography + var biography = BiographyFactory.makeBiography(actor, context) + actorUpdate["data.details.biography.value"] = biography + + // gm notes + var gmNotes = "" + for (let entry of context.log) { + gmNotes += "

" + entry[0] + "

" + + if (entry[1] != "") { + gmNotes += "
" + entry[1] + "
" + } + } + + actorUpdate["data.details.biography.gmNotes"] = gmNotes + + // Update actor + await actor.update(actorUpdate) + } + + private static async applyCreatureTypeGraft( + actor, + context: NPCCreationContext, + graft: CreatureTypeGraft + ) { + let logEntries: [string, string][] = [] + let actorUpdate = {} + + if (graft === Grafts.creatureType.animal) { + // Applies either a -4 or -5 (randomly) as intelligence score + let intelligenceMods = [-4, -5] + Utils.shuffleArray(intelligenceMods) + + await apply( + actor, + context, + //Senses + SharedAdjusters.Senses.lowLightVision, + // Applies a +2 to reflex & fortitude + SharedAdjusters.Saves.reflexPlus2, + SharedAdjusters.Saves.fortitudePlus2, + new AbilityScoreAdjuster({ + setAbilityScore: [ + AbilityScore.intelligence, + intelligenceMods[0] + ] + }) + ) + + // TODO: This has a chance of overwriting one of the randomly boosted ability scores, we should reassign the overwritten value to another stat + logEntries.push([ + "Applied animal type graft. Added low-light vision, +2 to reflex/fort save, set " + + intelligenceMods[0] + + " to intelligence (chosen at random between -4 and -5).", + Grafts.creatureType.animal.description + ]) + } else if (graft === Grafts.creatureType.construct) { + await apply( + actor, + context, + //Senses + SharedAdjusters.Senses.darkVision60ft, + SharedAdjusters.Senses.lowLightVision, + // Immunities + SharedAdjusters.Immunities.constructImmunities, + // Saves (-2 to all) + SharedAdjusters.Saves.reflexMinus2, + SharedAdjusters.Saves.willpowerMinus2, + SharedAdjusters.Saves.fortitudeMinus2 + ) + + // Constitution + context.abilities.push(["con", 0]) // NOTE: Should be no constitution but sfrpg doesn't yet support + // Unliving + await this.applyUniversalCreatureRule( + actor, + context, + UniversalCreatureRules.unliving + ) + + // Attacks + context.attackArrayRow.high += 1 + context.attackArrayRow.low += 1 + + logEntries.push([ + "Applied construct type graft. Added darkvision 60 ft. and low-light vision, -2 to all saves, +1 to all attacks, added unliving universal creature rule.", + Grafts.creatureType.construct.description + ]) + } else if (graft === Grafts.creatureType.humanoid) { + // Applies a +2 to a random saving throw + var saves = [Save.reflex, Save.fortitude, Save.willpower] + Utils.shuffleArray(saves) + let save = saves[0] // random save + + await new SaveAdjuster({ mutateSave: [save, 2] }).apply( + actor, + context + ) + + logEntries.push([ + "Applied humanoid type graft. Added +2 to " + + saves[0] + + " save (chosen at random).", + Grafts.creatureType.humanoid.description + ]) + } else if (graft === Grafts.creatureType.monstrousHumanoid) { + await apply( + actor, + context, + // Senses + SharedAdjusters.Senses.darkVision60ft, + // Applies a +2 to reflex & will + SharedAdjusters.Saves.reflexPlus2, + SharedAdjusters.Saves.willpowerPlus2 + ) + + // Add +1 to all attacks + context.attackArrayRow.high += 1 + context.attackArrayRow.low += 1 + + logEntries.push([ + "Applied monstrous humanoid type graft. Added darkvision, +2 to reflex/will saves and +1 to all attacks.", + Grafts.creatureType.monstrousHumanoid.description + ]) + } else if (graft === Grafts.creatureType.ooze) { + apply( + actor, + context, + //Senses + SharedAdjusters.Senses.blindsight, + // Saves (+2 to fortitude save, -2 reflex save) + SharedAdjusters.Saves.fortitudePlus2, + SharedAdjusters.Saves.reflexMinus2, + // Skills (No master or good skills, except perception which everything usually has) + new SkillAdjuster({ + setMonsterSkillCount: [MonsterSkillType.master, 0] + }), + new SkillAdjuster({ + setMonsterSkillCount: [MonsterSkillType.good, 0] + }), + // Mindless - no intelligence + // TODO: This has a chance of overwriting one of the randomly boosted ability scores, we should reassign the overwritten value to another stat + new AbilityScoreAdjuster({ + setAbilityScore: [AbilityScore.intelligence, 0] + }) + ) + + await this.applyUniversalCreatureRule( + actor, + context, + UniversalCreatureRules.mindless + ) + + // Sightless + await this.applyUniversalCreatureRule( + actor, + context, + UniversalCreatureRules.sightless + ) + + logEntries.push([ + "Applied ooze type graft. Added blindsight, +2 to fort save, -2 to reflex save, set - as intelligence, added mindless and sightless universal creature rule, reduced good and master skills to 0 (except perception).", + Grafts.creatureType.ooze.description + ]) + } else if (graft === Grafts.creatureType.vermin) { + await apply( + actor, + context, + //Senses + SharedAdjusters.Senses.darkVision60ft, + // Saves (2 to fortitude saves) + SharedAdjusters.Saves.fortitudePlus2 + ) + + // Mindless, no intelligence + // TODO: This has a chance of overwriting one of the randomly boosted ability scores, we should reassign the overwritten value to another stat + context.abilities.push(["int", 0]) + + await this.applyUniversalCreatureRule( + actor, + context, + UniversalCreatureRules.mindless + ) + + logEntries.push([ + "Applied vermin type graft. Added darkvision, +2 to fort save, set - as intelligence, added mindless universal creature rule.", + Grafts.creatureType.vermin.description + ]) + } + + actorUpdate["data.details.raceAndGrafts"] = + actor.data.data.details.raceAndGrafts + " " + graft.name + + // Update actor + await actor.update(actorUpdate) + + // Update log + context.log.push(...logEntries) + } + + private static async applyCreatureSubtypeGraft( + actor, + context: NPCCreationContext, + graft: CreatureSubtypeGraft + ) { + let logEntries: [string, string][] = [] + let actorUpdate = {} + + // Set as 1 per day + function addOncePerDayInnateSpell(spell) { + spell.data.uses.value = 1 + spell.data.uses.max = 1 + spell.data.uses.per = "day" + spell.data.preparation.mode = "innate" + context.itemsToAdd.push(spell) + } + + function addAtWillInnateSpell(spell) { + spell.data.preparation.mode = "innate" + context.itemsToAdd.push(spell) + } + + if (graft === Grafts.creatureSubtype.android) { + //Senses + await apply( + actor, + context, + SharedAdjusters.Senses.darkVision60ft, + SharedAdjusters.Senses.lowLightVision + ) + + logEntries.push([ + "Applied android subtype graft. Added darkvision 60ft. and low-light vision.", + Grafts.creatureSubtype.android.description + ]) + } else if (graft === Grafts.creatureSubtype.dwarf) { + //Senses + await apply(actor, context, SharedAdjusters.Senses.darkVision60ft) + + logEntries.push([ + "Applied dwarf subtype graft. Added darkvision 60ft.", + Grafts.creatureSubtype.dwarf.description + ]) + } else if (graft === Grafts.creatureSubtype.elf) { + // Elves can be `drow`, `elven` or `half-elven` race + // All elves: + await new SkillAdjuster({ + // Perception as a master skill + setSkillAsMonsterSkill: [ + Skill.perception, + MonsterSkillType.master + ] + }).apply(actor, context) + + if (context.race == "elf") { + await apply( + actor, + context, + // Senses + SharedAdjusters.Senses.lowLightVision, + // Mysticism as a master skill + new SkillAdjuster({ + setSkillAsMonsterSkill: [ + Skill.mysticism, + MonsterSkillType.master + ] + }), + // Add immunities + SharedAdjusters.Immunities.elvenImmunities + ) + + logEntries.push([ + "Applied elf subtype graft. elf race selected so added elven immunities, and mysticism as a master skill.", + Grafts.creatureSubtype.elf.description + ]) + } + if (context.race == "drow") { + await apply( + actor, + context, + //Senses + SharedAdjusters.Senses.darkVision60ft, // Replaces low-light vision + // Add immunities + SharedAdjusters.Immunities.drowImmunities + ) + // Drow magic at will innate spells + let dancingLights = await Utils.fuzzyFindSpellAsync( + "dancing lights" + ) + let detectMagic = await Utils.fuzzyFindSpellAsync( + "detect magic" + ) + addAtWillInnateSpell(dancingLights) + addAtWillInnateSpell(detectMagic) + + logEntries.push([ + "Applied elf subtype graft. drow race selected so added darkvision 60ft., perception as a master skill, dacing lights and detect magic as innate spells, added drow immunities.", + Grafts.creatureSubtype.elf.description + ]) + } else if (context.race == "halfElf") { + await apply( + actor, + context, + SharedAdjusters.Senses.lowLightVision + ) + + // Half-elves gain an extra good skill + context.mainArrayRow.goodSkill.count += 1 + logEntries.push([ + "Applied elf subtype graft. half-elf race selected so added low-light vision, perception as a master skill, and one additional good skill.", + Grafts.creatureSubtype.elf.description + ]) + } + } else if (graft === Grafts.creatureSubtype.gnoll) { + // Senses + await apply( + actor, + context, + SharedAdjusters.Senses.darkVision60ft, + new SenseAdjuster({ addSense: ["blindsense (scent) 30 ft."] }), + // Survival as a master skill + new SkillAdjuster({ + setSkillAsMonsterSkill: [ + Skill.survival, + MonsterSkillType.master + ] + }) + ) + + // Natural weapons + context.naturalWeapons.enabled = true + context.naturalWeapons.racial = true + + logEntries.push([ + "Applied gnoll subtype graft. Added blindsense (scent) 30 ft., darkvision 60ft., natural weapons, survival as a master skill.", + Grafts.creatureSubtype.gnoll.description + ]) + } else if (graft === Grafts.creatureSubtype.halfling) { + await apply( + actor, + context, + // Perception and Stealth as master skills + new SkillAdjuster({ + setSkillAsMonsterSkill: [ + Skill.stealth, + MonsterSkillType.master + ] + }), + new SkillAdjuster({ + setSkillAsMonsterSkill: [ + Skill.perception, + MonsterSkillType.master + ] + }), + // Athletics and Acrobatics as good skills + new SkillAdjuster({ + setSkillAsMonsterSkill: [ + Skill.acrobatics, + MonsterSkillType.good + ] + }), + new SkillAdjuster({ + setSkillAsMonsterSkill: [ + Skill.athletics, + MonsterSkillType.good + ] + }) + ) + + logEntries.push([ + "Applied halfing subtype graft. Added perception and stealth as master skills and acrobatics and athletics as good skills.", + Grafts.creatureSubtype.halfling.description + ]) + } else if (graft === Grafts.creatureSubtype.human) { + if (context.race == Races.nonCombatantRaces.human.name) { + context.mainArrayRow.specialAbilities += 1 + context.mainArrayRow.goodSkill.count += 1 + + logEntries.push([ + "Applied human subtype graft. Added an additional special ability and an additional good skill.", + Grafts.creatureSubtype.human.description + ]) + } + // For half-elf, half-orc, etc + else { + logEntries.push([ + "Applied human subtype graft (no modifications).", + Grafts.creatureSubtype.human.description + ]) + } + } else if (graft === Grafts.creatureSubtype.gnome) { + await apply( + actor, + context, + //Senses + SharedAdjusters.Senses.lowLightVision, + // Culture as a master skill + new SkillAdjuster({ + setSkillAsMonsterSkill: [ + Skill.culture, + MonsterSkillType.master + ] + }) + ) + + // Gnome magic once per day innate spells + let dancingLights = await Utils.fuzzyFindSpellAsync( + "dancing lights" + ) + let ghostSound = await Utils.fuzzyFindSpellAsync("ghost sound") + let tokenSpell = await Utils.fuzzyFindSpellAsync("token spell") + addOncePerDayInnateSpell(dancingLights) + addOncePerDayInnateSpell(ghostSound) + addOncePerDayInnateSpell(tokenSpell) + + logEntries.push([ + "Applied gnome subtype graft. Added dancing lights, ghost sound, and token spell as once-per-day innate spells and added culture as a master skill.", + Grafts.creatureSubtype.gnome.description + ]) + } else if (graft === Grafts.creatureSubtype.goblinoid) { + // NOTE: AA1 has a different definition of the goblinoid subtype, should handle either + // TODO: Check if space goblin, hobgoblin or kanabo + // NOTE: For now we assume hobgoblin + await apply( + actor, + context, + //Senses + SharedAdjusters.Senses.darkVision60ft, + // Intimidate and stealth as a master skill + new SkillAdjuster({ + setSkillAsMonsterSkill: [ + [Skill.intimidate, Skill.stealth], + MonsterSkillType.master + ] + }) + ) + } else if (graft === Grafts.creatureSubtype.orc) { + // TODO: Check if race is half-orc, and only then apply + await apply( + actor, + context, + // Senses + SharedAdjusters.Senses.darkVision60ft, + // Intimidate and Survival are master skills + new SkillAdjuster({ + setSkillAsMonsterSkill: [ + [Skill.intimidate, Skill.survival], + MonsterSkillType.master + ] + }) + ) + + logEntries.push([ + "Applied orc subtype graft. Added darkvision 60 ft and intimidate and survival as master skills.", + Grafts.creatureSubtype.orc.description + ]) + } else if (graft === Grafts.creatureSubtype.kasatha) { + // Acrobatics and Athletics master skills + await apply( + actor, + context, + // Acrobatics and Athletics are master skills + new SkillAdjuster({ + setSkillAsMonsterSkill: [ + [Skill.acrobatics, Skill.athletics], + MonsterSkillType.master + ] + }), + // Culture is a good skill + new SkillAdjuster({ + setSkillAsMonsterSkill: [ + [Skill.culture], + MonsterSkillType.good + ] + }) + ) + + logEntries.push([ + "Applied kasatha subtype graft. Added acrobatics and atheletics as a master skill, culture as a good skill.", + Grafts.creatureSubtype.kasatha.description + ]) + } else if (graft === Grafts.creatureSubtype.lashunta) { + // Languages + actorUpdate["data.traits.languages.custom"] = + "limited telepathy 30 ft." + // Innate spells + let detectThoughts = await Utils.fuzzyFindSpellAsync( + "detect thoughts" + ) + let daze = await Utils.fuzzyFindSpellAsync("daze") + let psychokineticHand = await Utils.fuzzyFindSpellAsync( + "psychokinetic hand" + ) + addOncePerDayInnateSpell(detectThoughts) + addAtWillInnateSpell(daze) + addAtWillInnateSpell(psychokineticHand) + + logEntries.push([ + "Applied lashunta subtype graft. Added limited telepathy 30 ft., detect thoughts as a once per day innate spell and added daze and psychokinetic hand as innate spells.", + Grafts.creatureSubtype.lashunta.description + ]) + } else if (graft === Grafts.creatureSubtype.shirren) { + await apply( + actor, + context, + //Senses + new SenseAdjuster({ + addSense: "blindsense (vibration) 30 ft." + }), + // Culture and Diplomacy as good skills + new SkillAdjuster({ + setSkillAsMonsterSkill: [ + [Skill.culture, Skill.diplomacy], + MonsterSkillType.good + ] + }) + ) + + // Languages + actorUpdate["data.traits.languages.custom"] = + "limited telepathy 30 ft." + + logEntries.push([ + "Applied shirren subtype graft. Added blindsense (vibration) 30 ft., limited telepathy 30 ft., culture and diplomacy as good skills.", + Grafts.creatureSubtype.shirren.description + ]) + } else if (graft === Grafts.creatureSubtype.skittermander) { + //Senses + await apply(actor, context, SharedAdjusters.Senses.lowLightVision) + + logEntries.push([ + "Applied skittermander subtype graft. Added low-light vision.", + Grafts.creatureSubtype.skittermander.description + ]) + } else if (graft === Grafts.creatureSubtype.technological) { + // No modifications + logEntries.push([ + "Applied technological subtype graft (no modifications).", + Grafts.creatureSubtype.technological.description + ]) + } else if (graft === Grafts.creatureSubtype.vesk) { + await apply( + actor, + context, + //Senses + SharedAdjusters.Senses.lowLightVision + ) + + // Natural weapons + context.naturalWeapons.enabled = true + context.naturalWeapons.racial = true + + logEntries.push([ + "Applied vesk subtype graft. Added low-light vision and natural weapons.", + Grafts.creatureSubtype.vesk.description + ]) + } else if (graft === Grafts.creatureSubtype.ysoki) { + await apply( + actor, + context, + //Senses + SharedAdjusters.Senses.darkVision60ft, + // Skills (Engineering and stealth as master skills) + new SkillAdjuster({ + setSkillAsMonsterSkill: [ + [Skill.engineering, Skill.stealth], + MonsterSkillType.master + ] + }), + // Survival as good skill + new SkillAdjuster({ + setSkillAsMonsterSkill: [ + Skill.survival, + MonsterSkillType.good + ] + }) + ) + + logEntries.push([ + "Applied ysoki subtype graft. Added darkvision 60 ft., added engineering and stealth as master skills and added survival as a good skill.", + Grafts.creatureSubtype.ysoki.description + ]) + } + + // Append subtype graft to graft list + actorUpdate["data.details.raceAndGrafts"] = + actor.data.data.details.raceAndGrafts + ", " + graft.name + + // Update actor + await actor.update(actorUpdate) + + // Update log + context.log.push(...logEntries) + } + + private static async applyUniversalCreatureRule( + actor, + context: NPCCreationContext, + universalCreatureRule: UniversalCreatureRule + ) { + if (universalCreatureRule == UniversalCreatureRules.mindless) { + await apply( + actor, + context, + // Immunities + SharedAdjusters.Immunities.mindAffectingEffects, + // Skills - set 0 master skills + new SkillAdjuster({ + setMonsterSkillCount: [MonsterSkillType.master, 0] + }), + // Reduce good skills by 1 + new SkillAdjuster({ + mutateMonsterSkill: [MonsterSkillType.good, -1] + }), + // No intelligence + // TODO: This has a chance of overwriting one of the randomly boosted ability scores, we should reassign the overwritten value to another stat + new AbilityScoreAdjuster({ + setAbilityScore: [AbilityScore.intelligence, 0] + }) + ) + + // Update log + context.log.push([ + "Applied mindless universal creature rule. Reduced good skills by 1, reduced master skills to 0, added mind-affecting effects to condition immunities.", + UniversalCreatureRules.mindless.description + ]) + } else if (universalCreatureRule == UniversalCreatureRules.sightless) { + // Uses default implementation + // TODO: Reumove one all UCR can depend on default/subclass implementation + let output = await universalCreatureRule.apply(actor, context) + context.log.push(output) + } else if (universalCreatureRule == UniversalCreatureRules.unliving) { + await apply( + actor, + context, + // No constitution + // TODO: This has a chance of overwriting one of the randomly boosted ability scores, we should reassign the overwritten value to another stat + // TODO: Should support `-` in the future but not yet supported by SFRPG + new AbilityScoreAdjuster({ + setAbilityScore: [AbilityScore.constituion, 0] + }) + ) + + // Update log + context.log.push([ + "Applied unliving universal creature rule, set constitution to `-` .", + UniversalCreatureRules.unliving.description + ]) + } + } + + private static async applyAdjustmentSpecialAbility( + actor, + context: NPCCreationContext, + adjustmentSpecialAbility + ) { + let logEntries: [string, string][] = [] + let actorUpdate = {} + + // Brute - Use the low attack value for the NPC’s main attack, but determine the attack’s damage as if the NPC’s CR were 2 higher (adding the extra damage from weapon specialization). This special ability has a greater impact at higher CRs. + if ( + adjustmentSpecialAbility === + MonsterCreation.specialAbilities.adjustment.brute + ) { + context.attackArrayRow.high = context.attackArrayRow.low + + // Get attack rows higher + let indexOfCR = CR.indexOf(context.CR) + let indexOfCRPlus2 = indexOfCR + 2 + let CRPlus2 = CR[indexOfCRPlus2] + + var monsterReferenceSymbol = + MonsterReferenceSymbol[context.monsterReferenceSymbol] + let attackArrayRowPlus2 = + MonsterCreation.arrays[monsterReferenceSymbol].attack[CRPlus2] + + // Buff all damage by 2 CRs + context.attackArrayRow.kinetic = attackArrayRowPlus2.kinetic + context.attackArrayRow.energy = attackArrayRowPlus2.energy + context.attackArrayRow.standard = attackArrayRowPlus2.standard + + logEntries.push([ + "Applied brute adjustment special ability. Set high attack bonus value to low attack bonus, increased damage by 2 rows in the array.", + MonsterCreation.specialAbilities.adjustment.brute.description + ]) + } + //Increase all saving throw bonuses by 1 or one saving throw bonus by 3. + else if ( + adjustmentSpecialAbility === + MonsterCreation.specialAbilities.adjustment.saveBoost + ) { + // Will we increase all 3 by 1 or 1 by 3 + var randomChoice = Math.random() < 0.5 + if (randomChoice) { + // Applies a +1 to all saves + apply( + actor, + context, + new SaveAdjuster({ mutateSave: [Save.reflex, 1] }), + new SaveAdjuster({ mutateSave: [Save.willpower, 1] }), + new SaveAdjuster({ mutateSave: [Save.fortitude, 1] }) + ) + + logEntries.push([ + "Applied save boost adjustment special ability. +1 to all saves (chose this option at random).", + MonsterCreation.specialAbilities.adjustment.saveBoost + .description + ]) + } else { + // Apply +3 to one save + let saves = [Save.reflex, Save.willpower, Save.fortitude] + Utils.shuffleArray(saves) + + await new SaveAdjuster({ mutateSave: [saves[0], 3] }).apply( + actor, + context + ) + + logEntries.push([ + "Applied save boost adjustment special ability. +3 to " + + saves[0] + + " save (chose this option at random).", + MonsterCreation.specialAbilities.adjustment.saveBoost + .description + ]) + } + } + // Increase all master and good skill bonuses by 1 + else if ( + adjustmentSpecialAbility === + MonsterCreation.specialAbilities.adjustment.skillful + ) { + context.mainArrayRow.masterSkill.mod += 1 + context.mainArrayRow.goodSkill.mod += 1 + + logEntries.push([ + "Applied skillful adjustment special ability. +1 to all master and good skills.", + MonsterCreation.specialAbilities.adjustment.skillful.description + ]) + } + //Increase the NPC’s HP by 20% + else if ( + adjustmentSpecialAbility === + MonsterCreation.specialAbilities.adjustment.extraHitPoints + ) { + context.mainArrayRow.HP = Math.floor(context.mainArrayRow.HP * 1.2) + + logEntries.push([ + "Applied extra hit points adjustment special ability. Added 20% more HP.", + MonsterCreation.specialAbilities.adjustment.extraHitPoints + .description + ]) + } + + // Update actor + await actor.update(actorUpdate) + + // Log + context.log.push(...logEntries) + } + + private static async clean(item) { + if (item["_id"]) { + item["sourceId"] = item["_id"] + delete item["_id"] + } + } +} diff --git a/src/factories/WeaponFactory.ts b/src/factories/WeaponFactory.ts new file mode 100644 index 0000000..e01669c --- /dev/null +++ b/src/factories/WeaponFactory.ts @@ -0,0 +1,54 @@ +import { Utils } from "../utils/Uils.js" +import { + naturalWeaponsTemplate, + unarmedStrikeTemplate +} from "../data/Weapons.js" + +export class WeaponFactory { + public static makeUnarmedStrike() { + return unarmedStrikeTemplate + } + + public static makeNaturalWeapons() { + return naturalWeaponsTemplate + } + + // Generates a CR appropriate laser pistol + public static async makeLaserPistol( + forCR: string + ): Promise { + var pistolName = "laser pistol, azimuth" // level 1 laser pistol + switch (forCR) { + // CR 1/3 to 5 covered by default value + case "6": + case "7": + case "8": + pistolName = "laser pistol, corona" + break + case "9": + case "10": + case "11": + pistolName = "laser pistol, aphelion" + break + case "12": + case "13": + pistolName = "laser pistol, perihelion" + break + case "14": + case "15": + case "16": + pistolName = "laser pistol, parallax" + break + case "17": + case "18": + case "19": + case "20": + pistolName = "laser pistol, zenith" + } + + let laserPistol = await Utils.fuzzyFindItemAsync(pistolName) + if (laserPistol) { + return laserPistol as IWeapon + } + } +} diff --git a/src/models/AdjustmentSpecialAbility.ts b/src/models/AdjustmentSpecialAbility.ts new file mode 100644 index 0000000..dcb3cb5 --- /dev/null +++ b/src/models/AdjustmentSpecialAbility.ts @@ -0,0 +1,19 @@ +// The Adjustment Special Abilitites outlined in Alien Archive 1 pg. 142 +import NPCCreationContext from "./NPCCreationContext.js" +import ISpecialAbility from "./Interfaces/ISpecialAbility.js" +import { ApplyOutput } from "./Interfaces/IApplyable.js" + +export default class AdjustmentSpecialAbility implements ISpecialAbility { + name: string + description: string + + constructor(name: string, description: string) { + this.name = name + this.description = description + } + + async apply(actor, context: NPCCreationContext): Promise { + // Stub + return ["", ""] + } +} diff --git a/src/models/CreatureSubtypeGraft.ts b/src/models/CreatureSubtypeGraft.ts new file mode 100644 index 0000000..d17d9cb --- /dev/null +++ b/src/models/CreatureSubtypeGraft.ts @@ -0,0 +1,8 @@ +export default class CreatureSubtypeGraft { + name: string + description: string + constructor(name: string, description: string) { + this.name = name + this.description = description + } +} diff --git a/src/models/CreatureTypeGraft.ts b/src/models/CreatureTypeGraft.ts index 43c1c23..ecc3f74 100644 --- a/src/models/CreatureTypeGraft.ts +++ b/src/models/CreatureTypeGraft.ts @@ -1,6 +1,16 @@ export default class CreatureTypeGraft { name: string - constructor(name: string) { - this.name = name; + description: string + // Options + capicityForLanguage: boolean // Some creature grafts have no innate capacity for language (very low or no intelligence) + + constructor( + name: string, + description: string, + capicityForLanguage: boolean = true + ) { + this.name = name + this.description = description + this.capicityForLanguage = capicityForLanguage } -} \ No newline at end of file +} diff --git a/src/models/Interfaces/IApplyable.ts b/src/models/Interfaces/IApplyable.ts new file mode 100644 index 0000000..3fc8269 --- /dev/null +++ b/src/models/Interfaces/IApplyable.ts @@ -0,0 +1,22 @@ +import NPCCreationContext from "../NPCCreationContext.js" +import Adjuster from "../adjusters/Adjuster.js" + +// The output (a string tuple of an apply action, usually describing what was done) +export type ApplyOutput = [string, string] + +export async function apply( + actor, + context: NPCCreationContext, + ...applyables: IApplyable[] +): Promise { + for (let applyable of applyables) { + await applyable.apply(actor, context) + } + + // TODO: Collect output + return ["", ""] +} + +export interface IApplyable { + apply(actor, context: NPCCreationContext): Promise +} diff --git a/src/models/Interfaces/IAttackArrayRow.ts b/src/models/Interfaces/IAttackArrayRow.ts new file mode 100644 index 0000000..2c7205a --- /dev/null +++ b/src/models/Interfaces/IAttackArrayRow.ts @@ -0,0 +1,7 @@ +interface IMainArrayRow { + high: number + low: number + energy: string + kinetic: string + standard: string +} diff --git a/src/models/Interfaces/IMainArrayRow.ts b/src/models/Interfaces/IMainArrayRow.ts new file mode 100644 index 0000000..3ca5e22 --- /dev/null +++ b/src/models/Interfaces/IMainArrayRow.ts @@ -0,0 +1,13 @@ +interface IMainArrayRow { + CR: string + EAC: number + KAC: number + fort: number + reflex: number + will: number + HP: number + abilityMods: number[] + specialAbilities: number + masterSkill: any + goodSkill: any +} diff --git a/src/models/Interfaces/ISpecialAbility.ts b/src/models/Interfaces/ISpecialAbility.ts new file mode 100644 index 0000000..66468bb --- /dev/null +++ b/src/models/Interfaces/ISpecialAbility.ts @@ -0,0 +1,7 @@ +import NPCCreationContext from "../NPCCreationContext.js" +import { ApplyOutput, IApplyable } from "./IApplyable.js" + +export default interface ISpecialAbility extends IApplyable { + name: string + apply(actor, context: NPCCreationContext): Promise +} diff --git a/src/models/Interfaces/items/IGoods.ts b/src/models/Interfaces/items/IGoods.ts new file mode 100644 index 0000000..4e33d9e --- /dev/null +++ b/src/models/Interfaces/items/IGoods.ts @@ -0,0 +1,3 @@ +interface IGoods extends IItem { + data: any +} diff --git a/src/models/Interfaces/items/IItem.ts b/src/models/Interfaces/items/IItem.ts new file mode 100644 index 0000000..b4f5b9d --- /dev/null +++ b/src/models/Interfaces/items/IItem.ts @@ -0,0 +1,7 @@ +interface IItem { + name: string + type: string + flags: any + img?: string + effects: any[] +} diff --git a/src/models/Interfaces/items/IWeapon.ts b/src/models/Interfaces/items/IWeapon.ts new file mode 100644 index 0000000..96826f5 --- /dev/null +++ b/src/models/Interfaces/items/IWeapon.ts @@ -0,0 +1,48 @@ +interface IDamage { + parts: [string, string][] +} + +interface IWeaponData { + description: any + source: string + type: string + quantity: number | null + bulk: string + price: number + level: number + attuned: boolean + equipped: boolean + equippable: boolean + identified: boolean + attributes: any + activation: any + duration: any + target: any + area: any + range: any + uses: any + isActive: any + ability: string + actionType: string + attackBonus: number + chatFlavor: string + critical: any + damage: IDamage + formula: string + save: any + descriptors: any[] + capacity: any + usage: any + modifiers: any[] + container: any + weaponType: string + weaponCategory: string + special: string + properties: any + proficient: boolean + abilityMods: any +} + +interface IWeapon extends IItem { + data: IWeaponData +} diff --git a/src/models/NPCCreationContext.ts b/src/models/NPCCreationContext.ts index 84470db..d220967 100644 --- a/src/models/NPCCreationContext.ts +++ b/src/models/NPCCreationContext.ts @@ -1,11 +1,47 @@ -import CreatureTypeGraft from "./CreatureTypeGraft.js"; +import CreatureTypeGraft from "./CreatureTypeGraft.js" +import CreatureSubtypeGraft from "./CreatureSubtypeGraft.js" +import { CR, Gender, MonsterReferenceSymbol } from "../data/MonsterCreation.js" export default class NPCCreationContext { + public race: string | undefined + public gender: Gender | undefined + public CR: string = CR[0] // defaults to lowest CR + public creatureTypeGraft: CreatureTypeGraft | undefined + public creatureSubtypeGrafts: CreatureSubtypeGraft[] | undefined + public monsterReferenceSymbol: MonsterReferenceSymbol = + MonsterReferenceSymbol.combatant // defaults to combatant + public tokenOptions: TokenOptions = new TokenOptions(false) + // Array rows + public mainArrayRow: any + public attackArrayRow: any + // Skills - in addition to the array master/good skills + public masterSkills: string[] = [] + public goodSkills: string[] = [] + // Abilities - locked ability modifiers from grafts/special abilities + public abilities: [string, number | null][] = [] // `null` refers to no ability ie. mindless (not yet implemented in SFRPG) + // Senses + public senses: string[] = [] + // Immunities + public damageImmunities: string[] = [] + public conditionImmunities: string[] = [] + // Special abilities + public universalCreatureRules: any[] = [] + // Item generation + public naturalWeapons = { enabled: false, racial: false } + public rangedWeapon = { enabled: false } // NOTE: This will be fleshed out and expanded over time + public itemsToAdd: any[] = [] + public generateAdditionalItems = true // Generates "junk" and character appropriate items + // Biography + public generatePersonality = true // Will try to generate a biography for the creature, generally only used for non-combat NPCs + // Debugging / auditing + public log: [string, string][] = [] // We record each mutation applied - // No parameters - public creatureTypeGraft: CreatureTypeGraft; + constructor() {} +} - constructor() { - this.creatureTypeGraft = null; +export class TokenOptions { + public dynamicImage: boolean + constructor(dynamicImage: boolean) { + this.dynamicImage = dynamicImage } -} \ No newline at end of file +} diff --git a/src/models/Race.ts b/src/models/Race.ts new file mode 100644 index 0000000..329c2fd --- /dev/null +++ b/src/models/Race.ts @@ -0,0 +1,36 @@ +import { Size } from "../data/MonsterCreation.js" +import CreatureTypeGraft from "./CreatureTypeGraft.js" +import CreatureSubtypeGraft from "./CreatureSubtypeGraft.js" + +export default class Race { + name: string + size: Size + arms: number = 2 + creatureTypeGraft: CreatureTypeGraft + creatureSubtypeGrafts: CreatureSubtypeGraft[] | undefined + languages: string[] | undefined + + constructor( + name: string, + size: Size, + creatureTypeGraft: CreatureTypeGraft, + creatureSubtypeGrafts: + | CreatureSubtypeGraft[] + | CreatureSubtypeGraft = [], + languages?: string[], + customLanguages?: [string], + arms?: number + ) { + this.name = name + this.size = size + this.creatureTypeGraft = creatureTypeGraft + this.languages = languages + + // Supports arrays and non-arrays + if (Array.isArray(creatureSubtypeGrafts)) { + this.creatureSubtypeGrafts = creatureSubtypeGrafts + } else { + this.creatureSubtypeGrafts = [creatureSubtypeGrafts] + } + } +} diff --git a/src/models/UniversalCreatureRule.ts b/src/models/UniversalCreatureRule.ts new file mode 100644 index 0000000..f66bdaa --- /dev/null +++ b/src/models/UniversalCreatureRule.ts @@ -0,0 +1,28 @@ +import ISpecialAbility from "./Interfaces/ISpecialAbility.js" +import NPCCreationContext from "./NPCCreationContext.js" +import { Utils } from "../utils/Uils.js" +import { ApplyOutput } from "./Interfaces/IApplyable.js" + +export default class UniversalCreatureRule implements ISpecialAbility { + name: string + description: string + + constructor(name: string, description: string) { + this.name = name + this.description = description + } + + async apply(actor, context: NPCCreationContext): Promise { + // By default when applied will add the appropriate feature to npc + let feature = await Utils.fuzzyFindUniversalCreatureRule(this.name) + if (feature) context.itemsToAdd.push(feature) + + // Default is just a basic log indicating no modifications + return [ + "Applied " + + this.name + + " universal creature rule (no modifications).", + this.description + ] + } +} diff --git a/src/models/adjusters/AbilityScoreAdjuster.ts b/src/models/adjusters/AbilityScoreAdjuster.ts new file mode 100644 index 0000000..9bda4c4 --- /dev/null +++ b/src/models/adjusters/AbilityScoreAdjuster.ts @@ -0,0 +1,27 @@ +import { ApplyOutput } from "../Interfaces/IApplyable.js" +import NPCCreationContext from "../NPCCreationContext.js" +import Adjuster from "./Adjuster.js" +import { AbilityScore } from "../../data/AbilityScores.js" + +type SetAbilityScore = [abilityScore: AbilityScore, amount: number] + +export default class AbilityScoreAdjuster extends Adjuster { + setAbilityScore: SetAbilityScore | undefined + + // Set ability score value + constructor(abilityScoreAdjuster: Partial = {}) { + super() + Object.assign(this, abilityScoreAdjuster) + } + + async apply(actor, context: NPCCreationContext): Promise { + if (this.setAbilityScore) { + context.abilities.push([ + this.setAbilityScore[0], + this.setAbilityScore[1] + ]) + } + // TODO: Construct log from individual adjustors + return ["", ""] + } +} diff --git a/src/models/adjusters/Adjuster.ts b/src/models/adjusters/Adjuster.ts new file mode 100644 index 0000000..ef832e7 --- /dev/null +++ b/src/models/adjusters/Adjuster.ts @@ -0,0 +1,9 @@ +import { ApplyOutput, IApplyable } from "../Interfaces/IApplyable.js" +import NPCCreationContext from "../NPCCreationContext.js" + +export default abstract class Adjuster implements IApplyable { + async apply(actor, context: NPCCreationContext): Promise { + // stub + return ["", ""] + } +} diff --git a/src/models/adjusters/ImmunityAdjuster.ts b/src/models/adjusters/ImmunityAdjuster.ts new file mode 100644 index 0000000..46a2083 --- /dev/null +++ b/src/models/adjusters/ImmunityAdjuster.ts @@ -0,0 +1,27 @@ +import { ApplyOutput } from "../Interfaces/IApplyable.js" +import NPCCreationContext from "../NPCCreationContext.js" +import Adjuster from "./Adjuster.js" + +type AddConditionImmunity = [immunity: string] | string + +export default class ImmunityAdjuster extends Adjuster { + addConditionImmunity: AddConditionImmunity | undefined + + // Set number of good / master skills + constructor(immunityAdjuster: Partial = {}) { + super() + Object.assign(this, immunityAdjuster) + } + + async apply(actor, context: NPCCreationContext): Promise { + if (this.addConditionImmunity) { + if (Array.isArray(this.addConditionImmunity)) { + context.conditionImmunities.push(this.addConditionImmunity[0]) + } else { + context.conditionImmunities.push(this.addConditionImmunity) + } + } + // TODO: Construct log from individual adjustors + return ["", ""] + } +} diff --git a/src/models/adjusters/SaveAdjuster.ts b/src/models/adjusters/SaveAdjuster.ts new file mode 100644 index 0000000..fb228da --- /dev/null +++ b/src/models/adjusters/SaveAdjuster.ts @@ -0,0 +1,27 @@ +import { ApplyOutput } from "../Interfaces/IApplyable.js" +import NPCCreationContext from "../NPCCreationContext.js" +import Adjuster from "./Adjuster.js" +import { Save } from "../../data/MonsterCreation.js" + +type MutateSave = [saveType: Save, amount: number] + +export default class SaveAdjuster extends Adjuster { + mutateSave: MutateSave | undefined + + // Set number of good / master skills + constructor(saveAdjuster: Partial = {}) { + super() + Object.assign(this, saveAdjuster) + } + + async apply(actor, context: NPCCreationContext): Promise { + if (this.mutateSave) { + let array = context.mainArrayRow + let currentSave = array[this.mutateSave[0]] + array[this.mutateSave[0]] = currentSave + this.mutateSave[1] + } + + // TODO: Construct log from individual adjustors + return ["", ""] + } +} diff --git a/src/models/adjusters/SenseAdjuster.ts b/src/models/adjusters/SenseAdjuster.ts new file mode 100644 index 0000000..0d25a4c --- /dev/null +++ b/src/models/adjusters/SenseAdjuster.ts @@ -0,0 +1,28 @@ +import { ApplyOutput } from "../Interfaces/IApplyable.js" +import NPCCreationContext from "../NPCCreationContext.js" +import Adjuster from "./Adjuster.js" + +type AddSense = [sense: string] | string + +export default class SenseAdjuster extends Adjuster { + addSense: AddSense | undefined + + // Set number of good / master skills + constructor(senseAdjuster: Partial = {}) { + super() + Object.assign(this, senseAdjuster) + } + + async apply(actor, context: NPCCreationContext): Promise { + if (this.addSense) { + if (Array.isArray(this.addSense)) { + context.senses.push(this.addSense[0]) + } else { + context.senses.push(this.addSense) + } + } + + // TODO: Construct log from individual adjustors + return ["", ""] + } +} diff --git a/src/models/adjusters/SkillAdjuster.ts b/src/models/adjusters/SkillAdjuster.ts new file mode 100644 index 0000000..eb7e993 --- /dev/null +++ b/src/models/adjusters/SkillAdjuster.ts @@ -0,0 +1,73 @@ +import { ApplyOutput } from "../Interfaces/IApplyable.js" +import NPCCreationContext from "../NPCCreationContext.js" +import Adjuster from "./Adjuster.js" +import { MonsterSkillType } from "../../data/MonsterCreation.js" +import { Skill } from "../../data/Skills.js" + +// Set total amount of good/master skills (usually used when setting to zero) +type SetMonsterSkillCount = [skillType: MonsterSkillType, amount: number] +// Adjust total amount of good/master skills by +- amount +type MutateMonsterSkill = [skillType: MonsterSkillType, mutation: number] +// Adjust value of specific skill (ie. +1 to survival) +type MutateSkillValue = [skill: Skill, mutation: number] +// Set specific skill as good/master skill +type SetSkillAsMonsterSkill = [skill: Skill | Skill[], type: MonsterSkillType] + +export default class SkillAdjuster extends Adjuster { + setMonsterSkillCount: SetMonsterSkillCount | undefined + mutateMonsterSkill: MutateMonsterSkill | undefined + mutateSkillValue: MutateSkillValue | undefined + setSkillAsMonsterSkill: SetSkillAsMonsterSkill | undefined + + // Set number of good / master skills + constructor(skillAdjuster: Partial = {}) { + super() + Object.assign(this, skillAdjuster) + } + + async apply(actor, context: NPCCreationContext): Promise { + // Set number of good / master skills + if (this.setMonsterSkillCount) { + if (this.setMonsterSkillCount[0] == MonsterSkillType.good) { + // set good skill count + context.mainArrayRow.goodSkill.count = this.setMonsterSkillCount[1] + } else { + // set master skill count + context.mainArrayRow.masterSkill.count = this.setMonsterSkillCount[1] + } + } + // Set a specific skill as a good/master skill + if (this.setSkillAsMonsterSkill) { + let skill = this.setSkillAsMonsterSkill[0] + + if (this.setSkillAsMonsterSkill[1] == MonsterSkillType.master) { + if (Array.isArray(skill)) { + context.masterSkills.push(...skill) + } else { + context.masterSkills.push(skill) + } + } else { + if (Array.isArray(skill)) { + context.goodSkills.push(...skill) + } else { + context.goodSkills.push(skill) + } + } + } + // Adjust the skill value applied to good/master skills + if (this.mutateMonsterSkill) { + if (this.mutateMonsterSkill[0] == MonsterSkillType.good) { + // adjust good skill count + context.mainArrayRow.goodSkill.count += this.mutateMonsterSkill[1] + } else { + // set master skill count + context.mainArrayRow.masterSkill.count += this.mutateMonsterSkill[1] + } + } + + // TODO: MutateSkillValue logic + + // TODO: Construct log from individual adjustors + return ["", ""] + } +} diff --git a/src/utils/Setup.ts b/src/utils/Setup.ts index 962426f..8eb2581 100644 --- a/src/utils/Setup.ts +++ b/src/utils/Setup.ts @@ -1,17 +1,17 @@ -import { Populator } from "../Populator.js"; +import { Populator } from "../Populator.js" // MARK: Hooks -declare var Hooks; +declare var Hooks // Ensure the "Populate" button is visible. Hooks.on("renderSidebarTab", async (app) => { if (app.options.id == "actors") { - Populator.ensurePopulateVisible(); + Populator.ensurePopulateVisible() } -}); +}) // Adds options -Hooks.once('init', async function () { +Hooks.once("init", async function () { // Default CR game.settings.register("foundryvtt-sfrpg-populator", "defaultCR", { name: "Default CR", @@ -24,13 +24,17 @@ Hooks.once('init', async function () { "1/3": "CR 1/3", "1/2": "CR 1/2", "1": "CR 1", - "2": "CR 2" + "2": "CR 2", + "3": "CR 3", + "4": "CR 4", + "5": "CR 5" } - }); + }) // Use dynamic token images (requires specific folder structure in foundry data) game.settings.register("foundryvtt-sfrpg-populator", "dynamicTokenImages", { name: "Dynamic token images (Experimental)", - hint: "When enabled the token will be assigned a random image from \\populator\\\\. See the README.md on Github for an example.", + hint: + "When enabled the token will be assigned a random image from \\populator\\\\ or \\populator\\. See the README.md on Github for an example.", scope: "client", config: true, default: false, @@ -39,5 +43,5 @@ Hooks.once('init', async function () { false: "No", true: "Yes" } - }); -}); + }) +}) diff --git a/src/utils/StringFormat.js b/src/utils/StringFormat.js index 4c6815e..d56bdf8 100644 --- a/src/utils/StringFormat.js +++ b/src/utils/StringFormat.js @@ -4,12 +4,9 @@ export class StringFormat { // Adds a string helper function used to generate alien names based on dynamic format strings static stringFormat(format) { - var args = Array.prototype.slice.call(arguments, 1); - return format.replace(/{(\d+)}/g, function(match, number) { - return typeof args[number] != 'undefined' - ? args[number] - : match - ; - }); - }; + var args = Array.prototype.slice.call(arguments, 1) + return format.replace(/{(\d+)}/g, function (match, number) { + return typeof args[number] != "undefined" ? args[number] : match + }) + } } diff --git a/src/utils/Uils.ts b/src/utils/Uils.ts index 75a51ed..e6e3bad 100644 --- a/src/utils/Uils.ts +++ b/src/utils/Uils.ts @@ -2,86 +2,98 @@ // `stringContains()`, `fuzzyFindCompendiumAsync()`, `fuzzyFindItemAsync()`, `fuzzyFindSpellAsync()`, `parseSubtext()` // forked from https://gitlab.com/TimToxopeus/sfrpg-statblock-parser/-/blob/develop/module/utils.js export class Utils { - /* Randomize array in-place using Durstenfeld shuffle algorithm */ static shuffleArray(array) { for (var i = array.length - 1; i > 0; i--) { - var j = Math.floor(Math.random() * (i + 1)); - var temp = array[i]; - array[i] = array[j]; - array[j] = temp; + var j = Math.floor(Math.random() * (i + 1)) + var temp = array[i] + array[i] = array[j] + array[j] = temp } } static stringContains(string, subString, bCaseSensitive = true) { if (bCaseSensitive) { - return string.includes(subString); + return string.includes(subString) } - return string.toLowerCase().includes(subString.toLowerCase()); + return string.toLowerCase().includes(subString.toLowerCase()) } /** Will try to find an entry in the specified compendium that matches all the terms, will return the first entry that does. */ static async fuzzyFindCompendiumAsync(compendiumName, searchString) { if (!compendiumName) { - Utils.log("No compendium name specified."); - return null; + Utils.log("No compendium name specified.") + return null } if (!searchString) { - Utils.log("No search string specified."); - return null; + Utils.log("No search string specified.") + return null } - let compendium = game.packs.find(element => element.metadata.name.includes(compendiumName)); + let compendium = game.packs.find((element) => + element.metadata.name.includes(compendiumName) + ) if (compendium == undefined) { - Utils.log("Could not find compendium named " + compendiumName + "."); - return null; + Utils.log("Could not find compendium named " + compendiumName + ".") + return null } // Let the compendium load - await compendium.getIndex(); - - let rawString = this.parseSubtext(searchString)[0]; - let terms = rawString.toLowerCase().replace("(ex)","").replace("(su)","").replace("(sp)","").trim().replace(/[*,;()\[\]'"]/g,"").split(' '); - - let entryWeWant = null; + await compendium.getIndex() + + let rawString = this.parseSubtext(searchString)[0] + let terms = rawString + .toLowerCase() + .replace("(ex)", "") + .replace("(su)", "") + .replace("(sp)", "") + .trim() + .replace(/[*,;()\[\]'"]/g, "") + .split(" ") + + let entryWeWant = null for (let entry of compendium.index) { - - var rawEntryName = this.parseSubtext(entry.name)[0]; + var rawEntryName = this.parseSubtext(entry.name)[0] // TODO: Don't need to do this every iteration in the loop can set state `babeleActive` somewhere above // A translation module is active - if(game.modules.get('babele')?.active) { + if (game.modules.get("babele")?.active) { for (let key in compendium.translations) { - let translation = compendium.translations[key]; + let translation = compendium.translations[key] if (translation.name == entry.name) { - rawEntryName = this.parseSubtext(translation.id)[0]; - break; + rawEntryName = this.parseSubtext(translation.id)[0] + break } } } - let entryName = rawEntryName.toLowerCase().replace("(ex)","").replace("(su)","").replace("(sp)","").trim(); - let entryTerms = entryName.replace(/[*,;()\[\]'"]/g,"").split(' '); + let entryName = rawEntryName + .toLowerCase() + .replace("(ex)", "") + .replace("(su)", "") + .replace("(sp)", "") + .trim() + let entryTerms = entryName.replace(/[*,;()\[\]'"]/g, "").split(" ") if (terms.length !== entryTerms.length) { - continue; + continue } - let bAllTermsPresent = true; + let bAllTermsPresent = true for (let term of terms) { if (!entryTerms.includes(term)) { - bAllTermsPresent = false; - break; + bAllTermsPresent = false + break } } if (!bAllTermsPresent) { - continue; + continue } - entryWeWant = compendium.getEntry(entry._id); - break; + entryWeWant = compendium.getEntry(entry._id) + break } if (entryWeWant != undefined) { @@ -89,60 +101,69 @@ export class Utils { } else { //PopulatorUtils.log("Item " + entryName + " not found."); } - return entryWeWant; + return entryWeWant } static async fuzzyFindItemAsync(itemName) { - itemName = itemName.toLowerCase(); + itemName = itemName.toLowerCase() // Common substitutions - itemName = itemName.replace("grenades", "grenade"); + itemName = itemName.replace("grenades", "grenade") if (itemName.endsWith("grenade 1")) { - itemName = itemName.replace("grenade 1", "grenade i"); + itemName = itemName.replace("grenade 1", "grenade i") } else if (itemName.endsWith("grenade 2")) { - itemName = itemName.replace("grenade 2", "grenade ii"); + itemName = itemName.replace("grenade 2", "grenade ii") } else if (itemName.endsWith("grenade 3")) { - itemName = itemName.replace("grenade 3", "grenade iii"); + itemName = itemName.replace("grenade 3", "grenade iii") } else if (itemName.endsWith("grenade 4")) { - itemName = itemName.replace(" 4", "grenade iv"); + itemName = itemName.replace(" 4", "grenade iv") } else if (itemName.endsWith("grenade 5")) { - itemName = itemName.replace("grenade 5", "grenade v"); + itemName = itemName.replace("grenade 5", "grenade v") } - itemName = itemName.replace("batteries", "battery"); + itemName = itemName.replace("batteries", "battery") if (Utils.stringContains(itemName, "battery", false)) { if (!Utils.stringContains(itemName, "capacity", false)) { - itemName += ", standard"; + itemName += ", standard" } } - return this.fuzzyFindCompendiumAsync("equipment", itemName); + return this.fuzzyFindCompendiumAsync("equipment", itemName) } static async fuzzyFindRaceAsync(raceName) { - raceName = raceName.replace("/ ", "/"); - raceName = raceName.replace(" /", "/"); - return this.fuzzyFindCompendiumAsync("races", raceName); + raceName = raceName.replace("/ ", "/") + raceName = raceName.replace(" /", "/") + return this.fuzzyFindCompendiumAsync("races", raceName) + } + + static async fuzzyFindUniversalCreatureRule(universalCreatureRuleName) { + return await this.fuzzyFindCompendiumAsync( + "universal-creature-rules", + universalCreatureRuleName + ) } static async fuzzyFindSpellAsync(spellName) { - spellName = spellName.replace("/ ", "/"); - spellName = spellName.replace(" /", "/"); - return this.fuzzyFindCompendiumAsync("spells", spellName); + spellName = spellName.replace("/ ", "/") + spellName = spellName.replace(" /", "/") + return this.fuzzyFindCompendiumAsync("spells", spellName) } static parseSubtext = (value) => { - let startSubtextIndex = value.indexOf('('); - let endSubtextIndex = value.indexOf(')'); + let startSubtextIndex = value.indexOf("(") + let endSubtextIndex = value.indexOf(")") if (startSubtextIndex > -1 && endSubtextIndex > startSubtextIndex) { - let baseValue = value.substring(0, startSubtextIndex).trim(); - let subValue = value.substring(startSubtextIndex+1, endSubtextIndex).trim(); - return [baseValue, subValue]; + let baseValue = value.substring(0, startSubtextIndex).trim() + let subValue = value + .substring(startSubtextIndex + 1, endSubtextIndex) + .trim() + return [baseValue, subValue] } else { - return [value]; + return [value] } } static log(message) { - console.log("POPULATOR | " + message); + console.log("POPULATOR | " + message) } -} \ No newline at end of file +} diff --git a/templates/PopulatorPanel.html b/templates/PopulatorPanel.html index 797046f..3c03997 100644 --- a/templates/PopulatorPanel.html +++ b/templates/PopulatorPanel.html @@ -1,29 +1,39 @@
- Left-click the Populator button to skip this screen and generate a random non-combatant NPC. + Right-click the Populator button to skip this screen and generate a random non-combatant NPC.
- + +

-

-