本帖最后由 hyrious 于 2019-6-10 22:32 编辑
在技能/物品的注释里写:
- <Custom Target Text>
- text = "喵喵喵";
- </Custom Target Text>
复制代码 就会在查看该物品时显示 text 到帮助窗口,根据源代码 925 行的信息,这里你可以使用的变量有:
var text = ''; // text = 最终显示的文本 var s = $gameSwitches._data; // s[1] = 开关1 var v = $gameVariables._data; // v[1] = 变量1 var user = BattleManager._subject; // a = b = subject = user = 当前使用者(这人搞这么多别名干啥…… var a = user; var subject = user; var b = user; var target = user;
var text = ''; // text = 最终显示的文本
var s = $gameSwitches._data; // s[1] = 开关1
var v = $gameVariables._data; // v[1] = 变量1
var user = BattleManager._subject; // a = b = subject = user = 当前使用者(这人搞这么多别名干啥……
var a = user;
var subject = user;
var b = user;
var target = user;
在技能/物品的注释里写:
- <Custom Target Eval>
- targets.push(opponents.aliveMembers()[0]);
- </Custom Target Eval>
复制代码 就会在使用该物品时选中对面第一个单位作为目标,根据源代码 747 行的信息,这里你可以使用的变量有:
var targets = []; // targets = 最终选中的目标列表(数组) var a = this.subject(); // a = user = subject = 使用者(搞一堆别名…… var user = this.subject(); var subject = this.subject(); if (this.isForOpponent()) { // 如果是对敌道具,则 b = target = 敌方单位,否则 b = target = 己方单位 var targetUnit = this.opponentsUnit(); } else { var targetUnit = this.friendsUnit(); } var b = targetUnit.smoothTarget(this._targetIndex); var target = targetUnit.smoothTarget(this._targetIndex); var s = $gameSwitches._data; // s = 开关 var v = $gameVariables._data; // v = 变量 var allies = this.friendsUnit(); // alies = friends = 所有己方单位 var friends = allies; var foes = this.opponentsUnit(); // foes = opponents = 所有敌方单位 var opponents = foes;
var targets = []; // targets = 最终选中的目标列表(数组)
var a = this.subject(); // a = user = subject = 使用者(搞一堆别名……
var user = this.subject();
var subject = this.subject();
if (this.isForOpponent()) { // 如果是对敌道具,则 b = target = 敌方单位,否则 b = target = 己方单位
var targetUnit = this.opponentsUnit();
} else {
var targetUnit = this.friendsUnit();
}
var b = targetUnit.smoothTarget(this._targetIndex);
var target = targetUnit.smoothTarget(this._targetIndex);
var s = $gameSwitches._data; // s = 开关
var v = $gameVariables._data; // v = 变量
var allies = this.friendsUnit(); // alies = friends = 所有己方单位
var friends = allies;
var foes = this.opponentsUnit(); // foes = opponents = 所有敌方单位
var opponents = foes;
|