The implementation isn't yet wired to the high-level damage preview
calculation code, or even tested for that matter.
I also extended the random number generator by adding functions
get_random_bool(), get_random_float() and get_random_element().
Combat_matrix is now an abstract class, and a new class called
probability_combat_matrix got the functionality split away from
combat_matrix.
I plan to later create a class called monte_carlo_combat_matrix. This way
the Monte Carlo combat simulation code can inherit functionality it needs
(combat_matrix) but not the functionality it doesn't
(probability_combat_matrix). In addition, the calling code can use both
classes through the shared interface.
This changes the behaviour of victory event so that they are now also fored when there is at least one human that is victorious, for sp and for coop mp scenarios the conditions when victory is fired is the same as before, in non-coop mp games the victory event will now also be fired whenever there is any human side that wins, since such scenarios usually don't use victory events this is not tha much of an issue. For those cases i added the 'local_victory' event (maybe if people want to print congratulation messages in their mp maps or similar)
The reason for this change is that now, since victory events fire on all client the same ,way we can mark them as synced, this specially fixes issues with invalid unit ids of units created suring victory events in sp.
- Implement a way to escape special characters {|} in the CFG generator
- Eliminate null pointers to name generators
- Invalid generators now throw exceptions
- Name generating rules for different terrain elements can now be specified
(The defaults in english.cfg are still used)
This fixes a crash that was seen when the context destructor was calling
either leave or leave_global while iterating over the list. The current iterator
handle would be invalidated and further calls to it would return invalid values.