-- 2023-07-23
Started writing code, figuring out basic mechanics in test games, reading release notes, mechanics updates, forums, discord, etc.

-- 2023-07-26
dxcalc.com/s1914 went live. Most likely has bugs.

-- 2023-07-27
Fixed an issue with remove unit. The stack wasn't being renumbered properly because it was expecting a unit level.

-- 2023-07-27
Added "damage area" for infantry, cav and transport ships. These units get reduced incoming damage when mixed with other units.

-- 2023-07-31
Fixed some incoming damage distributions for multiple stacks that contain units with damage area < 1.

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/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/03/2023
Added per unit percentage of HP loss.

-- 08/10/2023
Fixed a bug where if ranged units died the stack would still try to attack the target at ranged even if only melee was left.

-- 08/17/2023
Adjusted the contributions of the 21st through 50th unit in a stack. The previous values were very slightly off.

-- 08/20/2023
In some cases, after a ranged unit died, the remaining melee units would still try to target a stack at range. This was fixed by updating the stack's max range before looking for a new target. This wasn't affecting the results of battles, but was doing some needless calculations.

-- 08/23/2023
Added damage to fortresses. Normally, the chance that a fortress is damage and how much depends on other buildings in the province. For now this is ignored and the fortress is arbirarily getting 1/3 of the incoming building damage per round. Hopefully, this is better than not damaging the fortress at all. If it becomes a problem it will be changed or removed. Allowing other buildings may be added in the future.

-- 08/24/2023
Fixed damage reduction for damaged level 1 fortresses. Now it goes from 33-50% reduction from 10-20 HP which is a dramatically faster dropoff than for other levels. Below 10 HP level 1 fortresses provide no damage reduction.

-- 09/05/2023
Added the ability to specify buildings, their levels, and HP. Now the calc can simulate fortress damage as is done in-game. This was a major update.

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

-- 10/20/2023
Fixed a bug where attacking melee units in a fort were applying their building damage to the fort, instead of the defenders damage to buildings being applied.

-- 10/23/2023
Updated calc so that stacks at the same position as the stack assigned buildings will inherit the buildings assigned to that stack. In general, the behavior should now be close to in-game. See info:forts.

-- 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 4 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.

-- 12/26/2023
Added stormtroopers.

-- 01/03/2024
Added debark terrain.

-- 01/03/2024
Removed transport ships as a unit. Now non naval units with the sea terrain are considered transport ships. Same goes for the debark terrain, which can have balloons and ferriable units.