Flying unit resistant to melee
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.
Flying unit resistant to melee
Hi!
I'm trying to make a flying unit that can only attack with ranged attack and only be hit by ranged attacks. Can someone help me with writing a WML for that? Some skill that prevents others from attacking the unit with melee or maybe giving the unit 100% defense against melee attacks?
I would be grateful for any help
I'm trying to make a flying unit that can only attack with ranged attack and only be hit by ranged attacks. Can someone help me with writing a WML for that? Some skill that prevents others from attacking the unit with melee or maybe giving the unit 100% defense against melee attacks?
I would be grateful for any help
Re: Flying unit resistant to melee
You could give the unit a 0-0 melee attack with a weapon special that also reduces damage taken to zero. Example of the opposite of what you want for the weapon special:
Ageless Era has some "defend only" attacks that aren't used on offense, but they're on AI-only units, it might just be telling the AI not to use them.
Code: Select all
[damage]
id=sxc_brutality
name= _ "brutality"
description= _ "When this attack is used in offense the unit deals 25% more damage and takes 25% more damage."
active_on=offense
apply_to=both
multiply=1.25
[/damage]
Re: Flying unit resistant to melee
Defend and attack only is not AI-only, they work.
Re: Flying unit resistant to melee
Thank you!
I did a bit crude version, but it works. For now it's ok for me.
Thank you
I did a bit crude version, but it works. For now it's ok for me.
Thank you
Re: Flying unit resistant to melee
On the dummy melee attack, you should be able to just use a [disable] special to make it not even appear in the attack menu, and probably to make the AI not consider it either.