Commit Graph

4084 Commits

Author SHA1 Message Date
yairm210
69db686101 Moved all fully deprecated uniques to their own region down below
Slight steps towards stat percent bonus calculation efficiency in CityStats
2021-12-03 11:01:55 +02:00
yairm210
0def261012 Added unique types, added regions for easier location 2021-12-03 10:48:39 +02:00
itanasi
7f07bcb9e5
Recycling center (#5738)
* Add support to UniqueType.MaxNumberBuilding (including rejectionReasons)
Add Recycling Center entry to JSON
Need Graphical Icon

* Fix typo
Add TODO

* adding Recycling Center icon

* Credit update for icon
Rephrase Rejection text
Updated .atlas and .png
Add code to block showing Recycling Center

* Fix using placeholderText
Set shouldShow to True so iot still appears while under construction but not completed

* Rejection Text now working
Remove debug prints

* Remove odd extra lines

* extra lines

* Remove excessive if statement in shouldBeDisplayed
Reword text. Unique can apply to Buildings and Units
Refactor Signature since not just Buildings

* Adding code to remove building in transferred city

Co-authored-by: temurakami <spellman23@gmail.com>
2021-12-03 10:15:51 +02:00
Xander Lenstra
06dd395efb
Fixed a bug where statue off Zeus would not work (#5732) 2021-11-30 14:42:19 +02:00
yairm210
57f3bf2bb2 Resolved #5713 - AI doesn't try attacking with non-attack units 2021-11-29 22:45:54 +02:00
yairm210
b9d2078442 Fixed niche bug that let you try and capture civilians in territory you can't enter 2021-11-29 22:41:55 +02:00
yairm210
e43e23b9a8 Disabled buggy counteroffer mechanic to release a stable version 2021-11-29 19:47:42 +02:00
will-ca
f86b765d38
Show which cities are missing required buildings for National Wonders. (#5718) 2021-11-29 15:57:36 +02:00
yairm210
0cef056c4d Typing for unit uniques 2021-11-28 08:28:55 +02:00
SimonCeder
10686d1d8f
We Love The King Day (#5705)
* we love the king day

* AI improvements

* Don't break old saves

* unused import

* tutorial

* proper growth when unhappy

* reviews
2021-11-27 19:59:19 +02:00
Xander Lenstra
4107ff3386
Added health conditionals (#5707)
* Added health conditionals

* Whenefied conditional
2021-11-27 19:52:54 +02:00
yairm210
15cbf8359f Resolved edge case crash when conquering the capital of a civ that has a unique capital city indicator 2021-11-24 18:33:51 +02:00
yairm210
5d160508d3 Fixed bug when attempting to load a game that uses mods you don't have 2021-11-24 18:33:44 +02:00
SimonCeder
2dd4415977
Counteroffer mechanic, updated trade valuations (#5702)
* counteroffer mechanic

* string template

* string template

* AI always counteroffers if able
2021-11-23 13:00:30 +02:00
yairm210
4113b810ff Simplified civ info stats happiness breakdown 2021-11-22 20:53:08 +02:00
yairm210
532f42365c Merge remote-tracking branch 'origin/master'
# Conflicts:
#	core/src/com/unciv/models/ruleset/unique/UniqueType.kt
2021-11-22 20:27:11 +02:00
yairm210
63c5ed2156 Unique deprecation work 2021-11-22 20:24:43 +02:00
itanasi
b72a2c3ebb
Make Guided Missile Free (and Maintenance overhaul) (#5698)
* Add new UniqueType.NoMaintenance to support Guided Missile

* revert gradle
Add UnitMaintenanceDiscount
Rename UnitMaintenanceDiscount->UnitMaintenanceDiscountGlobal
Rework maintenance equation to account for overlapping reductions
Add maintenance variable to MapUnit

* Add square brackets in string (apparently didn't check in?)
More robust uniques check code so not assuming only one matching unique
Use toPercent()

* Proper toPercent() math

Co-authored-by: temurakami <spellman23@gmail.com>
2021-11-22 18:21:34 +02:00
yairm210
14c4f2d570 Step 3 - new uniqueTypes, and removed old getStatsFromUniques entirely!
And we can FINALLY remove that ugly double statsPerPopulation check, since we take ALL uniques and filter them by building/wonder type instead of local/nonlocal!
@xlenstra perhaps the lower two new unique types can be replaced with conditionals?
2021-11-21 22:43:51 +02:00
yairm210
213fc67c87 Step 2 - existing uniquetypes 2021-11-21 22:00:40 +02:00
yairm210
846388f032 Stats from uniques simplification, step 1 - setting up the base functions, with just one unique 2021-11-21 21:52:17 +02:00
yairm210
b23ba40cd0 More Unique types, with some deprecations 2021-11-21 21:08:15 +02:00
yairm210
59c5d2b10c Unique types for building filters 2021-11-21 21:02:45 +02:00
yairm210
4b5a709ee0 Resolved #4595 - policy screen keeps scroll position when adding new policy 2021-11-20 23:31:37 +02:00
yairm210
1a7f562bc0 Resolved #5265 - cannot add 2 of the same buildings to the queue visually 2021-11-20 23:27:31 +02:00
yairm210
73f275f4cd Resolved #5642 - viewable tiles update after capturing city 2021-11-20 21:10:41 +02:00
yairm210
fa5ac83f88 Resolved #5662 - AI won't declare war at the very beginning of games for little reason 2021-11-20 21:00:40 +02:00
will-ca
d477029232
Cleanup renaming "CameraStageBaseScreen" in KDocs. (#5695) 2021-11-20 19:56:53 +02:00
yairm210
ea0738f6e5 Recreate map editor screen when changing ruleset to update all the editing tools 2021-11-19 15:20:28 +02:00
yairm210
ea29458038 Resolved #5668 - Changing base ruleset in map editor removes all terrain references that are no longer viable, including starting locations for nations not in new ruleset 2021-11-19 15:09:01 +02:00
yairm210
bdeccb87e8 Resolved #5692 - exiting Civilopedia always brings you o the previous screen 2021-11-19 14:15:48 +02:00
yairm210
ff3cd7511c Somehow not all got added? 2021-11-19 12:27:48 +02:00
yairm210
200a62670c Rename: Changed CameraStageBaseScreen to BaseScreen 2021-11-19 12:26:57 +02:00
yairm210
8ddbe3b2b7 3.18.3 2021-11-19 12:13:23 +02:00
yairm210
422bb58814 Caught out of memory errors on autosave 2021-11-15 21:36:06 +02:00
Xander Lenstra
8f89826d03
Removed code that was unreachable after the removal of an exception in BackwardCompatability.kt for 3.18.2 (#5680) 2021-11-15 15:35:32 +02:00
Xander Lenstra
5a458e93cb
Fixed a crash when changing the base ruleset while in portrait mode (#5671)
* Fixed a crash when changing the base ruleset while in portrait mode

* Whoops
2021-11-14 14:14:16 +02:00
yairm210
f3115d9f03 Pre-solved potential bugs, unique typing for deprecated uniques 2021-11-14 00:16:01 +02:00
yairm210
297c3d8ba6 Probably resolved #5555 - made tileset config overrides deterministic 2021-11-13 23:32:02 +02:00
yairm210
c41fb3591a Caught "null values from musicHistory.peekLast" bug 2021-11-13 22:38:58 +02:00
yairm210
5910e52407 Catching out of memory errors when updating tiles with a catch-all popup 2021-11-13 22:33:55 +02:00
yairm210
fda3d32332 Performance improvement for getting civ-wide uniques, should help mitigate existing ANRs 2021-11-13 22:25:07 +02:00
yairm210
4b43ff5b5e Resolved crashes in game options table when changing base ruleset before the mod list was defined 2021-11-13 22:18:11 +02:00
yairm210
57c033ff34 More error handling for out of memory errors 2021-11-12 00:19:52 +02:00
yairm210
8aa99c03e2 Probably solved a bug where brushes would cause non-ruleset terrains for mods without grassland 2021-11-11 23:56:29 +02:00
yairm210
4ce8704969 Solved bug where AI units could expend all movement trying to attack enemy units when moving through fog, and would still try and attack 2021-11-11 23:34:43 +02:00
yairm210
c92381adba Don't display religion follower table if no one in city follows any religion 2021-11-11 21:57:00 +02:00
SimonCeder
e4f686964e
Regions part 2 - City state placements, start normalization (#5663)
* start position normalization

* assignLuxuries

* City states placement

* city state normalization

* don't consider tiny islands

* also modify the other json since they are duplicated now
2021-11-11 12:11:48 +02:00
yairm210
bc5ea2d90a Resolved #5641 - unit upgrade check ONLY removes/adds unit if absolutely necessary
This previously was done every time the function was called, leading to updating the civ resources twice per unit check, which is kind of heavy
2021-11-09 23:38:30 +02:00
Xander Lenstra
cda34bf23f
Replace calls to clone with calls to cloneStats when that is clearer (#5656) 2021-11-09 11:59:24 +02:00