This commit is contained in:
33
logic/service/fight/effect/effect_187.go
Normal file
33
logic/service/fight/effect/effect_187.go
Normal file
@@ -0,0 +1,33 @@
|
||||
package effect
|
||||
|
||||
import (
|
||||
"blazing/logic/service/fight/action"
|
||||
"blazing/logic/service/fight/info"
|
||||
"blazing/logic/service/fight/input"
|
||||
"blazing/logic/service/fight/node"
|
||||
)
|
||||
|
||||
// 187 - n回合内,若对手使用属性技能,则自身恢复1/m最大体力值
|
||||
type Effect187 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func (e *Effect187) Skill_Use_ex() bool {
|
||||
if e.Ctx().SkillEntity != nil && e.Ctx().SkillEntity.Category() == info.Category.STATUS {
|
||||
maxHp := e.Ctx().Our.CurrentPet.GetMaxHP()
|
||||
healAmount := maxHp.Div(e.Args()[1]) // 1/m
|
||||
|
||||
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, healAmount)
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
func (e *Effect187) SetArgs(t *input.Input, a ...int) {
|
||||
e.EffectNode.SetArgs(t, a...)
|
||||
e.EffectNode.Duration(a[0]) // 持续n回合
|
||||
}
|
||||
|
||||
func init() {
|
||||
input.InitEffect(input.EffectType.NewSel, 187, &Effect187{})
|
||||
}
|
||||
Reference in New Issue
Block a user