diff --git a/package.json b/package.json index 25d236f18..1179b1248 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,6 @@ "license": "", "devDependencies": { "@league-of-foundry-developers/foundry-vtt-types": "^0.8.9-2", - "@pyoner/svelte-types": "^3.4.4-2", "@sveltejs/vite-plugin-svelte": "^1.0.0-next.15", "@tsconfig/svelte": "^2.0.1", "archiver": "^3.1.1", diff --git a/public/packs/aoe-templates.db b/public/packs/aoe-templates.db index 7ee744962..c270592f0 100644 --- a/public/packs/aoe-templates.db +++ b/public/packs/aoe-templates.db @@ -1,45 +1,15 @@ -{"name":"Line 10","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.f1l5GSkj9zZMgF1Q"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Line\",\n val: 10,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/aoe_line.svg","actorIds":[],"_id":"DCJrD2GG1Tbxe30b"} -{"name":"Line 8","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.7hVsS8JBtcsb0LbG"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Line\",\n val: 8,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/aoe_line.svg","actorIds":[],"_id":"FggsQDnGA7vyKjC6"} -{"name":"Cone 5","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.WEVUv6dRfykovJvi"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Cone\",\n val: 5,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/aoe_cone.svg","actorIds":[],"_id":"IxDE0tAziZHksq4K"} -{"name":"Line 3","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.e5alJsYqZqj03u36"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Line\",\n val: 3,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/aoe_line.svg","actorIds":[],"_id":"NA1cLM6G7mt4osJp"} -{"name":"Line 20","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.YdVgbXwte6NJpSrp"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Line\",\n val: 20,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/aoe_line.svg","actorIds":[],"_id":"Pn1xlHQOakdCBGKb"} -{"name":"Cone 7","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.ygDDlW5ivDvVwrvL"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Cone\",\n val: 7,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/aoe_cone.svg","actorIds":[],"_id":"SNtUHejVtmF2lU7g"} -{"name":"Line 5","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.dADNo2jhTX1eGiuH"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Line\",\n val: 5,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/aoe_line.svg","actorIds":[],"_id":"TEExiN3uSjXtT44m"} -{"_id":"ZCegUqu9KN8QcblY","name":"Burst 3","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.YukYsTV8s6zQaxzW"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Burst\",\n val: 3,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/aoe_burst.svg","actorIds":[]} -{"name":"Cone 3","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.gIdV5TNEP06r6r2Y"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Cone\",\n val: 3,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/aoe_cone.svg","actorIds":[],"_id":"hOgtC72HseyuoGcc"} -{"_id":"oSSA2fV5IMURZVdF","name":"Burst 1","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.hryuIOHeMGwXHxBi"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Burst\",\n val: 1,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/aoe_burst.svg","actorIds":[]} -{"_id":"t2468YAl0Kz2ZtFi","name":"Burst 2","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.YukYsTV8s6zQaxzW"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Burst\",\n val: 2,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/aoe_burst.svg","actorIds":[]} -{"_id":"vcjwICogeADvsmbk","name":"Burst 5","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.YukYsTV8s6zQaxzW"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Burst\",\n val: 5,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/aoe_burst.svg","actorIds":[]} -{"name":"Blast 2","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.qjUrHUUp0fn3fvfu"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Blast\",\n val: 2,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/aoe_blast.svg","actorIds":[],"_id":"xi0ZEjPjehswc711"} -{"name":"Blast 3","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.4uPkblEHwvbN4dv4"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Blast\",\n val: 3,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/aoe_blast.svg","actorIds":[],"_id":"yIDTBuXVZen10R2o"} -{"name":"Blast 1","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.eacYWn2gsUM0uRyv"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Blast\",\n val: 1,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/aoe_blast.svg","actorIds":[],"_id":"z935dzHNK1wESYMS"} -{"_id":"z935dzHNK1wESYMS","name":"Blast 1","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.eacYWn2gsUM0uRyv"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Blast\",\n val: 1,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_blast.svg","actorIds":[]} -{"_id":"z935dzHNK1wESYMS","name":"Blast 1","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.eacYWn2gsUM0uRyv"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Blast\",\n val: 1,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_blast.svg","actorIds":[]} -{"_id":"xi0ZEjPjehswc711","name":"Blast 2","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.qjUrHUUp0fn3fvfu"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Blast\",\n val: 2,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_blast.svg","actorIds":[]} -{"_id":"xi0ZEjPjehswc711","name":"Blast 2","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.qjUrHUUp0fn3fvfu"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Blast\",\n val: 2,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_blast.svg","actorIds":[]} -{"_id":"yIDTBuXVZen10R2o","name":"Blast 3","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.4uPkblEHwvbN4dv4"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Blast\",\n val: 3,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_blast.svg","actorIds":[]} -{"_id":"yIDTBuXVZen10R2o","name":"Blast 3","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.4uPkblEHwvbN4dv4"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Blast\",\n val: 3,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_blast.svg","actorIds":[]} -{"_id":"oSSA2fV5IMURZVdF","name":"Burst 1","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.hryuIOHeMGwXHxBi"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Burst\",\n val: 1,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_burst.svg","actorIds":[]} -{"_id":"oSSA2fV5IMURZVdF","name":"Burst 1","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.hryuIOHeMGwXHxBi"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Burst\",\n val: 1,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_burst.svg","actorIds":[]} -{"_id":"t2468YAl0Kz2ZtFi","name":"Burst 2","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.YukYsTV8s6zQaxzW"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Burst\",\n val: 2,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_burst.svg","actorIds":[]} -{"_id":"t2468YAl0Kz2ZtFi","name":"Burst 2","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.YukYsTV8s6zQaxzW"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Burst\",\n val: 2,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_burst.svg","actorIds":[]} -{"_id":"ZCegUqu9KN8QcblY","name":"Burst 3","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.YukYsTV8s6zQaxzW"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Burst\",\n val: 3,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_burst.svg","actorIds":[]} -{"_id":"ZCegUqu9KN8QcblY","name":"Burst 3","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.YukYsTV8s6zQaxzW"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Burst\",\n val: 3,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_burst.svg","actorIds":[]} -{"_id":"vcjwICogeADvsmbk","name":"Burst 5","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.YukYsTV8s6zQaxzW"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Burst\",\n val: 5,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_burst.svg","actorIds":[]} -{"_id":"vcjwICogeADvsmbk","name":"Burst 5","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.YukYsTV8s6zQaxzW"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Burst\",\n val: 5,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_burst.svg","actorIds":[]} -{"_id":"hOgtC72HseyuoGcc","name":"Cone 3","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.gIdV5TNEP06r6r2Y"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Cone\",\n val: 3,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_cone.svg","actorIds":[]} -{"_id":"hOgtC72HseyuoGcc","name":"Cone 3","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.gIdV5TNEP06r6r2Y"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Cone\",\n val: 3,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_cone.svg","actorIds":[]} -{"_id":"IxDE0tAziZHksq4K","name":"Cone 5","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.WEVUv6dRfykovJvi"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Cone\",\n val: 5,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_cone.svg","actorIds":[]} -{"_id":"IxDE0tAziZHksq4K","name":"Cone 5","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.WEVUv6dRfykovJvi"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Cone\",\n val: 5,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_cone.svg","actorIds":[]} -{"_id":"SNtUHejVtmF2lU7g","name":"Cone 7","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.ygDDlW5ivDvVwrvL"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Cone\",\n val: 7,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_cone.svg","actorIds":[]} -{"_id":"SNtUHejVtmF2lU7g","name":"Cone 7","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.ygDDlW5ivDvVwrvL"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Cone\",\n val: 7,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_cone.svg","actorIds":[]} -{"_id":"DCJrD2GG1Tbxe30b","name":"Line 10","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.f1l5GSkj9zZMgF1Q"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Line\",\n val: 10,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_line.svg","actorIds":[]} -{"_id":"DCJrD2GG1Tbxe30b","name":"Line 10","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.f1l5GSkj9zZMgF1Q"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Line\",\n val: 10,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_line.svg","actorIds":[]} -{"_id":"Pn1xlHQOakdCBGKb","name":"Line 20","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.YdVgbXwte6NJpSrp"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Line\",\n val: 20,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_line.svg","actorIds":[]} -{"_id":"Pn1xlHQOakdCBGKb","name":"Line 20","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.YdVgbXwte6NJpSrp"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Line\",\n val: 20,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_line.svg","actorIds":[]} -{"_id":"NA1cLM6G7mt4osJp","name":"Line 3","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.e5alJsYqZqj03u36"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Line\",\n val: 3,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_line.svg","actorIds":[]} -{"_id":"NA1cLM6G7mt4osJp","name":"Line 3","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.e5alJsYqZqj03u36"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Line\",\n val: 3,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_line.svg","actorIds":[]} -{"_id":"TEExiN3uSjXtT44m","name":"Line 5","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.dADNo2jhTX1eGiuH"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Line\",\n val: 5,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_line.svg","actorIds":[]} -{"_id":"TEExiN3uSjXtT44m","name":"Line 5","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.dADNo2jhTX1eGiuH"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Line\",\n val: 5,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_line.svg","actorIds":[]} -{"_id":"FggsQDnGA7vyKjC6","name":"Line 8","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.7hVsS8JBtcsb0LbG"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Line\",\n val: 8,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_line.svg","actorIds":[]} -{"_id":"FggsQDnGA7vyKjC6","name":"Line 8","permission":{"default":0,"EezUQWe7dZJO5vje":3},"type":"script","flags":{"core":{"sourceId":"Macro.7hVsS8JBtcsb0LbG"}},"scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Line\",\n val: 8,\n}).placeTemplate();","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_line.svg","actorIds":[]} +"_id":"z935dzHNK1wESYMS","name":"Blast 1","type":"script","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_blast.svg","scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Blast\",\n val: 1,\n}).placeTemplate()\n .then(t => {\n if (t) game.lancer.targetsFromTemplate(t.id);\n }\n);","folder":null,"sort":0,"permission":{"default":0,"EezUQWe7dZJO5vje":3},"flags":{"core":{"sourceId":"Macro.eacYWn2gsUM0uRyv"}}} +{"_id":"xi0ZEjPjehswc711","name":"Blast 2","type":"script","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_blast.svg","scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Blast\",\n val: 2,\n}).placeTemplate()\n .then(t => {\n if (t) game.lancer.targetsFromTemplate(t.id);\n }\n);","folder":null,"sort":0,"permission":{"default":0,"EezUQWe7dZJO5vje":3},"flags":{"core":{"sourceId":"Macro.qjUrHUUp0fn3fvfu"}}} +{"_id":"yIDTBuXVZen10R2o","name":"Blast 3","type":"script","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_blast.svg","scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Blast\",\n val: 3,\n}).placeTemplate()\n .then(t => {\n if (t) game.lancer.targetsFromTemplate(t.id);\n }\n);","folder":null,"sort":0,"permission":{"default":0,"EezUQWe7dZJO5vje":3},"flags":{"core":{"sourceId":"Macro.4uPkblEHwvbN4dv4"}}} +{"_id":"oSSA2fV5IMURZVdF","name":"Burst 1","type":"script","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_burst.svg","scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Burst\",\n val: 1,\n}).placeTemplate()\n .then(t => {\n if (t) game.lancer.targetsFromTemplate(t.id);\n }\n);","folder":null,"sort":0,"permission":{"default":0,"EezUQWe7dZJO5vje":3},"flags":{"core":{"sourceId":"Macro.hryuIOHeMGwXHxBi"}}} +{"_id":"t2468YAl0Kz2ZtFi","name":"Burst 2","type":"script","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_burst.svg","scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Burst\",\n val: 2,\n}).placeTemplate()\n .then(t => {\n if (t) game.lancer.targetsFromTemplate(t.id);\n }\n);","folder":null,"sort":0,"permission":{"default":0,"EezUQWe7dZJO5vje":3},"flags":{"core":{"sourceId":"Macro.YukYsTV8s6zQaxzW"}}} +{"_id":"ZCegUqu9KN8QcblY","name":"Burst 3","type":"script","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_burst.svg","scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Burst\",\n val: 3,\n}).placeTemplate()\n .then(t => {\n if (t) game.lancer.targetsFromTemplate(t.id);\n }\n);","folder":null,"sort":0,"permission":{"default":0,"EezUQWe7dZJO5vje":3},"flags":{"core":{"sourceId":"Macro.YukYsTV8s6zQaxzW"}}} +{"_id":"vcjwICogeADvsmbk","name":"Burst 5","type":"script","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_burst.svg","scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Burst\",\n val: 5,\n}).placeTemplate()\n .then(t => {\n if (t) game.lancer.targetsFromTemplate(t.id);\n }\n);","folder":null,"sort":0,"permission":{"default":0,"EezUQWe7dZJO5vje":3},"flags":{"core":{"sourceId":"Macro.YukYsTV8s6zQaxzW"}}} +{"_id":"hOgtC72HseyuoGcc","name":"Cone 3","type":"script","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_cone.svg","scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Cone\",\n val: 3,\n}).placeTemplate()\n .then(t => {\n if (t) game.lancer.targetsFromTemplate(t.id);\n }\n);","folder":null,"sort":0,"permission":{"default":0,"EezUQWe7dZJO5vje":3},"flags":{"core":{"sourceId":"Macro.gIdV5TNEP06r6r2Y"}}} +{"_id":"IxDE0tAziZHksq4K","name":"Cone 5","type":"script","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_cone.svg","scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Cone\",\n val: 5,\n}).placeTemplate()\n .then(t => {\n if (t) game.lancer.targetsFromTemplate(t.id);\n }\n);","folder":null,"sort":0,"permission":{"default":0,"EezUQWe7dZJO5vje":3},"flags":{"core":{"sourceId":"Macro.WEVUv6dRfykovJvi"}}} +{"_id":"SNtUHejVtmF2lU7g","name":"Cone 7","type":"script","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_cone.svg","scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Cone\",\n val: 7,\n}).placeTemplate()\n .then(t => {\n if (t) game.lancer.targetsFromTemplate(t.id);\n }\n);","folder":null,"sort":0,"permission":{"default":0,"EezUQWe7dZJO5vje":3},"flags":{"core":{"sourceId":"Macro.ygDDlW5ivDvVwrvL"}}} +{"_id":"DCJrD2GG1Tbxe30b","name":"Line 10","type":"script","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_line.svg","scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Line\",\n val: 10,\n}).placeTemplate()\n .then(t => {\n if (t) game.lancer.targetsFromTemplate(t.id);\n }\n);","folder":null,"sort":0,"permission":{"default":0,"EezUQWe7dZJO5vje":3},"flags":{"core":{"sourceId":"Macro.f1l5GSkj9zZMgF1Q"}}} +{"_id":"Pn1xlHQOakdCBGKb","name":"Line 20","type":"script","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_line.svg","scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Line\",\n val: 20,\n}).placeTemplate()\n .then(t => {\n if (t) game.lancer.targetsFromTemplate(t.id);\n }\n);","folder":null,"sort":0,"permission":{"default":0,"EezUQWe7dZJO5vje":3},"flags":{"core":{"sourceId":"Macro.YdVgbXwte6NJpSrp"}}} +{"_id":"NA1cLM6G7mt4osJp","name":"Line 3","type":"script","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_line.svg","scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Line\",\n val: 3,\n}).placeTemplate()\n .then(t => {\n if (t) game.lancer.targetsFromTemplate(t.id);\n }\n);","folder":null,"sort":0,"permission":{"default":0,"EezUQWe7dZJO5vje":3},"flags":{"core":{"sourceId":"Macro.e5alJsYqZqj03u36"}}} +{"_id":"TEExiN3uSjXtT44m","name":"Line 5","type":"script","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_line.svg","scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Line\",\n val: 5,\n}).placeTemplate()\n .then(t => {\n if (t) game.lancer.targetsFromTemplate(t.id);\n }\n);","folder":null,"sort":0,"permission":{"default":0,"EezUQWe7dZJO5vje":3},"flags":{"core":{"sourceId":"Macro.dADNo2jhTX1eGiuH"}}} +{"_id":"FggsQDnGA7vyKjC6","name":"Line 8","type":"script","author":"EezUQWe7dZJO5vje","img":"systems/lancer/assets/icons/macro-icons/aoe_line.svg","scope":"global","command":"game.lancer.canvas.WeaponRangeTemplate.fromRange({\n type: \"Line\",\n val: 8,\n}).placeTemplate()\n .then(t => {\n if (t) game.lancer.targetsFromTemplate(t.id);\n }\n);","folder":null,"sort":0,"permission":{"default":0,"EezUQWe7dZJO5vje":3},"flags":{"core":{"sourceId":"Macro.7hVsS8JBtcsb0LbG"}}} diff --git a/src/lancer.ts b/src/lancer.ts index 5764f021c..98c64ac7d 100644 --- a/src/lancer.ts +++ b/src/lancer.ts @@ -481,13 +481,16 @@ Hooks.once("init", async function () { // ------------------------------------------------------------------------ // Sliding HUD Zone, including accuracy/difficulty window Hooks.on('renderHeadsUpDisplay', slidingHUD.attach); - Hooks.on('targetToken', (_user: User, _token: Token, isNewTarget: boolean) => { - macros.refreshTargeting(isNewTarget ? "may open new window" : "only refresh open window"); + let openingBasicAttackLock = false; + Hooks.on('targetToken', (user: User, _token: Token, isNewTarget: boolean) => { + if (user.isSelf && isNewTarget && !openingBasicAttackLock) { + // this only works because openBasicAttack is a promise and runs on a future tick + openingBasicAttackLock = true; + macros.openBasicAttack().finally(() => { + openingBasicAttackLock = false; + }); + } }); - Hooks.on('createActiveEffect', () => macros.refreshTargeting("only refresh open window")); - Hooks.on('deleteActiveEffect', () => macros.refreshTargeting("only refresh open window")); - // updateToken triggers on things like token movement (spotter) and probably a lot of other things - Hooks.on('updateToken', () => macros.refreshTargeting("only refresh open window")); }); // TODO: either remove when sanity check is no longer needed, or find a better home. diff --git a/src/module/actor/lancer-actor-sheet.ts b/src/module/actor/lancer-actor-sheet.ts index 4451c61c6..3f02b1b3f 100644 --- a/src/module/actor/lancer-actor-sheet.ts +++ b/src/module/actor/lancer-actor-sheet.ts @@ -334,7 +334,9 @@ export class LancerActorSheet extends ActorSheet< if (!item) return ui.notifications!.warn(`Error rolling macro: Couldn't find weapon with ID ${weaponId}.`); const weapon = item; - prepareItemMacro(this.actor.id!, weapon.id!); + // @ts-ignore + let id = this.token ? this.token.id : this.actor.id!; + prepareItemMacro(id, weapon.id!); }); // TODO: This should really just be a single item-macro class diff --git a/src/module/actor/npc-sheet.ts b/src/module/actor/npc-sheet.ts index 7caebcfc1..e7f33b527 100644 --- a/src/module/actor/npc-sheet.ts +++ b/src/module/actor/npc-sheet.ts @@ -54,8 +54,9 @@ export class LancerNPCSheet extends LancerActorSheet { ev.stopPropagation(); // Avoids triggering parent event handlers const el = $(ev.currentTarget).closest(".item")[0] as HTMLElement; - - prepareItemMacro(this.actor.id!, el.getAttribute("data-id")).then(); + // @ts-ignore + let id = this.token ? this.token.id : this.actor.id!; + prepareItemMacro(id, el.getAttribute("data-id")).then(); }); // Stat rollers @@ -74,8 +75,10 @@ export class LancerNPCSheet extends LancerActorSheet { bonus: statInput.value, }; + // @ts-ignore + let id = this.token ? this.token.id : this.actor.id!; console.log(`${lp} Rolling ${mData.title} check, bonus: ${mData.bonus}`); - prepareStatMacro(this.actor.id!, this.getStatPath(ev)!); + prepareStatMacro(id, this.getStatPath(ev)!); }); // Trigger rollers @@ -88,7 +91,9 @@ export class LancerNPCSheet extends LancerActorSheet { ev.stopPropagation(); const techElement = $(ev.currentTarget).closest(".item")[0] as HTMLElement; let techId = techElement.getAttribute("data-id"); - prepareItemMacro(this.actor.id!, techId!); + // @ts-ignore + let id = this.token ? this.token.id : this.actor.id!; + prepareItemMacro(id, techId!); }); // Item/Macroable Dragging diff --git a/src/module/helpers/acc_diff/Form.svelte b/src/module/helpers/acc_diff/Form.svelte index ff1643f78..fa323c7a3 100644 --- a/src/module/helpers/acc_diff/Form.svelte +++ b/src/module/helpers/acc_diff/Form.svelte @@ -12,12 +12,17 @@ import ConsumeLockOn from './ConsumeLockOn.svelte'; import Total from './Total.svelte'; import PlusMinusInput from './PlusMinusInput.svelte'; + import type { LancerItem } from '../../item/lancer-item'; + import { RangeType } from 'machine-mind'; + import { WeaponRangeTemplate } from '../../pixi/weapon-range-template'; + import { fade } from '../slidinghud'; + import { targetsFromTemplate } from '../../macros'; export let weapon: AccDiffWeapon; export let base: AccDiffBase; export let targets: AccDiffTarget[]; export let title: string; - export const lancerItem: any | null = null; + export let lancerItem: LancerItem | null; export let kind: "hase" | "attack"; @@ -42,6 +47,36 @@ window.addEventListener('keydown', escHandler); return { destroy() { window.removeEventListener('keydown', escHandler); } } } + + function findRanges() { + return lancerItem?.rangesFor([ + RangeType.Blast, + RangeType.Burst, + RangeType.Cone, + RangeType.Line, + ]) ?? []; + } + + function deployTemplate(range: WeaponRangeTemplate['range']) { + const creator = lancerItem?.parent; + const token = ( + creator?.token?.object ?? + creator?.getActiveTokens().shift() ?? + undefined + ) as Token | undefined; + const t = WeaponRangeTemplate.fromRange(range, token); + if (!t) return; + fade('out'); + t.placeTemplate() + .catch(e => { + console.warn(e); + return; + }) + .then(t => { + if (t) targetsFromTemplate(t.id!); + fade('in'); + }); + }
{#if kind == "attack"} + {#if lancerItem} + {#each findRanges() as range} + + {/each} + {/if} {:else if kind == "hase"} {/if} @@ -228,7 +274,7 @@
- diff --git a/src/module/helpers/acc_diff/invisibility.ts b/src/module/helpers/acc_diff/invisibility.ts index 06ead8417..1914fa81d 100644 --- a/src/module/helpers/acc_diff/invisibility.ts +++ b/src/module/helpers/acc_diff/invisibility.ts @@ -100,6 +100,8 @@ export default class Invisibility implements AccDiffCheckboxPluginData { return roll; } } + + readonly rollPrecedence = -9999; // after _everything_ } // to check whether the static methods match the interface diff --git a/src/module/helpers/acc_diff/plugin.d.ts b/src/module/helpers/acc_diff/plugin.d.ts index 5b604605c..2be9bea54 100644 --- a/src/module/helpers/acc_diff/plugin.d.ts +++ b/src/module/helpers/acc_diff/plugin.d.ts @@ -29,6 +29,7 @@ type UIBehaviour = CheckboxUI | NoUI; declare interface RollModifier { modifyRoll(roll: string): string + get rollPrecedence(): number // higher numbers happen earlier } declare interface Dehydrated { diff --git a/src/module/helpers/acc_diff/spotter.ts b/src/module/helpers/acc_diff/spotter.ts index 39b784070..a2730eef4 100644 --- a/src/module/helpers/acc_diff/spotter.ts +++ b/src/module/helpers/acc_diff/spotter.ts @@ -3,6 +3,7 @@ import type { AccDiffPlugin, AccDiffPluginData } from "./plugin"; import type { AccDiffData, AccDiffTarget } from "./index"; import type { LancerActor } from "../../actor/lancer-actor"; import type { Mech, Pilot } from "machine-mind"; +import type { LancerToken } from "../../token"; // this is an example of a case implemented without defining a full class function adjacentSpotter(actor: LancerActor): boolean { @@ -11,24 +12,25 @@ function adjacentSpotter(actor: LancerActor): boolean { return false; } - // this isn't adjacency, it's "is within range 1 LOS with a hack for larger mechs", but it's good enough - // computation taken from sensor-sight - let radius = actor.data.data.derived.mm!.Size; - let token = actor.getActiveTokens()[0]; - // TODO: TYPECHECK: center does always seem to exist on this thing ts thinks is a LancerTokenDocument - let point = (token as any).center; + // computation shamelessly stolen from sensor-sight - function inRange(token: { x: number; y: number }) { - const range = Math.sqrt((token.x - point.x) * (token.x - point.x) + (token.y - point.y) * (token.y - point.y)); - const scale = canvas!.scene!.data.gridType > 1 ? Math.sqrt(3) / 2 : 1; // for hexes - const grid = canvas!.scene!.data.grid; - return (radius + 0.01) * grid * scale > range; + // TODO: report this as a bug to league-types + let token: LancerToken = actor.getActiveTokens()[0] as unknown as LancerToken; + + const spaces = token.getOccupiedSpaces("updated position"); + function adjacent(token: LancerToken) { + const otherSpaces = token.getOccupiedSpaces("updated position"); + const rays = spaces.flatMap(s => otherSpaces.map(t => ({ ray: new Ray(s, t) }))); + const min_d = Math.min( + ...canvas.grid!.grid!.measureDistances(rays, { gridSpaces: true }) + ); + return min_d < 1.1; } // TODO: TYPECHECK: all of this seems to work - let adjacentPilots = (canvas!.tokens!.objects!.children as Token[]) - .filter((t: Token) => t.actor?.is_mech() && inRange((t as any).center) && t.id != token.id) - .map((t: Token) => (t.actor!.data.data.derived.mm! as Mech).Pilot); + let adjacentPilots = (canvas!.tokens!.objects!.children as LancerToken[]) + .filter((t: LancerToken) => t.actor?.is_mech() && adjacent(t) && t.id != token.id) + .map((t: LancerToken) => (t.actor!.data.data.derived.mm! as Mech).Pilot); return !!adjacentPilots.find((p: Pilot | null) => p?.Talents.find(t => t.LID == "t_spotter")); } @@ -52,11 +54,12 @@ function spotter(): AccDiffPluginData { }, modifyRoll(roll: string) { if (this.uiState) { - return roll.replace("1d20", "2d20kh1[spotter]"); + return `{${roll},${roll}}kh[🎯 spotter]`; } else { return roll; } }, + rollPrecedence: -100, // after numeric modifiers hydrate(data: AccDiffData, target?: AccDiffTarget) { this.actor = data.lancerActor || null; this.target = target || null; diff --git a/src/module/helpers/compcon-login-form.ts b/src/module/helpers/compcon-login-form.ts index 892739d2d..12f66b47e 100644 --- a/src/module/helpers/compcon-login-form.ts +++ b/src/module/helpers/compcon-login-form.ts @@ -30,7 +30,11 @@ export default class CompconLoginForm extends FormApplication { populatePilotCache(); return this.close(); } catch (e) { - ui.notifications!.error(`Could not log in to Comp/Con: ${e}`); + if (e instanceof Error) { + ui.notifications!.error(`Could not log in to Comp/Con: ${e.message}`); + } else { + ui.notifications!.error(`Could not log in to Comp/Con: ${e}`); + } } } } diff --git a/src/module/helpers/refs.ts b/src/module/helpers/refs.ts index 00196b634..a805f6e52 100644 --- a/src/module/helpers/refs.ts +++ b/src/module/helpers/refs.ts @@ -299,10 +299,7 @@ export function editable_mm_ref_list_item( iconPath: `systems/${game.system.id}/assets/icons/macro-icons/mech_system.svg`, title: sys.Name, fn: "prepareItemMacro", - args: [ - sys.Flags.orig_doc.actor?.id ?? "", - sys.Flags.orig_doc.id - ] + args: [sys.Flags.orig_doc.actor?.id ?? "", sys.Flags.orig_doc.id], }; let limited = ""; @@ -348,14 +345,12 @@ export function editable_mm_ref_list_item(