Is something like this possible?
example:
if stateA, atk*2, addStateB;
if stateB, atk*3, addStateC;
if stateC, atk*5, addStateC;
else, atk*1, addStateA;
I know you can do ifStateAffected, addState; atk*x and a single if/else but is it possible to do it multiple times and what would the formula look like?
Edit:
I figured it out. It looks like this:
if(a.isStateAffected(1))
{
a.addState(2);
a.atk*2;
}
if(a.isStateAffected(2))
{
a.addState(3);
a.atk*3;
}
else
{
a.addState(1);
a.atk*1;
}
Edit:
Bug. I use the skill once, it adds the first state fine but on my second turn when I use the skill again it adds states 2 and 3 at the same time for some reason. I don't know why.
Edit:
I changed the second if to else if and it works fine.
example:
if stateA, atk*2, addStateB;
if stateB, atk*3, addStateC;
if stateC, atk*5, addStateC;
else, atk*1, addStateA;
I know you can do ifStateAffected, addState; atk*x and a single if/else but is it possible to do it multiple times and what would the formula look like?
Edit:
I figured it out. It looks like this:
if(a.isStateAffected(1))
{
a.addState(2);
a.atk*2;
}
if(a.isStateAffected(2))
{
a.addState(3);
a.atk*3;
}
else
{
a.addState(1);
a.atk*1;
}
Edit:
Bug. I use the skill once, it adds the first state fine but on my second turn when I use the skill again it adds states 2 and 3 at the same time for some reason. I don't know why.
Edit:
I changed the second if to else if and it works fine.