70863 Commits

Author SHA1 Message Date
Gregory A Lundberg
745f8d29c3
Fix kban syntax error
The "Kick + Ban" button omitted the space between the command and the nick.
2018-01-03 19:53:08 -06:00
sigurdfdragon
a9e035ab25 Update changelogs 2018-01-03 18:47:40 -05:00
josteph
e135517393 Game Display: Show correct defense modifier for unreachable terrain.
Fixes #2353.
2018-01-03 13:04:10 -06:00
Jyrki Vesterinen
a4018faad1 ToD manager: ensure that there is at least one ToD
Complete lack of ToDs is an unsupported use case,
causing crashes and undefined behavior. See time_of_day::parse_times().

Fixes #2301.
2018-01-01 12:36:12 +02:00
sigurdfdragon
d3a58e9424 DiD S12: Allow campaign to end on the third repetition
As players who haven't figured out certain strategies might have too much
trouble beating the third repetition. Also waiting until the fourth
repetition may be too long and have players question what's going on.
2017-12-29 19:50:54 -05:00
sigurdfdragon
44bcd6ef90 DiD S07: Add note about scenario conditions 2017-12-29 19:50:54 -05:00
sigurdfdragon
ec6c174096 DiD: Clear variables when no longer needed and remove unused variable 2017-12-29 19:50:54 -05:00
sigurdfdragon
b0fc2708ae DiD S11: Fix & improve wose implementation
Bug was that a troll on 4,21 could move through the avoid area to attack
player at 11,22 which is a likely occurrence. Expanding the avoid area
further seems inappropriate as troll avoidance is more likely to be noticed.

New implementation ensures only player will trigger the wose, maintains
proper look to the player, no longer interferes with trolls attacking, and
simplifies code.
2017-12-29 19:50:54 -05:00
sigurdfdragon
8db9ec2777 DiD S01: Add the alternative objective to the scenario objectives 2017-12-29 19:50:54 -05:00
sigurdfdragon
cd9af67ff1 DiD S04: Fix dialog so it better fits with if malin_used_necromancy or not 2017-12-29 19:50:54 -05:00
sigurdfdragon
5fbd5affe2 DiD S03: Slightly change gameplay to better match objectives
Have player kill all enemy units in the cave instead of just the leaders.
2017-12-29 19:50:54 -05:00
sigurdfdragon
8b367a184a DiD S11: Have dialog fire if Mal Keshar is defender as well as attacker 2017-12-29 19:50:54 -05:00
Vasya Novikov
d21a79b011 document use_markup widget property 2017-12-28 14:29:43 -06:00
Gregory A Lundberg
f35d2d892d Misleading comment
'toward zero' is confusing since it can round up or down.

The correct comment is 'round half up, to the nearest integer'.

Closes #2330
2017-12-28 14:27:29 -06:00
Jyrki Vesterinen
d81f230680 Clear unit death animation after killing the unit
This is another and much better way to fix the unit halo remaining.
2017-12-28 12:02:29 +02:00
Jyrki Vesterinen
f50c7d3f2a Revert "Work around unit halo not disappearing with [kill] animate=yes"
This reverts commit 70b468070b71616aa3663088b6ad171391d0c4f0.

As I said in the commit message, the fix is not pretty, and
@CelticMinstrel said in IRC that a different fix would definitely be
better. I'll fix the problem by having an animation automatically
release the unit when done, instead (next commit).
2017-12-28 11:48:12 +02:00
Steve Cotton
1c2968c632 L S8 Give Harper a loyal overlay in Liberty's final scenario
He's been a silver-crowned hero until this scenario, and in
the final scenario he's still loyal with dialogue if he dies,
so make him easily visible to the player.
2017-12-26 08:30:01 -06:00
Jyrki Vesterinen
70b468070b Work around unit halo not disappearing with [kill] animate=yes
The problem was that the kill animation retained a reference to the unit.
Triggering a Lua garbage collection (which destroys the animation object)
fixes it, although it's definitely not a pretty fix.

