mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-30 07:21:34 -04:00
Added Minuteman, American unique, and England special ability
This commit is contained in:
parent
20994cb908
commit
6672b9e7bd
BIN
android/Images/UnitIcons/Minuteman.png
Normal file
BIN
android/Images/UnitIcons/Minuteman.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 794 KiB After Width: | Height: | Size: 794 KiB |
@ -35,6 +35,7 @@
|
|||||||
name:"England",
|
name:"England",
|
||||||
mainColor:[ 114, 0, 0],
|
mainColor:[ 114, 0, 0],
|
||||||
secondaryColor:[255,255,255],
|
secondaryColor:[255,255,255],
|
||||||
|
unique:"+2 movement for all naval units"
|
||||||
cities:["London","York","Nottingham","Hastings","Canterbury","Coventry","Warwick","Newcastle","Oxford","Liverpool",
|
cities:["London","York","Nottingham","Hastings","Canterbury","Coventry","Warwick","Newcastle","Oxford","Liverpool",
|
||||||
"Dover","Brighton","Norwich","Leeds","Reading","Birmingham","Richmond","Exeter","Cambridge","Gloucester",
|
"Dover","Brighton","Norwich","Leeds","Reading","Birmingham","Richmond","Exeter","Cambridge","Gloucester",
|
||||||
"Manchester","Bristol","Leicester","Carlisle","Ipswich","Portsmouth","Berwick","Bath","Mumbles","Southampton"]
|
"Manchester","Bristol","Leicester","Carlisle","Ipswich","Portsmouth","Berwick","Bath","Mumbles","Southampton"]
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name:"Oligarchy",
|
name:"Oligarchy",
|
||||||
description:"Units in cities cost no maintainance",
|
description:"Units in cities cost no Maintenance",
|
||||||
row:1,
|
row:1,
|
||||||
column:5
|
column:5
|
||||||
},
|
},
|
||||||
@ -179,7 +179,7 @@
|
|||||||
policies:[
|
policies:[
|
||||||
{
|
{
|
||||||
name:"Trade Unions",
|
name:"Trade Unions",
|
||||||
description:"Maintainance on roads & railroads reduced by 33%, +2 gold from all trade routes",
|
description:"Maintenance on roads & railroads reduced by 33%, +2 gold from all trade routes",
|
||||||
row:1,
|
row:1,
|
||||||
column:2
|
column:2
|
||||||
},
|
},
|
||||||
|
@ -4027,7 +4027,7 @@
|
|||||||
Russian:"Олигархия"
|
Russian:"Олигархия"
|
||||||
Spanish:"Oligarquía"
|
Spanish:"Oligarquía"
|
||||||
}
|
}
|
||||||
"Units in cities cost no maintainance":{
|
"Units in cities cost no Maintenance":{
|
||||||
Italian:"Nessuna manutenzione per le unità nelle città"
|
Italian:"Nessuna manutenzione per le unità nelle città"
|
||||||
Russian:"Юниты в городах содержаться бесплатно"
|
Russian:"Юниты в городах содержаться бесплатно"
|
||||||
Spanish:"Unidades en las ciudades no cuestan mantenimiento"
|
Spanish:"Unidades en las ciudades no cuestan mantenimiento"
|
||||||
@ -4274,7 +4274,7 @@
|
|||||||
Russian:"Караваны фургонов"
|
Russian:"Караваны фургонов"
|
||||||
Spanish:"Sindicatos"
|
Spanish:"Sindicatos"
|
||||||
}
|
}
|
||||||
"Maintainance on roads & railroads reduced by 33%, +2 gold from all trade routes":{
|
"Maintenance on roads & railroads reduced by 33%, +2 gold from all trade routes":{
|
||||||
Italian:"-33% manutenzioni su strade e ferrovie, +2 oro per ogni rotta commerciale"
|
Italian:"-33% manutenzioni su strade e ferrovie, +2 oro per ogni rotta commerciale"
|
||||||
Russian:"Стоимость содержания дорог и железных дорог уменьшена на 33%, +2 золота от всех торговых маршрутов"
|
Russian:"Стоимость содержания дорог и железных дорог уменьшена на 33%, +2 золота от всех торговых маршрутов"
|
||||||
Spanish:"Mantenimiento de carreteras y líneas de ferrocarril reducido un 33%, +2 oro de todas las rutas comerciales"
|
Spanish:"Mantenimiento de carreteras y líneas de ferrocarril reducido un 33%, +2 oro de todas las rutas comerciales"
|
||||||
|
@ -196,7 +196,7 @@
|
|||||||
"You have founded your second city!",
|
"You have founded your second city!",
|
||||||
"Connecting your cities to the capital by roads",
|
"Connecting your cities to the capital by roads",
|
||||||
" will generate gold via the trade route.",
|
" will generate gold via the trade route.",
|
||||||
"Note that each road costs 1 gold maintainance per turn, "
|
"Note that each road costs 1 gold Maintenance per turn, "
|
||||||
" so it may be more economical to wait until the cities grow!"
|
" so it may be more economical to wait until the cities grow!"
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
@ -317,6 +317,20 @@
|
|||||||
obsoleteTech:"Rifling",
|
obsoleteTech:"Rifling",
|
||||||
hurryCostModifier:20
|
hurryCostModifier:20
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name:"Minuteman",
|
||||||
|
unitType:"Melee",
|
||||||
|
replaces:"Musketman",
|
||||||
|
uniqueTo:"America",
|
||||||
|
movement:2,
|
||||||
|
strength:24,
|
||||||
|
cost: 150,
|
||||||
|
requiredTech:"Gunpowder",
|
||||||
|
upgradesTo:"Rifleman"
|
||||||
|
obsoleteTech:"Rifling",
|
||||||
|
uniques:["Bonus vs units in rough terrain 15%","Ignores terrain cost"]
|
||||||
|
hurryCostModifier:20
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name:"Frigate",
|
name:"Frigate",
|
||||||
unitType:"WaterRanged",
|
unitType:"WaterRanged",
|
||||||
|
@ -20,6 +20,9 @@ class UnCivGame : Game() {
|
|||||||
*/
|
*/
|
||||||
val viewEntireMapForDebug = false
|
val viewEntireMapForDebug = false
|
||||||
|
|
||||||
|
// For when you need to test something in an advanced game and don't have time to faff around
|
||||||
|
val SuperchagedForDebug = false
|
||||||
|
|
||||||
lateinit var worldScreen: WorldScreen
|
lateinit var worldScreen: WorldScreen
|
||||||
|
|
||||||
override fun create() {
|
override fun create() {
|
||||||
|
@ -62,7 +62,7 @@ class Automation {
|
|||||||
|
|
||||||
val goldBuildings = buildableNotWonders.filter { it.gold>0 }
|
val goldBuildings = buildableNotWonders.filter { it.gold>0 }
|
||||||
val wartimeBuildings = buildableNotWonders.filter { it.xpForNewUnits>0 || it.cityStrength>0 }.sortedBy { it.maintenance }
|
val wartimeBuildings = buildableNotWonders.filter { it.xpForNewUnits>0 || it.cityStrength>0 }.sortedBy { it.maintenance }
|
||||||
val zeroMaintainanceBuildings = buildableNotWonders.filter { it.maintenance == 0 && it !in wartimeBuildings }
|
val zeroMaintenanceBuildings = buildableNotWonders.filter { it.maintenance == 0 && it !in wartimeBuildings }
|
||||||
val isAtWar = cityInfo.civInfo.isAtWar()
|
val isAtWar = cityInfo.civInfo.isAtWar()
|
||||||
|
|
||||||
when {
|
when {
|
||||||
@ -77,7 +77,7 @@ class Automation {
|
|||||||
buildableNotWonders.any { it.name=="Market"} -> currentConstruction = "Market"
|
buildableNotWonders.any { it.name=="Market"} -> currentConstruction = "Market"
|
||||||
militaryUnits==0 -> trainCombatUnit(cityInfo)
|
militaryUnits==0 -> trainCombatUnit(cityInfo)
|
||||||
workers==0 -> currentConstruction = CityConstructions.Worker
|
workers==0 -> currentConstruction = CityConstructions.Worker
|
||||||
zeroMaintainanceBuildings.isNotEmpty() -> currentConstruction = zeroMaintainanceBuildings.getRandom().name
|
zeroMaintenanceBuildings.isNotEmpty() -> currentConstruction = zeroMaintenanceBuildings.getRandom().name
|
||||||
isAtWar && militaryUnits<cities -> trainCombatUnit(cityInfo)
|
isAtWar && militaryUnits<cities -> trainCombatUnit(cityInfo)
|
||||||
isAtWar && wartimeBuildings.isNotEmpty() -> currentConstruction = wartimeBuildings.getRandom().name
|
isAtWar && wartimeBuildings.isNotEmpty() -> currentConstruction = wartimeBuildings.getRandom().name
|
||||||
workers<cities/2 -> currentConstruction = CityConstructions.Worker
|
workers<cities/2 -> currentConstruction = CityConstructions.Worker
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.unciv.logic.city
|
package com.unciv.logic.city
|
||||||
|
|
||||||
|
import com.unciv.UnCivGame
|
||||||
import com.unciv.logic.map.BFS
|
import com.unciv.logic.map.BFS
|
||||||
import com.unciv.logic.map.RoadStatus
|
import com.unciv.logic.map.RoadStatus
|
||||||
import com.unciv.models.gamebasics.Building
|
import com.unciv.models.gamebasics.Building
|
||||||
@ -275,7 +276,14 @@ class CityStats {
|
|||||||
newStatPercentBonusList["Railroad"]=getStatPercentBonusesFromRailroad()
|
newStatPercentBonusList["Railroad"]=getStatPercentBonusesFromRailroad()
|
||||||
newStatPercentBonusList["Marble"]=getStatPercentBonusesFromMarble()
|
newStatPercentBonusList["Marble"]=getStatPercentBonusesFromMarble()
|
||||||
newStatPercentBonusList["Computers"]=getStatPercentBonusesFromComputers()
|
newStatPercentBonusList["Computers"]=getStatPercentBonusesFromComputers()
|
||||||
newStatPercentBonusList["Difficutly"]=getStatPercentBonusesFromDifficulty()
|
newStatPercentBonusList["Difficulty"]=getStatPercentBonusesFromDifficulty()
|
||||||
|
|
||||||
|
if(UnCivGame.Current.SuperchagedForDebug) {
|
||||||
|
val stats = Stats()
|
||||||
|
for(stat in Stat.values()) stats.add(stat,10000f)
|
||||||
|
newStatPercentBonusList["Supercharged"] = stats
|
||||||
|
}
|
||||||
|
|
||||||
statPercentBonusList=newStatPercentBonusList
|
statPercentBonusList=newStatPercentBonusList
|
||||||
|
|
||||||
val statPercentBonuses = Stats()
|
val statPercentBonuses = Stats()
|
||||||
@ -310,8 +318,8 @@ class CityStats {
|
|||||||
if (!newBaseStatList.containsKey("Policies")) newBaseStatList["Policies"] = Stats()
|
if (!newBaseStatList.containsKey("Policies")) newBaseStatList["Policies"] = Stats()
|
||||||
newBaseStatList["Policies"]!!.food += getGrowthBonusFromPolicies() * excessFood
|
newBaseStatList["Policies"]!!.food += getGrowthBonusFromPolicies() * excessFood
|
||||||
|
|
||||||
val buildingsMaintainance = cityInfo.cityConstructions.getMaintenanceCosts().toFloat() // this is AFTER the bonus calculation!
|
val buildingsMaintenance = cityInfo.cityConstructions.getMaintenanceCosts().toFloat() // this is AFTER the bonus calculation!
|
||||||
newBaseStatList["Maintenance"] = Stats().apply { gold = -buildingsMaintainance }
|
newBaseStatList["Maintenance"] = Stats().apply { gold = -buildingsMaintenance }
|
||||||
|
|
||||||
baseStatList = newBaseStatList
|
baseStatList = newBaseStatList
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ class CivilizationInfo {
|
|||||||
var unitsToPayFor = getCivUnits()
|
var unitsToPayFor = getCivUnits()
|
||||||
if(policies.isAdopted("Oligarchy")) unitsToPayFor = unitsToPayFor.filterNot { it.getTile().isCityCenter() }
|
if(policies.isAdopted("Oligarchy")) unitsToPayFor = unitsToPayFor.filterNot { it.getTile().isCityCenter() }
|
||||||
val totalPaidUnits = max(0,unitsToPayFor.count()-freeUnits)
|
val totalPaidUnits = max(0,unitsToPayFor.count()-freeUnits)
|
||||||
val gameProgress = gameInfo.turns/400f // as game progresses maintainance cost rises
|
val gameProgress = gameInfo.turns/400f // as game progresses Maintenance cost rises
|
||||||
var cost = baseUnitCost*totalPaidUnits*(1+gameProgress)
|
var cost = baseUnitCost*totalPaidUnits*(1+gameProgress)
|
||||||
cost = cost.pow(1+gameProgress/3) // Why 3? To spread 1 to 1.33
|
cost = cost.pow(1+gameProgress/3) // Why 3? To spread 1 to 1.33
|
||||||
if(!isPlayerCivilization())
|
if(!isPlayerCivilization())
|
||||||
|
@ -57,6 +57,9 @@ class MapUnit {
|
|||||||
&& civInfo.getBuildingUniques().contains("All military naval units receive +1 movement and +1 sight"))
|
&& civInfo.getBuildingUniques().contains("All military naval units receive +1 movement and +1 sight"))
|
||||||
movement += 1
|
movement += 1
|
||||||
|
|
||||||
|
if(type.isWaterUnit() && civInfo.getNation().unique=="+2 movement for all naval units")
|
||||||
|
movement+=2
|
||||||
|
|
||||||
return movement
|
return movement
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -42,40 +42,51 @@ class NewGameScreen: PickerScreen(){
|
|||||||
update()
|
update()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun getUniqueLabel(nation: Nation): CharSequence? {
|
private fun getUniqueLabel(nation: Nation): String {
|
||||||
|
val textList = ArrayList<String>()
|
||||||
|
|
||||||
|
if(nation.unique!=null) {
|
||||||
|
textList += nation.unique!!
|
||||||
|
textList += ""
|
||||||
|
}
|
||||||
|
|
||||||
for (building in GameBasics.Buildings.values)
|
for (building in GameBasics.Buildings.values)
|
||||||
if (building.uniqueTo == nation.name) {
|
if (building.uniqueTo == nation.name) {
|
||||||
var text = building.name.tr() + " - {replaces} " + building.replaces!!.tr() + "\n"
|
|
||||||
val originalBuilding = GameBasics.Buildings[building.replaces!!]!!
|
val originalBuilding = GameBasics.Buildings[building.replaces!!]!!
|
||||||
|
|
||||||
|
textList += building.name.tr() + " - {replaces} " + originalBuilding.name.tr()
|
||||||
val originalBuildingStatMap = originalBuilding.toHashMap()
|
val originalBuildingStatMap = originalBuilding.toHashMap()
|
||||||
for (stat in building.toHashMap())
|
for (stat in building.toHashMap())
|
||||||
if (stat.value != originalBuildingStatMap[stat.key])
|
if (stat.value != originalBuildingStatMap[stat.key])
|
||||||
text += stat.value.toInt().toString() + " " + stat.key + " vs " + originalBuildingStatMap[stat.key]!!.toInt() + "\n"
|
textList += " "+stat.value.toInt() + " " + stat.key + " vs " + originalBuildingStatMap[stat.key]!!.toInt()
|
||||||
for(unique in building.uniques.filter { it !in originalBuilding.uniques })
|
for(unique in building.uniques.filter { it !in originalBuilding.uniques })
|
||||||
text += unique.tr()+"\n"
|
textList += " "+unique.tr()
|
||||||
if (building.maintenance != originalBuilding.maintenance)
|
if (building.maintenance != originalBuilding.maintenance)
|
||||||
text += "{Maintainance} " + building.maintenance + " vs " + originalBuilding.maintenance + "\n"
|
textList += " {Maintenance} " + building.maintenance + " vs " + originalBuilding.maintenance
|
||||||
return text.tr()
|
textList+=""
|
||||||
}
|
}
|
||||||
|
|
||||||
for (unit in GameBasics.Units.values)
|
for (unit in GameBasics.Units.values)
|
||||||
if (unit.uniqueTo == nation.name) {
|
if (unit.uniqueTo == nation.name) {
|
||||||
var text = unit.name.tr() + " - {replaces} " + unit.replaces!!.tr() + "\n"
|
|
||||||
val originalUnit = GameBasics.Units[unit.replaces!!]!!
|
val originalUnit = GameBasics.Units[unit.replaces!!]!!
|
||||||
|
|
||||||
|
textList += unit.name.tr() + " - {replaces} " + originalUnit.name.tr()
|
||||||
if (unit.strength != originalUnit.strength)
|
if (unit.strength != originalUnit.strength)
|
||||||
text += "{Combat strength} " + unit.strength + " vs " + originalUnit.strength + "\n"
|
textList += " {Combat strength} " + unit.strength + " vs " + originalUnit.strength
|
||||||
if (unit.rangedStrength!= originalUnit.rangedStrength)
|
if (unit.rangedStrength!= originalUnit.rangedStrength)
|
||||||
text += "{Ranged strength} " + unit.rangedStrength+ " vs " + originalUnit.rangedStrength + "\n"
|
textList+= " {Ranged strength} " + unit.rangedStrength+ " vs " + originalUnit.rangedStrength
|
||||||
if (unit.range!= originalUnit.range)
|
if (unit.range!= originalUnit.range)
|
||||||
text += "{Range} " + unit.range+ " vs " + originalUnit.range + "\n"
|
textList+= " {Range} " + unit.range+ " vs " + originalUnit.range
|
||||||
if (unit.movement!= originalUnit.movement)
|
if (unit.movement!= originalUnit.movement)
|
||||||
text += "{Movement} " + unit.movement+ " vs " + originalUnit.movement + "\n"
|
textList+= " {Movement} " + unit.movement+ " vs " + originalUnit.movement
|
||||||
return text.tr()
|
val newUniques = unit.uniques.filterNot { it in originalUnit.uniques }
|
||||||
|
if(newUniques.isNotEmpty())
|
||||||
|
textList+=" {Uniques}: "+newUniques.joinToString()
|
||||||
|
textList+=""
|
||||||
}
|
}
|
||||||
|
|
||||||
if(nation.unique!=null) return nation.unique
|
|
||||||
|
|
||||||
return ""
|
return textList.joinToString("\n").tr().trim()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user