
Greetings everyone,
I have recently discovered PowerCards and a series of tutorial that helped me understand the basics of this amazing and very potent script. Until then, I was using the regular R20 Template since I am running games on a custom system and have no real knowledge in programming. I know a bit of HTML but no Javascript at all, even though I have become pretty knowledgeable in using the macro system of Roll20.
That being said,
In my games, I am using ChatSetAttr to automatically remove Mana (or Ressource) from my spellcasters, manage other ressources ,etc...
While my current system still works with the addition of Powercards, I was wondering if it could be possible to use ChatSetAttr (or any other system) to do "damaging" attacks and spells. This is currently a base exemple of one powercard that I'm using :
!power {{ --name|Burning Strike --format|Gurr --Ability:|Combat --Roll:|[[ [$Roll]1D20]] + [[@{Gurr|Strength}+@{Gurr|Proficiency}]] --?? $Roll.base < @{Gurr|Critical} ?? Damage:|[[@{Gurr|WeapPhy}+14+@{Gurr|ATTACK}]] Fire damage
--?? $Roll.base == @{Gurr|Critical} AND $Roll.base <> 20 ?? Critical damage:|[[(round((@{Gurr|WeapPhy}+14+@{Gurr|ATTACK})*1.5))]] Fire damage
--?? $Roll.base == 20 ?? Critical success damage:|[[(round((@{Gurr|WeapPhy}+14+@{Gurr|ATTACK})*2))]] Fire damage
--Effect|[irrelevant] --Action Point:|1 --Cost:|[[40]] Energy --Available:|Turn [[@{tracker|Current Turn}+3]] }} !modbattr --silent --name Gurr --Energy|-40
TL;DR : in this system, characters can critically hit in two different ways, first by meeting a threshold that is set by their gear/stats, which multiplies total damage by x1,5 and then by doing a regular natural 20 that doubles the damage x2.
Right now as you can see, the character Gurr is using 40 Energy to use this Ability, but I would also like to automatically be able to deal damage to enemies, based on the roll.
Basically, each damage would be registered as [$Dmg], [$CritDmg] and [$CritSuccessDMG] and then that would be dealt to the @{target|HP} in some way.
I have spent 3-4 hours trying to figure this out yesterday with no success whatsoever and I have come here in desperation.
Can anyone provide help or tips to make this work ?
Thank you in advance,
Boris.