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.
The backend is now a persistent process so response times should be better.
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."
The estimated rare material cost of the battle wasn't showing correctly. This has been fixed.
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.
Updated calc to allow melee battles between land and sea units.
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.
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.
Added on ground paratroops and airplane convoy units.
Made it so that artillery don't attack when they are being melee attacked.
Added rockets and nuclear bombers.
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.
Updated the balancing changes discussed in the recent release notes.
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.
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.
Added per unit percentage of HP loss in the results output.
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.
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.
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!
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.
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.
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.