Remove/subordinate attacks

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
User avatar
Baufo
Inactive Developer
Posts: 1115
Joined: January 29th, 2006, 4:53 pm
Location: Vienna, Austria

Remove/subordinate attacks

Post by Baufo »

In my MP-scenario Defense of the Goblin I would like to let the player chose wich attack he would like to use if he is attacked. This could be just to decrease disliked attacks to 1-1 but I remember that there was something to give an attack a weight (can't find it again and I am not sure if this is only for the "real" AI on its turn).

What do you think would be most clever to subordinate an attack with [message]+[option] tag?

Thanks in advance!
I was working on the proof of one of my poems all the morning, and took out a comma. In the afternoon I put it back again. -- Oscar Wilde
Dacyn
Posts: 1855
Joined: May 1st, 2004, 9:34 am
Location: Texas

Post by Dacyn »

Code: Select all

[effect]
 [filter]
 x,y=$x2,$y2
 [/filter]
apply_to=attack
name={NAME}
defense_weight=0
[/effect]
(reduces the defense weight of attack NAME, so a different weapon will be used)
User avatar
Baufo
Inactive Developer
Posts: 1115
Joined: January 29th, 2006, 4:53 pm
Location: Vienna, Austria

Post by Baufo »

Thanks you, that was what I was looking for.
I was working on the proof of one of my poems all the morning, and took out a comma. In the afternoon I put it back again. -- Oscar Wilde
Post Reply