slave-thistle/www/js/plugins/0_FloorDamageEvent.js
2025-05-26 09:44:24 -05:00

30 lines
No EOL
933 B
JavaScript

/*:
* @plugindesc 床ダメージのタイミングでコモンイベントを呼ぶプラグイン
* @author Tokomagi
*
* @param commonEventId
* @text コモンイベントID
* @desc コモンイベントIDを設定します。
* 半角数字(_)で入力してください。
* @default 195
* @type number
*
* @help
* 床ダメージのタイミングでコモンイベントを呼ぶプラグイン
*/
(function() {
'use strict';
let pluginName = '0_FloorDamageEvent';
let parameters = PluginManager.parameters(pluginName);
//プラグインパラメータの定義
let commonEventId = Number(parameters['commonEventId']);
let CPOexecuteFloorDamage = Game_Actor.prototype.executeFloorDamage;
Game_Actor.prototype.executeFloorDamage = function() {
let defaultExecuteFloorDamage = CPOexecuteFloorDamage.call(this);
$gameTemp.reserveCommonEvent(commonEventId);
};
})();