Essentially, I'm trying to make a buff skill that when used on a party member, gives them a state that's specific to their class. I tried doing this in the damage formula:
It throws an error when I use it in-game, citing the entirety of the battle formula. Perhaps not very surprising, considering the battle formula is one basic thing repeated numerous times.
Still, it's the gist of what I'm trying to accomplish and I'd love any help I can get on the matter.
I confess that I've never did anything like this, but it's supposed to be one big string of else-if's, where it applies, just for sake of example, State 1 if the targets Class is 1, if not, it applies State 2 if the targets class is 2, if not, it applies State 3 if the targets class is 3, etc. etc.
I did some googling on it and found plenty of examples on handling an else statement, but less so on how to go about handling else-if's which I assume would be necessary for this.
Thanks for reading.
Code:
b.isClass(2)?b.addState(225):b.isClass(3)?b.addState(226):b.isClass(4)?b.addState(227):b.isClass(5)?b.addState(228):b.isClass(5)?b.addState(229):b.isClass(8)?b.addState(230):b.isClass(9)?b.addState(231):b.isClass(10)?b.addState(232):b.isClass(11)?b.addState(233):b.isClass(14)?b.addState(234):b.isClass(15)?b.addState(235):b.isClass(16)?b.addState(236):b.isClass(17)?b.addState(237):b.isClass(20)?b.addState(238):b.isClass(21)?b.addState(239):b.isClass(24)?b.addState(240):b.isClass(25)?b.addState(241):b.isClass(26)?b.addState(242)
It throws an error when I use it in-game, citing the entirety of the battle formula. Perhaps not very surprising, considering the battle formula is one basic thing repeated numerous times.
Still, it's the gist of what I'm trying to accomplish and I'd love any help I can get on the matter.
I confess that I've never did anything like this, but it's supposed to be one big string of else-if's, where it applies, just for sake of example, State 1 if the targets Class is 1, if not, it applies State 2 if the targets class is 2, if not, it applies State 3 if the targets class is 3, etc. etc.
I did some googling on it and found plenty of examples on handling an else statement, but less so on how to go about handling else-if's which I assume would be necessary for this.
Thanks for reading.