Commit graph

29470 commits

Author SHA1 Message Date
Steve Cotton
20ec934658 Whitespace consistency 2023-08-11 08:37:23 +02:00
Ivo Julca
5ebc9a790a Implement event priority
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.
2023-08-11 08:34:43 +02:00
Gunter Labes
81c31c40c5
Update jquery and tablesorter 2023-08-05 20:07:49 +02:00
Charles Dang
542fd92744 GUI2/Main Menu: used linear scaling for background (resolves #7741) 2023-08-04 15:34:52 -04:00
Gunter Labes
64f702e96d
Move {join,host}.lua to a better place 2023-08-03 22:06:27 +02:00
Gunter Labes
a0d7054360
Fix schema to allow upkeep in SUF 2023-08-03 20:09:19 +02:00
Gunter Labes
68b3eeb0ff
Fix schema to allow SUF under [advancement] 2023-08-03 19:49:52 +02:00
Celtic Minstrel
d05bc6e444
Update filesystem.lua (typo) 2023-07-23 11:58:21 -04:00
Celtic Minstrel
46ac2ff1de
Update filesystem.lua
The new include_file directive uses the "scenarios" directory as the asset type, so add it to `filesystem.asset_type`.
2023-07-23 11:58:02 -04:00
Gunter Labes
ab14e5796a
Remove ancient todo file 2023-07-20 16:16:03 +02:00
Pentarctagon
10997c39a3
Start giving the editor add-on level functionality. (#7719)
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.
2023-07-19 15:00:14 -05:00
Gunter Labes
26ec459cb0
Revert "wmllitnt: add two missing corrections (#7765)"
This reverts commit 915d9c5aba since it just adds redundant replacements.
2023-07-19 11:24:28 +02:00
Gunter Labes
41ead12a14
Complete WC version removal 2023-07-18 21:32:58 +02:00
Gunter Labes
dcbecefe9e
Improve script to update pathfinding unit tests 2023-07-18 19:41:42 +02:00
Toranks
682b89e764
WC II - Typo and translatability of Difficulty, remove Version (#7795) 2023-07-17 22:22:53 +02:00
Pentarctagon
ac797db32a Add script to automate generating new pathfinding answers 2023-07-17 11:08:55 -05:00
Pentarctagon
9721ae4d23 Add unit movement changes from Hejnewar.
Also update the pathfinding test answers.
2023-07-17 09:11:38 -05:00
Wedge009
22d27a15f7 UtBS S3: Resolve Garak's attacks only partially being converted to fire damage on turn 2 (resolves #7774). 2023-07-17 02:56:51 +02:00
Toom
9f53c4fd11
fail if [kill] contains [filter], re #4316 (#7717) 2023-07-16 19:47:44 +02:00
Steve Cotton
8bc13963ae WC: change some messages when units join, and add po hints
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?
2023-07-16 14:28:24 +02:00
Pentarctagon
1bf5b2b1fb 1.17.19+dev 2023-07-15 22:25:39 -05:00
Pentarctagon
8ccf7ee3f6 1.17.19 2023-07-15 22:24:10 -05:00
Pentarctagon
ef8fd5c415 pot-update and regenerate doc files 2023-07-15 22:21:49 -05:00
Hejnewar
091b094685
Balance for Rebels 1.18 2023-07-16 00:26:02 +02:00
Hejnewar
ea914fce79
Balance for Drakes 1.18 2023-07-16 00:21:22 +02:00
Hejnewar
ef9c53b4a6
Balance for Dunefolk 1.18 2023-07-16 00:21:04 +02:00
Hejnewar
320c4706a7
Balance for Knalgan Alliance 1.18 2023-07-16 00:20:46 +02:00
Hejnewar
2a18d2d986
Balance for Northerners 1.18 2023-07-16 00:20:28 +02:00
Hejnewar
51bb130919
Balance for Loyalists 1.18 2023-07-16 00:20:12 +02:00
Hejnewar
bbe26527c8
Balance for Undead 1.18 2023-07-16 00:19:19 +02:00
Tahsin Jahin Khalid
915d9c5aba
wmllitnt: add two missing corrections (#7765) 2023-07-12 22:59:43 +02:00
Slayer95
4892963072
Refactor collection of #po, #po-override comments (#7574) 2023-07-12 22:47:26 +02:00
Cody Burchell
71e83f7b85
Prevent duplicate advancements from being added to unit type (#7743)
* Add myself to Miscellaneous Contributors

* types: Add unit tests over adding advancements
2023-07-09 05:08:10 +02:00
Steve Cotton
1efa0c8c54 Add a test for formulas in taught abilities
Originally by gfgtdf, this was cherry-picked from gfgtdf's PR #7589, with
modifications.

COMMON_KEEP_A_B_UNIT_TEST gains support for optional args
SIDE1_LEADER and SIDE2_LEADER.
2023-07-06 16:57:27 +02:00
Wedge009
8cc930666e DiD: Correct inconsistency between AMLA description and its actual effect (resolves #7767). 2023-07-06 10:22:32 +10:00
Wedge009
b70d4331f7 UtBS: Replace mention of the merfolk 'master' with 'leader' (resolves #7695).
po: UtBS S8-10 inclusive - one-word replacement of merfolk 'master' with 'leader'.
2023-07-06 10:22:05 +10:00
Wedge009
b7585712d0 UtBS S3: Rephrase Garak's line to avoid suggesting he has mystical foreknowledge (resolves #7634).
See aforementioned issue for the discussion on the nuances of the text.
2023-07-06 10:22:05 +10:00
Toom
b86b6efd0e
Create test for special_id_active in the style of eoma_beam (#7713)
Test created to verify that special_id_active does not work in 1.16.0.

https://github.com/inferno8/wesnoth-Era_of_Magic/issues/30
https://github.com/inferno8/wesnoth-Era_of_Magic/pull/54
2023-07-04 11:28:39 +02:00
Wedge009
fd744addcf
DiD S3: Resolved Darken Volk speaking from the darkness (#7763)
* DiD S3: Resolved Darken Volk speaking from the darkness at the end of the scenario (resolves #7758)

* Restore victory event changes for Darken Volk.

* Correct indentation.
2023-07-04 14:20:51 +10:00
Wedge009
9be683cbba
Liberty S5: Make the loss of Hans a lose-condition (#7756)
* Liberty S5: Make the loss of Hans a lose-condition (resolves #7750).

* Remove second line as per nemaara's review.
2023-07-04 13:15:46 +10:00
Wedge009
0871e8953e Liberty S6: Correct target hex for Shadow Mage (resolves #7751). 2023-07-04 12:04:35 +10:00
doofus-01
ab4759cb6b
1.17 Elf fighter sprite updates (#7730)
* revised base and melee frames for elvish fighter

* bow anim frames and 2nd attack anim 

* update running frames

* ran palette cleanup, optipng

* upload sprite palette
2023-07-02 17:03:24 -07:00
doofus-01
fc7a612b43
1.17 elf scout animations (#7759)
* elf scout melee anim

* bow base and defend frames

* scout bow attack anim
2023-07-02 17:02:04 -07:00
Steve Cotton
1ecc30972e Test weapon-special plague vs taught plague
The expectation is that the a unit's own weapon special will take
priority over a teacher's ability.
2023-07-02 18:54:17 +02:00
Steve Cotton
aaf2735c1c Add [test_do_attack_by_id], a wrapper for [do_command][attack]
The new tag takes ids instead of needing coordinates. So instead of storing
units or hardcoding values, an attack can be done like this:

```
[test_do_attack_by_id]
	attacker=alice
	defender=bob
	weapon=0
[/test_do_attack_by_id]
```

Add a simpler unit for unit tests than the Elvish Archer / Orcish Grunt
combo, cherry-picked from gfgtdf's PR #7589. This is a unit with a 10x1
melee attack, and 0% defense on all terrains.

Remove the test race's undead_variation=
For testing custom plague abilities, this triggered a warning when
converting to any unit type that doesn't have variation_id=wolf,
restricting tests to using only Walking Corpse and Soulless.
2023-07-02 18:54:17 +02:00
Wedge009
8f1c7481de
Liberty S4: Resolve nameless enemies gaining names (#7749)
* Liberty S4: Keep nameless enemies nameless. Resolves #7748.
2023-07-01 18:33:02 -07:00
Severin Glöckner
96046499f9 schema: advances_to can be a list 2023-06-28 20:54:38 +02:00
Severin Glöckner
acb4fc30b0 Turn orcish shamans into one unit with [variation]s 2023-06-28 20:41:51 +02:00
Severin Glöckner
72935c7c03 wmllint: conversion rules for moved sprites 2023-06-27 12:58:20 +02:00
Severin Glöckner
ceeb6121ed fix shadow’s north-facing animation
[ci skip]
2023-06-25 14:29:28 +02:00