mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-20 07:15:02 +08:00
feat: 几个新楼层
This commit is contained in:
1 parent
ac8a61558e
commit
c7f7cf280b
15 files changed
+373
-303
No files matched your search
@@ -44,6 +44,7 @@ export {};
|
||||
delete core.status.mapBlockObjs[data];
|
||||
core.extractBlocks(data);
|
||||
if (data === core.status.floorId) {
|
||||
core.status.thisMap = core.status.maps[data];
|
||||
let weather = core.getFlag('__weather__', null);
|
||||
if (!weather && core.status.thisMap.weather)
|
||||
weather = core.status.thisMap.weather;
|
||||
|
||||
@@ -110,8 +110,13 @@ function checkHunt(loc: string) {
|
||||
const { x: hx, y: hy } = core.status.hero.loc;
|
||||
|
||||
const action: any = [];
|
||||
hunt.sort((a, b) => {
|
||||
return a[0] === b[0] ? a[1] - b[1] : a[0] - b[0];
|
||||
});
|
||||
|
||||
for (const [x, y, dir] of hunt) {
|
||||
const [tx, ty] = ofDir(x, y, dir);
|
||||
if (core.noPass(tx, ty)) continue;
|
||||
action.push(
|
||||
{
|
||||
type: 'move',
|
||||
@@ -124,8 +129,6 @@ function checkHunt(loc: string) {
|
||||
type: 'update'
|
||||
}
|
||||
);
|
||||
const [tx, ty] = ofDir(x, y, dir);
|
||||
if (core.noPass(tx, ty)) return;
|
||||
|
||||
if (has(hy) && x === hx) {
|
||||
if (Math.abs(y - hy) <= 2) {
|
||||
|
||||
@@ -514,7 +514,10 @@ export function init() {
|
||||
time: number = 500,
|
||||
callback?: () => void
|
||||
) {
|
||||
console.log(heroMover.moving);
|
||||
|
||||
if (heroMover.moving) return;
|
||||
|
||||
const sx = core.getHeroLoc('x');
|
||||
const sy = core.getHeroLoc('y');
|
||||
adapters.viewport?.all('mutateTo', ex, ey);
|
||||
@@ -539,6 +542,7 @@ export function init() {
|
||||
);
|
||||
})
|
||||
);
|
||||
console.log(ex, ey);
|
||||
|
||||
if (!locked) core.unlockControl();
|
||||
core.setHeroLoc('x', ex);
|
||||
|
||||
@@ -105,6 +105,7 @@ export function jumpSkill() {
|
||||
(bgId.startsWith('X') && !ignoreInJump.bg.includes(bgId))
|
||||
)
|
||||
return core.drawTip('当前无法使用技能');
|
||||
// debugger;
|
||||
// 不是怪物且不可以通行
|
||||
if (noPass && !(cls == 'enemys' || cls == 'enemy48')) {
|
||||
var toLoc = checkNoPass(direction, checkLoc.x, checkLoc.y, true);
|
||||
|
||||
Reference in new issue
Block a user