From 756c512c206d96f06a2abf4b79b65fd9634e4560 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Wed, 22 Sep 2021 02:33:20 +0200 Subject: [PATCH 01/10] ci: clean pack entries when generating packs or jsons --- gulpfile.js | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/gulpfile.js b/gulpfile.js index 1c9a2e74..9682be33 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -51,6 +51,34 @@ function buildStyles() { .pipe(gulp.dest(path.join(distDirectory, "css"))); } +/** + * Remove unwanted data from a pack entry + */ +function cleanPackEntry(entry, cleanSourceId = true) { + if (cleanSourceId) { + delete entry.flags?.core?.sourceId; + } + if (entry.permission) entry.permission = { default: 0 }; + + const embeddedDocumentCollections = [ + "drawings", + "effects", + "items", + "lights", + "notes", + "results", + "sounds", + "templates", + "tiles", + "tokens", + "walls", + ]; + embeddedDocumentCollections + .flatMap((embeddedDocumentCollection) => entry[embeddedDocumentCollection] ?? []) + .forEach((embeddedEntry) => cleanPackEntry(embeddedEntry, false)); + return entry; +} + /** * Convert a stream of JSON files to NeDB files */ @@ -60,6 +88,7 @@ const jsonToNeDB = () => try { file.contents = Buffer.from( JSON.parse(file.contents.toString()) + .map(cleanPackEntry) .map((entry) => JSON.stringify(entry)) .join("\n") + "\n", ); @@ -97,7 +126,7 @@ const neDBToJSON = () => if (err) { callback(err); } else { - file.contents = Buffer.from(JSON.stringify(docs, undefined, 4) + "\n"); + file.contents = Buffer.from(JSON.stringify(docs.map(cleanPackEntry), undefined, 4) + "\n"); file.path = path.join( path.dirname(file.path), path.basename(file.path, path.extname(file.path)) + ".json", From bdea7de7f3f505a021ab881cef2360bd83e7d7aa Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Wed, 22 Sep 2021 02:34:50 +0200 Subject: [PATCH 02/10] fix: make it possible to add embedded effects/items to items and actors in packs --- src/module/active-effect.ts | 7 ++----- src/module/actor/sheets/actor-sheet.ts | 4 ++-- src/module/item/item-sheet.ts | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/module/active-effect.ts b/src/module/active-effect.ts index 8a029c4d..965f9f8f 100644 --- a/src/module/active-effect.ts +++ b/src/module/active-effect.ts @@ -95,14 +95,11 @@ export class DS4ActiveEffect extends ActiveEffect { * @param context The context for the creation of the effect, requiring a parent {@link DS4Actor} or {@link DS4Item}. * @returns A promise that resolved to the created effect or udifined of the creation was prevented. */ - static async createDefault( - context: DocumentModificationContext & { parent: DS4Actor | DS4Item }, - ): Promise { + static async createDefault(parent: DS4Actor | DS4Item): Promise { const createData = { label: getGame().i18n.localize(`DS4.NewEffectLabel`), icon: this.FALLBACK_ICON, }; - - return this.create(createData, context); + return parent.createEmbeddedDocuments("ActiveEffect", [createData]) as Promise; } } diff --git a/src/module/actor/sheets/actor-sheet.ts b/src/module/actor/sheets/actor-sheet.ts index e192e49b..58651f4e 100644 --- a/src/module/actor/sheets/actor-sheet.ts +++ b/src/module/actor/sheets/actor-sheet.ts @@ -141,7 +141,7 @@ export class DS4ActorSheet extends ActorSheet * Create a new ActiveEffect for the item using default data. */ protected createActiveEffect(): void { - DS4ActiveEffect.createDefault({ parent: this.item }); + DS4ActiveEffect.createDefault(this.item); } } From af7ebb1b9122291350445c7158a2911bc89dd1dd Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Wed, 22 Sep 2021 02:35:55 +0200 Subject: [PATCH 03/10] feat: add an additional armor material type "natural" --- src/lang/de.json | 2 ++ src/lang/en.json | 2 ++ src/module/config.ts | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/lang/de.json b/src/lang/de.json index 067f0d4f..46904f8f 100644 --- a/src/lang/de.json +++ b/src/lang/de.json @@ -94,6 +94,8 @@ "DS4.ArmorMaterialTypeChainAbbr": "Ketten", "DS4.ArmorMaterialTypePlate": "Platten", "DS4.ArmorMaterialTypePlateAbbr": "Platten", + "DS4.ArmorMaterialTypeNatural": "Natürlich", + "DS4.ArmorMaterialTypeNaturalAbbr": "Natürlich", "DS4.SpellType": "Zauberspruchtyp", "DS4.SpellTypeAbbr": "T", "DS4.SpellTypeSpellcasting": "Zaubern", diff --git a/src/lang/en.json b/src/lang/en.json index 2b9bb069..ad9a0900 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -94,6 +94,8 @@ "DS4.ArmorMaterialTypeChainAbbr": "Chain", "DS4.ArmorMaterialTypePlate": "Plate", "DS4.ArmorMaterialTypePlateAbbr": "Plate", + "DS4.ArmorMaterialTypeNatural": "Natural", + "DS4.ArmorMaterialTypeNaturalAbbr": "Natural", "DS4.SpellType": "Spell Type", "DS4.SpellTypeAbbr": "T", "DS4.SpellTypeSpellcasting": "Spellcasting", diff --git a/src/module/config.ts b/src/module/config.ts index 09c7c064..2c79cf54 100644 --- a/src/module/config.ts +++ b/src/module/config.ts @@ -75,6 +75,7 @@ const i18nKeys = { leather: "DS4.ArmorMaterialTypeLeather", chain: "DS4.ArmorMaterialTypeChain", plate: "DS4.ArmorMaterialTypePlate", + natural: "DS4.ArmorMaterialTypeNatural", }, /** @@ -85,6 +86,7 @@ const i18nKeys = { leather: "DS4.ArmorMaterialTypeLeatherAbbr", chain: "DS4.ArmorMaterialTypeChainAbbr", plate: "DS4.ArmorMaterialTypePlateAbbr", + natural: "DS4.ArmorMaterialTypeNaturalAbbr", }, spellTypes: { From 75366ea354fd91829189f544e10a1f0ef0145d24 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Wed, 22 Sep 2021 02:36:49 +0200 Subject: [PATCH 04/10] feat: don't count armor from material type cloth or natural as spell malus --- src/module/actor/actor.ts | 52 ++++++++++++++++++++++++++------------- 1 file changed, 35 insertions(+), 17 deletions(-) diff --git a/src/module/actor/actor.ts b/src/module/actor/actor.ts index 15291e38..1b3a7900 100644 --- a/src/module/actor/actor.ts +++ b/src/module/actor/actor.ts @@ -6,6 +6,7 @@ import { ModifiableDataBaseTotal } from "../common/common-data"; import { DS4 } from "../config"; import { getGame } from "../helpers"; +import { DS4Item } from "../item/item"; import { DS4ArmorDataProperties, DS4ShieldDataProperties } from "../item/item-data-properties"; import { ItemType } from "../item/item-data-source"; import { createCheckRoll } from "../rolls/check-factory"; @@ -117,8 +118,8 @@ export class DS4Actor extends Actor { * @override */ prepareDerivedData(): void { - this._prepareCombatValues(); - this._prepareChecks(); + this.prepareCombatValues(); + this.prepareChecks(); } /** @@ -189,9 +190,10 @@ export class DS4Actor extends Actor { /** * Prepares the combat values of the actor. */ - protected _prepareCombatValues(): void { + protected prepareCombatValues(): void { const data = this.data.data; - const armorValueOfEquippedItems = this._calculateArmorValueOfEquippedItems(); + const armorValueOfEquippedItems = this.calculateArmorValueOfEquippedItems(); + const spellMalusOfEquippedItems = this.calculateSpellMaluesOfEquippedItems(); data.combatValues.hitPoints.base = data.attributes.body.total + data.traits.constitution.total + 10; data.combatValues.defense.base = @@ -201,9 +203,9 @@ export class DS4Actor extends Actor { data.combatValues.meleeAttack.base = data.attributes.body.total + data.traits.strength.total; data.combatValues.rangedAttack.base = data.attributes.mobility.total + data.traits.dexterity.total; data.combatValues.spellcasting.base = - data.attributes.mind.total + data.traits.aura.total - armorValueOfEquippedItems; + data.attributes.mind.total + data.traits.aura.total - spellMalusOfEquippedItems; data.combatValues.targetedSpellcasting.base = - data.attributes.mind.total + data.traits.dexterity.total - armorValueOfEquippedItems; + data.attributes.mind.total + data.traits.dexterity.total - spellMalusOfEquippedItems; Object.values(data.combatValues).forEach( (combatValue: ModifiableDataBaseTotal) => (combatValue.total = combatValue.base + combatValue.mod), @@ -211,24 +213,40 @@ export class DS4Actor extends Actor { } /** - * Calculates the total armor value of all equipped items. + * Calculates the total armor value of the equipped items. */ - protected _calculateArmorValueOfEquippedItems(): number { - return this.items - .map((item) => item.data) - .filter( - (data): data is foundry.data.ItemData & (DS4ArmorDataProperties | DS4ShieldDataProperties) => - data.type === "armor" || data.type === "shield", - ) - .filter((data) => data.data.equipped) - .map((data) => data.data.armorValue) + protected calculateArmorValueOfEquippedItems(): number { + return this.getEquippedItemsWithArmor() + .map((item) => item.data.data.armorValue) .reduce((a, b) => a + b, 0); } + /** + * Calculates the spell malus from equipped items. + */ + protected calculateSpellMaluesOfEquippedItems(): number { + return this.getEquippedItemsWithArmor() + .filter( + (item) => + !(item.data.type === "armor" && ["cloth", "natural"].includes(item.data.data.armorMaterialType)), + ) + .map((item) => item.data.data.armorValue) + .reduce((a, b) => a + b, 0); + } + + private getEquippedItemsWithArmor() { + return this.items + .filter( + (item): item is DS4Item & { data: DS4ArmorDataProperties | DS4ShieldDataProperties } => + item.data.type === "armor" || item.data.type === "shield", + ) + .filter((item) => item.data.data.equipped); + } + /** * Prepares the check target numbers of checks for the actor. */ - protected _prepareChecks(): void { + protected prepareChecks(): void { const data = this.data.data; data.checks = { appraise: data.attributes.mind.total + data.traits.intellect.total, From eb2bbe1282a8513adce843d4f5df3d0e7e0fa49b Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Wed, 22 Sep 2021 02:56:04 +0200 Subject: [PATCH 05/10] fix: fix some creatures in the creature compendium pack * Haryipe * undead creatures * Riese --- src/packs/creatures.json | 610 ++++++++++++++-------- src/packs/special-creature-abilities.json | 39 +- 2 files changed, 420 insertions(+), 229 deletions(-) diff --git a/src/packs/creatures.json b/src/packs/creatures.json index 330c6572..b609b091 100644 --- a/src/packs/creatures.json +++ b/src/packs/creatures.json @@ -1537,11 +1537,11 @@ }, "traits": { "strength": { - "base": 19, + "base": 0, "mod": 0 }, "constitution": { - "base": 19, + "base": 0, "mod": 0 }, "agility": { @@ -1676,7 +1676,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 8, - "armorMaterialType": "cloth", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -1793,27 +1793,6 @@ "default": 0 } }, - { - "_id": "0thvGk3dOymiHZck", - "name": "Totenkraft", - "type": "specialCreatureAbility", - "data": { - "description": "

Erhält GEI+AU als Bonus auf Stärke und Härte.

", - "experiencePoints": 10 - }, - "sort": 800000, - "flags": { - "core": { - "sourceId": "Compendium.ds4.special-creature-abilities.ZkgZiFI5xy8aevG8" - } - }, - "img": "systems/ds4/assets/icons/official/special-creature-abilities/power-of-the-dead.png", - "effects": [], - "folder": null, - "permission": { - "default": 0 - } - }, { "_id": "vcdY5BrydMFLsnRU", "name": "Wesen der Dunkelheit (Settingoption)", @@ -1875,9 +1854,81 @@ "permission": { "default": 0 } + }, + { + "_id": "aTr4fC2AuCJ5PLGF", + "name": "Totenkraft", + "type": "specialCreatureAbility", + "img": "systems/ds4/assets/icons/official/special-creature-abilities/power-of-the-dead.png", + "data": { + "description": "

Erhält GEI+AU als Bonus auf Stärke und Härte.

", + "experiencePoints": 10 + }, + "effects": [ + { + "_id": "xw1OyyTdDwkNe2jC", + "changes": [ + { + "key": "data.traits.strength.total", + "mode": 2, + "value": "@data.attributes.mind.total + @data.traits.aura.total" + }, + { + "key": "data.traits.constitution.total", + "mode": 2, + "value": "@data.attributes.mind.total + @data.traits.aura.total" + } + ], + "disabled": false, + "duration": { + "startTime": null + }, + "icon": "icons/svg/aura.svg", + "label": "GEI + AU als Bonus auf Stärke und Härte", + "transfer": true, + "flags": {}, + "tint": null + } + ], + "folder": null, + "sort": 800000, + "permission": { + "default": 0 + }, + "flags": { + "core": { + "sourceId": "Compendium.ds4.special-creature-abilities.ZkgZiFI5xy8aevG8" + } + } + } + ], + "effects": [ + { + "_id": "EeRWStF1rRiIO5Ar", + "changes": [ + { + "key": "data.traits.strength.total", + "mode": 2, + "value": "@data.attributes.mind.total + @data.traits.aura.total" + }, + { + "key": "data.traits.constitution.total", + "mode": 2, + "value": "@data.attributes.mind.total + @data.traits.aura.total" + } + ], + "disabled": false, + "duration": { + "startTime": 0 + }, + "icon": "icons/svg/aura.svg", + "label": "GEI + AU als Bonus auf Stärke und Härte", + "origin": "Compendium.ds4.creatures.6KmAeL9lVxWXIeU6.Item.aTr4fC2AuCJ5PLGF", + "tint": null, + "transfer": false, + "flags": {} } ], - "effects": [], "folder": null, "sort": 0, "permission": { @@ -3463,7 +3514,7 @@ "sourceId": "Compendium.ds4.spells.CrZ8L7oaWvPjLou0" } }, - "img": "systems/ds4/assets/icons/game-icons/sleepy.svg", + "img": "systems/ds4/assets/icons/game-icons/lorc/sleepy.svg", "effects": [], "folder": null, "permission": { @@ -3508,7 +3559,7 @@ "sourceId": "Compendium.ds4.spells.wZYElRaDmhqgzUvQ" } }, - "img": "systems/ds4/assets/icons/game-icons/convince.svg", + "img": "systems/ds4/assets/icons/game-icons/delapouite/convince.svg", "effects": [], "folder": null, "permission": { @@ -3553,7 +3604,7 @@ "sourceId": "Compendium.ds4.spells.gePnhgqnsmdEbj3Z" } }, - "img": "systems/ds4/assets/icons/game-icons/chain-lightning.svg", + "img": "systems/ds4/assets/icons/game-icons/willdabeast/chain-lightning.svg", "effects": [], "folder": null, "permission": { @@ -3598,7 +3649,7 @@ "sourceId": "Compendium.ds4.spells.bKCGwIne0uoWZiY0" } }, - "img": "systems/ds4/assets/icons/game-icons/catapult.svg", + "img": "systems/ds4/assets/icons/game-icons/heavenly-dog/catapult.svg", "effects": [], "folder": null, "permission": { @@ -3643,7 +3694,7 @@ "sourceId": "Compendium.ds4.spells.NWPoiZHCmZ7ZJud4" } }, - "img": "systems/ds4/assets/icons/game-icons/omega.svg", + "img": "systems/ds4/assets/icons/game-icons/lorc/omega.svg", "effects": [], "folder": null, "permission": { @@ -3688,7 +3739,7 @@ "sourceId": "Compendium.ds4.spells.dpz383XbGFXEsGot" } }, - "img": "systems/ds4/assets/icons/game-icons/bell-shield.svg", + "img": "systems/ds4/assets/icons/game-icons/lorc/bell-shield.svg", "effects": [], "folder": null, "permission": { @@ -3733,7 +3784,7 @@ "sourceId": "Compendium.ds4.spells.VGeMfTNSKWzNGm6r" } }, - "img": "systems/ds4/assets/icons/game-icons/weight-crush.svg", + "img": "systems/ds4/assets/icons/game-icons/sbed/weight-crush.svg", "effects": [], "folder": null, "permission": { @@ -3778,7 +3829,7 @@ "sourceId": "Compendium.ds4.spells.EXqdD6yddQ4c0zAw" } }, - "img": "systems/ds4/assets/icons/game-icons/invisible.svg", + "img": "systems/ds4/assets/icons/game-icons/delapouite/invisible.svg", "effects": [], "folder": null, "permission": { @@ -3823,7 +3874,7 @@ "sourceId": "Compendium.ds4.spells.niQVUxJHzdMDlwXc" } }, - "img": "systems/ds4/assets/icons/game-icons/misdirection.svg", + "img": "systems/ds4/assets/icons/game-icons/delapouite/misdirection.svg", "effects": [], "folder": null, "permission": { @@ -12100,11 +12151,11 @@ }, "traits": { "strength": { - "base": 10, + "base": 4, "mod": 0 }, "constitution": { - "base": 10, + "base": 4, "mod": 0 }, "agility": { @@ -12139,7 +12190,7 @@ "mod": 0 }, "meleeAttack": { - "mod": 0 + "mod": 1 }, "rangedAttack": { "mod": 0 @@ -12332,27 +12383,6 @@ "default": 0 } }, - { - "_id": "LDKoe3yCFPK4y375", - "name": "Totenkraft", - "type": "specialCreatureAbility", - "data": { - "description": "

Erhält GEI+AU als Bonus auf Stärke und Härte.

", - "experiencePoints": 10 - }, - "sort": 700000, - "flags": { - "core": { - "sourceId": "Compendium.ds4.special-creature-abilities.ZkgZiFI5xy8aevG8" - } - }, - "img": "systems/ds4/assets/icons/official/special-creature-abilities/power-of-the-dead.png", - "effects": [], - "folder": null, - "permission": { - "default": 0 - } - }, { "_id": "HTx80TohpA38jyAy", "name": "Werteverlust (KÖR)", @@ -12394,9 +12424,81 @@ "permission": { "default": 0 } + }, + { + "_id": "nX0rcnKD1xHYwysw", + "name": "Totenkraft", + "type": "specialCreatureAbility", + "img": "systems/ds4/assets/icons/official/special-creature-abilities/power-of-the-dead.png", + "data": { + "description": "

Erhält GEI+AU als Bonus auf Stärke und Härte.

", + "experiencePoints": 10 + }, + "effects": [ + { + "_id": "xw1OyyTdDwkNe2jC", + "changes": [ + { + "key": "data.traits.strength.total", + "mode": 2, + "value": "@data.attributes.mind.total + @data.traits.aura.total" + }, + { + "key": "data.traits.constitution.total", + "mode": 2, + "value": "@data.attributes.mind.total + @data.traits.aura.total" + } + ], + "disabled": false, + "duration": { + "startTime": null + }, + "icon": "icons/svg/aura.svg", + "label": "GEI + AU als Bonus auf Stärke und Härte", + "transfer": true, + "flags": {}, + "tint": null + } + ], + "folder": null, + "sort": 700000, + "permission": { + "default": 0 + }, + "flags": { + "core": { + "sourceId": "Compendium.ds4.special-creature-abilities.ZkgZiFI5xy8aevG8" + } + } + } + ], + "effects": [ + { + "_id": "xOFATK3tVf0XChho", + "changes": [ + { + "key": "data.traits.strength.total", + "mode": 2, + "value": "@data.attributes.mind.total + @data.traits.aura.total" + }, + { + "key": "data.traits.constitution.total", + "mode": 2, + "value": "@data.attributes.mind.total + @data.traits.aura.total" + } + ], + "disabled": false, + "duration": { + "startTime": 0 + }, + "icon": "icons/svg/aura.svg", + "label": "GEI + AU als Bonus auf Stärke und Härte", + "origin": "Compendium.ds4.creatures.P3mlpN2JrbnDtLwJ.Item.nX0rcnKD1xHYwysw", + "tint": null, + "transfer": false, + "flags": {} } ], - "effects": [], "folder": null, "sort": 0, "permission": { @@ -15080,7 +15182,7 @@ "sourceId": "Compendium.ds4.spells.KUbT1gBeThcLY7vU" } }, - "img": "systems/ds4/assets/icons/game-icons/run.svg", + "img": "systems/ds4/assets/icons/game-icons/lorc/run.svg", "effects": [], "folder": null, "permission": { @@ -15257,7 +15359,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 8, - "armorMaterialType": "cloth", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -18699,11 +18801,11 @@ }, "traits": { "strength": { - "base": 16, + "base": 0, "mod": 0 }, "constitution": { - "base": 16, + "base": 0, "mod": 0 }, "agility": { @@ -18838,7 +18940,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 8, - "armorMaterialType": "cloth", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -18955,27 +19057,6 @@ "default": 0 } }, - { - "_id": "QFsxCpozQvr8xA7W", - "name": "Totenkraft", - "type": "specialCreatureAbility", - "data": { - "description": "

Erhält GEI+AU als Bonus auf Stärke und Härte.

", - "experiencePoints": 10 - }, - "sort": 800000, - "flags": { - "core": { - "sourceId": "Compendium.ds4.special-creature-abilities.ZkgZiFI5xy8aevG8" - } - }, - "img": "systems/ds4/assets/icons/official/special-creature-abilities/power-of-the-dead.png", - "effects": [], - "folder": null, - "permission": { - "default": 0 - } - }, { "_id": "DNSCPQ1kOSiiyvOK", "name": "Wesen der Dunkelheit (Settingoption)", @@ -19024,7 +19105,7 @@ "type": "spell", "data": { "description": "

Bei Erfolg fliehen betroffene Ziele - maximal eine Anzahl gleich der Stufe des Zauberwirkers - so schnell wie möglich in panischer Angst und können erst nach Ablauf der Zauberdauer wieder umkehren.

\n

Der Effekt endet bei jedem Fliehenden, der Schaden erleidet.

", - "equipped": false, + "equipped": true, "spellType": "spellcasting", "bonus": "-(GEI+VE)/2 des Ziels", "spellCategory": "mindAffecting", @@ -19056,15 +19137,87 @@ "sourceId": "Compendium.ds4.spells.SgDFje4OTxqPEzoA" } }, - "img": "systems/ds4/assets/icons/game-icons/terror.svg", + "img": "systems/ds4/assets/icons/game-icons/lorc/terror.svg", "effects": [], "folder": null, "permission": { "default": 0 } + }, + { + "_id": "02uWHUcM8MBPKqb6", + "name": "Totenkraft", + "type": "specialCreatureAbility", + "img": "systems/ds4/assets/icons/official/special-creature-abilities/power-of-the-dead.png", + "data": { + "description": "

Erhält GEI+AU als Bonus auf Stärke und Härte.

", + "experiencePoints": 10 + }, + "effects": [ + { + "_id": "xw1OyyTdDwkNe2jC", + "changes": [ + { + "key": "data.traits.strength.total", + "mode": 2, + "value": "@data.attributes.mind.total + @data.traits.aura.total" + }, + { + "key": "data.traits.constitution.total", + "mode": 2, + "value": "@data.attributes.mind.total + @data.traits.aura.total" + } + ], + "disabled": false, + "duration": { + "startTime": null + }, + "icon": "icons/svg/aura.svg", + "label": "GEI + AU als Bonus auf Stärke und Härte", + "transfer": true, + "flags": {}, + "tint": null + } + ], + "folder": null, + "sort": 800000, + "permission": { + "default": 0 + }, + "flags": { + "core": { + "sourceId": "Compendium.ds4.special-creature-abilities.ZkgZiFI5xy8aevG8" + } + } + } + ], + "effects": [ + { + "_id": "RzCEjaZBI6Rk6bt4", + "changes": [ + { + "key": "data.traits.strength.total", + "mode": 2, + "value": "@data.attributes.mind.total + @data.traits.aura.total" + }, + { + "key": "data.traits.constitution.total", + "mode": 2, + "value": "@data.attributes.mind.total + @data.traits.aura.total" + } + ], + "disabled": false, + "duration": { + "startTime": 0 + }, + "icon": "icons/svg/aura.svg", + "label": "GEI + AU als Bonus auf Stärke und Härte", + "origin": "Compendium.ds4.creatures.cE5kI3uqXWQrCaI5.Item.02uWHUcM8MBPKqb6", + "tint": null, + "transfer": false, + "flags": {} } ], - "effects": [], "folder": null, "sort": 0, "permission": { @@ -23959,17 +24112,17 @@ "mod": 0 }, "mind": { - "base": 4, + "base": 9, "mod": 0 } }, "traits": { "strength": { - "base": 17, + "base": 0, "mod": 0 }, "constitution": { - "base": 21, + "base": 4, "mod": 0 }, "agility": { @@ -23981,11 +24134,11 @@ "mod": 0 }, "intellect": { - "base": 1, + "base": 8, "mod": 0 }, "aura": { - "base": 1, + "base": 8, "mod": 0 } }, @@ -24010,10 +24163,10 @@ "mod": 0 }, "spellcasting": { - "mod": 11 + "mod": 0 }, "targetedSpellcasting": { - "mod": 10 + "mod": 0 } }, "baseInfo": { @@ -24068,71 +24221,6 @@ "elevation": null }, "items": [ - { - "_id": "7Hq2s4XxNmtIafz3", - "name": "Runenbestickte Robe +3", - "type": "armor", - "data": { - "description": null, - "quantity": 1, - "price": 3258, - "availability": "unset", - "storageLocation": "-", - "equipped": true, - "armorValue": null, - "armorMaterialType": "cloth", - "armorType": "body" - }, - "sort": 200000, - "flags": { - "core": { - "sourceId": "Compendium.ds4.equipment.U8iwfv7oJNl8CsKK" - } - }, - "img": "icons/equipment/chest/robe-collared-pink.webp", - "effects": [ - { - "_id": "vgJWV95OeyzrjyFw", - "flags": {}, - "changes": [ - { - "key": "data.traits.aura.total", - "value": "1", - "mode": 2 - } - ], - "disabled": false, - "duration": { - "startTime": null - }, - "icon": null, - "label": "Aura +1", - "tint": null, - "transfer": true - }, - { - "_id": "CFyX5reV96JVL2Cg", - "flags": {}, - "changes": [ - { - "key": "data.combatValues.defense.total", - "value": "3", - "mode": 2 - } - ], - "duration": { - "startTime": null - }, - "label": "Panzerung +3 (magisch)", - "transfer": true, - "disabled": false - } - ], - "folder": null, - "permission": { - "default": 0 - } - }, { "_id": "J2eP8hBIWtgayfhH", "name": "Angst (1)", @@ -24175,27 +24263,6 @@ "default": 0 } }, - { - "_id": "FjvmZhOvqdHFs509", - "name": "Totenkraft", - "type": "specialCreatureAbility", - "data": { - "description": "

Erhält GEI+AU als Bonus auf Stärke und Härte.

", - "experiencePoints": 10 - }, - "sort": 500000, - "flags": { - "core": { - "sourceId": "Compendium.ds4.special-creature-abilities.ZkgZiFI5xy8aevG8" - } - }, - "img": "systems/ds4/assets/icons/official/special-creature-abilities/power-of-the-dead.png", - "effects": [], - "folder": null, - "permission": { - "default": 0 - } - }, { "_id": "exyyjDtEIdHRcx4n", "name": "Wesen der Dunkelheit (Settingoption)", @@ -24255,7 +24322,7 @@ "sourceId": "Compendium.ds4.spells.VjvrapwDmBvGYmfj" } }, - "img": "systems/ds4/assets/icons/game-icons/sword-wound.svg", + "img": "systems/ds4/assets/icons/game-icons/lorc/sword-wound.svg", "effects": [], "folder": null, "permission": { @@ -24300,7 +24367,7 @@ "sourceId": "Compendium.ds4.spells.MKlGqhjQa3GZu4gq" } }, - "img": "systems/ds4/assets/icons/game-icons/magic-portal.svg", + "img": "systems/ds4/assets/icons/game-icons/lorc/magic-portal.svg", "effects": [], "folder": null, "permission": { @@ -24345,7 +24412,7 @@ "sourceId": "Compendium.ds4.spells.CrZ8L7oaWvPjLou0" } }, - "img": "systems/ds4/assets/icons/game-icons/sleepy.svg", + "img": "systems/ds4/assets/icons/game-icons/lorc/sleepy.svg", "effects": [], "folder": null, "permission": { @@ -24390,7 +24457,7 @@ "sourceId": "Compendium.ds4.spells.7ybmodIkWDP1z1D6" } }, - "img": "systems/ds4/assets/icons/game-icons/fire-wave.svg", + "img": "systems/ds4/assets/icons/game-icons/lorc/fire-wave.svg", "effects": [], "folder": null, "permission": { @@ -24435,7 +24502,7 @@ "sourceId": "Compendium.ds4.spells.iH2NtsJtMfG0ZAU3" } }, - "img": "systems/ds4/assets/icons/game-icons/frozen-body.svg", + "img": "systems/ds4/assets/icons/game-icons/delapouite/frozen-body.svg", "effects": [], "folder": null, "permission": { @@ -24480,7 +24547,7 @@ "sourceId": "Compendium.ds4.spells.tZJoj1PGrRGe9eMV" } }, - "img": "systems/ds4/assets/icons/game-icons/steam.svg", + "img": "systems/ds4/assets/icons/game-icons/delapouite/steam.svg", "effects": [], "folder": null, "permission": { @@ -24525,7 +24592,7 @@ "sourceId": "Compendium.ds4.spells.wZYElRaDmhqgzUvQ" } }, - "img": "systems/ds4/assets/icons/game-icons/convince.svg", + "img": "systems/ds4/assets/icons/game-icons/delapouite/convince.svg", "effects": [], "folder": null, "permission": { @@ -24570,7 +24637,7 @@ "sourceId": "Compendium.ds4.spells.9gc1CF70165NXymH" } }, - "img": "systems/ds4/assets/icons/game-icons/fomorian.svg", + "img": "systems/ds4/assets/icons/game-icons/cathelineau/fomorian.svg", "effects": [], "folder": null, "permission": { @@ -24615,7 +24682,7 @@ "sourceId": "Compendium.ds4.spells.dzYAc9ti7ghhkyiX" } }, - "img": "systems/ds4/assets/icons/game-icons/padlock.svg", + "img": "systems/ds4/assets/icons/game-icons/lorc/padlock.svg", "effects": [], "folder": null, "permission": { @@ -24660,7 +24727,7 @@ "sourceId": "Compendium.ds4.spells.73bT47FtQgPp9Snq" } }, - "img": "systems/ds4/assets/icons/game-icons/spider-web.svg", + "img": "systems/ds4/assets/icons/game-icons/lorc/spider-web.svg", "effects": [], "folder": null, "permission": { @@ -24705,7 +24772,7 @@ "sourceId": "Compendium.ds4.spells.5mF59XCsZffF0cSp" } }, - "img": "systems/ds4/assets/icons/game-icons/shadow-follower.svg", + "img": "systems/ds4/assets/icons/game-icons/lorc/shadow-follower.svg", "effects": [], "folder": null, "permission": { @@ -24750,7 +24817,7 @@ "sourceId": "Compendium.ds4.spells.dPGm1Ji2U0fJxnT3" } }, - "img": "systems/ds4/assets/icons/game-icons/two-shadows.svg", + "img": "systems/ds4/assets/icons/game-icons/lorc/two-shadows.svg", "effects": [], "folder": null, "permission": { @@ -24795,7 +24862,7 @@ "sourceId": "Compendium.ds4.spells.b5RFJWPaYbpXNpsv" } }, - "img": "systems/ds4/assets/icons/game-icons/spear-hook.svg", + "img": "systems/ds4/assets/icons/game-icons/lorc/spear-hook.svg", "effects": [], "folder": null, "permission": { @@ -24840,7 +24907,7 @@ "sourceId": "Compendium.ds4.spells.L6NrH3AEmS2I3NWG" } }, - "img": "systems/ds4/assets/icons/game-icons/jump-across.svg", + "img": "systems/ds4/assets/icons/game-icons/delapouite/jump-across.svg", "effects": [], "folder": null, "permission": { @@ -24885,7 +24952,7 @@ "sourceId": "Compendium.ds4.spells.KIyVOdiXZnXJIAh6" } }, - "img": "systems/ds4/assets/icons/game-icons/tripwire.svg", + "img": "systems/ds4/assets/icons/game-icons/lorc/tripwire.svg", "effects": [], "folder": null, "permission": { @@ -24930,7 +24997,7 @@ "sourceId": "Compendium.ds4.spells.eMilydZd4gqDUsff" } }, - "img": "systems/ds4/assets/icons/game-icons/mirror-mirror.svg", + "img": "systems/ds4/assets/icons/game-icons/lorc/mirror-mirror.svg", "effects": [], "folder": null, "permission": { @@ -24975,7 +25042,7 @@ "sourceId": "Compendium.ds4.spells.EXqdD6yddQ4c0zAw" } }, - "img": "systems/ds4/assets/icons/game-icons/invisible.svg", + "img": "systems/ds4/assets/icons/game-icons/delapouite/invisible.svg", "effects": [], "folder": null, "permission": { @@ -25020,7 +25087,7 @@ "sourceId": "Compendium.ds4.spells.niQVUxJHzdMDlwXc" } }, - "img": "systems/ds4/assets/icons/game-icons/misdirection.svg", + "img": "systems/ds4/assets/icons/game-icons/delapouite/misdirection.svg", "effects": [], "folder": null, "permission": { @@ -25065,7 +25132,7 @@ "sourceId": "Compendium.ds4.spells.7foZzrxZuX0dCh3C" } }, - "img": "systems/ds4/assets/icons/game-icons/hole.svg", + "img": "systems/ds4/assets/icons/game-icons/delapouite/hole.svg", "effects": [], "folder": null, "permission": { @@ -25110,7 +25177,7 @@ "sourceId": "Compendium.ds4.spells.xs7tx8K3ZdQ76u0b" } }, - "img": "systems/ds4/assets/icons/game-icons/skull-mask.svg", + "img": "systems/ds4/assets/icons/game-icons/lorc/skull-mask.svg", "effects": [], "folder": null, "permission": { @@ -25155,38 +25222,134 @@ "sourceId": "Compendium.ds4.spells.BGnY1p1qZXwpzXFA" } }, - "img": "systems/ds4/assets/icons/game-icons/time-trap.svg", + "img": "systems/ds4/assets/icons/game-icons/lorc/time-trap.svg", "effects": [], "folder": null, "permission": { "default": 0 } + }, + { + "_id": "L6i191M3m9QXN9aJ", + "name": "Totenkraft", + "type": "specialCreatureAbility", + "img": "systems/ds4/assets/icons/official/special-creature-abilities/power-of-the-dead.png", + "data": { + "description": "

Erhält GEI+AU als Bonus auf Stärke und Härte.

", + "experiencePoints": 10 + }, + "effects": [ + { + "_id": "xw1OyyTdDwkNe2jC", + "changes": [ + { + "key": "data.traits.strength.total", + "mode": 2, + "value": "@data.attributes.mind.total + @data.traits.aura.total" + }, + { + "key": "data.traits.constitution.total", + "mode": 2, + "value": "@data.attributes.mind.total + @data.traits.aura.total" + } + ], + "disabled": false, + "duration": { + "startTime": null + }, + "icon": "icons/svg/aura.svg", + "label": "GEI + AU als Bonus auf Stärke und Härte", + "transfer": true, + "flags": {}, + "tint": null + } + ], + "folder": null, + "sort": 500000, + "permission": { + "default": 0 + }, + "flags": { + "core": { + "sourceId": "Compendium.ds4.special-creature-abilities.ZkgZiFI5xy8aevG8" + } + } + }, + { + "_id": "Yv7u9FcT21lq7xW8", + "name": "Robe +3", + "type": "armor", + "img": "icons/equipment/chest/robe-layered-purple.webp", + "data": { + "description": "", + "quantity": 1, + "price": 3251, + "availability": "unset", + "storageLocation": "-", + "equipped": true, + "armorValue": 0, + "armorMaterialType": "cloth", + "armorType": "body" + }, + "effects": [ + { + "_id": "Qpy3XcHOokbU7ZaS", + "flags": {}, + "changes": [ + { + "key": "data.combatValues.defense.total", + "value": "3", + "mode": 2 + } + ], + "duration": { + "startTime": null + }, + "label": "Panzerung +3 (magisch)", + "transfer": true, + "disabled": false + } + ], + "folder": null, + "sort": 0, + "permission": { + "default": 0 + }, + "flags": { + "core": { + "sourceId": "Compendium.ds4.equipment.cFMcSg7PFIcQvf0B" + } + } } ], "effects": [ { - "_id": "O1oyBYfokdiC8sLq", - "flags": {}, + "_id": "fmyWjY4g3kUO22no", "changes": [ { - "key": "data.traits.aura.total", - "value": "1", - "mode": 2 + "key": "data.traits.strength.total", + "mode": 2, + "value": "@data.attributes.mind.total + @data.traits.aura.total" + }, + { + "key": "data.traits.constitution.total", + "mode": 2, + "value": "@data.attributes.mind.total + @data.traits.aura.total" } ], "disabled": false, "duration": { "startTime": 0 }, - "icon": null, - "label": "Aura +1", - "origin": "Actor.VWJidt9dEh7QyOeD.OwnedItem.7Hq2s4XxNmtIafz3", + "icon": "icons/svg/aura.svg", + "label": "GEI + AU als Bonus auf Stärke und Härte", + "origin": "Compendium.ds4.creatures.oVKL6zJ2kYMmBuYx.Item.L6i191M3m9QXN9aJ", "tint": null, - "transfer": true + "transfer": false, + "flags": {} }, { - "_id": "Q2rtYC2Rd2Ge5HxS", - "flags": {}, + "_id": "Z7hdBZ7Rm4qFPnHo", "changes": [ { "key": "data.combatValues.defense.total", @@ -25194,13 +25357,14 @@ "mode": 2 } ], + "disabled": false, "duration": { "startTime": 0 }, "label": "Panzerung +3 (magisch)", - "origin": "Actor.VWJidt9dEh7QyOeD.OwnedItem.7Hq2s4XxNmtIafz3", - "disabled": false, - "transfer": true + "origin": "Compendium.ds4.creatures.oVKL6zJ2kYMmBuYx.Item.Yv7u9FcT21lq7xW8", + "transfer": false, + "flags": {} } ], "folder": null, @@ -25942,7 +26106,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 2, - "armorMaterialType": "cloth", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -26084,13 +26248,13 @@ "mod": -3 }, "movement": { - "mod": 8 + "mod": 4 }, "meleeAttack": { "mod": 0 }, "rangedAttack": { - "mod": 0 + "mod": 3 }, "spellcasting": { "mod": 0 @@ -26754,7 +26918,7 @@ "mod": 0 }, "spellcasting": { - "mod": 1 + "mod": 0 }, "targetedSpellcasting": { "mod": 0 @@ -26848,7 +27012,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 1, - "armorMaterialType": "cloth", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -26971,7 +27135,7 @@ "type": "spell", "data": { "description": "

Bei Erfolg wird das Ziel dem Zauberwirker hörig und führt bedingungslos jeden seiner Befehle aus (außer Selbstmord oder -verstümmelung). Es würde sogar seine eigenen Kameraden angreifen.

", - "equipped": false, + "equipped": true, "spellType": "spellcasting", "bonus": "", "spellCategory": "unset", @@ -27532,7 +27696,7 @@ "sourceId": "Compendium.ds4.spells.Senq5ub2Cx0agJgi" } }, - "img": "systems/ds4/assets/icons/game-icons/bolt-spell-cast.svg", + "img": "systems/ds4/assets/icons/game-icons/delapouite/bolt-spell-cast.svg", "effects": [], "folder": null, "permission": { diff --git a/src/packs/special-creature-abilities.json b/src/packs/special-creature-abilities.json index 8a99db32..7a4bb0d0 100644 --- a/src/packs/special-creature-abilities.json +++ b/src/packs/special-creature-abilities.json @@ -512,17 +512,44 @@ { "_id": "ZkgZiFI5xy8aevG8", "name": "Totenkraft", - "permission": { - "default": 0 - }, "type": "specialCreatureAbility", + "img": "systems/ds4/assets/icons/official/special-creature-abilities/power-of-the-dead.png", "data": { "description": "

Erhält GEI+AU als Bonus auf Stärke und Härte.

", "experiencePoints": 10 }, - "flags": {}, - "img": "systems/ds4/assets/icons/official/special-creature-abilities/power-of-the-dead.png", - "effects": [] + "effects": [ + { + "_id": "xw1OyyTdDwkNe2jC", + "changes": [ + { + "key": "data.traits.strength.total", + "mode": 2, + "value": "@data.attributes.mind.total + @data.traits.aura.total" + }, + { + "key": "data.traits.constitution.total", + "mode": 2, + "value": "@data.attributes.mind.total + @data.traits.aura.total" + } + ], + "disabled": false, + "duration": { + "startTime": null + }, + "icon": "icons/svg/aura.svg", + "label": "GEI + AU als Bonus auf Stärke und Härte", + "transfer": true, + "flags": {}, + "tint": null + } + ], + "folder": null, + "sort": 0, + "permission": { + "default": 0 + }, + "flags": {} }, { "_id": "aOsmsf7jIK7hU9U8", From 8f3a72a7f41a20ca2c83069ea2b87fbec04388c3 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Wed, 22 Sep 2021 12:32:18 +0200 Subject: [PATCH 06/10] refactor: improve embedded document creation --- src/module/active-effect.ts | 7 ++++--- src/module/actor/sheets/actor-sheet.ts | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/module/active-effect.ts b/src/module/active-effect.ts index 965f9f8f..3d3432fc 100644 --- a/src/module/active-effect.ts +++ b/src/module/active-effect.ts @@ -92,14 +92,15 @@ export class DS4ActiveEffect extends ActiveEffect { /** * Create a new {@link DS4ActiveEffect} using default data. * - * @param context The context for the creation of the effect, requiring a parent {@link DS4Actor} or {@link DS4Item}. + * @param parent The parent {@link DS4Actor} or {@link DS4Item} of the effect. * @returns A promise that resolved to the created effect or udifined of the creation was prevented. */ - static async createDefault(parent: DS4Actor | DS4Item): Promise { + static async createDefault(parent: DS4Actor | DS4Item): Promise { const createData = { label: getGame().i18n.localize(`DS4.NewEffectLabel`), icon: this.FALLBACK_ICON, }; - return parent.createEmbeddedDocuments("ActiveEffect", [createData]) as Promise; + + return this.create(createData, { parent, pack: parent.pack ?? undefined }); } } diff --git a/src/module/actor/sheets/actor-sheet.ts b/src/module/actor/sheets/actor-sheet.ts index 58651f4e..5abbd1fa 100644 --- a/src/module/actor/sheets/actor-sheet.ts +++ b/src/module/actor/sheets/actor-sheet.ts @@ -141,7 +141,7 @@ export class DS4ActorSheet extends ActorSheet Date: Thu, 23 Sep 2021 12:45:53 +0200 Subject: [PATCH 07/10] fix: fix effects not being surpressed for unlinked token actors --- src/module/active-effect.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/module/active-effect.ts b/src/module/active-effect.ts index 3d3432fc..08925178 100644 --- a/src/module/active-effect.ts +++ b/src/module/active-effect.ts @@ -43,7 +43,8 @@ export class DS4ActiveEffect extends ActiveEffect { if (!(this.parent instanceof DS4Actor)) { return; } - const [, , , itemId] = this.data.origin?.split(".") ?? []; + const itemIdRegex = /Item\.([a-zA-Z0-9]+)/; + const itemId = this.data.origin?.match(itemIdRegex)?.[1]; if (!itemId) { return; } From d92003b07cd8d47e242911c35544c93947cb7af5 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Fri, 1 Oct 2021 22:48:40 +0200 Subject: [PATCH 08/10] fix: correct creatures in the creature pack --- src/packs/creatures.json | 251 +++++++++++++++++++++++---------------- 1 file changed, 148 insertions(+), 103 deletions(-) diff --git a/src/packs/creatures.json b/src/packs/creatures.json index b609b091..3d4356c2 100644 --- a/src/packs/creatures.json +++ b/src/packs/creatures.json @@ -157,7 +157,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 4, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -581,7 +581,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 4, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -842,7 +842,7 @@ "attributes": { "body": { "base": 12, - "mod": null + "mod": 0 }, "mobility": { "base": 9, @@ -1018,7 +1018,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 1, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 300000, @@ -1263,7 +1263,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 5, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -1945,7 +1945,7 @@ "attributes": { "body": { "base": 12, - "mod": null + "mod": 0 }, "mobility": { "base": 10, @@ -2321,7 +2321,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 5, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -2734,7 +2734,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 3, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -3268,10 +3268,10 @@ "mod": 0 }, "spellcasting": { - "mod": 2 + "mod": 0 }, "targetedSpellcasting": { - "mod": 2 + "mod": 0 } }, "baseInfo": { @@ -3338,7 +3338,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 2, - "armorMaterialType": "cloth", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 100000, @@ -3482,7 +3482,7 @@ "type": "spell", "data": { "description": "

Dieser Zauber schläfert eine maximale Anzahl von Zielen gleich der Stufe des Zauberwirkers ein. Es handelt sich dabei um einen natürlichen Schlaf, aus dem man durch Kampflärm u.ä. erwachen kann.

", - "equipped": false, + "equipped": true, "spellType": "spellcasting", "bonus": "-(KÖR+VE)/2 des jeweiligen Ziels", "spellCategory": "mindAffecting", @@ -3527,7 +3527,7 @@ "type": "spell", "data": { "description": "

Effekt: Bei Erfolg wird das Ziel dem Zauberwirker hörig und führt bedingungslos jeden seiner Befehle aus (außer Selbstmord oder -verstümmelung). Es würde sogar seine eigenen Kameraden angreifen.

", - "equipped": false, + "equipped": true, "spellType": "spellcasting", "bonus": "-(GEI+VE)/2 des Ziels", "spellCategory": "mindAffecting", @@ -3572,7 +3572,7 @@ "type": "spell", "data": { "description": "

Effekt: Der Zauberwirker schießt einen Blitz auf einen Feind, der auf bis zu VE weitere Gegner in seiner Nähe überspringt. Nur Gegner, die 2 oder mehr Meter von einem ihrer getroffenen Mitstreiter entfernt stehen, kann der Kettenblitz nicht erreichen:

Getroffene Gegner in Metallrüstung dürfen keine Abwehr gegen einen Kettenblitz würfeln.

", - "equipped": false, + "equipped": true, "spellType": "targetedSpellcasting", "bonus": "3", "spellCategory": "electricity", @@ -3617,7 +3617,7 @@ "type": "spell", "data": { "description": "

Diese Zauberspruch, gegen den das Ziel keine Abwehr würfeln kann, schleudert das Ziel (Probenergebnis/3) Meter weit fort.

\n

Das Ziel erhält für die Distanz, die es geschleudert wird (auch wenn eine Wand den Flug bremst) Sturzschaden (siehe Seite 85), gegen den es ganz normal Abwehr würfelt.

\n

Nach dem Fortschleudern liegt das Ziel immer am Boden.

", - "equipped": false, + "equipped": true, "spellType": "targetedSpellcasting", "bonus": "-(KÖR+AU)/2 des Ziels", "spellCategory": "unset", @@ -3662,7 +3662,7 @@ "type": "spell", "data": { "description": "

Effekt: Ein Schutzfeld mit einem Radius von VE in Metern erscheint um den Zauberwirker herum, an dem nichtmagische Geschosse von außen her wirkungslos abprallen.

", - "equipped": false, + "equipped": true, "spellType": "spellcasting", "bonus": "0", "spellCategory": "unset", @@ -3707,7 +3707,7 @@ "type": "spell", "data": { "description": "

Das Ziel erhält das Probenergebnis als Bonus auf seine Abwehr, bis die Dauer des Zaubers abgelaufen ist.

", - "equipped": false, + "equipped": true, "spellType": "spellcasting", "bonus": "0", "spellCategory": "unset", @@ -3752,7 +3752,7 @@ "type": "spell", "data": { "description": "

Mit diesem Zauber lässt der Zauberwirker einen unbelebten Gegenstand mit einer Geschwindigkeit von 1m pro Kampfrunde schweben, solange er sich ununterbrochen konzentriert (zählt als ganze Aktion).

", - "equipped": false, + "equipped": true, "spellType": "targetedSpellcasting", "bonus": "-1 pro (Stufe x 5) kg Gewicht", "spellCategory": "unset", @@ -3797,7 +3797,7 @@ "type": "spell", "data": { "description": "

Macht ein Lebewesen (samt seiner getragenen Ausrüstung) oder ein Objekt für die Dauer des Zauberspruchs unsichtbar.

\n

Der Zauberspruch endet vorzeitig, wenn das Ziel jemanden angreift, zaubert oder selbst Schaden erhält.

", - "equipped": false, + "equipped": true, "spellType": "spellcasting", "bonus": "0", "spellCategory": "unset", @@ -3842,7 +3842,7 @@ "type": "spell", "data": { "description": "

Effekt: Dieser Zauberspruch verwirrt bei Erfolg das Ziel, dessen Handeln für die gesamte Zauberdauer auf folgender Tabelle jede Kampfrunde neu ermittelt wird:

\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
W20Der Verwirrte...
1-5... greift die Charaktere an
6-10... läuft verwirrt in eine zuf. Richtung
11-15... steht verwirrt herum
16+... greift die eigenen Verbündeten an
", - "equipped": false, + "equipped": true, "spellType": "spellcasting", "bonus": "-(GEI+AU)/2", "spellCategory": "mindAffecting", @@ -3880,6 +3880,51 @@ "permission": { "default": 0 } + }, + { + "_id": "LwQmRVQ0GfZ9zct6", + "name": "Blenden", + "type": "spell", + "img": "systems/ds4/assets/icons/game-icons/lorc/laser-sparks.svg", + "data": { + "description": "

Ein gleißender Lichtstrahl schießt aus der Hand des Zauberwirkers und blendet bei Erfolg das Ziel  (welches dagegen keine Abwehr würfeln darf).

\n

Ein geblendetes Ziel hat -8 auf alle Handlungen, bei denen es sehen können sollte.

\n

Selbst augenlose Untote, wie beispielsweise Skelette, werden durch das magische Licht geblendet. Blinde Lebewesen sind dagegen nicht betroffen.

", + "equipped": true, + "spellType": "targetedSpellcasting", + "bonus": "-(AGI+AU)/2 des Ziels", + "spellCategory": "unset", + "maxDistance": { + "value": "VE x 5", + "unit": "meter" + }, + "effectRadius": { + "value": "", + "unit": "meter" + }, + "duration": { + "value": "Prb.", + "unit": "rounds" + }, + "cooldownDuration": { + "value": "5", + "unit": "rounds" + }, + "minimumLevels": { + "healer": 1, + "wizard": 5, + "sorcerer": null + } + }, + "effects": [], + "folder": null, + "sort": 0, + "permission": { + "default": 0 + }, + "flags": { + "core": { + "sourceId": "Compendium.ds4.spells.JldAx8a91vVO2wUf" + } + } } ], "effects": [], @@ -4141,7 +4186,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 1, - "armorMaterialType": "cloth", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 600000, @@ -4323,7 +4368,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 4, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -4737,7 +4782,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 5, - "armorMaterialType": "chain", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -4840,7 +4885,7 @@ "mod": 2.5 }, "meleeAttack": { - "mod": 0 + "mod": -1 }, "rangedAttack": { "mod": 0 @@ -4937,7 +4982,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 2, - "armorMaterialType": "leather", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -5061,7 +5106,7 @@ "mod": 0 }, "meleeAttack": { - "mod": null + "mod": 0 }, "rangedAttack": { "mod": 0 @@ -5158,7 +5203,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 8, - "armorMaterialType": "cloth", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -5282,7 +5327,7 @@ "mod": 0.5 }, "meleeAttack": { - "mod": null + "mod": 0 }, "rangedAttack": { "mod": 0 @@ -5379,7 +5424,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 8, - "armorMaterialType": "cloth", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -5603,7 +5648,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 5, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -6040,7 +6085,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 2, - "armorMaterialType": "leather", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 300000, @@ -6351,7 +6396,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 1, - "armorMaterialType": "cloth", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 300000, @@ -6617,7 +6662,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 5, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -7030,7 +7075,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 2, - "armorMaterialType": "leather", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -7254,7 +7299,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 2, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -7562,7 +7607,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 2, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -7828,7 +7873,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 2, - "armorMaterialType": "leather", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -8052,7 +8097,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 3, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -8465,7 +8510,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 4, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -9079,7 +9124,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 1, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 300000, @@ -9482,7 +9527,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 1, - "armorMaterialType": "cloth", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -9727,7 +9772,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 1, - "armorMaterialType": "cloth", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -9948,7 +9993,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 2, - "armorMaterialType": "leather", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -10214,7 +10259,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 5, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -10627,7 +10672,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 5, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -11037,7 +11082,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 2, - "armorMaterialType": "leather", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -11190,7 +11235,7 @@ }, "combatValues": { "hitPoints": { - "mod": null, + "mod": 0, "value": 20 }, "defense": { @@ -11300,7 +11345,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 2, - "armorMaterialType": "leather", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -11565,7 +11610,7 @@ "availability": "unset", "storageLocation": "-", "equipped": true, - "attackType": "melee", + "attackType": "ranged", "weaponBonus": 2, "opponentDefense": 0 }, @@ -11590,7 +11635,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 1, - "armorMaterialType": "cloth", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 300000, @@ -11877,7 +11922,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 5, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -12667,7 +12712,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 2, - "armorMaterialType": "leather", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -12957,7 +13002,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 1, - "armorMaterialType": "cloth", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 300000, @@ -13202,7 +13247,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 2, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "effects": [], @@ -13488,7 +13533,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 1, - "armorMaterialType": "cloth", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -13936,7 +13981,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 4, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -14546,7 +14591,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 2, - "armorMaterialType": "leather", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -14699,7 +14744,7 @@ }, "combatValues": { "hitPoints": { - "mod": null, + "mod": 0, "value": 32 }, "defense": { @@ -14809,7 +14854,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 4, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -15625,7 +15670,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 3, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -15886,7 +15931,7 @@ "attributes": { "body": { "base": 8, - "mod": null + "mod": 0 }, "mobility": { "base": 7, @@ -16038,7 +16083,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 3, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -16325,7 +16370,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 2, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -16499,7 +16544,7 @@ }, "combatValues": { "hitPoints": { - "mod": null, + "mod": 0, "value": 24 }, "defense": { @@ -16609,7 +16654,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 8, - "armorMaterialType": "cloth", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -16830,7 +16875,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 1, - "armorMaterialType": "cloth", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -17117,7 +17162,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 1, - "armorMaterialType": "cloth", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 300000, @@ -17535,7 +17580,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 8, - "armorMaterialType": "cloth", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -17935,7 +17980,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 4, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -18196,7 +18241,7 @@ "attributes": { "body": { "base": 10, - "mod": null + "mod": 0 }, "mobility": { "base": 11, @@ -18527,7 +18572,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 5, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -19386,7 +19431,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 4, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -19673,7 +19718,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 4, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -20318,7 +20363,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 8, - "armorMaterialType": "cloth", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -20539,7 +20584,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 5, - "armorMaterialType": "chain", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -20826,7 +20871,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 5, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -21239,7 +21284,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 4, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -21539,7 +21584,7 @@ }, "combatValues": { "hitPoints": { - "mod": null, + "mod": 0, "value": 29 }, "defense": { @@ -21552,7 +21597,7 @@ "mod": 0 }, "meleeAttack": { - "mod": null + "mod": -2 }, "rangedAttack": { "mod": 0 @@ -21649,7 +21694,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 8, - "armorMaterialType": "cloth", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -22070,7 +22115,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 3, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -23175,7 +23220,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 4, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -23278,7 +23323,7 @@ "mod": 0.5 }, "meleeAttack": { - "mod": 4 + "mod": 0 }, "rangedAttack": { "mod": 0 @@ -23375,7 +23420,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 8, - "armorMaterialType": "cloth", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -23599,7 +23644,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 4, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -24012,7 +24057,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 1, - "armorMaterialType": "cloth", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -25693,7 +25738,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 3, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -26599,7 +26644,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 4, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -27341,7 +27386,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 5, - "armorMaterialType": "chain", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -27646,7 +27691,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 3, - "armorMaterialType": "cloth", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 800000, @@ -27870,7 +27915,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 8, - "armorMaterialType": "cloth", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -28094,7 +28139,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 3, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -28507,7 +28552,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 2, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -28752,7 +28797,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 3, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -29413,7 +29458,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 4, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -29826,7 +29871,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 3, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -30239,7 +30284,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 2, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -30350,7 +30395,7 @@ }, "combatValues": { "hitPoints": { - "mod": null, + "mod": 0, "value": 25 }, "defense": { @@ -30363,7 +30408,7 @@ "mod": 0 }, "meleeAttack": { - "mod": null + "mod": 0 }, "rangedAttack": { "mod": 0 @@ -30460,7 +30505,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 8, - "armorMaterialType": "cloth", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -30684,7 +30729,7 @@ "storageLocation": "-", "equipped": true, "armorValue": 3, - "armorMaterialType": "plate", + "armorMaterialType": "natural", "armorType": "body" }, "sort": 200000, @@ -30988,10 +31033,10 @@ "value": 46 }, "defense": { - "mod": null + "mod": 0 }, "initiative": { - "mod": null + "mod": 0 }, "movement": { "mod": 0.5 From 41a468587236b3f6f30fc5d89d0a5d9d215eb06e Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Sat, 2 Oct 2021 00:59:55 +0200 Subject: [PATCH 09/10] fix: add missing creature hobgoblin --- src/packs/creatures.json | 436 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 436 insertions(+) diff --git a/src/packs/creatures.json b/src/packs/creatures.json index 3d4356c2..7c19c11b 100644 --- a/src/packs/creatures.json +++ b/src/packs/creatures.json @@ -5045,6 +5045,442 @@ }, "flags": {} }, + { + "_id": "C4xijAwQdhRHz0Cs", + "name": "Hobgoblin", + "type": "creature", + "img": "systems/ds4/assets/tokens/devin-night/hobgoblin-sword-purple.png", + "data": { + "attributes": { + "body": { + "base": 11, + "mod": 0 + }, + "mobility": { + "base": 6, + "mod": 0 + }, + "mind": { + "base": 3, + "mod": 0 + } + }, + "traits": { + "strength": { + "base": 2, + "mod": 0 + }, + "constitution": { + "base": 3, + "mod": 0 + }, + "agility": { + "base": 0, + "mod": 0 + }, + "dexterity": { + "base": 3, + "mod": 0 + }, + "intellect": { + "base": 2, + "mod": 0 + }, + "aura": { + "base": 0, + "mod": 0 + } + }, + "combatValues": { + "hitPoints": { + "mod": 0, + "value": 24 + }, + "defense": { + "mod": 0 + }, + "initiative": { + "mod": 0 + }, + "movement": { + "mod": 0 + }, + "meleeAttack": { + "mod": 0 + }, + "rangedAttack": { + "mod": 0 + }, + "spellcasting": { + "mod": 0 + }, + "targetedSpellcasting": { + "mod": 0 + } + }, + "baseInfo": { + "loot": "BW 1B:18", + "foeFactor": 4, + "creatureType": "humanoid", + "sizeCategory": "normal", + "experiencePoints": 71, + "description": "" + } + }, + "token": { + "name": "Hobgoblin", + "img": "systems/ds4/assets/tokens/devin-night/hobgoblin-*.png", + "displayName": 0, + "actorLink": false, + "width": 1, + "height": 1, + "scale": 1, + "mirrorX": false, + "mirrorY": false, + "lockRotation": false, + "rotation": 0, + "alpha": 1, + "vision": false, + "dimSight": 0, + "brightSight": 0, + "dimLight": 0, + "brightLight": 0, + "sightAngle": 0, + "lightAngle": 0, + "lightAlpha": 0.25, + "lightAnimation": { + "speed": 5, + "intensity": 5 + }, + "disposition": -1, + "displayBars": 30, + "bar1": { + "attribute": "combatValues.hitPoints" + }, + "bar2": { + "attribute": "" + }, + "flags": {}, + "randomImg": true, + "tint": null, + "lightColor": null, + "x": null, + "y": null, + "elevation": null + }, + "items": [ + { + "_id": "wTcga48GOVD8cQV3", + "name": "Kettenpanzer", + "type": "armor", + "img": "icons/equipment/chest/breastplate-scale-grey.webp", + "data": { + "description": "

Laufen -0,5m

", + "quantity": 1, + "price": 10, + "availability": "village", + "storageLocation": "-", + "equipped": true, + "armorValue": 2, + "armorMaterialType": "chain", + "armorType": "body" + }, + "effects": [ + { + "_id": "EkJB0kpYFHRMYSgl", + "flags": {}, + "changes": [ + { + "key": "data.combatValues.movement.total", + "value": "-0.5", + "mode": 2 + } + ], + "disabled": false, + "duration": { + "startTime": null + }, + "icon": null, + "label": "Laufen -0,5m", + "tint": null, + "transfer": true + } + ], + "folder": null, + "sort": 0, + "permission": { + "default": 0 + }, + "flags": { + "core": { + "sourceId": "Compendium.ds4.equipment.09Hp2c2jgoXx7cV0" + } + } + }, + { + "_id": "whLRBkMseej6C3IG", + "name": "Metallhelm", + "type": "armor", + "img": "icons/equipment/head/helm-barbute-reinforced.webp", + "data": { + "description": "

Initiative -1

", + "quantity": 1, + "price": 6, + "availability": "hamlet", + "storageLocation": "-", + "equipped": true, + "armorValue": 1, + "armorMaterialType": "plate", + "armorType": "helmet" + }, + "effects": [ + { + "_id": "wlQWjU1kXovR5G1J", + "flags": {}, + "changes": [ + { + "key": "data.combatValues.initiative.total", + "value": "-1", + "mode": 2 + } + ], + "disabled": false, + "duration": { + "startTime": null + }, + "icon": null, + "label": "Initiative -1", + "tint": null, + "transfer": true + } + ], + "folder": null, + "sort": 0, + "permission": { + "default": 0 + }, + "flags": { + "core": { + "sourceId": "Compendium.ds4.equipment.fKhTsMO4YXDYY8GX" + } + } + }, + { + "_id": "n3SYaxRnVV0nTKtq", + "name": "Holzschild", + "type": "shield", + "img": "icons/equipment/shield/round-wooden-boss-steel-brown.webp", + "data": { + "description": "

Zerbricht bei einem Abwehr-Patzer

", + "quantity": 1, + "price": 1, + "availability": "hamlet", + "storageLocation": "-", + "equipped": true, + "armorValue": 1 + }, + "effects": [], + "folder": null, + "sort": 0, + "permission": { + "default": 0 + }, + "flags": { + "core": { + "sourceId": "Compendium.ds4.equipment.J7d2zx4kqKEdMR1j" + } + } + }, + { + "_id": "QXzGnyknBZaJqCIc", + "name": "Nachtsicht", + "type": "specialCreatureAbility", + "img": "systems/ds4/assets/icons/official/special-creature-abilities/night-vision.png", + "data": { + "description": "

Kann bei einem Mindestmaß an Licht noch sehen wie am helllichten Tag.

", + "experiencePoints": 5 + }, + "effects": [], + "folder": null, + "sort": 0, + "permission": { + "default": 0 + }, + "flags": { + "core": { + "sourceId": "Compendium.ds4.special-creature-abilities.pJjtHe2Rd0YCa35n" + } + } + }, + { + "_id": "xAd7jo7Ni2KSl16I", + "name": "Wesen der Dunkelheit (Settingoption)", + "type": "specialCreatureAbility", + "img": "systems/ds4/assets/icons/official/special-creature-abilities/creature-of-darkness.png", + "data": { + "description": "

Gilt in den meisten Settings als ein Wesen der Dunkelheit. Angewendete Regeln für Wesen der Dunkelheit gelten für diese Kreatur.

", + "experiencePoints": 5 + }, + "effects": [], + "folder": null, + "sort": 0, + "permission": { + "default": 0 + }, + "flags": { + "core": { + "sourceId": "Compendium.ds4.special-creature-abilities.R3j1CjXJckUH0CBG" + } + } + }, + { + "_id": "MSuVIzM2MRDSyujQ", + "name": "Langschwert", + "type": "weapon", + "img": "icons/weapons/swords/sword-guard-blue.webp", + "data": { + "description": "", + "quantity": 1, + "price": 7, + "availability": "hamlet", + "storageLocation": "-", + "equipped": true, + "attackType": "melee", + "weaponBonus": 2, + "opponentDefense": 0 + }, + "effects": [], + "folder": null, + "sort": 0, + "permission": { + "default": 0 + }, + "flags": { + "core": { + "sourceId": "Compendium.ds4.equipment.htmQWmMCQN620KrE" + } + } + }, + { + "_id": "lXtH1PL4nnpzMGkI", + "name": "Kurzbogen", + "type": "weapon", + "img": "icons/weapons/bows/shortbow-leather.webp", + "data": { + "description": "

Zweihändig, Initiative +1

", + "quantity": 1, + "price": 6, + "availability": "hamlet", + "storageLocation": "-", + "equipped": false, + "attackType": "ranged", + "weaponBonus": 1, + "opponentDefense": 0 + }, + "effects": [ + { + "_id": "zgiIGlRMVCgAzrn7", + "flags": {}, + "changes": [ + { + "key": "data.combatValues.initiative.total", + "value": "1", + "mode": 2 + } + ], + "disabled": false, + "duration": { + "startTime": null + }, + "icon": null, + "label": "Initiative +1", + "tint": null, + "transfer": true + } + ], + "folder": null, + "sort": 0, + "permission": { + "default": 0 + }, + "flags": { + "core": { + "sourceId": "Compendium.ds4.equipment.QsnvAep80sSVJToD" + } + } + } + ], + "effects": [ + { + "_id": "JHK7Wjpao2TJM9FZ", + "changes": [ + { + "key": "data.combatValues.movement.total", + "value": "-0.5", + "mode": 2 + } + ], + "disabled": false, + "duration": { + "startTime": 0 + }, + "icon": null, + "label": "Laufen -0,5m", + "origin": "Compendium.ds4.creatures.C4xijAwQdhRHz0Cs.Item.wTcga48GOVD8cQV3", + "tint": null, + "transfer": false, + "flags": {} + }, + { + "_id": "ZtHVENPFHCbXGOig", + "changes": [ + { + "key": "data.combatValues.initiative.total", + "value": "-1", + "mode": 2 + } + ], + "disabled": false, + "duration": { + "startTime": 0 + }, + "icon": null, + "label": "Initiative -1", + "origin": "Compendium.ds4.creatures.C4xijAwQdhRHz0Cs.Item.whLRBkMseej6C3IG", + "tint": null, + "transfer": false, + "flags": {} + }, + { + "_id": "dNE6ol93DRVL7KwH", + "changes": [ + { + "key": "data.combatValues.initiative.total", + "value": "1", + "mode": 2 + } + ], + "disabled": false, + "duration": { + "startTime": 0 + }, + "icon": null, + "label": "Initiative +1", + "origin": "Compendium.ds4.creatures.C4xijAwQdhRHz0Cs.Item.lXtH1PL4nnpzMGkI", + "tint": null, + "transfer": false, + "flags": {} + } + ], + "folder": null, + "sort": 0, + "permission": { + "default": 0 + }, + "flags": { + "core": {} + } + }, { "_id": "CIzMY691MK016h4E", "name": "Luftelementar I", From b46c51c9f0f50e91c78160e6aa5c96a9ead72e57 Mon Sep 17 00:00:00 2001 From: Johannes Loher Date: Sat, 2 Oct 2021 01:08:23 +0200 Subject: [PATCH 10/10] chore: remove empty entries from flags in compendium packs --- gulpfile.js | 5 +++++ src/packs/creatures.json | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 9682be33..36889fb9 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -58,6 +58,11 @@ function cleanPackEntry(entry, cleanSourceId = true) { if (cleanSourceId) { delete entry.flags?.core?.sourceId; } + Object.keys(entry.flags).forEach((scope) => { + if (Object.keys(entry.flags[scope]).length === 0) { + delete entry.flags[scope]; + } + }); if (entry.permission) entry.permission = { default: 0 }; const embeddedDocumentCollections = [ diff --git a/src/packs/creatures.json b/src/packs/creatures.json index 7c19c11b..3b01f2ff 100644 --- a/src/packs/creatures.json +++ b/src/packs/creatures.json @@ -5477,9 +5477,7 @@ "permission": { "default": 0 }, - "flags": { - "core": {} - } + "flags": {} }, { "_id": "CIzMY691MK016h4E",