-- 01/17/2023
If a percentage HP was input to the calc with the pan-asian doctrine, the calculated HP would be a bit off for unit types for which the pan-asian HP penalty resulted in a non-whole number. In game such values are rounded up. The calc has been updated to the proper behavior.

-- 01/29/2023
I added an option to simulate variance in battles. See https://forum.callofwar.com/index.php?thread/45098-simulate-variance-in-dxcalc/ for more details.

-- 01/30/2023
The backend is now a persistent process so response times should be better.

-- 02/21/2023
The fortification bonus for planes "on the ground" was removed to reflect the recent update at https://bytro.helpshift.com/hc/en/4-call-of-war/faq/322-release-notes-2023-02-21/

"A bug was fixed that made the tooltip state that air units get a defense bonus because of a fortification in a province, although this bonus is not applied. Air units are considered to be "in the air" all the time. Therefore this bonus was never intended to be applied and the incorrect tooltip was adjusted."

-- 03/14/2023
The estimated rare material cost of the battle wasn't showing correctly. This has been fixed.

-- 03/19/2023
Made the following text elements in the page links to their corresponding help file sections: Army, Doctrine, Stack, vs, in, Core, Forts, Count, HP, Max Rounds, Update Counts, New Tab, Simulate Variance.

In doing so a bug was introduced when "add stack" was clicked. If there was one stack say A1 and a new stack was added it would still say A1. However, internally it still knew it was A2 and the displayed text would be updated after the battle was run. In any case, this was fixed.

-- 04/08/2023
Updated calc to allow melee battles between land and sea units.

-- 04/08/2023
Previously, only ranged units would try to find a target to attack if one wasn't specified. This has now been changed so that if a unit isn't defending an attack it will look for a valid target to attack if one wasn't specified.

-- 04/22/2023
The above targeting update introduced an unwanted behavior. If a melee stack wasn't being directly attacked it would search for a target to attack. This is probably not what you want if the melee stack is within melee range of one of it's fellow melee stacks that is being targeted. This has been modified so that a melee unit will only look for a target to attack if 1) it isn't being directly targeted and 2) it isn't within melee range of a fellow stack that is being targeted.

-- 04/22/2023
Added on ground paratroops and airplane convoy units.

-- 04/25/2023
Made it so that artillery don't attack when they are being melee attacked.

-- 04/27/2023
Added rockets and nuclear bombers.

-- 04/28/2023
Updated patrolling so that patrols should now work properly while ticking on both air and non air targets. Air targets do not apply defensive damage first, while the rest do.

Also fixed this for air to air bombardment.

Updated commandos so they only ignore fort bonus, but not core bonus.

Broke the unit selection options into groups to make it easier to find a unit type.

-- 06/28/2023
Updated the balancing changes discussed in the recent release notes.

-- 08/01/2023
Fixed an issue with HP of patrolling planes not being updated.

Added damage to direct air attacks from patrolling defenders.

Made planes on the ground not do preemptive damage to direct or patrol plane attacks.

-- 08/02/2023
Previously, a stack whose melee range ally stack was defending an attack died, it would look for a target to attack and attack the aggressor back. This has been changed so that a stack whose partner stack was only defending will not auto-attack once the partner dies. Instead it will continue to defend.

-- 08/03/2023
Added per unit percentage of HP loss in the results output.

-- 09/08/2023
Added some indentation to units to help distinguish different stacks. Merged many functions between cow, io1919, and s1914 and got rid of stack and unit templates.

-- 09/13/2023
The resource costs shown in the battle results now more accurately represent doctrine specific costs due to HP and/or production cost modifiers. Costs are based on HP loss instead of the number of dead units.

-- 10/23/2023
Flame tanks levels 1-3 were added

IMPORTANT! A major bug was fixed where unit stats were wrong for units having different attack and defense values. The bug was probably introduced around mid August 2023. Sorry!

-- 10/25/2023
Made it so that ranged naval units will not auto-attack when they are melee attacked. This was already the case for ranged land units.

-- 10/28/2023
Fixed a bug with auto-attacking. Normally if a stack finishing melee attacking a stack it will attack another melee stack in range if available. Ranged units will normally auto-attack something in range if they are not being melee attacked. There was a bug preventing this behavior from working properly.

-- 11/02/2023
Changed patrol behavior so they now do two ticks per round.

Changed "Simulate Variance" so that every unit type in every round gets a separate variance. Previously all units in the same stack would get the same variance in a given round.