mirror of
https://github.com/rr-/pq-cli.git
synced 2026-11-12 22:40:36 -07:00
mechanic: clump stat gains on prime stats only
This commit is contained in:
5 files changed
+2864
-2869
No files matched your search
+3
-3
@@ -398,12 +398,12 @@ class Player(SignalMixin):
|
||||
chosen_stat = random.choice(list(StatType))
|
||||
else:
|
||||
# favor the best stat so it will tend to clump
|
||||
t = sum(value**2 for _stat, value in self.stats)
|
||||
t = sum(self.stats[stat] ** 2 for stat in PRIME_STATS)
|
||||
t = random.below(t)
|
||||
chosen_stat = None
|
||||
for stat, value in self.stats:
|
||||
for stat in PRIME_STATS:
|
||||
chosen_stat = stat
|
||||
t -= value**2
|
||||
t -= self.stats[stat] ** 2
|
||||
if t < 0:
|
||||
break
|
||||
|
||||
|
||||
Reference in new issue
Block a user