技能都改为 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

@@ -58,4 +58,5 @@ export enum GameEvent {
ShopOpen = "ShopOpen",
RestOpen = "RestOpen",
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%攻击的伤害"},
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次)"},
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%最大生命值的生命"},
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)
if(this.fac==FacSet.MON){
let exp=getExpDrops(HeroInfo[this.hero_uuid].quality,this.lv)*10
oops.message.dispatchEvent(GameEvent.EXPUP,{exp:exp})
oops.message.dispatchEvent(GameEvent.MonDead)
}
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.CardsClose,this.after_used_skill_card,this)
this.on(GameEvent.WaveUpdate,this.on_mon_wave_update,this)
this.on(GameEvent.CanUpdateLv,this.show_uplv_button,this)
this.on(GameEvent.UseEnhancement,this.hide_uplv_button,this)
// this.on(GameEvent.CanUpdateLv,this.show_uplv_button,this)
// this.on(GameEvent.UseEnhancement,this.hide_uplv_button,this)
}
@@ -73,18 +73,18 @@ export class MissionComp extends CCComp {
to_ready(){
oops.message.dispatchEvent(GameEvent.HeroSelect,{is_master:true})
}
show_uplv_button(){
this.update_count++
this.node.getChildByName("uplv").active=true
}
hide_uplv_button(){
this.update_count--
if(this.update_count > 0) return
this.node.getChildByName("uplv").active=false
}
to_uplv(){
oops.message.dispatchEvent(GameEvent.EnhancementSelect)
}
// show_uplv_button(){
// this.update_count++
// this.node.getChildByName("uplv").active=true
// }
// hide_uplv_button(){
// this.update_count--
// if(this.update_count > 0) return
// this.node.getChildByName("uplv").active=false
// }
// to_uplv(){
// oops.message.dispatchEvent(GameEvent.EnhancementSelect)
// }
to_call_friend(){
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 { getRogueWaveConfig, RogueConfig, RogueWaveType, AffixCountConfig, MonsterAffixConfig } from "./RogueConfig";
import { MonModelComp } from "../hero/MonModelComp";
const { ccclass, property } = _decorator;
@@ -36,6 +37,7 @@ export class MissionMonCompComp extends CCComp {
onLoad(){
this.on(GameEvent.FightStart,this.to_fight,this)
this.on(GameEvent.MonDead,this.check_mon,this)
}
/** 视图层逻辑代码分离演示 */
start() {
@@ -43,13 +45,29 @@ export class MissionMonCompComp extends CCComp {
// this.on(ModuleEvent.Cmd, this.onHandler, this);
// 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 {
if(!smc.mission.play||smc.mission.pause) return
if(this.is_fight) {
if(this.timer.update(dt)){
this.do_mon_wave()
}
// if(this.timer.update(dt)){
// this.do_mon_wave()
// }
}
// 处理刷怪队列
if (this.monsterQueue.length > 0 && !this.isSpawning) {
@@ -60,6 +78,7 @@ export class MissionMonCompComp extends CCComp {
}
}
}
to_fight(){
console.log("[MissionMonComp]:to_fight")
this.is_fight=true

View File

@@ -28,7 +28,7 @@ export class TooltipCom extends CCComp {
start() {
switch(this.stype){
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.getChildByName("loss_life").getChildByName("hp").getComponent(Label).string = this.value;
this.node.getChildByName("loss_life").active=true;
@@ -45,7 +45,7 @@ export class TooltipCom extends CCComp {
},0.5)
break
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.getChildByName("bloss").getChildByName("hp").getComponent(Label).string = this.value;
this.node.getChildByName("bloss").active=true;