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>
This commit is contained in:
itanasi
2022-07-27 12:16:53 -07:00
committed by GitHub
parent 026ba380cc
commit af6ab8e4e5
26 changed files with 1327 additions and 1025 deletions

View File

@ -358,29 +358,26 @@
"uniques": ["[+34]% Damage when intercepting"],
"unitTypes": ["Fighter"]
},
/*
{
"name": "Dogfighting I",
"uniques": ["Bonus when performing air sweep [33]%"], // todo
"uniques": ["[+33]% Strength when performing Air Sweep"],
"unitTypes": ["Fighter"]
},
{
"name": "Dogfighting II",
"prerequisites": ["Dogfighting I"],
"uniques": ["Bonus when performing air sweep [33]%"],
"uniques": ["[+33]% Strength when performing Air Sweep"],
"unitTypes": ["Fighter"]
},
{
"name": "Dogfighting III",
"prerequisites": ["Dogfighting II"],
"uniques": ["Bonus when performing air sweep [34]%"],
"uniques": ["[+34]% Strength when performing Air Sweep"],
"unitTypes": ["Fighter"]
}
*/
},
{
"name": "Air Targeting I",
"prerequisites": ["Interception I","Siege I","Bombardment I"], // "Dogfighting I"
"prerequisites": ["Interception I","Siege I","Bombardment I","Dogfighting I"],
"uniques": ["[+33]% Strength <vs [Water] units>"],
"unitTypes": ["Fighter","Bomber"]
},
@ -393,20 +390,20 @@
{
"name": "Sortie",
"prerequisites": ["Interception II"], // "Dogfighting II"
"prerequisites": ["Interception II", "Dogfighting II"],
"uniques": ["[1] extra interceptions may be made per turn"],
"unitTypes": ["Fighter"]
},
{
"name": "Operational Range",
"prerequisites": ["Interception I", /*"Dogfighting I",*/ "Siege I", "Bombardment I"],
"prerequisites": ["Interception I", "Dogfighting I", "Siege I", "Bombardment I"],
"uniques": ["[+2] Range"],
"unitTypes": ["Fighter","Bomber"]
},
{
"name": "Air Repair",
"prerequisites": ["Interception II", /*"Dogfighting II",*/ "Siege II", "Bombardment II", "Mobility II", "Anti-Armor II"],
"prerequisites": ["Interception II", "Dogfighting II", "Siege II", "Bombardment II", "Mobility II", "Anti-Armor II"],
"uniques": ["Unit will heal every turn, even if it performs an action"],
"unitTypes": ["Fighter", "Bomber", "Helicopter"]
},

View File

@ -59,7 +59,7 @@
{
"name": "Fighter",
"movementType": "Air",
"uniques": ["Aircraft", "[+4] Sight", "Can see over obstacles"]
"uniques": ["Aircraft", "[+4] Sight", "Can see over obstacles", "Can perform Air Sweep"]
},
{
"name": "Bomber",
@ -81,9 +81,9 @@
"movementType": "Land",
"uniques": ["Can pass through impassable tiles"]
},
// Deprecated unit types required for mods without a UnitTypes.json file to work
{
"name": "Melee",
"movementType": "Land"

View File

@ -358,29 +358,26 @@
"uniques": ["[+34]% Damage when intercepting"],
"unitTypes": ["Fighter"]
},
/*
{
"name": "Dogfighting I",
"uniques": ["Bonus when performing air sweep [33]%"], // todo
"uniques": ["[+33]% Strength when performing Air Sweep"],
"unitTypes": ["Fighter"]
},
{
"name": "Dogfighting II",
"prerequisites": ["Dogfighting I"],
"uniques": ["Bonus when performing air sweep [33]%"],
"uniques": ["[+33]% Strength when performing Air Sweep"],
"unitTypes": ["Fighter"]
},
{
"name": "Dogfighting III",
"prerequisites": ["Dogfighting II"],
"uniques": ["Bonus when performing air sweep [34]%"],
"uniques": ["[+34]% Strength when performing Air Sweep"],
"unitTypes": ["Fighter"]
}
*/
},
{
"name": "Air Targeting I",
"prerequisites": ["Interception I","Siege I","Bombardment I"], // "Dogfighting I"
"prerequisites": ["Interception I","Siege I","Bombardment I", "Dogfighting I"],
"uniques": ["[+33]% Strength <vs [Water] units>"],
"unitTypes": ["Fighter","Bomber"]
},
@ -393,20 +390,20 @@
{
"name": "Sortie",
"prerequisites": ["Interception II"], // "Dogfighting II"
"prerequisites": ["Interception II", "Dogfighting II"],
"uniques": ["[1] extra interceptions may be made per turn"],
"unitTypes": ["Fighter"]
},
{
"name": "Operational Range",
"prerequisites": ["Interception I", /*"Dogfighting I",*/ "Siege I", "Bombardment I"],
"prerequisites": ["Interception I", "Dogfighting I", "Siege I", "Bombardment I"],
"uniques": ["[+2] Range"],
"unitTypes": ["Fighter","Bomber"]
},
{
"name": "Air Repair",
"prerequisites": ["Interception II", /*"Dogfighting II",*/ "Siege II", "Bombardment II", "Mobility II", "Anti-Armor II"],
"prerequisites": ["Interception II", "Dogfighting II", "Siege II", "Bombardment II", "Mobility II", "Anti-Armor II"],
"uniques": ["Unit will heal every turn, even if it performs an action"],
"unitTypes": ["Fighter", "Bomber", "Helicopter"]
},

