feat: 新建最后一区

This commit is contained in:
AncTe committed 2024-10-01 10:35:27 +08:00
1 parent 42f611b357
commit ac3b0c0fc2
21 files changed
+331 -56

No files matched your search

+11 -2
View File
@@ -74,7 +74,7 @@ export const haloSpecials: Set<number> = new Set([
]);
/** 不可被同化的属性 */
export const unassimilatable: Set<number> = new Set(haloSpecials);
unassimilatable.add(8).add(30);
unassimilatable.add(8).add(30).add(33);
/** 特殊属性对应 */
export const specialValue: Map<number, SelectKey<Enemy, number | undefined>[]> =
new Map();
@@ -95,7 +95,8 @@ specialValue
.set(26, ['iceCore'])
.set(27, ['fireCore'])
.set(28, ['paleShield'])
.set(31, ['hpHalo']);
.set(31, ['hpHalo'])
.set(32, ['assimilateRange']);
interface EnemyCollectionEvent {
extract: [];
@@ -365,6 +366,14 @@ export class DamageEnemy<T extends EnemyIds = EnemyIds> {
// 此时已经inject光环,因此直接计算真实属性
const info = this.info;
if (info.special.has(33)) {
const count = this.col?.list.size ?? 0;
const [hp, atk, def] = this.enemy.horn ?? [0, 0, 0];
info.hpBuff_ += hp * count;
info.atkBuff_ += atk * count;
info.defBuff_ += def * count;
}
info.atk = Math.floor(info.atk * (info.atkBuff_ / 100 + 1));
info.def = Math.floor(info.def * (info.defBuff_ / 100 + 1));
info.hp = Math.floor(info.hp * (info.hpBuff_ / 100 + 1));
+14
View File
@@ -262,5 +262,19 @@ export const specials: SpecialDeclaration[] = [
`怪物会获得自身周围方形${enemy.assimilateRange}格范围内怪物的特殊属性(光环类属性除外),` +
`特殊属性数值间为${enemy.specialMultiply ? '乘算' : '加算'}关系`,
color: '#ffd366'
},
{
code: 33,
name: '战争号角',
desc: enemy => {
const [hp, atk, def] = enemy.horn ?? [];
let str = '地图上每存在一个怪物(包括自身),自身';
if (hp) str += `生命值增加${hp}%,`;
if (atk) str += `攻击增加${atk}%,`;
if (def) str += `防御增加${def}%,`;
str += '线性叠加';
return str;
},
color: '#fff866'
}
];