升阶后 数字确认
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -89,6 +89,7 @@ export class Hero extends ecs.Entity {
|
|||||||
hv.dopw=hero.dopw;
|
hv.dopw=hero.dopw;
|
||||||
|
|
||||||
hv.lv = role.lv;
|
hv.lv = role.lv;
|
||||||
|
hv.slv = role.slv;
|
||||||
hv.type = hero.type;
|
hv.type = hero.type;
|
||||||
let slv=0
|
let slv=0
|
||||||
if (role.slv >= 5) slv=1
|
if (role.slv >= 5) slv=1
|
||||||
@@ -109,9 +110,9 @@ export class Hero extends ecs.Entity {
|
|||||||
hv.uar = hero.uar[slv];
|
hv.uar = hero.uar[slv];
|
||||||
hv.crr = hero.crr[slv];
|
hv.crr = hero.crr[slv];
|
||||||
hv.dgr = hero.dgr[slv];
|
hv.dgr = hero.dgr[slv];
|
||||||
hv.rhp_max=hv.hp= hv.hp_max =hero.hp+hero.hp_up*hv.lv ;
|
hv.rhp_max=hv.hp= hv.hp_max =(hero.hp+hero.hp_up*hv.lv)*(1+hero.shp_up/100*(hv.slv-1)) ;
|
||||||
hv.ap = hero.ap+hero.ap_up*hv.lv ;
|
hv.ap = (hero.ap+hero.ap_up*hv.lv) *(1+hero.sap_up/100*(hv.slv-1));
|
||||||
hv.def= hero.def+hero.def_up*hv.lv;
|
hv.def= (hero.def+hero.def_up*hv.lv)*(1+hero.sdef_up/100*(hv.slv-1));
|
||||||
hv.cd = hero.a_cd
|
hv.cd = hero.a_cd
|
||||||
hv.crit = hero.crit; //暴击率
|
hv.crit = hero.crit; //暴击率
|
||||||
hv.crit_add = hero.crit_add;//暴击伤害加成
|
hv.crit_add = hero.crit_add;//暴击伤害加成
|
||||||
|
|||||||
@@ -41,6 +41,7 @@ export class HeroViewComp extends CCComp {
|
|||||||
hero_uuid:number = 1001;
|
hero_uuid:number = 1001;
|
||||||
hero_name : string = "hero";
|
hero_name : string = "hero";
|
||||||
lv:number =1;
|
lv:number =1;
|
||||||
|
slv:number =1;
|
||||||
scale: number = 1; /** 角色阵营 1:hero -1 :mon */
|
scale: number = 1; /** 角色阵营 1:hero -1 :mon */
|
||||||
type: number = 0; /**角色类型 0近战 1 远程 2 辅助 */
|
type: number = 0; /**角色类型 0近战 1 远程 2 辅助 */
|
||||||
|
|
||||||
|
|||||||
@@ -154,9 +154,9 @@ export class HeroHomeComp extends CCComp {
|
|||||||
}else{
|
}else{
|
||||||
this.node.getChildByName("show").getChildByName("call").active=false
|
this.node.getChildByName("show").getChildByName("call").active=false
|
||||||
};
|
};
|
||||||
attr.getChildByName("ap").getChildByName("val").getComponent(Label).string = ((this.hero.ap+this.hero.ap_up* this.role.lv)*(1+this.hero.sap_up/100*this.role.slv)).toFixed(0).toString()
|
attr.getChildByName("ap").getChildByName("val").getComponent(Label).string = ((this.hero.ap+this.hero.ap_up* this.role.lv)*(1+this.hero.sap_up/100*(this.role.slv-1))).toFixed(0).toString()
|
||||||
attr.getChildByName("hp").getChildByName("val").getComponent(Label).string = ((this.hero.hp+this.hero.hp_up* this.role.lv)*(1+this.hero.shp_up/100*this.role.slv)).toFixed(0).toString()
|
attr.getChildByName("hp").getChildByName("val").getComponent(Label).string = ((this.hero.hp+this.hero.hp_up* this.role.lv)*(1+this.hero.shp_up/100*(this.role.slv))).toFixed(0).toString()
|
||||||
attr.getChildByName("def").getChildByName("val").getComponent(Label).string = ((this.hero.ap+this.hero.ap_up* this.role.lv)*(1+this.hero.sdef_up/100*this.role.slv)).toFixed(0).toString()
|
attr.getChildByName("def").getChildByName("val").getComponent(Label).string = ((this.hero.ap+this.hero.ap_up* this.role.lv)*(1+this.hero.sdef_up/100*(this.role.slv-1))).toFixed(0).toString()
|
||||||
attr.getChildByName("acd").getChildByName("val").getComponent(Label).string = this.hero.a_cd
|
attr.getChildByName("acd").getChildByName("val").getComponent(Label).string = this.hero.a_cd
|
||||||
attr.getChildByName("speed").getChildByName("val").getComponent(Label).string = this.hero.speed
|
attr.getChildByName("speed").getChildByName("val").getComponent(Label).string = this.hero.speed
|
||||||
attr.getChildByName("dis").getChildByName("val").getComponent(Label).string = this.hero.dis
|
attr.getChildByName("dis").getChildByName("val").getComponent(Label).string = this.hero.dis
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ export class ItemInfoComp extends CCComp {
|
|||||||
if(args.type==2){ //英雄碎片
|
if(args.type==2){ //英雄碎片
|
||||||
this.node.getChildByName("hero").active = true;
|
this.node.getChildByName("hero").active = true;
|
||||||
this.node.getChildByName("name").getComponent(Label).string=HeroInfo[args.uuid].name+" 碎片"
|
this.node.getChildByName("name").getComponent(Label).string=HeroInfo[args.uuid].name+" 碎片"
|
||||||
this.node.getChildByName("info").getComponent(Label).string="「"+HeroInfo[args.uuid].name+"」碎片,用于英雄升阶"
|
this.node.getChildByName("info").getComponent(Label).string="「"+HeroInfo[args.uuid].name+"」碎片,用于英雄升阶,开宝箱获得"
|
||||||
let HChip=this.node.getChildByName("hero").getComponent(HChipComp);
|
let HChip=this.node.getChildByName("hero").getComponent(HChipComp);
|
||||||
HChip.update_data(args.uuid)
|
HChip.update_data(args.uuid)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user