public float GetPower(int shipSize)
{
if (Technology.GenericPower == 0) //It uses the ship-specific size cost
{
switch (shipSize)
{
case 0:
return UseSecondary ? Technology.SmallSecondaryPower : Technology.SmallPower;
case 1:
return UseSecondary ? Technology.MediumSecondaryPower : Technology.MediumPower;
case 2:
return UseSecondary ? Technology.LargeSecondaryPower : Technology.LargePower;
case 3:
return UseSecondary ? Technology.HugeSecondaryPower : Technology.HugePower;
}
}
if (Technology.WeaponType == Technology.MISSILE_WEAPON)
{
return UseSecondary ? Technology.GenericPower * 1.5f : Technology.GenericPower;
}
return UseSecondary ? Technology.GenericSecondaryPower : Technology.GenericPower;
}