MZ Need Help Calling an Enemys Current and Max Hp

I've been searching google for a little while now but all i keep coming across is hp bars. I don't want bars.

I'm trying to make it so if a player as a specific state they can see the enemies hp in the enemy window. The call for the state works perfectly but Im not sure how to set it up to correctly show the hp. I can get the hpRate() in the const = hp to work but i want actual hp not %.

Window_BattleEnemy2.prototype.drawItem = function(index) { this.resetTextColor(); const name = this._enemies[index].name(); const hp = this._enemies[index]. const mhp = this._enemies[index]. const rect = this.itemLineRect(index); if ($gameParty.members().filter( function (actor) { return actor.isStateAffected(52); } ).length > 0) { this.drawText(name + ' ' + hp + '/' + mhp, rect.x, rect.y, rect.width); } else { this.drawText(name, rect.x, rect.y, rect.width); } };

Any guidance would be appreciated.
I've been searching google for a little while now but all i keep coming across is hp bars. I don't want bars.

I'm trying to make it so if a player as a specific state they can see the enemies hp in the enemy window. The call for the state works perfectly but Im not sure how to set it up to correctly show the hp. I can get the hpRate() in the const = hp to work but i want actual hp not %.

Window_BattleEnemy2.prototype.drawItem = function(index) { this.resetTextColor(); const name = this._enemies[index].name(); const hp = this._enemies[index]. const mhp = this._enemies[index]. const rect = this.itemLineRect(index); if ($gameParty.members().filter( function (actor) { return actor.isStateAffected(52); } ).length > 0) { this.drawText(name + ' ' + hp + '/' + mhp, rect.x, rect.y, rect.width); } else { this.drawText(name, rect.x, rect.y, rect.width); } };

Any guidance would be appreciated.
this._enemies[index].hp and this._enemies[index].mhp will give you the current and max HP respectively.
thank you so much. I must have had the () when i tried it last. works perfect now.
This thread is being closed due to being solved. If you need it reopened, report it to let us know why. Thank you!

Original thread: https://forums.rpgmakerweb.com/threads/need-help-calling-an-enemys-current-and-max-hp.158781/