72998 Commits

Author SHA1 Message Date
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
Gregory A Lundberg
2d0996982e Fix error: no previous declaration
No used outside the source file, so marked as a static function.

(cherry-picked from commit 616ae9b47285fd84c458efbe72df18c540a14a0e)
2018-10-07 03:24:38 +00:00
Gregory A Lundberg
cbeb882d60 Fix error: missing noexcept
GCC 8.2.0 -Wnoexcept flags two functions which should be marked as not throwing.

(cherry-picked from commit 3826c263b1ac203c5487c1a81000c3111bda263b)
2018-10-07 03:24:38 +00:00
mattsc
695fa69238 Micro AIs: simplify unit variable handling functions
The main reason for doing this, besides simplifying the code, is to avoid using the WML table dump __cfg, which is slow. This includes a change of the format in which the variables are stored, but since these are internal Micro AI utility functions, that does not matter.

(cherry-picked from commit 133568efe6851944f0b9ddaaf75ccaff0cad6a4d)
2018-10-07 03:24:38 +00:00
mattsc
b5c8c60ad0 Lua AIs: get unit cost/level directly from proxy unit
These used to be accessible only through unit.__cfg or wesnoth.unit_types.  The Fast Micro AI is not included here as it requires a larger clean-up.

(cherry-picked from commit 8af988c6972abe75e985d0e43bd8186fe4826cb6)
2018-10-07 03:24:37 +00:00
Jyrki Vesterinen
1166bfb485 Pofix: fix incorrect removal of a space
Thanks to @jostephd for pointing out that it shouldn't be removed.

[ci skip]

