```
refactor(effect): 更新状态枚举类型为 EnumPetStatus 将多个技能效果文件中的 EnumBattleStatus 类型统一更新为 EnumPetStatus, 以更准确地反映其用途。同时修改了相关函数签名和变量声明。 此外,清理了部分注释格式,并补充了关于被动效果不能被免疫的说明。 ```
This commit is contained in:
39
logic/service/fight/effect/effect_79.go
Normal file
39
logic/service/fight/effect/effect_79.go
Normal file
@@ -0,0 +1,39 @@
|
||||
package effect
|
||||
|
||||
import (
|
||||
"blazing/logic/service/fight/info"
|
||||
"blazing/logic/service/fight/input"
|
||||
"blazing/logic/service/fight/node"
|
||||
|
||||
"github.com/shopspring/decimal"
|
||||
)
|
||||
|
||||
/**
|
||||
* 损失1/2的体力,提升自身的能力
|
||||
*/
|
||||
type Effect79 struct {
|
||||
node.EffectNode
|
||||
}
|
||||
|
||||
func init() {
|
||||
|
||||
input.InitEffect(input.EffectType.Skill, 79, &Effect79{})
|
||||
|
||||
}
|
||||
|
||||
// 命中之后
|
||||
// 特攻+2速度+1命中+1,
|
||||
func (e *Effect79) OnSkill() bool {
|
||||
if !e.Hit() {
|
||||
return true
|
||||
}
|
||||
|
||||
e.Ctx().Our.SetProp(e.Ctx().Our, 2, 2, info.AbilityOpType.ADD)
|
||||
e.Ctx().Our.SetProp(e.Ctx().Our, 4, 1, info.AbilityOpType.ADD)
|
||||
e.Ctx().Our.SetProp(e.Ctx().Our, 5, 1, info.AbilityOpType.ADD)
|
||||
e.Ctx().Our.Damage(e.Ctx().Our, &info.DamageZone{
|
||||
Type: info.DamageType.Fixed,
|
||||
Damage: decimal.NewFromInt(int64(e.Ctx().Our.CurrentPet.Info.MaxHp)).Div(decimal.NewFromInt(2)),
|
||||
})
|
||||
return true
|
||||
}
|
||||
Reference in New Issue
Block a user