crt 改为crit

This commit is contained in:
2025-06-24 21:08:46 +08:00
parent 4ef2855e49
commit 766c1f8176
12 changed files with 11211 additions and 7154 deletions

View File

@@ -50,8 +50,8 @@ export class SkillCom extends CCComp {
anim:Animation=null;
tweenInstance:Tween<any> = null;
t_end_x:number=0;
caster_crt:number=0;
caster_crt_d:number=0;
caster_crit:number=0;
caster_crit_d:number=0;
private moveDirection: Vec3 | null = null; // 添加一个属性来存储移动方向
protected onLoad(): void {
@@ -72,15 +72,15 @@ export class SkillCom extends CCComp {
console.log("[SkillCom]:caster",this.caster)
if(this.caster.fac==FacSet.HERO){
if(this.caster.is_master){
this.caster_crt = this.caster.crt+this.FIGHTCON.hero_buff.CRITICAL+this.FIGHTCON.hero_debuff.CRITICAL
this.caster_crt_d = this.caster.crt_d+this.FIGHTCON.hero_buff.CRITICAL_DMG
this.caster_crit = this.caster.crit+this.FIGHTCON.hero_buff.CRITICAL+this.FIGHTCON.hero_debuff.CRITICAL
this.caster_crit_d = this.caster.crit_d+this.FIGHTCON.hero_buff.CRITICAL_DMG
}else{
this.caster_crt = this.caster.crt+this.FIGHTCON.friend_buff.CRITICAL+this.FIGHTCON.hero_debuff.CRITICAL
this.caster_crt_d = this.caster.crt_d+this.FIGHTCON.friend_buff.CRITICAL_DMG
this.caster_crit = this.caster.crit+this.FIGHTCON.friend_buff.CRITICAL+this.FIGHTCON.hero_debuff.CRITICAL
this.caster_crit_d = this.caster.crit_d+this.FIGHTCON.friend_buff.CRITICAL_DMG
}
}else{
this.caster_crt = this.caster.crt+this.FIGHTCON.enemy_buff.CRITICAL+this.FIGHTCON.enemy_debuff.CRITICAL
this.caster_crt_d = this.caster.crt_d+this.FIGHTCON.enemy_buff.CRITICAL_DMG
this.caster_crit = this.caster.crit+this.FIGHTCON.enemy_buff.CRITICAL+this.FIGHTCON.enemy_debuff.CRITICAL
this.caster_crit_d = this.caster.crit_d+this.FIGHTCON.enemy_buff.CRITICAL_DMG
}
let collider = this.getComponent(Collider2D);
if(collider) {
@@ -149,17 +149,17 @@ export class SkillCom extends CCComp {
if(view){
let dis =Math.abs(this.node.position.x-view.node.position.x)
if(dis > SkillSet[this.s_uuid].with) return
view.do_atked(this.ap,this.caster_crt,this.caster_crt_d)
view.do_atked(this.ap,this.caster_crit,this.caster_crit_d)
}
});
}
//单体伤害
single_damage(target:HeroViewComp,crt:number=0,crt_d:number=0){
single_damage(target:HeroViewComp,crit:number=0,crit_d:number=0){
this.hit_count++
console.log("[SkillCom]:onBeginContact hit_count:",this.hit_count,SkillSet[this.s_uuid].hit)
if(this.hit_count>=SkillSet[this.s_uuid].hit) this.is_destroy=true // 技能命中次数
if(target == null) return;
target.do_atked(this.ap,crt,crt_d)
target.do_atked(this.ap,crit,crit_d)
if(SkillSet[this.s_uuid].debuff>0){
target.add_debuff(SkillSet[this.s_uuid].debuff,SkillSet[this.s_uuid].deV,SkillSet[this.s_uuid].deC)
}
@@ -170,7 +170,7 @@ export class SkillCom extends CCComp {
let target = oCol.getComponent(HeroViewComp)
if(oCol.group!=this.group){
if(target == null) return;
this.single_damage(target,this.caster_crt,this.caster_crt_d)
this.single_damage(target,this.caster_crit,this.caster_crit_d)
// this.ent.destroy()
}
}