Closes pull request #2313.
2017-12-25 18:35:01 +02:00
gfgtdf
9cd200032c
fix player not proceeding to next scenario in Low 22
reported on the forum
2017-12-23 20:39:20 +01:00
Rikard Falkeborn
557bbf36ea Make some functions static in display.{cpp,hpp} 2017-12-22 19:48:45 +02:00
Charles Dang
393ac9bd70 Game Events/Manager: refactor event iteration interface
Instead of trying to iterate over two lists at once, just construct a new list of matching
handlers. This should fix #2310 too, since it ensures any additional events added after
iteration begins don't get executed.
2017-12-22 04:14:35 -05:00
Jyrki Vesterinen
e0e59ac463 Fix exception when [harm_unit] is used without an attacking unit
Regression from commit 38e31aa61f60abed71bd266e6d2abe61035805b4.
In particular, it broke WML unit tests.
2017-12-21 20:24:48 +02:00
Wedge009
fd656b61c4
Merge pull request #2309 from jostephd/whiteboard-sp-undo-stack
whiteboard: Don't clear the undo stack in SP mode.
2017-12-21 16:34:37 +11:00
josteph
5858208cf8 whiteboard: Don't clear the undo stack in SP mode.
Fixes #2303.
2017-12-21 02:21:56 +00:00
Vasya Novikov
7be364f3b5 addon_manager: fix append_tag usage
Note that this still doesn't allow the --upload
functionality to work. After this fix,
wesnoth still complaints about unordered WML.

It is believed that this is a separate issue though,
happened because of the latest simple_wml changes.
2017-12-20 22:23:53 +02:00
Gunter Labes
0c4ee56eac
Merge pull request #2307 from vn971/not_executable_images
make images not executable
2017-12-20 21:01:08 +01:00
Vasya Novikov
6a1a91cd7c make images not executable 2017-12-20 22:19:35 +03:00
Gregory A Lundberg
38e31aa61f Do not access non-existent unit
The [kill] tag can run animations. But it can also fire the `last breath` event, which can call [kill]. When we get back to the original [kill], the unit is gone, causing an error attempting to run the animations.

Added a check to ensure the unit is still on the map before we attempt to run the animations.

The Issue also requested that [harm_unit] pass the unit causing the harm into the [kill] tag so that `last breath` could use the secondary (killing) unit available like it does elsewhere.

Closes #2298
2017-12-19 15:05:24 -06:00
Jyrki Vesterinen
f064f50f1b [heal_unit]: Turn on floating text with animate=yes
I also moved the animation to be played *before* healing, which is the same
order as in C++ code. In the previous order, the animation isn't played for
some reason.

