mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-25 23:29:47 +07:00
Added Gatling Gun unit
Cannon upgrades to Artillery
This commit is contained in:
@ -334,6 +334,7 @@ All the following are from [the Noun Project](https://thenounproject.com) licenc
|
|||||||
* [Dynamite](https://thenounproject.com/term/dynamite/610652/) By Simon Martin
|
* [Dynamite](https://thenounproject.com/term/dynamite/610652/) By Simon Martin
|
||||||
|
|
||||||
### Modern
|
### Modern
|
||||||
|
* [Gears](https://thenounproject.com/term/gears/1484672/) By Aiden Icons for Replacable Parts
|
||||||
* [Radio](https://thenounproject.com/term/radio/124575/) By Arthur Shlain
|
* [Radio](https://thenounproject.com/term/radio/124575/) By Arthur Shlain
|
||||||
* [Piston](https://thenounproject.com/term/piston/1224/) By Proletkult Graphik for Combustion
|
* [Piston](https://thenounproject.com/term/piston/1224/) By Proletkult Graphik for Combustion
|
||||||
* [Plastic](https://thenounproject.com/term/plastic/478826/) By Yu luck
|
* [Plastic](https://thenounproject.com/term/plastic/478826/) By Yu luck
|
||||||
|
BIN
android/Images/UnitIcons/Gatling Gun.png
Normal file
BIN
android/Images/UnitIcons/Gatling Gun.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.2 KiB |
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Before Width: | Height: | Size: 780 KiB After Width: | Height: | Size: 782 KiB |
@ -186,6 +186,8 @@
|
|||||||
rangedStrength:18,
|
rangedStrength:18,
|
||||||
cost: 120,
|
cost: 120,
|
||||||
requiredTech:"Machinery",
|
requiredTech:"Machinery",
|
||||||
|
upgradesTo:"Gatling Gun",
|
||||||
|
obsoleteTech:"Industrialization",
|
||||||
hurryCostModifier:20
|
hurryCostModifier:20
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -199,6 +201,8 @@
|
|||||||
uniqueTo:"England",
|
uniqueTo:"England",
|
||||||
cost: 120,
|
cost: 120,
|
||||||
requiredTech:"Machinery",
|
requiredTech:"Machinery",
|
||||||
|
upgradesTo:"Gatling Gun",
|
||||||
|
obsoleteTech:"Industrialization",
|
||||||
hurryCostModifier:20
|
hurryCostModifier:20
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -282,6 +286,8 @@
|
|||||||
rangedStrength:20,
|
rangedStrength:20,
|
||||||
cost: 185,
|
cost: 185,
|
||||||
requiredTech:"Chemistry",
|
requiredTech:"Chemistry",
|
||||||
|
upgradesTo:"Artillery",
|
||||||
|
obsoleteTech:"Dynamite",
|
||||||
uniques:["Bonus vs City 200%","No defensive terrain bonus","Must set up to ranged attack","Limited Visibility"],
|
uniques:["Bonus vs City 200%","No defensive terrain bonus","Must set up to ranged attack","Limited Visibility"],
|
||||||
hurryCostModifier:20
|
hurryCostModifier:20
|
||||||
},
|
},
|
||||||
@ -334,6 +340,17 @@
|
|||||||
|
|
||||||
// Industrial Era
|
// Industrial Era
|
||||||
|
|
||||||
|
{
|
||||||
|
name:"Gatling Gun",
|
||||||
|
unitType:"Ranged",
|
||||||
|
range:1,
|
||||||
|
movement:2,
|
||||||
|
strength:30,
|
||||||
|
rangedStrength:30,
|
||||||
|
cost: 225,
|
||||||
|
requiredTech:"Industrialization",
|
||||||
|
hurryCostModifier:20
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name:"Rifleman",
|
name:"Rifleman",
|
||||||
unitType:"Melee",
|
unitType:"Melee",
|
||||||
|
@ -10,6 +10,7 @@ import com.unciv.logic.civilization.CivilizationInfo
|
|||||||
import com.unciv.logic.trade.Trade
|
import com.unciv.logic.trade.Trade
|
||||||
import com.unciv.logic.trade.TradeOffersList
|
import com.unciv.logic.trade.TradeOffersList
|
||||||
import com.unciv.ui.utils.*
|
import com.unciv.ui.utils.*
|
||||||
|
import java.text.DecimalFormat
|
||||||
import kotlin.math.roundToInt
|
import kotlin.math.roundToInt
|
||||||
|
|
||||||
class EmpireOverviewScreen : CameraStageBaseScreen(){
|
class EmpireOverviewScreen : CameraStageBaseScreen(){
|
||||||
@ -249,7 +250,7 @@ class EmpireOverviewScreen : CameraStageBaseScreen(){
|
|||||||
table.add(unit.name.tr())
|
table.add(unit.name.tr())
|
||||||
if(baseUnit.strength>0) table.add(baseUnit.strength.toString()) else table.add()
|
if(baseUnit.strength>0) table.add(baseUnit.strength.toString()) else table.add()
|
||||||
if(baseUnit.rangedStrength>0) table.add(baseUnit.rangedStrength.toString()) else table.add()
|
if(baseUnit.rangedStrength>0) table.add(baseUnit.rangedStrength.toString()) else table.add()
|
||||||
table.add(unit.currentMovement.toString()+"/"+unit.getMaxMovement())
|
table.add(DecimalFormat("0.#").format(unit.currentMovement)+"/"+unit.getMaxMovement())
|
||||||
val closestCity = unit.getTile().getTilesInDistance(3).firstOrNull{it.isCityCenter()}
|
val closestCity = unit.getTile().getTilesInDistance(3).firstOrNull{it.isCityCenter()}
|
||||||
if (closestCity!=null) table.add(closestCity.getCity()!!.name) else table.add()
|
if (closestCity!=null) table.add(closestCity.getCity()!!.name) else table.add()
|
||||||
table.row()
|
table.row()
|
||||||
|
@ -5,7 +5,6 @@ import com.badlogic.gdx.scenes.scene2d.Group
|
|||||||
import com.badlogic.gdx.scenes.scene2d.InputEvent
|
import com.badlogic.gdx.scenes.scene2d.InputEvent
|
||||||
import com.badlogic.gdx.scenes.scene2d.ui.*
|
import com.badlogic.gdx.scenes.scene2d.ui.*
|
||||||
import com.badlogic.gdx.scenes.scene2d.utils.ActorGestureListener
|
import com.badlogic.gdx.scenes.scene2d.utils.ActorGestureListener
|
||||||
import com.badlogic.gdx.utils.Align
|
|
||||||
import com.unciv.UnCivGame
|
import com.unciv.UnCivGame
|
||||||
import com.unciv.logic.HexMath
|
import com.unciv.logic.HexMath
|
||||||
import com.unciv.logic.city.CityInfo
|
import com.unciv.logic.city.CityInfo
|
||||||
@ -195,7 +194,7 @@ class CityScreen(internal val city: CityInfo) : CameraStageBaseScreen() {
|
|||||||
val tileGroup = CityTileGroup(cityInfo, tileInfo)
|
val tileGroup = CityTileGroup(cityInfo, tileInfo)
|
||||||
val tilesInRange = city.getTilesInRange()
|
val tilesInRange = city.getTilesInRange()
|
||||||
|
|
||||||
// this needs to happen on pdate, because we can buy tiles, which changes the definition of the bought tiles...
|
// this needs to happen on update, because we can buy tiles, which changes the definition of the bought tiles...
|
||||||
if (tileInfo.getCity()!=city) { // outside of city
|
if (tileInfo.getCity()!=city) { // outside of city
|
||||||
tileGroup.setColor(0f, 0f, 0f, 0.3f)
|
tileGroup.setColor(0f, 0f, 0f, 0.3f)
|
||||||
tileGroup.yieldGroup.isVisible = false
|
tileGroup.yieldGroup.isVisible = false
|
||||||
@ -259,15 +258,15 @@ class CityScreen(internal val city: CityInfo) : CameraStageBaseScreen() {
|
|||||||
|
|
||||||
val stats = tile.getTileStats(city, city.civInfo)
|
val stats = tile.getTileStats(city, city.civInfo)
|
||||||
tileTable.pad(20f)
|
tileTable.pad(20f)
|
||||||
tileTable.columnDefaults(0).padRight(10f)
|
|
||||||
|
|
||||||
tileTable.add(Label(tile.toString(), CameraStageBaseScreen.skin)).colspan(2)
|
tileTable.add(Label(tile.toString(), CameraStageBaseScreen.skin)).colspan(2)
|
||||||
tileTable.row()
|
tileTable.row()
|
||||||
|
|
||||||
val statsTable = Table()
|
val statsTable = Table()
|
||||||
|
statsTable.defaults().pad(2f)
|
||||||
for (entry in stats.toHashMap().filterNot { it.value==0f }) {
|
for (entry in stats.toHashMap().filterNot { it.value==0f }) {
|
||||||
statsTable.add(ImageGetter.getStatIcon(entry.key.toString())).size(20f).align(Align.right)
|
statsTable.add(ImageGetter.getStatIcon(entry.key.toString())).size(20f)
|
||||||
statsTable.add(Label(Math.round(entry.value).toString() + "", CameraStageBaseScreen.skin)).align(Align.left)
|
statsTable.add(Label(Math.round(entry.value).toString() + "", CameraStageBaseScreen.skin))
|
||||||
statsTable.row()
|
statsTable.row()
|
||||||
}
|
}
|
||||||
tileTable.add(statsTable).row()
|
tileTable.add(statsTable).row()
|
||||||
|
Reference in New Issue
Block a user