Mercurial > sypikslang
annotate gamelib/schematics.py @ 267:a534629f490f default tip
Fix urls
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Tue, 17 Mar 2020 22:39:54 +0200 |
parents | 8cad2a0ded67 |
children |
rev | line source |
---|---|
54 | 1 # -*- test-case-name: gamelib.tests.test_schematics -*- |
2 | |
3
6ab4f1ab9eab
Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
3 from gamelib import research |
45
1e8f7e694f0c
Refactor missions and sciences a bit to reduce duplication.
Jeremy Thurgood <firxen@gmail.com>
parents:
34
diff
changeset
|
4 from gamelib.game_base import Science |
3
6ab4f1ab9eab
Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
5 |
6ab4f1ab9eab
Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
6 |
85
182fce9f70b6
Propaganda! Also, a fix to blueprint breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
58
diff
changeset
|
7 class SchematicCategorySet(object): |
182fce9f70b6
Propaganda! Also, a fix to blueprint breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
58
diff
changeset
|
8 def __init__(self, *categories): |
182fce9f70b6
Propaganda! Also, a fix to blueprint breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
58
diff
changeset
|
9 for cat in categories: |
182fce9f70b6
Propaganda! Also, a fix to blueprint breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
58
diff
changeset
|
10 setattr(self, cat, cat.lower().replace('_', ' ')) |
182fce9f70b6
Propaganda! Also, a fix to blueprint breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
58
diff
changeset
|
11 |
182fce9f70b6
Propaganda! Also, a fix to blueprint breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
58
diff
changeset
|
12 cat = SchematicCategorySet( |
182fce9f70b6
Propaganda! Also, a fix to blueprint breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
58
diff
changeset
|
13 'HAND_WEAPON', |
182fce9f70b6
Propaganda! Also, a fix to blueprint breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
58
diff
changeset
|
14 'VEHICLE', |
182fce9f70b6
Propaganda! Also, a fix to blueprint breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
58
diff
changeset
|
15 'DOOMSDAY_DEVICE', |
182fce9f70b6
Propaganda! Also, a fix to blueprint breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
58
diff
changeset
|
16 'PATHOGEN', |
182fce9f70b6
Propaganda! Also, a fix to blueprint breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
58
diff
changeset
|
17 'MIND_CONTROL', |
116 | 18 'BEAST', |
19 'AQUATIC', | |
146
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
20 'INTELLIGENCE', |
132 | 21 'AI', |
151
372d886f9e70
New suggest_research() method on Lab.
Jeremy Thurgood <firxen@gmail.com>
parents:
148
diff
changeset
|
22 'COUNTERMEASURE', |
191
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
23 'SPACE', |
198 | 24 'WEATHER_MACHINE', |
203 | 25 'CLONE', |
85
182fce9f70b6
Propaganda! Also, a fix to blueprint breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
58
diff
changeset
|
26 ) |
32 | 27 |
148 | 28 K = 1000 |
29 M = 1000 * K | |
30 | |
32 | 31 |
49 | 32 class Schematic(Science): |
54 | 33 # For all Schematics |
34 SCIENCE_TYPE = 'schematic' | |
35 | |
36 # Acquisition | |
37 STARTING_PRODUCT = False | |
6
826b44731323
Start of basic lab implementation.
Jeremy Thurgood <firxen@gmail.com>
parents:
3
diff
changeset
|
38 ACQUISITION_CHANCE = 0.8 |
54 | 39 CATEGORIES = () |
40 | |
41 # Costs | |
17
10d3db1f1e08
Set up initial research and rework breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
15
diff
changeset
|
42 UPGRADE_REQUIREMENT = 1 |
54 | 43 COST = None |
146
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
44 MAX_UPGRADE = 5 |
54 | 45 |
46 # Power and reliability | |
47 PROTOTYPE_RELIABILITY = 0.4 | |
48 PRODUCTION_RELIABILITY = 0.8 | |
49 BASE_POWER = None | |
50 POWER_INCREMENT = None | |
3
6ab4f1ab9eab
Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
51 |
145
53277724645b
Science button juggling.
Jeremy Thurgood <firxen@gmail.com>
parents:
132
diff
changeset
|
52 # FIXME: Icons for equipment. |
53277724645b
Science button juggling.
Jeremy Thurgood <firxen@gmail.com>
parents:
132
diff
changeset
|
53 IMAGE_NAME = "physics" |
53277724645b
Science button juggling.
Jeremy Thurgood <firxen@gmail.com>
parents:
132
diff
changeset
|
54 |
159
f1efd252e8b0
Equipment power in missions.
Jeremy Thurgood <firxen@gmail.com>
parents:
151
diff
changeset
|
55 FAILURE_TEXT = "Your equipment failed in an excitingly disastrous manner." |
f1efd252e8b0
Equipment power in missions.
Jeremy Thurgood <firxen@gmail.com>
parents:
151
diff
changeset
|
56 |
58
52913ba12988
Check for multiple points in can_spend
Neil Muller <drnlmuller@gmail.com>
parents:
54
diff
changeset
|
57 def can_spend(self, lab, spend): |
146
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
58 if self.points + spend > self.MAX_UPGRADE: |
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
59 return False |
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
60 extra = self.UPGRADE_REQUIREMENT * (self.points + spend) |
17
10d3db1f1e08
Set up initial research and rework breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
15
diff
changeset
|
61 return lab.meet_requirements(self, extra) |
3
6ab4f1ab9eab
Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
62 |
34 | 63 def is_a(self, category): |
64 return category in self.CATEGORIES | |
65 | |
54 | 66 def reliability(self): |
67 if self.points: | |
68 exp = 1 + 0.5 * (self.points - 1) | |
69 return 1.0 - ((1.0 - self.PRODUCTION_RELIABILITY) ** exp) | |
70 return self.PROTOTYPE_RELIABILITY | |
71 | |
72 def power(self): | |
73 power = self.BASE_POWER | |
74 if None not in (power, self.POWER_INCREMENT): | |
75 power += self.POWER_INCREMENT * self.points | |
76 return power | |
77 | |
94
245ef50de84d
Sanity-check research, schematic and mission classes. (Ironic, no?)
Jeremy Thurgood <firxen@gmail.com>
parents:
91
diff
changeset
|
78 @classmethod |
245ef50de84d
Sanity-check research, schematic and mission classes. (Ironic, no?)
Jeremy Thurgood <firxen@gmail.com>
parents:
91
diff
changeset
|
79 def sanity_check(cls): |
245ef50de84d
Sanity-check research, schematic and mission classes. (Ironic, no?)
Jeremy Thurgood <firxen@gmail.com>
parents:
91
diff
changeset
|
80 for science, points in cls.PREREQUISITES: |
245ef50de84d
Sanity-check research, schematic and mission classes. (Ironic, no?)
Jeremy Thurgood <firxen@gmail.com>
parents:
91
diff
changeset
|
81 assert issubclass(science, Science) |
245ef50de84d
Sanity-check research, schematic and mission classes. (Ironic, no?)
Jeremy Thurgood <firxen@gmail.com>
parents:
91
diff
changeset
|
82 assert isinstance(points, int) |
245ef50de84d
Sanity-check research, schematic and mission classes. (Ironic, no?)
Jeremy Thurgood <firxen@gmail.com>
parents:
91
diff
changeset
|
83 assert isinstance(cls.CATEGORIES, tuple) |
245ef50de84d
Sanity-check research, schematic and mission classes. (Ironic, no?)
Jeremy Thurgood <firxen@gmail.com>
parents:
91
diff
changeset
|
84 |
3
6ab4f1ab9eab
Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
85 |
49 | 86 class MachineGun(Schematic): |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
87 NAME = "Machine gun" |
15 | 88 COST = 100 |
214
d378459567bb
Hook up a bunch of icons
Neil Muller <drnlmuller@gmail.com>
parents:
208
diff
changeset
|
89 IMAGE_NAME = "schematics/handgun" |
85
182fce9f70b6
Propaganda! Also, a fix to blueprint breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
58
diff
changeset
|
90 CATEGORIES = (cat.HAND_WEAPON,) |
17
10d3db1f1e08
Set up initial research and rework breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
15
diff
changeset
|
91 STARTING_PRODUCT = True |
10d3db1f1e08
Set up initial research and rework breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
15
diff
changeset
|
92 |
146
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
93 BASE_POWER = 10 |
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
94 PRODUCTION_RELIABILITY = 1.0 |
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
95 |
20 | 96 def __init__(self, points=0): |
17
10d3db1f1e08
Set up initial research and rework breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
15
diff
changeset
|
97 self.points = 1 |
10d3db1f1e08
Set up initial research and rework breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
15
diff
changeset
|
98 |
3
6ab4f1ab9eab
Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
99 |
49 | 100 class LightningGun(Schematic): |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
101 NAME = "Lightning gun" |
32 | 102 COST = 300 |
214
d378459567bb
Hook up a bunch of icons
Neil Muller <drnlmuller@gmail.com>
parents:
208
diff
changeset
|
103 IMAGE_NAME = "schematics/handgun" |
85
182fce9f70b6
Propaganda! Also, a fix to blueprint breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
58
diff
changeset
|
104 CATEGORIES = (cat.HAND_WEAPON,) |
3
6ab4f1ab9eab
Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
105 PREREQUISITES = ( |
115 | 106 (research.Electrickery, 1), |
3
6ab4f1ab9eab
Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
107 ) |
6ab4f1ab9eab
Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
108 |
148 | 109 BASE_POWER = 15 |
110 POWER_INCREMENT = 3 | |
111 PRODUCTION_RELIABILITY = 0.7 | |
146
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
112 |
159
f1efd252e8b0
Equipment power in missions.
Jeremy Thurgood <firxen@gmail.com>
parents:
151
diff
changeset
|
113 FAILURE_TEXT = ( |
f1efd252e8b0
Equipment power in missions.
Jeremy Thurgood <firxen@gmail.com>
parents:
151
diff
changeset
|
114 "Your lightning gun dropped an insulator, leaking volts and coulombs" |
f1efd252e8b0
Equipment power in missions.
Jeremy Thurgood <firxen@gmail.com>
parents:
151
diff
changeset
|
115 " all over the place.") |
f1efd252e8b0
Equipment power in missions.
Jeremy Thurgood <firxen@gmail.com>
parents:
151
diff
changeset
|
116 |
3
6ab4f1ab9eab
Very basics of research and products.
Jeremy Thurgood <firxen@gmail.com>
parents:
diff
changeset
|
117 |
49 | 118 class TeslaTank(Schematic): |
159
f1efd252e8b0
Equipment power in missions.
Jeremy Thurgood <firxen@gmail.com>
parents:
151
diff
changeset
|
119 NAME = "Tesla tank" |
148 | 120 COST = 40 * K |
254
2c684fade3af
Fill in more schematic icons
Neil Muller <drnlmuller@gmail.com>
parents:
238
diff
changeset
|
121 IMAGE_NAME = 'schematics/vehicle' |
85
182fce9f70b6
Propaganda! Also, a fix to blueprint breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
58
diff
changeset
|
122 CATEGORIES = (cat.VEHICLE,) |
17
10d3db1f1e08
Set up initial research and rework breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
15
diff
changeset
|
123 PREREQUISITES = ( |
146
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
124 (research.Electrickery, 5), |
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
125 (research.Robotics, 1), |
17
10d3db1f1e08
Set up initial research and rework breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
15
diff
changeset
|
126 ) |
10d3db1f1e08
Set up initial research and rework breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
15
diff
changeset
|
127 |
146
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
128 BASE_POWER = 100 |
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
129 POWER_INCREMENT = 10 |
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
130 |
159
f1efd252e8b0
Equipment power in missions.
Jeremy Thurgood <firxen@gmail.com>
parents:
151
diff
changeset
|
131 FAILURE_TEXT = ( |
f1efd252e8b0
Equipment power in missions.
Jeremy Thurgood <firxen@gmail.com>
parents:
151
diff
changeset
|
132 "The cheap knock-off capacitors in the primary charge module of the" |
f1efd252e8b0
Equipment power in missions.
Jeremy Thurgood <firxen@gmail.com>
parents:
151
diff
changeset
|
133 " Tesla tank knocked off, leading to much excitement.") |
f1efd252e8b0
Equipment power in missions.
Jeremy Thurgood <firxen@gmail.com>
parents:
151
diff
changeset
|
134 |
17
10d3db1f1e08
Set up initial research and rework breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
15
diff
changeset
|
135 |
85
182fce9f70b6
Propaganda! Also, a fix to blueprint breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
58
diff
changeset
|
136 class PropagandaMachine(Schematic): |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
137 NAME = "Propaganda machine" |
85
182fce9f70b6
Propaganda! Also, a fix to blueprint breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
58
diff
changeset
|
138 COST = 1000 |
214
d378459567bb
Hook up a bunch of icons
Neil Muller <drnlmuller@gmail.com>
parents:
208
diff
changeset
|
139 IMAGE_NAME = "schematics/mindcontrol" |
91
c57b5b46d3e0
Better mission data management.
Jeremy Thurgood <firxen@gmail.com>
parents:
85
diff
changeset
|
140 CATEGORIES = (cat.MIND_CONTROL,) |
85
182fce9f70b6
Propaganda! Also, a fix to blueprint breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
58
diff
changeset
|
141 PREREQUISITES = ( |
182fce9f70b6
Propaganda! Also, a fix to blueprint breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
58
diff
changeset
|
142 (research.Psychology, 2), |
182fce9f70b6
Propaganda! Also, a fix to blueprint breakthroughs.
Jeremy Thurgood <firxen@gmail.com>
parents:
58
diff
changeset
|
143 ) |
116 | 144 |
148 | 145 BASE_POWER = 10 |
146 POWER_INCREMENT = 2 | |
147 | |
159
f1efd252e8b0
Equipment power in missions.
Jeremy Thurgood <firxen@gmail.com>
parents:
151
diff
changeset
|
148 FAILURE_TEXT = ( |
f1efd252e8b0
Equipment power in missions.
Jeremy Thurgood <firxen@gmail.com>
parents:
151
diff
changeset
|
149 "The propaganda machine printed reams of carefully structured" |
f1efd252e8b0
Equipment power in missions.
Jeremy Thurgood <firxen@gmail.com>
parents:
151
diff
changeset
|
150 " nonsense, which the proofreaders didn't catch until too late.") |
f1efd252e8b0
Equipment power in missions.
Jeremy Thurgood <firxen@gmail.com>
parents:
151
diff
changeset
|
151 |
116 | 152 |
193 | 153 class MindControlRay(Schematic): |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
154 NAME = "Mind control ray" |
193 | 155 COST = 4 * K |
156 CATEGORIES = (cat.MIND_CONTROL,) | |
214
d378459567bb
Hook up a bunch of icons
Neil Muller <drnlmuller@gmail.com>
parents:
208
diff
changeset
|
157 IMAGE_NAME = "schematics/mindcontrol" |
193 | 158 PREREQUISITES = ( |
159 (research.Psychology, 6), | |
160 (research.MedicalExperiments, 6), | |
161 ) | |
162 | |
163 BASE_POWER = 40 | |
164 POWER_INCREMENT = 6 | |
165 | |
166 FAILURE_TEXT = ( | |
167 "The frequency tuner on the mind control ray was slightly" | |
168 " miscalibrated. A new genre of glitterpop was born, but this" | |
169 " entirely fails to advance your shadowy agenda.") | |
170 | |
171 | |
116 | 172 class GiantSquid(Schematic): |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
173 NAME = "Giant squid" |
148 | 174 COST = 50 * K |
116 | 175 CATEGORIES = (cat.BEAST, cat.AQUATIC) |
176 PREREQUISITES = ( | |
177 (research.MarineBiology, 20), | |
178 (research.Biogenetics, 15), | |
179 ) | |
254
2c684fade3af
Fill in more schematic icons
Neil Muller <drnlmuller@gmail.com>
parents:
238
diff
changeset
|
180 IMAGE_NAME = 'marinebiology' |
116 | 181 |
148 | 182 BASE_POWER = 200 |
183 POWER_INCREMENT = 20 | |
184 | |
116 | 185 |
188 | 186 class SpiderGrenade(Schematic): |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
187 NAME = "Spider grenade" |
188 | 188 COST = 500 |
189 CATEGORIES = (cat.HAND_WEAPON,) | |
190 PREREQUISITES = ( | |
191 (research.Biogenetics, 3), | |
192 (research.Physics, 2), | |
193 ) | |
260
8cad2a0ded67
Add spider image to schematics
Neil Muller <drnlmuller@gmail.com>
parents:
256
diff
changeset
|
194 IMAGE_NAME = 'schematics/spider' |
188 | 195 |
196 BASE_POWER = 22 | |
197 POWER_INCREMENT = 2 | |
198 | |
199 PRODUCTION_RELIABILITY = 0.6 | |
200 | |
201 FAILURE_TEXT = ( | |
202 "Explosions full of spiders. What could possibly go wrong? Oh god!" | |
203 " They're everywhere! EVERYWHERE! Get them off me!") | |
204 | |
205 | |
189 | 206 class CyberneticImplants(Schematic): |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
207 NAME = "Cybernetic implants" |
189 | 208 COST = 1500 |
209 CATEGORIES = (cat.HAND_WEAPON, cat.INTELLIGENCE) | |
210 PREREQUISITES = ( | |
211 (research.MedicalExperiments, 5), | |
212 (research.Robotics, 5), | |
213 ) | |
254
2c684fade3af
Fill in more schematic icons
Neil Muller <drnlmuller@gmail.com>
parents:
238
diff
changeset
|
214 IMAGE_NAME = 'schematics/robot' |
189 | 215 |
216 BASE_POWER = 25 | |
217 POWER_INCREMENT = 5 | |
218 | |
219 PRODUCTION_RELIABILITY = 0.9 | |
220 | |
221 FAILURE_TEXT = ( | |
222 "Exciting buffer overflows in your neural interface. I'll spare you" | |
223 " the gruesome details.") | |
224 | |
225 | |
190 | 226 class TornadoMachine(Schematic): |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
227 NAME = "Tornado machine" |
190 | 228 COST = 7 * K |
198 | 229 CATEGORIES = (cat.VEHICLE, cat.WEATHER_MACHINE) |
214
d378459567bb
Hook up a bunch of icons
Neil Muller <drnlmuller@gmail.com>
parents:
208
diff
changeset
|
230 IMAGE_NAME = "schematics/weathermachine" |
190 | 231 PREREQUISITES = ( |
232 (research.Meteorology, 6), | |
233 (research.Physics, 5), | |
234 ) | |
235 | |
236 BASE_POWER = 40 | |
237 POWER_INCREMENT = 8 | |
238 | |
239 FAILURE_TEXT = ( | |
240 "Tornados! Dropping cows on you! Hardly conducive to mission success.") | |
241 | |
242 | |
174 | 243 class MonsterBear(Schematic): |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
244 NAME = "Giant bear" |
174 | 245 COST = 10 * K |
246 CATEGORIES = (cat.BEAST,) | |
254
2c684fade3af
Fill in more schematic icons
Neil Muller <drnlmuller@gmail.com>
parents:
238
diff
changeset
|
247 IMAGE_NAME = 'schematics/beast' |
174 | 248 PREREQUISITES = ( |
249 (research.Biogenetics, 3), | |
250 ) | |
251 | |
252 BASE_POWER = 50 | |
253 POWER_INCREMENT = 5 | |
254 | |
255 | |
116 | 256 class SharksWithFrickinLasers(Schematic): |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
257 NAME = "Sharks with frickin' lasers" |
148 | 258 COST = 15 * K |
254
2c684fade3af
Fill in more schematic icons
Neil Muller <drnlmuller@gmail.com>
parents:
238
diff
changeset
|
259 IMAGE_NAME = 'schematics/shark' |
116 | 260 CATEGORIES = (cat.BEAST, cat.AQUATIC) |
261 PREREQUISITES = ( | |
262 (research.MarineBiology, 10), | |
263 (research.Lasers, 7), | |
264 ) | |
132 | 265 |
148 | 266 BASE_POWER = 75 |
267 POWER_INCREMENT = 10 | |
132 | 268 |
269 | |
146
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
270 class ObservationDrone(Schematic): |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
271 NAME = "Observation drone" |
146
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
272 COST = 6000 |
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
273 CATEGORIES = (cat.INTELLIGENCE,) |
132 | 274 PREREQUISITES = ( |
146
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
275 (research.Robotics, 3), |
132 | 276 ) |
256 | 277 IMAGE_NAME = 'schematics/eye' |
132 | 278 |
148 | 279 BASE_POWER = 25 |
280 POWER_INCREMENT = 5 | |
281 | |
132 | 282 |
146
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
283 class SpySatellite(Schematic): |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
284 NAME = "Spy satellite" |
148 | 285 COST = 100 * K |
191
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
286 CATEGORIES = (cat.INTELLIGENCE, cat.SPACE) |
132 | 287 PREREQUISITES = ( |
146
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
288 (research.Rocketry, 5), |
132 | 289 (research.Space, 1), |
290 ) | |
256 | 291 IMAGE_NAME = 'schematics/eye' |
132 | 292 |
148 | 293 BASE_POWER = 250 |
294 POWER_INCREMENT = 50 | |
146
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
295 |
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
296 |
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
297 class TacticalAI(Schematic): |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
298 NAME = "Tactical AI" |
148 | 299 COST = 10 * K |
146
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
300 CATEGORIES = (cat.AI, cat.INTELLIGENCE) |
132 | 301 PREREQUISITES = ( |
146
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
302 (research.ArtificialIntelligence, 3), |
132 | 303 ) |
254
2c684fade3af
Fill in more schematic icons
Neil Muller <drnlmuller@gmail.com>
parents:
238
diff
changeset
|
304 IMAGE_NAME = 'schematics/intelligence' |
132 | 305 |
174 | 306 FAILURE_TEXT = ( |
307 "Everything seems to be going smoothly until the AI decides it" | |
308 " needs to rule the world itself. Fortuantely, you are able to purge" | |
309 " it from the system before it becomes a legitimate rival.") | |
310 | |
132 | 311 |
312 class LaserGun(Schematic): | |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
313 NAME = "Laser gun" |
132 | 314 COST = 300 |
315 CATEGORIES = (cat.HAND_WEAPON,) | |
214
d378459567bb
Hook up a bunch of icons
Neil Muller <drnlmuller@gmail.com>
parents:
208
diff
changeset
|
316 IMAGE_NAME = "schematics/handgun" |
132 | 317 PREREQUISITES = ( |
146
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
318 (research.Lasers, 2), |
132 | 319 ) |
170 | 320 BASE_POWER = 20 |
321 POWER_INCREMENT = 2 | |
322 PRODUCTION_RELIABILITY = 0.6 | |
148 | 323 |
172
8e743d774cba
Add failure flavour text
Neil Muller <drnlmuller@gmail.com>
parents:
170
diff
changeset
|
324 FAILURE_TEXT = ( |
8e743d774cba
Add failure flavour text
Neil Muller <drnlmuller@gmail.com>
parents:
170
diff
changeset
|
325 "The carefully crafted electronics of the laser fail in a spectacular" |
8e743d774cba
Add failure flavour text
Neil Muller <drnlmuller@gmail.com>
parents:
170
diff
changeset
|
326 " shower of sparks and bangs.") |
8e743d774cba
Add failure flavour text
Neil Muller <drnlmuller@gmail.com>
parents:
170
diff
changeset
|
327 |
148 | 328 |
151
372d886f9e70
New suggest_research() method on Lab.
Jeremy Thurgood <firxen@gmail.com>
parents:
148
diff
changeset
|
329 class EmpMissile(Schematic): |
372d886f9e70
New suggest_research() method on Lab.
Jeremy Thurgood <firxen@gmail.com>
parents:
148
diff
changeset
|
330 NAME = "EMP missile" |
372d886f9e70
New suggest_research() method on Lab.
Jeremy Thurgood <firxen@gmail.com>
parents:
148
diff
changeset
|
331 COST = 1500 |
254
2c684fade3af
Fill in more schematic icons
Neil Muller <drnlmuller@gmail.com>
parents:
238
diff
changeset
|
332 IMAGE_NAME = 'schematics/missiles' |
151
372d886f9e70
New suggest_research() method on Lab.
Jeremy Thurgood <firxen@gmail.com>
parents:
148
diff
changeset
|
333 CATEGORIES = (cat.COUNTERMEASURE,) |
372d886f9e70
New suggest_research() method on Lab.
Jeremy Thurgood <firxen@gmail.com>
parents:
148
diff
changeset
|
334 PREREQUISITES = ( |
372d886f9e70
New suggest_research() method on Lab.
Jeremy Thurgood <firxen@gmail.com>
parents:
148
diff
changeset
|
335 (research.Electrickery, 5), |
372d886f9e70
New suggest_research() method on Lab.
Jeremy Thurgood <firxen@gmail.com>
parents:
148
diff
changeset
|
336 (research.Rocketry, 2), |
372d886f9e70
New suggest_research() method on Lab.
Jeremy Thurgood <firxen@gmail.com>
parents:
148
diff
changeset
|
337 ) |
372d886f9e70
New suggest_research() method on Lab.
Jeremy Thurgood <firxen@gmail.com>
parents:
148
diff
changeset
|
338 |
372d886f9e70
New suggest_research() method on Lab.
Jeremy Thurgood <firxen@gmail.com>
parents:
148
diff
changeset
|
339 |
148 | 340 class DoomsdayVirus(Schematic): |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
341 NAME = "Doomsday virus" |
148 | 342 COST = 100 * K |
343 CATEGORIES = (cat.DOOMSDAY_DEVICE, cat.PATHOGEN) | |
214
d378459567bb
Hook up a bunch of icons
Neil Muller <drnlmuller@gmail.com>
parents:
208
diff
changeset
|
344 IMAGE_NAME = "schematics/pathogen" |
148 | 345 PREREQUISITES = ( |
346 (research.Biogenetics, 5), | |
347 ) | |
348 | |
349 BASE_POWER = 1000 | |
350 POWER_INCREMENT = 500 | |
351 | |
352 PRODUCTION_RELIABILITY = 0.6 | |
353 | |
238
837c51ebdbc8
failure text for doomsday virus
Neil Muller <drnlmuller@gmail.com>
parents:
216
diff
changeset
|
354 FAILURE_TEXT = ( |
837c51ebdbc8
failure text for doomsday virus
Neil Muller <drnlmuller@gmail.com>
parents:
216
diff
changeset
|
355 "You suddenly realise you've miscopied a vital allele when" |
837c51ebdbc8
failure text for doomsday virus
Neil Muller <drnlmuller@gmail.com>
parents:
216
diff
changeset
|
356 " constructing the virus, and that this will never work." |
837c51ebdbc8
failure text for doomsday virus
Neil Muller <drnlmuller@gmail.com>
parents:
216
diff
changeset
|
357 " You return to the lab to fix the problem.") |
837c51ebdbc8
failure text for doomsday virus
Neil Muller <drnlmuller@gmail.com>
parents:
216
diff
changeset
|
358 |
148 | 359 |
360 class GiantRobot(Schematic): | |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
361 NAME = "Giant robot" |
148 | 362 COST = int(1.5 * M) |
363 CATEGORIES = (cat.DOOMSDAY_DEVICE, cat.AI) | |
254
2c684fade3af
Fill in more schematic icons
Neil Muller <drnlmuller@gmail.com>
parents:
238
diff
changeset
|
364 IMAGE_NAME = 'schematics/robot' |
148 | 365 PREREQUISITES = ( |
366 (research.Robotics, 15), | |
367 (research.ArtificialIntelligence, 10), | |
368 ) | |
369 | |
370 BASE_POWER = 700 | |
371 POWER_INCREMENT = 300 | |
372 | |
373 PRODUCTION_RELIABILITY = 0.7 | |
374 | |
375 | |
376 class OrbitalLaserPlatform(Schematic): | |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
377 NAME = "Orbital laser platform" |
148 | 378 COST = 10 * M |
191
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
379 CATEGORIES = (cat.DOOMSDAY_DEVICE, cat.SPACE) |
214
d378459567bb
Hook up a bunch of icons
Neil Muller <drnlmuller@gmail.com>
parents:
208
diff
changeset
|
380 IMAGE_NAME = "schematics/doomsdaydevice" |
148 | 381 PREREQUISITES = ( |
382 (SpySatellite, 3), | |
383 (research.Lasers, 15), | |
384 (research.Space, 5), | |
385 ) | |
386 | |
387 BASE_POWER = 1500 | |
388 POWER_INCREMENT = 200 | |
191
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
389 |
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
390 |
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
391 class WeatherControlStation(Schematic): |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
392 NAME = "Weather control station" |
191
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
393 COST = 15 * M |
198 | 394 CATEGORIES = (cat.DOOMSDAY_DEVICE, cat.SPACE, cat.WEATHER_MACHINE) |
214
d378459567bb
Hook up a bunch of icons
Neil Muller <drnlmuller@gmail.com>
parents:
208
diff
changeset
|
395 IMAGE_NAME = "schematics/weathermachine" |
191
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
396 PREREQUISITES = ( |
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
397 (SpySatellite, 3), |
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
398 (research.Lasers, 5), |
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
399 (research.Space, 8), |
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
400 (research.Meteorology, 15), |
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
401 ) |
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
402 |
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
403 BASE_POWER = 2200 |
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
404 POWER_INCREMENT = 150 |
203 | 405 |
406 | |
407 class Android(Schematic): | |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
408 NAME = "Lifelike android" |
203 | 409 COST = 50 * K |
208 | 410 CATEGORIES = (cat.INTELLIGENCE, cat.AI, cat.CLONE) |
203 | 411 PREREQUISITES = ( |
412 (research.ArtificialIntelligence, 5), | |
413 (research.Robotics, 5), | |
414 ) | |
254
2c684fade3af
Fill in more schematic icons
Neil Muller <drnlmuller@gmail.com>
parents:
238
diff
changeset
|
415 IMAGE_NAME = 'schematics/robot' |
203 | 416 |
417 BASE_POWER = 10 | |
418 POWER_INCREMENT = 1 | |
419 | |
420 PRODUCTION_RELIABILITY = 0.6 | |
421 | |
422 FAILURE_TEXT = ( | |
423 "The sudden stuttering speech and sparks from the joints are the first" | |
424 " signs that things have gone horribly wrong. The ensuing explosion" | |
425 " of the android is merely the inevitable conclusion of the diaster.") |