Skill doing an "or" operation

Is it possible to have a skill do an or operation.  I want the state to cause either mp loss " or " hp loss....not at the same time as it does in this example.


This is spirit shackles skill type idea found on Yanfly's tip & tricks page with slight alteration.


<Pre-Damage Eval>


if (user.isStateAffected(45)) {


user.gainMp(-5) || user.gainHp(-100)


}


</Pre-Damage Eval>
Please give a link to the script you're using to process the notetag you gave in your example


I've moved this thread to Plugin support. Please be sure to post your threads in the correct forum next time. Thank you.
I'm not sure why the example encourages using the || operator like that since it doesn't really explain what the logic is, but this might work


Basically you generate a random number between 0 and 1, and then say there's a 50% chance of losing MP, or losing HP, but not both.
Thank-you, the skill is now working the way I intended it to.  Sorry I didn't mean to use || in the example.  It was a footnote to myself but you figured it out anyway.

Original thread: https://forums.rpgmakerweb.com/threads/skill-doing-an-or-operation.56761/