diff --git a/client/windows/CCastleInterface.cpp b/client/windows/CCastleInterface.cpp index 8bd79352c..1ed818758 100644 --- a/client/windows/CCastleInterface.cpp +++ b/client/windows/CCastleInterface.cpp @@ -801,10 +801,6 @@ void CCastleBuildings::buildingClicked(BuildingID building, BuildingSubID::EBuil enterDwelling(town->town->creatures.size()); break; - case BuildingSubID::THIEVES_GUILD: - enterAnyThievesGuild(); - break; - case BuildingSubID::BANK: enterBank(); break; diff --git a/config/buildingsLibrary.json b/config/buildingsLibrary.json index 275949138..eaa852df4 100644 --- a/config/buildingsLibrary.json +++ b/config/buildingsLibrary.json @@ -10,6 +10,11 @@ { "type": "MORALE", "val": 1 + }, + { + "propagator": "PLAYER_PROPAGATOR", + "type": "THIEVES_GUILD_ACCESS", + "val": 1 } ] }, @@ -203,5 +208,15 @@ // Section 3 - buildings that now have dedicated mechanics "ballistaYard": { "blacksmith" : "ballista" + }, + + "thievesGuild" : { + "bonuses": [ + { + "propagator": "PLAYER_PROPAGATOR", + "type": "THIEVES_GUILD_ACCESS", + "val": 2 + } + ] } } \ No newline at end of file diff --git a/config/schemas/townBuilding.json b/config/schemas/townBuilding.json index ef7e4f312..e59a21bbe 100644 --- a/config/schemas/townBuilding.json +++ b/config/schemas/townBuilding.json @@ -36,7 +36,7 @@ }, "type" : { "type" : "string", - "enum" : [ "mysticPond", "artifactMerchant", "freelancersGuild", "magicUniversity", "castleGate", "creatureTransformer", "portalOfSummoning", "library", "escapeTunnel", "treasury", "thievesGuild", "bank" ], + "enum" : [ "mysticPond", "artifactMerchant", "freelancersGuild", "magicUniversity", "castleGate", "creatureTransformer", "portalOfSummoning", "library", "escapeTunnel", "treasury", "bank" ], "description" : "Subtype for some special buildings" }, "mode" : { diff --git a/docs/modders/Bonus/Bonus_Types.md b/docs/modders/Bonus/Bonus_Types.md index f74a7a3c7..877843e52 100644 --- a/docs/modders/Bonus/Bonus_Types.md +++ b/docs/modders/Bonus/Bonus_Types.md @@ -1010,9 +1010,11 @@ Dummy bonus that acts as marker for Dendroid's Bind ability Dummy skill for alternative upgrades mod -### TOWN_MAGIC_WELL +### THIEVES_GUILD_ACCESS -Internal bonus, do not use +Increases amount of information available in affected thieves guild (in town or in adventure map tavern). Does not affects adventure map object "Den of Thieves". You may want to use PLAYER_PROPAGATOR with this bonus to make its effect player wide. + +- val: additional number of 'levels' of information to grant access to ### LEVEL_COUNTER diff --git a/docs/modders/Entities_Format/Town_Building_Format.md b/docs/modders/Entities_Format/Town_Building_Format.md index 1acea49cf..ca81e9cac 100644 --- a/docs/modders/Entities_Format/Town_Building_Format.md +++ b/docs/modders/Entities_Format/Town_Building_Format.md @@ -210,14 +210,12 @@ Following Heroes III buildings can be used as unique buildings for a town. Their - `castleGate` - `creatureTransformer` - `portalOfSummoning` -- `ballistaYard` - `library` - `escapeTunnel` - `treasury` #### Buildings from other Heroes III mods Following HotA buildings can be used as unique building for a town. Functionality should match corresponding HotA building: -- `thievesGuild` - `bank` #### Custom buildings diff --git a/lib/CGameInfoCallback.cpp b/lib/CGameInfoCallback.cpp index 5ed6a1283..4e8191203 100644 --- a/lib/CGameInfoCallback.cpp +++ b/lib/CGameInfoCallback.cpp @@ -236,15 +236,7 @@ void CGameInfoCallback::getThievesGuildInfo(SThievesGuildInfo & thi, const CGObj if(obj->ID == Obj::TOWN || obj->ID == Obj::TAVERN) { - int taverns = 0; - for(auto town : gs->players[*getPlayerID()].getTowns()) - { - if(town->hasBuilt(BuildingID::TAVERN)) - taverns++; - - if(town->hasBuilt(BuildingSubID::THIEVES_GUILD)) - taverns += 2; - } + int taverns = gs->players[*getPlayerID()].valOfBonuses(BonusType::THIEVES_GUILD_ACCESS); gs->obtainPlayersStats(thi, taverns); } else if(obj->ID == Obj::DEN_OF_THIEVES) diff --git a/lib/bonuses/BonusEnum.h b/lib/bonuses/BonusEnum.h index 427c0b617..bee7553a1 100644 --- a/lib/bonuses/BonusEnum.h +++ b/lib/bonuses/BonusEnum.h @@ -150,7 +150,7 @@ class JsonNode; BONUS_NAME(GARGOYLE) /* gargoyle is special than NON_LIVING, cannot be rised or healed */ \ BONUS_NAME(SPECIAL_ADD_VALUE_ENCHANT) /*specialty spell like Aenin has, increased effect of spell, additionalInfo = value to add*/\ BONUS_NAME(SPECIAL_FIXED_VALUE_ENCHANT) /*specialty spell like Melody has, constant spell effect (i.e. 3 luck), additionalInfo = value to fix.*/\ - BONUS_NAME(TOWN_MAGIC_WELL) /*one-time pseudo-bonus to implement Magic Well in the town*/\ + BONUS_NAME(THIEVES_GUILD_ACCESS) \ BONUS_NAME(LIMITED_SHOOTING_RANGE) /*limits range of shooting creatures, doesn't adjust any other mechanics (half vs full damage etc). val - range in hexes, additional info - optional new range for broken arrow mechanic */\ BONUS_NAME(LEARN_BATTLE_SPELL_CHANCE) /*skill-agnostic eagle eye chance. subtype = 0 - from enemy, 1 - TODO: from entire battlefield*/\ BONUS_NAME(LEARN_BATTLE_SPELL_LEVEL_LIMIT) /*skill-agnostic eagle eye limit, subtype - school (-1 for all), others TODO*/\ diff --git a/lib/constants/Enumerations.h b/lib/constants/Enumerations.h index 607df2c1c..2f871ad76 100644 --- a/lib/constants/Enumerations.h +++ b/lib/constants/Enumerations.h @@ -36,7 +36,6 @@ namespace BuildingSubID FREELANCERS_GUILD, MAGIC_UNIVERSITY, TREASURY, - THIEVES_GUILD, BANK }; } diff --git a/lib/constants/StringConstants.h b/lib/constants/StringConstants.h index 63662a3cc..415838b10 100644 --- a/lib/constants/StringConstants.h +++ b/lib/constants/StringConstants.h @@ -188,7 +188,6 @@ namespace MappedKeys { "fountainOfFortune", BuildingSubID::FOUNTAIN_OF_FORTUNE },//luck garrison bonus { "escapeTunnel", BuildingSubID::ESCAPE_TUNNEL }, { "treasury", BuildingSubID::TREASURY }, - { "thievesGuild", BuildingSubID::THIEVES_GUILD }, { "bank", BuildingSubID::BANK } };