Mini application for the boardgame Eclipse: Second Dawn for the Galaxy
Calculate the probability of winning the battle.
Also, you can simulate one battle and get results (see dev console for play-by-play).
Enter the parameters of each fleet using the characteristics of ships and their number.
Also choose which technologies each fleet has and whether it's attacking or defending.
Ships characteristics:
Number - number of ships of this type
Hull - number of hulls
Regen - number of Morph Shields
Computer (white) - number of computers
Shield (black) - number of shields
Initiative - number of initiative
Cannons - number of cannons
Missiles (standard module has 2 missiles; enter 2 (not 1) for each module)
Select number of battles for the calculation.
Algorithm will simulate that number of battles and display average statistics.
Attention, a lot of battles will require a long calculation.
After selecting all parameters, press "Run Battle" to get results.
Results
For each ship type, the average number of victors remaining is shown for each ship class. To the right of this is (dmg) which is the average amount of damage that was done to ships of this type (including those ships that were destroyed). For ships that were destroyed, damage inflicted past their hull+1 is not counted here. E.g. if your three interceptors with 2 hull fight and only one survives their Soliton cannons, total damage done is 4 not 6.
These stats are only counted for rounds in which that side won.
Below the ship stats are stats for the fleet. "Mat victors lost" is the average number of materials you'll lose if you win the battle. Mat lost is the average amount of materials lost in the battles (win or lose). "Mat lost %" is the percent lost of total materials committed to the battle. Standard deviation of this value is also shown (σ=) to show how varied the outcomes were.
Calculate the average point value of your reputation tiles compared to your opponents.
Your Rep Spaces: How many spaces there are for reputation on your board.
Player Count: How many players are playing (including you).
Their Rep Spaces: How many spaces there are for reputation on your opponents' boards.
Your Tiles per Draw: How many tiles you draw when you draw tiles.
Opponent Tiles per Draw: How many tiles opponents draw when they draw tiles.
The "Tiles per Draw" fields are split into 8 seperate draws, but these don't necessarily correspond to the 8 rounds of the game. They simply give you a way to simulate drawing early vs late.
For each of the 8 draws, the order between players drawing is randomized.
Calculate the probability of hits to the opponent.
Select number of cannons or missiles and set bonus. Press "Calc" to get results.
Types of counter:
Ion (yellow) - number of ion cannons or missiles
Plasma (orange) - number of plasma cannons or missiles
Soliton (blue) - number of soliton cannons
Antimatter (red) - number of antimatter cannons or missiles
Rift (violet) - number of rift cannons
Bonus (white) - bonus of computers, considering opponent's shields
Simulate a throw of dice.
Select number of dice of each color. Press "Throw" to get results.
Randomly select a race to play.
Select the probability of selection of each race and press "Get random race" for get results.
Code available at https://github.com/jaafit/eclipse-boardgame-helper
Credit to Negromovich for coding this in 2014 for 1st Ed: