SumRndomDude Timed Attack Formula Question

Plugin link: 





trying to use the timed attack function tas power from sumrandomdude along with my own custom formula 


With (a.atk * 4 - b.def * 2) * ($gameTemp.tas_power) or any very basic formula like this it works


however if we go into more complex formulas such as the one i realllllly want to work with this, it doesnt work no matter how i incorporate it


if (a.hpRate() <= 0.35) { a.setHp(a.mhp); a.atk*4-b.def*2 + 200; } else { a.atk*4 - b.def*2; }


So basically the mini game will pop up but either ill deal 0 damage or it will only use my first formula and the whole idea of trying to hit the center for more damage is gone.  Any suggestions on how to make this work? I'm sure others that have their own custom formulas will want to know this as well. 
Figured it out 🙂  needed to minus and add in a few things heres the formula btw in case anyone wants to use it will calculate the timed attk as well as adding 200 damage to your attack if health is under 35% 


if (a.hpRate() <= 0.35) { a.setHp(a.mhp); a.atk*4-b.def*2 + 200; } else { (a.atk*4 - b.def*2) * ($gameTemp.tas_power)}
Scratch what I said above, everything about the formula does work however it gives an unexpected feature once the battle is forced into the double damage mode. It complete regenerates their hp after one double damage shot. Any ideas on how to fix this?
Scratch what I said above, everything about the formula does work however it gives an unexpected feature once the battle is forced into the double damage mode. It complete regenerates their hp after one double damage shot. Any ideas on how to fix this?



Could you explain in more detail what you are trying to accomplish?
Thanks again for the reply man and sorry if this is kinda hard to understand what I'm asking ill try to explain.


Damage Formula should = normal damage with your timed attk variable as long as actors hp is over 35% hp, when below 35% hp the actor should deal + 200 damage along with your timed attk variable as well. The formula I put above does all that but also unexpectedly regenerates all hp after the actor attacks once but only when they are under 35% hp curiously. So I am just trying to figure out if the problem is on my end or maybe if the  ($gameTemp.tas_power) will not work with another damage variable such as this one?
Um...well the damage formula you have presented is this:


if (a.hpRate() <= 0.35) { a.setHp(a.mhp); a.atk*4-b.def*2 + 200; } else { (a.atk*4 - b.def*2) * ($gameTemp.tas_power)}




The reason the user is regaining HP is because of the part that states:


a.setHp(a.mhp);


That is setting the user's HP to their Max HP stat. I was confused since it seemed so intentionally put there, but if you wish to remove the healing effect, just delete this code from the formula. 🙂
ah darn ok so it was my end thanks so much man xD sorry for buggin ya!

Original thread: https://forums.rpgmakerweb.com/threads/sumrndomdude-timed-attack-formula-question.66789/