-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/// <reference path="./MultiElementRate.d.ts" /> | ||
|
||
import { settings } from "./_build/DarkPlasma_MultiElementRate_parameters"; | ||
|
||
function Game_Action_MultiElementRateMixIn(gameAction: Game_Action) { | ||
const _elementsMaxRate = gameAction.elementsMaxRate; | ||
gameAction.elementsMaxRate = function (target, elements) { | ||
if (elements.length > 0) { | ||
return [...new Set(elements)].reduce((previous, current) => { | ||
return settings.addition ? previous + target.elementRate(current) : previous * target.elementRate(current); | ||
}, 1); | ||
} else { | ||
return _elementsMaxRate.call(this, target, elements); | ||
} | ||
}; | ||
} | ||
|
||
Game_Action_MultiElementRateMixIn(Game_Action.prototype); |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/// <reference path="../../typings/rmmv.d.ts" /> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
DarkPlasma_MultiElementRate: | ||
name: DarkPlasma_MultiElementRate | ||
year: 2023 | ||
license: MIT | ||
excludeLicenseManager: false | ||
histories: | ||
- date: 2023/04/06 | ||
version: 2.0.0 | ||
description: 'パラメータ名を変更' | ||
- description: '同一属性が重複して計算される不具合を修正' | ||
- date: 2020/04/27 | ||
version: 1.0.1 | ||
description: '加算設定が効いていない不具合を修正' | ||
- version: 1.0.0 | ||
description: '公開' | ||
|
||
locates: | ||
- ja | ||
plugindesc: | ||
ja: '攻撃属性すべてを計算に用いる' | ||
parameters: | ||
- param: addition | ||
text: | ||
ja: 加算するか | ||
desc: | ||
ja: 計算時に全属性の有効度を加算するかどうか。OFFの場合は乗算する | ||
type: boolean | ||
default: false | ||
commands: [] | ||
structures: | ||
dependencies: | ||
base: [] | ||
orderAfter: [] | ||
orderBefore: [] | ||
help: | ||
ja: | | ||
攻撃に付与されている属性が複数ある場合、 | ||
その攻撃の属性すべてをダメージ計算に使用します。 | ||
城さんと加算で計算方法が異なります。 | ||
例えば、火+光属性の攻撃を、火有効度200% 光有効度150%の敵に使用すると | ||
以下のようになります。 | ||
乗算の場合: 2 x 1.5 = 300% | ||
加算の場合: 2 + 1.5 = 350% | ||
加算の場合、火有効度100%かつ光有効度100%の敵に火+光属性攻撃を行うと | ||
1 + 1 = 200%となってしまうことに注意してください。 |