Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Frenzied bolt Macro

Hi all, I am trying to make a script card macro, or a macro in general for Frenzied bolt spell where I am getting stuck as to how to change the damage type each time and to make the bolt fire multiple times if the dice roll (without the mdifiers) is odd. when it bounces must make another attack roll, and if odd repeat etc. but the damage type changes each time it bounces. any hints/ help would be much appreciated. Thanks, Aaron.
1616371619

Edited 1616376772
David M.
Pro
API Scripter
I'm currently unable to get into any of my games due to some kind of outage, but something like the following might work. Warning: this is just air coding and completely untested, so there may be syntax errors peppered in there. It's basically just one big loop. You could add additional logic in there if you wanted to test against a specific target AC. This [hopefully] just keeps outputting att/dam based on the raw d20 roll so you would have to ignore anything after a miss. EDIT - modified to correct syntax errors: !scriptcards {{ --#title|Frenzied Bolt --=i|0 --:Loop| --=i|[$i]+1 --:INITIALIZE ROLLS| --=AttackBase|1d20 --=Attack|[$AttackBase][1d20] + ?{Modifier?|0}[MOD] --=Dam|3d8 --:CHECK DAMAGE TYPE| --=TypeRoll|1d10 --?[$TypeRoll.Total] -eq 1|>SetType;Acid --?[$TypeRoll.Total] -eq 2|>SetType;Cold --?[$TypeRoll.Total] -eq 3|>SetType;Fire --?[$TypeRoll.Total] -eq 4|>SetType;Force --?[$TypeRoll.Total] -eq 5|>SetType;Lightning --?[$TypeRoll.Total] -eq 6|>SetType;Necrotic --?[$TypeRoll.Total] -eq 7|>SetType;Poison --?[$TypeRoll.Total] -eq 8|>SetType;Psychic --?[$TypeRoll.Total] -eq 9|>SetType;Radiant --?[$TypeRoll.Total] -eq 10|>SetType;Thunder --:ATT-DAM OUTPUT| --+Attack [$i]|[$Attack] --+Damage [$i]|[$Dam] [&DamType] damage --:CHECK FOR BOLT LEAPING| Odd roll leaps --=Odd|[$AttackBase] % 2 --?[$Odd.Total] -eq 1|>BoltLeapsOutput --?[$Odd.Total] -eq 1|Loop --X|End macro --:PROCEDURES| --:SetType| --&DamType|[%1%] --<| --:BoltLeapsOutput| --+|[#990000][r]If the attack hits...the bolt leaps![/r][/#] --<| }}
Many thanks, I had managed to get the attack to roll...and bounce, but not check of the result was odd or even, nor had I figured out how to change the damage type for each attack. I'll have a sit and see if I can figure out how to end the macro having it test against AC, this will likely require a token selection for each bounce. I will figure out Script cards, someday...I swear I will.
1616376840

Edited 1616377307
David M.
Pro
API Scripter
Finally got into my game to test out. Had a couple syntax errors as expected. Corrected above. EDIT - if you want to compare against a target AC, you might have to output only one att/dam, then add a button to potentially fire the macro/ability again. Since you will have a variable amount of targets and they will depend on the output of your card, I don't think it will be easy (or even possible?) to have a single instance of the scriptcard able to handle everything. There is an information button described in the documentation that pauses the scriptcard to ask for more input, but it will not display anything prior to that, so you would have incomplete information to go on. Adding a normal button at the end of the output is probably how I would do it.
I get you, so put in a question Did the bolt hit? Yes / No. "Yes" outputs damage and damage type, and checks for the bolt leaping. no ends the script. Rinse and repeat. Grand thanks, I'll have a look at that.