武器 击晕 冰冻 易伤 效果添加

This commit is contained in:
2025-07-10 16:35:16 +08:00
parent a75950d3a6
commit e4263b5f47
9 changed files with 373 additions and 204 deletions

View File

@@ -90,6 +90,12 @@ export class Skill extends ecs.Entity {
SComp.puncture_damage = ap_data.puncture_damage
SComp.heal = config.heal
SComp.shield = config.shield
SComp.burn_count = ap_data.burn_count
SComp.burn_value = ap_data.burn_value
SComp.stun_time = ap_data.stun_time
SComp.stun_ratto = ap_data.stun_ratto
SComp.frost_time = ap_data.frost_time
SComp.frost_ratto = ap_data.frost_ratto
// 设置技能组件属性
Object.assign(SComp, {
s_uuid: uuid,
@@ -117,6 +123,12 @@ export class Skill extends ecs.Entity {
let buff=null
let puncture=0
let puncture_damage=0
let burn_count=0
let burn_value=0
let stun_time=0
let stun_ratto=0
let frost_time=0
let frost_ratto=0
if(view.is_master) buff=FIGHTCON.hero_buff
if(view.is_friend) buff=FIGHTCON.friend_buff
if(view.is_boss) buff=FIGHTCON.enemy_buff
@@ -152,6 +164,12 @@ export class Skill extends ecs.Entity {
ap=view.ap*buffap*BUFF_AP*SkillSet[uuid].ap/100
crit=view.crit+buff.CRITICAL
crit_d=view.crit_d+buff.CRITICAL_DMG
return {ap,crit,crit_d,puncture,puncture_damage}
burn_count=buff.BURN_COUNT+view.burn_count
burn_value=buff.BURN_VALUE+view.burn_value
stun_time=buff.STUN_TIME+view.stun_time
stun_ratto=buff.STUN_RATTO+view.stun_ratto
frost_time=buff.FROST_TIME+view.frost_time
frost_ratto=buff.FROST_RATTO+view.frost_ratto
return {ap,crit,crit_d,puncture,puncture_damage,burn_count,burn_value,stun_time,stun_ratto,frost_time,frost_ratto}
}
}

View File

@@ -44,6 +44,12 @@ export class SkillCom extends CCComp {
ap:number=0;
heal:number=0;
shield:number=0;
burn_count:number=0;
burn_value:number=0;
stun_time:number=0;
stun_ratto:number=0;
frost_ratto:number=0;
frost_time:number=0;
FIGHTCON:FightConComp=null;
run_time:number=0;
hited_time:number=0;
@@ -146,7 +152,10 @@ export class SkillCom extends CCComp {
// console.log("[SkillCom]:onBeginContact hit_count:",this.hit_count,SkillSet[this.s_uuid].hit)
// if(this.hit_count > 0&&!is_range) this.ap=this.ap*(50+this.puncture_damage)/100 // 穿刺后 伤害减半,过滤范围伤害
if(target == null) return;
target.do_atked(this.ap,this.caster_crit,this.caster_crit_d) // ap 及暴击 属性已经在skill.ts 处理
target.do_atked(this.ap,this.caster_crit,this.caster_crit_d,
this.burn_count,this.burn_value,
this.stun_time,this.stun_ratto,
this.frost_time,this.frost_ratto) // ap 及暴击 属性已经在skill.ts 处理
console.log("[SkillCom]:single_damage",this.ap,this.caster_crit,this.caster_crit_d,this.hit_count)
if(SkillSet[this.s_uuid].debuff>0){
let deUP =this.get_debuff() // 因为不是每个技能都需要,debuff的增益在这里处理, ap 及暴击 属性已经在skill.ts 处理