天赋完善 继续

This commit is contained in:
panw
2025-07-30 22:25:31 +08:00
parent c3ecc08767
commit 23ef6c3ca0
6 changed files with 170 additions and 43 deletions

View File

@@ -8,6 +8,7 @@ import { HeroViewComp } from "./HeroViewComp";
import { BuffAttr } from "../common/config/SkillSet";
import { EnhancementType } from "../common/config/LevelUp";
import { TalentList } from "../common/config/TalentSet";
import { smc } from "../common/SingletonModuleComp";
const { ccclass, property } = _decorator;
@@ -46,14 +47,13 @@ export class HeroConComp extends CCComp {
this.heroView.add_ap(buff.value,true)
break
case BuffAttr.ATK:
console.log("[HeroConCompComp]:equip_add ,buff.value",buff.value,this.heroView)
this.heroView.add_ap(buff.value,false)
break
case BuffAttr.ATK_CD:
this.heroView.add_speed(buff.value)
break
case BuffAttr.DEF:
this.heroView.add_def(buff.value)
this.heroView.change_def(buff.value)
break
case BuffAttr.HP:
this.heroView.add_hp_max(buff.value,false)
@@ -61,6 +61,12 @@ export class HeroConComp extends CCComp {
case BuffAttr.HP_MAX:
this.heroView.add_hp_max(buff.value,true)
break
case BuffAttr.CRITICAL:
this.heroView.change_crit(buff.value)
break
case BuffAttr.CRITICAL_DMG:
this.heroView.change_crit_d(buff.value)
break
}
}
}
@@ -88,7 +94,7 @@ export class HeroConComp extends CCComp {
this.heroView.add_hp_max(data.value,true)
break
case EnhancementType.DEF:
this.heroView.add_def(data.value)
this.heroView.change_def(data.value)
break
}
}
@@ -105,20 +111,96 @@ export class HeroConComp extends CCComp {
this.heroView.TALENT[BuffAttr.ATK_CD]+=tal.value
this.heroView.count_atrr(BuffAttr.ATK_CD)
break
case BuffAttr.SKILL_CD:
smc.vmdata.hero.skill_cd_buff+=tal.value //直接加到vmdata中
break
case BuffAttr.HP:
this.heroView.TALENT[BuffAttr.HP]+=tal.value
this.heroView.count_atrr(BuffAttr.HP)
break
case BuffAttr.DEF:
this.heroView.change_def(tal.value)
break
case BuffAttr.CRITICAL:
this.heroView.TALENT[BuffAttr.CRITICAL]+=tal.value
this.heroView.change_crit(tal.value)
break
case BuffAttr.CRITICAL_DMG:
this.heroView.TALENT[BuffAttr.CRITICAL_DMG]+=tal.value
this.heroView.change_crit_d(tal.value)
break
case BuffAttr.DODGE:
this.heroView.TALENT[BuffAttr.DODGE]+=tal.value
this.heroView.change_dodge(tal.value)
break
case BuffAttr.DEBUFF_COUNT:
this.heroView.TALENT[BuffAttr.DEBUFF_COUNT]+=tal.value
case BuffAttr.PUNCTURE:
this.heroView.change_puncture(tal.value)
break
case BuffAttr.PUNCTURE_DMG:
this.heroView.change_puncture_damage(tal.value)
break
case BuffAttr.FROST_RATIO:
this.heroView.change_frost_ratto(tal.value)
break
case BuffAttr.KNOCKBACK:
this.heroView.change_knockback(tal.value)
break
case BuffAttr.STUN_RATTO:
this.heroView.change_stun_ratto(tal.value)
break
case BuffAttr.REFLECT:
this.heroView.change_reflect(tal.value)
break
case BuffAttr.LIFESTEAL:
this.heroView.change_lifesteal(tal.value)
break
}
}
remove_talent_card(e:GameEvent,data:any){
console.log("[HeroConCompComp]:remove_talent_card",data)
let tal=TalentList[data.uuid]
switch(tal.buffType){
case BuffAttr.ATK:
this.heroView.TALENT[BuffAttr.ATK]-=tal.value
this.heroView.count_atrr(BuffAttr.ATK)
break
case BuffAttr.ATK_CD:
this.heroView.TALENT[BuffAttr.ATK_CD]-=tal.value
this.heroView.count_atrr(BuffAttr.ATK_CD)
break
case BuffAttr.HP:
this.heroView.TALENT[BuffAttr.HP]-=tal.value
break
case BuffAttr.DEF:
this.heroView.change_def(-tal.value)
break
case BuffAttr.CRITICAL:
this.heroView.change_crit(-tal.value)
break
case BuffAttr.CRITICAL_DMG:
this.heroView.change_crit_d(-tal.value)
break
case BuffAttr.DODGE:
this.heroView.change_dodge(-tal.value)
break
case BuffAttr.PUNCTURE:
this.heroView.change_puncture(-tal.value)
break
case BuffAttr.PUNCTURE_DMG:
this.heroView.change_puncture_damage(-tal.value)
break
case BuffAttr.FROST_RATIO:
this.heroView.change_frost_ratto(-tal.value)
break
case BuffAttr.KNOCKBACK:
this.heroView.change_knockback(-tal.value)
break
case BuffAttr.STUN_RATTO:
this.heroView.change_stun_ratto(-tal.value)
break
case BuffAttr.REFLECT:
this.heroView.change_reflect(-tal.value)
break
case BuffAttr.LIFESTEAL:
this.heroView.change_lifesteal(-tal.value)
break
}
}