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

How to have !Power script lower both bar1 hit points AND its max hit points

Im using powercards to auto lower hit points upon a Draining Kiss attack by a Succubus.  The following script works great for lowering the hit points upon either a save or failed constitution save. How can I also cause it to lower the max hit points of the target? !power {{  --name|Draining Kiss --leftsub|  --rightsub|  --soundfx|_audio,play,nomenu|Kiss  --DC:|[[ [$DC] 0d0+8+@{selected|Charisma_mod}+@{selected|pb} ]] vs Saving Throw [[ [$ST] 1d20cf<0cs>20+@{target|Constitution_Save_Bonus}+?{Add extra saving throw bonus' for target here|0} ]]  --?? $DC > $ST ?? Damage:|[[ [$Dmg] floor((5d10cf<0cs>21+@{selected|charisma_mod})*?{If target has resistance to PSYCHIC then .5|1}) ]] ``psychic`` damage!  --?? $DC < $ST ?? Damage:|[[ [$DmgS] floor((5d5cf<0cs>21+@{selected|charisma_mod})*?{If target has resistance to PSYCHIC then .5|1}) ]] ``psychic`` damage!  --?? $DC > $ST ?? alterbar1|_target|@{target|token_id} _bar|1 _amount|-[^Dmg] _show|all  --?? $DC < $ST ?? alterbar1|_target|@{target|token_id} _bar|1 _amount|-[^DmgS] _show|all }}
1692739759
GiGs
Pro
Sheet Author
API Scripter
There's a power card thread. You should ask in there, as your post is guaranteed to be seen by people familiar with the syntax. Also, you might consider switching to the ScriptCard scri[t. It is by the same developer, but is more modern and might have better syntax.