Is there a syntax for: adding states 2 through 5?
Thank you, Shaz. It works perfectly. I didn't thought the syntax would be so long though. But good thing that the formula box can handle it.
Hello, I'm looking for a formula that increases the damage of the skill based on how many party members are dead, I tried with this formula: $gameParty.deadMembers() * 100 and different variables, but it makes 0 damage when no party members are dead and No damage when 1 or more are dead. Any help?
Thanks!
Can anyone help me fix my formula?
c = Math.randomInt(20) + a.atk; d = Math.randomInt(20) + b.def; if c> d; c=a.matk; else c=0; end;
I'm trying to get a random number between 1-20 to essentially be "rolled" for both the attacker's ATK stat and the defender's defense stat, and if the ATK + roll is greater to do damage based on the attacker's MATK or else do nothing. Currently, whenever anyone uses the formula for this skill it always generates 0's.
Try this:
(Math.randomInt(20) + a.atk) > (Math.randomInt(20) + b.def) ? a.matk : 0
I think the issue is that you're using lots of ; instead of {} in your if/then/else test. Also, 0 is what's returned if you have an error in your formula.
The above removes the need for the temporary variables and makes it shorter.
Note that Math.randomInt gives a number between 0 and 19, not between 1 and 20, but for these purposes it doesn't really matter, as it's doing it for both sides.
I was wondering and hopefully this is the right place to ask.
Is it possible to setup a variable that would store a # that can be used inside the formula.
Example:
m.att - m.def * 0.33 * 1 (this "1" would be the variable number, that can be changed?)
I only want one of my Classes to gain TP for using the attack command. So i figured i use something like this:
a.gainTp(Math.randomInt(12)+1; Damage FormulaThe thing i'm wondering is if it's possible to make an IF statement before the TP formula to check if the class of the attacker is equal to Class ID 1. if (Condition) { a.gainTp(Math.randomInt(12)+1}; But then the damage would be ignored also. So i guess i have to write it like if (Condition) a.gainTp(Math.randomInt(12))+1; Damage Formula else; Damage Formula. You probably get what i want to do. But i don't know how to set it up properly.
Want to make sure this is working correctly:
$gameTemp.reserveCommonEvent(8); a.mat - b.mdf * 0.33 * $gameVariables.value(4)
the common event runs to see if the gamevariables.value(4) is either 1 or 2, then changes based on the event.
I am hoping my train of thought works.
Could someone help me please?
I want make a skill that absorbs HP or MP of certain percentage of the skill's damage...
do you guys have any idea what should I do?
thanks in advance.
this isn't a damage formula, but it is a formula related question.
i want to setup a formula that heals the target, and half back to the user of the skill. so if I heal a target for lets say 10 hit points, the user would get 5 back.