mirror of
https://github.com/unanmed/HumanBreak.git
synced 2025-01-19 20:59:37 +08:00
融化怪的光环显示
This commit is contained in:
parent
9b69639c40
commit
26f74f9415
@ -1,4 +1,4 @@
|
||||
import { boundary, equal } from './utils';
|
||||
import { equal } from './utils';
|
||||
import { getHeroStatusOf, getHeroStatusOn } from './hero';
|
||||
import { Range, RangeCollection } from './range';
|
||||
import {
|
||||
@ -53,8 +53,8 @@ interface MapDamage {
|
||||
interface HaloData<T extends keyof HaloType = keyof HaloType> {
|
||||
type: T;
|
||||
data: HaloType[T];
|
||||
from: DamageEnemy;
|
||||
special: number;
|
||||
from?: DamageEnemy;
|
||||
}
|
||||
|
||||
interface DamageDelta {
|
||||
@ -1110,7 +1110,6 @@ declare global {
|
||||
damage: {
|
||||
Enemy: typeof DamageEnemy;
|
||||
Collection: typeof EnemyCollection;
|
||||
ensureFloorDamage: typeof ensureFloorDamage;
|
||||
};
|
||||
}
|
||||
|
||||
@ -1121,6 +1120,5 @@ declare global {
|
||||
|
||||
core.plugin.damage = {
|
||||
Enemy: DamageEnemy,
|
||||
Collection: EnemyCollection,
|
||||
ensureFloorDamage
|
||||
Collection: EnemyCollection
|
||||
};
|
||||
|
@ -1,5 +1,6 @@
|
||||
const haloColor: Record<number, string[]> = {
|
||||
21: ['cyan'],
|
||||
25: ['purple'],
|
||||
26: ['blue'],
|
||||
27: ['red']
|
||||
};
|
||||
@ -11,7 +12,20 @@ export function drawHalo(
|
||||
) {
|
||||
if (main.replayChecking) return;
|
||||
if (!core.getLocalStorage('showHalo', true)) return;
|
||||
const list = core.status.maps[floorId].enemy.haloList;
|
||||
const list = core.status.maps[floorId].enemy.haloList.concat(
|
||||
Object.keys(flags[`melt_${floorId}`] ?? {}).map(v => {
|
||||
const [x, y] = v.split(',').map(v => parseInt(v));
|
||||
return {
|
||||
type: 'square',
|
||||
data: {
|
||||
x,
|
||||
y,
|
||||
d: 3
|
||||
},
|
||||
special: 25
|
||||
};
|
||||
})
|
||||
);
|
||||
ctx.save();
|
||||
for (const halo of list) {
|
||||
if (halo.type === 'square') {
|
||||
|
@ -4,12 +4,11 @@ import { drawHalo } from './halo';
|
||||
// 伤害弹出
|
||||
// 复写阻激夹域检测
|
||||
control.prototype.checkBlock = function (forceMockery: boolean = false) {
|
||||
var x = core.getHeroLoc('x'),
|
||||
const x = core.getHeroLoc('x'),
|
||||
y = core.getHeroLoc('y'),
|
||||
loc = x + ',' + y;
|
||||
const floor = core.status.floorId;
|
||||
const info = core.status.maps[floor].enemy.mapDamage[loc];
|
||||
var damage = info.damage;
|
||||
const info = core.status.thisMap.enemy.mapDamage[loc];
|
||||
const damage = info?.damage;
|
||||
if (damage) {
|
||||
if (!main.replayChecking) {
|
||||
core.addPop(
|
||||
@ -20,7 +19,7 @@ control.prototype.checkBlock = function (forceMockery: boolean = false) {
|
||||
}
|
||||
core.status.hero.hp -= damage;
|
||||
const type = Array.from(info.type.keys());
|
||||
var text = type.join(',') || '伤害';
|
||||
const text = type.join(',') || '伤害';
|
||||
core.drawTip('受到' + text + damage + '点');
|
||||
core.drawHeroAnimate('zone');
|
||||
this._checkBlock_disableQuickShop();
|
||||
|
Loading…
Reference in New Issue
Block a user