feat: 实现大量技能效果及战斗逻辑修复
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
xinian
2026-03-30 00:51:18 +08:00
committed by cnb
parent a7171e9ef4
commit 87fdccaddf
63 changed files with 5505 additions and 1090 deletions

View File

@@ -47,15 +47,36 @@ func (our *Input) CalculateCrit(opp *Input, skill *info.SkillEntity) {
// 恢复血量
func (our *Input) Heal(in *Input, ac action.BattleActionI, value alpacadecimal.Decimal) {
healValue := int(value.IntPart())
if ac != nil {
if _, ok := ac.(*action.UseItemAction); !ok {
our.Exec(func(t Effect) bool {
t.Heal_Pre(ac, &healValue)
return true
})
}
}
//使用道具回血
if _, ok := ac.(*action.UseItemAction); !ok &&
ac != nil &&
in == our {
our.AttackValue.GainHp += int32(value.IntPart()) //道具有专门的回血包
in == our &&
healValue > 0 {
our.AttackValue.GainHp += int32(healValue) //道具有专门的回血包
}
our.CurrentPet.Info.ModelHP(value.IntPart())
if healValue >= 0 {
our.CurrentPet.Info.ModelHP(int64(healValue))
return
}
damage := uint32(-healValue)
if damage >= our.CurrentPet.Info.Hp {
our.CurrentPet.Info.Hp = 0
return
}
our.CurrentPet.Info.Hp -= damage
}
func (our *Input) HealPP(value int) {