Skip to content

Commit

Permalink
*A fix to Mines Sitreps,
Browse files Browse the repository at this point in the history
*a fix/adjustment to Concentration Camps so that production does not remain artificially boosted after CC is scrapped, also adds lingering negative effect on population,
* an AI adjustment

svn path=/trunk/FreeOrion/; revision=5854
  • Loading branch information
Dilvish-fo committed Mar 12, 2013
1 parent 7ff406f commit e677939
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 15 deletions.
8 changes: 4 additions & 4 deletions default/AI/ProductionAI.py
Expand Up @@ -1107,17 +1107,17 @@ def generateProductionOrders():
tInd=planet.currentMeterValue(fo.meterType.targetIndustry)
cInd=planet.currentMeterValue(fo.meterType.industry)
cPop = planet.currentMeterValue(fo.meterType.population)
if (cPop < 18 ) or cPop < 0.75*tPop: #check even if not aggressive, etc, just in case acquired planet with a ConcCamp on it
if (cPop < 23) or cPop < 0.7*tPop: #check even if not aggressive, etc, just in case acquired planet with a ConcCamp on it
for bldg in planet.buildingIDs:
if universe.getObject(bldg).buildingTypeName == bldName:
res=fo.issueScrapOrder( bldg)
print "Tried scrapping %s at planet %s, got result %d"%(bldName, planet.name, res)
elif foAI.foAIstate.aggression>fo.aggression.typical and empire.buildingTypeAvailable(bldName) and (tPop >= 25) and ((empire.empireID+pid)%3 == 0):
elif foAI.foAIstate.aggression>fo.aggression.typical and empire.buildingTypeAvailable(bldName) and (tPop >= 32) and ((empire.empireID+pid)%3 == 0):
queuedBldLocs = [element.locationID for element in productionQueue if (element.name==bldName) ]
if (cPop >=0.95*tPop) and cInd < 1.5* tInd:
if pid not in queuedBldLocs and bldType.canBeProduced(empire.empireID, pid):#TODO: verify that canBeProduced() checks for prexistence of a barring building
if planet.focus in [ EnumsAI.AIFocusType.FOCUS_INDUSTRY, EnumsAI.AIFocusType.FOCUS_MINING ]:
fo.issueChangeFocusOrder(pid, EnumsAI.AIFocusType.FOCUS_RESEARCH)
#if planet.focus not in [ EnumsAI.AIFocusType.FOCUS_INDUSTRY ]:
# fo.issueChangeFocusOrder(pid, EnumsAI.AIFocusType.FOCUS_INDUSTRY)
res=fo.issueEnqueueBuildingProductionOrder(bldName, pid)
print "Enqueueing %s at planet %d (%s) , with result %d"%(bldName, pid, universe.getPlanet(pid).name, res)
if res:
Expand Down
8 changes: 4 additions & 4 deletions default/AI/TechsListsAI.py
Expand Up @@ -252,13 +252,14 @@ def primaryMetaTechsList(index=0):
"PRO_ROBOTIC_PROD",
"PRO_FUSION_GEN",
"PRO_ORBITAL_GEN",
"GRO_GENETIC_ENG",
"GRO_XENO_GENETICS",
"CON_ORBITAL_CON",
"SPY_DETECT_2",
"DEF_DEFENSE_NET_2",
"LRN_GRAVITONICS",
"SHP_WEAPON_7",
"CON_METRO_INFRA",
"GRO_GENETIC_ENG",
"CON_SUBTER_CONST",
"SHP_MULTICELL_CAST",
"SHP_ENDOCRINE_SYSTEMS",
Expand Down Expand Up @@ -287,7 +288,6 @@ def primaryMetaTechsList(index=0):
"SHP_CONT_SYMB",
"SHP_MONOCELL_EXP",
"SHP_ENDOSYMB_HULL",
"GRO_XENO_GENETICS",
"PRO_SINGULAR_GEN",
"LRN_XENOARCH",
"SHP_WEAPON_9",
Expand Down Expand Up @@ -359,10 +359,11 @@ def primaryMetaTechsList(index=0):
"PRO_ROBOTIC_PROD",
"SHP_WEAPON_6",
"PRO_ORBITAL_GEN",
"GRO_GENETIC_ENG",
"GRO_XENO_GENETICS",
"DEF_DEFENSE_NET_2",
"DEF_PLAN_BARRIER_SHLD_1",
"SPY_DETECT_2",
"GRO_GENETIC_ENG",
"SHP_MULTICELL_CAST",
"CON_ORBITAL_CON",
"SHP_WEAPON_7",
Expand Down Expand Up @@ -390,7 +391,6 @@ def primaryMetaTechsList(index=0):
"DEF_GARRISON_3",
"SHP_WEAPON_8",
"PRO_INDUSTRY_CENTER_II",
"GRO_XENO_GENETICS",
"SHP_CONT_SYMB",
"SHP_MONOCELL_EXP",
"SHP_ENDOSYMB_HULL",
Expand Down
28 changes: 24 additions & 4 deletions default/buildings.txt
Expand Up @@ -877,15 +877,35 @@ BuildingType
OwnedBy TheEmpire Source.Owner
PopulationCenter
]
effects = SetTargetIndustry Value + Target.Population * 10 * [[INDUSTRY_PER_POP]]
EffectsGroup
scope = And [
Contains Source
PopulationCenter
]
activation = ContainedBy And [
OwnedBy TheEmpire Source.Owner
PopulationCenter
Not HasSpecial "CONC_CAMP_MASTER_SPECIAL"
]
effects = AddSpecial "CONC_CAMP_MASTER_SPECIAL"
EffectsGroup
scope = And [
Contains Source
PopulationCenter
]
activation = ContainedBy And [
OwnedBy TheEmpire Source.Owner
PopulationCenter
HasSpecial "CONC_CAMP_MASTER_SPECIAL"
]
effects = [
SetPopulation Target.Population - max(0, Target.NextTurnPopGrowth) - 3
SetTargetIndustry Value + Target.Population * 10 * [[INDUSTRY_PER_POP]]
SetPopulation Target.Population - max(0, Target.NextTurnPopGrowth) - 3*(1+(Target.Population/50)-(2*(1-Target.Population/50)*(1-Target.Population/50)))
SetIndustry Target.TargetIndustry
]

