技能都改为 cd 减少 玩家学习成本

This commit is contained in:
2025-07-25 17:20:23 +08:00
parent 509121a2ab
commit 855fed2a47
8 changed files with 73 additions and 55 deletions

View File

@@ -241,10 +241,10 @@
"_string": "10", "_string": "10",
"_horizontalAlign": 1, "_horizontalAlign": 1,
"_verticalAlign": 1, "_verticalAlign": 1,
"_actualFontSize": 31, "_actualFontSize": 40,
"_fontSize": 30, "_fontSize": 50,
"_fontFamily": "Arial", "_fontFamily": "Arial",
"_lineHeight": 30, "_lineHeight": 50,
"_overflow": 2, "_overflow": 2,
"_enableWrapText": true, "_enableWrapText": true,
"_font": null, "_font": null,
@@ -720,7 +720,7 @@
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": -34.4845703125, "x": -66.16900000000001,
"y": 0, "y": 0,
"z": 0 "z": 0
}, },
@@ -733,8 +733,8 @@
}, },
"_lscale": { "_lscale": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0.6, "x": 0.8,
"y": 0.6, "y": 0.8,
"z": 1 "z": 1
}, },
"_mobility": 0, "_mobility": 0,
@@ -834,7 +834,7 @@
}, },
"_alignFlags": 8, "_alignFlags": 8,
"_target": null, "_target": null,
"_left": -32, "_left": -52.399859375000005,
"_right": 0, "_right": 0,
"_top": 0, "_top": 0,
"_bottom": 0, "_bottom": 0,
@@ -883,8 +883,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 37.369140625, "width": 70.73828125,
"height": 48.1 "height": 104.8
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
@@ -919,13 +919,13 @@
"b": 0, "b": 0,
"a": 255 "a": 255
}, },
"_string": "10", "_string": "80",
"_horizontalAlign": 1, "_horizontalAlign": 1,
"_verticalAlign": 1, "_verticalAlign": 1,
"_actualFontSize": 30, "_actualFontSize": 60,
"_fontSize": 30, "_fontSize": 60,
"_fontFamily": "Arial", "_fontFamily": "Arial",
"_lineHeight": 35, "_lineHeight": 80,
"_overflow": 0, "_overflow": 0,
"_enableWrapText": true, "_enableWrapText": true,
"_font": null, "_font": null,

View File

