mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Hardcoded feature to allow default towns always have 2nd dwelling
This commit is contained in:
parent
4f4660e82d
commit
28eed7047c
@ -34,7 +34,8 @@
|
||||
"ATTACK_POINTS_DMG_MULTIPLIER_CAP": 4.0, //limit of damage increase that can be achieved by overpowering attack points
|
||||
"DEFENSE_POINT_DMG_MULTIPLIER": 0.025, //every 1 defense point damage influence in battle when defense points > attack points during creature attack
|
||||
"DEFENSE_POINTS_DMG_MULTIPLIER_CAP": 0.7, //limit of damage reduction that can be achieved by overpowering defense points
|
||||
"NEW_HERO_ALWAYS_3_CREATURE_STACKS": false
|
||||
"NEW_HERO_ALWAYS_3_CREATURE_STACKS": false,
|
||||
"DEFAULT_TOWN_ALWAYS_2_DWELLINGS": false
|
||||
},
|
||||
"modules":
|
||||
{
|
||||
|
@ -1723,7 +1723,7 @@ void CGameState::initTowns()
|
||||
vti->builtBuildings.insert(BuildingID::TAVERN);
|
||||
|
||||
vti->builtBuildings.insert(BuildingID::DWELL_FIRST);
|
||||
if(getRandomGenerator().nextInt(1) == 1)
|
||||
if((getRandomGenerator().nextInt(1) == 1) || VLC->modh->settings.DEFAULT_TOWN_ALWAYS_2_DWELLINGS)
|
||||
{
|
||||
vti->builtBuildings.insert(BuildingID::DWELL_LVL_2);
|
||||
}
|
||||
|
@ -768,6 +768,8 @@ void CModHandler::loadConfigFromFile (std::string name)
|
||||
logMod->debug("\tDEFENSE_POINTS_DMG_MULTIPLIER_CAP\t%f", settings.DEFENSE_POINTS_DMG_MULTIPLIER_CAP);
|
||||
settings.NEW_HERO_ALWAYS_3_CREATURE_STACKS = hardcodedFeatures["NEW_HERO_ALWAYS_3_CREATURE_STACKS"].Bool();
|
||||
logMod->debug("\tNEW_HERO_ALWAYS_3_CREATURE_STACKS\t%f", settings.NEW_HERO_ALWAYS_3_CREATURE_STACKS);
|
||||
settings.DEFAULT_TOWN_ALWAYS_2_DWELLINGS = hardcodedFeatures["DEFAULT_TOWN_ALWAYS_2_DWELLINGS"].Bool();
|
||||
logMod->debug("\tDEFAULT_TOWN_ALWAYS_2_DWELLINGS\t%f", settings.DEFAULT_TOWN_ALWAYS_2_DWELLINGS);
|
||||
|
||||
const JsonNode & gameModules = settings.data["modules"];
|
||||
modules.STACK_EXP = gameModules["STACK_EXPERIENCE"].Bool();
|
||||
|
@ -364,6 +364,7 @@ public:
|
||||
double DEFENSE_POINT_DMG_MULTIPLIER;
|
||||
double DEFENSE_POINTS_DMG_MULTIPLIER_CAP;
|
||||
bool NEW_HERO_ALWAYS_3_CREATURE_STACKS;
|
||||
bool DEFAULT_TOWN_ALWAYS_2_DWELLINGS;
|
||||
|
||||
template <typename Handler> void serialize(Handler &h, const int version)
|
||||
{
|
||||
@ -384,6 +385,7 @@ public:
|
||||
h & DEFENSE_POINT_DMG_MULTIPLIER;
|
||||
h & DEFENSE_POINTS_DMG_MULTIPLIER_CAP;
|
||||
h & NEW_HERO_ALWAYS_3_CREATURE_STACKS;
|
||||
h & DEFAULT_TOWN_ALWAYS_2_DWELLINGS;
|
||||
}
|
||||
} settings;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user