feat(currency_wars): complete systems, settlement Rank SS, damage report, camera and recovery fixes
This commit is contained in:
1 parent
c008243f11
commit
0995055296
78 files changed
+33840
-9525
No files matched your search
@@ -12,7 +12,7 @@ import (
|
||||
// reference workflow. The caller owns the detached snapshot and its single CAS
|
||||
// commit; this helper grants no rewards and never reads/writes a player save.
|
||||
// Saved route displays retain run-specific Tea Break/spotlight substitutions.
|
||||
func cwAdvanceRouteNode(catalog *common.CurrencyWarsCatalog, run *pb.MPIMAEMCEFH) (*pb.GridFightSyncUpdateResultScNotify, error) {
|
||||
func cwAdvanceRouteNode(catalog *common.CurrencyWarsCatalog, run *pb.MPIMAEMCEFH, runtime *common.CurrencyWarsRuntimeState) (*pb.GridFightSyncUpdateResultScNotify, error) {
|
||||
if run == nil || run.FMIGOKIDKJL == nil {
|
||||
return nil, fmt.Errorf("CW advance requires current pending queue")
|
||||
}
|
||||
@@ -71,8 +71,14 @@ func cwAdvanceRouteNode(catalog *common.CurrencyWarsCatalog, run *pb.MPIMAEMCEFH
|
||||
shadowStage.SectionId = next.SectionID
|
||||
shadowStage.IMPNAHBCADN = nil
|
||||
var layer *pb.NCKOKDHNJDC
|
||||
var difficulty *pb.KFNCAIHIHCM
|
||||
if template.NodeType == "Supply" {
|
||||
layer, err = cwCapturedSupplyLayer(catalog)
|
||||
} else if template.NodeType == "EliteBranch" {
|
||||
if runtime == nil || runtime.RunID != run.UniqueId {
|
||||
return nil, fmt.Errorf("CW generated Encounter requires matching runtime transaction")
|
||||
}
|
||||
layer, err = cwGenerateXaodevEncounter(catalog, shadow, display)
|
||||
} else {
|
||||
layer, err = cwGenerateReferenceEnemyLayer(catalog, shadow, display)
|
||||
}
|
||||
@@ -82,12 +88,50 @@ func cwAdvanceRouteNode(catalog *common.CurrencyWarsCatalog, run *pb.MPIMAEMCEFH
|
||||
if layer == nil {
|
||||
return nil, fmt.Errorf("CW generated next node layer missing")
|
||||
}
|
||||
hasBranchDiff := stage.ANJBLBEOJND != nil && stage.ANJBLBEOJND.PIFNOKAMBLL != nil && stage.ANJBLBEOJND.PIFNOKAMBLL[cwDifficultySourceBranch] != 0
|
||||
if template.NodeType == "EliteBranch" || cwXaodevGenerated(run, runtime) || hasBranchDiff {
|
||||
difficulty, err = cwXaodevDifficulty(catalog, shadow, 0)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
pending := &pb.CHCHAJIANIM{QueuePosition: queue + 1, FGLIODAJFML: &pb.CHCHAJIANIM_NNDGEJFLGGF{NNDGEJFLGGF: &pb.DPHPAKFLNOD{}}}
|
||||
stage.DCAHJELNJNP = next.ChapterID
|
||||
stage.SectionId = next.SectionID
|
||||
stage.IMPNAHBCADN = layer
|
||||
stage.ANJBLBEOJND = shadowStage.ANJBLBEOJND
|
||||
run.FMIGOKIDKJL = pending
|
||||
return cwNotify(cwFinish(queue), &pb.KFNCAIHIHCM{MNLCHEJKDHO: &pb.KFNCAIHIHCM_OOICHLAMNIG{OOICHLAMNIG: &pb.AINFNFIDGFF{DCAHJELNJNP: stage.DCAHJELNJNP, SectionId: stage.SectionId, IMPNAHBCADN: layer}}}, &pb.KFNCAIHIHCM{MNLCHEJKDHO: &pb.KFNCAIHIHCM_FMIGOKIDKJL{FMIGOKIDKJL: pending}}), nil
|
||||
if template.NodeType == "EliteBranch" {
|
||||
if runtime.Rules == nil {
|
||||
runtime.Rules = map[string]uint32{}
|
||||
}
|
||||
runtime.Rules[cwXaodevNodeKey(stage)] = 1
|
||||
}
|
||||
cwTrailblazeNodeEntered(catalog, run, runtime)
|
||||
cwSyncTraitComponent(catalog, run, runtime)
|
||||
notify := cwNotify(cwFinish(queue), &pb.KFNCAIHIHCM{MNLCHEJKDHO: &pb.KFNCAIHIHCM_OOICHLAMNIG{OOICHLAMNIG: &pb.AINFNFIDGFF{DCAHJELNJNP: stage.DCAHJELNJNP, SectionId: stage.SectionId, IMPNAHBCADN: layer}}})
|
||||
if difficulty != nil {
|
||||
notify.GCPNIHHBGGD[0].JKPJFKCBIEM = append(notify.GCPNIHHBGGD[0].JKPJFKCBIEM, difficulty)
|
||||
}
|
||||
if tbCat, err := common.LoadCurrencyWarsTrailblaze(); err == nil && (cwGetTrailblazeLayer(catalog, run) > 0 || (runtime != nil && runtime.Rules["TbOpened"] != 0)) {
|
||||
notify.GCPNIHHBGGD[0].JKPJFKCBIEM = append(notify.GCPNIHHBGGD[0].JKPJFKCBIEM,
|
||||
&pb.KFNCAIHIHCM{
|
||||
MNLCHEJKDHO: &pb.KFNCAIHIHCM_HKHJJCMKKJE{
|
||||
HKHJJCMKKJE: &pb.JLKCBOIFJKC{
|
||||
TraitId: cwTrailblazeTrait,
|
||||
ENPLACDLJGA: cwTrailblazeTraitEffectProto(tbCat, runtime),
|
||||
},
|
||||
},
|
||||
},
|
||||
&pb.KFNCAIHIHCM{
|
||||
MNLCHEJKDHO: &pb.KFNCAIHIHCM_GOOCHGKBIPN{
|
||||
GOOCHGKBIPN: cwTrailblazeModifierProto(tbCat, runtime),
|
||||
},
|
||||
},
|
||||
)
|
||||
}
|
||||
notify.GCPNIHHBGGD[0].JKPJFKCBIEM = append(notify.GCPNIHHBGGD[0].JKPJFKCBIEM, &pb.KFNCAIHIHCM{MNLCHEJKDHO: &pb.KFNCAIHIHCM_FMIGOKIDKJL{FMIGOKIDKJL: pending}})
|
||||
return notify, nil
|
||||
}
|
||||
|
||||
// cwGeneratedRoundPreparation handles the same RoundBegin -> shop refresh ->
|
||||
|
||||
Reference in new issue
Block a user