65219 Commits

Author SHA1 Message Date
Jyrki Vesterinen
cbbc665c45 Minor bug fixes and code quality improvements 2016-07-21 20:13:24 +03:00
Jyrki Vesterinen
93761bcd1e Initial implementation of the Monte Carlo damage prediction mode
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().
2016-07-21 20:13:24 +03:00
Jyrki Vesterinen
1b3eecf8df Split the combat_matrix class to two
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.
2016-07-21 20:13:24 +03:00
Charles Dang
6ed995c53e Cleaned up some units/animation.hpp includes 2016-07-22 03:21:17 +11:00
Celtic Minstrel
6587ffeba6 Merge pull request #708 from jyrkive/multiprocessor-compilation
Visual Studio: enable multi-processor compilation
2016-07-20 15:13:21 -04:00
Jyrki Vesterinen
f56cb7f9bb Visual Studio: enable multi-processor compilation 2016-07-20 18:40:05 +03:00
Celtic Minstrel
939e15f771 Merge pull request #670 from dorng/core_logo
[game_config]: new keys for logo
2016-07-19 23:14:47 -04:00
Charles Dang
02a43e2d61 tpreferences: small hotkey tooltip tweak 2016-07-20 13:57:04 +11:00
Charles Dang
ee8ff792b5 Cleaned up map generator code 2016-07-20 13:57:03 +11:00
Celtic Minstrel
d58697e777 Eliminate C-style enum/struct declarations 2016-07-19 17:27:38 -04:00
Celtic Minstrel
63081cac46 Simplify enum output with std::transform 2016-07-19 17:20:21 -04:00
Celtic Minstrel
0b57922488 Output to requested stream instead of cout 2016-07-19 16:09:37 -04:00
Celtic Minstrel
37fe451bde Remove obsolete commented code 2016-07-19 16:08:50 -04:00
Celtic Minstrel
997464d630 Build joined string once instead of twice 2016-07-19 16:04:55 -04:00
Celtic Minstrel
b895abd331 Merge pull request #705 from GregoryLundberg/GL_fix_warnings_in_units_animation_cpp 2016-07-19 16:00:54 -04:00
Gregory A Lundberg
001917bb32 Use utils::join where possible 2016-07-19 14:43:20 -05:00
Jyrki Vesterinen
a8c3bac31f Update Visual Studio project files (#706) 2016-07-19 14:08:55 -04:00
Bär Halberkamp
1d8d843a80 move set_variable.rand's logic to helper.rand 2016-07-19 13:48:31 -04:00
Gregory A Lundberg
9623b746a9 Fix compiler warnings
Use a more meaningful variable name and make the usage more clear while we're snubbing the compiler warnings.
2016-07-19 11:04:03 -05:00
Charles Dang
34d78f2a2a Updated CB projfile 2016-07-20 01:02:19 +11:00
Lari Nieminen
849cacceb1 Merge pull request #699 from GregoryLundberg/GL_L_final
Liberty fixes
2016-07-19 16:31:53 +03:00
Lari Nieminen
b02e084064 Merge pull request #690 from GregoryLundberg/GL_AOI_recruit_mages
AOI Linaera should recruit Mages, not Elves
2016-07-19 16:30:53 +03:00
Gregory A Lundberg
4e75868bf6 AOI Update changelog 2016-07-19 07:19:58 -05:00
gfgtdf
ca1811228a fix asserion failure when redoing and undoing menu actions. 2016-07-19 13:46:33 +02:00
gfgtdf
d43e5ad8bc fix compilation 2016-07-19 13:17:48 +02:00
gfgtdf
084dfc9887 make victory event fire on proceed_to_nextlevel
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.
2016-07-19 13:16:21 +02:00
Lari Nieminen
a09f0ed6a9 Merge pull request #689 from GregoryLundberg/GL_AOI_fixes
An Orcish Incursion fixes
2016-07-19 11:25:13 +03:00
Charles Dang
fbcf4943b1 Use darker window border color 2016-07-19 13:07:14 +11:00
Celtic Minstrel
465ca498b6 mapgen: Fix erroneously trying to generate road names
when no [naming] is provided
2016-07-18 20:59:49 -04:00
Celtic Minstrel
a824d88079 Lua API: Make end level data mutable 2016-07-18 20:59:49 -04:00
Celtic Minstrel
be2a613fff Move Lua dispatch shim to top of file 2016-07-18 20:59:49 -04:00
Celtic Minstrel
93c9d7e557 Revert SP uses of end_scenario directly tied to victory 2016-07-18 20:59:49 -04:00
Charles Dang
2a86c6ec46 Cleaned up a few halo.hpp includes 2016-07-19 02:13:08 +11:00
Charles Dang
dd88d4906e Appropriately handle std::stoi exceptions 2016-07-19 01:38:24 +11:00
Celtic Minstrel
7b83343b36 fixup 2016-07-18 09:11:38 -04:00
Andreas
5e7d558228 Merge pull request #696 from wesnoth/Vultraz-event_handling_fixes
Refactored event contexts to use lists instead of vectors
2016-07-18 23:50:21 +12:00
Celtic Minstrel
2d7d6a0dde Fix crash when trying to draw a unit with no image 2016-07-18 02:39:12 -04:00
Celtic Minstrel
da30504945 Fix issue when generating a name for a raceless unit 2016-07-18 01:29:45 -04:00
Celtic Minstrel
7286ea8e0f Merge pull request #661 from spixi/name_and_map_generator
Improvements in the name and map generators
2016-07-18 01:10:46 -04:00
Celtic Minstrel
ab504f4458 Update XCode project 2016-07-18 00:47:16 -04:00
Celtic Minstrel
01e9f11cfb Eliminate string_utils include in name_generator.hpp 2016-07-18 00:09:37 -04:00
Celtic Minstrel
275adafa86 Style
Fixes a few style issues introduced by #661 and also some that were already there
2016-07-18 00:08:05 -04:00
Celtic Minstrel
649b50d93b Shorten one of the map name generator keys 2016-07-17 23:50:37 -04:00
Spixi
f96f86245e Improvements in the map and name generators
- 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)
2016-07-17 23:42:19 -04:00
Celtic Minstrel
36eeed413c Comment fixup 2016-07-17 19:51:09 -04:00
Bär Halberkamp
0a83e2e6b6 Fix [message]s without an image not working 2016-07-17 19:49:29 -04:00
Celtic Minstrel
63e0303c00 Update XCode project so that unit tests build 2016-07-17 18:44:57 -04:00
Celtic Minstrel
20b7e5b757 MP Test: Give up after 100 tries
This allows the test script to terminate even if
something went wrong, such as a server crash.
2016-07-17 17:21:13 -04:00
Andreas Löf
9550c3636b Ensure that focus handling stays the same as before the fix 2016-07-17 22:52:09 +12:00
Andreas Löf
501eb60743 Fix crash in context destructor
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.
2016-07-17 22:06:52 +12:00