设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 4462|回复: 1
打印 上一主题 下一主题

[搬运汉化] 死亡执行公共事件

[复制链接]

Lv3.寻梦者

梦石
0
星屑
2385
在线时间
912 小时
注册时间
2014-10-14
帖子
1331

开拓者

跳转到指定楼层
1
发表于 2020-11-23 20:56:29 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x


即使在战斗中被消灭,游戏也不会结束。
当参数指定的开关为ON时
如果在战斗中被消灭,游戏将不会结束,
移至地图屏幕后执行常见事件。

*未经作者许可,可以修改和重新分发,
*使用方式没有任何限制(商业用途,18种禁止使用等)。


RUBY 代码复制
  1. /*
  2. * --------------------------------------------------
  3. * MNKR_NoLose Ver.1.2.0
  4. * Copyright (c) 2020 Munokura
  5. * This software is released under the MIT license.
  6. * [url]http://opensource.org/licenses/mit-license.php[/url]
  7. * --------------------------------------------------
  8. */
  9.  
  10. /*:
  11. * @target MZ MV
  12. * @url [url]https://raw.githubusercontent.com/munokura/MNKR-MZ-plugins/master/MNKR_NoLose.js[/url]
  13. * @plugindesc 死亡执行公共事件。
  14. * @author munokura
  15. *
  16. * @param Switch Id
  17. * @text スイッチID
  18. * @type switch
  19. * @desc 発動させるスイッチID
  20. * @default 11
  21. *
  22. * @param Common Id
  23. * @type common_event
  24. * @text コモンイベントID
  25. * @desc 全滅時に実行するコモンイベント
  26. * 戦闘終了後にマップで実行されます。
  27. * @default 0
  28. *
  29. * @help
  30. * パラメーターで指定したスイッチがONの時、
  31. * 戦闘で全滅するとゲームオーバーにならず、
  32. * マップ画面へ移行後にコモンイベントを実行します。
  33. *
  34. * プラグインコマンドはありません。
  35. *
  36. *
  37. * 利用規約:
  38. *   MITライセンスです。
  39. *   [url]https://ja.osdn.net/projects/opensource/wiki/licenses%2FMIT_license[/url]
  40. *   作者に無断で改変、再配布が可能で、
  41. *   利用形態(商用、18禁利用等)についても制限はありません。
  42. */
  43.  
  44. (function() {
  45.     'use strict'
  46.  
  47.     const pluginName = 'MNKR_NoLose';
  48.     const parameters = PluginManager.parameters(pluginName);
  49.     const switchId = Number(parameters['Switch Id'] || 11);
  50.     const commonId = Number(parameters['Common Id'] || 0);
  51.  
  52.     const _BattleManager_setup = BattleManager.setup
  53.     BattleManager.setup = function(troopId, canEscape, canLose) {
  54.         _BattleManager_setup.apply(this, arguments);
  55.         if ($gameSwitches.value(switchId)) {
  56.             this._canLose = true;
  57.         }
  58.     }
  59.  
  60.     const _BattleManager_updateBattleEnd = BattleManager.updateBattleEnd
  61.     BattleManager.updateBattleEnd = function() {
  62.         _BattleManager_updateBattleEnd.call(this);
  63.         if ($gameSwitches.value(switchId) && commonId > 0) {
  64.             $gameTemp.reserveCommonEvent(commonId);
  65.         }
  66.     }
  67.  
  68. })()
------落尽红樱君不见,轻绘梨花泪沾衣。~~~
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2025-4-19 21:44

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表