Commit Graph

3926 Commits

Author SHA1 Message Date
SimonCeder
1a92f9c084
Free buildings are free (#5466)
* free buildings are free

* ai shouldn't sell free buildings either
2021-10-12 07:34:23 +03:00
SimonCeder
e375fb9896
Disable religious quest with religion disabled; enumify "Hidden when religion is disabled" (#5465)
* enumify hidden with religion disabled

* prevent religious quests in no-religion games
2021-10-12 07:31:22 +03:00
Xander Lenstra
d44bfce665
Fixed crashes from era (#5467) 2021-10-12 07:30:20 +03:00
Arthur van der Staaij
df39dfd2a8
Fixed the visual gaps in territory borders (#5446)
* Implemented left/right-concave border segments

* Fixed ConvexConcave border image

It was flipped horizontally.

* Implemented border left/right-concave detection

* Moved border images into their own directory

They're not really icons, after all.

* Cleaned up code a bit and added some more comments

* Applied requested change and consistified some function names

* Removed the old border images

I was sure I already did this, but apparently not.
2021-10-11 09:23:28 +03:00
Xander Lenstra
a73b7b008f
Likely fixed a bug where AI nukes could hit nations they had a peace treaty with (#5449)
* Likely fixed a bug where AI nukes could hit players they had a peace treaty with

* Typefied blast radius unique
2021-10-10 22:26:54 +03:00
Xander Lenstra
9fab1f6ee7
Researching all of the techs in the previous era now also puts you in the next era (#5451) 2021-10-10 17:14:30 +03:00
Xander Lenstra
2bd8132b8d
Made it impossible to cut short peace treaties (#5450) 2021-10-10 17:11:14 +03:00
Xander Lenstra
24d7a57c1f
Fixed a bug where religious units would be expelled when an open borders agreement ended (#5448) 2021-10-10 17:10:36 +03:00
Xander Lenstra
0ddeb6eb64
Fixed bug with byzantine unique (#5445) 2021-10-10 06:24:44 +03:00
logic
3b49cc18a2
Civ icon redirects to civilopedia (#5414)
* update for no reason

* bruuhhhhhhhhh

* update for no reason

* bruuhhhhhhhhh

* remove comments

* delete atlas

* Create game.atlas
2021-10-09 22:32:47 +03:00
Yair Morgenstern
1132042949
When choosing military units, 'carrying' units are only chosen if they provide needed 'slots' for carrying units. (#5436) 2021-10-09 20:59:58 +03:00
Xander Lenstra
1df454368a
Solves bugs with unit movement through fog of war (#5382) 2021-10-09 20:46:35 +03:00
SomeTroglodyte
7bbcb8db1a
Mayas (#5408)
* The Maya - data and calendar

* The Maya - completed

* The Maya - notifications

* The Maya - favoredReligion

* The Maya - comments in GreatPersonManager

* The Maya - clickable notifications

* The Maya - templates

* The Maya - atlas

* The Maya - patch1
2021-10-09 20:45:59 +03:00
SimonCeder
69e1792fa9
Return Civilians captured by Barbarians to original owner; Capture stacked civilians (#5437)
* return captured civilians

* stacked civilian capture bug

* works on old saves

* diplomacy bonus expires on war declared

* vector bug
2021-10-09 20:44:03 +03:00
yairm210
fd3bfbade4 Resolved #5435 - all civ + unit uniques are accounted for in both ways 2021-10-09 20:22:29 +03:00
SimonCeder
185050bd9f
cs units wander (#5441) 2021-10-09 20:11:52 +03:00
yairm210
0b3f8d11d3 Tile height set by lazy.
This is good enough to give a 10% performance boost for regular players when there are a lot of units.
If mods add elevation somehow WITHIN a turn, this will be lost, but will recalc next turn correctly.
2021-10-08 15:54:24 +03:00
yairm210
c70d315fae Resolved #5435 - optimized units seeing invisible tiles.
@SomeTroglodyte @xlenstra - the problem was with MapUnit.matchesFilter calling hasUnique, which called civInfo.getUniques, which is patently ridiculous.
I checked ALL usages of getUniques, and only found ONE unique which conceivably could be applied both globally and individually, and separated the check there.

Current analysis shows that updating viewable tiles still takes much longer than I'd like it to, but not, like, 70% of "next turn" runtime.

Next target - tileInfo.getHeight, which clocks in at around 10% (!!!) of next turn!
Apparently the annual "we added too many new features and need to optimize" time has come again...
2021-10-08 15:40:19 +03:00
yairm210
36250dfc70 Resolved #5425 - unit maintenance discount corrected 2021-10-08 14:22:26 +03:00
yairm210
39114ff8f4 Added unique types for air unit transportation 2021-10-08 13:19:41 +03:00
Xander Lenstra
10a00eed3a
Fixed crash when AI is picking religions (#5421) 2021-10-07 21:24:17 +03:00
SomeTroglodyte
d25adacec7
Minimum city distance across continents (#5404) 2021-10-06 22:51:52 +03:00
SimonCeder
22ebe2b9af
Fix Educated Elite (#5416)
* fix educated elite

* unique-ify prophet uniques
2021-10-06 22:49:02 +03:00
yairm210
44fd987160 Fixed conditionals display when locating mod errors, which ws broken due to translation reordering all conditional-like text 2021-10-06 20:47:06 +03:00
yairm210
5e8e23fb43 Fixed broken translations 2021-10-06 19:06:53 +03:00
yairm210
6ec61128c4 More unique typing 2021-10-06 17:44:20 +03:00
SimonCeder
b41d234db6
Barbarians capture civilians and take gold from cities (#5410)
* ransom cities

* capture civilians

* fix bug
2021-10-06 17:12:13 +03:00
SimonCeder
c00ce49c86
AI rationing of strategic resources; Hydro Plant re-enabled (#5401)
* AI evaluation of resources

* optimizations

* sell or disband when needed for space victory

* use for all constructions

* use in trade evaluations

* .requiresResource()
2021-10-06 17:11:02 +03:00
SimonCeder
e4ff3d43d6
prevent city states from taunting you (#5409) 2021-10-06 17:09:20 +03:00
Xander Lenstra
7752e1834d
Added a label displaying religion is off when it is off (#5412) 2021-10-06 17:06:49 +03:00
Xander Lenstra
fc01fde163
Nations now have a favoured religion they try choose when available (#5406) 2021-10-05 20:38:58 +03:00
Xander Lenstra
86f80e7540
Fixed Byzantine not applying (#5405) 2021-10-05 20:38:25 +03:00
Xander Lenstra
e879bb2a14
Added an advanced system for choosing beliefs (#5400) 2021-10-05 15:33:27 +03:00
SomeTroglodyte
4c6f1ecfb8
Solve continentSizes serialization by removing it (#5403) 2021-10-05 15:30:32 +03:00
SomeTroglodyte
726a1942db
Sharpen unit tests for UniqueTypes (and mod checker too) (#5398)
* Sharpen unit tests for UniqueTypes (and mod checker too)

* Sharpen unit tests for UniqueTypes - fix newly found problems
2021-10-05 09:08:41 +03:00
Xander Lenstra
82e72ddcfa
Added in [tileFilter] tiles conditional to combat uniques (#5393)
* Some code cleaning

* Added `in [tileFilter] tiles` conditional

* Limited Visibility -> [-1] Sight

* Fix tests and rename conditional

* Actually made the conditional functional

* Renamed conditional once again
2021-10-04 22:30:09 +03:00
SomeTroglodyte
2884cbb469
UniqueType-i-fying UniqueTriggerActivation (#5397)
* UniqueType-i-fying UniqueTriggerActivation

* UniqueType-i-fying UniqueTriggerActivation - fix missing param types

* UniqueType-i-fying UniqueTriggerActivation - alternate and all params
2021-10-04 21:47:03 +03:00
SomeTroglodyte
088e35ff13
Ethiopia - Nation (#5387)
* Ethiopia - Nation

* Ethiopia - Unit and Stele

* Ethiopia - Graphics

* Ethiopia - color
2021-10-04 20:56:34 +03:00
Xander Lenstra
ec036dc3dd
Fixed a crash when killing a barbarian invading an unmet city-state (#5396) 2021-10-04 17:18:06 +03:00
Xander Lenstra
e1b4c53573
Added two more conditionals and updated movement, sight & combat to use these (#5389) 2021-10-04 08:32:10 +03:00
Xander Lenstra
07822de375
Simplified combat uniques further (#5361)
* Simplified combat uniques further

* Reviews & translations

* UniqueType > placeHolderText

* I can't math
2021-10-04 00:29:46 +03:00
SomeTroglodyte
edfc66aa2f
Sort City States, replace+deprecate Dublin and Edinburgh (#5386) 2021-10-03 19:03:54 +03:00
SomeTroglodyte
462888fd46
New map for map editor shares settings storage (#5385) 2021-10-03 14:32:24 +03:00
yairm210
db30db42da Typed City-state related uniques 2021-10-03 12:46:27 +03: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
SomeTroglodyte
71405b93aa
The Celtic People Reboot (#5367)
* The Celtic People Reboot

* Redid the Shamrock sword of the Pictish Warrior

* The Celtic People Reboot - one comment

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2021-10-03 12:02:58 +03:00
SomeTroglodyte
a0f6596ee8
MusicController tweaks and hooks for mood - War and Peace (#5364)
* MusicController tweaks and hooks for mood - War and Peace

* MusicController tweaks and hooks for mood - patch1

* MusicController tweaks and hooks for mood - const object

* MusicController tweaks and hooks for mood - patch2

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2021-10-03 11:56:27 +03:00
Aron de Jong
c3242f37f2
Add looping minimap viewport if worldwrap enabled (#5349)
The viewport now also appears on the other side of the minimap when
viewing the border of the world with worldwrap enabled.
2021-10-03 11:50:50 +03:00
Xander Lenstra
88bcf5d514
Fixed bug where 'mandate of heaven' policy wouldn't work (#5380) 2021-10-03 11:50:03 +03:00
Xander Lenstra
238cbb782a
Added icons to resource trades & war declarations (#5376) 2021-10-03 11:46:27 +03:00