Hi all, I want to show different colored numbers for different damage elements, for example, the fire elements shows red, water elements show blue color, I found where the damage numbers were plotted:
But I don't know how to get the elements here, does anyone know what to do? Any advice would be helpful!
JavaScript:
Sprite_Damage.prototype.setup = function(target) {
const result = target.result();
if (result.missed || result.evaded) {
this._colorType = 0;
this.createMiss();
} else if (result.hpAffected) {
this._colorType = result.hpDamage >= 0 ? 0 : 1;
this.createDigits(result.hpDamage);
} else if (target.isAlive() && result.mpDamage !== 0) {
this._colorType = result.mpDamage >= 0 ? 2 : 3;
this.createDigits(result.mpDamage);
}
if (result.critical) {
this.setupCriticalEffect();
}
};
But I don't know how to get the elements here, does anyone know what to do? Any advice would be helpful!