mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-30 14:48:56 +07:00
Split buildings and units to 2 separate files and types - both are now IConstruction, and cityBuildings has been changed to cityConstructions will all that entails
This commit is contained in:
@ -1,19 +1,5 @@
|
||||
[
|
||||
|
||||
{
|
||||
name:"Worker",
|
||||
description: "Can build improvements on tiles",
|
||||
hurryCostModifier:20
|
||||
cost:60
|
||||
},
|
||||
{
|
||||
name:"Settler",
|
||||
description: "Founds a new city",
|
||||
cost:106,
|
||||
hurryCostModifier:20
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
name:"Palace",
|
||||
description: "Indicates that this city is the capital",
|
||||
@ -52,6 +38,25 @@
|
||||
hurryCostModifier:25,
|
||||
requiredTech:"Calendar"
|
||||
},
|
||||
{
|
||||
name:"Stonehenge",
|
||||
description: "",
|
||||
culture:6,
|
||||
isWonder:true,
|
||||
greatPersonPoints:{production:1},
|
||||
requiredTech:"Calendar"
|
||||
},
|
||||
{
|
||||
name:"The Great Library",
|
||||
description: "Provides a free technology, and a library in the city it is built in",
|
||||
science:3,
|
||||
culture:1,
|
||||
greatPersonPoints:{science:1},
|
||||
isWonder:true,
|
||||
providesFreeBuilding: "Library",
|
||||
freeTechs:1,
|
||||
requiredTech:"Writing"
|
||||
},
|
||||
{
|
||||
name:"Library",
|
||||
description: "Adds 1 science for each 2 population in the city.",
|
||||
@ -69,27 +74,26 @@
|
||||
requiredTech:"Trapping"
|
||||
},
|
||||
{
|
||||
name:"Great Library",
|
||||
description: "Provides a free technology, and a library in the city it is built in",
|
||||
science:3,
|
||||
name:"The Pyramids",
|
||||
description: "Worker construction increased 25%, provides 2 free workers",
|
||||
culture:1,
|
||||
greatPersonPoints:{production:1},
|
||||
isWonder:true,
|
||||
providesFreeBuilding: "Library",
|
||||
freeTechs:1,
|
||||
unique:"WorkerConstruction",
|
||||
requiredTech:"Writing"
|
||||
},
|
||||
|
||||
{
|
||||
name:"Temple",
|
||||
description: "",
|
||||
culture:3,
|
||||
specialistSlots:{culture:1},
|
||||
requiredBuilding:"Monument",
|
||||
maintainance:2,
|
||||
hurryCostModifier:25,
|
||||
requiredTech:"Philosophy"
|
||||
},
|
||||
{
|
||||
name:"Oracle",
|
||||
name:"The Oracle",
|
||||
description: "Provides a free social policy - todo",
|
||||
culture:3,
|
||||
isWonder:true,
|
||||
@ -143,10 +147,20 @@
|
||||
name:"Market",
|
||||
description: "",
|
||||
gold:2,
|
||||
specialistSlots:{gold:1},
|
||||
hurryCostModifier:25,
|
||||
percentStatBonus:{gold:25},
|
||||
requiredTech:"Currency"
|
||||
},
|
||||
},
|
||||
{
|
||||
name:"Monastery",
|
||||
description: "",
|
||||
maintainance:0,
|
||||
requiredNearbyImprovedResources:["Wine","Incense"],
|
||||
resourceBonusStats:{culture:2},
|
||||
hurryCostModifier:25,
|
||||
requiredTech:"Theology"
|
||||
},
|
||||
{
|
||||
name:"Notre Dame",
|
||||
description: "",
|
||||
@ -185,7 +199,6 @@
|
||||
name:"Aqueduct",
|
||||
description: "40% of food is carried over after a new citizen is born",
|
||||
maintainance:1,
|
||||
food:2,
|
||||
hurryCostModifier:25,
|
||||
unique:"FoodCarriesOver"
|
||||
requiredTech:"Engineering"
|
||||
@ -195,6 +208,7 @@
|
||||
description: "",
|
||||
maintainance:2,
|
||||
production:2,
|
||||
specialistSlots:{production:1},
|
||||
hurryCostModifier:25,
|
||||
percentStatBonus:{production:15},
|
||||
requiredTech:"Metal Casting"
|
||||
@ -214,6 +228,7 @@
|
||||
maintainance:2,
|
||||
hurryCostModifier:15,
|
||||
percentStatBonus:{science:33},
|
||||
specialistSlots:{science:2},
|
||||
requiredBuilding:"Library",
|
||||
unique:"JunglesProvideScience",
|
||||
requiredTech:"Education"
|
||||
@ -259,6 +274,7 @@
|
||||
name:"Opera House",
|
||||
description: "",
|
||||
culture:4,
|
||||
specialistSlots:{culture:1},
|
||||
hurryCostModifier:10,
|
||||
requiredBuilding:"Temple",
|
||||
maintainance:2,
|
||||
@ -276,11 +292,20 @@
|
||||
name:"Bank",
|
||||
description: "",
|
||||
gold:2,
|
||||
specialistSlots:{gold:1},
|
||||
hurryCostModifier:15,
|
||||
percentStatBonus:{gold:25},
|
||||
requiredBuilding:"Market",
|
||||
requiredTech:"Banking"
|
||||
},
|
||||
{
|
||||
name:"Forbidden Palace",
|
||||
description: "Unhappiness from population decreased by 10%",
|
||||
culture:1,
|
||||
isWonder:true,
|
||||
unique:"CitizenUnhappinessDecreased",
|
||||
requiredTech:"Banking"
|
||||
},
|
||||
{
|
||||
name:"Theatre",
|
||||
description: "",
|
||||
@ -288,7 +313,7 @@
|
||||
hurryCostModifier:10,
|
||||
maintainance:2,
|
||||
requiredBuilding:"Colloseum",
|
||||
requiredTech:"Banking"
|
||||
requiredTech:"Printing Press"
|
||||
},
|
||||
{
|
||||
name:"Taj Mahal",
|
||||
@ -303,6 +328,7 @@
|
||||
name:"Windmill",
|
||||
description: "",
|
||||
production:2,
|
||||
specialistSlots:{production:1},
|
||||
hurryCostModifier:25,
|
||||
maintainance:2,
|
||||
percentStatBonus:{production:10},
|
||||
@ -312,6 +338,7 @@
|
||||
name:"Museum",
|
||||
description: "",
|
||||
culture:5,
|
||||
specialistSlots:{culture:1},
|
||||
requiredBuilding:"Opera House",
|
||||
maintainance:3,
|
||||
hurryCostModifier:0,
|
||||
@ -358,6 +385,8 @@
|
||||
name:"Factory",
|
||||
description: "",
|
||||
production:4,
|
||||
percentStatBonus:{production:10},
|
||||
specialistSlots:{production:1},
|
||||
requiredBuilding:"Workshop",
|
||||
maintainance:3,
|
||||
hurryCostModifier:0,
|
||||
@ -369,6 +398,7 @@
|
||||
description: "",
|
||||
gold:3,
|
||||
percentStatBonus:{gold:25},
|
||||
specialistSlots:{gold:2},
|
||||
hurryCostModifier:15,
|
||||
requiredBuilding:"Bank",
|
||||
requiredTech:"Electricity"
|
||||
@ -382,7 +412,7 @@
|
||||
requiredTech:"Telegraph"
|
||||
},
|
||||
{
|
||||
name:"Broadcst Tower",
|
||||
name:"Broadcast Tower",
|
||||
description: "",
|
||||
culture:3,
|
||||
percentStatBonus:{culture:33},
|
||||
@ -411,6 +441,7 @@
|
||||
description: "",
|
||||
science:4,
|
||||
percentStatBonus:{science:50},
|
||||
specialistSlots:{science:1},
|
||||
requiredBuilding:"Public School",
|
||||
maintainance:3,
|
||||
requiredTech:"Plastics"
|
||||
|
239
android/assets/jsons/Policies.json
Normal file
239
android/assets/jsons/Policies.json
Normal file
@ -0,0 +1,239 @@
|
||||
[
|
||||
{
|
||||
name:"Tradition",
|
||||
description:"+3 culture in capital and increased rate of border expansion",
|
||||
policies:[
|
||||
{
|
||||
name:"Aristocracy",
|
||||
description:"+15% production when constructing wonders, +1 happiness for every 10 citizens in a city",
|
||||
row;1,
|
||||
column:1
|
||||
},
|
||||
{
|
||||
name:"Legalism",
|
||||
description:"Free culture building in your first 4 cities",
|
||||
row;1,
|
||||
column:3
|
||||
},
|
||||
{
|
||||
name:"Oligarchy",
|
||||
description:"Improves garrisons in cities - useless at this time",
|
||||
row;1,
|
||||
column:5
|
||||
},
|
||||
{
|
||||
name:"Landed Elite",
|
||||
description:"+10% food growth and +2 food in capital",
|
||||
requires:["Legalism"]
|
||||
row;2,
|
||||
column:2
|
||||
},
|
||||
{
|
||||
name:"Monarchy",
|
||||
description:"+1 gold and -1 unhappiness for every 2 citizens in capital",
|
||||
requires:["Legalism"]
|
||||
row;2,
|
||||
column:4
|
||||
},
|
||||
{
|
||||
name:"Finisher",
|
||||
description:"+15% growth and +2 food in all cities"
|
||||
}
|
||||
]
|
||||
},{
|
||||
name:"Liberty",
|
||||
description:"+1 culture in evey city",
|
||||
policies:[
|
||||
{
|
||||
name:"Collective Rule",
|
||||
description:"Training of settlers increaed +50% in capital, recieve a new settler near capital",
|
||||
row;1,
|
||||
column:1
|
||||
},
|
||||
{
|
||||
name:"Citizenship",
|
||||
description:"+25% construction rate of workers, recieve free worker near the capital",
|
||||
row;1,
|
||||
column:4
|
||||
},
|
||||
{
|
||||
name:"Republic",
|
||||
description:"+1 construction in every city, +5% construction when constructing buildings",
|
||||
requires:["Collective Rule"],
|
||||
row;1,
|
||||
column:1
|
||||
},
|
||||
{
|
||||
name:"Representation",
|
||||
description:"Each city founded increases ulture cost of policies 33% less than normal. Starts a golden age.",
|
||||
requires:["Citizenship"]
|
||||
row;2,
|
||||
column:3
|
||||
},
|
||||
{
|
||||
name:"Meritocracy",
|
||||
description:"+1 happiness for every city connected to capital, -5% unhappiness from citizens",
|
||||
requires:["Citizenship"]
|
||||
row;2,
|
||||
column:5
|
||||
},
|
||||
{
|
||||
name:"Finisher",
|
||||
description:"Free Great Person of choice near capital - TODO"
|
||||
}
|
||||
]
|
||||
},{
|
||||
name:"Piety",
|
||||
description:"Building time of culture buildings reduced by 15%",
|
||||
policies:[
|
||||
{
|
||||
name:"Organized Religion",
|
||||
description:"+1 happiness for each monument, temple and monastery",
|
||||
row;1,
|
||||
column:2
|
||||
},
|
||||
{
|
||||
name:"Mandate Of Heaven",
|
||||
description:"50% of excess happiness added to culture towards policies",
|
||||
row;1,
|
||||
column:5
|
||||
},
|
||||
{
|
||||
name:"Theocracy",
|
||||
description:"Temples give +10% gold",
|
||||
requires:["Organized Religion"],
|
||||
row;2,
|
||||
column:1
|
||||
},
|
||||
{
|
||||
name:"Reformation",
|
||||
description:"+33% culture in all cities with a world wonder, immediately enter a golden age",
|
||||
requires:["Organized Religion"]
|
||||
row;2,
|
||||
column:3
|
||||
},
|
||||
{
|
||||
name:"Free Religion",
|
||||
description:"+1 culture for each monument, temple and monastery. Gain a free policy.",
|
||||
requires:["Mandate of Heaven","Reformation"]
|
||||
row;3,
|
||||
column:4
|
||||
},
|
||||
{
|
||||
name:"Finisher",
|
||||
description:"Reduce culture cost of future policies by 10%"
|
||||
}
|
||||
]
|
||||
},{
|
||||
name:"Commerce",
|
||||
description:"+25% gold in capital",
|
||||
policies:[
|
||||
{
|
||||
name:"Trade Unions",
|
||||
description:"Maintainance on roads & railroads reduced by 33%, harbors+seaport +1 gold",
|
||||
row;1,
|
||||
column:2
|
||||
},
|
||||
{
|
||||
name:"Mercantilism",
|
||||
description:"-25% to purchasing items in cities",
|
||||
row;1,
|
||||
column:5
|
||||
},
|
||||
{
|
||||
name:"Protectionism",
|
||||
description:"+1 from each luxury resource",
|
||||
requires:["Organized Religion"],
|
||||
row;2,
|
||||
column:1
|
||||
},
|
||||
{
|
||||
name:"Finisher",
|
||||
description:"+1 gold from each specialist"
|
||||
}
|
||||
]
|
||||
},{
|
||||
name:"Rationalism",
|
||||
description:"+50% science from research agreements (??? maybe replace with `research projects`?)",
|
||||
policies:[
|
||||
{
|
||||
name:"Secularism",
|
||||
description:"+2 science from every specialist",
|
||||
row;1,
|
||||
column:2
|
||||
},
|
||||
{
|
||||
name:"Humanism",
|
||||
description:"+1 happiness from every university, observtory and public school",
|
||||
row;1,
|
||||
column:5
|
||||
},
|
||||
{
|
||||
name:"Free Thought",
|
||||
description:"+1 science from every trading post, +17% science from universities",
|
||||
requires:["Secularism"],
|
||||
row;2,
|
||||
column:1
|
||||
},
|
||||
{
|
||||
name:"Soveregnity",
|
||||
description:"+15% science while empire is happy",
|
||||
requires:["Humanism"],
|
||||
row;2,
|
||||
column:1
|
||||
},
|
||||
{
|
||||
name:"Scientific Revolution",
|
||||
description:"Gain 2 free technologies",
|
||||
requires:["Free Thought"],
|
||||
row;2,
|
||||
column:1
|
||||
},
|
||||
{
|
||||
name:"Finisher",
|
||||
description:"+1 gold from all science buildings"
|
||||
}
|
||||
]
|
||||
},{
|
||||
name:"Freedon",
|
||||
description:"+25% great people rate",
|
||||
policies:[
|
||||
{
|
||||
name:"Constitution",
|
||||
description:"+2 culture from each wonder",
|
||||
row;1,
|
||||
column:2
|
||||
},
|
||||
{
|
||||
name:"Universal Sufferage",
|
||||
description:"+33% city defence???",
|
||||
row;1,
|
||||
column:5
|
||||
},
|
||||
{
|
||||
name:"Civil Society",
|
||||
description:"-50% food consumption by specialists",
|
||||
row;2,
|
||||
column:1
|
||||
},
|
||||
{
|
||||
name:"Free Speech",
|
||||
description:"8 units are maintainance free",
|
||||
requires:["Constitution"],
|
||||
row;2,
|
||||
column:1
|
||||
},
|
||||
{
|
||||
name:"Democracy",
|
||||
description:"Specialists produce half normal unhappiness",
|
||||
requires:["Civil Society"],
|
||||
row;2,
|
||||
column:1
|
||||
},
|
||||
{
|
||||
name:"Finisher",
|
||||
description:"+1 gold from all science buildings"
|
||||
}
|
||||
]
|
||||
},
|
||||
]
|
@ -376,7 +376,7 @@
|
||||
name:"Telegraph",
|
||||
row:4,
|
||||
prerequisites:["Electricity"],
|
||||
description:"Allows construction of the Crito Redentor, reducing cost of new policie"
|
||||
description:"Allows construction of the Crito Redentor, reducing cost of new policies"
|
||||
},
|
||||
{
|
||||
name:"Radio",
|
||||
|
@ -67,7 +67,7 @@
|
||||
name:"Marsh",
|
||||
type:"TerrainFeature",
|
||||
food:-1,
|
||||
movementCost:2,
|
||||
movementCost:3,
|
||||
unbuildable:true,
|
||||
occursOn:["Grassland"]
|
||||
},
|
||||
|
@ -3,7 +3,7 @@
|
||||
name:"Farm",
|
||||
terrainsCanBeBuiltOn:["Plains","Grassland","Desert","Flood plains"],
|
||||
food:1,
|
||||
turnsToBuild:6,
|
||||
turnsToBuild:7,
|
||||
improvingTech:"Fertilizer",
|
||||
improvingTechStats:{food:1}
|
||||
},
|
||||
@ -11,7 +11,7 @@
|
||||
name:"Lumber mill",
|
||||
terrainsCanBeBuiltOn:["Forest"],
|
||||
production:1,
|
||||
turnsToBuild:6,
|
||||
turnsToBuild:7,
|
||||
techRequired:"Construction",
|
||||
improvingTech:"Scientific Theory",
|
||||
improvingTechStats:{production:1}
|
||||
@ -20,7 +20,7 @@
|
||||
name:"Mine",
|
||||
terrainsCanBeBuiltOn:["Hill"],
|
||||
production:1,
|
||||
turnsToBuild:6,
|
||||
turnsToBuild:7,
|
||||
techRequired:"Mining",
|
||||
improvingTech:"Chemistry",
|
||||
improvingTechStats:{production:1}
|
||||
@ -29,26 +29,26 @@
|
||||
name:"Trading post",
|
||||
terrainsCanBeBuiltOn:["Plains","Grassland","Desert","Hill","Tundra","Forest","Jungle","Flood plains"],
|
||||
gold:1,
|
||||
turnsToBuild:6,
|
||||
turnsToBuild:7,
|
||||
techRequired:"Trapping",
|
||||
improvingTech:"Economics",
|
||||
improvingTechStats: {gold:1}
|
||||
},
|
||||
{
|
||||
name:"Camp",
|
||||
turnsToBuild:6,
|
||||
turnsToBuild:7,
|
||||
techRequired:"Trapping",
|
||||
improvingTech:"Economics",
|
||||
improvingTechStats:{gold:1}
|
||||
},
|
||||
{
|
||||
name:"Oil well",
|
||||
turnsToBuild:6,
|
||||
turnsToBuild:9,
|
||||
techRequired:"Biology",
|
||||
},
|
||||
{
|
||||
name:"Pasture",
|
||||
turnsToBuild:6,
|
||||
turnsToBuild:8,
|
||||
techRequired:"Animal Husbandry",
|
||||
improvingTech:"Fertilizer",
|
||||
improvingTechStats:{food:1}
|
||||
@ -63,31 +63,31 @@
|
||||
},
|
||||
{
|
||||
name:"Quarry",
|
||||
turnsToBuild:6,
|
||||
turnsToBuild:8,
|
||||
techRequired:"Masonry",
|
||||
improvingTech:"Chemistry",
|
||||
improvingTechStats:{production:1}
|
||||
},
|
||||
{
|
||||
name:"Road",
|
||||
turnsToBuild:6,
|
||||
turnsToBuild:4,
|
||||
techRequired:"The Wheel"
|
||||
},
|
||||
{
|
||||
name:"Railroad",
|
||||
turnsToBuild:12,
|
||||
turnsToBuild:4,
|
||||
techRequired:"Railroad"
|
||||
},
|
||||
|
||||
{
|
||||
name:"Remove Forest",
|
||||
turnsToBuild:6,
|
||||
turnsToBuild:4,
|
||||
terrainsCanBeBuiltOn:["Forest"],
|
||||
techRequired:"Mining"
|
||||
},
|
||||
{
|
||||
name:"Remove Jungle",
|
||||
turnsToBuild:6,
|
||||
turnsToBuild:7,
|
||||
terrainsCanBeBuiltOn:["Jungle"],
|
||||
techRequired:"Bronze Working"
|
||||
},
|
||||
@ -97,4 +97,28 @@
|
||||
terrainsCanBeBuiltOn:["Marsh"],
|
||||
techRequired:"Masonry"
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
name:"Academy",
|
||||
science:8,
|
||||
improvingTech:"Scientific Theory",
|
||||
improvingTechStats:{science:2}
|
||||
},
|
||||
{
|
||||
name:"Landmark",
|
||||
culture:6
|
||||
},
|
||||
{
|
||||
name:"Manufactory",
|
||||
production:4,
|
||||
improvingTech:"Chemistry",
|
||||
improvingTechStats:{production:1}
|
||||
},
|
||||
{
|
||||
name:"Customs House",
|
||||
gold:4,
|
||||
improvingTech:"Economics",
|
||||
improvingTechStats:{gold:1}
|
||||
}
|
||||
]
|
@ -59,7 +59,7 @@
|
||||
name:"Horses",
|
||||
resourceType:"Strategic",
|
||||
revealedBy:"Animal Husbandry",
|
||||
terrainsCanBeFoundOn:["Plains","Desert"],
|
||||
terrainsCanBeFoundOn:["Plains","Grassland","Hill","Desert"],
|
||||
production:1,
|
||||
improvement:"Pasture",
|
||||
improvementStats:{production:1},
|
||||
@ -78,7 +78,7 @@
|
||||
{
|
||||
name:"Coal",
|
||||
resourceType:"Strategic",
|
||||
revealedBy:"Industrialization",
|
||||
revealedBy:"Scientific Theory",
|
||||
terrainsCanBeFoundOn:["Grassland","Plains","Hill"],
|
||||
production:1,
|
||||
improvement:"Mine",
|
||||
@ -88,7 +88,7 @@
|
||||
name:"Oil",
|
||||
resourceType:"Strategic",
|
||||
revealedBy:"Biology",
|
||||
terrainsCanBeFoundOn:["Desert","Coast","Tundra","Snow","Marsh"],
|
||||
terrainsCanBeFoundOn:["Desert","Coast","Tundra","Snow","Marsh","Jungle"],
|
||||
production:1,
|
||||
improvement:"Oil well",
|
||||
improvementStats:{production:3}
|
||||
@ -106,7 +106,7 @@
|
||||
name:"Uranium",
|
||||
resourceType:"Strategic",
|
||||
revealedBy:"Atomic Theory",
|
||||
terrainsCanBeFoundOn:["Plains","Desert","Tundra","Hill","Snow"],
|
||||
terrainsCanBeFoundOn:["Plains","Desert","Tundra","Hill","Snow","Forest","Desert","Marsh","Grassland"],
|
||||
production:1,
|
||||
improvement:"Mine",
|
||||
improvementStats:{production:2}
|
||||
@ -129,6 +129,62 @@
|
||||
improvement:"Plantation",
|
||||
improvementStats:{gold:1}
|
||||
},
|
||||
{
|
||||
name:"Dyes",
|
||||
resourceType:"Luxury",
|
||||
terrainsCanBeFoundOn:["Jungle","Forest"],
|
||||
gold:2,
|
||||
improvement:"Plantation",
|
||||
improvementStats:{gold:1}
|
||||
},
|
||||
{
|
||||
name:"Gems",
|
||||
resourceType:"Luxury",
|
||||
terrainsCanBeFoundOn:["Jungle","Grassland","Plains","Desert","Tundra","Hill"],
|
||||
gold:3,
|
||||
improvement:"Mine",
|
||||
improvementStats:{gold:1}
|
||||
},
|
||||
{
|
||||
name:"Gold",
|
||||
resourceType:"Luxury",
|
||||
terrainsCanBeFoundOn:["Grassland","Plains","Desert","Hill"],
|
||||
gold:2,
|
||||
improvement:"Mine",
|
||||
improvementStats:{gold:1}
|
||||
},
|
||||
{
|
||||
name:"Silver",
|
||||
resourceType:"Luxury",
|
||||
terrainsCanBeFoundOn:["Desert","Tundra","Hill"],
|
||||
gold:2,
|
||||
improvement:"Mine",
|
||||
improvementStats:{gold:1}
|
||||
},
|
||||
{
|
||||
name:"Incense",
|
||||
resourceType:"Luxury",
|
||||
terrainsCanBeFoundOn:["Plains","Desert"],
|
||||
gold:3,
|
||||
improvement:"Plantation",
|
||||
improvementStats:{gold:1}
|
||||
},
|
||||
{
|
||||
name:"Ivory",
|
||||
resourceType:"Luxury",
|
||||
terrainsCanBeFoundOn:["Plains"],
|
||||
gold:2,
|
||||
improvement:"Camp",
|
||||
improvementStats:{gold:1}
|
||||
},
|
||||
{
|
||||
name:"Silk",
|
||||
resourceType:"Luxury",
|
||||
terrainsCanBeFoundOn:["Forest"],
|
||||
gold:2,
|
||||
improvement:"Plantation",
|
||||
improvementStats:{gold:1}
|
||||
},
|
||||
{
|
||||
name:"Spices",
|
||||
resourceType:"Luxury",
|
||||
@ -137,6 +193,14 @@
|
||||
improvement:"Plantation",
|
||||
improvementStats:{gold:1}
|
||||
},
|
||||
{
|
||||
name:"Wine",
|
||||
resourceType:"Luxury",
|
||||
terrainsCanBeFoundOn:["Grassland","Plains"],
|
||||
gold:2,
|
||||
improvement:"Plantation",
|
||||
improvementStats:{gold:1}
|
||||
},
|
||||
{
|
||||
name:"Sugar",
|
||||
resourceType:"Luxury",
|
||||
|
41
android/assets/jsons/Units.json
Normal file
41
android/assets/jsons/Units.json
Normal file
@ -0,0 +1,41 @@
|
||||
[
|
||||
{
|
||||
name:"Worker",
|
||||
description: "Can build improvements on tiles",
|
||||
movement:2,
|
||||
hurryCostModifier:20,
|
||||
cost:60
|
||||
},
|
||||
{
|
||||
name:"Settler",
|
||||
description: "Founds a new city",
|
||||
movement:2,
|
||||
cost:106,
|
||||
hurryCostModifier:20
|
||||
},
|
||||
{
|
||||
name:"Great Artist",
|
||||
description: "Can start an 8-turn golden age or construcct a landmark (+5 culture)",
|
||||
unbuildable:true,
|
||||
movement:2
|
||||
},
|
||||
{
|
||||
name:"Great Scientist",
|
||||
description: "Can discover a technology, or construct an academy (+4 science(",
|
||||
unbuildable:true,
|
||||
movement:2
|
||||
},
|
||||
{
|
||||
name:"Great Merchant",
|
||||
description: "Can undertake a trade mission, giving a large sum of gold, or construct a ?",
|
||||
unbuildable:true,
|
||||
movement:2
|
||||
},
|
||||
{
|
||||
name:"Great Engineer",
|
||||
description: "Can speed up construction of a wonder, or construct a refinery, giving +? production?",
|
||||
unbuildable:true,
|
||||
movement:2
|
||||
},
|
||||
|
||||
]
|
@ -49,6 +49,11 @@ public class CityConstructions
|
||||
}
|
||||
}); }
|
||||
|
||||
public void addConstruction(int constructionToAdd){
|
||||
if (!inProgressConstructions.containsKey(currentConstruction)) inProgressConstructions.put(currentConstruction, 0);
|
||||
inProgressConstructions.put(currentConstruction, inProgressConstructions.get(currentConstruction) + constructionToAdd);
|
||||
}
|
||||
|
||||
public void nextTurn(FullStats cityStats)
|
||||
{
|
||||
if (getCurrentConstruction()==null) return;
|
||||
@ -66,9 +71,7 @@ public class CityConstructions
|
||||
}
|
||||
else currentConstruction = saveCurrentConstruction;
|
||||
|
||||
if (!inProgressConstructions.containsKey(currentConstruction)) inProgressConstructions.put(currentConstruction, 0);
|
||||
inProgressConstructions.put(currentConstruction, inProgressConstructions.get(currentConstruction) + Math.round(cityStats.production));
|
||||
|
||||
addConstruction(Math.round(cityStats.production));
|
||||
if (inProgressConstructions.get(currentConstruction) >= construction.getProductionCost())
|
||||
{
|
||||
construction.postBuildEvent(this);
|
||||
|
@ -24,6 +24,7 @@ public class CivilizationInfo {
|
||||
public int baseHappiness = 15;
|
||||
public int numberOfGoldenAges=0;
|
||||
public int turnsLeftForCurrentGoldenAge=0;
|
||||
public int pointsForNextGreatPerson=100;
|
||||
public String civName = "Babylon";
|
||||
|
||||
public FullStats greatPersonPoints = new FullStats();
|
||||
@ -88,15 +89,16 @@ public class CivilizationInfo {
|
||||
if(isGoldenAge()) turnsLeftForCurrentGoldenAge--;
|
||||
|
||||
if(civStats.happiness > happinessRequiredForNextGoldenAge()){
|
||||
civStats.happiness-=happinessRequiredForNextGoldenAge();
|
||||
enterGoldenAge();
|
||||
numberOfGoldenAges++;
|
||||
}
|
||||
}
|
||||
|
||||
public void enterGoldenAge(){
|
||||
civStats.happiness-=happinessRequiredForNextGoldenAge();
|
||||
turnsLeftForCurrentGoldenAge = 10;
|
||||
if(getBuildingUniques().contains("GoldenAgeLengthIncrease")) turnsLeftForCurrentGoldenAge*=1.5;
|
||||
int turnsToGoldenAge = 10;
|
||||
if(getBuildingUniques().contains("GoldenAgeLengthIncrease")) turnsToGoldenAge*=1.5;
|
||||
turnsLeftForCurrentGoldenAge += turnsToGoldenAge;
|
||||
}
|
||||
|
||||
public CivStats getStatsForNextTurn() {
|
||||
|
@ -22,7 +22,7 @@ import com.badlogic.gdx.utils.Align;
|
||||
import com.unciv.civinfo.CityInfo;
|
||||
import com.unciv.civinfo.IConstruction;
|
||||
import com.unciv.civinfo.TileInfo;
|
||||
import com.unciv.game.pickerscreens.BuildingPickerScreen;
|
||||
import com.unciv.game.pickerscreens.ConstructionPickerScreen;
|
||||
import com.unciv.models.gamebasics.Building;
|
||||
import com.unciv.models.stats.FullStats;
|
||||
|
||||
@ -226,7 +226,7 @@ public class CityScreen extends com.unciv.game.utils.CameraStageBaseScreen {
|
||||
buildingPickButton.addListener(new ClickListener(){
|
||||
@Override
|
||||
public void clicked(InputEvent event, float x, float y) {
|
||||
game.setScreen(new BuildingPickerScreen(game));
|
||||
game.setScreen(new ConstructionPickerScreen(game));
|
||||
dispose();
|
||||
}
|
||||
});
|
||||
|
@ -17,11 +17,14 @@ import com.badlogic.gdx.scenes.scene2d.utils.Drawable;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable;
|
||||
import com.badlogic.gdx.utils.Align;
|
||||
import com.badlogic.gdx.utils.Predicate;
|
||||
import com.unciv.civinfo.CityConstructions;
|
||||
import com.unciv.civinfo.TileInfo;
|
||||
import com.unciv.civinfo.Unit;
|
||||
import com.unciv.game.pickerscreens.ImprovementPickerScreen;
|
||||
import com.unciv.game.pickerscreens.TechPickerScreen;
|
||||
import com.unciv.game.utils.*;
|
||||
import com.unciv.models.LinqHashMap;
|
||||
import com.unciv.models.gamebasics.Building;
|
||||
import com.unciv.models.gamebasics.GameBasics;
|
||||
import com.unciv.models.gamebasics.TileImprovement;
|
||||
import com.unciv.models.stats.CivStats;
|
||||
@ -38,7 +41,7 @@ public class WorldScreen extends com.unciv.game.utils.CameraStageBaseScreen {
|
||||
ScrollPane scrollPane;
|
||||
|
||||
float buttonScale = game.settings.buttonScale;
|
||||
Table TileTable = new Table();
|
||||
Table tileTable = new Table();
|
||||
Table CivTable = new Table();
|
||||
TextButton TechButton = new TextButton("",skin);
|
||||
public LinqHashMap<String,WorldTileGroup> tileGroups = new LinqHashMap<String, WorldTileGroup>();
|
||||
@ -52,13 +55,13 @@ public class WorldScreen extends com.unciv.game.utils.CameraStageBaseScreen {
|
||||
new Label("",skin).getStyle().font.getData().setScale(game.settings.labelScale);
|
||||
|
||||
addTiles();
|
||||
stage.addActor(TileTable);
|
||||
stage.addActor(tileTable);
|
||||
|
||||
Drawable tileTableBackground = new TextureRegionDrawable(new TextureRegion(new Texture("skin/tileTableBackground.png")))
|
||||
.tint(new Color(0x004085bf));
|
||||
tileTableBackground.setMinHeight(0);
|
||||
tileTableBackground.setMinWidth(0);
|
||||
TileTable.setBackground(tileTableBackground);
|
||||
tileTable.setBackground(tileTableBackground);
|
||||
OptionsTable.setBackground(tileTableBackground);
|
||||
|
||||
TextureRegionDrawable civBackground = new TextureRegionDrawable(new TextureRegion(new Texture("skin/civTableBackground.png")));
|
||||
@ -315,18 +318,18 @@ public class WorldScreen extends com.unciv.game.utils.CameraStageBaseScreen {
|
||||
|
||||
private void updateTileTable() {
|
||||
if(selectedTile == null) return;
|
||||
TileTable.clearChildren();
|
||||
tileTable.clearChildren();
|
||||
FullStats stats = selectedTile.getTileStats();
|
||||
TileTable.pad(20);
|
||||
TileTable.columnDefaults(0).padRight(10);
|
||||
tileTable.pad(20);
|
||||
tileTable.columnDefaults(0).padRight(10);
|
||||
|
||||
Label cityStatsHeader = new Label("Tile Stats",skin);
|
||||
cityStatsHeader.setFontScale(2);
|
||||
TileTable.add(cityStatsHeader).colspan(2).pad(10);
|
||||
TileTable.row();
|
||||
tileTable.add(cityStatsHeader).colspan(2).pad(10);
|
||||
tileTable.row();
|
||||
|
||||
TileTable.add(new Label(selectedTile.toString(),skin)).colspan(2);
|
||||
TileTable.row();
|
||||
tileTable.add(new Label(selectedTile.toString(),skin)).colspan(2);
|
||||
tileTable.row();
|
||||
|
||||
|
||||
HashMap<String,Float> TileStatsValues = new HashMap<String, Float>();
|
||||
@ -338,9 +341,9 @@ public class WorldScreen extends com.unciv.game.utils.CameraStageBaseScreen {
|
||||
|
||||
for(String key : TileStatsValues.keySet()){
|
||||
if(TileStatsValues.get(key) == 0) continue; // this tile gives nothing of this stat, so why even display it?
|
||||
TileTable.add(com.unciv.game.utils.ImageGetter.getStatIcon(key)).align(Align.right);
|
||||
TileTable.add(new Label(Math.round(TileStatsValues.get(key))+"",skin)).align(Align.left);
|
||||
TileTable.row();
|
||||
tileTable.add(com.unciv.game.utils.ImageGetter.getStatIcon(key)).align(Align.right);
|
||||
tileTable.add(new Label(Math.round(TileStatsValues.get(key))+"",skin)).align(Align.left);
|
||||
tileTable.row();
|
||||
}
|
||||
|
||||
|
||||
@ -371,69 +374,152 @@ public class WorldScreen extends com.unciv.game.utils.CameraStageBaseScreen {
|
||||
update();
|
||||
}
|
||||
});
|
||||
TileTable.add(moveUnitButton).colspan(2)
|
||||
tileTable.add(moveUnitButton).colspan(2)
|
||||
.size(moveUnitButton.getWidth() * buttonScale, moveUnitButton.getHeight() * buttonScale);
|
||||
|
||||
if(selectedTile.unit.name.equals("Settler")){
|
||||
TextButton foundCityButton = new TextButton("Found City", skin);
|
||||
foundCityButton.getLabel().setFontScale(buttonScale);
|
||||
foundCityButton.addListener(new ClickListener(){
|
||||
@Override
|
||||
public void clicked(InputEvent event, float x, float y) {
|
||||
game.civInfo.addCity(selectedTile.position);
|
||||
if(unitTile==selectedTile) unitTile = null; // The settler was in the middle of moving and we then founded a city with it
|
||||
selectedTile.unit = null; // Remove settler!
|
||||
update();
|
||||
}
|
||||
});
|
||||
|
||||
if(selectedTile.unit.currentMovement==0 ||
|
||||
game.civInfo.tileMap.getTilesInDistance(selectedTile.position,2).any(new Predicate<TileInfo>() {
|
||||
@Override
|
||||
public boolean evaluate(TileInfo arg0) {
|
||||
return arg0.isCityCenter();
|
||||
}
|
||||
})){
|
||||
foundCityButton.setTouchable(Touchable.disabled);
|
||||
foundCityButton.setColor(Color.GRAY);
|
||||
}
|
||||
|
||||
TileTable.row();
|
||||
TileTable.add(foundCityButton).colspan(2)
|
||||
.size(foundCityButton.getWidth() * buttonScale, foundCityButton.getHeight() * buttonScale);
|
||||
if(selectedTile.unit.name.equals("Settler")) {
|
||||
addUnitAction(tileTable, "Found City", selectedTile.unit,
|
||||
!game.civInfo.tileMap.getTilesInDistance(selectedTile.position, 2).any(new Predicate<TileInfo>() {
|
||||
@Override
|
||||
public boolean evaluate(TileInfo arg0) {
|
||||
return arg0.isCityCenter();
|
||||
}
|
||||
}),
|
||||
new ClickListener() {
|
||||
@Override
|
||||
public void clicked(InputEvent event, float x, float y) {
|
||||
game.civInfo.addCity(selectedTile.position);
|
||||
if (unitTile == selectedTile)
|
||||
unitTile = null; // The settler was in the middle of moving and we then founded a city with it
|
||||
selectedTile.unit = null; // Remove settler!
|
||||
update();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if(selectedTile.unit.name.equals("Worker")) {
|
||||
String improvementButtonText = selectedTile.improvementInProgress == null ?
|
||||
"Construct\r\nimprovement" : selectedTile.improvementInProgress +"\r\nin progress";
|
||||
TextButton improvementButton = new TextButton(improvementButtonText, skin);
|
||||
improvementButton.getLabel().setFontScale(buttonScale);
|
||||
improvementButton.addListener(new ClickListener() {
|
||||
@Override
|
||||
public void clicked(InputEvent event, float x, float y) {
|
||||
game.setScreen(new ImprovementPickerScreen(game, selectedTile));
|
||||
}
|
||||
});
|
||||
if(selectedTile.unit.currentMovement ==0 || selectedTile.isCityCenter() ||
|
||||
!GameBasics.TileImprovements.linqValues().any(new Predicate<TileImprovement>() {
|
||||
addUnitAction(tileTable,improvementButtonText,selectedTile.unit, !selectedTile.isCityCenter() ||
|
||||
GameBasics.TileImprovements.linqValues().any(new Predicate<TileImprovement>() {
|
||||
@Override
|
||||
public boolean evaluate(TileImprovement arg0) {
|
||||
return selectedTile.canBuildImprovement(arg0);
|
||||
}
|
||||
})){
|
||||
improvementButton.setColor(Color.GRAY);
|
||||
improvementButton.setTouchable(Touchable.disabled);
|
||||
}
|
||||
})
|
||||
,new ClickListener() {
|
||||
|
||||
TileTable.row();
|
||||
TileTable.add(improvementButton).colspan(2)
|
||||
.size(improvementButton.getWidth() * buttonScale, improvementButton.getHeight() * buttonScale);
|
||||
@Override
|
||||
public void clicked(InputEvent event, float x, float y) {game.setScreen(new ImprovementPickerScreen(game, selectedTile));}
|
||||
} );
|
||||
}
|
||||
|
||||
if(selectedTile.unit.name.equals("Great Scientist")){
|
||||
addUnitAction(tileTable, "Discover Technology",selectedTile.unit,true,
|
||||
new ClickListener(){
|
||||
@Override
|
||||
public void clicked(InputEvent event, float x, float y) {
|
||||
game.civInfo.tech.freeTechs+=1;
|
||||
selectedTile.unit=null;// destroy!
|
||||
game.setScreen(new TechPickerScreen(game,true));
|
||||
}
|
||||
});
|
||||
addUnitAction(tileTable, "Construct Academy",selectedTile.unit,true,
|
||||
new ClickListener(){
|
||||
@Override
|
||||
public void clicked(InputEvent event, float x, float y) {
|
||||
selectedTile.improvement="Academy";
|
||||
selectedTile.unit=null;// destroy!
|
||||
update();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if(selectedTile.unit.name.equals("Great Artist")){
|
||||
addUnitAction(tileTable, "Start Golden Age",selectedTile.unit,true,
|
||||
new ClickListener(){
|
||||
@Override
|
||||
public void clicked(InputEvent event, float x, float y) {
|
||||
game.civInfo.enterGoldenAge();
|
||||
selectedTile.unit=null;// destroy!
|
||||
update();
|
||||
}
|
||||
});
|
||||
addUnitAction(tileTable, "Construct Landmark",selectedTile.unit,true,
|
||||
new ClickListener(){
|
||||
@Override
|
||||
public void clicked(InputEvent event, float x, float y) {
|
||||
selectedTile.improvement="Landmark";
|
||||
selectedTile.unit=null;// destroy!
|
||||
update();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if(selectedTile.unit.name.equals("Great Engineer")){
|
||||
final CityConstructions cityConstructions = selectedTile.getCity().cityConstructions;
|
||||
addUnitAction(tileTable, "Hurry Wonder",selectedTile.unit,selectedTile.isCityCenter() &&
|
||||
cityConstructions.getCurrentConstruction() instanceof Building &&
|
||||
((Building)cityConstructions.getCurrentConstruction()).isWonder,
|
||||
new ClickListener(){
|
||||
@Override
|
||||
public void clicked(InputEvent event, float x, float y) {
|
||||
cityConstructions.addConstruction(300 + (30 * selectedTile.getCity().population)); //http://civilization.wikia.com/wiki/Great_engineer_(Civ5)
|
||||
selectedTile.unit=null; // destroy!
|
||||
update();
|
||||
}
|
||||
});
|
||||
addUnitAction(tileTable, "Construct Manufactory",selectedTile.unit,true,
|
||||
new ClickListener(){
|
||||
@Override
|
||||
public void clicked(InputEvent event, float x, float y) {
|
||||
selectedTile.improvement="Manufactory";
|
||||
selectedTile.unit=null;// destroy!
|
||||
update();
|
||||
}
|
||||
});
|
||||
}
|
||||
if(selectedTile.unit.name.equals("Great Merchant")){
|
||||
final CityConstructions cityConstructions = selectedTile.getCity().cityConstructions;
|
||||
addUnitAction(tileTable, "Conduct Trade Mission",selectedTile.unit,true,
|
||||
new ClickListener(){
|
||||
@Override
|
||||
public void clicked(InputEvent event, float x, float y) {
|
||||
game.civInfo.civStats.gold+=350; // + 50 * era_number - todo!
|
||||
selectedTile.unit=null; // destroy!
|
||||
update();
|
||||
}
|
||||
});
|
||||
addUnitAction(tileTable, "Construct Customs House",selectedTile.unit,true,
|
||||
new ClickListener(){
|
||||
@Override
|
||||
public void clicked(InputEvent event, float x, float y) {
|
||||
selectedTile.improvement="Customs House";
|
||||
selectedTile.unit=null;// destroy!
|
||||
update();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
TileTable.pack();
|
||||
tileTable.pack();
|
||||
|
||||
tileTable.setPosition(stage.getWidth()-10- tileTable.getWidth(), 10);
|
||||
}
|
||||
|
||||
private void addUnitAction(Table tileTable, String actionText, Unit unit, boolean canAct, ClickListener action) {
|
||||
TextButton actionButton = new TextButton(actionText, skin);
|
||||
actionButton.getLabel().setFontScale(buttonScale);
|
||||
actionButton.addListener(action);
|
||||
if (selectedTile.unit.currentMovement == 0 || !canAct) {
|
||||
actionButton.setColor(Color.GRAY);
|
||||
actionButton.setTouchable(Touchable.disabled);
|
||||
}
|
||||
|
||||
tileTable.row();
|
||||
tileTable.add(actionButton).colspan(2)
|
||||
.size(actionButton.getWidth() * buttonScale, actionButton.getHeight() * buttonScale);
|
||||
|
||||
TileTable.setPosition(stage.getWidth()-10- TileTable.getWidth(), 10);
|
||||
}
|
||||
|
||||
private void updateTiles() {
|
||||
@ -488,4 +574,3 @@ public class WorldScreen extends com.unciv.game.utils.CameraStageBaseScreen {
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@ import com.unciv.game.UnCivGame;
|
||||
import com.unciv.models.gamebasics.Building;
|
||||
import com.unciv.models.gamebasics.GameBasics;
|
||||
|
||||
public class BuildingPickerScreen extends PickerScreen {
|
||||
public class ConstructionPickerScreen extends PickerScreen {
|
||||
public String selectedProduction;
|
||||
|
||||
TextButton getProductionButton(final String production, String buttonText,
|
||||
@ -32,7 +32,7 @@ public class BuildingPickerScreen extends PickerScreen {
|
||||
return TB;
|
||||
}
|
||||
|
||||
public BuildingPickerScreen(final UnCivGame game) {
|
||||
public ConstructionPickerScreen(final UnCivGame game) {
|
||||
super(game);
|
||||
|
||||
closeButton.clearListeners(); // Don't go back to the world screen, unlike the other picker screens!
|
||||
@ -57,16 +57,16 @@ public class BuildingPickerScreen extends PickerScreen {
|
||||
rightSideButton.setTouchable(Touchable.disabled);
|
||||
rightSideButton.setColor(Color.GRAY);
|
||||
|
||||
CityConstructions cityBuildings = game.civInfo.getCurrentCity().cityConstructions;
|
||||
CityConstructions cityConstructions = game.civInfo.getCurrentCity().cityConstructions;
|
||||
VerticalGroup regularBuildings = new VerticalGroup().space(10),
|
||||
wonders = new VerticalGroup().space(10),
|
||||
units = new VerticalGroup().space(10),
|
||||
specials = new VerticalGroup().space(10);
|
||||
|
||||
for(final Building building : GameBasics.Buildings.values()) {
|
||||
if(!building.isBuildable(cityBuildings)) continue;
|
||||
if(!building.isBuildable(cityConstructions)) continue;
|
||||
TextButton TB = getProductionButton(building.name,
|
||||
building.name +"\r\n"+cityBuildings.turnsToConstruction(building.name)+" turns",
|
||||
building.name +"\r\n"+cityConstructions.turnsToConstruction(building.name)+" turns",
|
||||
building.getDescription(true),
|
||||
"Build "+building.name);
|
||||
if(building.isWonder) wonders.addActor(TB);
|
||||
@ -76,7 +76,7 @@ public class BuildingPickerScreen extends PickerScreen {
|
||||
for(Unit unit : GameBasics.Units.values()){
|
||||
if(!unit.isConstructable()) continue;
|
||||
units.addActor(getProductionButton(unit.name,
|
||||
unit.name+"\r\n"+cityBuildings.turnsToConstruction(unit.name)+" turns",
|
||||
unit.name+"\r\n"+cityConstructions.turnsToConstruction(unit.name)+" turns",
|
||||
unit.description, "Train "+unit.name));
|
||||
}
|
||||
|
Reference in New Issue
Block a user