lewd-hypnosis-city-hypnosm/js/plugins/MNKR_EnemyStateIconOffset.js
2026-04-28 07:32:15 -05:00

47 lines
1.5 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* --------------------------------------------------
* MNKR_EnemyStateIconOffset.js
* Ver.0.0.4
* Copyright (c) 2021 Munokura
* This software is released under the MIT license.
* http://opensource.org/licenses/mit-license.php
* --------------------------------------------------
*/
/*:
* @target MZ MV
* @url https://raw.githubusercontent.com/munokura/MNKR-MZ-plugins/master/MNKR_EnemyStateIconOffset.js
* @plugindesc 敵キャラ毎にステートアイコンのY座標をオフセットします。
* @author munokura
*
* @help
* 敵キャラ毎にステートアイコンのY座標をオフセットします。
* ステート位置を変更したい敵キャラのメモ欄に下記を入力してください。
* <MNKR_EnemyStateIconOffset:y>
* y:正負の整数
*
* 例
* <MNKR_EnemyStateIconOffset:100>
* ステートアイコンを通常より100ピクセル下に表示する。
*
*
* 利用規約:
* MITライセンスです。
* https://licenses.opensource.jp/MIT/MIT.html
* 作者に無断で改変、再配布が可能で、
* 利用形態商用、18禁利用等についても制限はありません。
*/
(() => {
"use strict";
const _Sprite_Enemy_updateStateSprite = Sprite_Enemy.prototype.updateStateSprite;
Sprite_Enemy.prototype.updateStateSprite = function () {
_Sprite_Enemy_updateStateSprite.call(this);
const offSetY = Number(this._battler.enemy().meta.MNKR_EnemyStateIconOffset || 0);
if (offSetY !== 0) {
this._stateIconSprite.y += offSetY;
}
};
})();