mirror of
https://github.com/yairm210/Unciv.git
synced 2025-08-02 16:19:41 +07:00
Embarked units only have 1 vision (except marines) (#5215)
* Embarked units only have 1 vision * Embarked units always only have 1 vision, unless they don't
This commit is contained in:
@ -208,7 +208,7 @@
|
|||||||
"greatPersonPoints": {"Great Merchant": 1},
|
"greatPersonPoints": {"Great Merchant": 1},
|
||||||
"isWonder": true,
|
"isWonder": true,
|
||||||
"uniques": ["Must be next to [Coast]", "+[1] Movement for all [{Military} {Water}] units",
|
"uniques": ["Must be next to [Coast]", "+[1] Movement for all [{Military} {Water}] units",
|
||||||
"+[1] Sight for all [{Military} {Water}] units", "Provides a free [Lighthouse] [in this city]"],
|
"[+1] Sight for all [{Military} {Water}] units", "Provides a free [Lighthouse] [in this city]"],
|
||||||
"requiredTech": "Optics",
|
"requiredTech": "Optics",
|
||||||
"quote": "'They that go down to the sea in ships, that do business in great waters; these see the works of the Lord, and his wonders in the deep.' - The Bible, Psalms 107:23-24"
|
"quote": "'They that go down to the sea in ships, that do business in great waters; these see the works of the Lord, and his wonders in the deep.' - The Bible, Psalms 107:23-24"
|
||||||
},
|
},
|
||||||
|
@ -262,7 +262,7 @@
|
|||||||
"outerColor": [ 28,51,119],
|
"outerColor": [ 28,51,119],
|
||||||
"innerColor": [255,255,255],
|
"innerColor": [255,255,255],
|
||||||
"uniqueName": "Manifest Destiny",
|
"uniqueName": "Manifest Destiny",
|
||||||
"uniques": ["+[1] Sight for all [{Military} {Land}] units", "-[50]% Gold cost of acquiring tiles [in all cities]"],
|
"uniques": ["[+1] Sight for all [{Military} {Land}] units", "-[50]% Gold cost of acquiring tiles [in all cities]"],
|
||||||
"cities": ["Washington","New York","Boston","Philadelphia","Atlanta","Chicago","Seattle","San Francisco","Los Angeles","Houston",
|
"cities": ["Washington","New York","Boston","Philadelphia","Atlanta","Chicago","Seattle","San Francisco","Los Angeles","Houston",
|
||||||
"Portland","St. Louis","Miami","Buffalo","Detroit","New Orleans","Baltimore","Denver","Cincinnati","Dallas","Memphis",
|
"Portland","St. Louis","Miami","Buffalo","Detroit","New Orleans","Baltimore","Denver","Cincinnati","Dallas","Memphis",
|
||||||
"Cleveland","Kansas City","San Diego","Richmond","Las Vegas","Phoenix","Albuquerque","Minneapolis","Pittsburgh",
|
"Cleveland","Kansas City","San Diego","Richmond","Las Vegas","Phoenix","Albuquerque","Minneapolis","Pittsburgh",
|
||||||
@ -469,7 +469,7 @@
|
|||||||
"outerColor": [225,105,0],
|
"outerColor": [225,105,0],
|
||||||
"innerColor": [255,255,78],
|
"innerColor": [255,255,78],
|
||||||
"uniqueName": "Wayfinding",
|
"uniqueName": "Wayfinding",
|
||||||
"uniques": ["Can embark and move over Coasts and Oceans immediately", "+[1] Sight for all [Embarked] units", "+[10]% Strength if within [2] tiles of a [Moai]"],
|
"uniques": ["Can embark and move over Coasts and Oceans immediately", "[+1] Sight for all [Embarked] units", "+[10]% Strength if within [2] tiles of a [Moai]"],
|
||||||
"cities": ["Honolulu","Samoa","Tonga","Nuku Hiva","Raiatea","Aotearoa","Tahiti","Hilo","Te Wai Pounamu","Rapa Nui",
|
"cities": ["Honolulu","Samoa","Tonga","Nuku Hiva","Raiatea","Aotearoa","Tahiti","Hilo","Te Wai Pounamu","Rapa Nui",
|
||||||
"Tuamotu","Rarotonga","Tuvalu","Tubuai","Mangareva","Oahu","Kiritimati","Ontong Java","Niue","Rekohu",
|
"Tuamotu","Rarotonga","Tuvalu","Tubuai","Mangareva","Oahu","Kiritimati","Ontong Java","Niue","Rekohu",
|
||||||
"Rakahanga","Bora Bora","Kailua","Uvea","Futuna","Rotuma","Tokelau","Lahaina","Bellona","Mungava","Tikopia",
|
"Rakahanga","Bora Bora","Kailua","Uvea","Futuna","Rotuma","Tokelau","Lahaina","Bellona","Mungava","Tikopia",
|
||||||
|
@ -230,7 +230,7 @@
|
|||||||
"policies": [
|
"policies": [
|
||||||
{
|
{
|
||||||
"name": "Naval Tradition",
|
"name": "Naval Tradition",
|
||||||
"uniques": ["+[1] Movement for all [{Military} {Water}] units", "+[1] Sight for all [{Military} {Water}] units",
|
"uniques": ["+[1] Movement for all [{Military} {Water}] units", "[+1] Sight for all [{Military} {Water}] units",
|
||||||
"Free [Great General] appears", "+[2] Movement for all [Great Admiral] units"
|
"Free [Great General] appears", "+[2] Movement for all [Great Admiral] units"
|
||||||
],
|
],
|
||||||
"row": 1,
|
"row": 1,
|
||||||
|
@ -1204,7 +1204,7 @@
|
|||||||
"cost": 400,
|
"cost": 400,
|
||||||
"requiredTech": "Pharmaceuticals",
|
"requiredTech": "Pharmaceuticals",
|
||||||
"promotions": ["Amphibious"],
|
"promotions": ["Amphibious"],
|
||||||
"uniques": ["[+1] Sight for all [Embarked] units", "Defense bonus when embarked"],
|
"uniques": ["Normal vision when embarked", "Defense bonus when embarked"],
|
||||||
"attackSound": "shot"
|
"attackSound": "shot"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -263,8 +263,12 @@ class MapUnit {
|
|||||||
* @return Maximum distance of tiles this unit may possibly see
|
* @return Maximum distance of tiles this unit may possibly see
|
||||||
*/
|
*/
|
||||||
private fun getVisibilityRange(): Int {
|
private fun getVisibilityRange(): Int {
|
||||||
|
if (isEmbarked() && !hasUnique("Normal vision when embarked"))
|
||||||
|
return 1
|
||||||
|
|
||||||
var visibilityRange = 2
|
var visibilityRange = 2
|
||||||
for (unique in civInfo.getMatchingUniques("+[] Sight for all [] units"))
|
|
||||||
|
for (unique in getMatchingUniques("[] Sight for all [] units"))
|
||||||
if (matchesFilter(unique.params[1]))
|
if (matchesFilter(unique.params[1]))
|
||||||
visibilityRange += unique.params[0].toInt()
|
visibilityRange += unique.params[0].toInt()
|
||||||
|
|
||||||
@ -273,7 +277,6 @@ class MapUnit {
|
|||||||
|
|
||||||
if (hasUnique("Limited Visibility")) visibilityRange -= 1
|
if (hasUnique("Limited Visibility")) visibilityRange -= 1
|
||||||
|
|
||||||
|
|
||||||
for (unique in getTile().getAllTerrains().flatMap { it.uniqueObjects })
|
for (unique in getTile().getAllTerrains().flatMap { it.uniqueObjects })
|
||||||
if (unique.placeholderText == "[] Sight for [] units" && matchesFilter(unique.params[1]))
|
if (unique.placeholderText == "[] Sight for [] units" && matchesFilter(unique.params[1]))
|
||||||
visibilityRange += unique.params[0].toInt()
|
visibilityRange += unique.params[0].toInt()
|
||||||
|
Reference in New Issue
Block a user