英雄成长基本完成

This commit is contained in:
2024-12-08 00:15:59 +08:00
parent c8e4190f18
commit 02f1c99d7c
10 changed files with 9689 additions and 6384 deletions

View File

@@ -96,7 +96,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -139.918,
"y": 0,
"z": 0
},
"_lrot": {
@@ -167,10 +167,10 @@
"_dstBlendFactor": 4,
"_color": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 175
"r": 112,
"g": 112,
"b": 112,
"a": 255
},
"_spriteFrame": {
"__uuid__": "f87f53f9-2fba-4a5b-968a-79a593311ab2@85c63",
@@ -187,7 +187,7 @@
"_fillStart": 0,
"_fillRange": 0,
"_isTrimmedMode": true,
"_useGrayscale": false,
"_useGrayscale": true,
"_atlas": null,
"_id": ""
},
@@ -235,7 +235,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": -139.918,
"y": 0,
"z": 0
},
"_lrot": {
@@ -275,8 +275,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 98.408203125,
"height": 37.8
"width": 102.408203125,
"height": 41.8
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@@ -328,7 +328,7 @@
"_isUnderline": false,
"_underlineHeight": 2,
"_cacheMode": 1,
"_enableOutline": false,
"_enableOutline": true,
"_outlineColor": {
"__type__": "cc.Color",
"r": 0,
@@ -438,7 +438,7 @@
"r": 255,
"g": 255,
"b": 255,
"a": 155
"a": 255
},
"_spriteFrame": null,
"_type": 1,

View File

@@ -9,13 +9,13 @@
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,0}</string>
<string>{0,1}</string>
<key>spriteSize</key>
<string>{128,128}</string>
<string>{104,108}</string>
<key>spriteSourceSize</key>
<string>{128,128}</string>
<key>textureRect</key>
<string>{{222,1},{128,128}}</string>
<string>{{1,1},{104,108}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -24,13 +24,13 @@
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,0}</string>
<string>{0,1}</string>
<key>spriteSize</key>
<string>{128,128}</string>
<string>{104,108}</string>
<key>spriteSourceSize</key>
<string>{128,128}</string>
<key>textureRect</key>
<string>{{352,1},{128,128}}</string>
<string>{{107,1},{104,108}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -39,13 +39,13 @@
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,0}</string>
<string>{0,1}</string>
<key>spriteSize</key>
<string>{128,128}</string>
<string>{104,108}</string>
<key>spriteSourceSize</key>
<string>{128,128}</string>
<key>textureRect</key>
<string>{{482,1},{128,128}}</string>
<string>{{213,1},{104,108}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -54,13 +54,13 @@
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,0}</string>
<string>{0,1}</string>
<key>spriteSize</key>
<string>{135,135}</string>
<string>{104,108}</string>
<key>spriteSourceSize</key>
<string>{135,135}</string>
<string>{128,128}</string>
<key>textureRect</key>
<string>{{872,1},{135,135}}</string>
<string>{{319,1},{104,108}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -69,13 +69,13 @@
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,0}</string>
<string>{0,1}</string>
<key>spriteSize</key>
<string>{128,128}</string>
<string>{104,108}</string>
<key>spriteSourceSize</key>
<string>{128,128}</string>
<key>textureRect</key>
<string>{{612,1},{128,128}}</string>
<string>{{425,1},{104,108}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -84,13 +84,13 @@
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,0}</string>
<string>{0,1}</string>
<key>spriteSize</key>
<string>{128,128}</string>
<string>{104,108}</string>
<key>spriteSourceSize</key>
<string>{128,128}</string>
<key>textureRect</key>
<string>{{742,1},{128,128}}</string>
<string>{{531,1},{104,108}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -99,13 +99,13 @@
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,0}</string>
<string>{0,1}</string>
<key>spriteSize</key>
<string>{115,115}</string>
<string>{104,108}</string>
<key>spriteSourceSize</key>
<string>{115,115}</string>
<string>{128,128}</string>
<key>textureRect</key>
<string>{{105,1},{115,115}}</string>
<string>{{637,1},{104,108}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -114,13 +114,13 @@
<key>aliases</key>
<array/>
<key>spriteOffset</key>
<string>{0,0}</string>
<string>{0,1}</string>
<key>spriteSize</key>
<string>{102,102}</string>
<string>{104,108}</string>
<key>spriteSourceSize</key>
<string>{102,102}</string>
<string>{128,128}</string>
<key>textureRect</key>
<string>{{1,1},{102,102}}</string>
<string>{{743,1},{104,108}}</string>
<key>textureRotated</key>
<false/>
</dict>
@@ -136,9 +136,9 @@
<key>realTextureFileName</key>
<string>skill_icon.png</string>
<key>size</key>
<string>{1008,137}</string>
<string>{848,110}</string>
<key>smartupdate</key>
<string>$TexturePacker:SmartUpdate:7017fb72c05f331bbb1583e09ff033a1:4fe1936d38daf3acc451a5455c0681a2:fc419542501e310cbb024c3f9a203681$</string>
<string>$TexturePacker:SmartUpdate:85b77a714faf0e830054f6494315bc30:985278f3e898a01ceba80dd9432eac2a:fc419542501e310cbb024c3f9a203681$</string>
<key>textureFileName</key>
<string>skill_icon.png</string>
</dict>

View File

@@ -18,11 +18,11 @@
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 612,
"offsetY": 1,
"trimX": 425,
"trimY": 1,
"width": 128,
"height": 128,
"width": 104,
"height": 108,
"rawWidth": 128,
"rawHeight": 128,
"borderTop": 0,
@@ -64,11 +64,11 @@
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 222,
"offsetY": 1,
"trimX": 1,
"trimY": 1,
"width": 128,
"height": 128,
"width": 104,
"height": 108,
"rawWidth": 128,
"rawHeight": 128,
"borderTop": 0,
@@ -110,11 +110,11 @@
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 352,
"offsetY": 1,
"trimX": 107,
"trimY": 1,
"width": 128,
"height": 128,
"width": 104,
"height": 108,
"rawWidth": 128,
"rawHeight": 128,
"borderTop": 0,
@@ -156,11 +156,11 @@
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 482,
"offsetY": 1,
"trimX": 213,
"trimY": 1,
"width": 128,
"height": 128,
"width": 104,
"height": 108,
"rawWidth": 128,
"rawHeight": 128,
"borderTop": 0,
@@ -202,13 +202,13 @@
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 872,
"offsetY": 1,
"trimX": 319,
"trimY": 1,
"width": 135,
"height": 135,
"rawWidth": 135,
"rawHeight": 135,
"width": 104,
"height": 108,
"rawWidth": 128,
"rawHeight": 128,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
@@ -248,11 +248,11 @@
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 742,
"offsetY": 1,
"trimX": 531,
"trimY": 1,
"width": 128,
"height": 128,
"width": 104,
"height": 108,
"rawWidth": 128,
"rawHeight": 128,
"borderTop": 0,
@@ -294,13 +294,13 @@
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 105,
"offsetY": 1,
"trimX": 637,
"trimY": 1,
"width": 115,
"height": 115,
"rawWidth": 115,
"rawHeight": 115,
"width": 104,
"height": 108,
"rawWidth": 128,
"rawHeight": 128,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
@@ -340,13 +340,13 @@
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 1,
"offsetY": 1,
"trimX": 743,
"trimY": 1,
"width": 102,
"height": 102,
"rawWidth": 102,
"rawHeight": 102,
"width": 104,
"height": 108,
"rawWidth": 128,
"rawHeight": 128,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 31 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -27,11 +27,6 @@ const { ccclass, property } = _decorator;
@ccclass('BossViewComp') // 定义为 Cocos Creator 组件
@ecs.register('BossView', false) // 定义为 ECS 组件
export class BossViewComp extends CCComp {
@property(Material)
hitFlashMaterial: Material;
orginalFlashMaterial: Material;
@property(Material)
atkMaterial: Material;
sprite: Sprite;
/** 角色动画 */
@@ -127,7 +122,7 @@ export class BossViewComp extends CCComp {
if(this.hp <= 0 ){
return
}
this.hp_change(skill.atk);
this.hp_change(skill.ap);
}
}
}

