boss战回合攻击
This commit is contained in:
parent
d9a5f79f7a
commit
5a3552c2c0
2
main.js
2
main.js
@ -276,7 +276,7 @@ main.prototype.init = function (mode, callback) {
|
||||
coreData[t] = main[t];
|
||||
});
|
||||
main.core.init(coreData, callback);
|
||||
main.core.resize();
|
||||
core.resize();
|
||||
// 自动放缩最大化
|
||||
if (!main.replayChecking) {
|
||||
if (core.getLocalStorage("autoScale") == null) {
|
||||
|
@ -82,19 +82,19 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
});
|
||||
},
|
||||
"lose": function (reason) {
|
||||
// 游戏失败事件
|
||||
core.ui.closePanel();
|
||||
var replaying = core.isReplaying();
|
||||
core.stopReplay();
|
||||
core.waitHeroToStop(function () {
|
||||
core.drawText(
|
||||
["\t[" + (reason || "结局1") + "]你死了。\n如题。"],
|
||||
function () {
|
||||
core.events.gameOver(null, replaying);
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
// 游戏失败事件
|
||||
core.ui.closePanel();
|
||||
var replaying = core.isReplaying();
|
||||
core.stopReplay();
|
||||
core.waitHeroToStop(function () {
|
||||
core.drawText(
|
||||
["\t[" + (reason || "结局1") + "]你死了。\n如题。"],
|
||||
function () {
|
||||
core.events.gameOver(null, replaying);
|
||||
}
|
||||
);
|
||||
});
|
||||
},
|
||||
"changingFloor": function (floorId, heroLoc) {
|
||||
// 正在切换楼层过程中执行的操作;此函数的执行时间是“屏幕完全变黑“的那一刻
|
||||
// floorId为要切换到的楼层ID;heroLoc表示勇士切换到的位置
|
||||
@ -1804,70 +1804,70 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
||||
};
|
||||
},
|
||||
"moveOneStep": function (callback) {
|
||||
// 勇士每走一步后执行的操作。callback为行走完毕后的回调
|
||||
// 这个函数执行在“刚走完”的时候,即还没有检查该点的事件和领域伤害等。
|
||||
// 请注意:瞬间移动不会执行该函数。如果要控制能否瞬间移动有三种方法:
|
||||
// 1. 将全塔属性中的cannotMoveDirectly这个开关勾上,即可在全塔中全程禁止使用瞬移。
|
||||
// 2, 将楼层属性中的cannotMoveDirectly这个开关勾上,即禁止在该层楼使用瞬移。
|
||||
// 3. 将flag:cannotMoveDirectly置为true,即可使用flag控制在某段剧情范围内禁止瞬移。
|
||||
// 勇士每走一步后执行的操作。callback为行走完毕后的回调
|
||||
// 这个函数执行在“刚走完”的时候,即还没有检查该点的事件和领域伤害等。
|
||||
// 请注意:瞬间移动不会执行该函数。如果要控制能否瞬间移动有三种方法:
|
||||
// 1. 将全塔属性中的cannotMoveDirectly这个开关勾上,即可在全塔中全程禁止使用瞬移。
|
||||
// 2, 将楼层属性中的cannotMoveDirectly这个开关勾上,即禁止在该层楼使用瞬移。
|
||||
// 3. 将flag:cannotMoveDirectly置为true,即可使用flag控制在某段剧情范围内禁止瞬移。
|
||||
|
||||
// 增加步数
|
||||
core.status.hero.steps++;
|
||||
// 更新跟随者状态,并绘制
|
||||
core.updateFollowers();
|
||||
core.drawHero();
|
||||
// 检查中毒状态的扣血和死亡
|
||||
if (core.hasFlag("poison")) {
|
||||
core.status.hero.statistics.poisonDamage += core.values.poisonDamage;
|
||||
core.status.hero.hp -= core.values.poisonDamage;
|
||||
if (core.status.hero.hp <= 0) {
|
||||
core.status.hero.hp = 0;
|
||||
core.updateStatusBar(false, true);
|
||||
core.events.lose();
|
||||
return;
|
||||
} else {
|
||||
core.updateStatusBar(false, true);
|
||||
}
|
||||
}
|
||||
// 增加步数
|
||||
core.status.hero.steps++;
|
||||
// 更新跟随者状态,并绘制
|
||||
core.updateFollowers();
|
||||
core.drawHero();
|
||||
// 检查中毒状态的扣血和死亡
|
||||
if (core.hasFlag("poison")) {
|
||||
core.status.hero.statistics.poisonDamage += core.values.poisonDamage;
|
||||
core.status.hero.hp -= core.values.poisonDamage;
|
||||
if (core.status.hero.hp <= 0) {
|
||||
core.status.hero.hp = 0;
|
||||
core.updateStatusBar(false, true);
|
||||
core.events.lose();
|
||||
return;
|
||||
} else {
|
||||
core.updateStatusBar(false, true);
|
||||
}
|
||||
}
|
||||
|
||||
// 从v2.7开始,每一步行走不会再刷新状态栏。
|
||||
// 如果有特殊要求(如每走一步都加buff之类),可手动取消注释下面这一句:
|
||||
// core.updateStatusBar(true, true);
|
||||
// 从v2.7开始,每一步行走不会再刷新状态栏。
|
||||
// 如果有特殊要求(如每走一步都加buff之类),可手动取消注释下面这一句:
|
||||
// core.updateStatusBar(true, true);
|
||||
|
||||
// 检查自动事件
|
||||
core.checkAutoEvents();
|
||||
// 检查自动事件
|
||||
core.checkAutoEvents();
|
||||
|
||||
// ------ 检查目标点事件 ------ //
|
||||
// 无事件的道具(如血瓶)需要优先于阻激夹域判定
|
||||
var nowx = core.getHeroLoc("x"),
|
||||
nowy = core.getHeroLoc("y");
|
||||
var block = core.getBlock(nowx, nowy);
|
||||
var hasTrigger = false;
|
||||
if (
|
||||
block != null &&
|
||||
block.event.trigger == "getItem" &&
|
||||
!core.floors[core.status.floorId].afterGetItem[nowx + "," + nowy]
|
||||
) {
|
||||
hasTrigger = true;
|
||||
core.trigger(nowx, nowy, callback);
|
||||
}
|
||||
// 执行目标点的阻激夹域事件
|
||||
core.checkBlock();
|
||||
// ------ 检查目标点事件 ------ //
|
||||
// 无事件的道具(如血瓶)需要优先于阻激夹域判定
|
||||
var nowx = core.getHeroLoc("x"),
|
||||
nowy = core.getHeroLoc("y");
|
||||
var block = core.getBlock(nowx, nowy);
|
||||
var hasTrigger = false;
|
||||
if (
|
||||
block != null &&
|
||||
block.event.trigger == "getItem" &&
|
||||
!core.floors[core.status.floorId].afterGetItem[nowx + "," + nowy]
|
||||
) {
|
||||
hasTrigger = true;
|
||||
core.trigger(nowx, nowy, callback);
|
||||
}
|
||||
// 执行目标点的阻激夹域事件
|
||||
core.checkBlock();
|
||||
|
||||
// 执行目标点的script和事件
|
||||
if (!hasTrigger) core.trigger(nowx, nowy, callback);
|
||||
// 执行目标点的script和事件
|
||||
if (!hasTrigger) core.trigger(nowx, nowy, callback);
|
||||
|
||||
// 检查该点是否是滑冰
|
||||
if (core.onSki()) {
|
||||
// 延迟到事件最后执行,因为这之前可能有阻激夹域动画
|
||||
core.insertAction({ type: "moveAction" }, null, null, null, true);
|
||||
}
|
||||
// 检查该点是否是滑冰
|
||||
if (core.onSki()) {
|
||||
// 延迟到事件最后执行,因为这之前可能有阻激夹域动画
|
||||
core.insertAction({ type: "moveAction" }, null, null, null, true);
|
||||
}
|
||||
|
||||
// ------ 检查目标点事件 END ------ //
|
||||
// ------ 检查目标点事件 END ------ //
|
||||
|
||||
// 如需强行终止行走可以在这里条件判定:
|
||||
// core.stopAutomaticRoute();
|
||||
},
|
||||
// 如需强行终止行走可以在这里条件判定:
|
||||
// core.stopAutomaticRoute();
|
||||
},
|
||||
"moveDirectly": function (x, y, ignoreSteps) {
|
||||
// 瞬间移动;x,y为要瞬间移动的点;ignoreSteps为减少的步数,可能之前已经被计算过
|
||||
// 返回true代表成功瞬移,false代表没有成功瞬移
|
||||
|
1739
project/plugins.js
1739
project/plugins.js
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user