def appraise(self, song): roll = sim.filter_nv(0.5, 0.153) * (1 + self.sense) if roll >= 0.95: return song.quality else: fail_margin = 0.95 - roll return sim.filter_nv(song.quality, fail_margin / 3)
def population_template(self): stats = { 'charisma': random(), 'sense': random(), 'intelligence': random(), 'talent': sim.filter_nv(0, 2 / 3), 'style': (sim.filter_nv(0.5, 1 / 6), sim.filter_nv(0.5, 1 / 6)), 'pickiness': sim.filter_nv(0.8, 1 / 3), 'sharer': random(), } return stats