Fix from 秋橙

This commit is contained in:
ckcz123 2021-08-07 11:27:11 +08:00
parent f73208a9a7
commit 16b4bbfa2a
9 changed files with 55 additions and 45 deletions

View File

@ -3883,8 +3883,8 @@ Global_Attribute_List
/*Global_Attribute_List ['font','statusLeftBackground','statusTopBackground', 'toolsBackground', 'borderColor', 'statusBarColor', 'selectColor', 'floorChangingStyle', 'equipName']*/;
Global_Value_List
: '血网伤害'|'中毒伤害'|'衰弱效果'|'红宝石效果'|'蓝宝石效果'|'绿宝石效果'|'红血瓶效果'|'蓝血瓶效果'|'黄血瓶效果'|'绿血瓶效果'|'破甲比例'|'反击比例'|'净化比例'|'仇恨增加值'|'动画时间'
/*Global_Value_List ['lavaDamage','poisonDamage','weakValue', 'redGem', 'blueGem', 'greenGem', 'redPotion', 'bluePotion', 'yellowPotion', 'greenPotion', 'breakArmor', 'counterAttack', 'purify', 'hatred', 'animateSpeed']*/;
: '血网伤害'|'中毒伤害'|'衰弱效果'|'红宝石效果'|'蓝宝石效果'|'绿宝石效果'|'红血瓶效果'|'蓝血瓶效果'|'黄血瓶效果'|'绿血瓶效果'|'破甲比例'|'反击比例'|'净化比例'|'仇恨增加值'|'图块每帧时间'|'上下楼时间'
/*Global_Value_List ['lavaDamage','poisonDamage','weakValue', 'redGem', 'blueGem', 'greenGem', 'redPotion', 'bluePotion', 'yellowPotion', 'greenPotion', 'breakArmor', 'counterAttack', 'purify', 'hatred', 'animateSpeed', 'floorChangeTime']*/;
Global_Flag_List
@ -3956,7 +3956,7 @@ Id_List
/*Id_List ['flag','status','item', 'buff', 'switch', 'temp', 'global']*/;
EnemyId_List
: '生命'|'攻击'|'防御'|'金币'|'经验'|'加点'|'属性'|'名称'|'映射名'|'属性值'|'退化扣攻'|'退化扣防'|'不可炸'|'九宫格领域'|'领域范围'|'连击数'|'吸血到自身'|'固伤值'
: '生命'|'攻击'|'防御'|'金币'|'经验'|'加点'|'特殊属性'|'名称'|'映射名'|'属性值'|'退化扣攻'|'退化扣防'|'不可炸'|'九宫格领域'|'领域范围'|'连击数'|'吸血到自身'|'固伤值'
/*EnemyId_List ['hp','atk','def','money','exp','point','special','name','displayInBook','value','atkValue','defValue','notBomb','zoneSquare','range','n','add','damage']*/;
EnemyPoint_List

View File

