电摇嘲讽

This commit is contained in:
unanmed 2023-01-05 01:11:06 +08:00
parent 0b9360e55a
commit 33c147421e
14 changed files with 204 additions and 98 deletions

View File

@ -1502,7 +1502,6 @@ control.prototype.checkBlock = function () {
core.updateStatusBar(false, true);
}
}
this._checkBlock_ambush(core.status.checkBlock.ambush[loc]);
this._checkBlock_repulse(core.status.checkBlock.repulse[loc]);
};
@ -1533,42 +1532,6 @@ control.prototype._checkBlock_repulse = function (repulse) {
core.insertAction(actions);
};
////// 捕捉 //////
control.prototype._checkBlock_ambush = function (ambush) {
if (!ambush || ambush.length == 0) return;
// 捕捉效果
var actions = [];
ambush.forEach(function (t) {
actions.push({
type: 'move',
loc: [t[0], t[1]],
steps: [t[3]],
time: 250,
keep: false,
async: true
});
});
actions.push({ type: 'waitAsync' });
// 强制战斗
ambush.forEach(function (t) {
actions.push({
type: 'function',
function:
'function() { ' +
"core.battle('" +
t[2] +
"', " +
t[0] +
',' +
t[1] +
', true, core.doAction); ' +
'}',
async: true
});
});
core.insertAction(actions);
};
////// 更新全地图显伤 //////
control.prototype.updateDamage = function (floorId, ctx) {
floorId = floorId || core.status.floorId;
@ -1701,9 +1664,9 @@ control.prototype._updateDamage_extraDamage = function (floorId, onMap) {
});
} else {
// 检查捕捉
if (core.status.checkBlock.ambush[x + ',' + y]) {
if (core.status.checkBlock.mockery[x + ',' + y]) {
core.status.damage.extraData.push({
text: '!',
text: '',
px: 32 * x + 16,
py: 32 * (y + 1) - 14,
color: '#ffaa33',

View File

@ -1077,8 +1077,7 @@ maps.prototype._canMoveDirectly_checkNextPoint = function (blocksObj, x, y) {
// 是否存在阻激夹域伤害
if (core.status.checkBlock.damage[index]) return false;
if (core.status.checkBlock.repulse[index]) return false;
// 是否存在捕捉
if (core.status.checkBlock.ambush[index]) return false;
if (core.status.checkBlock.mockery[index]) return false;
return true;
};
@ -1175,8 +1174,7 @@ maps.prototype._automaticRoute_deepAdd = function (x, y, blocks) {
}
// 绕过存在伤害的地方
deepAdd += (core.status.checkBlock.damage[x + ',' + y] || 0) * 100;
// 绕过捕捉
if (core.status.checkBlock.ambush[x + ',' + y]) deepAdd += 1000;
deepAdd += core.status.checkBlock.mockery[`${x},${y}`] ? 1000 : 0;
return deepAdd;
};

View File

@ -1,10 +1,10 @@
var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 =
{
"greenSlime": {"name":"绿头怪","hp":100,"atk":11,"def":3,"money":0,"exp":1,"point":0,"special":[],"description":"一种极其低级的怪物,低级到普通人用手都可以打死。"},
"redSlime": {"name":"红头怪","hp":120,"atk":16,"def":6,"money":0,"exp":2,"point":0,"special":[],"value":10},
"blackSlime": {"name":"青头怪","hp":170,"atk":20,"def":8,"money":0,"exp":3,"point":0,"special":[]},
"slimelord": {"name":"粘液王","hp":200,"atk":58,"def":24,"money":0,"exp":8,"point":0,"special":[]},
"bat": {"name":"小蝙蝠","hp":60,"atk":15,"def":0,"money":0,"exp":2,"point":0,"special":[4]},
"redSlime": {"name":"红头怪","hp":120,"atk":16,"def":6,"money":0,"exp":2,"point":0,"special":[],"value":10,"description":"即使是最弱的怪物,也有进化的时候,对吧?"},
"blackSlime": {"name":"青头怪","hp":170,"atk":20,"def":8,"money":0,"exp":3,"point":0,"special":[],"description":"看,这就是最弱的怪物进化出的最强的怪物之一了"},
"slimelord": {"name":"粘液王","hp":200,"atk":58,"def":24,"money":0,"exp":8,"point":0,"special":[],"description":"看上去黏糊糊的,实际也确实黏糊糊的,据说是史莱姆族的长老级人物"},
"bat": {"name":"小蝙蝠","hp":60,"atk":15,"def":0,"money":0,"exp":2,"point":0,"special":[4],"description":"经常出现在山洞中,再平常不过了。但是这次它却有了攻击性。"},
"bigBat": {"name":"大蝙蝠","hp":150,"atk":17,"def":5,"money":0,"exp":4,"point":0,"special":[4],"crit":0,"charge":0,"courage":0,"together":0,"hungry":0,"value":100,"n":1000},
"redBat": {"name":"恐怖蝙蝠","hp":1200,"atk":260,"def":110,"money":1,"exp":32,"point":0,"special":[5]},
"vampire": {"name":"冥灵魔王","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
@ -32,7 +32,7 @@ var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 =
"demonPriest": {"name":"魔神法师","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
"goldHornSlime": {"name":"尖角怪","hp":1500,"atk":366,"def":166,"money":1,"exp":35,"point":0,"special":[]},
"silverSlime": {"name":"银头怪","hp":250,"atk":50,"def":20,"money":0,"exp":11,"point":0,"special":[2]},
"whiteHornSlime": {"name":"尖角怪","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
"whiteHornSlime": {"name":"恐怖尖角怪","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
"redSwordsman": {"name":"山间盗贼","hp":1000,"atk":175,"def":40,"money":1,"exp":24,"point":0,"special":[4],"n":8},
"poisonZombie": {"name":"绿兽人","hp":100,"atk":120,"def":0,"money":13,"exp":0,"point":0,"special":[12]},
"octopus": {"name":"血影","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
@ -68,7 +68,7 @@ var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 =
"bowman": {"name":"猎人","hp":500,"atk":100,"def":50,"money":0,"exp":16,"point":0,"special":[24],"value":75},
"liteBowman": {"name":"山间猎手","hp":1200,"atk":200,"def":60,"money":1,"exp":27,"point":0,"special":[24]},
"crimsonZombie": {"name":"勇气之兽","hp":1800,"atk":2000,"def":-100,"money":1,"exp":35,"point":0,"special":[]},
"watcherSlime": {"name":"邪眼怪","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
"watcherSlime": {"name":"邪眼史莱姆","hp":5000,"atk":900,"def":600,"money":1,"exp":50,"point":0,"special":[17]},
"mutantSlimeman": {"name":"变异史莱姆人","hp":350,"atk":70,"def":27,"money":0,"exp":13,"point":0,"special":[]},
"devilKnight": {"name":"恶灵骑士","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
"grayPriest": {"name":"智慧法王","hp":3000,"atk":600,"def":250,"money":1,"exp":40,"point":0,"special":[13]},
@ -122,5 +122,9 @@ var enemys_fcae963b_31c9_42b4_b48c_bb48d09f3f80 =
"E549": {"name":"智慧之史","hp":1000,"atk":1000,"def":100,"money":1,"exp":35,"point":0,"special":[1],"crit":10000},
"E550": {"name":"智慧之兔","hp":1500,"atk":600,"def":200,"money":1,"exp":35,"point":0,"special":[8],"together":20},
"E556": {"name":"智慧之姆","hp":3000,"atk":800,"def":200,"money":1,"exp":45,"point":0,"special":[8],"together":20},
"E557": {"name":"智慧之神","hp":10000,"atk":2000,"def":800,"money":10,"exp":500,"point":0,"special":[]}
"E557": {"name":"智慧之神","hp":10000,"atk":2000,"def":800,"money":10,"exp":500,"point":0,"special":[]},
"E561": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
"E562": {"name":"嘲讽剑客","hp":2000,"atk":1500,"def":600,"money":1,"exp":50,"point":0,"special":[19]},
"E563": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]},
"E564": {"name":"新敌人","hp":0,"atk":0,"def":0,"money":0,"exp":0,"point":0,"special":[]}
}

View File

@ -29,7 +29,10 @@ main.floors.MT22=
],
"3,9": [
"第二章的加点已开启,可以在技能树的前置技能下方选择",
"如果你玩过上个版本,直接跳到了本章,记得查看背包里面的各种道具,尤其是百科全书"
"如果你玩过上个版本,直接跳到了本章,记得查看背包里面的各种道具,尤其是百科全书,同时注意左边是你来的方向,那里还有些怪物"
],
"7,9": [
"对于电摇嘲讽的怪物,当一个点可以被多个怪物嘲讽时,会优先选择最靠左上角的怪物。其次,在进入嘲讽区域之前会自动存档"
]
},
"changeFloor": {
@ -58,7 +61,7 @@ main.floors.MT22=
[142,142,482,482,492, 0, 0,484, 0,494,484,491,484,143,143],
[142,142,142,142,142, 0, 0, 0, 0,143,143,143,143,143,143],
[ 92, 0, 0, 0,441, 0, 0,484, 0, 0, 0, 0, 0,143,143],
[143,143, 0,129, 0, 0, 0, 0, 0, 0, 0, 0, 0,143,143],
[143,143, 0,129, 0, 0, 0,129, 0, 0, 0, 0, 0,143,143],
[143,143,492,143,492,143,492,143,492,143,492,143,492,143,143],
[143,143,482,143,482,143,482,143,482,143,482,143,482,143,143],
[143,143,482,143,482,143,482,143,482,143,482,143,482,143,143],

View File

@ -36,8 +36,8 @@ main.floors.MT23=
"map": [
[143,143,143,143,143,143,143,143,143,143,143,143, 91,143,143],
[143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,143],
[143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94],
[143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,143],
[143, 0,275, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 94],
[143, 0,562, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,143],
[ 92, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,143],
[143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,143],
[143, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,143],

View File

@ -424,6 +424,9 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
if (core.getFlag('bladeOn') && core.getFlag('blade')) {
core.setFlag('blade', false);
}
if (core.getFlag('shieldOn') && core.getFlag('shield')) {
core.setFlag('shield', false);
}
// 事件的处理
var todo = [];
@ -447,11 +450,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
);
}
core.push(todo, enemy.afterBattle);
if (
core.status.hero.loc.direction == 'up' ||
core.status.hero.loc.direction == 'down'
)
core.insertAction([{ type: 'moveAction' }]);
// 在这里增加其他的自定义事件需求
/*
if (enemyId=='xxx') {
@ -694,14 +693,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
'经过两只相同的怪物中间,勇士生命值变成一半',
'#bb99ee'
],
[
17,
'仇恨',
'战斗前,怪物附加之前积累的仇恨值作为伤害;战斗后,释放一半的仇恨值。(每杀死一个怪物获得' +
(core.values.hatred || 0) +
'点仇恨值)',
'#b0b666'
],
[17, '先攻', '战斗时怪物首先攻击', '#b0b666'],
[
18,
'阻击',
@ -714,7 +706,12 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
},
'#8888e6'
],
[19, '自爆', '战斗后勇士的生命值变成1', '#ff6666'],
[
19,
'电摇嘲讽',
'当勇士移动到怪物同行或同列时,勇士会直接冲向怪物,撞碎路上的所有地形和门,拾取路上的道具,与路上的怪物以及该怪物战斗',
'#ff6666'
],
[20, '无敌', '勇士无法打败怪物,除非拥有十字架', '#aaaaaa'],
[
21,
@ -990,6 +987,9 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
// 战斗伤害不能为负值
if (per_damage < 0) per_damage = 0;
// 先攻
if (core.hasSpecial(mon_special, 17)) damage += per_damage;
// 2连击 & 3连击 & N连击
if (core.hasSpecial(mon_special, 4)) per_damage *= 2;
if (core.hasSpecial(mon_special, 5)) per_damage *= 3;
@ -1431,7 +1431,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
var damage = {}, // 每个点的伤害值
type = {}, // 每个点的伤害类型
repulse = {}, // 每个点的阻击怪信息
ambush = {}; // 每个点的捕捉信息
mockery = {}; // 电摇嘲讽
var betweenAttackLocs = {}; // 所有可能的夹击点
var needCache = false;
var canGoDeadZone = core.flags.canGoDeadZone;
@ -1528,7 +1528,6 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
}
}
// 射击
// 如果要防止激光伤害,可以直接简单的将 flag:no_laser 设为true
if (enemy && core.hasSpecial(enemy.special, 24)) {
var beyondVisual = false;
for (var nx = 0; nx < width; nx++) {
@ -1618,6 +1617,22 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
}
}
// 电摇嘲讽
if (enemy && core.hasSpecial(enemy.special, 19)) {
for (let nx = 0; nx < width; nx++) {
if (!core.noPass(nx, y)) {
mockery[`${nx},${y}`] ??= [];
mockery[`${nx},${y}`].push([x, y]);
}
}
for (let ny = 0; ny < height; ny++) {
if (!core.noPass(x, ny)) {
mockery[`${x},${ny}`] ??= [];
mockery[`${x},${ny}`].push([x, y]);
}
}
}
// 夹击;在这里提前计算所有可能的夹击点,具体计算逻辑在下面
// 如果要防止夹击伤害,可以简单的将 flag:no_betweenAttack 设为true
if (
@ -1721,7 +1736,7 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a = {
damage: damage,
type: type,
repulse: repulse,
ambush: ambush,
mockery,
needCache: needCache,
cache: {}, // clear cache
haveHunt: haveHunt

View File

@ -327,7 +327,11 @@ var icons_4665ee12_3a1f_44a4_bea3_0fccba634dc1 =
"E549": 115,
"E550": 116,
"E556": 117,
"E557": 118
"E557": 118,
"E561": 119,
"E562": 120,
"E563": 121,
"E564": 122
},
"enemy48": {
"angel": 0,

View File

@ -97,8 +97,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "红血瓶",
"text": ",生命+${core.values.redPotion}",
"itemEffect": "core.status.hero.hp += 100 * core.status.thisMap.ratio",
"itemEffectTip": ",生命+${100 * core.status.thisMap.ratio}",
"itemEffect": "core.status.hero.hp += 100 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)",
"itemEffectTip": ",生命+${100 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)}",
"useItemEffect": "core.status.hero.hp += core.values.redPotion",
"canUseItemEffect": "true"
},
@ -106,8 +106,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "蓝血瓶",
"text": ",生命+${core.values.bluePotion}",
"itemEffect": "core.status.hero.hp += 200 * core.status.thisMap.ratio",
"itemEffectTip": ",生命+${200 * core.status.thisMap.ratio}",
"itemEffect": "core.status.hero.hp += 200 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)",
"itemEffectTip": ",生命+${200 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)}",
"useItemEffect": "core.status.hero.hp += core.values.bluePotion",
"canUseItemEffect": "true"
},
@ -115,8 +115,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "黄血瓶",
"text": ",生命+${core.values.yellowPotion}",
"itemEffect": "core.status.hero.hp += 400 * core.status.thisMap.ratio",
"itemEffectTip": ",生命+${400 * core.status.thisMap.ratio}",
"itemEffect": "core.status.hero.hp += 400 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)",
"itemEffectTip": ",生命+${400 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)}",
"useItemEffect": "core.status.hero.hp += core.values.yellowPotion",
"canUseItemEffect": "true"
},
@ -124,8 +124,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "绿血瓶",
"text": ",生命+${core.values.greenPotion}",
"itemEffect": "core.status.hero.hp += 800 * core.status.thisMap.ratio",
"itemEffectTip": ",生命+${800 * core.status.thisMap.ratio}",
"itemEffect": "core.status.hero.hp += 800 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)",
"itemEffectTip": ",生命+${800 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)}",
"useItemEffect": "core.status.hero.hp += core.values.greenPotion",
"canUseItemEffect": "true"
},
@ -1180,8 +1180,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "大红血瓶",
"text": ",生命+${core.values.redPotion}",
"itemEffect": "core.status.hero.hp += 1000 * core.status.thisMap.ratio",
"itemEffectTip": ",生命+${1000 * core.status.thisMap.ratio}",
"itemEffect": "core.status.hero.hp += 1000 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)",
"itemEffectTip": ",生命+${1000 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)}",
"useItemEffect": "core.status.hero.hp += core.values.redPotion",
"canUseItemEffect": "true"
},
@ -1193,8 +1193,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "大蓝血瓶",
"text": ",生命+${core.values.redPotion}",
"itemEffect": "core.status.hero.hp += 2000 * core.status.thisMap.ratio",
"itemEffectTip": ",生命+${2000 * core.status.thisMap.ratio}",
"itemEffect": "core.status.hero.hp += 2000 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)",
"itemEffectTip": ",生命+${2000 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)}",
"useItemEffect": "core.status.hero.hp += core.values.redPotion",
"canUseItemEffect": "true"
},
@ -1210,8 +1210,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "大绿血瓶",
"text": ",生命+${core.values.redPotion}",
"itemEffect": "core.status.hero.hp += 8000 * core.status.thisMap.ratio",
"itemEffectTip": ",生命+${8000 * core.status.thisMap.ratio}",
"itemEffect": "core.status.hero.hp += 8000 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)",
"itemEffectTip": ",生命+${8000 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)}",
"useItemEffect": "core.status.hero.hp += core.values.redPotion",
"canUseItemEffect": "true"
},
@ -1231,8 +1231,8 @@ var items_296f5d02_12fd_4166_a7c1_b5e830c9ee3a =
"cls": "items",
"name": "大黄血瓶",
"text": ",生命+${core.values.redPotion}",
"itemEffect": "core.status.hero.hp += 4000 * core.status.thisMap.ratio",
"itemEffectTip": ",生命+${4000 * core.status.thisMap.ratio}",
"itemEffect": "core.status.hero.hp += 4000 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)",
"itemEffectTip": ",生命+${4000 * core.status.thisMap.ratio * (1 + core.getSkillLevel(13) / 50)}",
"useItemEffect": "core.status.hero.hp += core.values.redPotion",
"canUseItemEffect": "true"
},

View File

@ -485,6 +485,10 @@ var maps_90f36752_8815_4be8_b32b_d7fad1d0542e =
"558": {"cls":"items","id":"I558"},
"559": {"cls":"items","id":"I559"},
"560": {"cls":"items","id":"I560"},
"561": {"cls":"enemys","id":"E561"},
"562": {"cls":"enemys","id":"E562"},
"563": {"cls":"enemys","id":"E563"},
"564": {"cls":"enemys","id":"E564"},
"20037": {"cls":"tileset","id":"X20037","cannotOut":["up","left"],"cannotIn":["up","left"]},
"20038": {"cls":"tileset","id":"X20038","cannotOut":["up"],"cannotIn":["up"]},
"20039": {"cls":"tileset","id":"X20039","cannotOut":["up","right"],"cannotIn":["up","right"]},

Binary file not shown.

Before

Width:  |  Height:  |  Size: 117 KiB

After

Width:  |  Height:  |  Size: 123 KiB

View File

@ -2227,7 +2227,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
damaged[loc + direction] = true;
core.drawHeroAnimate('hand');
core.status.hero.hp -= 1000;
core.addPop(x * 32 + 16, y * 32 + 16, 1000);
core.addPop(x * 32 + 16, y * 32 + 16, -1000);
core.updateStatusBar();
if (core.status.hero.hp < 0) {
clearInterval(skill1);
@ -2245,7 +2245,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
damaged[loc + direction] = true;
core.drawHeroAnimate('hand');
core.status.hero.hp -= 1000;
core.addPop(x * 32 + 16, y * 32 + 16, 1000);
core.addPop(x * 32 + 16, y * 32 + 16, -1000);
core.updateStatusBar();
if (core.status.hero.hp < 0) {
clearInterval(skill1);
@ -2376,7 +2376,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
if (x == locs[index][0] && y == locs[index][1]) {
core.drawHeroAnimate('hand');
core.status.hero.hp -= 5000;
core.addPop(x * 32 + 16, y * 32 + 16, 5000);
core.addPop(x * 32 + 16, y * 32 + 16, -5000);
core.updateStatusBar();
if (core.status.hero.hp < 0) {
core.status.hero.hp = 0;
@ -2552,7 +2552,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
hy = core.status.hero.loc.y;
if (Math.abs(hx - x) <= 1 && Math.abs(hy - y) <= 1) {
core.status.hero.hp -= 3000 * power;
core.addPop(x * 32 + 16, y * 32 + 16, 3000 * power);
core.addPop(x * 32 + 16, y * 32 + 16, -3000 * power);
core.updateStatusBar();
if (core.status.hero.hp < 0) {
core.status.hero.hp = 0;
@ -2720,7 +2720,11 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
) {
damaged[i] = true;
core.status.hero.hp -= 3000;
core.addPop(x * 32 + 16, y * 32 + 16, 3000);
core.addPop(
x * 32 + 16,
y * 32 + 16,
-3000
);
core.updateStatusBar();
core.playSound('electron.mp3');
if (core.status.hero.hp < 0) {
@ -3291,7 +3295,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
hy = core.status.hero.loc.y;
if (loc[0] == hx && loc[1] == hy) {
core.status.hero.hp -= 3000;
core.addPop(x * 32 + 16, y * 32 + 16, 3000);
core.addPop(x * 32 + 16, y * 32 + 16, -3000);
core.updateStatusBar();
if (core.status.hero.hp < 0) {
core.status.hero.hp = 0;
@ -3336,7 +3340,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
loc2[1];
if (n1 * n2 <= 0) {
core.status.hero.hp -= damage;
core.addPop(x * 32 + 16, y * 32 + 16, damage);
core.addPop(x * 32 + 16, y * 32 + 16, -damage);
core.updateStatusBar();
core.playSound('electron.mp3');
if (core.status.hero.hp < 0) {
@ -3362,7 +3366,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
loc2[1];
if (n1 * n2 <= 0) {
core.status.hero.hp -= damage;
core.addPop(x * 32 + 16, y * 32 + 16, damage);
core.addPop(x * 32 + 16, y * 32 + 16, -damage);
core.updateStatusBar();
core.playSound('electron.mp3');
if (core.status.hero.hp < 0) {
@ -3380,7 +3384,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
popupDamage: function () {
// 伤害弹出
// 复写阻激夹域检测
control.prototype.checkBlock = function () {
control.prototype.checkBlock = function (forceMockery) {
var x = core.getHeroLoc('x'),
y = core.getHeroLoc('y'),
loc = x + ',' + y;
@ -3410,9 +3414,86 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = {
core.updateStatusBar();
}
}
this._checkBlock_ambush(core.status.checkBlock.ambush[loc]);
this._checkBlock_repulse(core.status.checkBlock.repulse[loc]);
checkMockery(loc, forceMockery);
};
control.prototype.moveHero = function (direction, callback) {
// 如果正在移动直接return
if (core.status.heroMoving != 0) return;
if (core.isset(direction)) core.setHeroLoc('direction', direction);
const nx = core.nextX();
const ny = core.nextY();
if (core.status.checkBlock.mockery[`${nx},${ny}`]) {
core.autosave();
}
if (callback) return this.moveAction(callback);
this._moveHero_moving();
};
function checkMockery(loc, force) {
if (core.status.lockControl && !force) return;
const mockery = core.status.checkBlock.mockery[loc];
if (mockery) {
mockery.sort((a, b) =>
a[0] === b[0] ? a[1] - b[1] : a[0] - b[0]
);
const action = [];
const [tx, ty] = mockery[0];
let { x, y } = core.status.hero.loc;
const dir =
x > tx ? 'left' : x < tx ? 'right' : y > ty ? 'up' : 'down';
const { x: dx, y: dy } = core.utils.scan[dir];
action.push({ type: 'changePos', direction: dir });
const blocks = core.getMapBlocksObj();
while (1) {
x += dx;
y += dy;
const block = blocks[`${x},${y}`];
if (block) {
block.event.cls === '';
if (
[
'animates',
'autotile',
'tileset',
'npcs',
'npc48'
].includes(block.event.cls)
) {
action.push(
{
type: 'hide',
loc: [[x, y]],
remove: true,
time: 0
},
{
type: 'animate',
name: 'hand',
loc: [x, y],
async: true
}
);
}
if (block.event.cls.startsWith('enemy')) {
action.push({ type: 'moveAction' });
}
}
action.push({ type: 'moveAction' });
if (x === tx && y === ty) break;
}
action.push({
type: 'function',
function: `function() { core.checkBlock(true); }`
});
action.push({ type: 'stopAsync' });
core.insertAction(action);
}
}
},
hotReload: function () {
if (main.mode !== 'play' || main.replayChecking) return;

View File

@ -33,6 +33,28 @@
"同时,几乎所有 ui 的退出按钮都在左上角。"
]
},
"about": {
"text": "关于游戏",
"condition": "true",
"desc": [
"使用样板Vite 魔塔样板",
"<br>",
"样板版本V2.10.0",
"<br>",
"游戏开源地址:<a href=\"https://github.com/unanmed/HumanBreak\" target=\"_blank\">",
"https://github.com/unanmed/HumanBreak</a>",
"<br>",
"游戏作者:古祠",
"<br>",
"BGM来源网易云音乐",
"<br>",
"素材来源:大素材库、爱给网、网站素材库",
"<br>",
"特别鸣谢:无名甲烷菌",
"<br>",
"测试:"
]
},
"tutorial": {
"text": "新手教程",
"condition": "true",

4
src/source/cls.d.ts vendored
View File

@ -484,6 +484,10 @@ interface IdToCls {
I558: 'items';
I559: 'items';
I560: 'items';
E561: 'enemys';
E562: 'enemys';
E563: 'enemys';
E564: 'enemys';
X20037: 'tileset';
X20038: 'tileset';
X20039: 'tileset';

View File

@ -484,6 +484,10 @@ interface IdToNumber {
I558: 558;
I559: 559;
I560: 560;
E561: 561;
E562: 562;
E563: 563;
E564: 564;
X20037: 20037;
X20038: 20038;
X20039: 20039;
@ -1002,6 +1006,10 @@ interface NumberToId {
558: 'I558';
559: 'I559';
560: 'I560';
561: 'E561';
562: 'E562';
563: 'E563';
564: 'E564';
20037: 'X20037';
20038: 'X20038';
20039: 'X20039';