57037 Commits

Author SHA1 Message Date
Alarantalara
a5974b367b UtBS: Provide a partial path between enemy keeps
Should slightly encourage them to fight each other and reduces the
amount of sand slightly, making interference/attacking the keeps
somewhat harder.
2014-06-01 20:05:22 -04:00
Alarantalara
0221553030 UtBS: Make the final fight harder
Increase hp and damage of all units unique to the fight, and make the
amounts scale with difficulty level.
2014-06-01 20:05:22 -04:00
Charles Dang
4a24cce3f9 Merge pull request #182 from sigurdfdragon/CB_Update_2014-06-01
Update CB project file.
2014-06-02 11:05:16 +11:00
sigurdfdragon
3b5be89193 Update CB project file.
Adds new file from 6a8827a071845594cc8e0ed2da298c3060e531fb.
2014-06-01 19:34:47 -04:00
Chris Beck
1c2dcdb6bc Merge branch 'master' of git://github.com/wesnoth/wesnoth 2014-06-01 18:58:48 -04:00
Chris Beck
a21baf01ef add a check that unit_map.end() is invalid for dereference 2014-06-01 18:58:25 -04:00
gfgtdf
6a8827a071 Merge pull request #181 from gfgtdf/gamestate_refactor
game_state refactor
2014-06-02 00:56:33 +02:00
gfgtdf
1a03e61165 move next_scenario_append/setting to carryover 2014-06-01 23:59:16 +02:00
gfgtdf
afbf5c6e58 remove resources::state_of_game
we don't want to expose the fileds "snapshot", "carryover_sides".
instead we only add classification, and mp_game_setting to resources
which are members of game_state.

in order to do that, we have to add a do_autosave method to
play_controller.

this commit also moves some code from game_state::write_snapshot to
play_controller::to_config which was intended to be in a different
commit.
2014-06-01 23:59:15 +02:00
gfgtdf
83acdf2870 remove unused variable continuance 2014-06-01 23:56:10 +02:00
gfgtdf
a08efab4c0 remove unused variable 2014-06-01 23:56:09 +02:00
gfgtdf
9687383d0f move carryover into its own file 2014-06-01 23:52:42 +02:00
Chris Beck
124781c9d8 integrate game_board into turn_info object
This commit manages to purge all references to resources::teams
and resources::units from the turn_info object, by moving
functionality to game_board, or refactoring to use const &
accessors.

This is not a strict refactor, but I had my hand in the earlier
state of this code anyways, and I have playtested the new version.
2014-06-01 17:50:08 -04:00
Chris Beck
096cb97cc1 Merge pull request #180 from cbeck88/add_game_board_struct_alternate
This is a refactor to introduce an object encapsulating the unit map, the game map, and the list of teams. Introducing this object permits us to move a substantial amount of code out of the play_controller object, and also to give a home to some helper functions in unit.?pp that previously sat in the global namespace. It also allows us to simplify the construction of some of the clients of play_controller.

This refactor is ongoing WIP. The goals are

(1) better organize the architecture of the engine, to make saving and reloading easier.
(2) Facilitate the introduction of an improved pathfinding mechanism, which will need to sit between most of the other engine modules and the unit map / game map.
(3) Refactoring clarifies what the existing code is doing, therefore it may help us to find bugs in the current system, which may be fixed independently of the refactor in 1.12.
2014-06-01 13:42:10 -04:00
gfgtdf
9ddce31854 remove "parent" from classification
"parent" is a leftover from a feature that was planned 5 years ago but
was never implemented. To have something like a "tree view" for
savegames in the load dialog.

"parent" gets written but never gets read.

The current code writing the "parent" doesn't really work because it is
only takes the name of the last savefile unrelated of whether there was
a reload, or similar between so for example a "parent" of an sp campaign
save could easily be a mp match save. Also it could produce cycle which
would also be wrong for a tree view.
2014-06-01 19:27:55 +02:00
Chris Beck
2d2385b952 integrate game_board into mouse_handler 2014-06-01 12:53:34 -04:00
gfgtdf
ebbf813e03 Merge pull request #177 from gfgtdf/remove_diffic
remove "difficulty_" and "random_mode_" from game_data and carryover
(we already have them in the classification)
2014-06-01 18:36:16 +02:00
Chris Beck
df74d891d2 give global fcn's (find/get)_visible_unit a home in game_board
Unit tested and playtested after moving the functions decalarations,
and definitions, adding links to play_controller::game_board from
resources.?pp, and executing find and replace commands:

git grep -lz 'find_visible_unit(' | xargs -0 perl -i'' -pE "s/find_visible_unit\(/resources::gameboard->find_visible_unit\(/g"
git grep -lz 'get_visible_unit(' | xargs -0 perl -i'' -pE "s/get_visible_unit\(/resources::gameboard->get_visible_unit\(/g"
2014-06-01 11:31:47 -04:00
Chris Beck
d557ea5165 add access controls to game_board 2014-06-01 08:56:38 -04:00
Chris Beck
8b6339af9b move code managing preference encounters out of play controller 2014-06-01 08:41:32 -04:00
Chris Beck
2afe4f4f5a move game_board to its own file, update project files 2014-06-01 08:13:34 -04:00
Chris Beck
471e7ab865 replay controller uses game_board to do resets
This is not a strict refactor -- the game map will also be reset
to the starting configuration now, when we reset the replay. It
doesn't look like this was the case in the old version, so it's
possible that if a scenario used [replace_map] or similar, the
replay could go out of sync after hitting the reset button.

