todo 技能存在时间准确性问题
This commit is contained in:
@@ -21,6 +21,10 @@ export class SkillCom extends CCComp {
|
||||
speed:number = 200;
|
||||
scale:number = 1;
|
||||
ap:number = 10;
|
||||
apup:number = 0;//
|
||||
mhp:number = 0;
|
||||
hp:number = 0; //治疗总量
|
||||
shield:number = 0;//护甲总量
|
||||
cd:number = 1;
|
||||
debuff:number = 0;
|
||||
debtime:number = 0;
|
||||
@@ -72,20 +76,23 @@ export class SkillCom extends CCComp {
|
||||
do_buff(hero:any){
|
||||
this.to_console(" do_buff hero: ",hero)
|
||||
if(SkillSet[this.s_uuid].hp > 0){ //buff加血
|
||||
let increase_hp=Math.floor(SkillSet[this.s_uuid].hp*this.ap/(this.in_time/this.cd))
|
||||
let increase_hp=Math.floor(this.hp/(this.in_time/this.cd))
|
||||
hero.add_hp(increase_hp)
|
||||
}
|
||||
|
||||
if(SkillSet[this.s_uuid].apup > 0){ //buff加攻击
|
||||
let increase_atk=Math.floor(SkillSet[this.s_uuid].apup*this.ap/(this.in_time/this.cd))
|
||||
let increase_atk=Math.floor(this.apup/(this.in_time/this.cd))
|
||||
hero.add_ap(increase_atk)
|
||||
}
|
||||
|
||||
if(SkillSet[this.s_uuid].shield > 0){ //buff护盾
|
||||
console.log("do_buff shield: ",SkillSet[this.s_uuid].shield*this.ap/(this.in_time/this.cd))
|
||||
hero.add_shield(SkillSet[this.s_uuid].shield*this.ap/(this.in_time/this.cd))
|
||||
console.log("do_buff shield: ",this.shield)
|
||||
hero.add_shield(this.shield)
|
||||
}
|
||||
if(SkillSet[this.s_uuid].mhp > 0){ //hp最大值
|
||||
console.log("do_buff mhp: ",this.mhp/(this.in_time/this.cd))
|
||||
hero.add_hp_max(this.mhp/(this.in_time/this.cd))
|
||||
}
|
||||
|
||||
}
|
||||
update(deltaTime: number) {
|
||||
if(smc.mission.pause) return
|
||||
|
||||
Reference in New Issue
Block a user