装备 需要完善

This commit is contained in:
2025-07-02 17:45:00 +08:00
parent ebeb5ea04b
commit 11e6ecdf48
9 changed files with 1492 additions and 1332 deletions

View File

@@ -4,7 +4,7 @@
import { HeroList } from "./heroSet"
import { HeroSkillList, SkillSet } from "./SkillSet"
import { equip_list } from "./Equips"
import { accessorys, armors, equip_list, EquipType, weapons } from "./Equips"
//1:伙伴 2:技能 3:装备的出现概率配置
export const CardProbability={
@@ -99,7 +99,8 @@ export function getRandomCardUUIDByType(type: number): number {
// 获取多个不重复的指定类型卡牌
export function getRandomCardsByType(
type: number,
count: number
count: number,
equipSubType?: number // 新增参数
): { type: number; uuid: number }[] {
let cardList: number[] = [];
switch (type) {
@@ -110,7 +111,17 @@ export function getRandomCardsByType(
cardList = HeroSkillList; // 直接使用HeroSkillList数组
break;
case cardType.EQUIP:
cardList = equip_list;
switch(equipSubType){
case EquipType.WEAPON:
cardList = weapons ;
break;
case EquipType.ARMOR:
cardList = armors;
break;
case EquipType.ACCESSORY:
cardList = accessorys;
break;
}
break;
case cardType.SPECIAL:
cardList = SuperCardsList;