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

API - Taking Temp HP before HP when taking damage through Powerbars/ACT/TokenMod

Hi, I'm kinda new to this so I have a couple of questions. 1. First targeting Temp HP and then HP Below is the script that I have for a damage macro for some attack of characters, any suggestions on how to go around multiple "IF" loops just to go to temp HP and then HP: !power {{  --name|Fist  --leftsub|Melee Attack  --rightsub|5 ft. Range  --Attack:|[[ [$Atk] ?{Attack|Standard,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{dexterity_mod} + @{pb}]] vs AC @{target|AC}  --?? $Atk >= @{target|AC} AND $Atk.base <> 20 ?? Damage:|[[ [$Dmg] 1d4 + @{dexterity_mod} ]] Bludgeoning  --?? $Atk.base == 20 ?? Critical Hit|[[ [$CritDmg] 2d4 + @{dexterity_mod} ]] Bludgeoning  --?? $Atk >= @{target|AC} AND $Atk.base <> 20 ?? alterbar1|_target|@{target|token_id} _bar|1 _amount|-[^Dmg] _show|all  --?? $Atk.base == 20 ?? alterbar1|_target|@{target|token_id} _bar|1 _amount|-[^CritDmg] _show|all }} 2. How do I set up multiple questions/results for variables. In this example I have a curse of binding which can be amplified so can you suggest on how to add the amplify prompt and branch accordingly: !power {{  --name|Blood Curse of Binding  --leftsub|Ability  --rightsub|30 ft. Range  --Attack:|[[ [$Atk] ?{Attack|Standard,1d20|Advantage,2d20kh1|Disadvantage,2d20kl1} + @{target|strength_mod}]] vs DC [[8 + @{selected|pb} + @{selected|constitution_mod}]]  --?? $Atk < [[8 + @{selected|pb} + @{selected|constitution_mod}]] ?? Binded:| The cursed creature’s speed is reduced to 0 and it can’t use reactions until the end of your next turn.  --?? $Atk <= [[8 + @{selected|pb} + @{selected|constitution_mod}]] ?? vfx_opt|@{target|target|token_id} burst-death  --?? $Atk <= [[8 + @{selected|pb} + @{selected|constitution_mod}]] ?? api_token-mod|_ids @{target|token_id} _ignore-selected _set statusmarkers|snail }} 3. How do I enable and disable the global damage modifier through the script? I couldn't find any tags that would enable the global dmg mod like crimson rite, below is the example of the code i have now which only deals damage to the player: !power {{  --name|Crimson Rite  --leftsub|Ability  --rightsub|Blood Hunter  --Damage:|[[ [$Dmg] 1d4]] Necrotic  --alterbar1|_target|@{selected|token_id} _bar|1 _amount|-[^Dmg] _show|all }} I have further questions also but for start any help with the above would be super apriciated!
1691101356
GiGs
Pro
Sheet Author
API Scripter
Since this is a PowerCards question, you'd be best advised to find the thread devoted to that script and asking in there. That'll ensure it'll be seen by people familair with the syntax.