1
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
昔念
2026-04-26 02:33:06 +08:00
parent 4906197c77
commit c07e521e4e
12 changed files with 265 additions and 348 deletions

View File

@@ -31,6 +31,13 @@ func (e *NewSel0) IsOwner() bool {
return e.ID().GetCatchTime() == source.CurPet[0].Info.CatchTime
}
func (e *NewSel0) CurrentSkillHit() bool {
if e.Ctx().SkillEntity == nil {
return false
}
return e.Ctx().SkillEntity.AttackTime != 0
}
// 免疫"能力(battle_lv)下降"
type NewSel1 struct {
NewSel0

View File

@@ -28,6 +28,9 @@ func (e *NewSel49) Action_end_ex() bool {
if e.Ctx().SkillEntity == nil {
return true
}
if !e.CurrentSkillHit() {
return true
}
if e.Ctx().SkillEntity.Category() == info.Category.PHYSICAL {
e.attackType = 1

View File

@@ -22,6 +22,9 @@ func (e *NewSel6) Action_end_ex() bool {
if e.Ctx().SkillEntity.Category() != info.Category.PHYSICAL {
return true
}
if !e.CurrentSkillHit() {
return true
}
// 3. 概率判定Args()[1]为触发概率)
success, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)

View File

@@ -23,6 +23,9 @@ func (e *NewSel74) Action_end_ex() bool {
if e.Ctx().SkillEntity.Category() == info.Category.STATUS {
return true
}
if !e.CurrentSkillHit() {
return true
}
// 检查概率是否触发
success, _, _ := e.Input.Player.Roll(int(e.Args()[0].IntPart()), 100)

View File

@@ -23,6 +23,9 @@ func (e *NewSel78) Action_end_ex() bool {
if e.Ctx().SkillEntity.Category() != info.Category.SPECIAL {
return true
}
if !e.CurrentSkillHit() {
return true
}
// 检查概率是否触发
success, _, _ := e.Input.Player.Roll(int(e.Args()[1].IntPart()), 100)

View File

@@ -19,9 +19,9 @@ import (
"sync/atomic"
"time"
configservice "blazing/modules/config/service"
"blazing/modules/player/model"
blservice "blazing/modules/player/service"
configservice "blazing/modules/config/service"
)
const (
@@ -583,7 +583,8 @@ func newQueueKey(player pvpwire.QueuePlayerSnapshot) queueKey {
func newBanPickStartInfo(match pvpwire.MatchFoundPayload, self, opponent pvpwire.QueuePlayerSnapshot) *fight.CrossServerBanPickStartOutboundInfo {
myPets := buildBanPickPetInfos(self.CatchTimes)
opponentPets := buildBanPickPetInfos(opponent.CatchTimes)
currentTianxuanPets := buildCurrentWeekTianxuanPetInfos()
myTianxuanPets := buildCurrentWeekTianxuanPetInfos(self.UserID)
opponentTianxuanPets := buildCurrentWeekTianxuanPetInfos(opponent.UserID)
return &fight.CrossServerBanPickStartOutboundInfo{
SessionID: match.SessionID,
OpponentUserID: opponent.UserID,
@@ -592,11 +593,11 @@ func newBanPickStartInfo(match pvpwire.MatchFoundPayload, self, opponent pvpwire
Status: self.Status,
TimeoutSeconds: match.BanPickTimeout,
SelectableCount: uint32(minInt(battlePetLimit(self.FightMode), len(myPets))),
TianxuanSelectableCount: uint32(len(currentTianxuanPets)),
TianxuanSelectableCount: uint32(len(myTianxuanPets)),
MyPets: myPets,
MyTianxuanPets: currentTianxuanPets,
MyTianxuanPets: myTianxuanPets,
OpponentPets: opponentPets,
OpponentTianxuanPets: currentTianxuanPets,
OpponentTianxuanPets: opponentTianxuanPets,
}
}
@@ -752,8 +753,8 @@ func buildTianxuanPetInfos(petIDs []uint32) []fight.CrossServerBanPickTianxuanPe
return result
}
func buildCurrentWeekTianxuanPetInfos() []fight.CrossServerBanPickTianxuanPetInfo {
petIDs, err := configservice.NewPeakTianxuanService().CurrentTianxuanPetIDs()
func buildCurrentWeekTianxuanPetInfos(playerID uint32) []fight.CrossServerBanPickTianxuanPetInfo {
petIDs, err := configservice.NewPeakTianxuanService().CurrentTianxuanPetIDs(playerID)
if err != nil {
return nil
}