if(usr.Attack>usr.MMana||Defence)
switch(pick("Fire","Ice"))
if("Fire")
return
if("Ice")
return
if(usr.MMana>=usr.Attack||usr.MMana>=usr.Defence)
switch(pick("Poison"))
if("Poison")
usr.Poison=1
src.Magic_Type= "Poison"
return
if(usr.Mana>Attack||usr.MMana)
switch(pick("Earth","Heal"))
if("Earth")
return
if("Heal")
return
Problem description: As the title states I am trying to make it so that you are able to gain magic based on your highest stat.I thought the way I did it was completely right, but it is not working at all. I made sure to have my mana stat higher than both attack and defense yet I am not able to gain the magic type "Poison". Is there something I am missing?
using || makes the if statement true if either side is not null or 0.
I also don't know if you know but pick("Fire","Ice") will choose one at random, and if you're going to do it that way I would suggest doing something such as