mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-22 10:54:19 -04:00
Legalism now works!
This commit is contained in:
parent
9dad8908d6
commit
439efd7a40
@ -94,10 +94,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"The Oracle",
|
name:"The Oracle",
|
||||||
description: "Provides a free social policy - todo",
|
description: "Provides a free social policy",
|
||||||
culture:3,
|
culture:3,
|
||||||
greatPersonPoints:{science:1},
|
greatPersonPoints:{science:1},
|
||||||
isWonder:true,
|
isWonder:true,
|
||||||
|
unique:"FreeSocialPolicy",
|
||||||
requiredTech:"Philosophy"
|
requiredTech:"Philosophy"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -456,7 +457,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Medical Lab",
|
name:"Medical Lab",
|
||||||
description: "25% of food carried over after a new citizen is born - todo",
|
description: "25% of food carried over after a new citizen is born",
|
||||||
requiredBuilding:"Hospital",
|
requiredBuilding:"Hospital",
|
||||||
maintainance:3,
|
maintainance:3,
|
||||||
requiredTech:"Penicillin"
|
requiredTech:"Penicillin"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
[
|
[
|
||||||
{
|
{
|
||||||
name:"Tradition",
|
name:"Tradition",
|
||||||
description:"+3 culture in capital and increased rate of border expansion (how much?)",
|
description:"+3 culture in capital and increased rate of border expansion",
|
||||||
policies:[
|
policies:[
|
||||||
{
|
{
|
||||||
name:"Aristocracy",
|
name:"Aristocracy",
|
||||||
@ -11,7 +11,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Legalism",
|
name:"Legalism",
|
||||||
description:"Free culture building in your first 4 cities - todo",
|
description:"Free culture building in your first 4 cities",
|
||||||
row:1,
|
row:1,
|
||||||
column:3
|
column:3
|
||||||
},
|
},
|
||||||
@ -114,7 +114,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Free Religion",
|
name:"Free Religion",
|
||||||
description:"+1 culture for each monument, temple and monastery. Gain a free policy - TODO.",
|
description:"+1 culture for each monument, temple and monastery. Gain a free policy.",
|
||||||
requires:["Mandate of Heaven","Reformation"]
|
requires:["Mandate of Heaven","Reformation"]
|
||||||
row:3,
|
row:3,
|
||||||
column:4
|
column:4
|
||||||
|
@ -185,4 +185,15 @@ public class CityConstructions
|
|||||||
if(currentConstruction.equals("Science") || currentConstruction.equals("Gold")) return "";
|
if(currentConstruction.equals("Science") || currentConstruction.equals("Gold")) return "";
|
||||||
return " ("+ workDone(currentConstruction) + "/"+ getCurrentConstruction().getProductionCost()+")";
|
return " ("+ workDone(currentConstruction) + "/"+ getCurrentConstruction().getProductionCost()+")";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void addCultureBuilding() {
|
||||||
|
for (String string : new LinqCollection<String>("Monument","Temple","Opera House","Museum")){
|
||||||
|
if(!builtBuildings.contains(string)){
|
||||||
|
builtBuildings.add(string);
|
||||||
|
if(currentConstruction.equals(string))
|
||||||
|
chooseNextConstruction();
|
||||||
|
break;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
@ -61,6 +61,7 @@ public class CityInfo {
|
|||||||
this.cityLocation = cityLocation;
|
this.cityLocation = cityLocation;
|
||||||
civInfo.cities.add(this);
|
civInfo.cities.add(this);
|
||||||
cityConstructions = new CityConstructions(this);
|
cityConstructions = new CityConstructions(this);
|
||||||
|
if(civInfo.policies.contains("Legalism") && civInfo.cities.size() <= 4) cityConstructions.addCultureBuilding();
|
||||||
if(civInfo.cities.size()==1) {
|
if(civInfo.cities.size()==1) {
|
||||||
cityConstructions.builtBuildings.add("Palace");
|
cityConstructions.builtBuildings.add("Palace");
|
||||||
cityConstructions.currentConstruction = "Worker"; // Default for first city only!
|
cityConstructions.currentConstruction = "Worker"; // Default for first city only!
|
||||||
|
@ -10,6 +10,7 @@ import com.badlogic.gdx.scenes.scene2d.ui.Table;
|
|||||||
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
import com.badlogic.gdx.scenes.scene2d.ui.TextButton;
|
||||||
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
import com.badlogic.gdx.scenes.scene2d.utils.ClickListener;
|
||||||
import com.badlogic.gdx.utils.Predicate;
|
import com.badlogic.gdx.utils.Predicate;
|
||||||
|
import com.unciv.civinfo.CityInfo;
|
||||||
import com.unciv.civinfo.CivilizationInfo;
|
import com.unciv.civinfo.CivilizationInfo;
|
||||||
import com.unciv.game.UnCivGame;
|
import com.unciv.game.UnCivGame;
|
||||||
import com.unciv.game.utils.ImageGetter;
|
import com.unciv.game.utils.ImageGetter;
|
||||||
@ -63,6 +64,10 @@ public class PolicyPickerScreen extends PickerScreen {
|
|||||||
if (pickedPolicy.name.equals("Scientific Revolution"))
|
if (pickedPolicy.name.equals("Scientific Revolution"))
|
||||||
CivilizationInfo.current().tech.freeTechs+=2;
|
CivilizationInfo.current().tech.freeTechs+=2;
|
||||||
|
|
||||||
|
if (pickedPolicy.name.equals("Legalism"))
|
||||||
|
for (CityInfo city : game.civInfo.cities.subList(0,4))
|
||||||
|
city.cityConstructions.addCultureBuilding();
|
||||||
|
|
||||||
if (pickedPolicy.name.equals("Free Religion"))
|
if (pickedPolicy.name.equals("Free Religion"))
|
||||||
CivilizationInfo.current().freePolicies++;
|
CivilizationInfo.current().freePolicies++;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user