Here is the link to Passive States, Buff & States Core, and Absorption Barrier. I believe these are all the plugins associated with what I'm doing.
What I've done is create a passive state that only actives when the actor has barrier points. It's very simple and works fine. This is what it looks like:
The point of this passive state is to provide protection against certain other negative status effect states while the actor has active barrier points. For example, if an attack would inflict poison and the actor has barrier points, then the poison state is not inflicted. This works fine.
What I've overlooked is that if the actor has poison inflicted at the time the passive state is activated, due to barrier points being added to the actor in some way, the poison state is then removed. That's because the passive state has the trait resist poison. I do not want a negative state to be removed when barrier points are added, I only want the negative state to be prevented if the barrier points were active when the attempt to inflict the negative state took place.
My theory is to possibly add another custom passive condition that checks if an array of these negative states are already applied to the actor, therefore preventing the passive state from activating. However, I am unsure of exactly how to write the lunatic code for that.
Also, if my theory works, then it could possibly create another problem. Let's say the actor has poison applied, he then gets barrier points added, but the passive state does not activate because the actor already had poison applied. Now, even though the actor has barrier points again, he will succumb to further negative status effects. This is what I don't want to happen.
If anyone has some ideas, I am open to try them. I would really like to have my cake and eat it too... 😩
What I've done is create a passive state that only actives when the actor has barrier points. It's very simple and works fine. This is what it looks like:
Code:
<Custom Passive Condition>
var statusblock = user.barrierPoints();
if (statusblock > 0) {
condition = true;
} else {
condition = false;
}
</Custom Passive Condition>
The point of this passive state is to provide protection against certain other negative status effect states while the actor has active barrier points. For example, if an attack would inflict poison and the actor has barrier points, then the poison state is not inflicted. This works fine.
What I've overlooked is that if the actor has poison inflicted at the time the passive state is activated, due to barrier points being added to the actor in some way, the poison state is then removed. That's because the passive state has the trait resist poison. I do not want a negative state to be removed when barrier points are added, I only want the negative state to be prevented if the barrier points were active when the attempt to inflict the negative state took place.
My theory is to possibly add another custom passive condition that checks if an array of these negative states are already applied to the actor, therefore preventing the passive state from activating. However, I am unsure of exactly how to write the lunatic code for that.
Also, if my theory works, then it could possibly create another problem. Let's say the actor has poison applied, he then gets barrier points added, but the passive state does not activate because the actor already had poison applied. Now, even though the actor has barrier points again, he will succumb to further negative status effects. This is what I don't want to happen.
If anyone has some ideas, I am open to try them. I would really like to have my cake and eat it too... 😩