mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-14 17:59:11 +07:00
Resolved #931 - added Barbarian Brute as a replacement to the Warrior
This commit is contained in:
@ -20,6 +20,7 @@ Unless otherwise specified, all the following are from [the Noun Project](https:
|
|||||||
* [Flag](https://thenounproject.com/search/?q=Flag&i=50114) By Melvin Poppelaars for Settler
|
* [Flag](https://thenounproject.com/search/?q=Flag&i=50114) By Melvin Poppelaars for Settler
|
||||||
* [Eagle](https://thenounproject.com/search/?q=Eagle&i=1619932) By anggun for Scout
|
* [Eagle](https://thenounproject.com/search/?q=Eagle&i=1619932) By anggun for Scout
|
||||||
* [Axe](https://thenounproject.com/search/?q=Axe&i=1688143) By ehab.abdullah for Warrior
|
* [Axe](https://thenounproject.com/search/?q=Axe&i=1688143) By ehab.abdullah for Warrior
|
||||||
|
* [Spiked Club](https://thenounproject.com/search/?q=spiked%20club&i=831793) by Hamish
|
||||||
* [Bow And Arrow](https://thenounproject.com/search/?q=Bow%20and%20Arrow&i=338261) By Viktor Ostrovsky for Archer
|
* [Bow And Arrow](https://thenounproject.com/search/?q=Bow%20and%20Arrow&i=338261) By Viktor Ostrovsky for Archer
|
||||||
* [Bow](https://thenounproject.com/search/?q=bow&i=101736) By Arthur Shlain for Bowman
|
* [Bow](https://thenounproject.com/search/?q=bow&i=101736) By Arthur Shlain for Bowman
|
||||||
* [Fishing Vessel](https://thenounproject.com/term/fishing-vessel/23815/) By Luis Prado for Work Boats
|
* [Fishing Vessel](https://thenounproject.com/term/fishing-vessel/23815/) By Luis Prado for Work Boats
|
||||||
|
BIN
android/Images/UnitIcons/Brute.png
Normal file
BIN
android/Images/UnitIcons/Brute.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: 1.0 MiB After Width: | Height: | Size: 1022 KiB |
@ -70,10 +70,11 @@
|
|||||||
attackSound:"nonmetalhit"
|
attackSound:"nonmetalhit"
|
||||||
//Polynesian unique unit. All nearby enemy Units have -10% strenght
|
//Polynesian unique unit. All nearby enemy Units have -10% strenght
|
||||||
},
|
},
|
||||||
|
*/
|
||||||
{
|
{
|
||||||
name:"Brute",
|
name:"Brute",
|
||||||
unitType:"Melee",
|
unitType:"Melee",
|
||||||
uniqueTo:"Barbarian",
|
uniqueTo:"Barbarians",
|
||||||
replaces:"Warrior",
|
replaces:"Warrior",
|
||||||
movement:2,
|
movement:2,
|
||||||
strength:8,
|
strength:8,
|
||||||
@ -83,7 +84,6 @@
|
|||||||
attackSound:"nonmetalhit"
|
attackSound:"nonmetalhit"
|
||||||
//Barbarian unique unit
|
//Barbarian unique unit
|
||||||
},
|
},
|
||||||
*/
|
|
||||||
{
|
{
|
||||||
name:"Archer",
|
name:"Archer",
|
||||||
unitType:"Ranged",
|
unitType:"Ranged",
|
||||||
|
@ -147,17 +147,17 @@ class GameInfo {
|
|||||||
for (civ in civilizations.filter { !it.isBarbarianCivilization() && !it.isDefeated() }) {
|
for (civ in civilizations.filter { !it.isBarbarianCivilization() && !it.isDefeated() }) {
|
||||||
allResearchedTechs.retainAll(civ.tech.techsResearched)
|
allResearchedTechs.retainAll(civ.tech.techsResearched)
|
||||||
}
|
}
|
||||||
|
val barbarianCiv = getBarbarianCivilization()
|
||||||
|
barbarianCiv.tech.techsResearched = allResearchedTechs.toHashSet()
|
||||||
val unitList = GameBasics.Units.values
|
val unitList = GameBasics.Units.values
|
||||||
.filter { !it.unitType.isCivilian() && it.uniqueTo == null }
|
.filter { !it.unitType.isCivilian()}
|
||||||
.filter{ (it.requiredTech==null || allResearchedTechs.contains(it.requiredTech!!))
|
.filter { it.isBuildable(barbarianCiv) }
|
||||||
&& (it.obsoleteTech == null || !allResearchedTechs.contains(it.obsoleteTech!!)) }
|
|
||||||
|
|
||||||
val landUnits = unitList.filter { it.unitType.isLandUnit() }
|
val landUnits = unitList.filter { it.unitType.isLandUnit() }
|
||||||
val waterUnits = unitList.filter { it.unitType.isWaterUnit() }
|
val waterUnits = unitList.filter { it.unitType.isWaterUnit() }
|
||||||
|
|
||||||
val unit:String
|
val unit:String
|
||||||
if (unitList.isEmpty()) unit="Warrior"
|
if(waterUnits.isNotEmpty() && tileToPlace.neighbors.any{ it.baseTerrain==Constants.coast } && Random().nextBoolean())
|
||||||
else if(waterUnits.isNotEmpty() && tileToPlace.neighbors.any{ it.baseTerrain==Constants.coast } && Random().nextBoolean())
|
|
||||||
unit=waterUnits.random().name
|
unit=waterUnits.random().name
|
||||||
else unit = landUnits.random().name
|
else unit = landUnits.random().name
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user