feat: add bonded augment status effects and support dynamic image and effect registration in ikonis-data.js
This commit is contained in:
parent
80d2d95617
commit
66f34b39dc
1 changed files with 53 additions and 8 deletions
|
|
@ -1,5 +1,46 @@
|
|||
export const DEFAULT_AUGMENTS = [
|
||||
{ id: "bonded", name: "Bonded", effect: "Primary module for Ikonis hardware synchronization.", cost: "Cost: None" },
|
||||
{
|
||||
id: "bonded",
|
||||
name: "Bonded",
|
||||
effect: "Primary module for Ikonis hardware synchronization.",
|
||||
cost: "Cost: None",
|
||||
img: "icons/magic/control/debuff-energy-hold-blue-yellow.webp",
|
||||
effects: [
|
||||
{
|
||||
name: "Ikonis: Bonded",
|
||||
type: "base",
|
||||
img: "icons/magic/control/debuff-energy-hold-blue-yellow.webp",
|
||||
system: {
|
||||
changes: [
|
||||
{
|
||||
key: "system.bonuses.damage.primaryWeapon.bonus",
|
||||
type: "add",
|
||||
value: "@tier",
|
||||
priority: null,
|
||||
phase: "initial"
|
||||
}
|
||||
],
|
||||
duration: {
|
||||
description: "",
|
||||
type: ""
|
||||
},
|
||||
rangeDependence: {
|
||||
enabled: false,
|
||||
type: "withinRange",
|
||||
target: "hostile",
|
||||
range: "melee"
|
||||
},
|
||||
stacking: null,
|
||||
targetDispositions: []
|
||||
},
|
||||
disabled: false,
|
||||
transfer: true,
|
||||
statuses: [],
|
||||
showIcon: 1,
|
||||
flags: {}
|
||||
}
|
||||
]
|
||||
},
|
||||
{ id: "force", name: "Force", effect: "+1 Damage on Melee attacks.", cost: "Cost: 2 Iron" },
|
||||
{ id: "fire", name: "Fire", effect: "Deals Fire damage instead of Physical.", cost: "Cost: 1 Blaze Glass" },
|
||||
{ id: "shield", name: "Shield", effect: "+1 Armor while equipped.", cost: "Cost: 2 Steel" },
|
||||
|
|
@ -19,10 +60,10 @@ export function registerIkonisFeatures() {
|
|||
const nativeId = `ikonis-${aug.id}`;
|
||||
CONFIG.DH.ITEM.weaponFeatures[nativeId] = {
|
||||
name: `Ikonis: ${aug.name}`,
|
||||
img: "systems/daggerheart/assets/icons/documents/items/chip.svg",
|
||||
img: aug.img || "systems/daggerheart/assets/icons/documents/items/chip.svg",
|
||||
description: `<p>${aug.effect}</p><p>${aug.cost}</p>`,
|
||||
actions: {},
|
||||
effects: []
|
||||
actions: aug.actions || {},
|
||||
effects: aug.effects || []
|
||||
};
|
||||
}
|
||||
console.log("DH-Ikonis | Features registered in CONFIG.");
|
||||
|
|
@ -43,13 +84,17 @@ export async function seedIkonisHomebrew() {
|
|||
let updates = false;
|
||||
for (const aug of DEFAULT_AUGMENTS) {
|
||||
const nativeId = `ikonis-${aug.id}`;
|
||||
if (!homebrew.itemFeatures.weaponFeatures[nativeId]) {
|
||||
const existing = homebrew.itemFeatures.weaponFeatures[nativeId];
|
||||
const hasEffects = aug.effects && aug.effects.length > 0;
|
||||
const needsUpdate = !existing || (hasEffects && (!existing.effects || existing.effects.length === 0));
|
||||
|
||||
if (needsUpdate) {
|
||||
homebrew.itemFeatures.weaponFeatures[nativeId] = {
|
||||
name: `Ikonis: ${aug.name}`,
|
||||
img: "systems/daggerheart/assets/icons/documents/items/chip.svg",
|
||||
img: aug.img || "systems/daggerheart/assets/icons/documents/items/chip.svg",
|
||||
description: `<p>${aug.effect}</p><p>${aug.cost}</p>`,
|
||||
actions: {},
|
||||
effects: []
|
||||
actions: aug.actions || {},
|
||||
effects: aug.effects || []
|
||||
};
|
||||
updates = true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue