dd 单独制作 卡牌特效

This commit is contained in:
2025-06-19 17:28:55 +08:00
parent 3582521e4e
commit ff402f14ca
2 changed files with 29 additions and 8 deletions

View File

@@ -139,8 +139,8 @@ export const SuperCardsType={
} }
export const SuperCardsList=[3001,3002,3101,3201,3301]; export const SuperCardsList=[3001,3002,3101,3201,3301];
export const SuperCards={ export const SuperCards={
3001:{uuid:3001,name:"附魔宝典",path:"3001",type:SuperCardsType.SPECIAL,value1:1,value2:0,value3:0,info:"你的提升英雄/伙伴属性的装备效果,额外添加+1攻击力"}, 3001:{uuid:3001,name:"附魔宝典",path:"3001",type:SuperCardsType.SPECIAL,value1:1,value2:0,value3:0,info:"攻击触发提高英雄/伙伴属性的效果,额外添加+1攻击力"},
3002:{uuid:3002,name:"附魔宝典",path:"3002",type:SuperCardsType.SPECIAL,value1:0,value2:1,value3:0,info:"你的提升英雄/伙伴属性的装备效果,额外添加+1生命值"}, 3002:{uuid:3002,name:"附魔宝典",path:"3002",type:SuperCardsType.SPECIAL,value1:1,value2:0,value3:0,info:"攻击触发高英雄/伙伴属性的效果,额外添加+1生命值"},
3101:{uuid:3101,name:"火球风暴",path:"3101",type:SuperCardsType.AOE,value1:10,value2:300,value3:10,info:"召唤大量火球攻击敌人,每个火球对敌人造成英雄攻击力的300%伤害,并造成易伤(下10次伤害)"}, 3101:{uuid:3101,name:"火球风暴",path:"3101",type:SuperCardsType.AOE,value1:10,value2:300,value3:10,info:"召唤大量火球攻击敌人,每个火球对敌人造成英雄攻击力的300%伤害,并造成易伤(下10次伤害)"},
3201:{uuid:3201,name:"极速充能",path:"3201",type:SuperCardsType.BUFF,value1:10,value2:100,value3:0,info:"你的英雄/伙伴接下来的10次普通攻击速度提升100%"}, 3201:{uuid:3201,name:"极速充能",path:"3201",type:SuperCardsType.BUFF,value1:10,value2:100,value3:0,info:"你的英雄/伙伴接下来的10次普通攻击速度提升100%"},
3301:{uuid:3301,name:"冰霜风暴",path:"3301",type:SuperCardsType.DEBUFF,value1:30,value2:10,value3:0,info:"场上敌人获得30%的易伤,(下10次伤害)"}, 3301:{uuid:3301,name:"冰霜风暴",path:"3301",type:SuperCardsType.DEBUFF,value1:30,value2:10,value3:0,info:"场上敌人获得30%的易伤,(下10次伤害)"},

View File

@@ -26,7 +26,7 @@ export class FightConComp extends Component {
temp_friend_debuff = this.getInitTempDebuff(); temp_friend_debuff = this.getInitTempDebuff();
temp_enemy_debuff = this.getInitTempDebuff(); temp_enemy_debuff = this.getInitTempDebuff();
atk_type:number=0; atk_type:number=0;
//装备特殊属性
friend_alive_cd:number=FightSet.FRIEND_LIVE_CD friend_alive_cd:number=FightSet.FRIEND_LIVE_CD
atk_add_friend_atk:number=0 atk_add_friend_atk:number=0
atk_add_friend_hp:number=0 atk_add_friend_hp:number=0
@@ -34,6 +34,10 @@ export class FightConComp extends Component {
atk_add_master_atk:number=0 atk_add_master_atk:number=0
atk_add_master_hp:number=0 atk_add_master_hp:number=0
//卡牌特效
card_atk_add:number=0 //卡牌特效 攻击提高攻击力效果 额外添加值
card_hp_add:number=0 //卡牌特效 攻击提高生命值效果 额外添加值
onLoad(){ onLoad(){
// console.log("fight con start") // console.log("fight con start")
oops.message.on(GameEvent.EquipChange,this.equip_change,this) oops.message.on(GameEvent.EquipChange,this.equip_change,this)
@@ -48,11 +52,11 @@ export class FightConComp extends Component {
} }
change_equip_special_attr(e:GameEvent,data:any){ change_equip_special_attr(e:GameEvent,data:any){
console.log("[FightConComp]:change_equip_special_attr",data) console.log("[FightConComp]:change_equip_special_attr",data)
this.atk_add_friend_atk=data.atk_add_friend_atk this.atk_add_friend_atk=data.atk_add_friend_atk+(this.card_atk_add > 0 ? this.card_atk_add:0) //装备特殊属性 英雄/伙伴 攻击力增加
this.atk_add_friend_hp=data.atk_add_friend_hp this.atk_add_friend_hp=data.atk_add_friend_hp+(this.card_hp_add > 0 ? this.card_hp_add:0) //装备特殊属性 英雄/伙伴 生命值增加
this.atk_add_glod=data.atk_add_glod this.atk_add_glod=data.atk_add_glod
this.atk_add_master_atk=data.atk_add_master_atk this.atk_add_master_atk=data.atk_add_master_atk+(this.card_atk_add > 0 ? this.card_atk_add:0) //装备特殊属性 英雄/伙伴 攻击力增加
this.atk_add_master_hp=data.atk_add_master_hp this.atk_add_master_hp=data.atk_add_master_hp+(this.card_hp_add > 0 ? this.card_hp_add:0) //装备特殊属性 英雄/伙伴 生命值增加
this.friend_alive_cd=FightSet.FRIEND_LIVE_CD-data.friend_live_cd_less this.friend_alive_cd=FightSet.FRIEND_LIVE_CD-data.friend_live_cd_less
} }
@@ -117,7 +121,16 @@ export class FightConComp extends Component {
console.log("[FightConComp]:use_special_card:",SuperCards[data.uuid]) console.log("[FightConComp]:use_special_card:",SuperCards[data.uuid])
switch(SuperCards[data.uuid].type){ switch(SuperCards[data.uuid].type){
case SuperCardsType.SPECIAL: case SuperCardsType.SPECIAL:
switch(data.uuid){
case 3001:
console.log("[FightConComp]:use_special_card:附魔宝典")
this.card_atk_add+=SuperCards[data.uuid].value1
break
case 3002:
console.log("[FightConComp]:use_special_card:附魔宝典")
this.card_hp_add+=SuperCards[data.uuid].value1
break
}
break break
case SuperCardsType.AOE: case SuperCardsType.AOE:
@@ -147,6 +160,14 @@ export class FightConComp extends Component {
this.temp_hero_debuff = this.getInitTempDebuff() this.temp_hero_debuff = this.getInitTempDebuff()
this.temp_friend_debuff = this.getInitTempDebuff() this.temp_friend_debuff = this.getInitTempDebuff()
this.temp_enemy_debuff = this.getInitTempDebuff() this.temp_enemy_debuff = this.getInitTempDebuff()
this.friend_alive_cd=FightSet.FRIEND_LIVE_CD
this.atk_add_friend_atk=0
this.atk_add_friend_hp=0
this.atk_add_glod=0
this.atk_add_master_atk=0
this.atk_add_master_hp=0
this.card_atk_add=0
this.card_hp_add=0
} }
update(deltaTime: number) { update(deltaTime: number) {