feat(fight): 更新战斗效果计算逻辑并修复宠物信息返回 - 在PetBargeListInfo中添加EnCntCnt字段并修复返回值 - 将effect_195和effect_566中的SkillHit方法重命名为CalculatePre - 在effect_566中添加can字段 - 更新fightc.go中的技能处理流程,将SkillHit调用改为CalculatePre - 在接口定义中将Calculate_Pre重命名为CalculatePre
43 lines
708 B
Go
43 lines
708 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/info"
|
|
"blazing/logic/service/fight/input"
|
|
"blazing/logic/service/fight/node"
|
|
)
|
|
|
|
/**
|
|
* 无视对手双防能力提升状态
|
|
*/
|
|
type Effect566 struct {
|
|
node.EffectNode
|
|
can bool
|
|
}
|
|
|
|
func init() {
|
|
ret := &Effect566{}
|
|
|
|
input.InitEffect(input.EffectType.Skill, 566, ret)
|
|
|
|
}
|
|
|
|
// 命中之后
|
|
func (e *Effect566) OnSkill() bool {
|
|
|
|
//e.Ctx().Opp.CancelTurn(e.Ctx().Our)
|
|
return true
|
|
}
|
|
func (e *Effect566) CalculatePre() bool {
|
|
if e.Ctx().SkillEntity == nil {
|
|
return true
|
|
}
|
|
|
|
if e.Ctx().SkillEntity.Category() == info.Category.PHYSICAL {
|
|
e.Ctx().Opp.CurrentPet.Info.Prop[2] = 0
|
|
} else {
|
|
e.Ctx().Opp.CurrentPet.Info.Prop[4] = 0
|
|
}
|
|
|
|
return true
|
|
}
|