Skip to content

Commit

Permalink
Improved clarity and moddability of building improvements (#6712)
Browse files Browse the repository at this point in the history
* Renamed tile.hasUnique, deprecated `Indestructable`, unique for citadels
Also refactored the consumption of (great) people out of UnitActions.

* Reworked when improvements can be build somewhere for more clarity

* Made resources improvable by multiple improvements; Offshore Platform

* Fix compatability

* WIP

* Fixed the tests, but better

* I suppose I might as well update this now that we're a version later
  • Loading branch information
xlenstra authored May 10, 2022
1 parent 7b48337 commit 8fcfbf7
Show file tree
Hide file tree
Showing 33 changed files with 1,168 additions and 1,023 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,579 changes: 793 additions & 786 deletions android/assets/game.atlas

Large diffs are not rendered by default.

Binary file modified android/assets/game.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
61 changes: 40 additions & 21 deletions android/assets/jsons/Civ V - Gods & Kings/TileImprovements.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,45 +44,51 @@
"name": "Camp",
"turnsToBuild": 7,
"techRequired": "Trapping",
"uniques": ["Does not need removal of [Forest]","Does not need removal of [Jungle]","[+1 Gold] <after discovering [Economics]>"],
"uniques": ["Does not need removal of [Forest]","Does not need removal of [Jungle]","[+1 Gold] <after discovering [Economics]>", "Can only be built to improve a resource"],
"shortcutKey": "C"
},
{
"name": "Oil well",
"terrainsCanBeBuiltOn": ["Coast"],
"turnsToBuild": 9,
"techRequired": "Biology",
"uniques": ["Cannot be built on [Coast] tiles <before discovering [Refrigeration]>"],
"uniques": ["Can only be built to improve a resource", "Cannot be built on [Water] tiles"],
"shortcutKey": "W"
},
{
"name": "Offshore Platform",
"techRequired": "Refrigeration",
"uniques": ["Can only be built to improve a resource", "Can only be built on [Water] tiles"],
"shortcutKey": "P"
},
{
"name": "Pasture",
"turnsToBuild": 8,
"techRequired": "Animal Husbandry",
"uniques": ["[+1 Food] <after discovering [Fertilizer]>"],
"uniques": ["[+1 Food] <after discovering [Fertilizer]>", "Can only be built to improve a resource"],
"shortcutKey": "P"
},
{
"name": "Plantation",
"turnsToBuild": 6,
"gold": 1,
"techRequired": "Calendar",
"uniques": ["[+1 Food] <after discovering [Fertilizer]>"],
"uniques": ["[+1 Food] <after discovering [Fertilizer]>", "Can only be built to improve a resource"],
"shortcutKey": "P"
},
{
"name": "Quarry",
"turnsToBuild": 8,
"techRequired": "Masonry",
"uniques": ["[+1 Production] <after discovering [Chemistry]>"],
"uniques": ["[+1 Production] <after discovering [Chemistry]>", "Can only be built to improve a resource"],
"shortcutKey": "Q"
},
{
"name": "Fishing Boats",
"terrainsCanBeBuiltOn": ["Coast"],
"food": 1,
"techRequired": "Sailing",
"uniques": ["[+1 Gold] <after discovering [Compass]>"]
"uniques": ["[+1 Gold] <after discovering [Compass]>", "Can only be built to improve a resource"],
"shortcutKey": "F"
},

// Military improvement
Expand All @@ -98,6 +104,7 @@
// Transportation
{
"name": "Road",
"terrainsCanBeBuiltOn": ["Land"],
"turnsToBuild": 4,
"techRequired": "The Wheel",
// "Costs [1] gold per turn when in your territory" does nothing and is only to inform the user
Expand All @@ -111,6 +118,7 @@
},
{
"name": "Railroad",
"terrainsCanBeBuiltOn": ["Land"],
"turnsToBuild": 4,
"techRequired": "Railroads",
"uniques": ["Can be built outside your borders", "Costs [2] gold per turn when in your territory"],
Expand All @@ -119,10 +127,11 @@
},

