So, the idea is that some states can "stack" up to 10 times, increasing their potency. This is achieved by simply re-applying the state while it's still active. Utilizing Yanfly's Buffs & States Core, I've tried a few things. The concept here is that states 81-90 are all Poison. Poison 1, Poison 2, Poison 3...Poison 10. Each one being more deadly than the last. Poison is only one skill. If an enemy uses Poison on an ally four times, then it's going to end up being State 84, which is Poison 4. That's what I'm trying to accomplish.
However, I've tried three different approaches, and each one offers a result that isn't quite doing what I'd hope it to do:
<Custom Apply Effect>
if (a.isStateAffected(81)) {
82;
} else {
81;
}
</Custom Apply Effect>
For this one, it just keeps giving me State 81. This is a notetag on State 81 itself. I figured it'd work where, if I didn't have State 81, it'd apply State 81. If I already had State 81, it'd apply State 82. Nope. I only get State 81. Never 82.
<Custom Apply Effect>
a.isStateAffected(81) ? 82 : 81;
</Custom Apply Effect>
Unfortunately, the exact same result as above. Being a bit more ambitious, I tried the following:
<Custom Apply Effect>
if (a.isStateAffected(81))
{
a.addState(82);
a.removeState(81);
} else
{0;}
<Custom Apply Effect>
This one was the most interesting. In this code, it always gave me State 82, and never State 81. Which means that when I used a skill that attempted to apply State 81, currently not having State 81 on the actor, it jumps right to giving me State 82.
Having this much trouble with 2 stacks certainly makes the prospect of 10 stacks a scary one.
Any help would be nice.
Thanks!
However, I've tried three different approaches, and each one offers a result that isn't quite doing what I'd hope it to do:
<Custom Apply Effect>
if (a.isStateAffected(81)) {
82;
} else {
81;
}
</Custom Apply Effect>
For this one, it just keeps giving me State 81. This is a notetag on State 81 itself. I figured it'd work where, if I didn't have State 81, it'd apply State 81. If I already had State 81, it'd apply State 82. Nope. I only get State 81. Never 82.
<Custom Apply Effect>
a.isStateAffected(81) ? 82 : 81;
</Custom Apply Effect>
Unfortunately, the exact same result as above. Being a bit more ambitious, I tried the following:
<Custom Apply Effect>
if (a.isStateAffected(81))
{
a.addState(82);
a.removeState(81);
} else
{0;}
<Custom Apply Effect>
This one was the most interesting. In this code, it always gave me State 82, and never State 81. Which means that when I used a skill that attempted to apply State 81, currently not having State 81 on the actor, it jumps right to giving me State 82.
Having this much trouble with 2 stacks certainly makes the prospect of 10 stacks a scary one.
Any help would be nice.
Thanks!