How many turns does a Shieldbearer’s shield last

xcom-2

The Shieldbearer is an Advent soldier type that can add a layer of shields to himself and any nearby allies once during a mission.

These shields have a set number of HP, and when their HP is depleted, or the Shieldbearer dies, the shields are removed.

What I didn't know is that the shields also have a limited duration, and will expire naturally by themselves after a few turns. Or at least that's what happened when I mind-controlled a Shieldbearer and added his shields to my own soldiers.

Do Shieldbearer shields only have a limited duration when they're cast on your own soldiers, or will they eventually expire on non-controlled enemy units as well?

When the shields do have a limited duration, how many turns will they last?

Best Answer

In the ini file the ability's stats are listed in (XComGameData_SoldierSkills.ini), there's this line:

ENERGY_SHIELD_DURATION=4 ; lasts for 3 full turns, ends at starting tick on 4th turn

In the code, this timer ticks at the end of the player's turn. So it sounds like, if you use the ability on your turn, it will go:

  • Turn 1: You use the shield ability
  • Turn 2: Shield is active
  • Turn 3: Shield is active
  • Turn 4: Shield is active, expires at the end of the turn

Interestingly, if the aliens use it, it expires the same way (at the end of their 4th turn; tested in debug mode). I suspect that when the ability ticks at the end of the "player's" turn, it really means "at the end of the turn of the team which applied this ability", which is why the ability lasts the same amount of time no matter who uses it.

I can't really reconcile the "starting tick" in the comment with the fact that it ends after your turn is over, except to note that a lot of the comments in the ini files don't match up with what the code actually does.