Added Himji Castle wonder - #245

This commit is contained in:
Yair Morgenstern 2019-04-07 20:23:57 +03:00
parent 9a0baf028e
commit 3c3c81fd88
7 changed files with 283 additions and 256 deletions

View file

@ -187,6 +187,7 @@ All the following are from [the Noun Project](https://thenounproject.com) licenc
* [Forbidden City](https://thenounproject.com/term/forbidden-city/1797540/) By 1516
* [Theatre](https://thenounproject.com/term/theatre/1780401/) By b farias
* [Tower of Pisa](https://thenounproject.com/search/?q=leaning%20tower%20of%20pisa&i=1002578) By Pedro Santos
* [Himeji Castle](https://thenounproject.com/search/?q=himeji&i=1125277) By Chanut is Industries
* [Windmill](https://thenounproject.com/term/windmill/1705107/) By corpus delicti
* [Taj Mahal](https://thenounproject.com/term/taj-mahal/1907755/) By Felipe Alvarado
* [Observatory](https://thenounproject.com/term/observatory/1259/) By Nathan Driskell

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

File diff suppressed because it is too large Load diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 947 KiB

After

Width:  |  Height:  |  Size: 954 KiB

View file

@ -452,6 +452,15 @@
uniques:["Free Great Person"]
requiredTech:"Printing Press"
},
{
name:"Himeji Castle",
culture:1,
isWonder:true,
greatPersonPoints:{production:2}
providesFreeBuilding:"Castle",
uniques:["+15% combat strength for units fighting in friendly territory"] // todo
requiredTech:"Gunpowder"
},
{
name:"Museum",
culture:5,

View file

@ -5834,8 +5834,7 @@
Spanish:"La Torre Inclinada De Pizza"
German:"Schiefer Turm von Pisa"
French:"Tour de Pise"
}
}
"Free Great Person":{
Italian:"Ottieni un Grande Personaggio gratuito"
Romanian:"Persoană mare gratuită"
@ -5844,6 +5843,9 @@
French:"Personnage illustre gratuit"
}
"Himeji Castle":{}
"+15% combat strength for units fighting in friendly territory":{}
"Taj Mahal":{
Italian:"Taj Mahal" //same in Italian
Russian:"Тадж-Махал"

View file

@ -112,6 +112,10 @@ class BattleDamage{
modifiers["Attacker Bonus"] =modifiers["Attacker Bonus"]!! + bonus
else modifiers["Attacker Bonus"] = bonus
}
if(defenderTile.getOwner()!=null && !attacker.getCivInfo().isAtWarWith(defenderTile.getOwner()!!)
&& attacker.getCivInfo().getBuildingUniques().contains("+15% combat strength for units fighting in friendly territory"))
modifiers["Himeji Castle"] = 0.15f
}
else if (attacker is CityCombatant) {
if (attacker.getCivInfo().policies.isAdopted("Oligarchy") && attacker.city.getCenterTile().militaryUnit != null)
@ -140,7 +144,7 @@ class BattleDamage{
val modifiers = getGeneralModifiers(defender, attacker)
if (!(defender.unit.hasUnique("No defensive terrain bonus"))) {
if (!defender.unit.hasUnique("No defensive terrain bonus")) {
val tileDefenceBonus = defender.getTile().getDefensiveBonus()
if (tileDefenceBonus > 0) modifiers["Terrain"] = tileDefenceBonus
}
@ -166,6 +170,10 @@ class BattleDamage{
}
}
if(defenderTile.getOwner()!=null && !defender.getCivInfo().isAtWarWith(defenderTile.getOwner()!!)
&& defender.getCivInfo().getBuildingUniques().contains("+15% combat strength for units fighting in friendly territory"))
modifiers["Himeji Castle"] = 0.15f
if (defender.unit.isFortified())
modifiers["Fortification"] = 0.2f * defender.unit.getFortificationTurns()