I'm looking for an edit to the Deal HP DMG parameter of YEP_Enhanced TP.js plugin. I want to be able to restrict TP generation on HP DMG to skills that are tagged with Skill Type 2 in the database (Default, I believe is called Special). All other skills will not generate TP. I'd appreciate any help on this. Thanks!
The calculation appears to be around this area of the code in lines 3766-3778 but I don't know how to check to see if an attack with the element "Normal Attack" was used.
The calculation appears to be around this area of the code in lines 3766-3778 but I don't know how to check to see if an attack with the element "Normal Attack" was used.
Code:
Yanfly.ETP.Game_Action_executeHpDamage = Game_Action.prototype.executeHpDamage;
Game_Action.prototype.executeHpDamage = function(target, value) {
Yanfly.ETP.Game_Action_executeHpDamage.call(this, target, value);
var user = this.subject();
var dmg = target.result().hpDamage;
if (dmg > 0) {
if (target) target.chargeTpByDamageType(user, dmg, 'takeHpDmg');
if (target) this.allyTpGain(target, dmg, 'allyHpDmg');
if (user) user.chargeTpByDamageType(target, dmg, 'dealHpDmg');
} else if (dmg < 0) {
if (user) user.chargeTpByDamageType(target, dmg, 'healHpDmg');
}
};