31 lines
534 B
Go
31 lines
534 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/info"
|
|
"blazing/logic/service/fight/input"
|
|
"blazing/logic/service/fight/node"
|
|
)
|
|
|
|
/**
|
|
* 降低对方 1/n 的 体力
|
|
*/
|
|
|
|
func init() {
|
|
input.InitEffect(input.EffectType.Skill, 28, &Effect28{})
|
|
|
|
}
|
|
|
|
// Effect 28: 降低对方1/{0}的hp
|
|
type Effect28 struct {
|
|
node.EffectNode
|
|
}
|
|
|
|
func (e *Effect28) OnSkill() bool {
|
|
|
|
e.Ctx().Opp.Damage(e.Ctx().Our, &info.DamageZone{
|
|
Type: info.DamageType.Percent,
|
|
Damage: e.Ctx().Opp.CurPet[0].GetHP().Div(e.Args()[0]),
|
|
})
|
|
return true
|
|
}
|