72888 Commits

Author SHA1 Message Date
Severin Glöckner
b044b289e5 Add keywords to the desktop file
They are as well used in the software centre.
Having keywords is a bonus, even if they are not matched.

[ci skip]

(cherry-picked from commit 76e7c8d19f8626dca5edd33b8c66ef3a0385f93f)
2018-10-07 03:24:52 +00:00
Severin Glöckner
56130d1e0a Appdata: change license identifier
former one is valid but deprecated

[ci skip]

(cherry-picked from commit d133b510c97cbb1d6b070c27700e3cfd03ada1c2)
2018-10-07 03:24:52 +00:00
gfgtdf
98e760d60c fix crash in ai code when a side has multiple leaders
see https://github.com/wesnoth/wesnoth/issues/3240

Just fixing the crash, not sure how the code should behave in this case, it would be nice if someone who knows more about the ai code would either implement that todo or remove the second warning. An alternative fix would be to move the 'calculate_moves' inside the ai_leaders loop.

(cherry-picked from commit 18526e499a082d849295f0db93cdc9b5ea223df7)
2018-10-07 03:24:52 +00:00
mattsc
9e5ec5f060 Experimental AI: rename config file
This stopped being a rush AI long ago.

(cherry-picked from commit ec45b53fe29d00d25204f67a8c1ea95c86f01d9e)
2018-10-07 03:24:51 +00:00
mattsc
4999b20bd1 Experimental AI: adjustments to candidate action scores
The relative ranking of the CA scores is not changed, except for one case when two CAs had the same score.

Reasons:
- All scores should be lower than the scores of the default Goto CA (200,000) and the default scores of most Micro AIs (300,000).
- Break tie, resulting in uncertain order of execution, of place_healers and retreat_injured CA. Healers should be placed first, to allow retreating injured units to adjacent hexes.
- Set default for generic_recruit_engine to slightly above default AI recruiting score. That way it takes effect even if the default CA is not removed.
- Increase move_to_any_enemy CA score from 1 to 1,000. It is still the lowest score that way, but allows for setting up custom CAs with even lower scores (even if it is just for end-of-turn statistics or the like).

(cherry-picked from commit 35ba82050954c2cee86321e05d6706993c08e143)
2018-10-07 03:24:51 +00:00
Severin Glöckner
d40aa8406c Desktop file: start from a shell
output redirection is only possible when starting from a shell

[ci skip]

(cherry-picked from commit a46c6edd5a945082a07722a50f79679d427cfacd)
2018-10-07 03:24:51 +00:00
mattsc
e78237c2a9 recruit_rushers CA: don't reserve village for passive leader
(cherry-picked from commit b92d8e822639a90ca8bbfeaf8dea606e7cf4c8f2)
2018-10-07 03:24:51 +00:00
mattsc
aea3a4f7cb recruit_rushers CA: check if castle_switch CA is present
So that it is possible to use the recruit_rushers CA without the castle_switch CA.

(cherry-picked from commit 0bcb98cf5026710871d8b90919752c90808c56d0)
2018-10-07 03:24:50 +00:00
Severin Glöckner
89c633fdaa DM S21: use type_adv_tree
the one usage of type is left deliberately, to point out that it affects 3
instad of 2 or 4 types.

[ci skip]

(cherry-picked from commit ce056894dab0285fb7596deb69445a1184a9cd19)
2018-10-07 03:24:50 +00:00
Severin Glöckner
a7b8191214 NR deaths: use one event for both lich brothers
They text is the same, whoever of them dies

[ci skip]

(cherry-picked from commit 2e7d9015172d32935b6d658eb6d7c4593da1beb7)
2018-10-07 03:24:50 +00:00
Severin Glöckner
3265026db8 NR S12: hide empty sides
There has been a report that some scenario would be nearly unbeatable if they
are empty in the first place, so this has the side effect of not showing the
player that he misses something. (Nevertheless, they should be hidden)

[ci skip]

(cherry-picked from commit 47c3947d0aa651fd32545d6292d5cfed9fd02864)
2018-10-07 03:24:49 +00:00
Severin Glöckner
8f087902d8 NR S13: slight bonus for AI controlled sides:
- allied AI leaders, whose death causes defeat, use passive_leader=yes
- increased amount of money which the lich brothers have, if one has not the
alternative leaders who can recall units
- also increased Krash's gold to the same amount of as Eryssa has (they are the
alternative leaders)

[ci skip]

