Things that should be taken into account:
For Phalanx:
- The number of Phalanx soldiers involved
- Soldiers' average or combined rank, because rank reflects soldier's overall skill level. Perhaps grant bigger bonuses for the top three ranks.
- Soldier equipment: armor and weapon on hand.
- This calls for numerical values to be set for each weapon and armor to reflect their general effectiveness on the battlefield. This number shouldn't be a static number but more like 1-3 for a 7.62mm pistol and 4-6 for an Assault Rifle, and maybe 1-10 for a Laser Rifle. And so on.
- Check for the number of Medkits on the team. The more Medkits, the less wounds after the battle, up to a point.
- Optionally check for IR goggles if it's night. Lack of worn IR goggles during nighttime should be considered a penalty.
- Optionally check for other equipment in inventory, specifically hand grenades and extra magazines for the weapon. Ideally there should be a low probability that some of this stuff is consumed during autobattles, but if an item IS consumed, it should give a bonus to the outcome, i.e. less wounds.
For Aliens:
- The number of Aliens involved
- Alien types: Ortnoks are more deadly than Tamans. The lethality order needs to be figured out.
- Aliens get an advantage if a battle involves Aliens which autopsies are yet to be conducted by Phalanx, or alternatively, Phalanx gains bonuses after autopsies.
- Alien weaponry autobattle values need to be decided as well.
The autobattle mechanics:
- Individual soldiers and aliens are sorted into two lists. Aliens on one list and Phalanx soldiers on the other. Combatants are placed in random order in their respective lists.
- The starting side is selected randomly.
- Combatants shoot in turns, and in order, starting from the top of the list.
- For each soldier and alien there is a base 5% chance that he's able to interrupt on opponent's turn, aiming and firing at a random opponent. For Phalanx soldiers, this chance goes up with rank. For Aliens... I don't know. Shots are fired simultaneously. If the last two combatants kill off each other this way, the battle is considered a defeat.
- The side that gets to shoot at any time (with the exception of the first turn) is determined by probability, and the probability is determined by the number of combatants on each side. The larger the team, the larger the probability. This probability changes throughout the battle as combatants get killed.
- Higher soldier rank increases the chance to hit an alien, and the chance to NOT get hit by an alien (increased evasion and increased damage reduction), on top of the increased chance to interrupt (i.e. fire back) as described above.
- Each Medkit that a surviving Phalanx soldier carries has a 20% chance of reviving a dead Phalanx soldier, healing up to 20% of max health. Each Medkit also has a 20% chance of healing 40% of any wounded soldier's maximum health instantly after battle.
- Optionally involve the Mind stat of each individual surviving soldier carrying a Medkit to determine the healing chance or the amount of hit points healed.
- A 5% chance exists on each turn that a soldier or an alien uses a grenade from his inventory on his turn, wounding 0-3 opponents. If interrupt and grenade chance happen at the same time, one is selected randomly, in order to prevent both from activating.
- Phalanx soldiers gain double critical chance AND damage bonus if an autopsy has been conducted on the target alien's race. (note: implement critical hits)
One Colonel rank soldier in Nano armor, armed with a Heavy Laser should be able to wipe out a team of 5 unarmored Tamans all armed with Plasma Pistols, while sustaining only minimal damage.
One armored Ortnok, armed with a Plasma Rifle, should be able to wipe out 5-8 Phalanx Rookies (out of a team of 8 ), assuming their weapons aren't very advanced.
The big idea is that the Aliens have initially way more force and firepower on their side simply due to the deadlier weapons and the element of surprise, by which I mean that the Aliens know human physiology and capabilities but the Phalanx doesn't know anything about any of the Alien species. Until autopsies have been conducted, that is. Over time Phalanx gains bonuses on their side via research, better weaponry and battle experience (soldier ranks). This would mean that in the early stages the player is practically forced to manually handle the tactical combat, while in the late stages of the game, the player would have the best team with best weapons, and he's then able to autoresolve even the largest battles successfully, with minimal casualties (severe wounds at most but no soldier deaths).
More work needs to be done so that the player can make an educated guess if it's worth it to risk autobattle. Currently it's impossible to check the crashed UFO type, unless the player memorized it earlier. The exact number and composition of the UFO troops should be made visible to the player at some point as well, in my opinion.
Just my 2 cents...