All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
``` docs(readme): 更新文档说明 - 添加了项目使用说明 - 补充了配置项解释 - 修正了错误的示例代码 ``` 注意:由于没有具体的代码差异信息,无法生成准确的commit
38 lines
707 B
Go
38 lines
707 B
Go
package effect
|
|
|
|
import (
|
|
"blazing/logic/service/fight/action"
|
|
"blazing/logic/service/fight/input"
|
|
"blazing/logic/service/fight/node"
|
|
)
|
|
|
|
// 485 - 消除对手能力强化状态,若消除成功,则自身恢复所有体力
|
|
type Effect485 struct {
|
|
node.EffectNode
|
|
}
|
|
|
|
func (e *Effect485) Skill_Use() bool {
|
|
isfff := false
|
|
for i, v := range e.Ctx().Opp.Prop[:] {
|
|
|
|
if v > 0 {
|
|
isfff = true
|
|
e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), 0)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if isfff {
|
|
// 恢复自身所有体力
|
|
maxHp := e.Ctx().Our.CurrentPet.GetMaxHP()
|
|
e.Ctx().Our.Heal(e.Ctx().Our, &action.SelectSkillAction{}, maxHp)
|
|
}
|
|
|
|
return true
|
|
}
|
|
func init() {
|
|
input.InitEffect(input.EffectType.Skill, 485, &Effect485{})
|
|
|
|
}
|