I can't find a command list of whats available inside the damage formula box (Other than the a.stat b.stat info)
I want it to:
if b.state(5)
..refresh b.state(5)
..else
..apply b.state(5) and heal
end
apply a.state(6)
Thanks for any help.
I have a growing list of potential things you can use in the damage formula. Check the link in my sig and if you have questions let me know
Ah, I saw that spreadsheet before but didn't know I could turn the page to the damage stuff.
Thanks for the help on the state stuff guys.
The whole goal of the skill is to apply a state that increases hp by 10% then it heals b.hp * .1 to increase their current hp
by the same % so they end up with the same % HP after the buff is applied. Is there a way to set hp to a value rather than
increase hp? I'd rather the green numbers not pop up because it isn't really a heal.
I also have it in the section under the damage formula to remove the other two ranks of that spell. Using states because I
seem to have more control over them than I do with buffs. Will it remove the states before the damage formula stuff, or after?
EDIT:
The Syntax doesn't seem to be correct for your example of
b.isStateAffected(5) ? (b.addState(5)) : (b.addState(5); HEAL); a.addState(6)
What is posted on the damage formula list is " if (A) {B;C} else {D;E} ;"
So, I tried a few variations of yours and then a few similar to this
if (b.isStateAffected(15)) {b.addState(15)} else {b.addState(15); b.hp * .1}; a.addState(12);
None work.
EDIT:
Another update, I kept messing with it to see what I could make work
b.addState(15); b.hp * .1
WORKS
b.addState(15); b.hp * .1; a.addState(12);
Crashes game
It is a group spell, is that causing an issue? It hits all allies. is it trying to a.addState(12) 4 times?
If your looking to have a skill that increases max hp, its best off being a state. But i guess i dont understand the conditional you're trying to go for. You could just have a state that adds 10% to hp. Then in the damage formula have [a.addState(x) ; a.gainHp(a.mhp * .1) ; y] with x being the state you want to add the actor and y being the damage formula you want to use. remove the [] and it should work.
This will add state x to the actor (make the state just increase mhp + 10%, then heals 10% of the max hp, then deal damage.
Edit: I try changing the scope from 1 enemy to all and it worked without issue other then it healed me 4 times (1 for each enemy)
dmg = y ; if (a.isStateAffected(x)) {a.addState(x) ; dmg} else {a.addState(4) ; 0} ;
so my only question is, do you want their HP set to a certain % of their max hp or? cause ive got this which will work for both it will check if X state is active,, if it is, it re adds the state then adds X hp back to the account, otherwise it just adds the state
by applying the state that increases b.hp by 10%, and then healing b.hp * .1 they end up at the same % as they started
(If they were full HP, they will be full hp with a 10% increase after. If they have 80/100 hp, they will end up being 88/110)
So they only get the heal if their max HP changes, which is when the buff is applied.
The people that have the buff already just need it refreshed.
The caster will also get this buffed state, but the caster also needs the state to cause him to lose his turns.
What I mentioned about setting HP was in hopes of not showing a healing number on the character
(was only asking if it was possible instead of the b.hp * .1) but it is just a bonus question, the main focus is getting it to apply
the states.
Got it !
if (a.isStateAffected(12)) {} else {a.addState(12);}; if (b.isStateAffected(15)) {b.addState(15); 0} else {b.addState(15); b.hp * .1};
(without the 0 in the 2nd if than it would crash the game, my guess is it requres a number somewhere in the calculation)
Sorry for double post, but didn't want put the answer at the bottom of another post full of stuff.
Thanks for your input guys, eventually got the answer reading up on JS syntax.