Fixes #2295.
2017-12-18 23:28:45 +02:00
Jyrki Vesterinen
d80d47eb8a [heal_unit]: fix wrong value of "hits" parameter
Only "hit", "miss" and "kill" are allowed.
2017-12-18 22:04:35 +02:00
Gregory A Lundberg
0353242315
DiD S07: Fix Taylor talks to himself
Use an alternate message if the unit spotting us is General Taylor.
2017-12-17 15:24:31 -06:00
jostephd
f76420ba2a Translate damage types in the unit_preview_pane tooltip. (#2296)
Use translations from the "wesnoth" domain because the damage type
strings ("pierce", etc.) aren't available in the "wesnoth-lib"
domain.
2017-12-16 23:28:20 -05:00
Charles Dang
a8663601ef Wesnothd: move some function declarations to more logical places
send_to_players was only used in the game class implementation. The other two functions were
used in both server.cpp and game.cpp, so it made sense to be declared in server.hpp.

For some damn reason, I needed to specify `game::error` in the global namespace to get this
to build now. No idea why.
2017-12-17 14:18:04 +11:00
mattsc
ddc4334143 Update Xcode project 2017-12-16 07:34:28 -08:00
Jyrki Vesterinen
a1fe596cff Fix #2273: map labels aren't drawn in the editor
It was caused by two independent bugs. Fixing either would have made the
map labels to show up: I fixed both.

First, map_labels::visible_global_label() is intended to check whether any
label from the player's team is shown in a certain position, in order to
check if a global label in the same position can be shown. In the editor,
the "team name" is the empty string - the same as the "team name" for
global labels. As a result, all global labels were considered to be in the
player's team, and therefore every global label was suppressed in favor of
itself.

That wouldn't have been a problem on its own, however. Commit 2fb13f89daa25c8443e537a3cbafb43bb4301b4f
added a check that makes all labels visible in the editor, before checking
if they overlap team labels. The problem was that the check wasn't working.
It's true that there are no teams in the map editor, but the same isn't
true in the scenario editor - and labels can only be placed in the scenario
editor.

I fixed the first problem by checking if there is a viewing team to begin
with, and the second problem by calling display::in_editor() instead of
checking the number of teams.
2017-12-16 17:12:00 +02:00
Charles Dang
ddd8d81d81 Revert "Wesnothd/Game: removed unused mp_game_title attribute from level data"
This reverts commit 252e77443333ba2b0e0b3abbf070ce507d8d33b6. Turns out the key is used
by replays.wesnoth.org and not the client. The name= key accessible otherwise is only
temporary data sent by the server, whereas this key is saved in the replay.
2017-12-15 23:42:07 +11:00
Charles Dang
8ad14255e1 Wesnothd: fixed outdated game list being erroneously sent to clients on game close
When a host canceled a game and returned to the lobby, they would see their just-closed game briefly
appear in the game list before disappearing again. Upon debugging, I found that the client was receiving
gamelist data that included the closed game. A game-was-deleted diff entry is still sent by cleanup_game.
2017-12-15 22:20:40 +11:00
Charles Dang
dd41080a99 Wesnothd/Game: code cleanup
* Range-for
* Auto
* Used simplified index-based for-loops over in-loop index calculation via ptr distance.
* Used shared_ptr::reset
2017-12-15 22:20:05 +11:00
Charles Dang
252e774433 Wesnothd/Game: removed unused mp_game_title attribute from level data 2017-12-15 22:20:05 +11:00
Charles Dang
3e33da7409 Wesnothd/Game: formatting cleanup 2017-12-15 22:20:04 +11:00
doofus-01
8473e49288
Giant Scorpion unit images (#2266)
NE and SE base/standing frames.  Defending and pincer-ing animations for both NE- and SE-facing frames.  Stinger animation for SE-facing frames.  Portrait replaced.
2017-12-14 19:48:43 -08:00
josteph
d7afadc94b
HttT: Fix OOS when redoing a recall and Li'sar is allied
For #2216.
2017-12-14 14:07:46 -06:00
Gregory A Lundberg
8aabad972a
Document grow_direction
Closes #2293
2017-12-14 13:28:36 -06:00
sigurdfdragon
2e27f05f80 DiD: Fixup MANOR_DOORS macro
Prevent an opened door from being opened again and causing a 'terrain
with a string with more than 4 characters has been found' error.
2017-12-13 22:51:51 -05:00
Charles Dang
ab2cfa0ac2 Fixup 002b1a3c871f (bad indent)
[ci skip]
2017-12-14 11:15:07 +11:00
Charles Dang
002b1a3c87 MP Staging/Join Game: unified player list handling and added player icons
Previously, MP Staging was using connect_engine::connected_users() to fill in the user list.
However, I noticed that the server was already sending the user list to all clients, including
the host, so I could unify the handling between Staging and Join Game by just using the server
data for both.

I've also added appropriate indicators for host, observer, and self in the list for both dialogs.
Additional host= and observer= status keys are sent by the server for that purpose.

I've also made the server dispatch the player list to the host when a game is created. This is
slightly redundant, since the host is the only player at that point, but it's easier than creating
a user config locally, or using connected_users(), not to mention easier to maintain.

The wesnothd::game::send_user_list function no longer exists early id `description_` is null.
No idea why it did that. It's not even used in the function. Anyway, it needed to be removed in
order for the above change to work.

Speaking of the host's copy of the player list, I haven't touched that. It's still needed for
managing things in the connect_engine. Might simplify things further in the future by delegating
more handling to the server, since it has a lot of the data needed already, but that's a different
project.
2017-12-14 11:12:49 +11:00
Celtic Minstrel
9c0b304a53
Fix #2281 (lua console formatting can be broken) (#2284) 2017-12-13 08:53:43 -05:00
Jyrki Vesterinen
01a81c2c6d Fix some GUI dialogs that don't fit on screen darkening on redraws
Clip_rect_setter was implemented incorrectly: it ignored the previous clip
rectangle and sometimes made the clip rectangle *larger* than it was
before. That allowed partially obscured widgets to draw to a larger screen
area than they were supposed to.

Fixes #1583, #1591, #2202.
2017-12-12 21:42:02 +02:00
Charles Dang
d2b53f5368 Removed some unnecessary boost includes 2017-12-12 20:10:33 +11:00
sigurdfdragon
1f4416e823 SotA S07: Stylistic fix due to terrain graphics change
Due to terrain Xuce change from hewn cavewall to minewall.
Restores original look. No gameplay changes.
2017-12-11 21:58:46 -05:00