feat: 新增多个战斗技能效果实现
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed

This commit is contained in:
xinian
2026-03-08 10:34:23 +08:00
committed by cnb
parent 042a48088d
commit 3dd2d40c50
43 changed files with 1278 additions and 797 deletions

View File

@@ -63,6 +63,7 @@ func (e *StatusSleep) Skill_Use_ex() bool {
// 持续伤害状态基类(中毒、冻伤、烧伤等)
type ContinuousDamage struct {
BaseStatus
isheal bool //是否回血
}
// 技能命中前触发伤害1/8最大生命值真实伤害
@@ -73,6 +74,20 @@ func (e *ContinuousDamage) ActionStart(attacker, defender *action.SelectSkillAct
Type: info.DamageType.True,
Damage: damage,
})
if len(e.SideEffectArgs) == 0 {
return true
}
// 额外效果
e.Ctx().Our.Damage(e.Input, &info.DamageZone{
Type: info.DamageType.True,
Damage: damage,
})
if e.Ctx().Opp.CurrentPet.GetHP().IntPart() == 0 {
return true
}
// 给对方回血(不受回血限制影响)
e.Ctx().Opp.Heal(e.Ctx().Our, nil, damage)
return true
}