From 9fd8fa02af98945d1083f514b4669aaafc3ceded Mon Sep 17 00:00:00 2001 From: panfudan Date: Mon, 21 Jul 2025 08:07:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E9=87=8A=20=E6=89=93=E5=8D=B0+?= =?UTF-8?q?=E6=80=AA=E7=89=A9=E5=8F=98=E5=BC=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/script/Main.ts | 2 +- assets/script/game/common/config/SkillSet.ts | 24 ++++----- assets/script/game/hero/HeroViewComp.ts | 42 ++++++++-------- assets/script/game/hero/Mon.ts | 4 +- assets/script/game/hero/SkillConComp.ts | 16 +++--- assets/script/game/map/MissionMonComp.ts | 2 +- assets/script/game/map/RogueConfig.ts | 51 +++++++++++++++++--- assets/script/game/skills/SkillCom.ts | 48 +++++++----------- 8 files changed, 106 insertions(+), 83 deletions(-) diff --git a/assets/script/Main.ts b/assets/script/Main.ts index 74ac8525..322260f7 100644 --- a/assets/script/Main.ts +++ b/assets/script/Main.ts @@ -14,7 +14,7 @@ const { ccclass, property } = _decorator; @ccclass('Main') export class Main extends Root { start() { - + PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb } protected async run() { smc.initialize = ecs.getEntity(Initialize); diff --git a/assets/script/game/common/config/SkillSet.ts b/assets/script/game/common/config/SkillSet.ts index e3ad6eb1..0b09a7a6 100644 --- a/assets/script/game/common/config/SkillSet.ts +++ b/assets/script/game/common/config/SkillSet.ts @@ -217,15 +217,15 @@ export const getSkills=(quality:number)=>{ export const SkillSet = { 6001:{uuid:6001,name:"凛冬之触",for_hero:false,sp_name:"greenball",path:"3034",quality:Quality.WHITE, TType:TType.Frontline,maxC:1, TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:1,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:0, - debuff:0,deV:0,deC:0,deR:100,in:0.8,ap:100,cd:5,hit:1,hited:0.3,shield:0,heal:0,speed:720,hero:0,cost:10,info:"向最前方敌人释放寒冰弹,造成100%攻击的伤害"}, + debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:1,hited:3,shield:0,heal:0,speed:720,hero:0,cost:10,info:"向最前方敌人释放寒冰弹,造成100%攻击的伤害"}, 6002:{uuid:6002,name:"穿心箭矢",for_hero:false,sp_name:"arrow",path:"3037",quality:Quality.WHITE, TType:TType.Frontline,maxC:1, TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:1,AType:AType.parabolic,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:0, - debuff:0,deV:0,deC:0,deR:100,in:0.8,ap:100,cd:5,hit:1,hited:0.3,shield:0,heal:0,speed:720,hero:0,cost:10,info:"向最前方敌人释放箭矢,造成100%攻击的伤害"}, + debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:1,hited:3,shield:0,heal:0,speed:720,hero:0,cost:10,info:"向最前方敌人释放箭矢,造成100%攻击的伤害"}, 6003:{uuid:6003,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:2,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:0.3,shield:2,heal:0,speed:720,hero:0,cost:10,info:"为最前排队友召唤一个可以抵御2次攻击的圣盾(最高叠加到6次)"}, + debuff:0,deV:0,deC:0,deR:100,in:1,ap:0,cd:10,hit:1,hited:3,shield:2,heal:0,speed:720,hero:0,cost:10,info:"为最前排队友召唤一个可以抵御2次攻击的圣盾(最高叠加到6次)"}, 6004:{uuid:6004,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:2,AType:AType.StartEnd,RType:RType.fixed,EType:EType.timeEnd,fname:"max",flash:false,with:0, @@ -233,29 +233,29 @@ export const SkillSet = { 6005:{uuid:6005,name:"基础打击",for_hero:false,sp_name:"base1",path:"3036",quality:Quality.WHITE, TType:TType.Frontline,maxC:1, TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:1,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:0, - debuff:0,deV:0,deC:0,deR:100,in:0.8,ap:100,cd:5,hit:1,hited:0.3,shield:0,heal:0,speed:720,hero:0,cost:10,info:"向最前方敌人扔出铁斧,造成100%攻击的伤害"}, + debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:1,hited:3,shield:0,heal:0,speed:720,hero:0,cost:10,info:"向最前方敌人扔出铁斧,造成100%攻击的伤害"}, 6006:{uuid:6006,name:"基础打击",for_hero:false,sp_name:"base2",path:"3036",quality:Quality.WHITE, TType:TType.Frontline,maxC:1, TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:1,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:0, - debuff:0,deV:0,deC:0,deR:100,in:0.8,ap:100,cd:5,hit:1,hited:0.3,shield:0,heal:0,speed:720,hero:0,cost:10,info:"向最前方敌人扔出铁斧,造成100%攻击的伤害"}, + debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:1,hited:3,shield:0,heal:0,speed:720,hero:0,cost:10,info:"向最前方敌人扔出铁斧,造成100%攻击的伤害"}, 6007:{uuid:6007,name:"基础打击",for_hero:false,sp_name:"base3",path:"3036",quality:Quality.WHITE, TType:TType.Frontline,maxC:1, TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:1,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:0, - debuff:0,deV:0,deC:0,deR:100,in:0.8,ap:100,cd:5,hit:1,hited:0.3,shield:0,heal:0,speed:720,hero:0,cost:10,info:"向最前方敌人扔出铁斧,造成100%攻击的伤害"}, + debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:1,hited:3,shield:0,heal:0,speed:720,hero:0,cost:10,info:"向最前方敌人扔出铁斧,造成100%攻击的伤害"}, 6008:{uuid:6008,name:"基础打击",for_hero:false,sp_name:"base4",path:"3036",quality:Quality.WHITE, TType:TType.Frontline,maxC:1, TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:1,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:90, - debuff:0,deV:0,deC:0,deR:100,in:0.8,ap:100,cd:5,hit:1,hited:0.3,shield:0,heal:0,speed:720,hero:0,cost:10,info:"向最前方敌人扔出铁斧,造成100%攻击的伤害"}, + debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:1,hited:3,shield:0,heal:0,speed:720,hero:0,cost:10,info:"向最前方敌人扔出铁斧,造成100%攻击的伤害"}, 6009:{uuid:6009,name:"铁斧打击",for_hero:false,sp_name:"base_ft",path:"3036",quality:Quality.WHITE, TType:TType.Frontline,maxC:1, TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:1,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:0, - debuff:0,deV:0,deC:0,deR:100,in:0.8,ap:100,cd:5,hit:1,hited:0.3,shield:0,heal:0,speed:720,hero:0,cost:10,info:"向最前方敌人扔出铁斧,造成100%攻击的伤害"}, + debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:1,hited:3,shield:0,heal:0,speed:720,hero:0,cost:10,info:"向最前方敌人扔出铁斧,造成100%攻击的伤害"}, 6010:{uuid:6010,name:"木棍打击",for_hero:false,sp_name:"base_mg",path:"3036",quality:Quality.WHITE, TType:TType.Frontline,maxC:1, TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:1,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:0, - debuff:0,deV:0,deC:0,deR:100,in:0.8,ap:100,cd:5,hit:1,hited:0.3,shield:0,heal:0,speed:720,hero:0,cost:10,info:"向最前方敌人扔出木棍,造成100%攻击的伤害"}, + debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:1,hited:3,shield:0,heal:0,speed:720,hero:0,cost:10,info:"向最前方敌人扔出木棍,造成100%攻击的伤害"}, 6011:{uuid:6011,name:"飞刀打击",for_hero:false,sp_name:"mon_xd",path:"3036",quality:Quality.WHITE, TType:TType.Frontline,maxC:1, TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:1,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:0, - debuff:0,deV:0,deC:0,deR:100,in:0.8,ap:100,cd:5,hit:1,hited:0.3,shield:0,heal:0,speed:720,hero:0,cost:10,info:"向最前方敌人扔出飞刀,造成100%攻击的伤害"}, + debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:1,hited:3,shield:0,heal:0,speed:720,hero:0,cost:10,info:"向最前方敌人扔出飞刀,造成100%攻击的伤害"}, 6012:{uuid:6012,name:"石斧打击",for_hero:false,sp_name:"base_sf",path:"3036",quality:Quality.WHITE, TType:TType.Frontline,maxC:1, TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:1,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:0, - debuff:0,deV:0,deC:0,deR:100,in:0.8,ap:100,cd:5,hit:1,hited:0.3,shield:0,heal:0,speed:720,hero:0,cost:10,info:"向最前方敌人扔出石斧,造成100%攻击的伤害"}, + debuff:0,deV:0,deC:0,deR:100,in:8,ap:100,cd:5,hit:1,hited:3,shield:0,heal:0,speed:720,hero:0,cost:10,info:"向最前方敌人扔出石斧,造成100%攻击的伤害"}, 6020:{uuid:6020,name:"冰暴",for_hero:true,sp_name:"bingyu",path:"3135",quality:Quality.BLUE, TType:TType.Frontline,maxC:1, @@ -276,7 +276,7 @@ export const SkillSet = { 6024:{uuid:6024,name:"寒冰箭",for_hero:true, sp_name:"arrow_blue",path:"3060",quality:Quality.GREEN, TType:TType.Frontline,maxC:1, TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:2,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:90, - debuff:DebuffAttr.FROST,deV:1,deC:0,deR:100,in:1,ap:100,cd:5,hit:1,hited:0.3,shield:0,heal:0,speed:720,hero:0,cost:10,info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,20%几率冰冻敌人"}, + debuff:DebuffAttr.FROST,deV:1,deC:0,deR:100,in:1,ap:100,cd:1,hit:1,hited:0.3,shield:0,heal:0,speed:720,hero:0,cost:10,info:"召唤大火球攻击前方所有敌人,造成200%攻击的伤害,20%几率冰冻敌人"}, 6025:{uuid:6025,name:"烈焰射击",for_hero:false,sp_name:"arrow_yellow",path:"3014",quality:Quality.GREEN, TType:TType.Frontline,maxC:1, TGroup:TGroup.Enemy,SType:SType.damage,act:"atk",DTType:DTType.single,CdType:2,AType:AType.linear,RType:RType.linear,EType:EType.collision,fname:"max",flash:false,with:90, diff --git a/assets/script/game/hero/HeroViewComp.ts b/assets/script/game/hero/HeroViewComp.ts index c773a371..e930ccfe 100644 --- a/assets/script/game/hero/HeroViewComp.ts +++ b/assets/script/game/hero/HeroViewComp.ts @@ -116,7 +116,7 @@ export class HeroViewComp extends CCComp { onLoad() { this.as = this.getComponent(HeroSpine); this.FIGHTCON=this.node.parent.getComponent(FightConComp); - console.log("[HeroViewComp]:hero view comp ",this.FIGHTCON) + //console.log("[HeroViewComp]:hero view comp ",this.FIGHTCON) this.on(GameEvent.ChangeATK_EQUIP_SPECIAL_ATTR,this.change_atk,this) this.on(GameEvent.UpdateHP,this.update_hp,this) this.on(GameEvent.EXPUP,this.exp_up,this) @@ -159,7 +159,7 @@ export class HeroViewComp extends CCComp { this.processDamageQueue(); } use_enhancement(e:GameEvent,data:any){ - console.log("[HeroViewComp]:use_enhancement",data) + //console.log("[HeroViewComp]:use_enhancement",data) if(this.is_master){ switch(data.type){ case EnhancementType.ATTACK: @@ -230,7 +230,7 @@ export class HeroViewComp extends CCComp { // this.BUFFCOMP.tooltip(TooltipTypes.speedup,speed.toFixed(0)); } add_ap(ap: number,is_num:boolean=true){ - console.log("[HeroViewComp]:add_ap add:",ap,this.ap) + //console.log("[HeroViewComp]:add_ap add:",ap,this.ap) if(is_num){ this.ap += Math.floor(ap); }else{ @@ -242,7 +242,7 @@ export class HeroViewComp extends CCComp { } de_ap(ap: number,is_num:boolean=true){ - console.log("[HeroViewComp]:de_ap de:",ap,this.ap) + //console.log("[HeroViewComp]:de_ap de:",ap,this.ap) if(is_num){ this.ap -= Math.floor(ap); }else{ @@ -251,7 +251,7 @@ export class HeroViewComp extends CCComp { this.BUFFCOMP.vmdata_update() } update_hp(e:GameEvent,data:any){ - console.log("[HeroViewComp]:update_hp",data) + //console.log("[HeroViewComp]:update_hp",data) if(this.is_master===data.is_master&&this.fac===FacSet.HERO){ this.buff_hp += data.hp if(data.hp > 0){ @@ -271,7 +271,7 @@ export class HeroViewComp extends CCComp { } de_hp_max(hp: number=0,is_num:boolean=true){ //最大值 只存在数值添加, 比例通过buff_hp处理 - console.log("[HeroViewComp]:de_hp_max de:",hp,this.hp_max) + //console.log("[HeroViewComp]:de_hp_max de:",hp,this.hp_max) this.hp_max -= Math.floor(hp) ; this.BUFFCOMP.vmdata_update(true) } @@ -339,7 +339,7 @@ export class HeroViewComp extends CCComp { do_dead(){ this.do_dead_trigger() - console.log("[HeroViewComp]:角色死亡",this.hero_uuid) + //console.log("[HeroViewComp]:角色死亡",this.hero_uuid) if(this.fac==FacSet.MON){ let exp=getExpDrops(HeroInfo[this.hero_uuid].quality,this.lv) @@ -353,7 +353,7 @@ export class HeroViewComp extends CCComp { } if(this.fac==FacSet.HERO){ - console.log("[HeroViewComp]:英雄死亡") + //console.log("[HeroViewComp]:英雄死亡") oops.message.dispatchEvent(GameEvent.FightEnd,{victory:false}) } @@ -384,7 +384,7 @@ export class HeroViewComp extends CCComp { } let n_deR=deR-DEBUFF_DOWN-buff_debuff_down // 触发概率 let r=RandomManager.instance.getRandomInt(0,100) // 随机数 - console.log("[HeroViewComp]:类型,值,次数,技能概率,实际概率,随机数",type,deV,deC,deR,n_deR,r) + //console.log("[HeroViewComp]:类型,值,次数,技能概率,实际概率,随机数",type,deV,deC,deR,n_deR,r) if(r < n_deR) { // this.BUFFCOMP.tooltip(TooltipTypes.uskill,"*抵抗*") return @@ -434,7 +434,7 @@ export class HeroViewComp extends CCComp { } break } - console.log("[HeroViewComp]:debuffs",type,deV,deC,deR,this.DEBUFF_BURNS) + //console.log("[HeroViewComp]:debuffs",type,deV,deC,deR,this.DEBUFF_BURNS) } add_buff(buff:number,count:number,type:number){ @@ -482,7 +482,7 @@ export class HeroViewComp extends CCComp { this.is_dead=true this.BUFFCOMP.dead() this.do_dead() - console.log("[HeroViewComp]:dead,fac => "+(this.fac==FacSet.HERO?"hero":"monster")) + //console.log("[HeroViewComp]:dead,fac => "+(this.fac==FacSet.HERO?"hero":"monster")) if(this.ent == null) return; if(this.fac ==FacSet.HERO){ this.to_grave() @@ -519,7 +519,7 @@ export class HeroViewComp extends CCComp { if(buff!==null) buff_def=buff.DEF damage=remainingDamage*(100-(buff_def+def)+Burn)/100 - console.log("[HeroViewComp]:最终伤害,敌人伤害值,免伤,防御,易伤",damage,remainingDamage,buff_def,def,Burn) + ////console.log("[HeroViewComp]:最终伤害,敌人伤害值,免伤,防御,易伤",damage,remainingDamage,buff_def,def,Burn) return Math.floor(damage) } count_debuff(){ @@ -559,11 +559,11 @@ export class HeroViewComp extends CCComp { if(crit > 0){ let random = Math.random()*100 if(random < crit) { - console.log("[HeroViewComp]:crit",crit,random) + //console.log("[HeroViewComp]:crit",crit,random) return true } } - console.log("[HeroViewComp]:crit",crit) + //console.log("[HeroViewComp]:crit",crit) return false } // dead(){ @@ -575,14 +575,14 @@ export class HeroViewComp extends CCComp { if(this.is_dead||this.fac==FacSet.MON||this.is_master) return let count = 1 for(let i=0;i= 0){ this.exp=diff - console.log("[HeroViewComp]:exp_up",this.exp,this.next_exp) + //console.log("[HeroViewComp]:exp_up",this.exp,this.next_exp) oops.message.dispatchEvent(GameEvent.EnhancementSelect) this.to_update() } @@ -704,10 +704,10 @@ export class HeroViewComp extends CCComp { this.atked_count++; if (isCrit) { this.BUFFCOMP.tooltip(TooltipTypes.crit, damage.toFixed(0), damage); - // console.log("暴击伤害:" + damage); + // //console.log("暴击伤害:" + damage); } else { this.BUFFCOMP.tooltip(TooltipTypes.life, damage.toFixed(0), damage); - // console.log("普通伤害:" + damage); + // //console.log("普通伤害:" + damage); } } } \ No newline at end of file diff --git a/assets/script/game/hero/Mon.ts b/assets/script/game/hero/Mon.ts index 57612d5f..37fd6663 100644 --- a/assets/script/game/hero/Mon.ts +++ b/assets/script/game/hero/Mon.ts @@ -76,8 +76,8 @@ export class Monster extends ecs.Entity { // 怪物属性随等级增长 (根据Design.md中的公式) // HP增长: Math.floor(baseHp * (1 + (level-1) * 0.3)) // AP增长: Math.floor(baseAp * (1 + (level-1) * 0.25)) - const levelHp = Math.floor(baseHp * (1 + (lv - 1) * 0.3)); - const levelAp = Math.floor(baseAp * (1 + (lv - 1) * 0.25)); + const levelHp = Math.floor(baseHp * (1 + (lv - 1) * 0.5)); + const levelAp = Math.floor(baseAp * (1 + (lv - 1) * 0.1)); hv.hp = hv.hp_max = levelHp; hv.ap = levelAp; diff --git a/assets/script/game/hero/SkillConComp.ts b/assets/script/game/hero/SkillConComp.ts index dc92ab5b..0a3e58f8 100644 --- a/assets/script/game/hero/SkillConComp.ts +++ b/assets/script/game/hero/SkillConComp.ts @@ -37,13 +37,13 @@ export class SkillConComp extends CCComp { onLoad(){ this.HeroView=this.node.getComponent(HeroViewComp) this.FIGHTCON=this.node.parent.getComponent(FightConComp) - // console.log(this.HeroView.uuid+"=>"+this.HeroView.hero_name+"=> SkillConComp onLoad") + // //console.log(this.HeroView.uuid+"=>"+this.HeroView.hero_name+"=> SkillConComp onLoad") this.on(GameEvent.CastHeroSkill,this.cast_master_skill,this) oops.message.on(GameEvent.MaxSkill,this.use_max_skill,this) } start() { - // console.log(this.HeroView.uuid+"=>"+this.HeroView.hero_name+"=> SkillConComp start") + // //console.log(this.HeroView.uuid+"=>"+this.HeroView.hero_name+"=> SkillConComp start") this.HeroEntity=this.HeroView.ent } @@ -61,7 +61,7 @@ export class SkillConComp extends CCComp { this.HeroView.at = 0; } if (this.aoe_queues.length > 0) { - console.log("[FightConComp]:aoe_queues:",this.aoe_queues) + //console.log("[FightConComp]:aoe_queues:",this.aoe_queues) // 遍历所有必杀技技能,更新它们的计时器 for (let i = this.aoe_queues.length - 1; i >= 0; i--) { @@ -93,13 +93,13 @@ export class SkillConComp extends CCComp { cast_master_skill(e:string,uuid:any){ if(!this.HeroView) return if(!this.HeroView.is_master) return - console.log("hart cast_skill",uuid ,e) + //console.log("hart cast_skill",uuid ,e) const config = SkillSet[uuid]; this.castSkill(config,false,this.FIGHTCON.hero_buff.SKILL_DMG) } /** 施放技能 */ castSkill(config: typeof SkillSet[keyof typeof SkillSet],is_wfuny:boolean=false,dmg:number=0) { - // console.log(view.uuid+"=>"+view.hero_name+"施放技能:"+config.uuid); + // //console.log(view.uuid+"=>"+view.hero_name+"施放技能:"+config.uuid); this.doSkill(config,is_wfuny,dmg); @@ -109,7 +109,7 @@ export class SkillConComp extends CCComp { use_max_skill(e:GameEvent,data:any){ if(!this.HeroView) return if(!this.HeroView.is_master) return - console.log("[SkillConComp]:use_max_skill:",data) + //console.log("[SkillConComp]:use_max_skill:",data) this.skill_id_counter++; this.aoe_queues.push({ id: this.skill_id_counter, @@ -258,7 +258,7 @@ export class SkillConComp extends CCComp { target_pos= new Vec3(targets[0].get(HeroViewComp).node.position.x,0,0) } let start_pos=new Vec3(-280,50,0) - // console.log("[Skill]:node=>",start_pos) + // //console.log("[Skill]:node=>",start_pos) skill.load( start_pos, this.node.parent, @@ -284,7 +284,7 @@ export class SkillConComp extends CCComp { public clear_timer() { - // console.log("clear_timer"); + // //console.log("clear_timer"); Object.values(this._timers).forEach(clearTimeout); } get_cd(cd:number,view:HeroViewComp){ diff --git a/assets/script/game/map/MissionMonComp.ts b/assets/script/game/map/MissionMonComp.ts index 59e3f32b..8126c586 100644 --- a/assets/script/game/map/MissionMonComp.ts +++ b/assets/script/game/map/MissionMonComp.ts @@ -29,7 +29,7 @@ export class MissionMonCompComp extends CCComp { buffData?: any[] // 使用BuffAttr格式的buff数据 }> = []; private isSpawning: boolean = false;// 是否正在生成怪物 - private spawnInterval: number = 1; // 每个怪物生成间隔时间 + private spawnInterval: number = 2; // 每个怪物生成间隔时间 private spawnTimer: number = 0; // 生成计时器 private is_fight:boolean = false; diff --git a/assets/script/game/map/RogueConfig.ts b/assets/script/game/map/RogueConfig.ts index bbb93238..2a06b24a 100644 --- a/assets/script/game/map/RogueConfig.ts +++ b/assets/script/game/map/RogueConfig.ts @@ -410,28 +410,65 @@ export class RogueConfig { const modifiedStats = { ...baseStats }; const buffData = []; + // 怪物能力提升倍数(3倍强化) + const enhancementMultiplier = 3; + for (const affix of affixes) { const config = MonsterAffixConfig[affix]; if (config) { + // 应用3倍强化到配置值 + const enhancedValue = config.value * enhancementMultiplier; + buffData.push({ buff_type: affix, - value: config.value + value: enhancedValue // 使用强化后的值 }); // 预览属性变化(实际应用在Mon.ts中) switch (affix) { case BuffAttr.ATK: - // 攻击力提升幅度加大,每波提升额外增加10% - modifiedStats.ap = Math.floor(modifiedStats.ap * (1 + config.value / 100 + baseStats.lv * 0.1)); + // 攻击力提升幅度加大,每波提升额外增加10%,再乘以3倍 + modifiedStats.ap = Math.floor(modifiedStats.ap * (1 + enhancedValue / 100 + baseStats.lv * 0.1 * enhancementMultiplier)); break; case BuffAttr.HP: - // 生命值提升幅度加大,每波提升额外增加15% - modifiedStats.hp = Math.floor(modifiedStats.hp * (1 + config.value / 100 + baseStats.lv * 0.15)); + // 生命值提升幅度加大,每波提升额外增加15%,再乘以3倍 + modifiedStats.hp = Math.floor(modifiedStats.hp * (1 + enhancedValue / 100 + baseStats.lv * 0.15 * enhancementMultiplier)); break; case BuffAttr.ATK_CD: - modifiedStats.cd = Math.max(0.1, modifiedStats.cd * (1 - config.value / 100)); + // 攻击速度提升也应用3倍效果 + modifiedStats.cd = Math.max(0.1, modifiedStats.cd * (1 - enhancedValue / 100)); + break; + case BuffAttr.DEF: + // 防御力提升3倍效果 + modifiedStats.def = (modifiedStats.def || 0) + enhancedValue; + break; + case BuffAttr.CRITICAL: + // 暴击率提升3倍效果 + modifiedStats.crit = (modifiedStats.crit || 0) + enhancedValue; + break; + case BuffAttr.CRITICAL_DMG: + // 暴击伤害提升3倍效果 + modifiedStats.crit_d = (modifiedStats.crit_d || 0) + enhancedValue; + break; + case BuffAttr.DODGE: + // 闪避率提升3倍效果 + modifiedStats.dod = (modifiedStats.dod || 0) + enhancedValue; + break; + case BuffAttr.BURN_COUNT: + // 燃烧次数提升3倍效果 + modifiedStats.burn_count = (modifiedStats.burn_count || 0) + enhancedValue; + break; + case BuffAttr.PUNCTURE: + // 穿刺数量提升3倍效果 + modifiedStats.puncture = (modifiedStats.puncture || 0) + enhancedValue; + break; + case BuffAttr.FROST_RATIO: + // 冰冻概率提升3倍效果 + modifiedStats.frost_ratto = (modifiedStats.frost_ratto || 0) + enhancedValue; break; } + + console.log(`[RogueConfig]: 应用3倍强化词条 ${BuffAttr[affix]} - 原始值: ${config.value}% → 强化值: ${enhancedValue}%`); } } @@ -446,7 +483,7 @@ export class RogueConfig { * 获取怪物等级 */ static getMonsterLevel(waveNumber: number): number { - return Math.max(1, Math.floor(waveNumber / 5) + 1); + return Math.max(1, Math.floor(waveNumber / 1) + 1); } } diff --git a/assets/script/game/skills/SkillCom.ts b/assets/script/game/skills/SkillCom.ts index e34c3ea2..439aefab 100644 --- a/assets/script/game/skills/SkillCom.ts +++ b/assets/script/game/skills/SkillCom.ts @@ -79,7 +79,7 @@ export class SkillCom extends CCComp { } oops.message.on(GameEvent.MissionEnd, this.doDestroy, this); this.node.active = true; - // console.log("[SkillCom]:caster",this.caster) + // //console.log("[SkillCom]:caster",this.caster) let collider = this.getComponent(Collider2D); @@ -88,7 +88,7 @@ export class SkillCom extends CCComp { collider.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this); } let bm=this.node.getComponent(BezierMove) - // console.log(this.group +"技能 collider ",collider); + // //console.log(this.group +"技能 collider ",collider); switch(SkillSet[this.s_uuid].AType){ case AType.parabolic: this.node.angle +=10 @@ -124,24 +124,24 @@ export class SkillCom extends CCComp { this.node.setPosition(this.targetPos.x,this.targetPos.y,0) if(this.node.getComponent(Animation)){ let anim = this.node.getComponent(Animation); - // console.log("[SkillCom]:has anim",anim) + // //console.log("[SkillCom]:has anim",anim) anim.on(Animation.EventType.FINISHED, this.onAnimationFinished, this); } if(this.node.getChildByName('anm')){ if(this.node.getChildByName('anm').getComponent('sp.Skeleton')){ - // console.log("[SkillCom]:has spine",this.spine) + // //console.log("[SkillCom]:has spine",this.spine) this.spine.setCompleteListener((trackEntry) => { this.onAnimationFinished() - // console.log("[SkillCom]:[track %s][animation %s] complete: %s", trackEntry.trackIndex); + // //console.log("[SkillCom]:[track %s][animation %s] complete: %s", trackEntry.trackIndex); }); } } break; - case AType.fixedStart: + case AType.fixedStart: //都是buff this.node.setPosition(this.startPos.x,this.startPos.y,0) this.scheduleOnce(()=>{ this.do_buff() - console.log("[SkillCom]:fixedStart",SkillSet[this.s_uuid].in-0.2) + //console.log("[SkillCom]:fixedStart",SkillSet[this.s_uuid].in-0.2) },SkillSet[this.s_uuid].in-0.2) break; } @@ -155,6 +155,7 @@ export class SkillCom extends CCComp { } //范围伤害 range_damage(){ + console.log("[SkillCom]:range_damage",this.s_uuid) let enemys=ecs.query(ecs.allOf(MonModelComp)) if(this.fac==FacSet.MON) enemys=ecs.query(ecs.allOf(HeroModelComp)) enemys.forEach(entity => { @@ -169,14 +170,14 @@ export class SkillCom extends CCComp { } //单体伤害 single_damage(target:HeroViewComp,is_range:boolean=false){ - // console.log("[SkillCom]:onBeginContact hit_count:",this.hit_count,SkillSet[this.s_uuid].hit) + // //console.log("[SkillCom]:onBeginContact hit_count:",this.hit_count,SkillSet[this.s_uuid].hit) // if(this.hit_count > 0&&!is_range) this.ap=this.ap*(50+this.puncture_damage)/100 // 穿刺后 伤害减半,过滤范围伤害 if(target == null) return; target.do_atked(this.ap,this.caster_crit,this.caster_crit_d, this.burn_count,this.burn_value, this.stun_time,this.stun_ratto, this.frost_time,this.frost_ratto) // ap 及暴击 属性已经在skill.ts 处理 - console.log("[SkillCom]:single_damage",this.ap,this.caster_crit,this.caster_crit_d,this.hit_count) + console.log("[SkillCom]:single_damage t:tp:rtp",this.node.position,this.targetPos,target.node.position) if(SkillSet[this.s_uuid].debuff>0){ let deUP =this.get_debuff() // 因为不是每个技能都需要,debuff的增益在这里处理, ap 及暴击 属性已经在skill.ts 处理 let debuff=SkillSet[this.s_uuid] @@ -184,7 +185,7 @@ export class SkillCom extends CCComp { let deR=debuff.deR+deUP.deR dev=Math.round(dev*100)/100 let deC=debuff.deC+deUP.deC //dec只作为次数叠加 - // console.log("[SkillCom]:debuff",SkillSet[this.s_uuid].name,debuff.debuff,deUP.deV,deUP.deC) + // //console.log("[SkillCom]:debuff",SkillSet[this.s_uuid].name,debuff.debuff,deUP.deV,deUP.deC) target.add_debuff(debuff.debuff,dev,deC,deR) } this.hit_count++ @@ -192,11 +193,11 @@ export class SkillCom extends CCComp { } onBeginContact (seCol: Collider2D, oCol: Collider2D) { - // console.log(this.scale+"碰撞开始 ",seCol,oCol); + // //console.log(this.scale+"碰撞开始 ",seCol,oCol); let target = oCol.getComponent(HeroViewComp) if(oCol.group!=this.group){ if(target == null) return; - console.log("[SkillCom]:onBeginContact targetPos||skillPos",target.node.position,this.node.position) + console.log("[SkillCom]:onBeginContact oCol||seCol",oCol.node.position,seCol.node.position) this.single_damage(target) // this.ent.destroy() } @@ -243,7 +244,7 @@ export class SkillCom extends CCComp { .start(); } private do_buff(){ - console.log("[SkillCom]:do_buff") + //console.log("[SkillCom]:do_buff") let teams=ecs.query(ecs.allOf(HeroModelComp)) if(this.fac==FacSet.MON) teams=ecs.query(ecs.allOf(MonModelComp)) if(SkillSet[this.s_uuid].TGroup==TGroup.Team||SkillSet[this.s_uuid].TGroup==TGroup.Self) { @@ -261,21 +262,6 @@ export class SkillCom extends CCComp { } } - private startLinearMove(dt: number) { - if (!this.speed || this.is_destroy) return; - if(this.s_uuid == 6005){ - // console.log("[SkillCom]:startLinearMove",this.node.position.x) - } - // 使用角度方向移动 - const newX = this.node.position.x + this.speed * dt*this.scale; - const newY = this.node.position.y; - this.node.setPosition(newX, this.node.position.y, this.node.position.z); - - // 检查是否超出边界 - if (newX < -400 || newX > 400) { - this.is_destroy = true; - } - } update(deltaTime: number) { @@ -291,7 +277,7 @@ export class SkillCom extends CCComp { if(config.EType==EType.timeEnd){ this.run_time+=deltaTime if(this.run_time>config.in){ - // console.log("[SkillCom]: timeEnd destroy",this.s_uuid,this.run_time) + // //console.log("[SkillCom]: timeEnd destroy",this.s_uuid,this.run_time) this.is_destroy=true } } @@ -319,11 +305,11 @@ export class SkillCom extends CCComp { } } doDestroy(){ - // console.log("[SkillCom]:doDestroy") + // //console.log("[SkillCom]:doDestroy") this.is_destroy=true } to_console(value:any,value2:any=null,value3:any=null){ - console.log("[SkillCom]:["+this.s_name+this.s_uuid+"]:",value,value2,value3) + //console.log("[SkillCom]:["+this.s_name+this.s_uuid+"]:",value,value2,value3) } /** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */