There's this piece of code that handles the damage popup.
It is OK, until the last line where it clears the result.
I'd say this is bad code design. If the method specifically deals with damage popups, it shouldn't be touching anything else.
It is OK, until the last line where it clears the result.
Code:
Sprite_Battler.prototype.setupDamagePopup = function() { if (this._battler.isDamagePopupRequested()) { if (this._battler.isSpriteVisible()) { var sprite = new Sprite_Damage(); sprite.x = this.x + this.damageOffsetX(); sprite.y = this.y + this.damageOffsetY(); sprite.setup(this._battler); this._damages.push(sprite); this.parent.addChild(sprite); } this._battler.clearDamagePopup(); this._battler.clearResult(); }};