Exclusive sponsor from training camp stays (Modern)

The Middle East camps share their grades but differ in price; a stay
can now bring an exclusive sponsor: 15 / 30 / 45 % per stay (Doha /
Abu Dhabi / Dubai), a shirt (about every third offer) or four boards at
twice the club's best regular offer for 12 months. Accepted on a free
place it starts at once, otherwise it is queued and starts at a month
change once the place is free. The offer goes through the regular
advertising acceptance.

Camp fields sponsor_chance / sponsor_bonus / sponsor_months (data
format F4, editable; built-in values for the Middle East camps), state
saved in state/modern.json, read query {kind: "sponsor"}, session action
dispatch_exclusive_sponsor, tests in modern_camp_tests, SIM_SPONSOR=1.
Sponsor artwork does not exist yet (asset: null, documented).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ClaudeandClaude Opus 5.5 committed 2026-10-25 09:15:38 +01:00
1 parent 44a7a77915
commit 77d1f93e8f
20 files changed
+333 -13

No files matched your search

+14
View File
@@ -493,6 +493,7 @@ int main(int argc, char** argv) {
bool listed_for_sale = false;
int ad_contracts = 0; // SIM_ADVERTISING: contracts accepted
int camp_stays = 0; // SIM_CAMP: training camp stays booked
int sponsor_offers = 0, sponsor_started = 0, sponsor_queued = 0; // SIM_SPONSOR
for (; played < turns; played++) {
// SIM_ADVERTISING=1: the manager keeps his advertising places filled, as every
// player does (the largest income besides the gate): an expired contract is renewed
@@ -506,6 +507,16 @@ int main(int argc, char** argv) {
if (modern::training_camp_booking_block(g, 0) == TrainingCampBookingBlock::none &&
modern::book_training_camp(g, 0, resort, session.rand()))
++camp_stays;
// SIM_SPONSOR=1: an exclusive sponsor offer from the stay is accepted
if (std::getenv("SIM_SPONSOR") && !g.exclusive_sponsors.empty() && g.exclusive_sponsors[0].offered) {
++sponsor_offers;
std::printf("exclusive sponsor offer at turn %d: %s, %u per month%s, %d months\n", played,
g.exclusive_sponsors[0].kind == 1 ? "shirt" : "4 boards", g.exclusive_sponsors[0].monthly,
g.exclusive_sponsors[0].kind == 1 ? "" : " per board", int(g.exclusive_sponsors[0].months));
const auto answer = modern::answer_exclusive_sponsor(g, 0, true);
sponsor_started += answer == modern::ExclusiveSponsorAnswer::started;
sponsor_queued += answer == modern::ExclusiveSponsorAnswer::queued;
}
}
// SIM_TOTO=<columns>: the manager plays the Toto whenever a coupon is open, 400,000 in
// all spread over the columns: the stronger side (team strength) wins, column k > 1
@@ -683,6 +694,9 @@ int main(int argc, char** argv) {
}
if (std::getenv("SIM_ADVERTISING")) std::printf("%d advertising contracts accepted (SIM_ADVERTISING=1)\n", ad_contracts);
if (std::getenv("SIM_CAMP")) std::printf("%d training camp stays (SIM_CAMP=%s)\n", camp_stays, std::getenv("SIM_CAMP"));
if (std::getenv("SIM_SPONSOR"))
std::printf("exclusive sponsors: %d offers, %d started at once, %d queued (SIM_SPONSOR=1)\n", sponsor_offers,
sponsor_started, sponsor_queued);
if (std::getenv("SIM_TOTO")) {
int won_coupons = 0;
std::printf("toto (SIM_TOTO=%s): %d coupons, paid %llu, won %llu, return %.1f %%; hits per column:", std::getenv("SIM_TOTO"),