https://github.com/OpenBW/openbw/blob/master/bwgame.h

Sonko pointed me to the bwapi source code and I took a look. There is indeed a separate algorithm for "is_air_splash" and it makes two queues, one to deal full damage and one to deal splash.

Let's say L = outer splash radius, M = medium splash radius, S = inner splash radius.

**Full queue**

It builds a queue of units as such:

1) unit can't have same player as bullet's player (if it does, it must be the missile's target)

2) unit can't be the missile firer

3) unit has to be within L distance

Now, if the original bullet's target is in this queue and is within S distance, the queue is truncated to JUST the target, and full damage is dealt to it.

Otherwise, a RANDOM unit from this queue is chosen to take full damage.

**Splash queue**

1) unit can't have same player as bullet's player (if it does, it must be the missile's target)

2) unit can't be the missile firer

3) unit can't be missile target

4) unit can't be interceptor (!!!)

5) unit has to be within L distance

Then for each unit here, it does either 50%, 25%, or no damage depending on distance.

Let's apply it to our problematic cases.

**Single target**

The original target will always be in the Full queue because valkyrie missile has huge L.

It doesn't matter whether the target is within S distance because the queue only has size 1 and so the target takes full damage.

The Splash queue omits the original target, so nothing else needs to be done.

Conclusion: single target takes 100% no matter what

**Multiple targets**

As stated above, the original target will always be in the Full queue.

Case 1: Target is within S distance of the missile.

It becomes the ONLY element in the queue and takes full damage.

We now go to the splash queue. The non-targets within M take 50% and within S take 25%.

Conclusion: target takes 100%, rest take 50% or 25%

Case 2: Target is outside S distance of the missile.

A random unit in the Full queue is chosen to take 100% damage.

We now go to the splash queue. The non-targets within M take 50% and within S take 25%.

Conclusion: random unit takes 100%, non-targets take 50% or 25%.

Herein lies the issue -- the splash queue only excludes the target, NOT THE RANDOMLY PICKED UNIT FROM THE FULL QUEUE!

So it could be the case that the randomly picked unit was NOT the target, in which case that poor unit would take an additional 50% or 25% damage based on proximity! Let's call this "super damage", when unit takes more than 100% damage.

Note that this super damage can only occur if the target is NOT within S of the missile, because if it were, it would take the 100% from Full queue and be excluded from the Splash queue.

Since the missile pattern centers around the target, I imagine that most of the time, the target IS within S of the missile, so we don't see super damage.

Furthermore, it would be the case that the ORIGINAL target actually takes ZERO damage if the random unit picked during Full queue was not the target, since the splash queue specifically omits the target. So the existence of super damage implies the target received zero damage!

Note that the total damage is the same across the cases.

Finally, I think the "diminishing returns" observation is simply due to the fact the average missile misses its target. Let's pretend each missile is a student and each unit is a test question. Now, each student is dumb and scores 50% or 25% normally on any given question. However, the Full queue is a "get out of jail free card" that guarantees you a 100% on exactly one question. So if there is only one question, everyone scores a perfect score. If there are only a few questions, the class average is still high. Add a lot of questions, and it becomes clear that each student is failing.

Another interesting observation is that interceptors are immune to splash damage. In other words, it can never take damage via the Splash queue, so it must get damaged during the Full queue. Every valkyrie missile will hit at most one interceptor for full damage and deal no splash no matter how many interceptors there are. So in fact, valkyries are bad against interceptors. Similarly with corsairs.

Bonus observation:

If a corsair hits a group of say 11 stacked mutas, it will do a full 2.5 damage (not 5, since it's explosive damage) to the one target and 1.25 to the other 10. So no matter how stacked you are, it only does 2.5 to one muta. So if you have a group of corsairs, it helps to target fire one specific muta even if the mutas are clumped so that you do more concentrated damage on that one muta.