Update formula for Zoological Mania bonus
Certain declarations now have their value boosted by 15% during Zoological Mania, rather than just 10%. The list of declarations is currently hardcoded, and may need to be updated in the future.
This commit is contained in:
parent
f7c8753c12
commit
7565f30d32
|
@ -1251,14 +1251,16 @@ def Solve(shadowy_level, bone_market_fluctuations, zoological_mania, occasional_
|
||||||
original_value = model.NewIntVar(0, cp_model.INT32_MAX, 'original value')
|
original_value = model.NewIntVar(0, cp_model.INT32_MAX, 'original value')
|
||||||
model.Add(original_value == cp_model.LinearExpr.ScalProd(actions.values(), [action.value.value for action in actions.keys()]))
|
model.Add(original_value == cp_model.LinearExpr.ScalProd(actions.values(), [action.value.value for action in actions.keys()]))
|
||||||
|
|
||||||
multiplied_value = model.NewIntVar(0, cp_model.INT32_MAX*11, 'multiplied value')
|
multiplier = 115 if zoological_mania in [Declaration.FISH, Declaration.INSECT, Declaration.SPIDER] else 110
|
||||||
model.Add(multiplied_value == original_value*11).OnlyEnforceIf(actions[zoological_mania])
|
|
||||||
model.Add(multiplied_value == original_value*10).OnlyEnforceIf(actions[zoological_mania].Not())
|
multiplied_value = model.NewIntVar(0, cp_model.INT32_MAX, 'multiplied value')
|
||||||
|
model.Add(multiplied_value == multiplier*original_value).OnlyEnforceIf(actions[zoological_mania])
|
||||||
|
model.Add(multiplied_value == 100*original_value).OnlyEnforceIf(actions[zoological_mania].Not())
|
||||||
|
|
||||||
value = model.NewIntVar(0, cp_model.INT32_MAX, 'value')
|
value = model.NewIntVar(0, cp_model.INT32_MAX, 'value')
|
||||||
model.AddDivisionEquality(value, multiplied_value, 10)
|
model.AddDivisionEquality(value, multiplied_value, 100)
|
||||||
|
|
||||||
del original_value, multiplied_value
|
del original_value, multiplier, multiplied_value
|
||||||
|
|
||||||
|
|
||||||
# Torso Style calculation
|
# Torso Style calculation
|
||||||
|
|
Loading…
Reference in New Issue