Added Hoplite (Greek unique unit) and Rome's unique ability

This commit is contained in:
Yair Morgenstern
2018-12-10 22:31:03 +02:00
parent 78879df350
commit 63f1f501cd
10 changed files with 275 additions and 221 deletions

View File

@ -21,7 +21,7 @@ class UnCivGame : Game() {
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
val superchargedForDebug = true
lateinit var worldScreen: WorldScreen

View File

@ -104,6 +104,19 @@ class CityStats {
return stats
}
private fun getStatPercentBonusesFromNationUnique(): Stats {
val stats = Stats()
val civUnique = cityInfo.civInfo.getNation().unique
if(civUnique=="+25% Production towards any buildings that already exist in the Capital"
&& cityInfo.cityConstructions.getCurrentConstruction() is Building
&& cityInfo.civInfo.getCapital().cityConstructions.builtBuildings
.contains(cityInfo.cityConstructions.currentConstruction))
stats.production+=25f
return stats
}
private fun getGrowthBonusFromPolicies(): Float {
var bonus = 0f
@ -277,8 +290,9 @@ class CityStats {
newStatPercentBonusList["Marble"]=getStatPercentBonusesFromMarble()
newStatPercentBonusList["Computers"]=getStatPercentBonusesFromComputers()
newStatPercentBonusList["Difficulty"]=getStatPercentBonusesFromDifficulty()
newStatPercentBonusList["National ability"]=getStatPercentBonusesFromNationUnique()
if(UnCivGame.Current.superchagedForDebug) {
if(UnCivGame.Current.superchargedForDebug) {
val stats = Stats()
for(stat in Stat.values()) stats.add(stat,10000f)
newStatPercentBonusList["Supercharged"] = stats

View File

@ -34,6 +34,10 @@ class TechButton(techName:String, val techManager: TechManager) : Table(CameraSt
val techEnabledIcons = Table()
techEnabledIcons.defaults().pad(5f)
val units = GameBasics.Units.values.filter { it.requiredTech==techName }
.filter { it.uniqueTo==null || it.uniqueTo==techManager.civInfo.civName }
for(unit in GameBasics.Units.values.filter { it.requiredTech==techName
&& (it.uniqueTo==null || it.uniqueTo==techManager.civInfo.civName) })
techEnabledIcons.add(ImageGetter.getConstructionImage(unit.name).surroundWithCircle(30f))