dd
This commit is contained in:
@@ -8,7 +8,7 @@ import { BoxSet, FacSet } from "../common/config/BoxSet";
|
||||
import { getHeroStatsByLevel, HeroInfo, HeroPos, HType } from "../common/config/heroSet";
|
||||
import { BattleMoveComp } from "../common/ecs/position/BattleMoveComp";
|
||||
import { GameEvent } from "../common/config/GameEvent";
|
||||
import { BuffAttr, getBuffNum, SkillSet } from "../common/config/SkillSet";
|
||||
import { BuffAttr, getBuffNum, SkillSet, SType } from "../common/config/SkillSet";
|
||||
import { FightSet } from "../common/config/Mission";
|
||||
import { Skill } from "../skills/Skill";
|
||||
/** 角色实体 */
|
||||
@@ -87,11 +87,19 @@ export class Hero extends ecs.Entity {
|
||||
hv.apply_buff(buff.type,buff.value)
|
||||
})
|
||||
for(let i=0;i<hero.skills.length;i++){
|
||||
hv.skills.push({
|
||||
cd:0,
|
||||
uuid:hero.skills[i],
|
||||
cd_max:i==0?hero.cd:SkillSet[hero.skills[i]].cd
|
||||
})
|
||||
if(SkillSet[hero.skills[i]].SType==SType.buff){
|
||||
let buffs=SkillSet[hero.skills[i]].buffs
|
||||
buffs.forEach((buff:any)=>{
|
||||
hv.apply_buff(buff.buff, buff.buV)
|
||||
})
|
||||
continue
|
||||
}else{
|
||||
hv.skills.push({
|
||||
cd:0,
|
||||
uuid:hero.skills[i],
|
||||
cd_max:i==0?hero.cd:SkillSet[hero.skills[i]].cd
|
||||
})
|
||||
}
|
||||
}
|
||||
return hv
|
||||
}
|
||||
|
||||
@@ -404,6 +404,7 @@ export class HeroViewComp extends CCComp {
|
||||
}
|
||||
// 应用buff,有基础值的需要特殊处理,其他的直接加减
|
||||
apply_buff(buff_type:number,buff_value:number){
|
||||
console.log("[HeroViewComp]:apply_buff",buff_type,buff_value)
|
||||
switch(buff_type){
|
||||
case BuffAttr.ATK: //攻击百分比
|
||||
this.Attrs[BuffAttr.AP]+=Math.floor(buff_value/100*this.ap)
|
||||
|
||||
Reference in New Issue
Block a user