dd
This commit is contained in:
@@ -62,14 +62,14 @@ export class Hero extends ecs.Entity {
|
||||
hv.speed =hv.ospeed = hero_set.speed;
|
||||
hv.hero_uuid= uuid;
|
||||
hv.hero_name= hero_set.name;
|
||||
hv.hp= hv.hp_max = hero_set.hp*(1+smc.vm_data.talent[11].bonus*smc.vm_data.talent[11].lv)*smc.vm_data.mission.hero.hp;
|
||||
hv.level = hero_set.level;
|
||||
hv.atk = hero_set.atk*(1+smc.vm_data.talent[12].bonus*smc.vm_data.talent[12].lv);
|
||||
hv.hp= hv.hp_max =Math.floor(hero_set.hp*(1+smc.vm_data.talent[11].bonus*smc.vm_data.talent[11].lv)*smc.vm_data.mission.hero.hp);
|
||||
hv.atk = Math.floor(hero_set.atk*(1+smc.vm_data.talent[12].bonus*smc.vm_data.talent[12].lv))
|
||||
hv.atk_cd = hero_set.atk_cd*(1-smc.vm_data.talent[13].bonus*smc.vm_data.talent[13].lv);
|
||||
hv.st_boncus=1+smc.vm_data.talent[15].bonus*smc.vm_data.talent[15].lv;
|
||||
hv.s_boncus=1+smc.vm_data.talent[16].bonus*smc.vm_data.talent[16].lv;
|
||||
hv.atk_dis = hero_set.atk_dis;
|
||||
hv.power = hero_set.power;
|
||||
hv.level = hero_set.level;
|
||||
hv.power_max= hero_set.power_max*(1-smc.vm_data.talent[14].bonus*smc.vm_data.talent[14].lv);;
|
||||
hv.type = hero_set.type;
|
||||
hv.skill_uuid = hero_set.skill_uuid;
|
||||
|
||||
@@ -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