attack filter problem

The place to post your WML questions and answers.

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.
Post Reply
Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

attack filter problem

Post by Rhuvaen »

I'm trying to change the ranged attack of a Rogue unit and have tried several things with the attack filter. In all cases, all the existing attacks were changed, so the filter failed to identify the correct attack.

Try 1:

Code: Select all

        [effect]
          apply_to=attack
          [filter]
            range=ranged
          [/filter]
          set_name="crossbow"
          set_special=marksman
          set_type=pierce
          increase_damage=1
        [/effect]
Try 2:

Code: Select all

        [effect]
          apply_to=attack
          [filter]
            name=knife
          [/filter]
          set_name="crossbow"
          set_special=marksman
          set_type=pierce
          increase_damage=1
        [/effect]
What's wrong?
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

The weapon filter shouldn't go inside a [filter] block.
Rhuvaen
Inactive Developer
Posts: 1272
Joined: August 27th, 2004, 8:05 am
Location: Berlin, Germany

Post by Rhuvaen »

zookeeper wrote:The weapon filter shouldn't go inside a [filter] block.
Har. 8) 'tis confusing, when you can go without [filter] and when not (maybe because I'm a non-smoker :lol:).

Many thanks for a question promptly answered! :D
User avatar
zookeeper
WML Wizard
Posts: 9742
Joined: September 11th, 2004, 10:40 pm
Location: Finland

Post by zookeeper »

Rhuvaen wrote:
zookeeper wrote:The weapon filter shouldn't go inside a [filter] block.
Har. 8) 'tis confusing, when you can go without [filter] and when not (maybe because I'm a non-smoker :lol:).
I agree, it's sometimes annoying that the filtering behaviour is not consistent. Although I don't think there are that many places where the [filter] tag is not used for a filter, so maybe this could easily be fixed some time in the future.
Post Reply