feat(map): add three new resistance affixes and their handling
1. 新增CritRes、FreezeRes、KnockbackRes三种词缀类型 2. 配置对应词缀的名称、消耗、最低等级等属性 3. 为怪物组件添加词缀抗性属性的赋值逻辑 4. 将新词条加入优先级列表
This commit is contained in:
@@ -337,6 +337,19 @@ export class MissionMonCompComp extends CCComp {
|
|||||||
|
|
||||||
// 将词缀记录到属性组件上,供战斗层使用
|
// 将词缀记录到属性组件上,供战斗层使用
|
||||||
(model as any).affixes = monData.affixes || [];
|
(model as any).affixes = monData.affixes || [];
|
||||||
|
|
||||||
|
// 解析特定的抗性词缀
|
||||||
|
if (monData.affixes) {
|
||||||
|
if (monData.affixes.includes(AffixType.CritRes)) {
|
||||||
|
model.critical_res = 50;
|
||||||
|
}
|
||||||
|
if (monData.affixes.includes(AffixType.FreezeRes)) {
|
||||||
|
model.freeze_res = 50;
|
||||||
|
}
|
||||||
|
if (monData.affixes.includes(AffixType.KnockbackRes)) {
|
||||||
|
model.knockback_res = 50;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** ECS 组件移除时触发(当前不销毁节点) */
|
/** ECS 组件移除时触发(当前不销毁节点) */
|
||||||
|
|||||||
@@ -55,6 +55,9 @@ export enum AffixType {
|
|||||||
Giant = 5,
|
Giant = 5,
|
||||||
Chain = 6,
|
Chain = 6,
|
||||||
SummonerA = 7,
|
SummonerA = 7,
|
||||||
|
CritRes = 8,
|
||||||
|
FreezeRes = 9,
|
||||||
|
KnockbackRes = 10,
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -113,6 +116,18 @@ export const AffixConfigs: Record<AffixType, AffixConfig> = {
|
|||||||
name: "召唤", hpMultiplier: 1.0, apMultiplier: 1.0,
|
name: "召唤", hpMultiplier: 1.0, apMultiplier: 1.0,
|
||||||
cost: 25, tierMin: 10, description: "每 8 秒召唤 1 个小怪",
|
cost: 25, tierMin: 10, description: "每 8 秒召唤 1 个小怪",
|
||||||
},
|
},
|
||||||
|
[AffixType.CritRes]: {
|
||||||
|
name: "坚韧", hpMultiplier: 1.0, apMultiplier: 1.0,
|
||||||
|
cost: 15, tierMin: 6, description: "+暴击抗性",
|
||||||
|
},
|
||||||
|
[AffixType.FreezeRes]: {
|
||||||
|
name: "防寒", hpMultiplier: 1.0, apMultiplier: 1.0,
|
||||||
|
cost: 15, tierMin: 6, description: "+冰冻抗性",
|
||||||
|
},
|
||||||
|
[AffixType.KnockbackRes]: {
|
||||||
|
name: "稳固", hpMultiplier: 1.0, apMultiplier: 1.0,
|
||||||
|
cost: 15, tierMin: 6, description: "+击退抗性",
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -132,7 +147,7 @@ export const AffixMutualExclusion: AffixType[][] = [
|
|||||||
export const AffixPriority: AffixType[] = [
|
export const AffixPriority: AffixType[] = [
|
||||||
AffixType.Shield, AffixType.Regen, AffixType.Giant,
|
AffixType.Shield, AffixType.Regen, AffixType.Giant,
|
||||||
AffixType.Swift, AffixType.Elite, AffixType.Berserk,
|
AffixType.Swift, AffixType.Elite, AffixType.Berserk,
|
||||||
AffixType.Chain, AffixType.SummonerA,
|
AffixType.Chain, AffixType.SummonerA, AffixType.CritRes, AffixType.FreezeRes, AffixType.KnockbackRes,
|
||||||
]
|
]
|
||||||
|
|
||||||
// ======================== 蓝图模板类型 ========================
|
// ======================== 蓝图模板类型 ========================
|
||||||
|
|||||||
Reference in New Issue
Block a user