Panic in XCOM: Enemy Unknown (2012) works by having something to trigger a panic roll. These rolls have base number, your soldiers Will points are added. Roll needs to exceed this number to cause your soldier to panic.
From there, your soldier can choose four actions, depending circumstances. If soldier is flanked and/or exposed, he will seek out new cover. If he is cover, he will either attack random target in FOV(Field Of Vision) or hunker down.
Now, on what triggers the panic roll, there is still not 100% sure knowledge of this, but current best known events are following:
- Loss of teammate
- Taking damage
- Teammate in FOV panicking
- (Normal/Elite/Berserker) Muton Intimidate
Furthermore, following events can cause will power to drop during the mission, increasing the chance for panic:
- Being poisoned (also causes damage, so each turn soldier is poisoned,
he has chance to panic)
- Being hurt, called "Battle Fatigue".
- Being critically wounded and then revived, which causes permanent Will penalty.
- Team leader is dead (Leader is marked by a star)