Commit graph

139 commits

Author SHA1 Message Date
Tahsin Jahin Khalid
4fb9f51db7 utils.cfg: typo fix in FULL HEAL macro 2024-04-28 20:45:27 +02:00
newfrenchy83
b5805eca8f
Add priority and filter to overwrite specials (#7746)
using overwrite_specials alone means that we have only two possibilities, either one_side is chosen and in this case if the ability used as a weapon carrying the attribute is applied to the unit (apply_to=self), the other abilities are the same type applied also to 'self' not carrying the attribute will be overwritten, but those of the opponent with apply_to=opponent will be kept in the list; or else both_sides is chosen and all abilities of the same type that do not carry the attribute will be overwritten. To be able to use the attribute in abilities like [damage] for example, it is necessary to be able to be even more selective as for a 'charge' type leadership with multiply=2.5 but which must not be combined with the classic charge and without overwriting the aute [damage] as backstab, [overwrite_filter] to only match damage with apply_to=both and active_on=offense is then interesting.

adding priority allows you to select that it ability can use its overwrite_specials attribute while the others can be overwritten in the same way as an ability without the attribute. Finally, this system makes it unnecessary to limit the use of the attribute to abilities used as weapons but also to special weapons.
2023-10-08 10:09:31 -05:00
Elvish_Hunter
28012997d2 Removed no longer necessary {CLEAR_VARIABLE heal_amount} lines 2022-01-16 17:23:09 +01:00
newfrenchy83
3db6b8b9d0 modify overwrites_specials in engine and utils.cfg macro 2021-04-20 23:30:23 -05: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
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
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
newfrenchy83
550c686e7b fix value={CTH_NUMBER} forget in force CTH macro 2018-12-14 08:28:12 -06:00
mattsc
afb394c4b1
Merge pull request #3723 from mattsc/rca_ai_changes
Default AI changes
2018-12-02 08:42:42 -08:00
mattsc
c0bc8c548c AI: deprecate ai_depth related macros 2018-11-16 06:47:54 -08:00
Celtic Minstrel
866420adf8 Redesign force cth macro
Closes #3707
2018-11-15 21:17:04 -05:00
newfrenchy83
5d6a6c0de1
Fix grammar in cth macro
Also fix whitespace errors from edab243b9d -- GL

Closes #3694
2018-11-07 15:32:22 -06:00
newfrenchy83
edab243b9d
Fix rare bug in FORCE_CHANCE_TO_HIT
If in attack end in FORCE_CHANCE_TO_HIT macro, unit or second unit doesn't exist anymore because rare case where unit disapear before attack end event was calledthen we have an error message like "Invalid WML found: [unstore_unit]: variable 'second_unit' doesn't exist" because presence of unit not condition of execution of event.
2018-11-06 15:15:40 -06:00
Severin Glöckner
5ad321654b core macros: don't clear nonexistant variable
A leftover from the switch from {FOREACH} to [foreach]

[ci skip]

(cherry-picked from commit 001b444b10)
2018-10-07 03:24:59 +00:00
Charles Dang
0d0bb91d99 Added a CREDITS_SEPARATOR macro
[ci skip]

This way, UMC can use the default credit's separator in their credits sections.
2018-03-04 02:16:53 +11:00
sigurdfdragon
81ea433117 Macros: Fix typo 2017-10-12 20:26:33 -04:00
ln-zookeeper
8bbe4189ed Reverted FOREACH, NEXT and REPEAT to their original forms
This is because the changes (9fb175c9d6) possibly break some existing uses for no reason.
2017-03-22 19:45:21 +02:00
fendrin
8a9feb10ac Fix several bugs introduced with the FOREACH replacement. 2016-08-06 21:17:01 +02:00
fendrin
8544320b58 Replace FOREACH 2016-08-06 06:20:41 +02:00
Charles Dang
491fa91906 Deprecated FOREACH and NEXT
These feature unbalanced WML and have been replaced by proper tags.
2016-08-06 11:08:48 +11:00
gfgtdf
ab1a4629a9 rename [filter] -> [filter_location] in [random_placement] 2015-12-10 01:43:32 +01:00
gfgtdf
f329b1e431 fixup random_placement patch 2015-12-08 01:13:14 +01:00
gfgtdf
a9f141c58e fixup SCATTER_UNITS
was broken in 9d656ad755
2015-12-07 22:40:26 +01:00
gfgtdf
dc786dc181 add tag [random_placement]
and use it to implement SCATTER_IMAGE,SCATTER_EMBELLISHMENTS and
SCATTER_UNITS
2015-12-07 21:49:09 +01:00
Charles Dang
2775d3df4d Minor simplification of FORCE_CHANCE_TO_HIT 2015-10-04 13:52:23 +11:00
Celtic Minstrel
9fb175c9d6 Use new looping tags to implement loop macros 2015-10-01 13:37:55 -04:00
Charles Dang
dd0b2104a5 Deprecated MENU_IMG_TXT and MENU_IMG_TXT2 2015-10-01 21:10:27 +11:00
Ignacio R. Morelle
b9c6ab59d6 Fix WML variable leak in RECRUIT_UNIT_VARIATIONS 2015-08-09 01:52:27 -03:00
Bär Halberkamp
ae0a2fe2cc Removed [full_heal] 2015-04-03 19:34:16 +02:00
Charles Dang
72e67eee93 Used include_borders=no in SCATTER_UNITS
This is the 'more straightforward' method of doing this mentioned in 982d868b94
2015-01-15 07:47:24 +11:00
Charles Dang
6f60640c8e Revert "Use [modify_unit] for MODIFY_UNIT"
This reverts commit 02ecc00b76.
2015-01-07 00:26:24 +11:00
Charles Dang
02ecc00b76 Use [modify_unit] for MODIFY_UNIT 2015-01-06 23:53:10 +11:00
Bär Halberkamp
db028708c4 Added a lua implementation for FULL_HEAL and PUT_TO_RECALL_LIST 2014-10-21 19:41:36 +02:00
ln-zookeeper
982d868b94 Fix SCATTER_UNITS placing units on map borders 2014-07-05 14:04:41 +03:00
ln-zookeeper
9312420c08 Fix RECRUIT_UNIT_VARIATIONS not ensuring full hp 2014-05-14 00:15:22 +03:00
Elvish_Hunter
993861aff4 Pushed LOOT macro from LoW, TRoW and THoT in core, file utils.cfg.
wmlindent also reindented other two macro files
2012-04-22 09:12:48 +00:00
Steven Panek
7cb034c05f Fixed some typos. 2012-02-15 18:29:12 +00:00
Steven Panek
bbcc185631 Fixed ATTACK_DEPTH4. 2011-10-10 12:27:33 +00:00
Steven Panek
695269c34a Added comments to the four-difficulty macros...
...so they'll get into the macro reference page.
2011-09-12 08:44:26 +00:00
Steven Panek
4fedbcece5 Moved the four-difficulty macros to core; wrote some new ones. 2011-09-12 08:28:15 +00:00
Anonymissimus
af4a01db8c Mute some warning messages in {FORCE_CHANCE_TO_HIT }. 2011-03-13 21:46:43 +00:00
Steven Panek
03a3d3b552 Converted remaining instances of 'add -'. 2010-12-05 23:45:04 +00:00
Steven Panek
0a6fd74f77 Removed the comments in ON_DIFFICULTY's EASY definition,
...for it breaks things...

Fixes bug #17025.

shadowmaster demanded this commit.
2010-11-06 04:01:53 +00:00
Lari Nieminen
b6e15aaaf3 Added a new macro file debug-utils.cfg...
...and moved some debugging macros there.
2010-10-21 08:09:27 +00:00
Eric S. Raymond
e7d337a676 Reindent mainline. 2010-09-23 13:04:56 +00:00
Eric S. Raymond
28a730d1af More wmllint/wmlscope cleanup. 2010-09-12 21:38:15 +00:00
Fabian Müller
b3e5e95db3 Macro for doing conditional operations on variables. 2010-08-31 15:50:49 +00:00
Fabian Müller
95ecd0c701 LoW: Enabled the second and third chapter of the multiplayer campaign port. 2010-08-30 22:00:01 +00:00