注释 打印+怪物变强
This commit is contained in:
@@ -14,7 +14,7 @@ const { ccclass, property } = _decorator;
|
|||||||
@ccclass('Main')
|
@ccclass('Main')
|
||||||
export class Main extends Root {
|
export class Main extends Root {
|
||||||
start() {
|
start() {
|
||||||
|
PhysicsSystem2D.instance.debugDrawFlags = EPhysics2DDrawFlags.Aabb
|
||||||
}
|
}
|
||||||
protected async run() {
|
protected async run() {
|
||||||
smc.initialize = ecs.getEntity<Initialize>(Initialize);
|
smc.initialize = ecs.getEntity<Initialize>(Initialize);
|
||||||
|
|||||||
@@ -217,15 +217,15 @@ export const getSkills=(quality:number)=>{
|
|||||||
export const SkillSet = {
|
export const SkillSet = {
|
||||||
6001:{uuid:6001,name:"凛冬之触",for_hero:false,sp_name:"greenball",path:"3034",quality:Quality.WHITE, TType:TType.Frontline,maxC:1,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
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,
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ export class HeroViewComp extends CCComp {
|
|||||||
onLoad() {
|
onLoad() {
|
||||||
this.as = this.getComponent(HeroSpine);
|
this.as = this.getComponent(HeroSpine);
|
||||||
this.FIGHTCON=this.node.parent.getComponent(FightConComp);
|
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.ChangeATK_EQUIP_SPECIAL_ATTR,this.change_atk,this)
|
||||||
this.on(GameEvent.UpdateHP,this.update_hp,this)
|
this.on(GameEvent.UpdateHP,this.update_hp,this)
|
||||||
this.on(GameEvent.EXPUP,this.exp_up,this)
|
this.on(GameEvent.EXPUP,this.exp_up,this)
|
||||||
@@ -159,7 +159,7 @@ export class HeroViewComp extends CCComp {
|
|||||||
this.processDamageQueue();
|
this.processDamageQueue();
|
||||||
}
|
}
|
||||||
use_enhancement(e:GameEvent,data:any){
|
use_enhancement(e:GameEvent,data:any){
|
||||||
console.log("[HeroViewComp]:use_enhancement",data)
|
//console.log("[HeroViewComp]:use_enhancement",data)
|
||||||
if(this.is_master){
|
if(this.is_master){
|
||||||
switch(data.type){
|
switch(data.type){
|
||||||
case EnhancementType.ATTACK:
|
case EnhancementType.ATTACK:
|
||||||
@@ -230,7 +230,7 @@ export class HeroViewComp extends CCComp {
|
|||||||
// this.BUFFCOMP.tooltip(TooltipTypes.speedup,speed.toFixed(0));
|
// this.BUFFCOMP.tooltip(TooltipTypes.speedup,speed.toFixed(0));
|
||||||
}
|
}
|
||||||
add_ap(ap: number,is_num:boolean=true){
|
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){
|
if(is_num){
|
||||||
this.ap += Math.floor(ap);
|
this.ap += Math.floor(ap);
|
||||||
}else{
|
}else{
|
||||||
@@ -242,7 +242,7 @@ export class HeroViewComp extends CCComp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
de_ap(ap: number,is_num:boolean=true){
|
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){
|
if(is_num){
|
||||||
this.ap -= Math.floor(ap);
|
this.ap -= Math.floor(ap);
|
||||||
}else{
|
}else{
|
||||||
@@ -251,7 +251,7 @@ export class HeroViewComp extends CCComp {
|
|||||||
this.BUFFCOMP.vmdata_update()
|
this.BUFFCOMP.vmdata_update()
|
||||||
}
|
}
|
||||||
update_hp(e:GameEvent,data:any){
|
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){
|
if(this.is_master===data.is_master&&this.fac===FacSet.HERO){
|
||||||
this.buff_hp += data.hp
|
this.buff_hp += data.hp
|
||||||
if(data.hp > 0){
|
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处理
|
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.hp_max -= Math.floor(hp) ;
|
||||||
this.BUFFCOMP.vmdata_update(true)
|
this.BUFFCOMP.vmdata_update(true)
|
||||||
}
|
}
|
||||||
@@ -339,7 +339,7 @@ export class HeroViewComp extends CCComp {
|
|||||||
|
|
||||||
do_dead(){
|
do_dead(){
|
||||||
this.do_dead_trigger()
|
this.do_dead_trigger()
|
||||||
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)
|
let exp=getExpDrops(HeroInfo[this.hero_uuid].quality,this.lv)
|
||||||
@@ -353,7 +353,7 @@ export class HeroViewComp extends CCComp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(this.fac==FacSet.HERO){
|
if(this.fac==FacSet.HERO){
|
||||||
console.log("[HeroViewComp]:英雄死亡")
|
//console.log("[HeroViewComp]:英雄死亡")
|
||||||
oops.message.dispatchEvent(GameEvent.FightEnd,{victory:false})
|
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 n_deR=deR-DEBUFF_DOWN-buff_debuff_down // 触发概率
|
||||||
let r=RandomManager.instance.getRandomInt(0,100) // 随机数
|
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) {
|
if(r < n_deR) {
|
||||||
// this.BUFFCOMP.tooltip(TooltipTypes.uskill,"*抵抗*")
|
// this.BUFFCOMP.tooltip(TooltipTypes.uskill,"*抵抗*")
|
||||||
return
|
return
|
||||||
@@ -434,7 +434,7 @@ export class HeroViewComp extends CCComp {
|
|||||||
}
|
}
|
||||||
break
|
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){
|
add_buff(buff:number,count:number,type:number){
|
||||||
@@ -482,7 +482,7 @@ export class HeroViewComp extends CCComp {
|
|||||||
this.is_dead=true
|
this.is_dead=true
|
||||||
this.BUFFCOMP.dead()
|
this.BUFFCOMP.dead()
|
||||||
this.do_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.ent == null) return;
|
||||||
if(this.fac ==FacSet.HERO){
|
if(this.fac ==FacSet.HERO){
|
||||||
this.to_grave()
|
this.to_grave()
|
||||||
@@ -519,7 +519,7 @@ export class HeroViewComp extends CCComp {
|
|||||||
if(buff!==null) buff_def=buff.DEF
|
if(buff!==null) buff_def=buff.DEF
|
||||||
|
|
||||||
damage=remainingDamage*(100-(buff_def+def)+Burn)/100
|
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)
|
return Math.floor(damage)
|
||||||
}
|
}
|
||||||
count_debuff(){
|
count_debuff(){
|
||||||
@@ -559,11 +559,11 @@ export class HeroViewComp extends CCComp {
|
|||||||
if(crit > 0){
|
if(crit > 0){
|
||||||
let random = Math.random()*100
|
let random = Math.random()*100
|
||||||
if(random < crit) {
|
if(random < crit) {
|
||||||
console.log("[HeroViewComp]:crit",crit,random)
|
//console.log("[HeroViewComp]:crit",crit,random)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log("[HeroViewComp]:crit",crit)
|
//console.log("[HeroViewComp]:crit",crit)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
// dead(){
|
// dead(){
|
||||||
@@ -575,14 +575,14 @@ export class HeroViewComp extends CCComp {
|
|||||||
if(this.is_dead||this.fac==FacSet.MON||this.is_master) return
|
if(this.is_dead||this.fac==FacSet.MON||this.is_master) return
|
||||||
let count = 1
|
let count = 1
|
||||||
for(let i=0;i<count;i++){
|
for(let i=0;i<count;i++){
|
||||||
console.log("[HeroViewComp]:dead"+i+"次")
|
//console.log("[HeroViewComp]:dead"+i+"次")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
do_atked_trigger(){
|
do_atked_trigger(){
|
||||||
if(this.is_dead||this.fac==FacSet.MON) return
|
if(this.is_dead||this.fac==FacSet.MON) return
|
||||||
let count = 1
|
let count = 1
|
||||||
if(this.double_atked) {
|
if(this.double_atked) {
|
||||||
console.log("[HeroViewComp]:double_atked")
|
//console.log("[HeroViewComp]:double_atked")
|
||||||
count =2
|
count =2
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -611,7 +611,7 @@ export class HeroViewComp extends CCComp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
to_console(value:any,value2:any=null,value3:any=null){
|
to_console(value:any,value2:any=null,value3:any=null){
|
||||||
console.log("["+this.scale+this.hero_name+']'+value,value2,value3)
|
//console.log("["+this.scale+this.hero_name+']'+value,value2,value3)
|
||||||
}
|
}
|
||||||
|
|
||||||
reset() {
|
reset() {
|
||||||
@@ -641,13 +641,13 @@ export class HeroViewComp extends CCComp {
|
|||||||
|
|
||||||
exp_up(e:any,data:any){
|
exp_up(e:any,data:any){
|
||||||
if(this.fac==FacSet.MON) return
|
if(this.fac==FacSet.MON) return
|
||||||
console.log("[HeroViewComp]:经验提高",data.exp)
|
//console.log("[HeroViewComp]:经验提高",data.exp)
|
||||||
this.exp+=data.exp
|
this.exp+=data.exp
|
||||||
this.next_exp=getUpExp(this.lv)
|
this.next_exp=getUpExp(this.lv)
|
||||||
let diff=this.exp-this.next_exp
|
let diff=this.exp-this.next_exp
|
||||||
if(diff >= 0){
|
if(diff >= 0){
|
||||||
this.exp=diff
|
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)
|
oops.message.dispatchEvent(GameEvent.EnhancementSelect)
|
||||||
this.to_update()
|
this.to_update()
|
||||||
}
|
}
|
||||||
@@ -704,10 +704,10 @@ export class HeroViewComp extends CCComp {
|
|||||||
this.atked_count++;
|
this.atked_count++;
|
||||||
if (isCrit) {
|
if (isCrit) {
|
||||||
this.BUFFCOMP.tooltip(TooltipTypes.crit, damage.toFixed(0), damage);
|
this.BUFFCOMP.tooltip(TooltipTypes.crit, damage.toFixed(0), damage);
|
||||||
// console.log("暴击伤害:" + damage);
|
// //console.log("暴击伤害:" + damage);
|
||||||
} else {
|
} else {
|
||||||
this.BUFFCOMP.tooltip(TooltipTypes.life, damage.toFixed(0), damage);
|
this.BUFFCOMP.tooltip(TooltipTypes.life, damage.toFixed(0), damage);
|
||||||
// console.log("普通伤害:" + damage);
|
// //console.log("普通伤害:" + damage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -76,8 +76,8 @@ export class Monster extends ecs.Entity {
|
|||||||
// 怪物属性随等级增长 (根据Design.md中的公式)
|
// 怪物属性随等级增长 (根据Design.md中的公式)
|
||||||
// HP增长: Math.floor(baseHp * (1 + (level-1) * 0.3))
|
// HP增长: Math.floor(baseHp * (1 + (level-1) * 0.3))
|
||||||
// AP增长: Math.floor(baseAp * (1 + (level-1) * 0.25))
|
// AP增长: Math.floor(baseAp * (1 + (level-1) * 0.25))
|
||||||
const levelHp = Math.floor(baseHp * (1 + (lv - 1) * 0.3));
|
const levelHp = Math.floor(baseHp * (1 + (lv - 1) * 0.5));
|
||||||
const levelAp = Math.floor(baseAp * (1 + (lv - 1) * 0.25));
|
const levelAp = Math.floor(baseAp * (1 + (lv - 1) * 0.1));
|
||||||
|
|
||||||
hv.hp = hv.hp_max = levelHp;
|
hv.hp = hv.hp_max = levelHp;
|
||||||
hv.ap = levelAp;
|
hv.ap = levelAp;
|
||||||
|
|||||||
@@ -37,13 +37,13 @@ export class SkillConComp extends CCComp {
|
|||||||
onLoad(){
|
onLoad(){
|
||||||
this.HeroView=this.node.getComponent(HeroViewComp)
|
this.HeroView=this.node.getComponent(HeroViewComp)
|
||||||
this.FIGHTCON=this.node.parent.getComponent(FightConComp)
|
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)
|
this.on(GameEvent.CastHeroSkill,this.cast_master_skill,this)
|
||||||
oops.message.on(GameEvent.MaxSkill,this.use_max_skill,this)
|
oops.message.on(GameEvent.MaxSkill,this.use_max_skill,this)
|
||||||
|
|
||||||
}
|
}
|
||||||
start() {
|
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
|
this.HeroEntity=this.HeroView.ent
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ export class SkillConComp extends CCComp {
|
|||||||
this.HeroView.at = 0;
|
this.HeroView.at = 0;
|
||||||
}
|
}
|
||||||
if (this.aoe_queues.length > 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--) {
|
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){
|
cast_master_skill(e:string,uuid:any){
|
||||||
if(!this.HeroView) return
|
if(!this.HeroView) return
|
||||||
if(!this.HeroView.is_master) 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];
|
const config = SkillSet[uuid];
|
||||||
this.castSkill(config,false,this.FIGHTCON.hero_buff.SKILL_DMG)
|
this.castSkill(config,false,this.FIGHTCON.hero_buff.SKILL_DMG)
|
||||||
}
|
}
|
||||||
/** 施放技能 */
|
/** 施放技能 */
|
||||||
castSkill(config: typeof SkillSet[keyof typeof SkillSet],is_wfuny:boolean=false,dmg:number=0) {
|
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);
|
this.doSkill(config,is_wfuny,dmg);
|
||||||
|
|
||||||
@@ -109,7 +109,7 @@ export class SkillConComp extends CCComp {
|
|||||||
use_max_skill(e:GameEvent,data:any){
|
use_max_skill(e:GameEvent,data:any){
|
||||||
if(!this.HeroView) return
|
if(!this.HeroView) return
|
||||||
if(!this.HeroView.is_master) 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.skill_id_counter++;
|
||||||
this.aoe_queues.push({
|
this.aoe_queues.push({
|
||||||
id: this.skill_id_counter,
|
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)
|
target_pos= new Vec3(targets[0].get(HeroViewComp).node.position.x,0,0)
|
||||||
}
|
}
|
||||||
let start_pos=new Vec3(-280,50,0)
|
let start_pos=new Vec3(-280,50,0)
|
||||||
// console.log("[Skill]:node=>",start_pos)
|
// //console.log("[Skill]:node=>",start_pos)
|
||||||
skill.load(
|
skill.load(
|
||||||
start_pos,
|
start_pos,
|
||||||
this.node.parent,
|
this.node.parent,
|
||||||
@@ -284,7 +284,7 @@ export class SkillConComp extends CCComp {
|
|||||||
|
|
||||||
|
|
||||||
public clear_timer() {
|
public clear_timer() {
|
||||||
// console.log("clear_timer");
|
// //console.log("clear_timer");
|
||||||
Object.values(this._timers).forEach(clearTimeout);
|
Object.values(this._timers).forEach(clearTimeout);
|
||||||
}
|
}
|
||||||
get_cd(cd:number,view:HeroViewComp){
|
get_cd(cd:number,view:HeroViewComp){
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ export class MissionMonCompComp extends CCComp {
|
|||||||
buffData?: any[] // 使用BuffAttr格式的buff数据
|
buffData?: any[] // 使用BuffAttr格式的buff数据
|
||||||
}> = [];
|
}> = [];
|
||||||
private isSpawning: boolean = false;// 是否正在生成怪物
|
private isSpawning: boolean = false;// 是否正在生成怪物
|
||||||
private spawnInterval: number = 1; // 每个怪物生成间隔时间
|
private spawnInterval: number = 2; // 每个怪物生成间隔时间
|
||||||
private spawnTimer: number = 0; // 生成计时器
|
private spawnTimer: number = 0; // 生成计时器
|
||||||
private is_fight:boolean = false;
|
private is_fight:boolean = false;
|
||||||
|
|
||||||
|
|||||||
@@ -410,28 +410,65 @@ export class RogueConfig {
|
|||||||
const modifiedStats = { ...baseStats };
|
const modifiedStats = { ...baseStats };
|
||||||
const buffData = [];
|
const buffData = [];
|
||||||
|
|
||||||
|
// 怪物能力提升倍数(3倍强化)
|
||||||
|
const enhancementMultiplier = 3;
|
||||||
|
|
||||||
for (const affix of affixes) {
|
for (const affix of affixes) {
|
||||||
const config = MonsterAffixConfig[affix];
|
const config = MonsterAffixConfig[affix];
|
||||||
if (config) {
|
if (config) {
|
||||||
|
// 应用3倍强化到配置值
|
||||||
|
const enhancedValue = config.value * enhancementMultiplier;
|
||||||
|
|
||||||
buffData.push({
|
buffData.push({
|
||||||
buff_type: affix,
|
buff_type: affix,
|
||||||
value: config.value
|
value: enhancedValue // 使用强化后的值
|
||||||
});
|
});
|
||||||
|
|
||||||
// 预览属性变化(实际应用在Mon.ts中)
|
// 预览属性变化(实际应用在Mon.ts中)
|
||||||
switch (affix) {
|
switch (affix) {
|
||||||
case BuffAttr.ATK:
|
case BuffAttr.ATK:
|
||||||
// 攻击力提升幅度加大,每波提升额外增加10%
|
// 攻击力提升幅度加大,每波提升额外增加10%,再乘以3倍
|
||||||
modifiedStats.ap = Math.floor(modifiedStats.ap * (1 + config.value / 100 + baseStats.lv * 0.1));
|
modifiedStats.ap = Math.floor(modifiedStats.ap * (1 + enhancedValue / 100 + baseStats.lv * 0.1 * enhancementMultiplier));
|
||||||
break;
|
break;
|
||||||
case BuffAttr.HP:
|
case BuffAttr.HP:
|
||||||
// 生命值提升幅度加大,每波提升额外增加15%
|
// 生命值提升幅度加大,每波提升额外增加15%,再乘以3倍
|
||||||
modifiedStats.hp = Math.floor(modifiedStats.hp * (1 + config.value / 100 + baseStats.lv * 0.15));
|
modifiedStats.hp = Math.floor(modifiedStats.hp * (1 + enhancedValue / 100 + baseStats.lv * 0.15 * enhancementMultiplier));
|
||||||
break;
|
break;
|
||||||
case BuffAttr.ATK_CD:
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(`[RogueConfig]: 应用3倍强化词条 ${BuffAttr[affix]} - 原始值: ${config.value}% → 强化值: ${enhancedValue}%`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -446,7 +483,7 @@ export class RogueConfig {
|
|||||||
* 获取怪物等级
|
* 获取怪物等级
|
||||||
*/
|
*/
|
||||||
static getMonsterLevel(waveNumber: number): number {
|
static getMonsterLevel(waveNumber: number): number {
|
||||||
return Math.max(1, Math.floor(waveNumber / 5) + 1);
|
return Math.max(1, Math.floor(waveNumber / 1) + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ export class SkillCom extends CCComp {
|
|||||||
}
|
}
|
||||||
oops.message.on(GameEvent.MissionEnd, this.doDestroy, this);
|
oops.message.on(GameEvent.MissionEnd, this.doDestroy, this);
|
||||||
this.node.active = true;
|
this.node.active = true;
|
||||||
// console.log("[SkillCom]:caster",this.caster)
|
// //console.log("[SkillCom]:caster",this.caster)
|
||||||
|
|
||||||
|
|
||||||
let collider = this.getComponent(Collider2D);
|
let collider = this.getComponent(Collider2D);
|
||||||
@@ -88,7 +88,7 @@ export class SkillCom extends CCComp {
|
|||||||
collider.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this);
|
collider.on(Contact2DType.BEGIN_CONTACT, this.onBeginContact, this);
|
||||||
}
|
}
|
||||||
let bm=this.node.getComponent(BezierMove)
|
let bm=this.node.getComponent(BezierMove)
|
||||||
// console.log(this.group +"技能 collider ",collider);
|
// //console.log(this.group +"技能 collider ",collider);
|
||||||
switch(SkillSet[this.s_uuid].AType){
|
switch(SkillSet[this.s_uuid].AType){
|
||||||
case AType.parabolic:
|
case AType.parabolic:
|
||||||
this.node.angle +=10
|
this.node.angle +=10
|
||||||
@@ -124,24 +124,24 @@ export class SkillCom extends CCComp {
|
|||||||
this.node.setPosition(this.targetPos.x,this.targetPos.y,0)
|
this.node.setPosition(this.targetPos.x,this.targetPos.y,0)
|
||||||
if(this.node.getComponent(Animation)){
|
if(this.node.getComponent(Animation)){
|
||||||
let anim = 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);
|
anim.on(Animation.EventType.FINISHED, this.onAnimationFinished, this);
|
||||||
}
|
}
|
||||||
if(this.node.getChildByName('anm')){
|
if(this.node.getChildByName('anm')){
|
||||||
if(this.node.getChildByName('anm').getComponent('sp.Skeleton')){
|
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.spine.setCompleteListener((trackEntry) => {
|
||||||
this.onAnimationFinished()
|
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;
|
break;
|
||||||
case AType.fixedStart:
|
case AType.fixedStart: //都是buff
|
||||||
this.node.setPosition(this.startPos.x,this.startPos.y,0)
|
this.node.setPosition(this.startPos.x,this.startPos.y,0)
|
||||||
this.scheduleOnce(()=>{
|
this.scheduleOnce(()=>{
|
||||||
this.do_buff()
|
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)
|
},SkillSet[this.s_uuid].in-0.2)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -155,6 +155,7 @@ export class SkillCom extends CCComp {
|
|||||||
}
|
}
|
||||||
//范围伤害
|
//范围伤害
|
||||||
range_damage(){
|
range_damage(){
|
||||||
|
console.log("[SkillCom]:range_damage",this.s_uuid)
|
||||||
let enemys=ecs.query(ecs.allOf(MonModelComp))
|
let enemys=ecs.query(ecs.allOf(MonModelComp))
|
||||||
if(this.fac==FacSet.MON) enemys=ecs.query(ecs.allOf(HeroModelComp))
|
if(this.fac==FacSet.MON) enemys=ecs.query(ecs.allOf(HeroModelComp))
|
||||||
enemys.forEach(entity => {
|
enemys.forEach(entity => {
|
||||||
@@ -169,14 +170,14 @@ export class SkillCom extends CCComp {
|
|||||||
}
|
}
|
||||||
//单体伤害
|
//单体伤害
|
||||||
single_damage(target:HeroViewComp,is_range:boolean=false){
|
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(this.hit_count > 0&&!is_range) this.ap=this.ap*(50+this.puncture_damage)/100 // 穿刺后 伤害减半,过滤范围伤害
|
||||||
if(target == null) return;
|
if(target == null) return;
|
||||||
target.do_atked(this.ap,this.caster_crit,this.caster_crit_d,
|
target.do_atked(this.ap,this.caster_crit,this.caster_crit_d,
|
||||||
this.burn_count,this.burn_value,
|
this.burn_count,this.burn_value,
|
||||||
this.stun_time,this.stun_ratto,
|
this.stun_time,this.stun_ratto,
|
||||||
this.frost_time,this.frost_ratto) // ap 及暴击 属性已经在skill.ts 处理
|
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){
|
if(SkillSet[this.s_uuid].debuff>0){
|
||||||
let deUP =this.get_debuff() // 因为不是每个技能都需要,debuff的增益在这里处理, ap 及暴击 属性已经在skill.ts 处理
|
let deUP =this.get_debuff() // 因为不是每个技能都需要,debuff的增益在这里处理, ap 及暴击 属性已经在skill.ts 处理
|
||||||
let debuff=SkillSet[this.s_uuid]
|
let debuff=SkillSet[this.s_uuid]
|
||||||
@@ -184,7 +185,7 @@ export class SkillCom extends CCComp {
|
|||||||
let deR=debuff.deR+deUP.deR
|
let deR=debuff.deR+deUP.deR
|
||||||
dev=Math.round(dev*100)/100
|
dev=Math.round(dev*100)/100
|
||||||
let deC=debuff.deC+deUP.deC //dec只作为次数叠加
|
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)
|
target.add_debuff(debuff.debuff,dev,deC,deR)
|
||||||
}
|
}
|
||||||
this.hit_count++
|
this.hit_count++
|
||||||
@@ -192,11 +193,11 @@ export class SkillCom extends CCComp {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onBeginContact (seCol: Collider2D, oCol: Collider2D) {
|
onBeginContact (seCol: Collider2D, oCol: Collider2D) {
|
||||||
// console.log(this.scale+"碰撞开始 ",seCol,oCol);
|
// //console.log(this.scale+"碰撞开始 ",seCol,oCol);
|
||||||
let target = oCol.getComponent(HeroViewComp)
|
let target = oCol.getComponent(HeroViewComp)
|
||||||
if(oCol.group!=this.group){
|
if(oCol.group!=this.group){
|
||||||
if(target == null) return;
|
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.single_damage(target)
|
||||||
// this.ent.destroy()
|
// this.ent.destroy()
|
||||||
}
|
}
|
||||||
@@ -243,7 +244,7 @@ export class SkillCom extends CCComp {
|
|||||||
.start();
|
.start();
|
||||||
}
|
}
|
||||||
private do_buff(){
|
private do_buff(){
|
||||||
console.log("[SkillCom]:do_buff")
|
//console.log("[SkillCom]:do_buff")
|
||||||
let teams=ecs.query(ecs.allOf(HeroModelComp))
|
let teams=ecs.query(ecs.allOf(HeroModelComp))
|
||||||
if(this.fac==FacSet.MON) teams=ecs.query(ecs.allOf(MonModelComp))
|
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) {
|
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) {
|
update(deltaTime: number) {
|
||||||
@@ -291,7 +277,7 @@ export class SkillCom extends CCComp {
|
|||||||
if(config.EType==EType.timeEnd){
|
if(config.EType==EType.timeEnd){
|
||||||
this.run_time+=deltaTime
|
this.run_time+=deltaTime
|
||||||
if(this.run_time>config.in){
|
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
|
this.is_destroy=true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -319,11 +305,11 @@ export class SkillCom extends CCComp {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
doDestroy(){
|
doDestroy(){
|
||||||
// console.log("[SkillCom]:doDestroy")
|
// //console.log("[SkillCom]:doDestroy")
|
||||||
this.is_destroy=true
|
this.is_destroy=true
|
||||||
}
|
}
|
||||||
to_console(value:any,value2:any=null,value3:any=null){
|
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) 删除组件是触发组件处理自定义释放逻辑 */
|
/** 视图对象通过 ecs.Entity.remove(ModuleViewComp) 删除组件是触发组件处理自定义释放逻辑 */
|
||||||
|
|||||||
Reference in New Issue
Block a user