From ff402f14cae0ca8956c3d78e7d7f4a58b9b59f35 Mon Sep 17 00:00:00 2001 From: panw Date: Thu, 19 Jun 2025 17:28:55 +0800 Subject: [PATCH] =?UTF-8?q?dd=20=E5=8D=95=E7=8B=AC=E5=88=B6=E4=BD=9C=20?= =?UTF-8?q?=E5=8D=A1=E7=89=8C=E7=89=B9=E6=95=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/script/game/common/config/CardSet.ts | 4 +-- assets/script/game/map/FightConComp.ts | 33 +++++++++++++++++---- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/assets/script/game/common/config/CardSet.ts b/assets/script/game/common/config/CardSet.ts index fad44024..1859a0dc 100644 --- a/assets/script/game/common/config/CardSet.ts +++ b/assets/script/game/common/config/CardSet.ts @@ -139,8 +139,8 @@ export const SuperCardsType={ } export const SuperCardsList=[3001,3002,3101,3201,3301]; export const SuperCards={ - 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生命值"}, + 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: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次伤害)"}, 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次伤害)"}, diff --git a/assets/script/game/map/FightConComp.ts b/assets/script/game/map/FightConComp.ts index e3595218..37ef6764 100644 --- a/assets/script/game/map/FightConComp.ts +++ b/assets/script/game/map/FightConComp.ts @@ -26,7 +26,7 @@ export class FightConComp extends Component { temp_friend_debuff = this.getInitTempDebuff(); temp_enemy_debuff = this.getInitTempDebuff(); atk_type:number=0; - + //装备特殊属性 friend_alive_cd:number=FightSet.FRIEND_LIVE_CD atk_add_friend_atk: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_hp:number=0 + //卡牌特效 + card_atk_add:number=0 //卡牌特效 攻击提高攻击力效果 额外添加值 + card_hp_add:number=0 //卡牌特效 攻击提高生命值效果 额外添加值 + onLoad(){ // console.log("fight con start") 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){ console.log("[FightConComp]:change_equip_special_attr",data) - this.atk_add_friend_atk=data.atk_add_friend_atk - this.atk_add_friend_hp=data.atk_add_friend_hp + 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.card_hp_add > 0 ? this.card_hp_add:0) //装备特殊属性 英雄/伙伴 生命值增加 this.atk_add_glod=data.atk_add_glod - this.atk_add_master_atk=data.atk_add_master_atk - this.atk_add_master_hp=data.atk_add_master_hp + 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.card_hp_add > 0 ? this.card_hp_add:0) //装备特殊属性 英雄/伙伴 生命值增加 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]) switch(SuperCards[data.uuid].type){ 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 case SuperCardsType.AOE: @@ -147,6 +160,14 @@ export class FightConComp extends Component { this.temp_hero_debuff = this.getInitTempDebuff() this.temp_friend_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) {