Mercurial > sypikslang
annotate gamelib/schematics.py @ 254:2c684fade3af
Fill in more schematic icons
author | Neil Muller <drnlmuller@gmail.com> |
---|---|
date | Sun, 13 May 2012 01:22:17 +0200 |
parents | 837c51ebdbc8 |
children | 44a09802fff4 |
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 ) | |
194 | |
195 BASE_POWER = 22 | |
196 POWER_INCREMENT = 2 | |
197 | |
198 PRODUCTION_RELIABILITY = 0.6 | |
199 | |
200 FAILURE_TEXT = ( | |
201 "Explosions full of spiders. What could possibly go wrong? Oh god!" | |
202 " They're everywhere! EVERYWHERE! Get them off me!") | |
203 | |
204 | |
189 | 205 class CyberneticImplants(Schematic): |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
206 NAME = "Cybernetic implants" |
189 | 207 COST = 1500 |
208 CATEGORIES = (cat.HAND_WEAPON, cat.INTELLIGENCE) | |
209 PREREQUISITES = ( | |
210 (research.MedicalExperiments, 5), | |
211 (research.Robotics, 5), | |
212 ) | |
254
2c684fade3af
Fill in more schematic icons
Neil Muller <drnlmuller@gmail.com>
parents:
238
diff
changeset
|
213 IMAGE_NAME = 'schematics/robot' |
189 | 214 |
215 BASE_POWER = 25 | |
216 POWER_INCREMENT = 5 | |
217 | |
218 PRODUCTION_RELIABILITY = 0.9 | |
219 | |
220 FAILURE_TEXT = ( | |
221 "Exciting buffer overflows in your neural interface. I'll spare you" | |
222 " the gruesome details.") | |
223 | |
224 | |
190 | 225 class TornadoMachine(Schematic): |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
226 NAME = "Tornado machine" |
190 | 227 COST = 7 * K |
198 | 228 CATEGORIES = (cat.VEHICLE, cat.WEATHER_MACHINE) |
214
d378459567bb
Hook up a bunch of icons
Neil Muller <drnlmuller@gmail.com>
parents:
208
diff
changeset
|
229 IMAGE_NAME = "schematics/weathermachine" |
190 | 230 PREREQUISITES = ( |
231 (research.Meteorology, 6), | |
232 (research.Physics, 5), | |
233 ) | |
234 | |
235 BASE_POWER = 40 | |
236 POWER_INCREMENT = 8 | |
237 | |
238 FAILURE_TEXT = ( | |
239 "Tornados! Dropping cows on you! Hardly conducive to mission success.") | |
240 | |
241 | |
174 | 242 class MonsterBear(Schematic): |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
243 NAME = "Giant bear" |
174 | 244 COST = 10 * K |
245 CATEGORIES = (cat.BEAST,) | |
254
2c684fade3af
Fill in more schematic icons
Neil Muller <drnlmuller@gmail.com>
parents:
238
diff
changeset
|
246 IMAGE_NAME = 'schematics/beast' |
174 | 247 PREREQUISITES = ( |
248 (research.Biogenetics, 3), | |
249 ) | |
250 | |
251 BASE_POWER = 50 | |
252 POWER_INCREMENT = 5 | |
253 | |
254 | |
116 | 255 class SharksWithFrickinLasers(Schematic): |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
256 NAME = "Sharks with frickin' lasers" |
148 | 257 COST = 15 * K |
254
2c684fade3af
Fill in more schematic icons
Neil Muller <drnlmuller@gmail.com>
parents:
238
diff
changeset
|
258 IMAGE_NAME = 'schematics/shark' |
116 | 259 CATEGORIES = (cat.BEAST, cat.AQUATIC) |
260 PREREQUISITES = ( | |
261 (research.MarineBiology, 10), | |
262 (research.Lasers, 7), | |
263 ) | |
132 | 264 |
148 | 265 BASE_POWER = 75 |
266 POWER_INCREMENT = 10 | |
132 | 267 |
268 | |
146
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
269 class ObservationDrone(Schematic): |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
270 NAME = "Observation drone" |
146
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
271 COST = 6000 |
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
272 CATEGORIES = (cat.INTELLIGENCE,) |
132 | 273 PREREQUISITES = ( |
146
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
274 (research.Robotics, 3), |
132 | 275 ) |
276 | |
148 | 277 BASE_POWER = 25 |
278 POWER_INCREMENT = 5 | |
279 | |
132 | 280 |
146
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
281 class SpySatellite(Schematic): |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
282 NAME = "Spy satellite" |
148 | 283 COST = 100 * K |
191
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
284 CATEGORIES = (cat.INTELLIGENCE, cat.SPACE) |
132 | 285 PREREQUISITES = ( |
146
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
286 (research.Rocketry, 5), |
132 | 287 (research.Space, 1), |
288 ) | |
289 | |
148 | 290 BASE_POWER = 250 |
291 POWER_INCREMENT = 50 | |
146
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
292 |
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
293 |
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
294 class TacticalAI(Schematic): |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
295 NAME = "Tactical AI" |
148 | 296 COST = 10 * K |
146
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
297 CATEGORIES = (cat.AI, cat.INTELLIGENCE) |
132 | 298 PREREQUISITES = ( |
146
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
299 (research.ArtificialIntelligence, 3), |
132 | 300 ) |
254
2c684fade3af
Fill in more schematic icons
Neil Muller <drnlmuller@gmail.com>
parents:
238
diff
changeset
|
301 IMAGE_NAME = 'schematics/intelligence' |
132 | 302 |
174 | 303 FAILURE_TEXT = ( |
304 "Everything seems to be going smoothly until the AI decides it" | |
305 " needs to rule the world itself. Fortuantely, you are able to purge" | |
306 " it from the system before it becomes a legitimate rival.") | |
307 | |
132 | 308 |
309 class LaserGun(Schematic): | |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
310 NAME = "Laser gun" |
132 | 311 COST = 300 |
312 CATEGORIES = (cat.HAND_WEAPON,) | |
214
d378459567bb
Hook up a bunch of icons
Neil Muller <drnlmuller@gmail.com>
parents:
208
diff
changeset
|
313 IMAGE_NAME = "schematics/handgun" |
132 | 314 PREREQUISITES = ( |
146
2587f8c34f84
Science juggling and visualization improvements.
Jeremy Thurgood <firxen@gmail.com>
parents:
145
diff
changeset
|
315 (research.Lasers, 2), |
132 | 316 ) |
170 | 317 BASE_POWER = 20 |
318 POWER_INCREMENT = 2 | |
319 PRODUCTION_RELIABILITY = 0.6 | |
148 | 320 |
172
8e743d774cba
Add failure flavour text
Neil Muller <drnlmuller@gmail.com>
parents:
170
diff
changeset
|
321 FAILURE_TEXT = ( |
8e743d774cba
Add failure flavour text
Neil Muller <drnlmuller@gmail.com>
parents:
170
diff
changeset
|
322 "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
|
323 " shower of sparks and bangs.") |
8e743d774cba
Add failure flavour text
Neil Muller <drnlmuller@gmail.com>
parents:
170
diff
changeset
|
324 |
148 | 325 |
151
372d886f9e70
New suggest_research() method on Lab.
Jeremy Thurgood <firxen@gmail.com>
parents:
148
diff
changeset
|
326 class EmpMissile(Schematic): |
372d886f9e70
New suggest_research() method on Lab.
Jeremy Thurgood <firxen@gmail.com>
parents:
148
diff
changeset
|
327 NAME = "EMP missile" |
372d886f9e70
New suggest_research() method on Lab.
Jeremy Thurgood <firxen@gmail.com>
parents:
148
diff
changeset
|
328 COST = 1500 |
254
2c684fade3af
Fill in more schematic icons
Neil Muller <drnlmuller@gmail.com>
parents:
238
diff
changeset
|
329 IMAGE_NAME = 'schematics/missiles' |
151
372d886f9e70
New suggest_research() method on Lab.
Jeremy Thurgood <firxen@gmail.com>
parents:
148
diff
changeset
|
330 CATEGORIES = (cat.COUNTERMEASURE,) |
372d886f9e70
New suggest_research() method on Lab.
Jeremy Thurgood <firxen@gmail.com>
parents:
148
diff
changeset
|
331 PREREQUISITES = ( |
372d886f9e70
New suggest_research() method on Lab.
Jeremy Thurgood <firxen@gmail.com>
parents:
148
diff
changeset
|
332 (research.Electrickery, 5), |
372d886f9e70
New suggest_research() method on Lab.
Jeremy Thurgood <firxen@gmail.com>
parents:
148
diff
changeset
|
333 (research.Rocketry, 2), |
372d886f9e70
New suggest_research() method on Lab.
Jeremy Thurgood <firxen@gmail.com>
parents:
148
diff
changeset
|
334 ) |
372d886f9e70
New suggest_research() method on Lab.
Jeremy Thurgood <firxen@gmail.com>
parents:
148
diff
changeset
|
335 |
372d886f9e70
New suggest_research() method on Lab.
Jeremy Thurgood <firxen@gmail.com>
parents:
148
diff
changeset
|
336 |
148 | 337 class DoomsdayVirus(Schematic): |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
338 NAME = "Doomsday virus" |
148 | 339 COST = 100 * K |
340 CATEGORIES = (cat.DOOMSDAY_DEVICE, cat.PATHOGEN) | |
214
d378459567bb
Hook up a bunch of icons
Neil Muller <drnlmuller@gmail.com>
parents:
208
diff
changeset
|
341 IMAGE_NAME = "schematics/pathogen" |
148 | 342 PREREQUISITES = ( |
343 (research.Biogenetics, 5), | |
344 ) | |
345 | |
346 BASE_POWER = 1000 | |
347 POWER_INCREMENT = 500 | |
348 | |
349 PRODUCTION_RELIABILITY = 0.6 | |
350 | |
238
837c51ebdbc8
failure text for doomsday virus
Neil Muller <drnlmuller@gmail.com>
parents:
216
diff
changeset
|
351 FAILURE_TEXT = ( |
837c51ebdbc8
failure text for doomsday virus
Neil Muller <drnlmuller@gmail.com>
parents:
216
diff
changeset
|
352 "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
|
353 " constructing the virus, and that this will never work." |
837c51ebdbc8
failure text for doomsday virus
Neil Muller <drnlmuller@gmail.com>
parents:
216
diff
changeset
|
354 " You return to the lab to fix the problem.") |
837c51ebdbc8
failure text for doomsday virus
Neil Muller <drnlmuller@gmail.com>
parents:
216
diff
changeset
|
355 |
148 | 356 |
357 class GiantRobot(Schematic): | |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
358 NAME = "Giant robot" |
148 | 359 COST = int(1.5 * M) |
360 CATEGORIES = (cat.DOOMSDAY_DEVICE, cat.AI) | |
254
2c684fade3af
Fill in more schematic icons
Neil Muller <drnlmuller@gmail.com>
parents:
238
diff
changeset
|
361 IMAGE_NAME = 'schematics/robot' |
148 | 362 PREREQUISITES = ( |
363 (research.Robotics, 15), | |
364 (research.ArtificialIntelligence, 10), | |
365 ) | |
366 | |
367 BASE_POWER = 700 | |
368 POWER_INCREMENT = 300 | |
369 | |
370 PRODUCTION_RELIABILITY = 0.7 | |
371 | |
372 | |
373 class OrbitalLaserPlatform(Schematic): | |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
374 NAME = "Orbital laser platform" |
148 | 375 COST = 10 * M |
191
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
376 CATEGORIES = (cat.DOOMSDAY_DEVICE, cat.SPACE) |
214
d378459567bb
Hook up a bunch of icons
Neil Muller <drnlmuller@gmail.com>
parents:
208
diff
changeset
|
377 IMAGE_NAME = "schematics/doomsdaydevice" |
148 | 378 PREREQUISITES = ( |
379 (SpySatellite, 3), | |
380 (research.Lasers, 15), | |
381 (research.Space, 5), | |
382 ) | |
383 | |
384 BASE_POWER = 1500 | |
385 POWER_INCREMENT = 200 | |
191
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
386 |
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
387 |
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
388 class WeatherControlStation(Schematic): |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
389 NAME = "Weather control station" |
191
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
390 COST = 15 * M |
198 | 391 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
|
392 IMAGE_NAME = "schematics/weathermachine" |
191
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
393 PREREQUISITES = ( |
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
394 (SpySatellite, 3), |
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
395 (research.Lasers, 5), |
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
396 (research.Space, 8), |
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
397 (research.Meteorology, 15), |
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
398 ) |
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
399 |
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
400 BASE_POWER = 2200 |
0b746c72cb5b
Weather control station.
Jeremy Thurgood <firxen@gmail.com>
parents:
190
diff
changeset
|
401 POWER_INCREMENT = 150 |
203 | 402 |
403 | |
404 class Android(Schematic): | |
216
ec97f80feae0
Capitilize schmatic names
Neil Muller <drnlmuller@gmail.com>
parents:
214
diff
changeset
|
405 NAME = "Lifelike android" |
203 | 406 COST = 50 * K |
208 | 407 CATEGORIES = (cat.INTELLIGENCE, cat.AI, cat.CLONE) |
203 | 408 PREREQUISITES = ( |
409 (research.ArtificialIntelligence, 5), | |
410 (research.Robotics, 5), | |
411 ) | |
254
2c684fade3af
Fill in more schematic icons
Neil Muller <drnlmuller@gmail.com>
parents:
238
diff
changeset
|
412 IMAGE_NAME = 'schematics/robot' |
203 | 413 |
414 BASE_POWER = 10 | |
415 POWER_INCREMENT = 1 | |
416 | |
417 PRODUCTION_RELIABILITY = 0.6 | |
418 | |
419 FAILURE_TEXT = ( | |
420 "The sudden stuttering speech and sparks from the joints are the first" | |
421 " signs that things have gone horribly wrong. The ensuing explosion" | |
422 " of the android is merely the inevitable conclusion of the diaster.") |