伤害弹出

This commit is contained in:
草莓 2025-02-25 10:49:54 +08:00
parent e0ed30be3b
commit 9d2c199a1e
3 changed files with 1386 additions and 858 deletions

View File

@ -1140,7 +1140,8 @@ var data_a1e2fb4a_e986_4524_b0da_9b7ba7c0874d =
"flags": {
"itemDetail": true,
"useBetweenLight": true,
"__mdef_buff__": 0
"__mdef_buff__": 0,
"popmove": true
},
"followers": [],
"steps": 0,

View File

@ -1869,54 +1869,49 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
// core.stopAutomaticRoute();
},
"moveDirectly": function (x, y, ignoreSteps) {
// 瞬间移动x,y为要瞬间移动的点ignoreSteps为减少的步数可能之前已经被计算过
// 返回true代表成功瞬移false代表没有成功瞬移
// 瞬间移动x,y为要瞬间移动的点ignoreSteps为减少的步数可能之前已经被计算过
// 返回true代表成功瞬移false代表没有成功瞬移
// 判定能否瞬移到该点
if (ignoreSteps == null) ignoreSteps = core.canMoveDirectly(x, y);
if (ignoreSteps >= 0) {
// 中毒也允许瞬移
if (core.hasFlag("poison")) {
var damage = ignoreSteps * core.values.poisonDamage;
if (damage >= core.status.hero.hp) return false;
core.status.hero.statistics.poisonDamage += damage;
core.status.hero.hp -= damage;
}
// 判定能否瞬移到该点
if (ignoreSteps == null) ignoreSteps = core.canMoveDirectly(x, y);
if (ignoreSteps >= 0) {
// 中毒也允许瞬移
if (core.hasFlag("poison")) {
var damage = ignoreSteps * core.values.poisonDamage;
if (damage >= core.status.hero.hp) return false;
core.status.hero.statistics.poisonDamage += damage;
core.status.hero.hp -= damage;
}
core.clearMap("hero");
if (
core.bigmap.width * 32 === core.bigmap.height * 32 &&
core.bigmap.width * 32 === core.__PIXELS__
)
core.addPopMove(
32 * core.status.hero.loc.x + 16,
32 * core.status.hero.loc.y + 16,
32 * x + 16,
32 * y + 16
);
// 获得勇士最后的朝向
var lastDirection = core.status.route[core.status.route.length - 1];
if (["left", "right", "up", "down"].indexOf(lastDirection) >= 0)
core.setHeroLoc("direction", lastDirection);
// 设置坐标,并绘制
core.control._moveDirectyFollowers(x, y);
core.status.hero.loc.x = x;
core.status.hero.loc.y = y;
core.drawHero();
// 记录录像
core.status.route.push("move:" + x + ":" + y);
// 统计信息
core.status.hero.statistics.moveDirectly++;
core.status.hero.statistics.ignoreSteps += ignoreSteps;
if (core.hasFlag("poison")) {
core.updateStatusBar(false, true);
}
core.clearMap("hero");
if (
core.bigmap.width * 32 === core.bigmap.height * 32 &&
core.bigmap.width * 32 === core.__PIXELS__
)
if (core.getFlag('popmove')) core.addPopMove(32 * core.status.hero.loc.x + 16, 32 * core.status.hero.loc.y + 16, 32 * x + 16, 32 * y + 16);
// 获得勇士最后的朝向
var lastDirection = core.status.route[core.status.route.length - 1];
if (["left", "right", "up", "down"].indexOf(lastDirection) >= 0)
core.setHeroLoc("direction", lastDirection);
// 设置坐标,并绘制
core.control._moveDirectyFollowers(x, y);
core.status.hero.loc.x = x;
core.status.hero.loc.y = y;
core.drawHero();
// 记录录像
core.status.route.push("move:" + x + ":" + y);
// 统计信息
core.status.hero.statistics.moveDirectly++;
core.status.hero.statistics.ignoreSteps += ignoreSteps;
if (core.hasFlag("poison")) {
core.updateStatusBar(false, true);
}
core.checkRouteFolding();
return true;
}
return false;
},
core.checkRouteFolding();
return true;
}
return false;
},
"parallelDo": function (timestamp) {
// 并行事件处理,可以在这里写任何需要并行处理的脚本或事件
// 该函数将被系统反复执行每次执行间隔视浏览器或设备性能而定一般约为16.6ms一次

File diff suppressed because it is too large Load Diff