A Question

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
blueknight1758
Posts: 252
Joined: March 30th, 2011, 8:38 pm
Location: The UK

A Question

Post by blueknight1758 »

Ok I'm trying to code an ability that on the start of a new turn all enemy units resistances are halved to a minimum of 20, the trouble is I can't think how to code it, can someone help me?
User avatar
perseo
Posts: 324
Joined: January 8th, 2011, 4:09 am

Re: A Question

Post by perseo »

I've got a doubt: What do you understand for resistance? The hitpoints or the defence from the terrain?
"I was pulling a barrow, when I saw a stalking horse
what a beautiful day!- he said- for visiting a red herring
and getting hoarse."
Working on this campaign: The septentrional tower
User avatar
StDrake
Posts: 996
Joined: July 21st, 2009, 6:50 am

Re: A Question

Post by StDrake »

resistance is resistance, but there's something about this description that makes me not want to help
- ALL enemy units on the map, or just some? And what units aside for enemies should be affected?
- is the reduction supposed to be forever? if not, how are the resistances supposed to go back up?
- if you didn't indeed mistake resistance with something else - did you note that most units have less or exactly 20% of any resistance ?
Like cats? I've made a whole faction of them to kick ass with!
Don't like cats? I've made a whole faction of them to kick their asses! So everyone's happy :)
Felinian faction is part of the Beyond Southern Hells era
kitties need sprites! art topic here
Ceres
Forum Regular
Posts: 620
Joined: September 18th, 2010, 7:56 pm
Location: Germany

Re: A Question

Post by Ceres »

Also, do you want negative resistances to get higher or lower?
blueknight1758
Posts: 252
Joined: March 30th, 2011, 8:38 pm
Location: The UK

Re: A Question

Post by blueknight1758 »

Ok as it seems I was unclear on what i meant here goes again, the resistance to weapons of units next to the unit with this abilities should be halved until the turn is over, unless they are still by the unit with the ability
User avatar
StDrake
Posts: 996
Joined: July 21st, 2009, 6:50 am

Re: A Question

Post by StDrake »

Code: Select all

[resistance]
#fill those as desired
id=
name=
description=
affect_self=no
affect_allies=no
affect_enemies=yes
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[/affect_adjacent]
[filter_base_value]
greater_than_equal_to=40
[/filter_base_value]
multiply=0.5
max_value=100
[/resistance]
[resistance]
#use the exact same id you entered above
id=
affect_self=no
affect_allies=no
affect_enemies=yes
[affect_adjacent]
adjacent=n,ne,se,s,sw,nw
[/affect_adjacent]
[filter_base_value]
greater_than_equal_to=20
less_than=40
[/filter_base_value]
value=20
max_value=100
[/resistance]
strange, seems that tag takes resists directly, not reverse
want a tutorial why it's done this way?
Like cats? I've made a whole faction of them to kick ass with!
Don't like cats? I've made a whole faction of them to kick their asses! So everyone's happy :)
Felinian faction is part of the Beyond Southern Hells era
kitties need sprites! art topic here
blueknight1758
Posts: 252
Joined: March 30th, 2011, 8:38 pm
Location: The UK

Re: A Question

Post by blueknight1758 »

yes please! and thank you for the coding it is very useful.
Post Reply