Last TP question (hopefully)

So I'm trying to make TP into a special thing that's like a different mana, but the only way that I know of to make TP not gain when the actor is being attacked is to reduce the TP charge rate.


The problem with that is that it doesn't allow TP to be gained by attacking either, and I do want some skills to increase TP.


So how do I make TP charge on attack but not when taking damage?


I've tried making that skill change the class of the caster for a second, but it doesn't count until after the TP should've been gained, and there's no way to make the caster gain TP if the attack targets the opponent and not the caster.


If scripting is needed to make this work - note that I use the 'Core Battle Engine' script.
I don't know about Core Battle Engine, but in the standard system here's a scriptlet (post it in Materials) to disable charging TP by damage taken.


class Game_Battler < Game_BattlerBase


  def charge_tp_by_damage(damage_rate)
  end


end
Thank you very much, Wavelength!  Works perfectly.


Hopefully, this'll be the last time I'll need to mess with this subject. @_@
No problem. 🙂

Original thread: https://forums.rpgmakerweb.com/threads/last-tp-question-hopefully.56402/