View File

@ -59,7 +59,7 @@
{
"name": "Fighter",
"movementType": "Air",
"uniques": ["Aircraft", "[+4] Sight", "Can see over obstacles"]
"uniques": ["Aircraft", "[+4] Sight", "Can see over obstacles", "Can perform Air Sweep"]
},
{
"name": "Bomber",
@ -81,9 +81,9 @@
"movementType": "Land",
"uniques": ["Can pass through impassable tiles"]
},
// Deprecated unit types required for mods without a UnitTypes.json file to work
{
"name": "Melee",
"movementType": "Land"

View File

@ -365,5 +365,15 @@
"During the We Love The King Day, the city will grow 25% faster.",
"This means exploration and trade is important to grow your cities!"
]
},
{
"name": "Air Sweeps",
"steps": [
"Certain Units are able to perform Air Sweeps over a tile helping clear out potential enemy Interceptors.",
"While this Action will take an Attack, the benefit is drawing out Interceptions to help protect your other Air Units. Especially your Bombers.",
"Your unit will always draw an Interception, if one can reach the target tile, even if the Intercepting unit has a chance to miss.",
"In addition, if the Interceptor is not an Air Unit (eg Land or Sea), the Air Sweeping unit takes no damage!",
"Intercepting Air Units will damage each other in a straight fight with no Interception bonuses. And only the Attacking Unit gets any Air Sweep bonuses."
]
}
]

View File

@ -773,10 +773,16 @@ An enemy [RangedUnit] has destroyed the defence of [cityName] =
Enemy city [cityName] has destroyed our [ourUnit] =
An enemy [unit] was destroyed while attacking [cityName] =
An enemy [unit] was destroyed while attacking our [ourUnit] =
Our [attackerName] was destroyed by an intercepting [interceptorName] =
Our [interceptorName] intercepted and destroyed an enemy [attackerName] =
Our [attackerName] was attacked by an intercepting [interceptorName] =
Our [interceptorName] intercepted and attacked an enemy [attackerName] =
Our [attackerName] ([amount]) was destroyed by an intercepting [interceptorName] ([amount]) =
Our [attackerName] ([amount]) was destroyed by an unknown interceptor =
Our [interceptorName] ([amount]) intercepted and destroyed an enemy [attackerName] ([amount]) =
Our [attackerName] ([amount]) destroyed an intercepting [interceptorName] ([amount]) =
Our [interceptorName] ([amount]) intercepted and was destroyed by an enemy [attackerName] ([amount]) =
Our [interceptorName] ([amount]) intercepted and was destroyed by an unknown enemy =
Our [attackerName] ([amount]) was attacked by an intercepting [interceptorName] ([amount]) =
Our [attackerName] ([amount]) was attacked by an unknown interceptor =
Our [interceptorName] ([amount]) intercepted and attacked an enemy [attackerName] ([amount]) =
Nothing tried to intercept out [attackerName] =
An enemy [unit] was spotted near our territory =
An enemy [unit] was spotted in our territory =
Your city [cityName] can bombard the enemy! =