Commit Graph

2725 Commits

Author SHA1 Message Date
Yair Morgenstern
9a887e4840 Resolved #3254 - food-to-production not added twice when calculating turns to production 2020-10-11 22:10:32 +03:00
Federico Luongo
80ce4496c9
City states button influence bar (#3248)
* City States influence fix

* Influence when at war = -60f
* Enemies if influence < 0f, neutrality is only from 0f to 30f
* Changed RelationshipLevel accordingly

* City States buttons influence bar

* Influence bar in DiplomacyScreen
2020-10-10 22:59:17 +03:00
Yair Morgenstern
f7ff1bd267 Translation generation can handle multiple parameters of the same type 2020-10-09 14:39:41 +03:00
Yair Morgenstern
be5f42f94b AI does not construct science-related constructions when all techs have been researched 2020-10-09 14:22:57 +03:00
Yair Morgenstern
e292c210c8 Added "Must be next to []" unique for tile improvements 2020-10-08 17:35:25 +03:00
Yair Morgenstern
0543c6473f Welp now it builds fine 2020-10-08 17:34:35 +03:00
Yair Morgenstern
8df9a4fd7e Merge branch 'master' of https://github.com/yairm210/Unciv 2020-10-08 17:12:01 +03:00
Yair Morgenstern
e14db65996 Resolved #3239 - simplified unit actions, which were unnecessarily complicated 2020-10-08 17:11:37 +03:00
Federico Luongo
fea342a31b
Clear Barbarian Camp quest (#3246) 2020-10-08 16:29:56 +03:00
Federico Luongo
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
Yair Morgenstern
0b9bcabea4 Added resource-providing building unique 2020-10-08 15:36:00 +03:00
Yair Morgenstern
55d904e1cd Confirmation popup when clearing the map in the map editor 2020-10-08 15:34:31 +03:00
Yair Morgenstern
36ed648621 Files in the mod folder no longer crash the game on startup 2020-10-08 15:33:55 +03:00
givehub99
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
Yair Morgenstern
4fa7c8d4c6 3.11.2 2020-10-08 12:47:08 +03:00
Federico Luongo
7aedb6d4df
Find Player quest (#3237)
* Find Player quest

* Sequences
2020-10-08 12:25:58 +03:00
Yair Morgenstern
4e50ea9618 Merge remote-tracking branch 'origin/revert-3240-TechUniques' 2020-10-08 12:23:53 +03:00
Yair Morgenstern
18c837a7ed More informative alert for tech modders 2020-10-08 12:21:43 +03:00
Yair Morgenstern
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
givehub99
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
Yair Morgenstern
223e52fe32 "matches" is a more intuitive name than "fits" for filtering 2020-10-07 14:17:50 +03:00
Yair Morgenstern
a485ad5fa5 Merge branch '3.11.1-patch1' 2020-10-07 14:13:30 +03:00
Yair Morgenstern
8c1913c2c4 Total conversion mods should handle missing specialists (altough they really should deal with it) 2020-10-07 14:03:27 +03:00
Yair Morgenstern
1a4cc125c3 And for units as well of course 2020-10-07 13:44:42 +03:00
Yair Morgenstern
e9835eab12 Resolved #3229 - added "Not displayed as an available construction unless [] is built" unique 2020-10-07 13:41:56 +03:00
Federico Luongo
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
Yair Morgenstern
fa59d4888a Era-specific city tiles for Ancient, Classical and Medieval 2020-10-06 12:22:55 +03:00
Yair Morgenstern
bb5eff5250 Battle damage calculations changed to ints, for simplicity 2020-10-06 11:16:33 +03:00
givehub99
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
Federico Luongo
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
Mojtaba Rahimy
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
Yair Morgenstern
93bf69f3d5 Fixes for minor bugs from the previous version 2020-10-05 23:20:49 +03:00
Yair Morgenstern
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
Yair Morgenstern
5553be0d67 Minimap no longer adds city indicator on every update, leading to lower framerate over time 2020-10-05 11:45:55 +03:00
Yair Morgenstern
523ed10e68 Specialist names are taken from the json files 2020-10-04 16:25:07 +03:00
Yair Morgenstern
58d651bfe2 MODDABLE SPECIALISTS ARE GO! 2020-10-04 16:16:42 +03:00
Yair Morgenstern
a24dc7cc69 Completely removed usages of the old getMaxSpecialists 2020-10-04 15:47:57 +03:00
Yair Morgenstern
fd6956507d Merge tag '3.11.0-patch1' 2020-10-04 15:20:48 +03:00
Yair Morgenstern
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
Federico Luongo
2d6c322856
Connect Resource Quest implemented (#3209)
* Removed superfluous filters in getResourceForQuest
2020-10-04 15:01:57 +03:00
givehub99
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
Yair Morgenstern
3e98e0c00f 3.11.0 2020-10-03 20:48:34 +03:00
Jack Rainy
bddded04f5
Patch of the promotion exploit (#3214) 2020-10-03 20:24:19 +03:00
Federico Luongo
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
Yair Morgenstern
a4d1232403 Final conversion of existing specialists to the new format 2020-10-01 17:06:34 +03:00
givehub99
fab8242c6a
"[] units gain the [] promotion" (#3204) 2020-10-01 09:51:24 +03:00
Yair Morgenstern
bfa9c65700 Modding - Buildings can be rendered obsolete (unbuildable) by techs 2020-09-30 23:17:09 +03:00
Yair Morgenstern
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
Yair Morgenstern
e39d3e89da All specialist colors come from the json now :) 2020-09-30 19:42:47 +03:00
Yair Morgenstern
5677fb494a Added helper function colorFromRGB(List<Int>) 2020-09-30 19:26:20 +03:00