FightConComp 的效用已经取消,下一步 进一步 精简,去掉临时 buff debuff 因为本身就是 当局游戏 没必要加零时debuff 直接当局永久debuff
This commit is contained in:
@@ -4,14 +4,12 @@ import { BoxSet, FacSet } from "../common/config/BoxSet";
|
||||
import { SkillSet } from "../common/config/SkillSet";
|
||||
import { smc } from "../common/SingletonModuleComp";
|
||||
import { HeroViewComp } from "../hero/HeroViewComp";
|
||||
import { FightConComp } from "../map/FightConComp";
|
||||
import { SkillCom } from "./SkillCom";
|
||||
import { instantiate, Node, Prefab, Vec3 ,tween, v3,animation,Label,resources,SpriteFrame,Sprite} from "cc";
|
||||
|
||||
/** Skill 模块 */
|
||||
@ecs.register(`Skill`)
|
||||
export class Skill extends ecs.Entity {
|
||||
FIGHTCON:FightConComp=null!
|
||||
SkillView!: SkillCom;
|
||||
/** 实始添加的数据层组件 */
|
||||
protected init() {
|
||||
@@ -33,7 +31,6 @@ export class Skill extends ecs.Entity {
|
||||
dmg:number=0
|
||||
) {
|
||||
|
||||
let FIGHTCON=parent.getComponent(FightConComp);
|
||||
const config = SkillSet[uuid];
|
||||
if (!config) {
|
||||
console.error("[Skill] 技能配置不存在:", uuid);
|
||||
@@ -82,7 +79,7 @@ export class Skill extends ecs.Entity {
|
||||
return;
|
||||
}
|
||||
|
||||
let ap_data = this.get_ap(caster,dmg,uuid,FIGHTCON)
|
||||
let ap_data = this.get_ap(caster,dmg,uuid)
|
||||
SComp.ap = ap_data.ap
|
||||
SComp.caster_crit = ap_data.crit
|
||||
SComp.caster_crit_d = ap_data.crit_d
|
||||
@@ -115,12 +112,11 @@ export class Skill extends ecs.Entity {
|
||||
this.add(SComp);
|
||||
}
|
||||
|
||||
get_ap(view:HeroViewComp,dmg:number=0,uuid:number=0,FIGHTCON:FightConComp=null!){
|
||||
get_ap(view:HeroViewComp,dmg:number=0,uuid:number=0){
|
||||
let ap=0
|
||||
let crit=0
|
||||
let crit_d=0
|
||||
let buffap=1
|
||||
let buff=null
|
||||
let puncture=0
|
||||
let puncture_damage=0
|
||||
let burn_count=0
|
||||
@@ -129,12 +125,6 @@ export class Skill extends ecs.Entity {
|
||||
let stun_ratto=0
|
||||
let frost_time=0
|
||||
let frost_ratto=0
|
||||
if(view.is_master) buff=FIGHTCON.hero_buff
|
||||
if(view.is_boss) buff=FIGHTCON.enemy_buff
|
||||
if(view.is_kalami) buff=FIGHTCON.enemy_buff
|
||||
if(buff!==null) {
|
||||
buffap=(100+buff.ATK)/100 //装备区 总加成
|
||||
}
|
||||
// 汇总DEBUFF_DECD并处理count值
|
||||
let BUFF_ATK = 0
|
||||
let DEBUFF_DEATK = 0
|
||||
@@ -158,17 +148,17 @@ export class Skill extends ecs.Entity {
|
||||
}
|
||||
|
||||
let BUFF_AP=(100-DEBUFF_DEATK+BUFF_ATK+dmg)/100 //buff区 总加成
|
||||
puncture =buff.PUNCTURE+view.puncture
|
||||
puncture_damage=buff.PUNCTURE_DMG+view.puncture_damage
|
||||
puncture =view.puncture
|
||||
puncture_damage=view.puncture_damage
|
||||
ap=view.ap*buffap*BUFF_AP*SkillSet[uuid].ap/100
|
||||
crit=view.crit+buff.CRITICAL
|
||||
crit_d=view.crit_d+buff.CRITICAL_DMG
|
||||
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
|
||||
crit=view.crit
|
||||
crit_d=view.crit_d
|
||||
burn_count=view.burn_count
|
||||
burn_value=view.burn_value
|
||||
stun_time=view.stun_time
|
||||
stun_ratto=view.stun_ratto
|
||||
frost_time=view.frost_time
|
||||
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}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user