@ -201,8 +201,8 @@ var comment_c456ea59_6018_45ef_8bcc_211a24c627dc = {
"zoneSquare": {
"_leaf": true,
"_type": "checkbox",
"_docs": "九宫格领域",
"_data": "领域或光环怪是否九宫格"
"_docs": "九宫格",
"_data": "领域、阻击、光环或捕捉怪是否九宫格"
},
"range": {
"_leaf": true,

View File

@ -939,20 +939,20 @@ actions.prototype._clickCenterFly = function (x, y) {
}
else {
core.playSound('操作失败');
core.drawTip('当前不能使用' + core.material.items['centerFly'].name);
core.drawTip('当前不能使用' + core.material.items['centerFly'].name, 'centerFly');
}
}
}
actions.prototype._keyUpCenterFly = function (keycode) {
core.ui.closePanel();
if (keycode == 51 || keycode == 13 || keycode == 32 || keycode == 67) {
if (keycode == 13 || keycode == 32 || keycode == 67) {
if (core.canUseItem('centerFly')) {
core.useItem('centerFly');
}
else {
core.playSound('操作失败');
core.drawTip('当前不能使用' + core.material.items['centerFly'].name);
core.drawTip('当前不能使用' + core.material.items['centerFly'].name, 'centerFly');
}
}
}
@ -975,13 +975,13 @@ actions.prototype._keyUpConfirmBox = function (keycode) {
}
if (keycode == 13 || keycode == 32 || keycode == 67) {
if (core.status.event.selection == 0 && core.status.event.data.yes) {
core.playSound('确定');
// core.playSound('确定');
core.status.event.selection = null;
core.status.event.data.yes();
return;
}
if (core.status.event.selection == 1 && core.status.event.data.no) {
core.playSound('确定');
// core.playSound('确定');
core.status.event.selection = null;
core.status.event.data.no();
return;
@ -2437,11 +2437,11 @@ actions.prototype._clickSettings = function (x, y) {
core.ui._drawSwitchs();
break;
case 1:
core.playSound('确定');
// core.playSound('确定');
core.ui._drawKeyBoard();
break;
case 2:
core.playSound('确定');
// core.playSound('确定');
core.clearUI();
core.ui._drawViewMaps();
break;
@ -2496,7 +2496,7 @@ actions.prototype._clickNotes = function (x, y) {
this._clickNotes_new();
break;
case 1:
core.playSound('确定');
// core.playSound('确定');
this._clickNotes_show();
break;
case 2:
@ -2504,6 +2504,7 @@ actions.prototype._clickNotes = function (x, y) {
this._clickNotes_edit();
break;
case 3:
core.playSound('确定');
this._clickNotes_delete();
break;
case 4:
@ -2539,6 +2540,7 @@ actions.prototype._clickNotes_new = function () {
}
actions.prototype._clickNotes_show = function () {
core.playSound('确定');
core.status.hero.notes = core.status.hero.notes || [];
var result = [];
for (var i = 0; i < core.status.hero.notes.length; i+=5) {
@ -2580,6 +2582,7 @@ actions.prototype._clickNotes_edit = function () {
actions.prototype._clickNotes_delete = function () {
core.status.hero.notes = core.status.hero.notes || [];
if (core.status.hero.notes.length == 0) {
core.stopSound();
core.playSound('操作失败');
core.drawText("当前没有存档笔记,无法删除!");
} else {
@ -2646,7 +2649,7 @@ actions.prototype._clickSyncSave = function (x, y) {
core.playSound('确定');
return this._clickSyncSave_readFile();
case 4:
core.playSound('确定');
// core.playSound('确定');
return this._clickSyncSave_replay();
case 5:
core.status.event.selection = 0;
@ -2786,7 +2789,7 @@ actions.prototype._clickStorageRemove = function (x, y) {
case 1:
return this._clickStorageRemove_current();
case 2:
core.status.event.selection = 6;
core.status.event.selection = 5;
core.playSound('取消');
core.ui._drawSyncSave();
break;
@ -3067,8 +3070,10 @@ actions.prototype._clickKeyBoard = function (x, y) {
if (x == m + 3) core.keyUp(13); // ENTER
if (x == m + 4) core.keyUp(46); // DEL
}
if (y == m + 4 && x >= m + 3 && x <= m + 5)
if (y == m + 4 && x >= m + 3 && x <= m + 5) {
core.playSound('取消');
core.ui.closePanel();
}
}
////// 光标界面时的点击操作 //////
@ -3087,25 +3092,25 @@ actions.prototype._clickCursor = function (x, y, px, py) {
actions.prototype._keyDownCursor = function (keycode) {
if (keycode == 37) { // left
core.status.automaticRoute.cursorX--;
core.playSound('确定');
core.playSound('光标移动');
core.ui._drawCursor();
return;
}
if (keycode == 38) { // up
core.status.automaticRoute.cursorY--;
core.playSound('确定');
core.playSound('光标移动');
core.ui._drawCursor();
return;
}
if (keycode == 39) { // right
core.status.automaticRoute.cursorX++;
core.playSound('确定');
core.playSound('光标移动');
core.ui._drawCursor();
return;
}
if (keycode == 40) { // down
core.status.automaticRoute.cursorY++;
core.playSound('确定');
core.playSound('光标移动');
core.ui._drawCursor();
return;
}

View File

@ -431,9 +431,7 @@ enemys.prototype._getCurrentEnemys_addEnemy = function (enemyId, enemys, used, x
if (x != null && y != null) {
e.locs = [[x, y]];
}
["name", "money", "exp", "point"].forEach(function (one) {
e[one] = core.getEnemyValue(enemy, one, x, y, floorId);
});
e.name = core.getEnemyValue(enemy, 'name', x, y, floorId);
e.specialText = specialText;
e.specialColor = specialColor;
e.damage = this.getDamage(enemy, x, y, floorId);

View File

@ -3500,6 +3500,6 @@ events.prototype.tryUseItem = function (itemId) {
core.useItem(itemId);
} else {
core.playSound('操作失败');
core.drawTip("当前无法使用" + core.material.items[itemId].name);
core.drawTip("当前无法使用" + core.material.items[itemId].name, itemId);
}
}

View File

@ -1744,7 +1744,7 @@ maps.prototype.stairExists = function (x, y, floorId) {
var blockId = this.getBlockId(x, y, floorId);
if (blockId == null) return false;
var ids = ['upFloor','downFloor'];
ids = ids.concat(['leftPortal','rightPortal','upPortal','downPortal']);
ids = ids.concat(['leftPortal','rightPortal','upPortal','downPortal','portal','starPortal']);
return ids.indexOf(blockId)>=0;
}

View File

@ -1952,6 +1952,7 @@ ui.prototype._drawStorageRemove = function () {
ui.prototype._drawReplay = function () {
core.lockControl();
core.status.event.id = 'replay';
core.playSound('打开界面');
this.drawChoices(null, [
"从头回放录像", "从存档开始回放", "接续播放剩余录像", "选择录像文件", "下载当前录像", "返回游戏"
]);
@ -2470,7 +2471,7 @@ ui.prototype._drawCenterFly = function () {
core.fillRect('ui', (toX - offsetX) * 32, (toY - offsetY) * 32, 32, 32, fillstyle);
core.status.event.data = {"x": toX, "y": toY, "posX": toX - offsetX, "posY": toY - offsetY};
core.playSound('打开界面');
core.drawTip("请确认当前"+core.material.items['centerFly'].name+"的位置");
core.drawTip("请确认当前"+core.material.items['centerFly'].name+"的位置", 'centerFly');
return;
}
@ -2499,6 +2500,7 @@ ui.prototype._drawViewMaps = function (index, x, y) {
}
ui.prototype._drawMaps_drawHint = function () {
core.playSound('打开界面');
core.fillRect('ui', 0, 0, this.PIXEL, this.PIXEL, 'rgba(0,0,0,0.4)');
core.setTextAlign('ui', 'center');
var stroke = function (left, top, width, height, fillStyle, lineWidth) {
@ -3012,6 +3014,7 @@ ui.prototype._drawKeyBoard = function () {
core.lockControl();
core.status.event.id = 'keyBoard';
core.clearUI();
core.playSound('打开界面');
var width = 384, height = 320;
var left = (this.PIXEL - width) / 2, right = left + width;
@ -3081,7 +3084,7 @@ ui.prototype._drawStatistics = function (floorIds) {
"\t[说明]1. 地图数据统计的效果仅模拟当前立刻获得该道具的效果。\n2. 不会计算“不可被浏览地图”的隐藏层的数据。\n" +
"3. 不会计算任何通过事件得到的道具(显示事件、改变图块、或直接增加道具等)。\n"+
"4. 在自定义道具例如其他宝石需在脚本编辑的drawStatistics中注册不然不会进行统计。\n"+
"5. 所有统计信息仅供参考,如有错误,概不负责。"
"5. 道具不会统计通过插入事件或useItemEvent实现的效果。\n6. 所有统计信息仅供参考,如有错误,概不负责。"
])
core.removeFlag("__replayText__");
}

View File

@ -196,7 +196,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
// 检查能否飞行
if (!core.status.maps[fromId].canFlyFrom || !core.status.maps[toId].canFlyTo || !core.hasVisitedFloor(toId)) {
core.playSound('操作失败');
core.drawTip("无法飞往" + core.status.maps[toId].title + "");
core.drawTip("无法飞往" + core.status.maps[toId].title + "", 'fly');
return false;
}
@ -510,7 +510,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
[15, "领域", function (enemy) { return "经过怪物周围" + (enemy.zoneSquare ? "九宫格" : "十字") + "范围内" + (enemy.range || 1) + "格时自动减生命" + (enemy.value || 0) + "点"; }, "#c677dd"],
[16, "夹击", "经过两只相同的怪物中间,勇士生命值变成一半", "#bb99ee"],
[17, "仇恨", "战斗前,怪物附加之前积累的仇恨值作为伤害;战斗后,释放一半的仇恨值。(每杀死一个怪物获得" + (core.values.hatred || 0) + "点仇恨值)", "#b0b666"],
[18, "阻击", function (enemy) { return "经过怪物的十字领域时自动减生命" + (enemy.value || 0) + "点,同时怪物后退一格"; }, "#8888e6"],
[18, "阻击", function (enemy) { return "经过怪物周围" + (enemy.zoneSquare ? "九宫格" : "十字") + "时自动减生命" + (enemy.value || 0) + "点,同时怪物后退一格"; }, "#8888e6"],
[19, "自爆", "战斗后勇士的生命值变成1", "#ff6666"],
[20, "无敌", "勇士无法打败怪物,除非拥有十字架", "#aaaaaa"],
[21, "退化", function (enemy) { return "战斗后勇士永久下降" + (enemy.atkValue || 0) + "点攻击和" + (enemy.defValue || 0) + "点防御"; }],
@ -519,7 +519,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
[24, "激光", function (enemy) { return "经过怪物同行或同列时自动减生命" + (enemy.value || 0) + "点"; }, "#dda0dd"],
[25, "光环", function (enemy) { return (enemy.range != null ? ((enemy.zoneSquare ? "该怪物九宫格" : "该怪物十字") + enemy.range + "格范围内") : "同楼层所有" ) + "怪物生命提升" + (enemy.value || 0) + "%,攻击提升" + (enemy.atkValue || 0) + "%,防御提升" + (enemy.defValue || 0) + "%" + (enemy.add ? "可叠加" : "不可叠加"); }, "#e6e099", 1],
[26, "支援", "当周围一圈的怪物受到攻击时将上前支援,并组成小队战斗。", "#77c0b6", 1],
[27, "捕捉", "当走到怪物周围十字时会强制进行战斗。", "#c0ddbb"]
[27, "捕捉", function (enemy) { return "当走到怪物周围" + (enemy.zoneSquare ? "九宫格" : "十字") + "时会强制进行战斗。"; }, "#c0ddbb"]
];
},
"getEnemyInfo": function (enemy, hero, x, y, floorId) {
@ -1308,9 +1308,10 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
// 阻击
// 如果要防止阻击伤害,可以直接简单的将 flag:no_repulse 设为true
if (enemy && core.hasSpecial(enemy.special, 18) && !core.hasFlag('no_repulse')) {
for (var dir in core.utils.scan) {
var nx = x + core.utils.scan[dir].x,
ny = y + core.utils.scan[dir].y,
var scan = enemy.zoneSquare ? core.utils.scan2 : core.utils.scan;
for (var dir in scan) {
var nx = x + scan[dir].x,
ny = y + scan[dir].y,
currloc = nx + "," + ny;
if (nx < 0 || nx >= width || ny < 0 || ny >= height) continue;
damage[currloc] = (damage[currloc] || 0) + (enemy.value || 0);
@ -1319,13 +1320,15 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
var rdir = core.turnDirection(":back", dir);
// 检查下一个点是否存在事件(从而判定是否移动)
var rnx = x + core.utils.scan[rdir].x,
rny = y + core.utils.scan[rdir].y;
if (core.canMoveHero(x, y, rdir, floorId) && core.getBlock(rnx, rny, floorId) == null) {
repulse[currloc] = (repulse[currloc] || []).concat([
[x, y, id, rdir]
]);
}
var rnx = x + scan[rdir].x,
rny = y + scan[rdir].y;
if (rnx < 0 || rnx >= width || rny < 0 || rny >= height) continue;
// 如需禁止阻击被推到已隐藏的事件处如重生怪处可将这一句的false改为true
if (core.getBlock(rnx, rny, floorId, false) != null) continue;
if (core.utils.scan[rdir] && core.canMoveHero(x, y, rdir, floorId)) continue;
repulse[currloc] = (repulse[currloc] || []).concat([
[x, y, id, rdir]
]);
}
}
@ -1353,12 +1356,13 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
// 捕捉
// 如果要防止捕捉效果,可以直接简单的将 flag:no_ambush 设为true
if (enemy && core.enemys.hasSpecial(enemy.special, 27) && !core.hasFlag("no_ambush")) {
var scan = enemy.zoneSquare ? core.utils.scan2 : core.utils.scan;
// 给周围格子加上【捕捉】记号
for (var dir in core.utils.scan) {
var nx = x + core.utils.scan[dir].x,
ny = y + core.utils.scan[dir].y,
for (var dir in scan) {
var nx = x + scan[dir].x,
ny = y + scan[dir].y,
currloc = nx + "," + ny;
if (nx < 0 || nx >= width || ny < 0 || ny >= height || !core.canMoveHero(x, y, dir, floorId)) continue;
if (nx < 0 || nx >= width || ny < 0 || ny >= height || (core.utils.scan[dir] && !core.canMoveHero(x, y, dir, floorId))) continue;
ambush[currloc] = (ambush[currloc] || []).concat([
[x, y, id, dir]
]);

View File

@ -180,7 +180,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
{ "type": "tip", "text": previewMode ? "预览模式下不可购买" : "购买条件不足" }
]
};
}).concat({ "text": "离开", "action": [{ "type": "break" }] });
}).concat({ "text": "离开", "action": [{ "type": "playSound", "name": "取消" }, { "type": "break" }] });
core.insertAction({ "type": "choices", "text": shop.text, "choices": choices });
}