| 赞 | 0 |
| VIP | |
| 好人卡 | |
| 积分 | 1 |
| 经验 | |
| 最后登录 | 2017-9-12 |
| 在线时间 | 74 小时 |
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 74 小时
- 注册时间
- 2016-3-24
- 回帖
- 14
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
本帖最后由 洛林 于 2016-11-18 13:20 编辑
再动系统令灵感来自7龙传说。是指一个角色进入额外回合。在这个回合中,你可以输入指令,控制这个角色的行动,且只有这个角色可以行动,敌人和其他角色都不能行动。之后,继续进行正常的回合。
此外,额外回合不计数,也就是说不改变总回合数,也不影响状态持续时间。
一开始以为很麻烦,结果发现很简单……
首先,标记额外回合和行动者:
- BattleManager.IsExtraTurn = function() {
- return this._extra;
- };
- BattleManager.ExtraActor = function() {
- return this._extraActor;
- };
复制代码
额外回合中输入指令:
- BattleManager.startInput = function() {
- this._phase = 'input';
- if (this.IsExtraTurn()) {
- this._extraActor.makeActions();
- this.clearActor();
- return;
- }
- $gameParty.makeActions();
- $gameTroop.makeActions();
- this.clearActor();
- if (this._surprise || !$gameParty.canInput()) {
- this.startTurn();
- }
- };
复制代码
要让只有这一个单位可以行动,让GameParty只有这个角色就可以了
- Game_Party.prototype.allMembers = function() {
- if (BattleManager.IsExtraTurn()) {
- return [BattleManager.ExtraActor()];
- }
- return this._actors.map(function(id) {
- return $gameActors.actor(id);
- });
- };
复制代码
回到正常回合
- BattleManager.endTurn = function() {
- if (this.IsExtraTurn()) {
- this._extra = false;
- this.startTurn();
- return;
- }
- this._phase = 'turnEnd';
- this._preemptive = false;
- this._surprise = false;
- this.allBattleMembers().forEach(function(battler) {
- battler.onTurnEnd();
- this.refreshStatus();
- this._logWindow.displayAutoAffectedStatus(battler);
- this._logWindow.displayRegeneration(battler);
- }, this);
- };
复制代码
接口:
- Game_BattlerBase.prototype.TakeExtraTurn = function() {
- BattleManager._extra = true;
- BattleManager._extraActor = this;
- BattleManager.startInput();
- };
复制代码
使用时用 Actor.TakeExtraTurn() 即可。
最后,应该和其他的和战斗过程有关的插件是不兼容的。 |
|