Files
vtt_work/wg-voidships-builder/packs/wg-voidship-macros.db
T
2025-09-17 23:33:13 +02:00

7 lines
2.5 KiB
Plaintext

{"_id":"a68969a2ac5a2855","name":"Import Voidships","type":"script","img":"icons/svg/sword.svg","scope":"global","author":null,"ownership":{"default":2},"command":"try{game.wgVoidshipsMacros.importVoidships();}catch(e){console.error(e);ui.notifications.error('ImportVoidships error — check console');}"}
{"_id":"72e2ff46870f2723","name":"Create Voidship Crit Table (d66)","type":"script","img":"icons/svg/d20-black.svg","scope":"global","author":null,"ownership":{"default":2},"command":"try{game.wgVoidshipsMacros.createCritTable();}catch(e){console.error(e);ui.notifications.error('CreateCritTable error — check console');}"}
{"_id":"9c4931885b529b9c","name":"Apply Voidship Hit","type":"script","img":"icons/svg/splash.svg","scope":"global","author":null,"ownership":{"default":2},"command":"try{game.wgVoidshipsMacros.applyHit();}catch(e){console.error(e);ui.notifications.error('ApplyHit error — check console');}"}
{"_id":"473e9b2b97086116","name":"Recharge Void Shields","type":"script","img":"icons/svg/regen.svg","scope":"global","author":null,"ownership":{"default":2},"command":"try{game.wgVoidshipsMacros.rechargeShields();}catch(e){console.error(e);ui.notifications.error('RechargeShields error — check console');}"}
{"_id":"dfd9ef292fb3774f","name":"Set Void Shields","type":"script","img":"icons/svg/aura.svg","scope":"global","author":null,"ownership":{"default":2},"command":"try{game.wgVoidshipsMacros.setShields();}catch(e){console.error(e);ui.notifications.error('SetShields error — check console');}"}
{"_id":"5079989f359a3c3d","name":"Toggle Geller (Primary/Reserve)","type":"script","img":"icons/svg/aura.svg","scope":"global","author":null,"ownership":{"default":2},"command":"(async()=>{try{const a=canvas.tokens.controlled[0]?.actor; if(!a) return ui.notifications.warn('Select a voidship token.'); const g=a.getFlag('wg-voidships','geller')||{primaryActive:false,reserveActive:false}; const content=`<p>Primary: <input type=checkbox id=p ${g.primaryActive?'checked':''}></p><p>Reserve: <input type=checkbox id=r ${g.reserveActive?'checked':''}></p>`; new Dialog({title:'Geller Fields',content,buttons:{ok:{label:'Set',callback:async html=>{const p=html[0].querySelector('#p').checked; const r=html[0].querySelector('#r').checked; await a.setFlag('wg-voidships','geller',{primaryActive:p,reserveActive:r}); ChatMessage.create({content:`${a.name}: Geller Primary ${p?'ON':'OFF'} / Reserve ${r?'ON':'OFF'}`});}}}}).render(true);}catch(e){console.error(e);ui.notifications.error('Toggle Geller error — check console');}})();"}