Battle/Diplomacy Effects
The process for regular battles (not rebellion related):
1. Determines Region ownership.
2. Ignores any Units that have no combat capable men and declares those units 'Neutral'
3. Figures out whether any Units set to 'Evade' do so or not. If they do, they are declared 'Neutral'. If not, they're left in the calculation.
4. Figures out what Realms still have forces left.
5. If only a single realm is present (rogue forces, in this case), it looks for any non-human (Monsters, Undead, or Daimons), and assigns all human forces to attack them. The already present larger force controls the battlefield. If no force was already present, non-humans control the battlefield.
6. If no non-humans, looks for any ongoing TakeOver. TakeOver forces controls defenses.
7. If no TakeOver running, looks for any Realm allied or federated with the region owner that are already present or dug-in and are not peasants. These realms control the battlefield.
8. If no allied or federated realms of region owner, looks to see if only peasants of the owning realm or allies are already present. If only peasants of owning or allied realms are present, they take control of the battlefield.
9. If no allied or federated realms are present whatsoever, looks to see who else was already present in the region. If someone was already present (that is, someone who didn't arrive to the region this turn), the realm with the largest strength controls the battlefield.
10. If no realm was already here, the realm arriving with the strongest army controls the battlefield.
11. By this point, the battlefield controller (henceforth: Defender A) should be determined. If not, no battle happens.
12. All remaining realms (those not assigned a role in battle yet) in a federation with Defender A are Defenders.
13. All remaining realms at War or Hatred with ALL Defenders (A and Confederates) are determined to be Attackers.
14. All remaining realms at War/Hatred with some Defenders (A and Confederates) and Allied with other Defenders (A and Confederates) remain neutral, and the game questions what their ruler was thinking.
15. Units not assigned a role with Murderous settings not Allied to any Defenders (A and Confederates) ignore Peace and are determined to be Attackers.
16. If for some reason no attackers have been determined (that is, no non-Defenders/non-Neutral realms present), no battle happens.
17. All remaining realms in a federation with Attackers are determined to be Attackers.
18. All remaining realms allied to an Attacker and NOT allied or peace with any Defender are determined to be Attackers.
19. All remaining realms allied to a Defender and NOT allied or Peace with an Attacker are determined to be Defenders.
20. All remaining realms that are both allied/peace with any Defender AND allied/peace with any Attacker are determined to be Neutral.
21. All remaining realms "don't know what to do" and are determined to be Neutral.
Shorter version:
1. Units not combat capable are ignored.
2. Units that are Evading attempt to do so, and are ignored if they do.
3. Monsters, Undead, and Daimons will always be the opponent for humans when only rogues are present. If more than a single realm is present, this is skipped. Larger present force controls battlefield. If all forces just arrived, larger force controls battlefield.
4. No non-humans? Any Realm running a takeover controls battlefield.
5. No TakeOver? Owern, Allies, and Federation partners of region owner control battlefield if present, even if just with Peasants.
6. Still no defender? Whoever was already present with the largest force controls the battlefield.
7. Still no one? Realm arriving with the strongest force controls battle.
8. If we have a defender, figure out attackers. If not, no battle.