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

@ -20,6 +20,7 @@ All the following are from [the Noun Project](https://thenounproject.com) licenc
* [Greek Trireme](https://thenounproject.com/search/?q=ancient%20boat&i=1626303) By Zachary McCune for Trireme
* [Chariot](https://thenounproject.com/search/?q=Chariot&i=1189930) By Andrew Doane for Chariot Archer
* [Spear](https://thenounproject.com/search/?q=Spear&i=11432) By Stephen Copinger for Spearman
* [Greek shield](https://thenounproject.com/search/?q=hoplite&i=440135) for Hoplite
### Classical Era

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 814 KiB

After

Width:  |  Height:  |  Size: 818 KiB

View file

@ -61,6 +61,7 @@
name:"Rome",
mainColor:[ 53,0,87],
secondaryColor:[238,201,9],
unique:"+25% Production towards any buildings that already exist in the Capital",
cities:["Rome","Antium","Cumae","Neapolis","Ravenna","Arretium","Mediolanum","Arpinum","Circei","Setia",
"Satricum","Ardea","Ostia","Velitrae","Viroconium","Tarentum","Brundisium","Caesaraugusta","Caesarea","Palmyra",
"Signia","Aquileia","Clusium","Sutrium","Cremona","Placentia","Hispalis","Artaxata","Aurelianorum","Nicopolis"]

View file

@ -3354,6 +3354,9 @@
Simplified_Chinese:"替代"
}
"National ability":{ // the unique ability that each nation has
}
"Babylon":{
Italian:"Babilonia"
Russian:"Вавилон"
@ -3412,24 +3415,30 @@
Simplified_Chinese:"法兰西"
Portuguese:"França"
}
"Russia":{
Simplified_Chinese:"俄罗斯"
}
"Strategic Resources provide +1 Production, and Horses, Iron and Uranium Resources provide double quantity":{
Simplified_Chinese:"所有战略资源+1生产力, 并且马 铁和铀 提供双份"
}
"Rome":{
Simplified_Chinese:"罗马"
}
"+25% Production towards any buildings that already exist in the Capital":{}
"Arabia":{
Simplified_Chinese:"阿拉伯"
}
"America":{
Simplified_Chinese:"美国"
}
"All land military units have +1 sight, 50% discount when purchasing tiles":{
Simplified_Chinese:"所有陆军 +1 视野, 购买地块打五折"
}
"Barbarians":{
Simplified_Chinese:"蛮族"
}
@ -4827,9 +4836,11 @@
Simplified_Chinese:"战车射手"
Portuguese:"Arqueiro de Biga"
}
"War Chariot":{
"War Chariot":{ // Egypt unique
Simplified_Chinese:"埃及战车"
} // Egypt unique
}
"Spearman":{
Italian:"Lanciere"
Russian:"Копейщик"
@ -5044,7 +5055,9 @@
}
"Cossack":{
Simplified_Chinese:"哥萨克骑兵"
Russian:"Казаки:} // Russia unique
Russian:"Казаки"
} // Russia unique
"Artillery":{
Italian:"Artiglieria"
Russian:"Артиллерия"

View file

@ -109,6 +109,20 @@
uniques:["Bonus vs Mounted 50%"],
hurryCostModifier:20
},
{
name:"Hoplite",
replaces:"Spearman",
uniqueTo:"Greece",
unitType:"Melee",
movement:2,
strength:13,
cost: 56,
requiredTech:"Bronze Working",
obsoleteTech:"Civil Service",
upgradesTo: "Pikeman",
uniques:["Bonus vs Mounted 50%"],
hurryCostModifier:20
},
/* Classical Era */

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))