@@ -377,7 +377,7 @@
"__id__": 32 "__id__": 32
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 40 "__id__": 40
@@ -18729,7 +18729,7 @@
"__id__": 814 "__id__": 814
} }
], ],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 822 "__id__": 822
@@ -19409,7 +19409,7 @@
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 10.344, "y": -7.913,
"z": 0 "z": 0
}, },
"_lrot": { "_lrot": {
@@ -19444,7 +19444,7 @@
"__id__": 827 "__id__": 827
}, },
"_children": [], "_children": [],
"_active": true, "_active": false,
"_components": [ "_components": [
{ {
"__id__": 829 "__id__": 829
@@ -19724,7 +19724,7 @@
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": -290, "x": -300,
"y": 60, "y": 60,
"z": 0 "z": 0
}, },
@@ -24926,7 +24926,7 @@
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": -175, "x": -180,
"y": 60, "y": 60,
"z": 0 "z": 0
}, },
@@ -35330,7 +35330,7 @@
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 55, "x": 60,
"y": 60, "y": 60,
"z": 0 "z": 0
}, },
@@ -40532,7 +40532,7 @@
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 170, "x": 180,
"y": 60, "y": 60,
"z": 0 "z": 0
}, },
@@ -45734,7 +45734,7 @@
}, },
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 285, "x": 300,
"y": 60, "y": 60,
"z": 0 "z": 0
}, },
@@ -50942,11 +50942,11 @@
"height": 40 "height": 40
}, },
"_startAxis": 0, "_startAxis": 0,
"_paddingLeft": 20, "_paddingLeft": 10,
"_paddingRight": 0, "_paddingRight": 0,
"_paddingTop": 10, "_paddingTop": 10,
"_paddingBottom": 0, "_paddingBottom": 0,
"_spacingX": 15, "_spacingX": 20,
"_spacingY": 0, "_spacingY": 0,
"_verticalDirection": 1, "_verticalDirection": 1,
"_horizontalDirection": 0, "_horizontalDirection": 0,
@@ -51812,7 +51812,7 @@
"b": 255, "b": 255,
"a": 255 "a": 255
}, },
"_string": "装备", "_string": "天赋",
"_horizontalAlign": 1, "_horizontalAlign": 1,
"_verticalAlign": 1, "_verticalAlign": 1,
"_actualFontSize": 20, "_actualFontSize": 20,
@@ -51885,7 +51885,7 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 710, "width": 720,
"height": 220 "height": 220
}, },
"_anchorPoint": { "_anchorPoint": {
@@ -51913,10 +51913,10 @@
}, },
"_alignFlags": 44, "_alignFlags": 44,
"_target": null, "_target": null,
"_left": 5, "_left": 0,
"_right": 5, "_right": 0,
"_top": 0, "_top": 0,
"_bottom": 10.344, "_bottom": -7.913,
"_horizontalCenter": 0, "_horizontalCenter": 0,
"_verticalCenter": 0, "_verticalCenter": 0,
"_isAbsLeft": true, "_isAbsLeft": true,
@@ -59882,7 +59882,7 @@
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 367.368, "y": 341.032,
"z": 0 "z": 0
}, },
"_lrot": { "_lrot": {
@@ -60538,7 +60538,7 @@
"_lpos": { "_lpos": {
"__type__": "cc.Vec3", "__type__": "cc.Vec3",
"x": 0, "x": 0,
"y": 337.508, "y": 183.543,
"z": 0 "z": 0
}, },
"_lrot": { "_lrot": {

View File

@@ -58,4 +58,5 @@ export enum GameEvent {
ShopOpen = "ShopOpen", ShopOpen = "ShopOpen",
RestOpen = "RestOpen", RestOpen = "RestOpen",
HeroLvUp = "HeroLvUp", HeroLvUp = "HeroLvUp",
MonDead = "MonDead",
} }

View File

@@ -247,11 +247,11 @@ export const SkillSet = {
debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:1,hited:3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"向最前方敌人释放箭矢,造成100%攻击的伤害"}, debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:1,hited:3,buV:0,buC:0,buR:100,speed:720,cost:10,info:"向最前方敌人释放箭矢,造成100%攻击的伤害"},
6004:{uuid:6004,name:"护盾",for_hero:true,sp_name:"buff_to",path:"3045",quality:Quality.BLUE, TType:TType.Frontline,maxC:1, 6004:{uuid:6004,name:"护盾",for_hero:true,sp_name:"buff_to",path:"3045",quality:Quality.BLUE, TType:TType.Frontline,maxC:1,
TGroup:TGroup.Team,SType:SType.shield,act:"atk",DTType:DTType.single,CdType:CdType.atked,AType:AType.StartEnd,RType:RType.fixed,EType:EType.timeEnd,fname:"max",flash:false,with:0, TGroup:TGroup.Team,SType:SType.shield,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.StartEnd,RType:RType.fixed,EType:EType.timeEnd,fname:"max",flash:false,with:0,
debuff:0,deV:0,deC:0,deR:100,in:1,ap:0,cd:10,hit:1,hited:3,buV:2,buC:0,buR:100,speed:720,cost:10,info:"为最前排队友召唤一个可以抵御2次攻击的圣盾(最高叠加到6次)"}, debuff:0,deV:0,deC:0,deR:100,in:1,ap:0,cd:10,hit:1,hited:3,buV:2,buC:0,buR:100,speed:720,cost:10,info:"为最前排队友召唤一个可以抵御2次攻击的圣盾(最高叠加到6次)"},
6005:{uuid:6005,name:"治疗", for_hero:true, sp_name:"heath_small",path:"3056",quality:Quality.GREEN, TType:TType.Frontline,maxC:1, 6005:{uuid:6005,name:"治疗", for_hero:true, sp_name:"heath_small",path:"3056",quality:Quality.GREEN, TType:TType.Frontline,maxC:1,
TGroup:TGroup.Team,SType:SType.heal,act:"atk",DTType:DTType.single,CdType:CdType.atked,AType:AType.StartEnd,RType:RType.fixed,EType:EType.timeEnd,fname:"max",flash:false,with:0, TGroup:TGroup.Team,SType:SType.heal,act:"atk",DTType:DTType.single,CdType:CdType.cd,AType:AType.StartEnd,RType:RType.fixed,EType:EType.timeEnd,fname:"max",flash:false,with:0,
debuff:0,deV:0,deC:0,deR:100,in:1,ap:0,cd:5,hit:0,hited:0,buV:20,buC:0,buR:100,speed:0,cost:10,info:"回复最前排队友10%最大生命值的生命"}, debuff:0,deV:0,deC:0,deR:100,in:1,ap:0,cd:5,hit:0,hited:0,buV:20,buC:0,buR:100,speed:0,cost:10,info:"回复最前排队友10%最大生命值的生命"},
6006:{uuid:6006,name:"铁斧打击",for_hero:false,sp_name:"base_ft",path:"3036",quality:Quality.WHITE, TType:TType.Frontline,maxC:1, 6006:{uuid:6006,name:"铁斧打击",for_hero:false,sp_name:"base_ft",path:"3036",quality:Quality.WHITE, TType:TType.Frontline,maxC:1,

View File

@@ -344,9 +344,7 @@ export class HeroViewComp extends CCComp {
//console.log("[HeroViewComp]:角色死亡",this.hero_uuid) //console.log("[HeroViewComp]:角色死亡",this.hero_uuid)
if(this.fac==FacSet.MON){ if(this.fac==FacSet.MON){
let exp=getExpDrops(HeroInfo[this.hero_uuid].quality,this.lv)*10 oops.message.dispatchEvent(GameEvent.MonDead)
oops.message.dispatchEvent(GameEvent.EXPUP,{exp:exp})
} }
if(this.fac==FacSet.HERO){ if(this.fac==FacSet.HERO){

View File

@@ -33,8 +33,8 @@ export class MissionComp extends CCComp {
this.on(GameEvent.MissionEnd,this.mission_end,this) this.on(GameEvent.MissionEnd,this.mission_end,this)
// this.on(GameEvent.CardsClose,this.after_used_skill_card,this) // this.on(GameEvent.CardsClose,this.after_used_skill_card,this)
this.on(GameEvent.WaveUpdate,this.on_mon_wave_update,this) this.on(GameEvent.WaveUpdate,this.on_mon_wave_update,this)
this.on(GameEvent.CanUpdateLv,this.show_uplv_button,this) // this.on(GameEvent.CanUpdateLv,this.show_uplv_button,this)
this.on(GameEvent.UseEnhancement,this.hide_uplv_button,this) // this.on(GameEvent.UseEnhancement,this.hide_uplv_button,this)
} }
@@ -73,18 +73,18 @@ export class MissionComp extends CCComp {
to_ready(){ to_ready(){
oops.message.dispatchEvent(GameEvent.HeroSelect,{is_master:true}) oops.message.dispatchEvent(GameEvent.HeroSelect,{is_master:true})
} }
show_uplv_button(){ // show_uplv_button(){
this.update_count++ // this.update_count++
this.node.getChildByName("uplv").active=true // this.node.getChildByName("uplv").active=true
} // }
hide_uplv_button(){ // hide_uplv_button(){
this.update_count-- // this.update_count--
if(this.update_count > 0) return // if(this.update_count > 0) return
this.node.getChildByName("uplv").active=false // this.node.getChildByName("uplv").active=false
} // }
to_uplv(){ // to_uplv(){
oops.message.dispatchEvent(GameEvent.EnhancementSelect) // oops.message.dispatchEvent(GameEvent.EnhancementSelect)
} // }
to_call_friend(){ to_call_friend(){
oops.message.dispatchEvent(GameEvent.HeroSelect,{is_master:false}) oops.message.dispatchEvent(GameEvent.HeroSelect,{is_master:false})
} }

View File

@@ -11,6 +11,7 @@ import { GameEvent } from "../common/config/GameEvent";
import { oops } from "db://oops-framework/core/Oops"; import { oops } from "db://oops-framework/core/Oops";
// 导入肉鸽配置 // 导入肉鸽配置
import { getRogueWaveConfig, RogueConfig, RogueWaveType, AffixCountConfig, MonsterAffixConfig } from "./RogueConfig"; import { getRogueWaveConfig, RogueConfig, RogueWaveType, AffixCountConfig, MonsterAffixConfig } from "./RogueConfig";
import { MonModelComp } from "../hero/MonModelComp";
const { ccclass, property } = _decorator; const { ccclass, property } = _decorator;
@@ -36,6 +37,7 @@ export class MissionMonCompComp extends CCComp {
onLoad(){ onLoad(){
this.on(GameEvent.FightStart,this.to_fight,this) this.on(GameEvent.FightStart,this.to_fight,this)
this.on(GameEvent.MonDead,this.check_mon,this)
} }
/** 视图层逻辑代码分离演示 */ /** 视图层逻辑代码分离演示 */
start() { start() {
@@ -43,13 +45,29 @@ export class MissionMonCompComp extends CCComp {
// this.on(ModuleEvent.Cmd, this.onHandler, this); // this.on(ModuleEvent.Cmd, this.onHandler, this);
// this.test_call() // this.test_call()
} }
check_mon(){
let mon=ecs.query(ecs.allOf(MonModelComp))
console.log("[MissionMonComp]:check_mon",mon)
if(mon.length==1) {
// do 倒计时
this.do_mon_wave()
}
}
//奖励发放
do_reward(){
let wave=smc.vmdata.mission_data.current_wave
// 奖励发放
}
protected update(dt: number): void { protected update(dt: number): void {
if(!smc.mission.play||smc.mission.pause) return if(!smc.mission.play||smc.mission.pause) return
if(this.is_fight) { if(this.is_fight) {
if(this.timer.update(dt)){ // if(this.timer.update(dt)){
this.do_mon_wave() // this.do_mon_wave()
} // }
} }
// 处理刷怪队列 // 处理刷怪队列
if (this.monsterQueue.length > 0 && !this.isSpawning) { if (this.monsterQueue.length > 0 && !this.isSpawning) {
@@ -60,6 +78,7 @@ export class MissionMonCompComp extends CCComp {
} }
} }
} }
to_fight(){ to_fight(){
console.log("[MissionMonComp]:to_fight") console.log("[MissionMonComp]:to_fight")
this.is_fight=true this.is_fight=true

View File

@@ -28,7 +28,7 @@ export class TooltipCom extends CCComp {
start() { start() {
switch(this.stype){ switch(this.stype){
case TooltipTypes.life: case TooltipTypes.life:
this.node.setPosition(v3(this.node.position.x,this.node.position.y-50)) this.node.setPosition(v3(this.node.position.x,this.node.position.y))
this.node.setSiblingIndex(100); this.node.setSiblingIndex(100);
this.node.getChildByName("loss_life").getChildByName("hp").getComponent(Label).string = this.value; this.node.getChildByName("loss_life").getChildByName("hp").getComponent(Label).string = this.value;
this.node.getChildByName("loss_life").active=true; this.node.getChildByName("loss_life").active=true;
@@ -45,7 +45,7 @@ export class TooltipCom extends CCComp {
},0.5) },0.5)
break break
case TooltipTypes.crit: case TooltipTypes.crit:
this.node.setPosition(v3(this.node.position.x,this.node.position.y-50)) this.node.setPosition(v3(this.node.position.x,this.node.position.y))
this.node.setSiblingIndex(200); this.node.setSiblingIndex(200);
this.node.getChildByName("bloss").getChildByName("hp").getComponent(Label).string = this.value; this.node.getChildByName("bloss").getChildByName("hp").getComponent(Label).string = this.value;
this.node.getChildByName("bloss").active=true; this.node.getChildByName("bloss").active=true;