73069 Commits

Author SHA1 Message Date
doofus-01
221312c87f
revising Garak weapon special names, in part because inactive name issue was fixed, but non-default names are still better 2018-10-19 17:38:43 -05:00
doofus-01
f3500620ad
Scenario 3 adjustment to turn 1 player unit recall and adjustment to evil Garak death events 2018-10-19 17:38:06 -05:00
josteph
846e5aff4e AToTB: Don't talk about undead's unusual resistances when attacking a Walking Corpse. 2018-10-19 20:10:42 +00:00
josteph
2bb3ebc213 Repeat the translation hint for each string. 2018-10-19 19:33:51 +00:00
josteph
72daec4e1b help: Prevent line breaks within the "Required XP: 80" block by using non-breaking spaces. 2018-10-19 19:33:51 +00:00
josteph
fc2c0e7ee4 Unit Display: When a recruiting unit is visible but the recruited unit is not, scroll to the recruiting unit and show the recruit animation.
Fixes #3577.
2018-10-19 19:30:54 +00:00
josteph
801d6f5c4f irdya_date: Extend tests 2018-10-19 19:27:06 +00:00
josteph
91db37daab irdya_date: Fix comparison of BW/BF years returning true for both 12 BW < 34 BW and 34 BW < 12 BW.
The block on line 99 was entered for BW years, but shouldn't have been.

Fixes #3187.

(cherry picked from commit 5e97d1505f529c45ff8e48f694b6fd938b56e3af)
2018-10-19 19:12:55 +00:00
Severin Glöckner
06f84a7f48 SoF: make it more debug safe
also show a different message when trying to recall.

[ci skip]
2018-10-19 14:07:19 +02:00
Konrad2
18a80a0b38 SoF 7: better fitting message
[ci skip]
2018-10-19 13:39:59 +02:00
Severin Glöckner
c685445907 SoF: Alanin is no more a leader
In the scenarios where one plays him he retains now his usual overlay.
Master only, as the scenarios depend on changes in previous scenarios,
which breakssave compatibility.
[ci skip]
2018-10-19 12:35:23 +02:00
Severin Glöckner
6c0ccc8ac1 SoF 7: no need for manual target calculation
move_unit does this by itself (in difference to move_unit_fake)
And it works as well if no surrounding hex is free.
[ci skip]
2018-10-19 12:35:07 +02:00
Severin Glöckner
8300293c53
SoF 7: add a time over event
He will be killed by an ambushing Outrider.
[ci skip]
2018-10-18 15:28:42 -05:00
Konrad2
fd0f7dc1a9
update credits
backport of #3430
[ci skip]
2018-10-18 15:28:15 -05:00
Konrad2
b9ea2ecf71
SoF 7: explain the Outriders
[ci skip]
2018-10-18 15:23:08 -05:00
Severin Glöckner
1d6fe71852
SoF 7: split reinforcements into separate event
[ci skip]
2018-10-18 15:22:57 -05:00
DisherProject
e2214a06aa SotBE: Add [show_if] to the objectives tag 2018-10-18 12:43:18 -05:00
DisherProject
a73656ae0a SotBE: Update role tag usage 2018-10-18 12:43:18 -05:00
DisherProject
7b77d5f7d1 SotBE S4: Add some visual effect
We'll now see the elves coming out of the wood, while they
just appeared on the screen before.
2018-10-18 12:43:18 -05:00
DisherProject
036f663c2f SotBE S3: Don't put two [endlevel]s in the same event
In case this event was fired, a lua warning was displayed
on the screen.
2018-10-18 12:43:18 -05:00
DisherProject
d02ed7b0c2 SotBE S7: Fix filter for scorpions' poisonous attack
They won't use poison against trolls and already poisoned
units
2018-10-18 12:43:18 -05:00
gfgtdf
7599746b25 put [resource] before other content (again); fixes #3345
Now content that is loaded via [load_resource] is placed to the position
where the [load_resource] was. This fixes a problem where previously one could
not use lua variables/functions created by the [resource][lua] because the
engine would put the [lua] tags from the [resource] after the [resource] from the
scenario.