(cherry-picked from commit c59ae5204affcdc6f4e2ac68535c212ab0f46611)
2018-10-07 03:24:37 +00:00
jostephd
6800ccd95a Game Load: Show list of enabled modifications (#3495)
(cherry-picked from commit 6f670556a1c6fb01b1bfdf3650ad7a82e726a318)
2018-10-07 03:24:37 +00:00
mattsc
fbbbcfc67e Lua AIs: replace print() by std_print()
(cherry-picked from commit 3f54908b0ba69173442107105889caeb891b922d)
2018-10-07 03:24:36 +00:00
mattsc
98e5f0892e Lua AIs: remove unused debug output
(cherry-picked from commit 83c4ef24189c9986eae7535b10ba4babb921e3b8)
2018-10-07 03:24:36 +00:00
mattsc
5bc44fcc0d Messenger MAI Lua code: change proxy unit location directly
(cherry-picked from commit b3058e8e8eb119db883a1543143bd4523c93f239)
2018-10-07 03:24:36 +00:00
mattsc
25b2024ee8 Lua AIs: use unit methods instead of wesnoth functions
(cherry-picked from commit a6866390dfa64097fa4cb099b39736c3e2220ce4)
2018-10-07 03:24:36 +00:00
Jyrki Vesterinen
1ab3ec0464 Attempted build fix
(cherry-picked from commit 8f40b51a77ce3520d7fea560043efcf3974ad0b9)
2018-10-07 03:24:35 +00:00
jostephd
a3d9b7f11b Don't scroll to an enemy leader that has an effective [hides] ability (#3492)
(cherry-picked from commit 24cb784d4bc8f7910d015ff1753ab945a2be9dc9)
2018-10-07 03:24:35 +00:00
Severin Glöckner
f6e2a9f28f TSG S8a: add redraw calls
Recalling units may increase the vision area when playing with shroud/fog.

[ci skip]

(cherry-picked from commit 5f7b1853dd61154183ad4042bd4c41510943f4d9)
2018-10-07 03:24:35 +00:00
Severin Glöckner
260339ad64 TSG S7b: use 1.13 code and make it debug safe
The invulnerable status is player-visible and does not insert new events which
are checked at each attack.

[ci skip]

(cherry-picked from commit ddc763f3244f5fff731f61a26553566226494679)
2018-10-07 03:24:35 +00:00
Severin Glöckner
b1ab098935 TSG S6a: Mermen will leave afterwards
The text has already been prepared for this in 1.13

[ci skip]

(cherry-picked from commit f84d6808e9fa7a17a1065b2587e3fb8847df66b7)
2018-10-07 03:24:34 +00:00
Severin Glöckner
4ae3afb512 TSG 9a: gender handling
[ci skip]

(cherry-picked from commit 07c2125afc714f035edbbc877ec37e3c6e590468)
2018-10-07 03:24:34 +00:00
Severin Glöckner
c1b5edbed2 TSG S5: reformat comments, add translation hint
[ci skip]

(cherry-picked from commit c030249043e62d6a878a052a29037889ae0fcde1)
2018-10-07 03:24:34 +00:00
Severin Glöckner
6c37f2c056 TSG S2: add female strings for the units placed at start
On the other hand, all these units could as well use custom names.
[ci skip]

(cherry-picked from commit f04cdd3803d7381fb178b94f0a20a7d75cb16ce0)
2018-10-07 03:24:34 +00:00
Severin Glöckner
d3f791ae7a TSG S6a: may the queen be always female and have a more prominent ellipse
And remove one mention of Mebrin before meeting him in S7b.
[ci skip]

(cherry-picked from commit 18db086025a76cc700a542aa582a6d782466a011)
2018-10-07 03:24:33 +00:00
Severin Glöckner
21dfccf7bb TSG 5: ensure no additional event is triggered during allying
Ensure that allying with the bandits does not trigger the lich sighted event.
It's unlikely that the bandits advanced that far though.

[ci skip]

(cherry-picked from commit 657bf305f528016c0bc6b5218c3e18587fd792d3)
2018-10-07 03:24:33 +00:00
Severin Glöckner
b5f7e8b5aa TSG S4: minor optimizations
Made it impossible that the undead leader can advance to a lich - though you do
sth. badly wrong if he advances at all. Also, some more 1.13 syntactic sugar.

[ci skip]

(cherry-picked from commit a46d3f1eb394af158062690e9f3a98933f90e8d9)
2018-10-07 03:24:33 +00:00
Severin Glöckner
0ee46faf34 TSG S5: Beast of the Lake is now loyal
It shall not hinder the recruiting capabilities of side 3 if the player spawns
the monster.

[ci skip]

(cherry-picked from commit 63333c688e700de41cee571346142b7dd7d00ef6)
2018-10-07 03:24:33 +00:00
Severin Glöckner
e772f6ea37 TSG S7b & S8b: use undead encampments instead of ordinary ones
[ci skip]

(cherry-picked from commit 8960da0591bf5b5523800648e726f97d666ee1a7)
2018-10-07 03:24:32 +00:00
Severin Glöckner
89c5dace00 TSG: change inclusion of death events
That way less events need to be duplicated in scenarios.
It also does not include the full Hylas death event in S7a to S9a.
Previously the Jarek event was not present in one of the final scenarios,
now both include it, but the shorter variant of it.

[ci skip]

(cherry-picked from commit 29b4196556dbe401766f48d0f46faa6a9245d351)
2018-10-07 03:24:32 +00:00
Severin Glöckner
1eae58dbd8 TSG S4: add female name string
For some reason they never had one.
[ci skip]

(cherry-picked from commit 4fecc83f1762a3744bdb59e890566c8303b3474f)
2018-10-07 03:24:32 +00:00
Severin Glöckner
b0bd8a7851 TSG S4: Avoid submerging Rangers
If no suitable forest hex is found, the radius of the locations considered is
extended instead of placing the unit next to Ethiliel.

Also, a change of behaviour:
 * non-free hexes will not be considered
 * the bodyguards won't be placed adjacent to other units, like the ambush
 ability works normally
 * this includes Ethiliel
In general that means that units may be placed farther away than before.

[ci skip]

(cherry-picked from commit e43b3507fa18e79b6e2a4893f73b8c75160d7959)
2018-10-07 03:24:31 +00:00
Severin Glöckner
e8455cc0a5 TSG S5: Duo leader setup for the zombies
This adds on the one hand a second leader with secons keep in the same caslte.
for the same side, on the other hand ich changes the speack when they die.
They adverturers are not assuming they killed the undead masters anymore if they
saw the lich before.

(mentioned in #1954)

[ci skip]

(cherry-picked from commit f1a465b3779c0194613971fbbcae4fe43a69dd26)
2018-10-07 03:24:31 +00:00
Severin Glöckner
252fa8ccd3 TSG S8b: allow while mages to be loyal and have random gender
[ci skip]

(cherry-picked from commit 7c89b101b8606f5e16521e8482b5e48ff3da6ed5)
2018-10-07 03:24:31 +00:00
Severin Glöckner
fe0613b394 TSG S2: adjust AI settings
This follows the earlier commit which unified side 2 and 3.

In the first rounds the AI behaves like former side 3, later like side 2.

This is seemlessly possible, because side 3's AI settings were having practical
effect at the beginning of the game, and side 2's conflicing settings don't come
into action before the recruited troops met the ones of the player.

(bug #3032)

[ci skip]

(cherry-picked from commit ee09bc3b6309950c10ed8e0800952ce3c6cd6607)
2018-10-07 03:24:31 +00:00
Severin Glöckner
db9576670e TSG S7a: duplicate less WML
use monstrous event instead of monstrous macro

[ci skip]

(cherry-picked from commit 00574c0814a5acf4cb9c85115b150b84ce6536db)
2018-10-07 03:24:30 +00:00
Severin Glöckner
3435adc255 NR: use 1.13 syntax for finding suitable units for [role]
[ci skip]

(cherry-picked from commit 0dd48bf5818e11d7914cbd70a8fcfdf7ba8c51e2)
2018-10-07 03:24:30 +00:00
Severin Glöckner
f993caaa04 TSG S7a-S9a: prepare to let Hylas die
(FR #3316)

This includes changing when the overlays and ellipses for the hero units are
changed, and for better testing part of the event is split into a victory event
in S6a.

[ci skip]

(cherry-picked from commit b681ad8cd98d4ee3168257ee6116a2ac513f28ab)
2018-10-07 03:24:30 +00:00
Severin Glöckner
3f36501511 TSG S2: fix issues with killing the bandit leader first
- The peasants told Deoran to go for the already defeated bandit leader.
- The pesants were useless at that time - they are now instead spawned when
  defeating the bandit leader or when Deoran arrives, whatever happens first.
  They may still have a fight with remaining bandits – or provoke their attack.
- The dialogue when reaching the citadel after having defeated the bandits got a
  slight change, to better switch to the victory dance event.

(issue #1954)

[ci skip]

(cherry-picked from commit 0c5467c28a3ca2e6be2bd2cb72e5c9266d91a3d4)
2018-10-07 03:24:30 +00:00
Severin Glöckner
c1bdccc010 TSG S2: avoid the possibility of the AI neutralizing villages...
...which it neither burns or captures.
The AI has two sides which are presented as one to the player. It's not the best
approach, because it is possible that the player realizes it looking at the side
informations, e.g. how many units the enemy side has listed there.

This commit unifies both sides, while still keeping the units from formerly side
3 being unable to burn villages, but, as now being in a side with a leader, they
can capture them.

An advantage of having two sides was, that the units could have different AI
settings, and that the leaderless side was not interrested in villages.
The AI settings will be adressed in a seperate commit.

(bug #3032)

[ci skip]

(cherry-picked from commit d749005d21d3407a6bd1aff991df4ae3d0372d80)
2018-10-07 03:24:29 +00:00
Severin Glöckner
4e91a6dbeb TSG S3: support debug mode :n and :cl
[ci skip]

(cherry-picked from commit bbc31e623b38ec719b0c672deff8a2345f3571d1)
2018-10-07 03:24:29 +00:00
Severin Glöckner
b6616ffd2f TSG S3: change side switch procedure for Ethiliel
Ethiliel remains on side 3, but a copy of her is added to the player's recall
list for next scenario. The loyal trait is obtained at that point.

[ci skip]

(cherry-picked from commit 101cb21a95836f9d96a511336c9a759bea850887)
2018-10-07 03:24:29 +00:00
Severin Glöckner
90776d8efe TSG S3: Don't kill the elves at the end
This is a relict from when they had not their own side, and needed to be killed
to not be added to the recall list.

[ci skip]

(cherry-picked from commit baec30bb0c606f73826dace5ea771dc4c85ddf27)
2018-10-07 03:24:29 +00:00
Severin Glöckner
d99e659856 TSG: S8b don't show the objectives when the mages arrive again
This is one of the few cases where it is not only a refactoring, but has
an actual advanatge to use [show_if] - the note can be removed from the
objectives witout showing them to the player.

[ci skip]

(cherry-picked from commit 844e56b8e0dc5d241f5ab640db4bf44ef2958e66)
2018-10-07 03:24:28 +00:00
Severin Glöckner
f25243f0a3 DiD utils: use 1.13 syntax
It's now possible to have this logic as part of [role]

[ci skip]

(cherry-picked from commit 440efd25600245ce5a69561312494ff2cdd8332b)
2018-10-07 03:24:28 +00:00
Severin Glöckner
b6c7dd1635 NR S02a: restrict movement by costs instead moves
because it is not obviously shown in the sidebar

[ci skip]

(cherry-picked from commit 4e11d419b55a1be21e467925301cdd1820f983fd)
2018-10-07 03:24:28 +00:00