Skip to content

Commit

Permalink
Restructure armor and weapon rune data (foundryvtt#12119)
Browse files Browse the repository at this point in the history
  • Loading branch information
stwlam committed Dec 11, 2023
1 parent 3d5b8fe commit cb90997
Show file tree
Hide file tree
Showing 2,776 changed files with 27,463 additions and 89,307 deletions.
4 changes: 2 additions & 2 deletions build/lib/extractor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -518,8 +518,8 @@ class PackExtractor {
delete (source.system as { spell?: unknown }).spell;
}

if (itemIsOfType(source, "armor", "weapon") && source.system.specific?.value === false) {
delete source.system.specific;
if (itemIsOfType(source, "armor", "shield", "weapon") && !source.system.specific) {
delete (source.system as { specific?: unknown }).specific;
}

if (source.type === "weapon") {
Expand Down
2 changes: 2 additions & 0 deletions build/run-migration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { Migration903PhysicalNumericData } from "@module/migration/migrations/90
import { Migration904UndercommonToSakvroth } from "@module/migration/migrations/904-undercommon-to-sakvroth.ts";
import { Migration905UnpersistUsage } from "@module/migration/migrations/905-unpersist-usage.ts";
import { Migration906LimitStackGroup } from "@module/migration/migrations/906-limit-stack-group.ts";
import { Migration907RestructureArmorWeaponRunes } from "@module/migration/migrations/907-restructure-armor-weapon-runes.ts";
// ^^^ don't let your IDE use the index in these imports. you need to specify the full path ^^^

const { window } = new JSDOM();
Expand Down Expand Up @@ -70,6 +71,7 @@ const migrations: MigrationBase[] = [
new Migration904UndercommonToSakvroth(),
new Migration905UnpersistUsage(),
new Migration906LimitStackGroup(),
new Migration907RestructureArmorWeaponRunes(),
];

const packsDataPath = path.resolve(process.cwd(), "packs");
Expand Down
69 changes: 15 additions & 54 deletions packs/abomination-vaults-bestiary/barcumbuk.json
Original file line number Diff line number Diff line change
Expand Up @@ -809,26 +809,11 @@
"grade": null,
"type": null
},
"potencyRune": {
"value": 0
},
"price": {
"value": {
"sp": 3
}
},
"propertyRune1": {
"value": null
},
"propertyRune2": {
"value": null
},
"propertyRune3": {
"value": null
},
"propertyRune4": {
"value": null
},
"publication": {
"license": "OGL",
"remaster": false,
Expand All @@ -840,14 +825,16 @@
"value": "-"
},
"rules": [],
"runes": {
"potency": 0,
"property": [],
"striking": 0
},
"size": "med",
"slug": "light-hammer",
"splashDamage": {
"value": 0
},
"strikingRune": {
"value": ""
},
"traits": {
"rarity": "common",
"value": [
Expand Down Expand Up @@ -910,26 +897,11 @@
"grade": null,
"type": null
},
"potencyRune": {
"value": 1
},
"price": {
"value": {
"gp": 1
}
},
"propertyRune1": {
"value": null
},
"propertyRune2": {
"value": null
},
"propertyRune3": {
"value": null
},
"propertyRune4": {
"value": null
},
"publication": {
"license": "OGL",
"remaster": false,
Expand All @@ -941,14 +913,16 @@
"value": ""
},
"rules": [],
"runes": {
"potency": 1,
"property": [],
"striking": 1
},
"size": "med",
"slug": "warhammer",
"splashDamage": {
"value": 0
},
"strikingRune": {
"value": "striking"
},
"traits": {
"rarity": "common",
"value": [
Expand Down Expand Up @@ -1002,36 +976,23 @@
"grade": null,
"type": null
},
"potencyRune": {
"value": 0
},
"price": {
"value": {
"gp": 8
}
},
"propertyRune1": {
"value": ""
},
"propertyRune2": {
"value": ""
},
"propertyRune3": {
"value": ""
},
"propertyRune4": {
"value": ""
},
"publication": {
"license": "OGL",
"remaster": false,
"title": "Pathfinder Core Rulebook"
},
"quantity": 1,
"resiliencyRune": {
"value": ""
},
"rules": [],
"runes": {
"potency": 0,
"property": [],
"resilient": 0
},
"size": "med",
"slug": "breastplate",
"speedPenalty": -5,
Expand Down
46 changes: 10 additions & 36 deletions packs/abomination-vaults-bestiary/boss-skrawng.json
Original file line number Diff line number Diff line change
Expand Up @@ -355,26 +355,11 @@
"grade": null,
"type": null
},
"potencyRune": {
"value": 0
},
"price": {
"value": {
"sp": 1
}
},
"propertyRune1": {
"value": null
},
"propertyRune2": {
"value": null
},
"propertyRune3": {
"value": null
},
"propertyRune4": {
"value": null
},
"publication": {
"license": "OGL",
"remaster": false,
Expand All @@ -386,14 +371,16 @@
"value": "1"
},
"rules": [],
"runes": {
"potency": 0,
"property": [],
"striking": 0
},
"size": "med",
"slug": "blowgun",
"splashDamage": {
"value": 0
},
"strikingRune": {
"value": ""
},
"traits": {
"rarity": "common",
"value": [
Expand Down Expand Up @@ -456,26 +443,11 @@
"grade": null,
"type": null
},
"potencyRune": {
"value": 0
},
"price": {
"value": {
"gp": 1
}
},
"propertyRune1": {
"value": null
},
"propertyRune2": {
"value": null
},
"propertyRune3": {
"value": null
},
"propertyRune4": {
"value": null
},
"publication": {
"license": "OGL",
"remaster": false,
Expand All @@ -487,14 +459,16 @@
"value": "-"
},
"rules": [],
"runes": {
"potency": 0,
"property": [],
"striking": 0
},
"size": "med",
"slug": "trident",
"splashDamage": {
"value": 0
},
"strikingRune": {
"value": ""
},
"traits": {
"rarity": "common",
"value": [
Expand Down
69 changes: 15 additions & 54 deletions packs/abomination-vaults-bestiary/caliddo-haruvex.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,26 +51,11 @@
"grade": null,
"type": null
},
"potencyRune": {
"value": null
},
"price": {
"value": {
"gp": 20
}
},
"propertyRune1": {
"value": ""
},
"propertyRune2": {
"value": ""
},
"propertyRune3": {
"value": ""
},
"propertyRune4": {
"value": ""
},
"publication": {
"license": "OGL",
"remaster": false,
Expand All @@ -82,14 +67,16 @@
"value": "0"
},
"rules": [],
"runes": {
"potency": 0,
"property": [],
"striking": 0
},
"size": "med",
"slug": "composite-longbow",
"splashDamage": {
"value": 0
},
"strikingRune": {
"value": ""
},
"traits": {
"rarity": "common",
"value": [
Expand Down Expand Up @@ -153,26 +140,11 @@
"grade": null,
"type": null
},
"potencyRune": {
"value": null
},
"price": {
"value": {
"gp": 2
}
},
"propertyRune1": {
"value": ""
},
"propertyRune2": {
"value": ""
},
"propertyRune3": {
"value": ""
},
"propertyRune4": {
"value": ""
},
"publication": {
"license": "OGL",
"remaster": false,
Expand All @@ -184,14 +156,16 @@
"value": ""
},
"rules": [],
"runes": {
"potency": 0,
"property": [],
"striking": 0
},
"size": "med",
"slug": "greatsword",
"splashDamage": {
"value": 0
},
"strikingRune": {
"value": ""
},
"traits": {
"rarity": "common",
"value": [
Expand Down Expand Up @@ -246,36 +220,23 @@
"grade": null,
"type": null
},
"potencyRune": {
"value": 1
},
"price": {
"value": {
"gp": 30
}
},
"propertyRune1": {
"value": ""
},
"propertyRune2": {
"value": ""
},
"propertyRune3": {
"value": ""
},
"propertyRune4": {
"value": ""
},
"publication": {
"license": "ORC",
"remaster": true,
"title": "Pathfinder Player Core"
},
"quantity": 1,
"resiliencyRune": {
"value": "resilient"
},
"rules": [],
"runes": {
"potency": 1,
"property": [],
"resilient": 1
},
"size": "med",
"slug": "full-plate",
"speedPenalty": -10,
Expand Down
Loading

0 comments on commit cb90997

Please sign in to comment.