fix: Correct segmented ribcage cost
When using a Segmented Ribcage as a tail, the cost in Nevercold Brass is calculated before the additional segment is taken into account.
This commit is contained in:
parent
d6178ba241
commit
0c2a1a0515
|
@ -337,8 +337,8 @@ def Solve(shadowy_level, bone_market_fluctuations = None, zoological_mania = Non
|
|||
add_segments = actions[Appendage.SEGMENTED_RIBCAGE]
|
||||
|
||||
# Additional segments may be added once the torso and skulls are chosen, so the sum of their properties are the starting point.
|
||||
base_segments = model.NewIntVar('base segments', lb = 0)
|
||||
model.Add(base_segments == cp_model.LinearExpr.WeightedSum([value for (key, value) in actions.items() if isinstance(key, (Torso, Skull))], [action.value.segments for action in chain(Torso, Skull)]))
|
||||
base_segments = model.NewIntVar('base segments', lb = -1)
|
||||
model.Add(base_segments == cp_model.LinearExpr.WeightedSum([value for (key, value) in actions.items() if isinstance(key, (Torso, Skull))], [action.value.segments for action in chain(Torso, Skull)]) - 1)
|
||||
|
||||
first_term, *_ = model.NewIntermediateIntVar(
|
||||
partialmethod(BoneMarketModel.AddMultiplicationEquality,
|
||||
|
|
Loading…
Reference in New Issue