add macro for smite
This commit is contained in:
parent
53251997b3
commit
bc882b7747
69
macros/BR2_actions.json
Normal file
69
macros/BR2_actions.json
Normal file
@ -0,0 +1,69 @@
|
||||
{
|
||||
"id": "Smite",
|
||||
"name": "Smite",
|
||||
"button_name": "Smite Bonus",
|
||||
"dmgMod": "+2",
|
||||
"defaultChecked": true,
|
||||
"and_selector": [
|
||||
{
|
||||
"not_selector": [
|
||||
{
|
||||
"selector_type": "actor_has_effect",
|
||||
"selector_value": "Smite with raise"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"selector_type": "actor_has_effect",
|
||||
"selector_value": "Smite"
|
||||
},
|
||||
{
|
||||
"or_selector": [
|
||||
{
|
||||
"selector_type": "skill",
|
||||
"selector_value": "Fighting"
|
||||
},
|
||||
{
|
||||
"selector_type": "skill",
|
||||
"selector_value": "Athletics"
|
||||
},
|
||||
{
|
||||
"selector_type": "skill",
|
||||
"selector_value": "Shooting"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"group": "Spell Effects"
|
||||
}
|
||||
|
||||
{
|
||||
"id": "SmiteRaise",
|
||||
"name": "Smite with Raise",
|
||||
"button_name": "Smite Bonus",
|
||||
"dmgMod": "+4",
|
||||
"defaultChecked": true,
|
||||
"and_selector": [
|
||||
{
|
||||
"selector_type": "actor_has_effect",
|
||||
"selector_value": "Smite with raise",
|
||||
},
|
||||
{
|
||||
"or_selector": [
|
||||
{
|
||||
"selector_type": "skill",
|
||||
"selector_value": "Fighting"
|
||||
},
|
||||
{
|
||||
"selector_type": "skill",
|
||||
"selector_value": "Athletics"
|
||||
},
|
||||
{
|
||||
"selector_type": "skill",
|
||||
"selector_value": "Shooting"
|
||||
}
|
||||
]
|
||||
},
|
||||
],
|
||||
"group": "Spell Effects"
|
||||
}
|
||||
49
macros/SpellEffectRaiseSample.js
Normal file
49
macros/SpellEffectRaiseSample.js
Normal file
@ -0,0 +1,49 @@
|
||||
const targets = canvas.tokens.controlled;
|
||||
const extra = { flavor: "Sanctuary!" }
|
||||
const spellEffect = game.macros.getName("ApplySpellEffect");
|
||||
const label = "Smite";
|
||||
const id = "smite";
|
||||
const icon = "systems/swade/assets/icons/status/status_smite.svg";
|
||||
const duration = 5;
|
||||
|
||||
main();
|
||||
|
||||
async function main() {
|
||||
let effect = {
|
||||
changes: [
|
||||
],
|
||||
duration: { rounds: duration },
|
||||
icon: icon,
|
||||
label: label,
|
||||
id: id
|
||||
}
|
||||
|
||||
let applyChanges = false;
|
||||
let d = new Dialog({
|
||||
title: `Applying ${label} effects`,
|
||||
content: `Apply ${label} with raise?`,
|
||||
buttons: {
|
||||
raise: {
|
||||
icon: '<i class="fas fa-arrow-alt-circle-up"></i>',
|
||||
label: 'With raise',
|
||||
callback: () => {
|
||||
applyChanges = true;
|
||||
effect.label = effect.label + " with raise";
|
||||
}
|
||||
},
|
||||
noraise: {
|
||||
icon: '<i class="fas fa-arrow-alt-circle-right"></i>',
|
||||
label: 'Normal Success',
|
||||
callback: () => { applyChanges = true }
|
||||
}
|
||||
},
|
||||
default: "noraise",
|
||||
close: html => {
|
||||
if (applyChanges) {
|
||||
let value = await spellEffect.execute(effect, targets, extra);
|
||||
return value;
|
||||
}
|
||||
}
|
||||
});
|
||||
d.render(true);
|
||||
}
|
||||
6
macros/TODO.md
Normal file
6
macros/TODO.md
Normal file
@ -0,0 +1,6 @@
|
||||
# Spells
|
||||
|
||||
* [x] Smite
|
||||
* Protection
|
||||
* Boost/Lower Trait
|
||||
* Summon Ally
|
||||
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user