- 调整能力提升计算时机,确保命中后再恢复原始属性 - 暴击判断前置,仅在命中时计算暴击翻倍及破防逻辑 - 优化回合结束效果清除逻辑,增加状态存活判断 refactor(controller): 重构擂台相关接口返回结构体类型 - 将 ARENA_SET_OWENR、ARENA_FIGHT_OWENR 等函数的返回值统一改为 NullOutboundInfo,并移除冗余字段返回 - 广播逻辑调整,统一使用 Broadcast
52 lines
850 B
Go
52 lines
850 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/info"
|
|
"blazing/logic/service/fight/input"
|
|
"blazing/logic/service/fight/node"
|
|
)
|
|
|
|
/**
|
|
* n回合内令对手使用的属性技能无效
|
|
*/
|
|
type Effect478 struct {
|
|
node.EffectNode
|
|
can bool
|
|
}
|
|
|
|
func init() {
|
|
ret := &Effect478{}
|
|
|
|
input.InitEffect(input.EffectType.Skill, 478, ret)
|
|
|
|
}
|
|
|
|
// 命中之后
|
|
func (e *Effect478) OnSkill() bool {
|
|
if !e.Hit() {
|
|
return true
|
|
}
|
|
e.can = true
|
|
return true
|
|
}
|
|
|
|
func (e *Effect478) Skill_Hit_ex() bool {
|
|
if !e.Hit() {
|
|
return true
|
|
}
|
|
if !e.can {
|
|
return true
|
|
}
|
|
if e.Ctx().SkillEntity.Category() != info.Category.STATUS {
|
|
return true
|
|
}
|
|
e.Ctx().Opp.EffectCache = make([]input.Effect, 0)
|
|
return true
|
|
}
|
|
func (e *Effect478) SetArgs(t *input.Input, a ...int) {
|
|
|
|
e.EffectNode.SetArgs(t, a...)
|
|
e.EffectNode.Duration(e.EffectNode.SideEffectArgs[0])
|
|
|
|
}
|