commit
cfa2f4f710
@ -67,6 +67,7 @@ HTML5 canvas制作的魔塔样板,支持全平台游戏!
|
|||||||
* [x] 事件:画面震动
|
* [x] 事件:画面震动
|
||||||
* [x] 事件:更新怪物数据
|
* [x] 事件:更新怪物数据
|
||||||
* [x] 移动事件和跳跃事件增加“不消失”选项
|
* [x] 移动事件和跳跃事件增加“不消失”选项
|
||||||
|
* [x] 获胜结局可以指定“不计入榜单”
|
||||||
* [x] 修改默认bgm
|
* [x] 修改默认bgm
|
||||||
* [x] 修复读档开启战斗动画等Bug
|
* [x] 修复读档开启战斗动画等Bug
|
||||||
* [x] 大量细节优化
|
* [x] 大量细节优化
|
||||||
|
|||||||
@ -969,14 +969,14 @@ return code;
|
|||||||
*/;
|
*/;
|
||||||
|
|
||||||
win_s
|
win_s
|
||||||
: '游戏胜利,结局' ':' EvalString? Newline
|
: '游戏胜利,结局' ':' EvalString? '不计入榜单' Bool Newline
|
||||||
|
|
||||||
|
|
||||||
/* win_s
|
/* win_s
|
||||||
tooltip : win: 获得胜利, 该事件会显示获胜页面, 并重新游戏
|
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
|
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 : [""]
|
default : ["",false]
|
||||||
var code = '{"type": "win", "reason": "'+EvalString_0+'"},\n';
|
var code = '{"type": "win", "reason": "'+EvalString_0+'", "norank": '+(Bool_0?1:0)+'},\n';
|
||||||
return code;
|
return code;
|
||||||
*/;
|
*/;
|
||||||
|
|
||||||
@ -1717,7 +1717,7 @@ ActionParser.prototype.parseAction = function() {
|
|||||||
break;
|
break;
|
||||||
case "win":
|
case "win":
|
||||||
this.next = MotaActionBlocks['win_s'].xmlText([
|
this.next = MotaActionBlocks['win_s'].xmlText([
|
||||||
data.reason,this.next]);
|
data.reason,data.norank?true:false,this.next]);
|
||||||
break;
|
break;
|
||||||
case "lose":
|
case "lose":
|
||||||
this.next = MotaActionBlocks['lose_s'].xmlText([
|
this.next = MotaActionBlocks['lose_s'].xmlText([
|
||||||
|
|||||||
@ -115,8 +115,8 @@ events.prototype.setInitData = function (hard) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
////// 游戏获胜事件 //////
|
////// 游戏获胜事件 //////
|
||||||
events.prototype.win = function (reason) {
|
events.prototype.win = function (reason, norank) {
|
||||||
return this.eventdata.win(reason);
|
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);
|
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('money', core.status.hero.money);
|
||||||
formData.append('experience', core.status.hero.experience);
|
formData.append('experience', core.status.hero.experience);
|
||||||
formData.append('steps', core.status.hero.steps);
|
formData.append('steps', core.status.hero.steps);
|
||||||
|
formData.append('norank', norank||0);
|
||||||
formData.append('seed', core.getFlag('seed'));
|
formData.append('seed', core.getFlag('seed'));
|
||||||
formData.append('totalTime', Math.floor(core.status.hero.statistics.totalTime/1000));
|
formData.append('totalTime', Math.floor(core.status.hero.statistics.totalTime/1000));
|
||||||
formData.append('route', core.encodeRoute(core.status.route));
|
formData.append('route', core.encodeRoute(core.status.route));
|
||||||
@ -776,14 +777,10 @@ events.prototype.doAction = function() {
|
|||||||
this.doAction();
|
this.doAction();
|
||||||
break;
|
break;
|
||||||
case "win":
|
case "win":
|
||||||
core.events.win(data.reason, function () {
|
core.events.win(data.reason, data.norank);
|
||||||
core.events.doAction();
|
|
||||||
});
|
|
||||||
break;
|
break;
|
||||||
case "lose":
|
case "lose":
|
||||||
core.events.lose(data.reason, function () {
|
core.events.lose(data.reason);
|
||||||
core.events.doAction();
|
|
||||||
});
|
|
||||||
break;
|
break;
|
||||||
case "function":
|
case "function":
|
||||||
{
|
{
|
||||||
|
|||||||
@ -50,7 +50,7 @@ functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
|||||||
core.events.afterLoadData();
|
core.events.afterLoadData();
|
||||||
},
|
},
|
||||||
////// 游戏获胜事件 //////
|
////// 游戏获胜事件 //////
|
||||||
"win" : function(reason) {
|
"win" : function(reason, norank) {
|
||||||
// 游戏获胜事件
|
// 游戏获胜事件
|
||||||
core.ui.closePanel();
|
core.ui.closePanel();
|
||||||
var replaying = core.status.replay.replaying;
|
var replaying = core.status.replay.replaying;
|
||||||
@ -61,7 +61,7 @@ functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
|||||||
core.drawText([
|
core.drawText([
|
||||||
"\t[" + (reason||"恭喜通关") + "]你的分数是${status:hp}。"
|
"\t[" + (reason||"恭喜通关") + "]你的分数是${status:hp}。"
|
||||||
], function () {
|
], function () {
|
||||||
core.events.gameOver(reason||'', replaying);
|
core.events.gameOver(reason||'', replaying, norank);
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user