Ah, multiple battlers can inflict the same status effect? Hmmmm... Then you'd need to add more key into it or something.
Something like instead of just state_id, you'd need to use some data from the source as well. But the problem with that is you'd then need a custom script or add the state thru a custom method so that you can catch who caused that state
Agreed. I think this could actually be done by changing the code on state origins (under apply state) to save the parameters of the one who inflicted the state, and then edit the lunatic code to use the saved parameters instead. That should fix the problem. I may investigate this more over the next couple weeks as I do want something similar for my game too.
Otherwise, right now you can weaken the effects of poison by casting a spell to lower the targets MAT on the one who inflicted poison on you (as I use lunatic states to make poison damage based on the MAT of the one who inflicted it)!
I was afraid of this. It seems the problem is much more complicated than I'd thought. Having states added this way was more for game Dev convenience than game balance.
Now instead of having slip damage controlled by 10 states (one per element), I'd have to make a new one per slip damage skill (likely over 100). I made an alternate version of the code just in case it didn't work out. I don't want to give up on this, but I also can't spend too much time pursuing something that isn't entirely necessary.
I know this is a little off topic but, I am having another slight issue.
#---------------------------------------------------------------------- # Protection Effect No.2: Mana Barrier # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - # Best used with react effect. This causes a set percentage of HP damage to # instead be absorbed into MP. # # Recommended notetag: # <react effect: mana barrier x> #---------------------------------------------------------------------- when /MANA BARRIER[ ](\d+)/i return unless @result.hp_damage > 0 @result.mp_damage = (@result.hp_damage * ($1.to_f / 100.00)).to_i @result.hp_damage = (@result.hp_damage * (1.00 - ($1.to_f / 100.00))).to_i return unless $imported["YEA-BattleEngine"] create_popup(state.name, "REST_ELE")This effect literally multiplies when another state (any other state) is also affecting the target. When damage is received you see the "Mana Barrier" popup twice if the defending target happens to have another state. Three times if the target has two other states, and so on... There's also a noticeable difference in damage reduction.
That is because Yanfly accidentally used a nested for loop, which causes ALL states to do that. To fix this, delete one of the for loops.
I can send you the fixed version of the script I wrote in a PM, it fixes this problem. I don't know if I'm allowed to post it on the forums though.