This time it uses size_t indicies instad of vector iterators to prevent
possible bugs arisong from invalidating iterators when the size of the
vector changes.

This reverts commit b3e1680f886ec27c29150912bb27949d7cdd7f6e.

In the long run i think it might actually be better to allow [event] and
[lua] to have a order/priority attribute similar to lua on_event events.
Then this commit would probably not be needed anymore.
2018-10-18 19:25:49 +02:00
DisherProject
023b575d0b TRoW: Clear new TODOs 2018-10-18 12:24:32 -05:00
DisherProject
5e2ccd911b TRoW S14: Fix sea serpents placement 2018-10-18 12:24:32 -05:00
DisherProject
9c267b1433 TRoW S4: Fix scorpions placement 2018-10-18 12:24:32 -05:00
DisherProject
8a0490b111 TRoW: Give monsters and undeads their own sides
Noticing that orcs can control undead units feels strange. This
can give the AI an advantage too. One would expect monsters and
undeads to move autonomously.
2018-10-18 12:24:32 -05:00
DisherProject
1311aa0aed TRoW: use [show_if] inside the [objectives] tag 2018-10-18 12:24:32 -05:00
DisherProject
dd24dd6b6e TRoW S22: Fix win and defeat conditions
This makes sure that when Jevyan dies, we check for Aethyr's
presence before doing anything, so the player loses immediately
if he's alive.
Furthermore, we must hide the last orc leader, or his death will
make the player lose.
2018-10-18 12:24:32 -05:00
DisherProject
b911e9a196 TRoW S17d: Kill all enemy units in the end
For consistency to what Haldric says before
2018-10-18 12:24:32 -05:00
DisherProject
7c6bb12515 TRoW S15: Update Dionli's unit image 2018-10-18 12:24:32 -05:00
DisherProject
60d24516ef TRoW S6: Replace old sound with unit's own defending animation 2018-10-18 12:24:32 -05:00
DisherProject
2dbf9f87eb TRoW: Fix some TODOs and add more 2018-10-18 12:24:32 -05:00
DisherProject
15d2b035e5 TRoW: Replace deprecated keys 2018-10-18 12:24:32 -05:00
DisherProject
5be5d32690 TRoW: General cleanup
Clear variables, macros and comments
2018-10-18 12:24:32 -05:00
newfrenchy83
f594019433 Update Code::Blocks project and add documentation
Manual merge of pull request #3626.
2018-10-18 16:44:22 +03:00
nemaara
313959c83e
DiD S10: added time over defeat scene 2018-10-17 12:45:21 -05:00
Jyrki Vesterinen
b3e1680f88 Revert "put [resource] before other content; fixes #3345"
This reverts commit 706740220957a9313909f5cc358ba5aba3bf4118.

