diff --git a/libs/control.js b/libs/control.js index 5a6dfad8..dfbc18d5 100644 --- a/libs/control.js +++ b/libs/control.js @@ -1049,9 +1049,9 @@ control.prototype.snipe = function (snipes) { } else { if (damage <= 0) color = '#00FF00'; - else if (damage < hero_hp / 3) color = '#FFFFFF'; - else if (damage < hero_hp * 2 / 3) color = '#FFFF00'; - else if (damage < hero_hp) color = '#FF7F00'; + else if (damage < core.status.hero.hp / 3) color = '#FFFFFF'; + else if (damage < core.status.hero.hp * 2 / 3) color = '#FFFF00'; + else if (damage < core.status.hero.hp) color = '#FF7F00'; else color = '#FF0000'; damage = core.formatBigNumber(damage); diff --git a/libs/core.js b/libs/core.js index ae680280..b78e1087 100644 --- a/libs/core.js +++ b/libs/core.js @@ -878,6 +878,11 @@ core.prototype.debug = function() { core.control.debug(); } +////// 重置当前地图 ////// +core.prototype.resetMap = function() { + core.maps.resetMap(); +} + ////// 开始播放 ////// core.prototype.startReplay = function (list) { core.control.startReplay(list); diff --git a/libs/maps.js b/libs/maps.js index d2575c2c..4b99a178 100644 --- a/libs/maps.js +++ b/libs/maps.js @@ -887,4 +887,13 @@ maps.prototype.drawAnimate = function (name, x, y, callback) { } draw(index++); }, 50); +} + +maps.prototype.resetMap = function() { + var floorId = core.status.floorId; + core.status.maps[floorId] = this.loadFloor(floorId); + this.drawMap(floorId, function() { + core.drawHero(core.getHeroLoc('direction'), core.getHeroLoc('x'), core.getHeroLoc('y'), 'stop'); + core.updateStatusBar(); + }) } \ No newline at end of file diff --git a/libs/utils.js b/libs/utils.js index c2de471b..bfa4cae6 100644 --- a/libs/utils.js +++ b/libs/utils.js @@ -168,18 +168,18 @@ utils.prototype.formatBigNumber = function (x) { if (!core.isset(x)) return '???'; var all = [ - {"val": 10e20, "c": "g"}, - {"val": 10e16, "c": "j"}, - {"val": 10e12, "c": "z"}, - {"val": 10e8, "c": "e"}, - {"val": 10e4, "c": "w"}, + {"val": 1e20, "c": "g"}, + {"val": 1e16, "c": "j"}, + {"val": 1e12, "c": "z"}, + {"val": 1e8, "c": "e"}, + {"val": 1e4, "c": "w"}, ] for (var i=0;i=10*one.val) { + if (x>=100*one.val) { var v = x/one.val; - return v.toFixed(Math.max(0, Math.floor(4-Math.log10(v)))) + one.c; + return v.toFixed(Math.max(0, Math.floor(4-Math.log10(v+1)))) + one.c; } } diff --git a/project/comment.js b/project/comment.js index 110fa113..835335bc 100644 --- a/project/comment.js +++ b/project/comment.js @@ -120,7 +120,8 @@ comment_c456ea59_6018_45ef_8bcc_211a24c627dc = }, "zoneSquare": { "_leaf": true, - "_type": "textarea", + "_type": "checkbox", + "_bool": "bool", "_data": "领域怪zoneSquare代表是否九宫格伤害" }, "range": { @@ -286,7 +287,7 @@ comment_c456ea59_6018_45ef_8bcc_211a24c627dc = "item_ratio": { "_leaf": true, "_type": "textarea", - "_range": "(thiseval==~~thiseval && thiseval>0)||thiseval==null", + "_range": "(thiseval==~~thiseval && thiseval>=0)||thiseval==null", "_data": "每一层的宝石/血瓶效果,即获得宝石和血瓶时框内\"ratio\"的值。" }, "firstArrive": {