* Win condition
* Battery and light power consts
* Mould resistances
-* Mould power increases to prevent farming
+* Mould power increases to prevent farming (partially implemented, needs balancing)
* Save game
* More sounds
* Five levels
* Sunrise transition screen
* 'End the Day' button
+* Seralize light on / off and colour selection state across day / night transition
+* 'Dawn breaks' transition screen
Done
====
MAX_ELEMENTS = 400
MAX_HEALTH = 100
+# Increase in health per day
+DAY_HEALTH = 10
+
+HEAL_FACTOR = 1
+
MOULD_STAGES = [15, 25]
self._eyeball = loader.load_image("32", name)
return self._eyeball
+ def set_health(self, new_health):
+ self._health = new_health
+
def tick(self, gamestate, space, moulds):
"""Grow and / or Die"""
# we regain a health every tick, so we heal in the dark
if self._health < MAX_HEALTH:
- self._health += 1
+ self._health += HEAL_FACTOR
refresh = False
self._moulds = []
for position in gamestate.get_spawn_positions():
seed = Mould(gamestate, space, position)
+ seed.set_health(MAX_HEALTH + gamestate.days * DAY_HEALTH)
self._moulds.append(seed)
self._image = pygame.surface.Surface(SCREEN_SIZE)
self._image = self._image.convert_alpha(pygame.display.get_surface())
}
self.harvested = 0
self.eaten = 0
+ self.days = 0
@property
def station(self):
self._min_radius = value or 0.0
def reaches(self, position):
- distance = self.position.get_distance(self.position)
+ distance = self.position.get_distance(position)
return (self._min_radius <= distance <= self._max_radius)
def _set_radius_limits(self, radius_limits):
self._lights.tick()
def _update_toolbar(self, gamestate):
- text = ("Turnip Stocks: Seeds: %d. Planted: %d. "
+ text = ("Day: %d: Turnip Stocks: Seeds: %d. Planted: %d. "
"Harvested: %d. Destroyed: %d" %
- (self._seeds, len(self._turnips),
+ (gamestate.days, self._seeds, len(self._turnips),
self._harvested, gamestate.eaten))
self._toolbar = self._toolbar_font.render(text, True, (255, 255, 255))
def exit(self, gamestate):
turnip_data = [turnip.serialize() for turnip in self._turnips]
gamestate.turnips = turnip_data
+ gamestate.days += 1