Regardless of whether the old version was buggy, the new version
should be just as good if not better, and was tested.
2014-06-01 02:59:28 -04:00
Chris Beck
6fff2e8be2 move some of the savegame code from play_controller to game_board 2014-06-01 02:27:50 -04:00
Chris Beck
0e7769a12c move some functionality out of play controller to game_board
This moves some simple code which manipulates the end turn status
of the units on the map.
2014-06-01 01:54:41 -04:00
Alexander van Gessel
1979e5e1d1 Merge pull request #179 from sigurdfdragon/CB_Update_2014-05-31
Update CB project file.
2014-06-01 06:01:41 +02:00
sigurdfdragon
de38d7a245 Update CB project file.
Adds file from 6deda4ca7f67ca1e711be0c15c7f9e692e6b1492.
2014-05-31 23:26:16 -04:00
gfgtdf
e930497327 fixup "sync random_start time the normal way" 2014-06-01 05:01:28 +02:00
Chris Beck
b342cd2056 fixup update changelog
My text editor played a trick on me...
fixes up 7828466e1a400c433812b7aa60620de6cfcf019a
2014-05-31 22:08:59 -04:00
gfgtdf
913ebd6d4b Update changelog 2014-06-01 04:00:31 +02:00
gfgtdf
3da7515e55 Merge branch 'master' of https://github.com/wesnoth/wesnoth 2014-06-01 03:55:41 +02:00
gfgtdf
064dcc3d4e fixup carryover_on_defeat
we need to save the preceed_to_next_scenario value for linger saves. We
don't really need it for the next scenario in the carryover though.
2014-06-01 03:55:20 +02:00
Chris Beck
7828466e1a update changelog 2014-05-31 21:53:21 -04:00
Chris Beck
03254fdb1e use completion setter object in mp linger mode
mp linger mode was not properly setting the completion status,
as sp does. This caused mp end of scenario saves not to end up
in linger mode when they are reloaded.

Note that this reopens bug 15545 (!)
https://gna.org/bugs/index.php?15545

In 1.11+, I believe that the correct way to fix that is to save
the [carryover] while in linger mode, and restore it on reload,
however this is for another commit...
2014-05-31 21:33:22 -04:00
gfgtdf
c0b81688cb fixup 'remove difficulcy_'
otherwise we don't see the difficulcy in the loadgame menu and only see
"UNTLB" instead.
2014-06-01 02:49:34 +02:00
David Mikos
d7ba99aaaa Fix bug #22116: unlock movement when attacking enemy+discovering in fog 2014-06-01 09:29:57 +09:30
gfgtdf
b138912ce3 remove "random_mode_" from game_data
we already have this information in the classification.
2014-05-31 23:11:28 +02:00
gfgtdf
7ebbac36b3 removed unneeded check in synced_context.cpp
the plan is to remove "random_mode" form game_data
2014-05-31 23:11:26 +02:00
gfgtdf
f086963b39 remove "difficulty_" from game_data and carryover
we already have this data in the classification.
same will happen to random_mode
2014-05-31 23:11:25 +02:00
Mark de Wever
6deda4ca7f Merge branch 'SDL2_GUI2_input'
Enable SDL2 text input in the GUI2 widgets.
2014-05-31 22:28:48 +02:00
Mark de Wever
954e068a54 Move create_rect to the sdl namespace.
This library dependency issues with CMake.
2014-05-31 22:04:36 +02:00
Chris Beck
50ed2187e1 Merge branch 'master' of git://github.com/wesnoth/wesnoth
This partially reverts mordante's change to drop abs
rather than correct the expected result of expression.

Conflicts:
	src/tests/test_config.cpp
2014-05-31 14:49:31 -04:00
Mark de Wever
bafab2261d Fix a broken test case.
The issue was found with commit
bc2e59082bb9bc0e7736882429bd82fa81379690
2014-05-31 20:31:02 +02:00
Chris Beck
5aba222f00 fixup tests
Test was calling the wrong function in place of to_double. Also
fix up an answer value after this.

Fixes up commit 7cd205832f34098375aff05e34a12c37f16046d5
2014-05-31 14:30:55 -04:00
gfgtdf
08ff7ba7fa add comment about random tod 2014-05-31 20:11:54 +02:00
Chris Beck
5fa083680e cleanup for loops made ugly in previous commit
This is a strict refactor.
2014-05-31 14:08:29 -04:00
Chris Beck
5718992f9a add game_board struct to hold map, units, teams
For now this will just help us to put code in logical places and make
the save and load process simpler. This change is invisible outside
of play_controller.

Please don't backport this to 1.12.
2014-05-31 13:08:20 -04:00
gfgtdf
dd8ac6754a Merge pull request #172 from gfgtdf/random_tod
sync random_start time the normal way
2014-05-31 18:44:00 +02:00
gfgtdf
7aef411514 Merge pull request #176 from gfgtdf/carryover_on_defeeat
go to next scenario if there is at least one human
2014-05-31 18:38:27 +02:00
Mark de Wever
bc2e59082b Fixes compilation of abs for C++11. 2014-05-31 18:34:52 +02:00
gfgtdf
14437136a9 go to next scenario if there is at least one human
defeated sides in mp now also advance to the next scenario if there is
at least one networked human side that got a victory.
2014-05-31 14:58:11 +02:00