mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-15 19:34:32 +08:00
更新热重载服务
This commit is contained in:
1 parent
a61952034a
commit
9b5b212828
14 files changed
+685
-742
No files matched your search
@@ -117,7 +117,8 @@ maps.prototype._loadFloor_doNotCopy = function () {
|
||||
'afterBattle',
|
||||
'afterGetItem',
|
||||
'afterOpenDoor',
|
||||
'cannotMove'
|
||||
'cannotMove',
|
||||
'enemy'
|
||||
];
|
||||
};
|
||||
////// 绘制背景和前景层 //////
|
||||
|
||||
@@ -159,7 +159,7 @@ export {};
|
||||
console.log(`Data hot reload: ${data}`);
|
||||
}
|
||||
|
||||
const ws = new WebSocket('ws://127.0.0.1:8080');
|
||||
const ws = new WebSocket('ws://127.0.0.1:3000');
|
||||
ws.addEventListener('open', () => {
|
||||
console.log(`Web socket connect successfully`);
|
||||
});
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export {};
|
||||
import { ensureFloorDamage } from './damage';
|
||||
|
||||
core.control.updateDamage = function (floorId = core.status.floorId, ctx) {
|
||||
if (!floorId || core.status.gameOver || main.mode !== 'play') return;
|
||||
@@ -16,7 +16,7 @@ core.control.updateDamage = function (floorId = core.status.floorId, ctx) {
|
||||
if (width * height > core.bigmap.threshold) return;
|
||||
}
|
||||
// 计算伤害
|
||||
core.plugin.damage.ensureFloorDamage(floorId);
|
||||
ensureFloorDamage(floorId);
|
||||
|
||||
floor.enemy.calDamage(true, onMap);
|
||||
floor.enemy.calMapDamage();
|
||||
|
||||
@@ -8,7 +8,7 @@ control.prototype.checkBlock = function (forceMockery) {
|
||||
var x = core.getHeroLoc('x'),
|
||||
y = core.getHeroLoc('y'),
|
||||
loc = x + ',' + y;
|
||||
var damage = core.status.checkBlock.damage[loc];
|
||||
var damage = 0;
|
||||
if (damage) {
|
||||
if (!main.replayChecking)
|
||||
core.addPop(
|
||||
@@ -33,8 +33,8 @@ control.prototype.checkBlock = function (forceMockery) {
|
||||
core.updateStatusBar();
|
||||
}
|
||||
}
|
||||
this._checkBlock_repulse(core.status.checkBlock.repulse[loc]);
|
||||
checkMockery(loc, forceMockery);
|
||||
// this._checkBlock_repulse(core.status.checkBlock.repulse[loc]);
|
||||
// checkMockery(loc, forceMockery);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -147,9 +147,9 @@ control.prototype.moveHero = function (direction, callback) {
|
||||
|
||||
const nx = core.nextX();
|
||||
const ny = core.nextY();
|
||||
if (core.status.checkBlock.mockery[`${nx},${ny}`]) {
|
||||
core.autosave();
|
||||
}
|
||||
// if (core.status.checkBlock.mockery[`${nx},${ny}`]) {
|
||||
// core.autosave();
|
||||
// }
|
||||
|
||||
if (callback) return this.moveAction(callback);
|
||||
this._moveHero_moving();
|
||||
|
||||
@@ -154,6 +154,7 @@ export function boundary(arr: any, key?: any) {
|
||||
return [min, max];
|
||||
}
|
||||
}
|
||||
|
||||
declare global {
|
||||
interface GamePluginUtils {
|
||||
ofDir: typeof ofDir;
|
||||
|
||||
Vendored
+3
-3
@@ -238,7 +238,7 @@ interface AnimateFrame {
|
||||
/**
|
||||
* 勇士移动的时候上一次的换腿时间
|
||||
*/
|
||||
readonly moveTime: number;
|
||||
moveTime: number;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
@@ -249,7 +249,7 @@ interface AnimateFrame {
|
||||
/**
|
||||
* 当前是否在左腿上,使用了四帧插件时无效
|
||||
*/
|
||||
readonly leftLeg: boolean;
|
||||
leftLeg: boolean;
|
||||
|
||||
/**
|
||||
* 当前天气信息
|
||||
@@ -965,7 +965,7 @@ interface Core extends Pick<Main, CoreDataFromMain> {
|
||||
/**
|
||||
* 大地图信息
|
||||
*/
|
||||
readonly bigmap: Readonly<CoreBigmap>;
|
||||
readonly bigmap: CoreBigmap;
|
||||
|
||||
/**
|
||||
* 存档信息
|
||||
|
||||
@@ -53,11 +53,6 @@ import { noClosePanel } from '../plugin/uiController';
|
||||
const floorId =
|
||||
// @ts-ignore
|
||||
core.floorIds[core.status.event?.ui?.index] ?? core.status.floorId;
|
||||
// 清除浏览地图时的光环缓存
|
||||
if (floorId !== core.status.floorId && core.status.checkBlock) {
|
||||
// @ts-ignore
|
||||
core.status.checkBlock.cache = {};
|
||||
}
|
||||
|
||||
const enemy = core.getCurrentEnemys(floorId);
|
||||
|
||||
|
||||
Reference in new issue
Block a user