| 赞 | 3 |
| VIP | |
| 好人卡 | |
| 积分 | 1 |
| 经验 | |
| 最后登录 | 2018-11-11 |
| 在线时间 | 306 小时 |
- 梦石
- 0
- 星屑
- 60
- 在线时间
- 306 小时
- 注册时间
- 2014-8-5
- 回帖
- 403
|
发表于 2016-1-3 18:59:02
|
显示全部楼层
本帖最后由 夏末渐离 于 2016-1-4 17:54 编辑
插件指令。
- /*:
- * @author XMJL
- *
- *
- * 一个自动战斗模式的开关插件。
- *
- * Plugin Command:
- * Auto add 0 # 队伍的第一位角色设为自动模式
- * Auto cut 0 # 队伍的第一位角色设为手动模式
- * Auto openAll # 队伍的所有人设为自动模式
- * Auto clearAll # 队伍的所有人设为普通模式
- *
- *
- * @help
- * Plugin Command:
- * Auto add 0 # Set first actor AutoModel.
- * Auto cut 0 # Set first actor NormalModel.
- * Auto openAll # All actor is AutoModel.
- * Auto clearAll # All actor is NormalModel
- *
- */
- (function()
- {
- Game_BattlerBase.prototype.isAutoBattle=function()
- {
- var normol = this.specialFlag(Game_BattlerBase.FLAG_ID_AUTO_BATTLE);
- return this._isAutoBattle || normol;
- }
- Game_Actor.prototype.autoBattleModel=function()
- {
- this._isAutoBattle = true;
- }
- Game_Actor.prototype.removeAutoBattleModel=function()
- {
- this._isAutoBattle=false;
- }
- var addOneAuto=function(actorId)
- {
- if(actorId<=$gameParty.members().length)
- $gameParty.members()[actorId].autoBattleModel();
- else
- return;
- }
- var cutOneAuto=function(actorId)
- {
- if(actorId<=$gameParty.members().length)
- $gameParty.members()[actorId].removeAutoBattleModel();
- else
- return;
- }
- var openAll=function()
- {
- for(var i=0;i<$gameParty.members().length;i++)
- $gameParty.members()[i].autoBattleModel();
- }
- var clearAll=function()
- {
- for(var i=0;i<$gameParty.members().length;i++)
- $gameParty.members()[i].removeAutoBattleModel();
- }
- var _Game_Interpreter_pluginCommand =
- Game_Interpreter.prototype.pluginCommand;
- Game_Interpreter.prototype.pluginCommand = function(command, args) {
- _Game_Interpreter_pluginCommand.call(this, command, args);
- if (command === 'Auto') {
- switch (args[0]) {
- case 'add':
- addOneAuto(Number(args[1]));
- break;
- case 'cut':
- cutOneAuto(Number(args[1]));
- break;
- case 'openAll':
- openAll();
- break;
- case 'clearAll':
- clearAll();
- break;
- }
- }
- };
- })();
复制代码
|
评分
-
查看全部评分
|