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

34 lines
No EOL
867 B
JavaScript
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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.

//FloorDamagePercent
/*:ja
* @plugindesc 床ダメージを割合にするプラグイン
* @author 霧島万 ツイッター yurugatinoeru
* @help
*
* @param PercentOfFloorDamage
* @desc 床ダメージの最大HPに対する割合です。
* @default 10
*/
(function(_global) {
var CPObasicFloorDamage = Game_Actor.prototype.basicFloorDamage;
//プラグインパラメータの定義
var parameters = PluginManager.parameters('FloorDamagePercent');
var PercentOfFloorDamage = Number(parameters['PercentOfFloorDamage']);
Game_Actor.prototype.basicFloorDamage = function() {
//とりあえず元のを呼んでおく
var defaultBasicFloorDamage = CPObasicFloorDamage.call(this);
//実際の処理
var hp = this.mhp;
var damage = hp*PercentOfFloorDamage/100
return damage;
};
})();