Project

General

Profile

Feature #310 » 0022-Add-effect-type-Impr_Upkeep_Reduction.patch

S3_2 - Marko Lindqvist, 03/21/2024 10:58 PM

View differences:

ai/default/daieffects.c
case EFT_CAPITAL_CITY:
case EFT_GOV_CENTER:
case EFT_UPKEEP_FREE:
case EFT_IMPR_UPKEEP_REDUCTION:
case EFT_TECH_UPKEEP_FREE:
case EFT_POLLU_POP_PCT:
case EFT_POLLU_POP_PCT_2:
common/city.c
gold_needed += city_improvement_upkeep(pcity, pimprove);
} city_built_iterate_end;
return gold_needed;
gold_needed -= get_city_bonus(pcity, EFT_IMPR_UPKEEP_REDUCTION);
return MAX(gold_needed, 0);
}
/**********************************************************************//**
common/effects.h
#define SPECENUM_VALUE137NAME "Surplus_Waste_Pct"
#define SPECENUM_VALUE138 EFT_SURPLUS_WASTE_PCT_BY_REL_DISTANCE
#define SPECENUM_VALUE138NAME "Surplus_Waste_Pct_By_Rel_Distance"
#define SPECENUM_VALUE139 EFT_IMPR_UPKEEP_REDUCTION
#define SPECENUM_VALUE139NAME "Impr_Upkeep_Reduction"
/* Ruleset specific effects for use from Lua scripts */
#define SPECENUM_VALUE139 EFT_USER_EFFECT_1
#define SPECENUM_VALUE139NAME "User_Effect_1"
#define SPECENUM_VALUE140 EFT_USER_EFFECT_2
#define SPECENUM_VALUE140NAME "User_Effect_2"
#define SPECENUM_VALUE141 EFT_USER_EFFECT_3
#define SPECENUM_VALUE141NAME "User_Effect_3"
#define SPECENUM_VALUE142 EFT_USER_EFFECT_4
#define SPECENUM_VALUE142NAME "User_Effect_4"
#define SPECENUM_VALUE140 EFT_USER_EFFECT_1
#define SPECENUM_VALUE140NAME "User_Effect_1"
#define SPECENUM_VALUE141 EFT_USER_EFFECT_2
#define SPECENUM_VALUE141NAME "User_Effect_2"
#define SPECENUM_VALUE142 EFT_USER_EFFECT_3
#define SPECENUM_VALUE142NAME "User_Effect_3"
#define SPECENUM_VALUE143 EFT_USER_EFFECT_4
#define SPECENUM_VALUE143NAME "User_Effect_4"
/* Keep this last */
#define SPECENUM_COUNT EFT_COUNT
#include "specenum_gen.h"
doc/README.effects
that turns out to be illegal. Only applied when the player wasn't aware that
the action was illegal and its illegality therefore reveals new information.
Impr_Upkeep_Reduction
Reduce city's total improvement upkeep by the value. The upkeep cannot
go negative, though.
Incite_Cost_Pct
Increases revolt cost by amount percent.
(2-2/2)