Skip to content

Commit

Permalink
reworked the previous change to Evacuation Conc Camps so as to use (x…
Browse files Browse the repository at this point in the history
…)^y so that the dedicated functions SqrRoot and Squared would not be needed

svn path=/trunk/FreeOrion/; revision=6096
  • Loading branch information
Dilvish-fo committed Jun 1, 2013
1 parent 66048aa commit 4f54c55
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions default/buildings.txt
Expand Up @@ -957,7 +957,7 @@ BuildingType
HasSpecial "CONC_CAMP_MASTER_SPECIAL"
]
effects = [
SetPopulation Value + 0.5*(101+Target.TargetPopulation-2*Value - SqrRoot(Squared(101+Target.TargetPopulation-2*Value)-4*(Value*(Value-1-Target.TargetPopulation)-3*100)))
SetPopulation Value + 0.5*(101+Target.TargetPopulation-2*Value - ((101+Target.TargetPopulation-2*Value)^2 -4*(Value*(Value-1-Target.TargetPopulation)-3*100))^0.5)
SetIndustry Target.TargetIndustry
]
EffectsGroup
Expand Down Expand Up @@ -1439,7 +1439,9 @@ BuildingType
PopulationCenter
]
effects = [ //complicated population formula necessary to actually peg pop reduction at -2, not just 2 less growth than it would have been
SetPopulation Value + 0.5*(101+Target.TargetPopulation-2*Value - SqrRoot(Squared(101+Target.TargetPopulation-2*Value)-4*(Value*(Value-1-Target.TargetPopulation)-2*100)))
// the fixed amount for pop change per turn is 'k' towards the end of the comment line immediately below, which is 2 in the functional line that follows it
//SetPopulation Value + 0.5*(101+Target.TargetPopulation-2*Value - ((101+Target.TargetPopulation-2*Value)^2 -4*(Value*(Value-1-Target.TargetPopulation)-k*100))^0.5)
SetPopulation Value + 0.5*(101+Target.TargetPopulation-2*Value - ((101+Target.TargetPopulation-2*Value)^2 -4*(Value*(Value-1-Target.TargetPopulation)-2*100))^0.5)
SetIndustry Value = 0
SetTargetIndustry Value = 0
SetResearch Value = 0
Expand Down
2 changes: 1 addition & 1 deletion default/specials.txt
Expand Up @@ -706,7 +706,7 @@ Special
effectsgroups = [
EffectsGroup
scope = Source
SetPopulation Value + 0.5*(101+Target.TargetPopulation-2*Value - SqrRoot(Squared(101+Target.TargetPopulation-2*Value)-4*(Value*(Value-1-Target.TargetPopulation)-2*100)))
SetPopulation Value + 0.5*(101+Target.TargetPopulation-2*Value - ((101+Target.TargetPopulation-2*Value)^2 -4*(Value*(Value-1-Target.TargetPopulation)-2*100))^0.5)
EffectsGroup
scope = Source
activation = Industry low = Source.TargetIndustry + Source.Population * 10 * [[INDUSTRY_PER_POP]] - 2
Expand Down

0 comments on commit 4f54c55

Please sign in to comment.