Added new Targeting, Coastal Raider, Bombardment, Boarding Party promotions for naval units, and opened up older promotions for them

This commit is contained in:
Yair Morgenstern
2018-11-04 20:07:54 +02:00
parent 73d0a7cf72
commit c8285b9b0a
18 changed files with 294 additions and 113 deletions

View File

@ -34,6 +34,8 @@ class BattleDamage{
modifiers[BDM.getText()] = BDM.modificationAmount
if(BDM.vs == "wounded units" && enemy is MapUnitCombatant && enemy.getHealth()<100)
modifiers[BDM.getText()] = BDM.modificationAmount
if(BDM.vs == "land units" && enemy.getUnitType().isLandUnit())
modifiers[BDM.getText()] = BDM.modificationAmount
}
if (combatant.getCivilization().happiness < 0)
modifiers["Unhappiness"] = 0.02f * combatant.getCivilization().happiness //https://www.carlsguides.com/strategy/civilization5/war/combatbonuses.php

View File

@ -80,6 +80,7 @@ class TileMap {
if(unitToPlaceTile!=null) {
// only once we know the unit can be placed do we add it to the civ's unit list
unit.putInTile(unitToPlaceTile)
unit.currentMovement = unit.getMaxMovement().toFloat()
}
else civInfo.units.remove(unit) // since we added it to the civ units in the previous assignOwner

View File

@ -77,8 +77,6 @@ class BaseUnit : INamed, IConstruction, ICivilopedia {
val unit = MapUnit()
unit.name = name
unit.setTransients() // must be after setting name because it sets the baseUnit according to the name
unit.civInfo = civInfo // needed for the getMaxMovement function below, since movement can be affected by wonders (e.g. Great Lighthouse)
unit.currentMovement = unit.getMaxMovement().toFloat() // must be after setTransients because it relies on having the baseUnit set
return unit
}