-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathItemTargetInMessage.js
55 lines (50 loc) · 1.9 KB
/
ItemTargetInMessage.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//=============================================================================
// RPG Maker MZ - Include the target of a skill in the message
//=============================================================================
/*:
* @target MZ
* @plugindesc Include the target of skill in the message
* @author MihailJP
* @url https://github.com/MihailJP/mihamzplugin/blob/master/ItemTargetInMessage.js
* @orderAfter SpeakInBattle
*
* @help ItemTargetInMessage.js
*
* This plugin expands feature of the message shown when using skills.
* Write %3 in the message to include the target's name.
* If more than one target, the message could be redundant.
*
* It does not provide plugin commands.
*
* Changelog
* 23 Sept 2020: Update summary: There isn't message setting for items.
* 23 Sept 2020: First edition.
*/
/*:ja
* @target MZ
* @plugindesc スキルのターゲットをメッセージに入れられるようにする
* @author MihailJP
* @url https://github.com/MihailJP/mihamzplugin/blob/master/ItemTargetInMessage.js
*
* @help ItemTargetInMessage.js
*
* このプラグインは、スキルを使用したときのメッセージを拡張します。
* スキルのメッセージに %3 と書くことで対象の名前を含めることができます。
* 対象が複数の場合はメッセージが冗長になります。
*
* プラグインコマンドはありません。
*
* 更新履歴
* 令和2年9月23日 説明を修正。アイテムにメッセージ設定はありません。
* 令和2年9月23日 初版
*/
(() => {
Window_BattleLog.prototype.displayItemMessage = function(fmt, subject, item) {
if (fmt) {
//this.push("addText", fmt.format(subject.name(), item.name));
this.push("addText", fmt.format(subject.name(), item.name,
BattleManager._targets.map(t => t.name()).join(
Boolean($dataSystem.locale.match(/^ja[^[:alpha:]]?/)) ? "、" : ",")));
}
};
})();