1074 Commits

Author SHA1 Message Date
Tahsin Jahin Khalid
25340e3ee3 run wmlindent 2021-12-08 04:42:59 +06:00
Tahsin Jahin Khalid
8e63a0cab2 added 2 generalized macros for advancements 2021-12-08 04:41:12 +06:00
Discontinuum
36a610603e
Simplify the description of leadership (#6117) 2021-10-11 13:10:31 -04:00
Elvish_Hunter
eaa26b0006 Removed two no longer useful wmlscope directives 2021-10-08 22:03:12 +02:00
Celtic Minstrel
61fa362781 Delete some deprecated special note macros
This only covers those deprecated at level 4
2021-06-20 23:36:20 -04:00
doofus-01
4811de8642
Last minute Naga things (#5855)
* move UtBS mace nagas to core

* adding mace naga portraits from LordBob

* move naga hunter portrait to UtBS from core

* de-bow-ify the ophidian nagas and add Deflect weapon special

* revisions to mace nagas base sprites

* revisions to naga guards, including new weapon special Absorb

* compatibility Nagas for UtBS
2021-06-13 20:51:38 -07:00
Steve Cotton
0fdf52058b Support [movetype][special_note] and [language]special_note_damage_type_*
Refactor special notes for abilities, attack types, movetypes and weapon specials

An easier way of setting special notes in the most common use-cases. Text given
in the following attributes will be collected and added to the special notes
for units and unit types (some of these were added in the previous commit):

* [ability tag name]special_note=
* [language]special_note_damage_type_TYPE=
* [movetype][special_note]note=
* [attack][specials][special tag name]special_note=

It's no longer necessary to put these notes in each unit_type's .cfg file, and
the macros for doing so are now deprecated.

C++ changes
-----

Simplify both unit_type::special_notes and unit::unit_special_notes. Add
utils::stable_unique, similar to std::unique but accepts non-ordered input and
preserves the order in the output.

Remove unit_type::has_special_notes() - callers can instead call
special_notes() and then check if the returned vector is empty, which removes
the need for duplicating code in unit_type.

Trade-off: the new [language]special_note_damage_type_TYPE is likely deprecated in 1.19.
-----

Adding [language]special_note_damage_type_TYPE= uses the same existing design
as [language]type_TYPE=, however both are hacks that don't fit the general
style of WML. It could be better to define a new [damage_type] tag that
supercedes both and also provides a place for specifying the damage icon;
however that won't be done in time for the API freeze for 1.16.

Doing it in the way that this commit does it is a hack, but it's one where
replacing it with the better solution in 1.18 will affect very few UMCs (only
those that define additional damage types). Even in the UMCs that would be
affected, it would likely only be a few changes in a single central file.

Trade-off: NOTE_DEFENSE_CAP is not auto-added
-----

It might be better to auto-add NOTE_DEFENSE_CAP when movetype.cpp detects that
the type has capped values. However as NOTE_SPIRIT already requires
[movetype][special_note], it's simple to use the same mechanism. If we decide
to change it to being auto-added, the current commit greatly reduces the number
of places that would need to change again, as it's now in the [movetype]
instead of the many [unit_type]s using that movetype.
2021-06-01 14:29:57 +02:00
Celtic Minstrel
3568b5ff66 An easier way of setting special notes in the most common use-case (abilities and weapon specials)
Rebased version of e6c58fc35cc398d70f31817f8b3ba783bfa08a6d, with merge conflicts resolved.
2021-06-01 14:29:57 +02:00
newfrenchy83
128869d897
fix teleport message. (#5824)
Fix #5816 issue . 04455c0 commit forget second owner and unit.side in formula.
2021-05-31 13:45:28 -04:00
Celtic Minstrel
04455c01b4 Fix deprecated WFL side number usage
Fixes #5816
2021-05-29 11:23:04 -04:00
newfrenchy83
1cb2393b42 fix anerror 2021-05-02 19:40:48 -05:00
newfrenchy83
ad95696b4a Fix teaching_anim not implmmented in variation_id=sceptre of Httt Princes and Battle Princess
I have forget to pull this in variation scpeter of unit_type
2021-05-02 19:40:48 -05:00
Hejnewar
f027cd4900
Fix #5729 2021-04-26 18:17:47 +02:00
newfrenchy83
3db6b8b9d0 modify overwrites_specials in engine and utils.cfg macro 2021-04-20 23:30:23 -05:00
newfrenchy83
e3b737cfd6
Add [teaching_anim] for abilities used like weapon specials given by an adjacent unit
When a unit gives adjacent units abilities used like weapon specials, and is not already showing an animation from giving a resistance or leadership effect, a [teaching_anim] can be played instead.
2021-03-15 10:30:30 -05:00
Celtic Minstrel
a12de1f90f Fix several races using the Markov name generator instead of the new CFG generator 2021-03-05 09:29:11 -05:00
newfrenchy83
05b2ea2262
Extend special_id_active and special_type_active to account for abilities used as specials 2021-02-18 18:19:35 -06:00
doofus-01
d3f94aaaa6 unit animations - fix wrong-facing glitch for units with animated torch flame overlay - also allow for ne facing standing animations 2021-02-06 15:11:53 -08:00
Andrey Bienkowski
5cb1790669 Cleanup wmllint: display on/off
https://github.com/wesnoth/wesnoth/pull/5481 removed the check that made
wmllint: display on and wmllint: display off necessary.
This PR removes now redundant wmllint comments.

find ./data/ -name '*.cfg' -exec sed -ri '/^ *# *wmllint *:? *display *(on|off) *$/d; s/ *# *wmllint *:? *display *(on|off) *$//' '{}' ';'
2021-02-02 18:36:28 +03:00
doofus-01
2a8baa9590
various small fixes (#5495)
* units - set image_icon for sidebar display of Cataphract

* units - remove inactive ability description for Diversion

* add recruit/recall to event list triggering check for diversion animation (Dunefolk Falconer)
2021-01-24 16:59:54 -08:00
Andrey Bienkowski
ad4778037d Add textdomain wesnoth to two files w/o explicit textdomain
wmllint complained:
"../../data/core/macros/movetypes.cfg", line 1: no textdomain string
"../../data/core/macros/optional_unit_advancements.cfg", line 1: no textdomain string
2021-01-13 19:20:52 +01:00
Charles Dang
df87395aaf Removed overlays= from NAMED_LOYAL_UNIT
This key is deprecated and TRAIT_LOYAL handles setting the icon now.
2021-01-09 21:48:51 +11:00
Charles Dang
99fe4293c0 IS_HERO/IS_LOYAL: use [object] instead of overlays= 2021-01-09 21:48:00 +11:00
doofus-01
41b2030113
Revise the bobbing animation convention (#5388)
This shifts many bobbing animations to only run if the unit HP falls below a certain point.  Bobbing animations are a subset of standing animation, it is a case-by-case decision whether an animation should fall into this category or even be affected by this change.

Also in this:

* add wounded filter to STANDARD_IDLE_FILTER

* unit sprites - update orcish grunt and heaving anim

* units - north-facing sprites for orcish grunt
2020-12-28 10:43:21 -08:00
doofus-01
0daabf73ea
Units - various work on new fauna (#5344)
* finish Giant Stoat -> Frost Stoat conversion

* adding scarab (Horned Scarab)

* various fauna animations work
2020-12-20 19:19:43 -08:00
newfrenchy83
2168f629fb
Add overwrite_specials attribute to allow forcing a lower chance to hit
The reported issue being that the FORCE_CHANCE_TO_HIT macro was able to force an increase in an attack's chance to hit, but no longer able to force a decrease.
2020-12-14 14:57:59 -06:00
newfrenchy83
70e4f7bb7e
Move documentation outside some macros
Fixes #5347
2020-12-07 22:26:06 -06:00
Pentarctagon
62aa0b252f
Run wmlindent. 2020-11-30 16:10:28 -06:00
Celtic Minstrel
9c102a64c6
Fix OBJECTIVE_FOOTNOTE 2020-11-30 13:41:09 -05:00
Celtic Minstrel
212b4fc3d1 Put back the documentation comments removed in 0e800d36a6b57ad28d5e2a1d46c3181bb92b597c
This time they're added in the wrong place so as not to break the schema validation; they can be moved to the correct place later once that actually works.
2020-11-29 12:44:31 -05:00
Pentarctagon
d4b8f71771
Fix indentation. 2020-11-23 00:17:31 -06:00
Pentarctagon
0e800d36a6
Fix schema validation. 2020-11-22 23:54:12 -06:00
Celtic Minstrel
059dabcb6a Do a pass of macro documentation
- Adds a bunch of documentation
- Fixes some incorrect or inaccurate documentation
- Moves some documentation so that wmlscope actually picks it up
- Excludes some internal macros from being documented
2020-11-22 12:24:43 -05:00
Elvish_Hunter
ba6b5f04aa macros/movetypes.cfg: moved docstring for LESS_NIMBLE_ELF macro inside that macro 2020-11-22 11:03:04 +01:00
Elvish_Hunter
30d9697ab5 wmlindent run on macros/deprecated-utils.cfg 2020-11-19 12:53:29 +01:00
Elvish_Hunter
044901fd01 Fixed a deprecation comment to match a regex used in wmlscope 2020-11-19 11:37:06 +01:00
gfgtdf
b21c110f30 run wmlindent 2020-10-19 23:53:52 +02:00
Severin Glöckner
b7fe0db365 Macros: use [foreach] for MOVE_UNIT_BY 2020-09-21 01:40:04 +02:00
Severin Glöckner
b8219e50ab Macros: fix leaked variable in {HEAL_UNIT}
[heal_unit] set's as side-effect an variable, which contains the heal amount
of one of the healed units.
It's more likely that this will just add a variable with authors not being aware
to clean it afterwards, than the case being that someone want's this behaviour.

I assume that this happens is an unintended side-effect from former code refactoring,
the original implementation of this macro was not doing this.

[ci skip]
2020-08-16 13:45:17 +02:00
gfgtdf
6fb3573978 fix modify_unit_type macros 2020-07-03 14:28:13 +02:00
nemaara
f65be69998 Diversion: tweak ability description 2020-04-09 03:36:08 -04:00
Hejnewar
e0820700b5
Balance changes (#4834)
* Dragonguard HP increased from 59 to 63
    * Bone Shooter HP increased from 40 to 42
    * Banebow HP increased from 50 to 52
2020-04-05 23:03:21 +02:00
doofus-01
182a7bb602
Units - Dunefolk - Falconer branch of Skirmisher line (#4779)
* Units - Dunefolk - first draft at Falconer branch of skirmisher

* Dunefolk - revision to Falconer line

* Units - dunefolk - some progress on falconer standing animation

* Units - dunefolk - attack animations for falconer

* Units - dunefolk - defense and melee (partial) attack anims

* units - dunefolk - WIP lvl3 falconer

* units - dunefolk - revise falconer

* units - dunefolk - animation work on Falconer line

* units - dunefolk - falconer ability diversion revised to affect enemy chance-to-hit. Animation filter/trigger not yet resolved

* units/abilities - dunefolk falconer diversion ability-related animations mechanism

* units - dunefolk - sky_hunter animation frames

* dunefolk/abilities - fix diversion animations to work on die event

* abilities - schema validation induced correction

* abilities - diversion animations - attempt to fix case of undo movement

* units - dunefolk - finish some cosmetic issues for Falconer line

* units - dunefolk - wmlindent

* use on_undo over select in diversionability

undoing can only change the 'diversion' state if the original action also did,
so there is no reason to check it in all 'select' events.

* fixup

* minor clean-up

Co-authored-by: gfgtdf <daniel.gfgtdf@gmail.com>
2020-03-23 17:59:53 -07:00
doofus-01
e1fb5fc2b7
Add comment to ABILITY_FEEDING macro
There should be some explanation of what was done in 2ba7ad5c439c5ed5414654262e17608b1cc4c332 otherwise that's pretty sneaky.
2020-03-18 18:41:03 -07:00
gfgtdf
c207eeb899 remove last two cases of extra_defines
this converts the optional grand marsal advancement to the
[modify_unit_type] syntax.

Also with this the core cfg files no longer depend on other
macros except EDITOR and the difficulty macros so we could
(if we wanted) optmize it to not load this part of the cfg
again for each campaign.
2020-03-12 19:15:17 +01:00
gfgtdf
3950f40f3f remove [advancefrom] from mainline
See issue #3955
the intention is to deprecate [advancefrom] in
favour of [modify_unit_type], because it was a
common source of OOS errors, and it is less flexible.

As a secondary effect this also fixes issue #4402 :
"changing units via extra_defines sometimes not working
because extra_defines had bugs".
Now we no longer use extra_defines for that.

Addon authors should now no longer use these extra_defines,
instead put the new core marcos with the same name directly
into [campaign].
2020-03-12 19:15:17 +01:00
mattsc
fefe431360 AI: fix remove castle_switch CA from default AI 2020-03-04 06:55:35 -08:00
mattsc
e36e8e1ac3 AI: remove castle_switch CA from default AI
It causes more harm than good in many singleplayer scenarios, for example when there is an allied AI keep close to the player's AI.

The candidate action is still part of the Experimental AI, and its marco remains available, so it can easily be included in a scenario if desired.
2020-03-04 06:49:43 -08:00
Severin Glöckner
d9a0984195 Abilities: use [regenerate] tag for DF regen ability 2020-01-13 00:08:34 +01:00
doofus-01
d956d262fe
various dunefolk sprites and animations (#4683)
* units - dunefolk cataphract defense animations

* dunfolk sunderer defense anim

* dunefolk sprites - move the torch flames to an overlay (just in standing anim for now)

* dunefolk - skirmisher defense anim

* dunefolk strider sprite defense anim

* dunefolk harrier sprite defense anim

* dunefolk rover sprite defense anim

* dunefolk marauder and raider sprites - make torch appear or not as appropriate
2020-01-02 17:34:10 -08:00