Author Topic: UFO shield role in fighting against base defense  (Read 705 times)

Offline Alpha Centauri Bear

  • Colonel
  • ****
  • Posts: 466
    • View Profile
UFO shield role in fighting against base defense
« on: December 26, 2023, 12:31:48 am »
Looking at the code for base shooting attacking UFO. It seems that the UFO shield is straightforward added to damage capacity. No shield recharge, bleed through, or any other dogfight like parameters are used. Did I get it right?

Code: [Select]
if (_ufo->getShield() > 0)
{
int shieldDamage = dmg;
dmg = std::max(0, dmg - _ufo->getShield());
_ufo->setShield(_ufo->getShield() - shieldDamage);
}
_ufo->setDamage(_ufo->getDamage() + dmg, _game->getMod());

Online Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9079
    • View Profile