2024-07-16 20:29:20 +02:00
|
|
|
# Building Bonuses
|
|
|
|
|
2023-08-12 23:17:38 +02:00
|
|
|
Work-in-progress page do describe all bonuses provided by town buildings
|
|
|
|
for future configuration.
|
|
|
|
|
2023-09-23 18:24:20 +02:00
|
|
|
TODO: This page is outdated and may not represent VCMI 1.3 state
|
|
|
|
|
2024-07-16 20:29:20 +02:00
|
|
|
### unique buildings
|
2023-08-12 23:17:38 +02:00
|
|
|
|
|
|
|
Hardcoded functionalities, selectable but not configurable. In future
|
|
|
|
should be moved to scripting.
|
|
|
|
|
|
|
|
Includes:
|
|
|
|
|
|
|
|
- mystic pond
|
|
|
|
- treasury
|
|
|
|
- god of fire
|
|
|
|
- castle gates
|
|
|
|
- cover of darkness
|
|
|
|
- portal of summoning
|
|
|
|
- escape tunnel
|
|
|
|
|
|
|
|
Function of all of these objects can be enabled by this:
|
|
|
|
|
|
|
|
``` javascript
|
|
|
|
"function" : "castleGates"
|
|
|
|
```
|
|
|
|
|
2024-07-16 20:29:20 +02:00
|
|
|
### trade-related
|
2023-08-12 23:17:38 +02:00
|
|
|
|
|
|
|
Hardcoded functionality for now due to complexity of these objects.
|
|
|
|
Temporary can be handles as unique buildings. Includes:
|
|
|
|
|
|
|
|
- resource - resource
|
|
|
|
- resource - player
|
|
|
|
- artifact - resource
|
|
|
|
- resource - artifact
|
|
|
|
- creature - resource
|
|
|
|
- resource - skills
|
|
|
|
- creature - skeleton
|
|
|
|
|
2024-07-16 20:29:20 +02:00
|
|
|
### hero visitables
|
2023-08-12 23:17:38 +02:00
|
|
|
|
|
|
|
Buildings that give one or another bonus to visiting hero. All should be
|
|
|
|
handled via configurable objects system.
|
|
|
|
|
|
|
|
Includes:
|
|
|
|
|
|
|
|
- gives mana points
|
|
|
|
- gives movement points
|
|
|
|
- give bonus to visitor
|
|
|
|
- permanent bonus to hero
|
|
|
|
|
2024-07-16 20:29:20 +02:00
|
|
|
### generic functions
|
2023-08-12 23:17:38 +02:00
|
|
|
|
|
|
|
Generic town-specific functions that can be implemented as part of
|
|
|
|
CBuilding class.
|
|
|
|
|
2024-07-16 20:29:20 +02:00
|
|
|
#### unlock guild level
|
2023-08-12 23:17:38 +02:00
|
|
|
|
|
|
|
``` javascript
|
|
|
|
"guildLevels" : 1
|
|
|
|
```
|
|
|
|
|
2024-07-16 20:29:20 +02:00
|
|
|
#### unlock hero recruitment
|
2023-08-12 23:17:38 +02:00
|
|
|
|
|
|
|
``` javascript
|
|
|
|
"allowsHeroPurchase" : true
|
|
|
|
```
|
|
|
|
|
2024-07-16 20:29:20 +02:00
|
|
|
#### unlock ship purchase
|
2023-08-12 23:17:38 +02:00
|
|
|
|
|
|
|
``` javascript
|
|
|
|
"allowsShipPurchase" : true
|
|
|
|
```
|
|
|
|
|
2024-07-16 20:29:20 +02:00
|
|
|
#### unlock building purchase
|
2023-08-12 23:17:38 +02:00
|
|
|
|
|
|
|
``` javascript
|
|
|
|
"allowsBuildingPurchase" : true
|
|
|
|
```
|
|
|
|
|
2024-07-16 20:29:20 +02:00
|
|
|
#### unlocks creatures
|
2023-08-12 23:17:38 +02:00
|
|
|
|
|
|
|
``` javascript
|
|
|
|
"dwelling" : { "level" : 1, "creature" : "archer" }
|
|
|
|
```
|
|
|
|
|
2024-07-16 20:29:20 +02:00
|
|
|
#### creature growth bonus
|
2023-08-12 23:17:38 +02:00
|
|
|
|
|
|
|
Turn into town bonus? What about creature-specific bonuses from hordes?
|
|
|
|
|
2024-07-16 20:29:20 +02:00
|
|
|
#### gives resources
|
2023-08-12 23:17:38 +02:00
|
|
|
|
|
|
|
``` javascript
|
|
|
|
"provides" : { "gold" : 500 }
|
|
|
|
```
|
|
|
|
|
2024-07-16 20:29:20 +02:00
|
|
|
#### gives guild spells
|
2023-08-12 23:17:38 +02:00
|
|
|
|
|
|
|
``` javascript
|
|
|
|
"guildSpells" : [5, 0, 0, 0, 0]
|
|
|
|
```
|
|
|
|
|
2024-07-16 20:29:20 +02:00
|
|
|
#### gives thieves guild
|
2023-08-12 23:17:38 +02:00
|
|
|
|
|
|
|
``` javascript
|
|
|
|
"thievesGuildLevels" : 1
|
|
|
|
```
|
|
|
|
|
2024-07-16 20:29:20 +02:00
|
|
|
#### gives fortifications
|
2023-08-12 23:17:38 +02:00
|
|
|
|
|
|
|
``` javascript
|
|
|
|
"fortificationLevels" : 1
|
|
|
|
```
|
|
|
|
|
2024-07-16 20:29:20 +02:00
|
|
|
#### gives war machine
|
2023-08-12 23:17:38 +02:00
|
|
|
|
|
|
|
``` javascript
|
|
|
|
"warMachine" : "ballista"
|
|
|
|
```
|
|
|
|
|
2024-07-16 20:29:20 +02:00
|
|
|
### simple bonuses
|
2023-08-12 23:17:38 +02:00
|
|
|
|
|
|
|
Bonuses that can be made part of CBuilding. Note that due to how bonus
|
|
|
|
system works this bonuses won't be stackable.
|
|
|
|
|
|
|
|
TODO: how to handle stackable bonuses like Necromancy Amplifier?
|
|
|
|
|
|
|
|
Includes:
|
|
|
|
|
|
|
|
- bonus to defender
|
|
|
|
- bonus to alliance
|
|
|
|
- bonus to scouting range
|
|
|
|
- bonus to player
|
|
|
|
|
|
|
|
``` javascript
|
|
|
|
"bonuses" :
|
|
|
|
{
|
|
|
|
"moraleToDefenders" :
|
|
|
|
{
|
|
|
|
"type": "MORALE",
|
|
|
|
"val" : 1,
|
|
|
|
"propagator" : ["VISITED_TOWN_AND_VISITOR"]
|
|
|
|
},
|
|
|
|
"luckToTeam" :
|
|
|
|
{
|
|
|
|
"type" : "LUCK",
|
|
|
|
"val" : 2,
|
|
|
|
"propagator" : [ "TEAM_PROPAGATOR" ]
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2024-07-16 20:29:20 +02:00
|
|
|
### misc
|
2023-08-12 23:17:38 +02:00
|
|
|
|
|
|
|
Some other properties of town building that does not fall under "bonus"
|
|
|
|
category.
|
|
|
|
|
2024-07-16 20:29:20 +02:00
|
|
|
#### unique building
|
2023-08-12 23:17:38 +02:00
|
|
|
|
|
|
|
Possible issue - with removing of fixed ID's buildings in different town
|
|
|
|
may no longer share same ID. However Capitol must be unique across all
|
|
|
|
town. Should be fixed somehow.
|
|
|
|
|
|
|
|
``` javascript
|
|
|
|
"onePerPlayer" : true
|
|
|
|
```
|
|
|
|
|
2024-07-16 20:29:20 +02:00
|
|
|
#### chance to be built on start
|
2023-08-12 23:17:38 +02:00
|
|
|
|
|
|
|
``` javascript
|
|
|
|
"prebuiltChance" : 75
|
|
|
|
```
|