Add the macros for the mini-gun

This commit is contained in:
Oliver-Akins 2025-07-05 23:40:06 -06:00
parent f6b704dffd
commit 6de3a2d2f4
2 changed files with 24 additions and 0 deletions

View file

@ -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: `<p>Removed ${reduceBy} Heat.</p><p>Current Heat total after removal: ${reducedHeat}</p>`,
},
);
await ChatMessage.implementation.create(chatData);