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 .
×

Bloodied in macro [DD4]

Hi, My character is a Dragonborn and when i'm in bloodied state I have a bonus of +1 on my attack roll. I'd like to add a line in all my attack macro which compare my bloodied and my max hp and IF my current HP is under or equal to my bloodied THEN it's make a +1 on my attack roll. I've found how to get my bloodied value and check the value of my token hp bar but I don't found how to compare it : [[@{hp-bloodied}>@{selected|bar1}]] I'd like to add it in my macro, like : /me use @{power-100-name} [[1d20+@{power-100-attack}+(macro compare, if equal or under +1 else +0)]] vs @{power-100-def} Hit: [[(1*@{power-100-weapon-num-dice})d@{power-100-weapon-dice}+@{power-100-damage}]] Damage(s)
1479038817

Edited 1479074094
Tetsuo
Forum Champion
Try this: [[1d20+@{power-100-attack}+[[{1d0+@{selected|bar1}}<[[floor(@{selected|bar1|max}/2)]] ]] ]]
1479054816

Edited 1479054859
Franky H. said: { 1d1 +@{selected|bar1}}<[[...]] Probably want d0 there instead of d1.
1479074071

Edited 1479074119
Tetsuo
Forum Champion
Silvyre said: Franky H. said: { 1d1 +@{selected|bar1}}<[[...]] Probably want d0 there instead of d1. Good catch! I was half asleep. Fixed! =D
Thank you, really, it's working. :) In the same way, im a Warrior with a +2 damage bonus when I have temporary HP. Could you give me something that look my bar2 (which is the bar where i fill my temporary hp) and if it's more than 0 it's make "+2"?
1479507940
Tetsuo
Forum Champion
Kay'Zel said: Thank you, really, it's working. :) In the same way, im a Warrior with a +2 damage bonus when I have temporary HP. Could you give me something that look my bar2 (which is the bar where i fill my temporary hp) and if it's more than 0 it's make "+2"? put this in where you want the 0 or 2 to appear: [[{{[[@{selected|bar2}]],[[0-1]]}>[[0+1]]}*(2-0) + 0]]
Franky H. said: Kay'Zel said: Thank you, really, it's working. :) In the same way, im a Warrior with a +2 damage bonus when I have temporary HP. Could you give me something that look my bar2 (which is the bar where i fill my temporary hp) and if it's more than 0 it's make "+2"? put this in where you want the 0 or 2 to appear: [[{{[[@{selected|bar2}]],[[0-1]]}>[[0+1]]}*(2-0) + 0]] Thank you, you are a god ! :p I'd like to understand those lines, how to compare by myself and edit my own macro by the futur. :) Thanks again.
1479537394
Tetsuo
Forum Champion
Kay'Zel said: Franky H. said: Kay'Zel said: Thank you, really, it's working. :) In the same way, im a Warrior with a +2 damage bonus when I have temporary HP. Could you give me something that look my bar2 (which is the bar where i fill my temporary hp) and if it's more than 0 it's make "+2"? put this in where you want the 0 or 2 to appear: [[{{[[@{selected|bar2}]],[[0-1]]}>[[0+1]]}*(2-0) + 0]] Thank you, you are a god ! :p I'd like to understand those lines, how to compare by myself and edit my own macro by the futur. :) Thanks again. Even simpler version:  [[ {@{selected|bar2}>[[1]]}*2 ]] If bar2 is equal to or greater than 1, it returns 1*2. If bar 2 is 0 or less, it returnes 0*2.