Compare commits

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

426 commits

Author SHA1 Message Date
Charles Dang
2bbcd5f814 Clean up and expand ranges compat layer 2024-12-26 22:11:34 -05:00
Charles Dang
6d97ac494e GUI2/Dispatcher: remove connect_signal_on_draw
We no longer use the GUI2 draw events. We should implement the appropriate interface provided by top_level_drawable instead. DRAW is still a valid event for now, but would probably be removed in the future.
2024-12-26 16:27:11 -05:00
gfgtdf
5b63155a23
Update changelog.md 2024-12-26 20:25:48 +01:00
gfgtdf
392b8dc9fb
Use [leader] in the c++ code (#9660)
Added code to convert all  `[side]type=` to `[side][leader]` when the `[scenario]` is read, and the rest of the engine code to only work with [leader], this should fix all possible problems with `[leader]` and also simplify the code a bit

Fixes #7985
Fixes #3742
2024-12-26 20:22:09 +01:00
Subhraman Sarkar
ec0e0992b6 help topic generator: fix typo
also make the help browser a bit wider, otherwise images overlap with text
2024-12-26 12:21:09 +05:30
Wedge009
f360e781c7 Replace non-standard spacing.
[ci skip]
2024-12-26 17:02:14 +11:00
gfgtdf
78e6bdaa29 remove variable that was always false 2024-12-26 03:31:47 +01:00
gfgtdf
4593921b67 fix error in invalid [side]ai_config= 2024-12-26 03:31:47 +01:00
doofus-01
fafa0e7b13
1.19 - Coastal Raider (new ship) (#9616)
* add new ship 'coastal raider', sprite and standing/moving animations mostly by Vilaliy Bakal

* fix raider portrait

* add WEAPON_SPECIAL_NAVAL_RAM

* Iron Raider variant

* better halo glow for fireship

* change race=transport to race=ship
2024-12-25 17:53:26 -08:00
Thewodoros
96a2ff69c9
EI S05: Reduce code duplication when Owaec's side joins (#9678)
Move the code for Owaec's side joining you into a custom event. This code doesn't contain any dialogue, which stays in the enemy leaders' die events.
2024-12-25 12:25:27 -06:00
Thewodoros
507e84e8cb
EI S04c: Fix warning message by Dacyn (#9677)
Avoid the case when Dacyn says the warning after Ravanal already noticed him.
2024-12-25 08:56:49 -06:00
Dalas121
e586f2bcf5
Dwarvish Explorer: reduce resistances from 20% to 10% (#9666)
* Dwarvish Explorer: physical resists reduced from 20% to 10%, melee damage increased from 10 to 11.
2024-12-24 11:35:02 -06:00
Pentarctagon
d9ef464b1e
add validation for icons that are too large (#9667) 2024-12-23 23:12:52 -06:00
Charles Dang
0badadaffe GUI2/Text Box Base: remove manual callback handling
Instead, register a NOTIFY_MODIFIED handler. Note I need to fix said event not firing when cutting text from the box.
2024-12-23 14:30:25 -05:00
Discontinuum
4475260e68
Nerf of Orcish Crossbowman (#9509)
* Orcish Crossbowman: melee 6-3 -> 4-3, experience to level 43 -> 57
2024-12-23 12:30:24 -06:00
Thewodoros
868cb845f0
EI S04c: Improve unit filters in scenario end dialogue (#9671)
Use the survivor trait instead of the type in case the unit has advanced a level.
Also remove unit type filter for side 8 because it's redundant.
2024-12-23 11:53:57 -06:00
Gothyoba
a74b39da25
Buff Dune Warmaster (#9534)
* Dune Warmaster: HP 59 -> 61, scimitar damage 9 -> 10
2024-12-23 08:38:10 -06:00
Charles Dang
f73e2b641b Game Board: remove non-const overload of get_visible_unit
This was unique to this class, since the base class only implemented the const version. It was only needed for the whiteboard, and on closer inspection none of of the mutable references therein actually needed to be mutable. Marked them all const and removed the offending getter from game_board.

Note that the non-const overload had the same functionality as the const overload in the base class, only implemented via `find_visible_unit`.
2024-12-22 09:45:10 -05:00
Charles Dang
001c90c1fc GUI2/Listbox: add header/footer size only if visible
Little hacky, since this supports the case of manually hiding the grids instead of simply not populating them (see #9499), but it prevents needing to change widget::get_best_size while I figure out a more comprehensive solution.
2024-12-22 08:18:36 -05:00
Nils Kneuper
11eaca1277 updated Hungarian translation 2024-12-22 00:34:36 +01:00
Nils Kneuper
c9da910fb8 updated Bengali translation 2024-12-22 00:33:14 +01:00
Subhraman Sarkar
920e155ef6 game_version_dialog: use boost::filesystem::path for path calculations 2024-12-21 17:42:07 +05:30
Nils Kneuper
36fa52fc1a updated British English translation 2024-12-21 09:37:08 +01:00
ZombieKnight
9b0430e1f7 Update message.lua 2024-12-20 20:57:48 -05:00
Thewodoros
19be417a05
EI: forbid dunefolk from taking the Plague Staff and add custom rejection messages (#9654)
Fixes #9627
2024-12-20 07:56:53 -06:00
Wedge009
6d10d919d5 Correct manual directory broken in #9664. 2024-12-20 18:26:51 +11:00
Wedge009
e8a3e3fcef View Manual: Avoid crash from indexing an empty vector. Resolves #9661.
Empty vector occurs when using System Language.
2024-12-20 08:34:21 +05:30
pentarctagon
8210f33a7b add preference to not get addon icons
also skip if DataURI is too large
2024-12-19 11:54:14 -06:00
pentarctagon
352157d593 remove inaccurate changelog entry 2024-12-19 09:31:35 -06:00
Gothyoba
10364b169b
Increase Fire Resistances of the Fire Guardian Line (#9438)
* Fire Wisps and Guardian - Fire Resistance changed from 50% to 70%
  * Fire Wraith - Fire Resistance changed from 50% to 80%
2024-12-19 09:24:41 -06:00
Charles Dang
a6954bd56e Prefs: reduce excessive indent (no content changes) 2024-12-19 00:35:18 -05:00
Charles Dang
6a18a37afe Prefs: advance preference access should not be mutable 2024-12-19 00:18:32 -05:00
Severin Glöckner
d191109bb4 German translation edits 2024-12-19 03:49:23 +01:00
Wuzzy
0c1357b594 German translation update
merges #9625
2024-12-19 02:19:20 +01:00
pentarctagon
f7dc6ebaeb 1.19.7+dev 2024-12-18 16:58:02 -06:00
pentarctagon
4a689a687d 1.19.7 2024-12-18 16:57:02 -06:00
pentarctagon
144fa9c71a pot-update and regenerate doc files 2024-12-18 16:55:39 -06:00
pentarctagon
f5ab5620e2 changelog_entries 2024-12-18 16:49:30 -06:00
gfgtdf
5e5fc1db5d remove [side] leader=
previously the leader= attribute in [side] could be used to
make the engine choose a faction by its leader, similar to how
[side]faction_from_recruit worked.

However this was not documented in the wiki, and the name clash
with the [side][leader] subtag could also cause problems
and is also a litte confusing.

So it was decided to remove it. an alternative approach to fix the
name clash would be to rename it, but i can't think of
real usecases of this feature currently.
2024-12-18 18:48:41 +01:00
Charles Dang
2be41a4f85 GUI2/Listbox: remove any_rows_shown
Instead, return the number of rows shown from filter_rows_by. We might re-add any_rows_shown in the future, but for now this covers the intended usecase.
2024-12-18 02:45:26 -05:00
Charles Dang
edb4331d56 GUI2: use more nested namespaces 2024-12-18 02:44:28 -05:00
Charles Dang
e037694945
GUI2: simplify various dialog's filter handling (#9650)
Closes #7868. This implements a farther-reaching cleanup without the regex, though I might revisit the regex method again later.
2024-12-18 02:01:05 -05:00
gfgtdf
f113b2b7a7 Fix #9651 Error in u:extract()
This logic seems inverted, this probably happened while the lua attributes were converted to use the LATTR_SETTER macros.
2024-12-16 19:10:53 -05:00
gfgtdf
e64283534f wesnothd: update current turn in init_side instead of end_turn
This matches the behavior on the client where the events that
happen after end_turn (the "turn end" wml events) happen during
the last sides turn not the next sides turn. In particular this
fixes #2563. It also fixes #3899 because the new logic
automaticially skips empty sides already in init_side and not on
end_turn.

It also changes how description is updated, since carrying that
return value arround specifying whether it was updated was becoming
annoying.

With a few code improvements from soliton.
2024-12-16 00:20:40 +01:00
gfgtdf
f2bcc997b8 add simple_wml child_or_add() 2024-12-16 00:20:40 +01:00
Bernhard Rosenkränzer
782ab2df3e Fix build with boost >= 1.87.0
Boost 1.87.0 removes some functions that have been deprecated for a few
releases, but are still used in wesnoth.
2024-12-15 16:29:11 +11:00
gfgtdf
79798b9f2b remove unused cpp file 2024-12-15 05:24:12 +01:00
gfgtdf
c1c0111d3c WC: New carryover implementation.
We now use a modified default carryover calculation,
the main advantage is it now uses the normal carryover
message on endlevel, and shows how it is calculated.
2024-12-15 05:17:57 +01:00
gfgtdf
06d1fade32 split gold_carryover into smaller functions
this way the functions can easily be reused for alternative
carryover implementations.
2024-12-15 05:17:57 +01:00
gfgtdf
f29f8fb368 move the carryover gold handling and dialog to lua
The idea is to make it easier for umc devs to implement
their own carryover / early finish bonus mechanics. Maybe
we can also make use of it in Worls Conquest.
2024-12-15 05:17:57 +01:00
pentarctagon
893b31e769 return pbl author attribute to its original usage
and use the new primary_authors attribute instead

Fixes #9547
2024-12-14 18:49:32 -06:00
gfgtdf
e8af57e3ab remove some unneeded catch { ... }
these catch were once added to put a send_data() there
now they are no longer needed.

Also calling saved_game_.clear(); is not needed there either.
2024-12-15 00:51:29 +01:00
gfgtdf
f3c48ab8ce luaapi: fix wesnoth.current.user_is_replaying 2024-12-14 23:30:16 +01:00
gfgtdf
a7d3db9cf7 Fix source_lists order 2024-12-14 23:07:10 +01:00
gfgtdf
bf4ad3bb42 WC: fix campaign abbrev
previously it was unclear what the trailing number meant,
also the order couldn't be changed in the translation.

Also the player number was shown 2 times in the savefile name,
resulting in names like 'WC1-WCII 1 -Start-Auto-Save.gz' so i
removed it from the scenario name.
2024-12-14 22:53:12 +01:00
gfgtdf
c762c01924
Add -r option to add_source_file fix #8733 (#9033) 2024-12-14 22:39:12 +01:00
gfgtdf
4fb36d5e08 luaapi: add wesnoth.current.user_is_replaying
This returns true when the user is currently replaying the scenario
This not only includes the classic 'replay safefiles' but for
example also the 'replay turn' feature (field name suggested by celmin)
2024-12-14 02:29:29 +01:00
gfgtdf
68f6c984e7 luaapi: add team.carryover_gold
Not really usuable yet since the game engine overwrites it at game end,
Part of the 'move the carryover gold handling to lua' patch
2024-12-14 02:22:11 +01:00
Nils Kneuper
70361db1bd updated Italian translation 2024-12-14 00:36:45 +01:00
Nils Kneuper
91efe14fba update Czech translation 2024-12-14 00:35:25 +01:00
Nils Kneuper
8b77417425 updated Hungarian translation 2024-12-13 13:12:16 +01:00
Charles Dang
425eca473f Win Toasts: remove fallback macro defines 2024-12-12 20:35:51 -05:00
Charles Dang
2066456654 Target Windows 10 2024-12-12 20:35:51 -05:00
Subhraman Sarkar
2debd74605 unit preview pane: use overloaded functions to set data 2024-12-12 09:47:47 -05:00
gfgtdf
2dcfe2435c deploy use of std::string_view 2024-12-12 03:12:38 +01:00
gfgtdf
e28217b213 Add utils::stod/stoi
There are drop in replacements for std::stod/stoi, the differences are:
- They are locale independent
- The take string_view arguments.
2024-12-12 03:12:29 +01:00
gfgtdf
1bd64bd8aa fix utils::unescape 2024-12-12 03:12:26 +01:00
gfgtdf
e549b03412
DM: S20: Fix waittime at scenario start
Don't animate unit advancements during a prestart event.

It woudl be better it u:advance() would automaticialyl not waste time animating advancements that can't be seen (during prestart events) but for this scenario this is already an improvement
2024-12-11 19:48:57 +01:00
Pentarctagon
02304cd86f Avoid keeping player_iterator that might get invalidated before use 2024-12-10 09:29:21 -06:00
Charles Dang
66e94c9a6b GUI2/Widget: add convenience visibility setters 2024-12-10 09:28:21 -05:00
Charles Dang
c8df594a74 GUI2: remove screen_pitch_microns variable 2024-12-10 08:33:22 -05:00
Charles Dang
a4a8506dfa GUI2/Stacked Widget: remove handling of [stack]
Been deprecated for years
2024-12-10 06:58:55 -05:00
Charles Dang
028e16d39b GUI2: move multi_page and stacked_widget init to their constructors
Makes it consistent with the listbox handling in 10b640c0f2
2024-12-10 06:54:56 -05:00
pentarctagon
ebf9a2949a Revert "GUI2/Listbox: make sorter widgets mandatory"
This reverts commit dd1eb9e964.
2024-12-09 15:28:52 -06:00
gfgtdf
06781df8f2
Update INSTALL.md for Charconv
Increases GCC requirement to 11 for Charconv support (which is part of c++17)

Technicially it also builds with older gcc versions when boost 1.85 is available but that combination seems unlikely and i didn't want to make INSTALL.md too complicated.

The upcoming clang 20 will also support charconv by itself, but again it felt silly to mention something that is not available yet.
2024-12-09 18:02:03 +01:00
Thewodoros
f7fd05b63e
EI S04c: fix gold management for Ravanal (#9637)
Give side 7 gold to recruit units only after ravanal_gets_serious event, and only if they are low on units, so not to clutter the map.
2024-12-09 07:15:58 -06:00
Charles Dang
255b1ad055 GUI2: init more members directly from builders when possible 2024-12-09 02:59:32 -05:00
Charles Dang
e208a4e776 GUI2/Grid: minor private impl cleanup 2024-12-09 02:19:44 -05:00
Charles Dang
3a74825e8d Initial work to handle chat timestamps as time_points 2024-12-09 02:18:52 -05:00
Charles Dang
6d4058d670 GUI2/Unit Recall: properly handle saving last sort order
Small regression from 530cd2b02b
2024-12-09 02:00:49 -05:00
Charles Dang
dd1eb9e964 GUI2/Listbox: make sorter widgets mandatory
Better to have a widget-not-found error than silently doing nothing here.
2024-12-09 01:59:52 -05:00
Charles Dang
f7a271dab9 GUI2/Listbox: adjustments for 7d92a8cb4a 2024-12-09 01:55:13 -05:00
Charles Dang
7d92a8cb4a GUI2: take find_widget and find ID args as string_view 2024-12-09 01:20:09 -05:00
Charles Dang
530cd2b02b GUI2/Listbox: improve sort option handling
* Re-added the ability to set a single sorter, this time by ID.
* Multi-sorter setting now uses the magic sort_N IDs.
* Cleaned up internal handling to remove reliance on header grid columns.
  Sorters will still be looked for in the header, but rely on the specified ID.
  This did (I'm pretty sure) work before, but now it's explicit.
* The order_pair typedef has been removed
* set_active_sorting_option has been removed set_active_sorter and now takes its arguments separately instead of as a pair.
* set_active_sorter will use the bound sorter header on-modified handler
  instead of calling order_by_column directly
* set_sorting_options has been renamed to set_sorters
* get_active_sorting_option has been renamed get_sorter
2024-12-08 23:04:43 -05:00
Charles Dang
10b640c0f2 GUI2/Listbox: refactor initialization process
Used work by @babaissarkar in #9630 as a base. We're finally using [instance] for something!
2024-12-08 23:04:43 -05:00
Charles Dang
bed8047ee4 GUI2/Tree View: get indentation step size from builder 2024-12-08 23:04:43 -05:00
Charles Dang
2d9cc9c89d GUI2: add a scrollbar_container builder
This unifies handling of the scrollbar modes without having to manually set them in the builders. At one point, this wasn't too common, but it's become common enough that having a separate builder is cleaner
2024-12-08 23:04:43 -05:00
gfgtdf
5801b5bcdb
use to/from_chars in attribute_value and lexical_cast (#8790)
This makes attribute_value and lexical_cast use the "new" to/from_chars api.

Its main advantages are:
- It's guaranteed to be locale independent, hopefully fixing all cases of #3945 and similar
- It fixes some cases config serialization, in particular the test
```
	cfg["x"] = "9.87654321";
	BOOST_CHECK_EQUAL(cfg["x"], 9.87654321);
```
- Previously the lexical_cast implementation used exception
  handling for invalid formats (catching std::invalid_argument)
  which made noise during debugging (and is also slower if it
  is not optimized out).
- It's faster

So far afaik the only compiler which has a complete and proper to/from_chars implementation is msvc, gccs implementation of from_chars sometimes uses strtod under the hood and clang simply hasn't implemented from_chars for floating point numbers yet at all (actually the upcomig clang 20 will have it). Luckily for us, there is now also boost::charconv that can be used. So this raises to minimum build requirement to have at least one of:

- msvc 2019 update 5
- gcc 11
- clang 14 (i have added a fallback implementation of from_chars for this case, that doesn't support all of its features, and is probably certainly not as fast as the boost version, but supports the features that we use from it)
- boost 1.85
 
Since in particular the gcc implementation isn't that good (at least it on gcc11), boost charconv is the preferred implementation that is used if available.

This also removes a strange overload for
pointers to integers in lexical_cast while changing lexical_cast to use the new api.
2024-12-08 22:28:10 +01:00
pentarctagon
2139d5b7b6 add curl to CI image 2024-12-07 18:44:55 -06:00
Martin Hrubý (hrubymar10)
b21b828f8d
Use new MCS for Xcode project 2024-12-07 17:58:52 +01:00
Nils Kneuper
759822a47f updated Hungarian translation 2024-12-07 17:57:59 +01:00
Nils Kneuper
2e02f310d2 updated Chinese (Simplified) translation 2024-12-07 17:56:49 +01:00
Yoruma
dcbe883699
Fix exception when opening MP a second time at low resolution (#9622) 2024-12-06 14:41:14 -06:00
Tóth Kornél
ad563d99e9
Map editor segmentation fault fix (#9564)
Fixed map editor crashing when creating or opening scenario after played local scenario before opening map editor. Resolves #9563. The cause of the bug was that the ai manager singleton pointer was not set to nullptr after it was destructed. Fixed this by making ai manager destructor set singleton to nullptr. Before this the ai_map_ map member has to be cleared in destructor because it might try to access the singleton when destructed.

---------

Co-authored-by: SomeName42 <>
2024-12-06 14:39:47 -06:00
Gothyoba
9a8520a192 Add a changelog entry for Dawarf Changes 2024-12-06 14:35:07 -06:00
Gothyoba
91d6bb4b45 Demote Dawarf to level 0 2024-12-06 14:35:07 -06:00
JJ Marr
2e520d03a5 Remove incorrect moves
These were added by clang-tidy's autofix, which both tried to convert
the parameters to const references and std::move them. The correct
behaviour is to convert only to a const reference.
2024-12-06 02:15:13 -05:00
Charles Dang
e0bda68b80 Revert "listbox: simplify builder"
This reverts commit c38b856a82.
2024-12-06 00:43:39 -05:00
Subhraman Sarkar
c38b856a82 listbox: simplify builder 2024-12-06 11:09:47 +05:30
Subhraman Sarkar
20242ffc84 styled widget: use std::move 2024-12-06 10:31:50 +05:30
Charles Dang
5175beb1e7
GUI2/Listbox: allow setting all sorters at once (#9629) 2024-12-05 22:45:52 -05:00
Charles Dang
c4f7523e00 GUI2/Listbox: unify registration of sorting options
Instead of two functions for translatable and non-translatable options, comparison will be determined by the return value of the sorter. Existing translatable sorting options have been adjusted to return t_string rather than string.
2024-12-04 21:46:39 -05:00
Gunter Labes
01908e9274
Reject image URI with unsupported type 2024-12-04 11:15:48 +01:00
Yoruma
5a10721637
Add a red line to the bottom of lobby chat to help distinguish old messages 2024-12-03 16:10:25 +01:00
Gunter Labes
ee84633273 Make clang-tidy calls less noisy 2024-12-03 20:35:25 +05:30
Subhraman Sarkar
482c2817f9 fix clang-tidy warnings 2024-12-03 20:35:25 +05:30
Dalas121
42ed77905b
Elvish Champion stats tweak (#9621)
Elvish Champion: HP 72 -> 70, cost 61 -> 60, accuracy bonus is now explained via a weapon special. Resolves #8706
2024-12-02 15:04:15 -06:00
Thewodoros
d3dfe36571
EI: Fix last breath events for Hahid and Grug (#9619)
When Hahid dies, Grug or Dolburras, if present, say the "eulogy". There were problems in scenarios where they first appear (S06a for Dolburras and S07b for Grug) - they say it even before joining the player's side, which makes no sense. I changed the message tags in utils/deaths.cfg to use "id" and "side" instead of "speaker", so they only say it when they are on the same side as Hahid.
Also in S07b, Hahid's herodeath macro was duplicated, so the dialogue was displayed twice.
Also I changed Grug's herodeath to "id" and "side" and re-included it into S07b, so now Gweddry says the eulogy for Grug after Grug joins, but not before.
2024-12-02 10:21:56 -06:00
JJ Marr
92e91e4c0e Match modal_dialog::register_integer to header
For whatever reason, callback_save_value had type
std::function<void(int)> in the .cpp file but
std::function<void(const int)> in the header file. This reconciles them
to both take in an integer as a parameter.
2024-12-01 23:19:53 -05:00
JJ Marr
ecd273914c NOLINT exception to const reference rules
Specifically, this function is intended to cause a runtime error when a
pointer to an incorrect type is passed in.
2024-12-01 23:19:53 -05:00
JJ Marr
7cbe381faa Enable performance-unnecessary-value-param 2024-12-01 23:19:53 -05:00
JJ Marr
6999b294d5 Use std::move wherever possible 2024-12-01 23:19:53 -05:00
JJ Marr
fe5296aefd Make every possible param a const reference
This is important for performance. If a parameter doesn't have to be
modified, it should be a constant reference to the original.
2024-12-01 23:19:53 -05:00
Charles Dang
0ed106c4e2 wesnothd: format logged-in time directly
This was the last use of lg::format_timespan, which was only ever used in server code anyway. The server probably shouldn't be formatting this anyway, but as long as it is, we don't need a dedicated function or fancy formatting.
2024-12-01 21:42:04 -05:00
JJ Marr
70c89f819d Enable warnings as errors for scons
Will this catch the outstanding issues?
2024-12-01 20:55:11 -05:00
Charles Dang
a25d28e637 Game Events: removed an unnecessary getter
Bad design to return mutable reference to static object. This method has the possibility of creating a new default entry in the by_name map, but the remove call will be a no-op in that case (as it was before), so no harm done.
2024-12-01 17:23:27 -05:00
Charles Dang
20e61d67ff server_base: remove orphaned function declarations
Left over from  e7a4869c4a
2024-12-01 13:21:57 -05:00
Nils Kneuper
8f7813c7a0 updated Hungarian translation 2024-12-01 18:59:47 +01:00
gfgtdf
ba5c1c1ac1 Fix #7478 game crash after reloading a mp game in debug mode (#8907)
previously the game would return to titlescreen here if mp_info_
but was null but
`game_config::debug && state_.classification().is_multiplayer()`
returned true which happend when a multiplayer game was reloaded
via the sp loadgame dialog.

This fixes the issue by simply removing the "always show mp staging
between scenarios in debug mode" feature, which imo never was that
useful anyways.
2024-11-30 22:49:32 +01:00
gfgtdf
c08152a0e7 Don't store duplicate current side num in savefiles
This not only removes duplicate information which can always cause bugs if it's out of sync,
this can also be used an an easy way to detect the old undo stack format
2024-11-30 22:45:32 +01:00
gfgtdf
8a91549fe8 fix possible crash in undo events 2024-11-30 22:45:32 +01:00
gfgtdf
73c14e0d2b fix possible crash in capture events
its not safe to keep a reference to the owner_side variable
since the event might remove it, which could lead to a crash
when atempting to set it
2024-11-30 22:45:32 +01:00
gfgtdf
a5dae832c8 small cleanup
thereis no need for if(s_c::undo_blocked()) { s_c::block_undo(); } since it automaticially happens at the end of every action already
2024-11-30 22:45:32 +01:00
gfgtdf
7c41d550a9 split undoing of moves into small steps
this way even when enter/exit_hex events with [on_undo] are involved, undoing happens
in reverse order of the gamestate changes during the original action
2024-11-30 22:45:32 +01:00
gfgtdf
4dc69c5267 split villagecapture into seperate undo action
this wayits possibel to undo the action exactly in the reverse order
as they are a happening on the original code, even with wml events involved
2024-11-30 22:45:32 +01:00
gfgtdf
8350f48c88 Refactor undo stack
This commit splits undo actions into multiple smaller steps. The main advantages:
- Its allows us always undo the parts of an action in the reverse order of which
  they originally happen, preventing bugs that could be caused if the parts
  interact with each other in a way where the order matters (like for example
  an [on_undo] resetting a units moves, when the event happend in a move action
  which would then also reset the units moves on undoing).
- It's easier to add (c++) undo steps for specific steps even if they are used
  from wml, like spending gold.
- [do_command] no longer confused the undo stack (in fact it's by default now undoable).
- All actions are put onto the undo stack in the same way, previously it was
  often unclear whether the undo stack is empty during a specific step  during
  the execution of an action, in particular when people tried to use
  `undo_stack->empty()` to check whether an action could still be undone.
2024-11-30 22:45:32 +01:00
gfgtdf
d8086942df small cleanup 2024-11-30 22:45:32 +01:00
Gothyoba
c5c4c7af07
Balancing Update to Dwarvish Miner (#9506)
HP 22 > 25
XP 24 > 20
2024-11-30 15:09:34 -06:00
Nils Kneuper
b2bceba9a7 updated Bengali translation 2024-11-30 14:00:30 +01:00
JJ Marr
3b8ceb00f0 Replace NULL with nullptr in the codebase 2024-11-30 13:24:45 +01:00
JJ Marr
167677d9de Enable clang-tidy for scons 2024-11-30 13:24:45 +01:00
JJ Marr
d8d92b5d28 Add clang-tidy support to cmake
Also, enables it in CI.
2024-11-30 13:24:45 +01:00
JJ Marr
e9e40b5a37 Enable compilation database for Scons
This is necessary for interfacing with external tools such as clang-tidy
2024-11-30 13:24:45 +01:00
JJ Marr
1cf3fed50f Refactor module compilation into separate library
This allows us to disable clang-tidy for this folder.
2024-11-30 13:24:45 +01:00
Nils Kneuper
47ec1d49e7 updated Italian translation 2024-11-30 01:05:35 +01:00
Nils Kneuper
fc0e7f7a08 updated British English translation 2024-11-30 01:04:00 +01:00
Charles Dang
653333a8bf Restore space after log timestamps 2024-11-28 22:14:06 -05:00
Charles Dang
4ccfca6b1d Game Display: check for teams before refreshing reports (fixes #9609)
Regression from 7fa4fe483c
2024-11-28 22:13:43 -05:00
Charles Dang
2c216eec72
Refactor utils::format_timespan to use chrono types (#9610)
This also adjusts the periods for years and months. Previously, we were using values of 30 days for a month and 12 months for year. Now, we use the chrono values of a month as 1/12 of a year and a year as 365.2425 days.
2024-11-28 22:07:52 -05:00
Thewodoros
70a76b0e21
EI: add missing last breath (HERODEATH) events for Addogin (#9611)
In S04a, the event is added within his original "last breath" event - the one which switches him to the player's side. Without this additional event, he will die silently if killed by the elves after being "captured".

In S11, it looks like the event for him was simply forgotten (HERODEATH events are added for all other heroes).
2024-11-28 16:38:00 -06:00
Thewodoros
2db282c273 Clear forgotten variable
gold_extra is not used in further scenarios, just like gold_cost.
2024-11-29 04:02:36 +11:00
Thewodoros
22a1a9d5d4 Use variables for deducting gold in EI S04b
These two variables are used everywhere else in this scenario, hardcoding the amounts here must've been a mistake.
2024-11-29 04:02:36 +11:00
Subhraman Sarkar
2477618306 rich label: support specifying text color, font and style in resolution
This allows the rich_label definitions in rich_label_default to work.
2024-11-28 23:04:05 +05:30
Subhraman Sarkar
2e0f8c453e lua_widget_attributes: use existing functions in gui/widgets/helper.cpp 2024-11-28 11:57:21 +05:30
Charles Dang
98f0d3721c wesnothd: convert stray member to seconds 2024-11-27 18:58:28 -05:00
Wedge009
b8747c37b0 Remove non-standard spacing.
[ci skip]
2024-11-27 10:35:12 +11:00
pentarctagon
7183553e23 1.19.6+dev 2024-11-26 12:17:36 -06:00
pentarctagon
99469ba31d 1.19.6 2024-11-26 12:16:03 -06:00
pentarctagon
ed94f9b02b changelog entries 2024-11-26 12:11:40 -06:00
pentarctagon
75f41e84f0 pot-update and regenerate doc files 2024-11-26 12:10:35 -06:00
Charles Dang
0f8d9a9940
wesnothd: handle server IP bans more generically (#9602)
Instead of simply returning a string, `is_ip_banned` now returns a struct with an error code, ban reason, and ban time remaining. This avoids doing time duration formatting on the server and allows the error message to be localized on the client. It also makes the ban handling interface more generic in server_base, which should hopefully allow forum bans to be handled this way as well.
2024-11-26 09:13:57 -05:00
Nils Kneuper
7bc844d4be updated Hungarian translation 2024-11-24 17:24:57 +01:00
Subhraman Sarkar
c475b0c684 add a command line option to preprocess a string 2024-11-24 16:51:12 +01:00
Subhraman Sarkar
a50f047c7c add preprocess_string method and use preprocessed loyal trait 2024-11-24 16:51:12 +01:00
doofus-01
26fd5513b6
fix ship portrait references (#9603)
fix some image references in #9484
2024-11-23 22:38:07 -08:00
doofus-01
56468a9bdc
Update changelog.md 2024-11-23 16:35:06 -08:00
doofus-01
3dff5d2eac
Ship sprites and units update (#9484)
* new ships Derelict Hulk and Fireship

* new "race" Ships - includes Transport Galleon, Pirate Galleon, Derelict Hulk, and Fireship

* Pirate Galleon chaotic

* animations for all four touched ships

* ship portraits for Derelict Hulk and Fireship

* crew portraits by LordBob for Boat, Galleon, Transport Galleon, and Pirate Galleon

* old (non-pixel art) transport galleon and pirate galleon images moved to scenery
2024-11-23 16:28:37 -08:00
Charles Dang
5a90e40e19 Note --nodelay removal in changelog, remove from manpage 2024-11-23 12:54:32 -05:00
Nils Kneuper
d2638df581 updated Arabic translation 2024-11-23 15:46:13 +01:00
Nils Kneuper
4d37947ae1 updated Chinese (Simplified) translation 2024-11-23 15:44:22 +01:00
Charles Dang
335c4943d2 Build Info: improve refresh rate report
See discussion in #9594
2024-11-22 12:43:47 -05:00
Iris Morelle
ce6c56adea Switch default Pango/Cairo render backend to Fontconfig on macOS
Fixes #8488.

This is a simple setenv trick. Ideally we would instead figure out how
to fix Oldania ADF Std to work on newer macOS, but since we know the
Fontconfig backend works for us on Windows and Linux, we may as well
stick to it and hope there will never be a situation where CoreText
would prove superior somehow.
2024-11-22 23:00:03 +05:30
Charles Dang
bb4eb0bf1b Video: fix incorrect refresh rate value being returned (fixes #9594)
Regression from b859060627
2024-11-20 15:43:54 -05:00
Charles Dang
6fb5488464 Editor: better default addon and schedule names 2024-11-20 15:22:40 -05:00
Charles Dang
78f7703639 Macro be gone (fixup c2b2664eb2) 2024-11-20 15:21:17 -05:00
Charles Dang
6fa92f9553 wesnothd: indent fixes (no functional changes) 2024-11-20 15:19:39 -05:00
Thewodoros
55eef0dbef
Fix issues with hero deaths in EI S03 (#9595)
Avoid adding duplicate "last breath" events (HERODEATH macros), and don't call [endlevel] in "die" event ( as it's already called in "last_breath").
2024-11-20 11:08:36 -06:00
Iris Morelle
ad8f94195d
Make undeclared local function static
Fixes a warning on Xcode 16.1.
2024-11-20 11:09:20 -03:00
Subhraman Sarkar
7ca616f2ae CodeQL CI: add autorevision run step 2024-11-20 14:20:32 +05:30
Charles Dang
c7f818d449 wesnothd: use steady_clock where appropriate 2024-11-20 01:03:42 -05:00
Charles Dang
79120f1e31 wesnothd: use std::chrono instead of the C time API 2024-11-20 01:03:42 -05:00
white-haired-uncle
c2b2664eb2
GUI2 LuaAPI: expand widget attr support (#9497) 2024-11-19 22:41:47 -05:00
Tóth Kornél
484116ea09
Map Editor terrain button click fix (#9560)
Fixed palette button not being clickable after scrolling in palette widget without moving the cursor. Resolves #1335. The cause of the bug was that scrolling doesnt change the highlighted state of the palette buttons and not highlighted buttons didnt process being clicked. Solved the bug by making not highlighted buttons process being clicked.
2024-11-19 15:20:30 +01:00
Severin Glöckner
5d3a84084e Changelog Update
* add last changes
* merge changelog_entries

[ci skip]
2024-11-17 22:40:14 +01:00
Severin Glöckner
e2f656f833 German translation fix
[ci skip]
2024-11-17 21:55:21 +01:00
gfgtdf
b8c912d1e7 remove outdated comment 2024-11-17 21:30:22 +01:00
gfgtdf
d668aea7d0 fix doc comments 2024-11-17 21:30:22 +01:00
gfgtdf
a5f40c353d use block_undo() over undo_stack->clear()
this also sends the action to the other clients immidiately
2024-11-17 21:30:22 +01:00
gfgtdf
653bbb8263 small cleanup 2024-11-17 21:30:22 +01:00
gfgtdf
33bc132215 fix OOS caused by sending data to soon
previously block_undo would clear the undo stack and send data even when its parameter is false

this commit also fixes a possible crash when dsu changed the gamestate during formula evauluation

also removed a is_simultanious_ since it basicialyl did the same thing as undo_blocked_
2024-11-17 21:30:22 +01:00
gfgtdf
cc2914c1c6 remove show parameter from move_unit 2024-11-17 21:30:22 +01:00
gfgtdf
24ad4cb9d2 remove show parameter from recruit_unit 2024-11-17 21:30:22 +01:00
gfgtdf
3d589f8d0d use synced_context::run for move actions
With this, finally all actions run though synced context::run,
so that we not only have a central place that happens before/after
synced actions, we also guarantee that there is no difference between
the original and the replay codepath for all actions.

This should also make upcoming changed to the undo code easier.
2024-11-17 21:30:22 +01:00
gfgtdf
d0050dac8e remove undo_stack parameter from move_unit
it was only there for the ai code to skip undo which it no longer does
2024-11-17 21:30:22 +01:00
gfgtdf
a6cd4441c9 refactor synced_context::run
- Removed the now unused 'undo' parameter
- Removed the rareley used 'show' parameter, the actions now
  check whether they should skip in replays

Replaced the error handler with the more generic 'spectator' parameter,
the idea is to use it also for the move_spectator so that the move action
can also go through synced_context::run()
2024-11-17 21:30:22 +01:00
gfgtdf
7782c50f83 simplify synced_context::run() calls by ai and whiteboard
- use_undo is not used anymore
- ignore_error_function has no effect since to_check()
already checks whether the unit exists
- show in whiteboard code was the default value.
- show is now determined inside the actions handler, this
has the advantage that the skip_ai_moves preference now
also works for networked ai sides.
-the attack code now used run_in_synced_context_if_not_already
just like the other commands
2024-11-17 21:30:22 +01:00
gfgtdf
715a65438a Remove outdated comment
id is nowdays always a local variable of SYNCED_COMMAND_HANDLER_FUNCTION(recall
and never becomes invalid here
2024-11-17 21:30:22 +01:00
gfgtdf
7810b0308e remove use_undo parameter in synced_context
The comments said undo is disabled during ai turns to speed things up,
but since all the undo code does is adding a simple object once to a vector, its impact
on performance is really nonexistent.
2024-11-17 21:30:22 +01:00
white-haired-uncle
c2361e3a82
schema: Fix color type definition and uses 2024-11-17 18:07:22 +01:00
Gunter Labes
8c8bff7ffb
Fix expected/actual mixup in warning messages 2024-11-17 17:39:09 +01:00
Gunter Labes
1e12839804
Move unit changes to changelog and try to unify the formatting 2024-11-17 17:38:42 +01:00
pentarctagon
3c45ec93e0 use expected indent 2024-11-17 10:07:24 -06:00
Dalas121
f1e74af2d3
Update change_huntsman_ranger.md
Reflect the cost change made in 858b2d2
2024-11-17 08:28:48 -06:00
Dalas121
858b2d2bfc
Huntsman: reduce cost 50 > 47
At Hejnewar's request. I merged #9582 too early, before getting his feedback on cost.
2024-11-17 08:04:51 -06:00
Subhraman Sarkar
3afa75225f cmake: fix broken ENABLE_DISPLAY_REVISION option
LOAD_REVISION is used in game_version.cpp rather than game_config.cpp
2024-11-17 11:32:54 +05:30
Dalas121
c67d447901
Change Human Ranger and Huntsman (#9582)
* Huntsman:
  - HP 57 > 53, bow 9-4(marksman) > 10-4(marksman), cost 43g > 50g
  - new ability: Swamp Lurk (invisibility in swamps)
* Ranger:
  - HP 60 > 64, bow 7-4 > 8-4, cost 43g > 50g
  - Defense: castle 60% > 50%, frozen 20% > 30%, reef 30% > 50%, sand 30% > 40%
2024-11-16 15:55:38 -06:00
Nils Kneuper
11078f3e24 updated Arabic translation 2024-11-16 12:36:26 +01:00
Subhraman Sarkar
e64765da2a markup: doc update, return empty string instead of empty tag pair
Related to #9583.
2024-11-14 22:26:10 +05:30
Subhraman Sarkar
ea6f903c04 markup: don't escape internally and update docs
Internal escaping causing markup failure when tags are nested.
See #9569 and #9572 for example. Functions in markup will no longer
escape their contents, and those should be escaped by caller if needed.
2024-11-14 10:30:36 +05:30
Thewodoros
df3f2b2653
EI S01 story: Fix outposts locations accorting to campaign map #9578
The outposts are east of River Weldyn in the campaign map. Also, in scenario 1, the castle is east of the river. The heartland of Wesnoth country is west of that river, so the eastern bank is the "far" one.
These words date back to the original campaign design by Eric S. Raymond. Back then, the campaign map had the outposts on the western bank of Weldyn.
But in aeb9ec7 the map was replaced with a newer one, with outpost on the eastern bank, which persists to this day with some minor changes (like the southern outpost was moved futher south).
2024-11-12 19:49:29 -06:00
Thewodoros
a6fd520956
EI S02: Avoid creating unit with same id twice (#9577)
In the existing code, on HARD difficulty, creating a unit with id="Hur" is done twice, first as a Troll Whelp, then as a Troll Rocklobber. As a result, the former unit is replaced with the latter one. As they are created at the same coordinates, I believe this is the intended behavior.

But according to https://wiki.wesnoth.org/SingleUnitWML , reusing the id "may produce unpredictable results in many cases". For example, (I tested it) if you create the new unit at the different coordinates, it instead appears at the former unit's coordinates.

I've added another preprocessor directive, so the unit with this id is created only once on both NORMAL and HARD.
2024-11-12 18:53:14 -06:00
pentarctagon
d2fc3f3f17 add acquaintance as well 2024-11-12 17:38:07 -06:00
pentarctagon
3c17bc83c2 Add missed preference
Fixes #9567
2024-11-12 17:38:07 -06:00
Charles Dang
c5cb0f104f Remove --no-delay option
This wasn't consistently honored and only affected unit animations.
2024-11-12 00:19:44 -05:00
Charles Dang
34c1c0f61c Remove 200ms delay in gameloop processing when window is not visible
If we need this, it should, as the comment says, be implemented as part of the draw manager. But it also seems like any optimizations on this front are better left to the OS and its compositor.
2024-11-12 00:19:44 -05:00
Charles Dang
8b14612fbe Convert remaining uses of SDL_Delay to std::this_thread::sleep_for
There's one last usecase in controller_base which I intend to remove.
2024-11-12 00:19:44 -05:00
Charles Dang
812c1e2e5e Unit/Animation Component: format ctor 2024-11-11 21:46:14 -05:00
Charles Dang
b9bcdd3b63 Convert animation code to use chrono types 2024-11-11 21:46:14 -05:00
gfgtdf
690ff375b7
fix #9561 OOS when undoing in multiplayer (#9566)
previously in `undoable_action->undo(side_) ` the undo stack was not in sync with the relpay stack because the code called `undos_.pop_back();` before that and `resources::recorder->undo_cut` after that, this could confuse the code which sends replay commands to the other clients.
2024-11-12 02:03:45 +01:00
Gunter Labes
ce54c007bd
Raise batch timeout value because of recent increase in timeouts on macos 2024-11-11 18:19:08 +01:00
newfrenchy83
9330997d10 fix malformed markup in unit_list and unit_recall
error cause to show text of color code instead of use for color level number(same fix what for 37b7a83ce0 (diff-010538c81e10d3e4eeadfb49808ab52a6fe1becc787cb247c6a854b8f4c1900aL104))
2024-11-11 21:03:10 +05:30
Subhraman Sarkar
b2af5d8488 campaign selection: also open add-ons manager when double clicked
previously, double-clicking on the More Campaigns entry opened the tutorial, instead of the Add-ons manager as expected.
2024-11-11 19:43:00 +05:30
Tahsin Jahin Khalid
05e8ac2c96
[SotBE] Enable Saurian Spearthrower for Saurians (#9571)
* SotBE: Enable Spearthrower for Saurians

* sotbe: add changelog entry

---------

Co-authored-by: Tahsin Jahin Khalid <5283677+knyghtmare@users.noreply.github.com>
2024-11-11 19:58:49 +06:00
newfrenchy83
8e57567e24 add recursion_guard in [filter_(second_)weapon] for [leadership] and [resistance] abilities.
In moving recursion_guard from matches_filter() to special_unit_matches() i has forgotten what [leadership] abilities called directly matches_filter().
2024-11-11 14:32:05 +01:00
Subhraman Sarkar
37b7a83ce0 fix malformed markup and remove another hardcoded one (#9568) 2024-11-11 08:24:51 +05:30
Nils Kneuper
ddbdf01588 updated Chinese (Simplified) translation 2024-11-09 18:34:36 +01:00
Nils Kneuper
ed37c7f807 updated Turkish translation 2024-11-09 18:33:30 +01:00
Nils Kneuper
a76f96e4ee updated Czech translation 2024-11-09 18:32:24 +01:00
Nils Kneuper
a8ecf3233b updated Bengali translation 2024-11-09 18:31:13 +01:00
Dalas121
63c161c81c
Changelog: create forestlion-rebalance.md
Changelog file for #9420
2024-11-09 07:55:49 -06:00
ForestDragon
a3f141c196
[Units] Adjust Forest Lion Stats (#9420)
hitpoints from 42 to 48
movement from 9 to 7
claws from 5x4 to 6x4, now usable on offense
bite from 15x2 to 9x2 charge, now usable in defense
arcane resistance from 20% to 10%
price from 21 to 30
2024-11-09 07:54:37 -06:00
Subhraman Sarkar
14302f6bff update changelog entries 2024-11-08 21:16:59 +05:30
Gunter Labes
b905c1aa4a
Allow accessing the old value in [set_var] formula= 2024-11-08 09:35:43 +01:00
Jonathan-Kelly
45662a2f83
Revert "SoF S7: fewer and slower enemy outriders" (#9521)
This reverts commit b3802f44ea.

Since commit 70df290 restores the Elvish Outrider to essentially its original stats, the 1.18 balance fix for this one campaign scenario is no longer useful.
2024-11-07 18:40:26 -06:00
Dalas121
9d9d2cd027
Sicarius - replace Deflect with Guard (#9532) 2024-11-07 18:26:21 -06:00
MechanicalDragon963
32b5570103
Improve Naga Guard line (#9529)
Redesigns the Naga Guard, Shield Guard, and High Guard to make their shield bash attack less redundant.

Also adds the new Unwieldy and Guard specials, and deprecates the Absorb special.
2024-11-07 16:33:23 -06:00
Charles Dang
4f97c10e35 Preferences: validate countdown time values when setting them 2024-11-07 11:10:13 -05:00
Charles Dang
37adb200e6 Display: small FPS counting fix
This is way more readable and more semantically correct. Essentially, instead of truncating the current and last timestamps to seconds and checking if we were "in" a different second, actually check the duration between the current frame and our last lap point .
2024-11-07 11:10:13 -05:00
Charles Dang
9a77b72aac Different approach to chrono::duration serialization
Since we're relying on free functions to parse and serialize time_points, it makes more sense to do likewise for durations rather than relying on a config_attribute_value member function. Leaves the assignment support for now.
2024-11-07 11:10:13 -05:00
Charles Dang
6dc65f6483 Campaignd: use chrono::system_clock instead of std::time_t
Includes adjustments to client code to likewise use chrono types. I decided to keep using time_t
(which is just an alias for long_long) for serializing time points. This avoids compatibility issues,
since we keep the same resolution (seconds since Unix epoch), and unless we're going to "properly"
store time points in config, the time_t's unitless value is a good a representation as any.
2024-11-07 11:10:13 -05:00
Charles Dang
b859060627 Add new refresh_rate pref to better handle --max-fps
The pre-processing for --max-fps was basically identical to what draw_manager::get_frame_length does.
This replaces the draw_delay preference with a new refresh_rate preference that more accurately describes
what is being set. video::current_refresh_rate will now take this preference into account, meaning the
build info report will correctly report player-set FPS limits.

The Limit FPS option in the prefs UI was also removed. When it was first introduced (cca79afe4b)
it specifically affected the map rendering code, not the rendering pipeline as a whole. With the 1.17
rendering refactor, this is no longer the case, and so its current usage as the lower bound for frametime
calculations did nothing (all it did was change the lower bound from 0 to -1 when enabled).

It might be worth adding a slider to the UI to dynamically set max fps, but that's a separate change.
2024-11-07 11:10:13 -05:00
Charles Dang
6fcf46a208 Events: remove pump_info
Only two places actually made use of the only thing it was useful for (the current tick count),
the countdown clock and the music thinker. The former was simpler to do without, and though it
was slightly useful for the latter, the music thinker really needs to be rethought.

The only thing this could be useful for is providing a stable timestamp for every process call.
That wasn't how it was designed, however. ticks() would populate its value the first time it was
called. Even if (as I considered doing) you change it to register the tick when constructing the
pump_info object, it's still easier (and easier to read) to just call steady_clock::now directly
as needed.
2024-11-07 11:10:13 -05:00
Charles Dang
12fa8f2844 Use standard chrono types consistently throughout the codebase
* Functions that return time values now return proper std::chrono::duration units (milliseconds,
  seconds, etc.). This removes the need to do manual unit conversions.
* Simple time-to-execute logging was replaced with `utils::optimer`.
* Most uses of `SDL_GetTicks()` have been replaced with `std::chrono::steady_clock`.
* Uses of events::pump_info::ticks() have been replaced with direct calls to steady_clock::now().
  This made the countdown_clock code significantly simpler. As for the music_tinker, that needs
  to be rethought wholesale.
2024-11-07 11:10:13 -05:00
Charles Dang
cd3e8d7652 Config: support time duration conversion and assignment 2024-11-07 11:10:13 -05:00
Charles Dang
7f4d2a437b Utils/Optimer: add a lap function 2024-11-07 11:10:13 -05:00
Gunter Labes
9181e4e298
Remove superfluous FIXME comment 2024-11-07 14:21:34 +01:00
MechanicalDragon963
e460d26dfc
Tweak Elvish Marshal Stats (#9512)
HP 68 -> 62
MP 5 -> 6
2024-11-06 20:50:32 -06:00
white-haired-uncle
05bf146866 GUI2 stacked_widget - add length operator 2024-11-05 21:59:24 -05:00
newfrenchy83
82cc6d979d moves alignment_str() to header and correct documentation 2024-11-04 19:09:59 -06:00
Gunter Labes
8b0909b24c Remove fallback logic from alignment_str() to work the same as alignment()
No caller was adjusted since IMO this is the correct behavior.
2024-11-04 19:09:59 -06:00
Subhraman Sarkar
c3f16b3294 reconvert file from original jpg and add metadata
removes bloat (13.7MB -> 4.3MB)
converted original jpg to webp using imagemagick, then applied cwebp -mt -m 6 -q 90 -alpha_q 100.
2024-11-04 16:51:49 +11:00
newfrenchy83
29e79c4235 Fixed an error in [filter_special] encoding
In special_id/type without the _'active' suffix only the encoding of the special in the attack is checked, and therefore the specials encoded in the [abilities] tags are de facto excluded, except that I forgot this logic in [filter_special] and I have to fix my error before updating the wikia.
2024-11-03 12:42:23 -06:00
Nils Kneuper
1aad482fe2 updated Norwegian translation 2024-11-03 18:02:44 +01:00
Nils Kneuper
e52d69cf67 updated Arabic translation 2024-11-02 12:54:35 +01:00
Subhraman Sarkar
0302dd8601 tutorial: UI improvements
uses portraits in the character selection and single click selection on pictures instead of buttons
also adds a dark background to hint messages to make them easier to read
adds arrow markers in the beginning on the units
2024-11-02 12:56:29 +05:30
Gothyoba
7fb0b8cdb3 Add Achievements to THoT 2024-10-31 12:38:00 -05:00
Wedge009
403dfbc673 Re-use translation strings from wesnoth-lib instead of duplicating them in wesnoth-editor.
Closes #9492. Bonus spelling correction.
2024-10-31 08:29:07 -04:00
Yoruma
88c6c13fdd Revert crashing code change part of #9292 2024-10-31 08:12:50 +05:30
Yoruma
0c2b035cc5 Fix with a little tricky 2024-10-31 08:12:50 +05:30
newfrenchy83
ee2bbc40cc refactor test for remove illuminates abilities. 2024-10-30 18:38:36 -05:00
newfrenchy83
7d5663b379 add a [remove_specials] tag in [effect] and [filter_special] to [has_attack/filter_weapon]
with this, it is possible to  simultaneously check specials with id and type, and/or other attributes for remove_specials effector filter_weapon
2024-10-30 18:38:36 -05:00
Thewodoros
ae5b2f0da6 Fix the attack_end event in Liberty S5
The event has to use side 3 because side 2 is idle. Also remove the dollar sign because IF_VAR doesn't work with it.
2024-10-31 10:26:23 +11:00
Subhraman Sarkar
e0e8b37880 help browser: add toggle for showing/hiding contents in 800x600 2024-10-30 13:28:58 -04:00
Gothyoba
c6853b021d
More New Titlescreen Images (#9466) 2024-10-30 11:30:28 -04:00
pentarctagon
5208905cdf fix indent 2024-10-28 13:19:42 -05:00
doofus-01
ccb079f05c
Update CI to check for XMP rather than EXIF - for PNGs only (#9435)
Addresses GIMP metadata editing limitations
2024-10-27 10:40:00 -07:00
newfrenchy83
b26f446d32 add changelog entry. 2024-10-27 09:14:45 -05:00
newfrenchy83
e905271c79 add modification specific to gender or variations
the old code don't work for replace advancement in [male/female] or [variation] tag
2024-10-27 09:14:45 -05:00
newfrenchy83
83d1bef0bc add amla advancement to [modify_unit_type]
Addresses https://github.com/wesnoth/wesnoth/issues/9309
when used, the amlas in [unit_type] are replaced by list of amlas in [modify_unit_type],i cannot done add [advancement] without erase amla already present.
2024-10-27 09:14:45 -05:00
Gothyoba
198b798e49
Make sure ELvish Race Description doesn't contradict WoF (#9505) 2024-10-27 13:57:27 +06:00
Charles Dang
61480df8eb Events: use native SDL handling for double click events
GUI2 still does its own handling with double clicks. This doesn't touch that. The default SDL handling is either 500ms (unchanged) or queried from the OS on Windows (an improvement). The click radius defaults to 32, which honestly seems like an acceptable adjustment.
2024-10-26 23:47:10 -04:00
Charles Dang
71dbaab868 Events/Pump Info: remove unused resize_dimensions member
This was set and never used. It was, at some point, I believe, but evidently got refactored out over the years.
2024-10-26 23:47:10 -04:00
Charles Dang
1ba3be778b Events: split off rate counting from pump_info::ticks
This interface was extremely confusing. pum_info is designed to set `ticks_` only once. This can lead to a situation (exemplified by the music code) where if ticks() is called multiple times in a row, the subsequent times with a counter, that counter would never be incremented since the condition that tests them short circuits on the is-ticks-not-set check.

Also, giving ticks() multiple side effects was very confusing.
2024-10-26 23:47:10 -04:00
SomeName42
44bb36d411 Sound source full_range and fade_range are now allowed to be 0. When fade_range=0 division by zero prevented. 2024-10-26 17:13:18 -04:00
Wedge009
b5e500cfda Correct string concatenation. 2024-10-26 11:11:53 -04:00
Wedge009
3baf3fefe8 Update mark-up as per PR feedback. 2024-10-26 11:11:53 -04:00
Wedge009
c26d45d56e Remove reference to obsolete and Windows-specific Notepad.
[ci skip]
2024-10-26 11:11:53 -04:00
Wedge009
fb2045120b Avoid including mark-up in Help translated text. 2024-10-26 11:11:53 -04:00
Wedge009
e01fbb6b02 Correct one more non-typographic apostrophe...
[ci skip]
2024-10-26 11:11:53 -04:00
Wedge009
b3ed22d697 Editor Help: text corrections.
[ci skip]
2024-10-26 11:11:53 -04:00
Subhraman Sarkar
dc78046d0f rich label: support text_font_size resolution key
also, mouse handler will only be registered if the rich_label is link aware and has a registered link handler.
2024-10-26 20:11:37 +05:30
Nils Kneuper
0954c2445e updated Hungarian translation 2024-10-26 14:21:10 +02:00
Nils Kneuper
7f9879fc08 updated British English translation 2024-10-26 14:20:07 +02:00
Nils Kneuper
deea9ad009 updated Arabic translation 2024-10-26 13:50:40 +02:00
Charles Dang
b4d70c4224 Bump vcpkg baseline 2024-10-25 17:01:27 -04:00
MechanicalDragon963
70df290584
Tweak some Elvish units stats (#9440)
* Elvish Scout: XP 42 -> 32;
* Elvish Rider: XP 75 -> 60; HP 49 -> 46; bow damage 11 -> 9; cost 28 -> 27;
* Elvish Outrider: MP 11 -> 10; HP 60 -> 57; bow damage 11 -> 9; sword damage 8 -> 7; cost 58 -> 50;
* Elvish Avenger: HP 59 -> 55; cost 60 -> 55.
2024-10-25 15:08:48 -05:00
Charles Dang
dfa4d7dd35 Remove chars_equals_insensitive and chars_less_insensitive
These aren't used anymore as of #9332 (save one place, which has been inlined here), and they're not good to rely on, since they don't handle utf8 properly.
2024-10-25 14:53:17 -04:00
Charles Dang
ebf825668d Add utils::erase to complement erase_if
Both can be replaced with their standard library counterparts once we use C++20 by default.
2024-10-25 13:20:59 -04:00
Charles Dang
cb4d8a8dff Deploy utils::erase_if 2024-10-25 04:03:23 -04:00
Charles Dang
84c414c58b Make use of sdl::get_mouse_location() when possible 2024-10-25 02:41:59 -04:00
Charles Dang
0e8edd12e4 Remove display::get_location_x|y 2024-10-25 02:41:59 -04:00
Charles Dang
9f806362ae Clean up display::hexes_under_rect 2024-10-25 02:41:59 -04:00
Charles Dang
ec7679d07f Rename rect::pos() to origin() 2024-10-25 02:41:59 -04:00
Charles Dang
5ab73a51fd Display: use point math for viewport position 2024-10-25 02:41:59 -04:00
Wedge009
d338c90381 Save game: text correction
[ci skip]
2024-10-24 22:03:44 -04:00
Subhraman Sarkar
c284a080e3 campaign selection: opening add-ons manager entry 2024-10-22 19:59:55 -04:00
white-haired-uncle
e6d5100924 multi_page::remove_page - account for index when limiting number of pages to remove 2024-10-21 18:57:41 -04:00
pentarctagon
a34e4a345a remove empty single space 2024-10-21 12:15:06 -05:00
pentarctagon
fd426b5b9b 1.19.5+dev 2024-10-21 12:13:11 -05:00
pentarctagon
383ba03664 1.19.5 2024-10-21 12:10:10 -05:00
pentarctagon
7047c8f581 changelog_entries 2024-10-21 12:02:37 -05:00
pentarctagon
019da2f54c pot-update and regenerate doc files 2024-10-21 11:36:51 -05:00
Gothyoba
d7c9716265 Move EI Music to Core 2024-10-20 14:50:46 -05:00
SomeName42
a5e17f770d The cause of the crash was that the active_menu_ variable was set to UNIT_FACING after the unit facing setting is finished. When clicking the menu it was looking for a unit because of the value of the active_menu_ variable and on line 670 the assert failed because it could not find one. Setting active_menu_ to MAP after the unit facing is set fixes this. 2024-10-20 14:48:31 -05:00
Gunter Labes
4e1666c7a1
autorevision: Revert nonsensical handling of untracked files 2024-10-20 21:18:48 +02:00
newfrenchy83
f7a4041f54
update codeblock libraries 2024-10-20 21:16:40 +02:00
Charles Dang
01efec92fa Display: don't return const map_locations 2024-10-20 01:55:16 -04:00
Charles Dang
c5891ef7fe Display: clean up exclusive draw stuff 2024-10-20 01:54:37 -04:00
Charles Dang
6d40872de0
Display: remove display_context wrapper functions (#9481)
This removes `get_teams()`, `get_units()`, and `get_map()` from the display class. These only served as one of the many, many ways to access this data held by the display_context, and that shouldn't be the first-class responsibility of display. Instead, we either access them through the display_context pointer that display holds (whose getter has been renamed to `context()`) or through other more convenient paths (such as play_controller). The editor_display function `map()` has now taken up the mantle of `get_map()`, mostly because both `display::get_map()` and `editor_display::map()` are used, and the former outnumbered the latter.
2024-10-19 21:38:18 -04:00
Subhraman Sarkar
f2bbedb9bb update markup in time of day help topic generator 2024-10-19 20:32:20 +05:30
Nils Kneuper
940c9abe80 updated Chinese (Simplified) translation 2024-10-19 13:43:36 +02:00
Charles Dang
99f5cfacfb GUI2/Game Stats: take team reference instead of team index 2024-10-18 14:20:07 -04:00
Charles Dang
fc514ccefb Game Display: clean up unused/unnecessary functions
Removed:
- debug_highlight et al. Unused, and we have the main "display coordinates" debug flag in the base class
- current_team_name. Only used in one place, clearer to just call team_name directly.
- get_terrain_on. Unimplemented
2024-10-18 14:19:37 -04:00
Charles Dang
a80831fb9f Format a few more ctor list (no content changes) 2024-10-18 13:12:47 -04:00
Charles Dang
672b33f227 Actions/Undo: use nested namespace declarations 2024-10-18 13:11:35 -04:00
Charles Dang
5e4728d69e Remove make_unit_ptr
Only used in one place anymore which already included unit.hpp anyway, so there's no benefit here.
2024-10-18 12:51:01 -04:00
newfrenchy83
995d67cf77 fix fallaback to unit alignment for filter and formulas. 2024-10-18 12:06:09 -04:00
newfrenchy83
174be0f8c4 Change the alignment code in attack to return an optional value and avoid falling back to neutral alignment when unit alignment is not available. 2024-10-18 12:06:09 -04:00
Ivan A. Melnikov
a1cadb54e5 campaignd: Use completion token overload
... to fix compile issues with boost 1.86.

Commit 9c665ae3c4 does the same
for wesnothd, but campaignd still fails to compile with
overload resolution failure.

References  #9284
2024-10-18 11:41:34 +02:00
Charles Dang
371ddd7716 GUI2/Rich Label: removed set but unused variable 2024-10-18 01:32:26 -04:00
Charles Dang
10594faa83 CI/CodeQL: target ubuntu 24.04 explicitly
I have no idea what's going on with the transition from ubuntu-latest from 22.04 to 24.04. It switched to 24.04, and now it looks like it's back to 22.04...

See https://github.com/actions/runner-images/issues/10636
2024-10-18 01:32:26 -04:00
Charles Dang
858268c19a CI: bump macOS runner to macos-13, since 12 is deprecated
See https://github.com/actions/runner-images/issues/10721
2024-10-18 01:32:26 -04:00
Subhraman Sarkar
af155b0cea about dialog: add entry for game manual 2024-10-18 00:41:49 -04:00
Descacharrado
52e132648d
Highlight reachable hexes instead of darkening unreachable hexes (#9292) 2024-10-17 23:23:53 -04:00
Charles Dang
38a6508cf4 Clean up a few more cases of raw pointer management 2024-10-17 23:20:50 -04:00
Charles Dang
491c236113 Config: deploy all_children_view en-mass 2024-10-16 09:36:59 -04:00
Steve Cotton
f120a00537 Fix location_palette's override of supports_swap
Rename location_palette::can_swap() to the correct name so that it
overrides as intended, thus making the UI disable the "swap fg and bg
items" button.

The class structure doesn't match the responsibilities here, as part
of UX isn't part of the palette, rather it's part of the tool that
decides whether there are fg and bg items - alternatively, the tool
decides whether right-click is "place bg item", "delete items", or
"show unit tool options". However, this change seems to be enough to
make the UX correct.

The "virtual" is redundant, but add it for consistency with the other
code in these classes.
2024-10-16 09:36:47 -04:00
Charles Dang
c33bb1fca3 Editor/Palette: remove unused cfg param from ctor 2024-10-16 02:41:22 -04:00
Charles Dang
c507e60b73 Editor/Palette: marked more functions override 2024-10-16 01:48:01 -04:00
Charles Dang
29191627fa
Rect: add padded_by, point_at, and subrect (#9465) 2024-10-15 23:42:16 -04:00
Pentarctagon
42d349a65d
swarm tests (#9454) 2024-10-15 17:31:01 -05:00
newfrenchy83
1c4d2f449f
Replace the recursion computation method with the less CPU-intensive config comparison method
When I use an ability id=A and include [filter][filter_adjacent]ability_id_active=A, the more units with the adjacent ability I add to it, the slower the game becomes, and at the third unit the game freezes, whereas with the direct comparison of the configs the game only slows down significantly after the 5th unit added.
2024-10-15 20:13:01 +02:00
Subhraman Sarkar
63d6fbf89d about dialog: fix typo 2024-10-15 20:07:36 +05:30
Subhraman Sarkar
cff803d2ef rich label fixes
1. don't add links to the global list during size calculation
2. reset draw cursor to x=0 after a text block
2024-10-15 20:07:36 +05:30
newfrenchy83
7665db46af remove 'experimental_' of filter_ability/specials tags
now what 1.18 separate of master branch it is time of aiming for that. "experimental_ preffix is depracated now.
2024-10-14 16:35:56 -05:00
Charles Dang
a96ce07e35 GUI2: remove standalone window build functions
The only place that used these was the lua show_dialog implementation. We can just construct the window object directly instead. Since this skips out on the finalize_build step (which in the case of modal/modeless_dialog was being called by those respective ctors), I've removed that function and merged it into the window ctor. No need to do it separately.

Builds on work in af81bba53b and 247e5ff055
2024-10-14 01:44:52 -04:00
Charles Dang
0eb8dc4540 CI/CodeQL: ubuntu-latest now runs 24.04 2024-10-14 01:23:02 -04:00
Charles Dang
44e21859b2 Editor/Palette: mark get_help_string const override
Note that location_palette::get_help_string is not virtual as it does not inherit from editor_palette (where the pure virtual get_help_string is defined) but rather common_palette.
2024-10-14 00:00:29 -04:00
Charles Dang
5a8123669d t_string: define move ctors and assignment operators 2024-10-13 22:59:10 -04:00
Charles Dang
beac3e2c8d Editor/Item: use VGETTEXT for help string 2024-10-13 22:59:10 -04:00
Charles Dang
7c042e41b2 GUI2: make use of utils::bullet_list
Might be able to use this in more places but these were the obvious ones.
2024-10-13 22:59:10 -04:00
Charles Dang
dfa8db1f72 Help: these shouldn't be t_strings 2024-10-13 22:59:10 -04:00
newfrenchy83
b03caa9205
Create in [filter_ability] an attribute 'active' to replace _active suffix in [filter_ability_active] (#9442)
Resolves https://github.com/wesnoth/wesnoth/issues/7926

[filter_ability] and [filter_ability_active] have been merged into a single filter equipped with the 'active' attribute which when the value is 'true' checks the units affected by the sought ability and when the value is 'false' or unset will check the units carrying the ability even if they are not affected by it.

Because of the attribute strategy, I'm afraid that the developer will be mistaken about its function and that's why I'm not at all keen on it but I want to get out of this impasse.
2024-10-13 16:37:31 -05:00
Gunter Labes
dbcd6527d2
Remove unused SDL_net framework 2024-10-12 22:42:38 +02:00
Tóth Kornél
76f20a6149
Better action WML error handling 2024-10-12 22:23:52 +02:00
Charles Dang
28414a933d Actions/Undo: use make_unique over new 2024-10-12 14:42:07 -04:00
Nils Kneuper
f79e8b444c updated Czech translation 2024-10-12 11:08:33 +02:00
Nils Kneuper
584248d8df updated Chinese (Simplified) translation 2024-10-12 11:07:15 +02:00
Gunter Labes
1689f5ed17
Add entry for theme type
Also reordered the types to match src/addon/validation.hpp.
2024-10-11 17:08:29 +02:00
Subhraman Sarkar
0a602e1c7c addon: reorder types and remove comment and remove "UI " from strings 2024-10-11 20:21:04 +05:30
Subhraman Sarkar
94b075d720 addons: remove commented out constants related to unused addon type 2024-10-11 18:37:15 +05:30
Charles Dang
8b86256e4a Format some ctor lists (no content changes) 2024-10-10 23:05:49 -04:00
Charles Dang
c5069a6036 Map Location: specialize steam operator for direction enum 2024-10-10 22:57:23 -04:00
Charles Dang
c815e1d23a Map Location: reimplement rotate_right as rotate_direction
Since rotate_right_around_center rotates a location, this makes it clear we're getting a rotated direction instead. Also made it constexpr
2024-10-10 22:57:23 -04:00
Charles Dang
f04e19934f Map Location: rename default_dirs and get_opposite_dir
all_directions better reflects the purpose of the former. Also made it return a value,
since the only places that used it immediately assigned it to a local variable.
2024-10-10 22:57:23 -04:00
Charles Dang
f4fda31707 Map Location: convert direction to a scoped enum 2024-10-10 22:57:23 -04:00
Subhraman Sarkar
08e514bc4b fixes broken tab order
The first SDL_KEY_DOWN handler is being called twice, while the second one is being called once.
The tab order handling is done by the first handler, which caused the focus to move *twice*, resulting in the erratic behavior when tab was pressed.
Moving the tab handling to the second one stops this and now focus moves only once when Tab is pressed.
2024-10-10 21:50:13 -04:00
Subhraman Sarkar
df167bdb43 add support for UI Theme addon type
With custom gui2 theme support in #9057, it is now possible to create addons that supply UI Themes or Skins.
This adds support so such addons are properly recognized and validated.
2024-10-10 21:49:38 -04:00
Subhraman Sarkar
1ca69e1eca move markup parser to markup.cpp/hpp 2024-10-10 01:31:14 -04:00
Subhraman Sarkar
c2757a1d35 markup refactor: replace hardcoded markup strings
Examples:
formatter() << "<b>" << "Hello" << "</b>" becomes just markup::bold("Hello")
formatter() << font::span_color(color) << text << "</span>" becomes formatter() << markup::span_color(color, text)
also adds markup.cpp/markup.hpp to XCode and CodeBlocks source files and removes text_formatting.cpp/hpp from projectfiles.
2024-10-10 01:31:14 -04:00
white-haired-uncle
d2e7fbbeb8
GUI2 LuaAPI: add clear_items() (#9418) 2024-10-09 01:37:03 -04:00
Charles Dang
56cc3aee0f
Config: remove implicit conversion to int and bool (#9444)
Resolves #9009, closes #9384. Besides the issues that came from having both int and bool conversions (even with bool marked explicit), it doesn't make sense to use int for all numeric assignments. I didn't test whether it would be an issue in practice, but it seems better to let callers be explicit about what type they want for numeric values than risking overflow or wrapping for very large values.
2024-10-09 01:36:10 -04:00
Tóth Kornél
f13d4fe2a4
Teleport path finding improvement (resolves #9434)
* Removed duplicate map_location hasher, removed unused teleport_id variable, dst_node reference is used at other possible locations, teleport destination heuristic distance now calculated before path finding loop only once, teleport source heuristic distance now stored in nodes, only calculated once and reused.

---------

Co-authored-by: SomeName42 <>
2024-10-08 17:17:02 -04:00
Gothyoba
36146c5c6c Properly capitalize Young Ogre description 2024-10-08 09:27:05 +11:00
ForestDragon
9f64e355f9
[Units][Jumpcat] Rebalance Stats (#9432)
Change Jumpcat from level 1 to level 2
Increase HP from 32 to 40.
Reduce MP from 9 to 7.
Reduce arcane resist from 20 to 10.
Increase cost from 15 to 26
Replace claws' parry with backstab, but reduce damage from 6-3 to 5-3
Remove accuracy from tail, but increase damage from 11-2 to 13-2
2024-10-07 14:27:45 -05:00
Gunter Labes
b1eb871df7
Schema: Add missing location filter attribute 2024-10-07 14:05:16 +02:00
doofus-01
422425f772
Update changelog.md 2024-10-06 18:00:41 -07:00
doofus-01
78c8ed24fb
1.19 Better mountains/elevation interactions (#9400)
* address bluffs-mountains transitions

* revise visual indicator of flood-filled elevation regions in editor

* small border versions of dry and basic mountain

* fix some frozen/elevated transitions

* address mini-map concerns in #8924
2024-10-06 17:51:54 -07:00
Tóth Kornél
9ca1c53b22
Fix in-game team names not reflecting game setup changes
Resolves #9407.
2024-10-06 21:57:34 +02:00
Yoruma
0e13a7e30f
Treat negative number of strikes as 0 instead of the unmodified amount
Fixes #9366.
2024-10-06 20:43:59 +02:00
doofus-01
a9637de7e7
various orc animations (#9289)
* touch-up to orcish warrior combat anims

* some pillager animations

* fix direwolf-rider shadow

* alternate orc warlord attack anim

* orc warlord victory anim
2024-10-05 18:25:06 -07:00
Wedge009
98aba787c4 Completed the update started in #9057. 2024-10-06 09:13:10 +11:00
Wedge009
558650bd14 Typography update for source code (in addition to .cfg data files previously reviewed). 2024-10-06 09:13:10 +11:00
Wedge009
5ec94b5904 Adding requested po hint.
[ci skip]
2024-10-06 09:13:10 +11:00
Wedge009
ca8a0aede8 Typography update. Closes #8000.
[ci skip]
2024-10-06 09:13:10 +11:00
Charles Dang
32e1bdb2e6 Help/Editor: shorten very long topic title 2024-10-05 15:19:52 -04:00
Charles Dang
ad736266c1 GUI2/Widget: add const overload of get_parent_grid 2024-10-05 15:19:20 -04:00
Charles Dang
2931816979 GUI2/Tree View Node: make use of emplace_back returning a reference 2024-10-05 15:18:48 -04:00
Charles Dang
9dc4a94533 Pango Text: avoid max short constant 2024-10-05 15:17:10 -04:00
Charles Dang
0fa0019127 Hide Load Turn button in MP (resolves #9308, closes #9428) 2024-10-05 15:12:30 -04:00
Nils Kneuper
d84669c8a8 updated Japanese translation 2024-10-05 15:07:31 +02:00
Nils Kneuper
58bc7ba4af updated Bengali translation 2024-10-05 15:06:48 +02:00
Subhraman Sarkar
ea3698665f rich label: fix wrong text splitting for pixel scale > 1 2024-10-05 15:57:06 +05:30
Charles Dang
736e45a197 Remove all occurrences of box=yes in editor help markup
Was non-functional anyway
2024-10-05 00:57:26 -04:00
Charles Dang
8079807146 Fixed broken table markup in Editor Palette topic 2024-10-05 00:55:23 -04:00
Charles Dang
2dd27fcf8e Help: fix unit type pages not showing up due to overscaling 2024-10-04 20:26:58 -04:00
Charles Dang
eccce783a9 GUI2/Help Browser: layout improvements 2024-10-04 20:26:23 -04:00
Charles Dang
57bd39d4a5
GUI2/Rich Label: minor cleanup (#9426) 2024-10-04 19:53:28 -04:00
OrekOrek
d9bb46ce37
Units are defined without [base_unit] tag (#9413)
Dark Horse, White Horse, Sand Scamperer, and Sand Scuttler are now defined without [base_unit] tag.
2024-10-04 17:30:19 -05:00
Gothyoba
1597fd0248 Typo fixes in EI _main.cfg 2024-10-04 08:57:54 -04:00
Gothyoba
fa3d421a85 Remove unused lua in THoT 2024-10-04 15:59:29 +10:00
Charles Dang
b1105e2c2f Config: add range-based access over child tags
This is meant as a lightweight replacement for all_children_range in cases where the iterator doesn't need to be stored (most cases). It has several advantages:

First, it avoids the custom iterator classes, making the code easier to read. It also means it should be composable with STL ranges in C++20. Further, you no longer get a mutable reference on a const config. Finally, it means intellisense can properly display the key/cfg types in a structured binding. When unpacking `config::any_child`, for some reason it shows up as a key/value copy instead of reference...
2024-10-03 23:40:41 -04:00
Charles Dang
61ac2e3f3f Config: fix value ctor not compiling with const config references 2024-10-03 23:40:41 -04:00
Charles Dang
187f10ea84 Config: added assignment to string&& 2024-10-03 23:40:41 -04:00
Dalas121
e7509c5dba
EI S14 "Drowned Plains" - rework scenario objective (#9411)
Change the EI S14 objective from "kill enemy leaders" to "gather gold". Reduce turn limit from 75 to 25.
2024-10-03 22:26:08 -05:00
Tóth Kornél
08c666156b
Action wml unit better error (#9402)
* Better error message for ActionWML [unit]

---------

Co-authored-by: SomeName42 <>
Co-authored-by: Gunter Labes <soliton@wesnoth.org>
2024-10-03 13:59:00 -05:00
Celtic Minstrel
4062f579e3
Fix #9360 2024-10-02 09:05:24 -04:00
Dalas121
2bec13a825
EI: update Dacyn arcane resistance to be consistent with the arcane rework (#9412)
* Twilight Mage: set arcane resist to 20%
* Fallen Mage: set arcane resist to -20%
2024-10-02 07:43:39 -05:00
Subhraman Sarkar
8267bc3d16 rich label: use columns instead of col_idx for last col width calculation 2024-10-02 10:41:19 +05:30
Gothyoba
1008296863 Change UtBS date from 300 to 1000 AF
This makes a lot more sense given how forgotten everything before the fall is by the time of UtBS. 300 AF is small enough for a few elves to remember the times before. 1000 AF is more sensible in my opinion.
2024-10-01 19:17:44 -04:00
Pentarctagon
ede10ca10c
slows tests (#9401) 2024-10-01 17:54:36 -05:00
Subhraman Sarkar
d2f6b171c0 help: fix misalignment in Unknown Unit page 2024-10-01 21:37:40 +05:30
Subhraman Sarkar
5e50ab2bf1 rich label: remove leftover debug_print 2024-10-01 12:54:47 +05:30
Subhraman Sarkar
a7420b80ea various rich label bugfixes 2024-10-01 12:39:34 +05:30
ForestDragon
d0688865ff
[Units][Skeletal Dragon] Adjust stats to be closer to 1.18 (#9403)
Skeletal Dragon saw very major buffs in #8541, which causes some concern about rebalancing and UMC. This reduces their stats closer to 1.18, though still moderately stronger.
2024-09-30 13:10:52 -05:00
Gothyoba
25718875f0 Fix a comment typo in THoT S6 2024-09-30 13:36:12 -04:00
Charles Dang
ea1d915c26 Display: remove scroll_to_tiles overload taking iterators
Was only used in two places, one of which was as the implementation of the version that took a vector. All the same arguments were accepted by both. Also use list initialization for the other overloads.
2024-09-30 02:39:31 -04:00
Charles Dang
bc971b45c9 Display: simplify get_middle_location 2024-09-30 02:36:06 -04:00
Charles Dang
17361198fe Display: use rect instead of SDL_Rect consistently 2024-09-30 02:34:48 -04:00
Charles Dang
07df161c96 Display: simplify tile_fully_on_screen
outside_area checks that the point is within the given rect reduced by hex_size(). Since that's the size of a location rect, the adjustment meant that a hex can't protrude outside the map area. This simplifies the logic using rect math instead of point math.
2024-09-30 02:32:15 -04:00
pentarctagon
d4e7f5bc43 remove unsigned_matches_if_present 2024-09-29 23:19:39 -05:00
pentarctagon
d278ae9c5f poison ability tests 2024-09-29 22:15:47 -05:00
Gunter Labes
9c665ae3c4
Use completion token overload to fix compile issues with boost 1.86
Keep behavior of previous (now deprecated) overload by rethrowing exceptions.

Fixes #9284.
2024-09-29 19:30:56 +02:00
Subhraman Sarkar
961a6a5802 fix problematic find_widget usage and slightly rewrite the logic (#9388) 2024-09-28 12:43:34 -04:00
newfrenchy83
68a1d1139f add documentation for explain why presence of cfg attribute isnecessary in some case. 2024-09-27 22:24:03 -05:00
newfrenchy83
cea9b82863 filter attribute integrates the tag_name check to verify that the attribute sought can be used there.
reuse partially 1493faeaee but don't remove check cfg. Thanks to @Pentarctagon

if for example the ability filter searches for the value of 'active_on' in an ability 'leadership' then the false value will be returned because active_on is not an attribute usable in [leadership]

on the other hand if the ability is of type 'dummy' its encoding remaining at the discretion of the UMC developer, the checking can be done normally
2024-09-27 22:24:03 -05:00
newfrenchy83
66103e4d4e reorganize attribute of [experimental_ability_filter] and add documentation.
resolve https://github.com/wesnoth/wesnoth/issues/7992 issue
2024-09-27 22:24:03 -05:00
Nils Kneuper
4870ff66bd updated Chinese (Simplified) translation 2024-09-28 00:58:36 +02:00
pentarctagon
d20128530a fix clang warning for signed unsigned comparison 2024-09-27 13:20:08 -05:00
Charles Dang
1d5d73b75a Language: remove excessive logging 2024-09-27 12:35:24 -04:00
Charles Dang
67335a514d Unit: don't return const values 2024-09-27 12:34:19 -04:00
Charles Dang
a832ed8b2e Continue putting display::get_location_rect to good use 2024-09-27 12:23:02 -04:00
Steve Cotton
3e464cb856 The NOT_DANGLING specifier should be before the const attribute
Fixes a warning with GCC-14.
2024-09-27 10:38:14 -04:00
pentarctagon
82c7b4c7eb use the correct editor dir location
fixes issue brought up on the forums: https://forums.wesnoth.org/viewtopic.php?t=58725
2024-09-27 08:41:54 -05:00
Charles Dang
1d9f57a668 Config: more structured bindings for attribute_range 2024-09-27 03:22:35 -04:00
Charles Dang
95c9f0c720
Config: use structured bindings with all_children_range (#9387) 2024-09-27 02:49:57 -04:00
Subhraman Sarkar
5913cfdf55 remove unnecessary std::ref(window) 2024-09-27 06:04:57 +05:30
Subhraman Sarkar
f5906d6224 remove find_widget.hpp 2024-09-27 06:04:57 +05:30
Subhraman Sarkar
298065e1bd remove window param from pre/post_show 2024-09-27 06:04:57 +05:30
Subhraman Sarkar
c7d9c0f5b0 find widget signature changes 2024-09-27 06:04:57 +05:30
Severin Glöckner
43e1d183e5 fix in German translation
[ci skip]
2024-09-26 02:28:04 +02:00
newfrenchy83
291e4bb0e5 update codeblock projectfiles 2024-09-24 14:39:39 +02:00
Soliton
2f8d471e80
Remove any_tag for a more useful schema validation 2024-09-24 08:58:11 +02:00
Subhraman Sarkar
32c528501f help browser: remove unnecessary lines
cleans up some print statements and comments out code
2024-09-24 12:23:03 +05:30
spixi
0e326894cb
Add missing [then] from 6f15150 2024-09-24 08:35:30 +02:00
Charles Dang
1261d88b15
Removed a bunch of unused GUI1 stuff (#9375)
Don't need these now that the GUI2 help browser is merged.
2024-09-23 23:54:47 -04:00
2261 changed files with 299657 additions and 251787 deletions

4
.clang-tidy Normal file
View file

@ -0,0 +1,4 @@
---
Checks: '-*,modernize-use-nullptr,performance-unnecessary-value-param'
WarningsAsErrors: true
...

View file

@ -90,10 +90,15 @@ jobs:
scons "$@" build="$CFG" ctool="$CC" cxxtool="$CXX" cxx_std="$CXX_STD" \
extra_flags_config="-pipe" forum_user_handler=true \
nls=false enable_lto="$LTO" system_lua="$SYS_LUA" force_color=true \
jobs=2 --debug=time glibcxx_debug=true glibcxx_assertions=true
jobs=2 --debug=time glibcxx_debug=true glibcxx_assertions=true compile_db=true
}
build strict=true wesnoth boost_unit_tests
build cdb
# disable all warnings since we have coverage on them in a standard build, and clang-tidy
# triggers false positive compiler warnings that clang itself won't
run-clang-tidy -quiet -use-color -j 2 -extra-arg="-w" -warnings-as-errors='*' '^(?!.*src/modules/|.*build/)'
apt remove -y -qq libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev
build strict=false wesnothd campaignd
@ -104,7 +109,7 @@ jobs:
cmake "$@" -DCMAKE_BUILD_TYPE="$CFG" -DCXX_STD="$CXX_STD" \
-DEXTRA_FLAGS_CONFIG="-pipe" -DENABLE_MYSQL=true \
-DENABLE_NLS=false -DENABLE_LTO="$LTO" -DFORCE_COLOR_OUTPUT=true -DLTO_JOBS=2 \
-DENABLE_SYSTEM_LUA="$SYS_LUA" .
-DENABLE_SYSTEM_LUA="$SYS_LUA -DCLANG_TIDY=true" .
}
rm -R /usr/local/lib/cmake
rm /usr/local/lib/libboost*
@ -259,7 +264,7 @@ jobs:
fail-fast: false
matrix:
cfg: [ Release ]
runs-on: macos-12
runs-on: macos-13
env:
CFG: ${{ matrix.cfg }}
@ -292,7 +297,7 @@ jobs:
path: projectfiles/Xcode/Wesnoth_${{ matrix.cfg }}.dmg
- name: Run WML tests
if: matrix.cfg == 'Release'
run: ./run_wml_tests -g -c -t 30 -p "projectfiles/Xcode/build/$CFG/The Battle for Wesnoth.app/Contents/MacOS/The Battle for Wesnoth" -a=--userdata-dir="$PWD/ud"
run: ./run_wml_tests -g -c -t 30 -bt 350 -p "projectfiles/Xcode/build/$CFG/The Battle for Wesnoth.app/Contents/MacOS/The Battle for Wesnoth" -a=--userdata-dir="$PWD/ud"
- name: Upload userdata files from WML unit tests (logs, replays)
if: matrix.cfg == 'Release' && (success() || failure())
uses: actions/upload-artifact@v4

View file

@ -16,7 +16,7 @@ jobs:
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners
# Consider using larger runners for possible analysis time improvements.
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 360
permissions:
actions: read
@ -50,11 +50,12 @@ jobs:
- name: Install dependencies
if: matrix.language == 'cpp'
run: |
utils/autorevision.sh -t h > src/revision.h
sudo apt update
sudo apt install scons libboost-system1.74-dev libboost-filesystem1.74-dev libboost-iostreams1.74-dev \
libboost-serialization1.74-dev libboost-locale1.74-dev libboost-regex1.74-dev libboost-random1.74-dev \
libboost-program-options1.74-dev libboost-thread1.74-dev libboost-context1.74-dev libboost-test-dev \
libboost-coroutine1.74-dev libboost-graph1.74-dev libasio-dev libsdl2-dev libsdl2-image-dev \
sudo apt install scons libboost-system1.83-dev libboost-filesystem1.83-dev libboost-iostreams1.83-dev \
libboost-serialization1.83-dev libboost-locale1.83-dev libboost-regex1.83-dev libboost-random1.83-dev \
libboost-program-options1.83-dev libboost-thread1.83-dev libboost-context1.83-dev libboost-test-dev \
libboost-coroutine1.83-dev libboost-graph1.83-dev libasio-dev libsdl2-dev libsdl2-image-dev \
libsdl2-mixer-dev libvorbis-dev libpango1.0-dev libssl-dev libcurl4-openssl-dev liblua5.4-dev
# Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift).
- name: Autobuild

View file

@ -27,9 +27,9 @@ jobs:
with:
fetch-depth: 0
- name: check image metadata
- name: check image EXIF metadata
run: |
mapfile -t image_files < <(git diff --name-only --diff-filter=d "$BASE_SHA" "$HEAD_SHA" | grep -E '\.(webp|png|je?pg)$')
mapfile -t image_files < <(git diff --name-only --diff-filter=d "$BASE_SHA" "$HEAD_SHA" | grep -E '\.(webp|je?pg)$')
# cycle through the changed image files, make sure they have the right fields
for file in "${image_files[@]}"; do
# check Artist tag, fail if missing
@ -56,3 +56,33 @@ jobs:
;;
esac
done
- name: check png XMP metadata
run: |
mapfile -t image_files < <(git diff --name-only --diff-filter=d "$BASE_SHA" "$HEAD_SHA" | grep -E '\.png$')
# cycle through the changed image files, make sure they have the right fields
for file in "${image_files[@]}"; do
# check Creator tag, fail if missing
artist="$(exiftool -p '$XMP:Creator' "$file")"
if [ "$artist" ]; then
printf 'Creator tag in %s is %s\n' "$file" "$artist"
else
printf 'no Creator XMP tag in %s\n' "$file"
exit 1
fi
# check Rights tag, fail if missing or wrong type
copyright="$(exiftool -p '$XMP:Rights' "$file")"
case $copyright in
'GNU GPL v2+'|'CC BY-SA 4.0'|CC0)
printf 'Rights tag in %s is %s\n' "$file" "$copyright"
;;
'')
printf 'no Rights XMP tag in %s\n' "$file"
exit 1
;;
*)
printf 'Rights tag %s in file %s is not an accepted license! Must be one of: "GNU GPL v2+", "CC BY-SA 4.0", "CC0"\n' "$copyright" "$file"
exit 1
;;
esac
done

1
.gitignore vendored
View file

@ -127,6 +127,7 @@ wesnoth.plg
*.exe
*.dll
*.so
compile_commands.json
# library files
.libs

View file

@ -1,4 +1,4 @@
# set minimum version
# set minimum version
cmake_minimum_required(VERSION 3.14)
project(wesnoth)
@ -171,6 +171,7 @@ option(GLIBCXX_ASSERTIONS "Whether to define _GLIBCXX_ASSERTIONS" OFF)
option(GLIBCXX_DEBUG "Whether to define _GLIBCXX_DEBUG and _GLIBCXX_DEBUG_PEDANTIC. Requires a version of Boost's program_options that's compiled with __GLIBCXX_DEBUG too." OFF)
option(ENABLE_POT_UPDATE_TARGET "Enables the tools to update the pot files and manuals. This target has extra dependencies." OFF)
option(FORCE_COLOR_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." FALSE)
option(CLANG_TIDY "Enable clang-tidy linter checks." OFF)
if(UNIX AND NOT APPLE AND NOT CYGWIN)
option(ENABLE_NOTIFICATIONS "Enable Window manager notification messages" ON)
@ -255,6 +256,11 @@ if(NOT MSVC)
endif()
endif()
### Enable clang-tidy linting
if (CLANG_TIDY)
set(CMAKE_CXX_CLANG_TIDY "clang-tidy -Wno-unknown-warning-option")
endif()
### Set the final compiler flags.
set(COMPILER_FLAGS "${COMPILER_FLAGS} ${CXX_FLAGS_USER}")
@ -474,7 +480,7 @@ if(NOT MSVC)
else()
set(CMAKE_CXX_FLAGS "/W3 /WX /wd4503 /wd4351 /wd4250 /wd4244 /wd4267 /we4239 /wd4275 /EHsc /utf-8 /Zc:__cplusplus" CACHE STRING "Global flags used by the CXX compiler during all builds." FORCE)
set(CMAKE_C_FLAGS "/WX" CACHE STRING "Global flags used by the C compiler during all builds." FORCE)
add_definitions(-D_WIN32_WINNT=0x0601 -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS -DNOMINMAX)
add_definitions(-D_WIN32_WINNT=0x0A00 -D_CRT_SECURE_NO_WARNINGS -D_WINSOCK_DEPRECATED_NO_WARNINGS -DNOMINMAX)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DDEBUG_LUA")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /MANIFEST:NO")

View file

@ -2,7 +2,7 @@
## Prerequisites
Wesnoth requires a compiler with sufficient C++17 support such as GCC 8 and
Wesnoth requires a compiler with sufficient C++17 support such as GCC 11 and
later, or a version of Clang with equivalent support.
You'll need to have these libraries and their development headers installed in
@ -19,6 +19,7 @@ order to build Wesnoth:
* System
* Coroutine
* Graph
* Charconv (This requires boost 1.85 or higher and is optional but reccomended especially for clang builds)
* SDL2 libraries:
* SDL2 >= 2.0.18 (macOS: 2.0.22 due to needing https://github.com/libsdl-org/SDL/commit/3bebdaccb7bff8c40438856081d404a7ce3def30)
* SDL2_image >= 2.0.2 (with PNG, JPEG, and WEBP support)

View file

@ -120,6 +120,7 @@ opts.AddVariables(
BoolVariable("OS_ENV", "Forward the entire OS environment to scons", False),
BoolVariable("history", "Clear to disable GNU history support in lua console", True),
BoolVariable('force_color', 'Always produce ANSI-colored output (GNU/Clang only).', False),
BoolVariable('compile_db', 'Produce a compile_commands.json file.', False),
)
#
@ -189,6 +190,11 @@ if env['distcc']:
if env['ccache']: env.Tool('ccache')
if env['compile_db']:
env.Tool('compilation_db')
cdb = env.CompilationDatabase()
Alias('cdb', cdb)
boost_version = "1.67"
def SortHelpText(a, b):
@ -379,6 +385,7 @@ if env["prereqs"]:
conf.CheckBoost("program_options", require_version = boost_version) & \
conf.CheckBoost("random", require_version = boost_version) & \
conf.CheckBoost("smart_ptr", header_only = True) & \
conf.CheckBoostCharconv() & \
CheckAsio(conf) & \
conf.CheckBoost("thread") & \
conf.CheckBoost("locale") & \
@ -665,7 +672,7 @@ for env in [test_env, client_env, env]:
env[d] = os.path.join(env["prefix"], env[d])
if env["PLATFORM"] == 'win32':
env.Append(LIBS = ["wsock32", "crypt32", "iconv", "z", "shlwapi", "winmm", "ole32", "uuid"], CCFLAGS = ["-mthreads"], LINKFLAGS = ["-mthreads"], CPPDEFINES = ["_WIN32_WINNT=0x0601"])
env.Append(LIBS = ["wsock32", "crypt32", "iconv", "z", "shlwapi", "winmm", "ole32", "uuid"], CCFLAGS = ["-mthreads"], LINKFLAGS = ["-mthreads"], CPPDEFINES = ["_WIN32_WINNT=0x0A00"])
if env["PLATFORM"] == 'darwin': # Mac OS X
env.Append(FRAMEWORKS = "Cocoa") # Cocoa GUI

View file

@ -81,7 +81,7 @@ code_blocks_target_translations = {
# XCode #
#=======#
def add_to_xcode(filename, targets):
def modify_xcode(filename, targets, remove):
"""Add the given file to the specified targets.
"""
projectfile = rootdir.joinpath(
@ -121,24 +121,29 @@ def add_to_xcode(filename, targets):
raise Exception(f"problem finding '{d}' group in '{groupname}'")
parent_group = found_groups[0]
# if the group already has an entry with the same filename, loudly skip.
# note: this doesn't allow adding to targets one at a time.
# a new file should be added to all targets at once...
# or maybe targets could be checked somehow,
# or maybe the file could simply be completely removed and readded.
if project.get_files_by_name(filename.name, parent=parent_group):
print(" '"+filename.name+"' already found in Xcode project '"+",".join(translated_targets)+"', skipping")
return
if remove :
# Remove from all targets if we want to remove
for file in project.get_files_by_name(filename.name, parent=parent_group):
project.remove_file_by_id(file.get_id())
else:
# if the group already has an entry with the same filename, loudly skip.
# note: this doesn't allow adding to targets one at a time.
# a new file should be added to all targets at once...
# or maybe targets could be checked somehow,
# or maybe the file could simply be completely removed and readded.
if project.get_files_by_name(filename.name, parent=parent_group):
print(" '"+filename.name+"' already found in Xcode project '"+",".join(translated_targets)+"', skipping")
return
# force is True here because otherwise a duplicate filename in
# a different place will block addition of the new file.
# the rest is just to match existing project file structure.
project.add_file(filename.name,
force=True,
tree="<group>",
parent=parent_group,
target_name=translated_targets,
)
# force is True here because otherwise a duplicate filename in
# a different place will block addition of the new file.
# the rest is just to match existing project file structure.
project.add_file(filename.name,
force=True,
tree="<group>",
parent=parent_group,
target_name=translated_targets,
)
# that's done, save the file
project.save()
@ -148,7 +153,7 @@ def add_to_xcode(filename, targets):
# source_lists #
#==============#
def add_to_source_list(filename, source_list):
def modify_source_list(filename, source_list, remove):
source_list_file = rootdir.joinpath("source_lists", source_list)
sl_lines = open(source_list_file).readlines()
file_line = filename.as_posix() + '\n'
@ -157,12 +162,16 @@ def add_to_source_list(filename, source_list):
if filename.suffix != ".cpp":
return
# if the target already has an entry with the same filename, loudly skip
if file_line in sl_lines:
print(f" '{filename}' already found in '{source_list}', skipping")
return
if remove:
if file_line in sl_lines: sl_lines.remove(file_line)
else:
# if the target already has an entry with the same filename, loudly skip
if file_line in sl_lines:
print(f" '{filename}' already found in '{source_list}', skipping")
return
sl_lines.append(file_line)
sl_lines.append(file_line)
sl_lines.sort()
open(source_list_file, 'w').writelines(sl_lines)
@ -170,13 +179,18 @@ def add_to_source_lists(filename, targets):
translated_targets = [source_list_target_translations[t] for t in targets]
print(" source_list targets:", translated_targets)
for t in translated_targets:
add_to_source_list(filename, t)
modify_source_list(filename, t, False)
def remove_from_source_lists(filename):
# remove from all tagerts if -r was specified.
for t in source_list_target_translations.values():
modify_source_list(filename, t, True)
#==============#
# Code::Blocks #
#==============#
def add_to_code_blocks_target(filename, target):
def modify_code_blocks_target(filename, target, remove):
cbp_file = rootdir.joinpath(
"projectfiles",
"CodeBlocks",
@ -190,30 +204,33 @@ def add_to_code_blocks_target(filename, target):
elem = f"\t\t<Unit filename=\"{filename_for_cbp}\" />\n"
# if the target already has an entry with the same filename, loudly skip
if elem in cbp_lines:
print(f" '{filename}' already found in '{target}.cbp', skipping")
return
if remove:
if elem in cbp_lines: cbp_lines.remove(elem)
else:
# if the target already has an entry with the same filename, loudly skip
if elem in cbp_lines:
print(f" '{filename}' already found in '{target}.cbp', skipping")
return
# find an appropriate line to add before/after
index = 0
for line in cbp_lines:
if line.startswith("\t\t<Unit "):
if elem < line:
# find an appropriate line to add before/after
index = 0
for line in cbp_lines:
if line.startswith("\t\t<Unit "):
if elem < line:
break
elif line.startswith("\t\t<Extensions>"):
# we must be the last entry, as this comes after the Unit section
break
elif line.startswith("\t\t<Extensions>"):
# we must be the last entry, as this comes after the Unit section
break
index += 1
cbp_lines.insert(index, elem)
index += 1
cbp_lines.insert(index, elem)
open(cbp_file, 'w').writelines(cbp_lines)
def add_to_code_blocks(filename, targets):
translated_targets = [code_blocks_target_translations[t] for t in targets]
def modify_code_blocks(filename, targets, remove):
translated_targets = code_blocks_target_translations.values() if remove else [code_blocks_target_translations[t] for t in targets]
print(" code::blocks targets:", translated_targets)
for t in translated_targets:
add_to_code_blocks_target(filename, t)
modify_code_blocks_target(filename, t, remove)
def sanity_check_existing_cpp_hpp(filenames):
"""
@ -285,6 +302,8 @@ if __name__ == "__main__":
help="which build targets to add the file to")
ap.add_argument("--no-checks", action="store_true",
help="do not check whether the files exist, etc")
ap.add_argument("-r", "--remove", action="store_true",
help="remove the specified files from projectfiles instead of adding them, --target is then ignored")
# By default, recognise --help too
options = ap.parse_args()
@ -301,7 +320,13 @@ if __name__ == "__main__":
sanity_check_existing_cpp_hpp(filenames)
for filename in filenames:
print(f"adding '{filename}' to targets: {options.target}")
add_to_xcode(filename, options.target)
add_to_source_lists(filename, options.target)
add_to_code_blocks(filename, options.target)
if options.remove:
print(f"removing '{filename}' from all targets")
modify_xcode(filename, options.target, True)
remove_from_source_lists(filename)
modify_code_blocks(filename, options.target, True)
else:
print(f"adding '{filename}' to targets: {options.target}")
modify_xcode(filename, options.target, False)
add_to_source_lists(filename, options.target)
modify_code_blocks(filename, options.target, False)

View file

@ -89,7 +89,6 @@ config_cache/test_transaction
config_cache/test_define_loading
config_cache/test_lead_spaces_loading
config_filters/test_int_add_sub_filter
config_filters/test_int_positive_filter
config_filters/test_int_signed_filter
config_filters/test_without_attribute_filter
filesystem/test_fs_game_path_reverse_engineering
@ -172,20 +171,20 @@ test_lexical_cast_throw<unsigned long long>
test_lexical_cast_throw<float>
test_lexical_cast_throw<double>
test_lexical_cast_throw<long double>
test_lexical_cast_signed<signed char>
test_lexical_cast_signed<short>
test_lexical_cast_signed<int>
test_lexical_cast_signed<long>
test_lexical_cast_long_long
test_lexical_cast_unsigned<unsigned char>
test_lexical_cast_unsigned<unsigned short>
test_lexical_cast_unsigned<unsigned int>
test_lexical_cast_unsigned<unsigned long>
test_lexical_cast_unsigned_long_long
test_lexical_arethmetic_signed<signed char>
test_lexical_arethmetic_signed<short>
test_lexical_arethmetic_signed<int>
test_lexical_arethmetic_signed<long>
test_lexical_arethmetic_signed<long long>
test_lexical_arethmetic_signed<unsigned char>
test_lexical_arethmetic_signed<unsigned short>
test_lexical_arethmetic_signed<unsigned int>
test_lexical_arethmetic_signed<unsigned long>
test_lexical_arethmetic_signed<unsigned long long>
test_lexical_arethmetic_signed<float>
test_lexical_arethmetic_signed<double>
test_lexical_arethmetic_signed<long double>
test_lexical_cast_bool
test_lexical_cast_floating_point<float>
test_lexical_cast_floating_point<double>
test_lexical_cast_floating_point<long double>
test_lexical_cast_result
test_map_location/map_location_characterization_test_radial_mode
test_map_location/reality_check_vector_negation

13022
changelog.md

File diff suppressed because it is too large Load diff

View file

@ -1,2 +0,0 @@
### WML Engine
* Add alignment in [attack] to specify the alignment of an attack independent of the unit's alignment.

View file

@ -1,3 +0,0 @@
### Units
* Walking Corpse: arcane vulnerability reduced from 40% to 20%.
* Soulless: arcane vulnerability reduced from 40% to 20%.

View file

@ -0,0 +1,2 @@
### Units
* Dune Warmaster: HP 59 -> 61 scimitar damage 9 -> 10

View file

@ -0,0 +1,5 @@
### Campaigns
* Eastern Invasion
* S04c: give Mal-Ravanal gold to recruit more units when their army becomes too small
* forbid all Dunefolk units to take the Plague Staff
* fix minor bugs with dialogues

View file

@ -0,0 +1,2 @@
### Units
* Dwarvish Explorer: physical resists reduced from 20% to 10%, melee damage increased from 10 to 11.

View file

@ -0,0 +1,3 @@
### Units
* Fire Wisps and Guardian - Fire Resistance changed from 50% to 70%
* Fire Wraith - Fire Resistance changed from 50% to 80%

View file

@ -1,5 +0,0 @@
### User interface
GUI2 themes can be loaded from add-ons. Requires a `gui-theme.cfg` file in add-on root with a `[gui]` tag that acts as the entry point for the theme.
### Lua API
Added new function gui.switch_theme() to allow switching to another gui2 theme from inside a scenario.

View file

@ -1,2 +0,0 @@
### User interface
* Option key is now identified as such instead of Alt in the Hotkeys preferences section on macOS builds

View file

@ -1,2 +0,0 @@
### User interface
* Search filter should now be case-insensitive for more than just ASCII characters (#9328)

View file

@ -0,0 +1,2 @@
### Units
* Orcish Crossbowman: melee 6-3 -> 4-3, experience to level 43 -> 57

View file

@ -1,2 +0,0 @@
### Formula API
* Removed properties `unit.side` and `terrain.owner`. Use `unit.side_number` and `terrain.owner_side` instead.

View file

@ -1,6 +1,5 @@
Date,File,License,Author - Real Name(other name);Real Name(other name);etc,Notes,Needs Update,MD5
2009/04/10,data/campaigns/Delfadors_Memoirs/sounds/rumble.wav,GNU GPL v2+,Fabian Müller(fabi/fendrin);Eric S. Raymond(esr),,,ba2422ca12aeebe50955c8f44b52243d
2023/09/15,data/campaigns/Eastern_Invasion/music/cry_from_elensefar.ogg,CC BY-SA 4.0,(pluft),,,3b32d7970ab520b2d488559b69b2ac68
2023/09/15,data/campaigns/Eastern_Invasion/music/heavens-remix.ogg,CC BY-SA 4.0,(gabriel silver);(dalas),,,158c80c11e2d2cdb5f1ab5cc0298a8fe
2023/09/15,data/campaigns/Eastern_Invasion/music/journeys_end_faststart.ogg,GNU GPL v2+,Mattias Westlund(West);(dalas),,,3f6b2c8be4e6e30087b7a3cc5969831b
2021/03/20,data/campaigns/Eastern_Invasion/sounds/gate-fall.ogg,GNU GPL v2+,unknown,,,15d08eb898db8684f18de206a6cbd1a5
@ -25,6 +24,7 @@ Date,File,License,Author - Real Name(other name);Real Name(other name);etc,Notes
2013/12/08,data/core/music/battle.ogg,GNU GPL v2+,Aleksi Aubry-Carlson(Aleksi),,,93b53db9e81c0d8879cf4ca51cd246bd
2013/12/08,data/core/music/breaking_the_chains.ogg,GNU GPL v2+,Mattias Westlund(West),,,fe599b1e02f41846a6e2afeb7d6df76e
2013/12/08,data/core/music/casualties_of_war.ogg,GNU GPL v2+,Tyler Johnson,,,f0c69501a222afd01218ed783fef7b14
2023/09/15,data/core/music/cry_from_elensefar.ogg,CC BY-SA 4.0,(pluft),,,3b32d7970ab520b2d488559b69b2ac68
2013/12/08,data/core/music/defeat.ogg,GNU GPL v2+,Timothy Pinkham(TimothyP),,,8cb8eb9871292ad288f5c703f0679460
2013/12/08,data/core/music/defeat2.ogg,GNU GPL v2+,Ryan Reilly(Rain),,,9775634e4a20c10844c823d5d79f824f
2013/12/08,data/core/music/elf-land.ogg,GNU GPL v2+,Aleksi Aubry-Carlson(Aleksi),,,addc5393092c23f2789a028d94f4212e

1 Date File License Author - Real Name(other name);Real Name(other name);etc Notes Needs Update MD5
2 2009/04/10 data/campaigns/Delfadors_Memoirs/sounds/rumble.wav GNU GPL v2+ Fabian Müller(fabi/fendrin);Eric S. Raymond(esr) ba2422ca12aeebe50955c8f44b52243d
2023/09/15 data/campaigns/Eastern_Invasion/music/cry_from_elensefar.ogg CC BY-SA 4.0 (pluft) 3b32d7970ab520b2d488559b69b2ac68
3 2023/09/15 data/campaigns/Eastern_Invasion/music/heavens-remix.ogg CC BY-SA 4.0 (gabriel silver);(dalas) 158c80c11e2d2cdb5f1ab5cc0298a8fe
4 2023/09/15 data/campaigns/Eastern_Invasion/music/journeys_end_faststart.ogg GNU GPL v2+ Mattias Westlund(West);(dalas) 3f6b2c8be4e6e30087b7a3cc5969831b
5 2021/03/20 data/campaigns/Eastern_Invasion/sounds/gate-fall.ogg GNU GPL v2+ unknown 15d08eb898db8684f18de206a6cbd1a5
24 2013/12/08 data/core/music/battle.ogg GNU GPL v2+ Aleksi Aubry-Carlson(Aleksi) 93b53db9e81c0d8879cf4ca51cd246bd
25 2013/12/08 data/core/music/breaking_the_chains.ogg GNU GPL v2+ Mattias Westlund(West) fe599b1e02f41846a6e2afeb7d6df76e
26 2013/12/08 data/core/music/casualties_of_war.ogg GNU GPL v2+ Tyler Johnson f0c69501a222afd01218ed783fef7b14
27 2023/09/15 data/core/music/cry_from_elensefar.ogg CC BY-SA 4.0 (pluft) 3b32d7970ab520b2d488559b69b2ac68
28 2013/12/08 data/core/music/defeat.ogg GNU GPL v2+ Timothy Pinkham(TimothyP) 8cb8eb9871292ad288f5c703f0679460
29 2013/12/08 data/core/music/defeat2.ogg GNU GPL v2+ Ryan Reilly(Rain) 9775634e4a20c10844c823d5d79f824f
30 2013/12/08 data/core/music/elf-land.ogg GNU GPL v2+ Aleksi Aubry-Carlson(Aleksi) addc5393092c23f2789a028d94f4212e

View file

@ -21,6 +21,14 @@
[/option]
[/advanced_preference]
[advanced_preference]
field=addon_icons
name= _ "Whether to show icons in the add-ons list on the add-ons manager"
description= _ "Disabling saves bandwidth by not sending icons for the add-ons list in the add-ons manager"
type=boolean
default=yes
[/advanced_preference]
[advanced_preference]
field=ask_delete
name= _ "Confirm deleting saves"

View file

@ -470,7 +470,7 @@ Note: This is a demonstration of how the Goto Micro AI can be used to code guard
[message]
side=7
type=Vampire Bat
message= _ "Us four bats switch between running off to the corners of the map (each one to a different corner), and getting back in a group right here. Either behavior is set up with a single [micro_ai] tag, one with 'unique_goals=yes', the other without." # wmllint: no spellcheck
message= _ "Us four bats switch between running off to the corners of the map (each one to a different corner), and getting back in a group right here. Either behavior is set up with a single [micro_ai] tag, one with unique_goals=yes, the other without." # wmllint: no spellcheck
[/message]
[/event]
@ -488,7 +488,7 @@ Note: This is a demonstration of how the Goto Micro AI can be used to code guard
[/message]
[message]
speaker=messenger1
message= _ "Dont 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 dont corner them, theyll leave us alone."
message= _ "Dont 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 dont corner them, theyll leave us alone."
[/message]
[event]
name=side 8 turn
@ -553,7 +553,7 @@ Note: This is a demonstration of how the Goto Micro AI can be used to code guard
speaker=messenger1
message= _ "Youre crazy. It might be shorter as the crow flies, but it will take you forever to get through those mountains.
Note: The messengers are controlled by Goto Micro AI definitions that differ by a single line, 'use_straight_line=yes/no'." # wmllint: no spellcheck
Note: The messengers are controlled by Goto Micro AI definitions that differ by a single line, use_straight_line=yes/no." # wmllint: no spellcheck
[/message]
[micro_ai]

View file

@ -398,7 +398,7 @@ separate attack Zone"
speaker=narrator
image=portraits/dwarves/guard.webp
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= _ "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]

View file

@ -147,7 +147,7 @@
[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= _ "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]
@ -224,7 +224,7 @@
[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 Konrads side here. The same algorithm as for scenario ""Protect Unit"" is used."
message= _ "This is a reenactment of scenario “The Elves Besieged” of the mainline campaign “Heir to the Throne”, just that the AI is playing Konrads side here. The same algorithm as for scenario “Protect Unit” is used."
[/message]
[/command]
[/set_menu_item]

View file

@ -3,7 +3,7 @@
# This is AI test scenario which is not visible to casual player.
[test]
id=ai_arena_small
name= _ "AI Arena - small"
name= _ "AI Arena small"
description= _ "Small ai arena"
map_file=ai/maps/scenario-AI_Arena_small.map
random_start_time="no"
@ -310,7 +310,7 @@
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "And so, the AI for team 2 was redeployed from file '$test_path_to_ai'"
message= _ "And so, the AI for team 2 was redeployed from file $test_path_to_ai"
[/message]
[/event]
[/test]

View file

@ -620,10 +620,12 @@
x,y=$x1,$y1
id=Keshan
[/have_unit]
[message]
speaker=unit
message= _ "There is somebody here."
[/message]
[then]
[message]
speaker=unit
message= _ "There is somebody here."
[/message]
[/then]
[else]
[message]
speaker=unit

View file

@ -550,7 +550,7 @@
end
-- level the unit and give it a random amount of experience up to half of max
units[i].experience = units[i].max_experience
units[i]:advance( )
units[i]:advance(false)
units[i].experience = mathx.random ( 0, mathx.round( units[i].max_experience / 2 ) )
end
>>

View file

@ -67,7 +67,7 @@
# e.g. Reducing an ally's gold on high difficulty can make them feel useless, which is not my intention for any of the scenarios with allies
#
# my goal is for Easy/Normal/Hard difficulty to be 20%/60%/100%; that is to say Easy has 1/5 as many enemies as Hard, and Normal has 3/5 as many
# this many not always translate directly to 20/60/100 gold/income, since enemies with many villages effectively have a higher guranteed incoime
# this may not always translate directly to 20/60/100 gold/income, since enemies with many villages effectively have a higher guaranteed income
# also, remember that [side] {INCOME} doesn't include everyone's base +2 income
# and also, some optional "challenge" scenarios have reduced scaling (e.g. All-In), since they're intended as challenges and easily avoidable
#
@ -82,10 +82,10 @@
# S08-S12, Gweddry and Co are in the northlands, dealing with the Chief Dra-Nak subplot and trying to get Dacyn's amulet
# cramped and/or small battles, focused around looting items and saving enough gold to keep your recalls alive in S12
# S13-S18, Gweddry and Co are witnessing a dying Wesnoth, and finally fighting as part of a proper army in a full-fledged war
# big battles, where your performance in S01-S12 determine how successful you'll be
# big battles, where your performance in S01-S12 determines how successful you'll be
#
# the campaign is designed with lots of easy-or-hard branching decision points, where one option is easier but the other option has better rewards
# S12 "Evacuation" also functions as a decision point - you're guranteed a win even if you don't recruit any units, but the fewer recalls escape the more difficult the future will be
# S12 "Evacuation" also functions as a decision point - you're guaranteed a win even if you don't recruit any units, but the fewer recalls escape the more difficult the future will be
# players should be able to complete the campaign by taking only the easy, lower-reward options, culminating in the easier finale S17a "The Duel"
# but only players who've succeeded at some challenges will have a strong enough army to complete the more difficult finale S17b "All-In"
#

View file

@ -81,7 +81,7 @@ function wml_actions.bandit_village_capture(cfg)
vars.villages_visited = visited + 1
wesnoth.game_events.fire("addogin_advice", x, y, unit);
wml.fire("message" , { x = x , y = y , message = _"They're here!"})
wml.fire("message" , { x = x , y = y , message = _"Theyre here!"})
bandits_found(x,y)
return

View file

@ -54,7 +54,7 @@
#po: The River Guard posts had been built in 470 YW; they were abandoned in 544 YW.
#po: The wave of colonization had begun around 530 YW.
#po: This intro starts in 625 YW; the king's forces arrive at the outposts in 626 YW.
story= _ "In the days of King Garard I, two strong points had been built along the near bank of the River Weldyn, south of Soradoc, to stop bandits and orcish raiders out of the Estmarks from entering Wesnoth. In later years, the river guard posts had been abandoned as colonists spread into the Estmarks and the orcs were driven in retreat north of the Great River."
story= _ "In the days of King Garard I, two strong points had been built along the far bank of the River Weldyn, south of Soradoc, to stop bandits and orcish raiders out of the Estmarks from entering Wesnoth. In later years, the river guard posts had been abandoned as colonists spread into the Estmarks and the orcs were driven in retreat north of the Great River."
{EI_BIGMAP}
[/part]
[part]
@ -673,7 +673,7 @@
[message]
speaker=Gweddry
#po: a huge number of undead are spawning
message= _ "Wha- How did so many of them flank us? Were cut off from Wesnoth!"
message= _ "Wha How did so many of them flank us? Were cut off from Wesnoth!"
[/message]
# Dacyn reappears and gives message about trapdoor.

View file

@ -133,6 +133,8 @@
[/modifications]
[/unit]
#endif
#ifdef NORMAL
{NAMED_NOTRAIT_UNIT 3 (Troll Whelp) 23 8 "Hur" (_"Hur")} {GUARDIAN}
[+unit]
[modifications]

View file

@ -321,9 +321,6 @@
#po: star wars reference
message= _ "We will watch your career with great interest..."
[/message]
[endlevel]
result=defeat
[/endlevel]
[/event]
[event]
name=last breath
@ -335,10 +332,6 @@
speaker=Mal-Tar
message= _ "Wait, please, not like this!"
[/message]
# add in the herodeaths. Don't do these before, since we want special behavior for the achievement
{HERODEATH_GWEDDRY}
{HERODEATH_DACYN}
[/event]
[event]
name=die

View file

@ -485,6 +485,7 @@
[/set_achievement]
[/then]
[/if]
{HERODEATH_ADDOGIN}
[/event]
[event]

View file

@ -801,7 +801,7 @@
[else]
[gold]
side=1
amount=-50
amount=-$gold_cost
[/gold]
[sound]
name=gold.ogg
@ -884,7 +884,7 @@
[else]
[gold]
side=1
amount=-150
amount=-$gold_extra
[/gold]
[sound]
name=gold.ogg
@ -1008,7 +1008,7 @@
[/status]
[/modify_unit]
{CLEAR_VARIABLE gold,gold_cost,herbs_needed,herb_locations}
{CLEAR_VARIABLE gold,gold_cost,gold_extra,herbs_needed,herb_locations}
[/event]
[event]

View file

@ -230,31 +230,32 @@
[/effect]
[/modify_unit]
[/event]
[event] # manually set gold to 0
[event]
# if ravanal's low on units and ravanal_no_income is cleared, give him gold
# otherwise, clear Mal-Ravanal's gold so we don't go positive nor negative
name=side 7 turn refresh
first_time_only=no
[filter_condition]
{VARIABLE_CONDITIONAL ravanal_no_income equals yes}
[/filter_condition]
[modify_side]
side=7
gold=0
[/modify_side]
[/event]
[event] # manually set gold to 1000
name=side 1
first_time_only=no
[filter_condition]
[if]
{VARIABLE_CONDITIONAL ravanal_no_income not_equals yes}
[/filter_condition]
[modify_side]
side=7
gold=9999
[/modify_side]
[and]
[have_unit]
side=7
count=0-10
[/have_unit]
[/and]
[then]
[modify_side]
side=7
gold=500
[/modify_side]
[/then]
[else]
[modify_side]
side=7
gold=0
[/modify_side]
[/else]
[/if]
[/event]
#--------------------
@ -664,6 +665,12 @@
side=4
amount={ON_DIFFICULTY 15 45 75} # otherwise his armies start to feel a little thin around now
[/gold]
[fire_event]
name=dacyn_warning
[/fire_event]
[/event]
[event]
name=dacyn_warning
[message]
speaker=Dacyn
message= _ "Gweddry, we should not be here. They are merely toying with us right now, but all will be lost if Mal-Ravanal finds me amongst you!"
@ -687,6 +694,9 @@
[event]
name=ravanal_gets_serious
[fire_event]
name=dacyn_warning
[/fire_event]
{REPLACE_SCENARIO_MUSIC silence.ogg}
[message] # if you change this, also change 06b_Soradoc
speaker=Mal-Ravanal
@ -914,7 +924,7 @@
[/then]
[else]
{FIND_NEARBY (type,side=Knight,1) 36 15 99}
{FIND_NEARBY (trait,side=survivor,1) 36 15 99}
[/else]
[/if]
[message]
@ -923,7 +933,6 @@
[/message]
{FIND_NEARBY (
type=Knight,Terraent
side=8
) 36 15 99}
[message]

View file

@ -516,6 +516,38 @@
{MODIFY_UNIT id=Dacyn attacks_left 0}
[/event]
[event]
name=owaec_joins
[capture_village]
owner_side=2
side=1
[/capture_village]
[modify_unit]
[filter]
side=2
[/filter]
side=1
moves=$($this_unit.max_moves)
attacks_left=1
{TEAM_COLOR_OVERRIDE () blue}
[/modify_unit]
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "(You may now recruit Horsemen and Cavalrymen!)"
[/message]
[set_extra_recruit] # need to set recruits per-unit (instead of per-side) so we don't mess up the plague staff
id=Gweddry
extra_recruit={REGULAR_RECRUIT_LIST}
[/set_extra_recruit]
[set_extra_recruit]
id=Owaec
extra_recruit={REGULAR_RECRUIT_LIST}
[/set_extra_recruit]
[/event]
[event]
name=capture
first_time_only=no
@ -718,34 +750,9 @@
speaker=Owaec
message= _ "Huzzah!! At last, these villagers are liberated! Gweddry, thank you for your aid. I place my Clansmen and myself at your service."
[/message]
[capture_village]
owner_side=2
side=1
[/capture_village]
[modify_unit]
[filter]
side=2
[/filter]
side=1
moves=$($this_unit.max_moves)
attacks_left=1
{TEAM_COLOR_OVERRIDE () blue}
[/modify_unit]
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "(You may now recruit Horsemen and Cavalrymen!)"
[/message]
[set_extra_recruit] # need to set recruits per-unit (instead of per-side) so we don't mess up the plague staff
id=Gweddry
extra_recruit={REGULAR_RECRUIT_LIST}
[/set_extra_recruit]
[set_extra_recruit]
id=Owaec
extra_recruit={REGULAR_RECRUIT_LIST}
[/set_extra_recruit]
[fire_event]
name=owaec_joins
[/fire_event]
[if]
[not]
[have_unit]
@ -879,33 +886,9 @@
speaker=Owaec
message= _ "Huzzah!! May these be the first of many undead to fall before our hooves! Gweddry, thank you for your aid. I place my Clansmen and myself at your service."
[/message]
[capture_village]
owner_side=2
side=1
[/capture_village]
[modify_unit]
[filter]
side=2
[/filter]
side=1
moves=$($this_unit.max_moves)
attacks_left=1
{TEAM_COLOR_OVERRIDE () blue}
[/modify_unit]
[message]
speaker=narrator
image=wesnoth-icon.png
message= _ "(You may now recruit Horsemen and Cavalrymen!)"
[/message]
[set_extra_recruit] # need to set recruits per-unit (instead of per-side) so we don't mess up the plague staff
id=Gweddry
extra_recruit={REGULAR_RECRUIT_LIST}
[/set_extra_recruit]
[set_extra_recruit]
id=Owaec
extra_recruit={REGULAR_RECRUIT_LIST}
[/set_extra_recruit]
[fire_event]
name=owaec_joins
[/fire_event]
[message]
speaker=Owaec
message= _ "Now let us free these villagers from the outlaws terrorizing them!"

View file

@ -918,19 +918,6 @@
[/message]
[/event]
[event]
name=last breath
[filter]
id=Grug
[/filter]
[message]
speaker=Grug
message= _ "Hurt... grarrgghh..." # wmllint: no spellcheck
[/message]
[/event]
{ENEMYDEATHS_SORADOC}
{FOREIGN_DEFEAT}
@ -940,9 +927,8 @@
{HERODEATH_ADDOGIN}
{HERODEATH_HAHID}
{HERODEATH_TERRAENT}
# {HERODEATH_GRUG} # don't have Gweddry say "he was not one of us, yet [...]"
{HERODEATH_GRUG}
{HERODEATH_DOLBURRAS}
{HERODEATH_HAHID}
[/scenario]
#undef SCENARIO_TURN_LIMIT

View file

@ -1731,13 +1731,13 @@ The darkness between worlds opens its maw."
[/message]
[message]
speaker=unit
message= _ "<i>Journal of Ravan - 13 Blackfire, 588 YW.
message= _ "<i>Journal of Ravan 13 Blackfire, 588 YW.
This expedition is proving a greater success than I had anticipated. While Dacyn disarms the traps littered around this place, I have been able to conduct extensive research into the other plane beyond the Maw. There is a realm of souls that can be reached from our very own world, one that Iliah-Malal doubtlessly made contact with using the Amulet of the Veil. From time to time, I hear spirits whispering from the other side, but their voices are faint as of yet. I suspect that if I can somehow reach them, they will be able to answer some of the questions I have been pondering. However, there seems to be a piece of the puzzle still missing.</i>"
[/message]
[message]
speaker=unit
message= _ "<i>Journal of Ravan - 21 Whitefire, 589 YW.
message= _ "<i>Journal of Ravan 21 Whitefire, 589 YW.
I had a dream tonight. Was it a dream? It seemed much more like a vision. I saw a scorching light from twin orbs in the sky, radiating searing brightness over a land teeming with aberrations of constantly shifting flesh. I saw a jewel, no, a key, alight with fire bridging the vast nothingness of the Maw. I saw darkness, merged with light and transfigured, rending the indestructible core of those without form. I hear voices recounting these muddled dreams, yet their words are disjointed, incomprehensible. What are they trying to tell me?</i>"
[/message]
@ -1761,7 +1761,7 @@ I had a dream tonight. Was it a dream? It seemed much more like a vision. I saw
[/filter]
[message]
speaker=unit
message= _ "<i>Journal of Ravan - 5 Bleeding Moon, 597 YW.
message= _ "<i>Journal of Ravan 5 Bleeding Moon, 597 YW.
Nothing is going well. My research has come to a dead end and even the spirits from the other plane no longer speak to me. I can no longer rely on Dacyn either. That stupid man! He decided that playing politics would be a better use of his abilities than helping me decipher this crucial puzzle. As if he could do any good, being the advisor to that half-decrepit old King Haldric. Then again, maybe that is the game Dacyn wants to play. What a shame. I had held him in higher regard than that.</i>"
[/message]

View file

@ -1862,5 +1862,6 @@ Your punishment is death."
{HERODEATH_TERRAENT}
{HERODEATH_DOLBURRAS}
{HERODEATH_GRUG}
{HERODEATH_ADDOGIN}
{HERODEATH_HAHID}
[/scenario]

View file

@ -252,9 +252,9 @@
id=dacyn_no_halo
[effect]
apply_to=remove_ability
[experimental_filter_ability]
[filter_ability]
tag_name=illuminates
[/experimental_filter_ability]
[/filter_ability]
[/effect]
[/object]
[/modify_unit]
@ -419,9 +419,9 @@
id=dacyn_no_halo
[effect]
apply_to=remove_ability
[experimental_filter_ability]
[filter_ability]
tag_name=illuminates
[/experimental_filter_ability]
[/filter_ability]
[/effect]
[/object]
[/modify_unit]
@ -802,7 +802,7 @@ And the strength of our Flight."
[message]
speaker=$found_unit.id
#po: Speaker is an orc, and Mortic is flying towards them. "What? Hey!" *gets killed by Mortic*
message= _ "Wha- hey!"
message= _ "Wha hey!"
[/message]
[animate_unit]
[filter]

View file

@ -5,18 +5,13 @@
# when you stumble upon 1, it awakens some nearby buddies
# when you sight an enemy leader, they recruit, awaken sleepers, and charge at you
#
# the turn limit is very generous. A player with many veterans can finish quickly and have a large bonus for S16
# alternatively, maybe the player only has a few veterans (maybe they lost everything in S12 Evacuation)
# then they can take their time, cap villages, farm XP off the swamp, etc.
# and wait as long as possible to activate enemy leaders
#
# note that the map is based off of the penultimate HttT scenario, "Test of the Clans"
#
#define SCENARIO_TURN_LIMIT
75 #enddef
25 #enddef
#define TURNS_LOW_WARNING
60 #enddef
20 #enddef
[scenario]
id=14_The_Drowned_Plains
@ -778,10 +773,36 @@
clear_shroud=yes
side=1
[/redraw]
#enddef
#define GOLD_PICKUP X Y IMAGE AMOUNT LABEL
{PLACE_IMAGE {IMAGE} {X} {Y}}
{SET_LABEL {X} {Y} {LABEL}}
[event]
name=moveto
[filter]
side=1
x,y={X},{Y}
[/filter]
[sound]
name=gold.ogg
[/sound]
[gold]
side,amount=1,{AMOUNT}
[/gold]
{REMOVE_IMAGE $unit.x $unit.y}
{REMOVE_LABEL {X} {Y}}
[/event]
#enddef
[event]
name=prestart
{GOLD_PICKUP 69 43 items/gold-coins-medium.png 105 _"105 gold"}
{GOLD_PICKUP 70 41 items/gold-coins-small.png 80 _"80 gold"}
{GOLD_PICKUP 18 4 items/gold-coins-medium.png 175 _"175 gold"}
{GOLD_PICKUP 9 50 items/gold-coins-small.png 55 _"55 gold"}
{GOLD_PICKUP 8 50 items/gold-coins-medium.png 150 _"150 gold"}
{GOLD_PICKUP 5 51 items/gold-coins-small.png 80 _"80 gold"}
{SET_LABEL 16 24 _"Lord Alrics Palace" }
{SET_LABEL 17 5 _"Sir Efrans Castle" }
{SET_LABEL 7 50 _"Lord Gaelycs Citadel"}
@ -1257,13 +1278,15 @@
[/message]
[message]
speaker=Gweddry
message= _ "I agree, yet all is strangely quiet. Perhaps the remaining undead lie dormant? If we take time to capture villages and rebuild our forces, we may yet be able to reclaim this place."
message= _ "I agree, yet all is strangely quiet. Perhaps the remaining undead lie dormant?
Even if we lack the strength to truly reclaim this place, we should still take the opportunity to gather what supplies remain. When finally we meet the shambling hordes responsible for all this destruction, we must not find our armories wanting."
[/message]
[objectives]
side=1
[objective]
description= _ "Defeat all enemy leaders"
description= _ "Gather as much gold as you can before turns run out."
condition=win
[/objective]
[objective]
@ -1278,17 +1301,13 @@
description= _ "Death of Gweddry, Dacyn, or Owaec"
condition=lose
[/objective]
{TURNS_RUN_OUT}
[gold_carryover]
bonus=yes
carryover_percentage=40
bonus=no
carryover_percentage=80
[/gold_carryover]
[note]
description= _ "Enemy leaders are idle until first sighted, but will then abandon their keep and attack you."
[/note]
[note]
description= _ "It may be wise to capture villages and build up an army before attacking."
[/note]
[/objectives]
[event]
@ -1744,19 +1763,44 @@ I offer one final prayer to the Light, that at least my family may be spared and
[filter]
id=Khrakrahs
[/filter]
[effect]
apply_to=new_ability
[abilities]
{ABILITY_TERROR}
[/abilities]
[/effect]
[effect]
apply_to=movement
set=3
set=3 # needs to be slow, or else his escort can't keep up
[/effect]
[effect]
apply_to=hitpoints
increase_total={ON_DIFFICULTY 0 25 50}
heal_full=yes
[/effect]
[effect]
apply_to=new_attack
name=tail
description= _"tail"
icon=attacks/tail-dragon.png~GS()
type=impact
range=melee
damage=41 # not quite enough to 1-shot a Heavy Infantryman, unless at night and non-illuminated. This makes the difference between a HI and a Shock Trooper less extreme
number=1
[/effect]
[effect]
apply_to=new_animation
[attack_anim]
[filter_attack]
name=tail
[/filter_attack]
start_time=-200
[frame]
image="units/monsters/skeletal-dragon/skeletal-dragon.png:400"
[/frame]
{SOUND:HIT_AND_MISS mace.ogg mace-miss.ogg -75}
[/attack_anim]
[/effect]
# needs to be slow, or else his escort can't keep up
[/object]
[fire_event]
name=moveto
@ -2049,53 +2093,42 @@ I offer one final prayer to the Light, that at least my family may be spared and
# FLAVOR
#--------------------
[event]
name=last breath
[filter]
id=Sir Seoraery,Sir Efran,Khrakrahs
[/filter]
[event]
name=new turn
[event]
name=new turn
[message]
speaker=Gweddry
#po: spoken at the start of a new turn after killing the first undead leader
message= _ "Dacyn, Ive been thinking. This artifact has had such a draining effect on you. Perhaps you should rest and take a moment to regain your strength? I could carry the Amulet for a while, or we could store it away."
[/message]
[message]
speaker=Dacyn
message= _ "Hmm... I suppose there would be no harm in locking it up somewhere safe."
[/message]
[message]
caption= _ "Unknown"
image=units/unknown-unit1.png
#po: voices from the amulet talking to Dacyn
message= _ "<span size='small' font-style='italic'>You have a great weapon... and you would simply lock it away?</span>"
[/message]
[message]
caption= _ "Unknown 2"
image=units/unknown-unit2.png
#po: voices from the amulet talking to Dacyn, speaking of Gweddry
message= _ "<span size='small' font-style='italic'>His intent is good, but his spirit is weak... he would be corrupted...</span>"
[/message]
[message]
caption= _ "Unknown"
image=units/unknown-unit1.png
#po: voices from the amulet talking to Dacyn
message= _ "<span size='small' font-style='italic'>Only you can be trusted with this responsibility.</span>"
[/message]
[message]
speaker=Dacyn
message= _ "But on the other hand... this is a dangerous artifact. I fear that only I can withstand its energies."
[/message]
[message]
speaker=Gweddry
message= _ "Well, youre the magic expert."
[/message]
[/event]
[/event]
name=turn 16
[message]
speaker=Gweddry
#po: spoken at the start of a new turn after killing the first undead leader
message= _ "Dacyn, Ive been thinking. This artifact has had such a draining effect on you. Perhaps you should rest and take a moment to regain your strength? I could carry the Amulet for a while, or we could store it away."
[/message]
[message]
speaker=Dacyn
message= _ "Hmm... I suppose there would be no harm in locking it up somewhere safe."
[/message]
[message]
caption= _ "Unknown"
image=units/unknown-unit1.png
#po: voices from the amulet talking to Dacyn
message= _ "<span size='small' font-style='italic'>You have a great weapon... and you would simply lock it away?</span>"
[/message]
[message]
caption= _ "Unknown 2"
image=units/unknown-unit2.png
#po: voices from the amulet talking to Dacyn, speaking of Gweddry
message= _ "<span size='small' font-style='italic'>His intent is good, but his spirit is weak... he would be corrupted...</span>"
[/message]
[message]
caption= _ "Unknown"
image=units/unknown-unit1.png
#po: voices from the amulet talking to Dacyn
message= _ "<span size='small' font-style='italic'>Only you can be trusted with this responsibility.</span>"
[/message]
[message]
speaker=Dacyn
message= _ "But on the other hand... this is a dangerous artifact. I fear that only I can withstand its energies."
[/message]
[message]
speaker=Gweddry
message= _ "Well, youre the magic expert."
[/message]
[/event]
#--------------------
@ -2106,32 +2139,24 @@ I offer one final prayer to the Light, that at least my family may be spared and
name=side 1 turn {TURNS_LOW_WARNING}
[message]
speaker=Gweddry
message= _ "We must finish here and hurry on from this dead place! If the Horse Clans have fallen so completely, I fear for Weldyn and the rest of Wesnoth."
[/message]
[message]
speaker=Dacyn
message= _ "Why are we here at all? We should be advancing towards Weldyn, not humoring Owaecs lust for vengeance. The Plains are already drowned."
message= _ "If the Horse Clans have fallen so completely, I fear for Weldyn and the rest of Wesnoth. We must make the most of our time here; we cannot afford to tarry too long."
[/message]
[/event]
# time over
[event]
name=side 1 turn {SCENARIO_TURN_LIMIT} end
[message]
speaker=Dacyn
#po: time over, talking to Owaec
message= _ "Enough of this. We have wasted too much time here already; give up your foolish quest of vengeance and travel on."
[/message]
name=time over # not side 1 turn end, so the AI gets a chance to attack
[message]
speaker=Owaec
#po: time over, talking to Dacyn
message= _ "Your search for foul magic has caused enough harm already, and now you would leave my countrymens bodies defiled by undeath? I will slay everything that moves in this swamp, and once I am done, perhaps my hammer will find you next!"
message= _ "So much death. So many of my kinsmen left unavenged. If only we had more time..."
[/message]
[message]
speaker=Dacyn
message= _ "You fools are welcome to linger here clearing this swamp, but I intend to travel on alone and defeat Mal-Ravanal. Go as you wish on your own. I have a task to complete."
speaker=Gweddry
message= _ "We have done all we could here."
[/message]
[endlevel]
result=defeat
result=victory
bonus=no
{NEW_GOLD_CARRYOVER 80}
[/endlevel]
[/event]
@ -2139,40 +2164,35 @@ I offer one final prayer to the Light, that at least my family may be spared and
[event]
name=die
first_time_only=no
[filter]
id=Sir Seoraery,Sir Efran,Khrakrahs
[/filter]
[if]
[not]
[have_unit]
id=Sir Seoraery,Sir Efran,Khrakrahs
[/have_unit]
[/not]
[then]
[message]
speaker=Owaec
message= _ "It is done. My kinsmen have been avenged."
[/message]
{KILL_COUNT 4 side=2,3,4,6,8 ANIMATE=yes}
{KILL side=2,3,4,5,6,7,8}
[endlevel]
result=victory
bonus=yes
{NEW_GOLD_CARRYOVER 40}
{NEW_GOLD_CARRYOVER 80}
[/endlevel]
[/then]
[/if]
[/event]
[event]
name=victory
{KILL_COUNT 4 side=2,3,4,6,8 ANIMATE=yes}
{KILL side=2,3,4,5,6,7,8}
[message]
speaker=Owaec
message= _ "It is done. My kinsmen have been avenged."
[/message]
[delay]
time=1000
[/delay]
[message]
speaker=Owaec
message= _ "Mage... I owe you an apology. This destruction... even had we journeyed here instead of questing north, we would most assuredly have made no difference. Of that I am now certain.
@ -2183,11 +2203,9 @@ The fates may yet reveal that our journey north was necessary, even at such a st
speaker=Dacyn
message= _ "Apology accepted."
[/message]
[delay]
time=2000
[/delay]
[message]
speaker=Dacyn
message= _ "And I too must admit, I underestimated the power in this Amulet. Even now, voices gnaw at the edges of my mind..."

View file

@ -37,7 +37,7 @@
controller=human
team_name=good
user_team_name=_"Wesnothians"
{GOLD 100 75 50} # you're expected to have a large early finish bonus from S14; maybe 300-600 gold
{GOLD 0 0 0} # you're expected to have a large early finish bonus from S14; maybe 300-600 gold
# you get a lot of income, so even with no carryover you can still recruit enough to defend the central island
{FLAG_VARIANT loyalist}
[/side]
@ -1882,7 +1882,7 @@ And leave eternal night to remain."
[message]
speaker=Mel Guthrak
#po: last breath of Mel Guthrak
message= _ "Wha- but how?"
message= _ "Wha but how?"
[/message]
[message]
speaker=Gaennell

View file

@ -315,50 +315,30 @@
time=750
[/delay]
[message]
speaker=Konrad
image=portraits/konrad_II.webp
message= _ "Dolburras, Owaec has told me of the help you provided his men; both your skill at arms and your tenacious spirit. We wish to offer you this finely crafted shield — an heirloom of my line — and an honor guard as you return to Knalga."
[/message]
[if]
{VARIABLE_CONDITIONAL plague_staff_wielder_id equals Dolburras}
[have_unit]
id=Owaec
[/have_unit]
[then]
[message]
speaker=Konrad
image=portraits/konrad_II.webp
#po: the player chose to give Dolburras the plague staff
message= _ "Dwarf, <i>necromancer</i>, know that Wesnoth will never tolerate your kind. You shall surrender that accursed stave to be destroyed, you shall foreswear the practice of all magic on penalty of death, and you are hereby exiled from Wesnoth. Be grateful for Our mercy."
[/message]
[message]
speaker=Dolburras
#po: "Yeah, fair enough. I don't think my kinsmen will look kindly upon necromancies either."
message= _ "Aye, fair enough. I dinnae think my kinsmen will look kindly upon necromancies either."
#po: "Aye, I am honored. You have my sincerest thanks, your Majesty."
message= _ "Aye, I be honored. Ye have my sincerest thanks, yer Majesty."
[/message]
{CLEAR_VARIABLE plague_staff_wielder_id}
[/then]
[else]
[message]
speaker=Konrad
image=portraits/konrad_II.webp
message= _ "Dolburras, Owaec has told me of the help you provided his men; both your skill at arms and your tenacious spirit. We wish to offer you this finely crafted shield — an heirloom of my line — and an honor guard as you return to Knalga."
speaker=Dolburras
#po: Owaec's dead
message= _ "Aye, I be honored. I only wish he were here to see the Clans avenged."
[/message]
[if]
[have_unit]
id=Owaec
[/have_unit]
[then]
[message]
speaker=Dolburras
#po: "Aye, I am honored. You have my sincerest thanks, your Majesty."
message= _ "Aye, I be honored. Ye have my sincerest thanks, yer Majesty."
[/message]
[/then]
[else]
[message]
speaker=Dolburras
#po: Owaec's dead
message= _ "Aye, I be honored. I only wish he were here to see the Clans avenged."
[/message]
[/else]
[/if]
[/else]
[/if]
[/then]
@ -423,34 +403,15 @@
time=750
[/delay]
[if]
{VARIABLE_CONDITIONAL plague_staff_wielder_id equals "Hahid al-Ali"}
[then]
[message]
speaker=Konrad
image=portraits/konrad_II.webp
#po: the player chose to give Hahid the plague staff
message= _ "Southerner, <i>necromancer</i>, know that Wesnoth will never tolerate your kind. You shall surrender that accursed stave to be destroyed, you shall foreswear the practice of all magic on penalty of death, and you are hereby exiled back to the desert wastes. Be grateful for Our mercy."
[/message]
[message]
speaker=Hahid al-Ali
message= _ "Bah, I save you barbarians from an invasion, and this is the thanks I get! What happened to being paid thrice what Im owed? So much for northerner generosity!"
[/message]
{CLEAR_VARIABLE plague_staff_wielder_id}
[/then]
[else]
[message]
speaker=Konrad
image=portraits/konrad_II.webp
message= _ "Hahid al-Ali, We know of your far-off people, but great distance has caused little contact between us. May it be thus no longer. If you accept, We would appoint you as ambassador between our two realms."
[/message]
[message]
speaker=Hahid al-Ali
message= _ "Me, ambassador to the barbarian kingdoms, what a thought! I am honored, and would be even more honored to learn that the job comes with... excellent pay I hope?"
[/message]
[/else]
[/if]
[message]
speaker=Konrad
image=portraits/konrad_II.webp
message= _ "Hahid al-Ali, We know of your far-off people, but great distance has caused little contact between us. May it be thus no longer. If you accept, We would appoint you as ambassador between our two realms."
[/message]
[message]
speaker=Hahid al-Ali
message= _ "Me, ambassador to the barbarian kingdoms, what a thought! I am honored, and would be even more honored to learn that the job comes with... excellent pay I hope?"
[/message]
[/then]
[/if]

View file

@ -26,7 +26,7 @@
die_sound=lich-die.ogg
{DEFENSE_ANIM "units/dacyn/dacyn-L5-defend1.png" "units/dacyn/dacyn-L5-defend2.png" {SOUND_LIST:HUMAN_OLD_HIT} }
[resistance]
arcane=130
arcane=120
cold=70
[/resistance]

View file

@ -20,7 +20,7 @@
die_sound={SOUND_LIST:HUMAN_OLD_DIE}
{DEFENSE_ANIM "units/dacyn/dacyn-L3-defend1.png" "units/dacyn/dacyn-L3-defend2.png" {SOUND_LIST:HUMAN_OLD_HIT} }
[resistance]
arcane=90
arcane=80
cold=80
[/resistance]

View file

@ -533,7 +533,7 @@ When an enemy unit of lower level within a 2 hex radius engages in combat, its a
id=arcane_damage_blessing
name= _ "arcane blessing"
description= _ "All attacks combine the arcane type with the type of the weapon used, so that resistance to arcane does not penalize the user."
special_note=_ "This unit's weapons are treated as arcane instead of the declared damage type if that would increase the damage."
special_note=_ "This units weapons are treated as arcane instead of the declared damage type if that would increase the damage."
alternative_type=arcane
affect_self=yes
overlay_image="misc/arcane-icon.png"
@ -545,7 +545,7 @@ When an enemy unit of lower level within a 2 hex radius engages in combat, its a
id=arcane_damage_ranged_blessing
name= _ "arcane blessing"
description= _ "All bow or crossbow attacks combine the arcane type with the type of the weapon used, so that resistance to arcane does not penalize the user."
special_note=_ "This unit's bow or crossbow attacks are treated as arcane instead of the declared damage type if that would increase the damage."
special_note=_ "This units bow or crossbow attacks are treated as arcane instead of the declared damage type if that would increase the damage."
alternative_type=arcane
affect_self=yes
overlay_image="misc/crystal-quiver-icon.png"

View file

@ -118,7 +118,7 @@
[message]
speaker=Dolburras
message= _ "Watch out behind ye- ach!" # wmllint: no spellcheck
message= _ "Watch out behind ye ach!" # wmllint: no spellcheck
[/message]
[message]
speaker=Gweddry
@ -139,7 +139,8 @@
message= _ "Hurt... grarrgghh..." # wmllint: no spellcheck
[/message]
[message]
speaker=Gweddry
id=Gweddry
side=$unit.side
message= _ "Though he was not one of us, he served bravely alongside Wesnoths best. We must carry on the good fight."
[/message]
[/event]
@ -171,11 +172,13 @@
message= _ "Alas, my long, storied, and exceedingly profitable career has at last come to an end, so far from home! I only... wish I could have died on the soft sands... instead of among these primitive barbarians..."
[/message]
[message]
speaker=Grug
id=Grug
side=$unit.side
message= _ "Bar... ber... bears? Die why?"
[/message]
[message]
speaker=Dolburras
id=Dolburras
side=$unit.side
message= _ "Aye, tis a sad place for one o us foreigners to fall. Well miss ye, thats for sure."
[/message]
[/event]

View file

@ -558,7 +558,7 @@
{MODIFY_TERRAIN Qxua 24 2}
[message]
speaker=Mal-Ravanal
message= _ "Wha- what is this?!"
message= _ "Wha what is this?!"
[/message]
{DACYN_ATTACK}
@ -768,7 +768,7 @@
[/message]
[message]
speaker=Dacyn
message= _ "Wha- where am I? Whats happening to me?"
message= _ "Wha where am I? Whats happening to me?"
[/message]
[message]
speaker=spirit

View file

@ -70,10 +70,7 @@
[/then]
[else]
[message]
speaker=unit
message={INVALID_DESC}
[/message]
{INVALID_DESC}
[/else]
[/if]
[/event]
@ -139,7 +136,7 @@ crystal_quiver #enddef
_"Crystal Quiver"
_"Arrows from this crystalline quiver glimmer with a pale magical light, <i><b>illuminating</b></i> the surrounding area and making your bow or crossbow attacks <i><b>arcane</b></i>."
{NOTE_REUSEABLE}
""
()
(
[effect]
apply_to=new_ability
@ -181,7 +178,7 @@ holy_amulet_3 #enddef
_"Holy Amulet"
_"Engraved with a consecrated symbol, this amulet will bless both your <i><b>melee</b></i> and <i><b>ranged</b></i> attacks with <i><b>arcane</b></i> damage."
{NOTE_REUSEABLE}
""
()
(
[effect]
apply_to=new_ability
@ -216,7 +213,7 @@ sentinel #enddef
_"Shield of the Sentinel"
_"Deep within this shields towering bulk, enchanted machinery whirrs faintly. Whenever an adjacent ally is hit by an attack, <i><b>this shields bearer is hit instead</b></i>."
{NOTE_REUSEABLE}
""
()
(
[effect]
apply_to=overlay
@ -568,7 +565,7 @@ yeti_steak #enddef
_"Yetiburger"
_"Eating this funny tasting meat <i><b>doubles your hitpoints</b></i> and grants <i><b>immunity to cold</b></i>."
{NOTE_SINGLE_USE}
""
()
(
[effect]
apply_to=hitpoints
@ -598,7 +595,7 @@ yeti_steak #enddef
<i><b><span color='#FF0000'>-1</span> damage, <span color='#FF0000'>-1</span> movement, <span color='#00FF00'>+10</span> hitpoints</b></i>."
{NOTE_SINGLE_USE}
""
()
(
[effect]
apply_to=movement
@ -631,7 +628,7 @@ baneblade #enddef
_"This incorporeal sword resembles those wielded by undead wraiths. Any mortal brave enough to wield it becomes <i><b>chaotic</b></i> and lashes out at their foes with reckless abandon.
<i><b>6x4 arcane</b></i> damage, <i><b>drains</b></i>, <i><b>berserk</b></i>."
{NOTE_REUSEABLE}
""
()
(
[effect]
apply_to=attack
@ -696,7 +693,7 @@ potion_of_barkskin #enddef
_"Potion of Barkskin"
_"This potion bubbles as though over an open flame, yet is cool to the touch. Its drinker gains the <i><b>steadfast</b></i> ability and can <i><b>heal 2 hitpoints each turn</b></i>, like dwarves with the healthy trait."
{NOTE_SINGLE_USE}
""
()
(
[effect]
apply_to=new_ability
@ -728,7 +725,7 @@ ring_of_invisibility #enddef
_"Ring of Invisibility"
_"This plain gold ring looks unremarkable, but its wearer gains <i><b>skirmisher</b></i> and <i><b>nightstalk</b></i>, becoming invisible in the dark."
{NOTE_REUSEABLE}
""
()
(
[effect]
apply_to=new_ability
@ -767,15 +764,15 @@ plague_staff #enddef
{ID_PLAGUE_STAFF} _"staff" items/plague-staff.png {X} {Y}
(
[not]
type_adv_tree=White Mage,Paladin
[not]
id=Dacyn
[/not]
race=dunefolk
[/not]
[not]
id=Owaec,Gweddry,Dacyn,Hahid al-Ali,Terraent,Konrad
type_adv_tree=White Mage,Paladin
[/not]
[not]
id=Owaec,Gweddry,Dacyn,Terraent,Konrad
[/not]
# messes with existing recruiting, and messes with the S18 cutscene
# if Dacyn gets this, it also breaks his scripted advancements (and his S17a recruitment)
@ -784,8 +781,83 @@ plague_staff #enddef
_"Looted from a dead necromancer, the wielder of this dark staff becomes <i><b>chaotic</b></i>, and can <i><b>recruit and recall</b></i> Walking Corpses and Soulless.
<i><b>6x3 impact</b></i> damage, <i>plague</i>."
{NOTE_REUSEABLE}
_"I will not wield such a dark magical artifact, though I shall not begrudge its use by my companions."
# this message makes no sense for Dacyn (his entire quest is to get a dark magical artifact), but I couldn't think of something good and generic that works for everyone.
(
[switch]
variable=unit.id
[case]
value=Owaec
[message]
speaker=unit
message=_"Do not insult me! No clansman will ever stoop to such black magic."
[/message]
[/case]
[case]
value=Gweddry
[message]
speaker=unit
message=_"I already have an army of human soldiers — living soldiers. Let someone else use this staff."
[/message]
[/case]
[case]
value=Dacyn
[message]
speaker=unit
message=_"Tempting! Most tempting... but I fear it would be unwise for me to wield such a thing. That privilege passes onto another."
[/message]
[/case]
[case]
value=Hahid al-Ali
[message]
speaker=unit
message=_"Ha! Good joke! Im not about to mess around with any of your foul northerner magic; necromancy was the cause of all this trouble in the first place."
[/message]
[/case]
[case]
value=Terraent
[message]
speaker=unit
message=_"I serve the light, not this staff of foul darkness! We should cast away this thing and be done with it."
[/message]
[/case]
[case]
value=Konrad
[message]
speaker=unit
message=_"...what foul thing is this? Remove it from my presence; necromancy shall not take root in Wesnoth, not under my watch."
[/message]
[/case]
[else]
[switch]
variable=unit.type
[case]
value=White Mage,Mage of Light,Paladin
[message]
speaker=unit
message=_"No. I serve that which is good and light, and will not wield such a dark magical artifact."
[/message]
[/case]
[else]
[switch]
variable=unit.race
[case]
value=dunefolk
[message]
speaker=unit
message=_"Fighting your northerners foul magic is bad enough. Dont expect me to wield that — civilized cultures dont mess around with magic."
[/message]
[/case]
[else]
[message]
speaker=unit
message=_"I will not wield such a dark magical artifact, though I shall not begrudge its use by my companions."
[/message]
[/else]
[/switch]
[/else]
[/switch]
[/else]
[/switch]
)
(
[effect]
apply_to=new_attack

View file

@ -574,13 +574,13 @@ Been a tough few days since we left Elensefar with all them patrols running arou
[event]
name=attack_end
[filter]
side=2
side=3
[/filter]
[filter_second]
side=1
[/filter_second]
{IF_VAR $second_unit.hitpoints greater_than 0 (
{IF_VAR second_unit.hitpoints greater_than 0 (
[then]
[message]
speaker=Baldras

View file

@ -300,7 +300,8 @@
[message]
role=Supporter
message= _ "Great idea, Tallin. It's so dark I probably couldnt even fight a bat down here."
# po: sarcasm about the idea of entering the mines where this scenario takes place
message= _ "Great idea, Tallin. Its so dark I probably couldnt even fight a bat down here."
[/message]
[move_unit_fake]

View file

@ -144,8 +144,8 @@
x,y=18,1
side=2
[modifications]
{TRAIT_STRONG}
{TRAIT_RESILIENT}
{TRAIT_QUICK}
{TRAIT_DEXTROUS}
[/modifications]
[/unit]
[unit]
@ -156,8 +156,8 @@
side=2
facing=sw
[modifications]
{TRAIT_DEXTROUS}
{TRAIT_RESILIENT}
{TRAIT_STRONG}
{TRAIT_QUICK}
[/modifications]
[/unit]
[unit]
@ -172,6 +172,18 @@
{TRAIT_RESILIENT}
[/modifications]
[/unit]
[unit]
type=Elvish Outrider
id=Ealin
name= _ "Ealin"
x,y=18,1
side=2
facing=sw
[modifications]
{TRAIT_QUICK}
{TRAIT_RESILIENT}
[/modifications]
[/unit]
[scroll_to]
x,y=18,1
[/scroll_to]
@ -263,7 +275,7 @@
[message]
id=Alanin
message= _ "Oh no, more of them? And there I thought I could catch my breath"
message= _ "Oh no, more of them? And there I thought I could catch my breath..."
[/message]
[message]

View file

@ -113,7 +113,7 @@
[/ai]
[unit]
id=Gathor
name= _ "Bar'Gathor"
name= _ "BarGathor"
type=Orcish Warrior
profile=portraits/orcs/grunt-3.webp
[modifications]

View file

@ -67,6 +67,8 @@
comment = "Sprite animations (defense and magic) of orcish shamans"
[/entry]
[/about]
{ENABLE_SAURIAN_SPEARTHROWER}
[/campaign]
#ifdef CAMPAIGN_SON_OF_THE_BLACK_EYE

View file

@ -764,7 +764,7 @@
[then]
{LOOT $stored_Gruu_side.gold 1}
[+message]
message= _ "You retrieve $amount_gold of Grüü's leftover gold."
message= _ "You retrieve $amount_gold of Grüüs leftover gold."
[/message]
[gold]

View file

@ -69,10 +69,6 @@
path=data/campaigns/The_Hammer_of_Thursagan/
[/binary_path]
[lua]
code="wesnoth.require 'campaigns/The_Hammer_of_Thursagan/lua/spawns.lua'"
[/lua]
{campaigns/The_Hammer_of_Thursagan/utils}
[units]

View file

@ -1 +1,28 @@
#textdomain wesnoth-thot
[achievement_group]
display_name=_"The Hammer of Thursagan"
content_for=the_hammer_of_thursagan
[achievement]
id="gryphon_hunter"
name=_"Gryphon Hunter"
description=_"Kill the Gryphon leader in High Pass"
hidden=yes
icon="data/core/images/units/monsters/gryphon.png"
icon_completed="data/core/images/units/monsters/gryphon.png~SCALE(72,72)~BLIT("data/core/images/misc/achievement-frames/frame-3-red.png",0,0)"
[/achievement]
[achievement]
id="conqueror_of_the_forest"
name=_"Conqueror of the Forest"
description=_"Defeat an enemy leader in Forbidden Forest"
icon="data/core/images/units/woses/wose-die-fall-5.png"
icon_completed="data/core/images/units/woses/wose-die-fall-5.png~SCALE(72,72)~BLIT("data/core/images/misc/achievement-frames/frame-8-grey.png",0,0)"
[/achievement]
[achievement]
id="new_thursagan"
name=_"New Thursagan"
description=_"Complete The Underlevels on challenging difficulty"
icon="data/core/images/items/hammer-runic.png"
icon_completed="data/core/images/items/hammer-runic.png~SCALE(72,72)~BLIT("data/core/images/misc/achievement-frames/frame-3-red.png",0,0)"
[/achievement]
[/achievement_group]

View file

@ -1,35 +0,0 @@
-- Used for the bandit spawns in scenario 5
local utils = wesnoth.require "wml-utils"
local wml_actions = wesnoth.wml_actions
local T = wml.tag
function wml_actions.spawn_units(cfg)
local x = cfg.x or wml.error("[spawn_units] missing required x= attribute.")
local y = cfg.y or wml.error("[spawn_units] missing required y= attribute.")
local types = cfg.types or wml.error("[spawn_units] missing required types= attribute.")
local count = cfg.count or wml.error("[spawn_units] missing required count= attribute.")
local side = cfg.side or wml.error("[spawn_units] missing required side= attribute.")
local done = 0
for i=1,count do
local locs = wesnoth.map.find({T["not"] { T.filter {} } , T["and"] { x = x, y = y, radius = 1 } })
if #locs == 0 then locs = wesnoth.map.find({T["not"] { T.filter {} } , T["and"] { x = x, y = y, radius = 2 } }) end
if #locs == 0 then break end
done = done + 1
local unit_type = mathx.random_choice(types)
local loc_i = mathx.random_choice("1.."..#locs)
wml_actions.move_unit_fake({x = string.format("%d,%d", x, locs[loc_i][1]) , y = string.format("%d,%d", y, locs[loc_i][2]) , type = unit_type , side = side})
wesnoth.units.to_map({ type = unit_type , side = side, random_traits = "yes", generate_name = "yes" , upkeep = "loyal" }, locs[loc_i][1], locs[loc_i][2])
end
if done > 0 then
for then_child in wml.child_range(cfg, "then") do
local action = utils.handle_event_commands(then_child, "conditional")
if action ~= "none" then return end
end
end
end

View file

@ -233,6 +233,19 @@
#endif
[/event]
[event]
name=die
[filter]
id="Kaara"
[/filter]
[set_achievement]
content_for=the_hammer_of_thursagan
id="gryphon_hunter"
[/set_achievement]
[/event]
[event]
{QUANTITY name (turn 16) (turn 14) (turn 9)}

View file

@ -249,6 +249,25 @@
[/move_unit_fake]
[/event]
#Death of an enemy leader
[event]
name=die
[filter]
canrecruit=yes
[not]
side=1
[/not]
[/filter]
[message]
speaker=second_unit
message= _ "We shall pass!"
[/message]
[set_achievement]
content_for=the_hammer_of_thursagan
id="conqueror_of_the_forest"
[/set_achievement]
[/event]
# Angarthing and Aiglondur speak when they reach the signpost.
[event]
name=moveto
@ -316,7 +335,7 @@
[/or]
[/filter_condition]
# If Aiglondor is on the signpost and Angarthing next to him, or the other way around,
# If Aiglondur is on the signpost and Angarthing next to him, or the other way around,
# the player has won. Fire Aiglondur's and Angarthing's messages if they haven't fired yet.
[fire_event]
name=Aiglondur message

View file

@ -1294,6 +1294,13 @@
result=victory
carryover_report=no
[/endlevel]
#ifdef HARD
[set_achievement]
content_for=the_hammer_of_thursagan
id="new_thursagan"
[/set_achievement]
#endif
[/event]
#########################################################################################
######################################## Deaths #########################################

View file

@ -542,7 +542,7 @@ _f, _f, Re, _f
[message]
speaker=narrator
{NARRATOR: _"Deoran and Urza Afalas retreated quickly from Mebrin's fortress..."}
{NARRATOR: _"Deoran and Urza Afalas retreated quickly from Mebrins fortress..."}
image=wesnoth-icon.png
[/message]

View file

@ -13,7 +13,7 @@
image="data/campaigns/Under_the_Burning_Suns/images/campaign_image.png"
abbrev= _ "UtBS"
rank=205
year="300 AF"
year="1000 AF"
define=CAMPAIGN_UNDER_THE_BURNING_SUNS
first_scenario=01_The_Morning_After

View file

@ -8,12 +8,12 @@
hitpoints=22
movement_type=dwarvishfoot
movement=4
experience=50
experience=25
{AMLA_DEFAULT}
advances_to=null
level=1
level=0
alignment=neutral
cost=17
cost=12
usage=fighter
# wmllint: local spelling Dawarf
description= _ "Dont ask where the Dawarf came from. You really dont want to know. It is a secret well guarded by the great lore-masters of Wesnoth. And it isnt pretty. Hint: it involves lots of sherbet."

View file

@ -1548,10 +1548,10 @@ _ "cooldown 1"#enddef
_ "cooldown 2"#enddef
#define STR_COOLDOWN_RESTRICT_2
_ "After using this attack, you can't use it during your next turn."#enddef
_ "After using this attack, you cant use it during your next turn."#enddef
#define STR_COOLDOWN_RESTRICT_3
_ "After using this attack, you can't use it during your next two turns."#enddef
_ "After using this attack, you cant use it during your next two turns."#enddef
#define WEAPON_SPECIAL_COOLDOWN X

View file

@ -2,7 +2,7 @@ local _ = wesnoth.textdomain 'wesnoth-wc'
local on_event = wesnoth.require("on_event")
local strings = {
enemy_pet = _ "$name|'s pet"
enemy_pet = _ "$name|s pet"
}
-- in the later scenarios there is a small chance that a scenario will be themed for an enemy
-- which means in paticular changing the castle of the enemy accorign to the unit type of that

View file

@ -1,6 +1,10 @@
--<<
local _ = wesnoth.textdomain 'wesnoth-wc'
local _wesnoth = wesnoth.textdomain "wesnoth"
local wc2_scenario = {}
local on_event = wesnoth.require("on_event")
local carryover = wesnoth.require("carryover_gold.lua")
function wc2_scenario.is_human_side(side_num)
return side_num <= wml.variables.wc2_player_count
@ -42,18 +46,52 @@ function wesnoth.wml_actions.wc2_start_units(cfg)
end
end
function wesnoth.wml_actions.wc2_store_carryover(cfg)
local human_sides = wesnoth.sides.find(wml.get_child(cfg, "sides"))
--use an the average amount of villages for this scenario to stay independent of map generator results.
local nvillages = cfg.nvillages
local turns_left = math.max(wesnoth.scenario.turns - wesnoth.current.turn, 0)
local player_gold = 0
function wc2_scenario.average_gold()
local total_gold = 0
local nsides = 0
for side_num, side in ipairs(human_sides) do
player_gold = player_gold + side.gold
for i, s in ipairs(wesnoth.sides) do
if wc2_scenario.is_human_side(i) then
nsides = nsides + 1
total_gold = total_gold + s.gold
end
end
player_gold = math.max(player_gold / #human_sides, 0)
wml.variables.wc2_carryover = math.ceil( (nvillages*turns_left + player_gold) * 0.15)
return math.floor(total_gold / nsides + 0.5)
end
-- overwrite parts of the carryover gold implementation.
function carryover.set_side_carryover_gold(side)
local turns_left = carryover.turns_left()
-- make the carryover bonus independent of the map generation.
local num_villages = wml.variables.wc2_nvillages or carryover.get_num_villages()
local finishing_bonus_per_turn = wml.variables.wc2_early_victory_bonus or num_villages * side.village_gold + side.base_income
local finishing_bonus = finishing_bonus_per_turn * turns_left
local avg_gold = wc2_scenario.average_gold()
side.carryover_gold = math.ceil((avg_gold + finishing_bonus) * side.carryover_percentage / 100)
return {
turns_left = turns_left,
avg_gold = avg_gold,
finishing_bonus = finishing_bonus,
finishing_bonus_per_turn = finishing_bonus_per_turn,
}
end
---@param side side
---@param info table
---@return string
function carryover.remaining_gold_message(side, info)
return "<small>\n" .. _wesnoth("Remaining gold: ") .. carryover.half_signed_value(side.gold) .. "</small>"
.. "<small>\n" .. _("Average remaining gold: ") .. carryover.half_signed_value(info.avg_gold) .. "</small>"
end
---@param side side
---@param info table
---@return string
function carryover.total_gold_message(side, info)
return "<small>" .. _wesnoth("Total gold: ") .. carryover.half_signed_value(info.avg_gold + info.finishing_bonus) .. "</small>"
end
-- carryover handling: we use a custom carryover machnics that
@ -81,11 +119,10 @@ on_event("wc2_start", function(cx)
end
end
local gold = (wml.variables.wc2_carryover or 0) + (wml.variables["wc2_difficulty.extra_gold"] or 0)
local gold = (wml.variables["wc2_difficulty.extra_gold"] or 0)
for i = 1, wml.variables.wc2_player_count do
wesnoth.sides[i].gold = wesnoth.sides[i].gold + gold
end
wml.variables.wc2_carryover = nil
end)
-- our victory condition
@ -96,9 +133,7 @@ on_event("enemies defeated", function(cx)
wesnoth.audio.play("ambient/ship.ogg")
wesnoth.wml_actions.endlevel {
result = "victory",
carryover_percentage = 0,
carryover_add = false,
carryover_report = false,
carryover_report = true,
}
end)

View file

@ -10,7 +10,7 @@ wesnoth.dofile("./scenario_utils/plot.lua")
wesnoth.dofile("./scenario_utils/side_definitions.lua")
settings = globals.settings or {}
local n_villages = {27, 40, 53, 63}
local early_victory_bonus = {27, 40, 53, 63}
local function get_map_generator(scenario_data)
if globals.settings.default_id then
@ -45,7 +45,9 @@ function wc_ii_generate_scenario(nplayers, gen_args)
std_print("test_nplayers", wml.variables.test_nplayers)
local scenario_data = get_scenario_data(nplayers, scenario_num)
local prestart_event = { name = "prestart" }
local prestart_event = {
name = "prestart",
}
-- our [scenario] skeleton
local scenario = {
event = {
@ -71,6 +73,7 @@ function wc_ii_generate_scenario(nplayers, gen_args)
description="enables the buildin mod to mark units, disable this to be compatible with other mods that do the same thing",
},
},
-- note: in later scenarios these variables will probably be overwritten by whatever is present in the carryover.
variables = {
wc2_scenario = scenario_num,
wc2_player_count = nplayers,
@ -81,6 +84,8 @@ function wc_ii_generate_scenario(nplayers, gen_args)
description = "WC_II_" .. nplayers .. "p_desc",
modify_placing = false,
turns = scenario_data.turns,
carryover_percentage = 15,
carryover_add = true,
}
-- add [side]s to the [scenario]
@ -90,21 +95,6 @@ function wc_ii_generate_scenario(nplayers, gen_args)
-- add plot (that is [event] with [message]s)
add_plot(scenario, scenario_num, nplayers)
-- add the gold carryover event
if scenario_num < #n_villages then
table.insert(scenario.event, {
name = "victory",
wml.tag.wc2_store_carryover {
nvillages = n_villages[scenario_num] + 2 * nplayers,
wml.tag.sides {
side="1,2,3",
wml.tag.has_unit {
}
}
}
})
end
-- add some wc2 specific wml [event]s
for side_num = 1, nplayers do
table.insert(scenario.event, {
@ -117,19 +107,28 @@ function wc_ii_generate_scenario(nplayers, gen_args)
})
end
if early_victory_bonus[scenario_num] then
table.insert(prestart_event,
wml.tag.set_variable {
name = "wc2_early_victory_bonus",
value = early_victory_bonus[scenario_num] + 2 * nplayers,
}
)
end
-- generate the map. (this also adds certain events for example to create [item]s or [sound_source]s)
local mapgen_func = get_map_generator(scenario_data)
mapgen_func(scenario, nplayers)
-- set the correct scenario name.
if scenario_num == 1 then --first map
scenario.name = "WC_II_" .. nplayers .. " - " .. _"Start"
scenario.name = _"Start"
else
local scenario_desc = _ "Scenario" .. scenario_num
local scenario_desc = _ "Scenario " .. scenario_num
if scenario_num == 5 then
scenario_desc = _"Final Battle"
end
scenario.name = "WC_II_" .. nplayers .. " " .. scenario_desc .. " - "--.. scenario.map_name
scenario.name = scenario_desc
end
local res = wc2_convert.lon_to_wml(scenario, "scenario")

View file

@ -13,6 +13,18 @@ _ "World Conquest 3p" #enddef
#define WC_II_CAMPAIGN_NAME_4P
_ "World Conquest 4p" #enddef
#define WC_II_ABBREV_1P
_ "WC1p" #enddef
#define WC_II_ABBREV_2P
_ "WC2p" #enddef
#define WC_II_ABBREV_3P
_ "WC3p" #enddef
#define WC_II_ABBREV_4P
_ "WC4p" #enddef
#define WC_II_CAMPAIGN_DESC_1P
_ "A randomly generated campaign for 1 player. It has 6 levels of difficulty.
(Expert level, 5 scenarios.)" #enddef
@ -101,7 +113,7 @@ _ "World Conquest 4p" #enddef
icon = {ICON}
image = {IMAGE_ONE}
type = mp
abbrev = _ "WC" + {PLAYERS}\
abbrev = {WC_II_ABBREV_{PLAYERS}P}
{WC2_CAMPAIGN_DIFFICULTY VERY_EASY {WC2_HUMAN_DIFFICULTY human-peasants/peasant purple} _"Peasant" _"Beginner" 6 2 2 10 yes 0}
{WC2_CAMPAIGN_DIFFICULTY EASY {WC2_HUMAN_DIFFICULTY human-loyalists/sergeant black} _"Sergeant" _"Easy" 7 3 2 7 yes 5}
{WC2_CAMPAIGN_DIFFICULTY NORMAL {WC2_HUMAN_DIFFICULTY human-loyalists/lieutenant brown} _"Lieutenant" _"Medium" 8 4 2 5 yes 10} {DEFAULT_DIFFICULTY}

View file

@ -13,9 +13,9 @@
grow_factor = 1
border = "all"
border_size = 5
horizontal_alignment = "left"
horizontal_alignment = "center"
[label]
definition = "title"
definition = "title_script"
label = _"Select Character"
[/label]
[/column]
@ -25,7 +25,7 @@
grow_factor = 1
border = "all"
border_size = 5
horizontal_alignment = "left"
horizontal_alignment = "center"
[label]
label = _"Who do you want to play as?"
[/label]
@ -39,37 +39,88 @@
grow_factor = 1
border = "all"
border_size = 5
[image]
label = "units/konrad-fighter.png"
[/image]
[/column]
[column]
grow_factor = 1
border = "all"
border_size = 5
[image]
label = "units/human-princess.png~TC(1,magenta)"
[/image]
[/column]
[/row]
[row]
[column]
grow_factor = 1
border = "all"
border_size = 5
[button]
label = _"Konrad"
return_value = 1
[/button]
[/column]
[column]
grow_factor = 1
border = "all"
border_size = 5
[button]
label = _"Lisar"
return_value = 2
[/button]
[horizontal_listbox]
id = "characters"
has_minimum = false
[list_definition]
[row]
[column]
horizontal_grow = true
vertical_grow = true
[toggle_panel]
definition = "default"
return_value_id = "ok"
linked_group = "panel"
[grid]
[row]
grow_factor = 0
[column]
grow_factor = 1
horizontal_alignment = "center"
border = "all"
border_size = 5
[image]
id = "image"
definition = "default"
[/image]
[/column]
[/row]
[row]
grow_factor = 1
[column]
grow_factor = 0
border = "all"
border_size = 10
horizontal_grow = true
vertical_alignment = "top"
[label]
id = "name"
use_markup = true
text_alignment = "center"
[/label]
[/column]
[/row]
[/grid]
[/toggle_panel]
[/column]
[/row]
[/list_definition]
[list_data]
[row]
[column]
[widget]
id = "image"
label = "portraits/konrad.webp~SCALE(200,200)"
[/widget]
[widget]
id = "name"
label = "<span size='x-large' face='OldaniaAdfStd'>" + _"Konrad" + "</span>"
[/widget]
[/column]
[/row]
[row]
[column]
[widget]
id = "image"
label = "portraits/lisar.webp~SCALE(200,200)~FL()"
[/widget]
[widget]
id = "name"
label = "<span size='x-large' face='OldaniaAdfStd'>" + _"Lisar" + "</span>"
[/widget]
[/column]
[/row]
[/list_data]
[/horizontal_listbox]
[/column]
[/row]
[/grid]

View file

@ -7,17 +7,26 @@ local T = wml.tag
local wml_actions = wesnoth.wml_actions
local _ = wesnoth.textdomain "wesnoth-tutorial"
selected = 1
function pre_show(dialog)
local list = dialog:find("characters")
list.on_modified = function()
selected = list.selected_index
dialog:close()
end
end
function wml_actions.select_character()
local character_selection_dialog = wml.load "campaigns/tutorial/gui/character_selection.cfg"
local dialog_wml = wml.get_child(character_selection_dialog, 'resolution')
local result = wesnoth.sync.evaluate_single(function()
return { value = gui.show_dialog(dialog_wml) }
return { value = gui.show_dialog(dialog_wml, pre_show, function() end) }
end)
local character = result.value
local unit = wml.variables.student_store
if character == 2 then
if selected == 2 then
wesnoth.units.to_map({
type = "Fighteress",
side = 1,

View file

@ -14,6 +14,8 @@ function wesnoth.wml_actions.hint_message(cfg)
size = 18,
location = {5,5},
color = {255, 255, 255},
bgcolor = {0, 0, 0},
bgalpha = 85,
duration = "unlimited",
max_width = "40%",
valign = "top",

View file

@ -151,6 +151,7 @@
[select_character][/select_character]
{HIGHLIGHT_IMAGE $student_store.x $student_store.y "misc/unit-marker.png" ()}
{CLEAR_VARIABLE student_store}
{GENDER (
@ -376,6 +377,17 @@
) (
{PRINT ( _ "Move Lisar next to Delfador")}
)}
[store_unit]
[filter]
id=Delfador
[/filter]
variable=mentor
kill=no
[/store_unit]
{HIGHLIGHT_IMAGE $mentor.x $mentor.y "misc/unit-marker.png" ()}
{CLEAR_VARIABLE mentor}
[/event]
[event]

View file

@ -9,6 +9,7 @@ wesnoth.dofile 'lua/wml-tags.lua'
wesnoth.dofile 'lua/feeding.lua'
wesnoth.dofile 'lua/diversion.lua'
wesnoth.dofile 'lua/stun.lua'
wesnoth.dofile 'lua/scenario_end_events.lua'
>>
[/lua]

View file

@ -1175,10 +1175,10 @@ sort=yes
email = "mishanhideaki88_AT_gmail.com"
[/entry]
[entry]
name = "いいむらなおき (amatubu) - Naoki Iimura"
name = "いいむらなおき (amatubu) Naoki Iimura"
[/entry]
[entry]
name = "岡田信人 - Nobuhito Okada"
name = "岡田信人 Nobuhito Okada"
email = "okyada_AT_gmail.com"
[/entry]
[entry]

View file

@ -26,7 +26,7 @@
[topic]
id=editor_tool_paint
title= _ "Paint Tool"
text= "<img src=icons/action/editor-tool-paint_60.png align=left box=yes/>" + _ "Paint terrain tiles on the map.
text= "<img src=icons/action/editor-tool-paint_60.png align=left />" + _ "Paint terrain tiles on the map.
The paint tool utilizes the brush sizes and the terrain palette.
<header>Keyboard Modifiers</header>
@ -36,11 +36,11 @@ The paint tool utilizes the brush sizes and the terrain palette.
<header>Brush Sizes</header>
The selected brush changes the size of the tool:" +
"<table>" +
"<row><col><img src=icons/action/editor-brush-1_30.png align=left box=yes/></col><col>" + _ "Paint single hexes." + "</col></row>" +
"<row><col><img src=icons/action/editor-brush-2_30.png align=left box=yes/></col><col>" + _ "Paint seven hexes at a time." + "</col></row>" +
"<row><col><img src=icons/action/editor-brush-3_30.png align=left box=yes/></col><col>" + _ "Paint nineteen hexes at a time." + "</col></row>" +
"<row><col><img src=icons/action/editor-brush-nw-se_30.png align=left box=yes/></col><col>" + _ "Paint three hexes in a line." + "</col></row>" +
"<row><col><img src=icons/action/editor-brush-sw-ne_30.png align=left box=yes/></col><col>" + _ "Paint three hexes in a line." + "</col></row>" +
"<row><col><img src=icons/action/editor-brush-1_30.png align=left /></col><col>" + _ "Paint single hexes." + "</col></row>" +
"<row><col><img src=icons/action/editor-brush-2_30.png align=left /></col><col>" + _ "Paint seven hexes at a time." + "</col></row>" +
"<row><col><img src=icons/action/editor-brush-3_30.png align=left /></col><col>" + _ "Paint nineteen hexes at a time." + "</col></row>" +
"<row><col><img src=icons/action/editor-brush-nw-se_30.png align=left /></col><col>" + _ "Paint three hexes in a line." + "</col></row>" +
"<row><col><img src=icons/action/editor-brush-sw-ne_30.png align=left /></col><col>" + _ "Paint three hexes in a line." + "</col></row>" +
"</table>"
[/topic]
# wmllint: markcheck on
@ -49,7 +49,7 @@ The selected brush changes the size of the tool:" +
[topic]
id=editor_tool_fill
title= _ "Fill Tool"
text= "<img src=icons/action/editor-tool-fill_60.png align=left box=yes/>" + _ "Fill continuous regions of terrain with a different one.
text= "<img src=icons/action/editor-tool-fill_60.png align=left />" + _ "Fill continuous regions of terrain with a different one.
The fill tool utilizes the terrain palette.
<header>Keyboard Modifiers</header>
@ -62,7 +62,7 @@ The fill tool utilizes the terrain palette.
[topic]
id=editor_tool_select
title= _ "Select Tool"
text= "<img src=icons/action/editor-tool-select_60.png align=left box=yes/>" + _ "Selects a set of hex fields, for use with with the cut, copy and fill-selection buttons below the menu bar.
text= "<img src=icons/action/editor-tool-select_60.png align=left />" + _ "Selects a set of hex fields, for use with with the cut, copy and fill-selection buttons below the menu bar.
<header>Keyboard Modifiers</header>
• Shift+mouse click: Magic Wand mode, select the hex under the mouse cursor, and adjoining hexes of the same terrain type.
@ -71,11 +71,11 @@ The fill tool utilizes the terrain palette.
<bold>Brush Sizes</bold>
The selected brush changes the size of the tool:" +
"<table>" +
"<row><col><img src=icons/action/editor-brush-1_30.png align=left box=yes /></col><col>" + _ "Select single hexes." + "</col></row>" +
"<row><col><img src=icons/action/editor-brush-2_30.png align=left box=yes /></col><col>" + _ "Select seven hexes at a time." + "</col></row>" +
"<row><col><img src=icons/action/editor-brush-3_30.png align=left box=yes /></col><col>" + _ "Select nineteen hexes at a time." + "</col></row>" +
"<row><col><img src=icons/action/editor-brush-nw-se_30.png align=left box=yes /></col><col>" + _ "Select three hexes in a line." + "</col></row>" +
"<row><col><img src=icons/action/editor-brush-sw-ne_30.png align=left box=yes /></col><col>" + _ "Select three hexes in a line." + "</col></row>" +
"<row><col><img src=icons/action/editor-brush-1_30.png align=left /></col><col>" + _ "Select single hexes." + "</col></row>" +
"<row><col><img src=icons/action/editor-brush-2_30.png align=left /></col><col>" + _ "Select seven hexes at a time." + "</col></row>" +
"<row><col><img src=icons/action/editor-brush-3_30.png align=left /></col><col>" + _ "Select nineteen hexes at a time." + "</col></row>" +
"<row><col><img src=icons/action/editor-brush-nw-se_30.png align=left /></col><col>" + _ "Select three hexes in a line." + "</col></row>" +
"<row><col><img src=icons/action/editor-brush-sw-ne_30.png align=left /></col><col>" + _ "Select three hexes in a line." + "</col></row>" +
"</table>"
[/topic]
# wmllint: markcheck on
@ -84,17 +84,17 @@ The selected brush changes the size of the tool:" +
[topic]
id=editor_tool_paste
title= _ "Clipboard and Paste Tool"
text= "<img src=icons/action/editor-paste_60.png align=left box=yes />" + _ "Rotate, flip and paste the terrain in the clipboard
text= "<img src=icons/action/editor-paste_60.png align=left />" + _ "Rotate, flip and paste the terrain in the clipboard
Hexes can be cut or copied to the clipboard using the <ref dst='editor_tool_select'>Select Tool</ref>.
The paste tool shows an outline of the clipboard, which can be pasted with a mouse-click. Only the outline is shown, but mistakes can be corrected with the undo function, which is bound to both Control+Z and to the same key as the in-game undo function.
The paste tool also has some clipboard-manipulation functions:" +
"<table>" +
"<row><col><img src=icons/action/editor-clipboard-rotate-cw_30.png align=left box=yes /></col><col>" + _ "Rotate clockwise by 60°." + "</col></row>" +
"<row><col><img src=icons/action/editor-clipboard-rotate-ccw_30.png align=left box=yes /></col><col>" + _ "Rotate counter-clockwise by 60°." + "</col></row>" +
"<row><col><img src=icons/action/editor-clipboard-flip-horizontal_30.png align=left box=yes /></col><col>" + _ "Flip horizontally" + "</col></row>" +
"<row><col><img src=icons/action/editor-clipboard-flip-vertical_30.png align=left box=yes /></col><col>" + _ "Flip vertically" + "</col></row>" +
"<row><col><img src=icons/action/editor-clipboard-rotate-cw_30.png align=left /></col><col>" + _ "Rotate clockwise by 60°." + "</col></row>" +
"<row><col><img src=icons/action/editor-clipboard-rotate-ccw_30.png align=left /></col><col>" + _ "Rotate counter-clockwise by 60°." + "</col></row>" +
"<row><col><img src=icons/action/editor-clipboard-flip-horizontal_30.png align=left /></col><col>" + _ "Flip horizontally" + "</col></row>" +
"<row><col><img src=icons/action/editor-clipboard-flip-vertical_30.png align=left /></col><col>" + _ "Flip vertically" + "</col></row>" +
"</table>"
[/topic]
# wmllint: markcheck on
@ -103,7 +103,7 @@ The paste tool also has some clipboard-manipulation functions:" +
[topic]
id=editor_tool_starting
title= _ "Starting Locations Tool"
text= "<img src=icons/action/editor-tool-starting-position_60.png align=left box=yes />" +
text= "<img src=icons/action/editor-tool-starting-position_60.png align=left />" +
# po: the parts about "10" being shown as "Player 10" use the translatable string "Player $side_num" in the wesnoth-editor textdomain
_ "Defines the side leader starting position.
This tool sets the side leaders default starting locations, and named special locations. Both types of location are enabled in both <ref dst='..editor_mode_terrain'>Terrain Editor</ref> and <ref dst='..editor_mode_scenario'>Scenario Editor</ref> modes. The location names are shown as a list in the editor palette, clicking on the map will place that name on a hex, each location can only be placed on a single hex, and the editor will only allow one location per hex.
@ -129,7 +129,7 @@ Named locations can be accessed from WML using the Standard Location Filters
# po: The images here have text, while they could be translated I assume editor-only images wont be.
# po: In English the text is “IO” for impassable and “UO” for unwalkable.
_ "editor^<header>Movement Overlays</header>
<img src='terrain/grass/green.png~BLIT(terrain/impassable-editor.png~O(0.5))' box=yes /><img src='terrain/grass/green.png~BLIT(terrain/unwalkable-editor.png~O(0.5))' align=here box=yes /><br/><bold>Impassable and Unwalkable</bold>
<img src='terrain/grass/green.png~BLIT(terrain/impassable-editor.png~O(0.5))' /><img src='terrain/grass/green.png~BLIT(terrain/unwalkable-editor.png~O(0.5))' align=here /><br/><bold>Impassable and Unwalkable</bold>
While easily noticeable in the editor, these are invisible in the game, so the mixed terrains created by them look like the base terrain. They create a mixed terrain with the movement costs set to “impassable” or “unwalkable” respectively." + "
@ -137,7 +137,7 @@ While easily noticeable in the editor, these are invisible in the game, so the m
# po: The images here have text, while they could be translated I assume editor-only images wont be.
# po: In English these images are the literal text “Castle overlay” and “Keep overlay”.
_ "editor^<header>Castle Overlays</header>
<img src='terrain/grass/green.png~BLIT(terrain/castle/castle-overlay-editor.png~O(0.5))' align=here box=yes /><img src='terrain/grass/green.png~BLIT(terrain/castle/keep-overlay-editor.png~O(0.5))' align=here box=yes />
<img src='terrain/grass/green.png~BLIT(terrain/castle/castle-overlay-editor.png~O(0.5))' align=here /><img src='terrain/grass/green.png~BLIT(terrain/castle/keep-overlay-editor.png~O(0.5))' align=here />
Adding either of these overlays to a passable hex allows units to be recruited onto a hex. The keep also allows a leader to recruit from there.
These can be added to an impassable hex to connect a castle to a visually-separate keep through an impassable wall. Its also possible to create a castle that seems to have grassland between the keep and towers, however this requires the connecting hexes to be occupied or blocked to prevent units being recruited onto them." + "
@ -146,13 +146,13 @@ These can be added to an impassable hex to connect a castle to a visually-separa
# po: The image here has text, while it could be translated I assume editor-only images wont be.
# po: In English this image is the literal text “Village overlay”.
_ "editor^<header>Village Overlay</header>
<img src='terrain/grass/green.png~BLIT(terrain/village/village-overlay-editor.png~O(0.5))' align=here box=yes />
<img src='terrain/grass/green.png~BLIT(terrain/village/village-overlay-editor.png~O(0.5))' align=here />
This turns any base terrain into a village, providing income and healing." + "
" +
# po: The image is an “S” on a solid black background.
_ "editor^<header>Fake Shroud</header>
<img src=terrain/void/shroud-editor.png align=left box=yes />
<img src=terrain/void/shroud-editor.png align=left />
Fake Shroud looks like an unexplored area, even in scenarios that have shroud disabled and even when the players units can see the hex."
[/topic]
@ -160,12 +160,12 @@ Fake Shroud looks like an unexplored area, even in scenarios that have shroud di
[topic]
id=editor_terrain_elevation
title= _ "Terrain Elevation Graphics"
text="<img src='icons/terrain/terrain_group_elevation_30.png~SCALE(60,60)' align=left box=yes />" +
text="<img src='icons/terrain/terrain_group_elevation_30.png~SCALE(60,60)' align=left />" +
_ "
A cosmetic elevation effect that looks a little different in the editor than in the game due to visual aids in the editor; all the overlays described here are found in the terrain palettes “elevation” group.
" +
_ "editor^<header>Direct Overlays</header>" +
"<br/><img src='terrain/elevation/bluffs-tile.png' box=yes /><img src='terrain/elevation/regular-tile.png' box=yes /><br/>" +
"<br/><img src='terrain/elevation/bluffs-tile.png' /><img src='terrain/elevation/regular-tile.png' /><br/>" +
_ "
<b>Bluffs and Gulch</b>
@ -176,8 +176,8 @@ The bluffs, gulches, and similar variations are much like a standard terrain ove
"
" +
"<table>" +
"<row><col><img src='terrain/grass/green.png~BLIT(terrain/floodfill/flood_high.png)' box=yes /></col><col>" + _ "Raised elevation on-map marker" + "</col></row>" +
"<row><col><img src='terrain/floodfill/marker-high-tile.png' box=yes /></col><col>" + _ "Raised elevation editor palette icon" + "</col></row>" +
"<row><col><img src='terrain/grass/green.png~BLIT(terrain/floodfill/flood_high.png)' /></col><col>" + _ "Raised elevation on-map marker" + "</col></row>" +
"<row><col><img src='terrain/floodfill/marker-high-tile.png' /></col><col>" + _ "Raised elevation editor palette icon" + "</col></row>" +
"</table>" +
"To make a patch of terrain higher or lower, and still be able to use other overlay terrains such as trees, you will need to use these markers. Placing one of these arrows on the map will flood-fill the map with a color-coded haze; neither the haze nor the arrow will be visible in game. The hazed area will have a border ledge, making it look higher or lower than the adjacent tiles.
@ -192,7 +192,7 @@ The marker arrows are not very useful by themselves, but the bluffs/gulch-type t
An example use case would be:
1. Select the Bluffs (^Qhh) from the editor palette and use single-hex paint tool to outline a big blob over an empty, all-grass map.
2. Place a Marker High (^_mh) arrow on a tile inside the blob (not on the Bluffs border).
3. The blob should all be raised now, and as long as you don't overwrite the Marker or Bluffs overlays, you can add other terrain overlays as needed.
3. The blob should all be raised now, and as long as you dont overwrite the Marker or Bluffs overlays, you can add other terrain overlays as needed.
The graphics used to represent the ledge borders are determined by the base terrain.
" +
@ -205,7 +205,7 @@ The graphics used to represent the ledge borders are determined by the base terr
title= _ "Deprecated Terrain"
# po: The main reason for choosing “D” is that the hole in the middle of the letter makes it easier to see which terrain is underneath it. This uses a hardcoded image and doesnt expect the image to be translated.
# po: The Xol and ^Efs terrains help pages arent given hyperlinks, because they both have hide_help enabled. Even when on a map with Xol on it, ctrl+t will show the hidden page but the ref still wont link to it.
text= _ "editor^<img src='terrain/grass/green.png~BLIT(terrain/deprecated-editor.png)' box=yes/>
text= _ "editor^<img src='terrain/grass/green.png~BLIT(terrain/deprecated-editor.png)' />
The magenta D (for “Deprecated”).
This is shown in the editor over deprecated terrain codes. Examples are:
@ -220,7 +220,7 @@ The help pages for these terrains may have additional text thats only shown i
[topic]
id=editor_tool_label
title= _ "Label Tool"
text= "<img src=icons/action/editor-tool-label_60.png align=left box=yes />" + _ "Put text labels on the map.
text= "<img src=icons/action/editor-tool-label_60.png align=left />" + _ "Put text labels on the map.
• Left-click will open a dialog box to create a new label or edit an existing one.
• Right-click deletes.
• Drag-and-drop with the left mouse button moves labels.
@ -235,7 +235,7 @@ This tool is only available in Scenario Mode; the decorations are implemented in
[topic]
id=editor_tool_scenery
title= _ "Item Tool (Scenery Tool)"
text= "<img src=icons/action/editor-tool-item_60.png align=left box=yes />" + _ "The Item Tool allows placing decorations such as windmills, bookcases and monoliths.
text= "<img src=icons/action/editor-tool-item_60.png align=left />" + _ "The Item Tool allows placing decorations such as windmills, bookcases and monoliths.
Multiple items can be placed on the same hex.
• Left-click will place a decoration on the clicked hex.
@ -253,7 +253,7 @@ This tool is only available in Scenario Mode; the decorations are not part of th
[topic]
id=editor_tool_village
title= _ "Village Ownership Tool"
text= "<img src=icons/action/editor-tool-village_60.png align=left box=yes />" + _ "This tool assigns ownership of villages at the start of a scenario.
text= "<img src=icons/action/editor-tool-village_60.png align=left />" + _ "This tool assigns ownership of villages at the start of a scenario.
The villages must first be placed on the terrain with the <ref dst='editor_tool_paint'>Paint Tool</ref>.
• Left-click will assign the village to the currently-selected side.
@ -269,7 +269,7 @@ This tool is only available in Scenario Mode; ownership information is stored by
[topic]
id=editor_tool_unit
title= _ "Unit Tool"
text= "<img src=icons/action/editor-tool-unit_60.png align=left box=yes />" + _ "Place units belonging to the currently-selected side.
text= "<img src=icons/action/editor-tool-unit_60.png align=left />" + _ "Place units belonging to the currently-selected side.
• Left-click will place a unit.
• Left drag-and-drop will move an already-placed unit.
• Various operations are added to the right-click menu when the hex contains a unit.
@ -306,7 +306,7 @@ This tool is only available in Scenario Mode; it adds WML <italic>[time_area]</i
[topic]
id=editor_playlist
title= _ "Playlist Manager"
text= "<img src=icons/action/playlist_30.png align=left box=yes />" + _ "Shows a list of music tracks known to the editor, with toggle-boxes to enable them.
text= "<img src=icons/action/playlist_30.png align=left />" + _ "Shows a list of music tracks known to the editor, with toggle-boxes to enable them.
This tool is only available in Scenario Mode; it adds WML <italic>[music]</italic> tags to the scenario."
[/topic]
# wmllint: unbalanced-off
@ -358,7 +358,7 @@ The map wont look exactly the same in the game as it does in the editor, beca
• Event handlers and scripting
The editor is not a tool to help you scripting the scenarios event handlers.
The editor is not a tool to help you with scripting the scenarios event handlers.
• Infinite Backwards Compatibility
@ -403,7 +403,7 @@ To load a map that was created in the scenario editor, use “Load Map” from t
The map editor saves one file when in terrain mode (a .map) or two files when in scenario mode (both a .map and a .cfg).
Loading a .cfg file has different results depending on the contents of the .cfg file. For .cfg files that were created by the scenario editor, it will open the .cfg in the scenario editor. However, for .cfg files that cannot be opened by the scenario editor, the editor will attempt to find the scenario's map data and open the corresponding .map file in terrain-only mode, as if the .map file was chosen in the file selector. It is recommended in those cases to simply load the .map file directly instead."
Loading a .cfg file has different results depending on the contents of the .cfg file. For .cfg files that were created by the scenario editor, it will open the .cfg in the scenario editor. However, for .cfg files that cannot be opened by the scenario editor, the editor will attempt to find the scenarios map data and open the corresponding .map file in terrain-only mode, as if the .map file was chosen in the file selector. It is recommended in those cases to simply load the .map file directly instead."
[/topic]
# wmllint: markcheck on
@ -411,7 +411,7 @@ Loading a .cfg file has different results depending on the contents of the .cfg
# wmllint: unbalanced-on
[topic]
id=editor_separate_events_file
title= _ "Using a separate file for WML events"
title= _ "Separate Event Files"
text= _ "When loading a .cfg file, the scenario editor understands files created by the scenario editor, but is likely to have difficulty with files that have been edited by hand.
One option is to create a separate WML file, also with the .cfg extension, which uses the WML preprocessor to include the editor-created file. This separate file contains both the <span face='monospace'>[scenario]</span> tag and any hand-edited WML such as events. With this workflow, the add-ons file structure could look like this:
@ -424,7 +424,7 @@ If your add-on will only be used on 1.18 and later, it is instead recommended to
• <span face='monospace'>maps/first.map</span>
◦ this is the .map file created by the scenario editor when saving in scenario mode
• <span face='monospace'>scenarios/other.cfg</span>
◦ this is the .cfg file containing everything that the scenario editor doesn't understand
◦ this is the .cfg file containing everything that the scenario editor doesnt understand
• <span face='monospace'>scenarios/first.cfg</span>
◦ inside the <span face='monospace'>[scenario]</span> element, use <span face='monospace'>map_file=&quot;first.map&quot;</span> to load the map file
◦ inside the <span face='monospace'>[scenario]</span> element, use <span face='monospace'>include_file=&quot;other.cfg&quot;</span> to load the additional cfg file"
@ -436,7 +436,7 @@ If your add-on will only be used on 1.18 and later, it is instead recommended to
[topic]
id=editor_masks
title= _ "Editor Mask Usage"
text= _ "Masks can be applied to a base map for reusal in several scenarios playing at the same locations."
text= _ "Masks can be applied to a base map for reuse in several scenarios playing at the same locations."
[/topic]
# wmllint: markcheck on
@ -445,7 +445,7 @@ If your add-on will only be used on 1.18 and later, it is instead recommended to
id=editor_time_schedule
# po: Time of Day and Schedule Editor, please use a short string as it will be used in the left-hand pane of the help browser
title= _ "ToD and Schedule Editor"
text= "<img src='icons/action/editor-switch-time_30.png' align=left box=yes />" + _ "This button at the top-right of the screen accesses the time-of-day preview and the schedule editor.
text= "<img src='icons/action/editor-switch-time_30.png' align=left />" + _ "This button at the top-right of the screen accesses the time-of-day preview and the schedule editor.
In terrain mode, this displays the map as it will be recolored at different times of day.
In scenario mode, the button accesses an editor for individual schedules for <ref dst='editor_named_area'>time areas</ref>."
@ -462,9 +462,11 @@ In scenario mode, the button accesses an editor for individual schedules for <re
<bold>Filter</bold>
There is a filter function to show only a subset of the available items — this is the leftmost of the four buttons at the top of the palette, and the graphic changes depending on what is selected. Examples:" +
"<table/><img src=icons/terrain/terrain_group_all_30.png align=left box=yes /></col><col>" + _ "Show all kinds of terrain</col></row>" +
"<img src=icons/terrain/terrain_group_water_deep_30.png align=left box=yes /></col><col>" + _ "Show only water terrains</col></row>" +
"<img src=icons/terrain/terrain_group_village_30.png align=left box=yes /></col><col>" + _ "Show only villages</col></row><endtable/>"
"<table>" +
"<row><col><img src=icons/terrain/terrain_group_all_30.png align=left /></col><col>" + _ "Show all kinds of terrain" + "</col></row>" +
"<row><col><img src=icons/terrain/terrain_group_water_deep_30.png align=left /></col><col>" + _ "Show only water terrains" + "</col></row>" +
"<row><col><img src=icons/terrain/terrain_group_village_30.png align=left /></col><col>" + _ "Show only villages" + "</col></row>" +
"</table>"
[/topic]
# wmllint: markcheck on
@ -481,7 +483,7 @@ There is a filter function to show only a subset of the available items — this
" + _ "<header>Native</header>
A map file consists of rows with comma separated terrain code strings. The only non-terrain information provided by the map syntax is the set of locations created by the <ref dst='editor_tool_starting'>Starting Locations Tool</ref>. The files can be edited with a general purpose text editor like notepad.
A map file consists of rows with comma-separated terrain code strings. The only non-terrain information provided by the map syntax is the set of locations created by the <ref dst='editor_tool_starting'>Starting Locations Tool</ref>. The files can be edited with a general purpose text editor.
These files can be used directly for multiplayer games, the number of players is automatically determined by the number of starting positions. When saved in the default directory, the map can be found in the “Custom Maps” game type of the multiplayer “Create Game” dialog; you may need to refresh the cache (press F5 on the title screen) before a newly-created map appears.
@ -494,7 +496,7 @@ The <italic>map_file</italic> method is preferred over using a preprocessor incl
" + _ "<header>Embedded</header>
The map data can stored as part of a scenarios .cfg file, directly in the <italic>map_data</italic> attribute. In other words, in the place that the preprocessor would include it when using the preprocessor-include method.
The map data can be stored as part of a scenarios .cfg file, directly in the <italic>map_data</italic> attribute. In other words, in the place that the preprocessor would include it when using the preprocessor-include method.
<header>Using Embedded Format in Terrain Mode</header>

View file

@ -93,7 +93,7 @@
[topic]
id=..introduction
title= _ "Introduction"
text="<img>src=misc/logo-bg.png~BLIT(misc/logo.png) align=middle</img>" + _ "<br/><italic>text='Battle for Wesnoth'</italic> is a turn-based fantasy strategy game somewhat unusual among modern strategy games. While other games strive for complexity, <italic>text='Battle for Wesnoth'</italic> strives for simplicity of both rules and gameplay. This does not make the game simple, however — from these simple rules arises a wealth of strategy, making the game easy to learn but a challenge to master.
text="<img src=misc/logo-bg.png~BLIT(misc/logo.png) align=middle /><br/>" + _ "<italic>Battle for Wesnoth</italic> is a turn-based fantasy strategy game somewhat unusual among modern strategy games. While other games strive for complexity, <italic>Battle for Wesnoth</italic> strives for simplicity of both rules and gameplay. This does not make the game simple, however — from these simple rules arises a wealth of strategy, making the game easy to learn but a challenge to master.
The following pages outline all you need to know to play Wesnoth. As you play, new information is added to the various categories as you come across new aspects of the game. For more detailed information on special situations and exceptions, follow the included links."
[/topic]
@ -153,8 +153,7 @@ The <italic>text='Battle for Wesnoth'</italic> project was begun in 2003, and ha
[topic]
id=.unknown_unit
title= _ "Unknown Unit"
text="<img>src=units/unknown-unit.png~RC(magenta>red) align=left float=yes</img>" + _ "
text="<img src='units/unknown-unit.png~RC(magenta>red)' align=left float=yes />" + _ "
This unit is unknown for the moment. You must discover it in the game to be allowed to see its description."
[/topic]
# wmllint: markcheck on
@ -576,7 +575,7 @@ Mixed terrain types share the properties of multiple basic terrain types — uni
" + "<img src='terrain/hills/regular.png~BLIT(terrain/forest/pine-tile.png)'/>" + "<img src='terrain/hills/desert.png'/>" + "<img src='terrain/cave/hills-variation.png'/><br/>" + _ "One notable exception is bridge terrains, such as <italic>bridges over shallow water</italic>, <italic>fords</italic>, and <italic>bridges over chasms</italic>. Fords are easily passable to both merfolk and humans — all units moving on a ford enjoy the best defense and best movement out of flat and shallow water, rather than the worse movement of the two. Similarly, bridges over chasms are passable to nonfliers (unsurprisingly).
" + "<img src='terrain/water/coast-tile.png~BLIT(terrain/bridge/wood-se-nw.png)'/>" + "<img src='terrain/water/ford-tile.png'/>" + "<img src='terrain/chasm/regular-tile.png~BLIT(terrain/cave/chasm-stone-bridge-sw-ne-tile.png)'/>" + _ "<br/>Land-based villages generally give the best defense and movement as well. These villages are mixed terrains, based on the village terrain type, together with hill, swamp, and cave, respectively.
" + "<img src='terrain/water/coast-tile.png~BLIT(terrain/bridge/wood-se-nw.png)'/>" + "<img src='terrain/water/ford-tile.png'/>" + "<img src='terrain/chasm/regular-tile.png~BLIT(terrain/cave/chasm-stone-bridge-sw-ne-tile.png)'/><br/>" + _ "Land-based villages generally give the best defense and movement as well. These villages are mixed terrains, based on the village terrain type, together with hill, swamp, and cave, respectively.
" + "<img src='terrain/hills/regular.png~BLIT(terrain/village/human-hills-tile.png)'/>" + "<img src='terrain/swamp/water-tile.png~BLIT(terrain/village/swampwater-tile.png)'/>" + "<img src='terrain/cave/floor6.png~BLIT(terrain/village/cave-tile.png)'/><br/>" + _ "Finally, water villages are generally inhospitable to land units, and do not give defense or movement benefits associated with the village terrain type. Instead, they count only as water tiles.

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 MiB

After

Width:  |  Height:  |  Size: 4.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 490 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

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