Compare commits
2 Commits
76772a1102
...
062ce6eb5c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
062ce6eb5c | ||
|
|
bca97070d4 |
@@ -7,11 +7,11 @@
|
|||||||
"embeddedPlayerGroups": []
|
"embeddedPlayerGroups": []
|
||||||
},
|
},
|
||||||
"_native": "",
|
"_native": "",
|
||||||
"sample": 30,
|
"sample": 15,
|
||||||
"speed": 1,
|
"speed": 1,
|
||||||
"wrapMode": 1,
|
"wrapMode": 1,
|
||||||
"enableTrsBlending": false,
|
"enableTrsBlending": false,
|
||||||
"_duration": 0.26666666666666666,
|
"_duration": 0.5333333333333333,
|
||||||
"_hash": 500763545,
|
"_hash": 500763545,
|
||||||
"_tracks": [
|
"_tracks": [
|
||||||
{
|
{
|
||||||
@@ -69,13 +69,13 @@
|
|||||||
"__type__": "cc.ObjectCurve",
|
"__type__": "cc.ObjectCurve",
|
||||||
"_times": [
|
"_times": [
|
||||||
0,
|
0,
|
||||||
0.03333333333333333,
|
|
||||||
0.06666666666666667,
|
0.06666666666666667,
|
||||||
0.1,
|
|
||||||
0.13333333333333333,
|
0.13333333333333333,
|
||||||
0.16666666666666666,
|
|
||||||
0.2,
|
0.2,
|
||||||
0.23333333333333334
|
0.26666666666666666,
|
||||||
|
0.3333333333333333,
|
||||||
|
0.4,
|
||||||
|
0.4666666666666667
|
||||||
],
|
],
|
||||||
"_values": [
|
"_values": [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -267,7 +267,7 @@ export const SkillSet: Record<number, SkillConfig> = {
|
|||||||
},
|
},
|
||||||
//==========================buff 技能=====================
|
//==========================buff 技能=====================
|
||||||
6401:{
|
6401:{
|
||||||
uuid:6401,name:"单体攻击",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Team,readyAnm:"ap_up",endAnm:"",act:"atk",
|
uuid:6401,name:"单体攻击",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Team,readyAnm:"up_ap",endAnm:"",act:"atk",
|
||||||
DTType:DTType.single,kind:SkillKind.Support,ap:0,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0.2,EAnm:0,DAnm:"",IType:IType.support,
|
DTType:DTType.single,kind:SkillKind.Support,ap:0,hit_count:1,hitcd:0.2,speed:720,with:0,ready:0.2,EAnm:0,DAnm:"",IType:IType.support,
|
||||||
RType:RType.fixed,EType:EType.animationEnd,buffs:[{buff:Attrs.ap,value:5}],info:"随机1个友方+5攻击",
|
RType:RType.fixed,EType:EType.animationEnd,buffs:[{buff:Attrs.ap,value:5}],info:"随机1个友方+5攻击",
|
||||||
},
|
},
|
||||||
@@ -282,7 +282,7 @@ export const SkillSet: Record<number, SkillConfig> = {
|
|||||||
RType:RType.fixed,EType:EType.animationEnd,buffs:[{buff:Attrs.ap,value:5},{buff:Attrs.hp_max,value:20}],info:"随机1个友方+2攻击,+10最大生命值",
|
RType:RType.fixed,EType:EType.animationEnd,buffs:[{buff:Attrs.ap,value:5},{buff:Attrs.hp_max,value:20}],info:"随机1个友方+2攻击,+10最大生命值",
|
||||||
},
|
},
|
||||||
6404:{
|
6404:{
|
||||||
uuid:6404,name:"群体攻击",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Team,readyAnm:"ap_up",endAnm:"",act:"atk",
|
uuid:6404,name:"群体攻击",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Team,readyAnm:"up_ap",endAnm:"",act:"atk",
|
||||||
DTType:DTType.single,kind:SkillKind.Support,ap:0,hit_count:3,hitcd:0.2,speed:720,with:0,ready:0.2,EAnm:0,DAnm:"",IType:IType.support,
|
DTType:DTType.single,kind:SkillKind.Support,ap:0,hit_count:3,hitcd:0.2,speed:720,with:0,ready:0.2,EAnm:0,DAnm:"",IType:IType.support,
|
||||||
RType:RType.fixed,EType:EType.animationEnd,buffs:[{buff:Attrs.ap,value:2}],info:"随机3个友方+2攻击",
|
RType:RType.fixed,EType:EType.animationEnd,buffs:[{buff:Attrs.ap,value:2}],info:"随机3个友方+2攻击",
|
||||||
},
|
},
|
||||||
@@ -292,12 +292,12 @@ export const SkillSet: Record<number, SkillConfig> = {
|
|||||||
RType:RType.fixed,EType:EType.animationEnd,buffs:[{buff:Attrs.hp_max,value:10}],info:"随机3个友方+10最大生命值",
|
RType:RType.fixed,EType:EType.animationEnd,buffs:[{buff:Attrs.hp_max,value:10}],info:"随机3个友方+10最大生命值",
|
||||||
},
|
},
|
||||||
6406:{
|
6406:{
|
||||||
uuid:6406,name:"群体全能",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Team,readyAnm:"ap_up",endAnm:"",act:"atk",
|
uuid:6406,name:"群体全能",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Team,readyAnm:"up_ap",endAnm:"",act:"atk",
|
||||||
DTType:DTType.single,kind:SkillKind.Support,ap:0,hit_count:3,hitcd:0.2,speed:720,with:0,ready:0.2,EAnm:0,DAnm:"",IType:IType.support,
|
DTType:DTType.single,kind:SkillKind.Support,ap:0,hit_count:3,hitcd:0.2,speed:720,with:0,ready:0.2,EAnm:0,DAnm:"",IType:IType.support,
|
||||||
RType:RType.fixed,EType:EType.animationEnd,buffs:[{buff:Attrs.ap,value:2},{buff:Attrs.hp_max,value:10}],info:"随机3个友方+2攻击,+10最大生命值",
|
RType:RType.fixed,EType:EType.animationEnd,buffs:[{buff:Attrs.ap,value:2},{buff:Attrs.hp_max,value:10}],info:"随机3个友方+2攻击,+10最大生命值",
|
||||||
},
|
},
|
||||||
6501:{
|
6501:{
|
||||||
uuid:6501,name:"复活",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"ap_up",endAnm:"",act:"atk",
|
uuid:6501,name:"复活",sp_name:"buff_wind",icon:"1255",TGroup:TGroup.Self,readyAnm:"up_ap",endAnm:"",act:"atk",
|
||||||
DTType:DTType.single,kind:SkillKind.Support,ap:50,hit_count:3,hitcd:0.2,speed:720,with:0,ready:0.2,EAnm:0,DAnm:"",IType:IType.support,
|
DTType:DTType.single,kind:SkillKind.Support,ap:50,hit_count:3,hitcd:0.2,speed:720,with:0,ready:0.2,EAnm:0,DAnm:"",IType:IType.support,
|
||||||
RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"立即复活,获得50%生命",
|
RType:RType.fixed,EType:EType.animationEnd,buffs:[],info:"立即复活,获得50%生命",
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -70,7 +70,7 @@ export interface heroInfo {
|
|||||||
field?:number[]; // 驻场技能uuid列表,英雄在场时对全局生效
|
field?:number[]; // 驻场技能uuid列表,英雄在场时对全局生效
|
||||||
atking?:{s_uuid:number, t_num:number}[]; // 普通攻击后触发的技能配置,s_uuid: 技能id, t_num: 触发所需的普攻次数
|
atking?:{s_uuid:number, t_num:number}[]; // 普通攻击后触发的技能配置,s_uuid: 技能id, t_num: 触发所需的普攻次数
|
||||||
atked?:{s_uuid:number, t_num:number}[]; // 受击后触发的技能配置,s_uuid: 技能id, t_num: 触发所需的受击次数
|
atked?:{s_uuid:number, t_num:number}[]; // 受击后触发的技能配置,s_uuid: 技能id, t_num: 触发所需的受击次数
|
||||||
revive?:{s_uuid:number,r_num:number,upr:number}[]
|
revive?:{s_uuid:number,r_num:number,upr:number};
|
||||||
// dis: number; // 攻击距离(像素)
|
// dis: number; // 攻击距离(像素)
|
||||||
speed: number; // 移动速度(像素/秒)
|
speed: number; // 移动速度(像素/秒)
|
||||||
skills: Record<number, HSkillInfo> ; // 携带技能ID列表
|
skills: Record<number, HSkillInfo> ; // 携带技能ID列表
|
||||||
@@ -115,7 +115,7 @@ export const HeroInfo: Record<number, heroInfo> = {
|
|||||||
|
|
||||||
|
|
||||||
// ========== 法师英雄 ==========
|
// ========== 法师英雄 ==========
|
||||||
5101:{uuid:5101,name:"奥术法师",path:"hm2", fac:FacSet.HERO,cards_lv:1,lv:1,type:HType.Long,hp:50,ap:60,speed:800,revive:[{s_uuid:6501,r_num:1,upr:0.5}],
|
5101:{uuid:5101,name:"奥术法师",path:"hm2", fac:FacSet.HERO,cards_lv:1,lv:1,type:HType.Long,hp:50,ap:60,speed:800,revive:{s_uuid:6501,r_num:1,upr:0.5},
|
||||||
skills:{6201:{uuid:6007,lv:1,cd:1,ccd:0}},info:"冰球,冰锥 远法dps"},
|
skills:{6201:{uuid:6007,lv:1,cd:1,ccd:0}},info:"冰球,冰锥 远法dps"},
|
||||||
5102:{uuid:5102,name:"火焰法师",path:"hm1", fac:FacSet.HERO,cards_lv:2,lv:1,type:HType.Long,hp:30,ap:120,speed:800,
|
5102:{uuid:5102,name:"火焰法师",path:"hm1", fac:FacSet.HERO,cards_lv:2,lv:1,type:HType.Long,hp:30,ap:120,speed:800,
|
||||||
skills:{6203:{uuid:6002,lv:1,cd:1,ccd:0}},info:"火击,火球 远法dps"},
|
skills:{6203:{uuid:6002,lv:1,cd:1,ccd:0}},info:"火击,火球 远法dps"},
|
||||||
|
|||||||
@@ -194,15 +194,16 @@ export class HeroAtkSystem extends ecs.ComblockSystem implements ecs.ISystemUpd
|
|||||||
let canRevive = false;
|
let canRevive = false;
|
||||||
let maxReviveCount = 0;
|
let maxReviveCount = 0;
|
||||||
let reviveHpPercent = 50; // 默认恢复50%
|
let reviveHpPercent = 50; // 默认恢复50%
|
||||||
if (TAttrsComp.revive && TAttrsComp.revive.length > 0) {
|
let reviveSkillConf: any = null; // 提取出来的复活技能配置
|
||||||
const reviveConf = TAttrsComp.revive[0];
|
if (TAttrsComp.revive) {
|
||||||
|
const reviveConf = TAttrsComp.revive;
|
||||||
maxReviveCount = reviveConf.r_num + Math.floor((TAttrsComp.lv - 1) * reviveConf.upr);
|
maxReviveCount = reviveConf.r_num + Math.floor((TAttrsComp.lv - 1) * reviveConf.upr);
|
||||||
if (TAttrsComp.revived_count < maxReviveCount) {
|
if (TAttrsComp.revived_count < maxReviveCount) {
|
||||||
canRevive = true;
|
canRevive = true;
|
||||||
// 从配置表中读取对应的复活技能配置,ap 字段代表恢复生命值的百分比
|
// 从配置表中读取对应的复活技能配置,ap 字段代表恢复生命值的百分比
|
||||||
const skillConf = SkillSet[reviveConf.s_uuid];
|
reviveSkillConf = SkillSet[reviveConf.s_uuid];
|
||||||
if (skillConf && skillConf.ap) {
|
if (reviveSkillConf && reviveSkillConf.ap) {
|
||||||
reviveHpPercent = skillConf.ap;
|
reviveHpPercent = reviveSkillConf.ap;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -215,9 +216,17 @@ export class HeroAtkSystem extends ecs.ComblockSystem implements ecs.ISystemUpd
|
|||||||
TAttrsComp.dirty_hp = true;
|
TAttrsComp.dirty_hp = true;
|
||||||
|
|
||||||
// 触发复活动画
|
// 触发复活动画
|
||||||
if (targetView) {
|
if (targetView && reviveSkillConf) {
|
||||||
targetView.playReady(skillConf.readyAnm);
|
targetView.playReady(reviveSkillConf.readyAnm);
|
||||||
targetView.alive()
|
targetView.skill_name('', reviveSkillConf.uuid);
|
||||||
|
// 延迟 0.5 秒后恢复状态,让特效有时间播放,同时也能体现“正在复活”的过程
|
||||||
|
targetView.scheduleOnce(() => {
|
||||||
|
if (targetView.node && targetView.node.isValid) {
|
||||||
|
targetView.alive();
|
||||||
|
}
|
||||||
|
}, 0.5);
|
||||||
|
} else if (targetView) {
|
||||||
|
targetView.alive();
|
||||||
}
|
}
|
||||||
mLogger.log(this.debugMode, 'HeroAtkSystem', ` Hero waiting to revive! Lives revived: ${TAttrsComp.revived_count}/${maxReviveCount}, Hp restored: ${reviveHpPercent}%`);
|
mLogger.log(this.debugMode, 'HeroAtkSystem', ` Hero waiting to revive! Lives revived: ${TAttrsComp.revived_count}/${maxReviveCount}, Hp restored: ${reviveHpPercent}%`);
|
||||||
return reDate;
|
return reDate;
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ export class HeroAttrsComp extends ecs.Comp {
|
|||||||
fend?: number[];
|
fend?: number[];
|
||||||
atking?: {s_uuid: number, t_num: number}[];
|
atking?: {s_uuid: number, t_num: number}[];
|
||||||
atked?: {s_uuid: number, t_num: number}[];
|
atked?: {s_uuid: number, t_num: number}[];
|
||||||
revive?: {s_uuid: number, r_num: number, upr: number}[];
|
revive?: {s_uuid: number, r_num: number, upr: number};
|
||||||
|
|
||||||
// ==================== 特殊属性 ====================
|
// ==================== 特殊属性 ====================
|
||||||
critical: number = 0; // 暴击率
|
critical: number = 0; // 暴击率
|
||||||
|
|||||||
Reference in New Issue
Block a user