Commit Graph

42 Commits

Author SHA1 Message Date
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
SomeTroglodyte
e5b36f5b9f
Unique units abilities that should be inherited by upgrades (#6304)
* Unique units abilities that should be inherited by upgrades

* Unique units abilities that should be inherited by upgrades - xlt

* Unique units abilities that should be inherited by upgrades - wiki
2022-03-10 19:45:32 +02:00
itanasi
9d1f463310
Add Amphibious penalty to Land attacking into Water and vice versa (#6127)
* Add Amphibious penalty to Land attacking into Water and vice versa

* Replace Landing with Amphibious in all translation files

* Fix trailing whitespace

* Revert translation files

* Change working of Amphibious
Set penalty to Landing and Boarding

* Type-ify Unique and add Depreciated
Add Promotion to Melee Naval
Add exception that Landing penalty is NOT against cities

* Fix Vanilla

* Rename to Landing Party
Icon doesn't work

* Properly regenerated game.atlas/game.png

Co-authored-by: itanasi <spellman23@gmail.com>
2022-02-14 19:21:53 +01:00
Xander Lenstra
6bc41a627c
Typed all healing uniques (#6087)
* Typed all healing uniques

* Fixed tests by replacing placeholder texts by types in BeliefAutomation
2022-02-01 09:43:37 +02:00
Xander Lenstra
ecadfb53fa
Typed some uniques and fixed a policy not working (#5848)
* Typed some uniques, fixing a policy not working

* Repurposed an unused function to remove .unit in some places

* Fixed compilation errors
2021-12-25 17:55:14 +02:00
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
088e35ff13
Ethiopia - Nation (#5387)
* Ethiopia - Nation

* Ethiopia - Unit and Stele

* Ethiopia - Graphics

* Ethiopia - color
2021-10-04 20:56:34 +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
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
Xander Lenstra
bb5825a325
First step into unifying strength bonuses using conditionals (#5345) 2021-09-29 08:35:37 +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
SimonCeder
672d2a3c34
Fix Khan unit (#5207)
* fix khan unique

* fix adjacent healing bonus

* plus

* Khan heals itself also

* nerf medic
2021-09-15 00:35:16 +03:00
Xander Lenstra
5094a068fe
Fixed ambush bonus amount (#5021) 2021-08-29 20:37:59 +03:00
SomeTroglodyte
5a6a9c9759
Anti-Armor, negative tile yield, LoadScreen (#5018)
* Harden against negative yields, Anti-Armor

* Anti-Armor bad unitType, LoadScreen
2021-08-29 11:33:20 +03:00
Xander Lenstra
0868e31adb
Scouts still ignore terrain costs after upgrades (#4954)
* Scouts still ignore terrain costs after upgrades

* Added an icon for the new promotion
2021-08-22 23:27:33 +03:00
Xander Lenstra
9634f7045a
Replaced the last promotion effects with uniques (#4764) 2021-08-05 07:41:48 +03:00
Xander Lenstra
3b4b9a27bf
Split up unit types to its own JSON file (#4717)
* Split off unitTypes to its own json, only containing the domain it can travel in for now

* Updated translationFileWriter to handle this file correctly

* Updated promotions file

* Implemented requested changes

* Units without a sprite use the sprite of a first unit with the same type

* Implemented proposed changes
2021-08-03 19:06:59 +03:00
lishaoxia1985
e993f507aa
Map size will modify policy cost, techUniques is initialized by UniqueMap(), Replace "effect" with "uniques" in UnitPromotions.json (#4507)
* Map size will modify policy cost, techUniques is initialized by UniqueMap()

* Replace "effect" with "uniques" in UnitPromotions.json
2021-08-02 19:17:26 +03:00
SomeTroglodyte
130c318ae0
Civilopedia phase 8 - Nations and Promotions (#4657)
* Civilopedia phase 8 - Nations and Promotions

* Civilopedia phase 8 - Nations and Promotions - AS insubordination

* Civilopedia phase 8 - Nations and Promotions - OR template

* Civilopedia phase 8 - Nations and Promotions - proofread

* Civilopedia phase 8 - Nations and Promotions - revert OR
2021-07-30 15:55:17 +03:00
Yair Morgenstern
183b94702e Better unique for defending vs units 2021-07-27 05:02:13 +03:00
Xander Lenstra
7d8f8b981d
Fixed bug where logistics _still_ did not work (#4388) 2021-07-05 21:09:10 +03:00
Xander Lenstra
2a4ca74e7b
Fixed more bugs I introduced myself (#4368)
* Fix bug where mobility doesn't work

* Fixed supply _still_ not working
2021-07-04 17:34:27 +03:00
Xander Lenstra
be5345477a
Fixed bug where heal instantly would not heal (#4367) 2021-07-04 17:32:50 +03:00
Xander Lenstra
6c221cd56b
Fix multiple bugs resulting from updating promotions and implementing missile cruisers (#4355)
* Fixed carriers in mods no longer working

* Fixed scouting prerequisites

* Fixed surivialism not having icon or prerequisites

* Fix logistics in mods not working

* Added image for supply promotion
2021-07-03 22:26:03 +03:00
Xander Lenstra
d94a1d1432
Updated and generalized more promotions (#4331)
* Generalized "[1] extra interceptions may be made per turn"

* Generalized and rephrased Cover promotion (requires #4311 to work)

* Generalized Logistics

* According to the civilopedia the defence value of cover has also risen, apparently

* Updated Ambush strength values

* Split up Targeting and Air Targeting (different strength bonus)

* Generalized Haka War Dance

* Added Supply promotion

* Renamed a unique so it matches other uniques

* Implemented May heal outside of friendly territory better

* Implemented requested changes
2021-07-02 14:02:20 +03:00
Xander Lenstra
70882b4e8b
Added Privateer unit; updated Coastal Raider promotion (#4301)
* Added privateer unit

* Privateers can now capture other naval units

* Updated Coastal Raider promotion to include the gold gained from damaging cities

* Added missing translatable notification

* Implemented requested changes

* Implemented requested changes _but better_

* Forgot to update a variable name
2021-07-02 10:38:45 +03:00
Yair Morgenstern
95ae1cea30 3.15.7 2021-07-01 22:44:36 +03:00
Xander Lenstra
a0cf30831c
Updated promotions - make more generalizable, update to G&K (#4292)
* Generalized the "Heal Instantly" promotion

* Extended "Indirect Fire" to WaterRanged units, conform the main game

* Generalized Extend Range, Operational Range

* Generalized "logistics"

* Typo

* Generalized the healing from "Medic"

* Implemented requested changes

* Generalized "[amount] Movement"; "[amount] Visibility Range"

* Added survavalism promotions

* Updated Boarding Party strength bonus values to G&K

* Implemented requested changes
2021-06-30 17:09:02 +03:00
Arthur van der Staaij
0f0abad5ea
Added Stealth tech and Stealth Bombers (#4271)
* Changed some interception-related uniques

- "Can not be intercepted" -> "Cannot be intercepted"
  This really irked me, and the new version is also how it is written
  in the wiki.
- "Reduces damage taken from interception by 50%" ->
  "Damage taken from interception reduced by [50]%"

* Added "Cannot be carried by [unitFilter] units" unique

* Added an icon for Stealth

* Added Stealth technology and the Stealth Bomber

* Possibly fixed incorrect rounding for interception damage bonus

* Various code style changes

* Made Stealth Bomber interceptable, but with 100% damage reduction
2021-06-27 08:57:11 +03:00
Xander Lenstra
1c079bcef3
Added Nuclear Submarines & Missile Cruisers, capable of transporting missiles (#4260)
* Implemented Nuclear Submarine and Missile Cruiser units

* Information Era -> Atomic Era; Future Era -> Information Era, conform G&K

* Fixed deprecated uniques still working

* Implemented requested changes
2021-06-26 22:47:27 +03:00
Yair Morgenstern
60d8adce38 3.15.0 2021-06-13 22:40:12 +03:00
Xander Lenstra
432e937474
Added the amphibious promotion and the marine unit (#3987)
* Technology and construction bars no longer extend past their maximum

* Fixed compile errors

* actually fixed the issue

* Added the marine unit

* Moved amphibious promotion effect to unique

* Added icons for Amphibious promotion and Marine unit

* aaah
2021-05-29 23:42:04 +03:00
Yair Morgenstern
d825352bf4 Converted all "Bonus vs unitType" effects to "+[amount]% Strength vs [unitType]"
Open terrain and rough terrain bonuses are now generic and uniques
2021-04-14 18:52:10 +03:00
lishaoxia1985
b3a62f4b1a
Withdraw before melee is the same as original game (#3674) 2021-03-11 21:40:44 +02:00
Yair Morgenstern
ccae026df2 Resolved #1804 - Renamed "Siege" promotion to "Besiege". Closes #2458 2021-02-23 20:07:49 +02:00
givehub99
8c51833a5a
New parameterized uniques (#3250)
* -New unit unique "Bonus as Defender []%". "+25% Combat Bonus when defending" now deprecated, but kept for now for mods. Json promotion changed to fit new syntax.
Defender Bonus modifier "Defender Bonus" added to template.properties for translation.

-"All newly-trained [] units in this city receive the [] promotion" now uses unit category checking.

-New building unique "New [] units start with [] Experience in this city"
This can used by Poland's stable unique replacement in BNW, as it gives extra xp for mounted units.
"New [] units start with [] Experience" is the new nation wide version of this.

"New military units start with [] Experience" is now deprecated, but kept for now for mods. Json policy changed to fit new syntax.

-Unit category checking can now check for "non-air", "military", "military units" and uniques.
Added "military" to template.properties for translation.

-New unit unique "No defensive terrain penalty". Admittedly this is for a mod I'm making.

* translations must have spaces after!

* -Attacker Bonus unique changed to "+[]% Strength when attacking"
Changed Units.json and and Wolf Pack from UnitPromotions.json to this syntax

-Defender Bonus unique changed to "+[]% Strength when defending"
Armor Plating promotions were changed to this syntax
2020-10-14 10:22:49 +03:00
HadeanLake
f721f59734
Added national wonders, fixed some minor issues (#3163)
* fixed translation of "Owned: [amountOwned] = " line

* Tweaked culture from killing
Aztecs get melee strength of the unit killed in culture and honor opener does the same thing.
They stack. So you get culture equal to 200% of the dead unit's strength (not ranged strength).

* removed hurryCostModifier from units that should not have it

Default value of HurryCostModifier is 0
List of units with non-default HurryCostModifier:

Settler (20)
SS parts (-1) (cannot be hurried)

Frigate (20)
Ship of the Line (20)
Caravel (30)
Turtle Ship (30)

Catapult (20)
Ballista (20)

Horseman (20)
Companion Cavalry (20)

Swordsman (20)
Mohawk Warrior (20)
Legion (20)
Berserker (20)

* added missing definitions from vanilla (commented out)
added missing obsolete tech tags, etc

* tweaked hurryCostModifier, added missing vanilla buildings (commented out)

* added promotions and parametrized uniques
Morale (+[15]% Combat Strength)
Great Generals I ([Great General] is earned [50]% faster)
Great Generals II ([Great General] is earned [100]% faster)
Quick Study ([50]% Bonus XP gain)
Unretired Mass Media icon

Added Heroic Epic, National Epic and National Treasury national wonders
Heroic Epic has unique "All newly-trained [non-air] units in this city receive the [Morale] promotion" - "non-air" is valid param now

[Raising The Flag on Iwo Jima silhouette, Marine Corps War Memorial Raising the Flag on Iwo Jima Battle of Iwo Jima Washington, D.C., memorial free png](https://www.pngfuel.com/free-png/opgid) for Heroic Epic and Morale promotion
[Arc de Triomphe](https://thenounproject.com/search/?q=Arc%20de%20Triomphe&i=2936011) by iconfield for National Epic
[Bank](https://thenounproject.com/term/bank/213472/) by By P Thanga Vignesh for National Treasury
reused general icon for Great Generals and Quick Study promotions

* implemented "Cost increases by [30] per owned city of cities" unique
All vanilla national wonders that require something in all cities have it

* added uniques
"Nuclear weapon" - Game option "nuclearWeaponsEnabled" enables units with this unique
"Requires [building]" - Apollo Program, Manhattan Project etc
"Requires adopted [policy]" - in expansions Statue of Zeus will require "Honor", Prora - "Autocracy", Landsknecht - "Mercenary Army".

* merged "Requires adopted [policy]" with "Requires [Wonder]"

* Separated unique.params[0] to val filter

* Changed National Epic image
2020-09-21 21:44:52 +03:00
Yair Morgenstern
6ff712b625 A mishmash of different fixes: Unit uniques and promotions, happiness calculation, etc. 2020-08-24 10:58:14 +03:00
HadeanLake
a12c1ada26
Fixed AI being stuck doing science or gold per turn (#3006)
* AI will no longer get stuck doing science or gold per turn

* added missing commas in jsons
2020-08-18 20:53:16 +03:00
Yair Morgenstern
c2fdcb7849 Prepping for multiple rulesets - current ruleset is now is Vanilla folder 2020-04-24 14:03:41 +03:00