mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-11 07:54:30 +08:00
fix: 细节bug
This commit is contained in:
1 parent
8cea9ba7f4
commit
c5492e1e77
25 files changed
+328
-87
No files matched your search
@@ -12,10 +12,7 @@ export function setGameCanvasFilter(filter: string) {
|
||||
});
|
||||
}
|
||||
|
||||
const filterMap: [FloorIds[], string][] = [
|
||||
[['MT50'], 'brightness(80%)contrast(120%)'], // 童心佬的滤镜(
|
||||
[['MT51'], 'brightness(90%)contrast(120%)'] // 童心佬的滤镜(
|
||||
];
|
||||
const filterMap: [FloorIds[], string][] = [];
|
||||
|
||||
export function getCanvasFilterByFloorId(
|
||||
floorId: FloorIds = core.status.floorId
|
||||
@@ -28,3 +25,9 @@ export function setCanvasFilterByFloorId(
|
||||
) {
|
||||
setGameCanvasFilter(getCanvasFilterByFloorId(floorId));
|
||||
}
|
||||
|
||||
Mota.require('var', 'loading').once('coreInit', () => {
|
||||
filterMap.push(
|
||||
[core.floorIds.slice(60), 'brightness(80%)contrast(120%)'] // 童心佬的滤镜(
|
||||
);
|
||||
});
|
||||
@@ -116,6 +116,7 @@ function checkMockery(loc: string, force: boolean = false) {
|
||||
const dir = x > tx ? 'left' : x < tx ? 'right' : y > ty ? 'up' : 'down';
|
||||
const { x: dx, y: dy } = core.utils.scan[dir];
|
||||
|
||||
action.push({ type: 'forbidSave', forbid: true });
|
||||
action.push({ type: 'changePos', direction: dir });
|
||||
const blocks = core.getMapBlocksObj();
|
||||
while (1) {
|
||||
@@ -164,6 +165,7 @@ function checkMockery(loc: string, force: boolean = false) {
|
||||
function: `function() { core.checkBlock(true); }`
|
||||
});
|
||||
action.push({ type: 'stopAsync' });
|
||||
action.push({ type: 'forbidSave' });
|
||||
core.insertAction(action);
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,7 @@ const haloColor: Record<number, string[]> = {
|
||||
25: ['purple'],
|
||||
26: ['blue'],
|
||||
27: ['red'],
|
||||
29: ['#BD0D0D']
|
||||
29: ['#C3D100']
|
||||
};
|
||||
|
||||
export function drawHalo(
|
||||
|
||||
@@ -105,6 +105,7 @@ function drawItemDetail(diff: any, x: number, y: number) {
|
||||
if (typeof diff[name] === 'number')
|
||||
content = core.formatBigNumber(diff[name], true);
|
||||
else content = diff[name];
|
||||
|
||||
switch (name) {
|
||||
case 'atk':
|
||||
case 'atkper':
|
||||
@@ -125,6 +126,7 @@ function drawItemDetail(diff: any, x: number, y: number) {
|
||||
case 'hpmaxper':
|
||||
color = '#F9FF00';
|
||||
break;
|
||||
case 'manaper':
|
||||
case 'mana':
|
||||
color = '#c66';
|
||||
break;
|
||||
|
||||
@@ -116,4 +116,32 @@ export function init() {
|
||||
core.replay();
|
||||
return true;
|
||||
});
|
||||
|
||||
core.registerReplayAction('skill', name => {
|
||||
if (!name.startsWith('skill:')) return false;
|
||||
const [type, skill] = name.split(':');
|
||||
if (skill === '1') {
|
||||
if (flags.autoSkill || !flags.bladeOn) return true;
|
||||
if (flags.blade) flags.blade = false;
|
||||
else flags.blade = true;
|
||||
} else if (skill === '2') {
|
||||
if (
|
||||
!flags.chase &&
|
||||
!core.status.floorId.startsWith('tower') &&
|
||||
flags.skill2
|
||||
) {
|
||||
Mota.Plugin.require('skill_g').jumpSkill();
|
||||
} else {
|
||||
if (core.hasItem('pickaxe')) {
|
||||
core.useItem('pickaxe');
|
||||
}
|
||||
}
|
||||
} else if (skill === '3') {
|
||||
if (flags.autoSkill || !flags.shieldOn) return true;
|
||||
if (flags.shield) flags.shield = false;
|
||||
else flags.shield = true;
|
||||
}
|
||||
core.updateStatusBar();
|
||||
return true;
|
||||
});
|
||||
}
|
||||
@@ -95,11 +95,23 @@ const shadowInfo: Partial<Record<FloorIds, Light[]>> = {
|
||||
color: 'transparent',
|
||||
followHero: true
|
||||
}
|
||||
],
|
||||
MT52: [
|
||||
{
|
||||
id: 'mt52_hero',
|
||||
x: 0,
|
||||
y: 0,
|
||||
decay: 50,
|
||||
r: 250,
|
||||
color: 'transparent',
|
||||
followHero: true
|
||||
}
|
||||
]
|
||||
};
|
||||
const backgroundInfo: Partial<Record<FloorIds, Color>> = {
|
||||
MT50: pColor('#0006'),
|
||||
MT51: pColor('#0004')
|
||||
MT51: pColor('#0004'),
|
||||
MT52: pColor('#0004')
|
||||
};
|
||||
const blurInfo: Partial<Record<FloorIds, number>> = {};
|
||||
const immersionInfo: Partial<Record<FloorIds, number>> = {};
|
||||
|
||||
@@ -68,6 +68,7 @@ export function initShadowCanvas() {
|
||||
const h = core._PY_ ?? core.__PIXELS__;
|
||||
ctx = core.createCanvas('shadow', -32, -32, w + 64, h + 64, 55);
|
||||
canvas = ctx.canvas;
|
||||
|
||||
const s = core.domStyle.scale * devicePixelRatio;
|
||||
temp1.width = (w + 64) * s;
|
||||
temp1.height = (h + 64) * s;
|
||||
|
||||
Reference in new issue
Block a user