All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
``` docs(readme): 更新文档说明 - 添加了项目使用说明 - 补充了配置项解释 - 修正了错误的示例代码 ``` 注意:由于没有具体的代码差异信息,无法生成准确的commit
37 lines
732 B
Go
37 lines
732 B
Go
package effect
|
||
|
||
import (
|
||
"blazing/logic/service/fight/info"
|
||
"blazing/logic/service/fight/input"
|
||
"blazing/logic/service/fight/node"
|
||
|
||
"github.com/alpacahq/alpacadecimal"
|
||
)
|
||
|
||
/**
|
||
* 损失1/2的体力,提升自身的能力
|
||
*/
|
||
type Effect79 struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func init() {
|
||
|
||
input.InitEffect(input.EffectType.Skill, 79, &Effect79{})
|
||
|
||
}
|
||
|
||
// 命中之后
|
||
// 特攻+2速度+1命中+1,
|
||
func (e *Effect79) OnSkill() bool {
|
||
|
||
e.Ctx().Our.SetProp(e.Ctx().Our, 2, 2)
|
||
e.Ctx().Our.SetProp(e.Ctx().Our, 4, 1)
|
||
e.Ctx().Our.SetProp(e.Ctx().Our, 5, 1)
|
||
e.Ctx().Our.Damage(e.Ctx().Our, &info.DamageZone{
|
||
Type: info.DamageType.Fixed,
|
||
Damage: e.Ctx().Our.CurrentPet.GetHP().Div(alpacadecimal.NewFromInt(2)),
|
||
})
|
||
return true
|
||
}
|