make repairs cost at least as much as 1% to avoid spam

This commit is contained in:
Crypto City 2021-02-04 13:59:51 +00:00
parent e05b4836ad
commit 802811ca78
3 changed files with 4 additions and 1 deletions

View File

@ -147,7 +147,8 @@
property). It is therefore in the player's interest to ensure buildings are repaired in time, and to
keep enough balance to meet land tax requirements. Repairing a building costs labour and materials.
If a building's repair level falls below 70%, its efficiency starts decreasing. Above 70%, no ill
effects apply.
effects apply. To disincentivize constant repair spam, repairing a building in 99% condition or
better costs as much as repairing it from 99%.
<br>
Some building types have restrictions on size, depending on economic power. This should be kept in
mind when buying land. The following table lists the minimum size of a plot for building types. The

View File

@ -987,6 +987,7 @@ void get_repair_costs(uint32_t x0, uint32_t y0, uint32_t x1, uint32_t y1, uint8_
costs.clear();
if (delta_repair == 0)
return;
delta_repair = std::max<uint32_t>(delta_repair, MIN_DELTA_REPAIR);
std::map<uint32_t, uint32_t> budget;
if (!get_build_settings_requirements(x0, y0, x1, y1, role, 100, budget))
return;

View File

@ -49,6 +49,7 @@
#define MAX_MATCHES_PER_TRADE 256
#define LAND_TAX_PER_TILE ((uint64_t)2000)
#define DEFAULT_REPAIR 1000000
#define MIN_DELTA_REPAIR 10000
#define INACTIVE_DECAY_PERCENTAGE 120
#define NO_MILITARY_DECAY_MULTIPLIER 150
#define MAYOR_PAYOUT 1/1000