Commit Graph

114 Commits

Author SHA1 Message Date
Yair Morgenstern
d20f8a53f8 Validate unique parameters for mods 2023-01-01 15:55:41 +02:00
letstalkaboutdune
b5a021cc16
SFX Update - Arrow, Crossbow (New), Metal Hit (#8262)
* Arrow, Crossbow, Metal Hit sound updates

Sourced from pixabay.com
https://pixabay.com/service/license/

* Update Credits.md
2022-12-29 23:20:33 +02:00
vegeta1k95
42a17aab5b
Corrected Civilizations colors (#8224)
Co-authored-by: tunerzinc@gmail.com <vfylfhby>
2022-12-25 10:01:40 +02:00
itanasi
bc483e8984
G&K Neutral Tile Road Maintenance (#8138)
* Redo

* New parameterized and actually used Road Unique

* Remove unneeded

* Update CURRENT_COMPATIBILITY_NUMBER since adding new serialization data

* Make neutralRoads for CivilizationInfo.kt Transient
2022-12-24 19:43:37 +02:00
vegeta1k95
78c4f6de68
Big rework of Policy Picker UI, added new ninepatch RoundedEdgeRectangleSmall (#8218)
Co-authored-by: tunerzinc@gmail.com <vfylfhby>
2022-12-24 19:17:00 +02:00
Yattong the Mackerel
20062c1c3a
Update Nations.json (#8151) 2022-12-16 10:05:32 +02:00
Yair Morgenstern
662141d661 Resolved #7479 - Removed copyrighted intro texts 2022-12-15 00:23:57 +02:00
itanasi
bb1e8dc10d
Volley only for Siege in G&K (#8086) 2022-12-05 18:23:00 +02:00
Yair Morgenstern
c9ed9d5d74 modding: Double Happiness from Natural Wonders -> [stats] from every known Natural Wonder 2022-12-02 11:50:11 +02:00
itanasi
16a7eed4ff
Add Repair and Pillaging Roads (#8015)
* Reapply Changes

* Logic clean up

* Adding getImprovementToPillage() and getRepairableImprovement()

* Cleaning up Unit Actions

* getImprovementToPillage() needs to check for Unpillagable

* Remove redundant logic since canBuildImprovement() returns true if currently repairing

* More redundant logic

* Prevent City Center from being Pillage status
addRepairAction will not show a Repair Action
Adding the improvement to be repaired/pillaged in button text
Utilizing getImprovementToPillage() more

* Some import cleanup
Add Irremovable to blockers
More consolidation of code

* More translation files

* When improvements/roads are built/removed, pillaged flag set to False

* Better and more consistent logic

* Fix dumb logic bug
2022-11-27 19:12:26 +02:00
Yair Morgenstern
545b4afc5a Generalized "Stats per policies" unique 2022-11-26 21:39:26 +02:00
Yair Morgenstern
19d591dd89 Fixed json tests 2022-11-22 00:17:10 +02:00
Yair Morgenstern
e83e733104 Added validations for city-state uniques 2022-11-21 23:03:52 +02:00
Yair Morgenstern
ee2ab74715 Converted all era uniques to conditional uniques for city-states 2022-11-21 22:46:32 +02:00
Yair Morgenstern
2e5e221158 CityStateType overhaul!!!! 2022-11-21 20:30:52 +02:00
Yair Morgenstern
6976360da6 Added CityStateTypes into rulesets! Not in use yet 2022-11-21 19:59:55 +02:00
Yair Morgenstern
e5fbb472b0 Moddable quest weighting for city-states 2022-11-19 23:54:16 +02:00
Yair Morgenstern
c98a36c10f Added before/after X turns conditionals - see #3242 2022-11-07 22:56:58 +02:00
Yair Morgenstern
3e05b875bd Added before/after Pantheon conditionals - see #3242 2022-11-07 22:39:55 +02:00
Yair Morgenstern
803062781c
Resolves #7985 - Added layout for promotions (#7991)
* Converted existing promotions to table layout

* Added col/row to G&K promotions

* Added ruleset error tests for promotion locations
2022-11-07 17:53:42 +02:00
Yair Morgenstern
2f693547b4 Fixed spearman not being to be able to upgrade to anything after Gunpowder and before Metallurgy 2022-10-24 20:51:52 +03:00
itanasi
55e6541ee0
Add Temperature Offset Slider (#7891)
* Add slider
Align spawnIce latitude and offset code to applyHumidityAndTemperature

* A bunch of debug code
Make default Water Level -0.05 for Default

* Remove debug println
Fix Desert at 0.9-1.0 temp and <0.2 humidity

* Disable reseed for debug comparison
Reset Plains/Grassland for high temp. Adjust max humidity for safety of Grasslands
Humidity debugger
Better slider

* Remove all debug code

* Undo Desert temp setting
2022-10-22 20:12:57 +03:00
Yair Morgenstern
984e91a73e Resolved #7934 - Fixed Temple of Artemis production bonuses 2022-10-21 16:14:43 +03:00
Yair Morgenstern
a45c5cfa92 Resolved #7881 - Thron->Throne 2022-10-05 23:15:55 +03:00
OptimizedForDensity
291b962f97
Generalize Great Wall unique (#7660)
* Generalize Great Wall unique

* Update JSON entries

* And movement calculation too

* Rename other functions

* Cache movement penalty uniques

* Check destination tile instead of unit type
2022-09-15 16:00:19 +03:00
Xander Lenstra
202e0bcf47
Basic version of EspionageManger, added a unique to gain spies (#7641)
* Handfull of comment questions, small refactorings

* Code changes

* Reworded a unique, removed a file

* Added spy names for all nations, minor consistency change

* Removed debug output

* Added an empty constructor so gdx can reconstruct it
2022-08-13 22:45:16 +03:00
itanasi
af6ab8e4e5
Add Air Sweep (#7484)
* Add Air Sweep Unique
Enable Dogfighting Promotion
Add Air Sweep mode button and crosshair overlay

* Adding Air Sweep Battle Table

* Add airSweep to Battle
Remove double XP
While in AirSweep can't select other units on tile

* initial airsweep code

* Implement airSweep

* BattleTable indicates tile you're AirSweeping

* some notifications

* Clean up notifications.
Add icons

* Revert game.atlas and game.png

* Fix selection properly

* Update Vanilla UnitPromotions.json

* Better handling of movement use
comment cleanup

* missing credit

* Proper code so that Seas units also deal no damage
Adding Tutorials!

* Remove Intercept Bonus Damage/Protection

* Remove chance of Interceptor missing

* Battle Table a bit more consistent

* Defender also gets Air Sweep Modifiers

* Defender doesn't get bonus

* Remove unused getInterceptBonus
Combine logic

* Show damage in notifications for Air Sweep

* Randomize intercepting Civ and prioritize Air Units

* Remove debug code

* Updated atlas

* Clean up Uniques

* Object-ify DamageDealt for ease of reference

* code clean up

Co-authored-by: itanasi <spellman23@gmail.com>
2022-07-27 22:16:53 +03:00
SimonCeder
9fa00a9fa9 change wording 2022-07-22 23:12:55 +02:00
SimonCeder
0e00ec22c6 workers will replace city ruins 2022-07-22 20:53:01 +02:00
OptimizedForDensity
1287eb2c05
Minor reweight of AI policy selection (#7252)
* Reweight AI policy selection

* Vanilla ideological weights updated

* Update science victory weights
2022-07-17 11:21:12 +03:00
Xander Lenstra
160b51d578
Added more unit tests (#7448) 2022-07-14 10:27:06 +03:00
OptimizedForDensity
cdecb3f52d
Fix monastery purchase cost (#7417) 2022-07-10 19:15:43 +03:00
OptimizedForDensity
9477b319bc
Generalize production-to-stat conversion uniques (#7342)
* Generalize production to stat conversion enabling uniques

* Remove unnecessary code

* Rename class

* Update sound
2022-07-04 16:38:24 +03:00
OptimizedForDensity
98af4207ec
Make mounted vs city penalties only for attacking (#7296)
* Make horse vs city penalties only for attacking

* Reorder conditions

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2022-06-25 22:30:04 +03:00
OptimizedForDensity
efc095eaa1
Logistics allows move after attack (#7291) 2022-06-25 22:19:41 +03:00
OptimizedForDensity
03ee03d99b
Fix cataphract not requiring horses (#7292)
* Fix cataphract not requiring horses

* Spacing
2022-06-25 22:12:09 +03:00
alexban011
8f53262fc4
CityScreen plays a sound when opened (#7163)
* added sounds to cityScreen

* changes? ..don't know how to name this commit

* removed try block

* improved era1 sound and added slider for city enter sounds

* added Information Era sound

* added Future Era sound

* better option name + translation

* added Atomic Era sound

* normalized sounds

* prevent spam + better era 0 and 1 sounds

* cleanup

* sound improvements to medieval and atomic

* volume now tied to sound effects

* improved information sound

* improved future sound

* sounds now stop if you exit the city screen

* improved Renaissance sound

* now in separate function

* now using the music controller

* better file names

* WLTK day sound + sounds are now configurable in Eras.json

* removed redundant setting and fixed comment

* added PlaySingle

* musicController no longer used

* Gdx.audio.newMusic is now used

* function name

* function are now in their own class

* CitySoundPlayer now has 1 instance in UncivGame and is hooked

* credits

* sounds loop

* loopable sounds

* updated credits

* fixed sound not stopping when changing city without leaving cityScreen

* changed WLTKNew sound

* added toggle for the sounds

* changed WLTK sound, removed music and made all tracks have the same volume

* addressed some of the issues

* addressed more issues

* increased sounds volume + volume slider

* made WLTK sound slightly quieter

* removed entry from Vanilla eras

* revert back to CitySoundPlayer.kt

* no more hooks

* removed unused stuff

* changees

* completly reverted MusicController

* and the MusicTrackChooserFlags

* fixed ESC not stopping sounds

* updated credits to mention the sounds are modified

* dispose()

* removed try block
2022-06-22 09:11:03 +03:00
SomeTroglodyte
9683e27526
Civilopedia tweaks (#7051)
* Civilopedia Files Split

* Central showReligionInCivilopedia function

* ConstructImprovementConsumingUnit with Conditional for Prophet

* Show Units capable of building an Improvement

* "Needs removal of terrain features to be built"
2022-06-19 02:29:07 +02:00
OptimizedForDensity
c922f134e6
Moddable game speeds (#6856)
* Move GameSpeed definition to JSON files

* Add game speeds civilopedia page
2022-06-18 23:27:46 +02:00
OptimizedForDensity
b79246ee02
Certain projects cannot be hurried by great engineer (#7076) 2022-06-08 10:20:45 +03:00
OptimizedForDensity
afce951724
Pillaging certain improvements may loot gold or other stat resources (#6993)
* Pillaging loots gold on certain improvements

* Add warning if improvement pillageGold > 0 and has UniqueType.Unpillagable

* Pillage yields as a UniqueType

* Forgot to undo demonstration

* Remove unused line

* Eliminate some redundancy

* Reword unique text

* Slight cleanup and add notification for pillage victim

* Reviews

* Made pillaging notifications more consistent with other hostile action notifications

* Missed a line
2022-06-01 19:13:04 +02:00
OptimizedForDensity
09195d6b62
More UniqueType unit tests and correct some broken uniques in JSON files (#6965)
* Add ruin reward unique check plus fix broken unique
2022-05-29 16:08:15 +02:00
OptimizedForDensity
c48c6df22a
Fix piety complete faith discount (#6961) 2022-05-27 00:44:16 +03:00
Jack Rainy
4986505363
Great General typed uniques and improved moddability (#6818)
* Great General UniqueTyped and improved moddability - draft

* Great General UniqueTyped and improved moddability - reviews

* Great General UniqueTyped and improved moddability - no reason not to cache another

* Integration with JackRainy's solution

* Integration with JackRainy's solution - part 2

* Revert of maxGreatGeneralBonusRadius logic

* Minor refactoring

* Code review: minor refactoring

* Keep the warning for the modders about the obsolete unique

* Code review: Better wording for the unique

Co-authored-by: SomeTroglodyte <63000004+SomeTroglodyte@users.noreply.github.com>
2022-05-18 00:02:53 +03:00
Xander Lenstra
7079619fe2
Great improvements can again be constructed on forest (#6823)
* Great improvements can again be constructed on forest
This PR fixes a bug where great improvements couldn't be build on 
forests/marshes/jungles/etc. It does so by creating a unique which 
specifically allows for removing features, and checking for that.
Additionally, we only remove these features when we have the tech to 
remove them. For example, you can no longer plonk an Academy down over a 
forest without having researched mining.

* Missed the file for vanilla

* Reviews

* Fixed logic
2022-05-17 20:04:49 +03:00
Xander Lenstra
8fcfbf752b
Improved clarity and moddability of building improvements (#6712)
* Renamed tile.hasUnique, deprecated `Indestructable`, unique for citadels
Also refactored the consumption of (great) people out of UnitActions.

* Reworked when improvements can be build somewhere for more clarity

* Made resources improvable by multiple improvements; Offshore Platform

* Fix compatability

* WIP

* Fixed the tests, but better

* I suppose I might as well update this now that we're a version later
2022-05-11 00:35:21 +02:00
SomeTroglodyte
4b7edca7a8
Rework of the "Creates improvement on a specific tile" Unique (#6687)
* Make Citadel tile takeover a unique

* CreatesOneImprovement unique overhaul step 1

* CreatesOneImprovement unique overhaul - increase highlights alpha

* Fix missing translatables, again

* CreatesOneImprovement unique overhaul - review suggestions

Co-authored-by: Yair Morgenstern <yairm210@hotmail.com>
2022-05-08 21:22:01 +03:00
Xander Lenstra
c55b14eaa7
Implemented most easy things from comments on moddable victory PR (#6600)
* Implemented most easy things from comments on moddable victory PR
Also added religious victory condition

* Fixed tests

* Fixed compile problems & missing string

* Fixed typo
2022-05-03 07:56:24 +03:00
Xander Lenstra
933e769d8e
Changed milestone build globally text to make it more understandable (#6613)
* Changed milestone build globally text to make it more understandable

* Actually this is probably just as clear, gramatically more correct and
more imperative like the other milestones

* Fixed tests

* Reworded again
2022-04-27 09:15:33 +03:00
Xander Lenstra
34105efdda
Moddable victories (#6161)
* Added a moddable (but not yet functional) file for victories

* Spaceship parts are units now

* Fixed tests

* Added milestone objects

* Made 'our status' table in VictoryScreen dependend on file

* Updated VictoryManager to use the new Milestone system

* Fixed bug where in vanilla too many spaceship parts could beb uild

* Whoops

* Updated global victory table to use the jsons

* Updated the new game screen to show the new victory types
Also started with the deprecation of VictorType

* Did some translation stuff, also finally fixed the tests

* Removed VictoryType and reworked AI to use Milestones instead

* Add some checks for the victory file; tested that custom victories work
Also moves some code to a better spot and fixes compilation errors

* Fixed some things I thought about while falling asleep
Most notably: built -> build; fixed spaceship part construction 
priority; removed more code for the old system

* Fixed translation issues on the victory screen
2022-04-24 22:45:38 +03:00