Permalink
Browse files

Fix AI calculation for self-sustaining species

  • Loading branch information...
Morlic-fo committed Jun 25, 2017
1 parent ab25d21 commit 85776ff14885e93262fdf8e07e5154ab6c829a57
Showing with 4 additions and 6 deletions.
  1. +4 −6 default/python/AI/ColonisationAI.py
@@ -82,12 +82,6 @@ def calc_max_pop(planet, species, detail):
# first, account for the environment
environment_mod = POP_SIZE_MOD_MAP_MODIFIED_BY_SPECIES["environment_bonus"][planet_env]
detail.append("Base environment: %d" % environment_mod)
if "SELF_SUSTAINING" in tag_list:
# self-sustaining species get twice the environment bonus/penalty
environment_mod *= 2
detail.append("SelfSustaining: Twice the environment effect")
detail.append("Final environment PSM_early: %d" % environment_mod)
pop_size_mod_modified_by_species += environment_mod
# find all applicable modifiers
@@ -123,6 +117,10 @@ def calc_max_pop(planet, species, detail):
pop_size_mod_not_modified_by_species += 3
detail.append("Gaia_PSM_late(3)")
if "SELF_SUSTAINING" in tag_list:
pop_size_mod_not_modified_by_species += 3
detail.append("SelfSustaining_PSM_late(3)")
applicable_boosts = set()
for this_tag in [tag for tag in tag_list if tag in AIDependencies.metabolismBoostMap]:
metab_boosts = AIDependencies.metabolismBoostMap.get(this_tag, [])

0 comments on commit 85776ff

Please sign in to comment.