I assume you meant me,
I'll go into greater detail
I have a Dragon-based Race set up. I also have the Elements set up. I'm trying to create a passive state that when the Race is of a certain Element, it has resistance of it, without creating 10 different dragon racial types. (Mostly because in my game, dragons can end up earning three different elements.)
I figured the easiest way to do it, was to create two sets of States. One State that gives the creature its "Element" to define it. But the second state is the passive state that has a passive condition that as long as: If a character/enemy has a state from the first state, then the state from the second passive state is on.
Unless there is an easier way to achieve this.
I have an idea, but please be assured that's a rushed idea:
For this example, let's assume only 3 elements:
- Fire
- Ice
- Lightning
you're gonna make 6 passive states:
3 will be stored in your Dragon race:
- [10]Fire Dragon Resistance
- [11] Ice Dragon Resistance
- [12] Lightning Dragon Resistance
These states don't do anything; they are invisible and useless on their own.
3 will be stored in your Elements trait sets:
- [20] Fire Dragon Bonus (stored in your Fire Element trait set)
- [21] Ice Dragon Bonus (stored in your Ice Element trait set)
- [22] Lightning Dragon Bonus (stored in your Lightning Element trait set)
These will be passive states that grant their actual resistances. The trick lies in their notetags:
Fire Dragon Bonus requires Fire Dragon Resistance state (ID 10):
<JS Passive Condition>
user.isStateAffected(10);
</JS Passive Condition>
Ice Dragon Bonus requires Ice Dragon Resistance state (ID 11):
<JS Passive Condition>
user.isStateAffected(11);
</JS Passive Condition>
Lightning Dragon Bonus requires Lightning Dragon Resistance state (ID 12):
<JS Passive Condition>
user.isStateAffected(12);
</JS Passive Condition>
There are probably a lot of better ways to achieve this, but this is what I could think of while driving.