Window_VisualHPGauge.prototype.drawActorHp = function(actor, x, y, width) {
width = width || 186;
var color1 = this.hpGaugeColor1();
var color2 = this.hpGaugeColor2();
var rate = this._displayedValue / actor.mmp;
if (Imported.YEP_AbsorptionBarrier && actor.barrierPoints() > 0) {
ww = this.drawBarrierGauge(actor, x, y, width);
} else {
this.drawGauge(x, y, width, rate, color1, color2);
}
if (Yanfly.Param.VHGShowHP) {
this.changeTextColor(this.systemColor());
this.drawText(TextManager.hpA, x, y, 44);
}
if (Yanfly.Param.VHGShowValue) {
var val = this._displayedValue
var max = actor.mmp;
var w = width;
var color = this.hpColor(actor);
this.drawCurrentAndMax(val, max, x, y, w, color, this.normalColor());
}
};
Window_VisualHPGauge.prototype.updateHpPosition = function() {
if (!this._battler) return;
if (this._currentHpValue !== this._battler.mp) {
this._visibleCounter = Yanfly.Param.VHGGaugeDuration;
this._currentHpValue = this._battler.mp;
var difference = Math.abs(this._displayedValue - this._battler.mp);
this._dropSpeed = Math.ceil(difference / Yanfly.Param.VHGGaugeDuration);
}
this.updateDisplayCounter();
};
Window_VisualHPGauge.prototype.setBattler = function(battler) {
if (this._battler === battler) return;
this._battler = battler;
this._currentHpValue = this._battler ? this._battler.mp : 0;
this._displayedValue = this._battler ? this._battler.mp : 0;
};