refactor(fight/effect): 统一效果初始化接口,重构效果类型管理并优化参数传递逻辑
This commit is contained in:
@@ -14,7 +14,7 @@ type Effect62 struct {
|
||||
}
|
||||
|
||||
func init() {
|
||||
input.InitSkillEffect(62, &Effect62{
|
||||
input.InitEffect(input.EffectType.Skill, 62, &Effect62{
|
||||
EffectNode: node.EffectNode{
|
||||
Owner: true,
|
||||
},
|
||||
@@ -44,7 +44,8 @@ func (this *Effect62) TurnEnd(e *input.Input) {
|
||||
func (e *Effect62) SkillUseEnd(opp *input.Input) {
|
||||
if !e.Hide { //如果还在隐藏,就直接返回
|
||||
defer e.EffectNode.NotALive() //失效
|
||||
e.Input.Death() //本只死亡
|
||||
//应该是对方固定伤害等于自身血量
|
||||
//e.Input.Death() //本只死亡
|
||||
|
||||
}
|
||||
|
||||
@@ -53,10 +54,11 @@ func (e *Effect62) SkillUseEnd(opp *input.Input) {
|
||||
|
||||
}
|
||||
|
||||
func (e *Effect62) SetArgs(args ...int) {
|
||||
// 默认添加回合
|
||||
func (e *Effect62) SetArgs(t *input.Input, a ...int) {
|
||||
|
||||
e.EffectNode.SetArgs(args...)
|
||||
e.EffectNode.Duration(args[0])
|
||||
e.EffectNode.SetArgs(t, a...)
|
||||
e.EffectNode.Duration(e.EffectNode.SideEffectArgs[0])
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user