Commit Graph

4399 Commits

Author SHA1 Message Date
0e26ea2cc8 Added deep link to multiplayer games (#6273) 2022-03-05 20:00:56 +02:00
1b9e496db5 Swap order on diplomatic victory: voting result _then_ victory (#6270) 2022-03-05 19:55:14 +02:00
0390ec225f Move automated units button was showing when it didn't do anything (#6271) 2022-03-05 19:54:54 +02:00
00c5ecb6a6 3.19.13 2022-02-28 22:49:11 +02:00
bca3d5645a Fix Spaceship production boni (and key binding) (#6247)
* Fix spaceship part boni

* Key binding for 'Add part to spaceship'
2022-02-28 19:42:02 +02:00
e2945687f2 Fix Ctrl-Letter key bindings (#6232) 2022-02-28 19:41:46 +02:00
9870003e33 Fix Petra and Garden not allowed in some cases (#6245) 2022-02-28 19:41:35 +02:00
651dcff581 Fix Polynesia's Wayfinding (#6238)
* Fix Polynesia's Wayfinding

* Fix mod option to use other unit filters with UnitsMayEnterOcean
2022-02-28 19:41:22 +02:00
f360eda047 Align (reduce) Embarked Defense Strength per Era (#6231)
* Change Embarked Defending Strength per era. Update Tutorial a little

* Use JSON implementation of EmbarkDefense

Co-authored-by: itanasi <spellman23@gmail.com>
2022-02-28 19:41:13 +02:00
8a6b4de84f Minor improvements from GPC 2022-02-28 19:39:44 +02:00
6bbab8a394 FINALLY removed CivInfo.getMatchingUniques(String)! 2022-02-27 16:57:21 +02:00
78f0ad768a Step 1 of resolving #6186 freshwater crisis - unify adjacency to a single function, only rivers are outliers (#6219) 2022-02-25 13:39:34 +02:00
8cb73ac91b UncivSlider fixes (#6222)
* Fix UncivSlider isDisabled and snapToValues with the +/- buttons

* Apply UncivSlider to convertGoldToScience

* Apply percent tooltip formatting to sound volume sliders

* Linting and guard against a border case
2022-02-25 13:39:22 +02:00
6db4ba586c Less instantiations of listOf(HiddenToUsers) (#6220) 2022-02-24 23:20:04 +02:00
c767ebe2bf More unique typing isn't this fun 2022-02-24 16:29:09 +02:00
f14a201afb Fix Navies capturing Land Civilians (#6223)
* Correct logic for blocking Naval Melee from capturing Civilians on Land

* Even better solution now that we can move on to unguarded Civilian tiles. But still won't let us capture Civilians if we can't get there

Co-authored-by: itanasi <spellman23@gmail.com>
2022-02-24 13:38:17 +01:00
261e09e336 Rudimentary AI control over goldPercentConvertedToScience (#6221) 2022-02-24 13:36:41 +01:00
ae2b91dd67 Moved wiki links to new site links 2022-02-23 21:40:20 +02:00
b7211a582c Minor fix for global alert 2022-02-23 20:18:07 +02:00
6d7e8616ec 3.19.11-patch1 2022-02-23 18:44:40 +02:00
1fa1c6885a placeholder equality tests replaced with hasUnique() and getMAtchingUniques() instead 2022-02-23 12:16:09 +02:00
09089cb60d Added uniques and deprecations for "Requires" and "Unlocked by" uniques - #6165 2022-02-22 16:55:37 +02:00
4ad9d58850 Some of the last remaining simple uniques, from now on it's more complicated ones 2022-02-22 16:38:52 +02:00
13af71e427 Autoupdates to uniques will multiple solutions now replace to the correct one (#6208)
* Autoupdates to uniques will multiple solutions now replace to the correct one

Problem - some deprecated uniques can lead to multiple possibilities of replacements, depending on the parameter type
This lead to replacements in the jsons that were either unparseable entirely or were causing errors, both of which needed to be corrected by hand
We now separate such deprecations into their constituent potential replacement uniques, and try and take only the unique that doesn't cause any errors
Works like a charmander :)

* Conditional name change

* Resolved #6179 - when changing units production due to deprecation, notification no longer counts the same city multiple times if it appears multiple times in its queue
2022-02-22 11:33:07 +02:00
d30ea86b27 Additional guard against no-barbarian games calling doRevoltSpawn (#6213) 2022-02-22 11:30:48 +02:00
e0345bcb52 Reorganized the way city states grant resources & rounded a float to an int (#6210)
* Reorganized the way city states grant resources & rounded a float to an int

* Reworded a string so it sounds nicer
2022-02-22 11:30:33 +02:00
90386bd4e7 Made spaceship parts units instead of buildings (#6203)
* Spaceship parts are units now

* Fixed tests

* Removed commented out lines

* `Spaceship Part` unique can also go on buildings in ods
2022-02-22 11:30:20 +02:00
ca5f48ad61 Terrainfeature objects transient (#6199)
* terrainFeatures is only set through the setTerrainFeatures function

* Use cached terrainFeatures for performance

* Fixed map editor error due to not setting tileinfo ruleset
Added private set to terrainfeatureobjects
2022-02-22 11:28:24 +02:00
c9945ca7ba Make multiple tile defense bonuses stack (#6193)
* Make multiple defense bonuses stack

* Switch to check base terrin and Natural Wonders using getAllTerrains()

Co-authored-by: itanasi <spellman23@gmail.com>
2022-02-22 11:27:58 +02:00
1e24f04cf9 Added mod constants for the distance between two cities (#6211) 2022-02-22 11:17:22 +02:00
246d11bfc7 Resolved #6179 - when changing units production due to deprecation, notification no longer counts the same city multiple times if it appears multiple times in its queue 2022-02-21 18:19:30 +02:00
91816d9c37 Added "copy to clipboard" button for mod errors 2022-02-21 10:51:23 +02:00
9595247d3b Finished unique typing for CivInfo.hasUnique() and removed string version!
Damn but there are a LOT of uniques that have accumulated over time
2022-02-20 21:17:58 +02:00
cd92f66c3a Resolved ANR when copying game data to clipboard 2022-02-20 19:53:19 +02:00
2786e0091c Massive unique deprecation 2022-02-20 18:27:40 +02:00
64b8d805c3 Resolved #6184 - don't display turns to relationship change for non-decreasing city-state relationships 2022-02-20 12:45:48 +02:00
4f9c17da0b Resolved untranslated string in improvment description - #6131 2022-02-19 23:08:19 +02:00
0a4df1ca9f Resolved #6188 - don't show 'missing cities that need to build X' for buildings already built in the city
It gives the impression that the buildings stop providing their bonus if the condition is no longer satisfied
2022-02-19 23:05:47 +02:00
970e535e62 3.19.10 2022-02-19 19:57:23 +02:00
6d48f99206 Trigger uniques by sacrificing units with conditional (#6157)
* Triggered uniques currently come from researching techs, adopting policies, and building buildings.
This adds a third way of triggering uniques, by attaching them to units with a "by consuming this unit" conditional, which will be added as a possible unit action.
So for example, "[amount] Free Technologies <by consuming this unit>", "Reveals the entire map <by consuming this unit>" etc.

* Added a new uniquetype for triggerable uniques, to make them separate from regular global uniques, so that triggerable uniques can become unit uniques when necessary

* And added translations so the tests will pass
2022-02-19 19:38:39 +02:00
a8be359ed2 Damage in battle table is now the average damage done (#6176)
* Damage in battle table is now the average damage done

* Trailing comma's

* Fixed typo
2022-02-19 19:34:46 +02:00
402a9ba825 Show Improvements that are buildable after Removing TerrainFeature (#6149)
* Initial working version!

* More comments

* Add missing .tr() translation calls

* add brackets

* Fixed

* Optimize checking for removable last feature
More complete tileInfo.clone()

Co-authored-by: itanasi <spellman23@gmail.com>
2022-02-19 19:34:27 +02:00
f9bab01a64 Added conditional checking for tiles (#6187)
* Added conditional checking for tiles

* Fixed compile error

* I actually like this variable more over here
2022-02-19 19:33:44 +02:00
22466a9d45 Make tileInfo.terrainFeatures immutable (#6180)
* Step 1 of saving terrain features as a transient - move all terrainFeature changes to new 'addTerrainFeature' and 'removeTerrainFeature' functions
This also included slight rewriting of functions for clarity, but NO functional changes.
Even though there's some logic that I would definitely change, this PR isn't the place for that.

* Fixed tests
2022-02-19 19:28:05 +02:00
6e92ea4d29 Fix for #6178 music resumes after minimizing on android (#6195) 2022-02-19 18:40:52 +02:00
2d60fe4565 Prevent Civilians from capturing Civilians (#6185)
* Initial attempt

* Allow Ranged to move into unguarded Civilian Unit

* Comment for clarity

* Fix unit test so that it doesn't segfault and checks you can't move into military units

* Unify that all units can move on to (and through) unguarded civilians that you are at war with
Add TileInfo.getUnguardedCivilian() to quickly respond if there is an unguarded Civilian on the tile
Something is bugged in movement code

* Fix MapUnit.moveThroughTile() so that it doesn't segfault by fixing getUnguardedCivilian()

* captureCivilianUnit() call is now redundant in postBattleMoveToAttackedTile() since canMoveTo() will now return true and capture will happen during the moveToTile() call

* Add check so Civilian Units don't capture other Civilians

* Change logic to isMilitary()

Co-authored-by: temurakami <spellman23@gmail.com>
2022-02-19 18:37:38 +02:00
4e338ae4f3 Embarking penalty logic fix (#6181)
* Fox naval unit Landind penalty is for attacking on to land

* Only Land unit should have Boarding penalty

* Unbreak logic

Co-authored-by: itanasi <spellman23@gmail.com>
2022-02-18 13:15:35 +01:00
82236fe2c8 More uniquetyping 2022-02-18 13:42:23 +02:00
0171ad168f #6131 fixes
Partially translated Uniques when picking a Pantheon
2022-02-18 00:19:45 +02:00
b8d8e11a86 #6131 fixes
Fixed icon and text for resource stats improvements in Improvement Civilopedia pages
Fixed 'null' for improvement picker for some resource-only improvements
2022-02-18 00:16:02 +02:00