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:
1 parent
44a7a77915
commit
77d1f93e8f
20 files changed
+333
-13
No files matched your search
+18
-11
@@ -497,18 +497,8 @@ int club_attraction(const ModernState& g, int team) {
|
||||
return std::clamp(v, 0, 100);
|
||||
}
|
||||
|
||||
void advertising_offers(ModernState& g, int manager, WatcomRandom& rand, MinuteReport& report) {
|
||||
(void)report;
|
||||
if (g.memory.u8(::bmh::layout::CareerDuration) == 1) return;
|
||||
AdvertisingBase advertising_base(ModernState& g, int manager) {
|
||||
Record rec = record(g, manager);
|
||||
if (manager == 0) {
|
||||
// "Es gibt neue Werbeangebote!" to every manager with a free advertising slot
|
||||
uint32_t mask = 0x80000000u;
|
||||
for (size_t m = 0; m < g.manager_teams.size(); m++)
|
||||
for (int k = 0; k < 0x10; k++)
|
||||
if (g.manager_records.at(m * kRecord + 0xa39 + size_t(k) * 0xc) == 0) mask |= 1u << m;
|
||||
if (mask != 0x80000000u) post_text(g, int64_t(mask), text_id(::bmh::layout::Weekly_AdvertisingOffers_TextPointer));
|
||||
}
|
||||
int score = int16_t(int8_t(modern::club_attraction(g, int16_t(rec.u16(0x290)))));
|
||||
if (g.memory.u8(::bmh::layout::GameMode) == 3 && g.league_rounds.at(size_t(league_of(int16_t(rec.u16(0x290))))) > 0x11) {
|
||||
int t = rec.i32(0x320) / 100000;
|
||||
@@ -521,6 +511,23 @@ void advertising_offers(ModernState& g, int manager, WatcomRandom& rand, MinuteR
|
||||
score = int16_t(score) * 100 / 0x78;
|
||||
int base = (int16_t(score) * 60000 + 1000000) / 0xc;
|
||||
base = ((0xb4 - g.level * 5) * base) / 100;
|
||||
return {score, base};
|
||||
}
|
||||
|
||||
void advertising_offers(ModernState& g, int manager, WatcomRandom& rand, MinuteReport& report) {
|
||||
(void)report;
|
||||
if (g.memory.u8(::bmh::layout::CareerDuration) == 1) return;
|
||||
Record rec = record(g, manager);
|
||||
if (manager == 0) {
|
||||
// "Es gibt neue Werbeangebote!" to every manager with a free advertising slot
|
||||
uint32_t mask = 0x80000000u;
|
||||
for (size_t m = 0; m < g.manager_teams.size(); m++)
|
||||
for (int k = 0; k < 0x10; k++)
|
||||
if (g.manager_records.at(m * kRecord + 0xa39 + size_t(k) * 0xc) == 0) mask |= 1u << m;
|
||||
if (mask != 0x80000000u) post_text(g, int64_t(mask), text_id(::bmh::layout::Weekly_AdvertisingOffers_TextPointer));
|
||||
}
|
||||
const AdvertisingBase value = modern::advertising_base(g, manager);
|
||||
const int score = value.score, base = value.base;
|
||||
for (int kind = 0; kind < 3; kind++)
|
||||
for (int k = 0; k < 10; k++) {
|
||||
const size_t o = 0x8cc + size_t(kind) * 0x78 + size_t(k) * 0xc;
|
||||
|
||||
Reference in new issue
Block a user