All nation uniques up to Iroquois

This commit is contained in:
Yair Morgenstern
2020-08-06 20:15:59 +03:00
parent 9f5b8d157a
commit ce0985d077
8 changed files with 23 additions and 19 deletions

View File

@ -349,6 +349,8 @@
"outerColor": [150,150,150],
"innerColor": [60,60,60],
"unique": "FUROR_TEUTONICUS",
"uniqueName": "Furor Teutonicus",
"uniques": ["67% chance to earn 25 Gold and recruit a Barbarian unit from a conquered encampment", "-25% land units maintenance"],
"cities": ["Berlin","Hamburg","Munich","Cologne","Frankfurt","Essen","Dortmund","Stuttgart","Dusseldorf","Bremen",
"Hannover","Duisburg","Leipzig","Dresden","Bonn","Bochum","Bielefeld","Karlsruhe","Gelsenkirchen","Wiesbaden",
"Munster","Rostok","Chemnitz","Braunschweig","Halle","Mצnchengladbach","Kiel","Wuppertal","Freiburg","Hagen",
@ -377,6 +379,8 @@
"outerColor": [245,248,185],
"innerColor": [18,84,30],
"unique": "BARBARY_CORSAIRS",
"uniqueName": "Barbary Corsairs",
"uniques": ["Pay only one third the usual cost for naval unit maintenance", "Melee naval units have a 1/3 chance to capture defeated naval units"],
"cities": ["Istanbul","Edirne","Ankara","Bursa","Konya","Samsun","Gaziantep","Diyabakir","Izmir","Kayseri","Malatya",
"Marsin","Antalya","Zonguldak","Denizli","Ordu","Mugia","Eskishehir","Inebolu","Sinop","Adana","Artuin",
"Bodrum","Eregli","Silifke","Sivas","Amasya","Marmaris","Trabzon","Erzurum","Urfa","Izmit","Afyonkarhisar",
@ -402,6 +406,8 @@
"outerColor": [20,25,173],
"innerColor": [187,33,51],
"unique": "SCHOLARS_OF_THE_JADE_HALL",
"uniqueName": "Scholars of the Jade Hall",
"uniques": ["[+2 Science] from every specialist", "[+2 Science] from every [Great Improvement]"],
"cities": ["Seoul","Busan","Jeonju","Daegu","Pyongyang","Kaesong","Suwon","Gwangju","Gangneung","Hamhung","Wonju","Ulsan",
"Changwon","Andong","Gongju","Haeju","Cheongju","Mokpo","Dongducheon","Geoje","Suncheon","Jinju","Sangju",
"Rason","Gyeongju","Chungju","Sacheon","Gimje","Anju"]
@ -426,6 +432,8 @@
"outerColor": [54,72,72],
"innerColor": [246,205,137],
"unique": "GREAT_WARPATH",
"uniqueName": "The Great Warpath",
"uniques": ["All units move through Forest and Jungle Tiles in friendly territory as if they have roads. These tiles can be used to establish City Connections upon researching the Wheel."]
"cities": ["Onoondaga","Osininka","Grand River","Akwesasme","Buffalo Creek","Brantford","Montreal","Genesse River",
"Canandaigua Lake","Lake Simcoe","Salamanca","Gowanda","Cuba","Akron","Kanesatake","Ganienkeh","Cayuga Castle",
"Chondote","Canajoharie","Nedrow","Oneida Lake","Kanonwalohale","Green Bay","Southwold","Mohawk Valley",

View File

@ -146,32 +146,32 @@
{
"name": "Academy",
"science": 8,
"uniques": ["Great improvement"],
"uniques": ["Great Improvement"],
"improvingTech": "Scientific Theory",
"improvingTechStats": {"science": 2}
},
{
"name": "Landmark",
"culture": 6,
"uniques": ["Great improvement"],
"uniques": ["Great Improvement"],
},
{
"name": "Manufactory",
"production": 4,
"improvingTech": "Chemistry",
"uniques": ["Great improvement"],
"uniques": ["Great Improvement"],
"improvingTechStats": {"production": 1}
},
{
"name": "Customs house",
"gold": 4,
"improvingTech": "Economics",
"uniques": ["Great improvement"],
"uniques": ["Great Improvement"],
"improvingTechStats": {"gold": 1}
},
{
"name": "Citadel",
"uniques": ["Gives a defensive bonus of 100%", "Deal 30 damage to adjacent enemy units", "Great improvement"]
"uniques": ["Gives a defensive bonus of 100%", "Deal 30 damage to adjacent enemy units", "Great Improvement"]
// TODO (G&K): adds every tile around it to your territory
},

View File

@ -162,7 +162,7 @@ object Battle {
// German unique - needs to be checked before we try to move to the enemy tile, since the encampment disappears after we move in
if (defender.isDefeated() && defender.getCivInfo().isBarbarian()
&& attackedTile.improvement == Constants.barbarianEncampment
&& attacker.getCivInfo().nation.unique == UniqueAbility.FUROR_TEUTONICUS
&& attacker.getCivInfo().hasUnique("67% chance to earn 25 Gold and recruit a Barbarian unit from a conquered encampment")
&& Random().nextDouble() > 0.67) {
attacker.getCivInfo().placeUnitNearTile(attackedTile.position, defender.getName())
attacker.getCivInfo().gold += 25
@ -171,7 +171,7 @@ object Battle {
// Similarly, Ottoman unique
if (defender.isDefeated() && defender.getUnitType().isWaterUnit() && attacker.isMelee() && attacker.getUnitType().isWaterUnit()
&& attacker.getCivInfo().nation.unique == UniqueAbility.BARBARY_CORSAIRS
&& attacker.getCivInfo().hasUnique("Melee naval units have a 1/3 chance to capture defeated naval units")
&& Random().nextDouble() > 0.33) {
attacker.getCivInfo().placeUnitNearTile(attackedTile.position, defender.getName())
}

View File

@ -248,8 +248,6 @@ class CityStats {
stats.add(Stats.parse(unique.params[0]))
if (cityInfo.civInfo.hasUnique("+1 Production from specialists"))
stats.production += 1
if(cityInfo.civInfo.nation.unique == UniqueAbility.SCHOLARS_OF_THE_JADE_HALL)
stats.science+=2
return stats
}

View File

@ -27,7 +27,7 @@ class CivInfoStats(val civInfo: CivilizationInfo){
}
var numberOfUnitsToPayFor = max(0f, unitsToPayFor.count().toFloat() - freeUnits)
if(civInfo.nation.unique == UniqueAbility.FUROR_TEUTONICUS){
if(civInfo.hasUnique("-25% land units maintenance")){
val numberOfUnitsWithDiscount = min(numberOfUnitsToPayFor, unitsToPayFor.count { it.type.isLandUnit() }.toFloat())
numberOfUnitsToPayFor -= 0.25f * numberOfUnitsWithDiscount
}

View File

@ -244,15 +244,13 @@ open class TileInfo {
if(city!=null)
for(unique in city.civInfo.getMatchingUniques("[] from every []")) {
if (improvement.name == unique.params[1])
if (improvement.name == unique.params[1] || (unique.params[1]=="Great Improvement"))
stats.add(Stats.parse(unique.params[0]))
}
if (containsGreatImprovement()
&& observingCiv.hasUnique("Tile yield from Great Improvements +100%"))
stats.add(improvement) // again, for the double effect
if (containsGreatImprovement() && city != null && city.civInfo.nation.unique == UniqueAbility.SCHOLARS_OF_THE_JADE_HALL)
stats.science += 2
if (improvement.uniques.contains("+1 additional Culture for each adjacent Moai"))
stats.culture += neighbors.count { it.improvement == "Moai" }

View File

@ -58,15 +58,15 @@ class Nation : INamed {
// Same for Inca unique
@Transient var greatAndeanRoad = false
fun setTransients(){
fun setTransients() {
outerColorObject = colorFromRGB(outerColor[0], outerColor[1], outerColor[2])
if(innerColor==null) innerColorObject = Color.BLACK
if (innerColor == null) innerColorObject = Color.BLACK
else innerColorObject = colorFromRGB(innerColor!![0], innerColor!![1], innerColor!![2])
if(unique == UniqueAbility.GREAT_WARPATH)
if (uniques.contains("All units move through Forest and Jungle Tiles in friendly territory as if they have roads. These tiles can be used to establish City Connections upon researching the Wheel."))
forestsAndJunglesAreRoads = true
if(unique == UniqueAbility.GREAT_ANDEAN_ROAD)
if (unique == UniqueAbility.GREAT_ANDEAN_ROAD)
greatAndeanRoad = true
}

View File

@ -71,6 +71,6 @@ class TileImprovement : NamedStats() {
}
fun hasUnique(unique: String) = uniques.contains(unique)
fun isGreatImprovement() = hasUnique("Great improvement")
fun isGreatImprovement() = hasUnique("Great Improvement")
}