V2.3.3
This commit is contained in:
parent
d4bf4ec029
commit
cd45e69ab0
@ -67,6 +67,7 @@ HTML5 canvas制作的魔塔样板,支持全平台游戏!
|
||||
* [x] 事件:画面震动
|
||||
* [x] 事件:更新怪物数据
|
||||
* [x] 移动事件和跳跃事件增加“不消失”选项
|
||||
* [x] 获胜结局可以指定“不计入榜单”
|
||||
* [x] 修改默认bgm
|
||||
* [x] 修复读档开启战斗动画等Bug
|
||||
* [x] 大量细节优化
|
||||
|
||||
@ -969,14 +969,14 @@ return code;
|
||||
*/;
|
||||
|
||||
win_s
|
||||
: '游戏胜利,结局' ':' EvalString? Newline
|
||||
: '游戏胜利,结局' ':' EvalString? '不计入榜单' Bool Newline
|
||||
|
||||
|
||||
/* win_s
|
||||
tooltip : win: 获得胜利, 该事件会显示获胜页面, 并重新游戏
|
||||
helpUrl : https://ckcz123.github.io/mota-js/#/event?id=win%EF%BC%9A%E8%8E%B7%E5%BE%97%E8%83%9C%E5%88%A9
|
||||
default : [""]
|
||||
var code = '{"type": "win", "reason": "'+EvalString_0+'"},\n';
|
||||
default : ["",false]
|
||||
var code = '{"type": "win", "reason": "'+EvalString_0+'", "norank": '+Bool_0+'},\n';
|
||||
return code;
|
||||
*/;
|
||||
|
||||
@ -1717,7 +1717,7 @@ ActionParser.prototype.parseAction = function() {
|
||||
break;
|
||||
case "win":
|
||||
this.next = MotaActionBlocks['win_s'].xmlText([
|
||||
data.reason,this.next]);
|
||||
data.reason,data.norank||false,this.next]);
|
||||
break;
|
||||
case "lose":
|
||||
this.next = MotaActionBlocks['lose_s'].xmlText([
|
||||
|
||||
@ -115,8 +115,8 @@ events.prototype.setInitData = function (hard) {
|
||||
}
|
||||
|
||||
////// 游戏获胜事件 //////
|
||||
events.prototype.win = function (reason) {
|
||||
return this.eventdata.win(reason);
|
||||
events.prototype.win = function (reason, norank) {
|
||||
return this.eventdata.win(reason, norank);
|
||||
}
|
||||
|
||||
////// 游戏失败事件 //////
|
||||
@ -125,7 +125,7 @@ events.prototype.lose = function (reason) {
|
||||
}
|
||||
|
||||
////// 游戏结束 //////
|
||||
events.prototype.gameOver = function (ending, fromReplay) {
|
||||
events.prototype.gameOver = function (ending, fromReplay, norank) {
|
||||
|
||||
// 清空图片和天气
|
||||
core.clearMap('animate', 0, 0, 416, 416);
|
||||
@ -188,6 +188,7 @@ events.prototype.gameOver = function (ending, fromReplay) {
|
||||
formData.append('money', core.status.hero.money);
|
||||
formData.append('experience', core.status.hero.experience);
|
||||
formData.append('steps', core.status.hero.steps);
|
||||
formData.append('norank', norank||0);
|
||||
formData.append('seed', core.getFlag('seed'));
|
||||
formData.append('totalTime', Math.floor(core.status.hero.statistics.totalTime/1000));
|
||||
formData.append('route', core.encodeRoute(core.status.route));
|
||||
@ -776,14 +777,10 @@ events.prototype.doAction = function() {
|
||||
this.doAction();
|
||||
break;
|
||||
case "win":
|
||||
core.events.win(data.reason, function () {
|
||||
core.events.doAction();
|
||||
});
|
||||
core.events.win(data.reason, data.norank);
|
||||
break;
|
||||
case "lose":
|
||||
core.events.lose(data.reason, function () {
|
||||
core.events.doAction();
|
||||
});
|
||||
core.events.lose(data.reason);
|
||||
break;
|
||||
case "function":
|
||||
{
|
||||
|
||||
@ -50,7 +50,7 @@ functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
core.events.afterLoadData();
|
||||
},
|
||||
////// 游戏获胜事件 //////
|
||||
"win" : function(reason) {
|
||||
"win" : function(reason, norank) {
|
||||
// 游戏获胜事件
|
||||
core.ui.closePanel();
|
||||
var replaying = core.status.replay.replaying;
|
||||
@ -61,7 +61,7 @@ functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
core.drawText([
|
||||
"\t[" + (reason||"恭喜通关") + "]你的分数是${status:hp}。"
|
||||
], function () {
|
||||
core.events.gameOver(reason||'', replaying);
|
||||
core.events.gameOver(reason||'', replaying, norank);
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user