- Joined
- Jan 28, 2015
- Messages
- 112
- Reaction score
- 7
- First Language
- Thai
- Primarily Uses
I have been toying around with my custom formula. The situation is if $game_variables[1] is set to 1, it can deal 50% extra damage and it works wonderfully without any problem. However; if I would like to add a.tp+=20 after the extra damage, where should I put it in to make the formula works correctly?
Correctly you say? Yes, I mean that.
I try add "&& a.tp+=20" after "e*1.5", I do gain 20 TP every time the spell is cast but the damage keeps increasing cumulatively every time (which I don't want it).
Kindly help me to fix this and what could be the cause of the increase of the spell damage.
Thanks!
Correctly you say? Yes, I mean that.
I try add "&& a.tp+=20" after "e*1.5", I do gain 20 TP every time the spell is cast but the damage keeps increasing cumulatively every time (which I don't want it).
Kindly help me to fix this and what could be the cause of the increase of the spell damage.
Thanks!
Code:
class Game_Battler < Game_BattlerBase def fireball_dmg(a, c=((a.mat/2*1.05)-b.mdf/4).to_i d=c/11+1 e=(c-d..c+d).to_a.sample if c>=1;e;elsif c<=0;if rand(10)+1>=4;1;else;0;end;end if $game_variables[1]==1 return e*1.5 else return e end endend

