升阶后 数字确认

This commit is contained in:
2025-01-02 16:41:17 +08:00
parent f516551508
commit caff3e9a83
5 changed files with 744 additions and 723 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -89,6 +89,7 @@ export class Hero extends ecs.Entity {
hv.dopw=hero.dopw;
hv.lv = role.lv;
hv.slv = role.slv;
hv.type = hero.type;
let slv=0
if (role.slv >= 5) slv=1
@@ -109,9 +110,9 @@ export class Hero extends ecs.Entity {
hv.uar = hero.uar[slv];
hv.crr = hero.crr[slv];
hv.dgr = hero.dgr[slv];
hv.rhp_max=hv.hp= hv.hp_max =hero.hp+hero.hp_up*hv.lv ;
hv.ap = hero.ap+hero.ap_up*hv.lv ;
hv.def= hero.def+hero.def_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) *(1+hero.sap_up/100*(hv.slv-1));
hv.def= (hero.def+hero.def_up*hv.lv)*(1+hero.sdef_up/100*(hv.slv-1));
hv.cd = hero.a_cd
hv.crit = hero.crit; //暴击率
hv.crit_add = hero.crit_add;//暴击伤害加成

View File

@@ -41,6 +41,7 @@ export class HeroViewComp extends CCComp {
hero_uuid:number = 1001;
hero_name : string = "hero";
lv:number =1;
slv:number =1;
scale: number = 1; /** 角色阵营 1hero -1 :mon */
type: number = 0; /**角色类型 0近战 1 远程 2 辅助 */

View File

@@ -154,9 +154,9 @@ export class HeroHomeComp extends CCComp {
}else{
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("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("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("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("speed").getChildByName("val").getComponent(Label).string = this.hero.speed
attr.getChildByName("dis").getChildByName("val").getComponent(Label).string = this.hero.dis

View File

@@ -65,7 +65,7 @@ export class ItemInfoComp extends CCComp {
if(args.type==2){ //英雄碎片
this.node.getChildByName("hero").active = true;
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);
HChip.update_data(args.uuid)
}