升星 所需材料逐级改变
This commit is contained in:
@@ -118,9 +118,10 @@ export class SingletonModuleComp extends ecs.Comp {
|
||||
1002:0,
|
||||
1003:0,
|
||||
1004:1000,
|
||||
1005:0,
|
||||
1006:0,
|
||||
1007:0,
|
||||
1005:100,
|
||||
1006:200,
|
||||
1007:333,
|
||||
1008:1000,
|
||||
1021:0,
|
||||
1022:0,
|
||||
1023:0,
|
||||
|
||||
@@ -9,9 +9,11 @@ export const Items={
|
||||
1001:{uuid: 1001,path: "3011",type:1,lv:1,r_num:10,name: "经验卷轴",info:"提升英雄等级", },
|
||||
1002:{uuid: 1002,path: "3012",type:1,lv:1,r_num:10,name: "远程卷轴",info:"提升远程英雄等级", },
|
||||
1003:{uuid: 1003,path: "3013",type:1,lv:1,r_num:10,name: "辅助卷轴",info:"提升辅助英雄等级", },
|
||||
1004:{uuid: 1004,path: "2011",type:1,lv:2,r_num:10,name: "英雄凭证",info:"提升英雄星级", },
|
||||
1005:{uuid: 1005,path: "2012",type:1,lv:2,r_num:10,name: "远程凭证",info:"提升远程英雄星级", },
|
||||
1006:{uuid: 1006,path: "2013",type:1,lv:2,r_num:10,name: "辅助凭证",info:"提升辅助英雄星级", },
|
||||
1004:{uuid: 1004,path: "2011",type:1,lv:2,r_num:10,name: "一星凭证",info:"英雄升级一星需要的凭证", },
|
||||
1005:{uuid: 1005,path: "2012",type:1,lv:2,r_num:10,name: "二星凭证",info:"英雄升级二星需要的凭证", },
|
||||
1006:{uuid: 1006,path: "2012",type:1,lv:2,r_num:10,name: "三星凭证",info:"英雄升级三星需要的凭证", },
|
||||
1007:{uuid: 1007,path: "2013",type:1,lv:2,r_num:10,name: "四星凭证",info:"英雄升级四星需要的凭证", },
|
||||
1008:{uuid: 1008,path: "2013",type:1,lv:2,r_num:10,name: "五星凭证",info:"英雄升级五星需要的凭证", },
|
||||
1021:{uuid: 1021,path: "1001",type:1,lv:1,r_num:1,name: "普通攻击石",info:"增加装备攻击力10,成功几率20%", },
|
||||
1022:{uuid: 1022,path: "1004",type:1,lv:2,r_num:1,name: "高级攻击石",info:"增加装备攻击力10,成功几率30%", },
|
||||
1023:{uuid: 1023,path: "1007",type:1,lv:3,r_num:1,name: "稀有攻击石",info:"增加装备攻击力10,成功几率40%", },
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export const SlvUp =[10,20,40,80,160,320]
|
||||
export const SlvUp =[10,20,40,80,160,320,99999]
|
||||
export const LvUp =[100]
|
||||
export enum UpGold {
|
||||
LvUp=100,
|
||||
|
||||
@@ -46,22 +46,22 @@ import { Talents } from "./TalentSet"
|
||||
export const HeroInfo = {
|
||||
9001: {
|
||||
uuid:9001,name: "圣盾骑士",path:"k1",type:1,hp: 100, 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,aexp:5,uaexp:1,cexp:10,doexp:10,dexp: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:10,uapw:10,cpw:10,dpw:10,dopw:10,
|
||||
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],
|
||||
lvexp:0,slvexp:0, speed: 100,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[9001,9001,9001,9001,9001,9001],sk2:[2002,2002,2002,2002,2002,2002],sk3:[2002,2002,2002,2002,2002,2002],pw:0,pwm:150,pws:10,apw:10,uapw:10,cpw:10,dpw:10,dopw:10,
|
||||
akr:[10,20,30,40,50,60],akc:[1,1,1,1,1,1],uar:[10,20,30,40,50,60],uac:[1,1,1,1,1,1],dgr:[10,20,30,40,50,60],dgc:[1,1,1,1,1,1],crr:[10,20,30,40,50,60],crc:[1,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,
|
||||
tals:["这是一级说明","这是二级说明","这是三级说明","这是四级说明","这是五级说明"]
|
||||
},
|
||||
9002: {
|
||||
uuid:9002,name: "狂暴骑士",path:"k2",type:1,hp: 100, 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,aexp:5,uaexp:1,cexp:10,doexp:10,dexp: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,dopw: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],
|
||||
lvexp:0,slvexp:0, speed: 100,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[9001,9001,9001,9001,9001,9001],sk2:[2002,2002,2002,2002,2002,2002],sk3:[2002,2002,2002,2002,2002,2002],pw:0,pwm:150,pws:10,apw:0,uapw:0,cpw:0,dpw:0,dopw:0,
|
||||
akr:[10,20,30,40,50,60],akc:[1,1,1,1,1,1],uar:[10,20,30,40,50,60],uac:[1,1,1,1,1,1],dgr:[10,20,30,40,50,60],dgc:[1,1,1,1,1,1],crr:[10,20,30,40,50,60],crc:[1,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,
|
||||
tals:["这是一级说明","这是二级说明","这是三级说明","这是四级说明","这是五级说明"]
|
||||
},
|
||||
9003: {
|
||||
uuid:9003,name: "防御骑士",path:"k3",type:1,hp: 100, 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,aexp:5,uaexp:1,cexp:10,doexp:10,dexp: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,dopw: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],
|
||||
lvexp:0,slvexp:0, speed: 100,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[9001,9001,9001,9001,9001,9001],sk2:[2002,2002,2002,2002,2002,2002],sk3:[2002,2002,2002,2002,2002,2002],pw:0,pwm:150,pws:10,apw:0,uapw:0,cpw:0,dpw:0,dopw:0,
|
||||
akr:[10,20,30,40,50,60],akc:[1,1,1,1,1,1],uar:[10,20,30,40,50,60],uac:[1,1,1,1,1,1],dgr:[10,20,30,40,50,60],dgc:[1,1,1,1,1,1],crr:[10,20,30,40,50,60],crc:[1,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,
|
||||
tals:["这是一级说明","这是二级说明","这是三级说明","这是四级说明","这是五级说明"]
|
||||
},
|
||||
|
||||
@@ -83,8 +83,13 @@ export class HeroHomeComp extends CCComp {
|
||||
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("gold").getChildByName("need").getComponent(Label).string = (UpGold.SlvUp*(this.role.slv+1)).toString()
|
||||
slvup.getChildByName("lv1").getChildByName("need").getComponent(Label).string = ((SlvUp[1]+this.hero.slvexp)*1).toString()
|
||||
slvup.getChildByName("lv2").getChildByName("need").getComponent(Label).string = ((SlvUp[2]+this.hero.slvexp)*2).toString()
|
||||
slvup.getChildByName("lv3").getChildByName("need").getComponent(Label).string = ((SlvUp[3]+this.hero.slvexp)*3).toString()
|
||||
slvup.getChildByName("lv4").getChildByName("need").getComponent(Label).string = ((SlvUp[4]+this.hero.slvexp)*4).toString()
|
||||
slvup.getChildByName("lv5").getChildByName("need").getComponent(Label).string = ((SlvUp[5]+this.hero.slvexp)*5).toString()
|
||||
slvup.getChildByName("lv6").getChildByName("need").getComponent(Label).string = ((SlvUp[6]+this.hero.slvexp)*6).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+"%"
|
||||
@@ -93,6 +98,16 @@ export class HeroHomeComp extends CCComp {
|
||||
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>=5) {slv_node.getChildByName("s5").active=true}else{slv_node.getChildByName("s5").active=false};
|
||||
if( this.role.slv==0) {slvup.getChildByName("lv1").active=true}else{slvup.getChildByName("lv1").active=false};
|
||||
if( this.role.slv==1) {slvup.getChildByName("lv2").active=true}else{slvup.getChildByName("lv2").active=false};
|
||||
if( this.role.slv==2) {slvup.getChildByName("lv3").active=true}else{slvup.getChildByName("lv3").active=false};
|
||||
if( this.role.slv==3) {slvup.getChildByName("lv4").active=true}else{slvup.getChildByName("lv4").active=false};
|
||||
if( this.role.slv==4) {slvup.getChildByName("lv5").active=true}else{slvup.getChildByName("lv5").active=false};
|
||||
if( this.role.slv==5) {
|
||||
slvup.getChildByName("lv6").active=true;slvup.getChildByName("btned").active=true
|
||||
}else{
|
||||
slvup.getChildByName("lv6").active=false;slvup.getChildByName("btned").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()
|
||||
@@ -161,13 +176,30 @@ export class HeroHomeComp extends CCComp {
|
||||
oops.gui.toast("已经满星,升星失败");
|
||||
return
|
||||
}
|
||||
console.log("smc.vmdata.items[1004] ((SlvUp[this.role.slv]+this.hero.slvexp)*this.role.slv):",smc.vmdata.items[1004],((SlvUp[this.role.slv]+this.hero.slvexp)*this.role.slv))
|
||||
if(smc.vmdata.items[1004] < ((SlvUp[this.role.slv]+this.hero.slvexp)*this.role.slv)||smc.vmdata.gold < (UpGold.SlvUp*this.role.slv)){
|
||||
let need =smc.vmdata.items[1004]
|
||||
switch(this.role.slv){
|
||||
case 1:
|
||||
need=smc.vmdata.items[1005]
|
||||
break;
|
||||
case 2:
|
||||
need=smc.vmdata.items[1006]
|
||||
break;
|
||||
case 3:
|
||||
need=smc.vmdata.items[1007]
|
||||
break;
|
||||
case 4:
|
||||
need=smc.vmdata.items[1008]
|
||||
break;
|
||||
case 5:
|
||||
need=smc.vmdata.items[1008]
|
||||
break;
|
||||
}
|
||||
if(need < ((SlvUp[this.role.slv]+this.hero.slvexp)*this.role.slv)||smc.vmdata.gold < (UpGold.SlvUp*(this.role.slv+1))){
|
||||
oops.gui.toast("资源不足,升星失败");
|
||||
return
|
||||
}
|
||||
smc.vmdata.items[1004] -= ((SlvUp[this.role.slv]+this.hero.slvexp)*this.role.slv)
|
||||
smc.vmdata.gold -= (UpGold.SlvUp*this.role.slv)
|
||||
need -= ((SlvUp[this.role.slv]+this.hero.slvexp)*this.role.slv)
|
||||
smc.vmdata.gold -= (UpGold.SlvUp*(this.role.slv+1))
|
||||
this.role.slv++
|
||||
this.update_data()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user