I know how to check if a state is present, and if it is, to add another state e.g.
if b.state?(29); then; b.add_state(49); end;
and had thought that the same structure would apply for checking if a debuff is present, and if it is, then adding another one, lasting 6 turns. So I have
if b.debuff?(3); then; b.add_debuff(2, 6); end;
but that doesn't work. Does anyone know what the syntax should be?
Thank you.
Yes you are right I could do that, and if no other option is available that is what I'll do. But I was hoping to save a lot of time, as I've already used debuffs in several places and didn't want to have to go back and find them all to change them. It's so easy to miss some.
Apparently the problem is just in the condition, right? If you only use add_debuff (param_id, turns), does it work? If I'm not mistaken, the script that handles this data is the Game_Battler. I'm looking for how it recognizes debuffs already applied, but as I do not know how to program I need to go testing command by command to know what it is. As soon as I find I edit the comment here.
Yes, the condition seems to be the issue. I have no problem using the add-debuff on its own, and in fact use it quite extensively.
It might be better to do a new post - edits to existing posts don't show up as notifications, so I might miss your amendment.
You are a star! I'd forgotten about the debuff IDs starting at zero.
Thank you so much for your time and trouble. I am very grateful.
You are welcome. And, helping you, I learned a little about these commands in the damage calculations. 😂
So, a win-win then, which is nice.
Thread closed IgnoreMe