pre cw with probe and a bunch script to read game behavior
This commit is contained in:
1 parent
5120219ae2
commit
da8a32f60d
310 files changed
+219693
-872
No files matched your search
@@ -155,6 +155,10 @@ func decodeSetChallengeTierceLineupReq(payload []byte) (uint32, [][]uint32, []ui
|
||||
// Build challenge configuration from the selected resource stage, never from
|
||||
// Freesr custom monsters. Only the current session owns this configuration.
|
||||
func setChallengeBattleConfig(s *Session, avatars []uint32, challengeID, eventID uint32, buffs []uint32) error {
|
||||
return setChallengeBattleConfigWithLimit(s, avatars, challengeID, eventID, buffs, "", 0)
|
||||
}
|
||||
|
||||
func setChallengeBattleConfigWithLimit(s *Session, avatars []uint32, challengeID, eventID uint32, buffs []uint32, mode common.BattleType, limit uint32) error {
|
||||
stage, ok := getChallengeData().Stages[eventID]
|
||||
if !ok || len(stage.Monsters) == 0 {
|
||||
return fmt.Errorf("challenge stage %d has no resource waves", eventID)
|
||||
@@ -171,12 +175,20 @@ func setChallengeBattleConfig(s *Session, avatars []uint32, challengeID, eventID
|
||||
default:
|
||||
config.BattleType = common.BattleTypeDefault
|
||||
}
|
||||
// ChallengeCountDown is supplied by the installed challenge table.
|
||||
configID := challengeID
|
||||
if tierce, ok := getChallengeData().Tierce[challengeID]; ok {
|
||||
configID = tierce.PreChallengeID
|
||||
if mode != "" {
|
||||
config.BattleType = mode
|
||||
}
|
||||
// Peak IDs occupy a separate namespace from ChallengeMaze IDs. Its
|
||||
// explicit native limit must never be replaced by a same-numbered MoC row.
|
||||
config.CycleCount = limit
|
||||
if mode == "" {
|
||||
// ChallengeCountDown is supplied by the installed challenge table.
|
||||
configID := challengeID
|
||||
if tierce, ok := getChallengeData().Tierce[challengeID]; ok {
|
||||
configID = tierce.PreChallengeID
|
||||
}
|
||||
config.CycleCount = getChallengeData().Countdowns[configID]
|
||||
}
|
||||
config.CycleCount = getChallengeData().Countdowns[configID]
|
||||
if config.CycleCount == 0 {
|
||||
// AS/PF rows omit ChallengeCountDown. Their limits come from the
|
||||
// sourced challenge rules, not the user's custom battle configuration.
|
||||
|
||||
Reference in new issue
Block a user