feat: 支持单人宠物对战模式
Some checks failed
ci/woodpecker/push/my-first-workflow Pipeline failed

This commit is contained in:
xinian
2026-03-23 22:25:07 +08:00
committed by cnb
parent 41a1bfb0c2
commit d8366616e0
3 changed files with 24 additions and 66 deletions

View File

@@ -54,8 +54,13 @@ func (h Controller) OnPlayerHandleFightInvite(data *fight.HandleFightInviteInbou
atomic.StoreUint32(&c.Fightinfo.Mode, 0)
return
}
_, err = fight.NewFight(v, c, v.GetPetInfo(100), c.GetPetInfo(100), func(foi model.FightOverInfo) {
var u1, u2 []model.PetInfo
if data.Mode == info.BattleMode.SINGLE_MODE {
u1, u2 = v.GetInfo().PetList[:1], c.GetInfo().PetList[:1]
} else {
u1, u2 = v.GetInfo().PetList, c.GetInfo().PetList
}
_, err = fight.NewFight(v, c, u1, u2, func(foi model.FightOverInfo) {
//println("好友对战测试", foi.Reason)