Every morale check a brother makes is adjusted by who stands next to him. Adjacent allies steady him; adjacent enemies push him toward breaking. This rides on top of every morale trigger, because it lives inside the morale check itself.
When a brother makes a morale check, the game looks at the 6 tiles directly around him:
Fleeing neighbors are ignored. Most units have Threat 0; only certain enemies subtract extra on top of the -3.
The +3 per ally counts only when the brother is resisting a morale drop: taking a hit, an ally dying, being shoved, the start of his turn. On a morale-improving check such as rallying or recovering, the ally bonus is not applied, only the enemy penalty. Adjacent enemies count against him on every check.
The brother holds if a d100 roll lands at or under:
min(95, Resolve + trigger difficulty - 3 * adjacent enemies + 3 * adjacent allies - enemy Threat)
The morale-improving branch drops the adjacent-allies term, and the result is capped at 95.
Keeping brothers shoulder to shoulder is worth +3 Resolve per neighbor on every panic check. A lone brother flanked by three enemies takes those checks at -9 (more against Threat enemies) before the trigger's own penalty is counted.
Battle Brothers 1.5.1.8 game scripts.
scripts/entity/tactical/actor.nut:2885, 2939-2965, 2952, 2969, 2979scripts/config/character.nut:215-216, 795