refactor: 移除Buff和Debuff卡牌类型及相关逻辑
- 删除CardType枚举中的Buff和Debuff类型 - 更新卡池描述从"英雄、技能、Buff、Debuff"改为"英雄、技能、功能" - 移除normalizeTypeFilter函数中处理Buff/Debuff类型的特殊逻辑
This commit is contained in:
@@ -5,8 +5,6 @@ export enum CardType {
|
||||
Hero = 1,
|
||||
Skill = 2,
|
||||
Special = 3,
|
||||
Buff = 5,
|
||||
Debuff = 6,
|
||||
}
|
||||
|
||||
/** 卡池等级定义 */
|
||||
@@ -45,7 +43,7 @@ export const CARD_POOL_INIT_LEVEL = CardKind.LV1
|
||||
export const CARD_POOL_MAX_LEVEL = CardKind.LV6
|
||||
/** 英雄最高等级限制 */
|
||||
export const CARD_HERO_MAX_LEVEL = 3
|
||||
/** 基础卡池(英雄、技能、Buff、Debuff) */
|
||||
/** 基础卡池(英雄、技能、功能) */
|
||||
export const CardPoolList: CardConfig[] = [
|
||||
{ uuid: 5001, type: CardType.Hero, cost: 3, weight: 25, lv: 1, hero_lv: 1 },
|
||||
{ uuid: 5101, type: CardType.Hero, cost: 3, weight: 25, lv: 1, hero_lv: 1 },
|
||||
@@ -174,10 +172,6 @@ export const getCardPoolByLv = (lv: number, onlyCurrentLv: boolean = false): Car
|
||||
|
||||
const normalizeTypeFilter = (type: CardType | CardType[]): Set<CardType> => {
|
||||
const list = Array.isArray(type) ? type : [type]
|
||||
const hasBuffLike = list.includes(CardType.Buff) || list.includes(CardType.Debuff)
|
||||
if (hasBuffLike) {
|
||||
return new Set<CardType>([...list, CardType.Buff, CardType.Debuff])
|
||||
}
|
||||
return new Set<CardType>(list)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user