Commit Graph

7019 Commits

Author SHA1 Message Date
SomeTroglodyte
23c23e5566
Unique docs writer makeover (#6516)
* Comments to 'link' implementation (matchFilter) to UniqueParameterType

* Comments to 'link' UniqueParameterType to implementation (matchFilter)

* Fix two mistakes in UniqueParameterType

* Make "and" filter logic for MapUnit and BaseUnit modular, fix mistake

* Make UnitMovementMemory immutable and without lateinit

* Keep UniqueType comment promise that instances can override parameter types

* Reorg UniqueDocsWriter so UniqueParameterType-specific text is moved to the enum

Also some minor improvements - e.g. abbreviations sorted & consistent punctuation, less memory allocations, a/b/c type params get an example,...

* New abilities for UniqueDocsWriter concerning UniqueTarget and inheritsFrom (initially deactivated)

* Actually implement the wish for distinction between absolute and relative amounts

* Change UniqueParameterType.UnitName.docExample to Xander's choice
2022-04-24 22:47:19 +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
Xander Lenstra
382707a6a5
Fixed a problem with the ordering of the vanilla policies (#6582) 2022-04-24 22:44:41 +03:00
Xander Lenstra
0a5fc3cf33
Fixed the internal name & parameter of a unique (#6577) 2022-04-20 17:02:31 +03:00
Yair Morgenstern
34664e6071 Fixed bug with aircraft rejection reasons 2022-04-20 12:50:30 +03:00
Yair Morgenstern
18be173ab8 Mod land units with missile and nuke uniques no longer crash the game 2022-04-20 12:32:40 +03:00
Yair Morgenstern
c5c06a2456 improvementFilter accepts uniques as well 2022-04-20 09:37:00 +03:00
Yair Morgenstern
bd41630f84 terrainFilter accepts tile resource uniques 2022-04-20 09:31:33 +03:00
itanasi
f1cfe3e907
Add checks against 0 Strength combat (#6564)
* Add checks against 0 Strength combat

* Minimize to 1f to prevent divby0 issues

Co-authored-by: itanasi <spellman23@gmail.com>
2022-04-20 09:29:14 +03:00
Yair Morgenstern
e1363d92f9 4.0.8 2022-04-19 15:32:45 +03:00
Yair Morgenstern
88e9d9c618
Version rollout (#6570)
* Bump version and create initial changelog entry

* Update Simplified_Chinese.properties (#6568)

* Update French.properties (#6567)

* Update Italian.properties (#6566)

* Update Filipino.properties (#6562)

* Update German translation (#6561)

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: heipizhu4 <100454479+heipizhu4@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Shann Aurelle Ripalda <shannaurelleg@gmail.com>
Co-authored-by: MartinP <77325495+Mape6@users.noreply.github.com>
2022-04-19 15:27:17 +03:00
Yair Morgenstern
1069b0933e
Added "Vegetation" unique so that vegetation spawn is not limited to just jungle and forest (#6569) 2022-04-19 15:25:33 +03:00
Yair Morgenstern
aa6bd364de Unified unit type filters and removed unwanted ones 2022-04-19 15:21:05 +03:00
Yair Morgenstern
9ae84a94e1 TerrainFilter parameters accept any unique that exists in terrains. Unrecognized texts now throw errors. - see #6430 2022-04-19 14:53:58 +03:00
Yair Morgenstern
de1a1ee48a Resolved DamageUnitsPlunder's warnings for City parameter and warnings for "Aircraft" - see #6430 2022-04-19 14:24:01 +03:00
Yair Morgenstern
bc16a69bd2 baseUnitFilter accepts all uniques that exist on units - see #6430 2022-04-19 14:17:19 +03:00
Yair Morgenstern
16ea8fe8f0 Re-added stat values to be a known part of buildingFilter - see #6430 2022-04-19 14:14:39 +03:00
SomeTroglodyte
9e3df8605e
Request for take-over: Rewritten Map Editor (#5694)
* New Map editor - attempts 1

* New Map editor - attempts 2

* New Map editor - attempts 3

* New Map editor - attempts 4

* New Map editor - attempts 5

* New Map editor - attempts 6

* New Map editor - attempts 7

* New Map editor - attempts 8

* New Map editor - attempts 9

* New Map editor - attempts 10

* New Map editor - merge

* Revert included Stat icons in favour of #f90b22a

* Adapt to renamed TileGroup methods

* Manual merge of some baseruleset code for the map loader only

* Kludge for disappeared `getBaseRuleset`

* Fix after-merge conflicts, run convertTerrains in stepwise map generation

* Fix merge error

* Adapt to latest merge

* Baseruleset control - unpolished draft + max zoom out

* MapEditorV2 - merge fixes, base ruleset and mod control, texture loader fix, pedia links, translation, load mod maps, continent visualization, minor improvements and fixes

* MapEditorV2 - removed old editor
2022-04-19 13:17:44 +03:00
Yair Morgenstern
5ad258ca47 Added very basic "flash red on attack" battle animations 2022-04-19 12:39:14 +03:00
Yair Morgenstern
dbaf4edb2f Resolved #6559 - Air units with no space in the city cannot be selected for construction 2022-04-18 12:26:35 +03:00
Yair Morgenstern
e296604b24 Resolved #6560 - unpillagable improvements removed entirely on nuke 2022-04-18 11:55:43 +03:00
Xander Lenstra
a92057eed5
Made 'go to on map' translatable & fixed crash (#6565) 2022-04-18 11:48:03 +03:00
Yair Morgenstern
3d93dafb13 AIs don't add double agreements to counteroffers 2022-04-18 11:46:48 +03:00
Xander Lenstra
e11a32bb41
Fixed two small bugs (#6558) 2022-04-17 18:06:39 +03:00
Yair Morgenstern
06569e6c5f Clearer "owned" resource 2022-04-17 14:18:16 +03:00
Yair Morgenstern
0f70d8360d 4.0.7 2022-04-17 13:45:59 +03:00
Yair Morgenstern
dedd19cff8
Version rollout (#6557)
* Bump version and create initial changelog entry

* Update Spanish.properties (#6550)

* Update Spanish.properties

* Update Spanish.properties

Maybe I have left some grammar mistakes. I have to go, hopefully I'll fix them before the update.

* fix typos

* Update Simplified_Chinese translation (#6545)

* 4.0.6 translation 1

* 4.0.6 translation 2

* Update Simplified_Chinese.properties

* Update Filipino.properties (#6539)

* Update Filipino.properties

* Update Filipino.properties

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Caballero Arepa <78449553+ArchDuque-Pancake@users.noreply.github.com>
Co-authored-by: heipizhu4 <100454479+heipizhu4@users.noreply.github.com>
Co-authored-by: Shann Aurelle Ripalda <shannaurelleg@gmail.com>
2022-04-17 13:41:22 +03:00
Yair Morgenstern
8b5665a73f Resolved #6445 - problems in hosting Unciv server
Solution from https://stackoverflow.com/questions/56533497/how-to-replace-blocking-code-for-reading-bytes-in-kotlin
2022-04-17 13:26:04 +03:00
Yair Morgenstern
6b99b11179 Resolved #6527 - replacementTextForUniques activates for units when picking nations 2022-04-17 13:22:57 +03:00
Xander Lenstra
0230575473
Tested and reworked the 'unit upgrades for free' unique till it worked (#6555) 2022-04-17 08:01:22 +03:00
Xander Lenstra
d3b17117da
Added a 'go to capital'-button in the diplomacy overview screen (#6546) 2022-04-16 23:31:13 +03:00
itanasi
7a89c84790
Air Units take damage in Combat (#6533)
* Changes required
Add isAirUnit to iCombatant

* Updating XP Rewards to match Civ5
Add isAirUnit() Boolean for ICombatant

* Air Units can only Intercept if they haven't moved this turn

* Change Intercept to only have the highest chance unit take the chance

* Exempt the defending unit from being able to Intercept
Add back in tryInterceptAirAttack() for all units of a civ to attempt intercept

* Combine back to 1 function.
Add filtering for defender

* Fix logic bug

* Change base damage to be centered on 25f (instead of 30f) if City is attacking. addRandomDamage is a guess

* Revert dmanageModifier code

* XP fix

Co-authored-by: itanasi <spellman23@gmail.com>
2022-04-16 23:06:30 +03:00
Leonard Günther
8457c7ab1d
Fixed TurnChecker crash when using custom server (#6554) 2022-04-16 23:06:07 +03:00
Xander Lenstra
7ced78f6a2
Fixed vanilla policies regression (#6552)
* Fixed the vanilla piety tree

* Fixed more regression errors

* Removed unique
2022-04-16 23:04:28 +03:00
itanasi
e5ef660157
Updating XP Rewards. Interception now gives XP (#6543)
* Updating XP Rewards to match Civ5
Add isAirUnit() Boolean for ICombatant

* Revert Melee XP

Co-authored-by: itanasi <spellman23@gmail.com>
2022-04-16 23:04:17 +03:00
heipizhu4
0dda359f38
Add modding translation instruction to the wiki (#6544)
Add modding translation instruction to translation.md inpired by #6483.
Mostly is copied from @SomeTroglodyte 's comment and add some of my own translation expeirence.
There might be some grammatical mistakes in this doc.
2022-04-15 16:24:51 +03:00
itanasi
0e8a22a1e8
When capturing Civilian, stop current action (#6542)
* On captureCivilianUnit, stop current action

* Remove excess import

Co-authored-by: itanasi <spellman23@gmail.com>
2022-04-15 16:23:00 +03:00
Yair Morgenstern
94e8264d36 4.0.6-patch1
Better timesaving for arrows that doesn't keep arrows when we disable view
2022-04-13 21:17:41 +03:00
Yair Morgenstern
8a32be0ca2 4.0.6 2022-04-13 18:53:46 +03:00
Yair Morgenstern
9d0c4c117c
Version rollout (#6538)
* Bump version and create initial changelog entry

* Update Italian.properties (#6535)

* Update Filipino.properties (#6532)

* Update Filipino.properties

* Update Filipino.properties

* Update Simplified_Chinese.properties (#6529)

* Update Simplified_Chinese.properties

v4.0.5 translation 1

* 4.0.5 Simpified_Chinese translation 2

4.0.5 Simpified_Chinese translation 2

* Update French.properties (#6524)

* Update Polish.properties (#6523)

* Update Spanish.properties (#6517)

Several rewordings, fixes and homogeneization of terms.

Co-authored-by: yairm210 <yairm210@users.noreply.github.com>
Co-authored-by: Giuseppe D'Addio <41149920+Smashfanful@users.noreply.github.com>
Co-authored-by: Shann Aurelle Ripalda <shannaurelleg@gmail.com>
Co-authored-by: heipizhu4 <100454479+heipizhu4@users.noreply.github.com>
Co-authored-by: Ouaz <Ouaz@users.noreply.github.com>
Co-authored-by: Derdotox <103372983+Derdotox@users.noreply.github.com>
Co-authored-by: Phoenix7g <102632435+Phoenix7g@users.noreply.github.com>
2022-04-13 18:48:10 +03:00
SomeTroglodyte
04c9be38c7
MusicController - Can catch exceptions from Gdx.app.loop and replaces Timer on desktop with a callback from OpenALLwjgl3Audio.update (#6526) 2022-04-13 18:30:01 +03:00
Xander Lenstra
b45a2f471e
Fixed a bug where production would not be retained when changing from an obsolete unit to its upgraded version when that upgraded version was unique to the nation (#6520)
* Fixed a bug where production would not be retained when chaing from an obsolete unit to its upgraded version when that upgraded version was unique to the nation

* Removed function

* Extracted to val
2022-04-13 18:29:50 +03:00
Yair Morgenstern
84ca296a5c Discord suggestion - have allied city states see all tiles of their ally, so they can support them militarily 2022-04-10 22:13:27 +03:00
heipizhu4
55b3c2e644
Update README.md (#6521) 2022-04-10 18:13:10 +03:00
Yair Morgenstern
a46923a187 Bad import got in 2022-04-09 23:15:48 +03:00
Yair Morgenstern
9169ec1e42 Hopefully got rid of ANRs when entering a link when the app has been closed for too long? I think that's the problem? 2022-04-09 23:08:12 +03:00
Yair Morgenstern
76284c923e Hopefully got rid of ANRs on shutdown 2022-04-09 23:00:33 +03:00
Yair Morgenstern
15f3e47809 Don't update arrows if the user isn't displaying arrows - this is most users 2022-04-09 22:57:48 +03:00
Yair Morgenstern
b8d9dd1af3 Hopefully improved continuous rendering's framerate, to solve some ANRs 2022-04-09 22:51:18 +03:00
Yair Morgenstern
9fa3d8de2f 4.0.5 2022-04-09 22:41:12 +03:00