Commit Graph

2920 Commits

Author SHA1 Message Date
0543c6473f Welp now it builds fine 2020-10-08 17:34:35 +03:00
8df9a4fd7e Merge branch 'master' of https://github.com/yairm210/Unciv 2020-10-08 17:12:01 +03:00
e14db65996 Resolved #3239 - simplified unit actions, which were unnecessarily complicated 2020-10-08 17:11:37 +03:00
fea342a31b Clear Barbarian Camp quest (#3246) 2020-10-08 16:29:56 +03:00
eaa89d69f4 Pixel unit colors based on civilization colors (#3231)
* Enabled Pixel Unit colors based on civilization colors

* Strict pattern for image layers

* Updated docstring

* Reworked layers' retrieval
2020-10-08 15:42:16 +03:00
0b9bcabea4 Added resource-providing building unique 2020-10-08 15:36:00 +03:00
55d904e1cd Confirmation popup when clearing the map in the map editor 2020-10-08 15:34:31 +03:00
36ed648621 Files in the mod folder no longer crash the game on startup 2020-10-08 15:33:55 +03:00
da328c0408 Unified Unit Category Checking For Uniques (#3238)
* Starting unified unit category checking. This will increase flexibility with uniques as well as cut down on uniques that have only a slightly different way of checking unit categories.

Things currently checked by the category checking method are:
Type of unit
Name of unit
Whether unit is wounded
If the unit is land, water, or air

"Bonus vs City y%" still works currently.

Uniques that have been changed/added to use this category checking method so far are:

"Bonus vs x y%"
"[] units deal +[]% damage" (parameterization of "Wounded military units deal +25% damage")
"[] units gain the [] promotion"

If PR approved, using this method for more uniques would be a good idea.

Commented as depecrated are these uniques
"+[]% Strength vs []" (this has not been used in json files)
"Wounded military units deal +25% damage" (policies json file was updated to use parameterized version)

The following was added to template.properties for translating modifiers:

Air
Wounded

* translation ending with a space

* -Changed matchesCategory method for CityCombatant to what was suggested
-Changed matchesCategory method for MapUnitCombatant to what was suggested
-Use type.name instead of type.toString().toLowerCase()
-Lowercasing is no longer allowed for type names and unit names.

I kept the lower cased versions of wounded, land, water, and air for compatibility as several of the uniques are phrased like "Bonus vs land units 25%" and such and have entries in template.properties (ie. land units = ).

* -Lowercasing is no longer allowed. For wounded, land, water or air, you have to either use the capitalized version (ie. "Wounded") or lower case with units (ie. "wounded units"). This lets preexisting uniques that use "wounded units" etc still work while also letting people use the singular capitalized word (ie. "Wounded") for other uniques.

* fixed missing check for wounded units
2020-10-08 13:09:05 +03:00
4fa7c8d4c6 3.11.2 2020-10-08 12:47:08 +03:00
7aedb6d4df Find Player quest (#3237)
* Find Player quest

* Sequences
2020-10-08 12:25:58 +03:00
4e50ea9618 Merge remote-tracking branch 'origin/revert-3240-TechUniques' 2020-10-08 12:23:53 +03:00
18c837a7ed More informative alert for tech modders 2020-10-08 12:21:43 +03:00
236c7a1c15 Revert "When checking for nation uniques, it also checks the tech uniques (#3240)"
This reverts commit 31226c97e8.
2020-10-07 23:05:46 +03:00
31226c97e8 When checking for nation uniques, it also checks the tech uniques (#3240)
* When checking for nation uniques, it also checks the tech uniques

* asSequence() before map
2020-10-07 23:05:06 +03:00
223e52fe32 "matches" is a more intuitive name than "fits" for filtering 2020-10-07 14:17:50 +03:00
a485ad5fa5 Merge branch '3.11.1-patch1' 2020-10-07 14:13:30 +03:00
8c1913c2c4 Total conversion mods should handle missing specialists (altough they really should deal with it) 2020-10-07 14:03:27 +03:00
1a4cc125c3 And for units as well of course 2020-10-07 13:44:42 +03:00
e9835eab12 Resolved #3229 - added "Not displayed as an available construction unless [] is built" unique 2020-10-07 13:41:56 +03:00
1dd82f6f58 Find Natural Wonder Quest implemented (#3211)
* Find Natural Wonder Quest implemented

* List to sequence to list
2020-10-06 13:59:54 +03:00
fa59d4888a Era-specific city tiles for Ancient, Classical and Medieval 2020-10-06 12:22:55 +03:00
bb5eff5250 Battle damage calculations changed to ints, for simplicity 2020-10-06 11:16:33 +03:00
9ffa0bee54 Consolidated Generic Tile Bonus Uniques (including Friendly Land, Foreign Land) (#3232)
* Redid things with help from HadeanLake:

-"+[]% combat bonus in []" Unit Unique
-"+[]% combat bonus for units fighting in []" Nation Unique
-Both of these can check for terrain or Friendly Land or Foreign Land
-Function to add stacking modifiers
-Himeji Castle and Foreign Legion had uniques changed to fit this syntax
-Old way still works for now, but deprecated

* fixed comments about deprecation and the new syntax
2020-10-06 10:52:30 +03:00
f9ebc8aa0f Acquire Great Person Quest implemented (#3210)
* Acquire Great Person Quest implemented

* List to sequence to list
2020-10-06 10:48:59 +03:00
8e53be616d Ui fixes (#3218)
* moving close button to end of the list and setting color to red

* aligning text/icon in main screen top bar
2020-10-06 10:28:13 +03:00
93bf69f3d5 Fixes for minor bugs from the previous version 2020-10-05 23:20:49 +03:00
256eedc7c0 Lines go behind the techs in the tech screen, and are colored so you can trace the path of the current research queue 2020-10-05 12:12:15 +03:00
5553be0d67 Minimap no longer adds city indicator on every update, leading to lower framerate over time 2020-10-05 11:45:55 +03:00
523ed10e68 Specialist names are taken from the json files 2020-10-04 16:25:07 +03:00
58d651bfe2 MODDABLE SPECIALISTS ARE GO! 2020-10-04 16:16:42 +03:00
a24dc7cc69 Completely removed usages of the old getMaxSpecialists 2020-10-04 15:47:57 +03:00
fd6956507d Merge tag '3.11.0-patch1' 2020-10-04 15:20:48 +03:00
be2dd5c068 3.11.0-patch1
Solved some errors that occured as a result of the recent changes assuming the specialists exist, which is not true in revamp mods
2020-10-04 15:18:26 +03:00
2d6c322856 Connect Resource Quest implemented (#3209)
* Removed superfluous filters in getResourceForQuest
2020-10-04 15:01:57 +03:00
67efd6c957 Problem: Some promotions in CIV 5 have multiple effects, but Unciv promotions only allow for one effect (#3219)
Solution: This PR adds "uniques" field to allow for multiple effects, while keeping "effect" field so that rulesets prior to this PR can still work.
2020-10-04 10:55:42 +03:00
3e98e0c00f 3.11.0 2020-10-03 20:48:34 +03:00
bddded04f5 Patch of the promotion exploit (#3214) 2020-10-03 20:24:19 +03:00
300c7179e7 Various Quest relted (#3206)
* Renamed some quests to better ones (Kill Camp -> Clear Barbarian Camp and Kill City State -> Conquer City State)
* Quests names are hardcoded in a enum class
* Quests.json translations automated
2020-10-01 21:08:26 +03:00
a4d1232403 Final conversion of existing specialists to the new format 2020-10-01 17:06:34 +03:00
fab8242c6a "[] units gain the [] promotion" (#3204) 2020-10-01 09:51:24 +03:00
bfa9c65700 Modding - Buildings can be rendered obsolete (unbuildable) by techs 2020-09-30 23:17:09 +03:00
aa2486c896 Great person points come from the json! The only things that still happen directly to the specialists stats is the assign/unassign, this is as close as we'll get without changing the rest of it! 2020-09-30 20:18:52 +03:00
e39d3e89da All specialist colors come from the json now :) 2020-09-30 19:42:47 +03:00
5677fb494a Added helper function colorFromRGB(List<Int>) 2020-09-30 19:26:20 +03:00
43f5799578 Specialist information is now hybrid 2020-09-30 18:03:26 +03:00
9f9d89af9d resourceIsVisible to be checked before getting tile resource (#3201) 2020-09-30 17:28:05 +03:00
e983be0325 Started converting specialists to by-json and by-name 2020-09-30 13:10:02 +03:00
f411089b8d Better improvement on tile checks 2020-09-30 11:06:51 +03:00
f50a757069 Unified "improvement on tile" checks 2020-09-30 10:51:22 +03:00