Support Reborn
This commit is contained in:
parent
e5ab7bd0ce
commit
f97495a6b6
@ -59,6 +59,7 @@ enemys.prototype.getSpecialText = function (enemyId) {
|
||||
if (this.hasSpecial(special, 20)) text.push("无敌");
|
||||
if (this.hasSpecial(special, 21)) text.push("退化");
|
||||
if (this.hasSpecial(special, 22)) text.push("固伤");
|
||||
if (this.hasSpecial(special, 23)) text.push("重生");
|
||||
return text;
|
||||
}
|
||||
|
||||
@ -99,9 +100,10 @@ enemys.prototype.getSpecialHint = function (enemy, special) {
|
||||
case 20: return "无敌:勇士无法打败怪物,除非拥有十字架";
|
||||
case 21: return "退化:战斗后勇士永久下降"+(enemy.atkValue||0)+"点攻击和"+(enemy.defValue||0)+"点防御";
|
||||
case 22: return "固伤:战斗前,怪物对勇士造成"+(enemy.damage||0)+"点固定伤害,无视勇士魔防。";
|
||||
case 23: return "重生:怪物被击败后,角色转换楼层则怪物将再次出现";
|
||||
default: break;
|
||||
}
|
||||
return ""
|
||||
return "";
|
||||
}
|
||||
|
||||
////// 获得某个怪物的伤害 //////
|
||||
|
||||
@ -879,6 +879,13 @@ events.prototype.changeFloor = function (floorId, stair, heroLoc, time, callback
|
||||
}
|
||||
else core.setWeather();
|
||||
|
||||
core.status.maps[floorId].blocks.forEach(function(block) {
|
||||
if (core.isset(block.enable) && !block.enable && core.isset(block.event) && block.event.cls=='enemys'
|
||||
&& core.enemys.hasSpecial(core.material.enemys[block.event.id].special, 23)) {
|
||||
block.enable = true;
|
||||
}
|
||||
})
|
||||
|
||||
core.drawMap(floorId, function () {
|
||||
setTimeout(function() {
|
||||
if (core.isset(heroLoc.direction))
|
||||
|
||||
12
libs/maps.js
12
libs/maps.js
@ -721,16 +721,22 @@ maps.prototype.removeBlock = function (x, y, floorId) {
|
||||
////// 根据block的索引删除该块 //////
|
||||
maps.prototype.removeBlockById = function (index, floorId) {
|
||||
|
||||
var blocks = core.status.maps[floorId].blocks;
|
||||
var x=blocks[index].x, y=blocks[index].y;
|
||||
var blocks = core.status.maps[floorId].blocks, block = blocks[index];
|
||||
var x=blocks.x, y=blocks.y;
|
||||
|
||||
// 检查该点是否存在事件
|
||||
var event = core.floors[floorId].events[x+","+y];
|
||||
if (!core.isset(event))
|
||||
event = core.floors[floorId].changeFloor[x+","+y];
|
||||
|
||||
// 检查是否存在重生
|
||||
var isReborn = false;
|
||||
if (core.isset(block.event) && block.event.cls=='enemys'
|
||||
&& core.enemys.hasSpecial(core.material.enemys[block.event.id].special, 23))
|
||||
isReborn = true;
|
||||
|
||||
// 不存在事件,直接删除
|
||||
if (!core.isset(event)) {
|
||||
if (!isReborn && !core.isset(event)) {
|
||||
blocks.splice(index,1);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -218,7 +218,7 @@ data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
|
||||
"showBattleAnimateConfirm": true, // 是否在游戏开始时提供“是否开启战斗动画”的选项
|
||||
"battleAnimate": true, // 是否默认显示战斗动画;用户可以手动在菜单栏中开关
|
||||
"displayEnemyDamage": true, // 是否地图怪物显伤;用户可以手动在菜单栏中开关
|
||||
"displayExtraDamage": false, // 是否地图高级显伤(领域、夹击等);用户可以手动在菜单栏中开关
|
||||
"displayExtraDamage": true, // 是否地图高级显伤(领域、夹击等);用户可以手动在菜单栏中开关
|
||||
"enableGentleClick": true, // 是否允许轻触(获得面前物品)
|
||||
"potionWhileRouting": false, // 寻路算法是否经过血瓶;如果该项为false,则寻路算法会自动尽量绕过血瓶
|
||||
"enableViewMaps": true, // 是否支持在菜单栏中查看所有楼层的地图
|
||||
|
||||
@ -23,7 +23,7 @@ enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 =
|
||||
'yellowGuard': {'name': '初级卫兵', 'hp': 100, 'atk': 120, 'def': 0, 'money': 10, 'experience': 0, 'special': 0},
|
||||
'blueGuard': {'name': '中级卫兵', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0},
|
||||
'redGuard': {'name': '高级卫兵', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0},
|
||||
'swordsman': {'name': '双手剑士', 'hp': 100, 'atk': 120, 'def': 0, 'money': 6, 'experience': 0, 'special': 5},
|
||||
'swordsman': {'name': '双手剑士', 'hp': 100, 'atk': 120, 'def': 0, 'money': 6, 'experience': 0, 'special': [5,23]},
|
||||
'soldier': {'name': '冥战士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0},
|
||||
'yellowKnight': {'name': '金骑士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0},
|
||||
'redKnight': {'name': '红骑士', 'hp': 0, 'atk': 0, 'def': 0, 'money': 0, 'experience': 0, 'special': 0},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user