Unique charge abilities? E. g. 3x per scenario
Moderator: Forum Moderators
Unique charge abilities? E. g. 3x per scenario
In the campaign that I will create eventually, in one scenario I need to introduce
a "hero" (NPC). This one will be a lancer rider with better stats.
But I would also like to use special abilities, such as power charge 3x per scenario.
Most abilities I found in add-ons were how you could select or pick a tree for
it, and then just use that passively most of the time. But I'd need it to be
an active charge-able ability so that the player can decide when to use it,
e. g. it will do even more damage than normal but perhaps exhaust the
mount a bit (reduced movement for 3 turns after that or something like
it).
My question now is: does anyone have an example to study for a charge
ability that has only n times uses available? Or is there some code snippet
somewhere? I wanted to ask before I invest too much time into reinventing
the wheel here. (I also bookmarked this so I don't forget to re-visit at a
later time; I put these links into the blue print I am currently writing
to specify more details in regards to the whole campaign.)
a "hero" (NPC). This one will be a lancer rider with better stats.
But I would also like to use special abilities, such as power charge 3x per scenario.
Most abilities I found in add-ons were how you could select or pick a tree for
it, and then just use that passively most of the time. But I'd need it to be
an active charge-able ability so that the player can decide when to use it,
e. g. it will do even more damage than normal but perhaps exhaust the
mount a bit (reduced movement for 3 turns after that or something like
it).
My question now is: does anyone have an example to study for a charge
ability that has only n times uses available? Or is there some code snippet
somewhere? I wanted to ask before I invest too much time into reinventing
the wheel here. (I also bookmarked this so I don't forget to re-visit at a
later time; I put these links into the blue print I am currently writing
to specify more details in regards to the whole campaign.)
Re: Unique charge abilities? E. g. 3x per scenario
Unity magic has something like that.
-
- Code Contributor
- Posts: 173
- Joined: October 6th, 2017, 12:57 pm
Re: Unique charge abilities? E. g. 3x per scenario
you could use implement this in your unit_type
and pull this code in [campaign]
Code: Select all
[specials]
[damage]
id=charge_limited
apply_to=opponent
cumulative=no
multiply=3
[filter_self]
[filter_wml]
[not]
[variables]
charge_remain=0
[/variables]
[/not]
[/filter_wml]
[/filter_self]
[/damage]
[/specials]
Code: Select all
[event]
name=prestart
first_time_only=yes
{VARIABLE charge_remain 3}
[/event]
[event]
name=attack end
first_time_only=no
[filter_condition]
[variable]
name=charge_remain
numerical_not_equals=0
[/variable]
[/filter_condition]
[filter_attack]
special_id=charge_limited
[/filter_attack]
[set_variable]
name=charge_remain
sub=1
[/set_variable]
[/event]