From 953ae2e0f9a6fe60154a8be7181ac3f9a16ae648 Mon Sep 17 00:00:00 2001 From: panw Date: Mon, 28 Jul 2025 14:17:56 +0800 Subject: [PATCH] dd --- assets/script/game/common/config/CardSet.ts | 5 + assets/script/game/common/config/GameEvent.ts | 1 + assets/script/game/common/config/TalentSet.ts | 611 +++++++++++++++++- assets/script/game/common/config/heroSet.ts | 79 +-- assets/script/game/hero/HeroViewComp.ts | 4 +- assets/script/game/map/CardComp.ts | 14 +- assets/script/game/map/CardsComp.ts | 13 + assets/script/game/map/EquipSkillComp.ts | 1 - assets/script/heros.md | 4 +- assets/script/wp.md | 180 +++--- 10 files changed, 734 insertions(+), 178 deletions(-) diff --git a/assets/script/game/common/config/CardSet.ts b/assets/script/game/common/config/CardSet.ts index 7685bcf3..26233d53 100644 --- a/assets/script/game/common/config/CardSet.ts +++ b/assets/script/game/common/config/CardSet.ts @@ -6,6 +6,7 @@ import { getHeroList, HeroList } from "./heroSet" import { getSkills, HeroSkillList, SkillSet } from "./SkillSet" import { equip_list, weapons, armors, accessorys, getEquipUUIDsByType } from "./Equips" import { getEnhancement } from "./LevelUp" +import { TalentList } from "./TalentSet" //1:伙伴 2:技能 3:装备的出现概率配置 export const CardProbability={ @@ -19,6 +20,7 @@ export const cardType={ EQUIP:3, SPECIAL:4, ENHANCEMENT:5, + TALENT:6, } // 获取随机卡牌UUID export function getRandomCardUUID( @@ -121,6 +123,9 @@ export function getRandomCardsByType( case cardType.SPECIAL: cardList = SuperCardsList; break; + case cardType.TALENT: + cardList = Object.keys(TalentList).map(key => parseInt(key)); + break; default: throw new Error(`Invalid card type: ${type}`); } diff --git a/assets/script/game/common/config/GameEvent.ts b/assets/script/game/common/config/GameEvent.ts index cadce504..d726267a 100644 --- a/assets/script/game/common/config/GameEvent.ts +++ b/assets/script/game/common/config/GameEvent.ts @@ -46,6 +46,7 @@ export enum GameEvent { EquipRemove = "EquipRemove", EquipSelect = "EquipSelect", FuncSelect = "FuncSelect", + TalentSelect = "TalentSelect", RefreshCard = "RefreshCard", WaveUpdate = "WaveUpdate", ChangeATK = "ChangeATK", diff --git a/assets/script/game/common/config/TalentSet.ts b/assets/script/game/common/config/TalentSet.ts index c465b335..537b916d 100644 --- a/assets/script/game/common/config/TalentSet.ts +++ b/assets/script/game/common/config/TalentSet.ts @@ -1,19 +1,592 @@ -export const talent_num=2 -export const Talents={ - 1001:{uuid:1001,type: 1,bonus:3,cost:1,lv_max:99,info:"勇者血量加成",name:"强身"}, - 1002:{uuid:1002,type: 1,bonus:3,cost:1,lv_max:99,info:"勇者攻击加成",name:"历练"}, - 1003:{uuid:1003,type: 1,bonus:3,cost:1,lv_max:99,info:"勇者攻击加速",name:"迅捷"}, - 1004:{uuid:1004,type: 1,bonus:3,cost:1,lv_max:99,info:"勇者技能cd加速",name:"咏唱"}, - 1005:{uuid:1005,type: 1,bonus:3,cost:1,lv_max:99,info:"勇者技能效果加强",name:"凝聚"}, - 1006:{uuid:1006,type: 1,bonus:3,cost:1,lv_max:99,info:"铜币收益增加",name:"精打细算"}, - // 1007:{uuid:1007,type: 1,bonus:3,cost:1,lv_max:99,info:"",name:""}, - // 1008:{uuid:1008,type: 1,bonus:3,cost:1,lv_max:99,info:"",name:""}, - // 1009:{uuid:1009,type: 1,bonus:3,cost:1,lv_max:99,info:"",name:""}, - // 1010:{uuid:1010,type: 1,bonus:3,cost:1,lv_max:99,info:"",name:""}, - 1011:{uuid:1011,type: 2,bonus:3,cost:1,lv_max:99,info:"佣兵血量加成",name:"后援"}, - 1012:{uuid:1012,type: 2,bonus:3,cost:1,lv_max:99,info:"佣兵攻击加成",name:"激励"}, - 1013:{uuid:1013,type: 2,bonus:3,cost:1,lv_max:99,info:"佣兵攻击加速",name:"鼓舞"}, - 1014:{uuid:1014,type: 2,bonus:3,cost:1,lv_max:99,info:"佣兵技能cd加速",name:"联结"}, - 1015:{uuid:1015,type: 2,bonus:3,cost:1,lv_max:99,info:"佣兵技能效果加强",name:"祝福"}, - 1016:{uuid:1016,type: 2,bonus:3,cost:1,lv_max:99,info:"佣兵技能持续时间",name:"透支"}, -} \ No newline at end of file +import { BuffAttr } from "./SkillSet" + +// 天赋品质枚举 +export enum TalentQuality { + BLUE = 3, // 蓝色品质 + PURPLE = 4, // 紫色品质 +} + +// 天赋类型枚举 +export enum TalentType { + ATK = 1, // 攻击力 + CRITICAL = 2, // 暴击率 + CRITICAL_DMG = 3, // 暴击伤害 + DODGE = 4, // 闪避 + ATTACK_COUNT = 5, // 攻击次数 + HP = 6, // 生命值 + DEF = 7, // 免伤 + PUNCTURE = 8, // 普通攻击穿透 + ATK_CD = 9, // 攻击加速 + SKILL_CD = 10, // 技能加速 + FROST_RATIO = 11, // 冰冻概率 + KNOCKBACK = 12, // 击退概率 + STUN_RATTO = 13, // 击晕概率 + REFLECT = 14, // 反伤 + LIFESTEAL = 15, // 吸血 +} + +// 天赋配置接口 +export interface TalentConfig { + uuid: number; + name: string; + type: TalentType; + quality: TalentQuality; + buffType: BuffAttr; + value: number; + cost: number; + maxLevel: number; + description: string; + icon?: string; +} + +// 天赋列表配置 +export const TalentList: { [key: number]: TalentConfig } = { + // ==================== 蓝色品质天赋 ==================== + + // 攻击系 + 1001: { + uuid: 1001, + name: "攻击强化", + type: TalentType.ATK, + quality: TalentQuality.BLUE, + buffType: BuffAttr.ATK, + value: 50, + cost: 1, + maxLevel: 1, + description: "攻击力+50%" + }, + + 1002: { + uuid: 1002, + name: "暴击强化", + type: TalentType.CRITICAL, + quality: TalentQuality.BLUE, + buffType: BuffAttr.CRITICAL, + value: 25, + cost: 1, + maxLevel: 1, + description: "暴击率+25%" + }, + + 1003: { + uuid: 1003, + name: "暴击伤害强化", + type: TalentType.CRITICAL_DMG, + quality: TalentQuality.BLUE, + buffType: BuffAttr.CRITICAL_DMG, + value: 50, + cost: 1, + maxLevel: 1, + description: "暴击伤害+50%" + }, + + 1004: { + uuid: 1004, + name: "闪避强化", + type: TalentType.DODGE, + quality: TalentQuality.BLUE, + buffType: BuffAttr.DODGE, + value: 15, + cost: 1, + maxLevel: 1, + description: "闪避率+15%" + }, + + 1005: { + uuid: 1005, + name: "多重攻击", + type: TalentType.ATTACK_COUNT, + quality: TalentQuality.BLUE, + buffType: BuffAttr.DEBUFF_COUNT, // 使用debuff_count来表示攻击次数 + value: 1, + cost: 1, + maxLevel: 1, + description: "攻击次数+1,伤害减40%" + }, + + 1006: { + uuid: 1006, + name: "生命强化", + type: TalentType.HP, + quality: TalentQuality.BLUE, + buffType: BuffAttr.HP, + value: 100, + cost: 1, + maxLevel: 1, + description: "生命值+100%" + }, + + 1007: { + uuid: 1007, + name: "免伤强化", + type: TalentType.DEF, + quality: TalentQuality.BLUE, + buffType: BuffAttr.DEF, + value: 15, + cost: 1, + maxLevel: 1, + description: "免伤+15%" + }, + + 1008: { + uuid: 1008, + name: "穿透强化", + type: TalentType.PUNCTURE, + quality: TalentQuality.BLUE, + buffType: BuffAttr.PUNCTURE, + value: 1, + cost: 1, + maxLevel: 1, + description: "普通攻击穿透+1" + }, + + 1009: { + uuid: 1009, + name: "攻击加速", + type: TalentType.ATK_CD, + quality: TalentQuality.BLUE, + buffType: BuffAttr.ATK_CD, + value: 40, + cost: 1, + maxLevel: 1, + description: "攻击速度+40%" + }, + + 1010: { + uuid: 1010, + name: "技能加速", + type: TalentType.SKILL_CD, + quality: TalentQuality.BLUE, + buffType: BuffAttr.SKILL_CD, + value: 40, + cost: 1, + maxLevel: 1, + description: "技能冷却缩减+40%" + }, + + 1011: { + uuid: 1011, + name: "冰冻强化", + type: TalentType.FROST_RATIO, + quality: TalentQuality.BLUE, + buffType: BuffAttr.FROST_RATIO, + value: 10, + cost: 1, + maxLevel: 1, + description: "冰冻概率+10%" + }, + + 1012: { + uuid: 1012, + name: "击退强化", + type: TalentType.KNOCKBACK, + quality: TalentQuality.BLUE, + buffType: BuffAttr.KNOCKBACK, + value: 10, + cost: 1, + maxLevel: 1, + description: "击退概率+10%" + }, + + 1013: { + uuid: 1013, + name: "击晕强化", + type: TalentType.STUN_RATTO, + quality: TalentQuality.BLUE, + buffType: BuffAttr.STUN_RATTO, + value: 10, + cost: 1, + maxLevel: 1, + description: "击晕概率+10%" + }, + + 1014: { + uuid: 1014, + name: "反伤强化", + type: TalentType.REFLECT, + quality: TalentQuality.BLUE, + buffType: BuffAttr.REFLECT, + value: 20, + cost: 1, + maxLevel: 1, + description: "反伤+20%" + }, + + 1015: { + uuid: 1015, + name: "吸血强化", + type: TalentType.LIFESTEAL, + quality: TalentQuality.BLUE, + buffType: BuffAttr.POWER_UP, // 使用power_up来表示吸血效果 + value: 20, + cost: 1, + maxLevel: 1, + description: "吸血+20%" + }, + + // ==================== 紫色品质天赋 ==================== + // 紫色品质比蓝色品质强15% + + 2001: { + uuid: 2001, + name: "攻击大师", + type: TalentType.ATK, + quality: TalentQuality.PURPLE, + buffType: BuffAttr.ATK, + value: 57, // 50 * 1.15 + cost: 2, + maxLevel: 1, + description: "攻击力+57%" + }, + + 2002: { + uuid: 2002, + name: "暴击大师", + type: TalentType.CRITICAL, + quality: TalentQuality.PURPLE, + buffType: BuffAttr.CRITICAL, + value: 29, // 25 * 1.15 + cost: 2, + maxLevel: 1, + description: "暴击率+29%" + }, + + 2003: { + uuid: 2003, + name: "暴击伤害大师", + type: TalentType.CRITICAL_DMG, + quality: TalentQuality.PURPLE, + buffType: BuffAttr.CRITICAL_DMG, + value: 57, // 50 * 1.15 + cost: 2, + maxLevel: 1, + description: "暴击伤害+57%" + }, + + 2004: { + uuid: 2004, + name: "闪避大师", + type: TalentType.DODGE, + quality: TalentQuality.PURPLE, + buffType: BuffAttr.DODGE, + value: 17, // 15 * 1.15 + cost: 2, + maxLevel: 1, + description: "闪避率+17%" + }, + + 2005: { + uuid: 2005, + name: "多重攻击大师", + type: TalentType.ATTACK_COUNT, + quality: TalentQuality.PURPLE, + buffType: BuffAttr.DEBUFF_COUNT, + value: 1, + cost: 2, + maxLevel: 1, + description: "攻击次数+1,伤害减35%" // 伤害减幅也相应减少 + }, + + 2006: { + uuid: 2006, + name: "生命大师", + type: TalentType.HP, + quality: TalentQuality.PURPLE, + buffType: BuffAttr.HP, + value: 115, // 100 * 1.15 + cost: 2, + maxLevel: 1, + description: "生命值+115%" + }, + + 2007: { + uuid: 2007, + name: "免伤大师", + type: TalentType.DEF, + quality: TalentQuality.PURPLE, + buffType: BuffAttr.DEF, + value: 17, // 15 * 1.15 + cost: 2, + maxLevel: 1, + description: "免伤+17%" + }, + + 2008: { + uuid: 2008, + name: "穿透大师", + type: TalentType.PUNCTURE, + quality: TalentQuality.PURPLE, + buffType: BuffAttr.PUNCTURE, + value: 1, + cost: 2, + maxLevel: 1, + description: "普通攻击穿透+1,伤害不减" + }, + + 2009: { + uuid: 2009, + name: "攻击加速大师", + type: TalentType.ATK_CD, + quality: TalentQuality.PURPLE, + buffType: BuffAttr.ATK_CD, + value: 46, // 40 * 1.15 + cost: 2, + maxLevel: 1, + description: "攻击速度+46%" + }, + + 2010: { + uuid: 2010, + name: "技能加速大师", + type: TalentType.SKILL_CD, + quality: TalentQuality.PURPLE, + buffType: BuffAttr.SKILL_CD, + value: 46, // 40 * 1.15 + cost: 2, + maxLevel: 1, + description: "技能冷却缩减+46%" + }, + + 2011: { + uuid: 2011, + name: "冰冻大师", + type: TalentType.FROST_RATIO, + quality: TalentQuality.PURPLE, + buffType: BuffAttr.FROST_RATIO, + value: 12, // 10 * 1.15 + cost: 2, + maxLevel: 1, + description: "冰冻概率+12%" + }, + + 2012: { + uuid: 2012, + name: "击退大师", + type: TalentType.KNOCKBACK, + quality: TalentQuality.PURPLE, + buffType: BuffAttr.KNOCKBACK, + value: 12, // 10 * 1.15 + cost: 2, + maxLevel: 1, + description: "击退概率+12%" + }, + + 2013: { + uuid: 2013, + name: "击晕大师", + type: TalentType.STUN_RATTO, + quality: TalentQuality.PURPLE, + buffType: BuffAttr.STUN_RATTO, + value: 12, // 10 * 1.15 + cost: 2, + maxLevel: 1, + description: "击晕概率+12%" + }, + + 2014: { + uuid: 2014, + name: "反伤大师", + type: TalentType.REFLECT, + quality: TalentQuality.PURPLE, + buffType: BuffAttr.REFLECT, + value: 23, // 20 * 1.15 + cost: 2, + maxLevel: 1, + description: "反伤+23%" + }, + + 2015: { + uuid: 2015, + name: "吸血大师", + type: TalentType.LIFESTEAL, + quality: TalentQuality.PURPLE, + buffType: BuffAttr.POWER_UP, + value: 23, // 20 * 1.15 + cost: 2, + maxLevel: 1, + description: "吸血+23%" + }, +}; + +// 获取天赋配置 +export const getTalentConfig = (uuid: number): TalentConfig | null => { + return TalentList[uuid] || null; +}; + +// 获取指定品质的所有天赋 +export const getTalentsByQuality = (quality: TalentQuality): TalentConfig[] => { + return Object.values(TalentList).filter(talent => talent.quality === quality); +}; + +// 获取指定类型的所有天赋 +export const getTalentsByType = (type: TalentType): TalentConfig[] => { + return Object.values(TalentList).filter(talent => talent.type === type); +}; + +// 获取所有蓝色品质天赋 +export const getBlueTalents = (): TalentConfig[] => { + return getTalentsByQuality(TalentQuality.BLUE); +}; + +// 获取所有紫色品质天赋 +export const getPurpleTalents = (): TalentConfig[] => { + return getTalentsByQuality(TalentQuality.PURPLE); +}; + +// 天赋流派配置 +export const TalentBuilds = { + // 攻击系流派 + HIGH_ATK_SPEED: { + name: "高攻高速流", + description: "4个高攻 + 2个高攻速", + talents: [1001, 1001, 1001, 1001, 1009, 1009], + blueTalents: [1001, 1001, 1001, 1001, 1009, 1009], + purpleTalents: [2001, 2001, 2001, 2001, 2009, 2009] + }, + + HIGH_ATK_CRIT: { + name: "高攻高暴击流", + description: "4个高攻 + 2个高暴击", + talents: [1001, 1001, 1001, 1001, 1002, 1002], + blueTalents: [1001, 1001, 1001, 1001, 1002, 1002], + purpleTalents: [2001, 2001, 2001, 2001, 2002, 2002] + }, + + CRIT_BUILD: { + name: "暴击流", + description: "4个暴击 + 2个暴击加成 (100%暴击率)", + talents: [1002, 1002, 1002, 1002, 1003, 1003], + blueTalents: [1002, 1002, 1002, 1002, 1003, 1003], + purpleTalents: [2002, 2002, 2002, 2002, 2003, 2003] + }, + + MULTI_ATTACK: { + name: "多段攻击流", + description: "4个攻击次数+1 + 2个攻击加速 (高频低伤)", + talents: [1005, 1005, 1005, 1005, 1009, 1009], + blueTalents: [1005, 1005, 1005, 1005, 1009, 1009], + purpleTalents: [2005, 2005, 2005, 2005, 2009, 2009] + }, + + // 防御系流派 + TANK_BUILD: { + name: "坦克流", + description: "4个HP + 2个免伤 (超高生存)", + talents: [1006, 1006, 1006, 1006, 1007, 1007], + blueTalents: [1006, 1006, 1006, 1006, 1007, 1007], + purpleTalents: [2006, 2006, 2006, 2006, 2007, 2007] + }, + + DODGE_BUILD: { + name: "闪避流", + description: "4个闪避 + 2个HP (60%闪避率)", + talents: [1004, 1004, 1004, 1004, 1006, 1006], + blueTalents: [1004, 1004, 1004, 1004, 1006, 1006], + purpleTalents: [2004, 2004, 2004, 2004, 2006, 2006] + }, + + REFLECT_BUILD: { + name: "反伤流", + description: "4个反伤 + 2个HP (80%反伤)", + talents: [1014, 1014, 1014, 1014, 1006, 1006], + blueTalents: [1014, 1014, 1014, 1014, 1006, 1006], + purpleTalents: [2014, 2014, 2014, 2014, 2006, 2006] + }, + + LIFESTEAL_BUILD: { + name: "吸血流", + description: "4个吸血 + 2个攻击 (80%吸血)", + talents: [1015, 1015, 1015, 1015, 1001, 1001], + blueTalents: [1015, 1015, 1015, 1015, 1001, 1001], + purpleTalents: [2015, 2015, 2015, 2015, 2001, 2001] + }, + + // 控制系流派 + FROST_CONTROL: { + name: "冰冻控制流", + description: "4个冰冻概率 + 2个技能加速 (40%冰冻率)", + talents: [1011, 1011, 1011, 1011, 1010, 1010], + blueTalents: [1011, 1011, 1011, 1011, 1010, 1010], + purpleTalents: [2011, 2011, 2011, 2011, 2010, 2010] + }, + + KNOCKBACK_CONTROL: { + name: "击退控制流", + description: "4个击退概率 + 2个攻击加速 (40%击退率)", + talents: [1012, 1012, 1012, 1012, 1009, 1009], + blueTalents: [1012, 1012, 1012, 1012, 1009, 1009], + purpleTalents: [2012, 2012, 2012, 2012, 2009, 2009] + }, + + STUN_CONTROL: { + name: "击晕控制流", + description: "4个击晕概率 + 2个攻击 (40%击晕率)", + talents: [1013, 1013, 1013, 1013, 1001, 1001], + blueTalents: [1013, 1013, 1013, 1013, 1001, 1001], + purpleTalents: [2013, 2013, 2013, 2013, 2001, 2001] + }, + + // 技能系流派 + SKILL_BUILD: { + name: "技能流", + description: "4个技能加速 + 2个攻击 (160%技能加速)", + talents: [1010, 1010, 1010, 1010, 1001, 1001], + blueTalents: [1010, 1010, 1010, 1010, 1001, 1001], + purpleTalents: [2010, 2010, 2010, 2010, 2001, 2001] + }, + + // 混合流派 + BALANCED_BUILD: { + name: "攻防平衡流", + description: "2个攻击 + 2个HP + 2个免伤", + talents: [1001, 1001, 1006, 1006, 1007, 1007], + blueTalents: [1001, 1001, 1006, 1006, 1007, 1007], + purpleTalents: [2001, 2001, 2006, 2006, 2007, 2007] + }, + + SPEED_BUILD: { + name: "速度流", + description: "4个攻击加速 + 2个技能加速 (全方位加速)", + talents: [1009, 1009, 1009, 1009, 1010, 1010], + blueTalents: [1009, 1009, 1009, 1009, 1010, 1010], + purpleTalents: [2009, 2009, 2009, 2009, 2010, 2010] + }, + + PENETRATION_CRIT: { + name: "穿透暴击流", + description: "2个穿透 + 2个暴击 + 2个暴击加成", + talents: [1008, 1008, 1002, 1002, 1003, 1003], + blueTalents: [1008, 1008, 1002, 1002, 1003, 1003], + purpleTalents: [2008, 2008, 2002, 2002, 2003, 2003] + }, + + SURVIVAL_DPS: { + name: "生存输出流", + description: "2个攻击 + 2个吸血 + 2个闪避", + talents: [1001, 1001, 1015, 1015, 1004, 1004], + blueTalents: [1001, 1001, 1015, 1015, 1004, 1004], + purpleTalents: [2001, 2001, 2015, 2015, 2004, 2004] + } +}; + +// 获取推荐天赋流派 +export const getRecommendedBuilds = () => { + return Object.values(TalentBuilds); +}; + +// 获取指定流派的天赋配置 +export const getBuildTalents = (buildName: string): number[] => { + const build = TalentBuilds[buildName as keyof typeof TalentBuilds]; + return build ? build.talents : []; +}; + +// 天赋系统配置 +export const TalentSystemConfig = { + maxTalents: 6, // 玩家最多拥有6个天赋 + blueQualityMultiplier: 1.0, // 蓝色品质基础倍率 + purpleQualityMultiplier: 1.15, // 紫色品质比蓝色强15% + talentCost: { + [TalentQuality.BLUE]: 1, // 蓝色天赋消耗1点 + [TalentQuality.PURPLE]: 2 // 紫色天赋消耗2点 + } +}; \ No newline at end of file diff --git a/assets/script/game/common/config/heroSet.ts b/assets/script/game/common/config/heroSet.ts index 088e77b9..074caa93 100644 --- a/assets/script/game/common/config/heroSet.ts +++ b/assets/script/game/common/config/heroSet.ts @@ -1,5 +1,4 @@ import { v3 } from "cc" -import { BuffAttr } from "./SkillSet" /** * kind :1:烈焰 2:寒冰 3:自然 4:暗影 5:神圣 @@ -243,138 +242,114 @@ export const HeroInfo = { //主将 5001:{uuid:5001,name:"刺心.艾吉斯",path:"k1", quality:HQuality.BLUE,lv:1,kind:1, type:HType.warrior,hp:100,ap:15,dis:600,cd:1.5,speed:50,skills:[6001,6004,6004], - buff:[ - {buff_type:BuffAttr.PUNCTURE,value:1}, - ],info:"剑类专精,穿刺伤害额外+10%"}, + buff:[],info:"剑类专精,穿刺伤害额外+10%"}, 5002:{uuid:5002,name:"飓风.格罗姆",path:"k2", quality:HQuality.BLUE,lv:1,kind:1, type:HType.warrior,hp:100,ap:15,dis:600,cd:1.5,speed:50,skills:[6001,6005,6005], - buff:[ - {buff_type:BuffAttr.WFUNY,value:10}, - ],info:"斧类专精,风怒概率增加10%"}, + buff:[],info:"斧类专精,风怒概率增加10%"}, 5003:{uuid:5003,name:"碎颅.赫克托",path:"k4", quality:HQuality.BLUE,lv:1,kind:1, type:HType.warrior,hp:100,ap:15,dis:600,cd:1.5,speed:50,skills:[6001,6021,6001], - buff:[ - {buff_type:BuffAttr.CRITICAL,value:10}, - ],info:"锤类专精,暴击概率增加10%"}, + buff:[],info:"锤类专精,暴击概率增加10%"}, 5004:{uuid:5004,name:"裂伤.塔米拉",path:"k3", quality:HQuality.BLUE,lv:1,kind:1, type:HType.warrior,hp:100,ap:15,dis:600,cd:1.5,speed:50,skills:[6001,6021,6001], - buff:[ - {buff_type:BuffAttr.BURN_COUNT,value:1}, - ],info:"刀类专精,易伤效果额外持续1次"}, + buff:[],info:"刀类专精,易伤效果额外持续1次"}, 5005:{uuid:5005,name:"幽灵射手",path:"a4", quality:HQuality.BLUE,lv:1,kind:2, type:HType.remote,hp:100,ap:15,dis:600,cd:1.5,speed:50,skills:[6003,6003,6003], - buff:[ - - ],info:"说明"}, + buff:[],info:"说明"}, 5006:{uuid:5006,name:"战争领主",path:"k5", quality:HQuality.BLUE,lv:1,kind:2, type:HType.warrior,hp:100,ap:15,dis:600,cd:1.5,speed:50,skills:[6002,6002,6002], - buff:[ - - ],info:"说明"}, + buff:[],info:"说明"}, 5007:{uuid:5007,name:"混沌法师",path:"zh1", quality:HQuality.BLUE,lv:1,kind:2, type:HType.mage,hp:100,ap:15,dis:600,cd:1.5,speed:50,skills:[6002,6002,6002], - buff:[ - - ],info:"说明"}, + buff:[],info:"说明"}, 5008:{uuid:5008,name:"火焰法师",path:"zh2", quality:HQuality.BLUE,lv:1,kind:2, type:HType.mage,hp:100,ap:15,dis:600,cd:1.5,speed:50,skills:[6002,6002,6002], - buff:[ - - ],info:"说明"}, + buff:[],info:"说明"}, 5009:{uuid:5009,name:"风暴精灵",path:"m4", quality:HQuality.BLUE,lv:1,kind:2, type:HType.mage,hp:100,ap:15,dis:600,cd:1.5,speed:50,skills:[6002,6002,6002], - buff:[ - - ],info:"说明"}, + buff:[],info:"说明"}, 5010:{uuid:5010,name:"战争祭祀",path:"d2", quality:HQuality.BLUE,lv:1,kind:2, type:HType.mage,hp:100,ap:15,dis:600,cd:1.5,speed:50,skills:[6002,6002,6002], - buff:[ - - ],info:"说明"}, + buff:[],info:"说明"}, 5011:{uuid:5011,name:"暴风射手",path:"a5", quality:HQuality.BLUE,lv:1,kind:2, type:HType.remote,hp:100,ap:15,dis:600,cd:1.5,speed:50,skills:[6003,6003,6003], - buff:[ - - ],info:"说明"}, + buff:[],info:"说明"}, 5012:{uuid:5012,name:"苍穹射手",path:"a3", quality:HQuality.BLUE,lv:1,kind:1, type:HType.remote,hp:100,ap:15,dis:600,cd:1.5,speed:50,skills:[6003,6003,6003], - buff:[ - - ],info:"说明"}, + buff:[],info:"说明"}, //怪物 5201:{uuid:5201,name:"兽人战士",path:"mor1", quality:HQuality.GREEN,lv:1,kind:1, type:HType.warrior,hp:25,ap:5,dis:90,cd:2,speed:45,skills:[6010], - buff:[ ],info:"普通怪物-战士型"}, + buff:[],info:"普通怪物-战士型"}, 5202:{uuid:5202,name:"兽人刺客",path:"mor2", quality:HQuality.GREEN,lv:1,kind:1, type:HType.remote,hp:20,ap:5,dis:350,cd:1.5,speed:45,skills:[6008], - buff:[ ],info:"普通怪物-战士型"}, + buff:[],info:"普通怪物-战士型"}, 5203:{uuid:5203,name:"兽人护卫",path:"mor3", quality:HQuality.GREEN,lv:1,kind:1, type:HType.warrior,hp:25,ap:5,dis:90,cd:2,speed:45,skills:[6010], - buff:[ ],info:"普通怪物-战士型"}, + buff:[],info:"普通怪物-战士型"}, 5204:{uuid:5204,name:"石卫", path:"mgem1",quality:HQuality.GREEN,lv:1,kind:1, type:HType.mage,hp:18,ap:5,dis:90,cd:2.5,speed:45,skills:[6010], - buff:[ ],info:"法师怪物-高伤害脆弱"}, + buff:[],info:"法师怪物-高伤害脆弱"}, 5205:{uuid:5205,name:"土卫", path:"mgem2",quality:HQuality.GREEN,lv:1,kind:1, type:HType.mage,hp:18,ap:5,dis:90,cd:2.5,speed:45,skills:[6010], - buff:[ ],info:"法师怪物-高伤害脆弱"}, + buff:[],info:"法师怪物-高伤害脆弱"}, 5206:{uuid:5206,name:"树卫", path:"mgem3",quality:HQuality.GREEN,lv:1,kind:1, type:HType.mage,hp:18,ap:5,dis:90,cd:2.5,speed:45,skills:[6010], - buff:[ ],info:"法师怪物-高伤害脆弱"}, + buff:[],info:"法师怪物-高伤害脆弱"}, 5219:{uuid:5219,name:"牛头战士",path:"mn1", quality:HQuality.GREEN,lv:2,kind:1, type:HType.warrior,hp:25,ap:5,dis:90,cd:2,speed:45,skills:[6010], - buff:[ ],info:"普通怪物-战士型"}, + buff:[],info:"普通怪物-战士型"}, 5220:{uuid:5220,name:"牛头战士",path:"mn2", quality:HQuality.GREEN,lv:1,kind:1, type:HType.warrior,hp:25,ap:5,dis:90,cd:2,speed:45,skills:[6010], - buff:[ ],info:"普通怪物-战士型"}, + buff:[],info:"普通怪物-战士型"}, 5221:{uuid:5221,name:"牛头战士",path:"mn3", quality:HQuality.GREEN,lv:1,kind:1, type:HType.remote,hp:20,ap:5,dis:350,cd:1.5,speed:45,skills:[6008], - buff:[ ],info:"普通怪物-战士型"}, + buff:[],info:"普通怪物-战士型"}, 5222:{uuid:5222,name:"独眼巨人",path:"md1", quality:HQuality.GREEN,lv:1,kind:1, type:HType.warrior,hp:25,ap:5,dis:90,cd:2,speed:45,skills:[6010], - buff:[ ],info:"普通怪物-战士型"}, + buff:[],info:"普通怪物-战士型"}, 5223:{uuid:5223,name:"独眼巨人",path:"md2", quality:HQuality.GREEN,lv:1,kind:1, type:HType.warrior,hp:25,ap:5,dis:90,cd:2,speed:45,skills:[6010], - buff:[ ],info:"普通怪物-战士型"}, + buff:[],info:"普通怪物-战士型"}, 5224:{uuid:5224,name:"独眼巨人",path:"md3", quality:HQuality.GREEN,lv:1,kind:1, type:HType.remote,hp:20,ap:5,dis:350,cd:1.5,speed:45,skills:[6010], - buff:[ ],info:"普通怪物-战士型"}, + buff:[],info:"普通怪物-战士型"}, 5225:{uuid:5225,name:"精英独眼",path:"md4", quality:HQuality.BLUE,lv:1,kind:1, type:HType.warrior,hp:45,ap:12,dis:300,cd:2,speed:25,skills:[6006], - buff:[ ],info:"精英怪物-战士型"}, + buff:[],info:"精英怪物-战士型"}, 5226:{uuid:5226,name:"精英牛头",path:"mn4", quality:HQuality.BLUE,lv:1,kind:1, type:HType.warrior,hp:45,ap:12,dis:300,cd:2,speed:25,skills:[6007], - buff:[ ],info:"精英怪物-战士型"}, + buff:[],info:"精英怪物-战士型"}, 5227:{uuid:5227,name:"精英兽人",path:"mor4", quality:HQuality.BLUE,lv:1,kind:1, type:HType.warrior,hp:45,ap:12,dis:300,cd:2,speed:25,skills:[6008], - buff:[ ],info:"精英怪物-战士型"}, + buff:[],info:"精英怪物-战士型"}, }; diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index 5ee8bf72..d1aa70bb 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -464,8 +464,8 @@ export class HeroViewComp extends CCComp { if(this.fac==FacSet.MON) smc.vmdata.hero.power+=smc.vmdata.hero.POWER_UP+FightSet.CRIT_TO_POWER //暴击涨能量 怪物被暴击,因为只有一个英雄 直接处理 } this.hp -= damage; - if(this.fac==FacSet.HERO) {smc.vmdata.hero.power+=smc.vmdata.hero.POWER_UP+FightSet.ATKED_TO_POWER;console.log("被攻击涨能量",this)} //被攻击涨能量 - if(this.fac==FacSet.MON) {smc.vmdata.hero.power+=smc.vmdata.hero.POWER_UP+FightSet.ATK_TO_POWER;console.log("攻击命中涨能量",this)} //攻击命中涨能量 因为是只有1个英雄 直接处理 + if(this.fac==FacSet.HERO) smc.vmdata.hero.power+=smc.vmdata.hero.POWER_UP+FightSet.ATKED_TO_POWER //被攻击涨能量 + if(this.fac==FacSet.MON) smc.vmdata.hero.power+=smc.vmdata.hero.POWER_UP+FightSet.ATK_TO_POWER //攻击命中涨能量 因为是只有1个英雄 直接处理 if(this.hp <= 0) { if(this == null) return; diff --git a/assets/script/game/map/CardComp.ts b/assets/script/game/map/CardComp.ts index 5346638b..5b4deaa5 100644 --- a/assets/script/game/map/CardComp.ts +++ b/assets/script/game/map/CardComp.ts @@ -13,6 +13,7 @@ import { cardType, getRandomCardUUID, Quality, SuperCards } from "../common/conf import { EquipInfo, EquipType } from "../common/config/Equips"; import { FightSet } from "../common/config/Mission"; import { EnhancementOptions } from "../common/config/LevelUp"; +import { TalentList } from "../common/config/TalentSet"; const { ccclass, property } = _decorator; @@ -40,6 +41,13 @@ export class CardComp extends CCComp { this.node.getChildByName("Button").active=false this.node.getChildByName("show").active=false } + talent_select(args: any){ + this.c_type=cardType.TALENT + this.c_uuid=args.uuid + this.node.getChildByName("show").active=false + this.node.getChildByName("anim").getChildByName("up").getComponent(Animation).play('carsup') + this.show_talent(this.c_uuid) + } hero_select(args: any,is_master:boolean=false){ console.log("[cardcomp]:card hero_select",args,is_master) this.c_type=cardType.HERO @@ -114,7 +122,11 @@ export class CardComp extends CCComp { break } } - + show_talent(uuid:number){ + let show=this.node.getChildByName("show") + show.getChildByName("name").getChildByName("name").getComponent(Label).string=TalentList[uuid].name + this.do_card_bg_show(TalentList[uuid].quality) + } show_skill(uuid:number,data:any){ let show=this.node.getChildByName("show") show.getChildByName("name").getChildByName("name").getComponent(Label).string=SkillSet[uuid].name diff --git a/assets/script/game/map/CardsComp.ts b/assets/script/game/map/CardsComp.ts index 0e74a9e4..0e97dc81 100644 --- a/assets/script/game/map/CardsComp.ts +++ b/assets/script/game/map/CardsComp.ts @@ -92,11 +92,24 @@ export class CardsCompComp extends CCComp { this.node.getChildByName("top").getChildByName("title").getChildByName("Label").getComponent(Label).string="选择强化" this.enhancement_select() break + case GameEvent.TalentSelect: + console.log("[CardsComp]:显示天赋选择卡牌") + this.node.getChildByName("btns").getChildByName("cancel").active=true + this.node.getChildByName("top").getChildByName("title").getChildByName("Label").getComponent(Label).string="选择天赋" + this.talent_select() + break } if(!is_refresh) this.show() } + talent_select(){ + let list=getRandomCardsByType(cardType.TALENT,3,Quality.GREEN) + console.log("[CardsComp]:天赋选择卡牌列表",list) + this.card1c.talent_select(list[0]) + this.card2c.talent_select(list[1]) + this.card3c.talent_select(list[2]) + } enhancement_select(){ let list=getEnhancement(smc.enhancements,3) console.log("[CardsComp]:强化选择卡牌列表",smc.enhancements,list) diff --git a/assets/script/game/map/EquipSkillComp.ts b/assets/script/game/map/EquipSkillComp.ts index 85f4b388..81c24fd5 100644 --- a/assets/script/game/map/EquipSkillComp.ts +++ b/assets/script/game/map/EquipSkillComp.ts @@ -113,7 +113,6 @@ export class EquipSkillComp extends CCComp { do_skill(uuid:number){ - console.log("出发技能:",uuid) oops.message.dispatchEvent(GameEvent.CastHeroSkill,uuid) } diff --git a/assets/script/heros.md b/assets/script/heros.md index 4adebd66..af8c96b4 100644 --- a/assets/script/heros.md +++ b/assets/script/heros.md @@ -2,5 +2,5 @@ | 英雄类型 | 英雄名 | 普通技能 | 普通技能cd类型 | cd值 | 大招 | 天赋 | |----------|---------|------------------------------------|---------------|------ |------------|--------------| -| 战士 | 圣盾战 | 获得可抵御2次攻击的圣盾 | 被攻击 | 10次 | 火焰盾 | | -| 战士 | 治疗战 | 恢复20%血量 | 被攻击 | 10次 | 光柱攻击 | | \ No newline at end of file +| 战士 | 圣盾战 | 获得可抵御2次攻击的圣盾 | 被攻击 | 10 | 火焰盾 | | +| 战士 | 治疗战 | 恢复20%血量 | 被攻击 | 10 | 光柱攻击 | | \ No newline at end of file diff --git a/assets/script/wp.md b/assets/script/wp.md index 93586370..28787467 100644 --- a/assets/script/wp.md +++ b/assets/script/wp.md @@ -57,120 +57,98 @@ 20. 生存输出流 : 2个攻击 + 2个吸血 + 2个闪避 --- +## 具体 天赋列表 -# 📊 各流派天赋加成总和计算表 +## 🎯 天赋系统实现说明 -## 品质系数说明 -- **紫色**:100%(基础数值) -- **蓝色**:85%(减少15%) -- **绿色**:70%(减少30%) +### 天赋配置结构 +```typescript +// 天赋配置接口 +interface TalentConfig { + uuid: number; // 天赋唯一ID + name: string; // 天赋名称 + type: TalentType; // 天赋类型 + quality: TalentQuality; // 品质(蓝色/紫色) + buffType: BuffAttr; // 对应的Buff属性 + value: number; // 属性值 + cost: number; // 消耗点数 + maxLevel: number; // 最大等级 + description: string; // 描述 + icon?: string; // 图标路径 +} +``` -## 攻击系流派加成总和 +### 天赋ID规则 +- **蓝色品质**: 1001-1015 (15个天赋) +- **紫色品质**: 2001-2015 (15个天赋,比蓝色强15%) -### 1. 高攻高速流派 -- **紫色**:攻击+200% + 攻击加速+80% -- **蓝色**:攻击+170% + 攻击加速+68% -- **绿色**:攻击+140% + 攻击加速+56% +### 天赋类型对应关系 +| 天赋类型 | BuffAttr | 蓝色值 | 紫色值 | 说明 | +|---------|----------|--------|--------|------| +| 攻击力 | ATK | +50% | +57% | 基础攻击力提升 | +| 暴击率 | CRITICAL | +25% | +29% | 暴击概率提升 | +| 暴击伤害 | CRITICAL_DMG | +50% | +57% | 暴击伤害提升 | +| 闪避率 | DODGE | +15% | +17% | 闪避概率提升 | +| 攻击次数 | DEBUFF_COUNT | +1 | +1 | 攻击次数增加 | +| 生命值 | HP | +100% | +115% | 生命值提升 | +| 免伤 | DEF | +15% | +17% | 伤害减免 | +| 穿透 | PUNCTURE | +1 | +1 | 攻击穿透目标数 | +| 攻击速度 | ATK_CD | +40% | +46% | 攻击冷却缩减 | +| 技能冷却 | SKILL_CD | +40% | +46% | 技能冷却缩减 | +| 冰冻概率 | FROST_RATIO | +10% | +12% | 冰冻效果概率 | +| 击退概率 | KNOCKBACK | +10% | +12% | 击退效果概率 | +| 击晕概率 | STUN_RATTO | +10% | +12% | 击晕效果概率 | +| 反伤 | REFLECT | +20% | +23% | 反伤比例 | +| 吸血 | POWER_UP | +20% | +23% | 吸血比例 | -### 2. 高攻高暴击流派 -- **紫色**:攻击+200% + 暴击+50% -- **蓝色**:攻击+170% + 暴击+42.5% -- **绿色**:攻击+140% + 暴击+35% +### 使用示例 -### 3. 高攻高闪避流派 -- **紫色**:攻击+200% + 闪避+30% -- **蓝色**:攻击+170% + 闪避+25.5% -- **绿色**:攻击+140% + 闪避+21% +#### 1. 获取天赋配置 +```typescript +import { getTalentConfig, getBlueTalents, getPurpleTalents } from "./TalentSet"; -### 4. 高攻高穿透流派 -- **紫色**:攻击+200% + 穿透+2层 -- **蓝色**:攻击+170% + 穿透+1.7层 -- **绿色**:攻击+140% + 穿透+1.4层 +// 获取指定天赋配置 +const talent = getTalentConfig(1001); // 获取蓝色攻击强化天赋 -### 5. 暴击流 -- **紫色**:暴击+100% + 暴击加成+100% -- **蓝色**:暴击+85% + 暴击加成+85% -- **绿色**:暴击+70% + 暴击加成+70% +// 获取所有蓝色天赋 +const blueTalents = getBlueTalents(); -### 6. 多段攻击流 -- **紫色**:攻击次数+4(-160%伤害) + 攻击加速+80% -- **蓝色**:攻击次数+3.4(-136%伤害) + 攻击加速+68% -- **绿色**:攻击次数+2.8(-112%伤害) + 攻击加速+56% +// 获取所有紫色天赋 +const purpleTalents = getPurpleTalents(); +``` -## 防御系流派加成总和 +#### 2. 天赋流派推荐 +```typescript +import { getRecommendedBuilds, TalentBuilds } from "./TalentSet"; -### 7. 坦克流 -- **紫色**:HP+400% + 免伤+30% -- **蓝色**:HP+340% + 免伤+25.5% -- **绿色**:HP+280% + 免伤+21% +// 获取所有推荐流派 +const builds = getRecommendedBuilds(); -### 8. 闪避流 -- **紫色**:闪避+60% + HP+200% -- **蓝色**:闪避+51% + HP+170% -- **绿色**:闪避+42% + HP+140% +// 获取暴击流配置 +const critBuild = TalentBuilds.CRIT_BUILD; +console.log(critBuild.name); // "暴击流" +console.log(critBuild.description); // "4个暴击 + 2个暴击加成 (100%暴击率)" +console.log(critBuild.talents); // [1002, 1002, 1002, 1002, 1003, 1003] +``` -### 9. 反伤流 -- **紫色**:反伤+80% + HP+200% -- **蓝色**:反伤+68% + HP+170% -- **绿色**:反伤+56% + HP+140% +#### 3. 天赋系统配置 +```typescript +import { TalentSystemConfig, TalentQuality } from "./TalentSet"; -### 10. 吸血流 -- **紫色**:吸血+80% + 攻击+100% -- **蓝色**:吸血+68% + 攻击+85% -- **绿色**:吸血+56% + 攻击+70% +// 系统配置 +console.log(TalentSystemConfig.maxTalents); // 6 - 最多6个天赋 +console.log(TalentSystemConfig.talentCost[TalentQuality.BLUE]); // 1 - 蓝色天赋消耗1点 +console.log(TalentSystemConfig.talentCost[TalentQuality.PURPLE]); // 2 - 紫色天赋消耗2点 +``` -## 控制系流派加成总和 +### 平衡性设计 +- **品质差异**: 紫色比蓝色强15%,但消耗2倍点数 +- **流派平衡**: 每个流派都有明确的优势和劣势 +- **组合限制**: 最多6个天赋,需要玩家做出选择 +- **数值平衡**: 4个同类型天赋可以达到显著效果,2个辅助天赋提供额外增益 -### 11. 冰冻控制流 -- **紫色**:冰冻+40% + 技能加速+80% -- **蓝色**:冰冻+34% + 技能加速+68% -- **绿色**:冰冻+28% + 技能加速+56% - -### 12. 击退控制流 -- **紫色**:击退+40% + 攻击加速+80% -- **蓝色**:击退+34% + 攻击加速+68% -- **绿色**:击退+28% + 攻击加速+56% - -### 13. 击晕控制流 -- **紫色**:击晕+40% + 攻击+100% -- **蓝色**:击晕+34% + 攻击+85% -- **绿色**:击晕+28% + 攻击+70% - -### 14. 全能控制流 -- **紫色**:冰冻+20% + 击退+20% + 击晕+20% -- **蓝色**:冰冻+17% + 击退+17% + 击晕+17% -- **绿色**:冰冻+14% + 击退+14% + 击晕+14% - -## 技能系流派加成总和 - -### 15. 技能流 -- **紫色**:技能加速+160% + 攻击+100% -- **蓝色**:技能加速+136% + 攻击+85% -- **绿色**:技能加速+112% + 攻击+70% - -### 16. 平衡技能流 -- **紫色**:技能加速+160% + 暴击+50% -- **蓝色**:技能加速+136% + 暴击+42.5% -- **绿色**:技能加速+112% + 暴击+35% - -## 混合流派加成总和 - -### 17. 攻防平衡流 -- **紫色**:攻击+100% + HP+200% + 免伤+30% -- **蓝色**:攻击+85% + HP+170% + 免伤+25.5% -- **绿色**:攻击+70% + HP+140% + 免伤+21% - -### 18. 速度流 -- **紫色**:攻击加速+160% + 技能加速+80% -- **蓝色**:攻击加速+136% + 技能加速+68% -- **绿色**:攻击加速+112% + 技能加速+56% - -### 19. 穿透暴击流 -- **紫色**:穿透+2层 + 暴击+50% + 暴击加成+100% -- **蓝色**:穿透+1.7层 + 暴击+42.5% + 暴击加成+85% -- **绿色**:穿透+1.4层 + 暴击+35% + 暴击加成+70% - -### 20. 生存输出流 -- **紫色**:攻击+100% + 吸血+40% + 闪避+30% -- **蓝色**:攻击+85% + 吸血+34% + 闪避+25.5% -- **绿色**:攻击+70% + 吸血+28% + 闪避+21% \ No newline at end of file +### 扩展建议 +1. **天赋升级系统**: 可以添加天赋等级提升机制 +2. **天赋组合效果**: 特定天赋组合可以触发额外效果 +3. **天赋重置**: 允许玩家重新选择天赋 +4. **天赋预览**: 在UI中显示天赋效果预览