Commit Graph

46 Commits

Author SHA1 Message Date
Yair Morgenstern
947a1001c4 Resolves #9703 - AI only buys tiles contiguous to the current city tiles (was: contiguous to civ tiles) 2023-06-30 15:13:14 +03:00
Caballero Arepa
a4aa5b7b5a
Improved Minimap colors (#8919)
* Improved minimap colors

G&Ks change

* Improved minimap colors

Changes for Vanilla
2023-03-16 14:29:37 +02:00
Yair Morgenstern
d1a9caaa88 New tile visibility framework! 2023-01-15 10:54:41 +02:00
itanasi
55e6541ee0
Add Temperature Offset Slider (#7891)
* Add slider
Align spawnIce latitude and offset code to applyHumidityAndTemperature

* A bunch of debug code
Make default Water Level -0.05 for Default

* Remove debug println
Fix Desert at 0.9-1.0 temp and <0.2 humidity

* Disable reseed for debug comparison
Reset Plains/Grassland for high temp. Adjust max humidity for safety of Grasslands
Humidity debugger
Better slider

* Remove all debug code

* Undo Desert temp setting
2022-10-22 20:12:57 +03:00
Yair Morgenstern
1069b0933e
Added "Vegetation" unique so that vegetation spawn is not limited to just jungle and forest (#6569) 2022-04-19 15:25:33 +03:00
SomeTroglodyte
cf21ade76e
Moddable Ice generation (any impassable feature on Water possible) (#6329)
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2022-03-21 21:08:25 +02:00
Xander Lenstra
367a427436
Unified two uniques into one more descriptive unique (#6380)
* Unified two uniques into one more descriptive unique

* Fixed fallout generation & typo
2022-03-21 21:05:54 +02:00
Yair Morgenstern
9696fa59f5
Added unique to convert terrain to other terrain if adjacent to something (#6094)
* Added unique to convert terrain to other terrain if adjacent to something

Terrain converting to other terrain when adjacent to rivers was using hardcoded stuff, so I un-hardcoded it
I thought I could use this to replace the 'coast' hardcoding, and if it wasn't for the maxCoastExtension then I could.
Modders CAN therefore add their own coast (Lava tiles and Ash tiles I dunno) but it will only be for directly close terrains.
This enables Deciv Redux to spawn huge maps.

* Also for Vanilla, which apparently had a different number of tabs than G&K for no apparent reason.

* Apparently terrain name wasn't a uniquetype yet

(cherry picked from commit 593fc257b5)
2022-02-02 00:59:37 -08:00
Xander Lenstra
0349e0a776
Updated the natural wonders for vanilla (#5943)
* Updated the natural wonders for vanilla

* Might as well remove the faith ruins bonuses
2022-01-10 13:28:05 -08:00
SimonCeder
24bd2b66b0
Regions part 3 - resource placement, resource settings (#5690)
* placeLuxuries

* map resource settings

* strategic and bonus resources

* terrain fixes

* slight optimizations

* vanilla jsons

* fix luxury terrain distribution

* also for vanilla

* fix ruleset bug

* terrainfilter
2021-12-07 07:25:16 +02:00
SimonCeder
09c40002f0
Regions part 1 - subdivide generated maps into regions, and use to place civs (#5556)
* json definitions

* create regions, define region types

* count terrains

* terrain qualities

* tilesInRectangle

* use even q coords

* major civ start locations

* move to separate file

* remove printlns

* unused imports

* strings

* strings

* reviews

* conditionalize qualities

* guess qualities of terrain types without explicit definitions

* guess qualities of terrain types without explicit definitions

* Update template.properties

* Update template.properties

* add HideInCivilopedia to technical uniques

* reviews
2021-11-05 07:59:48 +02:00
Xander Lenstra
97da979a04
Fixed bugs with fallout (#5379)
* Fixed bugs with fallout

* Reordered uniques

* Reviews

* Added missing unique targets
2021-10-03 12:04:15 +03:00
SimonCeder
9016385f30
Barbarian spawning and camp placements (#5354)
* barbarian camp placement, spawn countdowns

* separate file

* raging barbarians

* faster spawn when attacked

* Barbarian AI

* works on old saves

* template.properties

* fix percent

* no improvements unique

* fix test fail

* reviews

* reviews pt 2
2021-10-03 11:45:02 +03:00
SimonCeder
344c96319b
Fix Fountain of Youth (#5355)
* fix fountain of youth

* fix test fail

* reviews

* reviews
2021-10-01 15:51:30 +03:00
SomeTroglodyte
8d33dacc3c
Softcode Fountain of Youth (#5308)
* Softcode Rejuvenation

* Softcode Rejuvenation - comments
2021-09-25 22:15:03 +03:00
SomeTroglodyte
a5a8ea1338
Natural Wonders un-hardcoded (#5279)
* Natural Wonders un-hardcoded

* Natural Wonders un-hardcoded - oops testing change revert

* Natural Wonders un-hardcoded - tests OK

* Natural Wonders un-hardcoded - requests

* Natural Wonders un-hardcoded - hide from pedia

* Natural Wonders un-hardcoded - readable unique
2021-09-23 11:21:08 +03:00
SimonCeder
8eb24ac273
Carthage civ (#5224)
* Add Carthage

* Implement uniques

* performance improvement, better elephant

* AI avoids taking too much damage from mountains

* more performance

* better AI

* can't settle cities on mountains

* AI improvement

* AI improvement

* revisions, damagePerTurn in Terrains.json

* terrain damage stored as unique in json, damage also works for terrain features

* don't change game.png
2021-09-18 20:28:12 +03:00
ravignir
827185148a
Update Mount Fuji stats (#5223)
I forgot about Mount Fuji stat change when i updated Natural Wonders, now i rectify that.
2021-09-15 00:45:03 +03:00
ravignir
893f41a0ed
Add missing Natural Wonders (#5204)
* Add files via upload

* Add files via upload

* Add files via upload

* Update Terrains.json

* Update Constants.kt

* Update Constants.kt

* Update NaturalWonderGenerator.kt

* Update Constants.kt

* Update NaturalWonderGenerator.kt

* Natural Wonders generation fixes.
2021-09-13 20:49:46 +03:00
Arthur van der Staaij
6ad90c31ba
Removed the sight bonus from hills (#4883) 2021-08-17 09:14:49 +03:00
ravignir
bf40779605
Fix (#4813) 2021-08-09 06:34:21 +03:00
ravignir
38a09096b4
MCO - Randomize Plains/Grasslands around deserts (#4746)
- Deserts are a little bit more common (but now have higher chance of being stripes)
- Slightly reduced range of Tundra.
- Slightly reduced amount of Snow.
- Grasslands can now appear next to desert tiles and huge plains areas are much less likely.
2021-08-04 14:10:23 +03:00
ravignir
5be081276c
Map climate overhaul (#4669)
This should make the map look more like a civ5 map:
here is a spreadsheet i've created and used to make these changes: https://drive.google.com/file/d/18uacHvZlh4FoM8xEVH4J9jaAmtHomutr/view?usp=sharing
What it does:
- makes center of a map mostly Grassland with some bits of Plains
- next biome is Desert and Plains with a rare patches of Grasslands.
- next biome is again Grasslands and Plains (in about equal proportions)
- final biome is Tundra that turns into Snow towards poles.
- makes the whole map look less stripy.

It looks kind of messy, but i tried to make it as compact as i could.
2021-07-29 14:58:45 +03:00
SomeTroglodyte
34717008b8
Civilopedia phase7 (#4628)
* Civilopedia phase 7 - Terrain

* Civilopedia phase 7 - Terrain - tuning

* Civilopedia phase 7 - Terrain - patch1 "for"

* Civilopedia phase 7 - Terrain - patch2 for #4641
2021-07-27 10:41:25 +03:00
SimonCeder
2971e6bba3
Map generation and start locations (#4588)
* cellular automata for mountains and hills

* cellular automata for mountains and hills

* tweaks

* spawn location algorithm

* consolation prizes

* improve city state spawns

* AI settle in place if possible

* make heightmap generation mod agnostic
2021-07-21 14:41:48 +03:00
Xander Lenstra
111d11b9b2
Added Advanced Ballistics Tech, Atomic Bomb Unit, Updated how nukes work (#4211)
* Improved nukes

* Fixed build error (probably)

* Implemented reocmmended changes, fixed some other stuff, the usual

* Implemented requested changes

* Fixed Tech connections

* Fixed nuclear missiles and guided missiles being interceptable

* Missiles are no longer air units. This is, as they cannot be stationed on carriers and cannot be intercepted.
2021-06-24 16:03:59 +03:00
Arthur van der Staaij
e10c52efc1
Fixed open terrain bonus working in rough terrain (#4219)
* Fixed open terrain bonus working in rough terrain

Fixed #4139 - The open terrain combat bonus no longer works in rough
terrain.

Deprecated "Open terrain" and "Rough terrain" uniques and undeprecated
"rough" property of terrains.

* Minor simplification

* Replaced "rough" with "Rough terrain" unique

* Empty commit to re-run the build checks
2021-06-23 09:41:55 +03:00
ravignir
2feefeb4af
Changes to terrain combat bonuses (#3990)
as in civ5, all base terrain have no penalty/bonuses, mountain has +25%.
2021-05-24 20:44:53 +03:00
Yair Morgenstern
61c8ab3a8f New line-of-sight rules, with new "Blocks line-of-sight from tiles at same elevation" unique! 2021-05-11 00:29:37 +03:00
Yair Morgenstern
e8d4767b6d Height of terrains is now defined by a unique 2021-05-06 15:27:30 +03:00
Yair Morgenstern
34bed66198 Genericized hill's "extra sight for land units" to a unique 2021-05-06 14:28:54 +03:00
Yair Morgenstern
8d2629088f Hill city-strength bonus genericized 2021-05-06 14:27:12 +03:00
GGGuenni
b35d5d3121
changed hill to terrain Feature (#3707)
* changed hill to terrain Feature

* Update Terrains.json

* Update Terrains.json

* Snow with capital S

* Fixed tests failing

* Added check for ruleset supports hill as terrain feature
2021-05-05 17:48:47 +03:00
Yair Morgenstern
496b27d6b5 Fixed terrain error 2021-04-14 19:35:38 +03:00
Yair Morgenstern
d825352bf4 Converted all "Bonus vs unitType" effects to "+[amount]% Strength vs [unitType]"
Open terrain and rough terrain bonuses are now generic and uniques
2021-04-14 18:52:10 +03:00
Yair Morgenstern
b312d24d4a Rough terrain specified through uniques 2021-04-14 18:32:39 +03:00
GGGuenni
00ec000d50
Preparation for hill as terrain feature (#3784)
* ensure backwards compatibility

* Added new Hill.png

* Added temp TileSetConfig to support new hill sprite

* Added missing Ancient ruins tiles
2021-04-13 22:05:06 +03:00
Yair Morgenstern
01877fee7c Fixed Great Barrier Reef spawn rules 2021-03-11 22:17:59 +02:00
Yair Morgenstern
e464ba5328 Map generation parameters are moddable, allowing players to create custom terrains for map generation! 2021-02-24 20:34:01 +02:00
ravignir
0bb40d842a
changed default tiles colors (#3508)
* changed default tiles colors

I hope the new colors are better :)

* Update Terrains.json

2nd commit, ocean changed
2021-01-07 16:33:38 +02:00
HadeanLake
9f48f43ad0
parameterized some uniques, fixes some minor bugs (#3122)
Fixed Moai
Wonder overlay will remove terrain overlay in default tileset
Oasis, Marsh and Atoll now have "Rare feature" unique, rare features can be added by mods
implemented TileInfo.fitsUniqueFilter(filterText:String): Boolean
parameterized uniques:
* "Must have an owned [Mountain] within [2] tiles"
* "Must be on [River]" - not to be confused with "Must be next to [River]" - the tile city on must have river at its border, not the adjacent tile
* "Must not be on [Hill]"
* "Must not be next to []"
* "Must be on [seacoast]" - next to "Coast" tile
* "Must be on [tile adjacent to source of fresh water]"
* "Must be next to [Water]" - next to any water tile, including "Lakes"
* "Must be next to [terrainFeature]"
* "Must be next to [unique]" - e.g "Must be next to [Rare feature]" - next to terrain or terrain feature having this unique
2020-09-11 07:56:56 +03:00
HadeanLake
8ac3a88cec
fixed #3066, crash in chooseMilitaryUnit and some great people actions (#3099)
* fixed KotlinNullPointerException crash in chooseMilitaryUnit
random() is not to be used in predicate
* GodmodeCheckbox is not lockable and unchecked by default
* no great people actions if no movement points left
* unique "Can start an []-turn golden age" now has parameter and 8-turn golden ages will last 8 turns instead of 10
golden age can be started if unit is on own territory (even embarked)
* "Golden Age length increased by [50]%" - now has parameter
* tweaked changed fort and terrain defence bonuses
fort can be built on forest and jungle (vegetation will not be removed)
any open flat land gives 10%  penalty
marsh gives 15% penalty
only top terrain counts, improvement bonus will be added to that
flatland + fort = 40%
hill + fort = 75%
hill = 25%
forest/jungle on flatland = 25%
forest/jungle on hill = 25%
forest on flat + fort = 75%
forest on hill + fort = 75%
forest on hill + citadel = 125%
fixed 20% penalty for attacking over river - will be displayed if unit is standing on the other side of river
"Amphibious" unique removes this penalty
2020-09-05 20:32:27 +03:00
HadeanLake
8f75368b99
Farms near freshwater (#3063)
* Farms near freshwater
* Farm now has unique "Can also be built on tiles adjacent to fresh water"
https://civilization.fandom.com/wiki/Farm_(Civ5)
Even snow: https://www.reddit.com/r/civ/comments/11qtko/farms_on_snow/
Hill+Farm, Snow+Farm, Tundra+Farm sprites by THE BUCKETEER and Ravignir from discord
* fields improvingTech and improvingTechStats converted into uniques
e.g.:
"[+1 Production] once [Scientific Theory] is discovered"
"[+1 Food] on [fresh water] tiles once [Civil Service] is discovered"
"[+1 Food] on [non-fresh water] tiles once [Fertilizer] is discovered"

* ai will build trading posts and farms in snow and tundra if it has no better tiles to work on

* "Provides a one-time Production bonus to the closest city when cut down" unique for forest

* update template.properties
2020-09-02 19:49:29 +03:00
HadeanLake
e6e31b4e1a
Aztecs and some other things (#3033)
* Added icons
* [temple](https://thenounproject.com/search/?q=temple&i=28256) By Fabio Meroni for Temple of Artemis
* [Canoe](https://thenounproject.com/term/canoe/402285/) By Viktor Fedyuk (Tim P) for Floating Gardens
* [Garden](https://thenounproject.com/search/?q=garden&i=1478380) By Bharat
Aztecs by Séan https://discord.com/channels/586194543280390151/633733497277775884/727255962754351104
Jaguar by Red11

Reused slinger icon for Slinger Withdraw

* Added buildings and uniques for them
garden - bonus building of the Medieval Era. City "Must border a source of fresh water"
Temple of Artemis - World wonder of the Ancient era
Floating Gardens - Aztec unique building, replaces Water Mill

"[+1 Science] Per [2] Population in this city" - for Library and Public School
"+[]% great person generation in this city" - for garden
"Must border a source of fresh water" - "fresh water" provided by river or tiles with "Fresh water" unique. Added "Fresh water" unique to Lakes and Oasis
"+[10]% growth in all cities" - now has parameter - for Tradition Complete policy and Temple of Artemis
"+[10]% growth in capital" - now has parameter
"+[15]% Production when constructing [ranged units]"   - "ranged units" now valid param
"[stats] once [tech] is discovered" - Petra and Mughal Fort have it
"[+1 Production] from [River] tiles in this city"]  - now can use "River" - for Hydro plant

* Added Jaguar - Aztec unique unit
New unique - "+[]% combat bonus in [param]" unique - Norwegian Ski Infantry, Jaguars and Mohawks have it. param can be terrainFeature or baseTerrain, in case of baseTerrain it implies there are no features like vegetation her
Implemented "Culture for the empire from each enemy unit killed"
tweaked honor policy - it should bring half as much culture, and same as Sacrificial Captives
Fixed penalty for terrain if unit do not have "No defensive terrain bonus" unique

* Added Aztecs

* Update template.properties

* update template.properties

* update template.properties

* update template.properties
2020-08-30 21:02:59 +03:00
Yair Morgenstern
0262ee816b Resources no longer spawn under unbuildable, unremovable terrain features 2020-05-19 21:44:10 +03:00
Yair Morgenstern
c2fdcb7849 Prepping for multiple rulesets - current ruleset is now is Vanilla folder 2020-04-24 14:03:41 +03:00