Damage based on states

Here's my issue: I'm trying to make an attack to more damage if a foe is poisoned (state 55) or severely poisoned (state 56). This is what I have in my damage formula:

b.states.include?(55,56) ? (a.atk * 5 - b.def * 2) : (a.atk * 3 - b.def * 2)

But regardless of if the foe is poisoned it still does no damage. Can anyone help?
Looks like your syntax is wrong. Checking for an actor to have a state would be b.state?(id), so (knowing zero Ruby, just quickly Googling) I think you'd do:
Code:
b.state?(55) || b.state?(56) ? a.atk*5-b.def*2 : a.atk*3-b.def*2
Looks like your syntax is wrong. Checking for an actor to have a state would be b.state?(id), so (knowing zero Ruby, just quickly Googling) I think you'd do:
Code:
b.state?(55) || b.state?(56) ? a.atk*5-b.def*2 : a.atk*3-b.def*2
There we go, thanks! Where did you find that btw?
I Googled "RPG Maker VX Ace check state"
if b.state?(55); a.atk*3-b.def*2; elsif b.state?(56); a.atk*5-b.def*2; else; a.atk*2-b.def*2; end
works like this,
if poison *3 elsif poison *5 else *2 end

Original thread: https://forums.rpgmakerweb.com/threads/damage-based-on-states.134474/