Added Honor and Autocracy policies

This commit is contained in:
Yair Morgenstern
2018-09-05 17:17:30 +03:00
parent e71d40140a
commit 68b64ca66f
24 changed files with 250 additions and 60 deletions

View File

@ -177,6 +177,16 @@ All the following are from [the Noun Project](https://thenounproject.com) licenc
* [People](https://thenounproject.com/term/people/670317/) By Gregor Cresnar * [People](https://thenounproject.com/term/people/670317/) By Gregor Cresnar
* [People](https://thenounproject.com/term/people/1355818/) By Wilson Joseph * [People](https://thenounproject.com/term/people/1355818/) By Wilson Joseph
* [Flame](https://thenounproject.com/term/flame/633228/) By Ian Shoobridge * [Flame](https://thenounproject.com/term/flame/633228/) By Ian Shoobridge
* [Newspaper](https://thenounproject.com/term/newspaper/1207487/) By Trishul
* [War](https://thenounproject.com/term/war/1643541/) By Abdul Karim
* [Military Grade](https://thenounproject.com/term/military-grade/578687/) By Ben Davis
* [Military Medal](https://thenounproject.com/term/military-medal/396457/) By iconsphere
* [Shield](https://thenounproject.com/term/shield/874633/) By Kimmi Studio
* [Spartan Helmet](https://thenounproject.com/term/spartan-helmet/1732615/) By Joni Ramadhan
* [Sword](https://thenounproject.com/term/sword/5111/) By dsathiyaraj
* [Castle](https://thenounproject.com/term/castle/55045/) By Gabriele Malaspina
* [Roman Armor](https://thenounproject.com/term/roman-armor/440138/) By Parkjisun
* [Riot Police](https://thenounproject.com/term/riot-police/43117/) By Dan Hetteix
## Others ## Others

Binary file not shown.

After

Width:  |  Height:  |  Size: 825 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 780 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 990 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 473 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 975 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 453 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 215 KiB

View File

@ -781,174 +781,244 @@ PolicyIcons/Democracy
orig: 50, 50 orig: 50, 50
offset: 0, 0 offset: 0, 0
index: -1 index: -1
PolicyIcons/Entrepreneurship PolicyIcons/Dicipline
rotate: false rotate: false
xy: 418, 2 xy: 418, 2
size: 50, 50 size: 50, 50
orig: 50, 50 orig: 50, 50
offset: 0, 0 offset: 0, 0
index: -1 index: -1
PolicyIcons/Free Religion PolicyIcons/Entrepreneurship
rotate: false rotate: false
xy: 470, 2 xy: 470, 2
size: 50, 50 size: 50, 50
orig: 50, 50 orig: 50, 50
offset: 0, 0 offset: 0, 0
index: -1 index: -1
PolicyIcons/Free Speech PolicyIcons/Facism
rotate: false rotate: false
xy: 1836, 1588 xy: 1836, 1588
size: 50, 50 size: 50, 50
orig: 50, 50 orig: 50, 50
offset: 0, 0 offset: 0, 0
index: -1 index: -1
PolicyIcons/Free Thought PolicyIcons/Free Religion
rotate: false rotate: false
xy: 1836, 1536 xy: 1836, 1536
size: 50, 50 size: 50, 50
orig: 50, 50 orig: 50, 50
offset: 0, 0 offset: 0, 0
index: -1 index: -1
PolicyIcons/Humanism PolicyIcons/Free Speech
rotate: false rotate: false
xy: 1762, 1486 xy: 1762, 1486
size: 50, 50 size: 50, 50
orig: 50, 50 orig: 50, 50
offset: 0, 0 offset: 0, 0
index: -1 index: -1
PolicyIcons/Landed Elite PolicyIcons/Free Thought
rotate: false rotate: false
xy: 918, 874 xy: 918, 874
size: 50, 50 size: 50, 50
orig: 50, 50 orig: 50, 50
offset: 0, 0 offset: 0, 0
index: -1 index: -1
PolicyIcons/Legalism PolicyIcons/Humanism
rotate: false rotate: false
xy: 1020, 976 xy: 1020, 976
size: 50, 50 size: 50, 50
orig: 50, 50 orig: 50, 50
offset: 0, 0 offset: 0, 0
index: -1 index: -1
PolicyIcons/Mandate Of Heaven PolicyIcons/Landed Elite
rotate: false rotate: false
xy: 1122, 1078 xy: 1122, 1078
size: 50, 50 size: 50, 50
orig: 50, 50 orig: 50, 50
offset: 0, 0 offset: 0, 0
index: -1 index: -1
PolicyIcons/Mercantilism PolicyIcons/Legalism
rotate: false rotate: false
xy: 1224, 1180 xy: 1224, 1180
size: 50, 50 size: 50, 50
orig: 50, 50 orig: 50, 50
offset: 0, 0 offset: 0, 0
index: -1 index: -1
PolicyIcons/Meritocracy PolicyIcons/Mandate Of Heaven
rotate: false rotate: false
xy: 612, 466 xy: 612, 466
size: 50, 50 size: 50, 50
orig: 50, 50 orig: 50, 50
offset: 0, 0 offset: 0, 0
index: -1 index: -1
PolicyIcons/Monarchy PolicyIcons/Mercantilism
rotate: false rotate: false
xy: 714, 568 xy: 714, 568
size: 50, 50 size: 50, 50
orig: 50, 50 orig: 50, 50
offset: 0, 0 offset: 0, 0
index: -1 index: -1
PolicyIcons/Oligarchy PolicyIcons/Meritocracy
rotate: false rotate: false
xy: 816, 676 xy: 816, 676
size: 50, 50 size: 50, 50
orig: 50, 50 orig: 50, 50
offset: 0, 0 offset: 0, 0
index: -1 index: -1
PolicyIcons/Organized Religion PolicyIcons/Militarism
rotate: false rotate: false
xy: 1762, 1434 xy: 1762, 1434
size: 50, 50 size: 50, 50
orig: 50, 50 orig: 50, 50
offset: 0, 0 offset: 0, 0
index: -1 index: -1
PolicyIcons/Patronage PolicyIcons/Military Caste
rotate: false rotate: false
xy: 918, 822 xy: 918, 822
size: 50, 50 size: 50, 50
orig: 50, 50 orig: 50, 50
offset: 0, 0 offset: 0, 0
index: -1 index: -1
PolicyIcons/Protectionism PolicyIcons/Military Tradition
rotate: false rotate: false
xy: 1276, 1180 xy: 1276, 1180
size: 50, 50 size: 50, 50
orig: 50, 50 orig: 50, 50
offset: 0, 0 offset: 0, 0
index: -1 index: -1
PolicyIcons/Reformation PolicyIcons/Monarchy
rotate: false rotate: false
xy: 612, 414 xy: 612, 414
size: 50, 50 size: 50, 50
orig: 50, 50 orig: 50, 50
offset: 0, 0 offset: 0, 0
index: -1 index: -1
PolicyIcons/Representation PolicyIcons/Oligarchy
rotate: false rotate: false
xy: 816, 624 xy: 816, 624
size: 50, 50 size: 50, 50
orig: 50, 50 orig: 50, 50
offset: 0, 0 offset: 0, 0
index: -1 index: -1
PolicyIcons/Republic PolicyIcons/Organized Religion
rotate: false rotate: false
xy: 1762, 1382 xy: 1762, 1382
size: 50, 50 size: 50, 50
orig: 50, 50 orig: 50, 50
offset: 0, 0 offset: 0, 0
index: -1 index: -1
PolicyIcons/Scientific Revolution PolicyIcons/Patronage
rotate: false rotate: false
xy: 918, 770 xy: 918, 770
size: 50, 50 size: 50, 50
orig: 50, 50 orig: 50, 50
offset: 0, 0 offset: 0, 0
index: -1 index: -1
PolicyIcons/Secularism PolicyIcons/Police State
rotate: false rotate: false
xy: 1328, 1180 xy: 1328, 1180
size: 50, 50 size: 50, 50
orig: 50, 50 orig: 50, 50
offset: 0, 0 offset: 0, 0
index: -1 index: -1
PolicyIcons/Sovereignty PolicyIcons/Populism
rotate: false rotate: false
xy: 612, 362 xy: 612, 362
size: 50, 50 size: 50, 50
orig: 50, 50 orig: 50, 50
offset: 0, 0 offset: 0, 0
index: -1 index: -1
PolicyIcons/Theocracy PolicyIcons/Professional Army
rotate: false rotate: false
xy: 1762, 1330 xy: 1762, 1330
size: 50, 50 size: 50, 50
orig: 50, 50 orig: 50, 50
offset: 0, 0 offset: 0, 0
index: -1 index: -1
PolicyIcons/Trade Unions PolicyIcons/Protectionism
rotate: false rotate: false
xy: 1380, 1180 xy: 1380, 1180
size: 50, 50 size: 50, 50
orig: 50, 50 orig: 50, 50
offset: 0, 0 offset: 0, 0
index: -1 index: -1
PolicyIcons/Universal Suffrage PolicyIcons/Reformation
rotate: false rotate: false
xy: 612, 310 xy: 612, 310
size: 50, 50 size: 50, 50
orig: 50, 50 orig: 50, 50
offset: 0, 0 offset: 0, 0
index: -1 index: -1
PolicyIcons/Representation
rotate: false
xy: 1762, 1278
size: 50, 50
orig: 50, 50
offset: 0, 0
index: -1
PolicyIcons/Republic
rotate: false
xy: 1432, 1180
size: 50, 50
orig: 50, 50
offset: 0, 0
index: -1
PolicyIcons/Scientific Revolution
rotate: false
xy: 612, 258
size: 50, 50
orig: 50, 50
offset: 0, 0
index: -1
PolicyIcons/Secularism
rotate: false
xy: 1484, 1180
size: 50, 50
orig: 50, 50
offset: 0, 0
index: -1
PolicyIcons/Sovereignty
rotate: false
xy: 612, 206
size: 50, 50
orig: 50, 50
offset: 0, 0
index: -1
PolicyIcons/Theocracy
rotate: false
xy: 1536, 1180
size: 50, 50
orig: 50, 50
offset: 0, 0
index: -1
PolicyIcons/Total War
rotate: false
xy: 1588, 1180
size: 50, 50
orig: 50, 50
offset: 0, 0
index: -1
PolicyIcons/Trade Unions
rotate: false
xy: 1640, 1180
size: 50, 50
orig: 50, 50
offset: 0, 0
index: -1
PolicyIcons/Universal Suffrage
rotate: false
xy: 1692, 1180
size: 50, 50
orig: 50, 50
offset: 0, 0
index: -1
PolicyIcons/Warrior Code
rotate: false
xy: 970, 874
size: 50, 50
orig: 50, 50
offset: 0, 0
index: -1
ResourceIcons/Aluminum ResourceIcons/Aluminum
rotate: false rotate: false
xy: 204, 1018 xy: 204, 1018
@ -1483,91 +1553,91 @@ UnitIcons/Worker
index: -1 index: -1
UnitPromotionIcons/Accuracy_III_(Civ5) UnitPromotionIcons/Accuracy_III_(Civ5)
rotate: false rotate: false
xy: 1814, 1516 xy: 612, 184
size: 20, 20 size: 20, 20
orig: 20, 20 orig: 20, 20
offset: 0, 0 offset: 0, 0
index: -1 index: -1
UnitPromotionIcons/Accuracy_II_(Civ5) UnitPromotionIcons/Accuracy_II_(Civ5)
rotate: false rotate: false
xy: 2007, 2024 xy: 634, 184
size: 20, 20 size: 20, 20
orig: 20, 20 orig: 20, 20
offset: 0, 0 offset: 0, 0
index: -1 index: -1
UnitPromotionIcons/Accuracy_I_(Civ5) UnitPromotionIcons/Accuracy_I_(Civ5)
rotate: false rotate: false
xy: 306, 1200 xy: 1814, 1516
size: 20, 20 size: 20, 20
orig: 20, 20 orig: 20, 20
offset: 0, 0 offset: 0, 0
index: -1 index: -1
UnitPromotionIcons/Barrage_III_(Civ5) UnitPromotionIcons/Barrage_III_(Civ5)
rotate: false rotate: false
xy: 390, 1488 xy: 2007, 2024
size: 20, 20 size: 20, 20
orig: 20, 20 orig: 20, 20
offset: 0, 0 offset: 0, 0
index: -1 index: -1
UnitPromotionIcons/Barrage_II_(Civ5) UnitPromotionIcons/Barrage_II_(Civ5)
rotate: false rotate: false
xy: 256, 180 xy: 306, 1200
size: 20, 20 size: 20, 20
orig: 20, 20 orig: 20, 20
offset: 0, 0 offset: 0, 0
index: -1 index: -1
UnitPromotionIcons/Barrage_I_(Civ5) UnitPromotionIcons/Barrage_I_(Civ5)
rotate: false rotate: false
xy: 1807, 1770 xy: 390, 1488
size: 20, 20 size: 20, 20
orig: 20, 20 orig: 20, 20
offset: 0, 0 offset: 0, 0
index: -1 index: -1
UnitPromotionIcons/Blitz_(Civ5) UnitPromotionIcons/Blitz_(Civ5)
rotate: false rotate: false
xy: 522, 32 xy: 256, 180
size: 20, 20 size: 20, 20
orig: 20, 20 orig: 20, 20
offset: 0, 0 offset: 0, 0
index: -1 index: -1
UnitPromotionIcons/Charge_(Civ5) UnitPromotionIcons/Charge_(Civ5)
rotate: false rotate: false
xy: 436, 1182 xy: 1807, 1770
size: 20, 20 size: 20, 20
orig: 20, 20 orig: 20, 20
offset: 0, 0 offset: 0, 0
index: -1 index: -1
UnitPromotionIcons/Cover_II_(Civ5) UnitPromotionIcons/Cover_II_(Civ5)
rotate: false rotate: false
xy: 510, 162 xy: 522, 32
size: 20, 20 size: 20, 20
orig: 20, 20 orig: 20, 20
offset: 0, 0 offset: 0, 0
index: -1 index: -1
UnitPromotionIcons/Cover_I_(Civ5) UnitPromotionIcons/Cover_I_(Civ5)
rotate: false rotate: false
xy: 568, 60 xy: 436, 1182
size: 20, 20 size: 20, 20
orig: 20, 20 orig: 20, 20
offset: 0, 0 offset: 0, 0
index: -1 index: -1
UnitPromotionIcons/Drill_III_(Civ5) UnitPromotionIcons/Drill_III_(Civ5)
rotate: false rotate: false
xy: 538, 1210 xy: 510, 162
size: 20, 20 size: 20, 20
orig: 20, 20 orig: 20, 20
offset: 0, 0 offset: 0, 0
index: -1 index: -1
UnitPromotionIcons/Drill_II_(Civ5) UnitPromotionIcons/Drill_II_(Civ5)
rotate: false rotate: false
xy: 970, 904 xy: 568, 60
size: 20, 20 size: 20, 20
orig: 20, 20 orig: 20, 20
offset: 0, 0 offset: 0, 0
index: -1 index: -1
UnitPromotionIcons/Drill_I_(Civ5) UnitPromotionIcons/Drill_I_(Civ5)
rotate: false rotate: false
xy: 1020, 954 xy: 538, 1210
size: 20, 20 size: 20, 20
orig: 20, 20 orig: 20, 20
offset: 0, 0 offset: 0, 0
@ -1637,21 +1707,21 @@ UnitPromotionIcons/Scouting_II_(Civ5)
index: -1 index: -1
UnitPromotionIcons/Scouting_I_(Civ5) UnitPromotionIcons/Scouting_I_(Civ5)
rotate: false rotate: false
xy: 1762, 1308 xy: 1762, 1256
size: 20, 20 size: 20, 20
orig: 20, 20 orig: 20, 20
offset: 0, 0 offset: 0, 0
index: -1 index: -1
UnitPromotionIcons/Sentry_(Civ5) UnitPromotionIcons/Sentry_(Civ5)
rotate: false rotate: false
xy: 1432, 1210 xy: 970, 852
size: 20, 20 size: 20, 20
orig: 20, 20 orig: 20, 20
offset: 0, 0 offset: 0, 0
index: -1 index: -1
UnitPromotionIcons/Shock_III_(Civ5) UnitPromotionIcons/Shock_III_(Civ5)
rotate: false rotate: false
xy: 612, 288 xy: 1020, 954
size: 20, 20 size: 20, 20
orig: 20, 20 orig: 20, 20
offset: 0, 0 offset: 0, 0
@ -1665,21 +1735,21 @@ UnitPromotionIcons/Shock_II_(Civ5)
index: -1 index: -1
UnitPromotionIcons/Shock_I_(Civ5) UnitPromotionIcons/Shock_I_(Civ5)
rotate: false rotate: false
xy: 1814, 1494 xy: 656, 184
size: 20, 20 size: 20, 20
orig: 20, 20 orig: 20, 20
offset: 0, 0 offset: 0, 0
index: -1 index: -1
UnitPromotionIcons/Siege_(Civ5) UnitPromotionIcons/Siege_(Civ5)
rotate: false rotate: false
xy: 1836, 1514 xy: 1814, 1494
size: 20, 20 size: 20, 20
orig: 20, 20 orig: 20, 20
offset: 0, 0 offset: 0, 0
index: -1 index: -1
UnitPromotionIcons/Volley_(Civ5) UnitPromotionIcons/Volley_(Civ5)
rotate: false rotate: false
xy: 2007, 2002 xy: 1836, 1514
size: 20, 20 size: 20, 20
orig: 20, 20 orig: 20, 20
offset: 0, 0 offset: 0, 0

Binary file not shown.

Before

Width:  |  Height:  |  Size: 625 KiB

After

Width:  |  Height:  |  Size: 636 KiB

View File

@ -41,7 +41,8 @@
description:"+15% growth and +2 food in all cities" description:"+15% growth and +2 food in all cities"
} }
] ]
},{ },
{
name:"Liberty", name:"Liberty",
era:"Ancient", era:"Ancient",
description:"+1 culture in evey city", description:"+1 culture in evey city",
@ -84,6 +85,50 @@
description:"Free Great Person of choice near capital" description:"Free Great Person of choice near capital"
} }
] ]
},
{
name:"Honor",
era:"Ancient",
description:"+25% bonus vs Barbarians",
policies:[
{
name:"Warrior Code",
description:"+20% production when training melee units",
row:1,
column:2
},
{
name:"Dicipline",
description:"+15% combat strength for melee units which have another military unit in an adjacent tile",
row:1,
column:4
},
{
name:"Military Tradition",
description:"Military units gain 50% more Experience from combat", // todo from here
requires:["Warrior Code"],
row:2,
column:2
},
{
name:"Military Caste",
description:"Each city with a garrison increases happiness by 1 and culture by 2",
requires:["Dicipline"],
row:2,
column:4
},
{
name:"Professional Army",
description:"Gold cost of upgrading military units reduced by 50%",
requires:["Military Caste"],
row:3,
column:4
},
{
name:"Honor Complete",
description:"Gain gold for each unit killed"
}
]
},{ },{
name:"Piety", name:"Piety",
era:"Classical", era:"Classical",
@ -256,5 +301,48 @@
description:"Tile yield from great improvement +100%, golden ages increase by 50%" description:"Tile yield from great improvement +100%, golden ages increase by 50%"
} }
] ]
}, },{
name:"Autocracy",
era:"Industrial",
description:"-33% unit upkeep costs", // todo!
policies:[
{
name:"Populism",
description:"Wounded military units deal +25% damage", // todo - this is different than +25% strength...
row:1,
column:1
},
{
name:"Militarism",
description:"Gold cost of purchasing units -33%",
row:1,
column:5
},
{
name:"Facism",
description:"Quantity of strategic resources produced by the empire increased by 100%",
requires:["Populism","Militarism"],
row:2,
column:3
},
{
name:"Police State",
description:"Captured cities retain their previous borders",
requires:["Militarism"],
row:2,
column:5
},
{
name:"Total War",
description:"+15% production when building military units and new military units start with 15 Experience",
requires:["Police State","Facism"],
row:3,
column:4
},
{
name:"Autocracy Complete",
description:"+1 happiness from each Walls, Castle and Arsenal"
}
]
}
] ]

