英雄成长完成99.99%

This commit is contained in:
2024-12-08 10:55:35 +08:00
parent 02f1c99d7c
commit aebe98577c
4 changed files with 5593 additions and 4999 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -46,9 +46,9 @@ export class SingletonModuleComp extends ecs.Comp {
monster_buffs: any = []; monster_buffs: any = [];
/** 游戏主角 */ /** 游戏主角 */
heros:any={ heros:any={
9001:{uuid:9001,lv:1,exp:0,slv:1,stone:0}, 9001:{uuid:9001,lv:1,exp:0,slv:0,stone:0},
9002:{uuid:9002,lv:2,exp:0,slv:2,stone:0}, 9002:{uuid:9002,lv:2,exp:0,slv:1,stone:0},
9003:{uuid:9003,lv:3,exp:0,slv:3,stone:0}, 9003:{uuid:9003,lv:3,exp:0,slv:2,stone:0},
}; };
mheros:any = []; mheros:any = [];
monsters:any = []; monsters:any = [];

View File

@@ -40,22 +40,22 @@ import { Talents } from "./TalentSet"
**/ **/
export const HeroInfo = { export const HeroInfo = {
9001: { 9001: {
uuid:9001,name: "圣盾骑士",path:"k1",type:1,hp: 10, hp_up:10,def:10,def_up:1,ap:20,ap_up:2,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:100,a_cd:1.5, uuid:9001,name: "圣盾骑士",path:"k1",type:1,hp: 10, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:100,a_cd:1.5,
lvexp:0,slvexp:0, speed: 100,aep:1,uaep:1,dep:10,sk1:[9001,9001,9001,9001,9001],sk2:[2002,2002,2002,2002,2002],sk3:[2002,2002,2002,2002,2002],pw:0,pwm:150,pws:10,apw:0,uapw:0,cpw:0,dpw:0, lvexp:0,slvexp:0, speed: 100,aep:5,uaep:1,cep:10,doep:10,dep:20,sk1:[9001,9001,9001,9001,9001],sk2:[2002,2002,2002,2002,2002],sk3:[2002,2002,2002,2002,2002],pw:0,pwm:150,pws:10,apw:0,uapw:0,cpw:0,dpw:0,
akr:[10,20,30,40,50],akc:[1,1,1,1,1],uar:[10,20,30,40,50],uac:[1,1,1,1,1],dgr:[10,20,30,40,50],dgc:[1,1,1,1,1],crr:[10,20,30,40,50],crc:[1,1,1,1,1], akr:[10,20,30,40,50],akc:[1,1,1,1,1],uar:[10,20,30,40,50],uac:[1,1,1,1,1],dgr:[10,20,30,40,50],dgc:[1,1,1,1,1],crr:[10,20,30,40,50],crc:[1,1,1,1,1],
abh:0,abc:0,uabh:0,uabc:0,cbh:0,cbc:0,aua:0,auc:0,uaua:0,uauc:0,cua:0,cuc:0,wp:1001,arm:2001,ring:3001,shoes:4001, abh:0,abc:0,uabh:0,uabc:0,cbh:0,cbc:0,aua:0,auc:0,uaua:0,uauc:0,cua:0,cuc:0,wp:1001,arm:2001,ring:3001,shoes:4001,
tals:["这是一级说明","这是二级说明","这是三级说明","这是四级说明","这是五级说明"] tals:["这是一级说明","这是二级说明","这是三级说明","这是四级说明","这是五级说明"]
}, },
9002: { 9002: {
uuid:9001,name: "狂暴骑士",path:"k2",type:1,hp: 10, hp_up:10,def:10,def_up:1,ap:20,ap_up:2,atp:1,vun:0,crit:20,crit_add:0,dodge:0,dis:100,a_cd:1.5, uuid:9001,name: "狂暴骑士",path:"k2",type:1,hp: 10, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:100,a_cd:1.5,
lvexp:2,slvexp:2, speed: 100,aep:1,uaep:1,dep:10,sk1:[9001,9001,9001,9001,9001],sk2: [2002,2002,2002,2002,2002],pw:0,pwm:15,pws:1, lvexp:0,slvexp:0, speed: 100,aep:5,uaep:1,cep:10,doep:10,dep:20,sk1:[9001,9001,9001,9001,9001],sk2:[2002,2002,2002,2002,2002],sk3:[2002,2002,2002,2002,2002],pw:0,pwm:150,pws:10,apw:0,uapw:0,cpw:0,dpw:0,
akr:[10,20,30,40,50],akc:[1,1,1,1,1],uar:[10,20,30,40,50],uac:[1,1,1,1,1],dgr:[10,20,30,40,50],dgc:[1,1,1,1,1],crr:[10,20,30,40,50],crc:[1,1,1,1,1], akr:[10,20,30,40,50],akc:[1,1,1,1,1],uar:[10,20,30,40,50],uac:[1,1,1,1,1],dgr:[10,20,30,40,50],dgc:[1,1,1,1,1],crr:[10,20,30,40,50],crc:[1,1,1,1,1],
abh:0,abc:0,uabh:0,uabc:0,cbh:0,cbc:0,aua:0,auc:0,uaua:0,uauc:0,cua:0,cuc:0,wp:1001,arm:2001,ring:3001,shoes:4001, abh:0,abc:0,uabh:0,uabc:0,cbh:0,cbc:0,aua:0,auc:0,uaua:0,uauc:0,cua:0,cuc:0,wp:1001,arm:2001,ring:3001,shoes:4001,
tals:["这是一级说明","这是二级说明","这是三级说明","这是四级说明","这是五级说明"] tals:["这是一级说明","这是二级说明","这是三级说明","这是四级说明","这是五级说明"]
}, },
9003: { 9003: {
uuid:9001,name: "防御骑士",path:"k3",type:1,hp: 10, hp_up:10,def:10,def_up:1,ap:20,ap_up:2,atp:1,vun:0,crit:20,crit_add:0,dodge:0,dis:100,a_cd:1.5, uuid:9001,name: "防御骑士",path:"k3",type:1,hp: 10, hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:100,a_cd:1.5,
lvexp:2,slvexp:2, speed: 100,aep:1,uaep:1,dep:10,sk1:[9001,9001,9001,9001,9001],sk2: [2002,2002,2002,2002,2002],pw:0,pwm:15,pws:1, lvexp:0,slvexp:0, speed: 100,aep:5,uaep:1,cep:10,doep:10,dep:20,sk1:[9001,9001,9001,9001,9001],sk2:[2002,2002,2002,2002,2002],sk3:[2002,2002,2002,2002,2002],pw:0,pwm:150,pws:10,apw:0,uapw:0,cpw:0,dpw:0,
akr:[10,20,30,40,50],akc:[1,1,1,1,1],uar:[10,20,30,40,50],uac:[1,1,1,1,1],dgr:[10,20,30,40,50],dgc:[1,1,1,1,1],crr:[10,20,30,40,50],crc:[1,1,1,1,1], akr:[10,20,30,40,50],akc:[1,1,1,1,1],uar:[10,20,30,40,50],uac:[1,1,1,1,1],dgr:[10,20,30,40,50],dgc:[1,1,1,1,1],crr:[10,20,30,40,50],crc:[1,1,1,1,1],
abh:0,abc:0,uabh:0,uabc:0,cbh:0,cbc:0,aua:0,auc:0,uaua:0,uauc:0,cua:0,cuc:0,wp:1001,arm:2001,ring:3001,shoes:4001, abh:0,abc:0,uabh:0,uabc:0,cbh:0,cbc:0,aua:0,auc:0,uaua:0,uauc:0,cua:0,cuc:0,wp:1001,arm:2001,ring:3001,shoes:4001,
tals:["这是一级说明","这是二级说明","这是三级说明","这是四级说明","这是五级说明"] tals:["这是一级说明","这是二级说明","这是三级说明","这是四级说明","这是五级说明"]

View File

@@ -72,23 +72,45 @@ export class HeroHomeComp extends CCComp {
} }
update_data(){ update_data(){
let slv_node=this.node.getChildByName("name").getChildByName("slv"); let slv_node=this.node.getChildByName("name").getChildByName("slv");
let lvup=this.node.getChildByName("lvup");
let slvup=this.node.getChildByName("slvup");
let attr = this.node.getChildByName("attr");
let attr2 = this.node.getChildByName("attr2").getChildByName("other");
this.node.getChildByName("name").getChildByName("lv").getComponent(Label).string = this.role.lv.toString()+"级"; this.node.getChildByName("name").getChildByName("lv").getComponent(Label).string = this.role.lv.toString()+"级";
this.node.getChildByName("lvup").getChildByName("gold").getChildByName("need").getComponent(Label).string = (UpGold.LvUp*this.role.lv).toString() lvup.getChildByName("gold").getChildByName("need").getComponent(Label).string = (UpGold.LvUp*this.role.lv).toString()
this.node.getChildByName("lvup").getChildByName("item").getChildByName("need").getComponent(Label).string = ((LvUp[0]+this.hero.lvexp)*this.role.lv).toString() lvup.getChildByName("item").getChildByName("need").getComponent(Label).string = ((LvUp[0]+this.hero.lvexp)*this.role.lv).toString()
this.node.getChildByName("slvup").getChildByName("gold").getChildByName("need").getComponent(Label).string = (UpGold.SlvUp*this.role.slv).toString() lvup.getChildByName("info").getChildByName("ap").getComponent(Label).string = "+"+this.hero.ap_up
this.node.getChildByName("slvup").getChildByName("item").getChildByName("need").getComponent(Label).string = ((SlvUp[this.role.slv]+this.hero.slvexp)*this.role.slv).toString() lvup.getChildByName("info").getChildByName("def").getComponent(Label).string = "+"+this.hero.def_up
lvup.getChildByName("info").getChildByName("hp").getComponent(Label).string = "+"+this.hero.hp_up
slvup.getChildByName("gold").getChildByName("need").getComponent(Label).string = (UpGold.SlvUp*this.role.slv).toString()
slvup.getChildByName("item").getChildByName("need").getComponent(Label).string = ((SlvUp[this.role.slv]+this.hero.slvexp)*this.role.slv).toString()
slvup.getChildByName("info").getChildByName("ap").getComponent(Label).string = "+"+this.hero.sap_up+"%"
slvup.getChildByName("info").getChildByName("def").getComponent(Label).string = "+"+this.hero.sdef_up+"%"
slvup.getChildByName("info").getChildByName("hp").getComponent(Label).string = "+"+this.hero.shp_up+"%"
if( this.role.slv>=1) {slv_node.getChildByName("s1").active=true}else{slv_node.getChildByName("s1").active=false}; if( this.role.slv>=1) {slv_node.getChildByName("s1").active=true}else{slv_node.getChildByName("s1").active=false};
if( this.role.slv>=2) {slv_node.getChildByName("s2").active=true}else{slv_node.getChildByName("s2").active=false}; if( this.role.slv>=2) {slv_node.getChildByName("s2").active=true}else{slv_node.getChildByName("s2").active=false};
if( this.role.slv>=3) {slv_node.getChildByName("s3").active=true}else{slv_node.getChildByName("s3").active=false}; if( this.role.slv>=3) {slv_node.getChildByName("s3").active=true}else{slv_node.getChildByName("s3").active=false};
if( this.role.slv>=4) {slv_node.getChildByName("s4").active=true}else{slv_node.getChildByName("s4").active=false}; if( this.role.slv>=4) {slv_node.getChildByName("s4").active=true}else{slv_node.getChildByName("s4").active=false};
if( this.role.slv>=5) {slv_node.getChildByName("s5").active=true}else{slv_node.getChildByName("s5").active=false}; if( this.role.slv>=5) {slv_node.getChildByName("s5").active=true}else{slv_node.getChildByName("s5").active=false};
this.node.getChildByName("attr").getChildByName("ap").getChildByName("val").getComponent(Label).string = this.hero.ap+this.hero.ap_up* this.role.lv
this.node.getChildByName("attr").getChildByName("hp").getChildByName("val").getComponent(Label).string = this.hero.hp+this.hero.hp_up* this.role.lv 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()
this.node.getChildByName("attr").getChildByName("def").getChildByName("val").getComponent(Label).string = this.hero.ap+this.hero.ap_up* this.role.lv 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("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
this.node.getChildByName("attr").getChildByName("acd").getChildByName("val").getComponent(Label).string = this.hero.a_cd attr2.getChildByName("crit").getChildByName("val").getComponent(Label).string = this.hero.crit+"%"
this.node.getChildByName("attr").getChildByName("speed").getChildByName("val").getComponent(Label).string = this.hero.speed attr2.getChildByName("ca").getChildByName("val").getComponent(Label).string = (150+this.hero.crit_add).toString()+"%"
this.node.getChildByName("attr").getChildByName("dis").getChildByName("val").getComponent(Label).string = this.hero.dis attr2.getChildByName("ucr").getChildByName("val").getComponent(Label).string = this.hero.ucr+"%"
attr2.getChildByName("dod").getChildByName("val").getComponent(Label).string = this.hero.dodge+"%"
attr2.getChildByName("aep").getChildByName("val").getComponent(Label).string = this.hero.aep
attr2.getChildByName("uaep").getChildByName("val").getComponent(Label).string = this.hero.uaep
attr2.getChildByName("cep").getChildByName("val").getComponent(Label).string = this.hero.cep
attr2.getChildByName("doep").getChildByName("val").getComponent(Label).string = this.hero.doep
attr2.getChildByName("dep").getChildByName("val").getComponent(Label).string = this.hero.dep
} }
lv_selcet(e:any,val:any){ lv_selcet(e:any,val:any){
let active = this.node.getChildByName("menu").getChildByName("active") let active = this.node.getChildByName("menu").getChildByName("active")