1
0
Fork 0

Change: Bribing if other co has excl. rights

Motivation / Problem

A bribe can void an Exclusive Transport Rights constract,
but it is not possible to bribe a town that already has
an outstanding opinion of you. This causes a lockout where
a popular company can not attempt to void a contract,
making it much easier to use exclusive transport rights
in an offensive manner than as a defensive measure.

Description

This fixes so that bribing is possible if:
- The bribery setting is enabled AND
- You have a lower than Outstanding rating in the town OR
  - Someone else currently has an Exclusive Transport Rights
    contract with the town.

Limitations

N/A
pull/12763/head
Björn Wärmedal 2024-06-04 16:13:23 +02:00
parent 219995c643
commit b1f72760ed
1 changed files with 11 additions and 2 deletions

View File

@ -3575,8 +3575,17 @@ TownActions GetMaskOfTownActions(CompanyID cid, const Town *t)
for (uint i = 0; i != lengthof(_town_action_costs); i++) {
const TownActions cur = (TownActions)(1 << i);
/* Is the company not able to bribe ? */
if (cur == TACT_BRIBE && (!_settings_game.economy.bribe || t->ratings[cid] >= RATING_BRIBE_MAXIMUM)) continue;
/* Is the company prohibited from bribing ? */
if (cur == TACT_BRIBE) {
/* Company can't bribe if setting is disabled */
if (!_settings_game.economy.bribe) continue;
/* Company can bribe if another company has exclusive transport rights,
* or its standing with the town is less than outstanding. */
if (t->ratings[cid] >= RATING_BRIBE_MAXIMUM) {
if (t->exclusivity == _current_company) continue;
if (t->exclusive_counter == 0) continue;
}
}
/* Is the company not able to buy exclusive rights ? */
if (cur == TACT_BUY_RIGHTS && (!_settings_game.economy.exclusive_rights || t->exclusive_counter != 0)) continue;