dd
This commit is contained in:
@@ -288,7 +288,8 @@ export class HeroViewComp extends CCComp {
|
||||
shoot_enemy(skill_uuid:number,y:number=0,x:number=0){
|
||||
// console.log("mon shoot_enemy");
|
||||
let skill = ecs.getEntity<Skill>(Skill);
|
||||
let atk = smc.skills[skill_uuid].atk+this.atk*smc.vm_data.mission.hero.atk+this.buff_atk;
|
||||
let increase_atk=Math.floor(this.atk*smc.vm_data.mission.hero.atk)
|
||||
let atk = smc.skills[skill_uuid].atk+this.buff_atk+increase_atk;
|
||||
let {pos,t_pos}=this.get_enemy_pos()
|
||||
|
||||
pos.y=pos.y + y
|
||||
@@ -302,13 +303,16 @@ export class HeroViewComp extends CCComp {
|
||||
let {pos,t_pos}=this.get_hero_pos(hero)
|
||||
skill.load(pos,BoxSet.HERO,this.node,this.max_skill_uuid,atk,t_pos);
|
||||
if(smc.skills[s_uuid].hp > 0){ //buff加血
|
||||
hero.HeroView.add_hp(smc.skills[s_uuid].hp*this.atk*this.s_boncus*smc.vm_data.mission.hero.atk)
|
||||
let increase_hp=Math.floor(smc.skills[s_uuid].hp*this.atk*this.s_boncus*smc.vm_data.mission.hero.atk)
|
||||
hero.HeroView.add_hp(increase_hp)
|
||||
}
|
||||
if(smc.skills[s_uuid].atk > 0){ //buff加攻击
|
||||
hero.HeroView.add_atk(smc.skills[s_uuid].atk*this.atk*this.s_boncus*smc.vm_data.mission.hero.atk,smc.skills[s_uuid].bsd*this.st_boncus)
|
||||
let increase_atk=Math.floor(smc.skills[s_uuid].atk*this.atk*this.s_boncus*smc.vm_data.mission.hero.atk)
|
||||
hero.HeroView.add_atk(increase_atk,smc.skills[s_uuid].bsd*this.st_boncus)
|
||||
}
|
||||
if(smc.skills[s_uuid].shield > 0){ //buff护盾
|
||||
hero.HeroView.add_shield(smc.skills[s_uuid].shield*this.atk*this.s_boncus*smc.vm_data.mission.hero.atk,smc.skills[s_uuid].bsd*this.st_boncus)
|
||||
let increase_shield=Math.floor(smc.skills[s_uuid].shield*this.atk*this.s_boncus*smc.vm_data.mission.hero.atk)
|
||||
hero.HeroView.add_shield(increase_shield,smc.skills[s_uuid].bsd*this.st_boncus)
|
||||
}
|
||||
}
|
||||
push_least_buff(skill:number){
|
||||
@@ -419,8 +423,8 @@ export class HeroViewComp extends CCComp {
|
||||
}
|
||||
add_hp_max(hp: number=0){
|
||||
this.hp_max_add()
|
||||
// this.hp = this.hp + hp;
|
||||
// this.hp_max = this.hp_max +hp;
|
||||
this.hp += hp;
|
||||
this.hp_max += hp;
|
||||
console.log("hp_max:"+this.hp_max+":"+hp+":"+this.hp)
|
||||
let hp_progress= this.hp/this.hp_max;
|
||||
this.node.getChildByName("top").getChildByName("hp").getComponent(ProgressBar)!.progress = hp_progress;
|
||||
|
||||
Reference in New Issue
Block a user