EffectsGroup
scope = Source
activation = Not OwnedBy TheEmpire Source.Owner
activation = Not ProducedByEmpire Source.Owner
effects = Destroy
]
icon = "icons/building/concentration-camp.png"
Expand Down
16 changes: 13 additions & 3 deletions default/eng_stringtable.txt
Expand Up @@ -4437,6 +4437,16 @@ Juggernaut Nest
JUGGERNAUT_NEST_SPECIAL_DESC
At some point young juggernauts will rise from this place. With the proper tech, these mega-fauna could be domesticated.

CONC_CAMP_MASTER_SPECIAL
Pall of Death
CONC_CAMP_MASTER_SPECIAL_DESC
A visitor may not see [[buildingtype BLD_CONC_CAMP]] operating on this planet, but they have been operating relentlessly and exact a harsh toll on the population; a Pall of Death can be discerned by sensitive beings.

CONC_CAMP_SLAVE_SPECIAL
Psychic Fatigue
CONC_CAMP_SLAVE_SPECIAL_DESC
There may no longer be [[buildingtype BLD_CONC_CAMP]] operating on this planet today, but memories are still close to the surface, and remnants such as poorly hidden mass graves are still occasionally found. A psychic wound still lies upon the populace, and they do not thrive.

CLOUD_COVER_MASTER_SPECIAL
Cloud Spawns
CLOUD_COVER_MASTER_SPECIAL_DESC
Expand Down Expand Up @@ -6507,7 +6517,7 @@ CON_CONC_CAMP
Concentration Camps

CON_CONC_CAMP_DESC
Typically, when forced to work to death, citizens will put up some resistance and have the sympathy and support of outside observers. However, by carefully creating buildings designed to quench the fire of justice within outsiders, and to promote feelings of worthlessness and subservience in those on the inside, concentration camps can be effectively utilized without fear of revolt.
Typically, when forced to work to death, citizens will put up some resistance and have the sympathy and support of outside observers. However, by carefully creating buildings designed to quench the fire of justice within outsiders, and to promote feelings of worthlessness and subservience in those on the inside, concentration camps can be effectively utilized without fear of revolt. Such camps may have longer lasting negative effects than anticipated.

