Commit graph

29853 commits

Author SHA1 Message Date
Celtic Minstrel
915fd49ae6 Tutorial: Specify the side of Li'sar in the char select
When a unit data passed to `to_map` either lacks a side or has
side zero, implementation automatically sets it to 1, thus the
existing code worked fine. However:

1. The lack of a `side` could trigger a warning in EmmyLua. It
currently doesn't trigger that, but would with Celtic Minstrel's
planned improvements in Wesnoth's lint hints.

2. The tutorial should be good example code, and the special-case
in the C++ code that made this work is a case of "assume it's a
SP situation, and choose the result that benefits side 1".
2024-02-15 09:57:17 +01:00
Celtic Minstrel
600c88c291 [WC] I think this was a remnant of a global variable removal...? 2024-02-13 19:32:39 -05:00
Celtic Minstrel
0ef38c82c8 [WC] Fix a broken map filter
I'm not sure what the intent was here, so I had to make a guess.
2024-02-13 19:32:29 -05:00
Celtic Minstrel
f7ef5e1362 [LuaDoc] Convert all the ai_helper documentation to LuaDoc format, and add LuaDoc for all previously-undocumented functions. 2024-02-13 19:29:21 -05:00
Celtic Minstrel
94adca0fff [LuaDoc] Fix some non-nullable warnings by adding explicit type annotations on local variables 2024-02-13 19:29:21 -05:00
Celtic Minstrel
b506010a8f [LuaDoc] Correct some dumb errors 2024-02-13 19:29:21 -05:00
Celtic Minstrel
4b5a8e25e8 [LuaDoc] Suppress some diagnostics 2024-02-13 19:29:21 -05:00
Celtic Minstrel
6145c48d35 [LuaDoc] Fix incorrect declaration of unit.variables and side.variables - make them consistent with wml.variables 2024-02-13 19:29:20 -05:00
pentarctagon
029da00681 use scroll_text for pbl editor description 2024-02-13 15:37:12 -06:00
Subhraman Sarkar
6c5a8e923d
Spinner and multiline textbox widgets (#8199) 2024-02-13 11:54:34 -06:00
Steve Cotton
bded0465fc EI: Use the translated replacement for Mal Talar
If Mal-Talar dies in S01 then a new leader (actually just a rename)
turns up in S06b and S07b, but the replacement name, "Mel Kevek",
wasn't marked as translatable.

For the case that both necromancers from S01 were killed, S02 already
had a fallback to Mal-Bakral. This reuses it and adds documentation.
2024-02-13 18:48:26 +01:00
Steve Cotton
7aaa2079a0 EI S01-S04x: Add more po hints
No changes to translatable strings, just to the hints.
2024-02-13 09:39:16 +01:00
P. J. McDermott
144daf8825 Add myself to about.cfg
Under "Packagers" and "Miscellaneous Contributors".
2024-02-12 22:00:38 -06:00
Steve Cotton
ec1c336078 wmlxgettext: treat gender as a po hint
This will automatically record the gender (if specified) of each
[unit], [unit_type] and [side].

The hint "gender=male,female" is often applied to [unit_type]name=,
although that's usually the male name. I believe that's the only
downside of this change.
2024-02-12 23:42:59 +01:00
Dalas121
bcf7d97d81 Fix enemy spawning event not triggering when turns end (#8376) 2024-02-12 12:30:42 +01:00
OrekOrek
4e2cd280ab
HttT S11 Make the objective clearer (#8326)
* Konrad on a sand hex ends the scenario (previously he needed to reach flat terrain)
* Adjust the map so there's more water before reaching the sand hexes.
2024-02-12 12:29:53 +01:00
Steve Cotton
9146db7d5d EI S04b: Fix Hahid's name having a trailing comma
This doesn't change a translatable string, it removes a comma
that was immediately after the translatable string.
2024-02-11 16:55:20 +01:00
Steve Cotton
6828b54ac7 Log instead of assert for incorrect [teleport] tags in ActionWML
Each [teleport] tag should have exactly one each of [source],
[target] and [filter]. Missing any of those is caught immediately
above the new conditional block, so this makes having two or more
of any of them be treated the same.

The log should maybe be made more visible, but it's a case that
can already be detected by schema validation, so validate it
there instead.

The code in teleport.cpp uses assert() in the cases that the
newly-added code in this commit catches. That's bug 8175, and
it's probably still reachable for units with teleport abilities,
so this doesn't close that bug.
2024-02-09 14:45:03 +01:00
P. J. McDermott
73824b95cc Update COPYING.txt for jQuery and tablesorter
Commit 81c31c40c5 updated jQuery to 3.7.0 and tablesorter to 2.31.3.

Update homepages, in particular for the tablesorter fork.

jQuery dropped the confusing and unnecessary dual licensing in 2012:
- https://blog.jquery.com/2012/09/10/jquery-licensing-changes/

Also specify the GPL version used by tablesorter and clarify the "MIT"
license.  The license actually comes from Expat and is one of many
licenses used by MIT (including the X11 license, which is also commonly
called "the MIT license"):
- https://en.wikipedia.org/wiki/MIT_License#Ambiguity_and_variants
- https://www.gnu.org/licenses/license-list.html#Expat
2024-02-08 21:39:17 -06:00
Celtic Minstrel
a9c0d37525
[Lua] Prevent divide by 0 in rushers recruit AI 2024-02-07 20:13:13 -05:00
Celtic Minstrel
d19858a150 [Lua] Fix missing parentheses in rusher recruit AI
Fixes #8297
2024-02-07 19:06:47 -05:00
Steve Cotton
5b35ca3edd SoF S02: Alanin has planned (unshrouded) his escape route
The intro to this map shows Rugnur running into the stronghold, with the
elves not far behind. Those moves were running into shroud, which
generated "could not find move_unit_fake route" warnings because the
animation prefers routes that moving side can already see.

Also, have the conversation between Alanin and Rugnur take place with
Alanin on a road hex, because if he starts on the keep then he takes a
long route to avoid cave terrain.
2024-02-08 00:47:28 +01:00
Celtic Minstrel
e644613cae [LuaDoc] mathx.random_choice can return nil if the input list is empty 2024-02-06 19:04:02 -05:00
Celtic Minstrel
a38e67da45 [LuaDoc] Title is optional for alert/confirm 2024-02-06 19:04:02 -05:00
Celtic Minstrel
dc75045eea [LuaDoc] Add comments for micro_ai_helper.lua 2024-02-06 19:04:01 -05:00
Celtic Minstrel
f9c7336f1a [LuaDoc] Document location_set operators 2024-02-06 19:04:01 -05:00
Celtic Minstrel
c7741907c2 [LuaDoc] Fix several errors in the inline documentation 2024-02-06 19:04:00 -05:00
Celtic Minstrel
795bb22be9 [LuaDoc] Add annotations for micro_ai_self_data.lua 2024-02-06 19:04:00 -05:00
Celtic Minstrel
5a51a309a4 [LuaDoc] Fix several minor errors in the specification of API 2024-02-06 19:04:00 -05:00
Steve Cotton
78e929e075 SoF S02: Don't [allow_undo] when activating the runes
Standing on the runes changes some hexes to impassable,
so it's a change to the game state. It isn't a random
event, so it would be possible to add an [on_undo], but
that seems unnecessary, and would need to handle
multiple runes.
2024-02-05 16:18:34 +01:00
Celtic Minstrel
9eefcda17a Deprecate ai_helper.split
I used level 3 deprecation because this is something that was intended for internal use in the ai_helper module, and the ai_helper module itself is not an officially stable API
2024-02-04 13:28:19 -05:00
pentarctagon
e3ee472352 Remove transparent padding from the status icon image files.
Just removing transparency from all images on the top bar and side bar causes other issues, particularly with the unit sprite and the clock icon alignment.

Fixes #8335
2024-02-04 10:56:03 -06:00
doofus-01
e63bc7c743 remove LAYER argument from main Cud wall rule 2024-02-03 14:57:45 -08:00
Steve Cotton
6b516e8aa5 Fix deprecation warning when setting [endlevel]end_credits=
Change the Lua implementation to directly call the
non-deprecated function, this is related to 9daa10a9f2.

Clean up the C++ header files by removing the declarations of
functions that were removed in 3c8de46771.

Use [endlevel]end_credits=no in the test scenario (trigger it
by moving to hex 9,3). If you debug with :next_level without
triggering the moveto, "The End" will show; trigger the moveto
first, and it won't show the credits.
2024-02-02 16:04:27 +01:00
Rafael Fillipe Silva
16e9476191 add a disallowed type to override a mandatory name key into a disallowed optional name key
An impossible regex is defined as the value so nothing will be matched, not even an empty string. The field should be omitted entirely.
2024-02-02 14:57:05 +01:00
Rafael Fillipe Silva
1eb2b494c4 remove super from [elseif] tag, similar to [if], as this is a filter context
This removes the `name` mandatory key requirement from the `[elseif]` without the need of an override.
2024-02-02 14:57:05 +01:00
Tahsin Jahin Khalid
e506c2a1ff
[Units] Raven unit tree stats update patch
* units/ war harbinger: +3 HP, +2g cost, -50 XP

* units/war harbinger: removed village and forest def

* units/Dark Omen: removed village and forest def

* Units/Raven: removed village and forest def

* add changelog entry file
2024-02-01 01:29:24 +06:00
Hejnewar
2811bfcdc5
UtBS: Mitigate issues with flying units breaking scenarios
Fix #8188
2024-01-31 08:51:26 +01:00
Hejnewar
d6e3773aa1
UtBS S08: Skip dialog that does not make sense after discovering the cultist fort
Fix #8198
2024-01-31 08:49:54 +01:00
Hejnewar
f9aa91ee87
UtBS: Remove deprecated [store_unit_defense] use
Fix #8184
2024-01-31 08:45:31 +01:00
PointMeAtTheDawn
a9ac735003
Fix Dust Devil regeneration on terrain with an overlay 2024-01-30 18:50:01 +01:00
OrekOrek
3c21bb4b4d HttT S14 Use "id=" to remove Gryphon units
This fix makes sure that all Gryphon units are killed no matter where they are on the map.
2024-01-30 17:55:46 +01:00
doofus-01
2ed76c9458 fix terrain graphics rule for elevation/ice/water transition 2024-01-28 17:42:38 -08:00
OrekOrek
5043badb34 Fallback deletion
Unnecessary fallback is deleted.
{CLEAR_VARIABLE terrain} is moved to the right place.
2024-01-28 18:49:34 +01:00
OrekOrek
f48a2fbabb HttT S12 Snow falls at a constant pace
Line 227 (original):
Re, Rb are dirt, and these hexes are not converted to snowy terrain. However, by having them within [filter_location], snowfall pace fluctuates. Also, Hhd^Vc doesn't exist on this map.

Line 258~269 (original):
Coa and Hhd are not filtered.

Line306~311 (original)
Hhd^Vc doesn't exist on this map.

These changes make snow fall at a constant pace. Also, unnecessary codes are deleted.
2024-01-28 18:49:34 +01:00
Elvish_Hunter
10733b1071 wmllint: check if campaigns are in the 'campaigns' folder before considering them as mainline for the rank check 2024-01-26 21:46:37 +01:00
Elvish_Hunter
1c9274faea wmllint: make the 'ignore' magic comment actually work in certain situations
Fixes #8182
2024-01-26 21:31:56 +01:00
Toom
8f01f11065
Remove warning about weapon specials with no name since name is not mandatory 2024-01-26 16:21:15 +01:00
Steve Cotton
84b1a778ae Backstab unit tests: check that backstab works in a free-for-all
The units on the outsides of a backstab don't have to be allied
to each other, they just have to be enemies of the victim. That's
hardcoded into the AI via attack.cpp's backstab_check() function,
hence a unit test to check that WEAPON_SPECIAL_BACKSTAB activates
in that situation.

Add a new map with 4 sides all on separate castles. This is a
variation of the generic 2p unit test map, extended in the south
with a horizontal reflection of existing map.

Add a MAP_FILE argument to COMMON_KEEP_A_B_C_D_UNIT_TEST,
because it's the same setup except for the map file.
2024-01-26 14:35:07 +00:00
PointMeAtTheDawn
4d7aed9c1a Fix Kaleh sword parry 2024-01-25 20:42:06 +01:00