A side with a leader holding the hill keep gets bonus gold each turn, A treasure chest which only a leader can unlock further rewards the first player to take the hill. Each side gets two leaders. If one dies then another can be "recalled" (recruited) from the recall list at its full unit cost. Computer players will try to take the hill with one of their two leaders.
The basis for this rework is lowering the extremes in acrance resistances between units and factions. That allows for more free usage of arcane damage and helps with balance of games in which high levels are way more frequent than in standard default 1v1 or 2v2.
Having these in canon felt like a plot hole in other campaigns. If an
apprentice mage could make these amulets circa 350 YW then every village and
border-fort should have them, but Wesnoth's storylines work better if a
messenger on horseback is the usual method of long-distance communication. For
example, TSG is about a commander sent to discipline a lazy outpost, only to
find that they should have brought reinforcements. When it's the enemy trying
to communicate, DM S21 and UtBS S08 both involve stopping the messengers.
This changes the intro to have a beacons for communicating with the trade
caravans, I'm leaving it ambiguous whether it's a smoke signal or a fire
signal. Fire beacons might make more sense if the village sees the caravan's
campfires at night and, in normal usage, light the beacon to trade.
While this adds beacons to canon, they're an ancient technology with a limited
range and very limited bandwidth. There are easy plot reasons not to set
beacons up, such as the costs of having people watch for and maintain them,
there are easy plot reasons why they don't work on a given day, such as
weather, and there are easy plot reasons for attempted communication to be
ignored by assuming that it's a fire for a different purpose.
Previously suggested in https://r.wesnoth.org/p669889 .
Adds support for using these in the weapons and ability filters:
* "-1", which was previously treated as an parse error (no number before the separator).
* "-3--1"
* "-infinity" as the lower number in the range, provided a different upper number is given.
This treats "-infinity" (with no other number), "-infinity--infinity",
"infinity" (with no other number) and "infinity-infinity" as errors. It seems
unlikely that someone would intend to use a filter that can't match any
reasonable number.
The range "-infinity-infinity" will be parsed successfully. I don't see a use
case for that, but nor do I see a reason to add extra C++ to reject it.
However, it's not added to the schema, as I think it's good for the schema to
give a warning when someone creates a filter which will accept every value
(including accepting the default, so "-infinity-infinity" accepts the unset
value too).
Includes new unit tests for the C++ and the Lua stringx.parse_range functions.
The next commit adds more WML tests, but is kept separate to credit the author.
This started as a change to move common filter functions from unit.cpp to
somewhere that they could be reused for other config-based filters. In the
process a missing feature was found and added, the move is still included in a
single Git commit because the move was required in order to make these
functions accessible to the Boost unit tests.
Two CodeBlocks project files additionally get src/utils/any.hpp added,
which was in one of them but missing from the other two. I noticed because
these are alphabetically at the start of the src/utils file list.
Thanks to @CelticMinstrel for the review comments and Xcode project updates.
For any given event name, events execute in order of decreasing priority.
Priority is a real number, and may be assigned via the `priority` attribute for
the WML [event] tag, or through the Lua APIs:
- wesnoth.game_events.add({priority = number})
- wesnoth.game_events.add_repeating(name, action, [priority])
Note that delayed variable substitution is not currently supported in the WML attribute.
The key word of course being "start". This PR changes the editor by default to work at the add-on level instead of in its own separate scenarios and maps directories. The goal is to make the editor more useful generally, but also specifically to make it much easier for players to distribute content they create using the editor:
* When they click the Editor button on the main menu, they will first be prompted to choose an add-on (or mainline), or to create a new add-on.
* When saved, if the scenario cfg is in the format previously generated by the editor, it will be converted to the new format and to use the [multiplayer] tag, the map_file attribute, and have the map data saved to a separate .map file.
* Relatedly, the editor now knows how to handle scenarios with the map_file attribute at all (which yes, does mean that currently wesnoth's editor doesn't know how to load its own mainline scenarios from their cfg).
* When opening the file chooser dialog, it now defaults to their selected add-on's directory.
If they choose to create a new add-on, then the editor creates for them:
* a basic but functional _main.cfg.
* an empty achievements.cfg (at this point mostly just so they might see it at some point and realize achievements exist, but ideally an achievements editor dialog could be created eventually).
* an empty _server.pbl file.
* a proper add-on directory structure containing the standard set of folders (maps/, scenarios/, units/, utils/, images/, etc).
Additionally, as an initial proof of concept for actually using this new add-on level functionality, a new Add-ons dropdown has been added to the editor's top bar, with a pbl editor option. This allows populating the blank _server.pbl file as well as editing an existing _server.pbl. There is also an option to change the add-on's ID, which will update the add-on's folder name and _main.cfg.
Misc other changes:
* The ability to add a recruit list to a side has been added back as a text box on the edit side dialog. While admittedly this doesn't allow players to select units from within the editor itself, it does set the actual side's recruit list (rather than a specific unit's extra_recruits), will show the user what the current recruit list for the side is (which the previously removed implementation didn't show anywhere), and correctly sets the faction as Custom so that the recruit list is used.
* When saving an old-style editor scenario, everything that can be triggered via [event] is either moved to a start event with a specific id attribute. Exceptions to this are [time], [side], and [side][village]. This is done so that the editor can know (for the most part) what things are actually its own to safely replace. As such, aside from the three previously mentioned tags plus the start event, any other WML added to a scenario by a UMC author is preserved rather than being overwritten - the editor no longer replaces the entire contents of the scenario file.
* The editor no longer writes out cfg files missing the top level scenario tag. If it doesn't find one or this is the first save of a new scenario it defaults to [multiplayer], but otherwise it will properly handle finding [test] or [scenario] as well.
* Requires that map files have the .map extension and scenario files have the .cfg extension. Also it assumes that .map files do actually only have map data in them and the .cfg files do actually have valid WML in them. I understand that this is not a limitation it had previously, but I don't think this is an unreasonable thing to require.
* Addresses part of #7667 by just not using regex for figuring out the map_data attribute value.
Additionally, it is not possible to change the currently selected add-on without going back to the main menu, clicking the editor button, and choosing a different add-on. This is intentional - I don't want to deal with having multiple add-ons open at the same time. If someone feels really strongly otherwise, then they can implement that themselves later.
Add the po hints that have been added to 1.16.
Drake Fighters now say "blade" instead of "sword".
Remove the response when a human finds an Ulf, because it didn't sound right as
the first thing a human says to a dwarf. The Ulf’s "a good day to die" could be
read as a Native American battlecry, and "brave words" as "words of an Indian
Brave", leaving the "little big man" to sound like a name.
Without catching the culture reference, it came across as a jibe about the
dwarf's height.
Catching the culture reference, the logic seems reversed. Why would another
dwarf use the generic form, but a human feel comfortable saying that?