From 6de3a2d2f4dce1a7f728b8e1f8bbb60813cfd2ee Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 5 Jul 2025 23:40:06 -0600 Subject: [PATCH] Add the macros for the mini-gun --- Axolotl-with-a-Gun/guns/mini-gun/steam-vent.mjs | 9 +++++++++ Axolotl-with-a-Gun/guns/mini-gun/unstoppable.mjs | 15 +++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 Axolotl-with-a-Gun/guns/mini-gun/steam-vent.mjs create mode 100644 Axolotl-with-a-Gun/guns/mini-gun/unstoppable.mjs diff --git a/Axolotl-with-a-Gun/guns/mini-gun/steam-vent.mjs b/Axolotl-with-a-Gun/guns/mini-gun/steam-vent.mjs new file mode 100644 index 0000000..21b47ed --- /dev/null +++ b/Axolotl-with-a-Gun/guns/mini-gun/steam-vent.mjs @@ -0,0 +1,9 @@ +const heat = game.user.getFlag(`world`, `heatMeter`); +game.user.setFlag(`world`, `heatMeter`, 0); +const chatData = ChatMessage.applyRollMode( + { + content: `

Vented ${heat} heat, and can gain that much GUN or AXOLOTL

`, + }, +); + +await ChatMessage.implementation.create(chatData); diff --git a/Axolotl-with-a-Gun/guns/mini-gun/unstoppable.mjs b/Axolotl-with-a-Gun/guns/mini-gun/unstoppable.mjs new file mode 100644 index 0000000..2c2ef14 --- /dev/null +++ b/Axolotl-with-a-Gun/guns/mini-gun/unstoppable.mjs @@ -0,0 +1,15 @@ +const heat = game.user.getFlag(`world`, `heatMeter`) ?? 0; + +let r = new Roll(`1d6`); +await r.evaluate(); +const reduceBy = r.total; + +const reducedHeat = Math.max(0, heat - reduceBy); +game.user.setFlag(`world`, `heatMeter`, reducedHeat); + +const chatData = ChatMessage.applyRollMode( + { + content: `

Removed ${reduceBy} Heat.

Current Heat total after removal: ${reducedHeat}

`, + }, +); +await ChatMessage.implementation.create(chatData);