I have yanfly's Lunatic Damage script and I'm trying to figure out how to get it to recognize if the enemy has a state applied.
----
I'm fond of setting passive states to enemies that react to skills differently. For example, certain skills may auto-crit against targets with a certain weakness (set as a state) or may have a separate state applied to them if they have a certain state (for example, you have to be wet before you can be frozen).
The thing is that I'm using the luck stat directly in the formula to help determine whether or not the state is applied so I need a way to determine whether or not the target has a state on them before the formula applies.
I've had 2 skills that I've been able to find a workaround for (by actually typing the formula in the damage box and using the NORMAL FORMULA tag). However, this new one is too long for that. What compounds things is that the Lunatic Damage script doesn't work quite like it does in the editor (like I said, I can get the editor to recognize states).
----
here is my script. It's trying to determine whether the target will be frozen:
when /MagFrozen/i
value += c = 1+rand(100); d = ((a.luk * 2)- b.mdf);
if b.state ?(29) ? && if d >= c; b.add_state(30); else; 0; end;
I'm getting the error: unexpected tINTEGER, expecting keyword_then or ";" or '\n'
I've also tried it this way:
when /MagFrozen/i
value += c = 1+rand(100); d = ((a.luk * 2)- b.mdf);
if b.state ?(29) ? && if d >= c; b.add_state(30): 0; end;
I'm pretty sure the error is coming from the 29 in b.state but I'm not sure how else to define it