feat: Add Exhibition skeleton

This is a transient buyer available during F.F. Gebrandt's Prelapsarian
Exhibition, the estival festival of 2022.

It pays out 110% of skeleton's value.
This commit is contained in:
Jeremy Saklad 2022-07-26 12:42:03 -05:00
parent 92e734d5d2
commit aeaaf77900
Signed by: Jeremy Saklad
GPG Key ID: 94B02EA3D0B6481B
2 changed files with 27 additions and 1 deletions

View File

@ -121,6 +121,10 @@ class Buyer(Enum):
cost = Cost.ACTION.value
)
EXHIBITION = Action(
"Supply a complete skeleton",
cost = Cost.ACTION.value
)
THE_DUMBWAITER_OF_BALMORAL = Action(
"Export the Skeleton of a Neathy Bird",
cost = Cost.ACTION.value

View File

@ -23,7 +23,7 @@ from .data.torsos import Torso
from .objects.bone_market_model import BoneMarketModel
# This multiplier is applied to the profit margin to avoid losing precision due to rounding.
PROFIT_MARGIN_MULTIPLIER = 10000
PROFIT_MARGIN_MULTIPLIER = 100
# This is the highest number of attribute to calculate fractional exponents for.
MAXIMUM_ATTRIBUTE = 100
@ -1088,6 +1088,28 @@ def Solve(shadowy_level, bone_market_fluctuations = None, zoological_mania = Non
),
)
# Exhibition
exhibition_payout = model.NewIntVar('exhibition payout', lb = 0)
multiplied_exhibition_value = model.NewIntVar('multiplied exhibition value', lb = 0)
model.Add(multiplied_exhibition_value == 11*value)
model.AddDivisionEquality(exhibition_payout, multiplied_exhibition_value, 10)
model.AddIf(actions[Buyer.EXHIBITION],
cp_model.BoundedLinearExpression(skeleton_in_progress, (110, 212)),
implausibility == 0,
value >= 90000,
antiquity >= 3,
amalgamy == 0,
primary_revenue == exhibition_payout,
secondary_revenue == 0,
difficulty_level == 0,
added_exhaustion == 0,
)
del exhibition_payout, multiplied_exhibition_value
model.AddIf(actions[Buyer.THE_DUMBWAITER_OF_BALMORAL],
cp_model.BoundedLinearExpression(skeleton_in_progress, (180, 189)),
value >= 250,