Skip to content

Instantly share code, notes, and snippets.

@jcjones
Last active August 16, 2021 01:15
Show Gist options
  • Save jcjones/e6b37e2078a7506e360ef05ee81f395e to your computer and use it in GitHub Desktop.
Save jcjones/e6b37e2078a7506e360ef05ee81f395e to your computer and use it in GitHub Desktop.
Foundry VTT Macros - Forge Cleric
let targets = Array.from(game.user.targets)
if (targets.length == 1) {
target_data = `<div><img src="${targets[0].actor.img}" height="30" style="border:0px"/>${targets[0].actor.name}</div>`
} else {
target_data = "Flames leap"
}
ChatMessage.create({
user: game.user._id,
speaker: ChatMessage.getSpeaker({token: actor}),
content: target_data,
flavor: `Searing Smite DC ${game.user.character.data.data.abilities["wis"].dc} Constitution Saving Throw`,
});
let roll = new Roll(`1d6[fire]`).evaluate()
roll.toMessage({
flavor: "Searing Smite - Damage Roll (on fire)",
user: game.user._id,
speaker: ChatMessage.getSpeaker({token: actor})
})
let attack = new Roll(`1d20+${game.user.character.data.data.abilities["wis"].mod}+${game.user.character.data.data.abilities["wis"].prof}`).evaluate()
attack.toMessage({
flavor: "Cog of Gond - Attack Roll",
user: game.user._id,
speaker: ChatMessage.getSpeaker({token: actor})
})
let damage = new Roll(`1d8[force]+${game.user.character.data.data.abilities["wis"].mod}`).evaluate()
damage.toMessage({
flavor: "Cog of Gond - Damage Roll (Force)",
user: game.user._id,
speaker: ChatMessage.getSpeaker({token: actor})
})
let targets = Array.from(game.user.targets)
if (targets.length == 1) {
target_data = `<div><img src="${targets[0].actor.img}" height="30" style="border:0px"/>${targets[0].actor.name}</div>`
} else {
target_data = "The bells toll"
}
ChatMessage.create({
user: game.user._id,
speaker: ChatMessage.getSpeaker({token: actor}),
content: target_data,
flavor: `Toll the Dead DC ${game.user.character.data.data.abilities["wis"].dc} Wisdom Saving Throw`,
});
let roll = new Roll(`1d12[necrotic]`).evaluate()
roll.toMessage({
flavor: "Toll the Dead vs. Injured Foe - Damage Roll",
user: game.user._id,
speaker: ChatMessage.getSpeaker({token: actor})
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment