#M&M Macros #4: Add +1 Hero Point

1 messages · Page 1 of 1 (latest)

obtuse elk
#

This Macro adds +1 Hero Point to the selected tokens totals.

#
//Add a Hero Point to Selected by honeybadger and Gazkhan - Jules; compiled by Devioushearts

//Required: Sequencer Module.
//Ensure you have all the file paths updated in order for this to run properly for the files the macro calls for.

// Get all selected tokens
const selectedTokens = canvas.tokens.controlled;

// Loop through each selected token
selectedTokens.forEach( tok => {
  // add +1 to Hero Points
tok.actor.update({'system.heroisme': tok.actor.system.heroisme + 1});

const hpstyle = {
    "fill": "blue",
    "stroke": "yellow",
    "fontFamily": "Arial Black",
    "fontSize": 28,
    "strokeThickness": 4
}

new Sequence()
   .effect()
      .atLocation(tok)
      .text("+1 HERO POINT!",hpstyle)
      .scaleIn(0, 500)
      .fadeOut(6000)
.play()

new Sequence()
.effect()
  .atLocation(tok)
  .file("/worlds/guardians-midwest/assets/images/Utility/Stars/Star3.webp") 
  .scale(.15)
  .filter("Glow", {distance: 5, outerStrength: 5, innerStrength: 0, color: 0xffffd4, quality: .5, knockout: false})
  .fadeIn(2500)
  .scaleIn(0, 2500,{ease:"easeOutCubic"})
  .animateProperty("sprite", "position.y", { from: 250, to: 0, duration: 500})
  .loopProperty("sprite", "scale.x", { values: [1, 1.1, 1], duration: 250, ease:"easeOutCubic", delay: 2500})
  .loopProperty("sprite", "scale.y", { values: [1, 1.1, 1], duration: 250, ease:"easeOutCubic", delay: 2500})
  .duration(4000)
.waitUntilFinished()

.effect()
.atLocation(tok)
.file("/worlds/guardians-midwest/assets/images/Utility/Stars/Star3.webp") 
.scale(.15)
.filter("Glow", {distance: 5, outerStrength: 5, innerStrength: 0, color: 0xffffd4, quality: .5, knockout: false})

.scaleOut(0, 2500, {ease:"easeInOutSine"})
.rotateOut(1800, 2500, {ease:"easeOutSine"})
.fadeOut(2500, { delay: 0 })

.play();
});```
#

Here is the graphics file. This I created myself and give you permission to use it for this macro free, no worries. You will need to establish your file path. I might place a sound in the macro for later but I have not as of yet.

obtuse elk
#

Icon for your "Add a Hero Point" Macro