24078 Commits

Author SHA1 Message Date
Charles Dang
671cebe035 TSG: tweak description slightly
[ci skip]
2018-01-24 12:00:14 +11:00
vgaming
728204665c fix code problems found by luacheck (#2388)
fix code problems found by luacheck

Second iteration of the process, now handling data/lua/wml/*.lua

luacheck command used to find bugs:
  luacheck ./*.lua --globals wesnoth wml --codes --ignore 542 213
Additionally, error code 211 (unused variables) could be ignored,
as using underscore convention `_` is controversial in
wesnoth ( see https://github.com/wesnoth/wesnoth/pull/2380#discussion_r162519341 )

Actual bugs found:
* items.lua, access of global `write_name` instead of local `cfg.write_name`
* kill.lua, typo `primary_unit` -> `primary`
* bad code style: global `i` instead of local `i`
  (would conflict with 3-rd party code if it would use global `i`, too)
2018-01-23 13:35:04 -06:00
Charles Dang
e34341145f Campaign Selection: removed excess borders around sort buttons
[ci skip]
2018-01-23 17:12:47 +11:00
V N
f4e9ac3f8f remove executable flag from images 2018-01-22 23:11:14 +11:00
Charles Dang
da3a0ed7cf Added [lua] conditional tag
Also made conditions fail if they encountered a syntax or runtime error. This seems the
more logical behavior than passing.

WML conditional tags were split into their own Lua file. The one in lua/wml/object.lua
relies on local variables so was left there.
2018-01-22 23:03:16 +11:00
pentarctagon
1192b0f1e5 Rename the Khalid's shield bash to pommel strike.
The sprite has two swords, not a shield.
2018-01-22 12:04:42 +11:00
josteph
a2be9c8f86 Hide 'Rails' and 'Fake Shroud' terrains in the unit help pages when impassable.
Fixes #1399. Supersedes #536.
2018-01-22 11:54:09 +11:00
vgaming
8ba6e5f40e fix code problems found by luacheck (#2380)
actual bugs found:
* backwards_compatibility.lua (undeclared global "helper")
* core.lua (use of undeclared global "helper")
* wml_tags.transform_unit had wrong code to deal with recall_cost
* wrong variable name in cave_map_generator
2018-01-20 23:05:58 -05:00
pentarctagon
5b31b87f6a MP: Renames the Khalifate to Dunefolk.
Part of an effort to make the faction better fit into Wesnoth. See:
https://forums.wesnoth.org/viewtopic.php?f=12&t=47643
https://forums.wesnoth.org/viewtopic.php?f=12&t=47703
2018-01-19 17:28:40 -05:00
Gregory A Lundberg
b5f76eff79
Bump copyright to 2018 2018-01-19 00:02:20 -06:00
Charles Dang
fa6df6d664 Core: wmlindent run
[ci skip]
2018-01-19 12:34:36 +11:00
Charles Dang
e938ac4147 EI S17: fixed incorrect type_tree key (should be type_adv_tree)
[ci skip]

Former was the old name before it was renamed to the latter.
2018-01-19 12:29:57 +11:00
Charles Dang
ae8f554e58 Campaigns: wmllint run
[ci skip]
2018-01-19 12:24:50 +11:00
Charles Dang
ca7e3c126d Campaigns: wmlindent run
[ci skip]
2018-01-19 12:20:04 +11:00
doofus-01
48fa7d9461 remove specific mention of horses 2018-01-19 10:28:38 +11:00
doofus-01
c669a75e67 touch-up archer sprites 2018-01-19 10:28:38 +11:00
doofus-01
b5b1539143 base sprites for Quenoth scouts 2018-01-19 10:28:38 +11:00
V N
5209271db3 Lua: add variables metatable
The implementation differs from already-existing
wml.variable.proxy in that it does not try to proxy table sub-fields,
and is fast & simple.

Example usage:
wml.variables.test = 123
print(wml.variables.test)
2018-01-19 09:53:06 +11:00
Richard Kettering
b969940ba4 Added frames for a ne stalwart attack. 2018-01-17 23:03:00 -06:00
Jyrki Vesterinen
1386e3945c Added unit tests about which WML tag names Lua API accepts 2018-01-17 23:23:13 +02:00
Gunter Labes
03b6ad568c
Continue if there is an old executable
Chances are that the previous build works just as well.
We just need it for config file parsing which does not change often.
2018-01-12 19:14:41 +01:00
Charles Dang
8ae99bc86a Added some event unit tests by @Pentarctagon
Tests event execution order and events with variable names.
2018-01-11 13:12:28 -05:00
Allefant
4de5cdc7d3 update the addon manager for "simple WML" 2018-01-09 09:23:50 +01:00
Gunter Labes
7cdec04c7f
only keep env vars upper case, add missing quotes 2018-01-09 02:06:04 +01:00
Gunter Labes
a535a3140c
Use a more generic default value 2018-01-08 23:36:10 +01:00
ln-zookeeper
80829106c1 AOI: New story art by Bhoren
I chose 2560x1440 as the size over 1920x1080 simply because when I tried both sizes at compression levels that produced a similar quality result, the difference in filesize was negligible.
2018-01-07 13:31:43 +02:00
sigurdfdragon
d3a58e9424 DiD S12: Allow campaign to end on the third repetition
As players who haven't figured out certain strategies might have too much
trouble beating the third repetition. Also waiting until the fourth
repetition may be too long and have players question what's going on.
2017-12-29 19:50:54 -05:00
sigurdfdragon
44bcd6ef90 DiD S07: Add note about scenario conditions 2017-12-29 19:50:54 -05:00
sigurdfdragon
ec6c174096 DiD: Clear variables when no longer needed and remove unused variable 2017-12-29 19:50:54 -05:00
sigurdfdragon
b0fc2708ae DiD S11: Fix & improve wose implementation
Bug was that a troll on 4,21 could move through the avoid area to attack
player at 11,22 which is a likely occurrence. Expanding the avoid area
further seems inappropriate as troll avoidance is more likely to be noticed.

New implementation ensures only player will trigger the wose, maintains
proper look to the player, no longer interferes with trolls attacking, and
simplifies code.
2017-12-29 19:50:54 -05:00
sigurdfdragon
8db9ec2777 DiD S01: Add the alternative objective to the scenario objectives 2017-12-29 19:50:54 -05:00
sigurdfdragon
cd9af67ff1 DiD S04: Fix dialog so it better fits with if malin_used_necromancy or not 2017-12-29 19:50:54 -05:00
sigurdfdragon
5fbd5affe2 DiD S03: Slightly change gameplay to better match objectives
Have player kill all enemy units in the cave instead of just the leaders.
2017-12-29 19:50:54 -05:00
sigurdfdragon
8b367a184a DiD S11: Have dialog fire if Mal Keshar is defender as well as attacker 2017-12-29 19:50:54 -05:00
Jyrki Vesterinen
d81f230680 Clear unit death animation after killing the unit
This is another and much better way to fix the unit halo remaining.
2017-12-28 12:02:29 +02:00
Jyrki Vesterinen
f50c7d3f2a Revert "Work around unit halo not disappearing with [kill] animate=yes"
This reverts commit 70b468070b71616aa3663088b6ad171391d0c4f0.

As I said in the commit message, the fix is not pretty, and
@CelticMinstrel said in IRC that a different fix would definitely be
better. I'll fix the problem by having an animation automatically
release the unit when done, instead (next commit).
2017-12-28 11:48:12 +02:00
Steve Cotton
1c2968c632 L S8 Give Harper a loyal overlay in Liberty's final scenario
He's been a silver-crowned hero until this scenario, and in
the final scenario he's still loyal with dialogue if he dies,
so make him easily visible to the player.
2017-12-26 08:30:01 -06:00
Jyrki Vesterinen
70b468070b Work around unit halo not disappearing with [kill] animate=yes
The problem was that the kill animation retained a reference to the unit.
Triggering a Lua garbage collection (which destroys the animation object)
fixes it, although it's definitely not a pretty fix.

Closes pull request #2313.
2017-12-25 18:35:01 +02:00
gfgtdf
9cd200032c
fix player not proceeding to next scenario in Low 22
reported on the forum
2017-12-23 20:39:20 +01:00
Jyrki Vesterinen
e0e59ac463 Fix exception when [harm_unit] is used without an attacking unit
Regression from commit 38e31aa61f60abed71bd266e6d2abe61035805b4.
In particular, it broke WML unit tests.
2017-12-21 20:24:48 +02:00
Vasya Novikov
7be364f3b5 addon_manager: fix append_tag usage
Note that this still doesn't allow the --upload
functionality to work. After this fix,
wesnoth still complaints about unordered WML.

It is believed that this is a separate issue though,
happened because of the latest simple_wml changes.
2017-12-20 22:23:53 +02:00
Vasya Novikov
6a1a91cd7c make images not executable 2017-12-20 22:19:35 +03:00
Gregory A Lundberg
38e31aa61f Do not access non-existent unit
The [kill] tag can run animations. But it can also fire the `last breath` event, which can call [kill]. When we get back to the original [kill], the unit is gone, causing an error attempting to run the animations.

Added a check to ensure the unit is still on the map before we attempt to run the animations.

The Issue also requested that [harm_unit] pass the unit causing the harm into the [kill] tag so that `last breath` could use the secondary (killing) unit available like it does elsewhere.

Closes #2298
2017-12-19 15:05:24 -06:00
Jyrki Vesterinen
f064f50f1b [heal_unit]: Turn on floating text with animate=yes
I also moved the animation to be played *before* healing, which is the same
order as in C++ code. In the previous order, the animation isn't played for
some reason.

Fixes #2295.
2017-12-18 23:28:45 +02:00
Jyrki Vesterinen
d80d47eb8a [heal_unit]: fix wrong value of "hits" parameter
Only "hit", "miss" and "kill" are allowed.
2017-12-18 22:04:35 +02:00
Gregory A Lundberg
0353242315
DiD S07: Fix Taylor talks to himself
Use an alternate message if the unit spotting us is General Taylor.
2017-12-17 15:24:31 -06:00
doofus-01
8473e49288
Giant Scorpion unit images (#2266)
NE and SE base/standing frames.  Defending and pincer-ing animations for both NE- and SE-facing frames.  Stinger animation for SE-facing frames.  Portrait replaced.
2017-12-14 19:48:43 -08:00
josteph
d7afadc94b
HttT: Fix OOS when redoing a recall and Li'sar is allied
For #2216.
2017-12-14 14:07:46 -06:00
sigurdfdragon
2e27f05f80 DiD: Fixup MANOR_DOORS macro
Prevent an opened door from being opened again and causing a 'terrain
with a string with more than 4 characters has been found' error.
2017-12-13 22:51:51 -05:00
Charles Dang
ab2cfa0ac2 Fixup 002b1a3c871f (bad indent)
[ci skip]
2017-12-14 11:15:07 +11:00