fix: 修正战斗伤害锁与结束判定逻辑
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
This commit is contained in:
@@ -26,10 +26,10 @@ func (e *Effect68) DamageLockEx(t *info.DamageZone) bool {
|
||||
if t.Type != info.DamageType.Red {
|
||||
return true
|
||||
}
|
||||
if e.Ctx().Our.CurrentPet.GetHP().Cmp(alpacadecimal.NewFromInt(1)) <= 0 {
|
||||
if e.Ctx().Our.CurrentPet.GetHP().IntPart() <= 1 {
|
||||
return true
|
||||
}
|
||||
if t.Damage.Cmp(e.Ctx().Our.CurrentPet.GetHP()) > 0 {
|
||||
if t.Damage.Cmp(e.Ctx().Our.CurrentPet.GetHP()) >= 0 {
|
||||
t.Damage = e.Ctx().Our.CurrentPet.GetHP().Sub(alpacadecimal.NewFromInt(1))
|
||||
}
|
||||
|
||||
|
||||
@@ -329,9 +329,15 @@ func (f *FightC) enterturn(firstAttack, secondAttack *action.SelectSkillAction)
|
||||
}
|
||||
})
|
||||
f.Switch = make(map[uint32]*action.ActiveSwitchAction)
|
||||
// if f.closefight && f.Info.Mode == info.BattleMode.PET_MELEE {
|
||||
// return
|
||||
// }
|
||||
if f.closefight && f.Info.Mode == info.BattleMode.PET_MELEE {
|
||||
f.Broadcast(func(fighter *input.Input) {
|
||||
if fighter.UserID != f.WinnerId {
|
||||
fighter.Player.SendPackCmd(2505, &attackValueResult)
|
||||
}
|
||||
|
||||
})
|
||||
return
|
||||
}
|
||||
f.Broadcast(func(fighter *input.Input) {
|
||||
fighter.Player.SendPackCmd(2505, &attackValueResult)
|
||||
fighter.CanChange = 0
|
||||
|
||||
Reference in New Issue
Block a user