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

wpn macro for a weapon that had different bonuses vs different mobs

Is there a way to make a simple macro that will output the attack roll and dmg roll of a weapon that has multiple bonuses, such as a 1st edition AD&D Flamtoungue wpn? which is Sword + 1, Flame Tongue, +2 VS. regenerating creatures, + 3 VS. cold using, inflammable, or avian creatures, +4 vs. undead, The best I can come up with is separate rolls in the same macro, but I was wondering if there was a way to have 1 inline roll for to hit that would output the different results based on one inline roll [[1d20]] such as To hit roll normal : 17 To hit roll Regenerating:18 To hit roll Cold Using:19 to Hit roll Undead:20 assuming the aforementioned inline roll was 17
OK - you can do this, but it will require a lot of work for you.  You need to go to every critter, and give them some custom attributes, Such as regenerator, cold user, undead, and if these creatures are of those types, put a 1 in those attributes. Then your attack token can have your to hit roll, and you can query selected token regenerator attribute, and multiply it by the requisite hit bonus.  Just include that in your sum of hit modifiers right alongside strength and level mods.  Voila, one hit macro, that you can target at a token, and it will pull down all the right bonuses. But wait, there is more, your flame tongue only gets to use the highest of these bonuses, so you stick all these bonuses in a keep highest determination. I'll leave it to you to look up all the syntax for the various functions you'll need.
1527122599

Edited 1527122669
Bast L.
API Scripter
Maybe something like this works (drop down selection for target type): &{template:default} {{name=Flametongue}} {{to hit: [[1d20 + ?{Target Type|Normal, 0|Regenerating, 1|Cold/Avian/Inflammable, 2|Undead, 3}]]}} {{damage: [[1d8 + 1d6]]}} Or simply have the output mention the bonus for the target types, and leave it to the GM to pay attention.