Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Copy paste this below your game.actors.get line for your actor
- if (a) {
- const negativeValue = getProperty(a, 'data.flags.pf2e.rollOptions.all.negative-spirit');
- const positiveValue = getProperty(a, 'data.flags.pf2e.rollOptions.all.positive-spirit');
- if(!negativeValue && positiveValue){
- a.update({'flags.pf2e.rollOptions.all.negative-spirit': false, 'flags.pf2e.rollOptions.all.positive-spirit': false});
- const regularImg = 'icons/equipment/hand/gauntlet-simple-leather-steel.webp';
- this.update({img:regularImg});
- }
- else if(negativeValue && !positiveValue){
- a.update({'flags.pf2e.rollOptions.all.negative-spirit': false, 'flags.pf2e.rollOptions.all.positive-spirit': true});
- const positiveImg = 'icons/magic/holy/prayer-hands-glowing-yellow.webp';
- this.update({img:positiveImg});
- }
- else{
- a.update({'flags.pf2e.rollOptions.all.negative-spirit': true, 'flags.pf2e.rollOptions.all.positive-spirit': false});
- const negativeImg = 'icons/magic/unholy/hands-praying-fire-green.webp';
- this.update({img:negativeImg});
- }
- } else {
- ui.notifications.error(game.i18n.localize('PF2E.MacroActionNoActorError'));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement