Project1

标题: 新人求教,MZ有没有控制暴击伤害的插件? [打印本页]

作者: ezero    时间: 2022-3-1 20:52
标题: 新人求教,MZ有没有控制暴击伤害的插件?
VisuMZ_1_BattleCore里面有三个注释可以控制暴击,但是只能用于物品和技能。
暴击系数<Modify Critical Multiplier>和暴击伤害加成<Modify Critical Bonus Damage>这俩注释还有点用不明白,不怎么好用。
有没有像MV的CriticalContro这样可以直接注释武器防具角色职业物品技能的暴击控制插件?
作者: guihuasheng    时间: 2022-3-2 12:53
用自定义参数插件试试
http://www.mediafire.com/file/zweleimr95tjxss/file
作者: guihuasheng    时间: 2022-3-6 00:57
本帖最后由 guihuasheng 于 2022-3-6 13:24 编辑


作者: ezero    时间: 2022-3-6 16:41
guihuasheng 发表于 2022-3-6 00:57

谢谢大佬我研究了半天终于知道问题出在哪儿了
VisuMZ_1_BattleCore让暴击系数和倍率和幸运值关联起来了:

// Apply LUK Buffs/Debuffs
const lukStack = this.subject().buff(7);
rate *= 2 ** lukStack;

自定义参数插件我还在摸索着怎么用,谢谢大佬的帮忙啦ヾ(≧▽≦*)o
作者: 小秋橙    时间: 2022-3-6 19:12
Game_Action.prototype.applyCritical = function(damage) {
    return damage * 3;
};
rmmz_objects.js大约第2000行,暴击伤害是默认伤害的三倍,可以自己改成别的倍率,或者根据变量/开关/队伍人员组成/道具数量等变化,都是可以的,不需要任何插件。
作者: 荻原沙优    时间: 2022-3-7 21:34
小秋橙 发表于 2022-3-6 19:12
Game_Action.prototype.applyCritical = function(damage) {
    return damage * 3;
};

谢谢,让我茅塞顿开
作者: guihuasheng    时间: 2022-3-7 22:00
//=============================================================================
// MrTS_CriticalDamage.js
//=============================================================================

/*:
* @plugindesc Changes how critical damage works. No more Damage * 3.
* @author Mr. Trivel
* @target MZ
* @param Base Multiplier
* @desc Starting multiplier for critical hits. 2.0 = 200%, 1.5 = 150%
* Default: 2.0
* @default 2.0
*
* @help
* --------------------------------------------------------------------------------
* Terms of Use
* --------------------------------------------------------------------------------
* Don't remove the header or claim that you wrote this plugin.
* Credit Mr. Trivel if using this plugin in your project.
* Free for commercial and non-commercial projects.
* --------------------------------------------------------------------------------
* Version 1.1
* --------------------------------------------------------------------------------
*
* --------------------------------------------------------------------------------
* Actor/Enemy Tags
* --------------------------------------------------------------------------------
* For actors which have their base Critical Damage Multiplier different from
* one defined in plugin parameter.
* Can't be negative number.
* <CritMultiplier: [FLOAT]>
*
* Example:
* <CritMultiplier: 5.0>
* <CritMultiplier: 1.7>
* --------------------------------------------------------------------------------
*
* --------------------------------------------------------------------------------
* Class Tags
* --------------------------------------------------------------------------------
* For classes which have their base Critical Damage Multiplier differenet from
* one defined in plugin paramater or actor tags.
* Can't be negative number.
* <CritMultiplier: [FLOAT]>
*
* Example:
* <CritMultiplier: 1.3>
* <CritMultiplier: 2.1>
* --------------------------------------------------------------------------------
*
* --------------------------------------------------------------------------------
* State Tags
* --------------------------------------------------------------------------------
* While character has the state and it has the following tag in it, it'll increase
* character's crit damage multiplier by that amount.
* If number is negative, it'll decrease multiplier by that amount instead.
* <CritMultiplier: [FLOAT]>
*
* Example:
* <CritMultiplier: 0.2>
* <CritMultiplier: -1.0>
* --------------------------------------------------------------------------------
*
* --------------------------------------------------------------------------------
* Equipment Tags
* --------------------------------------------------------------------------------
* While actor has item equipped and it has the following tag in it, it'll increase
* character's crit damage multiplier by that amount.
* If number is negative, it'll decrease multiplier by that amount instead.
* <CritMultiplier: [FLOAT]>
*
* Example:
* <CritMultiplier: 0.1>
* <CritMultiplier: -0.7>
* --------------------------------------------------------------------------------
*
* --------------------------------------------------------------------------------
* Version History
* --------------------------------------------------------------------------------
* 1.1 - Critical damage won't go lower than normal damage anymore.
* 1.0 - Release
*/

(function() {
        var parameters = PluginManager.parameters('MrTS_CriticalDamage');
        var paramBaseMultiplier = Number(parameters['Base Multiplier'] || 2.0);

        Game_Enemy.prototype.critMultiplier = function() {
                var multiplier = this.enemy().meta.CritMultiplier ? 0.0 : paramBaseMultiplier;
                var traitObjects = this.traitObjects();
                for (var i = 0; i < traitObjects.length; i++) {
                        if (traitObjects[i].meta.CritMultiplier)
                                multiplier += Number(traitObjects[i].meta.CritMultiplier);
                }
                return multiplier;
        };

        Game_Actor.prototype.critMultiplier = function() {
                var multiplier = 0.0;
                if (this.currentClass().meta.CritMultiplier)
                        multiplier = Number(this.currentClass().meta.CritMultiplier);
                else if (this.actor().meta.CritMultiplier)
                        multiplier = Number(this.actor().meta.CritMultiplier);
                else
                        multiplier = paramBaseMultiplier;

                var traitObjects = this.traitObjects();
                for (var i = 0; i < traitObjects.length; i++) {
                        if ( traitObjects[i].classId        ||
                                 traitObjects[i].expParams        ||
                                !traitObjects[i].meta.CritMultiplier) continue;

                        multiplier += Number(traitObjects[i].meta.CritMultiplier);
                }
                return multiplier;
        };

        Game_Action.prototype.applyCritical = function(damage) {
                return damage * Math.max(1.0, this.subject().critMultiplier());
        };
})();
作者: ezero    时间: 2022-3-8 12:50





欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1