View File

@ -21,8 +21,8 @@ android {
applicationId "com.unciv.game" applicationId "com.unciv.game"
minSdkVersion 14 minSdkVersion 14
targetSdkVersion 26 targetSdkVersion 26
versionCode 134 versionCode 135
versionName "2.8.2" versionName "2.8.3"
} }
buildTypes { buildTypes {
release { release {

View File

@ -57,7 +57,7 @@ class GameStarter(){
val startingLocation = freeTiles.toList().getRandom().position val startingLocation = freeTiles.toList().getRandom().position
civ.placeUnitNearTile(startingLocation, "Settler") civ.placeUnitNearTile(startingLocation, "Settler")
civ.placeUnitNearTile(startingLocation, "Scout") civ.placeUnitNearTile(startingLocation, "Warrior")
freeTiles.removeAll(gameInfo.tileMap.getTilesInDistance(startingLocation, distanceAroundStartingPointNoOneElseWillStartIn )) freeTiles.removeAll(gameInfo.tileMap.getTilesInDistance(startingLocation, distanceAroundStartingPointNoOneElseWillStartIn ))
} }

View File

@ -91,7 +91,9 @@ class Battle(val gameInfo:GameInfo) {
if(thisCombatant !is MapUnitCombatant) return if(thisCombatant !is MapUnitCombatant) return
if(thisCombatant.unit.promotions.totalXpProduced() >= 30 && otherCombatant.getCivilization().isBarbarianCivilization()) if(thisCombatant.unit.promotions.totalXpProduced() >= 30 && otherCombatant.getCivilization().isBarbarianCivilization())
return return
thisCombatant.unit.promotions.XP += amount var amountToAdd = amount
if(thisCombatant.getCivilization().policies.isAdopted("Military Tradition")) amountToAdd = (amountToAdd * 1.5f).toInt()
thisCombatant.unit.promotions.XP += amountToAdd
} }
if(attacker.isMelee()){ if(attacker.isMelee()){
@ -106,6 +108,10 @@ class Battle(val gameInfo:GameInfo) {
addXp(defender,2,attacker) addXp(defender,2,attacker)
} }
if(defender.isDefeated() && defender is MapUnitCombatant && defender.getUnitType()!=UnitType.Civilian
&& attacker.getCivilization().policies.isAdopted("Honor Complete"))
attacker.getCivilization().gold += defender.unit.baseUnit.getGoldCost(hashSetOf()) / 10
if(attacker is MapUnitCombatant && attacker.unit.action!=null && attacker.unit.action!!.startsWith("moveTo")) if(attacker is MapUnitCombatant && attacker.unit.action!=null && attacker.unit.action!!.startsWith("moveTo"))
attacker.unit.action=null attacker.unit.action=null
} }
@ -126,6 +132,11 @@ class Battle(val gameInfo:GameInfo) {
val currentPopulation = city.population.population val currentPopulation = city.population.population
if(currentPopulation>1) city.population.population -= 1 + currentPopulation/4 // so from 2-4 population, remove 1, from 5-8, remove 2, etc. if(currentPopulation>1) city.population.population -= 1 + currentPopulation/4 // so from 2-4 population, remove 1, from 5-8, remove 2, etc.
city.health = city.getMaxHealth() / 2 // I think that cities recover to half health when conquered? city.health = city.getMaxHealth() / 2 // I think that cities recover to half health when conquered?
if(!attacker.getCivilization().policies.isAdopted("Police State")) {
city.expansion.cultureStored = 0
city.expansion.reset()
}
city.moveToCiv(attacker.getCivilization()) city.moveToCiv(attacker.getCivilization())
} }

