moveOneStep in functions

This commit is contained in:
oc 2018-12-14 23:23:47 +08:00
parent 340cbe73a0
commit 86fbd7ae54
9 changed files with 50 additions and 16 deletions

View File

@ -658,6 +658,12 @@ var data_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"_type": "checkbox",
"_bool": "bool",
"_data": "是否在经过领域/夹击/路障等伤害后禁用快捷商店。"
},
"checkConsole": {
"_leaf": true,
"_type": "checkbox",
"_bool": "bool",
"_data": "是否检查控制台的开启情况。"
}
}
}

View File

@ -162,6 +162,12 @@ var functions_comment_c456ea59_6018_45ef_8bcc_211a24c627dc =
"_type": "textarea",
"_lint": true,
"_data": "阻激夹域的伤害值计算"
},
"moveOneStep": {
"_leaf": true,
"_type": "textarea",
"_lint": true,
"_data": "勇士每走一步的操作"
}
}
},

View File

@ -655,6 +655,13 @@ actions.prototype.longClick = function (x, y, fromEvent) {
core.doAction();
return true;
}
// 长按楼传器的箭头可以快速翻页
if (core.status.event.id=='fly') {
if ((x==10 || x==11) && (y==5 || y==9)) {
this.clickFly(x, y);
return true;
}
}
}
else if (!fromEvent) {
core.waitHeroToStop(function () {

View File

@ -387,6 +387,8 @@ control.prototype.resetStatus = function(hero, hard, floorId, route, maps, value
'currTime': 0,
'hp': 0,
"battle": 0,
'money': 0,
'experience': 0,
'battleDamage': 0,
'poisonDamage': 0,
'extraDamage': 0,
@ -1036,19 +1038,7 @@ control.prototype.jumpHero = function (ex, ey, time, callback) {
////// 每移动一格后执行的事件 //////
control.prototype.moveOneStep = function() {
core.status.hero.steps++;
// 中毒状态
if (core.hasFlag('poison')) {
core.status.hero.statistics.poisonDamage += core.values.poisonDamage;
core.status.hero.hp -= core.values.poisonDamage;
if (core.status.hero.hp<=0) {
core.status.hero.hp=0;
core.updateStatusBar();
core.events.lose();
return;
}
core.updateStatusBar();
}
return this.controldata.moveOneStep();
}
////// 停止勇士的一切行动等待勇士行动结束后再执行callback //////

View File

@ -1203,6 +1203,8 @@ events.prototype.doAction = function() {
////// 往当前事件列表之前添加一个或多个事件 //////
events.prototype.insertAction = function (action, x, y, callback) {
if (core.hasFlag("__statistics__")) return;
if (core.status.event.id != 'action') {
this.doEvents(action, x, y, callback);
}

View File

@ -2566,6 +2566,8 @@ ui.prototype.drawStatistics = function () {
var temp = core.clone(core.status.hero);
core.setFlag("__statistics__", true);
if (core.isset(total.count[id])) {
var hp=0, atk=0, def=0, mdef=0;
@ -2573,6 +2575,7 @@ ui.prototype.drawStatistics = function () {
var ratio = floor.item_ratio||1;
if (core.isset(core.items.itemEffect[id])) {
try {
// 需要检查是否是测试状态...
eval(core.items.itemEffect[id]);
}
catch (e) {}
@ -2673,7 +2676,8 @@ ui.prototype.drawStatistics = function () {
+",总游戏时长"+formatTime(statistics.totalTime)
+"。\n瞬间移动次数"+statistics.moveDirectly+",共计少走"+statistics.ignoreSteps+"步。"
+"\n\n总计通过血瓶恢复生命值为"+core.formatBigNumber(statistics.hp)+"点。\n\n"
+"总计打死了"+statistics.battle+"个怪物,受到的伤害为"+core.formatBigNumber(statistics.battleDamage+statistics.poisonDamage+statistics.extraDamage)
+"总计打死了"+statistics.battle+"个怪物,得到了"+core.formatBigNumber(statistics.money)+"金币,"+core.formatBigNumber(statistics.experience)+"点经验。\n\n"
+"受到的总伤害为"+core.formatBigNumber(statistics.battleDamage+statistics.poisonDamage+statistics.extraDamage)
+",其中战斗伤害"+core.formatBigNumber(statistics.battleDamage)+"点"
+(core.flags.enableDebuff?(",中毒伤害"+core.formatBigNumber(statistics.poisonDamage)+"点"):"")
+",领域/夹击/阻击/血网伤害"+core.formatBigNumber(statistics.extraDamage)+"点。",

View File

@ -839,9 +839,9 @@ utils.prototype.decodeCanvas = function (arr, width, height) {
}
utils.prototype.consoleOpened = function () {
if (!core.flags.checkConsole) return false;
if (window.Firebug && window.Firebug.chrome && window.Firebug.chrome.isInitialized)
return true;
if (!core.platform.isPC) return false;
var threshold = 160;
var zoom = Math.min(window.outerWidth/window.innerWidth, window.outerHeight/window.innerHeight);
return window.outerWidth - zoom*window.innerWidth > threshold

View File

@ -398,6 +398,7 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"canGoDeadZone": false,
"enableMoveDirectly": true,
"enableDisabledShop": true,
"disableShopOnDamage": false
"disableShopOnDamage": false,
"checkConsole": false
}
}

View File

@ -158,9 +158,11 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
if (core.hasItem('coin')) money *= 2;
if (core.hasFlag('curse')) money=0;
core.status.hero.money += money;
core.status.hero.statistics.money += money;
var experience =enemy.experience;
if (core.hasFlag('curse')) experience=0;
core.status.hero.experience += experience;
core.status.hero.statistics.experience += experience;
var hint = "打败 " + enemy.name;
if (core.flags.enableMoney)
hint += ",金币+" + money;
@ -1005,6 +1007,22 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
}
}
}
},
"moveOneStep": function () {
// 勇士每走一步后执行的操作
core.status.hero.steps++;
// 中毒状态:扣血
if (core.hasFlag('poison')) {
core.status.hero.statistics.poisonDamage += core.values.poisonDamage;
core.status.hero.hp -= core.values.poisonDamage;
if (core.status.hero.hp<=0) {
core.status.hero.hp=0;
core.updateStatusBar();
core.events.lose();
return;
}
core.updateStatusBar();
}
}
},
"ui": {