mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-01 07:24:30 +08:00
fix: 杀戮光环 & feat: 注册新图块
This commit is contained in:
1 parent
3b064b6322
commit
32f57cafec
21 files changed
+350
-58
No files matched your search
@@ -28,8 +28,6 @@ export function init() {
|
||||
Mota.rewrite(core.events, 'afterBattle', 'add', (_, enemy, x, y) => {
|
||||
// 打怪特效
|
||||
const setting = Mota.require('var', 'mainSetting');
|
||||
console.log(setting.getValue('fx.frag'));
|
||||
|
||||
if (setting.getValue('fx.frag') && has(x) && has(y)) {
|
||||
const frame = core.status.globalAnimateStatus % 2;
|
||||
const canvas = document.createElement('canvas');
|
||||
|
||||
@@ -2,7 +2,8 @@ const haloColor: Record<number, string[]> = {
|
||||
21: ['cyan'],
|
||||
25: ['purple'],
|
||||
26: ['blue'],
|
||||
27: ['red']
|
||||
27: ['red'],
|
||||
29: ['#BD0D0D']
|
||||
};
|
||||
|
||||
export function drawHalo(
|
||||
|
||||
@@ -20,7 +20,7 @@ export function init() {
|
||||
ensureFloorDamage(floorId);
|
||||
|
||||
floor.enemy.extract();
|
||||
floor.enemy.calDamage(true);
|
||||
floor.enemy.calRealAttribute();
|
||||
floor.enemy.calMapDamage();
|
||||
core.status.damage.data = [];
|
||||
|
||||
|
||||
+13
-11
@@ -1,6 +1,6 @@
|
||||
import { getDamageColor } from '../utils';
|
||||
import { ToShowEnemy } from './book';
|
||||
import type { DamageEnemy } from '../../game/enemy/damage';
|
||||
import type { DamageEnemy, EnemyInfo } from '../../game/enemy/damage';
|
||||
import { isMobile } from '../use';
|
||||
|
||||
export function getLocFromMouseLoc(x: number, y: number): LocArr {
|
||||
@@ -23,19 +23,21 @@ export function getDetailedEnemy(
|
||||
const damage = core.formatBigNumber(dam);
|
||||
|
||||
const fromFunc = (
|
||||
func: string | ((enemy: Enemy) => string),
|
||||
enemy: Enemy
|
||||
func: string | ((enemy: EnemyInfo) => string),
|
||||
enemy: EnemyInfo
|
||||
) => {
|
||||
return typeof func === 'string' ? func : func(enemy);
|
||||
};
|
||||
const special: [string, string, string][] = enemy.enemy.special.map(vv => {
|
||||
const s = Mota.require('var', 'enemySpecials')[vv];
|
||||
return [
|
||||
fromFunc(s.name, enemy.enemy),
|
||||
fromFunc(s.desc, enemy.enemy),
|
||||
s.color as string
|
||||
];
|
||||
});
|
||||
const special: [string, string, string][] = enemy.info.special
|
||||
.filter(v => !enemy.info.specialHalo?.includes(v))
|
||||
.map(vv => {
|
||||
const s = Mota.require('var', 'enemySpecials')[vv];
|
||||
return [
|
||||
fromFunc(s.name, enemy.info),
|
||||
fromFunc(s.desc, enemy.info),
|
||||
s.color as string
|
||||
];
|
||||
});
|
||||
const l = isMobile ? 1 : 2;
|
||||
const showSpecial =
|
||||
special.length > l
|
||||
|
||||
Reference in new issue
Block a user