View File

@@ -1,2 +1,6 @@
export const SlvSet =[0,20,40,80,160]
export const SlvUp =[10,20,40,80,160,320]
export const LvUp =[100]
export enum UpGold {
LvUp=100,
SlvUp=100,
}

View File

@@ -1,9 +1,47 @@
import { Talents } from "./TalentSet"
/**
* atp :忘记是什么了
* vun : 免伤
* ap : 攻击
* def : 防御
* crit : 暴击
* crit_add : 暴击伤害加成
* ucr : 免暴率
* dodge : 闪避
* abh 攻击后回血量
* abc 攻击后回血次数
* uabh 被攻击后回血量
* uabc 被攻击后回血次数
* cbh 暴击后回血量
* cbc 暴击后回血次数
* aua 攻击后增加攻击
* auc 攻击后增加攻击次数
* uaua 被攻击后增加攻击
* uauc 被攻击后增加攻击次数
* cua 暴击后增加攻击
* cuc 暴击后增加攻击次数
* aep 攻击经验
* uaep 受伤经验
* dep 死亡经验
* sk1 普通攻击,根据星级变化
* sk2 技能,根据星级变化
* sk3 技能,根据星级变化
* pw 能量初始值
* pwm 能量最大值
* pws 能量每秒增值
* akc 攻击触发sk3需要次数
* akr 攻击触发sk3机率
* uac 受伤触发sk3需要次数
* uar 受伤触发sk3机率
* dgc 闪避触发sk3需要次数
* dgr 闪避触发sk3机率
* crr 暴击触发sk3机率
* crc 暴击触发sk3需要次数
**/
export const HeroInfo = {
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,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,
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,
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,
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,
tals:["这是一级说明","这是二级说明","这是三级说明","这是四级说明","这是五级说明"]

View File

@@ -10,6 +10,7 @@ const { ccclass, property } = _decorator;
@ccclass('HeroCardComp')
@ecs.register('HeroCardComp', false)
export class HeroCardComp extends CCComp {
hcc_home: HeroHomeComp = null!;
hcc_uuid: number = 0;
onLoad() {
@@ -19,7 +20,7 @@ export class HeroCardComp extends CCComp {
start() {
this.hcc_home=this.node.parent.parent.parent.parent.getComponent(HeroHomeComp);
// console.log("hero_card hcc_home",this.hcc_home)
}
show_info(){
this.hcc_home.hero_show(this.hcc_uuid)

View File

@@ -8,7 +8,7 @@ import { UIID } from "../common/config/GameUIConfig";
import { oops } from "../../../../extensions/oops-plugin-framework/assets/core/Oops";
import { Items } from "../common/config/Items";
import { SkillSet } from "../common/config/SkillSet";
import { SlvSet } from "../common/config/RoleSet";
import { LvUp, SlvUp, UpGold } from "../common/config/RoleSet";
const { ccclass, property } = _decorator;
/** 视图层对象 */
@@ -16,6 +16,8 @@ const { ccclass, property } = _decorator;
@ecs.register('HeroHome', false)
export class HeroHomeComp extends CCComp {
h_uuid:number=0
role:any=null
hero:any=null
protected onLoad(): void {
}
@@ -40,50 +42,60 @@ export class HeroHomeComp extends CCComp {
}
hero_show(uuid:number) {
console.log("hero_home hero_show:",uuid)
let role = smc.heros[uuid]
let hero =HeroInfo[uuid]
this.h_uuid=uuid
let slv_node=this.node.getChildByName("name").getChildByName("slv");
let tal=this.node.getChildByName("slvup").getChildByName("tal");
this.role=smc.heros[uuid]
this.hero=HeroInfo[uuid]
console.log("hero_home hero:",this.hero)
let tal=this.node.getChildByName("sk").getChildByName("tal");
let sk_node= this.node.getChildByName("sk");
let skill = SkillSet[hero.sk2[0]]
let skill = SkillSet[this.hero.sk2[0]]
var sk_path = "game/skills/skill_icon"
var icon_path = "game/heros/herois"
resources.load(icon_path, SpriteAtlas, (err: any, atlas) => {
const sprite = this.node.getChildByName("hero").getChildByName("icon").getComponent(Sprite);
sprite.spriteFrame = atlas.getSpriteFrame(hero.path);
sprite.spriteFrame = atlas.getSpriteFrame(this.hero.path);
});
resources.load(sk_path, SpriteAtlas, (err: any, atlas) => {
const sprite = sk_node.getChildByName("skicon").getChildByName("Mask").getChildByName("icon").getComponent(Sprite);
const sprite = sk_node.getChildByName("skicon").getChildByName("icon").getComponent(Sprite);
sprite.spriteFrame = atlas.getSpriteFrame(skill.path);
});
sk_node.getChildByName("name").getComponent(Label).string = skill.name;
sk_node.getChildByName("info").getComponent(Label).string = skill.info;
this.node.getChildByName("name").getChildByName("value").getComponent(Label).string=hero.name
this.node.getChildByName("name").getChildByName("lv").getComponent(Label).string = role.lv.toString()+"级";
if( role.slv>=1) {slv_node.getChildByName("s1").active=true}else{slv_node.getChildByName("s1").active=false};
if( role.slv>=2) {slv_node.getChildByName("s2").active=true}else{slv_node.getChildByName("s2").active=false};
if( role.slv>=3) {slv_node.getChildByName("s3").active=true}else{slv_node.getChildByName("s3").active=false};
if( role.slv>=4) {slv_node.getChildByName("s4").active=true}else{slv_node.getChildByName("s4").active=false};
if( 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 = hero.ap+hero.ap_up* role.lv
this.node.getChildByName("attr").getChildByName("hp").getChildByName("val").getComponent(Label).string = hero.hp+hero.hp_up* role.lv
this.node.getChildByName("attr").getChildByName("def").getChildByName("val").getComponent(Label).string = hero.ap+hero.ap_up* role.lv
this.node.getChildByName("attr").getChildByName("acd").getChildByName("val").getComponent(Label).string = hero.a_cd
this.node.getChildByName("attr").getChildByName("speed").getChildByName("val").getComponent(Label).string = hero.speed
this.node.getChildByName("attr").getChildByName("dis").getChildByName("val").getComponent(Label).string = hero.dis
tal.getChildByName("slv1").getChildByName("val").getComponent(Label).string = hero.tals[0]
tal.getChildByName("slv2").getChildByName("val").getComponent(Label).string = hero.tals[1]
tal.getChildByName("slv3").getChildByName("val").getComponent(Label).string = hero.tals[2]
tal.getChildByName("slv4").getChildByName("val").getComponent(Label).string = hero.tals[3]
tal.getChildByName("slv5").getChildByName("val").getComponent(Label).string = hero.tals[4]
this.node.getChildByName("name").getChildByName("value").getComponent(Label).string=this.hero.name
tal.getChildByName("slv1").getChildByName("val").getComponent(Label).string = this.hero.tals[0]
tal.getChildByName("slv2").getChildByName("val").getComponent(Label).string = this.hero.tals[1]
tal.getChildByName("slv3").getChildByName("val").getComponent(Label).string = this.hero.tals[2]
tal.getChildByName("slv4").getChildByName("val").getComponent(Label).string = this.hero.tals[3]
tal.getChildByName("slv5").getChildByName("val").getComponent(Label).string = this.hero.tals[4]
this.update_data()
}
update_data(){
let slv_node=this.node.getChildByName("name").getChildByName("slv");
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()
this.node.getChildByName("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()
this.node.getChildByName("slvup").getChildByName("item").getChildByName("need").getComponent(Label).string = ((SlvUp[this.role.slv]+this.hero.slvexp)*this.role.slv).toString()
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>=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};
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
this.node.getChildByName("attr").getChildByName("def").getChildByName("val").getComponent(Label).string = this.hero.ap+this.hero.ap_up* this.role.lv
this.node.getChildByName("attr").getChildByName("acd").getChildByName("val").getComponent(Label).string = this.hero.a_cd
this.node.getChildByName("attr").getChildByName("speed").getChildByName("val").getComponent(Label).string = this.hero.speed
this.node.getChildByName("attr").getChildByName("dis").getChildByName("val").getComponent(Label).string = this.hero.dis
}
lv_selcet(e:any,val:any){
let active = this.node.getChildByName("menu").getChildByName("active")
tween(active).to(0.1,{position:v3(val,0)}).start()
let hero = this.node.getChildByName("hero")
let attr = this.node.getChildByName("attr")
let attr2 = this.node.getChildByName("attr2")
let info = this.node.getChildByName("info")
let lvup = this.node.getChildByName("lvup")
let sk = this.node.getChildByName("sk")
@@ -91,14 +103,14 @@ export class HeroHomeComp extends CCComp {
if(val < 0){
tween(hero).to(0.2,{position:v3(0,hero.position.y)}).start()
tween(attr).to(0.2,{position:v3(0,attr.position.y)}).start()
tween(info).to(0.2,{position:v3(0,info.position.y)}).start()
tween(attr2).to(0.2,{position:v3(0,attr2.position.y)}).start()
tween(lvup).to(0.2,{position:v3(0,lvup.position.y)}).start()
tween(sk).to(0.2,{position:v3(1000,sk.position.y)}).start()
tween(slvup).to(0.2,{position:v3(1000,slvup.position.y)}).start()
}else{
tween(hero).to(0.2,{position:v3(-1000,hero.position.y)}).start()
tween(attr).to(0.2,{position:v3(-1000,attr.position.y)}).start()
tween(info).to(0.2,{position:v3(-1000,info.position.y)}).start()
tween(attr2).to(0.2,{position:v3(-1000,attr2.position.y)}).start()
tween(lvup).to(0.2,{position:v3(-1000,lvup.position.y)}).start()
tween(sk).to(0.2,{position:v3(0,sk.position.y)}).start()
tween(slvup).to(0.2,{position:v3(0,slvup.position.y)}).start()
@@ -109,22 +121,32 @@ export class HeroHomeComp extends CCComp {
lv_up(){
console.log("升级",smc.vmdata.items[1001],smc.heros[this.h_uuid].lv*HeroInfo[this.h_uuid].lvexp)
if(smc.vmdata.items[1001] < smc.heros[this.h_uuid].lv*HeroInfo[this.h_uuid].lvexp){
console.log("材料不足")
console.log("升级",smc.vmdata.items[1001],((LvUp[0]+this.hero.lvexp)*this.role.lv))
if(smc.vmdata.items[1001] < ((LvUp[0]+this.hero.lvexp)*this.role.lv)||smc.vmdata.gold < (UpGold.LvUp*this.role.lv)){
oops.gui.toast("资源不足,升级失败");
return
}
smc.heros[this.h_uuid].lv++
smc.vmdata.items[1001] -= smc.heros[this.h_uuid].lv*HeroInfo[this.h_uuid].lvexp
smc.vmdata.items[1001] -= ((LvUp[0]+this.hero.lvexp)*this.role.lv)
smc.vmdata.gold -= (UpGold.LvUp*this.role.lv)
this.role.lv++
this.update_data()
}
slv_up(){
console.log("smc.vmdata.items[1004] SlvSet[smc.heros[this.h_uuid].slv]:",smc.vmdata.items[1004],SlvSet[smc.heros[this.h_uuid].slv])
if(smc.vmdata.items[1004] < SlvSet[smc.heros[this.h_uuid].slv]){
console.log("材料不足")
if(this.role.slv>=5){
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)){
oops.gui.toast("资源不足,升星失败");
return
}
smc.heros[this.h_uuid].slv++
smc.vmdata.items[1004] -= SlvSet[smc.heros[this.h_uuid].slv]
smc.vmdata.items[1004] -= ((SlvUp[this.role.slv]+this.hero.slvexp)*this.role.slv)
smc.vmdata.gold -= (UpGold.SlvUp*this.role.slv)
this.role.slv++
this.update_data()
}
item_show(e:any,val:any){
oops.gui.open(UIID.ItemInfo, Items[val]);