Added Legion unique unit - #563
This commit is contained in:
parent
e3dcd4cb43
commit
c3bfed1bd1
10 changed files with 268 additions and 244 deletions
|
@ -33,6 +33,7 @@ All the following are from [the Noun Project](https://thenounproject.com) licenc
|
|||
* [Catapult](https://thenounproject.com/search/?q=Spear&i=1233840) By Jakub Ukrop
|
||||
* [Unloaded Crossbow](https://thenounproject.com/term/unloaded-crossbow/815992/) By Hamish as Ballista
|
||||
* [Sword](https://thenounproject.com/search/?q=Sword&i=1215443) By Guilherme Furtado for Swordsman
|
||||
* [Roman Helmet](https://thenounproject.com/search/?q=legion&i=440134) By parkjisun for Legion
|
||||
* [Horse](https://thenounproject.com/search/?q=Horse&i=1373793) By AFY Studio for Horseman
|
||||
* [Horse Head](https://thenounproject.com/search/?q=Cavalry&i=374037) By Juan Pablo Bravo for Companion Cavalry
|
||||
|
||||
|
|
BIN
android/Images/UnitIcons/Legion.png
Normal file
BIN
android/Images/UnitIcons/Legion.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.5 KiB |
File diff suppressed because it is too large
Load diff
Binary file not shown.
Before Width: | Height: | Size: 976 KiB After Width: | Height: | Size: 979 KiB |
|
@ -6482,6 +6482,7 @@
|
|||
Portuguese:"Espadachin" // may replace with guerreiro com espada if nescessary
|
||||
German:"Schwertkämpfer"
|
||||
}
|
||||
|
||||
"Legion":{
|
||||
Italian:"Legionario"
|
||||
Romanian:"Legionar"
|
||||
|
@ -6489,7 +6490,10 @@
|
|||
Simplified_Chinese:"古罗马军团"
|
||||
German:"Legionär"
|
||||
French:"Légion"
|
||||
} // Rome unique
|
||||
}
|
||||
"Can construct roads":{}
|
||||
"Construct road":{} // for unit action button
|
||||
|
||||
"Horseman":{
|
||||
Italian:"Guerriero a cavallo" //wrong translation by Smashfanful
|
||||
Russian:"Всадник"
|
||||
|
|
|
@ -332,7 +332,6 @@
|
|||
hurryCostModifier:20,
|
||||
attackSound:"metalhit"
|
||||
},
|
||||
/*
|
||||
{
|
||||
name:"Legion",
|
||||
unitType:"Melee",
|
||||
|
@ -345,10 +344,11 @@
|
|||
upgradesTo:"Longswordsman",
|
||||
obsoleteTech:"Steel",
|
||||
requiredResource:"Iron",
|
||||
uniques:["Can construct roads"]
|
||||
hurryCostModifier:20,
|
||||
attackSound:"metalhit"
|
||||
//Roman unique unit. It is stronger than Swordsman. It should also build roads (maybe railroads, too). It takes more to Steel to make it obsolete.
|
||||
},
|
||||
/*
|
||||
{
|
||||
name:"Mohawk Warrior",
|
||||
unitType:"Melee",
|
||||
|
|
|
@ -20,7 +20,7 @@ class UnCivGame(val version: String) : Game() {
|
|||
val viewEntireMapForDebug = false
|
||||
|
||||
// For when you need to test something in an advanced game and don't have time to faff around
|
||||
val superchargedForDebug = false
|
||||
val superchargedForDebug = true
|
||||
|
||||
lateinit var worldScreen: WorldScreen
|
||||
|
||||
|
|
|
@ -176,6 +176,7 @@ class MapUnit {
|
|||
fun isIdle(): Boolean {
|
||||
if (currentMovement == 0f) return false
|
||||
if (name == "Worker" && getTile().improvementInProgress != null) return false
|
||||
if (hasUnique("Can construct roads") && currentTile.improvementInProgress=="Road") return false
|
||||
if (isFortified()) return false
|
||||
if (action=="Sleep") return false
|
||||
return true
|
||||
|
@ -301,6 +302,7 @@ class MapUnit {
|
|||
|
||||
private fun doPostTurnAction() {
|
||||
if (name == "Worker" && getTile().improvementInProgress != null) workOnImprovement()
|
||||
if(hasUnique("Can construct roads") && currentTile.improvementInProgress=="Road") workOnImprovement()
|
||||
if(currentMovement== getMaxMovement().toFloat()
|
||||
&& isFortified()){
|
||||
val currentTurnsFortified = getFortificationTurns()
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.unciv.UnCivGame
|
|||
import com.unciv.logic.automation.UnitAutomation
|
||||
import com.unciv.logic.automation.WorkerAutomation
|
||||
import com.unciv.logic.map.MapUnit
|
||||
import com.unciv.logic.map.RoadStatus
|
||||
import com.unciv.models.gamebasics.Building
|
||||
import com.unciv.models.gamebasics.GameBasics
|
||||
import com.unciv.models.gamebasics.tr
|
||||
|
@ -140,6 +141,14 @@ class UnitActions {
|
|||
}
|
||||
}
|
||||
|
||||
if(unit.hasUnique("Can construct roads") && tile.roadStatus==RoadStatus.None
|
||||
&& tile.improvementInProgress != "Road"
|
||||
&& unit.civInfo.tech.isResearched(GameBasics.TileImprovements["Road"]!!.techRequired!!))
|
||||
actionList+=UnitAction("Construct road", unit.currentMovement >0){
|
||||
tile.improvementInProgress="Road"
|
||||
tile.turnsToImprovement=4
|
||||
}
|
||||
|
||||
for(improvement in listOf("Fishing Boats","Oil well")) {
|
||||
if (unit.hasUnique("May create improvements on water resources") && tile.resource != null
|
||||
&& tile.improvement==null
|
||||
|
|
|
@ -45,6 +45,7 @@ class UnitActionsTable(val worldScreen: WorldScreen) : Table(){
|
|||
"Create Fishing Boats" -> return ImageGetter.getImprovementIcon("Fishing Boats")
|
||||
"Create Oil well" -> return ImageGetter.getImprovementIcon("Oil well")
|
||||
"Pillage" -> return ImageGetter.getImage("OtherIcons/Pillage")
|
||||
"Construct road" -> return ImageGetter.getImprovementIcon("Road")
|
||||
else -> return ImageGetter.getImage("OtherIcons/Star")
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue