72786 Commits

Author SHA1 Message Date
gfgtdf
fabdf38a9e don't use std::pair
instead we use a custom struct. std::pair is bad becasue you never know
what "first" or "second" mean.

(cherry-picked from commit c4aacbe31f31799861e03f4b7f7b241bee64aa65)
2018-10-07 03:23:54 +00:00
gfgtdf
e3b4e1d911 fix attacks beein wrongly disabled
as said in the comment, that get_special_bool might return the wrong value, as since 5f58cd7c6d the bc_vector no longer contains disabled attacks we can just remove this code.

fixes #3324

(cherry-picked from commit 44734570dd1824a098252d78dafc0f5a561c13cf)
2018-10-07 03:23:53 +00:00
gfgtdf
7ecf55b6ed ignore [delay] during preload,prestart and initial lua.
as the ingame ui is not shown yet, [delay] would only result in showing a black screen,

Also in the case of initial lua it might result in crashes because of the threaded loadingscren, or simply because parts of the ui are not initialized yet.

(cherry-picked from commit 97b561269101e5e6d1637d00b44363fc6a1728fd)
2018-10-07 03:23:53 +00:00
Iris Morelle
768f400516 pofix: 1.14 announcement rules for 1.14.4
Also fixes a mistake from the 1.14.3 rules that caused "xxx MiB" to be
replaced with "xxx MB MiB" for all platforms. Oops. Nobody noticed
anyway (?).

[ci skip]

(cherry-picked from commit 12a3b973b9f357d0b1685df5b29fbcea0fefc7be)
2018-10-07 03:23:53 +00:00
Severin Glöckner
eeab6dc5f6 THoT S6: minor changes for difficulty and map
Uses an Orcish castle instead of destroyes human. Troll would maybe fit best,
but it doesn't fit well with the surrounding. Has now only 2 castle hexes.

On easy difficulty, reduced turns by two, it should be enought turns.
Also added one more enemy, as there are less wolves spawned on easy.
And income for Gryphons once again increased by 1, they are very expensive.

Reminding events have been adjusted to turns.

[ci skip]

(cherry-picked from commit c2064827e4d65d819ee258ec40ef54b0c8875590)
2018-10-07 03:23:52 +00:00
Severin Glöckner
22fca78978 THoT S6: Let the AI avoid the mage's hut
Until he is found. This also means one less villages for side 2, increased
their income thatfor,

[ci skip]

(cherry-picked from commit 390d66fda1f55f0b08b3ad950c7e96b38bb35994)
2018-10-07 03:23:52 +00:00
josteph
67269b00e7 THoT S6: Now that the player is told which hut to look at, don't trigger Ratheln if the player ignores the hint.
Suggested by @sevu.

(cherry-picked from commit 92bb1c263b5c42e4e4e50e77f842531d85deaec4)
2018-10-07 03:23:52 +00:00
sigurdfdragon
2dc3b198c9 Update changelog
(cherry-picked from commit c2cf0288fc3e5361e16407c5c5abcdbe2a3711a4)
2018-10-07 03:23:52 +00:00
sigurdfdragon
17011677da SotA S21: Slight touchups
Only recruit level 2 to match what nagas arrive with.

(cherry-picked from commit 46cc9a528919df08d08f6df86c3d11a4545377ed)
2018-10-07 03:23:51 +00:00
sigurdfdragon
45078c4d53 SotA S21: Fix #3294 properly
It is the Saurians that have their males killed in S11, so the females
take revenge.

(cherry-picked from commit 32a630bd3f9a7fe30a0799d7039f37db8155382a)
2018-10-07 03:23:51 +00:00
sigurdfdragon
b51cb07d2a Revert "SotA S11 & 21: Fix #3294"
This reverts commit a4bad90bad379feb77e17a4d8ab6cda1dc05e3cc.

It is supposed to be the male Saurians that get killed in S11, and the
females seek revenge in S21.

(cherry-picked from commit 7ced35839b83979b36f3d4236333667ee02d04ea)
2018-10-07 03:23:51 +00:00
josteph
a39fe689cb THoT S6: Let a Scout be the first to smell Ratheln's cooking.
[ci skip]

(cherry-picked from commit f0ed45bde93aa040ac2031b5955d2b68c49e1cb6)
2018-10-07 03:23:51 +00:00
Jyrki Vesterinen
52fbbc2b40 WML unit tests: port ability to override strict mode from 1.14
The ability isn't needed in master because none of the unit tests call
deprecated functions here, but it may be useful in the future or make
cherry-picking of future changes easier.

(cherry-picked from commit 74d8cfa98e0f61ee22a536fc06c2019c9c89aede)
2018-10-07 03:23:50 +00:00
Jyrki Vesterinen
8a0dc8bdd9 Lua: delete loadstring()
Fixes the vulnerability introduced in commit 52ae31efb21b31f5bb0763d1da24709e90393c59.

(cherry-picked from commit 6450bada57f95af55c490f9d7601ef5e073cdaf1)
2018-10-07 03:23:50 +00:00
Jyrki Vesterinen
21999b1fc9 Extend the first CVE-2018-1999023 unit test to also try loadstring()
Like @gfgtdf pointed out, loadstring() is still supported by Lua in the
name of backwards compatibility, even though it was deprecated in Lua 5.2
and is no longer mentioned in Lua manual. Thus, as of committing this it's
actually possible to load Lua bytecode.

Let's unit test this to ensure that we don't reintroduce this
vulnerability.

(cherry-picked from commit aa73b836009ca98cade2d0dfca6b99cbf8d19e76)
2018-10-07 03:23:50 +00:00
DisherProject
912dfcc9e6 Liberty S8: Fix some event filters
(cherry-picked from commit d13c451afb544db67732adc0af269e764068bec6)
2018-10-07 03:23:50 +00:00
DisherProject
258f4e8faa Liberty S8: Remove unnecessary hidden side
Side 3 was composed by enemy reinforcements. Since they were
spawned on the right corner of the map, and since side 2
was blocked inside Halstead by and [avoid] tag, it was
necessary to add a new hidden side which could move freely
on the map.
If we upgrade the AI, removing the [avoid] tag, this hidden
side becomes unnecessary.

(cherry-picked from commit f32dfaa9170a998dbbacb54d73346cb67a32dd05)
2018-10-07 03:23:49 +00:00
DisherProject
d222aaf875 Liberty S8: General fix and cleanup to the AI goals
All sides will now head to the central fortress. Orcs
should now be a bit smarter, and they should not suicide
during the morning or the afternoon. The humans in Halstead
will initially remain inside their fortress, until the enemy
arrival.

(cherry-picked from commit e63a15fc913de1d51ea8caf4330409109e1b2f0f)
2018-10-07 03:23:49 +00:00
DisherProject
18c1b3f7fe Liberty S1-S7: Fire victory when enemies are defeated
Instead of checking whether there are no enemy units left
every time one of them dies, use the "enemies defeated"
event.

(cherry-picked from commit 4ced6c752630d7703c1b73290417add9abb7e19e)
2018-10-07 03:23:49 +00:00
DisherProject
8eebc4b202 Liberty S1: Filter event by condition instead of using an
if-then clause

(cherry-picked from commit cbe2bcef6b647a1cf4bba683f3c32a35b77d24e6)
2018-10-07 03:23:48 +00:00
DisherProject
f1192706a9 Liberty S5-S6: Replace deprecated keys
"share_maps" and "share_view" have been replaced in
favour of "share_vision"

(cherry-picked from commit ddf9949cffbd7cf18704c0af95e75ad412dd0499)
2018-10-07 03:23:48 +00:00
Iris Morelle
87c1ae6c3c UtBS: Improve Eloh's attack animation timings
Also remove a Kate modeline I didn't intend to push.

[ci skip]

(cherry-picked from commit 3b91481a0cba943812bb8c629217f266be5f4e05)
2018-10-07 03:23:48 +00:00
Iris Morelle
b02b3e5048 Sync 1.14 changelog
[ci skip]

(cherry-picked from commit c56e8aa69538f119bb89c5a1683770b165e75f5d)
2018-10-07 03:23:48 +00:00
Iris Morelle
3c5b6b4441 UtBS: New graphics for Eloh by me
There are two layers of halos and they are applied in a somewhat
convoluted fashion. I should probably explain why.

The bottom halo is designed so it's drawn *below* the main unit sprite
so as to not muddle the colours on it. Halos are normally drawn *on top*
of sprites.

The back halo is specifically masked so it's drawn behind the main unit
sprite without overlapping any of its pixels, but it's asymmetrical and
supposed to flip along with the unit sprite depending on the direction
it's facing. Halos do not do that currently, at least not without using
animation WML conditionals. Unfortunately, for some reason, using a
standing animation that's nothing but conditionals causes the game to
crash at the moment.

Taking all this into consideration, using the blit IPF is a much easier
mechanism to avoid both issues at once, even if it makes the code
slightly awkward.

If someone can think of an alternative method, they're more than welcome
to change the code as long as the sprite's composition remains exactly
the same as it is now. I'm just the artist in this case.

[ci skip]

(cherry-picked from commit 6e1a861bdab92edcd24c297aa97367dfcb6c0876)
2018-10-07 03:23:47 +00:00
josteph
679232374a THoT S10: Clarify objectives.
[ci skip]

(cherry-picked from commit a08b7c3ab36047050872a0e4797a4b280bd2d22e)
2018-10-07 03:23:47 +00:00
josteph
ece2f79e4b THoT S6: Rephrase Ratheln cue.
It didn't make sense for the dwarves to only notice "glowing" after night had ended.

[ci skip]

(cherry-picked from commit 5758c900e248baf3fc581e9932a2553d92120ac2)
2018-10-07 03:23:47 +00:00
Jyrki Vesterinen
945a386c25 check_utf8.sh: don't check the second Lua bytecode test scenario
This avoids the other file with binary data.

(cherry-picked from commit 212601deab6ba803db3e0b4ed8ee5d0cbc3f3018)
2018-10-07 03:23:47 +00:00
Jyrki Vesterinen
81d6970195 check_utf8.sh: don't check the Lua bytecode file
This avoids one of the two files which are currently causing macOS SCons
builds to fail in the master branch.

(cherry-picked from commit 8dc60ae98fa472d7a5fa124002f7b1a2f552e0f3)
2018-10-07 03:23:46 +00:00
loonycyborg
790d13e937 scons: fix strict hardened builds on Gentoo
(cherry-picked from commit 0c3ba36d68754acc2328fd704e1b8df17383e8cd)
2018-10-07 03:23:46 +00:00
Jyrki Vesterinen
eb36c60fba Lua: implement our own load() instead of monkey-patching Lua code
Monkey-patching has multiple problems. The biggest problem for a security
fix like this is that it's way too easy to forget to re-apply when we
update Lua to a newer version.

Instead, we now have the implementation of load() under our control and can
update Lua without risk of reintroducing CVE-2018-1999023.

(cherry-picked from commit 52ae31efb21b31f5bb0763d1da24709e90393c59)
2018-10-07 03:23:46 +00:00
gfgtdf
a414703946 wml test for cve-2018-1999023
this test whether we succesfully prevent the exceution and parsing of
precompiled lua chunks, which can be used to break the lua sandbox.
This test does not cover all affected functions in particular not the ai
code that loads lua chunks.

(cherry-picked from commit 6b13a63bb0999e1c494a4236a5d565306db5a0b9)
2018-10-07 03:23:46 +00:00
gfgtdf
120e8d9911 disallow loading lua bytecode via load/dofile (CVE-2018-1999023)
This could otherwise be used to escape the lua sandbox, as described in
multiple sources. For example one can use it to reenable the os.execute
function to do shell commands

The affected functions were
load,loadstring,wesnoth.dofile,wesnoth.require and various places in the
wesnoth source where lua chunks were loaded for example by the ai code.

This commit also changes the lua source to change luas load (which is
the same as loadstring), alternatively we could add a wrapper around the
original load function that always passes "t" as third parameter, i went
this way mostly because it was easier to implement, but also because i
was not 100% sure that is is impossible to query the upvalues of a
function via lua (wesnoth disables debug.getupvalue but still).

There is also an occurance in the application_lua_kernel that was not fixed
because i assumed that umc cannot contian application lua scipts.

As further security measure we might want to disable printing the function
adress in luas tostring for c functions, this cannot be exploited by itself
but it can be used to defeat ASLR in some cases.

(cherry-picked from commit 2554c166dd45bfdee8ee24431224bd25e52bab12)
2018-10-07 03:23:45 +00:00
ln-zookeeper
8668050971 Updated snowy hut tile icons
(cherry-picked from commit 386493790e1df329a7b98f384ee00366f3625ff1)
2018-10-07 03:23:45 +00:00
doofus-01
2d7654160f Additional village variations (#3342)
* revised and additional snowed hut villages, with night-light TOD variations

* remove spaces to keep column alignment

(cherry-picked from commit 9042b0beb75e637b786a659eb674cccc6d92be28)
2018-10-07 03:23:45 +00:00
Jyrki Vesterinen
34b3775d4c Fix: we negate an unsigned integer
Negating an unsigned integer still returns an unsigned value
(in other words, always positive) which isn't what we want.

(cherry-picked from commit e961cc08993bb2b796891530d084da73ec212351)
2018-10-07 03:23:44 +00:00
jostephd
5e7bf8fe0f Fix sorting of units by level in Recall List and Unit List (#3370)
Now the triangle points down when the list is sorted by level descending.

(cherry-picked from commit 6e31c83c644b7265d68b999f9a5c763a03aee501)
2018-10-07 03:23:44 +00:00
joeylmaalouf
14a1ce2cbd updated contributors list
(cherry-picked from commit 96d8ee06b0faafde217124ea26ee660d3f459a07)
2018-10-07 03:23:44 +00:00
joeylmaalouf
009f8c0cf3 Tutorial: standardize Menu references
(cherry-picked from commit 05c6e397ba87b249efde322532f5049367d27155)
2018-10-07 03:23:44 +00:00
joeylmaalouf
7eaa5666e9 Tutorial: provide more detail about the Status Table
(cherry-picked from commit 9240d6d23d79394a68a4276b319f0f669a4ea5f9)
2018-10-07 03:23:43 +00:00
sigurdfdragon
a4831c75ae DM: Add last breath dialog for Zorlan
(cherry-picked from commit ee798121e4b4954402acb441e80e792c1763f95e)
2018-10-07 03:23:43 +00:00
sigurdfdragon
06f2411c94 DM: Generalize death message so it works when Delfador is young and old
(cherry-picked from commit 3cfa413cbcf0f4f5307ab05d008b4649ad7d933f)
2018-10-07 03:23:43 +00:00
ProditorMagnus
b1c5004465 Make /q sl and status case insensitive
(cherry-picked from commit 625f18ab2e5d98765fd2b669da9f9697d331ab5d)
2018-10-07 03:23:43 +00:00
Toom
075cfc54db Show "failed to fit" message with single timestamp (#3367)
Before:

20180724 17:21:37 error gui/layout: Failed to fit vertical list to requested rect; expected bottom edge was 277
20180724 17:21:37 error gui/layout: , actual bottom edge was 195
20180724 17:21:37 error gui/layout:  (top edge is 113)

After:

20180724 17:34:30 error gui/layout: Failed to fit vertical list to requested rect; expected bottom edge was 277, actual bottom edge was 195 (top edge is 113)

(cherry-picked from commit aab10daac44a3883e368ff457764d0659c69c39f)
2018-10-07 03:23:42 +00:00
Nils Kneuper
e67f464e66 updated British English translation
(cherry-picked from commit 36ecc030a6c7eb88c3e11f1cb274518125b14262)
2018-10-07 03:23:42 +00:00
Toom
0682be84e6 Fix 4801629ab1b265028c7b05c7bf7f7cd204990c1c typos
[ci skip]

(cherry-picked from commit c0727bacf3df30bd235b2048a3b8f9c2ab7cc9b8)
2018-10-07 03:23:42 +00:00
gfgtdf
09522ccdf8 fixup update changelog.md
(cherry-picked from commit b684c8b3aac75b986b016ce4e04ecfcc62e9bb31)
2018-10-07 03:23:41 +00:00
gfgtdf
2f7568d432 Update changelog.md
(cherry-picked from commit 4801629ab1b265028c7b05c7bf7f7cd204990c1c)
2018-10-07 03:23:41 +00:00
Jyrki Vesterinen
f245cd6285 Create a named struct for terrain name and movement pair
This allows the sorting logic top be shared between the sidebar and the
unit preview pane. It also means that we no longer need to create a lambda
to sort them.

I also refactored the generation of movement cost data in help. In
particular, we're no longer extracting the struct to named local variables.

(cherry-picked from commit d8e2498dded14e9df5abcd5e20ac8c8c252dca3a)
2018-10-07 03:23:41 +00:00
lilinitsy
a380ba8231 Sort the movement costs in the tooltip in ascending order (#3305)
Sort movement costs in tooltip, unit preview pane, and unit description alphabetically.

(cherry-picked from commit 61b7e7298b99e11746501e435e6301c7360e2d1c)
2018-10-07 03:23:41 +00:00
Jyrki Vesterinen
f05bcb7b61 Changelog: fix issue #3277 being mistyped as 3722
(cherry-picked from commit aea5d67f93f1924a4a1520e10e05c117bf892596)
2018-10-07 03:23:40 +00:00