mirror of
https://github.com/unanmed/HumanBreak.git
synced 2026-11-16 20:24:31 +08:00
feat: 杀戮光环说明
This commit is contained in:
1 parent
9c1b79e6b4
commit
12f85a75df
7 files changed
+54
-13
No files matched your search
@@ -7,6 +7,10 @@ export interface SpecialDeclaration {
|
||||
color: string;
|
||||
}
|
||||
|
||||
const fromFunc = (func: string | ((enemy: Enemy) => string), enemy: Enemy) => {
|
||||
return typeof func === 'string' ? func : func(enemy);
|
||||
};
|
||||
|
||||
export const specials: SpecialDeclaration[] = [
|
||||
{
|
||||
code: 0,
|
||||
@@ -46,7 +50,7 @@ export const specials: SpecialDeclaration[] = [
|
||||
},
|
||||
{
|
||||
code: 6,
|
||||
name: enemy => `${enemy.n}连击`,
|
||||
name: enemy => `${enemy.n ?? 4}连击`,
|
||||
desc: enemy => `怪物每回合攻击${enemy.n}次`,
|
||||
color: '#fe7'
|
||||
},
|
||||
@@ -200,5 +204,24 @@ export const specials: SpecialDeclaration[] = [
|
||||
desc: enemy =>
|
||||
`怪物使用苍蓝之灵的力量,使自身受到的伤害减少${enemy.paleShield}%`,
|
||||
color: '#ff6f0a'
|
||||
},
|
||||
{
|
||||
code: 29,
|
||||
name: '杀戮光环',
|
||||
desc: enemy => {
|
||||
const special = enemy.special;
|
||||
let str = '<div style="margin-left: 10px">';
|
||||
|
||||
special.forEach(v => {
|
||||
const { name, desc, color } = specials[v];
|
||||
str += `<span style="color:${color}">${fromFunc(
|
||||
name,
|
||||
enemy
|
||||
)}</span><span>${fromFunc(desc, enemy)}</span>`;
|
||||
});
|
||||
|
||||
return str;
|
||||
},
|
||||
color: '#F721F7'
|
||||
}
|
||||
];
|
||||
@@ -13,7 +13,8 @@ export function setGameCanvasFilter(filter: string) {
|
||||
}
|
||||
|
||||
const filterMap: [FloorIds[], string][] = [
|
||||
[['MT50'], 'brightness(80%)contrast(120%)'] // 童心佬的滤镜(
|
||||
[['MT50'], 'brightness(80%)contrast(120%)'], // 童心佬的滤镜(
|
||||
[['MT51'], 'brightness(90%)contrast(120%)'] // 童心佬的滤镜(
|
||||
];
|
||||
|
||||
export function getCanvasFilterByFloorId(
|
||||
|
||||
@@ -84,10 +84,22 @@ const shadowInfo: Partial<Record<FloorIds, Light[]>> = {
|
||||
color: pColor('#e953'),
|
||||
noShelter: true
|
||||
}
|
||||
],
|
||||
MT51: [
|
||||
{
|
||||
id: 'mt51_hero',
|
||||
x: 0,
|
||||
y: 0,
|
||||
decay: 50,
|
||||
r: 250,
|
||||
color: 'transparent',
|
||||
followHero: true
|
||||
}
|
||||
]
|
||||
};
|
||||
const backgroundInfo: Partial<Record<FloorIds, Color>> = {
|
||||
MT50: pColor('#0006')
|
||||
MT50: pColor('#0006'),
|
||||
MT51: pColor('#0004')
|
||||
};
|
||||
const blurInfo: Partial<Record<FloorIds, number>> = {};
|
||||
const immersionInfo: Partial<Record<FloorIds, number>> = {};
|
||||
|
||||
@@ -28,7 +28,7 @@ export const detailInfo: BookDetailInfo = {};
|
||||
export function getSpecialHint(enemy: ToShowEnemy) {
|
||||
return (
|
||||
<div>
|
||||
{enemy.showSpecial.map((v, i) => {
|
||||
{enemy.special.map((v, i) => {
|
||||
return (
|
||||
<div class="special">
|
||||
<span style={{ color: v[2] }}>
|
||||
|
||||
Reference in new issue
Block a user