diff --git a/src/building/building.c b/src/building/building.c index f3d90278b5..84f5369629 100644 --- a/src/building/building.c +++ b/src/building/building.c @@ -850,6 +850,22 @@ int building_is_venus_temple(building_type type) return (type == BUILDING_SMALL_TEMPLE_VENUS || type == BUILDING_LARGE_TEMPLE_VENUS); } +int building_is_temple(building_type type) +{ + return building_is_ceres_temple(type) || building_is_neptune_temple(type) || + building_is_mercury_temple(type) || building_is_mars_temple(type) || + building_is_venus_temple(type) || + type == BUILDING_GRAND_TEMPLE_CERES || type == BUILDING_GRAND_TEMPLE_NEPTUNE || type == BUILDING_PANTHEON || + type == BUILDING_GRAND_TEMPLE_MERCURY || type == BUILDING_GRAND_TEMPLE_MARS || + type == BUILDING_GRAND_TEMPLE_VENUS || type == BUILDING_GRAND_TEMPLE_VENUS_REWORKED || + type == BUILDING_GRAND_TEMPLE_CERES_REWORKED || type == BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED || + type == BUILDING_GRAND_TEMPLE_MERCURY_REWORKED || type == BUILDING_GRAND_TEMPLE_MARS_REWORKED || + type == BUILDING_PANTHEON_REWORKED || + type == BUILDING_ORACLE || type == BUILDING_LARARIUM || type == BUILDING_NYMPHAEUM || + type == BUILDING_SHRINE_CERES || type == BUILDING_SHRINE_NEPTUNE || type == BUILDING_SHRINE_MERCURY || + type == BUILDING_SHRINE_MARS || type == BUILDING_SHRINE_VENUS; + } + // All buildings capable of collecting and storing goods as a market int building_has_supplier_inventory(building_type type) { @@ -921,7 +937,7 @@ int building_get_levy(const building *b) // Pantheon base bonus - if (building_monument_working(BUILDING_PANTHEON) && + if ((building_monument_working(BUILDING_PANTHEON) || building_monument_working(BUILDING_PANTHEON_REWORKED)) && ((b->type >= BUILDING_SMALL_TEMPLE_CERES && b->type <= BUILDING_LARGE_TEMPLE_VENUS) || (b->type >= BUILDING_GRAND_TEMPLE_CERES && b->type <= BUILDING_GRAND_TEMPLE_VENUS) || b->type == BUILDING_ORACLE || b->type == BUILDING_NYMPHAEUM || b->type == BUILDING_SMALL_MAUSOLEUM || diff --git a/src/building/building.h b/src/building/building.h index d43d68ddd1..b503d2bc88 100644 --- a/src/building/building.h +++ b/src/building/building.h @@ -272,6 +272,8 @@ int building_is_mars_temple(building_type type); int building_is_venus_temple(building_type type); +int building_is_temple(building_type type); + int building_has_supplier_inventory(building_type type); int building_is_house_group(house_groups group, building_type type); diff --git a/src/building/construction.c b/src/building/construction.c index 91e09c65f2..3d60f8fefc 100644 --- a/src/building/construction.c +++ b/src/building/construction.c @@ -783,9 +783,6 @@ static int should_mark_for_construction(building_type type) return 0; } else if (building_monument_get_id(type)) { return 0; - } else if (building_monument_is_grand_temple(type) && - building_monument_count_grand_temples() >= config_get(CONFIG_GP_CH_MAX_GRAND_TEMPLES)) { - return 0; } else if (type == BUILDING_AQUEDUCT) { return 0; } diff --git a/src/building/construction_building.c b/src/building/construction_building.c index 583b279a88..55341eab9e 100644 --- a/src/building/construction_building.c +++ b/src/building/construction_building.c @@ -327,10 +327,16 @@ static void add_to_map(int type, building *b, int size, int orientation, int wat case BUILDING_GRAND_TEMPLE_MERCURY: case BUILDING_GRAND_TEMPLE_MARS: case BUILDING_GRAND_TEMPLE_VENUS: + case BUILDING_GRAND_TEMPLE_VENUS_REWORKED: + case BUILDING_GRAND_TEMPLE_CERES_REWORKED: + case BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED: + case BUILDING_GRAND_TEMPLE_MERCURY_REWORKED: + case BUILDING_GRAND_TEMPLE_MARS_REWORKED: case BUILDING_PANTHEON: + case BUILDING_PANTHEON_REWORKED: map_tiles_update_area_roads(b->x, b->y, 9); building_monument_set_phase(b, MONUMENT_START); - if (type == BUILDING_GRAND_TEMPLE_MARS) { + if (type == BUILDING_GRAND_TEMPLE_MARS || type == BUILDING_GRAND_TEMPLE_MARS_REWORKED) { b->accepted_goods[RESOURCE_WEAPONS] = 1; b->accepted_goods[RESOURCE_NONE] = 1; } @@ -574,11 +580,6 @@ int building_construction_place_building(building_type type, int x, int y, int e return 0; } - if (building_monument_is_grand_temple(type) && - building_monument_count_grand_temples() >= config_get(CONFIG_GP_CH_MAX_GRAND_TEMPLES)) { - city_warning_show(WARNING_MAX_GRAND_TEMPLES, NEW_WARNING_SLOT); - return 0; - } if (type == BUILDING_COLOSSEUM) { if (building_count_total(BUILDING_COLOSSEUM)) { city_warning_show(WARNING_ONE_BUILDING_OF_TYPE, NEW_WARNING_SLOT); diff --git a/src/building/count.c b/src/building/count.c index 2275910ea1..78cf67b161 100644 --- a/src/building/count.c +++ b/src/building/count.c @@ -51,7 +51,9 @@ static const building_type building_set_large_temples[] = { static const building_type building_set_grand_temples[] = { BUILDING_GRAND_TEMPLE_CERES, BUILDING_GRAND_TEMPLE_NEPTUNE, BUILDING_GRAND_TEMPLE_MERCURY, BUILDING_GRAND_TEMPLE_MARS, - BUILDING_GRAND_TEMPLE_VENUS, BUILDING_PANTHEON + BUILDING_GRAND_TEMPLE_VENUS, BUILDING_PANTHEON, + BUILDING_GRAND_TEMPLE_CERES_REWORKED, BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED, BUILDING_GRAND_TEMPLE_MERCURY_REWORKED, + BUILDING_GRAND_TEMPLE_MARS_REWORKED, BUILDING_GRAND_TEMPLE_VENUS_REWORKED, BUILDING_PANTHEON_REWORKED }; #define BUILDING_SET_SIZE_GRAND_TEMPLES (sizeof(building_set_grand_temples) / sizeof(building_type)) diff --git a/src/building/figure.c b/src/building/figure.c index ac1e98971f..232183b12a 100644 --- a/src/building/figure.c +++ b/src/building/figure.c @@ -1336,11 +1336,26 @@ static void spawn_figure_senate_forum(building *b) set_forum_graphic(b); } check_labor_problem(b); + + map_point road; + int has_road = map_has_road_access(b->x, b->y, b->size, &road); + + // Module 1: Senate sends a roaming Pantheon priest (tracked in figure_id2) + if (b->type == BUILDING_SENATE && has_road && + building_monument_gt_module_is_active(PANTHEON_MODULE_3_SENATE)) { + if (!b->figure_id2 || figure_get(b->figure_id2)->state == FIGURE_STATE_DEAD) { + figure *priest = figure_create(FIGURE_PRIEST, road.x, road.y, DIR_0_TOP); + priest->action_state = FIGURE_ACTION_125_ROAMING; + priest->building_id = b->id; + b->figure_id2 = priest->id; + figure_movement_init_roaming(priest); + } + } + if (has_figure_of_type(b, FIGURE_TAX_COLLECTOR)) { return; } - map_point road; - if (map_has_road_access(b->x, b->y, b->size, &road)) { + if (has_road) { spawn_labor_seeker(b, road.x, road.y, 50); int pct_workers = worker_percentage(b); int spawn_delay; @@ -1612,6 +1627,17 @@ static void spawn_figure_barracks(building *b) spawn_delay += city_data.mess_hall.food_stress_cumulative - 20; } + // Mars Reworked Module 2: barracks trains 12% faster per food type at supply post + if (building_monument_gt_module_is_active(MARS_MODULE_4_BARRACKS_VICTORY)) { + int reduction = 12 * city_data.mess_hall.food_types; + if (reduction > 0) { + spawn_delay = calc_adjust_with_percentage(spawn_delay, 100 - reduction); + if (spawn_delay < 1) { + spawn_delay = 1; + } + } + } + b->figure_spawn_delay++; if (b->figure_spawn_delay > spawn_delay) { b->figure_spawn_delay = 0; @@ -2131,7 +2157,13 @@ void building_figure_generate(void) case BUILDING_GRAND_TEMPLE_NEPTUNE: case BUILDING_GRAND_TEMPLE_MERCURY: case BUILDING_GRAND_TEMPLE_VENUS: + case BUILDING_GRAND_TEMPLE_VENUS_REWORKED: + case BUILDING_GRAND_TEMPLE_CERES_REWORKED: + case BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED: + case BUILDING_GRAND_TEMPLE_MERCURY_REWORKED: + case BUILDING_GRAND_TEMPLE_MARS_REWORKED: case BUILDING_PANTHEON: + case BUILDING_PANTHEON_REWORKED: spawn_figure_temple(b); break; case BUILDING_LIGHTHOUSE: diff --git a/src/building/house_evolution.c b/src/building/house_evolution.c index 574c18a23b..340ba826e6 100644 --- a/src/building/house_evolution.c +++ b/src/building/house_evolution.c @@ -4,6 +4,7 @@ #include "building/monument.h" #include "building/properties.h" #include "city/houses.h" +#include "city/ratings.h" #include "city/resource.h" #include "core/calc.h" #include "core/config.h" @@ -194,7 +195,8 @@ static int has_required_goods_and_services(building *house, int for_upgrade, int static int check_requirements(building *house, house_demands *demands) { int bonus = 0; - if (building_monument_pantheon_module_is_active(PANTHEON_MODULE_2_HOUSING_EVOLUTION) && house->house_pantheon_access) { + if ((building_monument_pantheon_module_is_active(PANTHEON_MODULE_2_HOUSING_EVOLUTION) || + building_monument_working(BUILDING_PANTHEON_REWORKED)) && house->house_pantheon_access) { bonus++; } int status = check_evolve_desirability(house, bonus); @@ -506,7 +508,8 @@ static int evolve_large_palace(building *house, house_demands *demands) static int evolve_luxury_palace(building *house, house_demands *demands) { - int bonus = (int) (building_monument_pantheon_module_is_active(PANTHEON_MODULE_2_HOUSING_EVOLUTION) && house->house_pantheon_access); + int bonus = (int) ((building_monument_pantheon_module_is_active(PANTHEON_MODULE_2_HOUSING_EVOLUTION) || + building_monument_working(BUILDING_PANTHEON_REWORKED)) && house->house_pantheon_access); int status = check_evolve_desirability(house, bonus); if (!has_required_goods_and_services(house, 0, bonus, demands)) { status = DEVOLVE; @@ -542,13 +545,29 @@ static void consume_resources(building *b) consumption_reduction[RESOURCE_WINE] += 20; consumption_reduction[RESOURCE_OIL] += 20; } - // mars module 2 - all goods reduced by 10% + // mars module 2 - all goods reduced by 10% if (b->data.house.temple_mars && building_monument_gt_module_is_active(MARS_MODULE_2_ALL_GOODS)) { consumption_reduction[RESOURCE_WINE] += 10; consumption_reduction[RESOURCE_OIL] += 10; consumption_reduction[RESOURCE_POTTERY] += 10; consumption_reduction[RESOURCE_FURNITURE] += 10; } + // Mercury Reworked base bonus - all goods reduced by (house happiness / 10)% + if (b->data.house.temple_mercury && building_monument_working(BUILDING_GRAND_TEMPLE_MERCURY_REWORKED)) { + int sentiment_reduction = b->sentiment.house_happiness / 10; // 0-10% based on house happiness + consumption_reduction[RESOURCE_WINE] += sentiment_reduction; + consumption_reduction[RESOURCE_OIL] += sentiment_reduction; + consumption_reduction[RESOURCE_POTTERY] += sentiment_reduction; + consumption_reduction[RESOURCE_FURNITURE] += sentiment_reduction; + } + // Mercury Reworked module 4 bonus - all goods reduced by (city prosperity / 10)% + if (b->data.house.temple_mercury && building_monument_gt_module_is_active(MERCURY_MODULE_4_PROSPERITY)) { + int prosperity_reduction = city_rating_prosperity() / 10; + consumption_reduction[RESOURCE_WINE] += prosperity_reduction; + consumption_reduction[RESOURCE_OIL] += prosperity_reduction; + consumption_reduction[RESOURCE_POTTERY] += prosperity_reduction; + consumption_reduction[RESOURCE_FURNITURE] += prosperity_reduction; + } for (resource_type r = RESOURCE_MIN_NON_FOOD; r < RESOURCE_MAX_NON_FOOD; r++) { if (!resource_is_inventory(r)) { @@ -609,7 +628,8 @@ void building_house_process_evolve_and_consume_goods(void) void building_house_determine_evolve_text(building *house, int worst_desirability_building) { int level = house->subtype.house_level; - if (building_monument_pantheon_module_is_active(PANTHEON_MODULE_2_HOUSING_EVOLUTION) && house->house_pantheon_access) { + if ((building_monument_pantheon_module_is_active(PANTHEON_MODULE_2_HOUSING_EVOLUTION) || + building_monument_working(BUILDING_PANTHEON_REWORKED)) && house->house_pantheon_access) { level--; } level = calc_bound(level, HOUSE_MIN, HOUSE_MAX); diff --git a/src/building/house_population.c b/src/building/house_population.c index 4b10364a58..8ea870e5dc 100644 --- a/src/building/house_population.c +++ b/src/building/house_population.c @@ -66,6 +66,16 @@ int house_population_get_capacity(building *house) house->data.house.temple_neptune) { max_pop += (max_pop + 1) / 20; } + // Pantheon Reworked Module 2: Luxury Palaces +10% capacity + if (building_monument_gt_module_is_active(PANTHEON_MODULE_4_LUXURY_PALACE) && + house->type == BUILDING_HOUSE_LUXURY_PALACE) { + max_pop += max_pop / 10; + } + // Mars Reworked base: +5% capacity for houses with Mars temple access + if (building_monument_working(BUILDING_GRAND_TEMPLE_MARS_REWORKED) && + house->data.house.temple_mars) { + max_pop += (max_pop + 1) / 20; + } return max_pop; } diff --git a/src/building/house_service.c b/src/building/house_service.c index 72af823b34..7c01a0d6a4 100644 --- a/src/building/house_service.c +++ b/src/building/house_service.c @@ -78,6 +78,8 @@ void house_service_decay_houses_covered(void) void house_service_calculate_culture_aggregates(void) { int venus_module2 = building_monument_gt_module_is_active(VENUS_MODULE_2_DESIRABILITY_ENTERTAINMENT); + int venus_module4 = building_monument_gt_module_is_active(VENUS_MODULE_4_THEATER_TAVERN); + venus_m4_variant venus_m4_type = venus_module4 ? building_monument_venus_m4_variant() : VENUS_M4_THEATER_TAVERN; int completed_colosseum = building_monument_working(BUILDING_COLOSSEUM); int completed_hippodrome = building_monument_working(BUILDING_HIPPODROME); @@ -138,6 +140,24 @@ void house_service_calculate_culture_aggregates(void) b->data.house.entertainment += 10; } + // Venus Module 4 Bonus (variant depends on scenario) + if (venus_module4) { + switch (venus_m4_type) { + case VENUS_M4_THEATER_TAVERN: + if (b->data.house.theater) { b->data.house.entertainment += 5; } + if (b->house_tavern_wine_access) { b->data.house.entertainment += 5; } + break; + case VENUS_M4_THEATER_BATHHOUSE: + if (b->data.house.theater) { b->data.house.entertainment += 5; } + if (b->data.house.bathhouse) { b->data.house.entertainment += 5; } + break; + case VENUS_M4_BATHHOUSE_TAVERN: + if (b->data.house.bathhouse) { b->data.house.entertainment += 5; } + if (b->house_tavern_wine_access) { b->data.house.entertainment += 5; } + break; + } + } + // Education b->data.house.education = 0; if (b->data.house.school || b->data.house.library) { diff --git a/src/building/image.c b/src/building/image.c index 0b6512a272..fe9d4c2ed9 100644 --- a/src/building/image.c +++ b/src/building/image.c @@ -580,6 +580,7 @@ int building_image_get(const building *b) case BUILDING_NATIVE_CROPS: return image_group(GROUP_BUILDING_FARM_CROPS); case BUILDING_GRAND_TEMPLE_CERES: + case BUILDING_GRAND_TEMPLE_CERES_REWORKED: switch (b->monument.phase) { case MONUMENT_START: return assets_get_image_id("Monuments", "Ceres Complex Const 01"); @@ -623,7 +624,30 @@ int building_image_get(const building *b) return assets_get_image_id("Monuments", "Neptune Complex On"); } } + case BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED: + switch (b->monument.phase) { + case MONUMENT_START: + return assets_get_image_id("Monuments", "Neptune Complex Const 01"); + case 2: + return assets_get_image_id("Monuments", "Neptune Complex Const 02"); + case 3: + return assets_get_image_id("Monuments", "Neptune Complex Const 03"); + case 4: + return assets_get_image_id("Monuments", "Neptune Complex Const 04"); + case 5: + return assets_get_image_id("Monuments", "Neptune Complex Const 05"); + default: + switch (b->monument.upgrades) { + case 1: + return assets_get_image_id("Monuments", "Neptune Complex Module2"); + case 2: + return assets_get_image_id("Monuments", "Neptune Complex Module"); + default: + return assets_get_image_id("Monuments", "Neptune Complex On"); + } + } case BUILDING_GRAND_TEMPLE_MERCURY: + case BUILDING_GRAND_TEMPLE_MERCURY_REWORKED: switch (b->monument.phase) { case MONUMENT_START: return assets_get_image_id("Monuments", "Mercury Complex Const 01"); @@ -646,6 +670,7 @@ int building_image_get(const building *b) } } case BUILDING_GRAND_TEMPLE_MARS: + case BUILDING_GRAND_TEMPLE_MARS_REWORKED: switch (b->monument.phase) { case MONUMENT_START: return assets_get_image_id("Monuments", "Mars Complex Const 01"); @@ -668,6 +693,7 @@ int building_image_get(const building *b) } } case BUILDING_GRAND_TEMPLE_VENUS: + case BUILDING_GRAND_TEMPLE_VENUS_REWORKED: switch (b->monument.phase) { case MONUMENT_START: return assets_get_image_id("Monuments", "Venus Complex Const 01"); @@ -690,6 +716,7 @@ int building_image_get(const building *b) } } case BUILDING_PANTHEON: + case BUILDING_PANTHEON_REWORKED: switch (b->monument.phase) { case MONUMENT_START: return assets_get_image_id("Monuments", "Pantheon Const 01"); diff --git a/src/building/menu.c b/src/building/menu.c index 2eb64bcfb1..5410aca0fb 100644 --- a/src/building/menu.c +++ b/src/building/menu.c @@ -5,6 +5,7 @@ #include "city/buildings.h" #include "core/config.h" #include "empire/city.h" +#include "game/cheats.h" #include "game/tutorial.h" #include "scenario/allowed_building.h" #include "scenario/property.h" @@ -50,8 +51,10 @@ static const building_type MENU_BUILDING_TYPE[BUILD_MENU_MAX][BUILD_MENU_ITEM_MA BUILDING_PALM_TREE, BUILDING_DATE_TREE, 0}, {BUILDING_MENU_PATHS, BUILDING_GARDEN_PATH, BUILDING_PINE_PATH , BUILDING_FIR_PATH, BUILDING_OAK_PATH, BUILDING_ELM_PATH, BUILDING_FIG_PATH, BUILDING_PLUM_PATH, BUILDING_PALM_PATH, BUILDING_DATE_PATH, 0}, - {BUILDING_PANTHEON, BUILDING_GRAND_TEMPLE_CERES, BUILDING_GRAND_TEMPLE_NEPTUNE, BUILDING_GRAND_TEMPLE_MERCURY, - BUILDING_GRAND_TEMPLE_MARS, BUILDING_GRAND_TEMPLE_VENUS, 0}, + {BUILDING_PANTHEON, BUILDING_PANTHEON_REWORKED, BUILDING_GRAND_TEMPLE_CERES, BUILDING_GRAND_TEMPLE_CERES_REWORKED, + BUILDING_GRAND_TEMPLE_NEPTUNE, BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED, BUILDING_GRAND_TEMPLE_MERCURY, + BUILDING_GRAND_TEMPLE_MERCURY_REWORKED, BUILDING_GRAND_TEMPLE_MARS, BUILDING_GRAND_TEMPLE_MARS_REWORKED, + BUILDING_GRAND_TEMPLE_VENUS, BUILDING_GRAND_TEMPLE_VENUS_REWORKED, 0}, {BUILDING_SMALL_STATUE, BUILDING_GODDESS_STATUE, BUILDING_SENATOR_STATUE, BUILDING_GLADIATOR_STATUE, BUILDING_DECORATIVE_COLUMN, BUILDING_MEDIUM_STATUE, BUILDING_LEGION_STATUE, BUILDING_OBELISK, BUILDING_LARGE_STATUE, BUILDING_HORSE_STATUE, 0}, {BUILDING_GOVERNORS_HOUSE, BUILDING_GOVERNORS_VILLA, BUILDING_GOVERNORS_PALACE, 0}, @@ -136,6 +139,15 @@ static int can_get_required_resource(building_type type) static int is_building_type_allowed(building_type type) { + // All 6 old grand temples require a cheat to be active + if (type == BUILDING_PANTHEON || + type == BUILDING_GRAND_TEMPLE_CERES || + type == BUILDING_GRAND_TEMPLE_NEPTUNE || + type == BUILDING_GRAND_TEMPLE_MERCURY || + type == BUILDING_GRAND_TEMPLE_MARS || + type == BUILDING_GRAND_TEMPLE_VENUS) { + return game_cheat_legacy_gts_enabled() && scenario_allowed_building(type) && can_get_required_resource(type); + } return scenario_allowed_building(type) && can_get_required_resource(type); } diff --git a/src/building/monument.c b/src/building/monument.c index 17aeabda7c..e5b8ccab19 100644 --- a/src/building/monument.c +++ b/src/building/monument.c @@ -15,6 +15,7 @@ #include "map/orientation.h" #include "map/road_access.h" #include "map/terrain.h" +#include "scenario/allowed_building.h" #include "scenario/property.h" #define DELIVERY_ARRAY_SIZE_STEP 200 @@ -160,6 +161,12 @@ static const monument_type *MONUMENT_TYPES[BUILDING_TYPE_MAX] = { [BUILDING_GRAND_TEMPLE_MERCURY] = &grand_temple, [BUILDING_GRAND_TEMPLE_MARS] = &grand_temple, [BUILDING_GRAND_TEMPLE_VENUS] = &grand_temple, + [BUILDING_GRAND_TEMPLE_VENUS_REWORKED] = &grand_temple, + [BUILDING_GRAND_TEMPLE_CERES_REWORKED] = &grand_temple, + [BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED] = &grand_temple, + [BUILDING_GRAND_TEMPLE_MERCURY_REWORKED] = &grand_temple, + [BUILDING_GRAND_TEMPLE_MARS_REWORKED] = &grand_temple, + [BUILDING_PANTHEON_REWORKED] = &pantheon, [BUILDING_PANTHEON] = &pantheon, [BUILDING_ORACLE] = &oracle, [BUILDING_LARGE_TEMPLE_CERES] = &large_temple, @@ -283,7 +290,13 @@ int building_monument_is_limited(building_type type) case BUILDING_GRAND_TEMPLE_MERCURY: case BUILDING_GRAND_TEMPLE_MARS: case BUILDING_GRAND_TEMPLE_VENUS: + case BUILDING_GRAND_TEMPLE_VENUS_REWORKED: + case BUILDING_GRAND_TEMPLE_CERES_REWORKED: + case BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED: + case BUILDING_GRAND_TEMPLE_MERCURY_REWORKED: + case BUILDING_GRAND_TEMPLE_MARS_REWORKED: case BUILDING_PANTHEON: + case BUILDING_PANTHEON_REWORKED: case BUILDING_LIGHTHOUSE: case BUILDING_CARAVANSERAI: case BUILDING_COLOSSEUM: @@ -398,6 +411,11 @@ int building_monument_is_grand_temple(building_type type) case BUILDING_GRAND_TEMPLE_MERCURY: case BUILDING_GRAND_TEMPLE_MARS: case BUILDING_GRAND_TEMPLE_VENUS: + case BUILDING_GRAND_TEMPLE_VENUS_REWORKED: + case BUILDING_GRAND_TEMPLE_CERES_REWORKED: + case BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED: + case BUILDING_GRAND_TEMPLE_MERCURY_REWORKED: + case BUILDING_GRAND_TEMPLE_MARS_REWORKED: return 1; default: return 0; @@ -436,6 +454,12 @@ int building_monument_get_neptune_gt(void) return monument ? monument->id : 0; } +int building_monument_get_neptune_reworked_gt(void) +{ + building *monument = building_first_of_type(BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED); + return monument ? monument->id : 0; +} + int building_monument_phases(building_type type) { return MONUMENT_TYPES[type] ? MONUMENT_TYPES[type]->phases : 0; @@ -722,6 +746,21 @@ int building_monument_gt_module_is_active(int module) int module_num = module % MODULES_PER_TEMPLE + 1; int temple_type = module / MODULES_PER_TEMPLE + BUILDING_GRAND_TEMPLE_CERES; + if (module >= VENUS_MODULE_3_WINE_TEMPLE) { + static const building_type reworked_temples[] = { + BUILDING_GRAND_TEMPLE_VENUS_REWORKED, // 10, 11 + BUILDING_GRAND_TEMPLE_CERES_REWORKED, // 12, 13 + BUILDING_GRAND_TEMPLE_MERCURY_REWORKED, // 14, 15 + BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED, // 16, 17 + BUILDING_NONE, // 18, 19 (Pantheon original — unused here) + BUILDING_PANTHEON_REWORKED, // 20, 21 + BUILDING_GRAND_TEMPLE_MARS_REWORKED, // 22, 23 + }; + int idx = (module - VENUS_MODULE_3_WINE_TEMPLE) / MODULES_PER_TEMPLE; + temple_type = reworked_temples[idx]; + module_num = (module - VENUS_MODULE_3_WINE_TEMPLE) % MODULES_PER_TEMPLE + 1; + } + return building_monument_module_type(temple_type) == module_num; } @@ -805,3 +844,16 @@ int building_monument_is_unfinished_monument(const building *b) { return building_monument_is_monument(b) && b->monument.phase != MONUMENT_FINISHED; } + +venus_m4_variant building_monument_venus_m4_variant(void) +{ + int has_theater = scenario_allowed_building(BUILDING_THEATER); + int has_tavern = scenario_allowed_building(BUILDING_TAVERN); + if (has_theater && has_tavern) { + return VENUS_M4_THEATER_TAVERN; + } else if (!has_tavern) { + return VENUS_M4_THEATER_BATHHOUSE; + } else { + return VENUS_M4_BATHHOUSE_TAVERN; + } +} diff --git a/src/building/monument.h b/src/building/monument.h index 750cf0ad18..b8234dc381 100644 --- a/src/building/monument.h +++ b/src/building/monument.h @@ -19,8 +19,20 @@ typedef enum { MARS_MODULE_2_ALL_GOODS, VENUS_MODULE_1_DISTRIBUTE_WINE, VENUS_MODULE_2_DESIRABILITY_ENTERTAINMENT, + VENUS_MODULE_3_WINE_TEMPLE, + VENUS_MODULE_4_THEATER_TAVERN, + CERES_MODULE_3_FARM_SPEED, + CERES_MODULE_4_MARKET_SPEED, + MERCURY_MODULE_3_LAND_TRADER, + MERCURY_MODULE_4_PROSPERITY, + NEPTUNE_MODULE_3_FOUNTAIN_RESERVOIR, + NEPTUNE_MODULE_4_SEA_TRADE, PANTHEON_MODULE_1_DESTINATION_PRIESTS, - PANTHEON_MODULE_2_HOUSING_EVOLUTION + PANTHEON_MODULE_2_HOUSING_EVOLUTION, + PANTHEON_MODULE_3_SENATE, + PANTHEON_MODULE_4_LUXURY_PALACE, + MARS_MODULE_3_SUPPLY_CHAIN, + MARS_MODULE_4_BARRACKS_VICTORY } module_type; int building_monument_access_point(building *b, map_point *dst); @@ -57,6 +69,7 @@ void building_monument_finish_monuments(void); void building_monuments_set_construction_phase(int phase); int building_monument_get_venus_gt(void); int building_monument_get_neptune_gt(void); +int building_monument_get_neptune_reworked_gt(void); void building_monument_initialize_deliveries(void); int building_monument_count_grand_temples(void); void building_monument_delivery_save_state(buffer *list); @@ -65,4 +78,12 @@ int building_monument_is_construction_halted(building *b); int building_monument_toggle_construction_halted(building *b); int building_monument_is_unfinished_monument(const building *b); +typedef enum { + VENUS_M4_THEATER_TAVERN = 0, + VENUS_M4_THEATER_BATHHOUSE, + VENUS_M4_BATHHOUSE_TAVERN, +} venus_m4_variant; + +venus_m4_variant building_monument_venus_m4_variant(void); + #endif // BUILDING_MONUMENT_H diff --git a/src/building/properties.c b/src/building/properties.c index 1fc339e0b1..893e410a85 100644 --- a/src/building/properties.c +++ b/src/building/properties.c @@ -230,7 +230,7 @@ static building_properties properties[BUILDING_TYPE_MAX] = { .sound_id = SOUND_CITY_HOUSE_POOR, .event_data.attr = "house_small_casa", .building_model_data = {.cost = 0, .desirability_value = -1, .desirability_step = 1, - .desirability_step_size = 1, .desirability_range = 1, .laborers = 0}, + .desirability_step_size = 0, .desirability_range = 1, .laborers = 0}, .house_model_data = { .devolve_desirability = 10, .evolve_desirability = 16, @@ -255,7 +255,7 @@ static building_properties properties[BUILDING_TYPE_MAX] = { .sound_id = SOUND_CITY_HOUSE_POOR, .event_data.attr = "house_large_casa", .building_model_data = {.cost = 0, .desirability_value = -1, .desirability_step = 1, - .desirability_step_size = 1, .desirability_range = 1, .laborers = 0}, + .desirability_step_size = 0, .desirability_range = 1, .laborers = 0}, .house_model_data = { .devolve_desirability = 14, .evolve_desirability = 20, @@ -280,7 +280,7 @@ static building_properties properties[BUILDING_TYPE_MAX] = { .sound_id = SOUND_CITY_HOUSE_MEDIUM, .event_data.attr = "house_small_insula", .building_model_data = {.cost = 0, .desirability_value = 0, .desirability_step = 1, - .desirability_step_size = 1, .desirability_range = 1, .laborers = 0}, + .desirability_step_size = 0, .desirability_range = 1, .laborers = 0}, .house_model_data = { .devolve_desirability = 18, .evolve_desirability = 25, @@ -305,7 +305,7 @@ static building_properties properties[BUILDING_TYPE_MAX] = { .sound_id = SOUND_CITY_HOUSE_MEDIUM, .event_data.attr = "house_medium_insula", .building_model_data = {.cost = 0, .desirability_value = 0, .desirability_step = 1, - .desirability_step_size = 1, .desirability_range = 1, .laborers = 0}, + .desirability_step_size = 0, .desirability_range = 1, .laborers = 0}, .house_model_data = { .devolve_desirability = 22, .evolve_desirability = 32, @@ -380,7 +380,7 @@ static building_properties properties[BUILDING_TYPE_MAX] = { .sound_id = SOUND_CITY_HOUSE_GOOD, .event_data.attr = "house_small_villa", .building_model_data = {.cost = 0, .desirability_value = 1, .desirability_step = 2, - .desirability_step_size = -1, .desirability_range = 2, .laborers = 0}, + .desirability_step_size = 0, .desirability_range = 2, .laborers = 0}, .house_model_data = { .devolve_desirability = 45, .evolve_desirability = 53, @@ -405,7 +405,7 @@ static building_properties properties[BUILDING_TYPE_MAX] = { .sound_id = SOUND_CITY_HOUSE_GOOD, .event_data.attr = "house_medium_villa", .building_model_data = {.cost = 0, .desirability_value = 1, .desirability_step = 2, - .desirability_step_size = -1, .desirability_range = 2, .laborers = 0}, + .desirability_step_size = 0, .desirability_range = 2, .laborers = 0}, .house_model_data = { .devolve_desirability = 50, .evolve_desirability = 58, @@ -430,7 +430,7 @@ static building_properties properties[BUILDING_TYPE_MAX] = { .sound_id = SOUND_CITY_HOUSE_GOOD, .event_data.attr = "house_large_villa", .building_model_data = {.cost = 0, .desirability_value = 2, .desirability_step = 2, - .desirability_step_size = -2, .desirability_range = 2, .laborers = 0}, + .desirability_step_size = 0, .desirability_range = 2, .laborers = 0}, .house_model_data = { .devolve_desirability = 55, .evolve_desirability = 63, @@ -455,7 +455,7 @@ static building_properties properties[BUILDING_TYPE_MAX] = { .sound_id = SOUND_CITY_HOUSE_GOOD, .event_data.attr = "house_grand_villa", .building_model_data = {.cost = 0, .desirability_value = 2, .desirability_step = 2, - .desirability_step_size = -2, .desirability_range = 2, .laborers = 0}, + .desirability_step_size = 0, .desirability_range = 2, .laborers = 0}, .house_model_data = { .devolve_desirability = 60, .evolve_desirability = 68, @@ -861,7 +861,7 @@ static building_properties properties[BUILDING_TYPE_MAX] = { .event_data.attr = "small_temple_ceres", .event_data.key = TR_PARAMETER_VALUE_BUILDING_SMALL_TEMPLE_CERES, .building_model_data = {.cost = 50, .desirability_value = 4, .desirability_step = 2, - .desirability_step_size = 6, .desirability_range = 2, .laborers = 2} + .desirability_step_size = -1, .desirability_range = 6, .laborers = 2} }, [BUILDING_SMALL_TEMPLE_NEPTUNE] = { .venus_gt_bonus = 1, @@ -872,7 +872,7 @@ static building_properties properties[BUILDING_TYPE_MAX] = { .event_data.attr = "small_temple_neptune", .event_data.key = TR_PARAMETER_VALUE_BUILDING_SMALL_TEMPLE_NEPTUNE, .building_model_data = {.cost = 50, .desirability_value = 4, .desirability_step = 2, - .desirability_step_size = 6, .desirability_range = 2, .laborers = 2} + .desirability_step_size = -1, .desirability_range = 6, .laborers = 2} }, [BUILDING_SMALL_TEMPLE_MERCURY] = { .venus_gt_bonus = 1, @@ -883,7 +883,7 @@ static building_properties properties[BUILDING_TYPE_MAX] = { .event_data.attr = "small_temple_mercury", .event_data.key = TR_PARAMETER_VALUE_BUILDING_SMALL_TEMPLE_MERCURY, .building_model_data = {.cost = 50, .desirability_value = 4, .desirability_step = 2, - .desirability_step_size = 6, .desirability_range = 2, .laborers = 2} + .desirability_step_size = -1, .desirability_range = 6, .laborers = 2} }, [BUILDING_SMALL_TEMPLE_MARS] = { .venus_gt_bonus = 1, @@ -894,7 +894,7 @@ static building_properties properties[BUILDING_TYPE_MAX] = { .event_data.attr = "small_temple_mars", .event_data.key = TR_PARAMETER_VALUE_BUILDING_SMALL_TEMPLE_MARS, .building_model_data = {.cost = 50, .desirability_value = 4, .desirability_step = 2, - .desirability_step_size = 6, .desirability_range = 2, .laborers = 2} + .desirability_step_size = -1, .desirability_range = 6, .laborers = 2} }, [BUILDING_SMALL_TEMPLE_VENUS] = { .venus_gt_bonus = 1, @@ -905,7 +905,7 @@ static building_properties properties[BUILDING_TYPE_MAX] = { .event_data.attr = "small_temple_venus", .event_data.key = TR_PARAMETER_VALUE_BUILDING_SMALL_TEMPLE_VENUS, .building_model_data = {.cost = 50, .desirability_value = 4, .desirability_step = 2, - .desirability_step_size = 6, .desirability_range = 2, .laborers = 2} + .desirability_step_size = -1, .desirability_range = 6, .laborers = 2} }, [BUILDING_LARGE_TEMPLE_CERES] = { .venus_gt_bonus = 1, @@ -918,7 +918,7 @@ static building_properties properties[BUILDING_TYPE_MAX] = { .event_data.attr = "large_temple_ceres", .event_data.key = TR_PARAMETER_VALUE_BUILDING_LARGE_TEMPLE_CERES, .building_model_data = {.cost = 150, .desirability_value = 14, .desirability_step = 2, - .desirability_step_size = -2, .desirability_range = 5, .laborers = 5} + .desirability_step_size = -2, .desirability_range = 8, .laborers = 5} }, [BUILDING_LARGE_TEMPLE_NEPTUNE] = { .venus_gt_bonus = 1, @@ -931,7 +931,7 @@ static building_properties properties[BUILDING_TYPE_MAX] = { .event_data.attr = "large_temple_neptune", .event_data.key = TR_PARAMETER_VALUE_BUILDING_LARGE_TEMPLE_NEPTUNE, .building_model_data = {.cost = 150, .desirability_value = 14, .desirability_step = 2, - .desirability_step_size = -2, .desirability_range = 5, .laborers = 5} + .desirability_step_size = -2, .desirability_range = 8, .laborers = 5} }, [BUILDING_LARGE_TEMPLE_MERCURY] = { .venus_gt_bonus = 1, @@ -944,7 +944,7 @@ static building_properties properties[BUILDING_TYPE_MAX] = { .event_data.attr = "large_temple_mercury", .event_data.key = TR_PARAMETER_VALUE_BUILDING_LARGE_TEMPLE_MERCURY, .building_model_data = {.cost = 150, .desirability_value = 14, .desirability_step = 2, - .desirability_step_size = -2, .desirability_range = 5, .laborers = 5} + .desirability_step_size = -2, .desirability_range = 8, .laborers = 5} }, [BUILDING_LARGE_TEMPLE_MARS] = { .venus_gt_bonus = 1, @@ -957,7 +957,7 @@ static building_properties properties[BUILDING_TYPE_MAX] = { .event_data.attr = "large_temple_mars", .event_data.key = TR_PARAMETER_VALUE_BUILDING_LARGE_TEMPLE_MARS, .building_model_data = {.cost = 150, .desirability_value = 14, .desirability_step = 2, - .desirability_step_size = -2, .desirability_range = 5, .laborers = 5} + .desirability_step_size = -2, .desirability_range = 8, .laborers = 5} }, [BUILDING_LARGE_TEMPLE_VENUS] = { .venus_gt_bonus = 1, @@ -970,10 +970,10 @@ static building_properties properties[BUILDING_TYPE_MAX] = { .event_data.attr = "large_temple_venus", .event_data.key = TR_PARAMETER_VALUE_BUILDING_LARGE_TEMPLE_VENUS, .building_model_data = {.cost = 150, .desirability_value = 14, .desirability_step = 2, - .desirability_step_size = -2, .desirability_range = 5, .laborers = 5} + .desirability_step_size = -2, .desirability_range = 8, .laborers = 5} }, [BUILDING_MARKET] = { - .size = 2, + .size = 2, .image_group = 22, .sound_id = SOUND_CITY_MARKET, .event_data.attr = "market", @@ -1095,8 +1095,8 @@ static building_properties properties[BUILDING_TYPE_MAX] = { .image_group = 63, .sound_id = SOUND_CITY_FORUM, .event_data.attr = "forum", - .building_model_data = {.cost = 75, .desirability_value = 3, .desirability_step = 2, - .desirability_step_size = -1, .desirability_range = 2, .laborers = 6} + .building_model_data = {.cost = 75, .desirability_value = 3, .desirability_step = 1, + .desirability_step_size = -1, .desirability_range = 3, .laborers = 6} }, [BUILDING_NATIVE_HUT] = { .size = 1, @@ -1395,6 +1395,78 @@ static building_properties properties[BUILDING_TYPE_MAX] = { .building_model_data = {.cost = 2500, .desirability_value = 20, .desirability_step = 2, .desirability_step_size = -4, .desirability_range = 8, .laborers = 50} }, + [BUILDING_GRAND_TEMPLE_VENUS_REWORKED] = { + .venus_gt_bonus = 1, + .size = 7, + .fire_proof = 1, + .sound_id = SOUND_CITY_TEMPLE_VENUS, + .draw_desirability_range = 1, + .custom_asset.group = "Monuments", + .custom_asset.id = "Venus Complex Off", + .event_data.attr = "grand_temple_venus_reworked", + .building_model_data = {.cost = 2500, .desirability_value = 20, .desirability_step = 2, + .desirability_step_size = -4, .desirability_range = 8, .laborers = 50} + }, + [BUILDING_GRAND_TEMPLE_CERES_REWORKED] = { + .venus_gt_bonus = 1, + .size = 7, + .fire_proof = 1, + .sound_id = SOUND_CITY_TEMPLE_CERES, + .draw_desirability_range = 1, + .custom_asset.group = "Monuments", + .custom_asset.id = "Ceres Complex Off", + .event_data.attr = "grand_temple_ceres_reworked", + .building_model_data = {.cost = 2500, .desirability_value = 20, .desirability_step = 2, + .desirability_step_size = -4, .desirability_range = 8, .laborers = 50} + }, + [BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED] = { + .venus_gt_bonus = 1, + .size = 7, + .fire_proof = 1, + .sound_id = SOUND_CITY_TEMPLE_NEPTUNE, + .draw_desirability_range = 1, + .custom_asset.group = "Monuments", + .custom_asset.id = "Neptune Complex Off", + .event_data.attr = "grand_temple_neptune_reworked", + .building_model_data = {.cost = 2500, .desirability_value = 20, .desirability_step = 2, + .desirability_step_size = -4, .desirability_range = 8, .laborers = 50} + }, + [BUILDING_GRAND_TEMPLE_MERCURY_REWORKED] = { + .venus_gt_bonus = 1, + .size = 7, + .fire_proof = 1, + .sound_id = SOUND_CITY_TEMPLE_MERCURY, + .draw_desirability_range = 1, + .custom_asset.group = "Monuments", + .custom_asset.id = "Mercury Complex Off", + .event_data.attr = "grand_temple_mercury_reworked", + .building_model_data = {.cost = 2500, .desirability_value = 20, .desirability_step = 2, + .desirability_step_size = -4, .desirability_range = 8, .laborers = 50} + }, + [BUILDING_GRAND_TEMPLE_MARS_REWORKED] = { + .venus_gt_bonus = 1, + .size = 7, + .fire_proof = 1, + .sound_id = SOUND_CITY_TEMPLE_MARS, + .draw_desirability_range = 1, + .custom_asset.group = "Monuments", + .custom_asset.id = "Mars Complex Off", + .event_data.attr = "grand_temple_mars_reworked", + .building_model_data = {.cost = 2500, .desirability_value = 20, .desirability_step = 2, + .desirability_step_size = -4, .desirability_range = 8, .laborers = 50} + }, + [BUILDING_PANTHEON_REWORKED] = { + .venus_gt_bonus = 1, + .size = 7, + .fire_proof = 1, + .sound_id = SOUND_CITY_ORACLE, + .draw_desirability_range = 1, + .custom_asset.group = "Monuments", + .custom_asset.id = "Pantheon Off", + .event_data.attr = "pantheon_reworked", + .building_model_data = {.cost = 3500, .desirability_value = 20, .desirability_step = 2, + .desirability_step_size = -4, .desirability_range = 8, .laborers = 50} + }, [BUILDING_MENU_GRAND_TEMPLES] = { .event_data.attr = "grand_temples|all_grand_temples", .event_data.key = TR_PARAMETER_VALUE_BUILDING_MENU_GRAND_TEMPLES diff --git a/src/building/type.h b/src/building/type.h index 1cc274a688..7fe6fc10a3 100644 --- a/src/building/type.h +++ b/src/building/type.h @@ -222,8 +222,14 @@ typedef enum { BUILDING_NATIVE_MONUMENT = 208, BUILDING_NATIVE_DECORATION = 209, BUILDING_REPAIR_LAND = 210, // tool, not an actual building + BUILDING_GRAND_TEMPLE_VENUS_REWORKED = 211, + BUILDING_GRAND_TEMPLE_CERES_REWORKED = 212, + BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED = 213, + BUILDING_GRAND_TEMPLE_MERCURY_REWORKED = 214, + BUILDING_GRAND_TEMPLE_MARS_REWORKED = 215, + BUILDING_PANTHEON_REWORKED = 216, // helper constants - BUILDING_TYPE_MAX = 211 + BUILDING_TYPE_MAX = 217 } building_type; /** diff --git a/src/city/culture.c b/src/city/culture.c index 6f165f3a49..3f2b50f566 100644 --- a/src/city/culture.c +++ b/src/city/culture.c @@ -201,8 +201,15 @@ void city_culture_update_coverage(void) SMALL_TEMPLE_COVERAGE * building_count_active(BUILDING_SMALL_TEMPLE_VENUS) + LARGE_TEMPLE_COVERAGE * building_count_active(BUILDING_LARGE_TEMPLE_VENUS) + PANTHEON_COVERAGE * building_count_active(BUILDING_PANTHEON) + - GRAND_TEMPLE_COVERAGE * building_count_active(BUILDING_GRAND_TEMPLE_VENUS), + GRAND_TEMPLE_COVERAGE * building_count_active(BUILDING_GRAND_TEMPLE_VENUS)+ + GRAND_TEMPLE_COVERAGE * building_count_active(BUILDING_GRAND_TEMPLE_VENUS_REWORKED) + + GRAND_TEMPLE_COVERAGE * building_count_active(BUILDING_GRAND_TEMPLE_CERES_REWORKED) + + GRAND_TEMPLE_COVERAGE * building_count_active(BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED) + + GRAND_TEMPLE_COVERAGE * building_count_active(BUILDING_GRAND_TEMPLE_MERCURY_REWORKED) + + GRAND_TEMPLE_COVERAGE * building_count_active(BUILDING_GRAND_TEMPLE_MARS_REWORKED) + + GRAND_TEMPLE_COVERAGE * building_count_active(BUILDING_PANTHEON_REWORKED), population)); + coverage.oracle = top(calc_percentage(ORACLE_COVERAGE * oracles, population)); city_data.culture.religion_coverage = diff --git a/src/city/data.c b/src/city/data.c index dad1e3d6ec..99696b3f08 100644 --- a/src/city/data.c +++ b/src/city/data.c @@ -489,6 +489,7 @@ static void save_main_data(buffer *main) buffer_write_i32(main, city_data.mission.tutorial_fire_message_shown); buffer_write_i32(main, city_data.mission.tutorial_disease_message_shown); buffer_write_i32(main, city_data.figure.attacking_natives); + buffer_write_i8(main, city_data.sentiment.mars_victory_boost); } static void load_main_data(buffer *main, int version) @@ -1013,8 +1014,9 @@ static void load_main_data(buffer *main, int version) city_data.mission.tutorial_fire_message_shown = buffer_read_i32(main); city_data.mission.tutorial_disease_message_shown = buffer_read_i32(main); city_data.figure.attacking_natives = buffer_read_i32(main); + city_data.sentiment.mars_victory_boost = buffer_read_i8(main); if (!discard_unused_values) { - buffer_skip(main, 232); + buffer_skip(main, 231); } if (!has_separate_import_limits) { for (int i = RESOURCE_MIN; i < RESOURCE_MAX_LEGACY; i++) { diff --git a/src/city/data_private.h b/src/city/data_private.h index 205bbe2824..8feb6b1284 100644 --- a/src/city/data_private.h +++ b/src/city/data_private.h @@ -33,6 +33,7 @@ extern struct city_data_t { int16_t animals; int32_t attacking_natives; int32_t enemies; + int8_t had_enemies_this_month; int32_t imperial_soldiers; int32_t rioters; int32_t robbers; @@ -209,6 +210,7 @@ extern struct city_data_t { int32_t wages; int32_t low_mood_cause; int16_t blessing_festival_boost; + int8_t mars_victory_boost; int32_t protesters; int32_t criminals; // muggers+rioters diff --git a/src/city/festival.c b/src/city/festival.c index d78be30526..f95fc62e9f 100644 --- a/src/city/festival.c +++ b/src/city/festival.c @@ -220,7 +220,7 @@ void city_festival_update(void) } } - if (building_monument_working(BUILDING_PANTHEON)) { + if (building_monument_working(BUILDING_PANTHEON) || building_monument_working(BUILDING_PANTHEON_REWORKED)) { for (int god = 0; god <= 4; ++god) { if (game_time_total_years() % 5 == god && game_time_month() == autofestivals[god].month) { throw_auto_festival(god); diff --git a/src/city/figures.c b/src/city/figures.c index df791edfa5..d0170d998b 100644 --- a/src/city/figures.c +++ b/src/city/figures.c @@ -32,6 +32,7 @@ void city_figures_add_attacking_native(void) void city_figures_add_enemy(void) { city_data.figure.enemies++; + city_data.figure.had_enemies_this_month = 1; } void city_figures_add_imperial_soldier(void) diff --git a/src/city/finance.c b/src/city/finance.c index 5372a7f6f2..2913719c72 100644 --- a/src/city/finance.c +++ b/src/city/finance.c @@ -42,7 +42,13 @@ static building_levy_for_type building_levies[] = { {BUILDING_GRAND_TEMPLE_MERCURY, GRAND_TEMPLE_LEVY_MONTHLY}, {BUILDING_GRAND_TEMPLE_MARS, GRAND_TEMPLE_LEVY_MONTHLY}, {BUILDING_GRAND_TEMPLE_VENUS, GRAND_TEMPLE_LEVY_MONTHLY}, - {BUILDING_PANTHEON, PANTHEON_LEVY_MONTHLY}, // 20 + {BUILDING_GRAND_TEMPLE_VENUS_REWORKED, GRAND_TEMPLE_LEVY_MONTHLY}, + {BUILDING_GRAND_TEMPLE_CERES_REWORKED, GRAND_TEMPLE_LEVY_MONTHLY}, + {BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED, GRAND_TEMPLE_LEVY_MONTHLY}, + {BUILDING_GRAND_TEMPLE_MERCURY_REWORKED, GRAND_TEMPLE_LEVY_MONTHLY}, + {BUILDING_GRAND_TEMPLE_MARS_REWORKED, GRAND_TEMPLE_LEVY_MONTHLY}, + {BUILDING_PANTHEON, PANTHEON_LEVY_MONTHLY}, + {BUILDING_PANTHEON_REWORKED, PANTHEON_LEVY_MONTHLY}, // 20 {BUILDING_COLOSSEUM, COLOSSEUM_LEVY_MONTHLY}, {BUILDING_HIPPODROME, HIPPODROME_LEVY_MONTHLY}, {BUILDING_SMALL_MAUSOLEUM, SMALL_MAUSOLEUM_LEVY_MONTHLY}, diff --git a/src/city/gods.c b/src/city/gods.c index 50d655715a..9a61ae05ec 100644 --- a/src/city/gods.c +++ b/src/city/gods.c @@ -312,19 +312,19 @@ void city_gods_calculate_moods(int update_moods) int num_temples = 0; switch (i) { case GOD_CERES: - num_temples = building_count_active(BUILDING_SMALL_TEMPLE_CERES) + building_count_active(BUILDING_LARGE_TEMPLE_CERES) + building_count_active(BUILDING_GRAND_TEMPLE_CERES); + num_temples = building_count_active(BUILDING_SMALL_TEMPLE_CERES) + building_count_active(BUILDING_LARGE_TEMPLE_CERES) + building_count_active(BUILDING_GRAND_TEMPLE_CERES) + building_count_active(BUILDING_GRAND_TEMPLE_CERES_REWORKED); break; case GOD_NEPTUNE: - num_temples = building_count_active(BUILDING_SMALL_TEMPLE_NEPTUNE) + building_count_active(BUILDING_LARGE_TEMPLE_NEPTUNE) + building_count_active(BUILDING_GRAND_TEMPLE_NEPTUNE); + num_temples = building_count_active(BUILDING_SMALL_TEMPLE_NEPTUNE) + building_count_active(BUILDING_LARGE_TEMPLE_NEPTUNE) + building_count_active(BUILDING_GRAND_TEMPLE_NEPTUNE) + building_count_active(BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED); break; case GOD_MERCURY: - num_temples = building_count_active(BUILDING_SMALL_TEMPLE_MERCURY) + building_count_active(BUILDING_LARGE_TEMPLE_MERCURY) + building_count_active(BUILDING_GRAND_TEMPLE_MERCURY); + num_temples = building_count_active(BUILDING_SMALL_TEMPLE_MERCURY) + building_count_active(BUILDING_LARGE_TEMPLE_MERCURY) + building_count_active(BUILDING_GRAND_TEMPLE_MERCURY) + building_count_active(BUILDING_GRAND_TEMPLE_MERCURY_REWORKED); break; case GOD_MARS: - num_temples = building_count_active(BUILDING_SMALL_TEMPLE_MARS) + building_count_active(BUILDING_LARGE_TEMPLE_MARS) + building_count_active(BUILDING_GRAND_TEMPLE_MARS); + num_temples = building_count_active(BUILDING_SMALL_TEMPLE_MARS) + building_count_active(BUILDING_LARGE_TEMPLE_MARS) + building_count_active(BUILDING_GRAND_TEMPLE_MARS) + building_count_active(BUILDING_GRAND_TEMPLE_MARS_REWORKED); break; case GOD_VENUS: - num_temples = building_count_active(BUILDING_SMALL_TEMPLE_VENUS) + building_count_active(BUILDING_LARGE_TEMPLE_VENUS) + building_count_active(BUILDING_GRAND_TEMPLE_VENUS); + num_temples = building_count_active(BUILDING_SMALL_TEMPLE_VENUS) + building_count_active(BUILDING_LARGE_TEMPLE_VENUS) + building_count_active(BUILDING_GRAND_TEMPLE_VENUS)+ building_count_active(BUILDING_GRAND_TEMPLE_VENUS_REWORKED); break; } if (num_temples == max_temples) { diff --git a/src/city/health.c b/src/city/health.c index 488fec529b..1176c55b2a 100644 --- a/src/city/health.c +++ b/src/city/health.c @@ -264,6 +264,10 @@ static void adjust_sickness_level_in_house(building *b, int health, int populati if (building_monument_working(BUILDING_GRAND_TEMPLE_NEPTUNE)) { delta -= 5; } + // Neptune Reworked GT reduces the delta by 5 for houses with Neptune access + if (building_monument_working(BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED) && b->data.house.temple_neptune) { + delta -= 5; + } // If delta is positive, it is reduced depending on house health, global health and hospital access if (delta > 0) { diff --git a/src/city/labor.c b/src/city/labor.c index ff6192f393..5ccb264bac 100644 --- a/src/city/labor.c +++ b/src/city/labor.c @@ -1,6 +1,7 @@ #include "labor.h" #include "building/building.h" +#include "building/count.h" #include "building/monument.h" #include "building/properties.h" #include "core/config.h" @@ -118,7 +119,13 @@ static const int CATEGORY_FOR_BUILDING_TYPE[BUILDING_TYPE_MAX] = { [BUILDING_GRAND_TEMPLE_MERCURY] = LABOR_CATEGORY_GOVERNANCE_RELIGION, [BUILDING_GRAND_TEMPLE_MARS] = LABOR_CATEGORY_GOVERNANCE_RELIGION, [BUILDING_GRAND_TEMPLE_VENUS] = LABOR_CATEGORY_GOVERNANCE_RELIGION, + [BUILDING_GRAND_TEMPLE_VENUS_REWORKED] = LABOR_CATEGORY_GOVERNANCE_RELIGION, + [BUILDING_GRAND_TEMPLE_CERES_REWORKED] = LABOR_CATEGORY_GOVERNANCE_RELIGION, + [BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED] = LABOR_CATEGORY_GOVERNANCE_RELIGION, + [BUILDING_GRAND_TEMPLE_MERCURY_REWORKED] = LABOR_CATEGORY_GOVERNANCE_RELIGION, + [BUILDING_GRAND_TEMPLE_MARS_REWORKED] = LABOR_CATEGORY_GOVERNANCE_RELIGION, [BUILDING_PANTHEON] = LABOR_CATEGORY_GOVERNANCE_RELIGION, + [BUILDING_PANTHEON_REWORKED] = LABOR_CATEGORY_GOVERNANCE_RELIGION, [BUILDING_SENATE] = LABOR_CATEGORY_GOVERNANCE_RELIGION, [BUILDING_FORUM] = LABOR_CATEGORY_GOVERNANCE_RELIGION, [BUILDING_ORACLE] = LABOR_CATEGORY_GOVERNANCE_RELIGION, @@ -225,6 +232,11 @@ void city_labor_calculate_workers(int num_plebs, int num_patricians) city_data.labor.workers_available = calc_adjust_with_percentage( city_data.population.working_age, city_data.population.percentage_plebs); } + // Pantheon Reworked Module 2: each Luxury Palace grants 20 workers + if (building_monument_gt_module_is_active(PANTHEON_MODULE_4_LUXURY_PALACE)) { + city_data.labor.workers_available += + building_count_active(BUILDING_HOUSE_LUXURY_PALACE) * 20; + } } static int is_industry_disabled(building *b) diff --git a/src/city/military.c b/src/city/military.c index e17ba7de3b..2d34dbfe3c 100644 --- a/src/city/military.c +++ b/src/city/military.c @@ -5,6 +5,7 @@ #include "city/data_private.h" #include "city/message.h" #include "city/ratings.h" +#include "city/sentiment.h" #include "city/resource.h" #include "core/calc.h" #include "empire/city.h" @@ -308,6 +309,7 @@ static void fight_distant_battle(void) building_menu_update(); city_data.distant_battle.won_count++; city_data.distant_battle.city_foreign_months_left = 0; + city_sentiment_apply_mars_victory(); city_data.distant_battle.roman_months_to_travel_back = city_data.distant_battle.roman_months_traveled; } city_data.distant_battle.months_until_battle = 0; diff --git a/src/city/population.c b/src/city/population.c index d7854622af..499103184c 100644 --- a/src/city/population.c +++ b/src/city/population.c @@ -2,7 +2,9 @@ #include "building/building.h" #include "building/house_population.h" +#include "building/monument.h" #include "city/data_private.h" +#include "city/health.h" #include "core/calc.h" #include "core/config.h" #include "core/random.h" @@ -216,6 +218,36 @@ void city_population_remove_for_troop_request(int num_people) recalculate_population(); } +// Neptune Reworked base bonus: extends retirement age by +// ceil(0.5 * (city_health/10) * (neptune_houses / total_houses)) years +int city_population_neptune_reworked_retirement_bonus_years(void) +{ + if (!building_monument_working(BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED)) { + return 0; + } + int health_factor = city_health() / 10; + if (health_factor == 0) { + return 0; + } + int neptune_houses = 0; + int total_houses = 0; + for (building_type type = BUILDING_HOUSE_SMALL_TENT; type <= BUILDING_HOUSE_LUXURY_PALACE; type++) { + for (building *b = building_first_of_type(type); b; b = b->next_of_type) { + if (b->state == BUILDING_STATE_IN_USE && b->house_population > 0) { + total_houses++; + if (b->data.house.temple_neptune) { + neptune_houses++; + } + } + } + } + if (neptune_houses == 0 || total_houses == 0) { + return 0; + } + // ceil(health_factor * neptune_houses / (total_houses * 2)) + return (health_factor * neptune_houses + total_houses * 2 - 1) / (total_houses * 2); +} + int city_population_people_of_working_age(void) { int total_working_people = city_population_in_age_decennium(2) + city_population_in_age_decennium(3) @@ -223,6 +255,11 @@ int city_population_people_of_working_age(void) if (config_get(CONFIG_GP_CH_RETIRE_AT_60)) { total_working_people += city_population_in_age_decennium(5); } + int base_retirement = config_get(CONFIG_GP_CH_RETIRE_AT_60) ? 60 : 50; + int health_bonus = city_population_neptune_reworked_retirement_bonus_years(); + for (int age = base_retirement; age < base_retirement + health_bonus && age < 100; age++) { + total_working_people += city_population_at_age(age); + } return total_working_people; } @@ -233,6 +270,11 @@ int city_population_retired_people(void) if (config_get(CONFIG_GP_CH_RETIRE_AT_60)) { total_retired_people += city_population_in_age_decennium(5); } + int base_retirement = config_get(CONFIG_GP_CH_RETIRE_AT_60) ? 60 : 50; + int health_bonus = city_population_neptune_reworked_retirement_bonus_years(); + for (int age = base_retirement; age < base_retirement + health_bonus && age < 100; age++) { + total_retired_people -= city_population_at_age(age); + } return total_retired_people; } diff --git a/src/city/population.h b/src/city/population.h index dff3e25c2e..cc62366d81 100644 --- a/src/city/population.h +++ b/src/city/population.h @@ -86,4 +86,6 @@ int city_population_percentage_in_tents_shacks(void); int city_population_percentage_in_villas_palaces(void); +int city_population_neptune_reworked_retirement_bonus_years(void); + #endif // CITY_POPULATION_H diff --git a/src/city/ratings.c b/src/city/ratings.c index 8811181333..2f36956941 100644 --- a/src/city/ratings.c +++ b/src/city/ratings.c @@ -2,6 +2,7 @@ #include "building/building.h" #include "building/count.h" +#include "building/monument.h" #include "building/properties.h" #include "city/culture.h" #include "city/data_private.h" @@ -441,7 +442,18 @@ static void update_culture_rating(void) city_data.ratings.culture += building_count_active(BUILDING_GRAND_TEMPLE_MERCURY) * MONUMENT_CULTURE_BONUS; city_data.ratings.culture += building_count_active(BUILDING_GRAND_TEMPLE_MARS) * MONUMENT_CULTURE_BONUS; city_data.ratings.culture += building_count_active(BUILDING_GRAND_TEMPLE_VENUS) * MONUMENT_CULTURE_BONUS; + city_data.ratings.culture += building_count_active(BUILDING_GRAND_TEMPLE_VENUS_REWORKED) * MONUMENT_CULTURE_BONUS; + city_data.ratings.culture += building_count_active(BUILDING_GRAND_TEMPLE_CERES_REWORKED) * MONUMENT_CULTURE_BONUS; + city_data.ratings.culture += building_count_active(BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED) * MONUMENT_CULTURE_BONUS; + city_data.ratings.culture += building_count_active(BUILDING_GRAND_TEMPLE_MERCURY_REWORKED) * MONUMENT_CULTURE_BONUS; + city_data.ratings.culture += building_count_active(BUILDING_GRAND_TEMPLE_MARS_REWORKED) * MONUMENT_CULTURE_BONUS; city_data.ratings.culture += building_count_active(BUILDING_PANTHEON) * MONUMENT_CULTURE_BONUS; + city_data.ratings.culture += building_count_active(BUILDING_PANTHEON_REWORKED) * MONUMENT_CULTURE_BONUS; + // Pantheon Reworked Module 2: each Luxury Palace grants +2 culture + if (building_monument_gt_module_is_active(PANTHEON_MODULE_4_LUXURY_PALACE)) { + city_data.ratings.culture += + building_count_active(BUILDING_HOUSE_LUXURY_PALACE) * 2; + } city_data.ratings.culture += building_count_active(BUILDING_COLOSSEUM) * MONUMENT_CULTURE_BONUS; city_data.ratings.culture += building_count_active(BUILDING_HIPPODROME) * MONUMENT_CULTURE_BONUS; diff --git a/src/city/resource.c b/src/city/resource.c index 512fcd769c..62e5017655 100644 --- a/src/city/resource.c +++ b/src/city/resource.c @@ -487,24 +487,40 @@ static int house_consume_food(void) { int total_consumed = 0; int ceres_module = (building_monument_gt_module_is_active(CERES_MODULE_1_REDUCE_FOOD)); + int ceres_reworked_base = building_monument_working(BUILDING_GRAND_TEMPLE_CERES_REWORKED); + for (building_type type = BUILDING_HOUSE_SMALL_TENT; type <= BUILDING_HOUSE_LUXURY_PALACE; type++) { for (building *b = building_first_of_type(type); b; b = b->next_of_type) { if (b->state != BUILDING_STATE_IN_USE || !b->house_size) { continue; } int num_types = model_get_house(b->subtype.house_level)->food_types; - int amount_per_type; + + // Calculate base consumption percentage (default 50%) + int consumption_percentage = 50; + + // Old Ceres module: 20% reduction (to 40%) if (ceres_module && b->data.house.temple_ceres) { - amount_per_type = calc_adjust_with_percentage(b->house_population, 40); - } else { - amount_per_type = calc_adjust_with_percentage(b->house_population, 50); + consumption_percentage = 40; } + + // Count available food types (this happens before actual consumption) int foodtypes_available = 0; for (resource_type r = RESOURCE_MIN_FOOD; r < RESOURCE_MAX_FOOD; r++) { if (b->resources[r] && resource_is_inventory(r)) { foodtypes_available++; } } + + // Ceres Reworked base bonus: 5% reduction per food type available + if (ceres_reworked_base && b->data.house.temple_ceres && foodtypes_available > 0) { + int reduction_pct = 5 * foodtypes_available; + consumption_percentage = calc_adjust_with_percentage(consumption_percentage, 100 - reduction_pct); + } + + int amount_per_type = calc_adjust_with_percentage(b->house_population, consumption_percentage); + + // Divide by actual food types available if (foodtypes_available) { amount_per_type /= foodtypes_available; } diff --git a/src/city/sentiment.c b/src/city/sentiment.c index 68932cbcfc..c4913970cb 100644 --- a/src/city/sentiment.c +++ b/src/city/sentiment.c @@ -1,6 +1,7 @@ #include "sentiment.h" #include "building/building.h" +#include "building/monument.h" #include "building/properties.h" #include "city/constants.h" #include "city/data_private.h" @@ -165,6 +166,20 @@ void city_sentiment_decrement_blessing_boost(void) city_data.sentiment.blessing_festival_boost = new_sentiment; } +void city_sentiment_apply_mars_victory(void) +{ + if (building_monument_gt_module_is_active(MARS_MODULE_4_BARRACKS_VICTORY)) { + city_data.sentiment.mars_victory_boost = 12; + } +} + +void city_sentiment_decrement_mars_victory_boost(void) +{ + if (city_data.sentiment.mars_victory_boost > 0) { + city_data.sentiment.mars_victory_boost--; + } +} + static int get_games_bonus(void) { int bonus = 0; @@ -273,6 +288,7 @@ void city_sentiment_update(void) int sentiment_contribution_unemployment = get_unemployment_sentiment_modifier(); int average_housing_level = get_average_housing_level(); int blessing_festival_boost = city_data.sentiment.blessing_festival_boost; + int mars_victory_boost = city_data.sentiment.mars_victory_boost; int average_squalor_penalty = 0; int games_bonus = get_games_bonus(); @@ -331,6 +347,7 @@ void city_sentiment_update(void) sentiment += games_bonus; sentiment += blessing_festival_boost; + sentiment += mars_victory_boost; // Change sentiment gradually to the new value int sentiment_delta = sentiment - b->sentiment.house_happiness; diff --git a/src/city/sentiment.h b/src/city/sentiment.h index 3af39bf651..b855a21b2c 100644 --- a/src/city/sentiment.h +++ b/src/city/sentiment.h @@ -26,6 +26,8 @@ void city_sentiment_set_crime_cooldown(void); void city_sentiment_reduce_crime_cooldown(void); int city_sentiment_get_blessing_festival_boost(void); void city_sentiment_decrement_blessing_boost(void); +void city_sentiment_apply_mars_victory(void); +void city_sentiment_decrement_mars_victory_boost(void); void city_sentiment_update(void); diff --git a/src/city/trade.c b/src/city/trade.c index 62d3bd79e3..d7b4c5748f 100644 --- a/src/city/trade.c +++ b/src/city/trade.c @@ -16,7 +16,7 @@ void city_trade_update(void) city_data.trade.num_land_routes = 0; // Wine types city_data.resource.wine_types_available = building_count_total(resource_get_data(RESOURCE_WINE)->industry) > 0 ? 1 : 0; - if (building_monument_gt_module_is_active(VENUS_MODULE_1_DISTRIBUTE_WINE)) { + if (building_monument_gt_module_is_active(VENUS_MODULE_1_DISTRIBUTE_WINE) || building_monument_gt_module_is_active(VENUS_MODULE_3_WINE_TEMPLE)) { city_data.resource.wine_types_available += 1; } diff --git a/src/city/warning.c b/src/city/warning.c index 6ed2bc4017..ba8aa9998e 100644 --- a/src/city/warning.c +++ b/src/city/warning.c @@ -31,8 +31,6 @@ static const uint8_t *get_text_for_warning(warning_type type) return lang_get_string(17, city_view_orientation()); case WARNING_NO_MESS_HALL: return translation_for(TR_WARNING_NO_MESS_HALL); - case WARNING_MAX_GRAND_TEMPLES: - return translation_for(TR_WARNING_MAX_GRAND_TEMPLES); case WARNING_WATER_NEEDED_FOR_BUILDING: return translation_for(TR_WARNING_WATER_NEEDED_FOR_BUILDING); case WARNING_RESOURCES_NOT_AVAILABLE: diff --git a/src/city/warning.h b/src/city/warning.h index a6466a81d6..4c4c179500 100644 --- a/src/city/warning.h +++ b/src/city/warning.h @@ -58,7 +58,6 @@ typedef enum { WARNING_CITY_BOXED_IN_PEOPLE_WILL_PERISH = 64, WARNING_DATA_LIMIT_REACHED = 65, WARNING_NO_MESS_HALL = 66, - WARNING_MAX_GRAND_TEMPLES = 67, WARNING_WATER_NEEDED_FOR_BUILDING = 68, WARNING_RESOURCES_NOT_AVAILABLE = 69, WARNING_VARIANT_TOGGLE = 70, diff --git a/src/core/config.c b/src/core/config.c index 1016b2b216..9f15249d88 100644 --- a/src/core/config.c +++ b/src/core/config.c @@ -50,7 +50,6 @@ static const char *ini_keys[] = { [CONFIG_UI_DRAW_CLOUD_SHADOWS] = "ui_draw_cloud_shadows", [CONFIG_UI_DISPLAY_FPS] = "ui_display_fps", [CONFIG_UI_ASK_CONFIRMATION_ON_FILE_OVERWRITE] = "ui_ask_confirmation_on_file_overwrite", - [CONFIG_GP_CH_MAX_GRAND_TEMPLES] = "gameplay_change_max_grand_temples", [CONFIG_GP_CH_JEALOUS_GODS] = "gameplay_change_jealous_gods", [CONFIG_GP_CH_GLOBAL_LABOUR] = "gameplay_change_global_labour", [CONFIG_GP_CH_RETIRE_AT_60] = "gameplay_change_retire_at_60", @@ -138,7 +137,6 @@ static int default_values[CONFIG_MAX_ENTRIES] = { [CONFIG_UI_ASK_CONFIRMATION_ON_FILE_OVERWRITE] = 1, [CONFIG_SCREEN_DISPLAY_SCALE] = 100, [CONFIG_SCREEN_CURSOR_SCALE] = 100, - [CONFIG_GP_CH_MAX_GRAND_TEMPLES] = 2, [CONFIG_UI_SHOW_DESIRABILITY_RANGE] = 0, [CONFIG_UI_SHOW_DESIRABILITY_RANGE_ALL] = 0, [CONFIG_UI_HIGHLIGHT_SELECTED_BUILDING] = 1, diff --git a/src/core/config.h b/src/core/config.h index 633f95aed9..d9fe94ba9c 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -40,7 +40,6 @@ typedef enum { CONFIG_UI_DRAW_CLOUD_SHADOWS, CONFIG_UI_DISPLAY_FPS, CONFIG_UI_ASK_CONFIRMATION_ON_FILE_OVERWRITE, - CONFIG_GP_CH_MAX_GRAND_TEMPLES, CONFIG_GP_CH_JEALOUS_GODS, CONFIG_GP_CH_GLOBAL_LABOUR, CONFIG_GP_CH_RETIRE_AT_60, diff --git a/src/core/lang.c b/src/core/lang.c index 5ba4e33cb8..40bf36b1a3 100644 --- a/src/core/lang.c +++ b/src/core/lang.c @@ -411,17 +411,29 @@ const uint8_t *lang_get_string(int group, int index) case BUILDING_WORKCAMP: return translation_for(TR_BUILDING_WORK_CAMP); case BUILDING_GRAND_TEMPLE_CERES: - return translation_for(TR_BUILDING_GRAND_TEMPLE_CERES); + return translation_for(TR_BUILDING_GRAND_TEMPLE_CERES_LEGACY); case BUILDING_GRAND_TEMPLE_NEPTUNE: - return translation_for(TR_BUILDING_GRAND_TEMPLE_NEPTUNE); + return translation_for(TR_BUILDING_GRAND_TEMPLE_NEPTUNE_LEGACY); case BUILDING_GRAND_TEMPLE_MERCURY: - return translation_for(TR_BUILDING_GRAND_TEMPLE_MERCURY); + return translation_for(TR_BUILDING_GRAND_TEMPLE_MERCURY_LEGACY); case BUILDING_GRAND_TEMPLE_MARS: - return translation_for(TR_BUILDING_GRAND_TEMPLE_MARS); + return translation_for(TR_BUILDING_GRAND_TEMPLE_MARS_LEGACY); case BUILDING_GRAND_TEMPLE_VENUS: + return translation_for(TR_BUILDING_GRAND_TEMPLE_VENUS_LEGACY); + case BUILDING_GRAND_TEMPLE_VENUS_REWORKED: return translation_for(TR_BUILDING_GRAND_TEMPLE_VENUS); - case BUILDING_PANTHEON: + case BUILDING_GRAND_TEMPLE_CERES_REWORKED: + return translation_for(TR_BUILDING_GRAND_TEMPLE_CERES); + case BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED: + return translation_for(TR_BUILDING_GRAND_TEMPLE_NEPTUNE); + case BUILDING_GRAND_TEMPLE_MERCURY_REWORKED: + return translation_for(TR_BUILDING_GRAND_TEMPLE_MERCURY); + case BUILDING_GRAND_TEMPLE_MARS_REWORKED: + return translation_for(TR_BUILDING_GRAND_TEMPLE_MARS); + case BUILDING_PANTHEON_REWORKED: return translation_for(TR_BUILDING_PANTHEON); + case BUILDING_PANTHEON: + return translation_for(TR_BUILDING_PANTHEON_LEGACY); case BUILDING_MENU_GRAND_TEMPLES: return translation_for(TR_BUILDING_GRAND_TEMPLE_MENU); case BUILDING_ARCHITECT_GUILD: diff --git a/src/figure/formation.c b/src/figure/formation.c index 8354209c67..6ab8e04636 100644 --- a/src/figure/formation.c +++ b/src/figure/formation.c @@ -381,7 +381,7 @@ int formation_get_max_legions(void) // Mars base bonus if (game_cheat_extra_legions()) { return MAX_LEGIONS + 14; - } else if (building_monument_working(BUILDING_GRAND_TEMPLE_MARS)) { + } else if (building_monument_working(BUILDING_GRAND_TEMPLE_MARS) || building_monument_working(BUILDING_GRAND_TEMPLE_MARS_REWORKED)) { return MAX_LEGIONS + 4; } else { return MAX_LEGIONS; diff --git a/src/figure/roamer_preview.c b/src/figure/roamer_preview.c index 8e82d3b3ba..75d7ca759b 100644 --- a/src/figure/roamer_preview.c +++ b/src/figure/roamer_preview.c @@ -66,6 +66,7 @@ static figure_type building_type_to_figure_type(building_type type) case BUILDING_GRAND_TEMPLE_MERCURY: case BUILDING_GRAND_TEMPLE_NEPTUNE: case BUILDING_GRAND_TEMPLE_VENUS: + case BUILDING_GRAND_TEMPLE_VENUS_REWORKED: case BUILDING_LARGE_TEMPLE_CERES: case BUILDING_LARGE_TEMPLE_MARS: case BUILDING_LARGE_TEMPLE_MERCURY: diff --git a/src/figure/service.c b/src/figure/service.c index 31a0e110d3..48b38f5504 100644 --- a/src/figure/service.c +++ b/src/figure/service.c @@ -582,16 +582,19 @@ int figure_service_provide_coverage(figure *f) provide_market_goods(f->building_id, x, y); break; case BUILDING_GRAND_TEMPLE_CERES: + case BUILDING_GRAND_TEMPLE_CERES_REWORKED: houses_serviced = provide_culture(x, y, religion_coverage_ceres); break; case BUILDING_SMALL_TEMPLE_NEPTUNE: case BUILDING_LARGE_TEMPLE_NEPTUNE: case BUILDING_GRAND_TEMPLE_NEPTUNE: + case BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED: houses_serviced = provide_culture(x, y, religion_coverage_neptune); break; case BUILDING_SMALL_TEMPLE_MERCURY: case BUILDING_LARGE_TEMPLE_MERCURY: case BUILDING_GRAND_TEMPLE_MERCURY: + case BUILDING_GRAND_TEMPLE_MERCURY_REWORKED: houses_serviced = provide_culture(x, y, religion_coverage_mercury); break; case BUILDING_SMALL_TEMPLE_MARS: @@ -602,6 +605,7 @@ int figure_service_provide_coverage(figure *f) houses_serviced = provide_culture(x, y, religion_coverage_mars); break; case BUILDING_GRAND_TEMPLE_MARS: + case BUILDING_GRAND_TEMPLE_MARS_REWORKED: houses_serviced = provide_culture(x, y, religion_coverage_mars); break; case BUILDING_SMALL_TEMPLE_VENUS: @@ -613,9 +617,11 @@ int figure_service_provide_coverage(figure *f) } break; case BUILDING_GRAND_TEMPLE_VENUS: + case BUILDING_GRAND_TEMPLE_VENUS_REWORKED: houses_serviced = provide_culture(x, y, religion_coverage_venus); break; case BUILDING_PANTHEON: + case BUILDING_PANTHEON_REWORKED: houses_serviced = provide_culture(x, y, religion_coverage_ceres); provide_culture(x, y, religion_coverage_neptune); provide_culture(x, y, religion_coverage_mercury); @@ -623,6 +629,16 @@ int figure_service_provide_coverage(figure *f) provide_culture(x, y, religion_coverage_venus); provide_culture(x, y, religion_coverage_pantheon); break; + case BUILDING_SENATE: + if (building_monument_gt_module_is_active(PANTHEON_MODULE_3_SENATE)) { + houses_serviced = provide_culture(x, y, religion_coverage_ceres); + provide_culture(x, y, religion_coverage_neptune); + provide_culture(x, y, religion_coverage_mercury); + provide_culture(x, y, religion_coverage_mars); + provide_culture(x, y, religion_coverage_venus); + provide_culture(x, y, religion_coverage_pantheon); + } + break; default: break; } diff --git a/src/figuretype/cartpusher.c b/src/figuretype/cartpusher.c index 8c1eef064f..39150c806e 100644 --- a/src/figuretype/cartpusher.c +++ b/src/figuretype/cartpusher.c @@ -318,15 +318,64 @@ static void update_image(figure *f) } } +static int is_workshop_type(building_type type) +{ + return type == BUILDING_WINE_WORKSHOP || type == BUILDING_OIL_WORKSHOP || + type == BUILDING_WEAPONS_WORKSHOP || type == BUILDING_FURNITURE_WORKSHOP || + type == BUILDING_POTTERY_WORKSHOP || type == BUILDING_BRICKWORKS || + type == BUILDING_CONCRETE_MAKER; +} + +static int is_raw_material_for_workshop(building_type type) +{ + return type == BUILDING_TIMBER_YARD || type == BUILDING_CLAY_PIT || + type == BUILDING_SAND_PIT || type == BUILDING_IRON_MINE || + type == BUILDING_OLIVE_FARM || type == BUILDING_VINES_FARM; +} + static int cartpusher_percentage_speed(figure *f) { - // Ceres grand temple base bonus + // Ceres grand temple base bonus (old temple) building *src_building = building_get(f->building_id); int src_building_type = src_building->type; if (src_building_type >= BUILDING_WHEAT_FARM && src_building_type <= BUILDING_PIG_FARM) { if (building_monument_working(BUILDING_GRAND_TEMPLE_CERES)) { return 50; } + // Ceres Reworked module 3: food farm cart speed bonus (wheat, vegetables, fruit, pig only) + if (src_building_type != BUILDING_OLIVE_FARM && src_building_type != BUILDING_VINES_FARM) { + if (building_monument_gt_module_is_active(CERES_MODULE_3_FARM_SPEED)) { + return 40; + } + } + } + // Mars Reworked Module 1: workshop supply chain speed bonus + if (building_monument_gt_module_is_active(MARS_MODULE_3_SUPPLY_CHAIN)) { + if (is_workshop_type(src_building_type)) { + return 10; + } + if (is_raw_material_for_workshop(src_building_type)) { + if (f->action_state == FIGURE_ACTION_23_CARTPUSHER_DELIVERING_TO_WORKSHOP) { + return 10; + } + if (f->action_state == FIGURE_ACTION_27_CARTPUSHER_RETURNING && + f->last_destinatation_id && + is_workshop_type(building_get(f->last_destinatation_id)->type)) { + return 10; + } + } + if (f->type == FIGURE_WAREHOUSEMAN) { + if (f->action_state == FIGURE_ACTION_51_WAREHOUSEMAN_DELIVERING_RESOURCE && + f->destination_building_id && + is_workshop_type(building_get(f->destination_building_id)->type)) { + return 10; + } + if (f->action_state == FIGURE_ACTION_53_WAREHOUSEMAN_RETURNING_EMPTY && + f->last_destinatation_id && + is_workshop_type(building_get(f->last_destinatation_id)->type)) { + return 10; + } + } } return 0; } diff --git a/src/figuretype/service.c b/src/figuretype/service.c index a2daee208f..b23384f5a4 100644 --- a/src/figuretype/service.c +++ b/src/figuretype/service.c @@ -2,6 +2,7 @@ #include "assets/assets.h" #include "building/building.h" +#include "building/monument.h" #include "building/market.h" #include "city/buildings.h" #include "city/health.h" @@ -170,9 +171,29 @@ void figure_priest_action(figure *f) { if (f->destination_building_id) { figure_destination_priest_action(f); - } else { - culture_action(f, GROUP_FIGURE_PRIEST); + return; } + building *b = building_get(f->building_id); + f->terrain_usage = TERRAIN_USAGE_ROADS; + f->use_cross_country = 0; + figure_image_increase_offset(f, 12); + + int figure_slot_id = b->figure_id; + int max_roam = 384; + + if (b->type == BUILDING_PANTHEON_REWORKED) { + max_roam = 768; + } else if (b->type == BUILDING_SENATE && + building_monument_gt_module_is_active(PANTHEON_MODULE_3_SENATE)) { + figure_slot_id = b->figure_id2; + } + + f->max_roam_length = max_roam; + if (b->state != BUILDING_STATE_IN_USE || figure_slot_id != f->id) { + f->state = FIGURE_STATE_DEAD; + } + roamer_action(f, 1); + figure_image_update(f, image_group(GROUP_FIGURE_PRIEST)); } void figure_school_child_action(figure *f) diff --git a/src/figuretype/soldier.c b/src/figuretype/soldier.c index 5e5fd0e316..745f4ac6a1 100644 --- a/src/figuretype/soldier.c +++ b/src/figuretype/soldier.c @@ -1,6 +1,8 @@ #include "soldier.h" #include "assets/assets.h" +#include "building/monument.h" +#include "city/data_private.h" #include "city/figures.h" #include "city/games.h" #include "city/map.h" @@ -352,6 +354,10 @@ static int soldier_percentage_speed(figure_type type) } else if (type == FIGURE_FORT_ARCHER) { return 25; } + if (type == FIGURE_FORT_LEGIONARY && + building_monument_gt_module_is_active(MARS_MODULE_3_SUPPLY_CHAIN)) { + return 7 * city_data.mess_hall.food_types; + } return 0; } diff --git a/src/figuretype/supplier.c b/src/figuretype/supplier.c index a98de8b8eb..6eb8c020d7 100644 --- a/src/figuretype/supplier.c +++ b/src/figuretype/supplier.c @@ -5,6 +5,7 @@ #include "building/distribution.h" #include "building/granary.h" #include "building/market.h" +#include "building/monument.h" #include "building/storage.h" #include "building/warehouse.h" #include "core/config.h" @@ -228,6 +229,16 @@ static int recalculate_market_supplier_destination(figure *f) return change_market_supplier_destination(f, info[fetch_inventory].building_id); } +// Ceres Reworked module 2: market supplier speed bonus +static int market_supplier_bonus_speed(figure *f) +{ + if (f->type == FIGURE_MARKET_SUPPLIER && + building_monument_gt_module_is_active(CERES_MODULE_4_MARKET_SPEED)) { + return 20; + } + return 0; +} + void figure_supplier_action(figure *f) { f->terrain_usage = TERRAIN_USAGE_ROADS_HIGHWAY; @@ -247,8 +258,9 @@ void figure_supplier_action(figure *f) case FIGURE_ACTION_149_CORPSE: figure_combat_handle_corpse(f); break; - case FIGURE_ACTION_145_SUPPLIER_GOING_TO_STORAGE: - figure_movement_move_ticks(f, 1); + case FIGURE_ACTION_145_SUPPLIER_GOING_TO_STORAGE: { + int speed_bonus = market_supplier_bonus_speed(f); + figure_movement_move_ticks_with_percentage(f, 1, speed_bonus); if (f->direction == DIR_FIGURE_AT_DESTINATION) { f->wait_ticks = 0; f->previous_tile_x = f->x; @@ -284,8 +296,10 @@ void figure_supplier_action(figure *f) } } break; - case FIGURE_ACTION_146_SUPPLIER_RETURNING: - figure_movement_move_ticks(f, 1); + } + case FIGURE_ACTION_146_SUPPLIER_RETURNING: { + int speed_bonus = market_supplier_bonus_speed(f); + figure_movement_move_ticks_with_percentage(f, 1, speed_bonus); if (f->direction == DIR_FIGURE_AT_DESTINATION || f->direction == DIR_FIGURE_LOST) { if (f->direction == DIR_FIGURE_AT_DESTINATION && f->type == FIGURE_LIGHTHOUSE_SUPPLIER) { building_get(f->building_id)->resources[RESOURCE_TIMBER] += 100; @@ -295,6 +309,7 @@ void figure_supplier_action(figure *f) figure_route_remove(f); } break; + } } if (f->type == FIGURE_MESS_HALL_SUPPLIER) { int dir = figure_image_normalize_direction(f->direction < 8 ? f->direction : f->previous_tile_direction); diff --git a/src/figuretype/trader.c b/src/figuretype/trader.c index 1058e3ab64..f27c5857b9 100644 --- a/src/figuretype/trader.c +++ b/src/figuretype/trader.c @@ -115,21 +115,29 @@ static void resource_multiplier_reset(void) // Mercury Grand Temple base bonus to trader speed static int trader_bonus_speed(void) { + // Old Mercury grand temple base bonus if (building_monument_working(BUILDING_GRAND_TEMPLE_MERCURY)) { return 25; - } else { - return 0; } + // Mercury Reworked module 1: land trader speed bonus + if (building_monument_gt_module_is_active(MERCURY_MODULE_3_LAND_TRADER)) { + return 20; + } + return 0; } // Neptune Grand Temple base bonus to trader speed static int sea_trader_bonus_speed(void) { + // Neptune grand temple base bonus if (building_monument_working(BUILDING_GRAND_TEMPLE_NEPTUNE)) { return 25; - } else { - return 0; } + // Neptune Reworked module 2: sea trader speed bonus + if (building_monument_gt_module_is_active(NEPTUNE_MODULE_4_SEA_TRADE)) { + return 20; + } + return 0; } int figure_create_trade_caravan(int x, int y, int city_id) @@ -1000,6 +1008,10 @@ int figure_trade_land_trade_units(void) unit += add_unit; } + if (building_monument_gt_module_is_active(MERCURY_MODULE_3_LAND_TRADER)) { + unit += 4; + } + if (building_caravanserai_is_fully_functional()) { building *b = building_get(city_buildings_get_caravanserai()); @@ -1022,6 +1034,7 @@ int figure_trade_land_trade_units(void) int figure_trade_sea_trade_units(void) { int unit = 12; + if (building_monument_working(BUILDING_GRAND_TEMPLE_MERCURY)) { int add_unit = 0; building *b = building_get(building_find(BUILDING_GRAND_TEMPLE_MERCURY)); @@ -1035,6 +1048,10 @@ int figure_trade_sea_trade_units(void) unit += add_unit; } + if (building_monument_gt_module_is_active(NEPTUNE_MODULE_4_SEA_TRADE)) { + unit += 6; + } + if (building_lighthouse_is_fully_functional()) { trade_policy policy = city_trade_policy_get(SEA_TRADE_POLICY); diff --git a/src/game/cheats.c b/src/game/cheats.c index a7285f1acc..7d46001a7b 100644 --- a/src/game/cheats.c +++ b/src/game/cheats.c @@ -8,6 +8,8 @@ #include "city/gods.h" #include "city/finance.h" #include "city/data_private.h" +#include "city/health.h" +#include "city/population.h" #include "city/sentiment.h" #include "city/victory.h" #include "city/warning.h" @@ -32,8 +34,10 @@ #include "window/console.h" #include "window/editor/attributes.h" #include "window/editor/scenario_events.h" +#include "map/water_supply.h" #include "window/plain_message_dialog.h" +#include #include static int map_editor_warning_shown; @@ -56,6 +60,8 @@ static void game_cheat_disable_legions_consumption(uint8_t *); static void game_cheat_disable_invasions(uint8_t *); static void game_cheat_change_weather(uint8_t *); static void game_cheat_destroy_building(uint8_t *); +static void game_cheat_enable_legacy_venus(uint8_t *); +static void game_cheat_show_gt_bonuses(uint8_t *); static void (*const execute_command[])(uint8_t *args) = { game_cheat_add_money, @@ -77,7 +83,9 @@ static void (*const execute_command[])(uint8_t *args) = { game_cheat_disable_legions_consumption, game_cheat_disable_invasions, game_cheat_change_weather, - game_cheat_destroy_building + game_cheat_destroy_building, + game_cheat_enable_legacy_venus, + game_cheat_show_gt_bonuses }; static const char *commands[] = { @@ -100,7 +108,9 @@ static const char *commands[] = { "breadandfish", "leavemealone", "weather", // syntax: weather - "destroy" // syntax: destroy + "destroy", // syntax: destroy + "genetrix", + "gtbonus" }; #define NUMBER_OF_COMMANDS sizeof (commands) / sizeof (commands[0]) @@ -111,6 +121,7 @@ static struct { int extra_legions_unlocked; int disabled_legions_consumption; int disabled_invasions; + int legacy_gts_enabled; } data; static int parse_word(uint8_t *string, uint8_t *word) @@ -415,3 +426,120 @@ int game_cheat_disabled_invasions(void) { return data.disabled_invasions; } + +// Enables all 6 legacy grand temples in the building menu +static void game_cheat_enable_legacy_venus(uint8_t *args) +{ + data.legacy_gts_enabled = 1; + building_menu_update(); + show_warning(TR_CHEAT_LEGACY_GTS_ENABLED); +} + +int game_cheat_legacy_gts_enabled(void) +{ + return data.legacy_gts_enabled; +} + +static void game_cheat_show_gt_bonuses(uint8_t *args) +{ + if (!data.is_cheating) { + return; + } + + static uint8_t lines[14][80]; + static const uint8_t *texts[14]; + int n = 0; + + // Venus Reworked + { + int working = building_monument_working(BUILDING_GRAND_TEMPLE_VENUS_REWORKED); + int mod = building_monument_module_type(BUILDING_GRAND_TEMPLE_VENUS_REWORKED); + const char *mod_name = mod == 1 ? "Wine Temple" : mod == 2 ? "Theater+Tavern" : "none"; + snprintf((char *) lines[n], 80, "Venus: %s | Module: %s", + working ? "ACTIVE" : "off", mod_name); + texts[n] = lines[n]; n++; + snprintf((char *) lines[n], 80, " Base: +desirability to nearby houses%s", + working ? "" : " (inactive)"); + texts[n] = lines[n]; n++; + } + // Ceres Reworked + { + int working = building_monument_working(BUILDING_GRAND_TEMPLE_CERES_REWORKED); + int mod = building_monument_module_type(BUILDING_GRAND_TEMPLE_CERES_REWORKED); + const char *mod_name = mod == 1 ? "Farm Speed +40%" : mod == 2 ? "Market Speed +20%" : "none"; + int food_types = city_data.resource.food_types_eaten; + snprintf((char *) lines[n], 80, "Ceres: %s | Module: %s", + working ? "ACTIVE" : "off", mod_name); + texts[n] = lines[n]; n++; + snprintf((char *) lines[n], 80, " Base: -%d%% food consumed (%d food types eaten)", + 5 * food_types, food_types); + texts[n] = lines[n]; n++; + } + // Mercury Reworked + { + int working = building_monument_working(BUILDING_GRAND_TEMPLE_MERCURY_REWORKED); + int mod = building_monument_module_type(BUILDING_GRAND_TEMPLE_MERCURY_REWORKED); + const char *mod_name = mod == 1 ? "Land Trader +20spd +4cap" : mod == 2 ? "Prosperity" : "none"; + int sentiment = city_data.sentiment.value; + snprintf((char *) lines[n], 80, "Mercury: %s | Module: %s", + working ? "ACTIVE" : "off", mod_name); + texts[n] = lines[n]; n++; + snprintf((char *) lines[n], 80, " Base: -%d%% goods consumed (sentiment=%d)", + sentiment / 10, sentiment); + texts[n] = lines[n]; n++; + } + // Neptune Reworked + { + int working = building_monument_working(BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED); + int mod = building_monument_module_type(BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED); + if (mod == 1) { + snprintf((char *) lines[n], 80, "Neptune: %s | Fountain r=%d Reservoir r=%d", + working ? "ACTIVE" : "off", + map_water_supply_fountain_radius(), map_water_supply_reservoir_radius()); + } else { + snprintf((char *) lines[n], 80, "Neptune: %s | Module: %s", + working ? "ACTIVE" : "off", mod == 2 ? "Sea Trade +20spd +4cap" : "none"); + } + texts[n] = lines[n]; n++; + snprintf((char *) lines[n], 80, " Base: -5 disease | retire age %d+%d (health=%d)", + config_get(CONFIG_GP_CH_RETIRE_AT_60) ? 60 : 50, + city_population_neptune_reworked_retirement_bonus_years(), + city_health()); + texts[n] = lines[n]; n++; + } + // Pantheon Reworked + { + int working = building_monument_working(BUILDING_PANTHEON_REWORKED); + int mod = building_monument_module_type(BUILDING_PANTHEON_REWORKED); + const char *mod_name = mod == 1 ? "Senate priests" : mod == 2 ? "Luxury Palace +10%" : "none"; + snprintf((char *) lines[n], 80, "Pantheon: %s | Module: %s", + working ? "ACTIVE" : "off", mod_name); + texts[n] = lines[n]; n++; + snprintf((char *) lines[n], 80, " Base: all-god access + house evo bonus%s", + working ? "" : " (inactive)"); + texts[n] = lines[n]; n++; + } + // Mars Reworked + { + int working = building_monument_working(BUILDING_GRAND_TEMPLE_MARS_REWORKED); + int mod = building_monument_module_type(BUILDING_GRAND_TEMPLE_MARS_REWORKED); + int foods = city_data.mess_hall.food_types; + int boost = city_data.sentiment.mars_victory_boost; + if (mod == 1) { + snprintf((char *) lines[n], 80, "Mars: %s | Supply Chain | leg +%d%% (%d foods)", + working ? "ACTIVE" : "off", 7 * foods, foods); + } else if (mod == 2) { + snprintf((char *) lines[n], 80, "Mars: %s | Barracks -%d%% delay | victory=%d", + working ? "ACTIVE" : "off", 12 * foods, boost); + } else { + snprintf((char *) lines[n], 80, "Mars: %s | no module | foods=%d victory_boost=%d", + working ? "ACTIVE" : "off", foods, boost); + } + texts[n] = lines[n]; n++; + snprintf((char *) lines[n], 80, " Base: +5%% pop capacity (houses w/ Mars access)%s", + working ? "" : " (inactive)"); + texts[n] = lines[n]; n++; + } + + window_plain_message_dialog_show_text_list(TR_CHEAT_GT_BONUSES_TITLE, TR_CHEAT_GT_BONUSES_TEXT, texts, n); +} diff --git a/src/game/cheats.h b/src/game/cheats.h index dde8359d6e..164860f9e7 100644 --- a/src/game/cheats.h +++ b/src/game/cheats.h @@ -28,6 +28,8 @@ int game_cheat_disabled_legions_consumption(void); int game_cheat_disabled_invasions(void); +int game_cheat_legacy_gts_enabled(void); + void game_cheat_show_custom_events(uint8_t *args); void game_cheat_show_editor(uint8_t *args); diff --git a/src/game/tick.c b/src/game/tick.c index 740cc17c51..35c4ed4d41 100644 --- a/src/game/tick.c +++ b/src/game/tick.c @@ -16,6 +16,8 @@ #include "building/warehouse.h" #include "city/buildings.h" #include "city/culture.h" +#include "city/data_private.h" +#include "city/figures.h" #include "city/emperor.h" #include "city/festival.h" #include "city/finance.h" @@ -83,6 +85,8 @@ static void advance_month(void) scenario_random_event_process(); city_finance_handle_month_change(); city_resource_consume_food(); + city_sentiment_decrement_blessing_boost(); + city_sentiment_decrement_mars_victory_boost(); scenario_distant_battle_process(); scenario_invasion_process(); scenario_request_process(); @@ -91,7 +95,11 @@ static void advance_month(void) city_victory_update_months_to_govern(); formation_update_monthly_morale_at_rest(); city_message_decrease_delays(); - city_sentiment_decrement_blessing_boost(); + // Mars Reworked Module 2: on-map military victory detection + if (city_data.figure.had_enemies_this_month && city_figures_enemies() == 0) { + city_sentiment_apply_mars_victory(); + } + city_data.figure.had_enemies_this_month = 0; building_industry_advance_stats(); building_industry_start_strikes(); building_trim(); diff --git a/src/map/desirability.c b/src/map/desirability.c index 0996503648..2c05a6a490 100644 --- a/src/map/desirability.c +++ b/src/map/desirability.c @@ -76,7 +76,9 @@ static void update_buildings(void) int step_size; int range; int venus_module2 = building_monument_gt_module_is_active(VENUS_MODULE_2_DESIRABILITY_ENTERTAINMENT); + int venus_module3 = building_monument_gt_module_is_active(VENUS_MODULE_3_WINE_TEMPLE); int venus_gt = building_monument_working(BUILDING_GRAND_TEMPLE_VENUS); + int venus_gt_reworked = building_monument_working(BUILDING_GRAND_TEMPLE_VENUS_REWORKED); for (int i = 1; i < building_count(); i++) { building *b = building_get(i); if (b->state == BUILDING_STATE_IN_USE) { @@ -87,6 +89,18 @@ static void update_buildings(void) step_size = model->desirability_step_size; range = model->desirability_range; + // Venus GT Reworked Base Bonus + if (building_is_house(b->type) && b->data.house.temple_venus && venus_gt_reworked) { + if (b->subtype.house_level >= HOUSE_SMALL_VILLA) { + value += 4; + range += 1; + } else if (b->subtype.house_level >= HOUSE_SMALL_CASA) { + value += 2; + } + + } + + // Venus Module 2 House Desirability Bonus if (building_is_house(b->type) && b->data.house.temple_venus && venus_module2) { if (b->subtype.house_level >= HOUSE_SMALL_VILLA) { @@ -112,7 +126,7 @@ static void update_buildings(void) range = 0; } - // Venus GT Base Bonus + // Legacy Venus GT Base Bonus if (building_is_statue_garden_temple(b->type) && venus_gt) { value_bonus = ((value / 4) > 1) ? (value / 4) : 1; value += value_bonus; @@ -120,6 +134,14 @@ static void update_buildings(void) range += 1; } + // Venus Module 3 Temple Bonus + if (building_is_temple(b->type) && venus_module3) { + value = (value * 3) / 2; + if (b->size > 1) { + range += 1; + } + } + add_to_terrain( b->x, b->y, b->size, value, diff --git a/src/map/image_context.c b/src/map/image_context.c index 41bd5f4f89..d8f8fd4d81 100644 --- a/src/map/image_context.c +++ b/src/map/image_context.c @@ -443,7 +443,11 @@ static void set_tiles_road(int grid_offset, int tiles[MAX_TILES]) int base = b_main->grid_offset; tiles[i] = (offset == base) ? 1 : 0; } - if ((b->type >= BUILDING_GRAND_TEMPLE_CERES && b->type <= BUILDING_GRAND_TEMPLE_VENUS) || (b->type == BUILDING_PANTHEON)) { + if ((b->type >= BUILDING_GRAND_TEMPLE_CERES && b->type <= BUILDING_GRAND_TEMPLE_VENUS) || + (b->type >= BUILDING_GRAND_TEMPLE_CERES_REWORKED && b->type <= BUILDING_GRAND_TEMPLE_MARS_REWORKED) || + (b->type == BUILDING_PANTHEON) || + (b->type == BUILDING_PANTHEON_REWORKED) || + (b->type == BUILDING_GRAND_TEMPLE_VENUS_REWORKED)) { tiles[i] = (offset == b->grid_offset + map_grid_delta(3, 0)) ? 1 : 0; tiles[i] |= (offset == b->grid_offset + map_grid_delta(0, 3)) ? 1 : 0; tiles[i] |= (offset == b->grid_offset + map_grid_delta(6, 3)) ? 1 : 0; diff --git a/src/map/water_supply.c b/src/map/water_supply.c index 944368190c..a7cc2f5c63 100644 --- a/src/map/water_supply.c +++ b/src/map/water_supply.c @@ -233,6 +233,11 @@ void map_water_supply_update_reservoir_fountain(void) building *b = building_get(building_monument_get_neptune_gt()); map_terrain_add_with_radius(b->x, b->y, 7, map_water_supply_reservoir_radius(), TERRAIN_RESERVOIR_RANGE); } + // Neptune Reworked base bonus + if (building_monument_working(BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED)) { + building *b = building_get(building_monument_get_neptune_reworked_gt()); + map_terrain_add_with_radius(b->x, b->y, 7, map_water_supply_reservoir_radius(), TERRAIN_RESERVOIR_RANGE); + } // fountains for (building *b = building_first_of_type(BUILDING_FOUNTAIN); b; b = b->next_of_type) { @@ -346,7 +351,8 @@ int map_water_supply_is_building_unnecessary(int building_id, int radius) int map_water_supply_fountain_radius(void) { int radius = scenario_property_climate() == CLIMATE_DESERT ? FOUNTAIN_RADIUS - 1 : FOUNTAIN_RADIUS; - if (building_monument_working(BUILDING_GRAND_TEMPLE_NEPTUNE)) { + if (building_monument_working(BUILDING_GRAND_TEMPLE_NEPTUNE) || + building_monument_gt_module_is_active(NEPTUNE_MODULE_3_FOUNTAIN_RESERVOIR)) { radius++; } @@ -356,7 +362,8 @@ int map_water_supply_fountain_radius(void) int map_water_supply_reservoir_radius(void) { int radius = RESERVOIR_RADIUS; - if (building_monument_working(BUILDING_GRAND_TEMPLE_NEPTUNE)) { + if (building_monument_working(BUILDING_GRAND_TEMPLE_NEPTUNE) || + building_monument_gt_module_is_active(NEPTUNE_MODULE_3_FOUNTAIN_RESERVOIR)) { radius += 2; } diff --git a/src/scenario/allowed_building.c b/src/scenario/allowed_building.c index 930a2b68d7..a636227116 100644 --- a/src/scenario/allowed_building.c +++ b/src/scenario/allowed_building.c @@ -58,7 +58,7 @@ static const building_type CONVERSION_FROM_ORIGINAL[MAX_ORIGINAL_ALLOWED_BUILDIN { BUILDING_LOW_BRIDGE, BUILDING_SHIP_BRIDGE }, { BUILDING_BARRACKS, BUILDING_ARMOURY }, { BUILDING_MILITARY_ACADEMY }, - { BUILDING_GRAND_TEMPLE_CERES, BUILDING_GRAND_TEMPLE_NEPTUNE, BUILDING_GRAND_TEMPLE_MERCURY, BUILDING_GRAND_TEMPLE_MARS, BUILDING_GRAND_TEMPLE_VENUS }, + { BUILDING_GRAND_TEMPLE_CERES, BUILDING_GRAND_TEMPLE_NEPTUNE, BUILDING_GRAND_TEMPLE_MERCURY, BUILDING_GRAND_TEMPLE_MARS, BUILDING_GRAND_TEMPLE_VENUS, BUILDING_PANTHEON, BUILDING_GRAND_TEMPLE_CERES_REWORKED, BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED, BUILDING_GRAND_TEMPLE_MERCURY_REWORKED, BUILDING_GRAND_TEMPLE_MARS_REWORKED, BUILDING_GRAND_TEMPLE_VENUS_REWORKED, BUILDING_PANTHEON_REWORKED }, }; static uint8_t allowed_buildings[BUILDING_TYPE_MAX]; diff --git a/src/translation/english.c b/src/translation/english.c index 14f9552997..491d444f1a 100644 --- a/src/translation/english.c +++ b/src/translation/english.c @@ -80,7 +80,6 @@ static translation_string all_strings[] = { {TR_CONFIG_COMPLETE_RATING_COLUMNS, "Fix uncompleted rating columns on low targets"}, {TR_CONFIG_GRANDFESTIVAL, "Grand festivals allow extra blessing from a god"}, {TR_CONFIG_DIFFICULTY, "Difficulty:"}, - {TR_CONFIG_MAX_GRAND_TEMPLES, "Maximum number of grand temples per city:"}, {TR_CONFIG_INFINITE, "Infinite"}, {TR_CONFIG_GODS_EFFECTS, "Enable god curses/blessings"}, {TR_CONFIG_JEALOUS_GODS, "Disable jealousy of gods"}, @@ -193,6 +192,12 @@ static translation_string all_strings[] = { {TR_BUILDING_GRAND_TEMPLE_MERCURY, "Mercury grand temple" }, {TR_BUILDING_GRAND_TEMPLE_MARS, "Mars grand temple" }, {TR_BUILDING_GRAND_TEMPLE_VENUS, "Venus grand temple" }, + {TR_BUILDING_GRAND_TEMPLE_CERES_LEGACY, "Ceres ancient temple" }, + {TR_BUILDING_GRAND_TEMPLE_NEPTUNE_LEGACY, "Neptune ancient temple" }, + {TR_BUILDING_GRAND_TEMPLE_MERCURY_LEGACY, "Mercury ancient temple" }, + {TR_BUILDING_GRAND_TEMPLE_MARS_LEGACY, "Mars ancient temple" }, + {TR_BUILDING_PANTHEON_LEGACY, "Ancient Pantheon" }, + {TR_BUILDING_GRAND_TEMPLE_VENUS_LEGACY, "Venus ancient temple" }, {TR_BUILDING_PANTHEON, "Pantheon" }, {TR_BUILDING_GRAND_TEMPLE_CERES_DESC, "Grand temple of Ceres" }, {TR_BUILDING_GRAND_TEMPLE_NEPTUNE_DESC, "Grand temple of Neptune" }, @@ -205,12 +210,22 @@ static translation_string all_strings[] = { {TR_BUILDING_GRAND_TEMPLE_MERCURY_BONUS_DESC, "Mercury blesses your traders by land and sea with an additional 50% capacity, and inspires land traders to move 25% faster." }, // Note to translators: This one changed from the previous version, please update. {TR_BUILDING_GRAND_TEMPLE_MARS_BONUS_DESC, "Mars exhorts your citizens to enlist, dispatching recruits to your city's forts, and allowing four additional forts to be built." }, // Note to translators: This one changed from the previous version, please update. {TR_BUILDING_GRAND_TEMPLE_VENUS_BONUS_DESC, "Venus graces your city's gardens, statues and temples to glow with beauty, improving their desirability. Houses also hold more goods, and devolve more slowly." }, // Note to translators: This one changed from the previous version, please update. + {TR_BUILDING_GRAND_TEMPLE_VENUS_REWORKED_BONUS_DESC, "Priests of Venus bless houses to glow with additional desirability." }, + {TR_BUILDING_GRAND_TEMPLE_CERES_REWORKED_BONUS_DESC, "Houses visited by priests of Ceres consume less total food for each food type provided."}, + {TR_BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED_BONUS_DESC, "Provides water access like a filled reservoir, and priests prevent disease and extend citizens' working years based on city health."}, + {TR_BUILDING_GRAND_TEMPLE_MERCURY_REWORKED_BONUS_DESC, "Houses visited by priests of Mercury will consume fewer goods when sentiment is high."}, + {TR_BUILDING_GRAND_TEMPLE_MARS_REWORKED_BONUS_DESC, "Houses visited by priests of Mars receive a blessing of martial strength, housing more residents. Four additional forts may be constructed." }, + {TR_BUILDING_PANTHEON_REWORKED_BONUS_DESC, "The Pantheon provides all citizens with access to all gods and allows house to evolve one additional step. Annual festivals are held and religious building levies are reduced." }, {TR_BUILDING_PANTHEON_BONUS_DESC, "The Pantheon provides access to your citizens to worship all the gods. Annual festivals are also held here, and religious and cultural building levies are reduced by 25%." }, // Note to translators: This one changed from the previous version, please update. {TR_BUILDING_GRAND_TEMPLE_CERES_MODULE_1_DESC, "Priests reduce food consumption by 20%." }, {TR_BUILDING_GRAND_TEMPLE_NEPTUNE_MODULE_1_DESC, "Temples produce charioteers for the Hippodrome." }, {TR_BUILDING_GRAND_TEMPLE_MERCURY_MODULE_1_DESC, "Priests reduce pottery and furniture consumption by 20%." }, {TR_BUILDING_GRAND_TEMPLE_MARS_MODULE_1_DESC, "Temples generate food, in an amount based on the number of houses they cover, and deliver it to the supply post. Fort levies reduced by 25%." }, // Note to translators: This one changed from the previous version, please update. {TR_BUILDING_GRAND_TEMPLE_VENUS_MODULE_1_DESC, "The Grand temple produces wine in a quantity scaled to city population with Venus temple access. Temples collect and distribute it to houses and taverns." }, + {TR_BUILDING_GRAND_TEMPLE_VENUS_MODULE_3_DESC, "Provides a second wine type. All small, large, and grand temples gain increased desirability." }, + {TR_BUILDING_GRAND_TEMPLE_VENUS_MODULE_4_DESC, "All houses gain additional entertainment from theaters and working taverns." }, + {TR_BUILDING_GRAND_TEMPLE_VENUS_MODULE_4_THEATER_BATHHOUSE_DESC, "All houses gain additional entertainment from theaters and bathhouses." }, + {TR_BUILDING_GRAND_TEMPLE_VENUS_MODULE_4_BATHHOUSE_TAVERN_DESC, "All houses gain additional entertainment from bathhouses and working taverns." }, {TR_BUILDING_GRAND_TEMPLE_CERES_MODULE_2_DESC, "Priests collect and distribute both oil and one food type from city storage." }, {TR_BUILDING_GRAND_TEMPLE_NEPTUNE_MODULE_2_DESC, "Priests expand housing capacity by 5%. Grand temple provides water like a filled reservoir." }, {TR_BUILDING_GRAND_TEMPLE_MERCURY_MODULE_2_DESC, "Priests reduce oil and wine consumption by 20%." }, @@ -228,8 +243,30 @@ static translation_string all_strings[] = { {TR_BUILDING_GRAND_TEMPLE_MARS_DESC_MODULE_2, "Temple of Mars Quirinus" }, {TR_BUILDING_GRAND_TEMPLE_VENUS_DESC_MODULE_1, "Temple of Venus Verticordia" }, {TR_BUILDING_GRAND_TEMPLE_VENUS_DESC_MODULE_2, "Temple of Venus Genetrix" }, + {TR_BUILDING_GRAND_TEMPLE_VENUS_DESC_MODULE_3, "Temple of Venus Cloacina" }, + {TR_BUILDING_GRAND_TEMPLE_VENUS_DESC_MODULE_4, "Temple of Venus Felix" }, + {TR_BUILDING_GRAND_TEMPLE_CERES_DESC_MODULE_3, "Temple of Ceres Frugifera" }, + {TR_BUILDING_GRAND_TEMPLE_CERES_MODULE_3_DESC, "Farm carts from food farms move much faster." }, + {TR_BUILDING_GRAND_TEMPLE_CERES_DESC_MODULE_4, "Temple of Ceres Abundantia" }, + {TR_BUILDING_GRAND_TEMPLE_CERES_MODULE_4_DESC, "Market buyers collecting from granaries and warehouses move faster." }, + {TR_BUILDING_GRAND_TEMPLE_MERCURY_DESC_MODULE_3, "Temple of Mercury Mercator" }, + {TR_BUILDING_GRAND_TEMPLE_MERCURY_MODULE_3_DESC, "Land traders and caravans move faster and carry more goods." }, + {TR_BUILDING_GRAND_TEMPLE_MERCURY_DESC_MODULE_4, "Temple of Mercury Opulentus" }, + {TR_BUILDING_GRAND_TEMPLE_MERCURY_MODULE_4_DESC, "Goods consumption is reduced citywide based on Prosperity." }, + {TR_BUILDING_GRAND_TEMPLE_NEPTUNE_DESC_MODULE_3, "Temple of Neptunus Adiutor" }, + {TR_BUILDING_GRAND_TEMPLE_NEPTUNE_MODULE_3_DESC, "Fountain and reservoir range is increased." }, + {TR_BUILDING_GRAND_TEMPLE_NEPTUNE_DESC_MODULE_4, "Temple of Neptunus Redux" }, + {TR_BUILDING_GRAND_TEMPLE_NEPTUNE_MODULE_4_DESC, "Sea traders move faster and carry more goods." }, {TR_BUILDING_PANTHEON_DESC_MODULE_1, "Pantheum Ara Maxima" }, {TR_BUILDING_PANTHEON_DESC_MODULE_2, "Pantheum Roma Aeterna" }, + {TR_BUILDING_PANTHEON_DESC_MODULE_3, "Pantheum Imperatorum" }, + {TR_BUILDING_PANTHEON_MODULE_3_DESC, "The Senate also sends a priest of the Pantheon, conveying all of its benefits." }, + {TR_BUILDING_PANTHEON_DESC_MODULE_4, "Pantheum Auratum" }, + {TR_BUILDING_PANTHEON_MODULE_4_DESC, "Luxury palaces house more residents, contribute additional workers to the city, and each grant 2 culture rating." }, + {TR_BUILDING_GRAND_TEMPLE_MARS_DESC_MODULE_3, "Temple of Mars Gradivus" }, + {TR_BUILDING_GRAND_TEMPLE_MARS_MODULE_3_DESC, "Cartpushers supplying workshops move faster. Legionaries march faster for each food type provided at the supply post." }, + {TR_BUILDING_GRAND_TEMPLE_MARS_DESC_MODULE_4, "Temple of Mars Invictus" }, + {TR_BUILDING_GRAND_TEMPLE_MARS_MODULE_4_DESC, "Barracks train troops faster for each food type provided at the supply post. Military victories grant a temporary boost to sentiment." }, {TR_BUILDING_GRAND_TEMPLE_MENU, "Grand temple" }, {TR_BUILDING_WORK_CAMP, "Work camp" }, {TR_BUILDING_WORK_CAMP_DESC, "Laborers gather here to transport materials to construction sites." }, @@ -369,7 +406,6 @@ static translation_string all_strings[] = { {TR_TEMPLE_SPECIAL_ORDERS_HEADER, "Temple instructions"}, {TR_TAVERN_SPECIAL_ORDERS_HEADER, "Tavern instructions"}, {TR_WARNING_NO_MESS_HALL, "You must first build a supply post to feed your soldiers."}, - {TR_WARNING_MAX_GRAND_TEMPLES, "No more grand temples can be built."}, {TR_CITY_MESSAGE_TITLE_GRAND_TEMPLE_COMPLETE, "Grand temple completed"}, {TR_CITY_MESSAGE_TEXT_GRAND_TEMPLE_COMPLETE, "Priests and worshipers flock to the new Grand temple for the rites of dedication. Your people stand in awe of the majesty of your works, and your chosen deity showers you with their favor."}, {TR_CITY_MESSAGE_TITLE_MERCURY_BLESSING, "A blessing from Mercury" }, @@ -1653,6 +1689,7 @@ static translation_string all_strings[] = { {TR_CONDITION_TEXT_TIME_LEFT_UNTIL_VICTORY, "Time until victory:" }, {TR_CHEAT_DISABLE_INVASIONS, "Disable invasions"}, {TR_CHEAT_DISABLE_LEGIONS_CONSUMPTION, "Disable soldier food consumption"}, + {TR_CHEAT_LEGACY_GTS_ENABLED, "Ancient grand temples unlocked"}, {TR_ACTION_TYPE_CHANGE_TERRAIN, "Add/remove terrain" }, {TR_PARAMETER_TERRAIN, "Terrain" }, {TR_PARAMETER_ADD, "Add" }, @@ -1910,6 +1947,8 @@ static translation_string all_strings[] = { {TR_BUILDING_HOUSE_LUXURY_PALACE, "Luxury Palace"}, {TR_CONFIG_UI_BUILD_SHOW_RESERVOIR_RANGES, "Show reservoir range when building fountains"}, {TR_CHEAT_DESTROYED_BUILDING, "Destroyed building"}, + {TR_CHEAT_GT_BONUSES_TITLE, "Grand Temple Bonuses"}, + {TR_CHEAT_GT_BONUSES_TEXT, ""}, {TR_CONFIG_ENABLE_BUILD_MENU_SHORTCUTS, "Enable build menu shortcuts"}, {TR_ACTION_TYPE_LOCK_TRADE_ROUTE, "Lock Trade route"}, {TR_PARAMETER_LOCK, "Lock"}, diff --git a/src/translation/french.c b/src/translation/french.c index bafeea3b6d..1b184eb0ab 100644 --- a/src/translation/french.c +++ b/src/translation/french.c @@ -80,7 +80,6 @@ static translation_string all_strings[] = { {TR_CONFIG_COMPLETE_RATING_COLUMNS, "Corrige les colonnes d'évaluation incomplètes"}, {TR_CONFIG_GRANDFESTIVAL, "Les grandes fêtes permettent une bénédiction supplémentaire d'un dieu"}, {TR_CONFIG_DIFFICULTY, "Difficulté :"}, - {TR_CONFIG_MAX_GRAND_TEMPLES, "Nombre maximum de temples monumentaux par cité :"}, {TR_CONFIG_INFINITE, "Infini"}, {TR_CONFIG_GODS_EFFECTS, "Activer les malédictions/bénédictions des dieux"}, {TR_CONFIG_JEALOUS_GODS, "Désactiver la jalousie des dieux"}, @@ -369,7 +368,6 @@ static translation_string all_strings[] = { {TR_TEMPLE_SPECIAL_ORDERS_HEADER, "Instructions du temple"}, {TR_TAVERN_SPECIAL_ORDERS_HEADER, "Instructions de la taverne"}, {TR_WARNING_NO_MESS_HALL, "Construisez d'abord un réfectoire pour vos soldats"}, - {TR_WARNING_MAX_GRAND_TEMPLES, "Seuls deux temples monumentaux peuvent être construits"}, {TR_CITY_MESSAGE_TITLE_GRAND_TEMPLE_COMPLETE, "Temple monumental terminé"}, {TR_CITY_MESSAGE_TEXT_GRAND_TEMPLE_COMPLETE, "Les prêtres et les fidèles affluent vers le nouveau temple monumental pour les rites de consécration. Votre peuple est impressionné par la majesté de vos œuvres et la divinité que vous avez choisie vous comble de faveur."}, {TR_CITY_MESSAGE_TITLE_MERCURY_BLESSING, "Bénédiction de Mercure"}, diff --git a/src/translation/german.c b/src/translation/german.c index 28f6450648..8c4fef2607 100644 --- a/src/translation/german.c +++ b/src/translation/german.c @@ -144,7 +144,6 @@ static translation_string all_strings[] = { {TR_CONFIG_LANGUAGE_DEFAULT, "(Standard)"}, {TR_CONFIG_LANGUAGE_LABEL, "Sprache:"}, {TR_CONFIG_DEFAULT_PLAYER_NAME, "Standard-Spielername:"}, - {TR_CONFIG_MAX_GRAND_TEMPLES, "Maximale Anzahl von Prachttempeln pro Stadt: "}, {TR_CONFIG_MORE_STOCKPILE, "Häuser horten mehr Güter von Märkten"}, {TR_CONFIG_MULTIPLE_BARRACKS, "Erlaube das Errichten mehrerer Kasernen"}, {TR_CONFIG_MUSIC, "Musik einschalten"}, @@ -373,7 +372,6 @@ static translation_string all_strings[] = { {TR_CITY_WARNING_WAREHOUSE_BREAKIN, "Ein Lagerhaus wurde geplündert!"}, {TR_CITY_WARNING_GRANARY_BREAKIN, "Ein Silo wurde geplündert!"}, {TR_CITY_WARNING_THEFT, "Gelder wurden aus einem Forum oder dem Senat gestohlen!"}, - {TR_WARNING_MAX_GRAND_TEMPLES, "In einer Stadt können nur zwei Prachttempel gebaut werden."}, {TR_WARNING_NEARBY_WOLF, "Kann nicht gebaut werden, wenn Wölfe in der Nähe sind"}, {TR_WARNING_NO_ARMOURY, "Bauen Sie eine Waffenkammer, um Waffen an Kasernen zu liefern." }, {TR_WARNING_NO_MESS_HALL, "Ihr müsst zunächst einen Versorgungsposten bauen, um Ihre Soldaten zu ernähren."}, diff --git a/src/translation/greek.c b/src/translation/greek.c index 4d1720c2c1..e2db47b064 100644 --- a/src/translation/greek.c +++ b/src/translation/greek.c @@ -79,7 +79,6 @@ static translation_string all_strings[] = { {TR_CONFIG_COMPLETE_RATING_COLUMNS, "Διόρθωση μη ολοκληρωμένων στηλών αξιολόγησης σε χαμηλούς στόχους"}, {TR_CONFIG_GRANDFESTIVAL, "Οι μεγάλες γιορτές επιτρέπουν επιπλέον ευλογία από έναν θεό"}, {TR_CONFIG_DIFFICULTY, "Δυσκολία:"}, - {TR_CONFIG_MAX_GRAND_TEMPLES, "Μέγιστος αριθμός μεγαλοπρεπών ναών ανά πόλη:"}, {TR_CONFIG_INFINITE, "Άπειρη"}, {TR_CONFIG_GODS_EFFECTS, "Ενεργοποιήστε τις κατάρες/ευλογίες των θεών"}, {TR_CONFIG_JEALOUS_GODS, "Απενεργοποίηση της ζήλειας των θεών"}, @@ -363,7 +362,6 @@ static translation_string all_strings[] = { {TR_TEMPLE_SPECIAL_ORDERS_HEADER, "Οδηγίες ναού"}, {TR_TAVERN_SPECIAL_ORDERS_HEADER, "Οδηγίες ταβέρνας"}, {TR_WARNING_NO_MESS_HALL, "Πρέπει πρώτα να χτίσετε ένα σταθμό ανεφοδιασμού για να ταΐσετε τους στρατιώτες σας."}, - {TR_WARNING_MAX_GRAND_TEMPLES, "Δεν μπορούν να χτιστούν άλλοι μεγαλοπρεπείς ναοί."}, {TR_CITY_MESSAGE_TITLE_GRAND_TEMPLE_COMPLETE, "Ολοκληρώθηκε ο μεγαλοπρεπής ναός"}, {TR_CITY_MESSAGE_TEXT_GRAND_TEMPLE_COMPLETE, "Ιερείς και πιστοί συρρέουν στο νέο μεγαλοπρεπή ναό για τις τελετές των εγκαινίων. Ο λαός σας στέκεται με δέος μπροστά στο μεγαλείο των έργων σας και η θεότητα που επιλέξατε σας περιβάλλει με εύνοια."}, {TR_CITY_MESSAGE_TITLE_MERCURY_BLESSING, "Μια ευλογία από τον Ερμή" }, diff --git a/src/translation/italian.c b/src/translation/italian.c index 2b9d851424..c3f325be6c 100755 --- a/src/translation/italian.c +++ b/src/translation/italian.c @@ -80,7 +80,6 @@ static translation_string all_strings[] = { {TR_CONFIG_COMPLETE_RATING_COLUMNS, "Fissa colonne di valutazione non completate su obiettivi bassi"}, {TR_CONFIG_GRANDFESTIVAL, "Le grandi feste permettono una benedizione extra da parte di una divinità"}, {TR_CONFIG_DIFFICULTY, "Difficoltà:"}, - {TR_CONFIG_MAX_GRAND_TEMPLES, "Massimo numero di templi grandi per ogni città:"}, {TR_CONFIG_INFINITE, "Illimitato"}, {TR_CONFIG_GODS_EFFECTS, "Abilità benedizioni/maledizioni delle divinità"}, {TR_CONFIG_JEALOUS_GODS, "Disabilita gelosia delle divinità"}, @@ -369,7 +368,6 @@ static translation_string all_strings[] = { {TR_TEMPLE_SPECIAL_ORDERS_HEADER, "Istruzioni del Tempio"}, {TR_TAVERN_SPECIAL_ORDERS_HEADER, "Istruzioni della taverna"}, {TR_WARNING_NO_MESS_HALL, "Devi prima costruire una stazione di rifornimento per sfamare i tuoi soldati."}, - {TR_WARNING_MAX_GRAND_TEMPLES, "Solo due Templi Grandi possono essere costruiti."}, {TR_CITY_MESSAGE_TITLE_GRAND_TEMPLE_COMPLETE, "Tempio Grandioso completato"}, {TR_CITY_MESSAGE_TEXT_GRAND_TEMPLE_COMPLETE, "I sacerdoti e i fedeli accorrono al nuovo grande tempio per i riti di consacrazione. Il tuo popolo è in visibilio per la maestosità delle tue opere, e la divinità da te scelta ti offre il suo favore."}, {TR_CITY_MESSAGE_TITLE_MERCURY_BLESSING, "Una benedizione da Mercurio" }, diff --git a/src/translation/korean.c b/src/translation/korean.c index 2921c0f5e1..aa26a0f037 100644 --- a/src/translation/korean.c +++ b/src/translation/korean.c @@ -80,7 +80,6 @@ static translation_string all_strings[] = { {TR_CONFIG_COMPLETE_RATING_COLUMNS, "낮은 목표에 대한 미완료 등급 열 수정"}, {TR_CONFIG_GRANDFESTIVAL, "초대형 축제가 추가적인 축복 내리는 것을 허용"}, {TR_CONFIG_DIFFICULTY, "난이도:"}, - {TR_CONFIG_MAX_GRAND_TEMPLES, "건설 가능한 대성전의 최대 갯수:"}, {TR_CONFIG_INFINITE, "무한"}, {TR_CONFIG_GODS_EFFECTS, "신의 축복/저주 활성화"}, {TR_CONFIG_JEALOUS_GODS, "신들의 질투 비활성화"}, @@ -368,7 +367,6 @@ static translation_string all_strings[] = { {TR_TEMPLE_SPECIAL_ORDERS_HEADER, "신전 운영 지침"}, {TR_TAVERN_SPECIAL_ORDERS_HEADER, "선술집 운영 지침"}, {TR_WARNING_NO_MESS_HALL, "먼저 병사들에게 식량을 보급할 보급소를 건설해야합니다."}, - {TR_WARNING_MAX_GRAND_TEMPLES, "더 이상 대성전을 건축할 수 없습니다."}, {TR_CITY_MESSAGE_TITLE_GRAND_TEMPLE_COMPLETE, "대성전 완공"}, {TR_CITY_MESSAGE_TEXT_GRAND_TEMPLE_COMPLETE, "성직자와 신도들이 새로운 대성전의 봉헌 의식을 진행합니다. 시민들이 당신의 업적에 경탄하고 있으며, 선택받은 신은 당신에게 가호를 베풀고 있습니다."}, {TR_CITY_MESSAGE_TITLE_MERCURY_BLESSING, "머큐리의 축복" }, diff --git a/src/translation/polish.c b/src/translation/polish.c index aab5047b27..e846322012 100644 --- a/src/translation/polish.c +++ b/src/translation/polish.c @@ -294,7 +294,6 @@ static translation_string all_strings[] = { { TR_CITY_MESSAGE_TEXT_MESS_HALL_MISSING, "Twoje miasto straciło punkt zaopatrzeniowy i twoi żołnierze głodują. Natychmiast zbuduj nowy." }, { TR_MARKET_SPECIAL_ORDERS_HEADER, "Dobra do zebrania" }, { TR_WARNING_NO_MESS_HALL, "Wpierw zbuduj punkt zaopatrzeniowy dla żołnierzy." }, - { TR_WARNING_MAX_GRAND_TEMPLES, "Można postawić tylko dwie wielkie świątynie." }, { TR_CITY_MESSAGE_TITLE_GRAND_TEMPLE_COMPLETE, "Wielka świątynia ukończona" }, { TR_CITY_MESSAGE_TEXT_GRAND_TEMPLE_COMPLETE, "Kapłani i wyznawcy tłumnie gromadzą się w nowej wielkiej świątyni na ryty poświęcenia. Mieszkańcy są w podziwie majestatu twojej pracy, a wybrane bóstwo obdarza cię swoją łaską." }, { TR_CITY_MESSAGE_TITLE_MERCURY_BLESSING, "Błogosławieństwo Merkurego" }, @@ -515,7 +514,6 @@ static translation_string all_strings[] = { {TR_CONFIG_AUDIO, "Opcje dźwięku"}, {TR_CONFIG_CITY_SOUNDS, "Włącz dźwięki miasta"}, {TR_CONFIG_DIFFICULTY, "Poziom trudności:"}, - {TR_CONFIG_MAX_GRAND_TEMPLES, "Maksymalna liczba wielkich świątyń:" }, {TR_CONFIG_INFINITE, "Bez limitu" }, {TR_CONFIG_USE_COLOR_CURSORS, "Użyj kolorowych kursorów" }, {TR_CONFIG_VIDEO_SOUND, "Włącz dźwięk filmów" }, diff --git a/src/translation/portuguese.c b/src/translation/portuguese.c index 3d0c42b97b..872fbc5cf3 100644 --- a/src/translation/portuguese.c +++ b/src/translation/portuguese.c @@ -334,7 +334,6 @@ static translation_string all_strings[] = { {TR_TEMPLE_SPECIAL_ORDERS_HEADER, "Instruções"}, {TR_TAVERN_SPECIAL_ORDERS_HEADER, "Instruções"}, { TR_WARNING_NO_MESS_HALL, "Construa um posto de suprimentos primeiro, para alimentar os soldados." }, - { TR_WARNING_MAX_GRAND_TEMPLES, "Apenas dois Santuários podem ser construídos." }, { TR_CITY_MESSAGE_TITLE_GRAND_TEMPLE_COMPLETE, "Santuário completado" }, { TR_CITY_MESSAGE_TEXT_GRAND_TEMPLE_COMPLETE, "Sacerdotes e fiéis estão se reunindo no Santuário para os ritos de dedicação. O povo está estasiado diante da majestosidade de teus feitos, e a divindade escolhida te enche de graças." }, { TR_CITY_MESSAGE_TITLE_MERCURY_BLESSING, "Uma bênção de Mercúrio" }, @@ -707,7 +706,6 @@ static translation_string all_strings[] = { {TR_CONFIG_VIDEO_SOUND, "Ativar som do vídeo" }, {TR_BUILDING_WATCHTOWER_DESC_NO_SOLDIERS, "Esta torre precisa de um sentinela do quartel para que possa ser útil na defesa da cidade." }, {TR_CONFIG_INFINITE, "Ilimitado" }, - {TR_CONFIG_MAX_GRAND_TEMPLES, "Número máximo de Santuários por cidade:" }, {TR_HOTKEY_ROTATE_BUILDING_BACK, "Rotação anterior da construção" }, {TR_TOOLTIP_BUTTON_ACCEPT_WORKERS, "Suspender recursos para fábricas e celeiros" }, {TR_TOOLTIP_BUTTON_STOCKPILING_ON, "Permitir estocagem em um armazém" }, diff --git a/src/translation/russian.c b/src/translation/russian.c index 0298f5ea18..07e84a0ce7 100644 --- a/src/translation/russian.c +++ b/src/translation/russian.c @@ -80,7 +80,6 @@ static translation_string all_strings[] = { {TR_CONFIG_COMPLETE_RATING_COLUMNS, "Исправить незавершенные колонны рейтинга"}, {TR_CONFIG_GRANDFESTIVAL, "Великий фестиваль дает дополнительное благословение от божества"}, {TR_CONFIG_DIFFICULTY, "Сложность:"}, - {TR_CONFIG_MAX_GRAND_TEMPLES, "Максимальное количество великих храмов в городе:"}, {TR_CONFIG_INFINITE, "Бесконечно"}, {TR_CONFIG_GODS_EFFECTS, "ВКЛ гнев/благословение богов"}, {TR_CONFIG_JEALOUS_GODS, "ОТКЛ ревность богов"}, @@ -369,7 +368,6 @@ static translation_string all_strings[] = { {TR_TEMPLE_SPECIAL_ORDERS_HEADER, "Указания храму"}, {TR_TAVERN_SPECIAL_ORDERS_HEADER, "Указания таверне"}, {TR_WARNING_NO_MESS_HALL, "Сначала вы должны построить пост снабжения, чтобы кормить своих солдат."}, - {TR_WARNING_MAX_GRAND_TEMPLES, "Больше нельзя строить великие храмы."}, {TR_CITY_MESSAGE_TITLE_GRAND_TEMPLE_COMPLETE, "Великий храм возведен"}, {TR_CITY_MESSAGE_TEXT_GRAND_TEMPLE_COMPLETE, "Жрецы и поклонники приходят к новому великому храму для проведения обрядов посвящения. Ваш народ трепещет перед величием ваших трудов, и ваше избранное божество одаривает вас благосклонностью."}, {TR_CITY_MESSAGE_TITLE_MERCURY_BLESSING, "Благословение Меркурия"}, diff --git a/src/translation/simplified_chinese.c b/src/translation/simplified_chinese.c index 0e913297e1..b9be9fc633 100644 --- a/src/translation/simplified_chinese.c +++ b/src/translation/simplified_chinese.c @@ -73,7 +73,6 @@ static translation_string all_strings[] = { {TR_CONFIG_COMPLETE_RATING_COLUMNS, "修复低目标下无法完成评比任务BUG"}, {TR_CONFIG_GRANDFESTIVAL, "举办豪华节庆获取神灵更多祝福"}, {TR_CONFIG_DIFFICULTY, "游戏难度:"}, - {TR_CONFIG_MAX_GRAND_TEMPLES, "每座城市宏伟神庙数量上限:"}, {TR_CONFIG_INFINITE, "无限"}, {TR_CONFIG_GODS_EFFECTS, "开启神灵诅咒/祝福效果"}, {TR_CONFIG_JEALOUS_GODS, "关闭神灵嫉妒效果"}, @@ -362,7 +361,6 @@ static translation_string all_strings[] = { {TR_TEMPLE_SPECIAL_ORDERS_HEADER, "神庙指令"}, {TR_TAVERN_SPECIAL_ORDERS_HEADER, "酒馆指令"}, {TR_WARNING_NO_MESS_HALL, "你必须先建造军粮站供养士兵。"}, - {TR_WARNING_MAX_GRAND_TEMPLES, "无法建造更多宏伟神庙。"}, {TR_CITY_MESSAGE_TITLE_GRAND_TEMPLE_COMPLETE, "宏伟神庙建造完成"}, {TR_CITY_MESSAGE_TEXT_GRAND_TEMPLE_COMPLETE, "祭司和朝拜者们聚众在宏伟神庙举行献祭仪式,你沐浴在神的关照下,市民对你的丰功伟业深感敬畏。"}, {TR_CITY_MESSAGE_TITLE_MERCURY_BLESSING, "莫丘里的祝福"}, diff --git a/src/translation/spanish.c b/src/translation/spanish.c index 4d43881fc1..d807938c44 100644 --- a/src/translation/spanish.c +++ b/src/translation/spanish.c @@ -79,7 +79,6 @@ static translation_string all_strings[] = { {TR_CONFIG_COMPLETE_RATING_COLUMNS, "Arreglar columnas de puntuación incompletas con objetivos bajos"}, {TR_CONFIG_GRANDFESTIVAL, "Super-Festivales permiten bendiciones extras de un dios"}, {TR_CONFIG_DIFFICULTY, "Dificultad:"}, - {TR_CONFIG_MAX_GRAND_TEMPLES, "Numero máximo de templos magnos por ciudad:"}, {TR_CONFIG_INFINITE, "Infinito"}, {TR_CONFIG_GODS_EFFECTS, "Activar efectos de dioses"}, {TR_CONFIG_JEALOUS_GODS, "Desactivar la envidia entre dioses"}, @@ -364,7 +363,6 @@ static translation_string all_strings[] = { {TR_TEMPLE_SPECIAL_ORDERS_HEADER, "Instrucciones del templo"}, {TR_TAVERN_SPECIAL_ORDERS_HEADER, "Instrucciones de la taberna"}, {TR_WARNING_NO_MESS_HALL, "Debes construir primero un puesto de suministro para alimentar a tus tropas."}, - {TR_WARNING_MAX_GRAND_TEMPLES, "Solo pueden construirse dos Templos magnos."}, {TR_CITY_MESSAGE_TITLE_GRAND_TEMPLE_COMPLETE, "Templo magno completado"}, {TR_CITY_MESSAGE_TEXT_GRAND_TEMPLE_COMPLETE, "Sacerdotes y fieles se congregan en el nuevo templo magno para los ritos de consagración. Tu gente ve asombrada la majestuosidad de tus obras, y tu deidad elegida te colma de su favor."}, {TR_CITY_MESSAGE_TITLE_MERCURY_BLESSING, "Bendición de Mercurio"}, diff --git a/src/translation/swedish.c b/src/translation/swedish.c index dbfc608058..59eed4a16e 100644 --- a/src/translation/swedish.c +++ b/src/translation/swedish.c @@ -339,7 +339,6 @@ static translation_string all_strings[] = { {TR_TEMPLE_SPECIAL_ORDERS_HEADER, "Tempelinstruktioner"}, {TR_TAVERN_SPECIAL_ORDERS_HEADER, "Kroginstruktioner"}, - {TR_WARNING_MAX_GRAND_TEMPLES, "Endast två storslagna tempel kan byggas." }, {TR_CITY_MESSAGE_TITLE_GRAND_TEMPLE_COMPLETE, "Storslaget tempel färdigbyggt"}, {TR_CITY_MESSAGE_TEXT_GRAND_TEMPLE_COMPLETE, "Präster och tillbedjare flockas till det nya storslagna templet för invigningsritualerna. Ditt folk beundrar ditt storslagna arbete, och templets tillägnade gud öser sin ynnest över dig."}, {TR_CITY_MESSAGE_TITLE_MERCURY_BLESSING, "En välsignelse från Merkurius" }, @@ -704,7 +703,6 @@ static translation_string all_strings[] = { {TR_WINDOW_BUILDING_DISTRIBUTION_CART_PUSHER_GETTING, "Vagndragaren hämtar varor från ett annat varuhus."}, {TR_BUILDING_PALISADE, "Palissad" }, {TR_BUILDING_PALISADE_DESC, "Detta gedigna pålverk av trä kommer skydda oss från angripare och fientliga djur."}, - {TR_CONFIG_MAX_GRAND_TEMPLES, "Maximalt antal storslagna tempel per stad:" }, {TR_CONFIG_USE_COLOR_CURSORS, "Använd färgade muspekare" }, {TR_OVERLAY_MOTHBALL, "Ur bruk" }, {TR_OVERLAY_ENEMY, "Fiender" }, diff --git a/src/translation/traditional_chinese.c b/src/translation/traditional_chinese.c index a936ea725f..8538719bf0 100644 --- a/src/translation/traditional_chinese.c +++ b/src/translation/traditional_chinese.c @@ -76,7 +76,6 @@ static translation_string all_strings[] = { {TR_CONFIG_COMPLETE_RATING_COLUMNS, "修復低目標下無法完成評比任務BUG"}, {TR_CONFIG_GRANDFESTIVAL, "舉辦豪華節慶獲取神靈更多祝福"}, {TR_CONFIG_DIFFICULTY, "遊戲難度:"}, - {TR_CONFIG_MAX_GRAND_TEMPLES, "每座城市宏偉神廟數量上限:"}, {TR_CONFIG_INFINITE, "無限"}, {TR_CONFIG_GODS_EFFECTS, "開啟神靈詛咒/祝福效果"}, {TR_CONFIG_JEALOUS_GODS, "關閉神靈嫉妒效果"}, @@ -365,7 +364,6 @@ static translation_string all_strings[] = { {TR_TEMPLE_SPECIAL_ORDERS_HEADER, "神廟指令"}, {TR_TAVERN_SPECIAL_ORDERS_HEADER, "酒館指令"}, {TR_WARNING_NO_MESS_HALL, "你必須先建造軍糧站供養士兵。"}, - {TR_WARNING_MAX_GRAND_TEMPLES, "無法建造更多宏偉神廟。"}, {TR_CITY_MESSAGE_TITLE_GRAND_TEMPLE_COMPLETE, "宏偉神廟建造完成"}, {TR_CITY_MESSAGE_TEXT_GRAND_TEMPLE_COMPLETE, "祭司和朝拜者們聚眾在宏偉神廟舉行獻祭儀式,你沐浴在神的眷顧下,市民對你的豐功偉績深感敬畏。"}, {TR_CITY_MESSAGE_TITLE_MERCURY_BLESSING, "莫丘里的祝福"}, diff --git a/src/translation/translation.h b/src/translation/translation.h index 4bd0c28fd5..0b2b873a84 100644 --- a/src/translation/translation.h +++ b/src/translation/translation.h @@ -72,7 +72,6 @@ typedef enum { TR_CONFIG_COMPLETE_RATING_COLUMNS, TR_CONFIG_GRANDFESTIVAL, TR_CONFIG_DIFFICULTY, - TR_CONFIG_MAX_GRAND_TEMPLES, TR_CONFIG_INFINITE, TR_CONFIG_GODS_EFFECTS, TR_CONFIG_JEALOUS_GODS, @@ -189,6 +188,12 @@ typedef enum { TR_BUILDING_GRAND_TEMPLE_MERCURY, TR_BUILDING_GRAND_TEMPLE_MARS, TR_BUILDING_GRAND_TEMPLE_VENUS, + TR_BUILDING_GRAND_TEMPLE_CERES_LEGACY, + TR_BUILDING_GRAND_TEMPLE_NEPTUNE_LEGACY, + TR_BUILDING_GRAND_TEMPLE_MERCURY_LEGACY, + TR_BUILDING_GRAND_TEMPLE_MARS_LEGACY, + TR_BUILDING_PANTHEON_LEGACY, + TR_BUILDING_GRAND_TEMPLE_VENUS_LEGACY, TR_BUILDING_PANTHEON, TR_BUILDING_GRAND_TEMPLE_CERES_DESC, TR_BUILDING_GRAND_TEMPLE_NEPTUNE_DESC, @@ -201,12 +206,22 @@ typedef enum { TR_BUILDING_GRAND_TEMPLE_MERCURY_BONUS_DESC, TR_BUILDING_GRAND_TEMPLE_MARS_BONUS_DESC, TR_BUILDING_GRAND_TEMPLE_VENUS_BONUS_DESC, + TR_BUILDING_GRAND_TEMPLE_VENUS_REWORKED_BONUS_DESC, + TR_BUILDING_GRAND_TEMPLE_CERES_REWORKED_BONUS_DESC, + TR_BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED_BONUS_DESC, + TR_BUILDING_GRAND_TEMPLE_MERCURY_REWORKED_BONUS_DESC, + TR_BUILDING_GRAND_TEMPLE_MARS_REWORKED_BONUS_DESC, + TR_BUILDING_PANTHEON_REWORKED_BONUS_DESC, TR_BUILDING_PANTHEON_BONUS_DESC, TR_BUILDING_GRAND_TEMPLE_CERES_MODULE_1_DESC, TR_BUILDING_GRAND_TEMPLE_NEPTUNE_MODULE_1_DESC, TR_BUILDING_GRAND_TEMPLE_MERCURY_MODULE_1_DESC, TR_BUILDING_GRAND_TEMPLE_MARS_MODULE_1_DESC, TR_BUILDING_GRAND_TEMPLE_VENUS_MODULE_1_DESC, + TR_BUILDING_GRAND_TEMPLE_VENUS_MODULE_3_DESC, + TR_BUILDING_GRAND_TEMPLE_VENUS_MODULE_4_DESC, + TR_BUILDING_GRAND_TEMPLE_VENUS_MODULE_4_THEATER_BATHHOUSE_DESC, + TR_BUILDING_GRAND_TEMPLE_VENUS_MODULE_4_BATHHOUSE_TAVERN_DESC, TR_BUILDING_GRAND_TEMPLE_CERES_MODULE_2_DESC, TR_BUILDING_GRAND_TEMPLE_NEPTUNE_MODULE_2_DESC, TR_BUILDING_GRAND_TEMPLE_MERCURY_MODULE_2_DESC, @@ -224,8 +239,30 @@ typedef enum { TR_BUILDING_GRAND_TEMPLE_MARS_DESC_MODULE_2, TR_BUILDING_GRAND_TEMPLE_VENUS_DESC_MODULE_1, TR_BUILDING_GRAND_TEMPLE_VENUS_DESC_MODULE_2, + TR_BUILDING_GRAND_TEMPLE_VENUS_DESC_MODULE_3, + TR_BUILDING_GRAND_TEMPLE_VENUS_DESC_MODULE_4, + TR_BUILDING_GRAND_TEMPLE_CERES_DESC_MODULE_3, + TR_BUILDING_GRAND_TEMPLE_CERES_MODULE_3_DESC, + TR_BUILDING_GRAND_TEMPLE_CERES_DESC_MODULE_4, + TR_BUILDING_GRAND_TEMPLE_CERES_MODULE_4_DESC, + TR_BUILDING_GRAND_TEMPLE_MERCURY_DESC_MODULE_3, + TR_BUILDING_GRAND_TEMPLE_MERCURY_MODULE_3_DESC, + TR_BUILDING_GRAND_TEMPLE_MERCURY_DESC_MODULE_4, + TR_BUILDING_GRAND_TEMPLE_MERCURY_MODULE_4_DESC, + TR_BUILDING_GRAND_TEMPLE_NEPTUNE_DESC_MODULE_3, + TR_BUILDING_GRAND_TEMPLE_NEPTUNE_MODULE_3_DESC, + TR_BUILDING_GRAND_TEMPLE_NEPTUNE_DESC_MODULE_4, + TR_BUILDING_GRAND_TEMPLE_NEPTUNE_MODULE_4_DESC, TR_BUILDING_PANTHEON_DESC_MODULE_1, TR_BUILDING_PANTHEON_DESC_MODULE_2, + TR_BUILDING_PANTHEON_DESC_MODULE_3, + TR_BUILDING_PANTHEON_MODULE_3_DESC, + TR_BUILDING_PANTHEON_DESC_MODULE_4, + TR_BUILDING_PANTHEON_MODULE_4_DESC, + TR_BUILDING_GRAND_TEMPLE_MARS_DESC_MODULE_3, + TR_BUILDING_GRAND_TEMPLE_MARS_MODULE_3_DESC, + TR_BUILDING_GRAND_TEMPLE_MARS_DESC_MODULE_4, + TR_BUILDING_GRAND_TEMPLE_MARS_MODULE_4_DESC, TR_BUILDING_GRAND_TEMPLE_MENU, TR_BUILDING_ROADBLOCK, TR_BUILDING_ROADBLOCK_DESC, @@ -365,7 +402,6 @@ typedef enum { TR_TEMPLE_SPECIAL_ORDERS_HEADER, TR_TAVERN_SPECIAL_ORDERS_HEADER, TR_WARNING_NO_MESS_HALL, - TR_WARNING_MAX_GRAND_TEMPLES, TR_CITY_MESSAGE_TITLE_GRAND_TEMPLE_COMPLETE, TR_CITY_MESSAGE_TEXT_GRAND_TEMPLE_COMPLETE, TR_CITY_MESSAGE_TITLE_MERCURY_BLESSING, @@ -1660,6 +1696,7 @@ typedef enum { TR_CONDITION_TEXT_TIME_LEFT_UNTIL_VICTORY, TR_CHEAT_DISABLE_INVASIONS, TR_CHEAT_DISABLE_LEGIONS_CONSUMPTION, + TR_CHEAT_LEGACY_GTS_ENABLED, TR_TOOLTIP_BUTTON_ACCEPT_ALL, TR_TOOLTIP_BUTTON_REJECT_ALL, TR_TOOLTIP_OVERLAY_PROBLEMS_NO_ROAD_ACCESS, @@ -1904,6 +1941,8 @@ typedef enum { TR_BUILDING_HOUSE_LUXURY_PALACE, TR_CONFIG_UI_BUILD_SHOW_RESERVOIR_RANGES, TR_CHEAT_DESTROYED_BUILDING, + TR_CHEAT_GT_BONUSES_TITLE, + TR_CHEAT_GT_BONUSES_TEXT, TR_CONFIG_ENABLE_BUILD_MENU_SHORTCUTS, TR_ACTION_TYPE_LOCK_TRADE_ROUTE, TR_PARAMETER_LOCK, diff --git a/src/widget/city_building_ghost.c b/src/widget/city_building_ghost.c index 550f99dfc7..114cc339f6 100644 --- a/src/widget/city_building_ghost.c +++ b/src/widget/city_building_ghost.c @@ -412,10 +412,6 @@ static int is_fully_blocked(int map_x, int map_y, building_type type, int buildi if (!building_monument_type_is_mini_monument(type) && building_monument_get_id(type)) { return 1; } - if (building_monument_is_grand_temple(type) && - building_monument_count_grand_temples() >= config_get(CONFIG_GP_CH_MAX_GRAND_TEMPLES)) { - return 1; - } if (city_finance_out_of_money()) { return 1; } @@ -1312,9 +1308,9 @@ static void draw_grand_temple_neptune_range(int x, int y, int grid_offset) image_draw(image_group(GROUP_TERRAIN_FLAT_TILE), x, y, COLOR_MASK_BLUE, data.scale); } -static void draw_grand_temple_neptune(const map_tile *tile, int x, int y) +static void draw_grand_temple_neptune_type(const map_tile *tile, int x, int y, building_type type) { - const building_properties *props = building_properties_for_type(BUILDING_GRAND_TEMPLE_NEPTUNE); + const building_properties *props = building_properties_for_type(type); int num_tiles = props->size * props->size; int blocked[MAX_TILES]; if (city_finance_out_of_money() || is_blocked_for_building(tile->grid_offset, props->size, blocked, 1)) { @@ -1322,13 +1318,18 @@ static void draw_grand_temple_neptune(const map_tile *tile, int x, int y) } int radius = map_water_supply_reservoir_radius(); // need to add 2 for the bonus the Neptune GT will add - if (!building_monument_working(BUILDING_GRAND_TEMPLE_NEPTUNE)) { + if (!building_monument_working(type)) { radius += 2; } city_view_foreach_tile_in_range(tile->grid_offset, props->size, radius, draw_grand_temple_neptune_range); - int image_id = get_new_building_image_id(tile->grid_offset, BUILDING_GRAND_TEMPLE_NEPTUNE); - draw_regular_building(BUILDING_GRAND_TEMPLE_NEPTUNE, image_id, x, y, tile->grid_offset, num_tiles, blocked); - set_roamer_path(BUILDING_GRAND_TEMPLE_NEPTUNE, props->size, tile, has_blocked_tiles(num_tiles, blocked)); + int image_id = get_new_building_image_id(tile->grid_offset, type); + draw_regular_building(type, image_id, x, y, tile->grid_offset, num_tiles, blocked); + set_roamer_path(type, props->size, tile, has_blocked_tiles(num_tiles, blocked)); +} + +static void draw_grand_temple_neptune(const map_tile *tile, int x, int y) +{ + draw_grand_temple_neptune_type(tile, x, y, BUILDING_GRAND_TEMPLE_NEPTUNE); } static void draw_concrete_maker(const map_tile *tile, int x, int y) @@ -1635,6 +1636,9 @@ void city_building_ghost_draw(const map_tile *tile) case BUILDING_GRAND_TEMPLE_NEPTUNE: draw_grand_temple_neptune(tile, x, y); break; + case BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED: + draw_grand_temple_neptune_type(tile, x, y, BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED); + break; case BUILDING_LATRINES: draw_latrines(tile, x, y); break; diff --git a/src/widget/city_overlay_other.c b/src/widget/city_overlay_other.c index efe28e7468..e7192f816f 100644 --- a/src/widget/city_overlay_other.c +++ b/src/widget/city_overlay_other.c @@ -49,6 +49,9 @@ static int show_building_religion(const building *b) b->type == BUILDING_LARGE_TEMPLE_VENUS || b->type == BUILDING_GRAND_TEMPLE_CERES || b->type == BUILDING_GRAND_TEMPLE_NEPTUNE || b->type == BUILDING_GRAND_TEMPLE_MERCURY || b->type == BUILDING_GRAND_TEMPLE_MARS || b->type == BUILDING_GRAND_TEMPLE_VENUS || + b->type == BUILDING_GRAND_TEMPLE_CERES_REWORKED || b->type == BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED || + b->type == BUILDING_GRAND_TEMPLE_MERCURY_REWORKED || b->type == BUILDING_GRAND_TEMPLE_MARS_REWORKED || + b->type == BUILDING_GRAND_TEMPLE_VENUS_REWORKED || b->type == BUILDING_PANTHEON_REWORKED || b->type == BUILDING_PANTHEON || b->type == BUILDING_NYMPHAEUM || b->type == BUILDING_SHRINE_CERES || b->type == BUILDING_SHRINE_MARS || b->type == BUILDING_SHRINE_MERCURY || b->type == BUILDING_SHRINE_VENUS || @@ -69,7 +72,8 @@ static int show_building_tax_income(const building *b) static int show_building_water(const building *b) { return b->type == BUILDING_WELL || b->type == BUILDING_FOUNTAIN || b->type == BUILDING_RESERVOIR || - (b->type == BUILDING_GRAND_TEMPLE_NEPTUNE && building_monument_gt_module_is_active(NEPTUNE_MODULE_2_CAPACITY_AND_WATER)); + (b->type == BUILDING_GRAND_TEMPLE_NEPTUNE && building_monument_gt_module_is_active(NEPTUNE_MODULE_2_CAPACITY_AND_WATER)) || + (b->type == BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED && building_monument_working(BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED)); } static int show_building_sentiment(const building *b) diff --git a/src/widget/city_water_ghost.c b/src/widget/city_water_ghost.c index 7aab23bb67..29467532a7 100644 --- a/src/widget/city_water_ghost.c +++ b/src/widget/city_water_ghost.c @@ -66,11 +66,17 @@ static void update_reservoir_access(void) } } int neptune_id = building_monument_upgraded(BUILDING_GRAND_TEMPLE_NEPTUNE); - if (!neptune_id) { - return; + if (neptune_id) { + building *b = building_get(neptune_id); + if (b->monument.upgrades == 2) { + city_view_foreach_tile_in_range(b->grid_offset, 7, map_water_supply_reservoir_radius(), set_reservoir_access); + city_view_foreach_tile_in_range(b->grid_offset, 0, 7, set_reservoir_access); // include the Grand Temple tiles + set_reservoir_access(b->x, b->y, b->grid_offset); // include the reservoir main tile + } } - building *b = building_get(neptune_id); - if (b->monument.upgrades == 2) { + int neptune_reworked_id = building_monument_working(BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED); + if (neptune_reworked_id) { + building *b = building_get(neptune_reworked_id); city_view_foreach_tile_in_range(b->grid_offset, 7, map_water_supply_reservoir_radius(), set_reservoir_access); city_view_foreach_tile_in_range(b->grid_offset, 0, 7, set_reservoir_access); // include the Grand Temple tiles set_reservoir_access(b->x, b->y, b->grid_offset); // include the reservoir main tile @@ -133,6 +139,9 @@ void city_water_ghost_draw_reservoir_ranges(void) building_monument_module_type(BUILDING_GRAND_TEMPLE_NEPTUNE) == 2) { num_reservoirs++; } + if (building_monument_working(BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED)) { + num_reservoirs++; + } if (type != last_reservoir_building_type || num_reservoirs != last_reservoir_count) { update_reservoir_access(); } diff --git a/src/widget/city_without_overlay.c b/src/widget/city_without_overlay.c index a01f7c9a06..e567c5a2b9 100644 --- a/src/widget/city_without_overlay.c +++ b/src/widget/city_without_overlay.c @@ -838,10 +838,12 @@ static void draw_animation(int x, int y, int grid_offset) if (animation_offset > img->animation->num_sprites) { animation_offset = img->animation->num_sprites; } - if (b->type == BUILDING_GRAND_TEMPLE_CERES && b->monument.upgrades == 1) { + if (b->type == BUILDING_GRAND_TEMPLE_CERES && b->monument.upgrades == 1 || + b->type == BUILDING_GRAND_TEMPLE_CERES_REWORKED && b->monument.upgrades == 1) { draw_ceres_module_crops(x + 190, y + 95 - y_offset, b->monument.secondary_frame, color_mask); } - if (b->type == BUILDING_GRAND_TEMPLE_NEPTUNE && b->monument.upgrades == 2) { + if ((b->type == BUILDING_GRAND_TEMPLE_NEPTUNE && b->monument.upgrades == 2) || + b->type == BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED && b->monument.upgrades == 1) { draw_neptune_fountain(x + 98, y + 87 - y_offset, (animation_offset - 1) % 5, color_mask); } if (b->type == BUILDING_GRANARY) { diff --git a/src/window/advisor/religion.c b/src/window/advisor/religion.c index 241dbb6097..1ac72e9873 100644 --- a/src/window/advisor/religion.c +++ b/src/window/advisor/religion.c @@ -143,15 +143,15 @@ static int draw_background(void) // god rows draw_god_row(GOD_CERES, 66, BUILDING_SHRINE_CERES, BUILDING_SMALL_TEMPLE_CERES, - BUILDING_LARGE_TEMPLE_CERES, BUILDING_GRAND_TEMPLE_CERES); + BUILDING_LARGE_TEMPLE_CERES, BUILDING_GRAND_TEMPLE_CERES_REWORKED); draw_god_row(GOD_NEPTUNE, 86, BUILDING_SHRINE_NEPTUNE, BUILDING_SMALL_TEMPLE_NEPTUNE, - BUILDING_LARGE_TEMPLE_NEPTUNE, BUILDING_GRAND_TEMPLE_NEPTUNE); + BUILDING_LARGE_TEMPLE_NEPTUNE, BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED); draw_god_row(GOD_MERCURY, 106, BUILDING_SHRINE_MERCURY, BUILDING_SMALL_TEMPLE_MERCURY, - BUILDING_LARGE_TEMPLE_MERCURY, BUILDING_GRAND_TEMPLE_MERCURY); + BUILDING_LARGE_TEMPLE_MERCURY, BUILDING_GRAND_TEMPLE_MERCURY_REWORKED); draw_god_row(GOD_MARS, 126, BUILDING_SHRINE_MARS, BUILDING_SMALL_TEMPLE_MARS, - BUILDING_LARGE_TEMPLE_MARS, BUILDING_GRAND_TEMPLE_MARS); + BUILDING_LARGE_TEMPLE_MARS, BUILDING_GRAND_TEMPLE_MARS_REWORKED); draw_god_row(GOD_VENUS, 146, BUILDING_SHRINE_VENUS, BUILDING_SMALL_TEMPLE_VENUS, - BUILDING_LARGE_TEMPLE_VENUS, BUILDING_GRAND_TEMPLE_VENUS); + BUILDING_LARGE_TEMPLE_VENUS, BUILDING_GRAND_TEMPLE_VENUS_REWORKED); // oracles draw_oracle_row(); diff --git a/src/window/building/culture.c b/src/window/building/culture.c index 59372c80dc..cd47a9635b 100644 --- a/src/window/building/culture.c +++ b/src/window/building/culture.c @@ -59,7 +59,7 @@ static struct { option_menu_item option; const building_type required_building; const char image_id[32]; -} temple_module_options[12] = { +} temple_module_options[24] = { { { TR_BUILDING_GRAND_TEMPLE_CERES_DESC_MODULE_1, TR_BUILDING_GRAND_TEMPLE_CERES_MODULE_1_DESC }, BUILDING_NONE, @@ -119,6 +119,66 @@ static struct { { TR_BUILDING_PANTHEON_DESC_MODULE_2, TR_BUILDING_PANTHEON_MODULE_2_DESC }, BUILDING_NONE, "Panth M2 Icon" + }, + { + { TR_BUILDING_GRAND_TEMPLE_VENUS_DESC_MODULE_3, TR_BUILDING_GRAND_TEMPLE_VENUS_MODULE_3_DESC }, + BUILDING_NONE, + "Venus M Icon" + }, + { + { TR_BUILDING_GRAND_TEMPLE_VENUS_DESC_MODULE_4, TR_BUILDING_GRAND_TEMPLE_VENUS_MODULE_4_DESC }, + BUILDING_NONE, + "Venus M2 Icon" + }, + { + { TR_BUILDING_GRAND_TEMPLE_CERES_DESC_MODULE_3, TR_BUILDING_GRAND_TEMPLE_CERES_MODULE_3_DESC }, + BUILDING_NONE, + "Ceres M Icon" + }, + { + { TR_BUILDING_GRAND_TEMPLE_CERES_DESC_MODULE_4, TR_BUILDING_GRAND_TEMPLE_CERES_MODULE_4_DESC }, + BUILDING_NONE, + "Ceres M2 Icon" + }, + { + { TR_BUILDING_GRAND_TEMPLE_MERCURY_DESC_MODULE_3, TR_BUILDING_GRAND_TEMPLE_MERCURY_MODULE_3_DESC }, + BUILDING_NONE, + "Merc M Icon" + }, + { + { TR_BUILDING_GRAND_TEMPLE_MERCURY_DESC_MODULE_4, TR_BUILDING_GRAND_TEMPLE_MERCURY_MODULE_4_DESC }, + BUILDING_NONE, + "Merc M2 Icon" + }, + { + { TR_BUILDING_GRAND_TEMPLE_NEPTUNE_DESC_MODULE_3, TR_BUILDING_GRAND_TEMPLE_NEPTUNE_MODULE_3_DESC }, + BUILDING_NONE, + "Nept M Icon" + }, + { + { TR_BUILDING_GRAND_TEMPLE_NEPTUNE_DESC_MODULE_4, TR_BUILDING_GRAND_TEMPLE_NEPTUNE_MODULE_4_DESC }, + BUILDING_NONE, + "Nept M2 Icon" + }, + { + { TR_BUILDING_PANTHEON_DESC_MODULE_3, TR_BUILDING_PANTHEON_MODULE_3_DESC }, + BUILDING_NONE, + "Panth M Icon" + }, + { + { TR_BUILDING_PANTHEON_DESC_MODULE_4, TR_BUILDING_PANTHEON_MODULE_4_DESC }, + BUILDING_NONE, + "Panth M2 Icon" + }, + { + { TR_BUILDING_GRAND_TEMPLE_MARS_DESC_MODULE_3, TR_BUILDING_GRAND_TEMPLE_MARS_MODULE_3_DESC }, + BUILDING_NONE, + "Mars M Icon" + }, + { + { TR_BUILDING_GRAND_TEMPLE_MARS_DESC_MODULE_4, TR_BUILDING_GRAND_TEMPLE_MARS_MODULE_4_DESC }, + BUILDING_NONE, + "Mars M2 Icon" } }; @@ -717,6 +777,24 @@ void window_building_draw_shrine_mars(building_info_context *c) c->x_offset + 180, c->y_offset + 45, COLOR_MASK_NONE, SCALE_NONE); } +static int reworked_temple_option_id(building_type type) +{ + static const struct { building_type type; int option_id; } reworked_options[] = { + { BUILDING_GRAND_TEMPLE_VENUS_REWORKED, 12 }, + { BUILDING_GRAND_TEMPLE_CERES_REWORKED, 14 }, + { BUILDING_GRAND_TEMPLE_MERCURY_REWORKED, 16 }, + { BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED, 18 }, + { BUILDING_PANTHEON_REWORKED, 20 }, + { BUILDING_GRAND_TEMPLE_MARS_REWORKED, 22 }, + }; + for (int i = 0; i < (int)(sizeof(reworked_options) / sizeof(reworked_options[0])); i++) { + if (reworked_options[i].type == type) { + return reworked_options[i].option_id; + } + } + return -1; +} + void window_building_draw_shrine_venus(building_info_context *c) { c->advisor_button = ADVISOR_RELIGION; @@ -746,7 +824,9 @@ static void draw_grand_temple(building_info_context *c, const char *sound_file, window_building_draw_monument_temple_construction_process(c); } if (b->monument.upgrades) { - int module_name = temple_module_options[data.god_id * 2 + (b->monument.upgrades - 1)].option.header; + int reworked_base = reworked_temple_option_id(b->type); + int module_index = (reworked_base >= 0 ? reworked_base : data.god_id * 2) + (b->monument.upgrades - 1); + int module_name = temple_module_options[module_index].option.header; text_draw_centered(translation_for(module_name), c->x_offset, c->y_offset + 12, BLOCK_SIZE * c->width_blocks, FONT_LARGE_BLACK, 0); } else { @@ -762,16 +842,30 @@ static void draw_grand_temple(building_info_context *c, const char *sound_file, height = text_draw_multiline(translation_for(bonus_desc), c->x_offset + 22, c->y_offset + 56 + extra_y, 15 * c->width_blocks, 0, FONT_NORMAL_BLACK, 0); if (b->monument.upgrades) { - int module_desc = temple_module_options[data.god_id * 2 + (b->monument.upgrades - 1)].option.desc; + int reworked_base = reworked_temple_option_id(b->type); + int module_index = (reworked_base >= 0 ? reworked_base : data.god_id * 2) + (b->monument.upgrades - 1); + int module_desc = temple_module_options[module_index].option.desc; + // Venus M4 desc adapts to scenario (theater/tavern availability) + if (b->type == BUILDING_GRAND_TEMPLE_VENUS_REWORKED && b->monument.upgrades == 2) { + switch (building_monument_venus_m4_variant()) { + case VENUS_M4_THEATER_BATHHOUSE: + module_desc = TR_BUILDING_GRAND_TEMPLE_VENUS_MODULE_4_THEATER_BATHHOUSE_DESC; + break; + case VENUS_M4_BATHHOUSE_TAVERN: + module_desc = TR_BUILDING_GRAND_TEMPLE_VENUS_MODULE_4_BATHHOUSE_TAVERN_DESC; + break; + default: break; + } + } height += text_draw_multiline(translation_for(module_desc), c->x_offset + 22, c->y_offset + 66 + height + extra_y, 15 * c->width_blocks, - 0, FONT_NORMAL_GREEN, 0); + 0, FONT_NORMAL_BLACK, 0); } } if (b->type == BUILDING_GRAND_TEMPLE_MARS) { draw_grand_temple_mars_military(c); } else if (b->type == BUILDING_GRAND_TEMPLE_VENUS && - (building_monument_gt_module_is_active(VENUS_MODULE_1_DISTRIBUTE_WINE))) { + building_monument_gt_module_is_active(VENUS_MODULE_1_DISTRIBUTE_WINE)) { draw_grand_temple_venus_wine(c); } inner_panel_draw(c->x_offset + 16, c->y_offset + 86 + height + extra_y, c->width_blocks - 2, 4); @@ -863,6 +957,54 @@ void window_building_draw_grand_temple_venus(building_info_context *c) TR_BUILDING_VENUS_TEMPLE_QUOTE, GOD_VENUS, 20); } +void window_building_draw_grand_temple_venus_reworked(building_info_context *c) +{ + draw_grand_temple(c, "wavs/temple_love.wav", TR_BUILDING_GRAND_TEMPLE_VENUS_DESC, + TR_BUILDING_GRAND_TEMPLE_VENUS_REWORKED_BONUS_DESC, + assets_get_image_id("UI", "Venus L Banner"), + TR_BUILDING_VENUS_TEMPLE_QUOTE, GOD_VENUS, 20); +} + +void window_building_draw_grand_temple_ceres_reworked(building_info_context *c) +{ + draw_grand_temple(c, "wavs/temple_farm.wav", TR_BUILDING_GRAND_TEMPLE_CERES_DESC, + TR_BUILDING_GRAND_TEMPLE_CERES_REWORKED_BONUS_DESC, + assets_get_image_id("UI", "Ceres L Banner"), + TR_BUILDING_CERES_TEMPLE_QUOTE, GOD_CERES, 20); +} + +void window_building_draw_grand_temple_neptune_reworked(building_info_context *c) +{ + draw_grand_temple(c, "wavs/temple_ship.wav", TR_BUILDING_GRAND_TEMPLE_NEPTUNE_DESC, + TR_BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED_BONUS_DESC, + assets_get_image_id("UI", "Nept L Banner"), + TR_BUILDING_NEPTUNE_TEMPLE_QUOTE, GOD_NEPTUNE, 20); +} + +void window_building_draw_grand_temple_mercury_reworked(building_info_context *c) +{ + draw_grand_temple(c, "wavs/temple_comm.wav", TR_BUILDING_GRAND_TEMPLE_MERCURY_DESC, + TR_BUILDING_GRAND_TEMPLE_MERCURY_REWORKED_BONUS_DESC, + assets_get_image_id("UI", "Merc L Banner"), + TR_BUILDING_MERCURY_TEMPLE_QUOTE, GOD_MERCURY, 20); +} + +void window_building_draw_grand_temple_mars_reworked(building_info_context *c) +{ + draw_grand_temple(c, "wavs/temple_war.wav", TR_BUILDING_GRAND_TEMPLE_MARS_DESC, + TR_BUILDING_GRAND_TEMPLE_MARS_REWORKED_BONUS_DESC, + assets_get_image_id("UI", "Mars L Banner"), + TR_BUILDING_MARS_TEMPLE_QUOTE, GOD_MARS, 20); +} + +void window_building_draw_pantheon_reworked(building_info_context *c) +{ + draw_grand_temple(c, "wavs/oracle.wav", TR_BUILDING_PANTHEON_DESC, + TR_BUILDING_PANTHEON_REWORKED_BONUS_DESC, + assets_get_image_id("UI", "Panth L Banner"), + TR_BUILDING_PANTHEON_QUOTE, GOD_PANTHEON, 0); +} + void window_building_draw_pantheon(building_info_context *c) { draw_grand_temple(c, "wavs/oracle.wav", TR_BUILDING_PANTHEON_DESC, TR_BUILDING_PANTHEON_BONUS_DESC, @@ -1335,10 +1477,13 @@ static void generate_module_image_id(int index) temple_module_options[index].image_id); } + static void button_add_module_prompt(const generic_button *button) { int num_options = 0; - int option_id = data.god_id * 2; + building *b = building_get(data.building_id); + int reworked_id = reworked_temple_option_id(b->type); + int option_id = reworked_id >= 0 ? reworked_id : data.god_id * 2; static option_menu_item options[2]; @@ -1350,7 +1495,20 @@ static void button_add_module_prompt(const generic_button *button) if (scenario_allowed_building(temple_module_options[option_id + 1].required_building)) { generate_module_image_id(option_id + 1); data.module_choices[num_options] = 2; - options[num_options++] = temple_module_options[option_id + 1].option; + options[num_options] = temple_module_options[option_id + 1].option; + // Venus Reworked M4: adapt desc to scenario (theater/tavern availability) + if (b->type == BUILDING_GRAND_TEMPLE_VENUS_REWORKED) { + switch (building_monument_venus_m4_variant()) { + case VENUS_M4_THEATER_BATHHOUSE: + options[num_options].desc = TR_BUILDING_GRAND_TEMPLE_VENUS_MODULE_4_THEATER_BATHHOUSE_DESC; + break; + case VENUS_M4_BATHHOUSE_TAVERN: + options[num_options].desc = TR_BUILDING_GRAND_TEMPLE_VENUS_MODULE_4_BATHHOUSE_TAVERN_DESC; + break; + default: break; + } + } + num_options++; } if (num_options) { diff --git a/src/window/building/culture.h b/src/window/building/culture.h index d2337a3567..c9302b45c7 100644 --- a/src/window/building/culture.h +++ b/src/window/building/culture.h @@ -77,6 +77,18 @@ void window_building_draw_grand_temple_mars(building_info_context* c); void window_building_draw_grand_temple_venus(building_info_context* c); +void window_building_draw_grand_temple_venus_reworked(building_info_context* c); + +void window_building_draw_grand_temple_ceres_reworked(building_info_context* c); + +void window_building_draw_grand_temple_neptune_reworked(building_info_context* c); + +void window_building_draw_grand_temple_mercury_reworked(building_info_context* c); + +void window_building_draw_grand_temple_mars_reworked(building_info_context* c); + +void window_building_draw_pantheon_reworked(building_info_context* c); + void window_building_draw_pantheon(building_info_context* c); void window_building_draw_work_camp(building_info_context* c); diff --git a/src/window/building/house.c b/src/window/building/house.c index 84097507b1..b7147fdcb7 100644 --- a/src/window/building/house.c +++ b/src/window/building/house.c @@ -12,6 +12,7 @@ #include "graphics/lang_text.h" #include "graphics/panel.h" #include "graphics/text.h" +#include "map/desirability.h" #include "map/road_access.h" #include "sound/speech.h" #include "translation/translation.h" @@ -128,6 +129,36 @@ static void draw_happiness_info(building_info_context *c, int y_offset) } } +// static void draw_debug_info(building_info_context *c, int y_offset) +// { +// // DEBUG: Display entertainment and desirability values +// building *b = building_get(c->building_id); + +// // Desirability (from building) +// int width = text_draw(string_from_ascii("Desirability (actual): "), +// c->x_offset + 36, y_offset + 16, FONT_NORMAL_RED, 0); +// text_draw_number(b->desirability, '@', " ", +// c->x_offset + 36 + width, y_offset + 16, FONT_NORMAL_RED, 0); + +// // Desirability (from map) +// int map_desir = map_desirability_get_max(b->x, b->y, b->size); +// width = text_draw(string_from_ascii("Desirability (map): "), +// c->x_offset + 36, y_offset + 32, FONT_NORMAL_RED, 0); +// text_draw_number(map_desir, '@', " ", +// c->x_offset + 36 + width, y_offset + 32, FONT_NORMAL_RED, 0); + +// // Entertainment: current score vs required +// int ent_have = b->data.house.entertainment; +// int ent_need = model_get_house(b->subtype.house_level)->entertainment; +// width = text_draw(string_from_ascii("Entertainment (have/need): "), +// c->x_offset + 36, y_offset + 48, FONT_NORMAL_RED, 0); +// width += text_draw_number(ent_have, '@', "/", +// c->x_offset + 36 + width, y_offset + 48, FONT_NORMAL_RED, 0); +// text_draw_number(ent_need, '@', " ", +// c->x_offset + 36 + width, y_offset + 48, FONT_NORMAL_RED, 0); + +// } + void window_building_draw_house(building_info_context *c) { c->advisor_button = ADVISOR_HOUSING; @@ -147,6 +178,7 @@ void window_building_draw_house(building_info_context *c) draw_population_info(c, c->y_offset + 134); draw_tax_info(c, c->y_offset + 174); draw_happiness_info(c, c->y_offset + 194); + // draw_debug_info(c, c->y_offset + 305); int x_offset = 32; int y_content = 259; diff --git a/src/window/building_info.c b/src/window/building_info.c index 7f605f0ec9..25406b9f45 100644 --- a/src/window/building_info.c +++ b/src/window/building_info.c @@ -244,7 +244,13 @@ static int get_height_id(void) case BUILDING_GRAND_TEMPLE_NEPTUNE: case BUILDING_GRAND_TEMPLE_MERCURY: case BUILDING_GRAND_TEMPLE_VENUS: + case BUILDING_GRAND_TEMPLE_VENUS_REWORKED: + case BUILDING_GRAND_TEMPLE_CERES_REWORKED: + case BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED: + case BUILDING_GRAND_TEMPLE_MERCURY_REWORKED: + case BUILDING_GRAND_TEMPLE_MARS_REWORKED: case BUILDING_PANTHEON: + case BUILDING_PANTHEON_REWORKED: case BUILDING_HIPPODROME: case BUILDING_COLOSSEUM: return HEIGHT_8_40_BLOCKS; @@ -721,8 +727,20 @@ static void draw_background(void) window_building_draw_grand_temple_mars(&context); } else if (btype == BUILDING_GRAND_TEMPLE_VENUS) { window_building_draw_grand_temple_venus(&context); + } else if (btype == BUILDING_GRAND_TEMPLE_VENUS_REWORKED) { + window_building_draw_grand_temple_venus_reworked(&context); + } else if (btype == BUILDING_GRAND_TEMPLE_CERES_REWORKED) { + window_building_draw_grand_temple_ceres_reworked(&context); + } else if (btype == BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED) { + window_building_draw_grand_temple_neptune_reworked(&context); + } else if (btype == BUILDING_GRAND_TEMPLE_MERCURY_REWORKED) { + window_building_draw_grand_temple_mercury_reworked(&context); + } else if (btype == BUILDING_GRAND_TEMPLE_MARS_REWORKED) { + window_building_draw_grand_temple_mars_reworked(&context); } else if (btype == BUILDING_PANTHEON) { window_building_draw_pantheon(&context); + } else if (btype == BUILDING_PANTHEON_REWORKED) { + window_building_draw_pantheon_reworked(&context); } else if (btype == BUILDING_LIGHTHOUSE) { window_building_draw_lighthouse(&context); } else if (btype == BUILDING_GOVERNORS_HOUSE || btype == BUILDING_GOVERNORS_VILLA || @@ -920,7 +938,10 @@ static void draw_foreground(void) } else if (btype == BUILDING_BARRACKS) { window_building_draw_barracks_foreground(&context); } else if ((btype >= BUILDING_GRAND_TEMPLE_CERES && btype <= BUILDING_GRAND_TEMPLE_VENUS) || - btype == BUILDING_PANTHEON) { + btype == BUILDING_PANTHEON || btype == BUILDING_GRAND_TEMPLE_VENUS_REWORKED || + btype == BUILDING_GRAND_TEMPLE_CERES_REWORKED || btype == BUILDING_GRAND_TEMPLE_MERCURY_REWORKED || + btype == BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED || btype == BUILDING_PANTHEON_REWORKED || + btype == BUILDING_GRAND_TEMPLE_MARS_REWORKED) { window_building_draw_grand_temple_foreground(&context); } else if (btype == BUILDING_CARAVANSERAI && b->monument.phase == MONUMENT_FINISHED) { @@ -1034,7 +1055,10 @@ static int handle_specific_building_info_mouse(const mouse *m) return window_building_handle_mouse_storage(m, &context); } } else if ((btype >= BUILDING_GRAND_TEMPLE_CERES && btype <= BUILDING_GRAND_TEMPLE_VENUS) || - btype == BUILDING_PANTHEON) { + btype == BUILDING_PANTHEON || btype == BUILDING_GRAND_TEMPLE_VENUS_REWORKED || + btype == BUILDING_GRAND_TEMPLE_CERES_REWORKED || btype == BUILDING_GRAND_TEMPLE_MERCURY_REWORKED || + btype == BUILDING_GRAND_TEMPLE_NEPTUNE_REWORKED || btype == BUILDING_PANTHEON_REWORKED || + btype == BUILDING_GRAND_TEMPLE_MARS_REWORKED) { return window_building_handle_mouse_grand_temple(m, &context); } else if (btype == BUILDING_DEPOT) { if (context.depot_selection == 2) { diff --git a/src/window/city.c b/src/window/city.c index 551eb4005f..c41d65fa70 100644 --- a/src/window/city.c +++ b/src/window/city.c @@ -460,6 +460,7 @@ static void show_overlay_from_grid_offset(int grid_offset) case BUILDING_GRAND_TEMPLE_MERCURY: case BUILDING_GRAND_TEMPLE_MARS: case BUILDING_GRAND_TEMPLE_VENUS: + case BUILDING_GRAND_TEMPLE_VENUS_REWORKED: case BUILDING_PANTHEON: case BUILDING_LARARIUM: case BUILDING_NYMPHAEUM: diff --git a/src/window/config.c b/src/window/config.c index 85cdba5bca..c6109f6f94 100644 --- a/src/window/config.c +++ b/src/window/config.c @@ -95,7 +95,6 @@ enum { RANGE_VIDEO_VOLUME, RANGE_SCROLL_SPEED, RANGE_DIFFICULTY, - RANGE_MAX_GRAND_TEMPLES, RANGE_MAX_AUTOSAVE_SLOTS, RANGE_DEFAULT_GAME_SPEED, }; @@ -152,7 +151,6 @@ static const uint8_t *display_text_city_sounds_volume(void); static const uint8_t *display_text_video_volume(void); static const uint8_t *display_text_scroll_speed(void); static const uint8_t *display_text_difficulty(void); -static const uint8_t *display_text_max_grand_temples(void); static const uint8_t *display_text_autosave_slots(void); static const uint8_t *display_text_default_game_speed(void); @@ -290,8 +288,6 @@ static config_widget page_difficulty[] = { {TYPE_CHECKBOX, CONFIG_GP_CH_MULTIPLE_BARRACKS, TR_CONFIG_MULTIPLE_BARRACKS, NULL, 0, 1, ITEM_BASE_H, CHECKBOX_MARGIN}, {TYPE_CHECKBOX, CONFIG_GP_CH_RANDOM_COLLAPSES_TAKE_MONEY, TR_CONFIG_RANDOM_COLLAPSES_TAKE_MONEY, NULL, 0, 1, ITEM_BASE_H, CHECKBOX_MARGIN}, {TYPE_CHECKBOX, CONFIG_GP_CH_DISABLE_INFINITE_WOLVES_SPAWNING, TR_CONFIG_GP_CH_DISABLE_INFINITE_WOLVES_SPAWNING, NULL, 0, 1, ITEM_BASE_H, CHECKBOX_MARGIN}, - {TYPE_NUMERICAL_DESC, RANGE_MAX_GRAND_TEMPLES, TR_CONFIG_MAX_GRAND_TEMPLES, NULL, 0, 1, ITEM_BASE_H, 10}, - {TYPE_NUMERICAL_RANGE, RANGE_MAX_GRAND_TEMPLES, 0, display_text_max_grand_temples, 0, 1, ITEM_BASE_H, 2}, {TYPE_SPACE, 0, 0, NULL, 0, 1, ITEM_BASE_H, 0}, {TYPE_SPACE, 0, 0, NULL, 0, 1, ITEM_BASE_H, 0}, //two spaces to visually match the padding to the general settings {TYPE_NONE} @@ -421,7 +417,6 @@ static numerical_range_widget ranges[] = { {130, 25, 0, 100, 1, 0}, // video % { 50, 18, 0, 100, 10, 0}, // scroll speed % {146, 24, 0, 4, 1, 0}, // difficulty enum index (0..4) - { 50, 30, 0, 5, 1, 0}, // max grand temples { 50, 30, 1, 20, 1, 0}, // autosave slots { 50, 30, 0, TOTAL_GAME_SPEEDS - 1, 1, 0}, // default game speed index @@ -872,11 +867,6 @@ static const uint8_t *display_text_difficulty(void) { return lang_get_string(153, data.config_values[CONFIG_ORIGINAL_DIFFICULTY].new_value + 1); } -static const uint8_t *display_text_max_grand_temples(void) -{ - string_from_int(data.display_text, data.config_values[CONFIG_GP_CH_MAX_GRAND_TEMPLES].new_value, 0); - return data.display_text; -} static const uint8_t *display_text_autosave_slots(void) { string_from_int(data.display_text, data.config_values[CONFIG_GP_CH_MAX_AUTOSAVE_SLOTS].new_value, 0); @@ -903,7 +893,6 @@ static void set_range_values(void) ranges[RANGE_VIDEO_VOLUME].value = &data.config_values[CONFIG_GENERAL_VIDEO_VOLUME].new_value; ranges[RANGE_SCROLL_SPEED].value = &data.config_values[CONFIG_ORIGINAL_SCROLL_SPEED].new_value; ranges[RANGE_DIFFICULTY].value = &data.config_values[CONFIG_ORIGINAL_DIFFICULTY].new_value; - ranges[RANGE_MAX_GRAND_TEMPLES].value = &data.config_values[CONFIG_GP_CH_MAX_GRAND_TEMPLES].new_value; ranges[RANGE_MAX_AUTOSAVE_SLOTS].value = &data.config_values[CONFIG_GP_CH_MAX_AUTOSAVE_SLOTS].new_value; ranges[RANGE_DEFAULT_GAME_SPEED].value = &data.config_values[CONFIG_GP_CH_DEFAULT_GAME_SPEED].new_value; }