魔法盾改为伤害减免

This commit is contained in:
2025-01-09 16:45:45 +08:00
parent 2903e06ed4
commit 4145b04768
6 changed files with 30 additions and 20 deletions

View File

@@ -99,7 +99,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"y": -10,
"z": 0
},
"_lrot": {

View File

@@ -99,7 +99,7 @@
"_lpos": {
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"y": -10,
"z": 0
},
"_lrot": {

View File

@@ -76,7 +76,7 @@ export const SkillSet={
name: "火墙",sp_name:"fires",info:"释放有形剑气攻击前方直线300码的敌人"},
6014:{uuid: 6014,path: "6014",run:0,type:1, tg:3,with:false,debuff:1,depb:50,debtime:2,derate:1,in:1,count:1,apup:0,ap:2,hp:0,cd:1,shield:0,speed:450,sonsk:0,
name: "冰破",sp_name:"ice",info:"释放有形剑气攻击前方直线300码的敌人"},
name: "寒冰箭",sp_name:"ice",info:"释放有形剑气攻击前方直线300码的敌人"},
6015:{uuid: 6015,path: "6015",run:0,type:1, tg:3,with:false,debuff:3,depb:50,debtime:6,derate:1,in:1,count:1,apup:0,ap:2,hp:0,cd:1,shield:0,speed:450,sonsk:0,
name: "火焰射击",sp_name:"arrow_yellow",info:"释放有形剑气攻击前方直线300码的敌人"},
@@ -87,7 +87,7 @@ export const SkillSet={
6017:{uuid: 6017,path: "6017",run:0,type:1, tg:2,with:false,debuff:0,depb:50,debtime:2,derate:1,in:10,count:1,apup:0,ap:1,hp:3,cd:1,shield:0,speed:450, sonsk:0,
name: "治愈术",sp_name:"heath",info:"释放一个寒冰箭攻击敌人"},
6018:{uuid: 6018,path: "6018",run:0,type:1, tg:0,with:false,debuff:0,depb:50,debtime:2,derate:1,in:0.8,count:1,apup:0,ap:1,hp:0,cd:1,shield:1,speed:450, sonsk:0,
6018:{uuid: 6018,path: "6018",run:0,type:1, tg:0,with:false,debuff:0,depb:50,debtime:2,derate:1,in:0.8,count:1,apup:0,ap:1,hp:0,cd:1,shield:3,speed:450, sonsk:0,
name: "魔法盾",sp_name:"shield",info:"释放一个寒冰箭攻击敌人"},
6019:{uuid: 6019,path: "6019",run:0,type:1, tg:0,with:false,debuff:0,depb:50,debtime:2,derate:1,in:0.8,count:1,apup:0,ap:1,hp:0,cd:1,shield:0,speed:450, sonsk:0,
@@ -102,7 +102,7 @@ export const SkillSet={
6022:{uuid: 6022,path: "6022",run:0,type:1, tg:3,with:false,debuff:1,depb:50,debtime:2,derate:1,in:1,count:1,apup:0,ap:2,hp:0,cd:1,shield:0,speed:450,sonsk:0,
name: "冰刺",sp_name:"icez",info:"释放有形剑气攻击前方直线300码的敌人"},
6023:{uuid: 6023,path: "6023",run:0,type:1, tg:3,with:false,debuff:1,depb:50,debtime:2,derate:1,in:1,count:1,apup:0,ap:4,hp:0,cd:1,shield:0,speed:450,sonsk:0,
6023:{uuid: 6023,path: "6023",run:0,type:1, tg:3,with:false,debuff:8,depb:50,debtime:2,derate:1,in:1,count:1,apup:0,ap:4,hp:0,cd:1,shield:0,speed:450,sonsk:0,
name: "冰墙",sp_name:"icet",info:"释放有形剑气攻击前方直线300码的敌人"},
6024:{uuid: 6024,path: "6024",run:0,type:1, tg:3,with:true,debuff:8,depb:50,debtime:2,derate:1,in:2,count:1,apup:0,ap:2,hp:0,cd:0.5,shield:0,speed:100,sonsk:0,
@@ -110,6 +110,13 @@ export const SkillSet={
6025:{uuid: 6025,path: "6025",run:1,type:1, tg:3,with:false,debuff:8,depb:50,debtime:2,derate:1,in:3,count:1,apup:0,ap:5,hp:0,cd:1,shield:0,speed:500,sonsk:0,
name: "螺旋击",sp_name:"fireball",info:"释放烈火剑气攻击前方地方,对前方敌人造成3段伤害"},
6026:{uuid: 6026,path: "6026",run:0,type:1, tg:3,with:false,debuff:8,depb:50,debtime:2,derate:1,in:3,count:1,apup:0,ap:5,hp:0,cd:1,shield:0,speed:500,sonsk:0,
name: "潮汐",sp_name:"watert",info:"释放烈火剑气攻击前方地方,对前方敌人造成3段伤害"},
6027:{uuid: 6027,path: "6026",run:0,type:1, tg:3,with:false,debuff:8,depb:50,debtime:2,derate:1,in:3,count:1,apup:0,ap:5,hp:0,cd:1,shield:0,speed:500,sonsk:0,
name: "战斗冲击",sp_name:"zhanz",info:"释放烈火剑气攻击前方地方,对前方敌人造成3段伤害"},
}
export const MSklist = [6001,6002]

View File

@@ -97,14 +97,14 @@ export const HeroInfo = {
},
5006: {
uuid:5006,name: "鹰眼",path:"a3",quality:1,kind:1,type:1,hp:2000,hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:400,a_cd:1.5,
lvexp:100,slvexp:10,slv:0, speed: 50,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[6006,6006,6006,6006,6006,6006],sk2:[6018,6018,6018,6018,6018,6018],sk3:[6018,6018,6018,6018,6018,6018],pw:30,pwm:50,pws:10,apw:0,uapw:0,cpw:0,dpw:0,dopw:0,
lvexp:100,slvexp:10,slv:0, speed: 50,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[6006,6006,6006,6006,6006,6006],sk2:[6014,6014,6014,6014,6014,6014],sk3:[6014,6014,6014,6014,6014,6014],pw:30,pwm:50,pws:10,apw:0,uapw:0,cpw:0,dpw:0,dopw:0,
akr:[10,20,30,40,50,60],akc:[1,1,1,1,1,1],uar:[10,20,30,40,50,60],uac:[1,1,1,1,1,1],dgr:[10,20,30,40,50,60],dgc:[1,1,1,1,1,1],crr:[10,20,30,40,50,60],crc:[1,1,1,1,1,1],
abh:0,abc:0,uabh:0,uabc:0,cbh:0,cbc:0,aua:0,auc:0,uaua:0,uauc:0,cua:0,cuc:0,wp:1001,arm:2001,ring:3001,shoes:4001,
tals:["这是一级说明","这是二级说明","这是三级说明","这是四级说明","这是五级说明"]
},
5007: {
uuid:5007,name: "冰法",path:"m1",quality:3,kind:2,type:2,hp:2000,hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:500,a_cd:1.5,
lvexp:100,slvexp:10,slv:0, speed: 50,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[6001,6001,6001,6001,6001,6001],sk2:[6014,6014,6014,6014,6014,6014],sk3:[6014,6014,6014,6014,6014,6014],pw:30,pwm:50,pws:10,apw:0,uapw:0,cpw:0,dpw:0,dopw:0,
lvexp:100,slvexp:10,slv:0, speed: 50,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[6001,6001,6001,6001,6001,6001],sk2:[6023,6023,6023,6023,6023,6023],sk3:[6023,6023,6023,6023,6023,6023],pw:30,pwm:50,pws:10,apw:0,uapw:0,cpw:0,dpw:0,dopw:0,
akr:[10,20,30,40,50,60],akc:[1,1,1,1,1,1],uar:[10,20,30,40,50,60],uac:[1,1,1,1,1,1],dgr:[10,20,30,40,50,60],dgc:[1,1,1,1,1,1],crr:[10,20,30,40,50,60],crc:[1,1,1,1,1,1],
abh:0,abc:0,uabh:0,uabc:0,cbh:0,cbc:0,aua:0,auc:0,uaua:0,uauc:0,cua:0,cuc:0,wp:1001,arm:2001,ring:3001,shoes:4001,
tals:["这是一级说明","这是二级说明","这是三级说明","这是四级说明","这是五级说明"]
@@ -139,7 +139,7 @@ export const HeroInfo = {
},
5012: {
uuid:5012,name: "船长",path:"cz1",quality:3,kind:2,type:0,hp:2000,hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:400,a_cd:1.5,
lvexp:100,slvexp:10,slv:0, speed: 50,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[6005,6005,6005,6005,6005,6005],sk2:[6023,6023,6023,6023,6023,6023],sk3:[6023,6023,6023,6023,6023,6023],pw:30,pwm:50,pws:10,apw:0,uapw:0,cpw:0,dpw:0,dopw:0,
lvexp:100,slvexp:10,slv:0, speed: 50,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[6005,6005,6005,6005,6005,6005],sk2:[6026,6026,6026,6026,6026,6026],sk3:[6026,6026,6026,6026,6026,6026],pw:30,pwm:50,pws:10,apw:0,uapw:0,cpw:0,dpw:0,dopw:0,
akr:[10,20,30,40,50,60],akc:[1,1,1,1,1,1],uar:[10,20,30,40,50,60],uac:[1,1,1,1,1,1],dgr:[10,20,30,40,50,60],dgc:[1,1,1,1,1,1],crr:[10,20,30,40,50,60],crc:[1,1,1,1,1,1],
abh:0,abc:0,uabh:0,uabc:0,cbh:0,cbc:0,aua:0,auc:0,uaua:0,uauc:0,cua:0,cuc:0,wp:1001,arm:2001,ring:3001,shoes:4001,
tals:["这是一级说明","这是二级说明","这是三级说明","这是四级说明","这是五级说明"]
@@ -196,7 +196,7 @@ export const HeroInfo = {
},
5020: {
uuid:5020,name: "亚瑟王",path:"k5",quality:3,kind:2,type:0,hp:2000,hp_up:10, shp_up:20,def:10,def_up:1,sdef_up:20,ap:20,ap_up:2,sap_up:20,atp:1,vun:0,crit:20,crit_add:0,ucr:0,dodge:0,dis:400,a_cd:1.5,
lvexp:100,slvexp:10,slv:0, speed: 50,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[6005,6005,6005,6005,6005,6005],sk2:[6018,6018,6018,6018,6018,6018],sk3:[6018,6018,6018,6018,6018,6018],pw:30,pwm:50,pws:10,apw:0,uapw:0,cpw:0,dpw:0,dopw:0,
lvexp:100,slvexp:10,slv:0, speed: 50,aexp:5,uaexp:1,cexp:10,doexp:10,dexp:20,sk1:[6005,6005,6005,6005,6005,6005],sk2:[2027,2027,2027,2027,2027,2027],sk3:[2027,2027,2027,2027,2027,2027],pw:30,pwm:50,pws:10,apw:0,uapw:0,cpw:0,dpw:0,dopw:0,
akr:[10,20,30,40,50,60],akc:[1,1,1,1,1,1],uar:[10,20,30,40,50,60],uac:[1,1,1,1,1,1],dgr:[10,20,30,40,50,60],dgc:[1,1,1,1,1,1],crr:[10,20,30,40,50,60],crc:[1,1,1,1,1,1],
abh:0,abc:0,uabh:0,uabc:0,cbh:0,cbc:0,aua:0,auc:0,uaua:0,uauc:0,cua:0,cuc:0,wp:1001,arm:2001,ring:3001,shoes:4001,
tals:["这是一级说明","这是二级说明","这是三级说明","这是四级说明","这是五级说明"]

View File

@@ -312,18 +312,21 @@ export class HeroViewComp extends CCComp {
//受伤判断
check_uatk(skill:any){
if(this.shield > 0){
this.shield -= 1
if(this.shield <= 0){
this.shield = 0
this.node.getChildByName("shielded").active = false
}
return
}
if(this.check_dodge()) return
this.in_atked();
let l_hp=this.check_less(skill.ap,skill.is_crit,skill.crit_add)
this.check_debuff(skill,l_hp*skill.derate)
if(this.shield > 0){
let l_shield=this.shield-l_hp
if(l_shield < 0){
this.shield = 0
l_hp = Math.abs(l_shield)
}else{
this.shield = l_shield
l_hp = 0
}
}
this.hp_less(l_hp,skill.is_crit);
}
check_less(ap:number,is_crit:boolean,crit_add:number=0){
@@ -730,7 +733,6 @@ export class HeroViewComp extends CCComp {
}
add_shield(shield:number){
this.shield =shield
console.log("shield:",shield);
}
add_hp(hp: number=0){
this.BUFFCOMP.heathed();

View File

@@ -60,7 +60,7 @@ export class SkillCom extends CCComp {
this.is_destroy=true
}
}
if(otCol.group == seCol.group&&otCol.tag ==0&&this.tg==2){
if(otCol.group == seCol.group&&otCol.tag ==0&&(this.tg==2||this.tg==0)){
this.to_console("skill onBeginContact 是对自己人的buff",seCol,otCol)
this.do_buff(otCol.node.getComponent(HeroViewComp))
}
@@ -82,7 +82,8 @@ export class SkillCom extends CCComp {
}
if(SkillSet[this.s_uuid].shield > 0){ //buff护盾
hero.add_shield(SkillSet[this.s_uuid].shield/(this.in_time/this.cd))
console.log("do_buff shield: ",SkillSet[this.s_uuid].shield*this.ap/(this.in_time/this.cd))
hero.add_shield(SkillSet[this.s_uuid].shield)
}
}