去掉smc.heros
This commit is contained in:
@@ -47,11 +47,6 @@ export class Hero extends ecs.Entity {
|
||||
hero_init(uuid:number=1001,node:Node,scale:number=1,box_group=BoxSet.HERO,is_call:boolean=false,lv:number=1){
|
||||
var hv = node.getComponent(HeroViewComp)!;
|
||||
let hero= HeroInfo[uuid] // 共用英雄数据
|
||||
let role =smc.heros[uuid]
|
||||
if(is_call){
|
||||
role={slv:0,lv:lv}
|
||||
}
|
||||
let talents=Talents;
|
||||
hv.scale = scale;
|
||||
hv.fac = 0;
|
||||
hv.type = hero.type;
|
||||
@@ -68,20 +63,14 @@ export class Hero extends ecs.Entity {
|
||||
hv.cpw=hero.cpw;
|
||||
hv.dpw=hero.dpw;
|
||||
hv.dopw=hero.dopw;
|
||||
hv.lv = role.lv;
|
||||
let slv= Math.floor(( hv.lv) / 5);
|
||||
hv.hp= hv.hp_max =(hero.hp+hero.hp_up*hv.lv)*(1+hero.shp_up/100*slv) ;
|
||||
hv.ap = (hero.ap+hero.ap_up*hv.lv) *(1+hero.sap_up/100*slv);
|
||||
hv.def= (hero.def+hero.def_up*hv.lv)*(1+hero.sdef_up/100*slv);
|
||||
hv.hp= hv.hp_max =hero.hp;
|
||||
hv.ap = hero.ap;
|
||||
hv.def= hero.def;
|
||||
hv.cd = hero.a_cd
|
||||
hv.crit = hero.crit; //暴击率
|
||||
hv.crit_add = hero.crit_add;//暴击伤害加成
|
||||
hv.dodge = hero.dodge; //闪避率
|
||||
hv.aexp=hero.aexp;
|
||||
hv.uaexp=hero.uaexp;
|
||||
hv.cexp=hero.cexp
|
||||
hv.doexp=hero.doexp
|
||||
hv.dexp=hero.dexp;
|
||||
this.add(hv);
|
||||
|
||||
// 初始化多个技能组件
|
||||
|
||||
Reference in New Issue
Block a user