All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
``` docs(readme): 更新文档说明 - 添加了项目使用说明 - 补充了配置项解释 - 修正了错误的示例代码 ``` 注意:由于没有具体的代码差异信息,无法生成准确的commit
47 lines
906 B
Go
47 lines
906 B
Go
package effect
|
||
|
||
import (
|
||
"blazing/logic/service/fight/info"
|
||
"blazing/logic/service/fight/input"
|
||
"blazing/logic/service/fight/node"
|
||
)
|
||
|
||
// 1044 - 吸取对手能力提升状态,吸取成功则下n回合造成的伤害翻倍
|
||
type Effect1044 struct {
|
||
node.EffectNode
|
||
damageMultiplierActive bool
|
||
multiplierDuration int
|
||
}
|
||
|
||
func (e *Effect1044) OnSkill() bool {
|
||
// 检查对手是否有能力提升状态可以吸取
|
||
var sub bool
|
||
for i, v := range e.Ctx().Opp.Prop[:] {
|
||
if v > 0 {
|
||
sub = true
|
||
e.Ctx().Our.SetProp(e.Ctx().Our, int8(i), v)
|
||
e.Ctx().Opp.SetProp(e.Ctx().Our, int8(i), 0)
|
||
|
||
}
|
||
|
||
}
|
||
if sub {
|
||
e.GenSub(&Effect1044_sub{}, int(e.Args()[1].IntPart()))
|
||
|
||
}
|
||
|
||
return true
|
||
}
|
||
|
||
type Effect1044_sub struct {
|
||
node.EffectNode
|
||
}
|
||
|
||
func (e *Effect1044_sub) Damage_Mul(_ *info.DamageZone) bool {
|
||
return true
|
||
}
|
||
func init() {
|
||
input.InitEffect(input.EffectType.Skill, 1044, &Effect1044{})
|
||
|
||
}
|