As I said in title, I need references for scripting with last element id used on enemy, in addition I must insert into a variable the last element id used on a specified enemy and compare with latest(more recent) element id used.
example:
enemy hit by ice by a member, then another member hit same enemy by fire, how to call references for that?Which is the best way to use in enemy or skills category?
would be useful a common event in battle(through yanfly script)?
Hello, you can't reference that cause once an action is done, it's done; the engine don't keep track of the last element used.
I think the easier way to do this would be to use states. When an enemy is hit by a fire skill, it receive a "fire state" lasting a couples of turns. When hit by ice while the "fire state" is still active, it alter the effect of ice (amplifying damage I guess...), than remove "fire state" and add "ice state", and so on.
You can set a state for each elements or have a single state that react differently dependending of the element, using scripting notetags of YEP_BuffsStatesCore.
As I wrote in private Ossra, there's the problem of natural defence.
If a monster have 300% def to fire and the state vulnerability set 200% bonus, this does not count as a vulnerability.
even setting a vulnerability higher would be unbalanced cause some monsters will get huge damage and others instead the normal bonus(example 1000% on a 100% resistance monster is 900% and 1000% on a 500% resistance only 500%).
In addition, not every monster must get the combo skill damage, only some:
for the rocky monsters:
ice fire combo
for normal monsters not.
So I cannot set this state on skill effect cause will be applied to all targeted monsters.
yeah through yanfly battle scripts, I will use that, in case I will pm you and Ossra in future for a better solution, thanks