Commit Graph

3942 Commits

Author SHA1 Message Date
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
Xander Lenstra
091622612c
Added default values for supply to fix almost all mods being broken (#5373) 2021-10-03 11:46:04 +03:00
SomeTroglodyte
057f9b3f7b
Reduce Mod checker messages for a set of deprecated UniqueTypes (#5370) 2021-10-03 11:45:50 +03:00
SimonCeder
9016385f30
Barbarian spawning and camp placements (#5354)
* barbarian camp placement, spawn countdowns

* separate file

* raging barbarians

* faster spawn when attacked

* Barbarian AI

* works on old saves

* template.properties

* fix percent

* no improvements unique

* fix test fail

* reviews

* reviews pt 2
2021-10-03 11:45:02 +03:00
SimonCeder
344c96319b
Fix Fountain of Youth (#5355)
* fix fountain of youth

* fix test fail

* reviews

* reviews
2021-10-01 15:51:30 +03:00
SomeTroglodyte
03f374b058
Currently playing music track displayed under Options-Sound (#5357) 2021-09-30 06:35:20 +03:00
SomeTroglodyte
6cfc0a82d8
Deprecation message options only (#5352)
* Do not show RulesetErrorSeverity.WarningOptionsOnly on new game screen

* Do not show RulesetErrorSeverity.WarningOptionsOnly on new game screen - fresh atlas
2021-09-29 21:25:44 +03:00
SomeTroglodyte
fb30a76e85
Civilopedia category icons and keyboard navigation (#5341)
* Civilopedia category icons and keyboard navigation

* Civilopedia category icons - white alternative
2021-09-29 17:39:02 +03:00
SomeTroglodyte
4c87d98aaa
Fix Mod unpack folder move (#5346)
* Fix Mod unpack folder move

* Fix Mod unpack folder move - comment
2021-09-29 12:34:58 +03:00
Xander Lenstra
bb5825a325
First step into unifying strength bonuses using conditionals (#5345) 2021-09-29 08:35:37 +03:00
SomeTroglodyte
8ee36d43d7
Allow Deciv Redux start with >0 City States (#5348) 2021-09-29 06:19:49 +03:00
SomeTroglodyte
070c41592f
Fix era of Wonders without tech in Wonder overview (#5347) 2021-09-29 06:19:28 +03:00
SomeTroglodyte
d3868dae62
Rework game start again (continents) (#5335)
Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2021-09-28 23:48:06 +03:00
SimonCeder
8e3d2a1b87
Fix Polynesian vision when embarked (#5325)
* fix polynesia unique

* fix polynesia unique

* Update MapUnit.kt
2021-09-28 22:44:54 +03:00
Xander Lenstra
861a42e881
Moved the check for conditionals applying to getMatchingUniques functions; rewrote civInfo.getMatchingUniques (#5342)
* Moved the check for conditionals applying to `getMatchingUniques` functions. Rewrote `civInfo.getMatchingUniques`.

* Clarified comment
2021-09-28 22:42:18 +03:00
SomeTroglodyte
0aea74d3a9
Fix right side of player nation picker no longer entirely clickable (#5338) 2021-09-27 17:29:47 +03:00
SomeTroglodyte
a487c2c373
Fix new game Mod nation icons on first open (#5334) 2021-09-27 17:28:26 +03:00
SimonCeder
e0e701058d
Proper great general points (#5329) 2021-09-27 13:38:42 +03:00
SomeTroglodyte
2e72fd52c8
Double movement unique parameterized (#5319)
* Double movement unique parameterized

* Double movement unique - all filters
2021-09-27 12:35:38 +03:00
yairm210
96511e16ef Merge remote-tracking branch 'origin/master' 2021-09-26 17:17:04 +03:00
yairm210
bb8c9d3175 More unique typing 2021-09-26 17:16:50 +03:00
Xander Lenstra
d07eed31b8
Added the Byzantine empire (#5299)
* Added Byzantine Empire as a nation

* Added unique units

* Implemented unique ability

* Refactored out the beliefContainer

* Implemented reviews

* Credits

* Enumified the uniques & added missing translatable strings
2021-09-26 16:58:24 +03:00
SomeTroglodyte
e1b2814b5d
Mini-UI to see Religion info on foreign cities (#5321) 2021-09-26 11:04:33 +03:00
SomeTroglodyte
3a858a7051
Oversight - "base hurry cost" in pedia should be multiple of 10 (#5320) 2021-09-26 10:54:38 +03:00
SomeTroglodyte
8d33dacc3c
Softcode Fountain of Youth (#5308)
* Softcode Rejuvenation

* Softcode Rejuvenation - comments
2021-09-25 22:15:03 +03:00
SomeTroglodyte
a4c38174b6
Extra embarrassing fix - Textures missing on Android (#5313) 2021-09-25 22:08:37 +03:00
Yair Morgenstern
8d631254aa
Unified many implementations of common interfaces into abstract classes (#5312)
* Unified many implementations of common interfaces into abstract classes

* RulesetObject interface
2021-09-24 17:48:06 +03:00
yairm210
ed47f16c6e Added modder warning for deprecated fields 2021-09-24 16:35:22 +03:00
SomeTroglodyte
c05bf0a2a6
Fix a Nation Picker crash (#5311) 2021-09-24 15:49:56 +03:00
Yair Morgenstern
12302deef6
Precursor to mod target check - (#5303)
* Precursor to mod target check -
Define acceptable targets for each unique holder

* Warn for bad unique targets, and divide between different types of beliefs

* Moved the belief type logic into the class, rather than being external

* Added comment that getUniqueTarget is currently unneeded, but planned for future use
2021-09-24 15:02:41 +03:00
SimonCeder
fa813f8f5e
Quests fixes and additions (#5301)
* enable all quests

* implement more quests

* weighting for quests

* global quests

* fixes

* fixes

* Update template.properties

* general string

* reviews
2021-09-24 10:05:30 +03:00
SomeTroglodyte
e9e0f2c55f
World and Natural Wonders Overview (#5297)
* World and Natural Wonders Overview

* World and Natural Wonders Overview - icon

* World and Natural Wonders Overview - groups and tuning

* World and Natural Wonders Overview - atlas

* World and Natural Wonders Overview - lint
2021-09-24 10:04:30 +03:00
SomeTroglodyte
8ef84d785e
Music controller - Fix pause (#5307) 2021-09-24 10:00:46 +03:00
yairm210
bae8bd2468 Mod error detection improvements!
Separated Warning vs Error, show "options only" warning in options only, color warnings by severity
2021-09-23 12:04:16 +03:00
SimonCeder
2e8934af17
Newly Allied city states declare war on your enemies, even unmet ones (#5298)
* new allies dow, unmet civs meet first and then dow

* no gifts for bad people
2021-09-23 11:31:36 +03:00
SomeTroglodyte
4a83bed4ba
Nation Picker visual help where to click (#5287)
* Nation Picker visual help where to click

* Nation Picker visual help where to click - circles
2021-09-23 11:23:40 +03:00
SomeTroglodyte
a5a8ea1338
Natural Wonders un-hardcoded (#5279)
* Natural Wonders un-hardcoded

* Natural Wonders un-hardcoded - oops testing change revert

* Natural Wonders un-hardcoded - tests OK

* Natural Wonders un-hardcoded - requests

* Natural Wonders un-hardcoded - hide from pedia

* Natural Wonders un-hardcoded - readable unique
2021-09-23 11:21:08 +03:00
SomeTroglodyte
8161da26de
Texture pack/load for mods also distributes by Images.*X* (#5296) 2021-09-22 22:11:39 +03:00
yairm210
66b0ddb25a Mod error detection improvements!
Separated Warning vs Error, show "options only" warning in options only, color warnings by severity
2021-09-22 21:28:19 +03:00
SimonCeder
0bb565fdc6
Can't trade resources from other trades or city-states (#5252)
* can't trade resources from city-states

* display untradeable sources in trade screen

* Update template.properties

template string

* Update Swedish.properties

* Spelling, better buttons
2021-09-22 20:21:41 +03:00
yairm210
98f14523ed Add all cityFilter strings from the 'source of truth', since many were missing from translation file 2021-09-22 19:47:31 +03:00
SomeTroglodyte
d1005327e7
Lint a few warnings and typos (#5293) 2021-09-22 19:32:25 +03:00
yairm210
5d6765a879 Resolved crash in unit civilopedia lines that depended on unitType being initialized 2021-09-22 18:32:16 +03:00
SomeTroglodyte
5e4aff90e9
Music controller with fade-over and mod capabilities. (#5273)
* Music controller with fade-over and mod capabilities.
- Preparation for music following game situations
- Minimal in-game hooks for now
- Already allows mods providing music, will play randomly

* Music controller - template
2021-09-22 09:35:33 +03:00
Xander Lenstra
b7467d3467
Added support for conditionals to some more uniques (#5280)
* Added support for conditionals to some more uniques

* Implemented a new conditional

* Added the new conditional to the translations file

* Fixed tests

* Implemented requested changes
2021-09-22 09:24:16 +03:00
Xander Lenstra
4343137b82
Save the sources of uniques with the uniques themselves (#5281) 2021-09-21 20:26:14 +03:00
Yair Morgenstern
05394f627d
Using reflection to find and report deprecated uniques (#5276)
* Using reflection to find and report deprecated uniques

* No kotlin reflection needed thank you very much
2021-09-21 20:26:05 +03:00
Xander Lenstra
7a59cbcbe8
Fixed bug where a unit auto-exploring ancient ruins would in some cases disappear after upgrading (#5285) 2021-09-21 20:18:02 +03:00
yairm210
eedfbe0235 Specify acceptable uses of this unique
Later we'll be able to check this in checkRuleset to warn against incorrect usages
2021-09-20 16:26:36 +03:00
Xander Lenstra
ce5a82c763
Fix translation tests and wrongly translated conditionals (#5272) 2021-09-20 16:04:51 +03:00
yairm210
bd7824cdb9 More UniqueType-ing, discovering an overlap this time 2021-09-19 21:33:26 +03:00
yairm210
5fc7d1ce46 Gain free building uniqueType'D 2021-09-19 21:18:56 +03:00
yairm210
bdefb7894c cityInfo.getMAtchingUniques accepts uniqueType 2021-09-19 21:15:26 +03:00
yairm210
aee087ec01 tileResource unique fully replaceable by uniques 2021-09-19 20:58:17 +03:00
Xander Lenstra
f47f427b05
Adds conditionals to most of the uniques currently in the enum (#5270)
* Moved uniques to their own folder

* Added support for conditionals to most of the uniques in the current enum

* Deprecation > removal, of course

* Fixed tests & added `.removeConditionals` before checking for placeholders
2021-09-19 18:43:32 +03:00
Xander Lenstra
62e3dbe014
Moved uniques to their own folder (#5269) 2021-09-19 18:03:41 +03:00
Xander Lenstra
cb4feb29ed
Fixed a few bugs relating to earning great prophets (#5267)
* Fixed bug where great prophets gifted by city-states wouldn't have a religion

* Fixed bug where earning/buying great prophets whithout having founded a religion would result in great prophets of your pantheon, regardless of the religious state of the city
2021-09-19 17:56:38 +03:00
SimonCeder
027057874d
Update and generalize Siam UP (#5237)
* refactor and generalize Siam UP, display correct values in diplo screen

* enable preferred diplomatic victory

* allow compatibility mode

* revisions, restore timesInPlace

* don't change game.png

* don't change game.png

* objectify and enum city state bonuses

* objectify and enum city state bonuses

* template.properties

* refactored city state bonuses into Unique

* further enumization, fix toStringWithDecimals

* reviews
2021-09-19 06:28:10 +03:00
Xander Lenstra
ba679191f8
Fixed intercept chance being invertes (#5259)
Edit made on mobile and as such untested
2021-09-18 23:42:10 +03:00
SomeTroglodyte
ec0801ccef
Nation picker portraits (#5250)
* New game nation picker spruce-up

* New game nation picker spruce-up - Ctext icon control
2021-09-18 23:31:03 +03:00
Xander Lenstra
01bfd17594
Implementation of conditionals, but better than before (#5187)
* Implementation of conditionals, but better than before

* Updated the unique while I was at it

* Fixed bug where conditionals would never apply

* Capitalization

* Minor code cleaning

* Better documentation & variable names

* Changed translation strategy

* Added missing import?
2021-09-18 23:07:53 +03:00
SomeTroglodyte
8cff3fda49
Start preference Avoid shown with red X (#5253) 2021-09-18 23:05:14 +03:00
yairm210
81a12920df Merge branch 'temp' 2021-09-18 23:03:00 +03:00
SimonCeder
803575665d fix bug on capturing capital (#5263)
(cherry picked from commit 47d1a5c009)
2021-09-18 23:02:04 +03:00
SimonCeder
8eb24ac273
Carthage civ (#5224)
* Add Carthage

* Implement uniques

* performance improvement, better elephant

* AI avoids taking too much damage from mountains

* more performance

* better AI

* can't settle cities on mountains

* AI improvement

* AI improvement

* revisions, damagePerTurn in Terrains.json

* terrain damage stored as unique in json, damage also works for terrain features

* don't change game.png
2021-09-18 20:28:12 +03:00
yairm210
7e05a56e37 Tile resource uniques now work to provide stat bonuses 2021-09-17 16:05:21 +03:00
yairm210
54ea0c89a8 Ruleset check finds errors in uniques of all kinds! 2021-09-17 14:47:03 +03:00
yairm210
fa462d830f Use enum to generate parameter names when translating - more accurate than auto-detect by parameter name! 2021-09-17 14:10:40 +03:00
SimonCeder
c2fa1366bb
Add a fixed base strength to motivationToAttack (#5248) 2021-09-17 13:23:03 +03:00
yairm210
38231bf937 More reorg, first unique with cityFilter 2021-09-17 10:53:03 +03:00
yairm210
55a77096c1 Added city filter as parameter type, some reorg 2021-09-17 10:48:16 +03:00
yairm210
2f8de2d196 Added Stats as unique parameter type 2021-09-17 10:43:03 +03:00
yairm210
af9e691102 Ease of deprecation, brought to you by unique types!
*Visible*, locatable deprecated uniques!
Stated replacement uniques!
2021-09-17 10:33:53 +03:00
yairm210
1f05239275 Unit filtering actually comes in 2 flavors - one for "unit templates", BaseUnit, and one for "actual units in the field", MapUnit. This should be reflected in the parameter names. 2021-09-17 10:14:05 +03:00
yairm210
fa939e15d9 getMatchingUnique for UniqueType - will allow us to convert most of the uniques painlessly 2021-09-17 09:55:57 +03:00
Yair Morgenstern
34cb48aa31
Unique enum compliance detection (#5226)
* Added basic functionality for uniques enum

* Added unique type to Unique class for faster enum comparisons

* And Elvis operator for unknown parameter type

* Resolved #5162 - AI much less motivated to attack city-states

* Whoops, wrong branch

* New unique checks, with enum.

* Fixed Trog's comments
2021-09-17 09:35:01 +03:00
Xander Lenstra
b73b81a313 Fix bugs and crashes (#5245)
* Fixed crash when liberating city-states

* Fixed crash & building duplication from 'legalism' policy

(cherry picked from commit b0dff6a71c)
2021-09-17 09:13:39 +03:00
Xander Lenstra
b0dff6a71c
Fix bugs and crashes (#5245)
* Fixed crash when liberating city-states

* Fixed crash & building duplication from 'legalism' policy
2021-09-17 08:44:48 +03:00
SomeTroglodyte
340bedc7ea
Implemented Unit Supply by r3versi, not by me (#5234)
* Implemented Unit Supply

Unit Supply is a soft cap to number of units. If the number of units of a civilization exceeds the total supply, a production malus (capped at 70%) is applied.

* Warning icon & message for supply deficit

* Implemented Unit Supply - atlas merge

* Unit Supply: Malus->Penalty, lint, sumOf

* Unit Supply: Fresh atlas

Co-authored-by: r3versi <fluo392@gmail.com>
2021-09-16 22:50:49 +03:00
SomeTroglodyte
3d9c5bcc34
Mod TranslationFileWriter re-work (#5219)
* Mod TranslationFileWriter re-work

* Mod TranslationFileWriter re-work - style and existing in base treatment

* Mod TranslationFileWriter re-work - style and existing in base treatment
2021-09-16 20:59:50 +03:00
SomeTroglodyte
a61efa65c9
Ask before resetting game setup to defaults (#5231) 2021-09-16 20:56:54 +03:00
Xander Lenstra
eb665a9158
Embarked units only have 1 vision (except marines) (#5215)
* Embarked units only have 1 vision

* Embarked units always only have 1 vision, unless they don't
2021-09-16 20:55:33 +03:00
SomeTroglodyte
5fd04f6e32
Modmanager sort and filter (#5186)
* Mod manager portrait mode

* Mod manager portrait and auto scroll

- MM switches to stacked expanders in portrait.
- Use AutoScrollPanes.
- Disable the enter/leave listener of AutoScrollPane in Pickers which disable the default ScrollPane to roll their own - helps all such pickers.
- No expander open/close persistence on purpose.
- PickerScreen a bit cleaned 'cuz I needed to understand something.
- Marked mods from the kill-list that are already installed.
- Button sync now OK when counterpart missing (deselects other column).

* Mod Manager sorts and filters - WIP 1

* Mod Manager sorts and filters - WIP 2

* Mod Manager sorts and filters - WIP 2a

* Mod Manager sorts and filters - WIP 3

* Mod Manager sorts and filters - atlas

* Mod Manager sorts and filters - tip
2021-09-16 20:54:47 +03:00
Yair Morgenstern
6d26a28619
Added basic functionality for uniques enum (#5222)
* Added basic functionality for uniques enum

* Added unique type to Unique class for faster enum comparisons

* And Elvis operator for unknown parameter type

* Resolved #5162 - AI much less motivated to attack city-states

* Whoops, wrong branch
2021-09-16 20:52:06 +03:00
Xander Lenstra
51bfd927c1
Fixed crash when providing free buildings (#5230) 2021-09-15 16:56:43 +03:00