Project1
标题:
如何在随机战斗全灭后不GameOver,传送到固定位置并回复1HP?
[打印本页]
作者:
thr0116
时间:
2017-5-10 19:59
标题:
如何在随机战斗全灭后不GameOver,传送到固定位置并回复1HP?
如题,请问如何实现?
作者:
夏的66rpg
时间:
2017-5-10 21:50
这个插件好像并不能实现把HP变成1,死亡后会满状态复活,我本来是想死亡扣除相应金币的,所以想到了一个很笨的方法
1234.JPG
(7.38 KB, 下载次数: 16)
下载附件
保存到相册
2017-5-10 21:49 上传
在死亡后要出来的必经之路设置一个事件,扣除相应金币,扣除HP也可以这样
// --------------------------------------
// SOUL_MV_CathedralSystem.js
// Author: Soulpour777
// --------------------------------------
/*:
* @plugindesc siwanghouhuicheng
* @
*
* @param Revival Map ID
* @desc The map id of the map you will be revived at when you die.
* @default 1
*
* @param Revival Map X
* @desc The x coordinate of the actors when revived in the Revival Map.
* @default 10
*
* @param Revival Map Y
* @desc The y coordinate of the actors when revived in the Revival Map.
* @default 12
*
* @param Revival Map Direction
* @desc The direction faced by the actors when revived in the Revival Map.
* @default 2
*
* @param Revival Map FadeType
* @desc The fade type used when revived in the Revival Map.
* @default 3
*
* @help
=======================================
Plugin Commands
=======================================
This is if you want to go directly to
the cathedral even if you never died.
This can be used both for debugging and
eventing purposes.
*
*/
(function(){
var SOUL_MV = SOUL_MV || {};
SOUL_MV.CathedralRevival = SOUL_MV.CathedralRevival || {};
SOUL_MV.CathedralRevival.mapId = Number(PluginManager.parameters('SOUL_MV_CathedralSystem')['Revival Map ID'] || 18);
SOUL_MV.CathedralRevival.x = Number(PluginManager.parameters('SOUL_MV_CathedralSystem')['Revival Map X'] || 18);
SOUL_MV.CathedralRevival.y = Number(PluginManager.parameters('SOUL_MV_CathedralSystem')['Revival Map Y'] || 12);
SOUL_MV.CathedralRevival.direction = Number(PluginManager.parameters('SOUL_MV_CathedralSystem')['Revival Map Direction'] || 0);
SOUL_MV.CathedralRevival.fadeType = Number(PluginManager.parameters('SOUL_MV_CathedralSystem')['Revival Map FadeType'] || 1);
SOUL_MV.CathedralRevival.pluginCommand = Game_Interpreter.prototype.pluginCommand;
Game_Interpreter.prototype.pluginCommand = function(command, args) {
SOUL_MV.CathedralRevival.pluginCommand.call(this, command, args);
if (command === 'SOUL_MV') {
switch(args[0]) {
case 'cathedral':
SceneManager.push(Scene_Cathedral);
break;
}
}
};
function Scene_Cathedral() {
this.initialize.apply(this, arguments);
}
Scene_Cathedral.prototype = Object.create(Scene_Base.prototype);
Scene_Cathedral.prototype.constructor = Scene_Cathedral;
Scene_Cathedral.prototype.initialize = function() {
Scene_Base.prototype.initialize.call(this);
};
Scene_Cathedral.prototype.create = function() {
Scene_Base.prototype.create.call(this);
};
Scene_Cathedral.prototype.start = function() {
Scene_Base.prototype.start.call(this);
this.startFadeIn(this.slowFadeSpeed(), false);
};
Scene_Cathedral.prototype.update = function() {
Scene_Base.prototype.update.call(this);
for (var i = 0; i < $gameParty.members().length; i++) {
$gameParty.members()[i].recoverAll();
}
var mapId = SOUL_MV.CathedralRevival.mapId;
var x = SOUL_MV.CathedralRevival.x;
var y = SOUL_MV.CathedralRevival.y;
var direction = SOUL_MV.CathedralRevival.direction;
var fadeType = SOUL_MV.CathedralRevival.fadeType;
$gamePlayer.reserveTransfer(mapId, x, y, direction, fadeType);
SceneManager.goto(Scene_Map);
};
Scene_Cathedral.prototype.stop = function() {
Scene_Base.prototype.stop.call(this);
};
Scene_Cathedral.prototype.terminate = function() {
Scene_Base.prototype.terminate.call(this);
AudioManager.stopAll();
};
Scene_Base.prototype.checkGameover = function() {
if ($gameParty.isAllDead()) {
SceneManager.goto(Scene_Cathedral);
}
};
Game_Party.prototype.isAllDead = function() {
if (Game_Unit.prototype.isAllDead.call(this)) {
if (DataManager.isBattleTest()) {
return !this.isEmpty();
} else {
SceneManager.push(Scene_Cathedral);
}
} else {
return false;
}
};
})();
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1