File: Building_Bonuses.md

package info (click to toggle)
vcmi 1.6.5%2Bdfsg-2
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid, trixie
  • size: 32,060 kB
  • sloc: cpp: 238,971; python: 265; sh: 224; xml: 157; ansic: 78; objc: 61; makefile: 49
file content (173 lines) | stat: -rw-r--r-- 2,914 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# Building Bonuses

Work-in-progress page do describe all bonuses provided by town buildings
for future configuration.

TODO: This page is outdated and may not represent VCMI 1.3 state

### unique buildings

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:

```json
 "function" : "castleGates" 
```

### trade-related

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

### hero visitables

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

### generic functions

Generic town-specific functions that can be implemented as part of
CBuilding class.

#### unlock guild level

```json
 "guildLevels" : 1 
```

#### unlock hero recruitment

```json
 "allowsHeroPurchase" : true 
```

#### unlock ship purchase

```json
 "allowsShipPurchase" : true 
```

#### unlock building purchase

```json
 "allowsBuildingPurchase" : true 
```

#### unlocks creatures

```json
 "dwelling" : { "level" : 1, "creature" : "archer" } 
```

#### creature growth bonus

Turn into town bonus? What about creature-specific bonuses from hordes?

#### gives resources

```json
 "provides" : { "gold" : 500 } 
```

#### gives guild spells

```json
 "guildSpells" : [5, 0, 0, 0, 0] 
```

#### gives thieves guild

```json
 "thievesGuildLevels" : 1 
```

#### gives fortifications

```json
 "fortificationLevels" : 1 
```

#### gives war machine

```json
 "warMachine" : "ballista" 
```

### simple bonuses

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

```json
"bonuses" :
{
	"moraleToDefenders" :
	{
		"type": "MORALE",
		"val" : 1,
		"propagator" : ["VISITED_TOWN_AND_VISITOR"]
	},
	"luckToTeam" :
	{
		"type" : "LUCK",
		"val" : 2,
		"propagator" : [ "TEAM_PROPAGATOR" ]
	}
```

### misc

Some other properties of town building that does not fall under "bonus"
category.

#### unique building

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.

```json
 "onePerPlayer" : true 
```

#### chance to be built on start

```json
 "prebuiltChance" : 75 
```