CON_FRC_ENRG_CAMO
Force-Energy Camouflage
Expand Down Expand Up @@ -7550,9 +7560,9 @@ BLD_CONC_CAMP
Concentration Camps

BLD_CONC_CAMP_DESC
'''Decreases the planet's population at a rate of 3 per turn, and increases target [[encyclopedia INDUSTRY_TITLE]] by 5 times the planet's population.
'''Decreases the planet's population at a rate of roughly 3 per turn, and increases target [[encyclopedia INDUSTRY_TITLE]] by twice the planet's population.

Ridding a planet of an undesirable species allows the introduction of a more suited species. By creating a planet-wide network of concentration camps designed to work the citizens to death, this goal can be achieved quickly and efficiently. This building can be built on an outpost.'''
Ridding a planet of an undesirable species allows the introduction of a more suited species. By creating a planet-wide network of concentration camps designed to work the citizens to death, this goal can be achieved quickly and efficiently. Malignant effects may linger longer than anticipated, however. This building can be built on an outpost.'''

BLD_BLACK_HOLE_POW_GEN
Black Hole Power Generator
Expand Down
33 changes: 33 additions & 0 deletions default/specials.txt
Expand Up @@ -652,6 +652,39 @@ Special

graphic = "icons/specials_huge/juggernaut-nest.png"

Special
name = "CONC_CAMP_MASTER_SPECIAL"
description = "CONC_CAMP_MASTER_SPECIAL_DESC"
spawnrate = 0.0
effectsgroups =
EffectsGroup
scope = Source
activation = Not Contains Building "BLD_CONC_CAMP"
effects = [
AddSpecial "CONC_CAMP_SLAVE_SPECIAL"
RemoveSpecial "CONC_CAMP_MASTER_SPECIAL"
]
graphic = "icons/building/concentration-camp.png"

Special
name = "CONC_CAMP_SLAVE_SPECIAL"
description = "CONC_CAMP_SLAVE_SPECIAL_DESC"
spawnrate = 0.0
effectsgroups = [
EffectsGroup
scope = Source
effects = SetPopulation Target.Population - max(0, Target.NextTurnPopGrowth) -2*(1+(Target.Population/50)-(2*(1-Target.Population/50)*(1-Target.Population/50)))
EffectsGroup
scope = Source
activation = Industry low = Source.TargetIndustry + Source.Population * 10 * [[INDUSTRY_PER_POP]] - 2
effects = SetIndustry Value - Target.Population * 10 * [[INDUSTRY_PER_POP]]
EffectsGroup
scope = Source
activation = Random probability = 0.125
effects = RemoveSpecial "CONC_CAMP_SLAVE_SPECIAL"
]
graphic = "icons/building/concentration-camp.png"

Special
name = "CLOUD_COVER_MASTER_SPECIAL"
description = "CLOUD_COVER_MASTER_SPECIAL_DESC"
Expand Down
6 changes: 6 additions & 0 deletions default/techs.txt
Expand Up @@ -312,6 +312,7 @@ Tech
tag = "rawtext" data = "2"
tag = "system" data = Target.SystemID
]
empire = Target.Owner
]
EffectsGroup
scope = And [
Expand All @@ -333,6 +334,7 @@ Tech
tag = "ship" data = Target.ID
tag = "system" data = Target.SystemID
]
empire = Target.Owner
Destroy
]
]
Expand Down Expand Up @@ -378,6 +380,7 @@ Tech
tag = "rawtext" data = "6"
tag = "system" data = Target.SystemID
]
empire = Target.Owner
]
EffectsGroup
scope = And [
Expand All @@ -399,6 +402,7 @@ Tech
tag = "ship" data = Target.ID
tag = "system" data = Target.SystemID
]
empire = Target.Owner
Destroy
]
]
Expand Down Expand Up @@ -442,6 +446,7 @@ Tech
tag = "rawtext" data = "14"
tag = "system" data = Target.SystemID
]
empire = Target.Owner
]
EffectsGroup
scope = And [
Expand All @@ -462,6 +467,7 @@ Tech
tag = "ship" data = Target.ID
tag = "system" data = Target.SystemID
]
empire = Target.Owner
Destroy
]
]
Expand Down

0 comments on commit e677939

Please sign in to comment.