Created
May 6, 2020 13:43
-
-
Save triacontane/cabf2c0383f60d90eea363882f72dc08 to your computer and use it in GitHub Desktop.
YEP_ExtraEnemyDrops.jsでドロップ率にマイナス値を指定しておくと、すでに指定したドロップを打ち消せるようになります。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
'use strict'; | |
DropManager.makeConditionalDropItems = function() { | |
var length = this._data.length; | |
if (length <= 0) return; | |
for (var i = 0; i < length; ++i) { | |
var data = this._data[i]; | |
var item = data[0]; | |
var conditions = data[1]; | |
var rate = this.getConditionalRate(conditions); | |
if (Math.random() < rate) { | |
this._drops.push(item); | |
} | |
var index = this._drops.indexOf(item); | |
if (rate < 0 && index >= 0 && Math.random() < Math.abs(rate)) { | |
this._drops.splice(index, 1); | |
} | |
} | |
}; | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
プラグイン管理画面でYEP_ExtraEnemyDrops.jsより下に配置してください。