// Removals
// Any improvement that starts with 'Remove ' is automatically changed into
// the improvement that removes the terrainfeature after it.
{
"name": "Remove Forest",
"turnsToBuild": 4,
"terrainsCanBeBuiltOn": ["Forest"],
"techRequired": "Mining",
"uniques": ["Can be built outside your borders"],
"shortcutKey": "X",
Expand All @@ -131,23 +140,20 @@
{
"name": "Remove Jungle",
"turnsToBuild": 7,
"terrainsCanBeBuiltOn": ["Jungle"],
"techRequired": "Bronze Working",
"uniques": ["Can be built outside your borders"],
"shortcutKey": "X"
},
{
"name": "Remove Fallout",
"turnsToBuild": 2,
"terrainsCanBeBuiltOn": ["Fallout"],
// Has no tile improvements as it can always be built
// Has no tech requirements as it can always be built
"uniques": ["Can be built outside your borders"],
"shortcutKey": "X"
},
{
"name": "Remove Marsh",
"turnsToBuild": 6,
"terrainsCanBeBuiltOn": ["Marsh"],
"techRequired": "Masonry",
"uniques": ["Can be built outside your borders"],
"shortcutKey": "X"
Expand All @@ -173,43 +179,51 @@
// Great Person improvements
{
"name": "Academy",
"terrainsCanBeBuiltOn": ["Land"],
"science": 8,
"uniques": ["Great Improvement", "[+2 Science] <after discovering [Scientific Theory]>", "[+2 Science] <after discovering [Atomic Theory]>"]
},
{
"name": "Landmark",
"terrainsCanBeBuiltOn": ["Land"],
"culture": 6,
"uniques": ["Great Improvement"]
},
{
"name": "Manufactory",
"terrainsCanBeBuiltOn": ["Land"],
"production": 4,
"uniques": ["Great Improvement", "[+1 Production] <after discovering [Chemistry]>"]
},
{
"name": "Customs house",
"terrainsCanBeBuiltOn": ["Land"],
"gold": 4,
"uniques": ["Great Improvement", "[+1 Gold] <after discovering [Economics]>"]
},
{
"name": "Holy site",
"terrainsCanBeBuiltOn": ["Land"],
"faith": 6,
"uniques": ["Great Improvement"]
},
{
"name": "Citadel",
"terrainsCanBeBuiltOn": ["Land"],
"uniques": [
"Great Improvement",
"Gives a defensive bonus of [100]%",
"Adjacent enemy units ending their turn take [30] damage",
"Can be built just outside your borders",
"Constructing it will take over the tiles around it and assign them to your closest city"]
"Constructing it will take over the tiles around it and assign them to your closest city"
]
},

//Civilization unique improvements
{
"name": "Moai",
"uniqueTo": "Polynesia",
"terrainsCanBeBuiltOn": ["Land"],
"culture": 1,
"turnsToBuild": 4,
"uniques": ["Can only be built on [Coastal] tiles", "[+1 Culture] for each adjacent [Moai]", "[+1 Gold] <after discovering [Flight]>"],
Expand Down Expand Up @@ -240,26 +254,31 @@
"shortcutKey": "F"
},

// Unbuildable improvements
{
"name": "Ancient ruins",
"uniques": ["Unpillagable", "Provides a random bonus when entered"]
"name": "Ancient ruins",
"terrainsCanBeBuiltOn": ["Land"],
"uniques": ["Unpillagable", "Provides a random bonus when entered", "Unbuildable"]
},
{
"name": "City ruins",
"uniques": ["Unpillagable"],
"name": "City ruins",
"terrainsCanBeBuiltOn": ["Land"],
"uniques": ["Unpillagable", "Unbuildable"],
"civilopediaText": [{"text":"A bleak reminder of the destruction wreaked by War"}]
},
{
"name": "City center",
"uniques": ["Unpillagable", "Indestructible"],
"name": "City center",
"terrainsCanBeBuiltOn": ["Land"],
"uniques": ["Unpillagable", "Irremovable", "Unbuildable"],
"civilopediaText": [
{"text":"Marks the center of a city"},
{"text":"Appearance changes with the technological era of the owning civilization"}
]
},
{
"name": "Barbarian encampment",
"uniques": ["Unpillagable"],
"name": "Barbarian encampment",
"terrainsCanBeBuiltOn": ["Land"],
"uniques": ["Unpillagable", "Unbuildable"],
"civilopediaText": [{"text":"Home to uncivilized barbarians, will spawn a hostile unit from time to time"}]
}
]
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@
"revealedBy": "Biology",
"terrainsCanBeFoundOn": ["Desert","Coast","Tundra","Snow","Marsh","Jungle"],
"production": 1,
"improvement": "Oil well",
"improvedBy": ["Oil well", "Offshore Platform"],
"improvementStats": {"production": 3},
"uniques": ["Deposits in [Coast] tiles always provide [4] resources",
"Guaranteed with Strategic Balance resource option",
Expand Down
Loading

0 comments on commit 8fcfbf7

Please sign in to comment.