Battle Maths

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

Dear users,

please note that we have a new forum now. You'll find it here.

The old forum is set to read-only mode now.

Your Ikariam Team

  • Battle Maths

    Hello everyone!

    Who am I? I am the leader of an alliance in a foreign server.
    Why am I posting in this forum? I am posting in EN forum because my questions couldn't be answered in my community.

    So, me and the rest of the members of my alliance have decided to make an effort: to calculate every possible scenario in every battle (naval or land) and the possible damage output of every troop combination that comes up. For example, how much damage is dealt by the common tactic that is 3 stacks of fireships and 4 of steam rams?
    So after we managed to come into a conclusion about how does the accuracy work and create a mathematical equation that describes it we can predict the number of the ships which are lost every round. Although this equation seems legitimate we have met serious problems when the naval battle (or land) become much more complicated and mortars,rocketships etc joined the battle.
    Our main problem seems to be that we can't understand how the damage is distributed in the first line. To be more specific, think of a hypothetical battle which only flamethrowers take action and this naval battle takes place in the biggest possible field so we have 84 flamethrowers at every side. Every stack of flamethrowers which consists of 12 ships hits the one which is in the exact opposite of it or every stack hits firstly the the enemy stack that is in the middle and the rest of the damage is distributed on the rest of the stacks? And if so which stack of ships gets hit after the middle stack is destroyed? Which is the attack sequence of close range ships?
    Every help appreciated!

    I am sorry for any possible mistakes!

    The post was edited 2 times, last by MasterBuddha ().

  • I've been on vacation all week ^^

    But yes, this question is indeed interesting, and I have considered doing all the math myself, have done a lot of it already.
    Now firstly I'd like to recommend checking out my written guide, "Ikariam, the Novel", in this same subforum. It explains accuracy, and the individual roles a unit has. I also perspectivate to the relative powerlevel of units.

    Anyways. I've already explained this exact question once, regarding the front line that is.
    When it comes to war in general, the game attempts to take out one unit at a time, and thereafter takes the remaining damage, and splits it over the remaining units.

    Connecting this with your example of a full flame front.
    (I will assume constant forge)

    A fire ship has:
    219 HP
    8 Armour
    82 Damage

    With forge:
    219 HP
    10 Armour
    98.4 Damage

    To calculate the outcome of the battle you will need to first find your effective hp (Ehp, the total amount of health a given attack line has. This is calculated by adding current health to the attacked units armor times the amount of incomming attacks. I will split armor and health below for clarity), and your total damage per round (DPR, the total damage a given attack line does).

    Assuming full flames vs full flames:

    Total health: 219*7*12 = 18396
    DPR: 8265.6

    Now with our DPR, and knowing what we're fighting against, we can calculate our effective damage. EDPR. This is calculated my multiplying the your amount of individual attakcs, with the enemy armour rating. This is caused since armour deducts directly from damage, and every uncomming attack will have to penetrate the armour value.

    EDPR: 8265.6-(8*7*12) = 7593.6

    We now have our EDPR, and since our enemy happens to be the exact same composition, we also have already calculated their HP. Damage is done at the same time, and as such does not take account for losses in units. As I said, Ikariam will kill off one unit at a time, and thereafter spread the remaining damage. So we'll calculate as such.

    7593.6/219 (the hp of a flame ship) = 34.67
    This means that 34 flame ships will die this round. The remaining damage will now split, and we can calculate the remaning hp your front will have. Keep in mind units in reserve also counts towards this number, so if player one had 1k flames in reserve, and player 2 had none, player 1 would be having fewer losses. I am assuming no ships in reserve.

    7593.6-(34*219) = 147.6 Damage points

    The above is the damage that will be spread, now we can calculate how much health you have left to spread it across. This is the number of remaining ships, times their health, minus the damage, divided by the number of remaining ships.

    (((7*12-34)*219)-147.6)/50 = 216.048 health remaining per ship. You can now calculate the percentage.

    216.048/219 = 0.98652 = 98.652%

    Ikariam will round down to the lowest number, so the displayed value will be 98%, however as you see, the correct value is closer to 99%.

    This is how it's done. If you do end up taking the time to do this, let me know. Just keep in mind this is only factoring the front line. Counting other lines the same procedure applies, you just have remember to calculate in order of the attack sequence. Also, damage only "splashes" on the last attack, so if one ship is left with 7 hp after being hit by morters, the damage from the front line will start off taking down the remaning 7 HP. You can also overkill. Meaning that even if you do 200 damage to the 7 hp mortar, those remaning 193 damage will be gone, and as such, calculating as I is not completely accurate, but taking this into consideration is not a subject I will delve into unless I'm being payed to do so. The difference is small, a little worse for naval units than on land, but still relatively small.
  • Sorry I'm kinda a new-ish player here. Well not really since I played a long time ago but wasn't very interested in the game back then. One thing that bugged me about this games combat system is that it nothing makes sense and isn't explained very well. What is the hp percentage I see on a stack of my units every round? Is it the HP of that PARTICULAR unit that is on top of the stack or the stacks overall hp percentage? Why is it always almost 90 to 100% or 0% when they die. I've never seen it at 50% or something like that. What do doctors do, how much do they heal, how many units do they heal. I have so many questions and it pisses me off that this is explained nowhere. Seriously how do the devs expect me to make a good strategy without knowing what my units exactly do?
    Also one other question: Why would I ever even use land units? Isn't focusing on warships and occupying the enemy wine cities really the only thing I need to do to win a battle? How are they gonna pillage me if all my ports are defended by a lot of warships? THIS GAME MAKES NO SENSE AAAAAAAAAAAAAAARRRRRRRRRRRGGGGGGGGGGHHHHHHHHHH
  • They can have 11 towns. You'd have to block each of those ports, at double-upkeep. Otherwise, they can:
    1. purchase wine from other players
    2. free one of their wine-town ports
    3. obtain Garrison Rights to another town on your island, and show up at your front door with a large army - at double upkeep
    4. plant one of their towns (either specially developed just for this purpose, or by spending Ambroisa) in an empty spot on your island and rampage around - no double upkeep

    They can also:
    1. call on their alliance members for help - this usually gets good results, since some people are just itching for a fight
    2. use the Smugglers Contingent, to let them sneak 8k wine in per day (although I think i saw a recent change to this)
    3. convince a trading partner that it's in their interest to help free a Wine port
    4. have enough Warehouse space & a large Wine Press in their other towns to let them go a month without running out of wine

    Rime wrote:

    Also one other question: Why would I ever even use land units? Isn't focusing on warships and occupying the enemy wine cities really the only thing I need to do to win a battle? How are they gonna pillage me if all my ports are defended by a lot of warships?
  • To Rime.
    Most of these things you're questioning I have already explained in my written guide, of which I also refer to in the start of this thread. It is called Ikariam the Novel, and can be found: Ikariam EN > Forum > Ikariam - The Game > Game Discussions. Just besides this thread.
    The reason remaining units can't go beyond the 90% ish, is also explained in both this thread and in my guide. I explain in this thread that the combat engine will always try to kill one unit at a time, and then thereafter split the remaining damage amongst ALL other units. So if the last damage hit kills a unit, but still has 37 dmg left, those 37 dmg would be split evenly between every single remaining unit. So if you had 37 remaining units, each with 100 hp, they would take 1 dmg each, and as such every unit would be on 99%, calculated from the inside and out.

    And yes, you're right. Land units become more and more useless as your account grows since the amount of loot you can steal doesn't scale, while the amount of resources you produce and need, does. I tend to spend 80-90% of my gold on ships while I spend 10-20% on land units. Bare in mind I tend to play with larger accounts mostly, and as such I am not the perfect source for information on the subject of earlygame (but I have played through it a time or 20).
  • Hello there!

    As an ally of OP "MasterBuddha" I was very eager to see his questions answered, and it seems like he managed to find the right guy for the right cause!

    Abeged, my friend, let me at first express my gratitude towards you for the time and effort you consumed in order to solve our problems.

    However, it appears that the true and meaningful understanding of the battle mechanics algorithm is deeper than both of us managed to get so far. You could say each of us has a piece of an incomplete puzzle.

    Don't get me wrong here! I've read carefully through all of your posts, especially the guide "Ikariam: The Novel", and I can safely say that I agree with the most of it. The formula you figured out for the distribution of damage remainder impressed me as well, since I could never imagine that ships in reserve could be damaged too.

    Now let me get to the real problem: accuracy.

    In your Ikariam guide you described accuracy as the probability of a wide shot, distributed amongst many "boxes". I believe this is wrong.

    Our alliance's research so far has reached to the following conclusions:

    As far as 3rd, 2nd and 1st line is concerned, there is a hidden priority mechanic:

    Let us assume both sides fight in the biggest naval field possible, only with a full wave of submarines, mortarships and steam-rams. No reserves, no tender-ships, no ram-ships, no air units.

    According to the attack sequence you are already familiar with, submarines strike first.

    If your suggestions were correct, one of the following would occur:

    a)Every submarine "box" would inflict damage to the exact opposite "box" of steam-rams, 2nd and 1st line damage would add to the formula, and due to "accuracy", we would expect something similar to a Gaussian distrubution of damage. But if you make a real-time experiment of this, you will figure out that the far right box of ram-ships has taken less damage than the far left. Symmetry is broken here.

    b)Every submarine "box" would prioritize a very specific target (let's say the middle box which takes the most damage most of the time), but as you said, units keep tanking damage until they die. Adding 2nd and 1st line damage to the "gedanken experiment" would lead into 100% fatality on the middle box, which is not the case, definitely.

    Now, let me explain the "hidden priority mechanic" I've talked about earlier:

    Imagine there is a number behind the 7 1st line boxes: 6-4-2-1-3-5-7

    Now let's take a 3rd line box of the attacker: it contains 5 submarines. These 5 will distribute their damage as follows: Submarine 1 will inflict damage on box 1, submarine 2 will inflict damage on box 2, ... submarine 5 will inflict damage on box 5.

    If we take into account that there are 5 submarine boxes in total, that leads to 0-5-5-5-5-5-0 (a scheme that indicates where the submarines attack).

    Let's proceed to the mortarships. 6 per box. 7 boxes, so the scheme would be: 7-7-7-7-7-7-0

    And finally, the first line: 5 per box, 7 boxes. 0-7-7-7-7-7-0

    Adding all the above, we get that box number 7 gets 0 damage. And this is true no matter how many times we examined.

    If you replace ram-ships with flame-ships, there is a slight difference. 12 per box, 7 boxes. Let's take a random box of them. The 7 first will strike each of the 7 enemy front line boxes according to the sequence we discussed. The 5 remaining will strike boxes 4-2-1-3-5. So 12 flame-ships' damage is distributed like this: 1-2-2-2-2-2-1. Multiplying by 7: 7-14-14-14-14-14-7.

    As you can see, both boxes 6 and 7 now have been damaged, but due to the fact that mortarships damage only the box number 6, you can observe a slight hp difference between the two, once again.

    This mechanic has faithfully changed your point of view. Now you can probably see that "accuracy" isn't about a shot going wide, because the "wide distribution of damage" has already been explained.

    I reached the same dilemma myself a while ago. After that, I kept searching for a new definition for "accuracy", and I found one that I believe is right:

    Accuracy indicates how many of the "should've been dead units since they got fatally damaged" die after all.

    You can apply your previous calculations to our point of view, by isolating the boxes:

    Let us assume we have a sea battle between 84 and 84 fire ships. Let's predict what happens on the first round.

    Fire ship:

    HP: 219
    Armor: 8
    Damage: 82

    Assuming fire-ship is fully upgraded: (+6 dmg, +6 armor)

    HP: 219
    Armor: 14
    Damage: 88

    With Hephaestus' Forge: (+20% dmg, + 2 armor)

    HP: 219
    Armor: 16
    Damage: 105.6

    Now, let's calculate the true damage a fire ship inflicts on an enemy fire-ship: TDMG: Damage - Armor = 105.6 - 16 = 89.6. This true damage can be now subtracted from the enemy fire-ships' HP.

    Let's examine what happens with the enemy middle box.

    12 flame ships * 219 HP each = 2,628

    The accumulated damage on this box, as I explained earlier, is 14 attacking fire-ships * 89.6 true damage each = 1,254.4

    Dividing this number with 219 we can figure out how many fire ships should die (you can already see the similarities between our maths): The division outcome is 5.72.

    Now here's the deal:

    According to our new definition, and since fire-ships have 50% accuracy, 1 every 2 "should have been dead" fire ships will die eventually.

    But my question here is this: Do we round 5.72 into 5 first, and then we apply the 50% and again we round 2.5 into 3, or we apply the 50% directly to 5.72 (2.86) and then we round to the lower integer (=2).

    And if so, what happens with the damage remainder? We now have two kinds of it. The already known, plus the damage wasted to kill units who survived from a "miss".

    To solve this problem we need many experiments, but before we can talk about red HP bars, we have to be sure about "accuracy"'s definition.

    If you think about it, it must be it: We both know (as far as I'm informed, we're both navy enthusiasts) that rocket-ships are most effective against ram-ships and submarines against fire-ships, but why? Submarine has less flat damage than a rocket ship, so it should be weaker against fire-ships as well. This difference MUST come from a function dependent to HP and accuracy.

    We will continue our pursue of "truth" for now, and we'd surely like to share our findings with you in the near future. Until then, if you have any disagreement, or noticed ANY mistake in my calculations, please let me know. Your opinion matters to us!

    Ragnar Loðbrók,
    Diplomat of Μπελαληδες [MOONS]
    (server Gaia of
  • I appreciate the time you've taken to write this up, and yes, my definition of accuracy was wrong, I have been informed of this, and I have been corrected.
    However, as I currently is in Australia studying not much of my time is spent behind a computer, and as such I am not going to update The Novel as of now. If you read the comments following it you would also see that TomColl already commented on my definition of accuracy, and I believe we came to an agreement on how we believe it works. Here's the deal.

    There is two phases when units target the unit who will receive their damage.

    Phase one:
    A stack is chosen. I believe this might be done as you also stated, each stack hitting their opposing stack. Though this is what I would call a conspiracy, I have no proof and no time to set up an otherwise fairly simple experiment to find out. Simply send 5 stacks of mortars into a full line of flames. The mortars will hit first so even if they die you'll be able to see how many stacks of flames took damage.

    Phase two:
    A unit of that stack is chosen.
    I believe this is what accuracy determines. The more accuracy a unit has, the larger chance of it hitting a unit that has already taken damage, and vice versa. This means that rockets hits a lot of different targets, and thus doesn't kill off any flameships in a wave. Divingboats however has a high accuracy, and will therefore focus down a single flame ship at a time, thus reaching a higher damage output. If my theory of phase one is correct, this would also explain why having rockets vs waves of 24 flames is more effective than diving boats, since one stack of rockets are now hitting a stack of steam rams.

    There is quite the simple experiment to prove this theory:

    Send 10 steam rams vs 10 rockets ships. Not a single steam ram will die.
    Send 10 steam rams vs 10 steam rams. 3 Steam rams will die on both sides.

    Now the Steam ram does 206 damage with forge, and the rocket ship does 463. However what I stated above is still true. This must mean that the damage is all hitting wounded units, proof -> (206-24)*10=1820/576=3.1597. Not a single hit is allowed to hit a non damaged unit. But since none would die with rocketsships, we can prove this is a factor, and thereby assume this new theory.

    Accuracy is the factor that decides if a unit hits an already damaged unit, or a unit with full health.
  • I see you are still not convinced about the priority sequence I suggested.

    So, i set up a simple experiment:

    42 mortar-ships vs 42 mortar-ships.

    In case your theory is correct, each stack would damage it's opposite, thus all 7 stacks would be damaged.

    In case my theory is correct:

    a)7 mortar-ships will damage each of the 6 stacks on the right side, which means:


    Damage: 69+6 (due to workshop upgrade) = 75
    Armor: 6+6 = 12
    HP: 154

    True damage: 75-12 = 63

    Each of the 7 stacks would have a total of 6*154= 924 HP and the 6 first would take 7*63 = 441 damage

    b)441 damage is able to kill 2 mortar-ships per box, but assuming the accuracy is quite low, that doesn't happen. So we expect 0 fatalities.

    c)This damage won't go to waste, but will spread amongst all 6 of the surviving mortar-ships evenly.

    924 - 441 = 483 HP remaining. 483/924 = 52.27% ~ 52%

    Due to the fact that damage is spread evenly, as I said, we expect each of the 6 surviving mortar-ships to have 52% hp, so their median is 52% as well.

    TL;DR: If I'm correct, no one dies and the 6 first stacks will have 52% HP left.

    See for yourself :)

    (Some of the text is in greek, unfortunately, but I believe you can figure out what's going on)
  • Now firstly, I'll admit I didn't spend much time getting to understand your point of view completely, since I haven't had more than 5 minutes worth of peace the last 4 weeks.
    I do today, so I went ahead and re-read the thread.

    I prefer keeping accuracy as a factor of two, so splitting it in phase 1 and 2. I couldn't explain phase 1 before, and thought I had phase 2 nailed down.
    According to your perspective I do indeed have phase two down, but you also come with a very viable explanation of phase 1.
    Now first of all my "theory" about one stack hitting it's opposite, was, as I said, a conspiracy, an assumption if I may, the most logical way of calculating damage. Though I do now see that your idea of phase 1 makes much more sense, to the point that I'll take it as my own until proven otherwise. Because this is the case, you provided one picture of evidence (which I am glad for, don't get me wrong, would of been sceptical without it) which quite frankly isn't enough to prove anything when it comes to Ikariam. This game sometimes seems to be programmed by a bunch of drunk chickens.

    Now to clarify, because you didn't mention it directly, but still based your math on it. Accuracy is still the defining factor of whether or not a unit will hit an already damaged unit, or a unit with full/more health. Phase 1 has nothing to do with accuracy, and is solely a question of how Ikariam unit targeting works, of which I believe you are correct in your theory.
    In your first reply you mentioned that you believe accuracy had to do with whether or not a unit dies even though it shouldn't have. The way your math is set up, I understand it as you want to apply it as an integer after your calculation of damage. If you applied this understanding to your previous message, you would come to the result that something in the line of 0.3 mortar ships would die. Which is correct, not mortar ships die, but basing our accuracy calculations on this would open up an entire new section of calculations, since we would now have to calculate for every unit type in a battle. Though, basing it on this would also simplify the way the calculations are made, and would probably make the programmers job a lot easier than basing it on whether or not a unit would hit an already damaged unit.

    At this point I'm not sure if my "own" idea of phase 2 is correct any more, yet I see no evidence of your definition being true either. I'll stay "neutral" until I see evidence for either. Do feel free to calculate the damage outcome of an entire naval battle (12*3 flames on either side with uboats for instance). I would be interested to see if your definition would still apply at this point, and if not, attempt to find the time to make up a way calculating for mine.

    This discussion is getting rather interesting at this point.
  • As I already mentioned, I'm glad I found a guy interested enough to solve the mystery :D

    I did one more experiment yesterday, and you'll be excited to find out that you're right.

    I like to calculate things on 3 steps:

    a)targeting mechanic: who damages who

    b)accuracy and deaths: still remains a mystery (you'll see what I'm talking about below)

    c)HP bar: given the fact that X units die in a specific stack, I can calculate accurately how much of HP is left

    Let us proceed to the experiment:

    84 flame-ships vs 84 flame-ships, no forge:

    HP: 219
    Damage: 88
    Armor: 14
    True Damage: 74
    Accuracy: 50%

    According to the targeting mechanic, damage should be divided as follows: 7-14-14-14-14-14-7 (flame-ships damaging each stack)

    Far left and far right box should take 7*74 = 518 dmg, and the 5 middle stacks 14*74 = 1036 dmg

    Now let's see if anyone dies:

    518/219 = 2.36 = 2, multiplied by 50% (accuracy), gives 1 death on far left and far right box

    I've read somewhere that accuracy might be a factor deciding if a unit hits an already damaged unit, or a full-HP one. I did some weird calculations based on this as well, but to no avail.

    As far as the middle boxes are concerned, 1064/219 ~ 4, divided by two, gives 2 deaths per stack.

    And now, the whole thing blows:

    However, as I promised, given the deaths on each stack, I can calculate the HP bar.

    On side stacks, no one dies, which means all the damage is spread equally amongst 12 flame-ships. (2628-518)/2628 = 80% (rounded to the smallest integer).

    On middle stacks, 4 flame-ships die, so 4*219 = 876 damage is wasted there and 1036-876 = 160 damage remains to be spread equally amongst 12-4 = 8 flame-ships with a total HP of 8*219 = 1752.

    (1752-160)/1752=90.8%~90% (rounded to the smallest integer)

    Both percentages are correct according to the experiment.

    As you can see, you're right:

    We've nailed down phase 1 (targeting mechanic) but we are nowhere near a solid explanation of accuracy.

    Without accuracy though, we cannot proceed to full naval battle (with 1st, 2nd and 3rd line, at least). As you already know, 3rd line attack first, followed by 2nd. If units die from these attacks on the frontline (we need the accuracy-step here), front-line damage is affected, coming from less than 84 flame-ships, for example. That's exactly the essence of attack priority. For example, on land, if you have gyros, they attack balloons first, and few of them survive in order to damage your 3rd line (less losses for you). In fact, each round of a battle can be divided in steps: only the units who survived the previous step, each time, can inflict damage on the next.

    If we come to a solution for the accuracy riddle, we can move on and explain many more wonderful things:

    a)how much and who the tenders heal?
    b)what happens when a stack is not full? (we have noticed that our attack sequence changes drastically and units tend to focus on this half-empty stack).
    c)what about attack sequence for air and wing-lines? how are these boxes numbered?

    Give me a well-defined accuracy algorithm and I will figure out anything else! Someone, somewhere, please! If you have any ideas, you are welcome to help us :P

    P.S.: I had a weird idea. Maybe the distribution of the damage follows a normalized Gaussian distribution in each stack. Now, this function has a variable, called deviation, as you may know (σ). This MUST have something to do with accuracy. More accuracy leads to a fine and high diagram, while less accuracy to a wide and low diagram. If we, for the sake of our example, normalize our function so that its total area is equal to the damage done per stack, we can see how this is divided amongst 12 flame-ships. However, we come across a huge problem here: If flame-ship's HP is a constant, and the accuracy of the unit damaging the flame-ships is high enough for the gaussian to exceed this constant, we would be able to say that x units would die, but the damage exceeding their HP constant would give us trouble: would it go to waste? no, we have already proven that the total damage is preserved since I was able to calculate the HP bars given the fact I know the fatalities. Maybe the damage remainder would spread equally amongst the units who are injured but not dead, but that would screw our whole mathematical structure. And if this is the case, that means that each flame-ship in a stack is distinguishable. In our example, the far left box contains 12 flame-ships, without fatalities. If damage follows a Gausian distribution, then each flame-ship would be injured, but with different HP each. How come their mean value is exactly the same with our initial propositions?

    Sure thing is accuracy isn't just a percentage. It must be a variable in a function with many more. Maybe there's different accuracy values for each stack, or maybe we have to deal with RN Jesus here (I hope not).

    The post was edited 1 time, last by Norse Diplomat ().

  • That is some fine research. Not that I like the result. Accuracy now makes less sense than ever.
    Anyhow, first of all I can guarantee you that it has nothing to do with RNG. You can go ahead and send full waves of flames into each other all day, and I can guarantee you it will be the same result. I've fought well over a thousand naval battles, and am yet to meet a battle I have lost/won for no reason/unexpectedly. This proves that there indeed is a formula, and as we know it's a server taking care of the calculations, we also know it is doable on the allocated hardware, so we're not speaking rocket science here.

    Yet I have no explanation for why this is. We have proven how targeting works, and can document the damage distribution. We have also proven that damage is not wasted if it goes beyond the health of a unit (For instance, a flame has 10 hp, takes 50 damage, the remaining 40 is still dealt to another unit). This concept in itself is a wonder. Because this means that one unit can target several different units. So because it can do this, does it calculate for accuracy several times per hit? Now also, if this is the case, what is the downside to rocketships? I would love to see an experiment putting a line of rocketships against a line of flames. If indeed damage is not wasted, and if we assume that damage can't split after it hit, we should see 5 deaths on the middle 3 spots of flameships, with the remainder being split among the undamaged flameships in the same stack.

    I'll just calculate it since I don't have the time to experiment, I'll hope you can do that.

    So our flames have:

    HP: 219
    Armor: 14

    And our rockets have:

    Damage: 380
    True Damage: 366

    That's all the relevant stats, given we still don't know how accuracy works. It is 20% ish for rockets though (measured by eye).

    Now, rockets place in stacks of 3, so following the attacks sequence they are hitting flames on the spots 1,2,3.
    So because of this, we assume that no damage is going to the flames on the spots of: 4,5,6,7. These should be full health after the experiment.

    So the damage they are taking:
    All stacks should be hit by 5 rockets.

    5*366=1830 dmg.

    But we assume that only the initial hit will kill a unit because we assume that accuracy refers to the chance of hitting a damaged unit, as well as assuming it can calculate twice within one attack.

    5*219=1095 dmg.

    This is how much is needed to kill the 5 flames. We then have some remaining damage, which is then split the rest of the stack.

    (1830-1095)/(219*7)= ~47%

    This should be the remaning hp of the stack. If this is the case, the remainder of every hit, hit different targets.

    If this is the case we will have something to work with. We will know that accuracy is calculated several times and we will know damage can't be split before killing a unit. If this is not the case I have no idea and we may as well just start guessing.

    The tender question is super interesting, and I would love a test of it, would be fairly easy. Just do the same with flames again, and send in 100 tenders on one side then document the results.
    Doesn't have anything to do with our current problem though, since I am assuming you had no tenders in the match you sent a screenshot of.

    For the air it is most likely the same since one stack always takes more damage than the other. My guess would be them being labeled 1,2. For both air related units.

    The stack not being full is another interesting question. We could test this by sending 15 rockets into 24 steam rams and 9 flames. Now we would assume (given the above experiment is true), that 5 flames die, and the remaining damage is spread. However, there is only 4 ships, and 5 instances of damage. Forcing the damage to hit the same ship. At least that's the idea. Please do let me know if you try it out.

    That's all the time I have for now. Please do keep hunting for the truth.