mirror of
https://github.com/migatu/vtt_work.git
synced 2026-07-14 21:38:39 +00:00
Import wng-daemonhunters-0.6.4.1.zip do wg-greyknights (2025-08-22T17:07:40Z)
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
{
|
||||
"id": "gk-greyknight",
|
||||
"title": "Grey Knights — Compendium (Wrath & Glory)",
|
||||
"version": "0.6.3",
|
||||
"id": "wng-daemonhunters",
|
||||
"title": "Wrath & Glory: Daemonhunters (Grey Knights)",
|
||||
"version": "0.6.4.1",
|
||||
"compatibility": {
|
||||
"minimum": "11",
|
||||
"verified": "13"
|
||||
},
|
||||
"authors": [
|
||||
{
|
||||
"name": "User & Assistant"
|
||||
"name": "Grey Knights Add-on"
|
||||
}
|
||||
],
|
||||
"systems": [
|
||||
@@ -16,16 +16,15 @@
|
||||
],
|
||||
"packs": [
|
||||
{
|
||||
"name": "gk-items",
|
||||
"label": "Grey Knights — Items",
|
||||
"path": "packs/gk-items",
|
||||
"name": "daemonhunters",
|
||||
"label": "Daemonhunters (Grey Knights)",
|
||||
"path": "packs/daemonhunters.db",
|
||||
"type": "Item",
|
||||
"system": "wrath-and-glory",
|
||||
"private": false
|
||||
}
|
||||
],
|
||||
"esmodules": [
|
||||
"scripts/auto-loadout.js"
|
||||
],
|
||||
"readme": "README.txt"
|
||||
"scripts/auto-gk-archetype.js"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
{"name": "Aegis Power Armour", "type": "armour", "img": "modules/wng-core/assets/icons/armour/aquila-mk-vii.webp", "effects": [{"_id": "25aqxUBwyQtSAdxb", "name": "Aegis Wards (Constant)", "origin": null, "disabled": false, "duration": {"startTime": null, "combat": null}, "changes": [{"key": "system.skills.psychicMastery.bonus", "mode": 2, "value": "1", "priority": 20}, {"key": "system.combat.resolve.bonus", "mode": 2, "value": "1", "priority": 20}], "tint": "#ffffff", "transfer": true, "flags": {}, "system": {"transferData": {"equipTransfer": true, "type": "document", "originalType": "document", "documentType": "Actor", "avoidTest": {"value": "none", "opposed": false, "prevention": true, "reversed": false}, "testIndependent": false, "selfOnly": false, "prompt": false, "area": {"templateData": {"borderColor": null, "fillColor": null, "texture": null}, "keep": false, "aura": {"transferred": false, "render": false}, "duration": "sustained"}, "zone": {"type": "zone", "transferred": false, "traits": {}, "skipImmediateOnPlacement": false, "keep": false}}, "itemTargetData": {"ids": [], "allItems": false}, "scriptData": [], "zone": {"type": "zone", "traits": {}, "skipImmediateOnPlacement": false}, "sourceData": {"test": {}}}, "_stats": {"coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1", "lastModifiedBy": null}, "img": "icons/svg/aura.svg", "type": "base", "description": "", "statuses": [], "sort": 0}, {"_id": "LfRNsXknme6JLgSC", "name": "Aegis Warding Runes (Toggle)", "origin": null, "disabled": true, "duration": {"startTime": null, "combat": null}, "changes": [{"key": "system.combat.resilience.bonus", "mode": 2, "value": "1", "priority": 20}, {"key": "system.combat.defence.bonus", "mode": 2, "value": "-1", "priority": 20}], "tint": "#ffffff", "transfer": true, "flags": {}, "system": {"transferData": {"equipTransfer": true, "type": "document", "originalType": "document", "documentType": "Actor", "avoidTest": {"value": "none", "opposed": false, "prevention": true, "reversed": false}, "testIndependent": false, "selfOnly": false, "prompt": false, "area": {"templateData": {"borderColor": null, "fillColor": null, "texture": null}, "keep": false, "aura": {"transferred": false, "render": false}, "duration": "sustained"}, "zone": {"type": "zone", "transferred": false, "traits": {}, "skipImmediateOnPlacement": false, "keep": false}}, "itemTargetData": {"ids": [], "allItems": false}, "scriptData": [], "zone": {"type": "zone", "traits": {}, "skipImmediateOnPlacement": false}, "sourceData": {"test": {}}}, "_stats": {"coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1", "lastModifiedBy": null}, "img": "icons/svg/explosion.svg", "type": "base", "description": "", "statuses": [], "sort": 0}], "flags": {"wng-core": {"initialization-folder": "Armour", "sort": 0}, "core": {}}, "system": {"quantity": 1, "rarity": "", "description": "<p>Grey Knights sanctified power armour with hexagrammic wards and storm bolter forearm mount.</p><ul><li><b>AR 5</b>; <b>Powered (3)</b>.</li><li><b>Aegis (integrated):</b> Constant: +1 die to Deny the Witch and +1 die to resist Corruption.</li><li><b>Toggle (Action):</b> Aegis Warding Runes — runes glow; +1 Resilience, −1 Defence (vs ranged).</li></ul>", "value": 9, "keywords": "POWERED, IMPERIUM, ADEPTUS ASTARTES, GREY KNIGHTS, INQUISITION, DAEMONHUNTERS", "equipped": false, "rating": 5, "base": 0, "traits": {"list": [{"name": "powered", "rating": "3"}]}, "invulnerable": false}, "folder": "K59Lb8PvaCmIrviu", "_id": "11NZTwYXPlHBlnXC"}
|
||||
{"name": "Grey Knight Armour Integrated Storm Bolter", "type": "weapon", "img": "modules/wng-core/assets/icons/weapons/storm-bolter.webp", "effects": [], "flags": {"wng-core": {"initialization-folder": "Weapons", "sort": 0}, "core": {}}, "system": {"quantity": 1, "rarity": "rare", "description": "<p>Integrated forearm storm bolter. <b>Integrated:</b> does not occupy hands; may fire while wielding two‑handed melee. Treat as Pistol for firing in melee.</p>", "value": 4, "keywords": "BOLT, INTEGRATED, IMPERIUM, ADEPTUS ASTARTES, GREY KNIGHTS, INQUISITION, DAEMONHUNTERS", "equipped": false, "attack": {"base": 0, "bonus": 0, "rank": "none"}, "damage": {"base": 10, "bonus": 0, "rank": 0, "ed": {"base": 2, "bonus": 0, "rank": 0, "dice": ""}, "ap": {"base": 0, "bonus": 0, "rank": 0, "dice": ""}, "enabled": false, "otherDamage": {"mortal": "0", "wounds": "0", "shock": "0"}, "dice": ""}, "ed": {"base": 0, "bonus": 0, "rank": 0}, "ap": {"base": 0, "bonus": 0, "rank": 0}, "category": "ranged", "range": {"short": 12, "medium": 24, "long": 36, "melee": 1, "thrown": null}, "ammo": {"id": ""}, "salvo": 1, "traits": {"list": [{"name": "brutal"}, {"name": "pistol"}, {"name": "rapidFire", "rating": "2"}]}, "upgrades": [], "otherDamage": {}, "combi": {}, "twinned": false}, "folder": "85dkcvhBYli5TJrZ", "_id": "SDFwequVtp6WsCFj"}
|
||||
{"name": "Terminator Aegis (Grey Knights)", "type": "armour", "img": "modules/wng-core/assets/icons/armour/terminator-armour.webp", "effects": [{"_id": "OvE7cPAtNLDdEj6j", "name": "Aegis Wards (Constant)", "origin": null, "disabled": false, "duration": {"startTime": null, "combat": null}, "changes": [{"key": "system.skills.psychicMastery.bonus", "mode": 2, "value": "1", "priority": 20}, {"key": "system.combat.resolve.bonus", "mode": 2, "value": "1", "priority": 20}], "tint": "#ffffff", "transfer": true, "flags": {}, "system": {"transferData": {"equipTransfer": true, "type": "document", "originalType": "document", "documentType": "Actor", "avoidTest": {"value": "none", "opposed": false, "prevention": true, "reversed": false}, "testIndependent": false, "selfOnly": false, "prompt": false, "area": {"templateData": {"borderColor": null, "fillColor": null, "texture": null}, "keep": false, "aura": {"transferred": false, "render": false}, "duration": "sustained"}, "zone": {"type": "zone", "transferred": false, "traits": {}, "skipImmediateOnPlacement": false, "keep": false}}, "itemTargetData": {"ids": [], "allItems": false}, "scriptData": [], "zone": {"type": "zone", "traits": {}, "skipImmediateOnPlacement": false}, "sourceData": {"test": {}}}, "_stats": {"coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1", "lastModifiedBy": null}, "img": "icons/svg/aura.svg", "type": "base", "description": "", "statuses": [], "sort": 0}, {"_id": "RXHERg7YjunnEQ8h", "name": "Aegis Warding Runes (Toggle)", "origin": null, "disabled": true, "duration": {"startTime": null, "combat": null}, "changes": [{"key": "system.combat.resilience.bonus", "mode": 2, "value": "1", "priority": 20}, {"key": "system.combat.defence.bonus", "mode": 2, "value": "-1", "priority": 20}], "tint": "#ffffff", "transfer": true, "flags": {}, "system": {"transferData": {"equipTransfer": true, "type": "document", "originalType": "document", "documentType": "Actor", "avoidTest": {"value": "none", "opposed": false, "prevention": true, "reversed": false}, "testIndependent": false, "selfOnly": false, "prompt": false, "area": {"templateData": {"borderColor": null, "fillColor": null, "texture": null}, "keep": false, "aura": {"transferred": false, "render": false}, "duration": "sustained"}, "zone": {"type": "zone", "transferred": false, "traits": {}, "skipImmediateOnPlacement": false, "keep": false}}, "itemTargetData": {"ids": [], "allItems": false}, "scriptData": [], "zone": {"type": "zone", "traits": {}, "skipImmediateOnPlacement": false}, "sourceData": {"test": {}}}, "_stats": {"coreVersion": "13.347", "systemId": "wrath-and-glory", "systemVersion": "7.1.1", "lastModifiedBy": null}, "img": "icons/svg/explosion.svg", "type": "base", "description": "", "statuses": [], "sort": 0}], "flags": {"wng-core": {"initialization-folder": "Armour", "sort": 0}, "core": {}}, "system": {"quantity": 1, "rarity": "", "description": "<p>Grey Knights Tactical Dreadnought armour with Aegis wards and storm bolter hard‑mount.</p><ul><li><b>AR 7</b>; <b>Powered (4)</b>; <b>Cumbersome</b>; counts as Large while worn.</li><li><b>Aegis (integrated):</b> Constant: +1 die to Deny the Witch and +1 die to resist Corruption.</li><li><b>Toggle (Action):</b> Aegis Warding Runes — +1 Resilience, −1 Defence (vs ranged).</li></ul>", "value": 10, "keywords": "POWERED, IMPERIUM, ADEPTUS ASTARTES, GREY KNIGHTS, INQUISITION, DAEMONHUNTERS", "equipped": false, "rating": 7, "base": 0, "traits": {"list": [{"name": "cumbersome"}, {"name": "powered", "rating": "4"}]}, "invulnerable": false}, "folder": "K59Lb8PvaCmIrviu", "_id": "9XTvCiJElW4LJij9"}
|
||||
{"name": "Nemesis Falchions (Pair)", "type": "weapon", "img": "modules/wng-core/assets/icons/weapons/force-sword.webp", "system": {"quantity": 1, "rarity": "unique", "description": "A matched pair of sanctified force blades. When wielding both, each attack may gain either +1 bonus die to WS or +1ED. Vs DAEMON/PSYKER: +1ED. Requires PSYKER to benefit from Force.", "value": 9, "keywords": "IMPERIUM, ADEPTUS ASTARTES, GREY KNIGHTS, SANCTIFIED", "equipped": false, "attack": {"base": 0, "bonus": 0, "rank": "none"}, "damage": {"base": 12, "bonus": 0, "rank": 0, "ed": {"base": 2, "bonus": 0, "rank": 0, "dice": ""}, "ap": {"base": -3, "bonus": 0, "rank": 0, "dice": ""}, "enabled": false, "otherDamage": {"mortal": "0", "wounds": "0", "shock": "0"}, "dice": ""}, "ed": {"base": 0, "bonus": 0, "rank": 0}, "ap": {"base": 0, "bonus": 0, "rank": 0}, "category": "melee", "range": {"short": 0, "medium": 0, "long": 0, "melee": 1, "thrown": null}, "ammo": {"id": ""}, "salvo": 0, "traits": {"list": [{"name": "force"}, {"name": "parry"}]}, "upgrades": [], "otherDamage": {}, "combi": {}, "twinned": false}, "effects": [], "folder": null, "flags": {}, "_id": "AUwZwmYWGCSH04m2"}
|
||||
{"name": "Psilencer", "type": "weapon", "img": "modules/wng-core/assets/icons/weapons/assault-cannon.webp", "system": {"quantity": 1, "rarity": "unique", "description": "High-rate psykic disruptor. Vs PSYKER: +1ED; hit PSYKER cannot Aim in the same round.", "value": 9, "keywords": "IMPERIUM, ADEPTUS ASTARTES, GREY KNIGHTS, SANCTIFIED", "equipped": false, "attack": {"base": 0, "bonus": 0, "rank": "none"}, "damage": {"base": 11, "bonus": 0, "rank": 0, "ed": {"base": 2, "bonus": 0, "rank": 0, "dice": ""}, "ap": {"base": 0, "bonus": 0, "rank": 0, "dice": ""}, "enabled": false, "otherDamage": {"mortal": "0", "wounds": "0", "shock": "0"}, "dice": ""}, "ed": {"base": 0, "bonus": 0, "rank": 0}, "ap": {"base": 0, "bonus": 0, "rank": 0}, "category": "ranged", "range": {"short": 12, "medium": 24, "long": 36, "melee": 1, "thrown": null}, "ammo": {"id": ""}, "salvo": 3, "traits": {"list": [{"name": "rapidFire", "rating": "3"}, {"name": "reliable"}]}, "upgrades": [], "otherDamage": {}, "combi": {}, "twinned": false}, "effects": [], "folder": null, "flags": {}, "_id": "qvk9TxIezbO2C5OK"}
|
||||
{"name": "Psycannon", "type": "weapon", "img": "modules/wng-core/assets/icons/weapons/autocannon.webp", "system": {"quantity": 1, "rarity": "unique", "description": "Anti-daemonic bolt weapon. Vs DAEMON/PSYKER: +1ED. On Critical: gains Rending (1) for the result.", "value": 9, "keywords": "BOLT, IMPERIUM, ADEPTUS ASTARTES, GREY KNIGHTS, SANCTIFIED", "equipped": false, "attack": {"base": 0, "bonus": 0, "rank": "none"}, "damage": {"base": 14, "bonus": 0, "rank": 0, "ed": {"base": 3, "bonus": 0, "rank": 0, "dice": ""}, "ap": {"base": -2, "bonus": 0, "rank": 0, "dice": ""}, "enabled": false, "otherDamage": {"mortal": "0", "wounds": "0", "shock": "0"}, "dice": ""}, "ed": {"base": 0, "bonus": 0, "rank": 0}, "ap": {"base": 0, "bonus": 0, "rank": 0}, "category": "ranged", "range": {"short": 20, "medium": 40, "long": 60, "melee": 1, "thrown": null}, "ammo": {"id": ""}, "salvo": 2, "traits": {"list": [{"name": "heavy", "rating": "7"}, {"name": "rapidFire", "rating": "2"}]}, "upgrades": [], "otherDamage": {}, "combi": {}, "twinned": false}, "effects": [], "folder": null, "flags": {}, "_id": "luQa0ffP6nroOeN8"}
|
||||
{"name": "Psybolt Ammunition", "type": "ammo", "img": "modules/wng-core/assets/icons/ammo/ammo.webp", "system": {"quantity": 1, "rarity": "unique", "description": "Upgrade for BOLT/Storm Bolter weapons. Grants +1ED. Against DAEMON/PSYKER, attacks gain Rending (1). Apply manually to attack resolving rules; conditional effects are not automated.", "value": 5, "keywords": "BOLT, SANCTIFIED", "effect": "", "traits": {"list": []}}, "effects": [], "folder": null, "flags": {}, "_id": "ozxEfipXNkP69SHr"}
|
||||
{"name": "Pilgrim Astartes Plate (Disguise Armour)", "type": "armour", "img": "modules/wng-core/assets/icons/armour/terminator-armour.webp", "effects": [{"_id": "44rACWx99MiXXe4E", "name": "Pilgrim Disguise Penalties", "icon": "icons/svg/downgrade.svg", "origin": "", "disabled": false, "duration": {"startTime": null, "seconds": null, "turns": null, "startRound": null, "startTurn": null}, "changes": [{"key": "system.attributes.agility.bonus", "mode": 2, "value": -1, "priority": 20}, {"key": "system.skills.stealth.bonus", "mode": 2, "value": -1, "priority": 20}, {"key": "system.combat.speed", "mode": 2, "value": -1, "priority": 20}], "tint": null, "transfer": true, "flags": {}}], "flags": {"wng-core": {"initialization-folder": "Armour", "sort": 0}, "core": {}}, "system": {"quantity": 1, "rarity": "rare", "description": "<p>Scavenged Black Templars plate, patched & lightened. Designed for incognito operations.</p><ul><li><b>AR 4</b>; <b>Powered (1)</b>; <b>Cumbersome</b>.</li><li><b>Penalty (Active Effect):</b> −1 die to Agility- and Stealth-based Tests while worn; −1 Speed (homebrew).</li><li>Appears as Templar armour at a glance; close inspection may reveal inconsistencies.</li></ul>", "value": 6, "keywords": "POWERED, IMPERIUM, ADEPTUS ASTARTES, BLACK TEMPLARS (DISGUISE)", "equipped": true, "rating": 4, "base": 0, "traits": {"list": [{"name": "cumbersome"}, {"name": "powered", "rating": "1"}]}, "invulnerable": false}, "folder": "K59Lb8PvaCmIrviu", "_id": "2P2HioialQdFUCv6"}
|
||||
{"name": "Aegis of Titan", "type": "ability", "img": "modules/wng-core/assets/icons/abilities/adeptus-astartes.webp", "effects": [{"name": "Aegis of Titan (Innate)", "img": "modules/wng-core/assets/icons/abilities/adeptus-astartes.webp", "_id": "f6b0a8f61b17498c", "type": "base", "system": {"transferData": {"type": "document", "originalType": "document", "documentType": "Actor", "avoidTest": {"value": "none", "opposed": false, "prevention": true, "reversed": false}, "testIndependent": false, "equipTransfer": true, "selfOnly": false, "prompt": false, "area": {"templateData": {"borderColor": null, "fillColor": null, "texture": null}, "keep": false, "aura": {"transferred": false, "render": false}, "duration": "sustained"}, "zone": {"type": "zone", "transferred": false, "traits": {}, "skipImmediateOnPlacement": false, "keep": false}}, "itemTargetData": {"ids": [], "allItems": false}, "scriptData": [], "zone": {"type": "zone", "traits": {}, "skipImmediateOnPlacement": false}, "sourceData": {"test": {}}}, "changes": [{"key": "flags.wng-daemonhunters.denyBonus", "mode": 2, "value": "1", "priority": 10}, {"key": "flags.wng-daemonhunters.corruptionResistInnate", "mode": 2, "value": "1", "priority": 10}], "disabled": false, "transfer": true}], "system": {"description": "<p>Innate sanctity of a Grey Knight. +1 bonus die to <em>Deny the Witch</em>; +1 to resist Corruption. If equipped with Aegis armour, gain an additional +1 to resist Corruption.</p>", "cost": 0, "requirements": "GREY KNIGHTS"}, "_id": "4fbdc9cbbdce43b6"}
|
||||
{"name": "Brotherhood of Psykers", "type": "ability", "img": "modules/wng-core/assets/icons/abilities/adeptus-astartes.webp", "effects": [], "system": {"description": "<p>You gain the <strong>PSYKER</strong> Keyword and know Universal Psyker Abilities and <em>Smite</em>. When you gain this Ability, choose one Discipline: <strong>Librarius</strong> or <strong>Sanctic</strong>. Learn one power from the chosen Discipline.</p>", "cost": 0, "requirements": "GREY KNIGHTS"}, "_id": "8e147a2e47594051"}
|
||||
{"name": "Hammerhand (Sanctic)", "type": "psychicPower", "img": "modules/wng-core/assets/icons/powers/power.webp", "effects": [], "system": {"dn": "7", "cost": 10, "activation": "action", "duration": "Sustained", "range": "Self", "keywords": "PSYCHIC, SANCTIC", "description": "<p>Melee attacks gain +1ED until the start of your next Turn (persists while Sustained). Optionally spend 3 Shock on activation to gain +1 DN to resist Disarm/Shove.</p>"}, "_id": "62d8b2491f1b408d"}
|
||||
{"name": "Sanctuary (Sanctic)", "type": "psychicPower", "img": "modules/wng-core/assets/icons/powers/power.webp", "effects": [], "system": {"dn": "7", "cost": 15, "activation": "action", "duration": "Sustained", "range": "Aura 5 m", "keywords": "PSYCHIC, SANCTIC", "description": "<p>Allies in the aura gain +1 to Resolve vs Fear/Corruption; their attacks count as Sanctified vs DAEMON for overcoming Resistances (GM adjudication). Ends if you are Incapacitated.</p>"}, "_id": "604ee438dd144a72"}
|
||||
{"name": "The Shrouding (Sanctic)", "type": "psychicPower", "img": "modules/wng-core/assets/icons/powers/power.webp", "effects": [], "system": {"dn": "7", "cost": 10, "activation": "action", "duration": "Sustained", "range": "Self or Ally within 15 m", "keywords": "PSYCHIC, SANCTIC", "description": "<p>Attacks against the target suffer +1 DN (ranged) while Sustained; moving more than normal Speed ends the effect at end of Turn. Potency (table): also +1 DN melee.</p>"}, "_id": "3326bd6d147441ae"}
|
||||
{"name": "Might of Titan (Sanctic)", "type": "psychicPower", "img": "modules/wng-core/assets/icons/powers/power.webp", "effects": [], "system": {"dn": "7", "cost": 15, "activation": "action", "duration": "Sustained", "range": "15 m", "keywords": "PSYCHIC, SANCTIC", "description": "<p>Target ally gains +1 to Strength-based Tests and +1ED on melee attacks; while Sustained, the bonuses persist. Potency (table): also +1 to Toughness Tests.</p>"}, "_id": "169a9cb337844a44"}
|
||||
@@ -0,0 +1,75 @@
|
||||
// WNG-Daemonhunters 0.6.4.1 — single dialog GK autoload (no clashes)
|
||||
Hooks.once('ready', () => console.log("WNG-Daemonhunters | Auto-loadout ready"));
|
||||
|
||||
async function addFromPackByName(actor, packKey, name, equip=false) {
|
||||
const pack = game.packs.get(packKey);
|
||||
if (!pack) return ui.notifications?.warn(`Pack not found: ${packKey}`);
|
||||
const index = await pack.getIndex();
|
||||
const entry = index.find(e => e.name === name);
|
||||
if (!entry) return ui.notifications?.warn(`Item not in pack: ${name}`);
|
||||
const doc = await pack.getDocument(entry._id);
|
||||
const data = doc.toObject(); delete data._id;
|
||||
if (equip && data.system && ('equipped' in data.system)) data.system.equipped = true;
|
||||
const [created] = await actor.createEmbeddedDocuments('Item', [data]);
|
||||
return created;
|
||||
}
|
||||
async function addFromUuid(actor, uuid, equip=false) {
|
||||
const doc = await fromUuid(uuid);
|
||||
if (!doc) return ui.notifications?.warn(`Missing UUID: ${uuid}`);
|
||||
const data = doc.toObject(); delete data._id;
|
||||
if (equip && data.system && ('equipped' in data.system)) data.system.equipped = true;
|
||||
const [created] = await actor.createEmbeddedDocuments('Item', [data]);
|
||||
return created;
|
||||
}
|
||||
|
||||
Hooks.on('createItem', async (item, options, userId) => {
|
||||
try {
|
||||
const actor = item.parent;
|
||||
if (!actor || item.type !== 'archetype' || item.name !== 'Grey Knight') return;
|
||||
if (game.userId !== userId) return;
|
||||
if (actor.getFlag('wng-daemonhunters','gkLoaded')) return; // prevent double-run
|
||||
|
||||
const content = `<p>Select initial loadout for <strong>Grey Knight</strong>:</p>
|
||||
<div class="form-group"><label>Loadout</label>
|
||||
<select id="gk-loadout">
|
||||
<option value="incog">Incognito — Pilgrim Astartes Plate + Astartes Combat Knife + Bolt Pistol</option>
|
||||
<option value="power" selected>War‑Plate — Aegis Power Armour + Nemesis Force Halberd + Integrated Storm Bolter</option>
|
||||
<option value="termi">Terminator — Terminator Aegis + Nemesis Force Halberd + Integrated Storm Bolter</option>
|
||||
</select>
|
||||
</div>`;
|
||||
|
||||
new Dialog({
|
||||
title: "Grey Knight — Choose Loadout",
|
||||
content,
|
||||
buttons: {
|
||||
ok: { label: "Apply", callback: async (html) => {
|
||||
const choice = html.find('#gk-loadout').val();
|
||||
const PACK = "wng-daemonhunters.daemonhunters";
|
||||
|
||||
// Base abilities always
|
||||
await addFromPackByName(actor, PACK, "Aegis of Titan");
|
||||
await addFromPackByName(actor, PACK, "Brotherhood of Psykers");
|
||||
await addFromPackByName(actor, PACK, "Might of Heroes");
|
||||
|
||||
if (choice === 'incog') {
|
||||
await addFromPackByName(actor, PACK, "Pilgrim Astartes Power Armour", true);
|
||||
await addFromUuid(actor, "Compendium.wng-core.items.Item.4QVBQYWXXLyvFWkj", true); // Knife
|
||||
await addFromUuid(actor, "Compendium.wng-core.items.Item.7b2xcPWBB7up65PM", true); // Bolt Pistol
|
||||
} else if (choice === 'power') {
|
||||
await addFromPackByName(actor, PACK, "Aegis Power Armour", true);
|
||||
await addFromPackByName(actor, PACK, "Grey Knight Armour Integrated Storm Bolter", true);
|
||||
await addFromPackByName(actor, PACK, "Nemesis Force Halberd", true);
|
||||
} else if (choice === 'termi') {
|
||||
await addFromPackByName(actor, PACK, "Terminator Aegis (Grey Knights)", true);
|
||||
await addFromPackByName(actor, PACK, "Grey Knight Armour Integrated Storm Bolter", true);
|
||||
await addFromPackByName(actor, PACK, "Nemesis Force Halberd", true);
|
||||
}
|
||||
|
||||
await actor.setFlag('wng-daemonhunters','gkLoaded', true);
|
||||
ui.notifications?.info("Grey Knight loadout applied.");
|
||||
}}
|
||||
},
|
||||
default: "ok"
|
||||
}).render(true);
|
||||
} catch (e) { console.error("GK autoload error", e); }
|
||||
});
|
||||
Reference in New Issue
Block a user