Merge branch 'v2.0'
This commit is contained in:
commit
ce7fff343f
@ -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;
|
||||
|
||||
@ -919,6 +919,8 @@ 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();
|
||||
core.status.hero.statistics.extraDamage += damage;
|
||||
if (core.status.hero.hp <= 0) {
|
||||
core.status.hero.hp=0;
|
||||
core.updateStatusBar();
|
||||
@ -935,6 +937,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;
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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] = "夹击伤害";
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user