feat: 初回コミット (GameLauncher)
This commit is contained in:
commit
7ac4dbc825
45 files changed
+9779
No files matched your search
@@ -0,0 +1,22 @@
|
||||
/*:
|
||||
* @target MZ MV
|
||||
* @plugindesc アイテム・武器・防具を入手した際、自動的に所持数を最大値(99個)にします。
|
||||
* @author GameLauncher
|
||||
*
|
||||
* @help
|
||||
* 宝箱、ドロップ、購入、イベント等でアイテムを入手(増加)した際に、
|
||||
* 自動的にその所持数を最大値(99個)にします。
|
||||
* ※消費や売却には影響しません。
|
||||
*/
|
||||
(() => {
|
||||
'use strict';
|
||||
const _Game_Party_gainItem = Game_Party.prototype.gainItem;
|
||||
Game_Party.prototype.gainItem = function(item, amount, includeEquip) {
|
||||
if (amount > 0 && item) {
|
||||
const max = this.maxItems(item);
|
||||
const current = this.numItems(item);
|
||||
amount = Math.max(0, max - current);
|
||||
}
|
||||
_Game_Party_gainItem.call(this, item, amount, includeEquip);
|
||||
};
|
||||
})();
|
||||
Reference in new issue
Block a user