(cherry-picked from commit 79993ea601f34d07aa7f26251bc87b52da4338de)
2018-10-07 03:24:49 +00:00
joeylmaalouf
b96ff34df4 Allow ties to be reported as such in the turns_over_advantage calculation (fixes #1341)
(cherry-picked from commit 3d481c1b8b918a4b3914465679c98d4a3c9dbd28)
2018-10-07 03:24:49 +00:00
mattsc
c52ce11e49 Lua AIs: replace tabs with spaces
(cherry-picked from commit 45a3bf93636fb7b34b27a3411784d0484eeb18d6)
2018-10-07 03:24:49 +00:00
mattsc
ed406495d7 Lua AIs: do not use engine's 'data' variable unless necessary
Now that all the AIs use external CAs, there is no need to use the persistent 'data' variable any more, unless information is to be exchanged between different CAs or is supposed to be persistent across save/load cycles.

(cherry-picked from commit 3bfd59f28ba7f70a6ac32782e98cba9ca6c2a44a)
2018-10-07 03:24:48 +00:00
Martin Hrubý (hrubymar10)
740bd456ab Fix bug in Fix_Xcode_Dependencies
(cherry-picked from commit 6b5edeb9a85cb72b7aebc1f6a8f3d1c9366a92b5)
2018-10-07 03:24:48 +00:00
mattsc
b47d6e3bdb Protect Unit MAI: remove unused configuration variables
They cannot be set for the MAI, and they would have to be set through 'cfg' not 'data' anyway.

(cherry-picked from commit 62625fd5e2821472181c53932ffe7f6b264373c5)
2018-10-07 03:24:48 +00:00
DisherProject
8b627d4391 AOI: General AI rewrite
Removes all the default values and improves the syntax where
possible

(cherry-picked from commit 9086e17b1565e8866b2d42eb53fd101cece506e1)
2018-10-07 03:24:48 +00:00
DisherProject
b9f0cd174d AOI S2: Prefer "id" to "speaker" in non-[message]'s SUFs
(cherry-picked from commit 240d2350592a4bd1ea69e5ccea97c39d827f34f7)
2018-10-07 03:24:47 +00:00
DisherProject
6dd55e46b0 AOI S3: Clear all enemies on victory
... for consistency with the previous message stating that
all orcs are killed by the elves.

(cherry-picked from commit 34f417c4eb488966a779bcfa9a0e32f933d3960e)
2018-10-07 03:24:47 +00:00
DisherProject
fdfdb0a200 EI S13: Rewrite dragon's AI
Most part of the old AI had no evident effect: the dragon just
moved here and there without attacking you, and since he flied
over shallow water, it was impossible to chase him. The micro
ai makes Khrakhras wander around and attack you when you
approach his castle.

(cherry-picked from commit 64917b70b5eb484ed132df2b43ca26b3af47a690)
2018-10-07 03:24:47 +00:00
DisherProject
3c1dd4d555 EI S12-S16: Split objectives into main and alternative ones
Also adds a new objective in S16, which was not stated but
actually makes you win.

(cherry-picked from commit 50e4cc5d3fddc7f7d47c9437b3133567aa0e3dde)
2018-10-07 03:24:47 +00:00
DisherProject
ba22ab7a73 EI S8: Fix event not being fired
The second event took as filtered unit an ogre that has reached
the border of the map. Unfortunately, he was removed by the map
before such event was fired, causing it to never happen.

(cherry-picked from commit 643f1336dd92982850b4f61b9af6ce2d6a8c5d77)
2018-10-07 03:24:46 +00:00
DisherProject
71c3a565db EI: Remove old TODO and add a new one
(cherry-picked from commit e07819619c73e63dd5986dedb0cda4d971a09ad6)
2018-10-07 03:24:46 +00:00
Iris Morelle
dce867921c gui2/unit_create: Allow searching by race name as well
(cherry-picked from commit b7c7fca8b10003d7d6445710a51ed0f740e9425c)
2018-10-07 03:24:46 +00:00
Iris Morelle
7fe7047ba9 gui2/unit_create: Fix segfault on empty list when updating unit preview
This happens when the list comes up empty because of a non-matching
filter, e.g. "Elvish Archer222" and the user clicks on one of the gender
options in this state.

Ideally we should clear the preview pane and disable the options and OK
button here, but the former appears impossible and for some reason
changing the pane's visibility in filter_text_changed() doesn't work
reliably.

(cherry-picked from commit 26629d4a621b74e90513842db577d5bd03a415de)
2018-10-07 03:24:46 +00:00
mattsc
2b6b1ed4fe Lua AIs: avoid calling wesnoth.get_terrain() more than needed
It probably doen't make a noticeable difference for these AIs, but in general we should not call the slow functions more than necessary.

(cherry-picked from commit 42b443084125ab7a989465e5f7f19835a17ba85b)
2018-10-07 03:24:45 +00:00
josteph
8965939939 Liberty S8: Fix family reference
According to po comments in S1, Baldras is Harper's mother's brother.

Also change "mom"/"dad" to "mother"/"father" to match the general
medieval setting of dialogs.

(cherry-picked from commit bcb6153b89edafc15453358b5754f6e34f39b830)
2018-10-07 03:24:45 +00:00
josteph
e32e6d62d1 Liberty S8: Fix ambiguous pronoun
(cherry-picked from commit 4c612400cf51c4881c01101f9f5e555c50eb8462)
2018-10-07 03:24:45 +00:00
mattsc
800947594c Experimental AI: convert to using external CAs
(cherry-picked from commit 547478571871ffe59c5cf7ff59339a72a61c07dc)
2018-10-07 03:24:44 +00:00
Nils Kneuper
21c2e5933b updated Chinese (Traditional) translation
(cherry-picked from commit 2436d700f2f4349f002ea385604e5aa89bf32b54)
2018-10-07 03:24:44 +00:00
Nils Kneuper
251d3e633e updated Ukrainian translation
(cherry-picked from commit ff861673a4e823ca00d54e0e2f4dd87a615c4709)
2018-10-07 03:24:44 +00:00
mattsc
59c7162b51 Experimental AI: fix eval/exec debug output
This involves making the output independent of the stats CA (which is not used any more) and adding missing output to some CAs.

(cherry-picked from commit c2635abde1c6eea8bb74019ab78c61bddb219fff)
2018-10-07 03:24:43 +00:00
mattsc
98b8023072 AToTB S2: rename custom AI file
For consistency with the other mainline campaigns

(cherry-picked from commit 1040dbe5c9e58ce2ac592b126e0b4b9b033f722c)
2018-10-07 03:24:43 +00:00
mattsc
8799772621 Lua AIs: don't compare variables with nil
... unless there is a difference between nil and false. Done mostly for consistency with all the other uses.

(cherry-picked from commit 35d257f8fd35fad70539dfdc57da69e38bc10536)
2018-10-07 03:24:43 +00:00
mattsc
e68a6eaba0 Lua AIs: don't initiate variables as empty tables
... if they might not be needed.

(cherry-picked from commit a23f06dc2052ece4d6de9fc1d80008f82761be4f)
2018-10-07 03:24:42 +00:00
gfgtdf
7067402209 put [resource] before other content; 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.

(cherry-picked from commit 1ac635ec63e775dcd1aa90d04b9adf3f061ef476)
2018-10-07 03:24:42 +00:00
gfgtdf
8e77bae5af fixup "fix oos when undoing after ally chat"
this also caused errors later when saving replays because the server would concatinate all [turn] leading to dublicate undo=no attributes.

(cherry-picked from commit 144e8a1f8d13a023261f32ff251b756eb1730845)
2018-10-07 03:24:42 +00:00
josteph
7ea5bd4350 Liberty S3: Play orcish war drums
(cherry-picked from commit 8fd1b822dbddf5eb363da20ad878a63383405e6b)
2018-10-07 03:24:42 +00:00
josteph
1ca80da763 Fix various typos.
AOI S3: Address Erlornas as "lord" in lowercase as done elsewhere in the
scenario.

(cherry-picked from commit 6a1b59327e776ba187609501bf29de0b4a745fd7)
2018-10-07 03:24:41 +00:00
josteph
e09a765a1c Liberty S3: Add a story part
(cherry-picked from commit e2c591edbda28a3318ace5efb37f4f93463c3e5b)
2018-10-07 03:24:41 +00:00
josteph
5301d0714a Lua Console: Print an error message when not opening the console because :debug hasn't been run.
(cherry-picked from commit 012142a3c63746fbbfd56292f894fe39fc519fb8)
2018-10-07 03:24:41 +00:00
mattsc
f761493c75 Lua AIs: no need to set variables to nil explicitely
This is mostly done for consistency across the Lua AI code

(cherry-picked from commit 0e7c09f7b549bb43aec248bad04fcf0bffef17d5)
2018-10-07 03:24:40 +00:00
mattsc
3c558c7360 Herding Micro AI: fix variabls not being local
(cherry-picked from commit 80ae232935f2bbe5d0eb97c5a15136f8dc625068)
2018-10-07 03:24:40 +00:00
mattsc
37e83f1262 Lua AIs: use math.huge to initialize extrema variables
(cherry-picked from commit cb423b2fbd40fdf5e14549a301fee06237bf4626)
2018-10-07 03:24:40 +00:00
mattsc
613ccd859a Fast Micro AI: code cleanup
Most of the Fast MAI attack utils had been taken from a more general codebase and included things not needed here. This AI is supposed to be a slimmed down version doing only the absolutely necessary in as fast as possible a fashion.

(cherry-picked from commit f4f2a441e41cea635861630eb555af9f510c9b52)
2018-10-07 03:24:40 +00:00
mattsc
02c830a6df Lua AIs: remove another unused library inclusion
(cherry-picked from commit 1680436f729a42ede1bd2e1898ef4583c36b14d3)
2018-10-07 03:24:39 +00:00
mattsc
08825afce5 Lua AIs: remove inclusions of unused libraries
(cherry-picked from commit 8a996c55b968b14b04a551db46b7ab3de735696f)
2018-10-07 03:24:39 +00:00
mattsc
6ad4c7e42d Lua AI utility functions: fix for chance-to-hit specials without id
All mainline chance-to-hit weapon specials have ids, but it is not required for UMC specials.

(cherry-picked from commit 5335a2af335ffdce65097e26359e96a0cbe2c733)
2018-10-07 03:24:39 +00:00
mattsc
3906d78abd Lua AIs: avoid using __cfg for accessing weapon specials
(cherry-picked from commit aa59ac54557bc24615cb3f990bcd1dbf6f5d1ea9)
2018-10-07 03:24:39 +00:00