The commit used the `pos` iterator after invalidating
it (passing an iterator to `config::add_child_at()`
invalidates it), resulting in undefined behavior.
2018-10-17 19:53:09 +03:00
Jyrki Vesterinen
2bf39f7ee8 Fix #2884: minimap buttons don't do anything
Charry-pick of commit
a0b54b1513e840498e90572e0e4b9687df36a9cd.
2018-10-17 19:52:19 +03:00
Charles Dang
f6933b98f8 Shot-in-the-dark attempt to fix the tests 2018-10-17 14:30:42 +11:00
Charles Dang
6b30c18d54 Refactor out custom wesnothd_connection_ptr class again
I originally did this in 699047766a8852014df20c44d5ed84dadb37015e and then reverted it in
08a866dc20e678602f65f0cdedb21fb28a0bfa8c due to @gfgtdf pointing out the object was never
actually destroyed since io_service::stop was never called (issue #1927).

This new method foregoes the custom wrapper class and instead waits for the worker thread
to terminate in the wesnothd_connection dtor. The use of the wrapper class is also why using
thread::detach alone worked (@jyrkive) and using join did not.

Additionally, the ptr alias is now of a unique_ptr instead of a shared_ptr.

I have verified that the connection dtor is actually called. This new method makes it clearer
what's actually going on.
2018-10-17 14:30:41 +11:00
Charles Dang
121365f4d2 Loading Screen: rethrow exception if worker thread creation fails 2018-10-17 12:30:56 +11:00
Charles Dang
dbbd153d3f Loading Screen: temporarily disable animation rate limiter
Seems to make the loading screen progress faster and gets rid of the weird issue
where the animation sometime wouldn't show up on game launch. Odd.
2018-10-17 12:30:55 +11:00
Charles Dang
f5125ea860 Loading Screen: refactor and clean up implementation
This covers several things:

Instead of creating a new worker thread manually and having it set class member state flags,
I instead utilized std::future and std::async. As far as I can tell, this should avoid the
(albeit unlikely) potential race condition wherein the ls could close before loading at all
if the thread was delayed in starting.

Removed the timer interface and split it into two components:
* A drawing callback that handles the animation. This has its granularity retained at 100 ms,
  but can be easily adjusted if we want it to go faster.
* A pump monitor that runs much more frequently (every time events::run_event_loop is called,
  technically). This handles checking the state of the std::future object and will then close
  the window. This makes the loading screen a bit speedier compared to the previous iteration
  since it no longer wastes time waiting for the next timer callback to close.

The one bit I'm not 100% sure about is the check for the future object's ready state in the dtor.
Though, relatedly, I wonder if perhaps we should wait for the worker thread to complete in that
case instead of exiting....

Also shuffled a few things around, such as immediately setting enter/esc disabled in pre_show
instead of waiting for everything there to finish.

Do note there occasionally seem to be a few odd issues with the dot animation after this commit.
Will look into that. But it may be some texture cache-related issue...

This also cleans up some unused log defines and a VS 2013 conditional include.
2018-10-17 12:30:55 +11:00
Charles Dang
519447b0cb Convert uses of boost::thread to std::thread
Also covers uses of boost::this_thread.

Turns out std::thread calls std::terminate if it's destroyed while still joinable.
thread::detach needs to be called or else the program will crash.

There's also no standard library equivalent of boost:🧵:timed_join so I just
replaced it with the is_worker_running_ variable.
2018-10-17 12:30:54 +11:00
gfgtdf
ae5c5c4043
fix missing comma 2018-10-17 00:13:27 +02:00
gfgtdf
1a7724e547 reset unit overlay & image_mods on advance_to
this fixes remove_modification for these effects, and also a bug where these effect would be applied twice after a unit advances.

fixes #3264
fixes #3220

This also changes the implementation of [unit_overlay] to use [effect]s now so tht changesdone via [unit_overlay] ae persistent as they were before.
2018-10-16 23:03:37 +02:00
gfgtdf
03ea39b4af add debug info in battle_context 2018-10-16 21:14:30 +02:00
gfgtdf
e1c66ae215 remove unused cctors 2018-10-16 21:14:29 +02:00
Wedge009
2dd7e87039 MSVC project update.
* Remove invalid entries
* Add files necessary for compilation after master rewrite.

[ci skip]
2018-10-16 22:23:36 +11:00
gfgtdf
b4196af8c0 refactor battle_context
this has multiple advantages:;
1) it fixes #3594, an assertion failue that happend when a unit with
only one attack attacked when that one attack was disabled.
2) It now creates each pair or battle_context_unit_stats only once for
each pauir of attacks, previsouly the coud would create multiple
temporary battle_context_unit_stats objects to for exampel check
"disabled"
3) It simplifies the code by removing special handling of some cases.
2018-10-16 12:29:17 +02:00