View File

@ -37,10 +37,18 @@ class BattleDamage{
} }
if (combatant.getCivilization().happiness < 0) if (combatant.getCivilization().happiness < 0)
modifiers["Unhappiness"] = 0.02f * combatant.getCivilization().happiness //https://www.carlsguides.com/strategy/civilization5/war/combatbonuses.php modifiers["Unhappiness"] = 0.02f * combatant.getCivilization().happiness //https://www.carlsguides.com/strategy/civilization5/war/combatbonuses.php
if(combatant.getCivilization().policies.isAdopted("Populism"))
modifiers["Populism"] = 0.25f
if(combatant.getCivilization().policies.isAdopted("Dicipline") && combatant.isMelee()
&& combatant.getTile().neighbors.flatMap { it.getUnits() }
.any { it.civInfo==combatant.getCivilization() && it.baseUnit.unitType!=UnitType.Civilian})
modifiers["Dicipline"] = 0.15f
} }
if (enemy.getCivilization().isBarbarianCivilization()) if (combatant.getCivilization().policies.isAdopted("Honor") && enemy.getCivilization().isBarbarianCivilization())
modifiers["vs Barbarians"] = 0.33f modifiers["vs Barbarians"] = 0.25f
return modifiers return modifiers
} }

View File

@ -193,9 +193,6 @@ class CityInfo {
newCivInfo.cities.add(this) newCivInfo.cities.add(this)
civInfo = newCivInfo civInfo = newCivInfo
expansion.cultureStored = 0
expansion.reset()
// now that the tiles have changed, we need to reassign population // now that the tiles have changed, we need to reassign population
workedTiles.filterNot { tiles.contains(it) } workedTiles.filterNot { tiles.contains(it) }
.forEach { workedTiles.remove(it); population.autoAssignPopulation() } .forEach { workedTiles.remove(it); population.autoAssignPopulation() }

View File

@ -126,6 +126,8 @@ class CityStats {
happinessFromPolicies += (cityInfo.population.population / 2).toFloat() happinessFromPolicies += (cityInfo.population.population / 2).toFloat()
if (civInfo.policies.isAdopted("Meritocracy") && isConnectedToCapital(RoadStatus.Road)) if (civInfo.policies.isAdopted("Meritocracy") && isConnectedToCapital(RoadStatus.Road))
happinessFromPolicies += 1f happinessFromPolicies += 1f
if(civInfo.policies.isAdopted("Military Caste") && cityInfo.getCenterTile().militaryUnit!=null)
happinessFromPolicies+=1
newHappinessList ["Policies"] = happinessFromPolicies newHappinessList ["Policies"] = happinessFromPolicies
@ -167,6 +169,8 @@ class CityStats {
stats.culture += 1f stats.culture += 1f
if (adoptedPolicies.contains("Republic")) if (adoptedPolicies.contains("Republic"))
stats.production += 1f stats.production += 1f
if(adoptedPolicies.contains("Military Caste") && cityInfo.getCenterTile().militaryUnit!=null)
stats.culture += 2
if (adoptedPolicies.contains("Universal Suffrage")) if (adoptedPolicies.contains("Universal Suffrage"))
stats.production += (cityInfo.population.population / 5).toFloat() stats.production += (cityInfo.population.population / 5).toFloat()
if (adoptedPolicies.contains("Free Speech")) if (adoptedPolicies.contains("Free Speech"))
@ -200,6 +204,8 @@ class CityStats {
stats.production += 50f stats.production += 50f
if (policies.contains("Republic") && currentConstruction is Building) if (policies.contains("Republic") && currentConstruction is Building)
stats.production += 5f stats.production += 5f
if(policies.contains("Warrior Code") && currentConstruction is BaseUnit && currentConstruction.unitType.isMelee())
stats.production += 20
if (policies.contains("Reformation") && cityConstructions.builtBuildings.any { GameBasics.Buildings[it]!!.isWonder }) if (policies.contains("Reformation") && cityConstructions.builtBuildings.any { GameBasics.Buildings[it]!!.isWonder })
stats.culture += 33f stats.culture += 33f
if (policies.contains("Commerce") && cityInfo.isCapital()) if (policies.contains("Commerce") && cityInfo.isCapital())

View File

@ -79,11 +79,7 @@ class Building : NamedStats(), IConstruction{
stats.science += 1f stats.science += 1f
if (adoptedPolicies.contains("Theocracy") && name == "Temple") if (adoptedPolicies.contains("Theocracy") && name == "Temple")
percentStatBonus = object : Stats() { percentStatBonus = Stats().apply { gold=10f }
init {
gold = 10f
}
}
if (adoptedPolicies.contains("Free Thought") && name == "University") if (adoptedPolicies.contains("Free Thought") && name == "University")
percentStatBonus!!.science = 50f percentStatBonus!!.science = 50f
@ -94,6 +90,9 @@ class Building : NamedStats(), IConstruction{
if (adoptedPolicies.contains("Constitution") && isWonder) if (adoptedPolicies.contains("Constitution") && isWonder)
stats.culture += 2f stats.culture += 2f
if(adoptedPolicies.contains("Autocracy Complete") && cityStrength>0)
stats.happiness+=1
return stats return stats
} }

View File

@ -66,7 +66,8 @@ class UnitActions {
upgradedUnit = upgradedUnit.getUpgradeUnit(unit.civInfo) upgradedUnit = upgradedUnit.getUpgradeUnit(unit.civInfo)
if (upgradedUnit.isBuildable(unit.civInfo)) { if (upgradedUnit.isBuildable(unit.civInfo)) {
val goldCostOfUpgrade = (upgradedUnit.cost - unit.baseUnit().cost) * 2 + 10 var goldCostOfUpgrade = (upgradedUnit.cost - unit.baseUnit().cost) * 2 + 10
if(unit.civInfo.policies.isAdopted("Professional Army")) goldCostOfUpgrade = (goldCostOfUpgrade* 0.66f).toInt()
actionList += UnitAction("Upgrade to [${upgradedUnit.name}] ([$goldCostOfUpgrade] gold)", actionList += UnitAction("Upgrade to [${upgradedUnit.name}] ([$goldCostOfUpgrade] gold)",
{ {
unit.civInfo.gold -= goldCostOfUpgrade unit.civInfo.gold -= goldCostOfUpgrade