A unit must take a Panic test immediately if it loses 25% or more of the models with which it started the phase.
This test will most commonly be taken as a result of shooting attacks or damage caused by enemy spells, but can also be triggered by other factors that cause casualties, such as miscasts, misfires, Dangerous Terrain tests or other special rules. Rather than having a series of very specific triggers for a Panic test, we use this as a 'catch-all' to cover units that suffer high casualties for any reason.
For example: A unit of 21 models is shot at by an enemy unit and suffers four casualties – not enough for a Panic test. In the same phase, another enemy unit fires against them, causing two more casualties. Six out of twenty-one is above 25%, so the unit must take a Panic test.
A Heavy Casualties Panic test must also be taken (immediately!) by a charging unit if its enemies Stand and Shoot and inflict 25% or more casualties. Where this happens, it can sometimes result in the charging unit panicking while it is still technically out of range of the enemy unit's missile weapons, which can look a little odd. Under these circumstances, we assume the charging unit to have been shot at as soon as it entered range, panicked and then fled out of range again – rather than make all of these individual moves, we let the abstraction save us time and complication.