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]
|
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.
|
# 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)
|
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)]))
|
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(
|
first_term, *_ = model.NewIntermediateIntVar(
|
||||||
partialmethod(BoneMarketModel.AddMultiplicationEquality,
|
partialmethod(BoneMarketModel.AddMultiplicationEquality,
|
||||||
|
|
Loading…
Reference in New Issue