Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
49ae1125d3 | ||
|
df01d7397c | ||
|
ccc08316fe | ||
|
43333db825 | ||
|
c6aed375da | ||
|
1fffd41783 |
@ -81,7 +81,7 @@ class DataManager(object):
|
||||
|
||||
def check_plant(self):
|
||||
# check for existing save file
|
||||
if os.path.isfile(self.savefile_path):
|
||||
if os.path.isfile(self.savefile_path) and os.path.getsize(self.savefile_path) > 0:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
@ -564,7 +564,7 @@ class CursedMenu(object):
|
||||
# get plant description before printing
|
||||
output_string = self.get_plant_description(this_plant)
|
||||
growth_multiplier = 1 + (0.2 * (this_plant.generation-1))
|
||||
output_string += "Generation: {}\nGrowth rate: {}x".format(self.plant.generation, growth_multiplier)
|
||||
output_string += "Generation: {}\nGrowth rate: {:.1f}x".format(self.plant.generation, growth_multiplier)
|
||||
self.draw_info_text(output_string)
|
||||
self.infotoggle = 1
|
||||
else:
|
||||
|
2
plant.py
2
plant.py
@ -164,7 +164,7 @@ class Plant:
|
||||
def rarity_check(self):
|
||||
# Generate plant rarity
|
||||
CONST_RARITY_MAX = 256.0
|
||||
rare_seed = random.randint(1,CONST_RARITY_MAX)
|
||||
rare_seed = random.randint(1,int(CONST_RARITY_MAX))
|
||||
common_range = round((2.0/3)*CONST_RARITY_MAX)
|
||||
uncommon_range = round((2.0/3)*(CONST_RARITY_MAX-common_range))
|
||||
rare_range = round((2.0/3)*(CONST_RARITY_MAX-common_range-uncommon_range))
|
||||
|
Loading…
x
Reference in New Issue
Block a user