Created
January 1, 2022 05:36
-
-
Save triacontane/1a089ae8b5808bee9928f8b3569a300e to your computer and use it in GitHub Desktop.
魔法専用の消費MPレート
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'; | |
| const _Game_BattlerBase_skillMpCost = Game_BattlerBase.prototype.skillMpCost; | |
| Game_BattlerBase.prototype.skillMpCost = function(skill) { | |
| if (skill.hitType === Game_Action.HITTYPE_MAGICAL) { | |
| if (this._magicMcr === undefined) { | |
| this._magicMcr = this.findMegicMcr(); | |
| } | |
| return Math.floor(skill.mpCost * this._magicMcr); | |
| } else { | |
| return _Game_BattlerBase_skillMpCost.apply(this, arguments); | |
| } | |
| }; | |
| })(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
findMegicMcrはメモタグ等から専用の消費率を算出する処理。必ず
undefined以外の値を返す。