去掉局内buff

This commit is contained in:
2025-02-07 09:54:57 +08:00
parent 4dcb732148
commit 56b365cbe7
5 changed files with 3015 additions and 22339 deletions

View File

@@ -1482,7 +1482,7 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"x": 0.7,
"y": 1,
"z": 1
},
@@ -1786,7 +1786,7 @@
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 1,
"x": 0.7,
"y": 1,
"z": 1
},
@@ -2063,7 +2063,7 @@
"__id__": 97
}
],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 103
@@ -2453,7 +2453,7 @@
"__id__": 113
}
],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 119

File diff suppressed because it is too large Load Diff

View File

@@ -31,8 +31,8 @@ export class HCardComp extends CCComp {
this.heros= ecs.query(ecs.allOf(HeroModelComp));
this.hc_name=this.node.getChildByName("name").getComponent(Label)!
// this.icon=this.node.getChildByName("icon").getComponent(Sprite)!
this.hp=this.node.getChildByName("hp").getChildByName("num").getComponent(Label)!
this.ap=this.node.getChildByName("ap").getChildByName("num").getComponent(Label)!
// this.hp=this.node.getChildByName("hp").getChildByName("num").getComponent(Label)!
// this.ap=this.node.getChildByName("ap").getChildByName("num").getComponent(Label)!
this.life=this.node.getChildByName("life").getComponent(ProgressBar)!
this.pw=this.node.getChildByName("pow").getComponent(ProgressBar)!
this.hc_name.string= this.heros[this.hi].HeroView.hero_name
@@ -53,8 +53,8 @@ export class HCardComp extends CCComp {
this.node.getChildByName("bg").getComponent(Sprite).grayscale=false
this.is_dead=false
}
this.hp.string=(this.heros[this.hi].HeroView.hp_max).toFixed(0)
this.ap.string=(this.heros[this.hi].HeroView.ap*(smc.vmdata.mission.ap+100)/100).toFixed(0)
// this.hp.string=(this.heros[this.hi].HeroView.hp_max).toFixed(0)
// this.ap.string=(this.heros[this.hi].HeroView.ap*(smc.vmdata.mission.ap+100)/100).toFixed(0)
this.life.progress=this.heros[this.hi].HeroView.hp/this.heros[this.hi].HeroView.hp_max
this.pw.progress=this.heros[this.hi].HeroView.pw/this.heros[this.hi].HeroView.pwm

View File

@@ -143,35 +143,10 @@ export class MissionComp extends CCComp {
check_buff(){
if(smc.vmdata.mission.exp >= smc.vmdata.mission.exp_max){
smc.vmdata.mission.exp-=smc.vmdata.mission.exp_max
this.do_buff()
}
// if(smc.mission.mexp >= smc.vmdata.mission.mexp_max){
// smc.vmdata.mission.mexp-=smc.vmdata.mission.mexp_max
// this.do_mbuff()
// }
}
do_buff(){
smc.vmdata.mission.ap+=smc.vmdata.mission.ap_up
smc.vmdata.mission.hp+=smc.vmdata.mission.hp_up
smc.vmdata.mission.def+=smc.vmdata.mission.def_up
smc.vmdata.mission.crit+=smc.vmdata.mission.crit_up
smc.vmdata.mission.dodge+=smc.vmdata.mission.dodge_up
if(smc.vmdata.mission.hp_up > 0 ){
let heros:any =ecs.query(ecs.allOf(HeroModelComp));
for (let i = 0; i < heros.length; i++) {
heros[i].HeroView.add_hp2(smc.vmdata.mission.hp_up)
}
}
}
// do_mbuff(){
// smc.vmdata.mission.map+=smc.vmdata.mission.map_up
// smc.vmdata.mission.mhp+=smc.vmdata.mission.mhp_up
// //todo hp 需要特殊处理
// smc.vmdata.mission.mdef+=smc.vmdata.mission.mdef_up
// smc.vmdata.mission.mcrit+=smc.vmdata.mission.mcrit_up
// smc.vmdata.mission.mdodge+=smc.vmdata.mission.mdodge_up
// }
check_mon_num(){
let mons:any = this.get_mons()
let heros:any= this.get_heros()

View File

@@ -150,104 +150,12 @@ export class MissionHomeComp extends CCComp {
}
}
show_heros(){
this.node.getChildByName("heros").setPosition(0,290)
}
hide_heros(){
this.node.getChildByName("heros").setPosition(0,-800)
}
show_buff_set(){
this.node.getChildByName("buffset").setPosition(0,400)
}
hide_buff_set(){
this.node.getChildByName("buffset").setPosition(0,-800)
}
add_ap(){
if(smc.vmdata.buff_num_less < MBSet.ap_cost){
oops.gui.toast("成长点数不足")
return
}
smc.vmdata.buff_num_less -= MBSet.ap_cost
smc.vmdata.buff_num[0] += MBSet.ap_cost
smc.vmdata.mission.ap_up=MBSet.ap_add*smc.vmdata.buff_num[0]/MBSet.ap_cost
}
less_ap(){
if(smc.vmdata.buff_num[0] <= 0){
return
}
smc.vmdata.buff_num_less += MBSet.ap_cost
smc.vmdata.buff_num[0] -= MBSet.ap_cost
smc.vmdata.mission.ap_up=MBSet.ap_add*smc.vmdata.buff_num[0]/MBSet.ap_cost
}
add_def(){
if(smc.vmdata.buff_num_less < MBSet.def_cost){
oops.gui.toast("成长点数不足")
return
}
smc.vmdata.buff_num_less -= MBSet.def_cost
smc.vmdata.buff_num[1] += MBSet.def_cost
smc.vmdata.mission.def_up=MBSet.def_add*smc.vmdata.buff_num[1]/MBSet.def_cost
}
less_def(){
if(smc.vmdata.buff_num[1] <= 0){
return
}
smc.vmdata.buff_num_less += MBSet.def_cost
smc.vmdata.buff_num[1] -= MBSet.def_cost
smc.vmdata.mission.def_up=MBSet.def_add*smc.vmdata.buff_num[1]/MBSet.def_cost
}
add_hp(){
if(smc.vmdata.buff_num_less < MBSet.hp_cost){
oops.gui.toast("成长点数不足")
return
}
smc.vmdata.buff_num_less -= MBSet.hp_cost
smc.vmdata.buff_num[2] += MBSet.hp_cost
smc.vmdata.mission.hp_up=MBSet.hp_add*smc.vmdata.buff_num[2]/MBSet.hp_cost
}
less_hp(){
if(smc.vmdata.buff_num[2] <= 0){
return
}
smc.vmdata.buff_num_less += MBSet.hp_cost
smc.vmdata.buff_num[2] -= MBSet.hp_cost
smc.vmdata.mission.hp_up=MBSet.hp_add*smc.vmdata.buff_num[2]/MBSet.hp_cost
}
add_crit(){
if(smc.vmdata.buff_num_less < MBSet.crit_cost){
oops.gui.toast("成长点数不足")
return
}
smc.vmdata.buff_num_less -= MBSet.crit_cost
smc.vmdata.buff_num[3] += MBSet.crit_cost
smc.vmdata.mission.crit_up=MBSet.crit_add*smc.vmdata.buff_num[3]/MBSet.crit_cost
}
less_crit(){
if(smc.vmdata.buff_num[3] <= 0){
return
}
smc.vmdata.buff_num_less += MBSet.crit_cost
smc.vmdata.buff_num[3] -= MBSet.crit_cost
smc.vmdata.mission.crit_up=MBSet.crit_add*smc.vmdata.buff_num[3]/MBSet.crit_cost
}
add_dodge(){
if(smc.vmdata.buff_num_less < MBSet.dodge_cost){
oops.gui.toast("成长点数不足")
return
}
smc.vmdata.buff_num_less -= MBSet.dodge_cost
smc.vmdata.buff_num[4] += MBSet.dodge_cost
smc.vmdata.mission.dodge_up=MBSet.dodge_add*smc.vmdata.buff_num[4]/MBSet.dodge_cost
}
less_dodge(){
if(smc.vmdata.buff_num[4] <= 0){
return
}
smc.vmdata.buff_num_less += MBSet.dodge_cost
smc.vmdata.buff_num[4] -= MBSet.dodge_cost
smc.vmdata.mission.dodge_up=MBSet.dodge_add*smc.vmdata.buff_num[4]/MBSet.dodge_cost
}
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
reset() {