feat(currency_wars): complete systems, settlement Rank SS, damage report, camera and recovery fixes

This commit is contained in:
CAtlas0784 committed 2026-10-31 20:47:36 +07:00
1 parent c008243f11
commit 0995055296
78 files changed
+33840 -9525

No files matched your search

+14 -53
View File
@@ -180,30 +180,8 @@ func cwSelectBonfire(c *common.CurrencyWarsCatalog, run *pb.MPIMAEMCEFH, request
}
stage, _ := cwStage(run)
key := fmt.Sprintf("BonfireChoice/%d/%d/", stage.DCAHJELNJNP, stage.SectionId)
if offer.Phase != pb.KMJMHDPPAKH_KMJMHDPPAKH_POMADDDKFHN {
return nil, nil, fmt.Errorf("CW Bonfire choice was already selected")
}
if request.GetNCGOOEMOBIC().GetLGAJNMNOAEM() {
book, e := common.LoadCurrencyWarsBonfire(c)
if e != nil { return nil, nil, e }
stage, _ := cwStage(run)
player, _, _ := cwComponents(run)
if stage == nil || player == nil || player.GridFightLineupHp > player.PPKKHHNEOHB {
return nil, nil, fmt.Errorf("CW Bonfire heal components invalid")
}
heal, ok := book.Heal[stage.DCAHJELNJNP]
if !ok { return nil, nil, fmt.Errorf("CW Bonfire chapter heal missing") }
hp := uint64(player.GridFightLineupHp) + uint64(heal)
if hp > uint64(player.PPKKHHNEOHB) { hp = uint64(player.PPKKHHNEOHB) }
player.GridFightLineupHp = uint32(hp)
// gfPendingMarkBonfireSelected uses phase 1 for both heal and option.
offer.Phase = pb.KMJMHDPPAKH_KMJMHDPPAKH_HLLKDFFMIEN
return cwNotify(
&pb.KFNCAIHIHCM{MNLCHEJKDHO: &pb.KFNCAIHIHCM_GridFightLineupHp{GridFightLineupHp: &pb.FMJDDIHBELC{GridFightLineupHp: player.GridFightLineupHp, PPKKHHNEOHB: player.PPKKHHNEOHB}}},
&pb.KFNCAIHIHCM{MNLCHEJKDHO: &pb.KFNCAIHIHCM_FMIGOKIDKJL{FMIGOKIDKJL: pending}},
), nil, nil
}
selectReq := request.GetNCGOOEMOBIC().GetALEGIFEHGLH()
action := request.GetNCGOOEMOBIC()
selectReq := action.GetALEGIFEHGLH()
replay := selectReq != nil && runtime.Rules[key+"event"] == selectReq.EventId && runtime.Rules[key+"option"] == selectReq.HAFOKMHCGFM
if selectReq != nil && !replay {
event, option, proven, proofErr := cwLegacyBonfireChoice(c, run, runtime)
@@ -212,44 +190,27 @@ func cwSelectBonfire(c *common.CurrencyWarsCatalog, run *pb.MPIMAEMCEFH, request
}
replay = proven && event == selectReq.EventId && option == selectReq.HAFOKMHCGFM
}
if selectReq == nil && request.GetNCGOOEMOBIC() != nil && runtime.Rules[key+"heal"] != 0 {
if selectReq == nil && action != nil && runtime.Rules[key+"heal"] != 0 {
replay = true
}
if replay {
return cwNotify(&pb.KFNCAIHIHCM{MNLCHEJKDHO: &pb.KFNCAIHIHCM_FMIGOKIDKJL{FMIGOKIDKJL: pending}}), runtime, nil
}
return nil, nil, fmt.Errorf("CW Bonfire option was already selected")
return cwNotify(&pb.KFNCAIHIHCM{MNLCHEJKDHO: &pb.KFNCAIHIHCM_FMIGOKIDKJL{FMIGOKIDKJL: pending}}), runtime, nil
}
if offer.Phase != cwBonfireChoosing && offer.Phase != pb.KMJMHDPPAKH_KMJMHDPPAKH_POMADDDKFHN {
return nil, nil, fmt.Errorf("CW Bonfire phase invalid")
}
if offer.Phase != pb.KMJMHDPPAKH_KMJMHDPPAKH_POMADDDKFHN {
return nil, nil, fmt.Errorf("CW Bonfire choice was already selected")
}
if request.GetNCGOOEMOBIC().GetLGAJNMNOAEM() {
book, e := common.LoadCurrencyWarsBonfire(c)
if e != nil { return nil, nil, e }
stage, _ := cwStage(run)
player, _, _ := cwComponents(run)
if stage == nil || player == nil || player.GridFightLineupHp > player.PPKKHHNEOHB {
return nil, nil, fmt.Errorf("CW Bonfire heal components invalid")
}
heal, ok := book.Heal[stage.DCAHJELNJNP]
if !ok { return nil, nil, fmt.Errorf("CW Bonfire chapter heal missing") }
hp := uint64(player.GridFightLineupHp) + uint64(heal)
if hp > uint64(player.PPKKHHNEOHB) { hp = uint64(player.PPKKHHNEOHB) }
player.GridFightLineupHp = uint32(hp)
// gfPendingMarkBonfireSelected uses phase 1 for both heal and option.
offer.Phase = pb.KMJMHDPPAKH_KMJMHDPPAKH_HLLKDFFMIEN
return cwNotify(
&pb.KFNCAIHIHCM{MNLCHEJKDHO: &pb.KFNCAIHIHCM_GridFightLineupHp{GridFightLineupHp: &pb.FMJDDIHBELC{GridFightLineupHp: player.GridFightLineupHp, PPKKHHNEOHB: player.PPKKHHNEOHB}}},
&pb.KFNCAIHIHCM{MNLCHEJKDHO: &pb.KFNCAIHIHCM_FMIGOKIDKJL{FMIGOKIDKJL: pending}},
), nil, nil
}
selectReq := request.GetNCGOOEMOBIC().GetALEGIFEHGLH()
action := request.GetNCGOOEMOBIC()
if action == nil {
return nil, nil, fmt.Errorf("CW Bonfire action missing")
}
selectReq := action.GetALEGIFEHGLH()
if selectReq == nil {
if _, ok := request.GetNCGOOEMOBIC().GetFFBBOFAGGDI().(*pb.MLAENDOFBCK_LGAJNMNOAEM); !ok {
return nil, nil, fmt.Errorf("CW Bonfire action missing")
if !action.GetLGAJNMNOAEM() {
if _, ok := action.GetFFBBOFAGGDI().(*pb.MLAENDOFBCK_LGAJNMNOAEM); !ok {
return nil, nil, fmt.Errorf("CW Bonfire action missing")
}
}
book, e := common.LoadCurrencyWarsBonfire(c)
if e != nil {
@@ -356,7 +317,7 @@ func cwTakeBonfire(c *common.CurrencyWarsCatalog, run *pb.MPIMAEMCEFH, offer *pb
}
notify.GCPNIHHBGGD = append(notify.GCPNIHHBGGD, added.GCPNIHHBGGD...)
}
next, err := cwAdvanceRouteNode(c, run)
next, err := cwAdvanceRouteNode(c, run, runtime)
if err != nil {
return nil, nil, err
}