Commit Graph

219 Commits

Author SHA1 Message Date
EmperorPinguin
6f4d8fd7b5
Improve AI city settling, science game, and belief picking (#12256)
* AI behaviour changes

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update ConstructionAutomation.kt

* Update Automation.kt

* Reverting some changes

* Changes

* revert changes

* revert changes

* revert changes

* revert changes

* Update CityLocationTileRanker.kt

* Citizen assignment for stat conversion

* Update CityLocationTileRanker.kt

* Reduce AI settling

* Avoid AI building units when in negative Supply

* Update CityLocationTileRanker.kt

* Update CityLocationTileRanker.kt

* Update CityLocationTileRanker.kt

* Update ConstructionAutomation.kt

* Update build.gradle.kts

* Update gradle-wrapper.properties

* Update CityLocationTileRanker.kt

* Update CityLocationTileRanker.kt

* Update ConstructionAutomation.kt

* Update CityLocationTileRanker.kt

* AI changes for humans

* Fix puppet focus

* Update Automation.kt

* Puppet focus

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Stats.kt

* Update CityTurnManager.kt

* Remove specialist science modifier

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update CivilianUnitAutomation.kt

* Update ReligionAutomation.kt

* Worker prioritization

Workers are valuable in expand cities.

* Update ConstructionAutomation.kt

Food always important, it's rarely good to skip e.g. granary if we're on 6 pop.

* Update ConstructionAutomation.kt

Should achieve about the same with less lines of code.

* Update Automation.kt

* Update ConstructionAutomation.kt

* Update Policies.json

* Update Policies.json

* Update Policies.json

* Update ConstructionAutomation.kt

* Update Policies.json

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Rename Crop Yield to Growth

* Update worker usage

* Update UnitAutomation.kt

* Tutorials update

* Update Tutorials.json

* Fix spelling error

* Update Tutorials.json

* Update Tutorials.json

* Update Tutorials.json

* Update Tutorials.json

* Update Tutorials.json

* Update Tutorials.json

* Update Tutorials.json

* Update Tutorials.json

* AI tech and policy choices

* Update Techs.json

* Update Policies.json

* Update ConstructionAutomation.kt

* Update UnitPromotions.json

* Update

* Update Policies.json

* Update Tutorials.json

* ReligionAutomation bugfix

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update AI city settling and science game

* Update ReligionAutomation.kt

* Maybe revert this now the belief picking has improved

* Update ReligionAutomation.kt
2024-10-06 16:46:46 +03:00
EmperorPinguin
41eab84051
Improve AI tech and policy choices (#12234)
* AI behaviour changes

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update ConstructionAutomation.kt

* Update Automation.kt

* Reverting some changes

* Changes

* revert changes

* revert changes

* revert changes

* revert changes

* Update CityLocationTileRanker.kt

* Citizen assignment for stat conversion

* Update CityLocationTileRanker.kt

* Reduce AI settling

* Avoid AI building units when in negative Supply

* Update CityLocationTileRanker.kt

* Update CityLocationTileRanker.kt

* Update CityLocationTileRanker.kt

* Update ConstructionAutomation.kt

* Update build.gradle.kts

* Update gradle-wrapper.properties

* Update CityLocationTileRanker.kt

* Update CityLocationTileRanker.kt

* Update ConstructionAutomation.kt

* Update CityLocationTileRanker.kt

* AI changes for humans

* Fix puppet focus

* Update Automation.kt

* Puppet focus

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Stats.kt

* Update CityTurnManager.kt

* Remove specialist science modifier

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update CivilianUnitAutomation.kt

* Update ReligionAutomation.kt

* Worker prioritization

Workers are valuable in expand cities.

* Update ConstructionAutomation.kt

Food always important, it's rarely good to skip e.g. granary if we're on 6 pop.

* Update ConstructionAutomation.kt

Should achieve about the same with less lines of code.

* Update Automation.kt

* Update ConstructionAutomation.kt

* Update Policies.json

* Update Policies.json

* Update Policies.json

* Update ConstructionAutomation.kt

* Update Policies.json

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Rename Crop Yield to Growth

* Update worker usage

* Update UnitAutomation.kt

* Tutorials update

* Update Tutorials.json

* Fix spelling error

* Update Tutorials.json

* Update Tutorials.json

* Update Tutorials.json

* Update Tutorials.json

* Update Tutorials.json

* Update Tutorials.json

* Update Tutorials.json

* Update Tutorials.json

* AI tech and policy choices

* Update Techs.json

* Update Policies.json

* Update ConstructionAutomation.kt

* Update UnitPromotions.json

* Update

* Update Policies.json

* Update Tutorials.json

* ReligionAutomation bugfix

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt
2024-09-25 20:46:07 +03:00
yairm210
327d880b11 Added Barbarian image variants for AbsoluteUnits by Pelo 2024-09-09 10:33:17 +03:00
yairm210
84efb797a3 Make event choices ruleset objects, with standard "uniques" field 2024-09-05 21:00:30 +03:00
yairm210
f6efdd105f All unit trigger uniques start with a targetting parameter 2024-08-22 01:21:38 +03:00
yairm210
4d39c80c93 Allowed specifying custom colors for unit promotions 2024-08-19 16:24:45 +03:00
EmperorPinguin
1a6d2279f5
AI changes (#12109)
* AI behaviour changes

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update ConstructionAutomation.kt

* Update Automation.kt

* Reverting some changes

* Changes

* revert changes

* revert changes

* revert changes

* revert changes

* Update CityLocationTileRanker.kt

* Citizen assignment for stat conversion

* Update CityLocationTileRanker.kt

* Reduce AI settling

* Avoid AI building units when in negative Supply

* Update CityLocationTileRanker.kt

* Update CityLocationTileRanker.kt

* Update CityLocationTileRanker.kt

* Update ConstructionAutomation.kt

* Update build.gradle.kts

* Update gradle-wrapper.properties

* Update CityLocationTileRanker.kt

* Update CityLocationTileRanker.kt

* Update ConstructionAutomation.kt

* Update CityLocationTileRanker.kt

* AI changes for humans

* Fix puppet focus

* Update Automation.kt

* Puppet focus

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Automation.kt

* Update Stats.kt

* Update CityTurnManager.kt

* Remove specialist science modifier

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update CivilianUnitAutomation.kt

* Update ReligionAutomation.kt

* Worker prioritization

Workers are valuable in expand cities.

* Update ConstructionAutomation.kt

Food always important, it's rarely good to skip e.g. granary if we're on 6 pop.

* Update ConstructionAutomation.kt

Should achieve about the same with less lines of code.

* Update Automation.kt

* Update ConstructionAutomation.kt

* Update Policies.json

* Update Policies.json

* Update Policies.json

* Update ConstructionAutomation.kt

* Update Policies.json

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Update ReligionAutomation.kt

* Rename Crop Yield to Growth
2024-08-17 21:40:20 +03:00
SomeTroglodyte
5ad68bb14d
Deprecate NaturalWonderConvertNeighborsExcept (#12098) 2024-08-14 09:48:43 +03:00
yairm210
1122195e14 Improvement Unique converted to trigger - "Gain control over [tileFilter] tiles in a [amount]-tile radius" 2024-07-29 11:57:20 +03:00
aaronjfeingold
34f614c54b
Correct spelling of 'Svannah' to 'Savannah' across project. (#12018) 2024-07-27 23:41:46 +03:00
Oskar Niesen
7d69945c57
Make AI difficulty changable (#11996)
* Added AIDifficultyLevel to the difficulty object

* Fixed difficulty levels not showing in the cyclopedia screen
2024-07-21 10:01:15 +03:00
yairm210
147fdb24fa "choose tech" tutorial hidden until player has founded a city 2024-07-18 17:43:49 +03:00
SpacedOutChicken
81130a541e
Remove old "will be replaced by automated units" unique (#11932)
* Remove "will be replaced" old unique

* Update TileImprovements.json
2024-07-09 17:24:58 +03:00
SpacedOutChicken
aeea13bb71
Update uniques for withdrawing before melee combat (#11904)
* - Turn Privateer's unique ability into a promotion
- Add promotion to Privateer and Sea Beggar

* Update uniques for withdrawing before melee combat
2024-07-03 15:08:49 +03:00
yairm210
c42170a4b8 Fix base rulesets 2024-06-26 09:35:40 +03:00
yairm210
095c4faed6 Countables for Cities, Units, Buildings allow filters 2024-06-25 23:56:01 +03:00
yairm210
d640ed9557 Revert "Better countables - phase 1"
This reverts commit 7165c62573.
2024-06-25 23:44:10 +03:00
yairm210
7165c62573 Better countables - phase 1 2024-06-25 23:43:11 +03:00
yairm210
2093761e2d Resolved #11829 - "after [amount] turns" -> "after turn number [amount]" 2024-06-25 16:01:57 +03:00
Yair Morgenstern
0f683b1725 Resolves #11758 - fix typos in new tutorials 2024-06-24 23:36:37 +03:00
SpacedOutChicken
dc9bf45009
- Turn Privateer's unique ability into a promotion (#11761)
- Add promotion to Privateer and Sea Beggar
2024-06-19 17:13:15 +03:00
Yair Morgenstern
79be14e291 Resolved #11082 - Added "Will not be replaced by automated units" unique 2024-06-17 23:12:50 +03:00
Yair Morgenstern
0a357e3598 Resolved #11758 2024-06-15 23:14:51 +03:00
Oskar Niesen
2b8c965d6b
Personality implementation (#11729)
* Add Personalities.json

* Personality tags

* Askia, Attila, Augustus Personalities

* Bismark & Boudica

* Added parsed personalities

* Linked Personalities to their nation

* Tweaked some personalities

* Added the declareWar Personality

* Fixed some misnaming

---------

Co-authored-by: Caballero Arepa <78449553+Caballero-Arepa@users.noreply.github.com>
2024-06-15 22:02:51 +03:00
SomeTroglodyte
d39c7a97bf
Use Events for the floating "Tutorials" (#11717)
* Split off reuses of CityStateIcons/Cultured to allow modding separately

* Reposition floating tutorials in case the TopBar moved its buttons

* Event definition, art and basic support

* Split off Event rendering from AlertPopup

* Support Event presentation modes and replace hardcoded floating tutorials

* "Meet another civilization" art - can't find any better

* Tweak TranslationFileWriter and some polishing
2024-06-10 22:22:18 +03:00
yairm210
c89b2666c9 Specific uniques to generic trigger: "upon expending a [mapUnitFilter] unit" 2024-06-10 17:35:23 +03:00
Yair Morgenstern
68e29e9c53
"(modified by game speed)" modifier (#11696)
* "(modified by game speed)" modifier

* Added missing flags

* Fixed G&K ruleset
2024-06-08 21:58:52 +03:00
Oskar Niesen
ba0c5cfbae
Spy max rank can be modded (#11650)
* Changed the spy level cap to be a mod constant

* Spy rank shows with more stars

* Reverted some temporary debug changes

* Changed Promotes all spies to accept an amount

* Change Promotes all spies [amount] time(s) to have parenthesis around the s

* Fixed problem with merging
2024-06-04 18:03:48 +03:00
yairm210
5739afe173 Resolved #11643 - Mamalahoe Kawanai -> Kanawai Mamalahoe 2024-05-27 14:09:06 +03:00
SomeTroglodyte
c5df845611
Fix bug in ModConstants handling (#11645)
* Fix a few unhelpful mod checker warnings

* Fix a problems with ModConstants and unit tests for them

* Minor linting
2024-05-27 12:30:51 +03:00
yairm210
0aa70668cc Barbarian water units no longer pillage 2024-05-16 07:06:21 +03:00
Skekdog
50274a42ad
Corrected Coast yields to give 1 Food and 1 Gold (#11583)
* Coast also yields 1 Gold

* Coast also yields 1 Gold and 1 Food in Vanilla
2024-05-14 10:59:18 +03:00
SomeTroglodyte
628bd71830
Spy UI improvements (#11570)
* Minor linting

* More linting

* Consistent naming city/location, cache city on Spy (tile visibility perf)

* Empower SpyAction enum (minor perf)

* NotificationAction for Espionage, shorthand on the Spy instance

* Fix National Intelligence Agency giving one extra Spy level

* Fix "Move Spies" NextTurnButton prompt appearing every turn when spies are in Surveillance

* Fix failed tech theft rewarding tech anyway (and open spy kill chance when theft ordered but nothing to steal)

* Finally refactor SmallButtonStyle as standalone component

* Fix unable to assign spies for counter-intelligence

* Shorten establish-network phase for domestic spy placement

* Refactor and prettify MoveToCityButton, reuse as pointer who is to move (and some tiny changes)

* Decorate Spy icons by rank and show those in the hideout too

* Make city name labels in Espionage screen clickable

* Umm... duplicate targets behave same as single targets

* Spy mechanics - no establish network before counter-intelligence, commenting

* Oops, those lines do not belong in this branch anyway
2024-05-11 21:36:07 +03:00
Oskar Niesen
4aa75896e1
Add missing espionage uniques (#11559)
* Added "New spies start with [1] level(s)" unique

* Added England extra spy unique

* Fixed SpyStartingLevel target

* Added addspy notification
2024-05-04 21:04:17 +03:00
Oskar Niesen
ef9965e218
Espionage Uniques, Buildings and Policy (#11401)
* Added OneTimeSpiesLevelUp, OneTimeGainSpy, SpyEffectiveness, EnemySpyEffectiveness and HiddenWithoutEspionage Uniques

* Spy effectiveness affects stealing tech and rigging elections

* Fixed HiddenWithoutEspionage

* Added Constabulary and Police Station

* Added cityFilter to SpyEffectiveness

* Added national Intelligence agency

* Added Great Firewall

* Fixed great firewall having a float value

* EspionageManager addSpy now returns Spy instead of name

* Added some simple espionage tests

* Fixed OneTimeSpiesLevelUp still wanting parameter

* Spy efficiency occurs after skill modifier

* Added another test

* Added Police State spy efficiency reduction unique

* Fixed "Hidden when espionage is disabled" wording

* Fixed "effectiveness" wording

* Changed "enemy spy effectiveness" unique to use negative matters

* Spy effectiveness only affect tech steal rate

* Changed "Gain an extra spy" and "Promotes all spies" uniques

* Removed Police State comment that is no longer accurate

* Changed spy effectiveness to be multiplicative
2024-04-09 23:12:21 +03:00
yairm210
8bd8ed683f Fix deprecated conditionals, caught by new mod checker 2024-04-07 12:43:38 +03:00
PLynx
0caf0cb4fa
Add configurable natural wonder discovery stat bonuses (#11249)
* Added configurable natural wonder discovery stats

* Shortened the code

* Updated the base rulesets with new unique

* Updated the El Dorado unique

* Applied the suggestions

* Reintroduced the implementation for deprecated uniques

* Changed tile.naturalWonder to naturalWonder
2024-04-04 23:39:31 +03:00
ravignir
8b246f17ff
fix misimplemented Dromon (#11366)
Dromons in civ5 have +50% strength vs Water units not +50% vs Wounded units
2024-03-30 22:55:10 +03:00
Jeremy Woo
bd71ba683f
Fixed uniques of marble (#11353) 2024-03-25 23:20:22 +02:00
Caballero Arepa
b678f697a5
Remove comments of the terrain colors, and enhance tundra color (#11320)
* Vanilla Vanilla

* Remove terrain color comment

And improve tundra color
2024-03-17 23:12:50 +02:00
Jeremy Woo
928f0df01f
Added multi filter support for BuildingFilter !! (#11319)
* Fixed policies do not grant production bonus to wonders

* Added multi-filter and tech filter for buildingFilter

* Rectification of the uniques of monument to the gods and marbles

* Fixed mod checker issued warnings regarding the techFilter in Unit and Building Filters.

* Edit Unique-parameters.md

* Undo 'Fixed policies do not grant production bonus to Wonders
2024-03-17 23:12:40 +02:00
itanasi
e9c3350ec5
Expand CanOnlyBeBuiltInCertainCities to include Units and convert to use Conditionals (#11274)
* Remove Transform requirement checks

* Add back in requirement for OnlyAvailable
New BuildableOnly unique

* Instead of a new unique, expand CanOnlyBeBuiltInCertainCities to instead take conditionals

* Rename to notMetRejections and copy to BaseUnit
Add CanOnlyBeBuiltInSpecificCities to constructionRejectionReasonType

* Setup CanOnlyBeBuiltInCertainCities as depreciated (renamed CanOnlyBeBuiltInCertainCities_dep)

* Redirect Depreciation

* Quick Camel Case rename

* Function renaming and moving Unique to general Construction Uniques

* spelling

* Move Unique. Update Error message

* version
2024-03-13 23:12:10 +02:00
Yair Morgenstern
27d63f00f4 Added 'city addbuilding', 'city removebuilding' console commands 2024-02-27 13:22:10 +02:00
SeventhM
5730d1b80a
Conditional for building in amount of cities (#11101)
* Conditional for building in amount of cities

* fix order of operations

* Deprecate old require in amount cities uniques

* import

* Fix referring to the unique instead of the conditional

* Fix yield message

* I have no clue how this isn't imported, but I'mma assume this translates fine anyways

* Rename text for unique

* revert unique text

* Whoops

* Remove unnecessary puppet check

* Move additional description to it own function

* Split missing city text into its own function

* Move ToDo comment

* flip to be easier to read

* Move onlyAvailable rejections to its own function to be easier to work with

* Add in the word "of"
2024-02-17 21:41:05 +02:00
Yair Morgenstern
0be8fa8e39 Fixed unhappiness effect when at 0 happiness 2024-02-09 12:14:17 +02:00
Yair Morgenstern
8aab8f71e4 Replaced special "hidden after generating a Great Prophet" with a more multi-purpose conditional 2024-01-25 22:49:34 +02:00
SeventhM
cc8a0ab9eb
Fix build errors (#11000)
* Fix build errors

* [+30%]%

* Apparently I need to specify cities or units

* Screw it, add "vs [combatantFilter]"

* Accidental listing twice

* case
2024-01-25 09:05:08 +02:00
Ouaz
d69b458481
Add modified nation descriptions (#8261)
* Add modified nation descriptions

Original descriptions reworded and a bit shortened.

* Fix Greece description

* Add modified nation descriptions (vanilla)

* Improvements to Nation descriptions

Fixes and improvements by Yairm

* Improvements to Nations descriptions (vanilla)

Fixes and improvements by Yairm

* Improve startIntroPart2 for all nations

Also add fixes/improvements by Yairm.

* Improve startIntroPart2 for all nations (vanilla)

Also add fixes/improvements by Yairm.
2024-01-14 09:05:09 +02:00
SeventhM
665b5aa87c
Add unique to allow for generalized great generals (#10828)
* Add unique to allow for generalized great generals

* Don't add compatibility for rulesets with conditional generals

* Add to rulesets

* add in pre Kotlin 9 parenthesis

* whoops missed a parenthesis

* I guess pre Kotlin 9 parenthesis was unnecessary, whoops

* Add back old variables to clone function

* Move the list of all potential generals to Ruleset

* Move list of unit construction rejections to IConstruction

* flip !any{} to none{}

* Fix imports

* Typo
2024-01-04 09:03:14 +02:00
itanasi
ffd5fc62ed
Enable Domination to Capture All Capitals (#10769)
* Enable Domination to Capture All Capitals

* Update Text
2023-12-22 09:38:24 +02:00