From 8ec4b13afc9371527c18bad74379e0e02ae47b3a Mon Sep 17 00:00:00 2001 From: oc Date: Sat, 13 Apr 2019 00:52:41 +0800 Subject: [PATCH 1/4] Fix hatred decrease --- project/functions.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/functions.js b/project/functions.js index 4e4c0762..8ce11fa8 100644 --- a/project/functions.js +++ b/project/functions.js @@ -1205,7 +1205,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = var leftHp = core.status.hero.hp - (damage[x + "," + y] || 0); if (leftHp > 1) { // 上整/下整 - var value = Math.floor((leftHp + (core.flags.betweenAttackCeil ? 0 : 1)) / 2); + var value = Math.floor((leftHp + (core.flags.betweenAttackCeil ? 1 : 0)) / 2); damage[loc] = (damage[loc] || 0) + value; type[loc] = "夹击伤害"; } From 822a0deb5bec0bdecf9a48bf9e7f28a5097c5d13 Mon Sep 17 00:00:00 2001 From: oc Date: Sat, 13 Apr 2019 22:11:08 +0800 Subject: [PATCH 2/4] changefloor current position --- _server/MotaAction.g4 | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/_server/MotaAction.g4 b/_server/MotaAction.g4 index 4f38fe1e..98f8cdca 100644 --- a/_server/MotaAction.g4 +++ b/_server/MotaAction.g4 @@ -228,7 +228,8 @@ default : [null,"MT1",null,0,0,null,500,null] var toFloorId = IdString_0; if (Floor_List_0!='floorId') toFloorId = Floor_List_0; var loc = ', "loc": ['+Number_0+', '+Number_1+']'; -if (Stair_List_0!=='loc')loc = ', "stair": "'+Stair_List_0+'"'; +if (Stair_List_0==='now')loc = ''; +else if (Stair_List_0!=='loc')loc = ', "stair": "'+Stair_List_0+'"'; DirectionEx_List_0 = DirectionEx_List_0 && (', "direction": "'+DirectionEx_List_0+'"'); Int_0 = (Int_0!=='') ?(', "time": '+Int_0):''; Bool_0 = Bool_0 ?'':(', "ignoreChangeFloor": false'); @@ -1982,8 +1983,8 @@ Floor_List /*Floor_List ['floorId',':before',':next']*/; Stair_List - : '坐标'|'上楼梯'|'下楼梯' - /*Stair_List ['loc','upFloor','downFloor']*/; + : '坐标'|'上楼梯'|'下楼梯'|'保持不变' + /*Stair_List ['loc','upFloor','downFloor','now']*/; SetTextPosition_List : '不改变'|'距离顶部'|'居中'|'距离底部' @@ -2167,7 +2168,10 @@ ActionParser.prototype.parse = function (obj,type) { case 'changeFloor': if(!obj)obj={}; - if(!this.isset(obj.loc))obj.loc=[0,0]; + if(!this.isset(obj.loc)) { + obj.loc=[0,0]; + if (!this.isset(obj.stair)) obj.stair='now'; + } if (obj.floorId==':before'||obj.floorId==':next') { obj.floorType=obj.floorId; delete obj.floorId; From 12fe7147035ef03aa79a1a3b54bfa9503fda9b61 Mon Sep 17 00:00:00 2001 From: oc Date: Sun, 14 Apr 2019 13:11:55 +0800 Subject: [PATCH 3/4] disableShopOnDamage & consoleOpened isPC --- libs/control.js | 10 ++++++++++ libs/utils.js | 1 + 2 files changed, 11 insertions(+) diff --git a/libs/control.js b/libs/control.js index 674b163a..ca98964e 100644 --- a/libs/control.js +++ b/libs/control.js @@ -919,6 +919,7 @@ control.prototype.checkBlock = function () { core.status.hero.hp -= damage; core.drawTip("受到"+(core.status.checkBlock.type[loc]||"伤害")+damage+"点"); this._checkBlock_soundAndAnimate(x, y); + this._checkBlock_disableQuickShop(); if (core.status.hero.hp <= 0) { core.status.hero.hp=0; core.updateStatusBar(); @@ -935,6 +936,15 @@ control.prototype._checkBlock_soundAndAnimate = function (x,y) { core.drawAnimate("zone", x, y); } +control.prototype._checkBlock_disableQuickShop = function () { + // 禁用快捷商店 + if (core.flags.disableShopOnDamage) { + for (var shopId in core.status.shops) { + core.status.shops[shopId].visited = false; + } + } +} + ////// 阻击 ////// control.prototype._checkBlock_snipe = function (snipe) { if (!snipe || snipe.length == 0) return; diff --git a/libs/utils.js b/libs/utils.js index 9da86c95..a527f9e9 100644 --- a/libs/utils.js +++ b/libs/utils.js @@ -1005,6 +1005,7 @@ 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 From bb0307fdebcf2c0995e2c1c194d069c23876c936 Mon Sep 17 00:00:00 2001 From: oc Date: Sun, 14 Apr 2019 13:16:12 +0800 Subject: [PATCH 4/4] extraDamage --- libs/control.js | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/control.js b/libs/control.js index ca98964e..4288890f 100644 --- a/libs/control.js +++ b/libs/control.js @@ -920,6 +920,7 @@ control.prototype.checkBlock = function () { core.drawTip("受到"+(core.status.checkBlock.type[loc]||"伤害")+damage+"点"); this._checkBlock_soundAndAnimate(x, y); this._checkBlock_disableQuickShop(); + core.status.hero.statistics.extraDamage += damage; if (core.status.hero.hp <= 0) { core.status.hero.hp=0; core.updateStatusBar();