添加 了 饰品 锤子 + 冰冻同时冻住cd,眩晕则cd归零 后续 需要处理 boss 的技能cd归零和冻结
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -164,17 +164,7 @@ export class HeroViewComp extends CCComp {
|
||||
|
||||
change_atk(e:GameEvent,data:any){
|
||||
if(!this.is_master) return
|
||||
if(data.ice){
|
||||
this.atk_skill=6014
|
||||
}else if(data.fire){
|
||||
this.atk_skill=6012
|
||||
}else if(data.wind){
|
||||
this.atk_skill=6013
|
||||
}else{
|
||||
this.atk_skill=6001
|
||||
}
|
||||
|
||||
console.log("[HeroViewComp]:change_atk",SkillSet[this.atk_skill].name)
|
||||
|
||||
}
|
||||
|
||||
get isActive() {
|
||||
@@ -394,6 +384,7 @@ export class HeroViewComp extends CCComp {
|
||||
this.DEBUFF_FROST+=deV
|
||||
break
|
||||
case DebuffAttr.STUN:
|
||||
this.at=0 // 眩晕 cd归零
|
||||
this.BUFFCOMP.in_yun(deV)
|
||||
this.DEBUFF_STUN+=deV
|
||||
this.is_stop=true
|
||||
|
||||
@@ -38,7 +38,7 @@ export class SkillConComp extends CCComp {
|
||||
|
||||
update(dt: number) {
|
||||
if(!smc.mission.play||smc.mission.pause) return
|
||||
if(this.HeroView.DEBUFF_STUN <= 0) this.HeroView.at += dt;
|
||||
if(this.HeroView.DEBUFF_STUN <= 0&&this.HeroView.DEBUFF_FROST <= 0) this.HeroView.at += dt;
|
||||
|
||||
let cd = this.get_cd(this.HeroView.cd,this.HeroView)
|
||||
// console.log(this.HeroView.hero_name+(this.HeroView.is_master?"[主]":"[从] 准备释放")+SkillSet[this.HeroView.atk_skill].name+"=>"+"=>cd:"+cd+"=> count:"+count)
|
||||
|
||||
@@ -80,7 +80,7 @@ export class EquipsComp extends Component {
|
||||
}
|
||||
break
|
||||
case "accessory":
|
||||
if(this.accessory.uuid==0) return 1
|
||||
if(this.accessory.uuid==0) return 4
|
||||
lv=EquipInfo[this.accessory.uuid].lv
|
||||
break
|
||||
}
|
||||
@@ -225,6 +225,7 @@ export class EquipsComp extends Component {
|
||||
const all_special_attr=[...weapon_special_attr,...armor_special_attr,...accessory_special_attr]
|
||||
|
||||
let equip_special_attr=this.count_equip_special_attr(all_special_attr)
|
||||
let friend_get_master_equip=equip_special_attr[EquipSpecialAttr.FRIEND_GET_MASTER_EQUIP]
|
||||
oops.message.dispatchEvent(GameEvent.ChangeATK_EQUIP_SPECIAL_ATTR,equip_special_attr)
|
||||
|
||||
// 合并所有装备属性
|
||||
@@ -245,59 +246,42 @@ export class EquipsComp extends Component {
|
||||
}
|
||||
this.add_attr(targetKey,attr)
|
||||
});
|
||||
|
||||
// 伙伴获取英雄装备属性加成
|
||||
this.attrs.friend_buff.ATK+=this.attrs.hero_buff.ATK*friend_get_master_equip
|
||||
this.attrs.friend_buff.HP+=this.attrs.hero_buff.HP*friend_get_master_equip
|
||||
|
||||
console.log("[EquipsComp]:debuff buff attrs ", this.attrs);
|
||||
oops.message.dispatchEvent(GameEvent.EquipChange, this.attrs);
|
||||
}
|
||||
|
||||
count_equip_special_attr(all_special_attr:any[]){
|
||||
//特殊属性附加
|
||||
let equip_special_attr={
|
||||
ice:false,
|
||||
fire:false,
|
||||
wind:false,
|
||||
friend_live_cd_less:0,
|
||||
atk_add_friend_atk:0,
|
||||
atk_add_friend_hp:0,
|
||||
atk_add_glod:0,
|
||||
atk_add_master_atk:0,
|
||||
atk_add_master_hp:0,
|
||||
}
|
||||
//特殊属性附加 - 直接使用枚举值作为属性名
|
||||
let equip_special_attr = {
|
||||
[EquipSpecialAttr.ICE]: 0,
|
||||
[EquipSpecialAttr.FIRE]: 0,
|
||||
[EquipSpecialAttr.WIND]: 0,
|
||||
[EquipSpecialAttr.FRIEND_LIVE_CD]: 0,
|
||||
[EquipSpecialAttr.ATK_ADD_FRIEND_ATK]: 0,
|
||||
[EquipSpecialAttr.ATK_ADD_FRIEND_HP]: 0,
|
||||
[EquipSpecialAttr.ATK_ADD_GLOD]: 0,
|
||||
[EquipSpecialAttr.ATK_ADD_MASTER_ATK]: 0,
|
||||
[EquipSpecialAttr.ATK_ADD_MASTER_HP]: 0,
|
||||
[EquipSpecialAttr.DOUBLE_DEAD]: 0,
|
||||
[EquipSpecialAttr.DOUBLE_ATKED]: 0,
|
||||
[EquipSpecialAttr.FRIEND_ATKED_ADD_SKILL_STONE]: 0,
|
||||
[EquipSpecialAttr.ATK_ADD_VALUE]: 0,
|
||||
[EquipSpecialAttr.FRIEND_GET_MASTER_EQUIP]: 0,
|
||||
};
|
||||
|
||||
console.log("[EquipsComp]:all_special_attr",all_special_attr)
|
||||
all_special_attr.forEach(special_attr=>{
|
||||
if(special_attr){
|
||||
switch(special_attr.special_attr){
|
||||
case EquipSpecialAttr.ICE:
|
||||
equip_special_attr.ice=true
|
||||
break
|
||||
case EquipSpecialAttr.FIRE:
|
||||
equip_special_attr.fire=true
|
||||
break
|
||||
case EquipSpecialAttr.WIND:
|
||||
equip_special_attr.wind=true
|
||||
break
|
||||
case EquipSpecialAttr.FRIEND_LIVE_CD:
|
||||
equip_special_attr.friend_live_cd_less+=special_attr.special_attr_value
|
||||
break
|
||||
case EquipSpecialAttr.ATK_ADD_FRIEND_ATK:
|
||||
equip_special_attr.atk_add_friend_atk+=special_attr.special_attr_value
|
||||
break
|
||||
case EquipSpecialAttr.ATK_ADD_FRIEND_HP:
|
||||
equip_special_attr.atk_add_friend_hp+=special_attr.special_attr_value
|
||||
break
|
||||
case EquipSpecialAttr.ATK_ADD_GLOD:
|
||||
equip_special_attr.atk_add_glod+=special_attr.special_attr_value
|
||||
break
|
||||
case EquipSpecialAttr.ATK_ADD_MASTER_ATK:
|
||||
equip_special_attr.atk_add_master_atk+=special_attr.special_attr_value
|
||||
break
|
||||
case EquipSpecialAttr.ATK_ADD_MASTER_HP:
|
||||
equip_special_attr.atk_add_master_hp+=special_attr.special_attr_value
|
||||
break
|
||||
}
|
||||
|
||||
// 直接使用枚举值累加属性
|
||||
all_special_attr.forEach(special_attr => {
|
||||
if (special_attr && equip_special_attr.hasOwnProperty(special_attr.special_attr)) {
|
||||
equip_special_attr[special_attr.special_attr] += special_attr.special_attr_value;
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
console.log("[EquipsComp]:equip_special_attr",equip_special_attr)
|
||||
return equip_special_attr
|
||||
}
|
||||
@@ -361,12 +345,17 @@ export class EquipsComp extends Component {
|
||||
this.boxs.getChildByName("armor").getChildByName("tip").active=true
|
||||
this.boxs.getChildByName("armor").getChildByName("tip").getComponent(Label).string="升级"
|
||||
}
|
||||
if(this.accessory.uuid==0 &&smc.vmdata.mission_data.equip_stone_max >= 160){
|
||||
if(EquipInfo[this.accessory.uuid].lv>=5) return
|
||||
if(this.accessory.uuid==0 ){
|
||||
this.boxs.getChildByName("accessory").getChildByName("get").active =true
|
||||
this.boxs.getChildByName("accessory").getChildByName("light").active=true
|
||||
this.boxs.getChildByName("accessory").getChildByName("tip").active=true
|
||||
this.boxs.getChildByName("accessory").getChildByName("tip").getComponent(Label).string="购买"
|
||||
}else{
|
||||
if(EquipInfo[this.accessory.uuid].lv>=5) return
|
||||
this.boxs.getChildByName("accessory").getChildByName("change").active =true
|
||||
this.boxs.getChildByName("accessory").getChildByName("light").active=true
|
||||
this.boxs.getChildByName("accessory").getChildByName("tip").active=true
|
||||
this.boxs.getChildByName("accessory").getChildByName("tip").getComponent(Label).string="升级"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ import { geDebuffNum, getBuffNum, BuffAttr, DebuffAttr } from '../common/config/
|
||||
import { Timer } from 'db://oops-framework/core/common/timer/Timer';
|
||||
import { FightSet } from '../common/config/Mission';
|
||||
import { SuperCards, SuperCardsType } from '../common/config/CardSet';
|
||||
import { EquipSpecialAttr } from '../common/config/Equips';
|
||||
import { ecs } from 'db://oops-framework/libs/ecs/ECS';
|
||||
import { Skill } from '../skills/Skill';
|
||||
import { MasterModelComp } from '../hero/MasterModel';
|
||||
@@ -29,6 +30,11 @@ export class FightConComp extends Component {
|
||||
atk_add_glod:number=0
|
||||
atk_add_master_atk:number=0
|
||||
atk_add_master_hp:number=0
|
||||
double_dead:number=0
|
||||
double_atked:number=0
|
||||
friend_atked_add_skill_stone:number=0
|
||||
atk_add_value:number=0
|
||||
friend_get_master_equip:number=0
|
||||
|
||||
//卡牌特效
|
||||
card_atk_add:number=0 //卡牌特效 攻击提高攻击力效果 额外添加值
|
||||
@@ -59,13 +65,17 @@ 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.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.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
|
||||
|
||||
this.atk_add_value=data[EquipSpecialAttr.ATK_ADD_VALUE]
|
||||
this.atk_add_friend_atk=data[EquipSpecialAttr.ATK_ADD_FRIEND_ATK]+this.atk_add_value+(this.card_atk_add > 0 ? this.card_atk_add:0) //装备特殊属性 英雄/伙伴 攻击力增加
|
||||
this.atk_add_friend_hp=data[EquipSpecialAttr.ATK_ADD_FRIEND_HP]+this.atk_add_value+(this.card_hp_add > 0 ? this.card_hp_add:0) //装备特殊属性 英雄/伙伴 生命值增加
|
||||
this.atk_add_glod=data[EquipSpecialAttr.ATK_ADD_GLOD]
|
||||
this.atk_add_master_atk=data[EquipSpecialAttr.ATK_ADD_MASTER_ATK]+this.atk_add_value+(this.card_atk_add > 0 ? this.card_atk_add:0) //装备特殊属性 英雄/伙伴 攻击力增加
|
||||
this.atk_add_master_hp=data[EquipSpecialAttr.ATK_ADD_MASTER_HP]+this.atk_add_value+(this.card_hp_add > 0 ? this.card_hp_add:0) //装备特殊属性 英雄/伙伴 生命值增加
|
||||
this.friend_alive_cd=FightSet.FRIEND_LIVE_CD-data[EquipSpecialAttr.FRIEND_LIVE_CD]
|
||||
this.double_dead=data[EquipSpecialAttr.DOUBLE_DEAD]
|
||||
this.double_atked=data[EquipSpecialAttr.DOUBLE_ATKED]
|
||||
this.friend_atked_add_skill_stone=data[EquipSpecialAttr.FRIEND_ATKED_ADD_SKILL_STONE]
|
||||
this.friend_get_master_equip=data[EquipSpecialAttr.FRIEND_GET_MASTER_EQUIP]
|
||||
}
|
||||
|
||||
|
||||
@@ -194,6 +204,11 @@ export class FightConComp extends Component {
|
||||
this.atk_add_glod=0
|
||||
this.atk_add_master_atk=0
|
||||
this.atk_add_master_hp=0
|
||||
this.double_dead=0
|
||||
this.double_atked=0
|
||||
this.friend_atked_add_skill_stone=0
|
||||
this.atk_add_value=0
|
||||
this.friend_get_master_equip=0
|
||||
this.card_atk_add=0
|
||||
this.card_hp_add=0
|
||||
this.aoe_queues = [] // 清空技能队列
|
||||
|
||||
@@ -107,7 +107,7 @@ export class Skill extends ecs.Entity {
|
||||
let ap=0
|
||||
let crit=0
|
||||
let crit_d=0
|
||||
let buff_ap=1
|
||||
let buffap=1
|
||||
let buff=null
|
||||
let puncture=0
|
||||
let puncture_damage=0
|
||||
@@ -116,7 +116,7 @@ export class Skill extends ecs.Entity {
|
||||
if(view.is_boss) buff=FIGHTCON.enemy_buff
|
||||
if(view.is_kalami) buff=FIGHTCON.enemy_buff
|
||||
if(buff!==null) {
|
||||
buff_ap=(100+buff.ATK)/100 //装备区 总加成
|
||||
buffap=(100+buff.ATK)/100 //装备区 总加成
|
||||
}
|
||||
// 汇总DEBUFF_DECD并处理count值
|
||||
let BUFF_ATK = 0
|
||||
@@ -143,7 +143,7 @@ export class Skill extends ecs.Entity {
|
||||
let BUFF_AP=(100-DEBUFF_DEATK+BUFF_ATK+dmg)/100 //buff区 总加成
|
||||
puncture =buff.PUNCTURE+view.puncture
|
||||
puncture_damage=buff.PUNCTURE_DMG+view.puncture_damage
|
||||
ap=view.ap*buff_ap*BUFF_AP*SkillSet[uuid].ap/100
|
||||
ap=view.ap*buffap*BUFF_AP*SkillSet[uuid].ap/100
|
||||
crit=view.crit+buff.CRITICAL
|
||||
crit_d=view.crit_d+buff.CRITICAL_DMG
|
||||
return {ap,crit,crit_d,puncture,puncture_damage}
|
||||
|
||||
Reference in New Issue
Block a user