mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-15 10:18:26 +07:00
Added Hoplite (Greek unique unit) and Rome's unique ability
This commit is contained in:
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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))
|
||||
|
Reference in New Issue
Block a user