world.roaches.append(build_roach(world))
self._vehicle_changed()
+ @defer_to_update
+ def _gain_item(self, world, item):
+ if item.item_type == "serum":
+ world.serums.append(item.item_data["serum"])
+ elif item.item_type == "weapon":
+ world.weapons.current = item.item_data["weapon"]
+ self._vehicle_changed()
+
@defer_to_update
def _change_vehicle(self, world):
vehicle = Vehicle.random()
item = self._level.item_at(x, y)
self._level.remove_item(item)
self._items.remove(item)
+ self._gain_item(item)
elif self._level.is_exit(x, y):
next_level = self._level.get_exit_level()
return [
state["roaches"] = [
build_roach(self, "roupert"),
]
- state["serums"] = [
- "smart", "strong", "fast",
- ]
+ state["serums"] = []
state["vehicles"] = {
"current": "walking",
"walking": {