//=============================================================================
// MUR Balloon Position v1.0
// by MUR (https://github.com/murlab)
// BSD 3-Clause License
// Free for use with both free and commercial RPG Maker games.
//=============================================================================

var Imported = Imported || {};
Imported.MUR_BALLOON = true;

var MUR = MUR || {};				// MUR's main object
MUR.BALLOON = MUR.BALLOON || {};	// Plugins's stuff

/*:
 * @plugindesc v1.0 Корректировка позиции Baloon
 * @author Mur
 *
 * @param pos
 * @desc отступ для balloon вверх/вниз
 * @type number
 * @default 64
*/

var params = PluginManager.parameters('MUR_Balloon_Position');
MUR.BALLOON.pos = Number(params["pos"]);

Sprite_Character.prototype.updateBalloon = function() {
	this.setupBalloon();
	if (this._balloonSprite) {
		this._balloonSprite.x = this.x;
		// Используется this._character.screenY() вместо this.y из-за корявости плагина RS_MirrorArea
		this._balloonSprite.y = this._character.screenY() - MUR.BALLOON.pos;
		if (!this._balloonSprite.isPlaying()) {
			this.endBalloon();
		}
	}
};
