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

Project1

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

[已经解决] 如何在随机战斗全灭后不GameOver,传送到固定位置并回复1HP?

[复制链接]

Lv1.梦旅人

梦石
0
星屑
91
在线时间
24 小时
注册时间
2014-12-27
帖子
16
跳转到指定楼层
1
发表于 2017-5-10 19:59:35 | 只看该作者 |只看大图 回帖奖励 |倒序浏览 |阅读模式

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

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

x
如题,请问如何实现?

Lv3.寻梦者

梦石
0
星屑
3657
在线时间
1133 小时
注册时间
2017-4-6
帖子
278

开拓者

2
发表于 2017-5-10 21:50:29 | 只看该作者
这个插件好像并不能实现把HP变成1,死亡后会满状态复活,我本来是想死亡扣除相应金币的,所以想到了一个很笨的方法

在死亡后要出来的必经之路设置一个事件,扣除相应金币,扣除HP也可以这样

  1. // --------------------------------------
  2. // SOUL_MV_CathedralSystem.js
  3. // Author: Soulpour777
  4. // --------------------------------------
  5. /*:
  6. * @plugindesc siwanghouhuicheng
  7. * @
  8. *
  9. * @param Revival Map ID
  10. * @desc The map id of the map you will be revived at when you die.
  11. * @default 1
  12. *
  13. * @param Revival Map X
  14. * @desc The x coordinate of the actors when revived in the Revival Map.
  15. * @default 10
  16. *
  17. * @param Revival Map Y
  18. * @desc The y coordinate of the actors when revived in the Revival Map.
  19. * @default 12
  20. *
  21. * @param Revival Map Direction
  22. * @desc The direction faced by the actors when revived in the Revival Map.
  23. * @default 2
  24. *
  25. * @param Revival Map FadeType
  26. * @desc The fade type used when revived in the Revival Map.
  27. * @default 3
  28. *
  29. * @help

  30. =======================================
  31. Plugin Commands
  32. =======================================

  33. This is if you want to go directly to
  34. the cathedral even if you never died.
  35. This can be used both for debugging and
  36. eventing purposes.




  37. *
  38. */

  39. (function(){

  40.         var SOUL_MV = SOUL_MV || {};
  41.         SOUL_MV.CathedralRevival = SOUL_MV.CathedralRevival || {};

  42.         SOUL_MV.CathedralRevival.mapId = Number(PluginManager.parameters('SOUL_MV_CathedralSystem')['Revival Map ID'] || 18);
  43.         SOUL_MV.CathedralRevival.x = Number(PluginManager.parameters('SOUL_MV_CathedralSystem')['Revival Map X'] || 18);
  44.         SOUL_MV.CathedralRevival.y = Number(PluginManager.parameters('SOUL_MV_CathedralSystem')['Revival Map Y'] || 12);
  45.         SOUL_MV.CathedralRevival.direction = Number(PluginManager.parameters('SOUL_MV_CathedralSystem')['Revival Map Direction'] || 0);
  46.         SOUL_MV.CathedralRevival.fadeType = Number(PluginManager.parameters('SOUL_MV_CathedralSystem')['Revival Map FadeType'] || 1);

  47.         SOUL_MV.CathedralRevival.pluginCommand = Game_Interpreter.prototype.pluginCommand;
  48.         Game_Interpreter.prototype.pluginCommand = function(command, args) {
  49.             SOUL_MV.CathedralRevival.pluginCommand.call(this, command, args);
  50.             if (command === 'SOUL_MV') {
  51.                     switch(args[0]) {
  52.                             case 'cathedral':
  53.                                     SceneManager.push(Scene_Cathedral);
  54.                                     break;
  55.                     }
  56.             }
  57.         };


  58.         function Scene_Cathedral() {
  59.             this.initialize.apply(this, arguments);
  60.         }

  61.         Scene_Cathedral.prototype = Object.create(Scene_Base.prototype);
  62.         Scene_Cathedral.prototype.constructor = Scene_Cathedral;

  63.         Scene_Cathedral.prototype.initialize = function() {
  64.             Scene_Base.prototype.initialize.call(this);
  65.         };

  66.         Scene_Cathedral.prototype.create = function() {
  67.             Scene_Base.prototype.create.call(this);
  68.         };

  69.         Scene_Cathedral.prototype.start = function() {
  70.             Scene_Base.prototype.start.call(this);
  71.             this.startFadeIn(this.slowFadeSpeed(), false);
  72.         };

  73.         Scene_Cathedral.prototype.update = function() {
  74.             Scene_Base.prototype.update.call(this);
  75.             
  76.             for (var i = 0; i < $gameParty.members().length; i++) {
  77.                     $gameParty.members()[i].recoverAll();
  78.             }
  79.             var mapId = SOUL_MV.CathedralRevival.mapId;
  80.             var x = SOUL_MV.CathedralRevival.x;
  81.             var y = SOUL_MV.CathedralRevival.y;
  82.             var direction = SOUL_MV.CathedralRevival.direction;
  83.             var fadeType = SOUL_MV.CathedralRevival.fadeType;

  84.             $gamePlayer.reserveTransfer(mapId, x, y, direction, fadeType);
  85.             SceneManager.goto(Scene_Map);
  86.         };

  87.         Scene_Cathedral.prototype.stop = function() {
  88.             Scene_Base.prototype.stop.call(this);
  89.         };

  90.         Scene_Cathedral.prototype.terminate = function() {
  91.             Scene_Base.prototype.terminate.call(this);
  92.             AudioManager.stopAll();
  93.         };
  94.        
  95.         Scene_Base.prototype.checkGameover = function() {
  96.             if ($gameParty.isAllDead()) {
  97.                 SceneManager.goto(Scene_Cathedral);
  98.             }
  99.         };       

  100.         Game_Party.prototype.isAllDead = function() {
  101.             if (Game_Unit.prototype.isAllDead.call(this)) {
  102.                     if (DataManager.isBattleTest()) {
  103.                             return !this.isEmpty();
  104.                     } else {
  105.                             SceneManager.push(Scene_Cathedral);
  106.                     }
  107.                 
  108.             } else {
  109.                 return false;
  110.             }
  111.         };       
  112. })();
复制代码
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

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

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

GMT+8, 2024-5-5 16:26

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

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