Need help with custom ability/special
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Need help with custom ability/special
I'm trying to make a custom type of unit that resists damage of any type applied by melee attacks.
So far I came up with this special:
To apply to unit's melee weapon. But if I would like them to have an ability that does the same effect, what should I do?
So far I came up with this special:
Code: Select all
#define WEAPON_SPECIAL_FIGHTER
[damage]
id=fighter
name= _ "fighter"
description= _ "This unit takes less damage in melee combat."
[filter_weapon]
range=melee
[/filter_weapon]
multiply=0.75
apply_to=opponent
[/damage]
#enddef
Calling a spear a spoon and then saying "our spoons are different, WINR," is kind of unsatisfying, isn't it?
Re: Need help with custom ability/special
Event-based ability. You need to interrupt combat and change damage.
Re: Need help with custom ability/special
Aside from Ravana suggested, you can't. But if all units having the special/ability do have a melee attack, just make the special invisible and add a dummy ability.Ranger wrote:To apply to unit's melee weapon. But if I would like them to have an ability that does the same effect, what should I do?
Re: Need help with custom ability/special
ok, thx. I'll see what I do with that.
Calling a spear a spoon and then saying "our spoons are different, WINR," is kind of unsatisfying, isn't it?