Compare commits

...
Sign in to create a new pull request.

983 commits

Author SHA1 Message Date
Celtic Minstrel
2d07f3ea39 Add get_team() function to get a team_callable from gamestate formulas 2018-06-16 20:26:36 -04:00
Celtic Minstrel
d6c9b67e89 Fix WFL unit.side returning one less than the actual side 2018-06-16 17:00:39 -04:00
Pentarctagon
ca00829199 Fixup hardening options for Windows. 2018-06-16 13:19:53 -05:00
doofus-01
2be0ff9401 UtBS S08: mostly cosmetic changes to map 2018-06-17 00:29:53 +11:00
doofus-01
ebef8592d2 UtBS S06b and S07b: cosmetic changes to maps, to make them more fitting with dialogs 2018-06-17 00:29:52 +11:00
doofus-01
729a349973 UtBS S06b: make sure dwarf sergeant is facing the right way in comic-relief dialog 2018-06-17 00:29:52 +11:00
doofus-01
e071f5a8da change sun-sylph halo to be warmer, sunny color, instead of clean, holy color 2018-06-17 00:29:52 +11:00
doofus-01
a908fc9d6f slight tweak to Kalehs base sprite 2018-06-17 00:29:51 +11:00
doofus-01
bd42298f5b UtBS S05: replace troll camps with actual troll camps instead of orc castles 2018-06-17 00:29:51 +11:00
doofus-01
f7c6bb40e3 UtBS S04 and S05: some variations in scenery items 2018-06-17 00:29:40 +11:00
Nils Kneuper
7f18e4d3e6 updated Slovak translation 2018-06-16 11:15:49 +02:00
Charles Dang
2beab91bd2 Select Orb Colors: cleaned up dialog implementation
Also fixes #2958 in the process since the entire setup process isn't repeated
when resetting selections.
2018-06-16 19:57:18 +11:00
Charles Dang
73627767db GUI2/Multimenu Button: fixed maximum_shown defaulting to 0 instead of 1
Fixes the campaign selection dialog's modification dropdown saying "1 other" for
the first mod you select.
2018-06-16 15:22:53 +11:00
Charles Dang
b17ade9f9c GUI2/Multimenu Button: store max shown count as an unsigned int
A negative count here makes no sense...
2018-06-16 15:22:52 +11:00
Charles Dang
ec0499221a Cleaned up two emplace_back calls 2018-06-16 15:21:55 +11:00
Charles Dang
16d254f131 GUI2/Menu Button: store selected index as an unsigned int
Also initialized it to 0 in the ctor instead of relying on that being set
via set_values().
2018-06-16 15:21:54 +11:00
Charles Dang
b0d0dd3cb5 Fixup unused parameter 2018-06-16 15:21:14 +11:00
Charles Dang
12671fa715 Faction Select: fixed changes persisting even if you cancel the dialog 2018-06-16 14:04:49 +11:00
Charles Dang
8d6d3ec8f3 Faction Select: declared an execute() helper 2018-06-16 14:04:48 +11:00
Charles Dang
880152e9f0 GUI2/Menu Button: allow changing selections with the scrollwheel (closes #3251)'
The changelog entry is under 1.14.3+dev since this is going to be backported.
2018-06-16 14:04:48 +11:00
Charles Dang
d5233620e4 GUI2/Menu Button: changed callbacks to NOTIFY_MODIFIED ones
menu_button doesn't even actually inherit from clickable_item. The only reason
[dis]connect_click_handler was declared in this class is the original implementation
was copied extensively from the Button widget.

Using NOTIFY_MODIFIED also means callbacks can fire if set_value/set_selected is used
on a menu_button.

The [dis]connect_click_handler functions were also removed from multimenu_button. All
callbacks for this widget type already used NOTIFY_MODIFIED signals.
2018-06-16 14:04:47 +11:00
Charles Dang
8a26ab093b GUI2/[Multi]Menu Button: removed retval handling
Retvals are only relevant for widgets that are supposed to trigger something
like a window closure, and that makes sense for neither of these widgets. The
only reason the Menu Button widget has it is its original implementation was
largely copied from the Button widget, and the Multimenu Button widget copied
from the Menu Button widget.
2018-06-16 14:04:46 +11:00
Charles Dang
7110076926 GUI2: added a bunch of missing virtual specifiers 2018-06-16 14:04:45 +11:00
Severin Glöckner
36bf101be0 German Translation – TSG touchups
[ci skip]g
2018-06-16 01:31:39 +02:00
Steve Cotton
eba32fd8da DW: Change the team name from Merman Forces to Merfolk 2018-06-15 21:01:28 +02:00
Steve Cotton
9a6b07f3b0 Dead Water: Change "mermen" to "merfolk" (part of #2940)
This commit excludes changes to S05 Tirigaz, I think changing the dialogue
there is going to be more complicated, and it's better for that to have a
separate PR.
2018-06-15 21:01:28 +02:00
Steve Cotton
a1d92d466e Prose: the Storm Trident's description uses "merfolk" (issue #2936)
Also update Dead Water's copy of it to use race= instead of a
list of unit types (as done for the core object in 613dd431).
2018-06-15 21:01:28 +02:00
Pentarctagon
5f4dac29e4 Fixup for osx hardening options. 2018-06-15 01:51:49 -05:00
Pentarctagon
7d180c93e0 Enabled hardened executables by default.
The result of running "hardening-check wesnoth" now shows:
* Position Independent Executable: yes
* Stack protected: yes
* Fortify Source functions: yes (some protected functions found)
* Read-only relocations: yes
* Immediate binding: yes
2018-06-15 00:13:53 -05:00
Charles Dang
4ed4660349 End Credits: reduced text surface size by 42%
[ci skip]

Really no reason for the text area to grow since the text is set in pre_show and
therefor the widget is always the right size. >_<
2018-06-15 13:20:26 +11:00
Nils Kneuper
7f3b4bdc8b updated Slovak translation 2018-06-14 08:12:59 +02:00
Steve Cotton
84c081a1c6 DW S05: Add a po hint about the orc saying "mermen" (part of #2940) (#3243)
The orc calls them fish-men several times, so changing it to "merfolk"
wouldn't fit.

Also a whitespace fix from wmlindent.

[ci skip]
2018-06-13 13:53:47 +02:00
ln-zookeeper
354a6709f9 EI S11: Fixed missing prisoners (fixes #3237)
The problem was introduced by commit 1e7c25a139 due to the [modify_unit] tag apparently causing prisoners to disappear because technically they were duplicates as they had merely been unstored and still existed on the recall list as well.
2018-06-12 23:06:19 +03:00
Severin Glöckner
5171a8b093 updated German translation
[ci skip]
2018-06-12 21:19:44 +02:00
Iris Morelle
b5eb6c43c3 doc/wesnoth(6): 'none' is a keyword in the --log-<level> description
[ci skip]
2018-06-12 03:40:00 -04:00
Iris Morelle
844b2d67ed pofix: Update with 1.14.3 -> 1.14.3a (macOS) rules for the website
[ci skip]
2018-06-12 03:36:57 -04:00
Thom Diment
ba7728c783 DW 5 Tirigaz - Changes to orc leader death event
Fixes #3092 - Updates objectives if orc leader is killed first, and gives additional dialogue
Fixes #3903 - Gold event doesn't fire if ghosts kill the orc leader

[ci skip]
2018-06-11 14:44:31 +02:00
doofus-01
ad53608e42 UtBS S12: Make alien central body vulnerability more visible to player 2018-06-11 16:42:58 +11:00
doofus-01
4fca052085 UtBS S11: Citadel graphics, drawn over the cavewall donut 2018-06-11 16:42:58 +11:00
Iris Morelle
e59471d82d pofix: Update with 1.14.2 -> 1.14.3 rules for the website
[ci skip]
2018-06-10 22:50:52 -04:00
Charles Dang
ef9a87bf36 Fixed MP admins being unable to observe private games (fixes #2851)
This was due to the change in the MP initialization process wherein the lobby wouldn't
show up until the initial gamelist was received. Since the admin auth message is sent
after [join_game] and before the initial gamelist, and the chatbox widget handled parsing
the auth message, the client was never marked as authenticated and therefor couldn't
observe private games. This fixes that by adding auth parsing to the MP initialization
process.

Note this doesn't fix the issue of the auth confirmation not showing up in the lobby chat
(issue #2920). I'll have to think of a way to fix that separately.
2018-06-11 13:04:19 +11:00
Pentarctagon
643b4aa0e0 Fix stack protection with LTO. 2018-06-10 20:10:50 -05:00
Pentarctagon
9cacf9f301 Add option to build wesnoth with hardening options. 2018-06-10 19:14:39 -05:00
Steve Cotton
c730c66ef1 Update core/about.cfg to use "merfolk" instead of "mermen" (part of #2940) 2018-06-11 01:20:03 +11:00
Iris Morelle
2d98c936d5 tools: Add steam-changelog
This is a script to take a changelog section (provided in the command
line as such: `steam-changelog changelog.md X.Y.Z`) and convert it to
BBCode for posting on Steam.

[ci skip]
2018-06-10 03:24:28 -04:00
Charles Dang
32d650303a Statistics Dialog: keep the same stat selected between scenario selections
Fixes #3223, closes #3226.
2018-06-10 14:49:18 +11:00
Charles Dang
9a9e6887e2 Updated changelog
[ci skip]
2018-06-10 14:36:13 +11:00
doofus-01
20b2f1b518 peasant attack animations 2018-06-10 14:34:21 +11:00
doofus-01
0869e20cfd change ruffian attack anim timings 2018-06-10 14:34:21 +11:00
Charles Dang
d117d65cc4 Added an advanced preference for the PRNG combat option
[ci skip]
2018-06-10 14:23:34 +11:00
Charles Dang
e9f7952408 Statistics Dialog: merge unit name and count labels
Makes it easier for translators to do something specific with this label if needs
be. I remember the reason the count (NUMx) label was moved prior to the name had
to do with language conventions too, so this should alleviate any other such issues.

Also made the name label default size instead of small.
2018-06-10 12:56:28 +11:00
Charles Dang
09d94b03f5 Statistics Dialog: remove mode toggle in favor of an All Scenarios menu entry
Closes #2886.
2018-06-10 12:56:08 +11:00
Severin Glöckner
df8ac3cbb0 add / remove some comments
[ci skip]
2018-06-10 03:04:23 +02:00
Severin Glöckner
9cac36e6b8 Tutorial Part2: Give the player a canche to undo his move
in case he started an attack from the water. The warning
makes no sense otherwise.

[ci skip]
2018-06-10 03:04:23 +02:00
Charles Dang
1174da36c0 Post-release version bump 2018-06-10 11:03:47 +11:00
Charles Dang
51609d2cef Pre-release version bump 2018-06-10 11:02:23 +11:00
Charles Dang
e20b84d95a Updated players_changelog
[ci skip]
2018-06-10 11:01:19 +11:00
Charles Dang
be7ecbba85 DiD S6: shift the escape location slightly to account for the map redraw
[ci skip]
2018-06-10 10:56:56 +11:00
Iris Morelle
ede9e20640 Move changelog entry around
[ci skip]
2018-06-09 19:43:57 -04:00
Charles Dang
b3d492b81e DiD S1/S6: new Parthyn maps
[ci skip]
2018-06-10 10:43:24 +11:00
Charles Dang
ada1ed36d8 Few minor semantic changelog tweaks
[ci skip]
2018-06-10 10:31:50 +11:00
Charles Dang
bfa8c951b9 Fixed [scenario] map_file basically being unusable
Automatically checking the path relative to a maps/ directory without binary
path support results in an invalid path almost every single time. If I remember
correctly from my testing, the only time that worked was if I added a data/maps
folder.
2018-06-10 10:31:48 +11:00
ln-zookeeper
9e7f915ce9 Updated changelog
[ci skip]
2018-06-10 02:28:40 +03:00
Severin Glöckner
ad9c620370 updated German translation
and recompiled German manpages

[ci skip]
2018-06-10 01:24:49 +02:00
Iris Morelle
a2963dcdbc Fix Lua errors when failing to set a music track on an empty playlist
Closes #3194.
2018-06-09 18:54:06 -04:00
loonycyborg
7e44a66e2f pot-update and regenerate doc files 2018-06-09 23:35:29 +03:00
gfgtdf
c9b713f47e fix teamchat not marked #3119 2018-06-09 20:28:39 +02:00
gfgtdf
69f026fd65 fix issues caused by empty save id
ee50171d13 broke some codes that relied on
unique save ids, that is in particular the statistic code and
scoped_recall_unit, so now these codes fallback to the side number if
the save id is empty.
2018-06-09 20:25:31 +02:00
Jyrki Vesterinen
ea65af0328 Remove game_events::wml_event_pump::wml_tracking()
The variable **always** changed when event handlers were run, and thus the
optimizations to avoid updating some status after WML/Lua has run weren't
doing anything. In addition, commit 62ec3b3951 removed the most
important optimization that relied on wml_tracking().

Resolves #2578.
2018-06-09 19:26:08 +03:00
Jyrki Vesterinen
244384218b Fix build with Visual Studio 2013 2018-06-09 15:16:21 +03:00
Nils Kneuper
651e975438 updated Japanese translation 2018-06-09 12:58:53 +02:00
Nils Kneuper
fe994f6854 updated Czech translation 2018-06-09 12:57:33 +02:00
Iris Morelle
27bec8bf98 Make Credits page on wiki.w.o use the new TOC markup for mobile support
[ci skip]
2018-06-09 03:06:31 -04:00
stevecotton
cf6bb49fae DiD S2: When ambushed by goblins, cancel any pending attack (#3227)
This happens in a village-capture event, so the unit has finished
moving for this turn in any case.
2018-06-09 00:25:34 +03:00
Nils Kneuper
cdc0256fb9 updated Scottish Gaelic translation 2018-06-08 20:29:37 +02:00
Nils Kneuper
c8d715058e updated French translation 2018-06-08 20:27:28 +02:00
Nils Kneuper
0ce76c9354 updated Spanish translation 2018-06-08 20:26:47 +02:00
Charles Dang
5f58cd7c6d Unit Attack: fixed issues arising from displayed items potentially not equally available items
Since there were weapons included that weren't shown, it was possible for the best
weapon selection to be a hidden one (in which case, the initial selection would be
wrong, and it was possible for the returned index to point to a hidden, disabled
weapon.

This resolves both issues by excluding these disabled attacks from the weapon choices
list altogether. They aren't considered when calculating the best attack either.

mouse_handler::fill_weapon_choices is also used in mouse_handler::attack_enemy_, but
I don't foresee this change should cause any issues there, since you aren't supposed
to be able to actually attack with disabled weapons anyway.
2018-06-09 03:31:52 +11:00
Severin Glöckner
ba487c852f Tutorial: show the female fighteress in the help (if she is chosen)
Uses the workaround mentioned in #3012

[ci skip]
2018-06-08 17:58:10 +02:00
Thom Diment
bf28cc7d76 UtBS 5: changes to scenario locations (#3104)
* UtBS 5: changes to scenario locations

From #3077:
* Moved AI leader spawns to keeps
* Changed spawn of trolls that were spawning in walls
* Sanity-checked village ownership in cavern

From #3078:
* Changed spawn of Eastern Troll Flamecaster
* Fixed entry routes of Troll Flamecasters

From author notes:
* Made 'Wounded Dwarf' a wounded unit
2018-06-08 16:41:41 +02:00
Charles Dang
9ea4363145 Fixup this atomic_bool again
Apparently atomic types aren't copy-assignable.
2018-06-08 19:46:50 +11:00
Charles Dang
3d93fd3d53 Added missing <atomic> include 2018-06-08 19:31:25 +11:00
Charles Dang
8722221ed4 Ensure events::call_in_main_thread is thread-safe 2018-06-08 17:43:40 +11:00
ln-zookeeper
ff7aa38e35 Restructured WC/Soulless bat variation defense animation (fixes #3215)
There were two overlapping problems: 1) the branching was written incorrectly (due to combining top-level and [if] filters) and 2) the first [defend] tag getting merged with the base WC/Soulless defense animation.
2018-06-08 00:37:12 +03:00
mattsc
84e88ee797 Update changelog with Lua AI efficiency improvements 2018-06-07 06:59:06 -07:00
mattsc
6071efa67d
Merge pull request #3213 from mattsc/speed_up_goto_mai
Efficiency improvements to Lua AIs
2018-06-07 06:40:23 -07:00
doofus-01
216215830a UtBS: Graphics update for Giant Ant (#3190)
* graphics update for giant ant unit

* slight revision to ant base sprite
2018-06-07 11:43:30 +03:00
mattsc
7727130e24 Goto Micro AI: add [and] to a filter
Another efficiency improvement.  This ensures that the side of the unit
is checked first before the potentially complex rest of the filter is
evaluated.
2018-06-06 20:24:04 -07:00
mattsc
4b8870ed93 Goto Micro AI: change order of SLF and SUF evaluation
This is for efficiency reasons, as location filters do not necessarily
change throughout a side’s turn, while fewer and fewer units have moves
left.
2018-06-06 20:24:03 -07:00
mattsc
fb364cf2b7 AI helper: improve efficiency of get_unit functions
The old method is very slightly faster in some circumstances (e.g. for
simple filters and when all units have moves/attacks/etc. left), but we
are talking fractions of micro seconds. By contrast, depending on the
filter used, the new method can save large amounts of evaluation time
once some units have move or attacked.
2018-06-06 20:23:56 -07:00
Nils Kneuper
0f43f82a3b updated Italian translation 2018-06-06 22:08:28 +02:00
Nils Kneuper
d36484452d updated British English translation 2018-06-06 22:07:25 +02:00
loonycyborg
8fe5cee2e4 wesnothd: fix prematurely adding new players to games_and_users_list_
If dc happens during asio read that would call server::add_player
then a "ghost" player will appear in games_and_users_list_. Fix works by
moving the list update into the handler, it will be called only if read is
successful.
2018-06-06 19:14:40 +03:00
Iris Morelle
b23fa587e6 Changelog entry for the fix for issue #3206
[ci skip]
2018-06-06 04:21:01 -04:00
Iris Morelle
b7fa9f4d85 Changelog entry for do_not_list behaviour change
[ci skip]
2018-06-06 04:20:41 -04:00
Iris Morelle
41af8cde01 gui2/unit_create: Do not exclude do_not_list units
This is a debug mode-only dialog. If I want to spawn a unit, the game
had better allow me to spawn any unit I want. do_not_list was created
for use by wmlunits anyway.
2018-06-06 03:11:52 -04:00
Jyrki Vesterinen
544b68d7a7 Fix #2602: music doesn't change immediately on loading a save
This time I added an option to disable the feature to allow the currently
playing track to finish when changing the playlist. This allows more
fine-grained control of distinct use cases.

In wesnoth.cpp:do_gameloop(), I reversed the order of the title screen
music and default music because otherwise adding the default music would
enable play_once for the title screen music and prevent instant music
change when the player loads a save. I play title screen music with
immediate=yes, so it's still played first.
2018-06-05 20:42:41 +03:00
Jyrki Vesterinen
91d35e3d86 Revert "Fix #2602: music doesn't change immediately on loading a save"
This reverts commit 1fb9378df1.

The commit caused the music to change even when the player loaded a save
from the same scenario. A different fix is needed.
2018-06-05 19:19:59 +03:00
loonycyborg
65643adab8 wesnothd: fix server terminating in response to unregistered login
if unregistered logins are allowed
2018-06-05 14:31:08 +03:00
loonycyborg
608d39f45a wesnothd: avoid needlessly casting pointer to long int 2018-06-05 14:31:08 +03:00
Iris Morelle
1b7557a2ca Fall back to the unit type name for [message] captions for nameless units
Fixes #3211.
2018-06-05 04:44:23 -04:00
Jyrki Vesterinen
44c373de74 Changelog entry for commit 1fb9378df1 2018-06-05 08:32:12 +03:00
Jyrki Vesterinen
1fb9378df1 Fix #2602: music doesn't change immediately on loading a save 2018-06-05 08:28:12 +03:00
sigurdfdragon
c1d522afa2 Update changelogs 2018-06-04 23:52:36 -04:00
sigurdfdragon
36dd2a0f2d DW: Fix #3207
...by preventing any allied units from moving to the sword.
2018-06-04 23:37:05 -04:00
Iris Morelle
79812a853e Don't allow [kill] animate=yes to scroll to units through fog and shroud
Restores 1.12's behaviour.
2018-06-04 16:15:30 -04:00
Severin Glöckner
05e053ca43 NR S5a: more bugfixes
* now the situation can appear that spiders can attack Malifor,
  this handles it.
* add *^Xo Terrain to the filter. While there is no bug to fix,
  it looks like it belongs there too.
* work around a tile glitching with an [item] at 22,4
* remove code referring to removed variables

[ci skip]
2018-06-04 19:39:38 +02:00
Thom Diment
2935946c12 NR S5a: bugfixes
* Fixes #3117 - Malifor damage event now occurs on defence as well as on attack

* Fixes #3116 - Doors to the study can now be opened from inside

[ci skip]
2018-06-04 19:37:25 +02:00
loonycyborg
6a88624f44 wesnothd: restore lan server auto-shutdown functionality 2018-06-04 16:40:40 +03:00
loonycyborg
54bdfcad87 wesnothd: restore functionality to log stats every 5 minutes 2018-06-04 15:02:30 +03:00
loonycyborg
91e36ca072 server: remember client's ip in player_connections_ and use it in remove_player()
this is needed so ip is properly logged even if socket is closed or invalid
2018-06-04 13:23:22 +03:00
Severin Glöckner
1bf8451d19 updated German translation
fixup, msgmerge has apparently problems to compile if only one
starts with \n

[ci skip]
2018-06-04 02:41:55 +02:00
Severin Glöckner
d1a288b46d updated German translation:
* new TSG translation
* dropped German campaign abbreviations - stick with English ones
  As of 1.14 the English campaign names are as well shown in brackets
  in the load game dialogue
* removed cases of double whitespaces
* replaced — by – (If you read this commit message with a monospace
  font you won't see the difference)

[ci skip]
2018-06-04 02:21:55 +02:00
Charles Dang
ff763d1bb7 Tutorial S2: made enemy starting gold equal to that of the player
[ci skip]
2018-06-04 06:41:33 +11:00
Gunter Labes
f1bf186c87 check for empty parameters before looping over all players 2018-06-03 17:19:25 +02:00
loonycyborg
b7753edd9d pot-update and regenerate doc files 2018-06-03 16:46:30 +03:00
loonycyborg
b460ab38cc Fix broken xml in po file 2018-06-03 16:41:41 +03:00
Nils Kneuper
4c4e15aeb5 updated French translation 2018-06-03 12:10:02 +02:00
Nils Kneuper
5dea9f2cb7 updated Italian translation 2018-06-03 12:09:13 +02:00
Nils Kneuper
14f92172ba updated Chinese (Traditional) translation 2018-06-03 12:08:17 +02:00
gfgtdf
cba86cc7cd
Merge pull request #3203 from gfgtdf/1.14
add version mp command
2018-06-03 02:55:33 +02:00
gfgtdf
c6aef1bab7 rename mp command player_version to version 2018-06-03 00:49:50 +02:00
gfgtdf
b828281837 add player_version mp command
to tell you what wesnoth version another player is using.
2018-06-02 21:30:42 +02:00
Charles Dang
287775c787 Game Config Manager: handle clearing image cache in main thread
See comment for explanation. This was a better solution that adding mutexes to
the cache accessors; that had performance downsides.
2018-06-03 05:16:42 +11:00
Charles Dang
7576298464 Revert "Fixed an occasional crash resulting from multi-thread access of the image cache"
This reverts commit 0eb27e246b. Turns out there's
a better way to fix this problem without using mutexes, which have a noticeable
performance hit (5.2% of the execution time of game_display::draw_invalidated()
according to @jyrkive).
2018-06-03 05:13:38 +11:00
Charles Dang
4761894844 Campaign Dialog: renamed Deterministic Mode label to "Save random seed"
[ci skip]

This better conveys its behavior, especially with the introduction of the hidden PRNG
preference.
2018-06-03 05:11:05 +11:00
Charles Dang
4f7e789f2d NR S10 - 14: minor cosmetic map tweaks
[ci skip]
2018-06-03 05:09:25 +11:00
Charles Dang
e9639b58a4 NR S13: further reduce enemy gold
[ci skip]

Also fixed an error in my last commit that gave your ally Dwarvish side *more*
gold on higher difficulties.
2018-06-03 00:48:33 +11:00
Charles Dang
af16289678 NR S11 - 13: reduced enemy starting gold and income (resolves #3198)
[ci skip]

Also similarly reduced one of your ally's starting gold in S13.
2018-06-02 09:21:34 +11:00
loonycyborg
8ff65117c5 scons: don't let pkg-config to add prefix on msys2
This is workaround for windows style path confusing scons if they appear
in CPPATH etc. Paths without prefix still happen to be valid and they
start with "/", not "c:".
2018-06-01 22:45:45 +03:00
loonycyborg
9cd29260b4 scons: use pkg-config on msys platform for sdl 2018-06-01 21:34:04 +03:00
loonycyborg
8111db9c67 scons: set env["PLATFORM"] to "win32" on msys 2018-06-01 21:29:43 +03:00
loonycyborg
9e4a76096b scons: workaround for msys2's build's of sdl "#define main" breaking non-sdl checks 2018-06-01 20:28:07 +03:00
sigurdfdragon
1a18d698ae Update changelogs 2018-05-31 19:33:14 -04:00
sigurdfdragon
c7371ac712 SotA S09: Fix #3192
...by making the filter more exact.

[ci skip]
2018-05-31 19:27:34 -04:00
gfgtdf
47bdab5114
fix possible 'manditory child missing' when loading mp campaign games
the error could happen a soon as you advance to the next scenario if you reload a campaign save from another player.
2018-05-31 21:35:17 +02:00
loonycyborg
0c6885d4e8 scons: fix issue #3132 2018-05-31 19:53:01 +03:00
Charles Dang
3abea03b42 MP Lobby: added translation hints for C/S markers 2018-06-01 02:00:46 +11:00
gfgtdf
b0dffebe80
wb: fixup "fix incorrect handling of skirmisher." 2018-05-31 16:57:00 +02:00
loonycyborg
ee638bc892 Typo fix 2018-05-31 11:59:02 +03:00
Charles Dang
15f7b4b71a MP Staging: removed gender tooltip (resolves #2998)
I had only added it originally in case someone didn't know the symbols offhand,
but sevu is right that they can get a bit annoying.
2018-05-31 19:41:01 +11:00
Charles Dang
c5c5392bc4 MP Lobby: display self before friends in player list (fixes #3185) 2018-05-31 19:35:56 +11:00
Charles Dang
844c17463c GUI2/Chatbox: removed spurious newline from initial PM notice 2018-05-31 19:22:21 +11:00
Celtic Minstrel
4062c1ef25 Fix effects being unable to decrease weapon parry/accuracy
fixes #3181
2018-05-31 19:10:01 +11:00
gfgtdf
30c08cd785 fix untranslatable string. 2018-05-31 19:08:58 +11:00
Celtic Minstrel
40d1fbefa7 Documentation for the translation completeness command-line flags 2018-05-31 19:08:34 +11:00
Severin Glöckner
aca56489b8 manpages: clarify deprecation logdomain
[ci skip]
2018-05-31 19:08:16 +11:00
Severin Glöckner
389653151c GUI: add a translation prefix
Depending on the context there are different possible word
to translate 'to' with.

[ci skip]
2018-05-31 19:07:58 +11:00
Pentarctagon
315b0895c1 Fixup goblin description.
Somehow missed removing the part about the failing bloodline.
2018-05-31 03:02:35 -05:00
Pentarctagon
2ffa6b13ba Updated goblin spearman description.
See: https://forums.wesnoth.org/viewtopic.php?f=32&t=48137&start=60#p628424 and related posts.
2018-05-31 01:51:37 -05:00
loonycyborg
8a1d50799e Enable ASLR and NX bit security features for mingw builds 2018-05-31 03:34:40 +03:00
Byteron
fe2d2dbe6a [ci skip] fixes 3051, where in TSG, Deoran is able to recruit peasants during the whole campaign 2018-05-30 21:44:50 +02:00
gfgtdf
37f4286c65
fix seed not resetting in lua mapgen. 2018-05-30 14:05:11 +02:00
gfgtdf
ce66df1285
add mapgen debug info. 2018-05-30 12:46:55 +02:00
Charles Dang
78ab1faeaa Made vgettext/vngetext internals harder to use accidentally (resolves #2716)
Also removed the two implementation function overloads that did not take a textdomain.
2018-05-30 15:23:30 +11:00
gfgtdf
43252e8191
add mapgen debug info. 2018-05-30 03:42:28 +02:00
Nils Kneuper
1977a9ad79 updated French translation 2018-05-29 23:41:48 +02:00
gfgtdf
d36c6a928b
add mapgen debug info. 2018-05-29 22:26:04 +02:00
Charles Dang
803d206cd2 Campaign Difficulty: consolidated both lines into a single label 2018-05-29 20:55:34 +11:00
Charles Dang
90fc8cf9b6 Updated changelog
[ci skip]
2018-05-29 20:54:21 +11:00
Charles Dang
0eb27e246b Fixed an occasional crash resulting from multi-thread access of the image cache
This was a problem as of 52db950e94 since the loading
screen could access the image cache while the worker thread cleared it.
2018-05-29 13:59:43 +11:00
Jyrki Vesterinen
6d8957ca5c Changelog entries 2018-05-28 22:10:15 +03:00
Jyrki Vesterinen
00c0566163 Fix #3042: attack prediction gives wrong results for HP <= 0 units
One_strike_fight() assumed that if HP distribution hadn't been calculated,
the unit is alive. It would normally be a valid assumption, but the Wesnoth
engine allows units with negative HP (although things aren't guaranteed to
work correctly in the presence of such units).

The assumption, together with a completely wrong calculation for the
probability that the opponent will counterattack, resulted in badly
incorrect results. That, in turn, caused the calculated probability that
the opponent to kill us to become negative (I observed -75 % when
debugging), making the calculated probability to be poisoned/slowed to
exceed 100 %, and that finally caused an assert if the AI simulated another
fight for the same unit.

I have now fixed those issues. I also noticed that rounding error allowed
the probability to be killed to still become slightly negative, and thus
changed std::min() to utils::clamp() to limit the value to the allowed
range.
2018-05-28 22:05:08 +03:00
Jyrki Vesterinen
43c964fe3f Revert "Disallow units with negative HP"
This reverts commit 3c344e8da5.

@ln-zookeeper pointed out that units with negative HP are documented in the wiki, and thus disallowing them is an API
change.
2018-05-28 19:28:53 +03:00
Jyrki Vesterinen
ca96a2ba61 Revert "Allow modifying dead units in last_breath and die event handlers"
This reverts commit dc68187999.
2018-05-28 19:28:23 +03:00
Jyrki Vesterinen
76652d5905 Revert "Throw a Lua exception when creating a negative-HP unit in a Lua context"
This reverts commit b8ffe007e5.
2018-05-28 19:28:03 +03:00
Jyrki Vesterinen
8fbf58e10a Revert "Allow modifying dead units in more event handlers"
This reverts commit b0c1382693.
2018-05-28 19:27:37 +03:00
gfgtdf
7be39c937d
fix unit filter always evaluating [and] even if it is not needed. 2018-05-28 17:32:58 +02:00
Iris Morelle
9c30032ab4 pofix: Update with 1.14.1 -> 1.14.2 rules for the website
[ci skip]
2018-05-27 23:01:54 -04:00
Charles Dang
031f856f31 Fixed CVIdeo::quit being swallowed in invoked_function_data::call 2018-05-27 22:22:10 +11:00
Charles Dang
aebf9be79d Fixup b06855e604 (re-add ctor) 2018-05-27 22:03:55 +11:00
Charles Dang
b06855e604 Handle exceptions thrown by call_in_main_thread in the caller thread
Also removes an unnecessary ctor and adds docs.
2018-05-27 17:35:14 +11:00
Nils Kneuper
78ba4582a1 updated Italian translation 2018-05-26 21:41:42 +02:00
Martin Hrubý (hrubymar10)
493c4acfdd
Update changelog in macOS package 2018-05-26 20:52:07 +02:00
Charles Dang
f98651cf46 Post-release version bump 2018-05-27 03:09:07 +11:00
Charles Dang
2b7f95164c Pre-release version bump 2018-05-27 03:08:13 +11:00
Charles Dang
b56dcb38c2 MP Staging: simplify a call 2018-05-27 03:00:46 +11:00
Charles Dang
5395fcd106 Moved faction sorting from the FLG manager to the connect engine
This list in the connect engine was passed to each of its side engine's flg managers,
where it was then sorted by update_choosable_factions(). Basically, a whole bunch of
unnecessary sorting. This makes it so the list is already sorted when it's passed to
each side engine.

None of the post-processing of the faction list (in populating available_leaders_)
should mess with the order, as far as I can tell.
2018-05-27 03:00:25 +11:00
gfgtdf
67d2ee7db0
remove useless code in unit::advance_to
the line above does exactly the same as the line inside that if(){..} so it has no effect.

Also, what the comment says is wrong. We do not want to keep the old recall cost if it is different from the original recall cost because  doing that would break removing objects that change recall cost.
2018-05-26 14:28:35 +02:00
loonycyborg
e7b2068a44 pot-update and regenerate doc files 2018-05-26 15:15:39 +03:00
gfgtdf
d1982a6b0e automaticially end replaymode at the end of a mp turn replay.
previously it did happen that users did not know how to 'escape'
from the replay mode in that case.
2018-05-26 13:25:52 +02:00
Charles Dang
e54b28a577 GUI2/Addon List: don't hardcode green text color for publishable addons 2018-05-26 19:03:28 +11:00
Charles Dang
e496600c9a Used RAL 6038 (#00b51a) for font::GOOD_COLOR
This is apparently the closest RAL color to RGB 0,255,0 and it happens to look good.
2018-05-26 19:01:01 +11:00
Charles Dang
30247e93cb Surface: restrict a workaround to SDL 2.0.6 only
It was fixed in 2.0.7.
2018-05-26 18:09:36 +11:00
Charles Dang
f2d84e5cc8 Improved some changelog entries
[ci skip]
2018-05-26 17:01:16 +11:00
Jyrki Vesterinen
6a7e461e18 Changelog entry for pull request #3169 2018-05-26 08:58:47 +03:00
newfrenchy83
b4ddb0db38 Update advancement.cpp 2018-05-26 08:58:08 +03:00
Severin Glöckner
763c5fef08 add Changelog entries
[ci skip]
2018-05-26 05:45:41 +02:00
Severin Glöckner
30a8a6cfcd SotA & UtBS: replace deprecated code 2018-05-26 03:34:12 +02:00
Severin Glöckner
7f2ddac8ef SotA S21: fix terrain filter
The map has been adjusted before, but not the filter

[ci skip]
2018-05-26 03:25:17 +02:00
Severin Glöckner
aafacd7bce SotA: fix S20, was broken with the removal of the old gates
[ci skip]
2018-05-26 03:00:05 +02:00
Severin Glöckner
cf3d6bf97a SotA: transform bats already after the 5th scenario
and keep compatibility code to transform older saves

[ci_skip]
2018-05-26 01:39:39 +02:00
Severin Glöckner
11968f5579 SotA S18: move DA transformation to lua
[ci skip]
2018-05-26 01:21:45 +02:00
gfgtdf
bd9864ad54
Update changelog.md 2018-05-25 23:56:40 +02:00
gfgtdf
7fd8755385
Update changelog.md 2018-05-25 23:49:50 +02:00
Severin Glöckner
bf792a959f DiD S7: compensate -1 income with +1 support
[ci skip]
2018-05-25 20:50:23 +02:00
Severin Glöckner
3592c09b68 DiD S7: make villages unattractive
they give no income anymore, but still support

[ci skip]
2018-05-25 20:32:54 +02:00
Severin Glöckner
a45d8a9648 NR Path B:
* to enable playing the path in debug mode
  * set the betrayed friend variable in S5
  * overwrite redruits and gold
* use lua for unit transformations
* clean up code in S5
* fix ellipse change having no effect (probably since 1.12)
  * work around bug #3172

[ci skip]
2018-05-25 19:49:09 +02:00
ln-zookeeper
e161dab24b NR: Gave the Rod of Justice the magical special and improved animation
The animation now uses all three bolt animations (instead of just one), and has a somewhat different color.
2018-05-25 15:32:06 +03:00
Charles Dang
01a9666acb Campaign Difficulty: restore the description parentheses on request 2018-05-25 11:58:56 +11:00
Charles Dang
74833bde39 Bump font::GRAY_COLOR from #777 to #888
Bit brighter, looks a bit better.
2018-05-25 11:55:55 +11:00
Charles Dang
2624bbf419 Campaign Difficulty: rearranged entry layout 2018-05-25 11:45:24 +11:00
Charles Dang
6318d66abd Removed now-unused preference getters/setters 2018-05-25 11:26:42 +11:00
Charles Dang
98d39bc107 Updated changelog
[ci skip]
2018-05-25 11:16:03 +11:00
Charles Dang
38d5a7825c MP Lobby: removed manual player list sorting
It didn't make much sense to have these since there's really no situation you'd want
the "default" sorting order, which is however the server decided to send the list.
2018-05-25 11:15:45 +11:00
Charles Dang
e53b621cd5 Campaign Difficulty: colored description column gray 2018-05-25 09:31:47 +11:00
Severin Glöckner
fec9f44864 DiD S11, Sota S18: move unit type transformation to lua
[ci_skip]
2018-05-24 23:59:36 +02:00
gfgtdf
ad85d734a7 fix [animate_unit] freezing the game
#2970
#3084
2018-05-24 23:37:03 +02:00
Severin Glöckner
28a0547b07 DiD S11 & S12: transform all Mages instead of changing their advancements
This has the advantage that they use the same help page as newwly
recruited ons, and their advancement options are correctly shown there.

The transformation code is taken from SotA S18

[ci_skip]
2018-05-24 23:08:23 +02:00
Severin Glöckner
1e7c25a139 EI S11: use same approach as in c7cef07
to simplify scenario

[ci_skip]
2018-05-24 23:06:50 +02:00
Severin Glöckner
c7cef07cc3 DiD: fix bug for units not being loyal anymore after leveling up
fixes #3163

[ci_skip]
2018-05-24 22:57:28 +02:00
Severin Glöckner
3886afd519 Did S5: make campaign easier to debug
by moving an important change into it's own victory event

[ci skip]
2018-05-24 22:57:28 +02:00
Nils Kneuper
d3f8a35179 updated Chinese (Simplified) translation 2018-05-24 21:34:26 +02:00
Nils Kneuper
d47b27d229 updated Spanish translation 2018-05-24 21:31:43 +02:00
Jyrki Vesterinen
a094f4253b Changelog entry for commit 57fd9cc586 2018-05-24 20:31:25 +03:00
Jyrki Vesterinen
4e68c144db terrain_filter::match_internal(): use std::make_shared() 2018-05-24 20:30:51 +03:00
Jyrki Vesterinen
57fd9cc586 Fix memory leak in terrain filter matching 2018-05-24 20:21:03 +03:00
Charles Dang
60c93cf47b Fixed animation-wide text_color and blend_color keys being overwritten
Regression from a0199c73f9. This should fix
an issue where levein/levelout fading was sometimes black instead of white.
2018-05-24 13:35:25 +11:00
Charles Dang
9b75279aea Fixup d379abc (WFL comment syntax)
[ci skip]
2018-05-24 11:15:05 +11:00
Iris Morelle
f314d48f1d gui2/preferences: Add margin around the version info button
[ci skip]
2018-05-23 19:50:00 -04:00
Iris Morelle
d68815f538 Add a couple of entries to players_changelog
[ci skip]
2018-05-23 19:46:51 -04:00
Iris Morelle
cfc0c4f8e1 gui2/preferences: Add version info button
Also simplifies the layout of the bottom-most row of the dialog a bit.
2018-05-23 19:39:06 -04:00
Charles Dang
d379abc4a9 GUI2/Message: tweaked Magic Numbers to fix layout failure with large portraits
[ci skip]

Fixes #2912
2018-05-24 10:24:59 +11:00
Charles Dang
489fbccba1 TRoW: revert workaround for #2912
[ci skip]

Reverts e41cd0b, 4d92cc2, and 1b04b9d.
2018-05-24 09:39:56 +11:00
gfgtdf
ee50171d13 fix different carryover when loading startofscenario-save
this removes a hack in connect_engine.cpp that set save_id to a value to make sure that other connect_engine.cpp code does not chnge it later to the plyers id, (it did so at some point iirc).

Instead we update carryover.cpp to make sure that a side with no save_id  (or id since save_id defaults to id) is not carried over to the next scenario,

fixes #3152
2018-05-24 00:18:43 +02:00
Iris Morelle
1b04b9da4d Changelog entry for the #2912 work around
[ci skip]
2018-05-23 17:42:04 -04:00
ln-zookeeper
4d92cc2395 TRoW: Increase Rithrandil's workaround portrait height to 700
[ci skip]
2018-05-24 00:39:36 +03:00
ln-zookeeper
e41cd0b27f TRoW: IPF-downscale Rithrandil's portrait, as a workaround to #2912
Height of 600 seems to work fine, and is the same as in the core Ancient Wose portrait.
2018-05-24 00:29:12 +03:00
gfgtdf
8419db8a45
don't autosave after using 'back to turn' in mp 2018-05-23 12:55:52 +02:00
gfgtdf
d1097d93d5 fix oos when using 'back to turn' in mp 2018-05-23 01:58:01 +02:00
Severin Glöckner
2e04dde374 updated German translation
[ci_skip]
2018-05-22 20:33:47 +02:00
Iris Morelle
d2e94b320f Do not allow [message] to scroll to units through fog/shroud
This was a regression from 1.12.
2018-05-21 23:23:00 -04:00
Iris Morelle
bfeb22c24c Fix broken TC in a north-facing standing animation frame for the Revenant
[ci skip]
2018-05-21 21:30:15 -04:00
Severin Glöckner
9568d48ff7 Updated Changelogs
[ci_skip]
2018-05-22 02:42:26 +02:00
ln-zookeeper
4941c4b461 Updated changelogs 2018-05-22 03:35:50 +03:00
ln-zookeeper
c72455e9b0 TRoW S15: Increased the amount of lvl2 units enemies recruit
This will make enemies recruit equally many lvl1 and lvl2 units, thus decreasing the amount of units overall and making it less feasible to last indefinitely due to hordes of lvl1 units blocking better damage-dealers from reaching player units.
2018-05-22 03:14:56 +03:00
ln-zookeeper
f320a0ee5d HttT S08: Increased Li'sar's income slightly 2018-05-22 03:10:33 +03:00
ln-zookeeper
bed524a0a3 TSG S03: Made the scenario very subtly harder
Increased the number of bats/undead the enemy can recruit, and made the terrain east of the enemy camp more easily passable.
2018-05-22 03:04:17 +03:00
ln-zookeeper
1db98d87d8 SoF S9: Fixed some issues with the volcano eruption (fixes #3099)
This merely patches the worst problems (multiple successive [endlevel] calls, inconsistent [endlevel] contents, recursive elf die event, lava fills visually broken); ideally the whole scenario should be rewritten and redesigned.

The mask changes only consist of re-sizing them to match the map size.
2018-05-22 02:39:32 +03:00
gfgtdf
ad1105d7f9
remove 'cannot handle require_scenario=' warning
since it triggers on mainline content
2018-05-22 01:12:57 +02:00
Severin Glöckner
dc100b3920 updated German translation
[ci_skip]
2018-05-22 01:02:48 +02:00
gfgtdf
92f466ec81
don't generate a savegame snapshot unless needed
fixes #3150
2018-05-21 23:35:33 +02:00
Severin Glöckner
d842aeea45 LoW 2 S7 - fix repeated endlevel execution
[ci skip]
2018-05-21 18:30:39 +02:00
Martin Hrubý (hrubymar10)
0eb38d526c
Xcode Disable -Wsign-conversion and -Wshorten-64-to-32 flags 2018-05-21 18:18:38 +02:00
Charles Dang
d30cf8ede3 Updated changelog
[ci skip]
2018-05-22 00:47:41 +11:00
Jyrki Vesterinen
bfe88ff19a Revert "Preallocate memory for image/file presence caches"
This reverts commit a3ef80853c.

Vector reallocation cost is logarithmic. Assuming that a vector
starts at a size of one and doubles its size in each allocation, the
result is 11 allocations - completely negligible compared with, you
know, loading 20 000 images from disk.
2018-05-21 16:29:30 +03:00
Charles Dang
a3ef80853c Preallocate memory for image/file presence caches
Should avoid unnecessary reallocations.
2018-05-22 00:27:22 +11:00
Martin Hrubý (hrubymar10)
787bf47225
Switch travis Xcode to DEBUG scheme 2018-05-21 14:23:16 +02:00
Nils Kneuper
115f45cae9 updated Japanese translation 2018-05-21 13:07:39 +02:00
Nils Kneuper
b6a846c4b2 updated French translation 2018-05-21 13:03:44 +02:00
Nils Kneuper
bebf9348a8 updated Scottish Gaelic translation 2018-05-21 13:02:51 +02:00
gfgtdf
619704923c wb: dont resend 'bump_later' commands
these caused 'illegal whiteboard data' messages from the mp server.
2018-05-21 11:45:19 +02:00
Severin Glöckner
93eb0337c7 name generators: update translation hint
[ci skip]
2018-05-21 08:49:21 +02:00
Severin Glöckner
15aece7f46 updated German translation
[ci skip]
2018-05-21 08:49:21 +02:00
Severin Glöckner
9c4023f928 German: work around help bug by using non-breaking space
without this a line break occurs in the middle of the string for
neutral units who have a portrait (alignment  matters because all
other strings in that line don't change in length)

[ci skip]
2018-05-21 08:49:21 +02:00
Charles Dang
7904debd14 Remove the CMake/Scons compile-time check for IEEE 754 compliance
Now handled by a static assertion.
2018-05-21 14:40:28 +11:00
Iris Morelle
fee407ee04 Remove door terrains that were supposed to be removed by 1.14
If someone was using these despite being hidden and everything they were
really asking to get shot in the foot at some point.
2018-05-20 23:08:15 -04:00
Charles Dang
0c29a16a9e Added a static assertion for IEEE 754 floating point compliance 2018-05-21 14:05:36 +11:00
Iris Morelle
6158b80c94 Fix [change_theme] not updating themed map borders correctly in some cases 2018-05-20 22:50:45 -04:00
Iris Morelle
711e9a287d Clamp tod_color values in the [-510, 510] range instead of [-255, 255]
[color_adjust] needs to be able to use absolute values as large as
2*255 in certain edge cases to set the screen a single solid colour when
interacting with time of day colour shifts.

Fixes #3144.
2018-05-20 21:13:23 -04:00
Charles Dang
9c1da12ca0 Unit Recall: select the first row after applying sorting
Reported on the forums: https://forums.wesnoth.org/viewtopic.php?f=4&t=48219
2018-05-21 10:34:34 +11:00
mattsc
1bd4c7686c Update changelog 2018-05-20 15:19:46 -07:00
mattsc
79f545bffd
Merge pull request #3130 from mattsc/fix_expai_darkforecast
Experimental AI fixes
2018-05-20 14:48:53 -07:00
ln-zookeeper
a9ffa28518 UtBS: Re-numbered Nym's sword animation frames
Also optimized them.
2018-05-21 00:00:21 +03:00
mattsc
84837f0a91 Experimental AI recruiting: use math.huge instead of 9e99 2018-05-20 07:36:05 -07:00
gfgtdf
77a4d19819 wb: fixup fix handling of extra_recruit and [filter_recall]
this was probably lost during rebasing.
2018-05-20 13:25:30 +02:00
Charles Dang
1a3625dbbe Removed useless Hide Help entry for debug terrain info 2018-05-20 16:01:59 +11:00
Iris Morelle
84fef75235 Fix [change_theme] requiring a separate action to refresh the UI afterwards
This also makes it so the status panels are updated immediately.
2018-05-19 23:57:41 -04:00
doofus-01
8358ee5762 kaleh sword animation 2018-05-20 14:54:18 +11:00
Iris Morelle
a58712a539 Fix [change_theme] crashing when theme= isn't specified
Leaving theme= unspecified ought to have the same effect as providing it
and setting it to an empty string. Without the check for a nil value,
however, it would result in a crash like this:

  20180519 22:31:54 error scripting/lua: lua/wml-tags.lua:922: bad argument #3 to '__newindex' (string expected, got nil)
  stack traceback:
          [C]: in metamethod '__newindex'
          lua/wml-tags.lua:922: in local 'cmd'
          lua/wml-utils.lua:145: in field 'handle_event_commands'
          lua/wml-flow.lua:6: in function <lua/wml-flow.lua:5>
2018-05-19 22:37:05 -04:00
gfgtdf
491605dc97 wb: fix handling of extra_recruit and [filter_recall]
fixes #3100
2018-05-20 04:28:25 +02:00
mattsc
d5a910c358 Experimental AI: clear recruit cache when no recruit action found 2018-05-19 18:46:59 -07:00
mattsc
09fe71911f Fix Experimental AI not working without enemy units
An example are the first two turns of Dark Forecast.
2018-05-19 18:39:45 -07:00
gfgtdf
a24fa35c34
fix require_resource in [resource]
previously 918cdfcb36/src/saved_game.cpp (L293) would fail for [resource] because cfg["addon_id"] was empty.
2018-05-20 02:53:12 +02:00
Celtic Minstrel
597b09ec97 Fix preprocessor error with deprecated macros intended to be used as an attribute value 2018-05-19 20:51:33 -04:00
Charles Dang
61d2f936ed THoT S2: fixed misspelled event name (fixes #3131)
[ci skip]
2018-05-20 10:26:26 +11:00
Celtic Minstrel
fa14c650fc MicroAI Tests: Fix issues found by the schema validator
With this, the MicroAI test scenarios are clean of schema errors
2018-05-19 16:33:09 -04:00
Celtic Minstrel
28cb5f9e9d Fix a few schema issues in some of the interactive test scenarios 2018-05-19 16:33:09 -04:00
Celtic Minstrel
e4eff8aba3 LoW MP: Fix a few more issues found by the schema validator
With this, LoW MP is as clean of schema errors as it's going to get
2018-05-19 16:33:08 -04:00
Celtic Minstrel
3c8f05026c LoW: [scenario]snapshot= is not supported
With this, LoW is as clean of schema errors as it's going to get
The custom [replace_map] override prevents it getting any cleaner for 1.14
2018-05-19 16:33:07 -04:00
Celtic Minstrel
982f51701c Story test scenario: Fix misplaced duplicate map data 2018-05-19 16:33:07 -04:00
Celtic Minstrel
b4e3616df3 Test scenario: remove useless [object]silent=yes 2018-05-19 16:33:06 -04:00
Celtic Minstrel
fa4ff3b106 HTTT, SoF: Fix a couple more issues found by the schema validator
With this, HTTT and SoF are now clean of schema errors
2018-05-19 16:33:05 -04:00
Celtic Minstrel
bd1b2f7a9a TRoW: [scenario] does not support bonus=yes
With this, TRoW is now clean of schema errors
2018-05-19 16:33:05 -04:00
Celtic Minstrel
da6917ee11 HTTT: Fix toplevel [story] 2018-05-19 16:33:04 -04:00
Celtic Minstrel
9ce2bb41dd TRoW: Fix a couple of issues found by the schema validator 2018-05-19 16:33:04 -04:00
Celtic Minstrel
9c1e04706b UtBS: Fix a few more issues found by the schema validator
With this, UtBS is as clean of schema errors as it'll get
(There are still two spurious errors remaining)
2018-05-19 16:33:03 -04:00
Celtic Minstrel
2e8261086c UtBS: silent= is meaningless in [object][modifications] 2018-05-19 16:33:02 -04:00
Celtic Minstrel
97f55f224b UtBS: [scenario]snapshot= doesn't seem like it would have any useful effect
(It's probably technically valid, as this key is part of the savegame WML.)
2018-05-19 16:33:01 -04:00
Celtic Minstrel
d2ac1b0323 UtBS: [objectives] does not support show= 2018-05-19 16:32:59 -04:00
Celtic Minstrel
566b3972e4 NR: [store_unit] does not support fire_event
With this, NR is now clean of schema errors
2018-05-19 16:32:57 -04:00
Celtic Minstrel
7b4ed33479 NR: [ai]villages_per_scout= is an integer 2018-05-19 16:32:56 -04:00
Celtic Minstrel
63912b8fe6 NR: Explicitly specify redundant side parameter in unit macros 2018-05-19 16:32:54 -04:00
Celtic Minstrel
05d6c84205 SoF: Fix issues found by the schema validator 2018-05-19 16:31:47 -04:00
Celtic Minstrel
9f63a36531 SotA: Fix a few more issues found by the schema validator
With this, SotA is now clean of schema errors
2018-05-19 16:31:46 -04:00
Celtic Minstrel
12789fc910 SotA: Remove weird terrain='' convention
The wiki proscribes terrain=^ for this purpose, which has the bonus
of being detected as a valid terrain code by the schema.
2018-05-19 16:31:45 -04:00
Celtic Minstrel
58220e216c SotA: Remove obsolete map headers 2018-05-19 16:31:44 -04:00
Celtic Minstrel
3586187b45 DW: Fix a couple more issues found by the schema validator
With this, DW is clean of schema errors
2018-05-19 16:31:43 -04:00
Celtic Minstrel
ae255f5b32 DW: Remove [message]duration key since it does absolutely nothing 2018-05-19 16:31:43 -04:00
Celtic Minstrel
e349e51b95 DM: Fix issues found by the schema validator
With this, DM is now clean of schema errors
2018-05-19 16:31:42 -04:00
Celtic Minstrel
80b9cd6431 DiD: Fix issues found by the schema validator
With this, DiD is now clean of schema errors
2018-05-19 16:31:41 -04:00
Celtic Minstrel
82f47cab19 HoT: Fix issues found by the schema validator
With this, HoT is clean of schema errors
2018-05-19 16:31:40 -04:00
Celtic Minstrel
d36baf2a6e EI: Fix issues found by the schema validator
With this, EI is as clean of schema errors as it's going to get.
There yet remain a number of unsolvable schema errors (due to multi-use macros).

Regarding {LOYAL_UNIT}, specifying the side here is redundant;
however, an empty side key raises an error, and it doesn't hurt
to specify the redundant information.
2018-05-19 16:31:39 -04:00
Celtic Minstrel
309a24eb1c HTTT: Fix errors found by schema validator
This fixes most of the errors, but there are still a few more to squelch.
2018-05-19 16:31:38 -04:00
Celtic Minstrel
1d98b3e405 HTTT: Unit variations don't need an ID 2018-05-19 16:31:37 -04:00
Celtic Minstrel
dd95ad08cc TSG: Fix errors found by schema validator
With this, TSG is now clean of schema issues
2018-05-19 16:31:36 -04:00
Celtic Minstrel
a798090cc1 TB: Fix errors found by schema validator
- Passing () as the side to the unit util macros results in an empty side key
  There's no reason not to just pass 1 instead though.
- [modify_side] does not support [filter]; instead it uses [filter_side]
  However, it also supports inline side which is sufficient here,
  so just use that instead.

This covers both difficulty levels; TB is now clean of schema issues.
2018-05-19 16:31:35 -04:00
Celtic Minstrel
f7d5194afa LoW: Several small fixes (misplaced keys mostly) 2018-05-19 16:31:34 -04:00
Celtic Minstrel
c6c66b222c LoW: Fix erroneous used of unrenamable and canrecruit keys in [side] when there is no unit 2018-05-19 16:31:33 -04:00
Celtic Minstrel
56aaa46d5f LoW: Remove redundant AI definitions
These are used by default, so there's no need to specifically include them.
2018-05-19 16:31:32 -04:00
Celtic Minstrel
f7e2a9794f ANL: Remove needless silent= key from [object]s
The silent key is meaningful only when using the [object] as ActionWML.
None of these are used thusly, so it does nothing.
2018-05-19 16:31:32 -04:00
Celtic Minstrel
e00c3a043e Embrace turns=unlimited as a way of specifying unlimited turns 2018-05-19 16:31:26 -04:00
Celtic Minstrel
436d99e261 Fix erroneous/useless [event] in [titlescreen_music], [lobby_music], [editor_music]
The playlist macros set the music list twice, once before the
story screen and again in prestart, but the order of tracks is different.

This means that the track order at the titlescreen and in the lobby is now the same
as the track order in a scenario using the default playlist, which previously was not the case.

Similarly, the track order in the editor is now the same as the track order
in a scenario using the full playlist.

Whether that actually matters? I have no idea. I doubt it.

In any case, as of this commit, there are no schema validation errors
at the title screen, when entering the MP Create screen, or in the map editor.
2018-05-19 16:29:41 -04:00
Celtic Minstrel
dde6fb5fff Add a command-line option to show incomplete translations in the language list 2018-05-19 16:08:12 -04:00
Celtic Minstrel
988abfaa5c Sort command-line options so the comment isn't lying 2018-05-19 15:56:11 -04:00
Martin Hrubý (hrubymar10)
b01221e420
Xcode enable all warnings in DEBUG scheme 2018-05-19 21:35:14 +02:00
gfgtdf
0e483441d8 fix require_scenario=yes not working with map_generation
this fixes require_scenario=yes for scenarios that use map_generation or
scenario_generation, the problem was that create_engine does not call
saved_game::expand_scenario for random maps, (which is the function that
checks require_scenario=yes)

fixes #3105
2018-05-19 21:09:18 +02:00
Nils Kneuper
b8ceaf637f updated Spanish translation 2018-05-19 20:08:04 +02:00
Nils Kneuper
66825b5b25 updated Chinese (Simplified) translation 2018-05-19 20:06:30 +02:00
Jyrki Vesterinen
e02939bc20 Fix build with -Werror=unused-variable 2018-05-19 16:39:18 +03:00
Jyrki Vesterinen
cf3ff8222b Changelog entry for commit c364952272
[ci skip]
2018-05-19 15:40:17 +03:00
Jyrki Vesterinen
c364952272 Listbox: don't try to keep the selected item visible (#3016)
@Vultraz stated in Discord that list box should keep the scroll position
instead.

Resolves #3016.
2018-05-19 15:32:06 +03:00
Severin Glöckner
1caadc2793 updated German translation
[ci skip]
2018-05-19 04:46:32 +02:00
Nils Kneuper
9f3248bba5 updated Chinese (Simplified) translation 2018-05-19 01:30:35 +02:00
Nils Kneuper
35a6df81c7 updated Italian translation 2018-05-19 01:29:05 +02:00
Nils Kneuper
e19bb256bc updated Italian translation 2018-05-17 21:23:46 +02:00
Nils Kneuper
6e6181ad00 updated Galician translation 2018-05-17 21:22:40 +02:00
Nils Kneuper
30004453c5 updated French translation 2018-05-17 21:21:13 +02:00
Nils Kneuper
bd5b7cd0ad British English 2018-05-17 21:19:01 +02:00
Nils Kneuper
1f0cd39560 updated Czech translation 2018-05-17 21:17:54 +02:00
doofus-01
0413209e37 Nym sword attack animation 2018-05-17 16:40:36 +11:00
Severin Glöckner
01022f552d NR S2: let Hammel not take part in combat
All this trouble is about keeping him alive after all.
And fix a spelling mistake resuling in always false.

[ci skip]
2018-05-17 03:03:19 +02:00
Celtic Minstrel
f550f2d6f5
Add missing deprecation messages for deprecated macros
This also bumps ON_SIGHTING to level 2.
2018-05-16 20:31:28 -04:00
Wedge009
2e312a6d57 Running pofix on pot files too...
[ci skip]
2018-05-16 15:33:30 +10:00
Wedge009
88d8d27b0b Running pofix
[ci skip]
2018-05-16 15:20:07 +10:00
Wedge009
9de402b58a 'moreso' isn't a word in any dialect of English.
[ci skip]

(cherry picked from commit fb866c6d13)
2018-05-16 15:00:33 +10:00
Iris Morelle
de06804414 pot and documentation update 2018-05-16 00:05:30 -04:00
Jyrki Vesterinen
b0c1382693 Allow modifying dead units in more event handlers
Namely attacker_hits, attacker_misses, defender_hits and defender_misses.
2018-05-16 05:12:32 +03:00
Charles Dang
afb13209b7 Preferences: tweaked FPS limiter option display
[ci skip]
2018-05-16 12:25:36 +11:00
Aaron Winter
f31355af0d SotBE: Changed a few dates to fit the tweaked timeline from the forums
Discussed in detail in https://forums.wesnoth.org/viewtopic.php?f=12&t=46460
2018-05-16 01:31:58 +03:00
Pentarctagon
9e0de75a75 Don't require SDL2 for building the servers.
Requiring SDL2 was masking needing to add -lpthread explicitly.
2018-05-15 15:49:02 -05:00
Charles Dang
5c2ab63448 Convert a few remaining cases of boost::uint32_t to uint32_t 2018-05-16 07:40:18 +11:00
Nils Kneuper
bccef14387 updated Spanish translation 2018-05-15 22:21:20 +02:00
Charles Dang
cfffb9be0b Revert "Save custom options data in a more concise way"
This reverts commit e3db7cc225. Turns out the
id = value syntax did not work for options in an array since '.' is not a
valid config key name.
2018-05-16 07:19:16 +11:00
Jyrki Vesterinen
b8ffe007e5 Throw a Lua exception when creating a negative-HP unit in a Lua context
Instead of throwing a WML error. This allows the UMC author to get a stack
trace if the unit creation was triggered from Lua.

Requested by @gfgtdf in a comment of #3042.
2018-05-15 20:20:41 +03:00
Severin Glöckner
f4f6f5bcdd NR S2: fix filters for Micor AIs
and allows L2 recruits if the dwarves are under attack in late game.

[ci skip]
2018-05-15 15:37:35 +02:00
Charles Dang
2667cc21cd Wesnothd: minor code cleanup 2018-05-15 22:02:55 +11:00
Charles Dang
7c19789273 Wesnothd: formatting cleanup 2018-05-15 22:02:54 +11:00
Charles Dang
be1b1b69f1 Wesnothd: dropped a giant block of commented-out code
This is a relic from the old pro-Boost ASIO implementation.
2018-05-15 21:57:29 +11:00
mattsc
1017a57f39 Replace remaining uses of FOREACH macro 2018-05-14 17:12:01 -07:00
Severin Glöckner
ed1ced196d NR S2: balance imporvements between AIs
* castle of the southwestern leader has been moved down a bit
* fixup for  gate event and troll die event not properly working
* give dwarves more gold if they are in trouble, increased income of trolls
* added micro AIs, currently not working as expected
* other minor map edits
* removed patch 9b9aa13 for #3073, the village had been moved down one hex
  for visual reasons

[ci skip]
2018-05-15 00:15:12 +02:00
Jyrki Vesterinen
dc68187999 Allow modifying dead units in last_breath and die event handlers
Fixes an unintentional API change from commit 3c344e8da5, discussed in
comments of #3042.
2018-05-14 22:06:25 +03:00
Severin Glöckner
92a0441fa8 wmllint: add campaign abilites & specials
So far only stun was in the list

[ci skip]
2018-05-14 06:06:59 +02:00
Charles Dang
91c0cafdaa Added Dunefolk description from master
[ci skip]
2018-05-14 14:17:45 +11:00
doofus-01
535de2dec1 clean-up of unit cfg 2018-05-14 13:50:23 +11:00
doofus-01
30c2b950d9 quenoth fighter attack animation 2018-05-14 13:50:23 +11:00
Thom Diment
cc4a14cf4b NR S5.1: changed SE path to remove 1-hex bottlenecks
This allows player 3 to send more enemies against the human player sooner.
If this is an issue, may be necessary to  consider changing the scenario wml
to delay this player spawning by a turn.
2018-05-14 11:58:39 +11:00
doofus-01
8e7e6d10ae outrider defense animation 2018-05-14 11:41:11 +11:00
doofus-01
4e5dc5aa58 pathfinder defense animation 2018-05-14 11:41:11 +11:00
mattsc
2f611a9c2e
Merge pull request #3079 from mattsc/lua_deprecation_fixes
Replace deprecated Lua code
2018-05-13 16:57:17 -07:00
mattsc
bf81191b21 MAI test scenarios: remove uses of deprecated MESSAGE macro 2018-05-13 15:27:15 -07:00
ln-zookeeper
24eee52d08 Fixed a remaining glitch with off-map<->water transitions 2018-05-14 00:22:52 +03:00
catagent101
abbcad42c2 TSG S07a: Fix dialogue not triggering in TSG 'Into the Depths' (#3048) 2018-05-13 23:59:25 +03:00
doofus-01
9824078478 [UtBS] replacing horses with dustboks (#3049)
* removing horses from text strings - replaced with dustboks

* adding a riderless dustbok to monsters race, needs description and probably other adjustments

* removing disengage ability and translation mark from dustbok unit file

* adding #po translation hint for name
2018-05-13 23:32:48 +03:00
gfgtdf
918da0acd4 wb: fix segfault when ending the game
fixes #3008

This is not the prettiest fix, but in particular for 1.14 stable it's
less risky than some big refactor.
2018-05-13 15:07:17 +02:00
gfgtdf
121361d302 wb: fix incorrect handling of skirmisher.
fixes #3014
2018-05-13 15:07:15 +02:00
gfgtdf
2e27f6ec81 wb: add a assertion 2018-05-13 15:04:20 +02:00
Nils Kneuper
fd46b9af62 remove executable flag from italian translation images 2018-05-13 11:28:55 +02:00
Nils Kneuper
23d71dc1e7 updated Italian translation (images) 2018-05-13 11:24:07 +02:00
Nils Kneuper
1615e699cb updated French translation 2018-05-13 11:21:10 +02:00
Jyrki Vesterinen
f40220005a MP lobby: don't attempt to restore player list scroll position too early
Fixes error messages in the log when joining the lobby.
2018-05-13 12:13:43 +03:00
Iris Morelle
bbb17fc2df wesnothd: Fix typo introduced recently causing build errors
Fixes commit 0bf09c82a5.
2018-05-13 04:05:23 -04:00
Iris Morelle
a6425a1a77 bi: Refactor report headers generation 2018-05-13 01:45:52 -04:00
Charles Dang
929a689f20 MP Lobby: used "not installed" instead of "missing" 2018-05-13 16:16:37 +11:00
Charles Dang
0bf09c82a5 Catch all exceptions (where possible) as const references
A few catch blocks modify something in their exceptions, so those are kept non-const.
2018-05-13 15:52:49 +11:00
Charles Dang
60b1124d8b Mark wml_exception::show const and formula_ai::handle_exception's argument const 2018-05-13 15:49:36 +11:00
Jyrki Vesterinen
b8c305a286 Fix compiler warning about unreferenced variable 2018-05-13 07:31:04 +03:00
Fernando Carmona Varo
67e63e825a tutorial: add labels to villages and keep
Prevents new players from mistaking the graphics
2018-05-13 14:01:30 +11:00
mattsc
0978779616 Lua random map generator: fix off-by-one error in flip transforms
Among other things, this gave HttT S17 (Sceptre of Fire) a 50% chance
of crashing at scenario start.
2018-05-12 18:38:35 -07:00
mattsc
c9ef14ad54 Do not load helper.lua where it is not used any more 2018-05-12 17:41:42 -07:00
mattsc
0396461309 Remove unnecessary inclusions of helper.set_wml_action_metatable {} 2018-05-12 17:41:42 -07:00
mattsc
8262d8273f Lua code: remove deprecated helper.set_wml_var_metatable() call
It’s not needed here.
2018-05-12 17:41:41 -07:00
mattsc
8ff8acea72 Lua code: replace deprecated helper.[gs]et_variable_array() calls 2018-05-12 17:41:40 -07:00
mattsc
c7f32b1ed5 Lua code: replace deprecated helper.child_range() calls 2018-05-12 17:41:40 -07:00
mattsc
a5bd46e172 Lua code: replace deprecated helper.get_child() calls 2018-05-12 17:41:39 -07:00
mattsc
39ed118ce2 Lua code: replace deprecated helper.get_variable_proxy_array() call 2018-05-12 17:41:38 -07:00
mattsc
acf4269f6a Lua code: replace deprecated wesnoth.get_all_vars() calls 2018-05-12 17:41:37 -07:00
mattsc
51b2dbec19 Lua code: replace deprecated wesnoth.set_variable() calls 2018-05-12 17:41:28 -07:00
Severin Glöckner
78821696c8 UtBS utils: add female string (fixup)
[ci skip]
2018-05-13 01:23:23 +02:00
Charles Dang
6ae51949d8 MP Lobby: removed "illegal map" error (see #3095)
There's still the "Error while loading the map:" error emitted by the minimap
widget, but this at least curbs the duplicates.
2018-05-13 08:54:42 +11:00
Severin Glöckner
70bb133486 NR S2: fixup prose
[ci_skip]
2018-05-12 22:01:56 +02:00
Severin Glöckner
9da91c49a4 NR S2: better conditional for victory event
previously one could trigger victory while being at
the other side of the cave wall.

[ci skip]
2018-05-12 21:41:40 +02:00
Severin Glöckner
a7e098ffe6 NR S2: improve balancing
[ci skip]
2018-05-12 20:31:11 +02:00
Severin Glöckner
d80d9cc621 Change Death Knights axe icon to fitting axe
[ci skip]
2018-05-12 20:31:11 +02:00
Severin Glöckner
be9a078bcb NR S2: flavor event: fix coordinates
[ci skip]
2018-05-12 20:31:11 +02:00
Severin Glöckner
ddcc5eeda8 updated German translation
[ci skip]
2018-05-12 20:29:48 +02:00
Severin Glöckner
31a92bca13 Nr S2: edited map:
* make north gate obvious to players
* mitigate bridges transition
* use less human castles
* don't break northern train line
* move the bridges in the Trolls keep farther behind, to be less
  vulnerabe to the northern leader

[ci skip]
2018-05-12 20:25:28 +02:00
Severin Glöckner
ed279d1aa5 NR S2: show message for northern border too
[ci skip]
2018-05-12 20:24:08 +02:00
Severin Glöckner
08e51e9e75 NR S2: refactor objectives
This has been tested enough to be backported

[ci skip]
2018-05-12 20:24:08 +02:00
Nils Kneuper
d5b6af9e5b updated Ukrainian translation 2018-05-12 10:54:19 +02:00
Nils Kneuper
c7be157254 updated Italian translation 2018-05-12 10:53:10 +02:00
Nils Kneuper
184739f120 updated British English translation 2018-05-12 10:51:33 +02:00
Jyrki Vesterinen
4f236504a4 Changelog entry for commit e79e387b29 2018-05-12 09:50:24 +03:00
Jyrki Vesterinen
e79e387b29 MP lobby: fix player list scrolling to top when it changes 2018-05-12 09:49:43 +03:00
Charles Dang
94f85b88ba Generic lambdas are C++14 2018-05-12 15:52:14 +11:00
Jyrki Vesterinen
b9050f2a98 Fix build with Visual Studio 2013
Regression from commit f40b58c156.
2018-05-12 07:33:28 +03:00
Charles Dang
539420941e MP Lobby: removed "Registered Users Only" from settings list in info tooltip
This isn't really relevant anymore since everyone is registered on the official server.
2018-05-12 15:30:50 +11:00
Charles Dang
19d0c9198c MP Lobby: sort mods list alphabetically and color "missing" text 2018-05-12 15:29:56 +11:00
Severin Glöckner
ef316bfc0d NR S2: remove second endlevel event for hamels death
This level has it's own event to handle this situation.

fixes #3091
[ci skip]
2018-05-11 21:34:03 +02:00
Severin Glöckner
a61223a551 NR S2: Avoid Tallin talking to himself
(part of #3086)
[ci skip]
2018-05-11 19:45:50 +02:00
Pentarctagon
4676889db6 Fix missing SDLMain.mm. 2018-05-11 11:20:10 -05:00
mattsc
42bcf049c1 Northern Rebirth S02_01: keep side 8 leader from wandering off too far
If he ends up on the tiny keep in the south, he can only recruit one
unit per turn, which affects the intended balance of the scenario.
Fixes #3073
2018-05-11 09:07:20 -07:00
Severin Glöckner
6773b95d70 UtBS S1: change terrain code of the death tree hex
Visually it has no effect since the embelishment is
covered by the tree image.
In the help it is now not only displayed as grass.

[ci skip]
2018-05-11 14:09:24 +02:00
Severin Glöckner
bf125851c4 UtBS: add female variations for all ability names
including the ones which do not require it,
to make it easier to reuse them

[ci skip]
2018-05-11 13:48:27 +02:00
mattsc
bf711024ff Prevent definition of wml.variables to cause deprecation warnings 2018-05-10 19:55:32 -07:00
mattsc
2922b19802 Lua code: replace deprecated wesnoth.get_variable() calls 2018-05-10 19:55:31 -07:00
mattsc
32170543fd Lua code: replace deprecated wesnoth.tovconfig() calls 2018-05-10 19:54:59 -07:00
Charles Dang
1a5ef4dab4 Filesystem/Boost: don't import boost::fileystem::path class to global namespace
This makes it a *lot* clearer that we're using the bfs class and not some function
or class defined elsewhere in our code.
2018-05-11 12:09:31 +11:00
Charles Dang
051f9232d8 Filesystem/Boost: range-for 2018-05-11 11:53:50 +11:00
Charles Dang
f40b58c156 Filesystem/Boost: formatting cleanup 2018-05-11 11:53:49 +11:00
Charles Dang
b2bce0dca1 Only redefine VOLUME_NAME_NONE if it's not previously defined 2018-05-11 11:45:06 +11:00
loonycyborg
3723c4edfa Drop flatpak manifest from stable branch since it's maintaned elsewhere
Namely at https://github.com/flathub/org.wesnoth.Wesnoth
2018-05-10 14:15:29 +03:00
Jyrki Vesterinen
250a6e569b Changelog entry for commit 9c841d134d 2018-05-10 11:02:01 +03:00
Jyrki Vesterinen
9c841d134d Fix #3065: unit halo remains after undoing a recall 2018-05-10 10:57:53 +03:00
David white
df72d8ced0 Merge branch '1.14' of https://github.com/wesnoth/wesnoth into 1.14 2018-05-09 22:30:48 -07:00
David white
3f06813fcf added use_prng preference which adds a new experimental pseudo-RNG for casual campaign play 2018-05-09 22:30:07 -07:00
Charles Dang
805a08b67c Revert "Revert tutorial string changes not covered by the pot update"
This reverts commit 8e8e62b5bc.
2018-05-10 09:25:09 +11:00
Iris Morelle
5b0602808b pofix: Update with 1.14.0 -> 1.14.1 file size rules for the website
[ci skip]
2018-05-09 18:38:53 -03:00
Iris Morelle
5a3dab4b10 pofix: Update with 1.14.0 -> 1.14.1 rules for the website
[ci skip]
2018-05-09 17:53:42 -03:00
Jyrki Vesterinen
3c344e8da5 Disallow units with negative HP
Damage calculation code can't tolerate presence of such units.

Fixes #3042.
2018-05-09 21:37:42 +03:00
Iris Morelle
b6813187e0 Add changelog entries for the workaround for issue #3050
[ci skip]
2018-05-09 04:57:10 -03:00
Charles Dang
f1808253cd Post-release version bump 2018-05-09 18:49:05 +11:00
Charles Dang
918cdfcb36 Pre-release version bump 2018-05-09 18:46:52 +11:00
Charles Dang
b1b6162656 Changelog: fixed inaccuracy
[ci skip]
2018-05-09 18:44:16 +11:00
Charles Dang
a29f30bf95 UtBS: wmlindent run
[ci skip]
2018-05-09 18:41:13 +11:00
Charles Dang
c95eb01684 Fixed a crash when using certain invalid color= values
The specific case that brought this to our attention was color=100. In case such values
are used, the color reverts back to the default color for that side, as before.

The new codepath (team::get_side_color_id_from_config) is essentially the same as the old
one but more robust (range checking, for example, the lack of which was causing the crash
before).
2018-05-09 18:36:09 +11:00
Charles Dang
a76135d107 Revert "MP Lobby: reduced frequency of network polls (100ms -> 1000ms)"
This reverts commit 5fd833a91a. It was causing the lobby to
lag up to *three minutes* behind current activity due to multiple data packets being queued
(see #3046). It seems 100 ms was enough to mask this issue.
2018-05-09 18:18:11 +11:00
Iris Morelle
db46351779 pot and documentation update without stat changes
We don't want to risk translations falling below the minimum string
count because of the additions in 1.14.1, since it's supposed to be an
emergency release.
2018-05-09 04:04:52 -03:00
Iris Morelle
9f4b5dcb6b Mark a German wesnoth-manpages string as fuzzy and fix a troff format mistake
There's extra formatting in the string that isn't there in the English
original, and there's no mention of the 'deprecation' log domain.
Furthermore, broken formatting around the 'none' log level was rendering
the manpage unbuildable.

[ci skip]
2018-05-09 04:02:30 -03:00
Iris Morelle
0a24468fb3 wam: Allow using embedded data URIs as add-on icons
[ci skip]
2018-05-08 02:26:45 -03:00
Iris Morelle
1009e8d044 Update own credits entries
[ci skip]
2018-05-08 01:44:23 -03:00
gfgtdf
f96134efcf
more debug information in icompare 2018-05-08 01:52:41 +02:00
Severin Glöckner
8e8e62b5bc Revert tutorial string changes not covered by the pot update
for the 1.14.1 release, intended to be included after tagging
again.

This reverts commit 00cccd19f5.
(a.k.a. Update text to match game-play changes, fixing #2950)

[ci skip]
2018-05-08 01:46:50 +02:00
Severin Glöckner
0f242bb045 updated German translation
[ci skip]
2018-05-08 01:41:40 +02:00
ln-zookeeper
831290638c Updated changelog 2018-05-08 00:53:22 +03:00
ln-zookeeper
784098298a UtBS: Fixed a bug in the formation ability
If a unit had for example 3 other formation units adjacent but only needed 1 to reach 70% defense, it didn't receive any benefit at all (as the corresponding [chance_to_hit] tag remained inactive).

Spotted and fix provided by beetlenaut.
2018-05-08 00:35:44 +03:00
Nils Kneuper
f77e330dbc updated German translation 2018-05-07 23:04:30 +02:00
gfgtdf
6242b1773c fix uncaught stoi exception 2018-05-07 22:40:24 +02:00
gfgtdf
08477ed455 wb: don't clear undo stack when dsu is active
since that might lead to assertion failures&oos later, fixes #3029
2018-05-07 22:40:24 +02:00
gfgtdf
9cb36be8ba
editor: don't allow bad location id strings
in particular using spaces or commas here results in invalid map files when the map is written to disk. (repoted on the forum)
2018-05-07 21:23:22 +02:00
Nils Kneuper
500f510102 updated Chinese (Simplified) translation 2018-05-07 19:45:19 +02:00
Nils Kneuper
7dc90622d1 updated Japanese translation 2018-05-07 19:44:17 +02:00
Nils Kneuper
452f0914f9 updated Italian translation 2018-05-07 19:40:09 +02:00
Nils Kneuper
c427e1e2d4 updated Galician translation 2018-05-07 19:38:51 +02:00
Nils Kneuper
6e3bdc0a74 updated Scottish Gaelic translation 2018-05-07 19:37:16 +02:00
Nils Kneuper
4d213f1a39 updated Spanish translation 2018-05-07 19:35:59 +02:00
Jyrki Vesterinen
97d2e694a1 Partial case insensitivity for translation::icompare() fallback 2018-05-07 19:43:45 +03:00
mattsc
2f960ec3e7 changelog: remove AToTB AI entry 2018-05-07 06:31:49 -07:00
mattsc
cc4325589b Revert "AToTB Chase: add custom AI controlling Muff Toras"
This reverts commit bbb151fa71.
This will be added to 1.15, but not 1.14.
2018-05-07 06:27:30 -07:00
loonycyborg
3ed366582d wesnothd: prevent another instance of crash from owner not in player_connections 2018-05-07 13:14:48 +03:00
Charles Dang
f91067fe25 Preferences Dialog: fixed inconsistent label sizes in hotkeys list 2018-05-07 11:49:20 +11:00
Charles Dang
0c0cd2ceb3 MP Lobby: bunch of small UI and text formatting tweaks 2018-05-07 11:41:27 +11:00
doofus-01
6356f34efc
[UtBS]-Graphics Update, mostly defense animations (#3035)
* quenoth ranger defense anim

* youth leading animations

* Kaleh bolas anim

* quenoth flanker defense anim

* quenoth druid defense anim

* quenoth archer defense anim
2018-05-06 17:40:20 -07:00
Nils Kneuper
a888d0e96a updated Slovak translation 2018-05-06 23:05:31 +02:00
Nils Kneuper
d4a94b6277 updated Czech translation 2018-05-06 23:03:34 +02:00
Iris Morelle
18e5ea50a7 i18n: Blind fix attempt for std::bad_cast being thrown on Windows
Several reports on Steam and our forums point at std::bad_cast being
thrown when accessing Preferences and the Multiplayer menu amongst
others. It's possible that the locale configuration on those systems is
not quite right, and compare() and icompare() are able to throw
std::bad_cast when this happens as they both use std::use_facet().

Note that much like the macOS/iOS version of icompare(), this stopgap
patch doesn't attempt to provide any form of case-insensitive fallback
and just uses a case-sensitive comparison instead.
2018-05-06 16:13:35 -03:00
sigurdfdragon
d35d262199 Help: Add wolves race description
From https://forums.wesnoth.org/viewtopic.php?f=32&t=43721&start=75#p597028

[ci skip]
2018-05-06 12:48:21 -04:00
sigurdfdragon
dd23d827e7 Help: Add falcons race description
From https://forums.wesnoth.org/viewtopic.php?f=32&t=43721&p=593757#p593757

[ci skip]
2018-05-06 12:48:21 -04:00
Wedge009
00cccd19f5 Update text to match game-play changes (fixes #2950).
[ci skip]
2018-05-06 12:06:36 -04:00
Wedge009
1bd7f80136 Update text to match changes in dialogues (fixes #2882).
[ci skip]
2018-05-06 12:06:36 -04:00
Nils Kneuper
8c5f82e0db updated Chinese (Simplified) translation 2018-05-06 17:13:22 +02:00
Charles Dang
5fd833a91a MP Lobby: reduced frequency of network polls (100ms -> 1000ms)
This also affects MP Staging and MP Join Game.
2018-05-06 22:55:19 +11:00
Lipka Boldizsár
4f46f9ba50 Fix excessive mp lobby refreshing. 2018-05-06 22:44:23 +11:00
Nils Kneuper
706180f27c updated British English translation 2018-05-06 13:43:46 +02:00
Nils Kneuper
247dd1c236 updated Czech translation 2018-05-06 13:32:30 +02:00
Iris Morelle
d4101b87d6 Update changelog for #3019
[ci skip]
2018-05-06 07:15:01 -03:00
Alexander van Gessel
32a1eaee30 Reject bad data URIs 2018-05-06 07:12:26 -03:00
Iris Morelle
fedcc6171f pot and documentation update without stat changes
We don't want to risk translations falling below the minimum string
count because of the additions in 1.14.1, since it's supposed to be an
emergency release.
2018-05-06 05:36:11 -03:00
Iris Morelle
3842d2749a Update changelog for MP server stuff from me and loonycyborg
[ci skip]
2018-05-06 05:29:48 -03:00
Iris Morelle
f399d28548 fuh: Add NOTE on the status of glob bans
[ci skip]
2018-05-06 05:21:06 -03:00
Iris Morelle
869b4c29f5 mp: Add client-side localization support for user_handler bans 2018-05-06 05:21:06 -03:00
Iris Morelle
27a5eb4b8a wesnothd/fuh: Check IP address bans before everything else
There isn't much point in doing more expensive ban look ups first.

(Also, yes, I am aware that as it is there's still two SELECT queries
that could be coalesced into a single one -- namely, the ones for the
user_email and user_id columns.)
2018-05-06 05:21:06 -03:00
Iris Morelle
ec4af12994 wesnothd: Report different user_handler ban types
This enables reporting back to the client the specific type of ban that
affects the account. This information is already normally provided by
phpBB when trying to view a page while banned, so we are not leaking any
new information here.

There isn't an API to retrieve the (user-visible) ban reason from the
ban list yet. It's probably not worth worrying about it since affected
users can see it when navigating to forums.wesnoth.org anyway.
2018-05-06 05:21:06 -03:00
Iris Morelle
bea9de0885 wesnothd: Initial support for checking forum bans during login
This adds a user_is_banned() method to the user_handler classes that
returns whether a given username (and optionally IP address) is banned
by the user_handler platform. Obviously right now this is only intended
to work with forum_user_handler and phpBB.

Forum bans are checked against entries in the banlist table using
username (actually user id), IP address, and email address where
applicable. A user matching a ban on any of those three items will not
be permitted into the server *unless* they have the moderator flag set.
It might be worth making an exception for board founders as well,
although that is probably orthogonal to this patchset.

Right now there are a few missing items:

 * The server sends clients an error that allows them to try again with
   a different username/password combination immediately. Nothing stops
   them from causing noise in the server logs this way, so we probably
   need to ensure this counts as an authentication failure for the
   purpose of temporarily and automatically banning the IP address.

 * The user handler doesn't allow retrieving details about the ban, so
   all that the main server code can do is report back to the client as
   their nickname being banned, when this is not necessarily the case
   (email or IP address bans). I need to figure out a better API for
   retrieving this info.

 * Likewise, the server does not log the specifics about the matched ban
   yet unless the mp_user_handler log domain is set to the info log
   level.

 * There's no i18n support on the client side for the error message sent
   by the server -- which is going to change anyway.

 * Testing this patch uncovered an issue with the MP client not
   displaying messages sent during the login sequence, including the mod
   authentication notice.
2018-05-06 05:21:06 -03:00
Charles Dang
4fb2a52d69 MP Lobby: rearrange player list nodes and have Selected Game also expanded by default 2018-05-06 17:33:53 +11:00
Charles Dang
10bf238525 GUI2/Chatbox: attempt to send roomless messages to the active room first
Fixes #2775. Server messages in particular are roomless, so now they should appear in
whatever tab (PMs included) you have open.
2018-05-06 17:05:48 +11:00
Charles Dang
b1aa101009 Increased in-game chat size. This makes it render more smoothly
Thanks to @ProditorMagnus for the suggestion.
2018-05-06 16:50:59 +11:00
Charles Dang
d84d7b0e72 MP Lobby: removed Refresh button
I'm not 100% sure about this change, but I think its presence was rather confusing and
it (hopefully) shouldn't ever be needed.
2018-05-06 16:50:02 +11:00
Charles Dang
9d8d8af596 MP Method Selection: clarified the account requirement for the official server
Also sets the tooltip type for this dialog back to bottom-of-the-screen ones instead
of floating ones. And some formatting cleanup to the C++.
2018-05-06 16:41:31 +11:00
Iris Morelle
7532b25aae pofix: Add 1.14 announcement typo fix
[ci skip]
2018-05-06 02:38:32 -03:00
Iris Morelle
da4d2b098c gui2/unit_attack: Only display active specials on the weapons list
This fixes issues reported on the forums where the weapons list now
includes weapon specials even when they aren't active, a regression from
1.12.x.

Closes #3033.
2018-05-06 00:40:16 -03:00
Charles Dang
bf18a424d9 Shuffled a few credits entries around
[ci skip]
2018-05-06 12:45:20 +11:00
Celtic Minstrel
c72932b3ba Update credits
* Add @neoedmund, @fujimo-t, and Zoomo
* Add @singalen's alias
* Correct @GregoryLundberg's alias
2018-05-05 21:14:50 -04:00
Celtic Minstrel
bf3ece140e Minor tweaks to classic theme (thanks enclave for doing this)
No forward-port to master, as the classic theme will be removed in 1.15.0
2018-05-05 19:12:34 -04:00
Charles Dang
9c680149bd UtBS: wmlindent pass
[ci skip]
2018-05-06 06:40:37 +11:00
gfgtdf
1a135b7e00 wb: prevent unit id conflics
the wb recruit actions store temp units with fake ids and live longer
than a turn, so resetting the underlying id counter between turns might
result in dublicate id errors in wb recruit actions ( #1517 ), which
might lead to errors later.

With this it is of course possible to get erros when more than 2^31 (or
2^63 on a 64 bit wesnoth version.) fake units are generated during a
game, but that is less likely.
2018-05-05 21:10:18 +02:00
gfgtdf
64273a4c3b add a comment 2018-05-05 21:04:51 +02:00
gfgtdf
54e5c54c79 wb: fix 'insufficient movement' wanring when a move is interrupted 2018-05-05 19:54:35 +02:00
gfgtdf
852e50a2ef wb: more detailed error message 2018-05-05 19:54:34 +02:00
gfgtdf
e2a2a85f16
Update RELEASE_NOTES 2018-05-05 19:16:06 +02:00
mattsc
15a749994c Update changelog for custom AI for AToTB S2 2018-05-05 08:59:11 -07:00
mattsc
dbddf082fe
Merge pull request #3003 from mattsc/atotb_chase_ai
AToTB Chase: add custom AI controlling Muff Toras
2018-05-05 08:42:18 -07:00
gfgtdf
8081114ac0 add todo 2018-05-05 17:05:53 +02:00
gfgtdf
0de2e693ab wb: fix planned units under fog cannot be selected 2018-05-05 17:05:51 +02:00
gfgtdf
02749cb73d wb: silence "Unable to build future map" warning 2018-05-05 15:58:37 +02:00
gfgtdf
d089560861 fix comment 2018-05-05 14:52:34 +02:00
gfgtdf
17c74ddc97 wb: fix rare OOS caused by recall action
previously having a planned recall action could change the order of
units in the recall list, which might for example change which unit is
recalled by a [recall].
2018-05-05 14:52:34 +02:00
gfgtdf
f105da7e35 wb: fix recall actions changing gamestate
The firstproblem was that:
apply_temp_modifier adds the temp_unit_ to the map, then
remove_temp_modifier adds the temp_unit_ from the map to the recall
list, which resulted in the original recall unit beeing replaced by the
temp_unit_ of the recall_action We fix that by making sure that
temp_unit_ is always the same as athe recall unti not just a copy.

The second problem was that remove_temp_modifier reset the unit mp/ap to
a value differnt form the original mp/ap which could casue OOS later
since the ap/mp might be changed form that unsynced context, we fix that
by resetting the mp/ap in remove_temp_modifier
2018-05-05 14:52:33 +02:00
gfgtdf
7d97591f1d wb: fix moved becoming invalid after recruit is executed 2
turned out 8bdccca7 was not enough because the mapbuilder erroneously
reset the units movement to full directly before it was applied. Since
the `resetters_` code in mapbuilder.cpp does not apply to
recruited/recalled units, we also have to reset the units mp in
remove_temp_modifier.
2018-05-05 14:52:33 +02:00
loonycyborg
688edfa5ee wesnothd: add a check to prevent crash from accessing game owner not in player_connections_ 2018-05-05 13:39:12 +03:00
Jyrki Vesterinen
f90fac628e Changelog entry for commit d7921f31b0 2018-05-05 10:13:37 +03:00
Jyrki Vesterinen
d7921f31b0 Add an option to disable FPS limiter 2018-05-05 10:10:48 +03:00
mattsc
fb3697a502 AToTB Chase: add custom AI controlling Muff Toras 2018-05-04 20:25:32 -07:00
Charles Dang
6111939d4b MP Lobby: kept the titles of reloaded games with vacant slots yellow 2018-05-05 13:59:23 +11:00
Charles Dang
06d1aa7c5d Yet even more additional supplementary additive fixup 2018-05-05 13:31:40 +11:00
Charles Dang
f33b33b51c Fixup 293add8 2018-05-05 13:00:48 +11:00
Celtic Minstrel
a69b330df7 SotA: Avoid use of 'kids' to address Carcyn and Shynal
This is intended to address concerns raised by @beetlenaut that the two are not young enough to be referred to as 'kids'.
2018-05-04 21:37:14 -04:00
Celtic Minstrel
d43b496e69 Fix #2894 2018-05-04 21:37:14 -04:00
Celtic Minstrel
6a27781671 Fix #2875 2018-05-04 21:37:14 -04:00
Celtic Minstrel
16d6342fa2 Fix gender-dependent strings in SotA involving the kids 2018-05-04 21:37:14 -04:00
Celtic Minstrel
921525f7f7 Fix #2848 2018-05-04 21:37:14 -04:00
Celtic Minstrel
355709a455 Fix #2857 2018-05-04 21:37:14 -04:00
Charles Dang
88a3489d28 MP Lobby: base resolution selection on window width not height
[ci skip]

Height isn't the problem. The default lobby can display fine even at 600 px h. Width is
the problem the default layout faces at low resolutions, and it was quite odd to have a
really wide window use the low resolution layout, despite there obviously being enough
horizontal space to fit the sidebar.
2018-05-05 12:32:03 +11:00
Charles Dang
3cff24b6f4 MP Lobby: fixed every single user name being bold
If everyone's registered... no one is. :P
2018-05-05 12:32:02 +11:00
Charles Dang
e3eca499ca MP Lobby: decreased size of scenario/era name label
[ci skip]

Will slightly mitigate the issue of it potentially getting too long...
2018-05-05 12:32:01 +11:00
Charles Dang
c86e0e30f3 MP Lobby: shifted game info icon to the left
[ci skip]
2018-05-05 12:32:00 +11:00
Charles Dang
f150170148 MP Lobby: added status text for full games 2018-05-05 12:31:59 +11:00
Charles Dang
09c5c4acca MP Lobby: restored Era info to main game display
Includes some slight spacing tweaks.
2018-05-05 12:31:58 +11:00
Charles Dang
faa44232ff Added some changelog entries for UtBS
[ci skip]
2018-05-05 12:31:58 +11:00
Charles Dang
f495feef62 MP Create Game: cap custom game names at 50 characters
[ci skip]
2018-05-05 12:31:57 +11:00
Charles Dang
293add85a1 GUI2/Size Lock: ensure formula sizes are recalculated as necessary.
This is similar to the change made for spacers in da5f00c2b6.
It also fixes an issue with the MP Lobby chat box (and other such widgets that use formulas
for their fixed dimensions) where it would stay too small after a window resize (the chat
box formulas in all three dialogs it appears in are a percentage of window height).
2018-05-05 12:31:56 +11:00
gfgtdf
ac44c9101a remvoe spammy debug message. 2018-05-05 02:03:12 +02:00
gfgtdf
06118bbac8 wb: fix moved becoming invalid after recruit is executed 2018-05-05 01:58:33 +02:00
loonycyborg
7a56448e95 wesnothd: process wml commands one at a time in handle_read_from_player
as is done in rest of wesnothd. This also fixes crash from self-kick
due to it trying to continue processing looking for further tags
after /query kick kicked the user in quesion.
2018-05-04 19:07:21 +03:00
Iris Morelle
a5fe2c933c Fixed some issues with desynced changelogs and incorrect capitalization/order
[ci skip]
2018-05-04 07:05:25 -03:00
Iris Morelle
359a37b4c5 mp: Improve display of wesnothd client errors in general
Besides replacing the "End of file" error when getting disconnected from
the server under unexpected circumstances (e.g. because the server died)
with a translatable and more intuitive message, this also makes it so
other network error messages ("Connection refused", "Host not found",
etcetera) are displayed in the UI in a slightly clearer fashion, and in
an error dialog that must be dismissed with a click on a button, instead
of a transient message that can be easily missed due to an accidental
misclick.

Closes #3005.
2018-05-04 07:05:25 -03:00
ln-zookeeper
d2be366858 UtBS: Fixed some obsolete references to old elf units, weapons and hair
In S03, also removed one extra instance of the word "champion" from the same string.
2018-05-04 12:54:09 +03:00
loonycyborg
24431d710c wesnothd: fix game host kick command kicking host itself instead of intended target 2018-05-04 12:25:32 +03:00
ln-zookeeper
a767a2459b EI S11: Fixed units incorrectly costing upkeep after leveling up 2018-05-04 11:19:37 +03:00
Pentarctagon
b8ecbaa354 Fix cmake compiling with spaces in directory names. 2018-05-04 01:33:29 -05:00
Charles Dang
2e09886a56 MP Lobby: improved low-resolution layout
[ci skip]

* Removed unnecessary spacer line.
* Increased chat area height by 10% .
2018-05-04 16:01:53 +11:00
Severin Glöckner
79c3bb56e1 update German translation
[ci skip]
2018-05-04 06:53:23 +02:00
Severin Glöckner
483bae61b5 Lobby mouseover: rename Gold to Gold per Village 2018-05-04 06:53:23 +02:00
Charles Dang
e67f633c4b MP Lobby: highlight the titles of MP games with vacant slots 2018-05-04 14:59:17 +11:00
Charles Dang
5bf90befc2 MP Lobby: used specific colors instead of pango presets
The Pango presets are usually a little darker than we want, so this makes the colors POP.
2018-05-04 13:50:07 +11:00
Charles Dang
25228db7ff GUI2/Chatbox: fixed close button being shown for lobby tab when reloading log
Fixes #2992.
2018-05-04 13:08:19 +11:00
Charles Dang
9dc1dd4655 MP Lobby: removed individual Join/Observe buttons for each game 2018-05-04 13:04:20 +11:00
loonycyborg
c87aa0c5b2 wesnothd: fix crash from using reference to deleted object 2018-05-04 02:57:02 +03:00
Severin Glöckner
b2e6b7c253 Changelog - correct i18n entry
[ci skip]
2018-05-04 00:23:52 +02:00
Nils Kneuper
979ef35e7f updated Galician translation 2018-05-03 21:22:31 +02:00
gfgtdf
0745eb94a3 wb: fix moves for planned recruits
the for those moves get_unit() might return nullptr when it is
when the future map is not applied and some codes deduced from
that that the action is invalid. So we make sure that code does
not rely on get_unit().
2018-05-03 19:42:19 +02:00
gfgtdf
576bdea529 wb: add debug info 2018-05-03 19:42:19 +02:00
gfgtdf
05ab8e275f wb: cleanups & add debug message 2018-05-03 19:42:18 +02:00
gfgtdf
5412a24b05 wb: fix crash when using planning mode mode with dsu
fixes #1599 . we now automaticllay disable dsu when enabling planning mode
2018-05-03 19:42:18 +02:00
gfgtdf
729d6b6fc2 wb: update following moves when a recruit is executed
After a recruit action was executed the id of the unit was changed so we
need to update the unitid of all following actions on that unit
2018-05-03 19:42:18 +02:00
gfgtdf
b6e8a5b91d wb: refactor out get_unit() calls
there have been reported many assertion failures due to get_unit()
returning nullptr, so we try not to rely on get_unit() whenever
possible.
2018-05-03 19:42:17 +02:00
gfgtdf
639cf20a73 wb: fix nullptr assertion when log is enabled 2018-05-03 19:42:17 +02:00
Severin Glöckner
a7018d06ff German translation fixes
[ci skip]
2018-05-03 19:40:15 +02:00
Severin Glöckner
0bd286e46e TRoW: revert changes, to avoid a potential OOS
[ci skip]
2018-05-03 19:40:15 +02:00
Iris Morelle
d524a77221 Document --log-none in wesnoth(6)
See commit 49ad25fc69.

[ci skip]
2018-05-03 14:11:35 -03:00
Iris Morelle
350865bffc Fix wesnoth(6) claiming the default log level is error
It's been warning since version 1.9.0.

[ci skip]
2018-05-03 14:04:47 -03:00
loonycyborg
0a2103b146 wesnothd: Fix remaining incorrect uses of simple_wml::get_attr instead of get_attr_dup 2018-05-03 12:19:18 +03:00
doofus-01
aa772cbe5d fix TOD lighting for sleeping Kaleh, and make sure Zhul is facing the right way in opening scene 2018-05-03 05:33:32 +11:00
doofus-01
fe6361a367 Bolas animations for Nym 2018-05-03 05:33:32 +11:00
doofus-01
042a07f3f0 defense animations for shaman 2018-05-03 05:33:32 +11:00
doofus-01
dedce25140 update to flanker and ranger base sprites 2018-05-03 05:33:32 +11:00
doofus-01
2493cc4fd9 quenoth shaman and druid sprites 2018-05-03 05:33:32 +11:00
doofus-01
8060e6d47d edit first scenario to remove female gender specifications for units that have no such variation. 2018-05-03 05:33:32 +11:00
doofus-01
6aea2eaf38 smashed tree is no longer a terrain, just a scenario graphic 2018-05-03 05:33:32 +11:00
doofus-01
634cb51443 adding smashed tree terrain for first scenario 2018-05-03 05:33:32 +11:00
doofus-01
ea92bbfa58 dead elf image requested in issue #2962 2018-05-03 05:33:32 +11:00
doofus-01
d251133632 adding minimal bow frames for quenoth youth Kaleh 2018-05-03 05:33:32 +11:00
doofus-01
69d245b47f minor orcish flag update 2018-05-03 05:33:32 +11:00
galegosimpatico
c14ba6a42e Bump program version. 2018-05-03 05:28:18 +11:00
Charles Dang
96315b39c0 Slightly less harsh unknown map terrain code error message 2018-05-03 05:25:54 +11:00
Charles Dang
7c8c3114b9 Ditch the "titlescreen" nomenclature for player-visible strings 2018-05-03 05:25:53 +11:00
Jyrki Vesterinen
232715abaf Changelog entry for commit 6d3aebe127 2018-05-02 14:50:38 +03:00
Jyrki Vesterinen
6d3aebe127 Error message when trying to save a screenshot in an unsupported format 2018-05-02 14:49:53 +03:00
Iris Morelle
d0f6e0172f Remove extraneous punctuation
[ci skip]
2018-05-02 05:21:35 -03:00
Iris Morelle
170b3f008c gui2/log_settings: Permit disabling logdomains (log level -1) 2018-05-02 05:14:28 -03:00
Charles Dang
b9dd04e71b Repair 79ad366 in the non-downward direction 2018-05-02 19:06:15 +11:00
Charles Dang
4517a7b095 Changelog entry for the misleading tooltip text fix
[ci skip]
2018-05-02 18:58:19 +11:00
Iris Morelle
6a0efce63b Changelog entry for the fix for issue #2837
[ci skip]
2018-05-02 04:54:08 -03:00
Iris Morelle
37e692266c gui2/log_settings: Make log options tooltips translatable
Fixes #2837.
2018-05-02 04:51:25 -03:00
Iris Morelle
41f159d1c0 Add changelog entry for reapplied SotA unit name fixes
[ci skip]
2018-05-02 04:49:52 -03:00
Iris Morelle
bf41826aa7 Replace a few instances of "mermen" with "merfolk" in core descriptions
These are only the ones were it's sufficiently unambiguous that the
description is referring to the merfolk race at whole. There are a few
instances I didn't touch were it's possible that the text refers
exclusively to mermen fighters (e.g. "the mermen armies").

See issue #2940.

[ci skip]
2018-05-02 04:49:01 -03:00
Iris Morelle
32896078a0 Change the plural race name for merfolk to Merfolk
See issue #2940.

[ci skip]
2018-05-02 04:49:01 -03:00
Charles Dang
d4818923b2 Merge branch '1.14' of github.com:wesnoth/wesnoth into 1.14 2018-05-02 18:46:43 +11:00
Charles Dang
0c8fd2cb37 Fixed Boost header deprecation warning on 1.67 and later
Also removed one unnecessary inclusion of the header of the same.
2018-05-02 18:46:27 +11:00
Iris Morelle
97cc0f8afb Re-apply patches to fix issues #2844 and #2846 in SotA
This restores the changes from the following commits:

 * "SotA S2: fixed inconsistency between unit name and dialog (fixes #2844)" - commit ab9f29a7a4
 * "SotA S8: fixed inconsistent Ghost name (fixes #2846)" - commit fc6c3ac04b
2018-05-02 04:39:03 -03:00
Charles Dang
79ad366d09 Some refactoring of preferences-related hotkey info storage (fixes #2953)
This commit does a few things:

First, it moves the hotkey category names out of the preferences dialog and into
the more appropriate hotkey file. Each name is now properly mapped to its corresponding
category enum, so we don't have to worry about that anymore.

Second, it adds a new mapping of hotkey categories to commands so one can easily fetch
a list of hotkeys in a given category.

Third, it excludes categories with no hotkeys from the filter dropdown in the Prefs
dialog (this is the part that actually fixes the bug above).

This also includes a slight behavior change to hotkey type filtering. Previously, if a
hotkey's category didn't match any of the ones listed in the dropdown, that hotkey's
row visibility would be set to the toggle state of the first row in the filter dropdown.
Now it gets set to false.
2018-05-02 18:36:05 +11:00
gfgtdf
122e9a7758 improve side drop message fixes #2820 2018-05-02 18:29:35 +11:00
gfgtdf
4fb2cd41ae improve mp sync waiting message 2018-05-02 18:29:34 +11:00
Celtic Minstrel
514594490b Add the advanced prefs entry for the deprecation setting 2018-05-02 18:29:33 +11:00
Severin Glöckner
d479e57bdc Tutorial: fix two strings
This is one of the white on map messages
they never use punctuation characters for ending the instructions

Can't be pofixed.
[ci skip]
2018-05-02 18:29:33 +11:00
Severin Glöckner
453f8bcdec Tutorial: remove forgotten bracket and superfluous space
[ci skip]
2018-05-02 18:29:32 +11:00
Severin Glöckner
5471b530d0 Tutorial: Button was renamed, update text accordingly
[ci skip]
2018-05-02 18:29:31 +11:00
Severin Glöckner
10af777cfa Fix misplaced </span> tag 2018-05-02 18:29:31 +11:00
Charles Dang
0fc43b0856 MP Create Game: fixed campaign player numbers label being untranslatable
Fixes #2861.

Also changed the logic for when the "min to max" label is shown from != to >.
2018-05-02 18:29:30 +11:00
Severin Glöckner
a6c722145a TRoW: readd leaderhip
(as 1st ability)

[ci skip]
2018-05-02 07:23:54 +02:00
Severin Glöckner
b800d68619 TRoW: Remove leadership from Lvl. 1 Wesfolk leader
as there are no Lvl. 0 units.
2018-05-02 07:06:06 +02:00
Severin Glöckner
3a93af23ba German translation fixes
[ci skip]
2018-05-02 07:06:06 +02:00
Severin Glöckner
797c5f68ec UtBS: remove submerge ability from Skeleton Rider
since he can't move onto deep water.
There is no deep water in the relevant scenario either.
Aim of this change is to improve the help entry.

[ci skip]
2018-05-02 07:06:06 +02:00
Charles Dang
ab26309d2d Threw out the extraneous default core description
[ci skip]
2018-05-02 15:49:19 +11:00
Charles Dang
414cc44477 Game Load: uncomment "open saves folder" button tooltip (resolves #2881)
[ci skip]
2018-05-02 12:49:09 +11:00
Charles Dang
ac5da37e51 MP Method Selection: removed text saying registered nicknames are optional
[ci skip]

This is currently only the case on the 1.14 server, but it's easiest just to
remove the line completely rather than constantly adding or re-adding it based
on whether you're using a or dev series.
2018-05-02 12:34:04 +11:00
Charles Dang
94b7a558bb Added trailers credits section
[ci skip]
2018-05-02 11:21:35 +11:00
Nils Kneuper
ae00fa200b updated Spanish translation 2018-05-02 00:02:22 +02:00
Martin Hrubý (hrubymar10)
6950086ac7
Use pango and cairo from MCS until #2859 will be fixed 2018-05-01 18:49:59 +02:00
Iris Morelle
43f30cdd61 Clear RELEASE_NOTES
[ci skip]
2018-05-01 03:27:16 -03:00
gfgtdf
fd5fdd8ebb wb: more robust side_actions_container::erase
i don't really know why the old code had a special case for
`get_turn(next) != turn_of_position`, from what i see `turn_end(0)`
would basicially return the same value as `next`. The new code removes
that special case which resulted in assertion failures before (#1841)
and also consiers the case where `position` appears multiple times in
`turn_beginnings_`
2018-04-30 19:42:21 +02:00
gfgtdf
1f2f46b27a wb: more robust side_actions_container::get_turn
the assumption

(turn_beginnings_[num] == it) => (get_turn(it) == num)

might be wrong in case that we have a turn with no actions, in which
case turn_beginnings_ contains duplicates and we actually want the upper
bound of (x <= it) in turn_beginnings_
2018-04-30 19:42:21 +02:00
gfgtdf
edb4d2cf04 wb: fix future unit sprite missing
fixes #2124
2018-04-30 19:42:20 +02:00
gfgtdf
55065e10d4 fix [on_undo] in menu items and custom_command
also fixes menu items beeing marked as undoabel even if they used the
synced rng.
2018-04-30 19:42:20 +02:00
Victor Sergienko
fd370f5b95 #2971 Scrolling with arrow keys can get stuck 2018-04-30 20:13:25 +03:00
Nils Kneuper
72133d83ee updated French translation 2018-04-30 13:48:28 +02:00
Charles Dang
d724b1a71d Repair 66ab35f in the upwards direction
[ci skip]
2018-04-30 22:24:37 +11:00
Charles Dang
66ab35f3ff GUI2: removed unnecessary spaces and newlines from color macros
[ci skip]

Since these are usually used inline or as key values, we don't need the extra padding.
2018-04-30 22:21:32 +11:00
Charles Dang
77545e6700 MP Create Game: keep background image width proportional to its height
[ci skip]
2018-04-30 21:21:56 +11:00
Charles Dang
5e72b5ded4 Skeletal Dragon: discarded colored background full-alpha pixels I noticed
[ci skip]
2018-04-30 13:04:54 +11:00
Charles Dang
1c499939a9 TRoW: new Lord Logalmier sprite by Kasdel with minor tweeks by @doofus-01
[ci skip]

See https://forums.wesnoth.org/viewtopic.php?p=625519#p625519
Resolves #2985.
2018-04-30 12:12:52 +11:00
Celtic Minstrel
b68480ade5 GUI.pyw: Fix wmlxgettext run failing if the output file already exists 2018-04-29 14:03:14 -04:00
gfgtdf
c01b2b2847 editor: don't write default values when saving a scenario 2018-04-29 20:31:48 +11:00
gfgtdf
5149e65449 fix handling of no_leader= (again)
previously, if people wanted to make use of mp leader selection in mp
campaign they had to sxplicitly set no_leader=no and faction_lock=no,
with the new code its clear that no_leader= is just an alias for
faction_lock with type
2018-04-29 20:31:48 +11:00
Nils Kneuper
4eb40da08b update Slovak translation 2018-04-29 11:30:34 +02:00
Nils Kneuper
151b571f7a updated Italian translation 2018-04-29 11:28:48 +02:00
newfrenchy83
3fdfcec07d Update wesnoth.cbp 2018-04-28 12:36:48 +03:00
Gregory A Lundberg
c3fb945f7d
Fix doccomment error
Remove lame doccomments.
2018-04-27 22:43:42 -05:00
Steve Cotton
56d3ac8371 Make CMake error-out if required libraries aren't found
It seems that FIND_PACKAGE_HANDLE_STANDARD_ARGS is doing a case-sensitive
search for whether the find_package flags included REQUIRED.
2018-04-27 15:56:32 -05:00
Nils Kneuper
4e1549f137 updated Italian translation 2018-04-26 22:55:32 +02:00
gfgtdf
d321024ff3
fix a %->$ in german translation 2018-04-26 18:24:30 +02:00
Martin Hrubý (hrubymar10)
ff26057382
Add changelog for 1.14.0 2018-04-26 10:39:14 +02:00
Charles Dang
fbc20dc116 Post-release version bump 2018-04-26 12:12:23 +11:00
Charles Dang
f5fd48dafd Pre-release version bump 2018-04-26 11:47:02 +11:00
loonycyborg
6fe9b603cf pot-update and regenerate doc files 2018-04-26 03:42:18 +03:00
Severin Glöckner
f35f7f50ef restore fixed German manpage
[ci skip]
2018-04-26 02:09:41 +02:00
ln-zookeeper
d02b9a90c2 UtBS: Include both Kaleh and Nym in Quenoth Youth unit description 2018-04-26 02:52:56 +03:00
Severin Glöckner
8044bb512e add placeholer links to appdata file 2018-04-26 01:53:40 +02:00
Severin Glöckner
c35cfda0ad remove broken German manpage file
[ci skip]
2018-04-26 01:52:01 +02:00
Severin Glöckner
e0295f978c updated German translation
[ci skip]
2018-04-26 01:52:01 +02:00
ln-zookeeper
f94c0a7fc5 UtBS S09: Avoid random gender and traits for Hekuba
The simplest if not the most elegant fix.
2018-04-26 02:32:51 +03:00
Iris Morelle
722637c59a Hide Editor help section
See isssue #2964.

[ci skip]
2018-04-25 20:25:11 -03:00
ln-zookeeper
0b5d8371dd UtBS: Avoid random traits for Eloh's appearances 2018-04-26 02:17:15 +03:00
ln-zookeeper
c93a8d9053 UtBS: Use core portraits for Esanoo, Rogrimir and Grog
These were the only remaining character portraits in the old style, so they would stick out among the new ones.
2018-04-26 01:59:40 +03:00
Severin Glöckner
c51cfa7c4c fix syntax error in Japanese manpage
[ci skip]
2018-04-26 01:01:09 +02:00
Severin Glöckner
eafd886b17 updated german translation
[ci skip]
2018-04-26 00:59:50 +02:00
ln-zookeeper
f7ea4455a9 Updated changelogs 2018-04-26 01:09:37 +03:00
Charles Dang
593115e9af UtBS: removed existing story images
[ci skip]

Not up to current standards, and besides, one of them uses the old Kaleh portrait.
2018-04-26 04:35:50 +11:00
Severin Glöckner
af68ee3605 Adjust the weapon names of the heroes to better fit their portraits
[ci skip]
2018-04-25 19:28:22 +02:00
Charles Dang
ec7ccf398d UtBS: final set of updated character portraits by LordBob
Elyssa no longer has a Silver Mage portrait variant.
2018-04-25 23:46:40 +11:00
Charles Dang
a19ea57213 Fixup 2b0e2b1 2018-04-25 16:32:35 +11:00
Charles Dang
2b0e2b1dee Enable filtering of displayed languages by percent complete again
Languages over 80% complete in the core domains are shown.
2018-04-25 16:10:04 +11:00
Charles Dang
6477d8bf08 More changelog updates
[ci skip]
2018-04-25 14:24:20 +11:00
Charles Dang
2e7a6b3ef9 Changelog entry for the Dark Forecast fix
[ci skip]
2018-04-25 14:15:31 +11:00
Charles Dang
9380168eb9 UtBS: new Quenoth Shyde sprite by Jetrel
[ci skip]
2018-04-25 14:09:33 +11:00
Jyrki Vesterinen
898d661b03 Show chat logs (excluding lobby) also in MP Join Game 2018-04-24 19:29:12 +03:00
Jyrki Vesterinen
1940f3d67c Hide lobby chat log in MP staging screen
Because updating and sending messages to lobby in staging screen hasn't
been implemented, showing lobby history there would be confusing
(it would look as if everyone had stopped talking).
2018-04-24 19:16:22 +03:00
Severin Glöckner
864d8677f2 UtBS: readd do_not_list
The unit database may rely on this

[ci skip]
2018-04-24 15:28:29 +02:00
Iris Morelle
6cb07f5968 pofix changes for UtBS S10 typo fix
[ci skip]
2018-04-24 08:47:25 -03:00
Iris Morelle
e03c3a09fa UtBS S10: Fix typo reported by zookeeper
[ci skip]
2018-04-24 08:45:48 -03:00
Iris Morelle
5094982432 THoT: Port prose punctuation fix from core
This is from commit 1340c005b3.

[ci skip]
2018-04-24 08:44:21 -03:00
ln-zookeeper
800418555e UtBS: Remove old Naga Hunter portrait and use core Naga Fighter instead 2018-04-24 13:44:49 +03:00
ln-zookeeper
f108f0771c UtBS S08: Use Eloh's raged portrait variation when she gets angry 2018-04-24 13:25:53 +03:00
ln-zookeeper
48cf35bcdf UtBS: Wire in Nym's moody portrait variation 2018-04-24 13:05:26 +03:00
ln-zookeeper
f8971ed6e9 UtBS: Wire in Zhul's winged portrait variation 2018-04-24 12:13:07 +03:00
ln-zookeeper
6ca5712b7c UtBS: Fixed some missing/erroneous special notes 2018-04-24 11:57:07 +03:00
Charles Dang
3dc51ef87f Various changelog updates
[ci skip]
2018-04-24 18:47:38 +11:00
Charles Dang
1f69b3490c UtBS: initial set of new character portraits by LordBob (more to come)
[ci skip]

Nym's moody variant and Zhul's Shyde variant aren't wired in yet.
2018-04-24 18:29:18 +11:00
Nils Kneuper
d4ad5b1bcc updated Slovak translation 2018-04-24 08:27:48 +02:00
gfgtdf
37c913c173
fix lua error in 2p_Dark_Forecast 2 2018-04-24 00:43:45 +02:00
Nils Kneuper
c1f4cd52cc updated Japanese translation 2018-04-23 23:40:22 +02:00
Nils Kneuper
cee062c754 updated Scottish Gaelic translation 2018-04-23 23:35:03 +02:00
Nils Kneuper
37a899ee88 updated Spanish translation 2018-04-23 23:33:48 +02:00
Nils Kneuper
41c701026e updated Polish translation 2018-04-23 23:31:50 +02:00
Jyrki Vesterinen
9595307989 Fix rare crash in AI code
Reported in https://forums.wesnoth.org/viewtopic.php?p=626344#p626344

Regression from commit a3d5b9d603.

The crash occurred when
* the attacker had only one weapon
* the said weapon was disabled, and
    - the defender had no weapons
    - the defender had only one weapon, or
    - all defender's weapons were disabled
2018-04-23 19:29:19 +03:00
Severin Glöckner
ca16166f1a Dark Forecast: fix untranslatable string by
reusing the one from the Campaign Selection Menu

[ci skip]
2018-04-23 15:13:27 +02:00
loonycyborg
8acbc3878d wesnothd: refuse to send whispers from observers to players in same game
wesnothd <= 1.12 did this too, this restores old behavior
2018-04-23 14:15:55 +03:00
newfrenchy83
a24987fe63 Update wesnothd.cbp 2018-04-23 11:59:52 +03:00
Charles Dang
64f944fc25 UtBS: set campaign icon TC back to red
[ci skip]

Brown just didn't look great.
2018-04-23 17:10:39 +11:00
doofus-01
1544ec9b1b Kaleh base and two defense sprites 2018-04-23 17:07:10 +11:00
doofus-01
cd5b641226 updates to Nym sprite and basic animations, and corrupt-elf sprite 2018-04-23 17:07:10 +11:00
newfrenchy83
66ac0bb1b2 Update wesnothd.cbp 2018-04-23 13:52:19 +11:00
newfrenchy83
12bd7c0b8c Update wesnoth.cbp 2018-04-23 13:52:19 +11:00
ln-zookeeper
b8bf9b3806 UtBS: Removed a remaining [on_redo]
Resulting problems reported on the forums, removal was apparently missed in df058356df.

[ci skip]
2018-04-23 00:00:58 +03:00
Steve Cotton
2afdcad4e5 Tutorial: fix the overall translation hint comment
The comment at the start of 01_Tutorial_part_1.cfg wasn't immediately
before a string, so the hint for translators wasn't in the file that
goes to the translators. Fix it so that the tutorial shows working
usage of "# po:" style comments; this is probably more help to people
using the tutorial as a reference for WML, rather than the translators
themselves.
2018-04-22 15:51:45 -04:00
Celtic Minstrel
8bd85636f1
Add translation hints for the village and terrain feature name generators 2018-04-22 14:22:22 -04:00
Nils Kneuper
cc3fc3f97b updated Czech translation 2018-04-22 09:21:15 +02:00
gfgtdf
c510340ed2
fix segfault on area= filter.
areas_ might be empty, so areas_[0] might crash, also returning areas_[0].hexes didn't really make sense in the first place
2018-04-21 20:57:15 +02:00
loonycyborg
0d33fcccbf wesnothd: always wait for next login attempt after login fail 2018-04-21 17:13:58 +03:00
Martin Hrubý
7907ce9870
Fix for #2782
#2782 Crash when using composing like ˇ and ' in lobby on macOS. - by @singalen
2018-04-21 14:37:53 +02:00
Martin Hrubý (hrubymar10)
3352247660
Remove rest of Growl things which I forgot before 2018-04-21 13:05:31 +02:00
Gunter Labes
bf42e65de2 Fix compiler warning 2018-04-21 11:21:59 +02:00
Gunter Labes
a3243bb535 Detect disconnect when waiting on data from server
Fixes issue #2927.
Also shows that issue #2925 still results in a disconnect but the client
does not get stuck anymore at least.
2018-04-21 11:17:26 +02:00
Gunter Labes
a58e2200ab Fix debug message
This outputs the config not the number of read bytes.
The recv_queue_.back() call was also missing lock protection.
2018-04-21 10:48:55 +02:00
Gunter Labes
996ae23e17 Expect more data from client after sending error
Should fix issue #2925.
2018-04-21 08:45:20 +02:00
Nils Kneuper
b5c7696577 updated German translation 2018-04-20 23:34:07 +02:00
Nils Kneuper
21e00c345e updated Czech translation 2018-04-20 23:32:54 +02:00
Victor Sergienko
853be75e1b #2782 Crash when using composing like ˇ and ' in lobby on macOS.
Some backstory: https://github.com/wesnoth/wesnoth/pull/2644#issuecomment-382298822
2018-04-20 08:34:13 -07:00
Charles Dang
75828004ff Wesnothd/Player: removed unused selective_ping member 2018-04-20 14:37:57 +11:00
Charles Dang
bd3070c298 Removed unused Ping Timeout preference
It no longer had any effect. The selective_ping flag is set was ignored by the
server since it now utilizes TCP keepalive.
2018-04-20 13:11:03 +11:00
Charles Dang
01a6fc0742 changelog entry for the UtBS portraits
[ci skip]
2018-04-20 12:01:47 +11:00
Charles Dang
0e96a28142 UtBS: wmlindent pass
[ci skip]
2018-04-20 11:39:23 +11:00
Charles Dang
367c8b3703 UtBS: renamed the Quenoth Sun Sylph's unit and image files to match her type
[ci skip]

Sun Sylph is the proper name, but some files were labeled Sun Shyde.
2018-04-20 11:36:32 +11:00
Charles Dang
49b0dc7254 UtBS: removed unused Quenoth Moon Singer and Quenoth Moon Shyde units
[ci skip]

These were part of an early iteration of the faction design but we decided against
the sun/moon motif.
2018-04-20 11:36:31 +11:00
Charles Dang
37f3c1c869 UtBS: added new Quenoth faction portraits by LordBob 2018-04-20 11:20:23 +11:00
Nils Kneuper
9a59c9627b updated Scottish Gaelic translation 2018-04-19 21:41:20 +02:00
Martin Hrubý (hrubymar10)
47bd5ade37
Fix for defense label which I broke in 4ba1811f03 2018-04-19 15:24:10 +02:00
Martin Hrubý (hrubymar10)
4ba1811f03
Fix MP label for #2855 2018-04-19 14:01:29 +02:00
Martin Hrubý (hrubymar10)
ee500f57ec
Update macOS user dir path 2018-04-19 11:09:26 +02:00
Nils Kneuper
57f773aa5a updated German translation 2018-04-19 08:19:40 +02:00
Charles Dang
12495f9070 UtBS: fixed some opaque shadows on rider units due to indexed pngs
[ci skip]
2018-04-19 11:24:43 +11:00
Charles Dang
3cb1641d07 UtBS: improved the Quenoth Flagbearer's flag
[ci skip]
2018-04-19 11:24:42 +11:00
Iris Morelle
91de2a4c98 gui2/title_screen: Make Version label formatted and translatable
Closes #2914.

This doesn't break the string freeze since it reuses a format string
from the same textdomain required by gui2/game_version for the exact
same purpose.
2018-04-18 21:16:28 -03:00
Nils Kneuper
5ffd747081 updated Slovak translation 2018-04-18 21:54:22 +02:00
Martin Hrubý (hrubymar10)
b2883cb0f7
Fix Xcode project after a02100a0f1 2018-04-18 09:55:59 +02:00
Charles Dang
cd036961f6 Fix tests
Fixup 8a00276913.
2018-04-18 16:25:11 +11:00
Iris Morelle
1e67b2616f Fix segfault when trying to log into the MP server with an empty password
Probable regression introduced in commit
02ab29d2f1 (1.13.14).
2018-04-17 22:10:45 -03:00
Jyrki Vesterinen
9646434bc1 Changelog entry for commit 8a00276913 2018-04-17 22:26:51 +03:00
Jyrki Vesterinen
8a00276913 Implement saving MP chat message history (#1194, #2802) 2018-04-17 22:23:32 +03:00
Charles Dang
5e136419fe Revert "Utilized 2x xBRZ scaling for portraitless units in game dialog"
This reverts commit 2ff68304ff and fab229b5e8.
2018-04-18 02:01:04 +11:00
Iris Morelle
4d90a77aa8 campaignd: Remove last remaining trace of the master_password functionality 2018-04-16 23:58:45 -03:00
Iris Morelle
83afa19521 campaignd: Add 'hide'/'unhide' control FIFO commands and hidden= attribute
These are used to hide an add-on from listings and deny the author the
ability to upload or delete it or change its passphrase. This is
meant to be used when enforcing add-ons server rules that do not justify
deleting all of the add-on's metadata (for example, issues with icons or
descriptions).
2018-04-16 23:56:45 -03:00
Iris Morelle
180995f464 campaignd: Add 'delete' control FIFO command 2018-04-16 23:33:17 -03:00
Iris Morelle
e6b17f88cb campaignd: Refactor add-on deletion code into its own method
This changes the order in which the hook_post_erase hook (currently
unused in production and fully untested) is fired so it will be run
*before* displaying the confirmation message to clients. This might need
to be changed at a later point if the hook functionality ever gets used
again, but for now it'll do.
2018-04-16 23:22:18 -03:00
Charles Dang
fab229b5e8 Fixup 601c67d970
Turns out that commit broke TC on unit images in messages since it broke the equality
check in lua_unit.cpp. Added the XBRZ IPF as part of the Lua unit portrait attribute
instead.

I *think* this is the proper place to do it.
2018-04-17 10:16:45 +11:00
Jyrki Vesterinen
77b9bc3969 [heal_unit]: ensure that heal amount is an integer 2018-04-16 20:52:17 +03:00
Charles Dang
122621fd7b Changelog entry for 4c9ba39
[ci skip]
2018-04-17 03:06:11 +11:00
Charles Dang
2ff68304ff Utilized 2x xBRZ scaling for portraitless units in game dialog 2018-04-17 03:04:36 +11:00
Severin Glöckner
abc6b797be finish renaming of the Horseman to Pathfinder
[ci skip]
2018-04-16 15:37:41 +02:00
Charles Dang
4c9ba39a76 Drop Down Menu: allow right clicks to dismiss the window (fixes #2910) 2018-04-16 21:10:00 +11:00
ln-zookeeper
a565e9259f UtBS: Re-added compatibility code to load old saves using the new elves 2018-04-16 10:47:48 +03:00
Celtic Minstrel
6f47abd47f Remove redundant unused column in stats 2018-04-15 14:04:24 -04:00
Celtic Minstrel
42ee12621b Swap count and name columns in statistics (fixes #2893) 2018-04-15 13:56:38 -04:00
Nils Kneuper
f0514800d6 updated French translation 2018-04-15 19:50:14 +02:00
Nils Kneuper
26cda6bd21 updated Galician translation 2018-04-15 11:20:46 +02:00
loonycyborg
b9ee43f24f wesnothd: Fix UB caused by incorrect use of simple_wml::set_attr 2018-04-15 10:37:30 +03:00
Charles Dang
a31413cc82 Post-release version bump 2018-04-15 17:35:13 +11:00
Charles Dang
801b867afa Pre-release version bump 2018-04-15 17:32:11 +11:00
Celtic Minstrel
100d3d4840 Fix two of the dialog functions not accepting translatable strings 2018-04-15 02:20:09 -04:00
Iris Morelle
c6112fcfe3 Remove stale include in test scenario causing errors 2018-04-15 02:49:58 -03:00
Iris Morelle
bc195c0f1c Changelog entry for MP lobby message fixes
[ci skip]
2018-04-15 02:48:45 -03:00
Iris Morelle
9afd4501e7 wesnothd: Use actual username when sending lobby messages too 2018-04-15 02:41:15 -03:00
loonycyborg
1eb762b467 wesnothd: made server fill in sender when forwarding whispers 2018-04-15 01:57:36 -03:00
Iris Morelle
13e21adcfd pot and documentation update 2018-04-15 01:38:08 -03:00
Iris Morelle
f843a0eebe Revert string changes in SotA for 1.14 RC 3 - gold
This reverts the following commits:

 * "SotA S2: fixed inconsistency between unit name and dialog (fixes #2844)" - commit ab9f29a7a4
 * "SotA S8: fixed inconsistent Ghost name (fixes #2846)" - commit fc6c3ac04b
2018-04-15 01:38:02 -03:00
Charles Dang
e863f7937c Better changelog entry for the MP password fix
[ci skip]
2018-04-15 15:15:35 +11:00
ln-zookeeper
0b1aaecb6a UtBS: Removed obsolete slows note from Quenoth Scout
[ci skip]
2018-04-15 03:18:56 +03:00
Severin Glöckner
10c93d24fc utbs: replace true by yes
[ci skip]
2018-04-14 21:15:17 +02:00
Severin Glöckner
5c057a1e09 utbs: remove movetypes and abilities only used by old desert elves
[ci skip]
2018-04-14 21:15:17 +02:00
Severin Glöckner
13767fe9ee utbs: change traits for higher unit types too,
because they are nowadays displayed in the help.
Also keep them sorted the same way as usual.

[ci skip]
2018-04-14 20:25:37 +02:00
Celtic Minstrel
76cf5baf5d Editor: Refresh named locations list when map context changes (fixes #1023)
This solution is a bit of a hack, but odds are this code will be
majorly refactored in 1.15 anyway. The important thing is that
this works.
2018-04-14 12:00:42 -04:00
Charles Dang
b4bbb6cec7 Lobby Info: filter on game name first
It's more common to want a name.
2018-04-15 02:53:27 +11:00
Charles Dang
d0d7bd1722 Changelog entry for e6d4b4113a
[ci skip]
2018-04-15 02:43:52 +11:00
Charles Dang
e6d4b4113a Attempt to fix non-required era being flagged for download
See #2747.
2018-04-15 02:43:16 +11:00
mattsc
ab8c4c39ea Update changelog 2018-04-14 07:23:22 -07:00
Jyrki Vesterinen
a0b54b1513 Fix #2884: minimap buttons don't do anything 2018-04-14 10:55:06 +03:00
mattsc
84c39de58d
Merge pull request #2876 from mattsc/recall_recruit_bug
AI recruitment: fix units on recall list interfering with recruiting
2018-04-13 15:25:03 -07:00
Martin Hrubý (hrubymar10)
e09afcffb5
Update link to new MacCompileStuff repo 2018-04-13 22:53:36 +02:00
Nils Kneuper
cf92afd135 updated Polish translation 2018-04-13 22:50:12 +02:00
Nils Kneuper
be36c9e556 updated Italian translation 2018-04-13 22:49:04 +02:00
Jyrki Vesterinen
f4ee47c6ea Changelog entry for commit 4916e1c0b9 2018-04-13 22:48:23 +03:00
Jyrki Vesterinen
4916e1c0b9 Fix #2850: [modify_side] share_vision=yes doesn't do anything
Thanks to @gfgtdf for the suggested fix that works well.
2018-04-13 22:47:35 +03:00
Jyrki Vesterinen
61e15c42e2 Fix build with Visual Studio 2013 2018-04-13 22:08:15 +03:00
loonycyborg
0c3f6da830 Fix "host networked game" option
It was broken by b95c9996bf because
ignoring SIGCHLD makes it impossible to query exit status of wesnothd
subprocess. Fix this by spawning a thread to wait for the browser
instead of ignoring SIGCHLD.
2018-04-13 15:48:03 +03:00
Charles Dang
0c745f0fc5 Game Load: added a convenient button in Load Game to open your saves folder
The tooltip is commented out since we're in a string freeze on this branch. Uncomment it for 1.14.1.
2018-04-13 18:23:57 +11:00
Charles Dang
06af9401ee ANL: removed unused macro (closes #2878)
[ci skip]
2018-04-13 11:50:40 +11:00
Severin Glöckner
bdf9523b65 update 2nd stunned event as well with additions from 1.13.2
[ci skip]
2018-04-12 20:03:12 -04:00
Severin Glöckner
6a085e490f remove unneded keys
[ci skip]
2018-04-12 22:07:54 +02:00
Severin Glöckner
c9c676b761 INSTALL had been renamed to INSTALL.md
[ci skip]
2018-04-12 21:41:23 +02:00
mattsc
0119413910 AI recruitment: use unit-specific recall cost
… when deciding whether a recall is worth it.
2018-04-12 10:08:50 -07:00
Jyrki Vesterinen
47d83b44b2 Merge branch 'hotkey-event-buffer' into 1.14
Manual merge of pull request #2872.
2018-04-12 19:28:47 +03:00
mattsc
1597a2ce27 AI recruitment: fix units on recall list interfering with recruiting
Units on the recall list are treated as recruits by the AI. The code
previously did not check whether a unit it worth being recalled until
after it makes the decision which unit type to recruit/recall. If it
then can only recall, but not recruit units of that type and all of
them are deemed not worth it, the entire recruitment CA is disabled
(via black listing), meaning recruiting is abandoned also.

This commit fixes this by checking the unit value vs. the recall cost
before putting recalls on the recruitment list.
2018-04-12 08:47:32 -07:00
loonycyborg
bb14c3bc21 Fix issue #1757: prevent abnormal termination if failed to bind address 2018-04-12 14:47:22 +03:00
Iris Morelle
05b464aadf Update changelog
[ci skip]
2018-04-12 06:15:12 -03:00
Iris Morelle
d4c0783914 Add team colouring to some Aethermaw props missing it
[ci skip]
2018-04-12 06:03:44 -03:00
Celtic Minstrel
25b30608f9
Update changelog.md 2018-04-11 22:43:45 -04:00
Celtic Minstrel
ad7b0ef140 WML Unit Tests: Fix issues found by the schema validator
With this, the WML unit tests are as clean of schema errors as they can get
The two remaining errors are unit tests for dealing with invalid input,
so they are intentionally violating the schema.
2018-04-11 22:28:41 -04:00
Celtic Minstrel
94788c7fe9 Fix an error in the test scenario 2018-04-11 22:28:41 -04:00
Celtic Minstrel
b9d36da8bd Test scenario: Fix invalid [message] key 2018-04-11 22:28:40 -04:00
Celtic Minstrel
5dff65e71a TRoW: [unit]image= is not supported
We should really use a custom unit type to get the desired effect;
however, that could cause out-of-sync errors, so for the 1.14 branch
we instead replace the image via an [object]
2018-04-11 22:28:28 -04:00
Celtic Minstrel
855ac6962e UtBS: Fix a few issues found by the schema validator 2018-04-11 22:21:04 -04:00
Celtic Minstrel
f2c578995b NR: Fix a few more issues found by the schema validator 2018-04-11 22:21:03 -04:00
Celtic Minstrel
b0c1f94fec NR: usage= and alignment= not supported in SUF 2018-04-11 22:21:02 -04:00
Celtic Minstrel
f32da3c1c4 SoF: Fix incorrect aspect value 2018-04-11 22:21:01 -04:00
Celtic Minstrel
58cf56a2e1 SotA: Fix incorrect key in [redraw] 2018-04-11 22:21:00 -04:00
Celtic Minstrel
c9efb05501 DM: Fix some issues found by the schema validator 2018-04-11 22:20:59 -04:00
Celtic Minstrel
74f108ebdb DiD: Fix a few issues found by the schema validator 2018-04-11 22:20:58 -04:00
Celtic Minstrel
23cfd22e96 EI: Fix a few issues found by the schema validator 2018-04-11 22:20:57 -04:00
Celtic Minstrel
07df9c0704 HTTT: Fix a few errors found by schema validator 2018-04-11 22:20:57 -04:00
Celtic Minstrel
73acf9b566 [effect]apply_to=new_animation does not support name
It does support id though, which is used as a sort of caching mechanism
in case the same effect is applied many times, so use that instead of name.
For good measure, also use an id on the sceptre of fire animation
2018-04-11 22:20:56 -04:00
Celtic Minstrel
bfde96b5c4 TSG: [heal_unit] takes restore_statuses, plural 2018-04-11 22:20:55 -04:00
Celtic Minstrel
62bb0253c2 Remove animate=no from {GUARDIAN}
This is the default in [unit] anyway, and if the user specified
animate=yes explicitly then we should not override that.
2018-04-11 22:20:54 -04:00
Celtic Minstrel
c90dc449d4 AOI: Fix errors found by schema validator
- grouping=no, not grouping=none
- speaker is a message key not a filter key

With this, AOI is clean of schema issues.
2018-04-11 22:20:53 -04:00
Celtic Minstrel
78f21f66f7 TB: Fix invalid filter in [modify_side]
[modify_side] does not support [filter]; instead it uses [filter_side]
However, it also supports inline side which is sufficient here,
so just use that instead.
2018-04-11 22:20:53 -04:00
Celtic Minstrel
339c514aaa LoW: Fix misplaced {NO_SCOUTS} 2018-04-11 22:20:53 -04:00
Celtic Minstrel
7d42fe0f49 Fix error in AI control core macros 2018-04-11 22:20:51 -04:00
Celtic Minstrel
41fe47372d LoW7: Fix invalid use of aspects in [unit][ai]
This doesn't quite produce what is presumed to be the intended result.
It does at least preserve the differing recruitment patterns though.

Includes the following recommendations from mattsc:

- Drop {AI_NO_SCOUTS} since the recruitment pattern contradicts it
- Drop attack_depth and grouping
- Keep the night-only aggression and caution change, even for the nagas
2018-04-11 22:20:50 -04:00
Charles Dang
56cd53520b TRoW: removed old, now-unused story art
[ci skip]
2018-04-12 13:19:50 +11:00
Charles Dang
2aff2cd36f Fixup f7ab008 before GCC complains about an unused parameter >_< 2018-04-12 12:17:36 +11:00
Charles Dang
f7ab008c59 Help: disabled parsing error popup
See issue #2587 and 5517063fb9 for more details.
Should fix #2874.
2018-04-12 12:16:09 +11:00
Iris Morelle
28db261ebd Fix test scenario references to Kaleh's WML
This is required after commit cbedd09ec2.
2018-04-11 22:06:57 -03:00
Celtic Minstrel
02ab29d2f1 Fix #2745 2018-04-11 21:04:56 -04:00
Iris Morelle
b2297bb4ed help: Use new attack stats separator in unit descriptions
Closes #2873.
2018-04-11 21:27:17 -03:00
Nils Kneuper
719ee4f5cd updated Czech translation 2018-04-11 21:39:39 +02:00
Jyrki Vesterinen
64ef0eb1e6 Hotkey manager: drop duplicate commands
We use both SDL_KEYDOWN and SDL_TEXTINPUT events for hotkeys. It's possible
for both events (caused by the same keypress) to trigger the hotkey command
and we don't want that. Hence, let's drop duplicate commands.

Fixes #1736.
2018-04-11 22:04:19 +03:00
ln-zookeeper
0854bf8fe3 TRoW: New set of story art by LordBob
In scenarios 06 and 14 I turned the opening narrator message into story text instead. The image for 03 isn't used yet as there's no text to accompany it.
2018-04-11 21:48:13 +03:00
Nils Kneuper
349775c05f updated Galician translation 2018-04-11 20:31:53 +02:00
Nils Kneuper
6f5851b49d updated Chinese (Simplified) translation 2018-04-11 20:28:15 +02:00
Jyrki Vesterinen
0fdb4614e0 Revert "Fix #1736: on GNU/Linux, a hotkey can trigger multiple commands"
This reverts commit f80bc42621.

As @CelticMinstrel pointed out, that commit made it impossible to input characters which require
AltGr to type (e.g. @, € and $ in Finnish keyboard).

Reopens #1736.
2018-04-11 18:52:59 +03:00
Jyrki Vesterinen
b72d6ae37d Revert "Changelog entry for commit f80bc4262194c161c95aa1ffb83ee7f73df4f73d"
This reverts commit cd4bb21c81.
2018-04-11 18:52:31 +03:00
Charles Dang
cbedd09ec2 UtBS: removed old Desert Elves and accompanying scenarios and loading code
[ci skip]

Also fixed the campaign icon to use the new Kaleh sprite instead of the old one.
2018-04-11 14:39:48 +11:00
Celtic Minstrel
ebde628e05 Revert "Accept [and] and [or] in [filter_wml]"
This reverts commit 82fd82d534.
2018-04-10 22:14:23 -04:00
Charles Dang
1fe396309e Game Events/Manager: skip disabled assertion if write_events is called mid-event
This reverts afaa75842c and replaces it with a more general
no-assert-during-events check. This is because there are other instances besides [inspect]
where this function can be called mid-event, and it wouldn't be convenient to add nested
'strict' parameters to multiple functions just to handle them.

Fixes #2750.
2018-04-11 13:10:19 +11:00
Charles Dang
b0da923cff Changelog entry for fa8e301c93
[ci skip]
2018-04-11 11:54:15 +11:00
Jyrki Vesterinen
cd4bb21c81 Changelog entry for commit f80bc42621 2018-04-10 19:03:27 +03:00
Jyrki Vesterinen
f80bc42621 Fix #1736: on GNU/Linux, a hotkey can trigger multiple commands
SDL_TEXTINPUT events aren't generated on Windows when Alt is held down.
Let's ensure that the behavior is the same on all platforms.
2018-04-10 19:00:54 +03:00
Jyrki Vesterinen
6ce6c89b70 Convert README for manual images to Markdown
I also updated the filenames for the images, changed the recommended
format for screenshots other than "fullscreen" screenshots to PNG,
and removed the (no longer true) claim that the example places to create
the screenshots match where the English screenshots were taken.

Resolves #2856.

[ci skip]
2018-04-09 21:54:04 +03:00
Nils Kneuper
62ae1af4cb updated Chinese (Simplified) translation 2018-04-09 20:11:38 +02:00
Sofartin
323121d8f4 Add new packager 2018-04-09 10:34:45 +02:00
Celtic Minstrel
c086f0c47f
LoW: Fix translation error in conjunct list (fixes #2833) (#2834) 2018-04-08 18:55:50 -04:00
Celtic Minstrel
9805fa8ad0 Run pofix on SotA strings 2018-04-08 09:55:09 -04:00
Celtic Minstrel
4331c7f4e9 Fix pofix
Two of these strings were not a fix, just a removed string, so no need for pofix.
The other was not specific enough for pofix to match unambiguously.
Also, someone forgot a comma somewhere, causing a syntax error.
2018-04-08 09:54:16 -04:00
Charles Dang
d4ee030b59 MP Staging: made the faction select button about as prominent as you can get
[ci skip]

Thanks to grzywacz for pointing out the possible use of the unit icon.
2018-04-09 00:23:13 +11:00
Charles Dang
a8e33031c0 Changelog entry for recent SotA fixes
[ci skip]
2018-04-08 22:31:45 +11:00
Charles Dang
f64f51c10e Pofix entry for fc6c3ac04b
[ci skip]
2018-04-08 22:26:58 +11:00
Charles Dang
fc6c3ac04b SotA S8: fixed inconsistent Ghost name (fixes #2846)
[ci skip]

The dashed version is used in prior scenarios.
2018-04-08 22:25:42 +11:00
Charles Dang
9f6b66c738 Pofix entry for b86a2968fe
[ci skip]
2018-04-08 22:22:31 +11:00
Charles Dang
b86a2968fe SotA S7: fixed inconsistent town name (fixes #2845)
[ci skip]

The two r's version is used in two other locations.
2018-04-08 22:21:40 +11:00
Charles Dang
0c3c0a4e09 MP Staging: make Faction Select button's purpose more clear
[ci skip]
2018-04-08 21:05:15 +11:00
Charles Dang
697216e8ea Pofix entry for ab9f29a7a4
[ci skip]
2018-04-08 13:38:44 +11:00
Charles Dang
ab9f29a7a4 SotA S2: fixed inconsistency between unit name and dialog (fixes #2844)
[ci skip]
2018-04-08 13:36:12 +11:00
Charles Dang
900428d2e9 SotA S2: fixed units with translatable IDs........
[ci skip[
2018-04-08 13:36:11 +11:00
Charles Dang
4afb4834b6 Unit Create: fixed unit selection not persisting between uses (fixes #2822)
I had been unconditionally selecting the first entry after setting the active
sorting option. This overrode the previous unit selection.

Regression from 6b52d16fae.
2018-04-08 13:12:59 +11:00
loonycyborg
823d37c37a nsi script: update expected extensions of changelogs 2018-04-07 13:15:32 +03:00
Sofartin
ec761f88d6 Revert "Update wesnoth.cbp - #2840"
Sorry, I did mistake. This file shouldn't be removed from 1.14 branch.

This reverts commit 9ce33b8a94.
2018-04-07 12:07:04 +02:00
newfrenchy83
9ce33b8a94 Update wesnoth.cbp - #2840 2018-04-07 12:03:31 +02:00
Sofartin
eacd2a4cd1 Add l10n-track to macOS Package - #2825 2018-04-07 10:47:28 +02:00
Charles Dang
1cb7669713 Image: handle case where l10n-track file is not present
Resolves #2825.
2018-04-07 19:32:53 +11:00
Nils Kneuper
a44ffcdeb7 updated French translation 2018-04-07 09:55:24 +02:00
Sofartin
d51ccbe538 Fix HP label in longer languages
English uses 2 letter abbrev but some languages like Czech don't have this abbrev so we need wider space for our 6 letter label "Životů"
2018-04-07 09:15:47 +02:00
stevecotton
36a78d8856 LoW S09 Lua cleanup: fix a line that was missed in 3783693cb (#2835)
3783693cbe was a general rename of
'V' to 'vars', and this line was missed. It caused an error at the
start of S09.

[ci skip]
2018-04-06 20:37:12 -04:00
loonycyborg
32178aab81 flatpak-builder manifest: cleanup a buildtime only dependency 2018-04-06 11:25:46 +03:00
Sofartin
e458fe4df8 Remove libpng headers 2018-04-05 19:19:49 +02:00
Martin Hrubý
b320675935 Fixed typo 2018-04-05 15:12:44 +02:00
Celtic Minstrel
4558ec1458 Use a proper deprecation message for the removed ai.synced_command 2018-04-04 21:35:12 -04:00
Nils Kneuper
6e5ec982bc updated Polish translation 2018-04-04 21:36:24 +02:00
gfgtdf
56cf77e3a0
fix [message] side_for= not working for the last side.
fixes #2776
2018-04-04 18:21:56 +02:00
Charles Dang
f78e32c7f8 Fixed images with no alpha channel rendering incorrectly
See https://forums.wesnoth.org/viewtopic.php?p=625159#p625159

Since this problem can also be solved with make_neutral_surface, and is_neutral already
check a surface's alpha mask, I moved the is-not-indexed check to is_neutral and made use
of it for the on-load standardization check.
2018-04-04 20:13:24 +11:00
Charles Dang
54d440edcc Changelog entry for 6500794
[ci skip]
2018-04-04 10:53:14 +11:00
gfgtdf
650079412c
fix filter not working in [disable] (#2826)
The problem was that the specials_context was not set during those
two get_special_bool calls

This removes what seems to be a rather useless optimisation in
battle_context::battle_context since choose_attacker_weapon would
just return 0 in that case.

fixes #2801
2018-04-03 23:57:09 +02:00
gfgtdf
fa8e301c93 fix OOS when undoing actions with synced choices
The problm was that the old code tried to use `undo_stack().can_undo()`
to check whether the current action can be undone. But
`undo_stack().can_undo()` uses the undo stack which is only updated at
the end of each action, so it cannot be used to check whether the action
that is currently executed can be undone.

This code removes some assertion that were wrong due to the
justmentioned.
2018-04-03 13:57:55 +02:00
Charles Dang
fbc37edc46 Swapped the position and formatting of game names and titles in the MP lobby
Addresses point 2 of #2815.
2018-04-03 19:12:56 +11:00
Charles Dang
27ec4cd316 GUI2/Label: tweaked link confirmation prompt 2018-04-03 15:31:11 +11:00
Charles Dang
4f4fa274a8 GUI2/Label: tweaked link color
[ci skip]
2018-04-03 15:28:36 +11:00
Celtic Minstrel
a82289e310 Updated changelog style (backport of #2680) 2018-04-02 23:38:08 -04:00
Charles Dang
480df6b28a Disabled Font Scaling preference for now; it's too buggy
See issues #2792 and #1624. We'll probably reenable it for 1.16.
2018-04-03 14:26:58 +11:00
Steve Cotton
16614c325d Start the 1.13.13+dev changelog with a THoT fix
The change itself should cherry-pick without conflicts to the master
branch, but as this starts the 1.13.13+dev changelog, the changelog
update will need a manual merge.
2018-04-03 08:02:46 +11:00
Steve Cotton
a56fd6400f THoT S12 Fix some "x=" tests that should be "x,y=" tests
Taking the chest south of the start hid the door and chest that are
north of the start.

The sneak-door opened much earlier in the level, allowing the undead
from the south-east lich to go north to the spider room.  The ghosts
and nightstalkers that are supposed to ambush the player's forces in
the south (after opening the 3-hex door) instead go north and end up
joining the spider fight.  The slower-moving undead also go north,
and are easily fought one-by-one in the sneak passage instead of the
south-east.
2018-04-03 08:02:06 +11:00
Nils Kneuper
50051b1501 updated Polish translation 2018-04-02 10:42:16 +02:00
Celtic Minstrel
2492585ee2
Fix incorrect error message when encountering an unknown persistent tag 2018-04-01 14:01:50 -04:00
Charles Dang
6b20ccdb62 Help: removed sort_sections key with invalid value
[ci skip]

At no point is "generated" checked for as value of that key (the only valid value is "yes").
"generated" is a valid value for sort_topics, however. As for whether we want sorting or not
for Eras, I don't think so. The era order as displayed seems logical enough since it groups
each era and Age of Heroes variant together.
2018-04-01 19:14:09 +11:00
Charles Dang
cef5986990 Post-release version bump 2018-04-01 18:48:12 +11:00
Charles Dang
642768e48e Pre-release version bump 2018-04-01 18:48:12 +11:00
Charles Dang
5b7aca9756 Mentioned THoT change in changelog
[ci skip]
2018-04-01 18:48:11 +11:00
Steve Cotton
bcaac1efef THoT S12 Put the sneak-passageway's door on the right hex
This matches with the "Another old caved-in passageway..." event
around line 835, the trigger is on 55,33 and the walls that open are

        [terrain]
            x=55,55
            y=34,35
            terrain=Uu
        [/terrain]

Debian bug #483893, for which the original fix in
4c473187e6 changed the wrong digit.
2018-04-01 13:51:59 +11:00
Charles Dang
7e279748cc Mentioned Dark Forecast fix
[ci skip]
2018-04-01 10:46:00 +11:00
loonycyborg
409f1a163b pot-update and regenerate doc files 2018-04-01 02:41:46 +03:00
ln-zookeeper
1179593a4f Updated changelog 2018-04-01 02:37:51 +03:00
Nils Kneuper
10bab07ada updated Spanish translation 2018-04-01 00:01:03 +02:00
Nils Kneuper
3a6c300b35 updated Czech translation 2018-03-31 22:10:52 +02:00
gfgtdf
c61873da76
fix lua error in 2p_Dark_Forecast 2018-03-31 20:11:43 +02:00
Sofartin
82e9b80452 Remove redundand cp 2018-03-31 21:04:51 +03:00
Sofartin
8b33f2bf91 Enable Testability for macOS DEBUG builds 2018-03-31 21:01:15 +03:00
gfgtdf
7fca064c6e guard against calling user_choice_manager::pull() recursively 2018-03-31 19:39:50 +02:00
gfgtdf
247e08e1d5 less redraw_everything calls when receiving [change_controller]
we now only call redraw_everything() when the gui actually needs
updating. In particular this fixes an annoing flickering in some cases
where a gui2 dialog is shown while a [change_controller] is received.
2018-03-31 19:39:50 +02:00
gfgtdf
0d2870394f fix gui2 dialog disappearing after [change_controller]
fixes #2794
2018-03-31 19:39:50 +02:00
Nils Kneuper
b8300d8e20 updated French translation 2018-03-31 14:24:35 +02:00
Sofartin
64240b9fbf Remove rest of Growl things and CodeSign everything after copy 2018-03-31 06:27:48 -05:00
ln-zookeeper
1ab34fde21 ANL: Fixed scenario brokenness stemming from force_lock_settings=yes
[ci skip]
2018-03-31 14:09:24 +03:00
Iris Morelle
82af89f950 help: Call gettext on ToD topic strings that are already marked translatable
I'm getting the feeling whoever wrote this didn't really know what N_()
does or doesn't do.
2018-03-31 06:46:43 -03:00
Iris Morelle
161d17bdb2 help: Borrow "Lawful Bonus" translation from wesnoth-lib
Again, no-one marked this one as translatable.
2018-03-31 06:45:03 -03:00
Iris Morelle
e9105ab8a7 help: Fix ToD Schedule topic index heading not being translatable
Again, someone forgot to make this translatable. Fortunately, for 1.14
we can rely on a very simple hack to borrow the same string from the
wesnoth-help textdomain, which is actually supposed to be used for the
same purpose as it is the top-level section's title there, which is also
supposed to be the heading for the section's index.

This kind of thing just goes to show how badly organized the whole help
system is code-wise.
2018-03-31 06:38:39 -03:00
gfgtdf
4cd98821a9 treat local choices as like sycned contexts in replay.cpp
this makes more sense as the game cannot handle sycned commands while
executing local choices. It also fixes an OOS in
wesnoth.synchronize_choices
2018-03-31 02:25:44 +02:00
gfgtdf
ef2db5650c pull remote user input even if we are doing a local choice.
this mainly effects wesnoth.synchronize_choices:
previously the client would not process incoming choices from other
players while it was exeucting its own local choice (usually a dialog).
The problem this commit fixes is that with the old behaviour any choice
from another player would block the incoming queue, in particular
chatmessages after that command would be delayed until the
wesnoth.synchronize_choices is finished.
2018-03-31 02:25:44 +02:00
pentarctagon
ae332bf8b1 Give 1.14 its own docker image. 2018-03-30 11:18:38 -05:00
Celtic Minstrel
cfceec1d58
Fix unintended change to the semantics of [modify_side]income= 2018-03-30 11:05:58 -04:00
doofus-01
caf2dbe202 [UtBS] Quenoth elf animations (#2679)
* sun-shyde standing animations, draft

* additions to sun-shyde floating animation

* singer defense animation

* defense animations for sun-singer and sun-shyde

* try to make scout less leaning backwards

* champion defense animation

* fixing and rounding out basic animations (esp. wrt to floating/standing) for sun_shyde
2018-03-30 14:33:53 +03:00
pentarctagon
5a7f651ec9 Add using dockerfiles based on the LTS and BRANCH env vars
This makes it simpler in the future to have branches that have dependencies that are different from master, rather than having a single image with all necessary dependencies installed, which may at some point end up not being possible to do.
2018-03-30 12:18:48 +03:00
Celtic Minstrel
0bbdd1d79c
Fix scenario editor writing to wrong key 2018-03-29 21:48:35 -04:00
Nils Kneuper
8f37d4114e updated British English translation 2018-03-29 22:57:12 +02:00
Nils Kneuper
3c656c86e7 updated Ukrainian translation 2018-03-29 22:55:00 +02:00
Nils Kneuper
e2ef02474a updated Scottish Gaelic translation 2018-03-29 22:53:39 +02:00
Charles Dang
9f72118964 We support building with VS 2013 on 1.14
[ci skip]
2018-03-29 17:23:42 +11:00
Charles Dang
ccb22a967e Updated Visual Studio projectfile readme
[ci skip]
2018-03-29 16:41:27 +11:00
Victor Sergienko
6da3387969 Credits for Chinese translation of iOS announcements 2018-03-28 18:44:30 -03:00
Martin Hrubý
dc174fb10a Updated Xcode's README.md 2018-03-28 14:36:25 -05:00
Iris Morelle
be21b30232 SotA: Drop UMC translations section from the campaign's credits
[ci skip]
2018-03-27 19:27:19 -03:00
Iris Morelle
34e25fd458 UtBS: Hide technical terrains in the Help browser
[ci skip]
2018-03-27 19:07:13 -03:00
Iris Morelle
77a50a5583 Update changelog
[ci skip]
2018-03-27 18:58:11 -03:00
Iris Morelle
596731536e cmake, scons: Drop option to enable or disable the removed SDL_SavePNG code
Commit dfc42e8a8d removed said code since
Wesnoth can use IMG_SavePNG() from SDL_image 2.0 instead. However, the
author left the build-time configuration options intact, and also part
of the necessary code for CMake to link Wesnoth against libpng.

Note that this change also eliminates an unnecessary direct link-time
dependency on libpng when using both CMake and SCons.
2018-03-27 18:56:43 -03:00
Nils Kneuper
92e01dddca updated Spanish translation 2018-03-27 22:01:47 +02:00
Nils Kneuper
87dd14479c updated Chinese (Simplified) translation 2018-03-27 22:00:21 +02:00
Iris Morelle
a510a21a05 Merge both entries for the synced commands changelog entry
Since the entry was entirely missing in master, I just added it to 1.14
without reading the Miscellaneous section. Probably best to keep it
hidden there anyway.

[ci skip]
2018-03-27 05:00:41 -03:00
Iris Morelle
dd167542a0 Update changelog for the synced debug command UX changes
[ci skip]
2018-03-27 04:53:49 -03:00
Iris Morelle
ce759acda2 scons: Sort help text with a custom function that will run on Python 3 2018-03-27 03:52:23 -03:00
Iris Morelle
d1b8e6a50c Sort scons --help output 2018-03-27 03:45:42 -03:00
Iris Morelle
c300cb1ba2 wam: Add *.ini to upload blacklist to match the engine, reorder a few items
[ci skip]
2018-03-27 03:06:17 -03:00
loonycyborg
ad3f9664dc pot-update and regenerate doc files 2018-03-27 04:25:10 +03:00
loonycyborg
a488dfb022 scons: look for xhtml.xsl in several dirs as its location can vary 2018-03-27 04:07:48 +03:00
Iris Morelle
8b41d4d8fc Use a fallback for when the player name is not known in debug notifications
We just found out that it is possible for the player name to not be set
when loading a singleplayer start-of-scenario save for the first time
right after launching Wesnoth. It's best to have an actual $player value
for that case instead of spurting 100% syntactically invalid statements
like "The :lua command was used during 's turn" because of the empty
variable.
2018-03-26 20:28:17 -03:00
gfgtdf
81cfb11af0 disable debug command off-turn in mp
the serer wouldn't accept these commands anyways.
2018-03-26 19:18:02 +02:00
lundberg
ecde4da6b9 Suppress VC warning 4706 for campaignd 2018-03-26 10:09:05 -05:00
Charles Dang
d80fde1632 wesnothd: removed password reminder backend (closes #2753) 2018-03-26 19:18:07 +11:00
Iris Morelle
b3b0f6ee6a Update changelog for issue #2732 and issue #2709
[ci skip]
2018-03-26 03:27:57 -03:00
Hironori Fujimoto
478bc206c4 UtBS: Fix Nym's hit sound to be female 2018-03-26 02:27:17 -04:00
Iris Morelle
9ea0b80a04 Refactor synced debug commands prompt to bring the string count down to 2
Otherwise there are too many repetitive strings for translators to work
with, which is rather unfair for an exception like this during the 1.14
RC phase. It also makes for better code.

Also added an article "The" at the start of the strings for :command
notifications.
2018-03-26 03:15:10 -03:00
Iris Morelle
673c4dc044 gui2/text_box: Store hint text as a t_string
Storing it in a regular string results in issues with the game getting
stuck with the translation for the locale that was set during GUI2
initialization and not reflecting changes when switching languages later
on.
2018-03-26 03:15:10 -03:00
Gregory A Lundberg
6b14662d64
Add fonts.uuid to .gitignore for fontconfig 2.13.0 2018-03-26 01:13:10 -05:00
lundberg
95332aee09
Fix missing VC project options
campaignd project did not inherit warning supression for simple_wml from project/solution options.
2018-03-26 00:13:16 -05:00
Iris Morelle
948839692c New translatable version of the synced debug command prompt text 2018-03-26 01:25:13 -03:00
Iris Morelle
03924c673c Make the synced debug command prompt caption translatable 2018-03-26 01:07:34 -03:00
Iris Morelle
c3a6300bce Set a custom dialog caption for the synced debug command prompt
This replaces the caption with something more apropos than the generic
"Save Game" caption. It necessitates a minor API change though.
2018-03-26 01:01:04 -03:00
lundberg
6a91de417a Fix VC warnings about upstream issues
Disable some warnings pertaining to Boost issues such as name-hides-global.
2018-03-25 22:27:31 -05:00
Iris Morelle
5cdd9e4b82 Let synced debug command notifications be localized, fix them up a bit
There's a gettext call but there was nothing to mark the strings as
translatable in xgettext's view. Additionally, fixed a minor case of
missing the colon before the command name, replaced ASCII apostrophes,
and rewrote a notification with awkward wording.
2018-03-25 23:47:21 -03:00
Charles Dang
10ae1ec8bb Help: marked "Level" string in unit topic description translatable
I apparently forgot to do this at some point... Fixes one of the issues mentioned in #2732.
2018-03-26 12:18:14 +11:00
Charles Dang
90ea8dcf0d GUI2/Text Box: refactored hint text interface
Previously, I had implemented the hint text ("Search)" and image (the magnifying glass)
as a custom text box definition. This caused some problems, though. Since the string was
hard-coded as part of a WFL formula, it couldn't be translated (see #2709 and #2732). It
also wasn't expandable to any other usecase.

Instead, I've added two new hint_text= and hint_image= keys to [text_box], wrapped the
"Search" text and magnifying image path in a helper macro, and refactored the default
definition to display the hint text and image when appropriate.

This also fixes a minor issue where selected text wouldn't remain highlighted when the
box wasn't focused when using the filter definition (it did with the default one).

This should fix the untranslatable "Search" text issue mentioned in both issues above.
The new string is in the wesnoth-lib textdomain.
2018-03-26 12:12:39 +11:00
Charles Dang
71d6263087 GUI2/Canvas: allow formula values for [text] font_size= 2018-03-26 12:11:58 +11:00
Severin Glöckner
ae2b875cd4 install.md: cmake version requirement had changed
[ci skip]
2018-03-26 03:03:15 +02:00
Severin Glöckner
3e53f63b52 remove outdated information from install.md
[ci skip]
2018-03-26 02:44:53 +02:00
Charles Dang
b81c53cde8 Updated changelog
[ci skip]
2018-03-26 03:49:04 +11:00
Charles Dang
81cca86f90 MP Login: removed Password Reminder functionality
Resolves #2748.

Essentially, all this did was tell users to go use the forum, so it wasn't worth
it to keep it and solve the infinite loading screen issues it was causing.

The server backend still needs to be cleaned up.

Also removed a dead reference to some "Change Username" button in the Login dialog's
code.
2018-03-26 02:16:43 +11:00
Jyrki Vesterinen
e6b411d21a Merge branch 'fix_2694' into 1.14
Manual merge of pull request #2697.
2018-03-25 16:01:07 +03:00
Martin Hrubý
f6c795ffc0 Drop OS X 10.7 and Growl support (#2749) 2018-03-25 15:57:01 +03:00
gfgtdf
5361b7d715 fix playmp_controller reading later network packages
in linger mode.

playmp_controller::play_linger_turn calls play_slice after processing
end_linger/[notify_next_scenario] which would (after 'fix chat in
[delay]' commit) then read more data from the network in particular data
for the next scenario which will then be lost.
2018-03-25 14:47:08 +02:00
gfgtdf
1e1a6fbe48 fix moves sometimes not undone when control is changed.
with the 'fix chat not working during delay/animation' it could happen
that play_slice_catch would process a incoming controller change in
which case that while loop would end without the code inside that 'if
(player_type_changed_)' being executed, which woudl lead to oos errors
since that client woudl have made moves that other players don't have.
2018-03-25 14:47:08 +02:00
gfgtdf
219f977b27 fix chat during [delay] and animations
fixes #1856
2018-03-25 14:47:08 +02:00
Iris Morelle
125c33039a Update credits
[ci skip]
2018-03-25 05:35:54 -03:00
Iris Morelle
950222f0d9 gui2/unit_attack: Fix damage types and ranges being displayed in English
Part of issue #2732.
2018-03-25 04:40:51 -03:00
Iris Morelle
7bcf8e71a7 gui2/unit_attack: Fix alignments being displayed in English
Part of issue #2732.
2018-03-25 04:19:02 -03:00
Jyrki Vesterinen
c76967f443 Simplify move assignment operator of attack_type::specials_context_t 2018-03-25 09:47:36 +03:00
Charles Dang
44d9554361 Updated DejaVu Sans font files to version 2.37 (from 2.35)
[ci skip]

Source: https://dejavu-fonts.github.io/Download.html
I haven't done any codepoint list updates in data/hardwired/fonts.cfg. Unlikely
to cause issues, though, I think. The legacy TTF rendering system that uses it
is mostly just used for the Help browser here on the 1.14 branch (on master it's
completely unused and will be removed).
2018-03-25 09:18:09 +11:00
Charles Dang
d73302240b Updated Oldania font files to version 1.007 (FFEdit)
[ci skip]

Source: http://arkandis.tuxfamily.org/adffonts.html. Previous version was 1.006 (FFEdit).
Also includes the italic and bold variants we didn't have before.

Thanks to @sevu for finding this updated version. :)
2018-03-25 09:03:29 +11:00
Charles Dang
58ef84216f Mentioned EI fixes in changelog
[ci skip]
2018-03-25 06:30:55 +11:00
Charles Dang
dfee9d0bc5 EI: fixed another Lua syntax error from 3783693cbe
[ci skip]

I misread the intent of that line in the original. It was supposed to clear the
var, not set it.
2018-03-25 06:28:47 +11:00
Charles Dang
60aee8face Add ability to bypass strict no-disabled-events assertion when writing events
This is since the Gamestate Inspector can be invoked mid-event (using [inspect])
and it makes use of write_events().
2018-03-25 04:55:24 +11:00
Celtic Minstrel
ea739324df Remove some uses of set_wml_tag_metatable 2018-03-24 13:53:20 -04:00
Celtic Minstrel
6b7ff398dd Update changelog 2018-03-24 13:52:43 -04:00
Celtic Minstrel
61f7c25a1c Merge branch '1.14' of github.com:wesnoth/wesnoth into 1.14 2018-03-24 13:52:00 -04:00
Charles Dang
7c6d2d2eeb Fixed infinite loading screen when logging in with an invalid nickname
Fixes #2728.
2018-03-25 04:46:37 +11:00
Celtic Minstrel
6c2a78c35a Don't bother trying to standardize event name if there isn't one
Backport of e317f34, f7cc184, cf38553
2018-03-24 13:34:06 -04:00
Celtic Minstrel
c0c5fc9d73 Fix build by explicitly defining a move assignment operator 2018-03-24 12:09:04 -04:00
Celtic Minstrel
667b2b7bd3 Revert use of boost::optional::emplace for attack specials contexts 2018-03-24 11:44:39 -04:00
Sofartin
cffdf8a597 Add new unit_tests dependencies 2018-03-24 15:29:47 +02:00
gfgtdf
e379fdb304
show the oos savegame dialog when receiving a debug command in mp
with a different text of course.


fixes #2683
2018-03-24 12:05:52 +01:00
gfgtdf
74ca37f97b
fix initial selection of mods in sp 2018-03-24 12:02:30 +01:00
Iris Morelle
6265181b57 Revert "Bump min Boost version to 1.56.0"
This reverts commit c82c1ff905.
2018-03-24 01:44:05 -03:00
Iris Morelle
3f63eed681 Use the correct textdomain for the random faction mirror options
Fixes up commit 2e502334f2.

See issue #2709.
2018-03-24 00:28:22 -03:00
Charles Dang
0333ddda6c MP Create Game: attempt to fix RFM type labels being untranslated (#2709)
Since these are defined in their MAKE_ENUM enum with N_, we need to manually un-not-translate
them here.
2018-03-24 00:26:30 -03:00
Nils Kneuper
3f4d003f13 updated Spanish translation 2018-03-23 22:33:34 +01:00
Jyrki Vesterinen
a48f263405 Update Visual Studio project files for OpenSSL 1.1.0 2018-03-23 21:13:04 +02:00
Iris Morelle
15db5181cf gui/mp: Fix two strings not being translated in the UI
This is caused by a broken assumption on wmlxgettext's part. Because the
files did not have a textdomain directive anywhere, the translatable
strings in them were assigned to the wesnoth textdomain. The game engine
seems to have a different idea though, and includes them in an
unidentified textdomain that may or may not be wesnoth-lib, as per the
last #textdomain directive seen in the combined WML for the
data/gui/macros directory substitution.

This merits further examination of the preprocessor's code (and
wmlxgettext's logic), but for now this is a simple patch that fixes the
issue without breaking the string freeze or introducing any potential
regressions.

This fixes two particular strings mentioned in issue #2709:

 * "There are no custom options available for the selected era, game, or modification."
 * "Connected Players"

Vultraz made a similar fix in commit
8d1ec6216b in master, but it breaks the
string freeze by virtue of moving the strings across textdomains.

[ci skip]
2018-03-23 05:09:54 -03:00
Iris Morelle
26b327485d i18n: Make VGETTEXT()/VNGETTEXT() always require a GETTEXT_DOMAIN to be defined
This drops a preprocessor conditional branch that is dead code now that
the file pulls gettext.hpp and the GETTEXT_DOMAIN defaults with it.

See also PR #2711.
2018-03-23 03:53:27 -03:00
Iris Morelle
dbac6e4e08 i18n: Forcefully pull gettext.hpp into formula/string_utils.hpp
There are cases (deprecation.cpp for one) where string_utils.hpp is
included first, which causes the VGETTEXT/VNGETTEXT definition to use
the textdomain-less (a.k.a. forced wesnoth-lib textdomain) overloads of
vgettext() and vngettext(), because GETTEXT_DOMAIN has not yet been
defined by anything. This again results in strings being looked up in
catalogues where xgettext is not adding them.

This is a companion for PR #2711 I should've noticed sooner. Without it,
there were still cases where interpolated strings would not be
translated due to vgettext() using the wrong textdomain for them.

I ran a quick scan on the codebase to make sure there aren't any files
including formula/string_utils.hpp before defining their own
GETTEXT_DOMAIN instead of the gettext.hpp default.
2018-03-23 03:50:45 -03:00
Iris Morelle
96032f978c Update the changelog
[ci skip]
2018-03-23 02:37:50 -03:00
Iris Morelle
69c28e5088 Replace all instances of naked vgettext() calls with VGETTEXT()
The vgettext() function, while declared in src/formula/string_utils.hpp,
actually has its implementation out-of-line in
src/formula/string_utils.cpp where GETTEXT_TEXTDOMAIN is defined to
"wesnoth-lib". Because vgettext() is implemented in terms of the _()
function (an inline wrapper around translation::dsgettext()), it passes
the textdomain defined in the file where it was implemented as a
parameter.

This means that every case of vgettext() being used in other code units
where GETTEXT_TEXTDOMAIN is not defined to "wesnoth-lib", is broken if
the string being looked upon doesn't coincidentally exist in the
wesnoth-lib textdomain.

Ages ago, to work around this limitation, an overload of vgettext() that
takes the textdomain name as a parameter was introduced (see commit
0ba3d05204). Since this form of vgettext()
is rather unwieldy to use (and in particular, the xgettext message
extraction tool mistakes the first argument for the msgid, see below), a
VGETTEXT() macro was also added that uses the GETTEXT_TEXTDOMAIN symbol
defined in the file where the call is made, and thus we get the correct
string from the correct textdomain.

Switching all cases of naked vgettext() in mainline to VGETTEXT() fixes
a myriad of situations where an interpolated string that has an extant
translation does not actually get translated in practice because of the
mismatched textdomain reference (see issue #2709 for an example with MP
game titles). I couldn't find any cases of the companion vngettext()
function (which handles plurals) being used in the wild naked, but for
future reference it also has a companion VNGETTEXT() macro to pass the
correct textdomain to its textdomain-parameter overload.

One caveat is that this commit DOES break the string freeze in one
particular case -- src/units/unit.cpp has a case where the
textdomain-parameter version of naked vgettext() was in use with
"wesnoth" as the first parameter, and xgettext misidentified this as a
translation entry for a "wesnoth" string in the file's assigned
textdomain (which is the default textdomain, wesnoth). So this will
result in the next pot-update both removing the spurious "wesnoth"
string AND adding the correct string to the relevant catalogue template
("<span color=\"$color\">$number_or_percent</span> HP").
to that textdomain.

Other than that, I believe this does not break the string freeze in any
other fashion and it shouldn't result in any regressions for i18n.

It might be worth considering in the future renaming vgettext() and
vngettext() to names that make people less likely to misidentify them as
functions they can freely call directly without regard to the textdomain
assignment issue.
2018-03-23 02:37:50 -03:00
Lari Nieminen
48514bf318
EI: Fix Lua syntax error from 3783693cbe
[ci skip]
2018-03-22 09:52:08 +02:00
Iris Morelle
ef8fc9df93 Check the Travis status for 1.14 in the README for this branch
[ci skip]
2018-03-21 17:52:51 -03:00
ln-zookeeper
2e43a56588 EI S03: Changed Mal-Kallat back to male
He was changed to female in f4d67031a4 even though he's addressed as "brother" in dialogue. Reported on the forums.
2018-03-21 11:27:29 +02:00
Iris Morelle
2879d10dc5 wam: Update description and name for Modifications
They are no longer just for multiplayer mode (see issue #1475, commit
a09e2bb858).

[ci skip]
2018-03-21 00:29:27 -03:00
Hironori Fujimoto
8cd0585ba5 Rename variable so that it's role becomes clearly 2018-03-20 10:36:03 +09:00
Hironori Fujimoto
8522e25ffb Use is_composing() instead of raw ime_in_progress_ 2018-03-20 10:18:00 +09:00
Hironori Fujimoto
264fe1d4d3 Remove private member 'ime_length_'
In order to get length of composition text, just compare text_ and
text_cached
2018-03-20 08:17:48 +09:00
Hironori Fujimoto
7ac3697142 Turn ime_in_progress_ off when composition text is nothing 2018-03-20 06:46:54 +09:00
Jyrki Vesterinen
34b6538a69 Restore ability to recruit full keep of one unit by holding Ctrl+Alt+R 2018-03-19 20:39:29 +02:00
gfgtdf
df058356df
remove a [on_redo]
since it was removed in 10561d3e53 this will cause errors. Please make sure it is not used in mainline before you remove something.
2018-03-19 17:50:07 +01:00
Sofartin
08a4981e9e Fixed campaignd Xcode target 2018-03-19 16:22:49 +02:00
Sofartin
9d1911e79b Fix InfoPlist.strings encoding 2018-03-19 12:30:58 +02:00
Gunter Labes
7ca7ed0e4f Enable lobby message logging again
Also re-enable flood protection and truncating too long messages.
2018-03-18 20:08:21 +01:00
Jyrki Vesterinen
0ab238ab76 Fix heading in players_changelog.md 2018-03-18 16:57:21 +02:00
Jyrki Vesterinen
5fa0581bc0 Fix #2681: minimap buttons don't do anything
Regression from commit ecc0dca665.
2018-03-18 16:46:47 +02:00
Lari Nieminen
b6702d616f
UtBS: Corrected Sun Singer movetype from float to foot 2018-03-18 15:28:23 +02:00
Charles Dang
ba68d52aa1 Updated main changelog link to point to 1.14 branch
[ci skip]
2018-03-18 18:58:41 +11:00
Charles Dang
22ec9d055a Post-release version bump
This is the first commit on the 1.14 stable series branch. 1.13.12 is 1.14 RC 1,
so we're just bumping to 1.13.12+dev/1.13.13 here. If the next release is 1.14.0,
we'll set the versions accordingly.
2018-03-18 18:47:52 +11:00
3140 changed files with 612637 additions and 794311 deletions

1
.gitignore vendored
View file

@ -186,6 +186,7 @@ data/campaigns/**/images/**/.gitignore
[Tt]humbs.db
*Neuer Ordner*
.directory
fonts/.uuid
# extensions
*.pyc

View file

@ -12,22 +12,22 @@ cache:
matrix:
include:
- compiler: clang
env: TOOL=scons CXXSTD=11 NLS=true
env: TOOL=scons CXXSTD=11 NLS=true LTS=1604 BRANCH=1.14
- compiler: gcc
env: TOOL=scons CXXSTD=14 NLS=false
env: TOOL=scons CXXSTD=14 NLS=false LTS=1604 BRANCH=1.14
- compiler: gcc
env: TOOL=scons CXXSTD=11 NLS=false OPT=-O0
env: TOOL=scons CXXSTD=11 NLS=false LTS=1604 BRANCH=1.14 OPT=-O0
- compiler: gcc
env: TOOL=cmake CXXSTD=11 NLS=false
env: TOOL=cmake CXXSTD=11 NLS=false LTS=1604 BRANCH=1.14
- compiler: clang
env: TOOL=scons CXXSTD=11 NLS=false OPT=-O0
env: TOOL=scons CXXSTD=11 NLS=false LTS=1604 BRANCH=1.14 OPT=-O0
- compiler: clang
env: TOOL=cmake CXXSTD=11 NLS=false
env: TOOL=cmake CXXSTD=11 NLS=false LTS=1604 BRANCH=1.14
- os: osx
compiler: clang

View file

@ -1,4 +1,4 @@

# set minimum version
cmake_minimum_required(VERSION 2.8.5)
@ -57,25 +57,13 @@ option(ENABLE_MYSQL "Enable building MP/add-ons servers with mysql support" OFF)
option(ENABLE_TESTS "Build unit tests")
option(ENABLE_NLS "Enable building of translations" ${ENABLE_GAME})
option(ENABLE_OMP "Enables OpenMP, and has additional dependencies" OFF)
option(ENABLE_LIBPNG "Enable support for writing png files (screenshots, images)" ON)
option(ENABLE_HISTORY "Enable using GNU history for history in lua console" ON)
if(NOT CMAKE_CROSSCOMPILING)
try_run(IEEE754_TEST_RETURN_CODE IEEE754_TEST_COMPILED ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/src/compile_time_tests/ieee_754.cpp
CMAKE_FLAGS "-DCMAKE_CXX_STANDARD=11" COMPILE_OUTPUT_VARIABLE IEEE754_TEST_COMPILE_OUTPUT)
if(NOT IEEE754_TEST_COMPILED)
message(WARNING "Failed to compile the IEEE 754 test. Skipping it.")
message(${IEEE754_TEST_COMPILE_OUTPUT})
elseif(NOT IEEE754_TEST_RETURN_CODE EQUAL 0)
message(FATAL_ERROR "Your platform does not represent floating point numbers in the IEEE 754 format.")
endif()
else()
message(WARNING "You are cross-compiling. Skipping IEEE 754 test.")
endif()
find_package(SDL2 2.0.4 REQUIRED)
if(ENABLE_GAME OR ENABLE_TESTS)
find_package(SDL2 2.0.4 REQUIRED)
endif(ENABLE_GAME OR ENABLE_TESTS)
find_package(Crypto 1.0 REQUIRED)
find_package(Boost 1.56 REQUIRED COMPONENTS iostreams program_options regex system thread random)
find_package(Boost 1.50 REQUIRED COMPONENTS iostreams program_options regex system thread random)
# no, gettext executables are not required when NLS is deactivated
find_package(Gettext)
@ -152,6 +140,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
option(ENABLE_APPDATA_FILE "enable installation of an appdata file for appstream" ON)
endif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
option(HARDEN "Whether to enable options to harden the executables" ON)
option(ENABLE_STRICT_COMPILATION "Sets the strict compilation mode" OFF)
option(ENABLE_PEDANTIC_COMPILATION "Sets the pedantic compilation mode" OFF)
option(ENABLE_DEBUG_WINDOW_LAYOUT "Add the debug option to allow the generation of debug layout files in dot format" OFF)
@ -240,6 +229,22 @@ if(NOT "${CMAKE_CXX_FLAGS}" STREQUAL "${COMPILER_FLAGS}")
)
endif(NOT "${CMAKE_CXX_FLAGS}" STREQUAL "${COMPILER_FLAGS}")
# check for hardening options
if(HARDEN)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIE -fstack-protector-strong")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIE -fstack-protector-strong")
if(APPLE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fPIE -Wl,-pie")
elseif(WIN32)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fPIE -pie")
else()
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fPIE -pie -Wl,-z,relro,-z,now")
endif()
add_definitions(-D_FORTIFY_SOURCE=2)
endif(HARDEN)
if(UNIX AND NOT CMAKE_COMPILER_IS_GNUCXX)
# Assume the compiler is the clang compiler.
set(CMAKE_EXE_LINKER_FLAGS "-lstdc++ -lm ${CMAKE_EXE_LINKER_FLAGS}")
@ -473,7 +478,7 @@ if(ENABLE_GAME OR ENABLE_TESTS)
endif(ENABLE_GAME OR ENABLE_TESTS)
if(ENABLE_TESTS)
find_package( Boost 1.56 REQUIRED COMPONENTS unit_test_framework )
find_package( Boost 1.36 REQUIRED COMPONENTS unit_test_framework )
endif(ENABLE_TESTS)
if(ENABLE_GAME)
@ -497,13 +502,6 @@ if(ENABLE_GAME)
unset(LIBDBUS_FOUND CACHE)
endif()
find_package( PNG )
if(ENABLE_LIBPNG AND PNG_FOUND)
add_definitions(-DHAVE_LIBPNG)
else(ENABLE_LIBPNG AND PNG_FOUND)
message("Could not find lib PNG. Disabling support for writing PNG images.")
endif(ENABLE_LIBPNG AND PNG_FOUND)
find_package( History )
if(ENABLE_HISTORY AND HISTORY_FOUND)
add_definitions(-DHAVE_HISTORY)
@ -512,8 +510,8 @@ if(ENABLE_GAME)
endif(ENABLE_HISTORY AND HISTORY_FOUND)
endif(ENABLE_GAME)
find_package(Boost 1.56 REQUIRED COMPONENTS filesystem)
find_package(Boost 1.56 REQUIRED COMPONENTS locale)
find_package(Boost 1.50 REQUIRED COMPONENTS filesystem)
find_package(Boost 1.50 REQUIRED COMPONENTS locale)
if(ENABLE_POT_UPDATE_TARGET)
find_package(TranslationTools REQUIRED)

View file

@ -38,7 +38,7 @@ PROJECT_NAME = "The Battle for Wesnoth"
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = 1.13.12
PROJECT_NUMBER = 1.14.3+dev
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a

View file

@ -16,7 +16,7 @@ later, or Clang 3.3 and later.
You'll need to have these libraries and their development headers installed in
order to build Wesnoth:
* Boost libraries >= 1.56.0
* Boost libraries >= 1.50.0
Most headers plus the following binary libs:
* Filesystem
* Locale
@ -52,12 +52,6 @@ features:
Bidirectional text support for RTL languages (Hebrew, etc.) in some parts
of the user interface.
* Growl
Desktop notifications on OS X, particularly on 10.7.
Although not recommended, you may use libintl on platforms other than Windows
instead of Boost.Locale. For scons, set the `libintl` option to `true`.
## 2. Build Environment
@ -79,7 +73,7 @@ The following build systems are fully supported for compiling Wesnoth on Linux,
*BSD, and other Unix-like platforms:
* SCons >= 0.98.3
* CMake >= 2.6.0
* CMake >= 2.8.5
You will also need to have a working installation of GNU gettext to build the
translations.
@ -182,13 +176,10 @@ Some of the most important options follow.
CMAKE_BUILD_TYPE=<build type> (CMake)
Selects a specific build configuration when compiling. `release` produces
the default, optimized (-O2) build for regular use. `debug` produces a
the default, optimized (-O3) build for regular use. `debug` produces a
slower and larger unoptimized (-O0) build with full debug symbols, which is
often needed for obtaining detailed backtraces when reporting bugs.
NOTE: By default, CMake will produce `debug` builds unless a different
configuration option is passed in the command line.
* ENABLE_GAME=<boolean> (CMake)
Whether to build the game client binary. Use command line target selection

View file

@ -1,4 +1,4 @@
[![Build Status](https://travis-ci.org/wesnoth/wesnoth.svg?branch=master)](https://travis-ci.org/wesnoth/wesnoth)
[![Build Status](https://travis-ci.org/wesnoth/wesnoth.svg?branch=1.14)](https://travis-ci.org/wesnoth/wesnoth)
[![Build status](https://ci.appveyor.com/api/projects/status/nv5jnof3lk3j6kg6?svg=true)](https://ci.appveyor.com/project/wesnoth/wesnoth)
[![License: GPL v2](https://img.shields.io/badge/License-GPL%20v2-blue.svg)](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)
[![Coverity Scan](https://img.shields.io/coverity/scan/1063.svg)](https://scan.coverity.com/projects/wesnoth)
@ -23,7 +23,7 @@ Please see the wiki for information regarding The Battle for Wesnoth's licensing
Installing
----------
See INSTALL for instructions on how to build the game from source code.
See INSTALL.md for instructions on how to build the game from source code.
More Information

View file

@ -26,14 +26,11 @@ CHANGES
[rawarn="Deprecations and breaking changes"]
[list]
[*][set_menu_item] no longer fires repeatedly if the player holds the hotkey (bug #1711). If you were relying on repeated firing, add repeat_on_hold=yes to [default_hotkey].
[*][tt]ai.synced_command[/tt] was removed
[/list]
[/rawarn]
[rasection="New Lua/WML features"]
[list]
[*]Add-on creators can now specify a comma-separated list of tags in the .pbl file, which are used by the Add-ons Manager when filtering add-ons by typing key words into the Filter box. This may be used to make it easier for people to find add-ons, e.g. by including their acronym among the tags. See [wiki]PblWML[/wiki] for details.
[/list]
[/rasection]
@ -41,7 +38,7 @@ CHANGES
KNOWN BUGS
==========
[raissue="Newly introduced in 1.13.x"]
[raissue="Newly introduced in 1.14.x"]
[b]General bugs:[/b]
[list]
@ -57,7 +54,6 @@ KNOWN BUGS
[b]General bugs:[/b]
[list]
[*]The game can crash when planning recruits in Planning Mode.
[/list]
[b]Bugs specific to Microsoft Windows:[/b]

View file

@ -55,6 +55,7 @@ opts.AddVariables(
('extra_flags_profile', 'Extra compiler and linker flags to use for profile builds', ""),
BoolVariable('enable_lto', 'Whether to enable Link Time Optimization for build=release', False),
('arch', 'What -march option to use for build=release, will default to pentiumpro on Windows', ""),
BoolVariable('harden', 'Whether to enable options to harden the executables', True),
BoolVariable('glibcxx_debug', 'Whether to define _GLIBCXX_DEBUG and _GLIBCXX_DEBUG_PEDANTIC for build=debug', False),
EnumVariable('profiler', 'profiler to be used for build=profile', "gprof", ["gprof", "gcov", "gperftools", "perf"]),
EnumVariable('pgo_data', 'whether to generate profiling data for PGO, or use existing profiling data', "", ["", "generate", "use"]),
@ -79,7 +80,6 @@ opts.AddVariables(
PathVariable('python_site_packages_dir', 'sets the directory where python modules are installed', "lib/python/site-packages/wesnoth", PathVariable.PathAccept),
BoolVariable('notifications', 'Enable support for desktop notifications', True),
BoolVariable('nls','enable compile/install of gettext message catalogs',True),
BoolVariable('png', 'Clear to disable writing png files for screenshots, images', True),
PathVariable('prefix', 'autotools-style installation prefix', "/usr/local", PathVariable.PathAccept),
PathVariable('prefsdir', 'user preferences directory', "", PathVariable.PathAccept),
PathVariable('default_prefs_file', 'default preferences file name', "", PathVariable.PathAccept),
@ -179,9 +179,12 @@ if env['distcc']:
if env['ccache']: env.Tool('ccache')
boost_version = '1.56.0'
boost_version = '1.50.0'
def SortHelpText(a, b):
return (a > b) - (a < b)
Help("""Arguments may be a mixture of switches and targets in any order.
Switches apply to the entire build regardless of where they are in the order.
Important switches include:
@ -232,7 +235,7 @@ specifying --option-cache=FILE command line argument. Current option values can
If you set CXXFLAGS and/or LDFLAGS in the environment, the values will
be appended to the appropriate variables within scons.
""" + opts.GenerateHelpText(env))
""" + opts.GenerateHelpText(env, sort=SortHelpText))
if GetOption("help"):
Return()
@ -305,7 +308,7 @@ def Warning(message):
from metasconf import init_metasconf
configure_args = dict(
custom_tests = init_metasconf(env, ["ieee_754", "cplusplus", "python_devel", "sdl", "boost", "cairo", "pango", "pkgconfig", "gettext_tool", "lua"]),
custom_tests = init_metasconf(env, ["cplusplus", "python_devel", "sdl", "boost", "cairo", "pango", "pkgconfig", "gettext_tool", "lua"]),
config_h = "$build_dir/config.h",
log_file="$build_dir/config.log", conf_dir="$build_dir/sconf_temp")
@ -335,13 +338,6 @@ if env["prereqs"]:
conf.CheckLib("m")
conf.CheckFunc("round")
def CheckIEEE754(conf):
if not env["host"]:
return conf.CheckIEEE754()
else:
Warning("You are cross-compiling. Skipping IEEE 754 test.")
return True
def CheckAsio(conf):
if env["PLATFORM"] == 'win32':
conf.env.Append(LIBS = ["libws2_32"])
@ -359,8 +355,10 @@ if env["prereqs"]:
conf.CheckSDL("SDL2_mixer", header_file = "SDL_mixer") & \
conf.CheckSDL("SDL2_image", header_file = "SDL_image")
if sys.platform == "msys":
env["PKG_CONFIG_FLAGS"] = "--dont-define-prefix"
have_server_prereqs = (\
CheckIEEE754(conf) & \
conf.CheckCPlusPlus(gcc_version = "4.8") & \
conf.CheckLib("libcrypto") & \
conf.CheckBoost("iostreams", require_version = boost_version) & \
@ -407,10 +405,6 @@ if env["prereqs"]:
if client_env['fribidi']:
client_env.Append(CPPDEFINES = ["HAVE_FRIBIDI"])
env["png"] = env["png"] and conf.CheckLib("png")
if env["png"]:
client_env.Append(CPPDEFINES = ["HAVE_LIBPNG"])
env["history"] = env["history"] and (conf.CheckLib("history") or Warning("Can't find GNU history, disabling history support."))
if env["history"]:
client_env.Append(CPPDEFINES = ["HAVE_HISTORY"])
@ -487,6 +481,25 @@ for env in [test_env, client_env, env]:
if env['sanitize']:
env.AppendUnique(CCFLAGS = ["-fsanitize=" + env["sanitize"]], LINKFLAGS = ["-fsanitize=" + env["sanitize"]])
# #
# Add options to provide more hardened executables
# osx doesn't seem to support RELRO
# #
if env['harden']:
env.AppendUnique(CCFLAGS = ["-fPIE", "-fstack-protector-strong"])
env.AppendUnique(CPPDEFINES = ["_FORTIFY_SOURCE=2"])
if env["enable_lto"] == True:
env.AppendUnique(LINKFLAGS = ["-fstack-protector-strong"])
if env["PLATFORM"] == 'darwin':
env.AppendUnique(LINKFLAGS = ["-fPIE", "-Wl,-pie"])
elif env["PLATFORM"] == 'win32':
env.AppendUnique(LINKFLAGS = ["-fPIE", "-pie"])
else:
env.AppendUnique(LINKFLAGS = ["-fPIE", "-pie", "-Wl,-z,relro,-z,now"])
# #
# Start determining options for debug build
# #
@ -543,6 +556,10 @@ for env in [test_env, client_env, env]:
rel_comp_flags = rel_comp_flags + " -flto=thin"
rel_link_flags = rel_comp_flags + " -fuse-ld=lld"
# Enable ASLR and NX bit support on mingw
if "mingw" in env["TOOLS"]:
rel_link_flags += "-Wl,--dynamicbase -Wl,--nxcompat"
# #
# End setting options for release build
# Start setting options for profile build
@ -803,7 +820,6 @@ env.Alias("wesnoth-bundle",
Copy("${TARGET}/Contents/Resources/English.lproj", "projectfiles/Xcode/English.lproj"),
Copy("${TARGET}/Contents/Resources/fonts", "fonts"),
Copy("${TARGET}/Contents/Resources/fonts.conf", "projectfiles/Xcode/Resources/fonts.conf"),
Copy("${TARGET}/Contents/Resources/Growl Registration Ticket.growlRegDict", "projectfiles/Xcode/Resources/Growl Registration Ticket.growlRegDict"),
Copy("${TARGET}/Contents/Resources/icon.icns", "projectfiles/Xcode/Resources/icon.icns"),
Copy("${TARGET}/Contents/Resources/images", "images"),
Copy("${TARGET}/Contents/Resources/SDLMain.nib", "projectfiles/Xcode/Resources/SDLMain.nib"),

View file

@ -1,3 +1,329 @@
## Version 1.14.3+dev
### Campaigns
* Eastern Invasion:
* Fixed missing prisoners and loss of recallable units in 'Captured'.
### User interface
* Improved the layout of the Statistics dialog.
* Allow changing dropdown menu selections with the scrollwheel (FR #3251).
### Graphics
* Tweaked the Ruffian's attack animation timing.
* New attack animation for the Peasant.
### Language and i18n
* Updated translations: Slovak
### Miscellaneous and bug fixes
* Added an advanced preference to enable experimental PRNG combat.
* Fixed MP admins being unable to observe private games.
* Fixed MP faction, leader, and leader gender changes persisting even if the
selection dialog is dismissed.
## Version 1.14.3
### AI
* Fixed crash in presence of units with negative hitpoints (issue #3042).
* Efficiency improvements to filter evaluations in the Goto Micro AI and some
AI helper functions
### Campaigns
* Dead Water:
* Fix possibility of villagers blocking pickup of sword in S10 The Flaming
Sword (issue #3207).
* Descent Into Darkness:
* New Parthyn map in S1 and S6.
* Northern Rebirth:
* Reduced starting gold and income in scenarios 10 to 13
* Secrets of the Ancients:
* Fix S09 Training Session not ending when all dark adepts die (issue #3192)
* Tutorial:
* S2: made enemy starting gold equal to that of the player.
* Under the Burning Suns:
* Added portrait and updated sprite for Giant Ant.
### Language and i18n
* Updated translations: British English, Chinese (Traditional), Czech, French,
Italian, Japanese, Scottish Gaelic, Spanish
### Multiplayer server
* Fixed lan_server option not causing the server to exit once vacated, e.g.
when using the Host Networked Game option from the Multiplayer menu in the
game (issue #3206).
### Music and sound effects
* The music now changes immediately when you load a save file (issue #2602).
* Fixed Lua errors when setting a music track that cannot be found when the
playlist is already empty, e.g. if there's no music installed for the
game (issue #3194).
### WML engine
* Removed validation to ensure units cannot have negative hitpoints. We
learned that the ability to create such units is documented, and thus
disallowing it was an API change. Since API changes aren't allowed in
the stable branch, we have reverted it.
### Miscellaneous and bug fixes
* Fixed an occasional crash at the loading screen related to multi-thread
access of the image cache.
* [kill] animate=yes no longer scrolls to units through fog or shroud, thus
matching 1.12's behavior again.
* [message] displays the unit type name when a nameless unit speaks and no
custom caption= is specified (issue #3211).
* do_not_list=yes units are no longer excluded from the debug mode-only
Create Unit dialog.
* Fixed a rare issue where disabled attacks could cause the wrong attack to
be initially selected in the Unit Attack dialog. This bug also had the
potential to cause units to the wrong attack when engaging or viewing
damage calculations.
* Fixed [scenario] map_file= being unusable in most circumstances.
## Version 1.14.2
### Campaigns
* Northern Rebirth:
* S02.1 Infested Caves: keep side 8 AI leader from wandering off too far
and ending up on a keep with only one hex for recruiting.
* S02.1 Infested Caves: AIs are less likely to kill each other in early
game, which would make it harder for the player otherwise.
* S02.1 Infested Caves: Dwarvish allies are also less likely to die.
* S02.1 Infested Caves: minor map tweaks and improvements.
* S05 The Pursuit: removed a bottleneck and tweaked Rod of Justice.
* Sceptre of Fire:
* In 'Caverns of Flame', fixed various issues with the volcano eruption.
* Under the Burning Suns:
* Various Quenoth unit graphics updates.
* Descent into Darkness:
* In 'A small Favor', disabled a not intended way to win the scenario.
* Secrets of the Ancients:
* Bats are transformed to normal ones already after S5
### Graphics
* Fixed a minor team coloring mistake in the north-facing Revenant standing
animation.
### Language and i18n
* Updated translations: British English, Chinese (Simplified), Czech, French,
Galician, German, Italian, Japanese, Scottish Gaelic, Spanish, Ukrainian
### User interface
* List boxes (MP lobby game list in particular) now keep the scroll position
when they change, instead of keeping the selected item visible (issue #3016).
* Fixed MP lobby player list scrolling to top when it changes
* Fixed the first unit sometimes not being selected when opening the Recall
dialog.
* Fixed a crash when using very large portraits in [message] (issue #2912)
* Added a button to access the version info dialog to Preferences.
* Removed player list sorting options in the MP lobby. The list is now
automatically sorted alphabetically, friends first.
* Rearranged campaign difficulty menu layout
### Terrains
* Removed hidden terrains that were not supposed to make it to 1.14: ^Prg,
^Prgo, ^Pwd, ^Pwdo
### Miscellaneous and bug fixes
* Fixed memory leak in terrain filter code. In a huge map with Silver Mages,
it could leak several gigabytes of memory in a long session.
* Fixed: unit halo remained after undoing a recall (issue #3065)
* Fixed: unit halo intensity doubled during AMLA animation
* [change_theme] no longer causes a Lua error when theme= is not specified
instead of explicitly set to an empty string.
* [change_theme] no longer requires running a separate action to update the
UI afterwards (e.g. [redraw]) and the status panels are updated immediately.
as well.
* Lua random map generator: fixed error when flipping map; specifically this
also fixes an assert at the start of HttT S7 (Sceptre of Fire) that had a
50% chance of being triggered
* Experimental AI: fixed recruiting not working on maps without enemies, such
as the first two turns of Dark Forecast
* Experimental AI: fixed recruiting evaluations sometimes not being updated
* Replaced deprecated Lua code and all remaining uses of FOREACH and MESSAGE
macros
* Fixed [color_adjust] interacting poorly with time of day color shifts and
values outside the [-255, 255] range (issue #3144).
* Fixed a regression from 1.13.10 where modification option values couldn't
be properly saved in arrays.
* Added stricter validation to ensure units cannot have negative hitpoints,
except during specific attack-related events.
* Added deprecation notices for several macros that had them missing before.
* [message] no longer scrolls to units through fog or shroud so it matches
1.12's behavior.
* Fixed animation-wide text_color and blend_color keys being overwritten. This
fixes level-in and level-out animations sometimes fading to black instead of
white.
* Fixed [animate_unit] freezing the game when observing MP games (#2970).
* Fixed carryover behaving differently when loading a start-of-scenario save
(issue #3152).
* Fixed turn replay function in MP.
* Fixed savegames being created even when not needed (issue #3150).
* Fixed handling of extra_recruit in planning mode (issue #3100).
* Fixed handling of skirmisher in planning mode.
* Fixed handling of filter_recall in planning mode.
* Fixed possible segfault at game end.
* Fixed require_resource in [resource].
* Fixed require_scenario=yes not working with map_generation (issue #3105).
## Version 1.14.1
### Campaigns
* Eastern Invasion:
* In 'Captured', fixed units incorrectly costing upkeep after leveling up.
* Secrets of the Ancients
* Fixed minor unit naming inconsistencies (issues #2844 and #2846).
* Under the Burning Suns
* Added custom graphics for the broken tree in S1.
* Various sprite and image updates.
* Fixed a bug in the formation ability causing defense bonuses not being
received in some cases.
### Language and i18n
* Updated translations: British English, Chinese (Simplified), Czech, French,
Galician, German, Italian, Japanese, Scottish Gaelic, Slovak, Spanish
* Fixed Logging Options tooltips not being translatable (issue #2837).
* Add command-line argument to disable the filtering of incomplete translations
in the language selection list.
### Multiplayer server
* Added support for matching user, IP, and email bans from a forums board
when the forum_user_handler is enabled and active. (IP and email bans with
wildcards are not supported yet.)
* Fixed various instances of the server crashing under certain conditions.
### Performance
* Added an option to disable the FPS limiter for a slight performance boost.
### Units
* Changed the plural name for the merfolk race from Mermen to Merfolk (issue #2940)
and replaced a few instances in core unit or terrain descriptions accordingly.
### User interface
* Removed individual Join/Observe buttons for each game in the MP Lobby.
* Highlight the titles of MP games with vacant slots.
* Improved MP Lobby layout on low resolutions.
* Improved reporting of network errors in the MP lobby (issue #3005).
* Ensure the chat widget remains the correct size even after a window resize.
* Custom MP game names are now capped at 50 characters.
* Restored Era info to main MP game display.
* Improved the resolution selection criteria for the MP Lobby.
* Fixed inactive weapon specials being displayed in the Unit Attack dialog
unlike in 1.12 (issue #3033).
### Miscellaneous and bug fixes
* Removed misleading tooltip text stating registered nicknames are optional for
the official MP server.
* Attempting to save a screenshot with an unsupported format now shows an error
message, instead of saving the screenshot as BMP with the requested extension.
* It is now possible to disable logdomains in the Logging Options dialog.
* Fixed the wesnoth(6) manpage claiming the default log level is 'error' when it
has been 'warning' since version 1.9.0.
* Document --log-none in the wesnoth(6) manpage.
* Avoid trying to load invalid base64-encoded data URIs.
* wesnoth_addon_manager and the addons.wesnoth.org web index can now use data URIs.
* Fixed a crash when using certain invalid color= values.
* Implemented a workaround for an unhandled std::bad_cast from string comparison
functions that caused a crash-to-desktop when opening Preferences among others
(issue #3050).
* Fixed many crashes and out-of-sync errors when using the planning mode.
## Version 1.14.0
### Campaigns
* Under the Burning Suns
* New set of Quenoth faction and character portraits by LordBob.
* Updated sprites for several Quenoth units.
* Fixed "Invalid WML found" error that can be caused by the Quenoth Youth
support ability.
### Help browser
* Temporarily hidden Editor section as it is mostly incomplete and of little
use right now (issue #2963).
### Language and i18n
* Fixed Version label on the title screen not being translatable (issue #2914).
* Updated translations: Czech, French, Galician, German, Japanese, Polish,
Scottish Gaelic, Slovak, Spanish
### Multiplayer
* Fixed regression causing a crash-to-desktop when trying to log into the
server using a registered and active account without specifying a
password.
* Fixed an infinite loading screen if the server shut down or restarted
mid-login.
* Fixed an infinite loading screen when attempting to login with an
unregistered nickname followed by a registered one.
* Dark Forecast: Fixed possible Lua error when the weather changes.
### User Interface
* Implemented MP chat message history saving (issue #1194, issue #2802).
* Fixed context menus not dismissing on right click.
### Miscellaneous and bug fixes
* Fixed an AI assertion when a unit with one disabled attack attacked a unit
with no attacks or a single disabled attack.
## Version 1.13.14
### Security fixes
* Fixed an issue allowing MP lobby and whisper message origins to be spoofed
by clients.
### Campaigns
* The Hammer of Thursagan
* S12 Fixed enemies from ai6 (south-east lich) going to the book (spider)
room
* S12 Fixed north treasure chest disappearing
* The Rise of Wesnoth
* New set of story art.
### Help browser
* Unit descriptions use the new multiplication sign format for attack lists
now (issue #2873).
### Language and i18n
* Updated translations: Chinese (Simplified), Czech, French, Galician,
Italian, Polish
### Lua API
* Fix wesnoth.show_popup_dialog and wesnoth.show_message_box not accepting
translatable strings
### Multiplayer
* Added team color to a few background units missing in Aethermaw.
### User Interface
* Swapped the position and formatting of game names and titles in the MP
lobby.
* Made Faction Select button's purpose more clear in MP Staging.
* Added a convenient button in Load Game to open your saves folder.
### Miscellaneous and bug fixes
* Removed the Font Scaling preference. It was too buggy (issues #2792 and
#1624).
* Fixed some hotkeys triggering multiple commands on GNU/Linux (bug #1736).
* Fixed [modify_side] share_vision=yes not doing anything (bug #2850).
* Fixed regression where unit filters in [disable] weapon specials would not
match the attacking unit.
* Fixed images with no alpha channel rendering incorrectly.
* Fixed unit selection not persisting between uses of Create Unit.
* Fixed assertion when undoing actions in a synced context.
* [filter_wml] no longer accepts [and] and [or] in addition to [not] since
the implementation was non-functional.
* Fixed some MP passwords being saved incorrectly (issue #2745)
* Fixed AI not recruiting in some circumstances when there are only cheap
units on the recall list.
* Fixed sometimes being unable to join MP games with non-required eras.
* Fixed locations not being added to the palette when loading a map (#1023)
## Version 1.13.13
### Campaigns
* Eastern Invasion
* Fixed some Lua errors in S05.
* The Hammer of Thursagan
* Fixed a misplaced door image in S12.
* Under the Burning Suns
* Changed Sun Singer movetype from float to foot.
* Added some Quenoth elf unit animations.
* Hide technical terrains in the Help browser (Human Ship, Lava overlay).
### Language and i18n
* Fixed many cases of interpolated strings in the engine possibly having
their translations retrieved from the wrong textdomain and falling back
to the English original if that failed (PR #2711, bug #2709, bug #2732).
* Fixed parts of the MP game setup UI having their translations ignored by
the game (bug #2709).
* Fixed certain parts of the UI displaying unit stats and trait effects
having incomplete translations (bug #2732).
* Fixed "Level" label in unit descriptions in the help being untranslatable
(bug #2732)
* Fixed "Search" placeholder text in dialog item filters not being
translatable (bug #2709, bug #2732).
* Fixed "Time of Day Schedule" heading for the index for the ToD Schedule
top-level help section, "Lawful Bonus", "Schedule" (back link to index)
and an error message not being translatable.
* Updated translations: British English, Chinese (Simplified), Czech, French,
Scottish Gaelic, Spanish, Ukrainian
### Multiplayer
* A New Land: Fixed the scenario being broken.
* Dark Forecast: Fixed possible Lua error when attempting to spawn units.
### Miscellaneous and bug fixes
* Fixed minimap buttons not doing anything (bug #2681)
* Fixed events with an id but no name being rejected
* Fixed assertion when using [inspect]
* Fixed inability to deselect modifications in single-player
* Fixed infinite loading screen when logging in with an invalid name
* Improved UX in multiplayer when synced debug commands are used during a
game.
* Updated bundled Oldania font to version 1.007 (from 1.006).
* Added bold and italic Oldania font variants.
* Updated bundled DejaVu Sans fonts to version 2.37 (from 2.35).
* Fixed [chat] not working during [delay] or animations.
* Removed the Password Reminder option from the Login screen.
* Removed (optional) requirement of libpng from SCons and CMake and the
associated options as Wesnoth now uses SDL_image to write PNG files.
* Fixed assertion when saving game events mid-event.
## Version 1.13.12
### Security fixes
* Disallowed access to blacklisted file paths such as hidden files and

View file

@ -6,6 +6,6 @@ find_library(CRYPTO_LIBRARY crypto)
# handle the QUIETLY and REQUIRED arguments and set XXX_FOUND to TRUE if all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CRYPTO DEFAULT_MSG CRYPTO_LIBRARY CRYPTO_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Crypto DEFAULT_MSG CRYPTO_LIBRARY CRYPTO_INCLUDE_DIR)
mark_as_advanced(CRYPTO_INCLUDE_DIR CRYPTO_LIBRARY)

View file

@ -6,6 +6,6 @@ find_library(HISTORY_LIBRARY history)
# handle the QUIETLY and REQUIRED arguments and set XXX_FOUND to TRUE if all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(HISTORY DEFAULT_MSG HISTORY_LIBRARY HISTORY_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(History DEFAULT_MSG HISTORY_LIBRARY HISTORY_INCLUDE_DIR)
mark_as_advanced(HISTORY_INCLUDE_DIR HISTORY_LIBRARY)

View file

@ -91,6 +91,6 @@ ENDIF()
# handle the QUIETLY and REQUIRED arguments and set XXX_FOUND to TRUE if all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(VORBISFILE DEFAULT_MSG VORBISFILE_LIBRARIES VORBISFILE_INCLUDE_DIR)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(VorbisFile DEFAULT_MSG VORBISFILE_LIBRARIES VORBISFILE_INCLUDE_DIR)
mark_as_advanced(VORBISFILE_INCLUDE_DIR VORBISFILE_LIBRARIES VORBISFILE_LIBRARY VORBISFILE_LIBRARY_DEBUG)

View file

@ -56,17 +56,6 @@
default=yes
[/advanced_preference]
[advanced_preference]
field=ping_timeout
name= _ "Ping timeout"
description= _ "Number of seconds to wait for a ping reply before timing out. Set to 0 to disable"
type=int
default=0
min=0
max=60
step=5
[/advanced_preference]
[advanced_preference]
field=lobby_auto_open_whisper_windows
name= _ "Auto-open whisper windows in lobby"
@ -184,16 +173,25 @@
default=yes
[/advanced_preference]
#ifdef __UNUSED__
[advanced_preference]
field=show_deprecation
# TODO: Add translation marks and enable this after 1.14
name="Show deprecation messages in-game"
description="Show warnings about deprecated API in the in-game chat area. These messages will still be shown in the log, even if this is disabled. In addition, the deprecation log-domain controls how many messages are printed."
name= _ "Show deprecation messages in-game"
description= _ "Show warnings about deprecated API in the in-game chat area. These messages will still be shown in the log, even if this is disabled. In addition, the deprecation log-domain controls how many messages are printed."
type=boolean
default=no
[/advanced_preference]
[advanced_preference]
field=use_prng
name= _ "Use experimental PRNG combat"
description= _ "Enables more determinstic chance-to-hit calculations. This is an experimental feature designed to bring the observed hit/miss rate more in line with the displayed percentages.
Note: this option only affects singleplayer, and the 'Save random seed' option must also be enabled when creating a game for this to work."
type=boolean
default=no
[/advanced_preference]
#ifdef __UNUSED__
[advanced_preference]
field=joystick_support_enabled
name= _ "Joystick support"

View file

@ -895,43 +895,18 @@ end
--------- Unit related helper functions ----------
function ai_helper.get_live_units(filter)
-- Same as wesnoth.get_units(), except that it only returns non-petrified units
local all_units = wesnoth.get_units(filter)
local units = {}
for _,unit in ipairs(all_units) do
if (not unit.status.petrified) then table.insert(units, unit) end
end
return units
-- Note: the order of the filters and the [and] tags are important for speed reasons
return wesnoth.get_units { { "not", { status = "petrified" } }, { "and", filter } }
end
function ai_helper.get_units_with_moves(filter)
-- Using formula = '$this_unit.moves > 0' is slow, this method is much faster
local all_units = wesnoth.get_units(filter)
local units = {}
for _,unit in ipairs(all_units) do
if (unit.moves > 0) then table.insert(units, unit) end
end
return units
-- Note: the order of the filters and the [and] tags are important for speed reasons
return wesnoth.get_units { { "and", { formula = "moves > 0" } }, { "and", filter } }
end
function ai_helper.get_units_with_attacks(filter)
-- Using formula = '$this_unit.attacks_left > 0' is slow, this method is much faster
-- Also need to check that units actually have attacks (as attacks_left > 0 with no attacks is possible)
local all_units = wesnoth.get_units(filter)
local units = {}
for _,unit in ipairs(all_units) do
if (unit.attacks_left > 0) and (#unit.attacks > 0) then
table.insert(units, unit)
end
end
return units
-- Note: the order of the filters and the [and] tags are important for speed reasons
return wesnoth.get_units { { "and", { formula = "attacks_left > 0 and size(attacks) > 0" } }, { "and", filter } }
end
function ai_helper.get_visible_units(viewing_side, filter)
@ -1092,9 +1067,9 @@ end
function ai_helper.has_ability(unit, ability)
-- Returns true/false depending on whether unit has the given ability
local has_ability = false
local abilities = H.get_child(unit.__cfg, "abilities")
local abilities = wml.get_child(unit.__cfg, "abilities")
if abilities then
if H.get_child(abilities, ability) then has_ability = true end
if wml.get_child(abilities, ability) then has_ability = true end
end
return has_ability
end

View file

@ -38,11 +38,11 @@ function battle_calcs.unit_attack_info(unit, cache)
resist_mod = {},
alignment = unit_cfg.alignment
}
for attack in H.child_range(unit_cfg, 'attack') do
for attack in wml.child_range(unit_cfg, 'attack') do
-- Extract information for specials; we do this first because some
-- custom special might have the same name as one of the default scalar fields
local a = {}
for special in H.child_range(attack, 'specials') do
for special in wml.child_range(attack, 'specials') do
for _,sp in ipairs(special) do
if (sp[1] == 'damage') then -- this is 'backstab'
if (sp[2].id == 'backstab') then

View file

@ -23,8 +23,6 @@ return {
end
math.randomseed(os.time())
local H = wesnoth.require "helper"
local W = H.set_wml_action_metatable {}
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local LS = wesnoth.require "location_set"
local M = wesnoth.map
@ -60,10 +58,10 @@ return {
random_gender = false
}
-- Find the best regeneration ability and use it to estimate hp regained by regeneration
local abilities = H.get_child(unit.__cfg, "abilities")
local abilities = wml.get_child(unit.__cfg, "abilities")
local regen_amount = 0
if abilities then
for regen in H.child_range(abilities, "regenerate") do
for regen in wml.child_range(abilities, "regenerate") do
if regen.value > regen_amount then
regen_amount = regen.value
end
@ -121,21 +119,21 @@ return {
-- This may be rectifiable by looking at retaliation damage as well.
local steadfast = false
for attack in H.child_range(wesnoth.unit_types[attacker.type].__cfg, "attack") do
for attack in wml.child_range(wesnoth.unit_types[attacker.type].__cfg, "attack") do
local defense = defender_defense
local poison = false
local damage_multiplier = 1
local damage_bonus = 0
local weapon_damage = attack.damage
for special in H.child_range(attack, 'specials') do
for special in wml.child_range(attack, 'specials') do
local mod
if H.get_child(special, 'poison') and can_poison then
if wml.get_child(special, 'poison') and can_poison then
poison = true
end
-- Handle marksman and magical
mod = H.get_child(special, 'chance_to_hit')
mod = wml.get_child(special, 'chance_to_hit')
if mod then
if mod.value then
if mod.cumulative then
@ -157,7 +155,7 @@ return {
end
-- Handle most damage specials (assumes all are cumulative)
mod = H.get_child(special, 'damage')
mod = wml.get_child(special, 'damage')
if mod and mod.active_on ~= "defense" then
local special_multiplier = 1
local special_bonus = 0
@ -195,10 +193,10 @@ return {
-- Handle drain for defender
local drain_recovery = 0
for defender_attack in H.child_range(defender.__cfg, 'attack') do
for defender_attack in wml.child_range(defender.__cfg, 'attack') do
if (defender_attack.range == attack.range) then
for special in H.child_range(defender_attack, 'specials') do
if H.get_child(special, 'drains') and drainable(attacker) then
for special in wml.child_range(defender_attack, 'specials') do
if wml.get_child(special, 'drains') and drainable(attacker) then
-- TODO: calculate chance to hit
-- currently assumes 50% chance to hit using supplied constant
local attacker_resistance = wesnoth.unit_resistance(attacker, defender_attack.type)
@ -293,9 +291,9 @@ return {
end
function can_slow(unit)
for defender_attack in H.child_range(unit.__cfg, 'attack') do
for special in H.child_range(defender_attack, 'specials') do
if H.get_child(special, 'slow') then
for defender_attack in wml.child_range(unit.__cfg, 'attack') do
for special in wml.child_range(defender_attack, 'specials') do
if wml.get_child(special, 'slow') then
return true
end
end
@ -420,9 +418,20 @@ return {
add_unit_type(unit_type)
end
end
-- If no enemies were found, add a small number of "representative" unit types
if #enemy_types == 0 then
add_unit_type('Orcish Grunt')
add_unit_type('Orcish Archer')
add_unit_type('Wolf Rider')
add_unit_type('Spearman')
add_unit_type('Bowman')
add_unit_type('Cavalryman')
end
data.enemy_counts = enemy_counts
data.enemy_types = enemy_types
data.num_enemies = #enemies
data.num_enemies = math.max(#enemies, 1)
data.possible_enemy_recruit_count = possible_enemy_recruit_count
return data
@ -443,7 +452,7 @@ return {
end
function ai_cas:recruit_rushers_exec()
if AH.show_messages() then W.message { speaker = 'narrator', message = 'Recruiting' } end
if AH.show_messages() then wesnoth.wml_actions.message { speaker = 'narrator', message = 'Recruiting' } end
local enemy_counts = recruit_data.recruit.enemy_counts
local enemy_types = recruit_data.recruit.enemy_types
@ -577,6 +586,9 @@ return {
return true
else
-- This results in the CA being blacklisted -> clear cache
recruit_data.recruit = nil
return false
end
end
@ -652,14 +664,32 @@ return {
local best_scores = {offense = 0, defense = 0, move = 0}
local best_hex = recruit_data.recruit.best_hex
local target_hex = recruit_data.recruit.target_hex
local distance_to_enemy, enemy_location
if target_hex[1] then
distance_to_enemy, enemy_location = AH.get_closest_enemy(target_hex, wesnoth.current.side, { viewing_side = 0 })
else
distance_to_enemy, enemy_location = AH.get_closest_enemy(best_hex, wesnoth.current.side, { viewing_side = 0 })
local reference_hex = target_hex[1] and target_hex or best_hex
local distance_to_enemy, enemy_location = AH.get_closest_enemy(reference_hex, wesnoth.current.side, { viewing_side = 0 })
-- If no enemy is on the map, then we first use closest enemy start hex,
-- and if that does not exist either, a location mirrored w.r.t the center of the map
if not enemy_location then
local enemy_sides = wesnoth.get_sides({ { "enemy_of", {side = wesnoth.current.side} } })
local min_dist = math.huge
for _, side in ipairs(enemy_sides) do
local enemy_start_hex = wesnoth.special_locations[side.side]
if enemy_start_hex then
local dist = wesnoth.map.distance_between(reference_hex[1], reference_hex[2], enemy_start_hex[1], enemy_start_hex[2])
if dist < min_dist then
min_dist = dist
enemy_location = { x = enemy_start_hex[1], y = enemy_start_hex[2] }
end
end
end
if not enemy_location then
local width, height = wesnoth.get_map_size()
enemy_location = { x = width + 1 - reference_hex[1], y = height + 1 - reference_hex[2] }
end
distance_to_enemy = wesnoth.map.distance_between(reference_hex[1], reference_hex[2], enemy_location.x, enemy_location.y)
end
local gold_limit = 9e99
local gold_limit = math.huge
if recruit_data.castle.loose_gold_limit >= recruit_data.recruit.cheapest_unit_cost then
gold_limit = recruit_data.castle.loose_gold_limit
end
@ -936,7 +966,7 @@ return {
local test_units, num_recruits = {}, 0
local movetypes = {}
for x,id in ipairs(wesnoth.sides[wesnoth.current.side].recruit) do
local custom_movement = H.get_child(wesnoth.unit_types[id].__cfg, "movement_costs")
local custom_movement = wml.get_child(wesnoth.unit_types[id].__cfg, "movement_costs")
local movetype = wesnoth.unit_types[id].__cfg.movement_type
if custom_movement
or (not movetypes[movetype])

View file

@ -6,8 +6,6 @@ return {
-- More generic grunt rush (and can, in fact, be used with other unit types as well)
local H = wesnoth.require "helper"
local W = H.set_wml_action_metatable {}
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local BC = wesnoth.require "ai/lua/battle_calcs.lua"
local LS = wesnoth.require "location_set"
@ -256,7 +254,7 @@ return {
local leader = wesnoth.get_units { side = wesnoth.current.side, canrecruit = 'yes' }[1]
if AH.print_exec() then print_time(' Executing castle_switch CA') end
if AH.show_messages() then W.message { speaker = leader.id, message = 'Switching castles' } end
if AH.show_messages() then wesnoth.wml_actions.message { speaker = leader.id, message = 'Switching castles' } end
AH.checked_move(ai, leader, self.data.leader_target[1], self.data.leader_target[2])
self.data.leader_target = nil
@ -395,7 +393,7 @@ return {
function generic_rush:grab_villages_exec()
if AH.print_exec() then print_time(' Executing grab_villages CA') end
if AH.show_messages() then W.message { speaker = self.data.unit.id, message = 'Grab villages' } end
if AH.show_messages() then wesnoth.wml_actions.message { speaker = self.data.unit.id, message = 'Grab villages' } end
AH.movefull_stopunit(ai, self.data.unit, self.data.village)
self.data.unit, self.data.village = nil, nil
@ -492,7 +490,7 @@ return {
local is_poisoner, poison_weapon = AH.has_weapon_special(attacker, "poison")
if AH.print_exec() then print_time(' Executing spread_poison CA') end
if AH.show_messages() then W.message { speaker = attacker.id, message = 'Poison attack' } end
if AH.show_messages() then wesnoth.wml_actions.message { speaker = attacker.id, message = 'Poison attack' } end
AH.robust_move_and_attack(ai, attacker, self.data.attack.dst, self.data.attack.target, { weapon = poison_weapon })

View file

@ -84,8 +84,8 @@ function retreat_functions.get_healing_locations()
if u.moves == 0 or u.side ~= wesnoth.current.side then
local heal_amount = 0
local cure = 0
local abilities = H.get_child(u.__cfg, "abilities") or {}
for ability in H.child_range(abilities, "heals") do
local abilities = wml.get_child(u.__cfg, "abilities") or {}
for ability in wml.child_range(abilities, "heals") do
heal_amount = ability.value
if ability.poison == "slowed" then
cure = 1

View file

@ -5,12 +5,12 @@ local LS = wesnoth.require "location_set"
local function get_units_target(cfg)
local units = AH.get_units_with_moves {
side = wesnoth.current.side,
{ "and", H.get_child(cfg, "filter") }
{ "and", wml.get_child(cfg, "filter") }
}
local target = wesnoth.get_units {
{ "filter_side", { { "enemy_of", { side = wesnoth.current.side } } } },
{ "and", H.get_child(cfg, "filter_second") }
{ "and", wml.get_child(cfg, "filter_second") }
}[1]
return units, target
@ -55,7 +55,7 @@ function ca_assassin_move:execution(cfg)
local enemies = AH.get_visible_units(wesnoth.current.side, {
{ "filter_side", { { "enemy_of", { side = wesnoth.current.side } } } },
{ "not", H.get_child(cfg, "filter_second") }
{ "not", wml.get_child(cfg, "filter_second") }
})
-- Maximum damage the enemies can theoretically do for all hexes they can attack
@ -128,7 +128,7 @@ function ca_assassin_move:execution(cfg)
-- Preferred hexes (do this here once for all hexes, so that it does not need
-- to get done for every step of the a* search.
-- We only need to know whether a hex is preferred or not, there's no additional rating.
local prefer_slf = H.get_child(cfg, "prefer")
local prefer_slf = wml.get_child(cfg, "prefer")
local prefer_map -- want this to be nil, not empty LS if [prefer] tag not given
if prefer_slf then
local preferred_hexes = wesnoth.get_locations(prefer_slf)

View file

@ -6,7 +6,7 @@ local MAIUV = wesnoth.require "ai/micro_ais/micro_ai_unit_variables.lua"
local function get_big_animals(cfg)
local big_animals = AH.get_units_with_moves {
side = wesnoth.current.side,
{ "and" , H.get_child(cfg, "filter") }
{ "and" , wml.get_child(cfg, "filter") }
}
return big_animals
end
@ -24,7 +24,7 @@ function ca_big_animals:execution(cfg)
local unit = get_big_animals(cfg)[1]
local avoid_tag = H.get_child(cfg, "avoid_unit")
local avoid_tag = wml.get_child(cfg, "avoid_unit")
local avoid_map = LS.create()
if avoid_tag then
local enemies_to_be_avoided = AH.get_attackable_enemies(avoid_tag)
@ -41,7 +41,7 @@ function ca_big_animals:execution(cfg)
-- Unit gets a new goal if none is set or on any move with a 10% random chance
local r = math.random(10)
if (not goal.goal_x) or (r == 1) then
local locs = AH.get_passable_locations(H.get_child(cfg, "filter_location") or {})
local locs = AH.get_passable_locations(wml.get_child(cfg, "filter_location") or {})
local rand = math.random(#locs)
goal.goal_x, goal.goal_y = locs[rand][1], locs[rand][2]
@ -49,7 +49,7 @@ function ca_big_animals:execution(cfg)
end
local reach_map = AH.get_reachable_unocc(unit)
local wander_terrain = H.get_child(cfg, "filter_location_wander") or {}
local wander_terrain = wml.get_child(cfg, "filter_location_wander") or {}
reach_map:iter( function(x, y, v)
-- Remove tiles that do not comform to the wander terrain filter
if (not wesnoth.match_location(x, y, wander_terrain)) then

View file

@ -2,7 +2,7 @@ local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local function get_coward(cfg)
local filter = H.get_child(cfg, "filter") or { id = cfg.id }
local filter = wml.get_child(cfg, "filter") or { id = cfg.id }
local coward = AH.get_units_with_moves {
side = wesnoth.current.side,
{ "and", filter }
@ -23,7 +23,7 @@ function ca_coward:execution(cfg)
local reach = wesnoth.find_reach(coward)
local filter_second =
H.get_child(cfg, "filter_second")
wml.get_child(cfg, "filter_second")
or { { "filter_side", { { "enemy_of", { side = wesnoth.current.side } } } } }
local enemies = AH.get_live_units {
{ "and", filter_second },

View file

@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local LS = wesnoth.require "location_set"
local T = wml.tag
@ -22,7 +21,7 @@ function ca_fast_attack_utils.get_avoid_map(cfg)
-- Use [micro_ai][avoid] tag with priority over [ai][avoid].
-- If neither is given, return an empty location set.
local avoid_tag = H.get_child(cfg, "avoid")
local avoid_tag = wml.get_child(cfg, "avoid")
if not avoid_tag then
return LS.of_pairs(ai.aspects.avoid)
@ -118,7 +117,7 @@ function ca_fast_attack_utils.single_unit_info(unit_proxy)
}
-- Include the ability type, such as: hides, heals, regenerate, skirmisher (set up as 'hides = true')
local abilities = H.get_child(unit_proxy.__cfg, "abilities")
local abilities = wml.get_child(unit_proxy.__cfg, "abilities")
if abilities then
for _,ability in ipairs(abilities) do
single_unit_info[ability[1]] = true
@ -128,11 +127,11 @@ function ca_fast_attack_utils.single_unit_info(unit_proxy)
-- Information about the attacks indexed by weapon number,
-- including specials (e.g. 'poison = true')
single_unit_info.attacks = {}
for attack in H.child_range(unit_cfg, 'attack') do
for attack in wml.child_range(unit_cfg, 'attack') do
-- Extract information for specials; we do this first because some
-- custom special might have the same name as one of the default scalar fields
local a = {}
for special in H.child_range(attack, 'specials') do
for special in wml.child_range(attack, 'specials') do
for _,sp in ipairs(special) do
if (sp[1] == 'damage') then -- this is 'backstab'
if (sp[2].id == 'backstab') then

View file

@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local FAU = wesnoth.require "ai/micro_ais/cas/ca_fast_attack_utils.lua"
local LS = wesnoth.require "location_set"
@ -9,8 +8,8 @@ function ca_fast_combat:evaluation(cfg, data)
data.move_cache = { turn = wesnoth.current.turn }
data.gamedata = FAU.gamedata_setup()
local filter_own = H.get_child(cfg, "filter")
local filter_enemy = H.get_child(cfg, "filter_second")
local filter_own = wml.get_child(cfg, "filter")
local filter_enemy = wml.get_child(cfg, "filter_second")
local enemies
local units_sorted = true

View file

@ -18,8 +18,8 @@ function ca_fast_combat_leader:evaluation(cfg, data)
data.move_cache = { turn = wesnoth.current.turn }
data.gamedata = FAU.gamedata_setup()
local filter_own = H.get_child(cfg, "filter")
local filter_enemy = H.get_child(cfg, "filter_second")
local filter_own = wml.get_child(cfg, "filter")
local filter_enemy = wml.get_child(cfg, "filter_second")
local enemies, leader
if (not filter_own) and (not filter_enemy) then

View file

@ -1,5 +1,3 @@
local H = wesnoth.require "helper"
local W = H.set_wml_action_metatable {}
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local LS = wesnoth.require "location_set"
local M = wesnoth.map
@ -45,9 +43,9 @@ function ca_forest_animals_move:execution(cfg)
local enemies = AH.get_attackable_enemies()
-- Get the locations of all the rabbit holes
W.store_items { variable = 'holes_wml' }
local all_items = H.get_variable_array('holes_wml')
W.clear_variable { name = 'holes_wml' }
wesnoth.wml_actions.store_items { variable = 'holes_wml' }
local all_items = wml.array_access.get('holes_wml')
wesnoth.wml_actions.clear_variable { name = 'holes_wml' }
-- If cfg.rabbit_hole_img is set, only items with that image or halo count as holes
local holes
@ -73,7 +71,7 @@ function ca_forest_animals_move:execution(cfg)
end
-- If no close enemies, do a random move
local wander_terrain = H.get_child(cfg, "filter_location") or {}
local wander_terrain = wml.get_child(cfg, "filter_location") or {}
if (not close_enemies[1]) then
local reach = AH.get_reachable_unocc(unit)
local width, height = wesnoth.get_map_size()

View file

@ -1,5 +1,3 @@
local H = wesnoth.require "helper"
local W = H.set_wml_action_metatable {}
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local T = wml.tag
@ -18,9 +16,9 @@ function ca_forest_animals_new_rabbit:execution(cfg)
local rabbit_enemy_distance = cfg.rabbit_enemy_distance or 3
-- Get the locations of all items on that map (which could be rabbit holes)
W.store_items { variable = 'holes_wml' }
local all_items = H.get_variable_array('holes_wml')
W.clear_variable { name = 'holes_wml' }
wesnoth.wml_actions.store_items { variable = 'holes_wml' }
local all_items = wml.array_access.get('holes_wml')
wesnoth.wml_actions.clear_variable { name = 'holes_wml' }
-- Eliminate all holes that have an enemy within 'rabbit_enemy_distance' hexes
-- We also add a random number to the ones we keep, for selection of the holes later

View file

@ -25,13 +25,31 @@ function ca_goto:evaluation(cfg, data)
return 0
end
local all_units = AH.get_units_with_moves {
{ "and", { side = wesnoth.current.side } },
{ "and", wml.get_child(cfg, "filter") }
}
local units = {}
if cfg.release_unit_at_goal then
for _,unit in ipairs(all_units) do
if (not MAIUV.get_mai_unit_variables(unit, cfg.ai_id, "release")) then
table.insert(units, unit)
end
end
else
units = all_units
end
if (not units[1]) then return 0 end
-- For convenience, we check for locations here, and just pass that to the exec function
-- This is mostly to make the unique_goals option easier
local width, height = wesnoth.get_map_size()
local all_locs = wesnoth.get_locations {
x = '1-' .. width,
y = '1-' .. height,
{ "and", H.get_child(cfg, "filter_location") }
{ "and", wml.get_child(cfg, "filter_location") }
}
if (#all_locs == 0) then return 0 end
@ -60,23 +78,6 @@ function ca_goto:evaluation(cfg, data)
end
if (not locs[1]) then return 0 end
local all_units = AH.get_units_with_moves {
side = wesnoth.current.side,
{ "and", H.get_child(cfg, "filter") }
}
local units = {}
if cfg.release_unit_at_goal then
for _,unit in ipairs(all_units) do
if (not MAIUV.get_mai_unit_variables(unit, cfg.ai_id, "release")) then
table.insert(units, unit)
end
end
else
units = all_units
end
if (not units[1]) then return 0 end
-- Now store units and locs, so that we don't need to duplicate this in the exec function
GO_units, GO_locs = units, locs

View file

@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local LS = wesnoth.require "location_set"
local MAIUV = wesnoth.require "ai/micro_ais/micro_ai_unit_variables.lua"
@ -8,7 +7,7 @@ local M = wesnoth.map
local function get_hang_out_units(cfg)
local units = AH.get_units_with_moves {
side = wesnoth.current.side,
{ "and", H.get_child(cfg, "filter") }
{ "and", wml.get_child(cfg, "filter") }
}
return units
end
@ -22,14 +21,14 @@ function ca_hang_out:evaluation(cfg, data)
end
-- Otherwise check if any of the mobilize conditions are now met
local mobilize_condition = H.get_child(cfg, "mobilize_condition")
local mobilize_condition = wml.get_child(cfg, "mobilize_condition")
if (mobilize_condition and wesnoth.eval_conditional(mobilize_condition))
or (cfg.mobilize_on_gold_less_than and (wesnoth.sides[wesnoth.current.side].gold < cfg.mobilize_on_gold_less_than))
then
MAISD.insert_mai_self_data(data, cfg.ai_id, { mobilize_units = true })
-- Need to unmark all units also (all units, with and without moves)
local units = wesnoth.get_units { side = wesnoth.current.side, { "and", H.get_child(cfg, "filter") } }
local units = wesnoth.get_units { side = wesnoth.current.side, { "and", wml.get_child(cfg, "filter") } }
for _,unit in ipairs(units) do
MAIUV.delete_mai_unit_variables(unit, cfg.ai_id)
end
@ -46,7 +45,7 @@ function ca_hang_out:execution(cfg)
-- Get the locations close to which the units should hang out
-- cfg.filter_location defaults to the location of the side leader(s)
local filter_location = H.get_child(cfg, "filter_location") or {
local filter_location = wml.get_child(cfg, "filter_location") or {
{ "filter", { side = wesnoth.current.side, canrecruit = "yes" } }
}
@ -60,15 +59,15 @@ function ca_hang_out:execution(cfg)
-- Get map of locations to be avoided.
-- Use [micro_ai][avoid] tag with priority over [ai][avoid].
-- If neither is given, default to all castle terrain.
local avoid_tag = H.get_child(cfg, "avoid")
local avoid_tag = wml.get_child(cfg, "avoid")
local avoid_map
if avoid_tag then
avoid_map = LS.of_pairs(wesnoth.get_locations(avoid_tag))
else
local ai_tag = H.get_child(wesnoth.sides[wesnoth.current.side].__cfg, 'ai')
for aspect in H.child_range(ai_tag, 'aspect') do
local ai_tag = wml.get_child(wesnoth.sides[wesnoth.current.side].__cfg, 'ai')
for aspect in wml.child_range(ai_tag, 'aspect') do
if (aspect.id == 'avoid') then
local facet = H.get_child(aspect, 'facet')
local facet = wml.get_child(aspect, 'facet')
if facet or aspect.name ~= "composite_aspect" then
-- If there's a [facet] child, it's set as a composite aspect,
-- with at least one facet.

View file

@ -1,5 +1,3 @@
local H = wesnoth.require "helper"
local ca_healer_initialize = {}
function ca_healer_initialize:evaluation()
@ -19,7 +17,7 @@ function ca_healer_initialize:execution(cfg, data)
id = "no_healers_attack",
invalidate_on_gamestate_change = "yes",
{ "filter_own", {
{ "not", { ability = "healing", { "and", H.get_child(cfg, "filter") } } }
{ "not", { ability = "healing", { "and", wml.get_child(cfg, "filter") } } }
} }
}
)

View file

@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local LS = wesnoth.require "location_set"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local BC = wesnoth.require "ai/lua/battle_calcs.lua"
@ -16,7 +15,7 @@ function ca_healer_move:evaluation(cfg, data)
local all_healers = wesnoth.get_units {
side = wesnoth.current.side,
ability = "healing",
{ "and", H.get_child(cfg, "filter") }
{ "and", wml.get_child(cfg, "filter") }
}
local healers, healers_noMP = {}, {}
@ -31,7 +30,7 @@ function ca_healer_move:evaluation(cfg, data)
local all_healees = wesnoth.get_units {
side = wesnoth.current.side,
{ "and", H.get_child(cfg, "filter_second") }
{ "and", wml.get_child(cfg, "filter_second") }
}
local healees, healees_MP = {}, {}

View file

@ -1,11 +1,10 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local M = wesnoth.map
local function get_sheep(cfg)
local sheep = wesnoth.get_units {
side = wesnoth.current.side,
{ "and", H.get_child(cfg, "filter_second") }
{ "and", wml.get_child(cfg, "filter_second") }
}
return sheep
end
@ -13,7 +12,7 @@ end
local function get_dogs(cfg)
local dogs = AH.get_units_with_attacks {
side = wesnoth.current.side,
{ "and", H.get_child(cfg, "filter") }
{ "and", wml.get_child(cfg, "filter") }
}
return dogs
end
@ -22,7 +21,7 @@ local function get_enemies(cfg, radius)
local enemies = AH.get_attackable_enemies {
{ "filter_location",
{ radius = radius,
{ "filter", { side = wesnoth.current.side, { "and", H.get_child(cfg, "filter_second") } } } }
{ "filter", { side = wesnoth.current.side, { "and", wml.get_child(cfg, "filter_second") } } } }
}
}
return enemies

View file

@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local LS = wesnoth.require "location_set"
local M = wesnoth.map
@ -6,8 +5,8 @@ local M = wesnoth.map
local function get_dog(cfg)
local dogs = AH.get_units_with_moves {
side = wesnoth.current.side,
{ "and", H.get_child(cfg, "filter") },
{ "not", { { "filter_adjacent", { side = wesnoth.current.side, { "and", H.get_child(cfg, "filter_second") } } } } }
{ "and", wml.get_child(cfg, "filter") },
{ "not", { { "filter_adjacent", { side = wesnoth.current.side, { "and", wml.get_child(cfg, "filter_second") } } } } }
}
return dogs[1]
end
@ -23,7 +22,7 @@ end
function ca_herding_dog_move:execution(cfg)
-- We simply move the first dog first, order does not matter
local dog = get_dog(cfg)
local herding_perimeter = LS.of_pairs(wesnoth.get_locations(H.get_child(cfg, "filter_location")))
local herding_perimeter = LS.of_pairs(wesnoth.get_locations(wml.get_child(cfg, "filter_location")))
-- Find average distance of herding_perimeter from center
local av_dist = 0

View file

@ -1,10 +1,9 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local function get_dog(cfg)
local dogs = AH.get_units_with_moves {
side = wesnoth.current.side,
{ "and", H.get_child(cfg, "filter") },
{ "and", wml.get_child(cfg, "filter") },
}
return dogs[1]
end

View file

@ -4,7 +4,7 @@ local LS = wesnoth.require "location_set"
return function(cfg)
-- Find the area that the sheep can occupy
-- First, find all contiguous hexes around center hex that are inside herding_perimeter
local location_filter = H.get_child(cfg, "filter_location")
local location_filter = wml.get_child(cfg, "filter_location")
local herding_area = LS.of_pairs(wesnoth.get_locations {
x = cfg.herd_x,
y = cfg.herd_y,

View file

@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local M = wesnoth.map
@ -7,7 +6,7 @@ local herding_area = wesnoth.require "ai/micro_ais/cas/ca_herding_f_herding_area
local function get_dogs(cfg)
local dogs = AH.get_units_with_moves {
side = wesnoth.current.side,
{ "and", H.get_child(cfg, "filter") }
{ "and", wml.get_child(cfg, "filter") }
}
return dogs
end
@ -15,8 +14,8 @@ end
local function get_sheep_to_herd(cfg)
local all_sheep = wesnoth.get_units {
side = wesnoth.current.side,
{ "and", H.get_child(cfg, "filter_second") },
{ "not", { { "filter_adjacent", { side = wesnoth.current.side, { "and", H.get_child(cfg, "filter") } } } } }
{ "and", wml.get_child(cfg, "filter_second") },
{ "not", { { "filter_adjacent", { side = wesnoth.current.side, { "and", wml.get_child(cfg, "filter") } } } } }
}
local sheep_to_herd = {}
@ -63,7 +62,7 @@ function ca_herding_herd_sheep:execution(cfg)
-- And the closer dog goes first (so that it might be able to chase another sheep afterward)
rating = rating - M.distance_between(x, y, dog.x, dog.y) / 100.
-- Finally, prefer to stay on path, if possible
if (wesnoth.match_location(x, y, H.get_child(cfg, "filter_location")) ) then rating = rating + 0.001 end
if (wesnoth.match_location(x, y, wml.get_child(cfg, "filter_location")) ) then rating = rating + 0.001 end
reach_map:insert(x, y, rating)

View file

@ -6,7 +6,7 @@ local herding_area = wesnoth.require "ai/micro_ais/cas/ca_herding_f_herding_area
local function get_next_sheep(cfg)
local sheep = AH.get_units_with_moves {
side = wesnoth.current.side,
{ "and", H.get_child(cfg, "filter_second") }
{ "and", wml.get_child(cfg, "filter_second") }
}
return sheep[1]
end
@ -24,7 +24,7 @@ function ca_herding_sheep_move:execution(cfg)
local sheep = get_next_sheep(cfg)
local reach_map = AH.get_reachable_unocc(sheep)
local dogs_filter = H.get_child(cfg, "filter")
local dogs_filter = wml.get_child(cfg, "filter")
-- Exclude those that are next to a dog
reach_map:iter( function(x, y, v)
for xa, ya in H.adjacent_tiles(x, y) do

View file

@ -1,12 +1,11 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local M = wesnoth.map
local function get_next_sheep(cfg)
local sheep = AH.get_units_with_moves {
side = wesnoth.current.side,
{ "and", H.get_child(cfg, "filter_second") },
{ "filter_adjacent", { side = wesnoth.current.side, { "and", H.get_child(cfg, "filter") } } }
{ "and", wml.get_child(cfg, "filter_second") },
{ "filter_adjacent", { side = wesnoth.current.side, { "and", wml.get_child(cfg, "filter") } } }
}
return sheep[1]
end
@ -24,7 +23,7 @@ function ca_herding_sheep_runs_dog:execution(cfg)
local sheep = get_next_sheep(cfg)
-- Get the first dog that the sheep is adjacent to
local dog = wesnoth.get_units { side = wesnoth.current.side, { "and", H.get_child(cfg, "filter") },
local dog = wesnoth.get_units { side = wesnoth.current.side, { "and", wml.get_child(cfg, "filter") },
{ "filter_adjacent", { x = sheep.x, y = sheep.y } }
}[1]

View file

@ -1,11 +1,10 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local M = wesnoth.map
local function get_next_sheep_enemies(cfg)
local sheep = AH.get_units_with_moves {
side = wesnoth.current.side,
{ "and", H.get_child(cfg, "filter_second") }
{ "and", wml.get_child(cfg, "filter_second") }
}
if (not sheep[1]) then return end

View file

@ -1,5 +1,4 @@
local H = wesnoth.require "helper"
local W = H.set_wml_action_metatable {}
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local MAIUV = wesnoth.require "ai/micro_ais/micro_ai_unit_variables.lua"
local M = wesnoth.map
@ -36,7 +35,7 @@ local function hunter_attack_weakest_adj_enemy(ai, hunter)
end
local function get_hunter(cfg)
local filter = H.get_child(cfg, "filter") or { id = cfg.id }
local filter = wml.get_child(cfg, "filter") or { id = cfg.id }
local hunter = AH.get_units_with_moves {
side = wesnoth.current.side,
{ "and", filter }
@ -65,7 +64,7 @@ function ca_hunter:execution(cfg)
local rand = math.random(10)
if (not hunter_vars.goal_x) or (rand == 1) then
-- 'locs' includes border hexes, but that does not matter here
locs = AH.get_passable_locations((H.get_child(cfg, "filter_location") or {}), hunter)
locs = AH.get_passable_locations((wml.get_child(cfg, "filter_location") or {}), hunter)
local rand = math.random(#locs)
hunter_vars.goal_x, hunter_vars.goal_y = locs[rand][1], locs[rand][2]
@ -121,7 +120,7 @@ function ca_hunter:execution(cfg)
MAIUV.set_mai_unit_variables(hunter, cfg.ai_id, hunter_vars)
if cfg.show_messages then
W.message { speaker = hunter.id, message = 'Now that I have eaten, I will go back home.' }
wesnoth.wml_actions.message { speaker = hunter.id, message = 'Now that I have eaten, I will go back home.' }
end
end
@ -142,7 +141,7 @@ function ca_hunter:execution(cfg)
local enemy = wesnoth.get_unit(cfg.home_x, cfg.home_y)
if AH.is_attackable_enemy(enemy) then
if cfg.show_messages then
W.message { speaker = hunter.id, message = 'Get out of my home!' }
wesnoth.wml_actions.message { speaker = hunter.id, message = 'Get out of my home!' }
end
AH.checked_attack(ai, hunter, enemy)
@ -162,7 +161,7 @@ function ca_hunter:execution(cfg)
MAIUV.set_mai_unit_variables(hunter, cfg.ai_id, hunter_vars)
if cfg.show_messages then
W.message { speaker = hunter.id, message = 'I made it home - resting now until the end of Turn ' .. hunter_vars.resting_until .. ' or until fully healed.' }
wesnoth.wml_actions.message { speaker = hunter.id, message = 'I made it home - resting now until the end of Turn ' .. hunter_vars.resting_until .. ' or until fully healed.' }
end
end
@ -185,7 +184,7 @@ function ca_hunter:execution(cfg)
MAIUV.set_mai_unit_variables(hunter, cfg.ai_id, hunter_vars)
if cfg.show_messages then
W.message { speaker = hunter.id, message = 'I am done resting. It is time to go hunting again next turn.' }
wesnoth.wml_actions.message { speaker = hunter.id, message = 'I am done resting. It is time to go hunting again next turn.' }
end
end
return

View file

@ -1,12 +1,11 @@
local LS = wesnoth.require "location_set"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local H = wesnoth.require "helper"
local function get_lurker(cfg)
-- We simply pick the first of the lurkers, they have no strategy
local lurker = AH.get_units_with_moves {
side = wesnoth.current.side,
{ "and", H.get_child(cfg, "filter") }
{ "and", wml.get_child(cfg, "filter") }
}[1]
return lurker
end
@ -26,7 +25,7 @@ function ca_lurkers:execution(cfg)
table.sort(targets, function(a, b) return (a.hitpoints < b.hitpoints) end)
local reach = LS.of_pairs(wesnoth.find_reach(lurker.x, lurker.y))
local lurk_area = H.get_child(cfg, "filter_location")
local lurk_area = wml.get_child(cfg, "filter_location")
local reachable_attack_terrain =
LS.of_pairs(wesnoth.get_locations {
{ "and", { x = lurker.x, y = lurker.y, radius = lurker.moves } },
@ -66,7 +65,7 @@ function ca_lurkers:execution(cfg)
local reachable_wander_terrain =
LS.of_pairs( wesnoth.get_locations {
{ "and", { x = lurker.x, y = lurker.y, radius = lurker.moves } },
{ "and", H.get_child(cfg, "filter_location_wander") or lurk_area }
{ "and", wml.get_child(cfg, "filter_location_wander") or lurk_area }
})
reachable_wander_terrain:inter(reach)

View file

@ -45,11 +45,11 @@ local function messenger_find_clearing_attack(messenger, goal_x, goal_y, cfg)
local enemy_in_way = messenger_find_enemies_in_way(messenger, goal_x, goal_y)
if (not enemy_in_way) then return end
local filter = H.get_child(cfg, "filter") or { id = cfg.id }
local filter = wml.get_child(cfg, "filter") or { id = cfg.id }
local units = AH.get_units_with_attacks {
side = wesnoth.current.side,
{ "not", filter },
{ "and", H.get_child(cfg, "filter_second") }
{ "and", wml.get_child(cfg, "filter_second") }
}
if (not units[1]) then return end

View file

@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local LS = wesnoth.require "location_set"
local MAIUV = wesnoth.require "ai/micro_ais/micro_ai_unit_variables.lua"
@ -9,7 +8,7 @@ local messenger_next_waypoint = wesnoth.require "ai/micro_ais/cas/ca_messenger_f
local function get_escorts(cfg)
local escorts = AH.get_units_with_moves {
side = wesnoth.current.side,
{ "and", H.get_child(cfg, "filter_second") }
{ "and", wml.get_child(cfg, "filter_second") }
}
return escorts
end

View file

@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local MAIUV = wesnoth.require "ai/micro_ais/micro_ai_unit_variables.lua"
@ -10,7 +9,7 @@ return function(cfg)
-- Returns nil for first 3 arguments if no messenger has moves left
-- Returns nil for all arguments if there are no messengers on the map
local filter = H.get_child(cfg, "filter") or { id = cfg.id }
local filter = wml.get_child(cfg, "filter") or { id = cfg.id }
local messengers = wesnoth.get_units { side = wesnoth.current.side, { "and", filter } }
if (not messengers[1]) then return end

View file

@ -1,9 +1,8 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local MAIUV = wesnoth.require "ai/micro_ais/micro_ai_unit_variables.lua"
local function get_patrol(cfg)
local filter = H.get_child(cfg, "filter") or { id = cfg.id }
local filter = wml.get_child(cfg, "filter") or { id = cfg.id }
local patrol = AH.get_units_with_moves {
side = wesnoth.current.side,
{ "and", filter }

View file

@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local BC = wesnoth.require "ai/lua/battle_calcs.lua"
@ -10,7 +9,7 @@ function ca_protect_unit_attack:evaluation(cfg)
-- or the counter attack on the enemy turn, it does not attack, even if that's really unlikely
local units = {}
for u in H.child_range(cfg, "unit") do
for u in wml.child_range(cfg, "unit") do
table.insert(units, AH.get_units_with_attacks { id = u.id }[1])
end
if (not units[1]) then return 0 end

View file

@ -1,11 +1,10 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local ca_protect_unit_finish, PU_unit, PU_goal = {}
function ca_protect_unit_finish:evaluation(cfg)
-- If a unit can make it to the goal, this is the first thing that happens
for u in H.child_range(cfg, "unit") do
for u in wml.child_range(cfg, "unit") do
local unit = AH.get_units_with_moves { id = u.id }[1]
if unit then
local path, cost = AH.find_path_with_shroud(unit, u.goal_x, u.goal_y)

View file

@ -1,11 +1,10 @@
local H = wesnoth.require "helper"
local LS = wesnoth.require "location_set"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local BC = wesnoth.require "ai/lua/battle_calcs.lua"
local function get_protected_units(cfg)
local units = {}
for u in H.child_range(cfg, "unit") do
for u in wml.child_range(cfg, "unit") do
table.insert(units, AH.get_units_with_moves { id = u.id }[1])
end
return units
@ -38,7 +37,7 @@ function ca_protect_unit_move:execution(cfg, data)
-- We move the weakest (fewest HP unit) first
local unit = AH.choose(protected_units, function(u) return - u.hitpoints end)
local goal = {}
for u in H.child_range(cfg, "unit") do
for u in wml.child_range(cfg, "unit") do
if (unit.id == u.id) then goal = { u.goal_x, u.goal_y } end
end

View file

@ -59,7 +59,7 @@ function ca_recruit_random:evaluation(cfg)
local probabilities, probability_sum = {}, 0
-- Go through all the types listed in [probability] tags (which can be comma-separated lists)
for prob in H.child_range(cfg, "probability") do
for prob in wml.child_range(cfg, "probability") do
types = AH.split(prob.type, ",")
for _,typ in ipairs(types) do -- 'type' is a reserved keyword in Lua
-- If this type is in the recruit list, add it

View file

@ -1,8 +1,7 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local function get_guardian(cfg)
local filter = H.get_child(cfg, "filter") or { id = cfg.id }
local filter = wml.get_child(cfg, "filter") or { id = cfg.id }
local guardian = AH.get_units_with_moves {
side = wesnoth.current.side,
{ "and", filter }

View file

@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local BC = wesnoth.require "ai/lua/battle_calcs.lua"
local LS = wesnoth.require "location_set"
@ -8,13 +7,13 @@ local ca_simple_attack, best_attack = {}
function ca_simple_attack:evaluation(cfg)
local units = AH.get_units_with_attacks {
side = wesnoth.current.side,
{ "and", H.get_child(cfg, "filter") }
{ "and", wml.get_child(cfg, "filter") }
}
if (not units[1]) then return 0 end
-- If cfg.filter_second is set, set up a map (location set)
-- of enemies that it is okay to attack
local enemy_filter = H.get_child(cfg, "filter_second")
local enemy_filter = wml.get_child(cfg, "filter_second")
local enemy_map
if enemy_filter then
local enemies = AH.get_attackable_enemies(enemy_filter)

View file

@ -3,7 +3,7 @@ local AH = wesnoth.require "ai/lua/ai_helper.lua"
local M = wesnoth.map
local function get_guardian(cfg)
local filter = H.get_child(cfg, "filter") or { id = cfg.id }
local filter = wml.get_child(cfg, "filter") or { id = cfg.id }
local guardian = AH.get_units_with_moves {
side = wesnoth.current.side,
{ "and", filter }

View file

@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local BC = wesnoth.require "ai/lua/battle_calcs.lua"
local M = wesnoth.map
@ -6,15 +5,15 @@ local M = wesnoth.map
local function get_wolves(cfg)
local wolves = AH.get_units_with_moves {
side = wesnoth.current.side,
{ "and", H.get_child(cfg, "filter") }
{ "and", wml.get_child(cfg, "filter") }
}
return wolves
end
local function get_prey(cfg)
-- Note: we cannot pass H.get_child() directly to AH.get_attackable_enemies()
-- Note: we cannot pass wml.get_child() directly to AH.get_attackable_enemies()
-- as the former returns two values and the latter takes optional arguments
local filter_second = H.get_child(cfg, "filter_second")
local filter_second = wml.get_child(cfg, "filter_second")
local prey = AH.get_attackable_enemies(filter_second)
return prey
end

View file

@ -1,4 +1,3 @@
local H = wesnoth.require "helper"
local AH = wesnoth.require "ai/lua/ai_helper.lua"
local BC = wesnoth.require "ai/lua/battle_calcs.lua"
local LS = wesnoth.require "location_set"
@ -6,7 +5,7 @@ local LS = wesnoth.require "location_set"
local function get_wolves(cfg)
local wolves = AH.get_units_with_moves {
side = wesnoth.current.side,
{ "and", H.get_child(cfg, "filter") }
{ "and", wml.get_child(cfg, "filter") }
}
return wolves
end

View file

@ -4,7 +4,7 @@ local LS = wesnoth.require "location_set"
local M = wesnoth.map
local function get_guardian(cfg)
local filter = H.get_child(cfg, "filter") or { id = cfg.id }
local filter = wml.get_child(cfg, "filter") or { id = cfg.id }
local guardian = AH.get_units_with_moves {
side = wesnoth.current.side,
{ "and", filter }
@ -23,8 +23,8 @@ function ca_zone_guardian:execution(cfg)
local guardian = get_guardian(cfg)
local reach = wesnoth.find_reach(guardian)
local zone = H.get_child(cfg, "filter_location")
local zone_enemy = H.get_child(cfg, "filter_location_enemy") or zone
local zone = wml.get_child(cfg, "filter_location")
local zone_enemy = wml.get_child(cfg, "filter_location_enemy") or zone
local enemies = AH.get_attackable_enemies { { "filter_location", zone_enemy } }
if enemies[1] then
local min_dist, target = 9e99

View file

@ -33,7 +33,7 @@ return {
moves = "current",
variable = "tmp_locs"
}
attack_locs = H.get_variable_array("tmp_locs")
attack_locs = wml.array_access.get("tmp_locs")
W.clear_variable { name = "tmp_locs" }
if (#attack_locs > 0) then break end
end

View file

@ -30,7 +30,7 @@ function wesnoth.micro_ais.wolves(cfg)
id = "mai_wolves_" .. (cfg.ca_id or "default") .. "_dont_attack",
invalidate_on_gamestate_change = "yes",
{ "filter_enemy", {
{ "and", H.get_child(cfg, "filter_second") }
{ "and", wml.get_child(cfg, "filter_second") }
} }
}
}
@ -165,7 +165,7 @@ function wesnoth.micro_ais.wolves_multipacks(cfg)
end
function wesnoth.micro_ais.hunter(cfg)
if (cfg.action ~= 'delete') and (not cfg.id) and (not H.get_child(cfg, "filter")) then
if (cfg.action ~= 'delete') and (not cfg.id) and (not wml.get_child(cfg, "filter")) then
H.wml_error("Hunter [micro_ai] tag requires either id= key or [filter] tag")
end
local required_keys = { "home_x", "home_y" }

View file

@ -1,7 +1,7 @@
local H = wesnoth.require "helper"
function wesnoth.micro_ais.messenger_escort(cfg)
if (cfg.action ~= 'delete') and (not cfg.id) and (not H.get_child(cfg, "filter")) then
if (cfg.action ~= 'delete') and (not cfg.id) and (not wml.get_child(cfg, "filter")) then
H.wml_error("Messenger [micro_ai] tag requires either id= key or [filter] tag")
end
local required_keys = { "waypoint_x", "waypoint_y" }

View file

@ -1,5 +1,3 @@
local H = wesnoth.require "helper"
function wesnoth.micro_ais.fast_ai(cfg)
local optional_keys = {
"attack_hidden_enemies", "[avoid]", "dungeon_mode",

View file

@ -1,7 +1,7 @@
local H = wesnoth.require "helper"
function wesnoth.micro_ais.stationed_guardian(cfg)
if (cfg.action ~= 'delete') and (not cfg.id) and (not H.get_child(cfg, "filter")) then
if (cfg.action ~= 'delete') and (not cfg.id) and (not wml.get_child(cfg, "filter")) then
H.wml_error("Stationed Guardian [micro_ai] tag requires either id= key or [filter] tag")
end
local required_keys = { "distance", "station_x", "station_y" }
@ -14,7 +14,7 @@ function wesnoth.micro_ais.stationed_guardian(cfg)
end
function wesnoth.micro_ais.zone_guardian(cfg)
if (cfg.action ~= 'delete') and (not cfg.id) and (not H.get_child(cfg, "filter")) then
if (cfg.action ~= 'delete') and (not cfg.id) and (not wml.get_child(cfg, "filter")) then
H.wml_error("Zone Guardian [micro_ai] tag requires either id= key or [filter] tag")
end
local required_keys = { "[filter_location]" }
@ -27,7 +27,7 @@ function wesnoth.micro_ais.zone_guardian(cfg)
end
function wesnoth.micro_ais.return_guardian(cfg)
if (cfg.action ~= 'delete') and (not cfg.id) and (not H.get_child(cfg, "filter")) then
if (cfg.action ~= 'delete') and (not cfg.id) and (not wml.get_child(cfg, "filter")) then
H.wml_error("Return Guardian [micro_ai] tag requires either id= key or [filter] tag")
end
local required_keys = { "return_x", "return_y" }
@ -40,7 +40,7 @@ function wesnoth.micro_ais.return_guardian(cfg)
end
function wesnoth.micro_ais.coward(cfg)
if (cfg.action ~= 'delete') and (not cfg.id) and (not H.get_child(cfg, "filter")) then
if (cfg.action ~= 'delete') and (not cfg.id) and (not wml.get_child(cfg, "filter")) then
H.wml_error("Coward [micro_ai] tag requires either id= key or [filter] tag")
end
local required_keys = { "distance" }

View file

@ -1,7 +1,7 @@
local H = wesnoth.require "helper"
function wesnoth.micro_ais.patrol(cfg)
if (cfg.action ~= 'delete') and (not cfg.id) and (not H.get_child(cfg, "filter")) then
if (cfg.action ~= 'delete') and (not cfg.id) and (not wml.get_child(cfg, "filter")) then
H.wml_error("Patrol [micro_ai] tag requires either id= key or [filter] tag")
end
local required_keys = { "waypoint_x", "waypoint_y" }

View file

@ -11,7 +11,7 @@ function wesnoth.micro_ais.protect_unit(cfg)
}
local unit_ids = {}
for u in H.child_range(cfg, "unit") do
for u in wml.child_range(cfg, "unit") do
if not u.id then
H.wml_error("Protect Unit Micro AI missing id key in [unit] tag")
end

View file

@ -1,5 +1,3 @@
local H = wesnoth.require "helper"
local function handle_default_recruitment(cfg)
-- Also need to delete/add the default recruitment CA
if cfg.action == 'add' then

View file

@ -39,9 +39,9 @@ function micro_ai_helper.add_CAs(side, ca_id_core, CA_parms, CA_cfg)
while id_found do -- This is really just a precaution
id_found = false
for ai_tag in H.child_range(wesnoth.sides[side].__cfg, 'ai') do
for stage in H.child_range(ai_tag, 'stage') do
for ca in H.child_range(stage, 'candidate_action') do
for ai_tag in wml.child_range(wesnoth.sides[side].__cfg, 'ai') do
for stage in wml.child_range(ai_tag, 'stage') do
for ca in wml.child_range(stage, 'candidate_action') do
if string.find(ca.name, ai_id .. '_') then
id_found = true
break
@ -54,10 +54,10 @@ function micro_ai_helper.add_CAs(side, ca_id_core, CA_parms, CA_cfg)
-- AI's data variable. However, the MAI can be changed while it is not
-- the AI's turn, when this is not possible. So instead, we check for the
-- existence of such tags and make sure we are using a different ai_id.
for ai_tag in H.child_range(wesnoth.sides[side].__cfg, 'ai') do
for engine in H.child_range(ai_tag, 'engine') do
for data in H.child_range(engine, 'data') do
for mai in H.child_range(data, 'micro_ai') do
for ai_tag in wml.child_range(wesnoth.sides[side].__cfg, 'ai') do
for engine in wml.child_range(ai_tag, 'engine') do
for data in wml.child_range(engine, 'data') do
for mai in wml.child_range(data, 'micro_ai') do
if (mai.ai_id == ai_id) then
id_found = true
break
@ -169,10 +169,10 @@ function micro_ai_helper.micro_ai_setup(cfg, CA_parms, required_keys, optional_k
for _,v in pairs(required_keys) do
if v:match('%[[a-zA-Z0-9_]+%]') then
v = v:sub(2,-2)
if not H.get_child(cfg, v) then
if not wml.get_child(cfg, v) then
H.wml_error("[micro_ai] tag (" .. cfg.ai_type .. ") is missing required parameter: [" .. v .. "]")
end
for child in H.child_range(cfg, v) do
for child in wml.child_range(cfg, v) do
table.insert(CA_cfg, T[v](child))
end
else
@ -187,7 +187,7 @@ function micro_ai_helper.micro_ai_setup(cfg, CA_parms, required_keys, optional_k
for _,v in pairs(optional_keys) do
if v:match('%[[a-zA-Z0-9_]+%]') then
v = v:sub(2,-2)
for child in H.child_range(cfg, v) do
for child in wml.child_range(cfg, v) do
table.insert(CA_cfg, T[v](child))
end
else

View file

@ -13,8 +13,6 @@
-- same side).
-- For the time being, we only allow key=value style variables.
local H = wesnoth.require "helper"
local micro_ai_self_data = {}
function micro_ai_self_data.modify_mai_self_data(self_data, ai_id, action, vars_table)
@ -79,7 +77,7 @@ function micro_ai_self_data.get_mai_self_data(self_data, ai_id, key)
-- table of key=value pairs (including the ai_id key)
-- - If no such tag is found: nil (if @key is set), otherwise empty table
for mai in H.child_range(self_data, "micro_ai") do
for mai in wml.child_range(self_data, "micro_ai") do
if (mai.ai_id == ai_id) then
if key then
return mai[key]

View file

@ -9,8 +9,6 @@
-- with different ai_CA values affecting the same unit)
-- For the time being, we only allow key=value style variables.
local H = wesnoth.require "helper"
local micro_ai_unit_variables = {}
function micro_ai_unit_variables.modify_mai_unit_variables(unit, ai_id, action, vars_table)
@ -70,7 +68,7 @@ function micro_ai_unit_variables.get_mai_unit_variables(unit, ai_id, key)
-- table of key=value pairs (including the ai_id key)
-- - If no such tag is found: nil (if @key is set), otherwise empty table
for mai in H.child_range(unit.variables.__cfg, "micro_ai") do
for mai in wml.child_range(unit.variables.__cfg, "micro_ai") do
if (mai.ai_id == ai_id) then
if key then
return mai[key]

View file

@ -6,7 +6,7 @@
next_scenario=micro_ai_test
victory_when_enemies_defeated=no
map_data="{campaigns/Heir_To_The_Throne/maps/01_The_Elves_Besieged.map}"
turns=-1
turns=unlimited
{DEFAULT_SCHEDULE}
# Chantal can't be killed for storyline reasons.
@ -213,9 +213,13 @@
message= _ "There are too many to fight, far too many. We must escape!"
[/message]
# wmllint: unbalanced-on
{MESSAGE narrator "wesnoth-icon.png" "" _"This is a reenactment of scenario The Elves Besieged of the mainline campaign Heir to the Throne, just that the AI is playing Konrad's side here. The goal is to move Konrad to the signpost in the northwest, while keeping both Konrad and Delfador alive. The same AI as in scenario Protect Unit is used.
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "This is a reenactment of scenario The Elves Besieged of the mainline campaign Heir to the Throne, just that the AI is playing Konrad's side here. The goal is to move Konrad to the signpost in the northwest, while keeping both Konrad and Delfador alive. The same AI as in scenario Protect Unit is used.
Note: The Protect Unit AI is coded as a Micro AI. A Micro AI can be added and adapted to the need of a scenario easily using only WML and the [micro_ai] tag. Check out the <span color='#00A000'>Micro AI wiki page</span> at http://wiki.wesnoth.org/Micro_AIs for more information."}
Note: The Protect Unit AI is coded as a Micro AI. A Micro AI can be added and adapted to the need of a scenario easily using only WML and the [micro_ai] tag. Check out the <span color='#00A000'>Micro AI wiki page</span> at http://wiki.wesnoth.org/Micro_AIs for more information."
[/message]
# wmllint: unbalanced-off
{PLACE_IMAGE "scenery/signpost.png" 1 1}

View file

@ -30,7 +30,7 @@
map_data="{ai/micro_ais/maps/animals.map}"
{DEFAULT_SCHEDULE}
turns=-1
turns=unlimited
victory_when_enemies_defeated=no
[side]
@ -218,7 +218,11 @@
controller=human
[/modify_side]
{MESSAGE narrator "wesnoth-icon.png" "" _"Well, that was that."}
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "Well, that was that."
[/message]
[endlevel]
result=victory
@ -335,14 +339,27 @@
[event]
name=start
{MESSAGE narrator "wesnoth-icon.png" "Important Note" _"<span color='#A00000'>Important:</span> The animal Micro AIs in this scenario are written for a number of animal unit types that do not exist in Wesnoth mainline, such as bears, sheep and sheep dogs, or deer. In this test scenario, these units have been replaced by mainline units."}
[message]
speaker=narrator
image=wesnoth-icon.png
caption="Important Note"
message= _ "<span color='#A00000'>Important:</span> The animal Micro AIs in this scenario are written for a number of animal unit types that do not exist in Wesnoth mainline, such as bears, sheep and sheep dogs, or deer. In this test scenario, these units have been replaced by mainline units."
[/message]
# wmlindent: start ignoring
{MESSAGE narrator "wesnoth-icon.png" "" _"This is a fun little scenario with a bunch of different animal AIs, mostly for watching only. The animal AIs behave as follows:
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "This is a fun little scenario with a bunch of different animal AIs, mostly for watching only. The animal AIs behave as follows:
"+{ANIMAL_AI_DESCRIPTIONS1}}
"+{ANIMAL_AI_DESCRIPTIONS1}
[/message]
# wmlindent: stop ignoring
{MESSAGE narrator "wesnoth-icon.png" "" {ANIMAL_AI_DESCRIPTIONS2}}
[message]
speaker=narrator
image=wesnoth-icon.png
message={ANIMAL_AI_DESCRIPTIONS2}
[/message]
[message]
speaker=narrator
@ -410,8 +427,11 @@ Also note: The Animal AIs are coded as Micro AIs. A Micro AI can be added and ad
[/filter_second]
# wmlindent: start ignoring
{MESSAGE $second_unit.id "" "" _"Yowl!
Translation: Those Ogres are mean! We better stay away from them and their young."}
[message]
speaker=$second_unit.id
message= _ "Yowl!
Translation: Those Ogres are mean! We better stay away from them and their young."
[/message]
# wmlindent: stop ignoring
[micro_ai]

View file

@ -8,7 +8,7 @@
map_data="{ai/micro_ais/maps/bottleneck_defense.map}"
{DEFAULT_SCHEDULE}
turns=-1
turns=unlimited
victory_when_enemies_defeated=no
[side]
@ -82,14 +82,24 @@
[event]
name=start
{MESSAGE LuaAI "" "" _"All right, chaps. Those orcs need to be stopped."}
[message]
speaker=LuaAI
message= _ "All right, chaps. Those orcs need to be stopped."
[/message]
{STORE_UNIT_VAR (id=Big Bad Orc) profile profile}
{MESSAGE (Big Bad Orc) "$profile~FL()~RIGHT()" "" _"They there! We them get!"}
[message]
speaker=Big Bad Orc
image=$profile~FL()~RIGHT()
message= _ "They there! We them get!"
[/message]
{CLEAR_VARIABLE profile}
# wmllint: unbalanced-on
{MESSAGE LuaAI "" "" _"We need to hold that pass for as long as we can. Let's put our strongest fighters on the front line and bring injured units to the back for healing. If we're careful enough, we might even win this battle. I'll join you as soon as I'm done recruiting and do my share of the fighting.
[message]
speaker=LuaAI
message= _ "We need to hold that pass for as long as we can. Let's put our strongest fighters on the front line and bring injured units to the back for healing. If we're careful enough, we might even win this battle. I'll join you as soon as I'm done recruiting and do my share of the fighting.
Note: The Bottleneck Defense AI is coded as a Micro AI. A Micro AI can be added and adapted to the need of a scenario easily using only WML and the [micro_ai] tag. Check out the <span color='#00A000'>Micro AI wiki page</span> at http://wiki.wesnoth.org/Micro_AIs for more information."}
Note: The Bottleneck Defense AI is coded as a Micro AI. A Micro AI can be added and adapted to the need of a scenario easily using only WML and the [micro_ai] tag. Check out the <span color='#00A000'>Micro AI wiki page</span> at http://wiki.wesnoth.org/Micro_AIs for more information."
[/message]
# wmllint: unbalanced-off
# wmllint: local spellings AIs RCA
@ -148,7 +158,10 @@ Note: The Bottleneck Defense AI is coded as a Micro AI. A Micro AI can be added
side=1
[/have_unit]
[then]
{MESSAGE LuaAI "" "" _"I may have fallen, but we will continue to defend the pass to the last man!"}
[message]
speaker=LuaAI
message= _ "I may have fallen, but we will continue to defend the pass to the last man!"
[/message]
[/then]
[/if]
[/event]
@ -181,7 +194,11 @@ Note: The Bottleneck Defense AI is coded as a Micro AI. A Micro AI can be added
controller=human
[/modify_side]
{MESSAGE narrator "wesnoth-icon.png" "" _"Well, that was that."}
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "Well, that was that."
[/message]
[endlevel]
result=victory

View file

@ -8,7 +8,7 @@
map_data="{multiplayer/maps/2p_Fallenstar_Lake.map}"
{DEFAULT_SCHEDULE}
turns=-1
turns=unlimited
victory_when_enemies_defeated=no
[side]
@ -65,7 +65,9 @@
ai_type=hunter
action=add
id=Rowck
[filter]
id=Rowck
[/filter]
[filter_location]
x,y=5-30,1-15
[/filter_location]
@ -78,10 +80,15 @@
name=start
{STORE_UNIT_VAR (id=Dreadful Bat) profile profile}
{MESSAGE (Dreadful Bat) "" "" _"Be careful to stay out of the way of that dragon. He's a mean one."}
[message]
speaker=Dreadful Bat
message= _ "Be careful to stay out of the way of that dragon. He's a mean one."
[/message]
{CLEAR_VARIABLE profile}
# wmllint: unbalanced-on
{MESSAGE Rowck "" "" _"Hi there. I am Rowck and here is what I do:
[message]
speaker=Rowck
message= _ "Hi there. I am Rowck and here is what I do:
When hungry, I move around part of the map in a random wander until I get into range of an enemy. If enemies are within range, I attack and devour the weakest of them. After that, I retreat to my rest location, where I stay for a certain number of turns or until fully healed.
A few details (features, not bugs, but can be changed if desired):
- If my way home is blocked on the return, the normal RCA AI takes over my behavior.
@ -89,7 +96,8 @@ A few details (features, not bugs, but can be changed if desired):
- A kill only makes me go home when I am the attacker, not as defender.
- Occasionally I will not move at all while wandering (a dragon has to rest sometimes!)
Note: The Hunter AI is coded as a Micro AI. A Micro AI can be added and adapted to the need of a scenario easily using only WML and the [micro_ai] tag. Check out the <span color='#00A000'>Micro AI wiki page</span> at http://wiki.wesnoth.org/Micro_AIs for more information."}
Note: The Hunter AI is coded as a Micro AI. A Micro AI can be added and adapted to the need of a scenario easily using only WML and the [micro_ai] tag. Check out the <span color='#00A000'>Micro AI wiki page</span> at http://wiki.wesnoth.org/Micro_AIs for more information."
[/message]
# wmllint: unbalanced-off
[objectives]
@ -136,7 +144,10 @@ Note: The Hunter AI is coded as a Micro AI. A Micro AI can be added and adapted
[event]
name=end_scenario
{MESSAGE (Dreadful Bat) "" "" _"I'm out of here."}
[message]
speaker=Dreadful Bat
message= _ "I'm out of here."
[/message]
[endlevel]
result=victory

View file

@ -8,7 +8,7 @@
map_data="{multiplayer/maps/2p_Cynsaun_Battlefield.map}"
{DEFAULT_SCHEDULE}
turns=-1
turns=unlimited
[side]
side=1
@ -61,8 +61,12 @@
[event]
name=start
{MESSAGE narrator "wesnoth-icon.png" "" _"This scenario presents a situation with so many units on the map, that there is a noticeable delay (a few seconds or so) before each move by the default AI. By contrast, the Fast Micro AI has a much shorter delay. To demonstrate the difference, side 1 is played by the Fast Micro AI and side 2 by the default (RCA) AI.
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "This scenario presents a situation with so many units on the map, that there is a noticeable delay (a few seconds or so) before each move by the default AI. By contrast, the Fast Micro AI has a much shorter delay. To demonstrate the difference, side 1 is played by the Fast Micro AI and side 2 by the default (RCA) AI.
There is nothing to do here, just watch or use this scenario as a template or for your own tests."}
There is nothing to do here, just watch or use this scenario as a template or for your own tests."
[/message]
[/event]
[/test]

View file

@ -8,7 +8,7 @@
map_data="{ai/micro_ais/maps/goto.map}"
{DEFAULT_SCHEDULE}
turns=-1
turns=unlimited
victory_when_enemies_defeated=no
# wmllint: local spellings Minry Aethubry Gadoc Senvan AIs
@ -391,7 +391,11 @@
controller=human
[/modify_side]
{MESSAGE narrator "wesnoth-icon.png" "" _"Well, that was that."}
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "Well, that was that."
[/message]
[endlevel]
result=victory
@ -407,14 +411,17 @@
[event]
name=start
#{MESSAGE narrator "wesnoth-icon.png" "" _"Text"}
# wmllint: unbalanced-on
{MESSAGE narrator "wesnoth-icon.png" "" _"This scenario demonstrates a variety of different uses of the Goto Micro AI. All AI sides are controlled by this MAI in one way or another (except for the saurians, which are run by the Lurkers Micro AI). Messages will be displayed throughout the scenario to point out what the units are doing.
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "This scenario demonstrates a variety of different uses of the Goto Micro AI. All AI sides are controlled by this MAI in one way or another (except for the saurians, which are run by the Lurkers Micro AI). Messages will be displayed throughout the scenario to point out what the units are doing.
The player controls Side 1. There are right-click context menu options for adding Side 1 units to the map and for taking them off again. This is useful mostly for testing how the Side 3 guardians react.
Note: The Goto AI is coded as a Micro AI. A Micro AI can be added and adapted to the need of a scenario easily using only WML and the [micro_ai] tag. Check out the <span color='#00A000'>Micro AI wiki page</span> at http://wiki.wesnoth.org/Micro_AIs for more information."}
Note: The Goto AI is coded as a Micro AI. A Micro AI can be added and adapted to the need of a scenario easily using only WML and the [micro_ai] tag. Check out the <span color='#00A000'>Micro AI wiki page</span> at http://wiki.wesnoth.org/Micro_AIs for more information."
[/message]
# wmllint: unbalanced-off
[objectives]
@ -472,10 +479,18 @@ Note: This is a demonstration of how the Goto Micro AI can be used to code guard
name=side 8 turn
{UNIT 8 Ghost 29 1 id=ghost1}
{MESSAGE ghost1 "" "" _"Aaiiieeeeeee !!!"}
{MESSAGE messenger2 "" "" _"O no, a ghost!"}
{MESSAGE messenger1 "" "" _"Don't worry, those are really shy ghosts. Nobody knows why, but they always appear in the north this time of year and move through to the south. Also, very unusually for ghosts, they seem to be scared of everybody and avoid other units as much as possible -- except for the bats and saurians, with which they seem to get along just fine for some reason. So as long as we don't corner them, they'll leave us alone."}
[message]
speaker=ghost1
message= _ "Aaiiieeeeeee !!!"
[/message]
[message]
speaker=messenger2
message= _ "O no, a ghost!"
[/message]
[message]
speaker=messenger1
message= _ "Don't worry, those are really shy ghosts. Nobody knows why, but they always appear in the north this time of year and move through to the south. Also, very unusually for ghosts, they seem to be scared of everybody and avoid other units as much as possible -- except for the bats and saurians, with which they seem to get along just fine for some reason. So as long as we don't corner them, they'll leave us alone."
[/message]
[event]
name=side 8 turn
first_time_only=no
@ -566,7 +581,9 @@ Note: The messengers are controlled by Goto Micro AI definitions that differ by
[filter]
id=messenger1,messenger2
x,y=6-7,2-4
terrain=C*
[filter_location]
terrain=C*
[/filter_location]
[/filter]
[message]

View file

@ -20,7 +20,7 @@
map_data="{/multiplayer/maps/4p_Paths_of_Daggers.map}"
{DEFAULT_SCHEDULE}
turns=-1
turns=unlimited
victory_when_enemies_defeated=no
[side]
@ -131,7 +131,9 @@
ai_type=coward
action=add
id=coward1
[filter]
id=coward1
[/filter]
distance=5
[/micro_ai]
@ -154,7 +156,9 @@
ai_type=coward
action=add
id=coward2
[filter]
id=coward2
[/filter]
distance=5
seek_x,seek_y=24,5
[/micro_ai]
@ -178,7 +182,9 @@
ai_type=coward
action=add
id=coward3
[filter]
id=coward3
[/filter]
distance=5
seek_x,seek_y=24,5
avoid_x,avoid_y=24,15
@ -203,7 +209,9 @@
ai_type=coward
action=add
id=coward4
[filter]
id=coward4
[/filter]
distance=4
seek_x=32
[/micro_ai]
@ -228,7 +236,9 @@
ai_type=return_guardian
action=add
id=return1
[filter]
id=return1
[/filter]
return_x,return_y=20,2
[/micro_ai]
@ -247,7 +257,9 @@
ai_type=return_guardian
action=add
id=return2
[filter]
id=return2
[/filter]
return_x,return_y=21,9
[/micro_ai]
@ -293,7 +305,9 @@ s=2,14 g=3,13"
ai_type=stationed_guardian
action=add
id=stationed1
[filter]
id=stationed1
[/filter]
distance=4
station_x,station_y=2,14
guard_x,guard_y=3,13
@ -315,7 +329,9 @@ s=4,14 g=7,13"
ai_type=stationed_guardian
action=add
id=stationed2
[filter]
id=stationed2
[/filter]
distance=4
station_x,station_y=4,14
guard_x,guard_y=3,13
@ -340,7 +356,9 @@ s=4,14 g=7,13"
ai_type=zone_guardian
action=add
id=zone1
[filter]
id=zone1
[/filter]
[filter_location]
x=4,5,6,7,5
y=24,24,24,24,25
@ -366,7 +384,9 @@ separate attack Zone"
ai_type=zone_guardian
action=add
id=zone2
[filter]
id=zone2
[/filter]
[filter_location]
x=1,2,3,2
y=27,27,27,26
@ -391,7 +411,9 @@ separate attack Zone"
ai_type=zone_guardian
action=add
id=zone3
[filter]
id=zone3
[/filter]
[filter_location]
x,y=22-31,4-11 # This is intentionally chosen to extend past the lake
terrain=W*
@ -428,7 +450,12 @@ separate attack Zone"
{VARIABLE_CONDITIONAL scenario_name equals guardians}
[/show_if]
[command]
{MESSAGE narrator "portraits/dwarves/guard.png" _"Standard WML Guardian" _"This is the built-in WML guardian coded using 'ai_special=guardian'. These guardians attack if there is an enemy within their movement range, otherwise they do nothing (except maybe retreating to a village for healing)."}
[message]
speaker=narrator
image=portraits/dwarves/guard.png
caption= _ "Standard WML Guardian"
message= _ "This is the built-in WML guardian coded using 'ai_special=guardian'. These guardians attack if there is an enemy within their movement range, otherwise they do nothing (except maybe retreating to a village for healing)."
[/message]
[/command]
[/set_menu_item]
[set_menu_item]
@ -439,12 +466,17 @@ separate attack Zone"
{VARIABLE_CONDITIONAL scenario_name equals guardians}
[/show_if]
[command]
{MESSAGE narrator "portraits/trolls/troll.png" _"Return Guardian" _"A 'return guardian' is a variation of the standard Wesnoth guardian. It has an assigned guard position (GP) to which it returns after attacks on approaching enemies:
[message]
speaker=narrator
image=portraits/trolls/troll.png
caption= _ "Return Guardian"
message= _ "A 'return guardian' is a variation of the standard Wesnoth guardian. It has an assigned guard position (GP) to which it returns after attacks on approaching enemies:
- If at GP with no enemy in reach, do nothing.
- If at GP with enemy in reach, leave attack to default AI (note that this may include not attacking if the enemy is deemed too strong).
- If not at GP, return there, no matter whether an enemy is in reach or not.
- If enemies are blocking your way back, do your best to get there anyway.
- If you end up next to an enemy on the way back, attack after the move."}
- If you end up next to an enemy on the way back, attack after the move."
[/message]
[/command]
[/set_menu_item]
[set_menu_item]
@ -455,8 +487,13 @@ separate attack Zone"
{VARIABLE_CONDITIONAL scenario_name equals guardians}
[/show_if]
[command]
{MESSAGE narrator "portraits/trolls/troll.png" _"Home Guard" _"A 'home guard' is a variant on the 'guardian' AI special. With this variant, the unit has an assigned 'home' location, and will return there if not involved in combat and if not going to a village, whether for healing or to capture it this turn. (By contrast, the standard guardian AI will cause the unit to stay where it last attacked.) This differs from 'return guardian' in that a home guard will press the attack, possibly getting drawn quite far from 'home', rather than returning after each attack. (It can also be lured away by a string of closely-placed villages, but that is something a map builder can control.)
This also demonstrates how to combine candidate actions from Formula AI and Lua AI in one side. The home guard is written in Formula AI, while the return and stationed guardians and the cowards are written in Lua AI. In addition the non-guardian units of the side follow the default AI behavior."}
[message]
speaker=narrator
image=portraits/trolls/troll.png
caption= _ "Home Guard"
message= _ "A 'home guard' is a variant on the 'guardian' AI special. With this variant, the unit has an assigned 'home' location, and will return there if not involved in combat and if not going to a village, whether for healing or to capture it this turn. (By contrast, the standard guardian AI will cause the unit to stay where it last attacked.) This differs from 'return guardian' in that a home guard will press the attack, possibly getting drawn quite far from 'home', rather than returning after each attack. (It can also be lured away by a string of closely-placed villages, but that is something a map builder can control.)
This also demonstrates how to combine candidate actions from Formula AI and Lua AI in one side. The home guard is written in Formula AI, while the return and stationed guardians and the cowards are written in Lua AI. In addition the non-guardian units of the side follow the default AI behavior."
[/message]
[/command]
[/set_menu_item]
[set_menu_item]
@ -467,13 +504,18 @@ This also demonstrates how to combine candidate actions from Formula AI and Lua
{VARIABLE_CONDITIONAL scenario_name equals guardians}
[/show_if]
[command]
{MESSAGE narrator "portraits/undead/archer.png" _"Stationed Guardian" _"A 'stationed guardian' is another variation of the standard Wesnoth guardian with a somewhat more complex behavior than that of the 'return guardian'. Two positions are defined for it, a 'station' and a 'guarded location', as well as a 'distance'. The behavior is as follows:
[message]
speaker=narrator
image=portraits/undead/archer.png
caption= _ "Stationed Guardian"
message= _ "A 'stationed guardian' is another variation of the standard Wesnoth guardian with a somewhat more complex behavior than that of the 'return guardian'. Two positions are defined for it, a 'station' and a 'guarded location', as well as a 'distance'. The behavior is as follows:
- If no enemy is within 'distance' of the guard's current position, do nothing.
- Otherwise: If an enemy is within 'distance' of the guard, but not also within the same distance of the guarded location and the station (all of this simultaneously), move the guard in the direction of the station.
- Otherwise:
- Pick the enemy unit that is closest to the guarded location.
- If we can reach it, pick the adjacent hex with the highest defense rating and attack from there.
- If not in reach, move toward this unit."}
- If not in reach, move toward this unit."
[/message]
[/command]
[/set_menu_item]
[set_menu_item]
@ -484,11 +526,16 @@ This also demonstrates how to combine candidate actions from Formula AI and Lua
{VARIABLE_CONDITIONAL scenario_name equals guardians}
[/show_if]
[command]
{MESSAGE narrator "units/monsters/giant-rat.png" _"Coward" _"Cowards are units that, like guardians, sit around doing nothing until an enemy comes into range. Unlike guardians, however, they run away once enemies approach. Applications might be wild animals, unarmed civilians getting in the way of a battle, etc. The coward macro can be called with two optional locations, 'seek' and 'avoid':
[message]
speaker=narrator
image=units/monsters/giant-rat.png
caption= _ "Coward"
message= _ "Cowards are units that, like guardians, sit around doing nothing until an enemy comes into range. Unlike guardians, however, they run away once enemies approach. Applications might be wild animals, unarmed civilians getting in the way of a battle, etc. The coward macro can be called with two optional locations, 'seek' and 'avoid':
- If neither is given, the coward retreats to the position farthest away from the approaching enemies.
- If 'seek' is given, it preferentially goes toward that location (but getting away from enemies takes priority).
- If 'avoid' is given, it in addition tries to avoid that location (with both maximizing distance from enemies and going toward 'seek' taking priority).
- Both 'seek' and 'avoid' may consist of only one coordinate ('x' or 'y'), in which case not a single hex, but a line of hexes is sought or avoided."}
- Both 'seek' and 'avoid' may consist of only one coordinate ('x' or 'y'), in which case not a single hex, but a line of hexes is sought or avoided."
[/message]
[/command]
[/set_menu_item]
[set_menu_item]
@ -499,9 +546,14 @@ This also demonstrates how to combine candidate actions from Formula AI and Lua
{VARIABLE_CONDITIONAL scenario_name equals guardians}
[/show_if]
[command]
{MESSAGE narrator "portraits/nagas/fighter.png" _"Zone Guardian" _"A zone guardian is a unit that, as the name says, guards a zone. It moves randomly inside this zone until an enemy enters it (or a separately defined enemy zone, see below). Applications might be the defense of a castle or a nesting area. The zone macro can be called with an optional enemy zone:
[message]
speaker=narrator
image=portraits/nagas/fighter.png
caption= _ "Zone Guardian"
message= _ "A zone guardian is a unit that, as the name says, guards a zone. It moves randomly inside this zone until an enemy enters it (or a separately defined enemy zone, see below). Applications might be the defense of a castle or a nesting area. The zone macro can be called with an optional enemy zone:
- If not specified, the zone guard attacks any enemy coming inside its guard zone.
- Otherwise, it attacks any enemy entering the enemy zone and once there are no more enemies, it goes back to patrol in its basic zone."}
- Otherwise, it attacks any enemy entering the enemy zone and once there are no more enemies, it goes back to patrol in its basic zone."
[/message]
[/command]
[/set_menu_item]
[/event]
@ -510,14 +562,25 @@ This also demonstrates how to combine candidate actions from Formula AI and Lua
name=start
{STORE_UNIT_VAR id=Kraa profile profile}
{MESSAGE Kraa "$profile~FL()~RIGHT()" "" _"Kraahhh!!!!"}
{MESSAGE (Another Bad Orc) "" "" _"They there! We them get!"}
[message]
speaker=Kraa
image=$profile~FL()~RIGHT()
message= _ "Kraahhh!!!!"
[/message]
[message]
speaker=Another Bad Orc
message= _ "They there! We them get!"
[/message]
# wmllint: unbalanced-on
{MESSAGE Kraa "$profile~FL()~RIGHT()" "" _"Gryphons of the High Plains, look at all these enemies. They don't behave normally. Most of them don't move at all unless we get close. Let's check out how they react to us.
[message]
speaker=Kraa
image=$profile~FL()~RIGHT()
message= _ "Gryphons of the High Plains, look at all these enemies. They don't behave normally. Most of them don't move at all unless we get close. Let's check out how they react to us.
Note to the player: the right-click context menu provides information about each of the units' behavior.
Another note: Most of the Guardian AIs are coded as Micro AIs. A Micro AI can be added and adapted to the need of a scenario easily using only WML and the [micro_ai] tag. Check out the <span color='#00A000'>Micro AI wiki page</span> at http://wiki.wesnoth.org/Micro_AIs for more information."}
Another note: Most of the Guardian AIs are coded as Micro AIs. A Micro AI can be added and adapted to the need of a scenario easily using only WML and the [micro_ai] tag. Check out the <span color='#00A000'>Micro AI wiki page</span> at http://wiki.wesnoth.org/Micro_AIs for more information."
[/message]
# wmllint: unbalanced-off
{CLEAR_VARIABLE profile}
@ -591,7 +654,10 @@ Another note: Most of the Guardian AIs are coded as Micro AIs. A Micro AI can be
[event]
name=end_scenario
{MESSAGE Kraa "" "" _"Gryphons of the High Plains, it is time to return to said plains. Follow me."}
[message]
speaker=Kraa
message= _ "Gryphons of the High Plains, it is time to return to said plains. Follow me."
[/message]
[endlevel]
result=victory

View file

@ -8,7 +8,7 @@
map_data="{multiplayer/maps/4p_Castle_Hopping_Isle.map}"
{DEFAULT_SCHEDULE}
turns=-1
turns=unlimited
victory_when_enemies_defeated=no
[side]
@ -102,7 +102,9 @@
ai_type=messenger_escort
action=add
id=Bad Outlaw
[filter]
id=Bad Outlaw
[/filter]
ca_score=165000
waypoint_x=16,22,36
waypoint_y=19,19,19
@ -113,9 +115,12 @@
name=start
# wmllint: unbalanced-on
{MESSAGE (Good Bandit) "" "" _"That outlaw over there is going to run for the keep in the southeast. He's only going to recruit for three rounds before he'll start moving and he and his footpads are much faster than we are. Let's make haste or we'll never catch him.
[message]
speaker=Good Bandit
message= _ "That outlaw over there is going to run for the keep in the southeast. He's only going to recruit for three rounds before he'll start moving and he and his footpads are much faster than we are. Let's make haste or we'll never catch him.
Note: This scenario uses a combination of two Micro AIs, the Hang Out Micro AI which makes the Side 2 units remain around the keep for two turns (while moving off castle tiles to allow for recruiting) and the Messenger Escort AI which takes over after that. A Micro AI can be added and adapted to the need of a scenario easily using only WML and the [micro_ai] tag. Check out the <span color='#00A000'>Micro AI wiki page</span> at http://wiki.wesnoth.org/Micro_AIs for more information."}
Note: This scenario uses a combination of two Micro AIs, the Hang Out Micro AI which makes the Side 2 units remain around the keep for two turns (while moving off castle tiles to allow for recruiting) and the Messenger Escort AI which takes over after that. A Micro AI can be added and adapted to the need of a scenario easily using only WML and the [micro_ai] tag. Check out the <span color='#00A000'>Micro AI wiki page</span> at http://wiki.wesnoth.org/Micro_AIs for more information."
[/message]
# wmllint: unbalanced-off
[objectives]
@ -141,7 +146,10 @@ Note: This scenario uses a combination of two Micro AIs, the Hang Out Micro AI w
id=Bad Outlaw
[/filter]
{MESSAGE (Good Bandit) "" "" _"We got him! Now whatever it is we are fighting for is safe."}
[message]
speaker=Good Bandit
message= _ "We got him! Now whatever it is we are fighting for is safe."
[/message]
# So that game goes on to next scenario
[modify_side]
@ -165,7 +173,10 @@ Note: This scenario uses a combination of two Micro AIs, the Hang Out Micro AI w
x,y=36,19
[/filter]
{MESSAGE (Bad Outlaw) "" "" _"I made it! Now we can keep fighting for whatever it is that we are fighting for."}
[message]
speaker=Bad Outlaw
message= _ "I made it! Now we can keep fighting for whatever it is that we are fighting for."
[/message]
[endlevel]
result=defeat
[/endlevel]

View file

@ -8,7 +8,7 @@
map_data="{multiplayer/maps/2p_The_Freelands.map}"
{DEFAULT_SCHEDULE}
turns=-1
turns=unlimited
victory_when_enemies_defeated=yes
[side]
@ -76,11 +76,14 @@
name=start
# wmllint: unbalanced-on
{MESSAGE Rebels1 "" "" _"In this scenario, we demonstrate the use of the Healer Support Micro AI. This AI configures the healers of a side to stay behind the battle lines and heal injured and/or threatened units rather than participate in the attacks under all circumstances. It includes several configurable options (which are set differently for the two sides in this scenario) that determine how aggressive/careful the healers are, whether they also attack, how much risk they are willing to take, etc.
[message]
speaker=Rebels1
message= _ "In this scenario, we demonstrate the use of the Healer Support Micro AI. This AI configures the healers of a side to stay behind the battle lines and heal injured and/or threatened units rather than participate in the attacks under all circumstances. It includes several configurable options (which are set differently for the two sides in this scenario) that determine how aggressive/careful the healers are, whether they also attack, how much risk they are willing to take, etc.
For clarity, each healer announces her upcoming support move. If you don't want to see that each time, just hit 'esc' when it happens the first time.
Note: The Healer Support AI is coded as a Micro AI. A Micro AI can be added and adapted to the need of a scenario easily using only WML and the [micro_ai] tag. Check out the <span color='#00A000'>Micro AI wiki page</span> at http://wiki.wesnoth.org/Micro_AIs for more information."}
Note: The Healer Support AI is coded as a Micro AI. A Micro AI can be added and adapted to the need of a scenario easily using only WML and the [micro_ai] tag. Check out the <span color='#00A000'>Micro AI wiki page</span> at http://wiki.wesnoth.org/Micro_AIs for more information."
[/message]
# wmllint: unbalanced-off
[/event]
@ -92,7 +95,10 @@ Note: The Healer Support AI is coded as a Micro AI. A Micro AI can be added and
canrecruit=yes
[/filter]
{MESSAGE $unit.id "" "" _"Argh! They got us..."}
[message]
speaker=$unit.id
message= _ "Argh! They got us..."
[/message]
# So that game goes on to next scenario
[modify_side]

View file

@ -187,7 +187,7 @@
map_data="{ai/micro_ais/maps/lurkers.map}"
{DEFAULT_SCHEDULE}
turns=-1
turns=unlimited
victory_when_enemies_defeated=no
[side]
@ -447,12 +447,17 @@
[event]
name=start
{MESSAGE Pekzs "" "" _"In this scenario we demonstrate the Lurker Micro AI. A lurker is a unit that is capable of moving across most terrains, but that only stops on and attacks from specific terrain. It might also have the ability to hide on this terrain (which is the reason why this is called the Lurker AI).
[message]
speaker=Pekzs
message= _ "In this scenario we demonstrate the Lurker Micro AI. A lurker is a unit that is capable of moving across most terrains, but that only stops on and attacks from specific terrain. It might also have the ability to hide on this terrain (which is the reason why this is called the Lurker AI).
Lurkers move individually without any strategy and always attack the weakest enemy within their reach. If no enemy is in reach, the lurker does a random move instead - or it just sits and waits (lurks)."}
Lurkers move individually without any strategy and always attack the weakest enemy within their reach. If no enemy is in reach, the lurker does a random move instead - or it just sits and waits (lurks)."
[/message]
# wmllint: unbalanced-on
{MESSAGE Pekzs "" "" _"Three different lurker behaviors are set up here using the [micro_ai] tag with different parameters:
[message]
speaker=Pekzs
message= _ "Three different lurker behaviors are set up here using the [micro_ai] tag with different parameters:
Side 2 (blue): saurians attacking only from swamp. If no enemy is in range, they do not move.
@ -460,13 +465,19 @@ Side 3 (green): saurians attacking only from swamp. If no enemy is in range, the
Side 4 (purple): nagas wandering only on water terrain, but attacking from both water and swamp.
We also added two other sides, which demonstrate lurker behavior coded in WML (Side 5, gray) and Formula AI (Side 6, brown)."}
We also added two other sides, which demonstrate lurker behavior coded in WML (Side 5, gray) and Formula AI (Side 6, brown)."
[/message]
{MESSAGE narrator "wesnoth-icon.png" _"Notes" _"You can use the right-click context menu to add additional lurkers.
[message]
speaker=narrator
image="wesnoth-icon.png"
caption= _ "Notes"
message= _ "You can use the right-click context menu to add additional lurkers.
Any unit not adjacent to swamp (and water, for the nagas) is safe from the lurkers, thus it is easy to keep Pekzs from being attacked.
The Lua Lurker AI is coded as a Micro AI. A Micro AI can be added and adapted to the need of a scenario easily using only WML and the [micro_ai] tag. Check out the <span color='#00A000'>Micro AI wiki page</span> at http://wiki.wesnoth.org/Micro_AIs for more information."}
The Lua Lurker AI is coded as a Micro AI. A Micro AI can be added and adapted to the need of a scenario easily using only WML and the [micro_ai] tag. Check out the <span color='#00A000'>Micro AI wiki page</span> at http://wiki.wesnoth.org/Micro_AIs for more information."
[/message]
# wmllint: unbalanced-off
[objectives]
@ -530,7 +541,10 @@ The Lua Lurker AI is coded as a Micro AI. A Micro AI can be added and adapted to
[event]
name=end_scenario
{MESSAGE Pekzs "" "" _"Zzanksss for helping me wizz zzossse lurkerss. Hope to sssee you again ssometime."}
[message]
speaker=Pekzs
message= _ "Zzanksss for helping me wizz zzossse lurkerss. Hope to sssee you again ssometime."
[/message]
[endlevel]
result=victory

View file

@ -8,7 +8,7 @@
map_data="{ai/micro_ais/maps/messenger_escort.map}"
{DEFAULT_SCHEDULE}
turns=-1
turns=unlimited
victory_when_enemies_defeated=no
[side]
@ -59,7 +59,9 @@
ai_type=messenger_escort
action=add
id=messenger
[filter]
id=messenger
[/filter]
waypoint_x=31,24,27,28
waypoint_y=20,14,7,1
[/micro_ai]
@ -132,17 +134,29 @@
name=start
{STORE_UNIT_VAR id=Vanak profile profile}
{MESSAGE Vanak "$profile~FL()~RIGHT()" "" _"They there! We them get!"}
[message]
speaker=Vanak
image=$profile~FL()~RIGHT()
message= _ "They there! We them get!"
[/message]
{CLEAR_VARIABLE profile}
{MESSAGE messenger "" "" _"Men, I need to get to that signpost in the north, to get the message to our leader. Let's head up there as quickly as we can."}
[message]
speaker=messenger
message= _ "Men, I need to get to that signpost in the north, to get the message to our leader. Let's head up there as quickly as we can."
[/message]
# wmllint: unbalanced-on
{MESSAGE narrator "wesnoth-icon.png" _"Notes" _"The Messenger Escort AI will try to move the dragoon messenger to the signpost in the north, while protecting him as well as possible with the other units. Vanak's orcs need to stop him.
[message]
speaker=narrator
image=wesnoth-icon.png
caption= _ "Notes"
message= _ "The Messenger Escort AI will try to move the dragoon messenger to the signpost in the north, while protecting him as well as possible with the other units. Vanak's orcs need to stop him.
Note that the messenger route is set up through a series of waypoints here simply to demonstrate how to use waypoints. On this map, using only a single waypoint at the end of the route would work just as well (or probably even better).
Also note that the messenger does not have to get exactly to each signpost (except for the last one), getting close is good enough.
The Messenger Escort AI is coded as a Micro AI. A Micro AI can be added and adapted to the need of a scenario easily using only WML and the [micro_ai] tag. Check out the <span color='#00A000'>Micro AI wiki page</span> at http://wiki.wesnoth.org/Micro_AIs for more information."}
The Messenger Escort AI is coded as a Micro AI. A Micro AI can be added and adapted to the need of a scenario easily using only WML and the [micro_ai] tag. Check out the <span color='#00A000'>Micro AI wiki page</span> at http://wiki.wesnoth.org/Micro_AIs for more information."
[/message]
# wmllint: unbalanced-off
[objectives]
@ -170,7 +184,10 @@ The Messenger Escort AI is coded as a Micro AI. A Micro AI can be added and adap
x,y=28,1
[/filter]
{MESSAGE messenger "" "" _"I made it! Now our people will be safe."}
[message]
speaker=messenger
message= _ "I made it! Now our people will be safe."
[/message]
[endlevel]
result=defeat
[/endlevel]
@ -182,7 +199,10 @@ The Messenger Escort AI is coded as a Micro AI. A Micro AI can be added and adap
[filter]
id=messenger
[/filter]
{MESSAGE messenger "" "" _"Nooo! All is lost. We will never stop the orcs now!"}
[message]
speaker=messenger
message= _ "Nooo! All is lost. We will never stop the orcs now!"
[/message]
# So that game goes on to next scenario
[modify_side]

View file

@ -8,7 +8,7 @@
map_data="{multiplayer/maps/2p_Sullas_Ruins.map}"
{DEFAULT_SCHEDULE}
turns=-1
turns=unlimited
victory_when_enemies_defeated=no
[side]
@ -121,7 +121,9 @@
ai_type=patrol
action=add
id=Konrad
[filter]
id=Konrad
[/filter]
ca_score=300000
waypoint_x=9,24,25
waypoint_y=21,23,15
@ -134,7 +136,9 @@
ai_type=patrol
action=add
id=patrol1
[filter]
id=patrol1
[/filter]
ca_score=299999
waypoint_x=14,22,22,14,14
waypoint_y=12,12,18,19,12
@ -146,7 +150,9 @@
ai_type=patrol
action=add
id=patrol2
[filter]
id=patrol2
[/filter]
ca_score=299998
waypoint_x=14,14,22,22
waypoint_y=12,19,18,12
@ -166,7 +172,9 @@
ai_type=zone_guardian
action=add
id=guard1
[filter]
id=guard1
[/filter]
ca_score=299997
[filter_location]
x,y=10-26,26-28
@ -201,20 +209,34 @@
{STORE_UNIT_VAR id=Konrad profile profile}
# wmllint: unbalanced-on
{MESSAGE Konrad "$profile~FL()~RIGHT()" "" _"Hello! I'm a Konrad impostor. We are going to demonstrate the Patrol AI to you in this scenario.
[message]
speaker=Konrad
image=$profile~FL()~RIGHT()
message= _ "Hello! I'm a Konrad impostor. We are going to demonstrate the Patrol AI to you in this scenario.
I am heading for the keep east of the central mountain via a couple waypoints in the south. I will stay there once I get there. By contrast, those two fellas in the center are perpetually circling the mountain, one of them always in the same direction, the other changing directions after every lap.
All of this is implemented by use of the Patrol [micro_ai] tag."}
All of this is implemented by use of the Patrol [micro_ai] tag."
[/message]
# wmllint: unbalanced-off
{CLEAR_VARIABLE profile}
{MESSAGE guard1 "" "" _"By contrast, I am a zone guardian patrolling, in a way, the southernmost part of the map. This AI is implemented via the Guardian [micro_ai] tag. It is here mostly to demonstrate how to set up different Micro AIs for the same side. For more details on different types of guardian AIs, there is a separate test scenario specializing on those."}
{MESSAGE Urudin "" "" _"And I am Urudin. I will attack my enemies for a few turns, but will retreat toward the right edge of the map if my hitpoints are below half of maximum or by Turn 5, whatever happens first.
[message]
speaker=guard1
message= _ "By contrast, I am a zone guardian patrolling, in a way, the southernmost part of the map. This AI is implemented via the Guardian [micro_ai] tag. It is here mostly to demonstrate how to set up different Micro AIs for the same side. For more details on different types of guardian AIs, there is a separate test scenario specializing on those."}
[/message]
[message]
speaker=Urudin
message= _ "And I am Urudin. I will attack my enemies for a few turns, but will retreat toward the right edge of the map if my hitpoints are below half of maximum or by Turn 5, whatever happens first.
This is an AI separate from the Patrols of Side 2."}
This is an AI separate from the Patrols of Side 2."
[/message]
# wmllint: unbalanced-on
{MESSAGE narrator "wesnoth-icon.png" _"Notes" _"You, as the player, are in charge of Gertburt's bandits in this scenario. You can either simply watch the patrols move around, or you can move units into their way. The three patrol units are instructed to behave differently when facing enemy units:
[message]
speaker=narrator
image=wesnoth-icon.png
caption= _ "Notes"
message= _ "You, as the player, are in charge of Gertburt's bandits in this scenario. You can either simply watch the patrols move around, or you can move units into their way. The three patrol units are instructed to behave differently when facing enemy units:
Konrad only attacks Gertburt, or any enemy unit that blocks his final waypoint.
@ -224,7 +246,8 @@ The Longbowman attacks any enemy unit he ends up next to at the end of his move.
They all have in common, however, that getting to their next waypoint takes priority over attacking. They will thus prefer to move around enemies rather than straight for them. Also, if a waypoint is occupied by a unit they are not instructed to attack, they will (eventually) abandon that waypoint once they get close enough and move on to the next one.
The Patrol AI controlling all Side 2 units is coded as a Micro AI. A Micro AI can be added and adapted to the need of a scenario easily using only WML and the [micro_ai] tag. Check out the <span color='#00A000'>Micro AI wiki page</span> at http://wiki.wesnoth.org/Micro_AIs for more information."}
The Patrol AI controlling all Side 2 units is coded as a Micro AI. A Micro AI can be added and adapted to the need of a scenario easily using only WML and the [micro_ai] tag. Check out the <span color='#00A000'>Micro AI wiki page</span> at http://wiki.wesnoth.org/Micro_AIs for more information."
[/message]
# wmllint: unbalanced-off
[objectives]
@ -253,7 +276,10 @@ The Patrol AI controlling all Side 2 units is coded as a Micro AI. A Micro AI ca
x,y=25,15
[/filter]
{MESSAGE Konrad "" "" _"Well, that was fun! I'll just hang out here now and watch those two guys walk and walk and ..."}
[message]
speaker=Konrad
message= _ "Well, that was fun! I'll just hang out here now and watch those two guys walk and walk and ..."
[/message]
[/event]
# The events finishing the scenario
@ -294,7 +320,10 @@ The Patrol AI controlling all Side 2 units is coded as a Micro AI. A Micro AI ca
[event]
name=end_scenario
{MESSAGE Gertburt "" "" _"Let's go home, chaps."}
[message]
speaker=Gertburt
message= _ "Let's go home, chaps."
[/message]
[endlevel]
result=victory

View file

@ -8,7 +8,7 @@
map_data="{ai/micro_ais/maps/protect_unit.map}"
{DEFAULT_SCHEDULE}
turns=-1
turns=unlimited
victory_when_enemies_defeated=no
[side]
@ -52,7 +52,6 @@
[/goal]
[/ai]
{ai/aliases/stable_singleplayer.cfg}
[ai]
[engine]
name="lua"
@ -124,11 +123,24 @@
name=start
{STORE_UNIT_VAR id=Koorzhar profile profile}
{MESSAGE Koorzhar "$profile~FL()~RIGHT()" "" _"There's that traitor wizard. Let's get him."}
[message]
speaker=Koorzhar
image="$profile~FL()~RIGHT()"
message= _ "There's that traitor wizard. Let's get him."
[/message]
{CLEAR_VARIABLE profile}
{MESSAGE Langzhar "" "" _"Men, you know the deal. We must protect Rossauba under all circumstances. Even my survival is not as important."}
{MESSAGE Rossauba "" "" _"That's very kind of you, but ..."}
{MESSAGE Langzhar "" "" _"No buts! You stay behind the lines and do not engage in battle unless there is no risk to your life, is that understood? And get to that signpost in the northwest if it is safe."}
[message]
speaker=Langzhar
message= _ "Men, you know the deal. We must protect Rossauba under all circumstances. Even my survival is not as important."
[/message]
[message]
speaker=Rossauba
message= _ "That's very kind of you, but ..."
[/message]
[message]
speaker=Langzhar
message= _ "No buts! You stay behind the lines and do not engage in battle unless there is no risk to your life, is that understood? And get to that signpost in the northwest if it is safe."
[/message]
[message]
speaker=narrator
@ -213,7 +225,11 @@ Note: The Protect Unit AI is coded as a Micro AI. A Micro AI can be added and ad
id=Rossauba
[/filter]
{MESSAGE Rossauba "" "" _"I held out for as long as I could."}
[message]
speaker=Rossauba
message= _ "I held out for as long as I could."
[/message]
[fire_event]
name=end_scenario
[/fire_event]
@ -227,7 +243,10 @@ Note: The Protect Unit AI is coded as a Micro AI. A Micro AI can be added and ad
x,y=1,1
[/filter]
{MESSAGE Rossauba "" "" _"I made it"}
[message]
speaker=Rossauba
message= _ "I made it"
[/message]
[fire_event]
name=end_scenario

View file

@ -8,7 +8,7 @@
map_data="{ai/micro_ais/maps/protect_unit.map}"
{DEFAULT_SCHEDULE}
turns=-1
turns=unlimited
victory_when_enemies_defeated=no
[side]
@ -82,16 +82,28 @@
name=start
{STORE_UNIT_VAR id=Koorzhar profile profile}
{MESSAGE Koorzhar "$profile~FL()~RIGHT()" "" _"This is a very simple scenario that can be used to test out different recruiting patterns."}
[message]
speaker=Koorzhar
image=$profile~FL()~RIGHT()
message= _ "This is a very simple scenario that can be used to test out different recruiting patterns."
[/message]
{CLEAR_VARIABLE profile}
{MESSAGE Langzhar "" "" _"Just watch the recruiting of both sides and see if it is what you would expect. The recruitment lists cover level 0 to level 2 units, in order to make differences more obvious."}
[message]
speaker=Langzhar
message= _ "Just watch the recruiting of both sides and see if it is what you would expect. The recruitment lists cover level 0 to level 2 units, in order to make differences more obvious."
[/message]
# wmllint: unbalanced-on
{MESSAGE narrator "wesnoth-icon.png" "Notes" _"If you have not changed anything in the scenario code, Side 1 uses the Random Recruitment Micro AI, with swordsmen and peasants having been given higher probability than the other units, and mages a middling probability. This is not meant as a good recruitment pattern, it simply serves as a demonstration how to use the AI.
[message]
speaker=narrator
image=wesnoth-icon.png
caption= _ "Notes"
message= _ "If you have not changed anything in the scenario code, Side 1 uses the Random Recruitment Micro AI, with swordsmen and peasants having been given higher probability than the other units, and mages a middling probability. This is not meant as a good recruitment pattern, it simply serves as a demonstration how to use the AI.
Side 2 uses the Rush Recruitment Micro AI (which is also used in the Experimental AI).
A Micro AI can be added and adapted to the need of a scenario easily using only WML and the [micro_ai] tag. Check out the <span color='#00A000'>Micro AI wiki page</span> at http://wiki.wesnoth.org/Micro_AIs for more information."}
A Micro AI can be added and adapted to the need of a scenario easily using only WML and the [micro_ai] tag. Check out the <span color='#00A000'>Micro AI wiki page</span> at http://wiki.wesnoth.org/Micro_AIs for more information."
[/message]
# wmllint: unbalanced-off
[/event]
@ -108,7 +120,11 @@ A Micro AI can be added and adapted to the need of a scenario easily using only
[/have_unit]
[/not]
[then]
{MESSAGE narrator "wesnoth-icon.png" "" _"Well, that was that."}
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "Well, that was that."
[/message]
# So that game goes on to next scenario
[modify_side]

View file

@ -8,7 +8,7 @@
map_data="{multiplayer/maps/Dark_Forecast_basic.map}"
{DEFAULT_SCHEDULE}
turns=-1
turns=unlimited
victory_when_enemies_defeated=no
[side]
@ -106,7 +106,11 @@
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Bottleneck Defense Micro AI Demo" _"In the Bottleneck Defense Micro AI scenario, a small group of human soldiers is instructed to hold a pass against a large horde of orcs. You can either watch them fight it out against the standard RCA AI or take over the orc side."}
[message]
speaker=Grnk
caption= _ "Bottleneck Defense Micro AI Demo"
message= _ "In the Bottleneck Defense Micro AI scenario, a small group of human soldiers is instructed to hold a pass against a large horde of orcs. You can either watch them fight it out against the standard RCA AI or take over the orc side."
[/message]
[/command]
[/set_menu_item]
@ -121,7 +125,11 @@
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Swamp Lurker Micro AI demo" _"Swamp lurkers are dumb, impulse-driven creatures which can move across most terrain, but only stop on swamp. They move individually without any strategy and always attack the weakest enemy within their reach. If no enemy is in reach, the lurker does a random move instead."}
[message]
speaker=Grnk
caption= _ "Swamp Lurker Micro AI demo"
message= _ "Swamp lurkers are dumb, impulse-driven creatures which can move across most terrain, but only stop on swamp. They move individually without any strategy and always attack the weakest enemy within their reach. If no enemy is in reach, the lurker does a random move instead."
[/message]
[/command]
[/set_menu_item]
@ -136,7 +144,11 @@
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Guardian Micro AI demo" _"In 'Guardians', several variations of the standard Wesnoth guardian are shown, including a ""coward"" unit that runs away from any approaching unit (an ""inverse guardian"", in a way)."}
[message]
speaker=Grnk
caption= _ "Guardian Micro AI demo"
message= _ "In 'Guardians', several variations of the standard Wesnoth guardian are shown, including a ""coward"" unit that runs away from any approaching unit (an ""inverse guardian"", in a way)."
[/message]
[/command]
[/set_menu_item]
@ -151,7 +163,11 @@
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Patrol Micro AI demo" _"'Patrols' contains AI modifications for units following patrol routes."}
[message]
speaker=Grnk
caption= _ "Patrol Micro AI demo"
message= _ "'Patrols' contains AI modifications for units following patrol routes."
[/message]
[/command]
[/set_menu_item]
@ -166,7 +182,11 @@
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Recruiting Tests Micro AI demo" _"A simple scenario set up for the sole purpose of testing different recruiting patterns."}
[message]
speaker=Grnk
caption= _ "Recruiting Tests Micro AI demo"
message= _ "A simple scenario set up for the sole purpose of testing different recruiting patterns."
[/message]
[/command]
[/set_menu_item]
@ -181,7 +201,11 @@
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Protect Unit Micro AI Demo" _"This scenario demonstrates one side protecting a wizard while moving him to a goal location. At the same time, the other side is modified to do priority attacks on the wizard, even if a better target (by the default AI criteria) is available. You can watch the two AIs fight it out, or take control of either side to explore how the opposing AI behaves."}
[message]
speaker=Grnk
caption= _ "Protect Unit Micro AI Demo"
message= _ "This scenario demonstrates one side protecting a wizard while moving him to a goal location. At the same time, the other side is modified to do priority attacks on the wizard, even if a better target (by the default AI criteria) is available. You can watch the two AIs fight it out, or take control of either side to explore how the opposing AI behaves."
[/message]
[/command]
[/set_menu_item]
@ -197,7 +221,11 @@
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"HttT: The Elves Besieged Micro AI demo" _"This is a reenactment of scenario ""The Elves Besieged"" of the mainline campaign ""Heir to the Throne"", just that the AI is playing Konrad's side here. The same algorithm as for scenario ""Protect Unit"" is used."}
[message]
speaker=Grnk
caption= _ "HttT: The Elves Besieged Micro AI demo"
message= _ "This is a reenactment of scenario ""The Elves Besieged"" of the mainline campaign ""Heir to the Throne"", just that the AI is playing Konrad's side here. The same algorithm as for scenario ""Protect Unit"" is used."
[/message]
[/command]
[/set_menu_item]
@ -212,7 +240,11 @@
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Messenger Escort Micro AI demo" _"'Messenger Escort' has the AI actively protect a messenger while he makes his way to the edge of the map. The escort will also try to open the path for the messenger if there are enemies in the way."}
[message]
speaker=Grnk
caption= _ "Messenger Escort Micro AI demo"
message= _ "'Messenger Escort' has the AI actively protect a messenger while he makes his way to the edge of the map. The escort will also try to open the path for the messenger if there are enemies in the way."
[/message]
[/command]
[/set_menu_item]
@ -227,7 +259,11 @@
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Animals Micro AI demo" _"This scenario demonstrates a number of different animals following customized AI behavior, including wolves hunting deer in packs; dogs herding sheep; bears, spiders, yetis, boar and rabbits wandering and hunting/avoiding each other."}
[message]
speaker=Grnk
caption= _ "Animals Micro AI demo"
message= _ "This scenario demonstrates a number of different animals following customized AI behavior, including wolves hunting deer in packs; dogs herding sheep; bears, spiders, yetis, boar and rabbits wandering and hunting/avoiding each other."
[/message]
[/command]
[/set_menu_item]
@ -242,7 +278,11 @@
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Wolves Micro AI demo" _"Another demonstration of wolves wandering and attacking in packs, with a different behavior from that in 'Animals'."}
[message]
speaker=Grnk
caption= _ "Wolves Micro AI demo"
message= _ "Another demonstration of wolves wandering and attacking in packs, with a different behavior from that in 'Animals'."
[/message]
[/command]
[/set_menu_item]
@ -257,7 +297,11 @@
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Swarm Micro AI demo" _"This scenario features bats moving around semi-randomly in a swarm."}
[message]
speaker=Grnk
caption= _ "Swarm Micro AI demo"
message= _ "This scenario features bats moving around semi-randomly in a swarm."
[/message]
[/command]
[/set_menu_item]
@ -272,7 +316,11 @@
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Dragon Micro AI demo" _"This scenario features a fire dragon displaying a hunt-and-rest behavior."}
[message]
speaker=Grnk
caption= _ "Dragon Micro AI demo"
message= _ "This scenario features a fire dragon displaying a hunt-and-rest behavior."
[/message]
[/command]
[/set_menu_item]
@ -287,7 +335,11 @@
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Healer Support Micro AI demo" _"This scenario contains a simple demonstration of setting up the Healer Support Micro AI, which uses the healers of a side to back up injured or threatened units rather than having them participate in combat under all circumstances."}
[message]
speaker=Grnk
caption= _ "Healer Support Micro AI demo"
message= _ "This scenario contains a simple demonstration of setting up the Healer Support Micro AI, which uses the healers of a side to back up injured or threatened units rather than having them participate in combat under all circumstances."
[/message]
[/command]
[/set_menu_item]
@ -302,7 +354,11 @@
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Goto Micro AI demo" _"This scenario contains several example usages of the Goto Micro AI, which is a highly configurable method of sending a unit (or units) to a location or set of locations. The units to be moved are defined using a Standard Unit Filter, while the goto locations are given in a Standard Location Filter."}
[message]
speaker=Grnk
caption= _ "Goto Micro AI demo"
message= _ "This scenario contains several example usages of the Goto Micro AI, which is a highly configurable method of sending a unit (or units) to a location or set of locations. The units to be moved are defined using a Standard Unit Filter, while the goto locations are given in a Standard Location Filter."
[/message]
[/command]
[/set_menu_item]
@ -317,7 +373,11 @@
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Combined Hang Out and Messenger Escort Micro AI demo" _"This scenario is a demonstration of the Hang Out Micro AI which keeps units around a (customizable) location until a (customizable) condition is met. After that the units are released to follow other AI behavior. The scenario also shows how to combine two Micro AIs on the same side by having the Messenger Escort Micro AI take over at that point."}
[message]
speaker=Grnk
caption= _ "Combined Hang Out and Messenger Escort Micro AI demo"
message= _ "This scenario is a demonstration of the Hang Out Micro AI which keeps units around a (customizable) location until a (customizable) condition is met. After that the units are released to follow other AI behavior. The scenario also shows how to combine two Micro AIs on the same side by having the Messenger Escort Micro AI take over at that point."
[/message]
[/command]
[/set_menu_item]
@ -332,7 +392,11 @@
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Simple Attack Micro AI demo" _"This scenario demonstrates how certain attacks can be executed with higher priority than the standard Wesnoth attacks and how the AI can be forced to do attacks that it would otherwise avoid."}
[message]
speaker=Grnk
caption= _ "Simple Attack Micro AI demo"
message= _ "This scenario demonstrates how certain attacks can be executed with higher priority than the standard Wesnoth attacks and how the AI can be forced to do attacks that it would otherwise avoid."
[/message]
[/command]
[/set_menu_item]
@ -347,7 +411,11 @@
{VARIABLE_CONDITIONAL scenario_name equals micro_ai_test}
[/show_if]
[command]
{MESSAGE Grnk "" _"Fast Micro AI demo" _"A simple demonstration of the calculation time advantage of the Fast Micro AI over the default AI in scenarios with many units."}
[message]
speaker=Grnk
caption= _ "Fast Micro AI demo"
message= _ "A simple demonstration of the calculation time advantage of the Fast Micro AI over the default AI in scenarios with many units."
[/message]
[/command]
[/set_menu_item]
[/event]
@ -357,9 +425,12 @@
{SCROLL_TO 13 11}
{MESSAGE Grnk "" "" _"Move me to any of the signposts to go to a Micro AI demonstration.
[message]
speaker=Grnk
message= _ "Move me to any of the signposts to go to a Micro AI demonstration.
Information about each demonstration can be accessed by right-clicking on the respective signpost."}
Information about each demonstration can be accessed by right-clicking on the respective signpost."
[/message]
[objectives]
[objective]

View file

@ -8,7 +8,7 @@
map_data="{multiplayer/maps/Dark_Forecast_basic.map}"
{DEFAULT_SCHEDULE}
turns=-1
turns=unlimited
[side]
side=1
@ -120,10 +120,16 @@
{SCROLL_TO 11 9}
{MESSAGE sergeant "" "" _"General Grospur, what do we do? These undead will surely wipe us out."}
{MESSAGE Grospur "" "" _"Don't be such a chicken, Sergeant! I have placed units with lots of experience around the perimeter. The undead will not dare to attack them. And those few that sneak through... we can easily dispose of them once they make it inside.
[message]
speaker=sergeant
message= _ "General Grospur, what do we do? These undead will surely wipe us out."
[/message]
[message]
speaker=Grospur
message= _ "Don't be such a chicken, Sergeant! I have placed units with lots of experience around the perimeter. The undead will not dare to attack them. And those few that sneak through... we can easily dispose of them once they make it inside.
<i>In other words, the Wesnoth AI does generally not attack units one XP from leveling if there is no chance of killing the unit with a single attack. However, some of the attacks by the undead are handled by the Simple Attack Micro AI in this scenario. General Grospur might be in for a surprise.</i>"}
<i>In other words, the Wesnoth AI does generally not attack units one XP from leveling if there is no chance of killing the unit with a single attack. However, some of the attacks by the undead are handled by the Simple Attack Micro AI in this scenario. General Grospur might be in for a surprise.</i>"
[/message]
[objectives]
summary= _ "Watch the undead take care of business"
@ -161,10 +167,16 @@
lua_function = "close_to_advancing"
[/filter_second]
{MESSAGE $second_unit.id "" "" _"What the ... ?!? They are not supposed to attack me. That just doesn't happen in Wesnoth!"}
{MESSAGE Uralt "" "" _"Hahahahaha !! I have given special instruction to my Soulless to attack all you almost-advanced units first. Also watch how those same Soulless will throw themselves mercilessly at your pitiful soldiers after that, saving my more valuable skeleton minions for later. I have taken the term 'disposable units' to a whole new level. Watch in awe !!
[message]
speaker=$second_unit.id
message= _ "What the ... ?!? They are not supposed to attack me. That just doesn't happen in Wesnoth!"
[/message]
[message]
speaker=Uralt
message= _ "Hahahahaha !! I have given special instruction to my Soulless to attack all you almost-advanced units first. Also watch how those same Soulless will throw themselves mercilessly at your pitiful soldiers after that, saving my more valuable skeleton minions for later. I have taken the term 'disposable units' to a whole new level. Watch in awe !!
<i>Translation: The undead side includes two instances of the Simple Attack Micro AI. The first makes the Soulless attack all units 1 XP from leveling up, such that they can be eliminated afterward. The second executes all remaining attacks possible by Soulless (and Walking Corpses), without regard for their own safety. Only after that does the default Wesnoth attack mechanism kick in to attack with the remaining units (skeletons).</i>"}
<i>Translation: The undead side includes two instances of the Simple Attack Micro AI. The first makes the Soulless attack all units 1 XP from leveling up, such that they can be eliminated afterward. The second executes all remaining attacks possible by Soulless (and Walking Corpses), without regard for their own safety. Only after that does the default Wesnoth attack mechanism kick in to attack with the remaining units (skeletons).</i>"
[/message]
[/event]
# Put more undead out there when less than 25 left
@ -178,7 +190,10 @@
count=0-24
[/have_unit]
[then]
{MESSAGE Uralt "" "" _"Rise, minions!"}
[message]
speaker=Uralt
message= _ "Rise, minions!"
[/message]
{SCATTER_UNITS 6 "Soulless" 1 (x,y=5-9,1-15) (side=2)}
{SCATTER_UNITS 3 "Skeleton,Skeleton Archer" 1 (x,y=5-9,1-15) (side=2)}
[/then]
@ -221,7 +236,10 @@
controller=human
[/modify_side]
{MESSAGE Uralt "" "" _"And that's how the undead AI executes total annihilation ..."}
[message]
speaker=Uralt
message= _ "And that's how the undead AI executes total annihilation ..."
[/message]
[endlevel]
result=victory

View file

@ -8,7 +8,7 @@
map_data="{ai/micro_ais/maps/animals.map}"
{DEFAULT_SCHEDULE}
turns=-1
turns=unlimited
victory_when_enemies_defeated=no
[side]
@ -69,7 +69,11 @@
{VARIABLE_CONDITIONAL scenario_name equals swarm}
[/show_if]
[command]
{MESSAGE narrator "wesnoth-icon.png" "" _"Well, that was that."}
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "Well, that was that."
[/message]
# So that game goes on to next scenario
[modify_side]
@ -134,11 +138,15 @@
name=start
# wmllint: unbalanced-on
{MESSAGE narrator "wesnoth-icon.png" "" _"This scenario features bats moving around in a swarm. Without adjacent enemies, they simply try to stay together and at a certain distance from enemies. However, if an enemy unit is close to any bat, the swarm scatters. This is particular fun to watch when one places an enemy unit in the middle of the swarm. After being scattered, the swarm members slowly rejoin, but not in a very organized way. Sub-swarms or individual bats might roam around for quite some time before they find their way back. It is also possible that individual bats (or small groups) split off from the larger swarm at times.
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "This scenario features bats moving around in a swarm. Without adjacent enemies, they simply try to stay together and at a certain distance from enemies. However, if an enemy unit is close to any bat, the swarm scatters. This is particular fun to watch when one places an enemy unit in the middle of the swarm. After being scattered, the swarm members slowly rejoin, but not in a very organized way. Sub-swarms or individual bats might roam around for quite some time before they find their way back. It is also possible that individual bats (or small groups) split off from the larger swarm at times.
The player controls a side of gryphons, each of which is given 99 moves so that the reaction of the swarm to enemies can be tested easily. There are also several right-click options, for example for adding bats or gryphons or for taking units off the map.
Note: The Swarm AI is coded as a Micro AI. A Micro AI can be added and adapted to the need of a scenario easily using only WML and the [micro_ai] tag. Check out the <span color='#00A000'>Micro AI wiki page</span> at http://wiki.wesnoth.org/Micro_AIs for more information."}
Note: The Swarm AI is coded as a Micro AI. A Micro AI can be added and adapted to the need of a scenario easily using only WML and the [micro_ai] tag. Check out the <span color='#00A000'>Micro AI wiki page</span> at http://wiki.wesnoth.org/Micro_AIs for more information."
[/message]
# wmllint: unbalanced-off
[objectives]
@ -174,7 +182,11 @@ Note: The Swarm AI is coded as a Micro AI. A Micro AI can be added and adapted t
[/have_unit]
[/not]
[then]
{MESSAGE narrator "wesnoth-icon.png" "" _"Well, that was that."}
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "Well, that was that."
[/message]
# So that game goes on to next scenario
[modify_side]

View file

@ -8,7 +8,7 @@
map_data="{ai/micro_ais/maps/animals.map}"
{DEFAULT_SCHEDULE}
turns=-1
turns=unlimited
victory_when_enemies_defeated=no
[side]
@ -98,7 +98,11 @@
{VARIABLE_CONDITIONAL scenario_name equals wolves}
[/show_if]
[command]
{MESSAGE narrator "wesnoth-icon.png" "" _"Well, that was that."}
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "Well, that was that."
[/message]
# So that game goes on to next scenario
[modify_side]
@ -185,11 +189,15 @@
[event]
name=start
{MESSAGE narrator "wesnoth-icon.png" "" _"This scenario features a different kind of wolf behavior from 'Animals'. First, there can be an arbitrary number of wolf packs and the pack size on each side is a free parameter (set to 3 for Side 2 and 4 for Side 3 in this scenario). At the beginning of the scenario, close wolves are grouped into packs in a semi-methodical way. Wolves of the same pack begin by joining each other on the map. After that, they stay together until only one wolf is left, which then tries to join up with an incomplete pack or with other single wolves. Individual wolves entering the map during the scenario behave in that way as well.
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "This scenario features a different kind of wolf behavior from 'Animals'. First, there can be an arbitrary number of wolf packs and the pack size on each side is a free parameter (set to 3 for Side 2 and 4 for Side 3 in this scenario). At the beginning of the scenario, close wolves are grouped into packs in a semi-methodical way. Wolves of the same pack begin by joining each other on the map. After that, they stay together until only one wolf is left, which then tries to join up with an incomplete pack or with other single wolves. Individual wolves entering the map during the scenario behave in that way as well.
Second, wolves do not actively hunt here. For the most part they just wander (often long distance). However, the pack ferociously (and without regard for its own health) attacks any enemy units that come into range, as long as that does not mean separating the pack by more than a few hexes. Staying together, or joining with a new wolf assigned to the pack, is the only thing that takes priority over satisfying the wolves' thirst for blood.
To emphasize which wolf belongs to which pack, the pack number will be displayed below each wolf in this scenario once the AI takes control of a side the first time."}
To emphasize which wolf belongs to which pack, the pack number will be displayed below each wolf in this scenario once the AI takes control of a side the first time."
[/message]
[message]
speaker=narrator
@ -259,7 +267,11 @@ Also note that the wolves AI is coded as a Micro AI. A Micro AI can be added and
[/have_unit]
[/not]
[then]
{MESSAGE narrator "wesnoth-icon.png" "" _"Well, that was that."}
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "Well, that was that."
[/message]
# So that game goes on to next scenario
[modify_side]

View file

@ -54,13 +54,13 @@
side=3
x,y=21,7
type="Drake Warden"
random_traits=0
random_traits=no
[/unit]
[unit]
side=3
x,y=23,16
type="Drake Warden"
random_traits=0
random_traits=no
[modifications]
{TRAIT_RESILIENT}
[/modifications]
@ -69,38 +69,38 @@
side=3
x,y=17,5
type="Drake Warden"
random_traits=0
random_traits=no
[/unit]
[unit]
side=3
x,y=15,7
type="Drake Warden"
random_traits=0
random_traits=no
[/unit]
[unit]
side=3
x,y=17,8
type="Drake Warden"
random_traits=0
random_traits=no
[/unit]
[unit]
side=3
x,y=19,9
type="Drake Warden"
random_traits=0
random_traits=no
[/unit]
[unit]
side=3
x,y=26,18
type="Ancient Wose"
random_traits=0
random_traits=no
[/unit]
[unit]
side=3
hitpoints=3
x,y=26,14
type="Drake Warden"
random_traits=0
random_traits=no
[/unit]
[unit]
side=3
@ -108,28 +108,28 @@
type="Skeleton"
[/unit]
[label]
color="255,0,0,0"
color="255,0,0"
text= _ "Undead target test"
visible_in_fog="yes"
x="9"
y="17"
[/label]
[label]
color="255,0,0,0"
color="255,0,0"
text= _ "Target choose test"
visible_in_fog="yes"
x="19"
y="6"
[/label]
[label]
color="255,0,0,0"
color="255,0,0"
text= _ "Regeneration attack test"
visible_in_fog="yes"
x="25"
y="19"
[/label]
[label]
color="255,0,0,0"
color="255,0,0"
text= _ "Weapon test with low hp target"
visible_in_fog="yes"
x="26"

View file

@ -7,7 +7,7 @@
description= _ "Small ai arena"
map_data="{ai/maps/scenario-AI_Arena_small.map}"
random_start_time="no"
turns=-1
turns=unlimited
{DEFAULT_SCHEDULE}
{DEFAULT_MUSIC_PLAYLIST}
@ -21,9 +21,6 @@
first_time_only=no
[lua]
code = <<
H = wesnoth.dofile("lua/helper.lua")
W = H.set_wml_action_metatable({})
H.set_wml_var_metatable(_G)
local tests_table = {}
function register_test(_name, _description)
tests_table[_name] = _description
@ -70,7 +67,7 @@
name="_replace_ai_2"
[/fire_event]
[lua]
code= << W.fire_event {name=wesnoth.get_variable("test_id") } >>
code= << wesnoth.wml_actions.fire_event {name=wml.variables["test_id"] } >>
[/lua]
[/command]
[/set_menu_item]
@ -154,7 +151,7 @@
local cmd = { "command", {{ "set_variable", {name="test_id", value= k } } } }
table.insert(opts, { "option", { label = v, cmd } } )
end
W.message { speaker="narrator", message="Which test do you wish to run, O Mighty AI Developer?", table.unpack(opts) }
wesnoth.wml_actions.message { speaker="narrator", message="Which test do you wish to run, O Mighty AI Developer?", table.unpack(opts) }
>>
[/lua]
[command]
@ -163,7 +160,7 @@
[/fire_event]
[/command]
[lua]
code= << W.fire_event {name=wesnoth.get_variable("test_id") } >>
code= << wesnoth.wml_actions.fire_event {name=wml.variables["test_id"] } >>
[/lua]
[/event]

View file

@ -6,7 +6,7 @@
map_data="{campaigns/The_Hammer_of_Thursagan/maps/12_The_Underlevels.map}"
{DEFAULT_SCHEDULE}
turns=-1
turns=unlimited
victory_when_enemies_defeated=yes
[side]

View file

@ -56,6 +56,7 @@ Gs^Fp , Gs^Fp , Wwf , Wwf , Mm , Rd
[/label]
[side]
side=1
name="Azalin"
type=Necromancer
id=side_1_leader

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

View file

@ -179,7 +179,7 @@
[event]
name=last breath
[filter]
speaker=Gharlsa
id=Gharlsa
[/filter]
[message]

View file

@ -87,7 +87,7 @@
aggression=-0.1
simple_targeting=yes
turns="1,2,3,7,8,9,13,14,15,19,20,21"
grouping=none
grouping=no
{ATTACK_DEPTH 1 3 5}
[/ai]
[/side]
@ -126,7 +126,7 @@
[ai]
aggression=-0.1
turns="1,2,3,7,8,9,13,14,15,19,20,21"
grouping=none
grouping=no
attack_depth=5
simple_targeting=yes
[/ai]

Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

View file

@ -361,7 +361,6 @@
speaker=narrator
message= _ "You have few trained fighters, so you can only recruit three of each level 1 unit. There is no limit on citizens."
image=wesnoth-icon.png
duration=60
[/message]
[/event]

View file

@ -383,7 +383,6 @@
[/message]
[message]
duration=30
speaker=narrator
image=wesnoth-icon.png
message= _ "Kai Krellis saw that it was so. The refugee merfolk, sore in their pride from fleeing their enemies, cheered his ultimatum and made ready to fight with a will."
@ -431,7 +430,6 @@
[/if]
[message]
duration=30
speaker=narrator
image=wesnoth-icon.png
message= _ "You can choose when the slaves come out of their villages and attack their captors. When you are ready, right click anywhere and select the slave revolt."

View file

@ -67,11 +67,16 @@
condition=win
[/objective]
[objective]
[show_if]
[have_unit]
side=2
canrecruit=yes
[/have_unit]
[/show_if]
{BONUS_OBJECTIVE_CAPTION}
description= _ "Also kill Marg-Tonz"+{EARLY_FINISH_BONUS_FOOTNOTE}+{OBJECTIVE_FOOTNOTE _"(you can destroy the undead first)"}
condition=win
[/objective]
[gold_carryover]
carryover_percentage=40
[/gold_carryover]
@ -696,38 +701,51 @@
[filter]
id=Marg-Tonz
[/filter]
# The chest looks better when it's offset 10px to the north
[item]
x,y=$x1,$y1
image=misc/blank-hex.png~BLIT(items/chest-open.png~CROP(0,10,72,62),0,0)
[/item]
[if]
[have_unit]
x,y=$x2,$y2
race=bats
side=1
[/have_unit]
[then]
[message]
speaker=second_unit
message= _ "Neep, neep!"
[/message]
# The chest looks better when it's offset 10px to the north
[item]
x,y=$x1,$y1
image=misc/blank-hex.png~BLIT(items/chest-open.png~CROP(0,10,72,62),0,0)
[/item]
[message]
speaker=Kai Krellis
message= _ "It seems that orc was rich! He has a chest here with over 100 pieces of gold!"
[/message]
[if]
[have_unit]
x,y=$x2,$y2
race=bats
[/have_unit]
[then]
[message]
speaker=second_unit
message= _ "Neep, neep!"
[/message]
[message]
speaker=Kai Krellis
message= _ "It seems that orc was rich! He has a chest here with over 100 pieces of gold!"
[/message]
[/then]
[else]
[message]
speaker=second_unit
message= _ "It seems that orc was rich! He has a chest here with over 100 pieces of gold!"
[/message]
[/else]
[/if]
[/then]
[else]
[message]
speaker=second_unit
message= _ "It seems that orc was rich! He has a chest here with over 100 pieces of gold!"
speaker=Kai Krellis
message= _ "Now we must defeat the undead."
[/message]
[/else]
[/if]
[sound]
name=gold.ogg
[/sound]
@ -748,6 +766,11 @@
{NEW_GOLD_CARRYOVER 40}
[/endlevel]
[/then]
[else]
[show_objectives]
[/show_objectives]
[/else]
[/if]
[/event]
@ -759,6 +782,7 @@
[message]
speaker=Marg-Tonz
# po: orc's boss' last breath, deliberately gendered instead of changing to "merfolk"
message= _ "I hate mermen!"
[/message]
[/event]

View file

@ -64,7 +64,7 @@
[ai]
villages_per_scout=1
[/ai]
# The drakes need a lot of money. Mermen are pretty effective
# The drakes need a lot of money. Merfolk are pretty effective
# against them in the water.
{INCOME4 20 25 30 35}
{GOLD4 250 290 330 380}
@ -121,7 +121,7 @@
name=start
[message]
speaker=Vlagnor
message= _ "What are you mermen doing here?"
message= _ "What are you merfolk doing here?"
[/message]
[message]
speaker=Kai Krellis
@ -141,7 +141,7 @@
[/message]
[message]
speaker=Vlagnor
message= _ "She kill drakes. If you are her friend, we will kill you. We do not want MORE mermen blasting and stabbing."
message= _ "She kill drakes. If you are her friend, we will kill you. We do not want MORE merfolk blasting and stabbing."
[/message]
[message]
speaker=Kai Krellis

View file

@ -20,7 +20,7 @@
{DW_TRACK {JOURNEY_08_NEW} }
{DEFAULT_SCHEDULE_DAWN}
turns=-1
turns=unlimited
victory_when_enemies_defeated=no
# wmllint: validate-off

View file

@ -92,8 +92,7 @@
[side]
side=4
no_leader=yes
id=Caladon
name= _ "Caladon"
side_name= _ "Caladon"
team_name=Caladon
user_team_name= _ "Caladon"
income=-2
@ -503,10 +502,10 @@
# <empty>: Caladon is not a leader. He is still a unit on side 1
#
# "passive": His side still has "controller=null" set. (He is
# giving the mermen time to leave before attacking them.)
# giving the merfolk time to leave before attacking them.)
#
# "impatient": Caladons side now has "controller=ai" set. (He's
# tired of waiting for the mermen to leave.) This is actually
# tired of waiting for the merfolk to leave.) This is actually
# *set* on the players turn, because Caladons side doesn't *get*
# a turn until it is set. On his first turn after "impatient" is
# set, he will say something and summon fire guardians.
@ -567,7 +566,7 @@
[message]
speaker=narrator
message= _ "The mermen clapped their hands over their ears as a terrible wail echoed off the castle walls."
message= _ "The merfolk clapped their hands over their ears as a terrible wail echoed off the castle walls."
image=wesnoth-icon.png
[/message]
@ -864,8 +863,6 @@
[/sound]
[kill]
[filter]
[/filter]
[/kill]
{VARIABLE color 250}
@ -919,6 +916,18 @@
# the top of the screen).
[/delay]
# Prevent any possibility of Villagers blocking pickup of the sword
# Could happen if one is standing on the sword when the last enemy unit is killed
[modify_side]
side=3
[ai]
[avoid]
x=$sword_x
y=$sword_y
[/avoid]
[/ai]
[/modify_side]
[message]
speaker=Kai Krellis
message= _ "Now we can finally grab that sword."

View file

@ -18,7 +18,7 @@
{DW_TRACK {JOURNEY_11_NEW} }
{DEFAULT_SCHEDULE_DAWN}
turns=-1
turns=unlimited
victory_when_enemies_defeated=no
# wmllint: validate-off

View file

@ -14,14 +14,14 @@
[/part]
[part]
{DW_BIGMAP}
story= _ "The tribe that had fled Jotha unable to fight returned as an army stiffened by veteran fighters and led by a warrior king. Though they were tired from their journey, weariness fell from them as they neared home. The mermen arrived during the night, and found the mouth of their bay guarded, so they headed south along the coast to some outlying villages to gather news of the invaders."
story= _ "The tribe that had fled Jotha unable to fight returned as an army stiffened by veteran fighters and led by a warrior king. Though they were tired from their journey, weariness fell from them as they neared home. The merfolk arrived during the night, and found the mouth of their bay guarded, so they headed south along the coast to some outlying villages to gather news of the invaders."
[/part]
[/story]
{DW_TRACK {JOURNEY_12_NEW} }
{DEFAULT_SCHEDULE_SECOND_WATCH}
turns=-1
turns=unlimited
[side]
{SIDE_1}
@ -149,7 +149,7 @@
{RING_OF_STRENGTH_EVENTS}
#The mermen have no villages left when they return (but a few are
#The merfolk have no villages left when they return (but a few are
#still unclaimed):
{STARTING_VILLAGES 2 15}
{STARTING_VILLAGES_AREA 2 28 24 4}
@ -488,7 +488,7 @@
name=turn 2
[message]
speaker=narrator
message= _ "At dawn, the mermen got a good look at their opponents."
message= _ "At dawn, the merfolk got a good look at their opponents."
image=wesnoth-icon.png
[/message]

View file

@ -9,7 +9,7 @@
next_scenario=null
{DEFAULT_SCHEDULE}
turns=-1
turns=unlimited
[side]
{SIDE_1}
@ -30,7 +30,7 @@
name=start
[message]
speaker=narrator
message= _ "After destroying Mal-Ravanals henchmen, Kai Krellis awaited another attack. But it never came. Krellis sent some messengers south to discover what they could. The news that came back was better than good. Mal-Ravanal was dead! Soldiers of Wesnoth had defeated him at about the same time the mermen had defeated the undead at Jotha. With the evil wizard gone, the mermen relaxed and began rebuilding in earnest, and soon Jotha was restored."
message= _ "After destroying Mal-Ravanals henchmen, Kai Krellis awaited another attack. But it never came. Krellis sent some messengers south to discover what they could. The news that came back was better than good. Mal-Ravanal was dead! Soldiers of Wesnoth had defeated him at about the same time the merfolk had defeated the undead at Jotha. With the evil wizard gone, the merfolk relaxed and began rebuilding in earnest, and soon Jotha was restored."
image=wesnoth-icon.png
[/message]

Some files were not shown because too many files have changed in this diff Show more