|
Zoticus Beginner
Joined: 16 Jan 2010 Posts: 24
|
Posted: Tue Nov 13, 2012 10:06 am
If then unless? |
Hello -
In some Iron Realms muds, they have a tattoo that cures a random affliction. Right now, my tree is really simple - it checks if it's able to be used at all, and if so, this happens -
#if (%numitems( @MyAffs)>2 or %ismember( unknown, @MyAffs)) {tree}
The problem with this is that some afflictions 'block' the curing of things that it -can- remedy. I don't want to have it treat those blocks as an inability to work at all, however.
If I have two afflictions it can cure, that are 'blocked' in some way, I don't it to work until those 'blocks' are cured - but, if I have -three- that it can cure, and the third one is -not- blocked, how do I tell my system to cure -just- that third affliction, and wait for the 'blocks' to go away before trying to cure the other two?
An example is broken limbs. A level one break can be cured by the tree tattoo. A level two cannot. If you cure the level two break though, the tree tattoo can cure the level one now. If I have a level two break, I don't want tree to try and cure the level one - but, if I have a level two break, and another affliction, I -do- want it to cure that extra aff.
So.. If I've got a level two break, then don't tree for the level one, -unless- there's -another- affliction.
Any tips? |
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Tue Nov 13, 2012 2:52 pm |
#IF (@break) {#SWITCH (@breakLevel) (1) {tattoo} (2) {other method}} {yea, no break}
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
Zoticus Beginner
Joined: 16 Jan 2010 Posts: 24
|
Posted: Wed Nov 14, 2012 3:03 am |
This basically tells my system that the level two breaks are 'don't use this method' flags - just the same as not being allowed to do it at all. I'm wondering if the possibility exists to tell it not to try using it if I have a level two break -unless- there's something -else- there besides the breaks themselves that it can cure.
|
|
|
|
shalimar GURU
Joined: 04 Aug 2002 Posts: 4691 Location: Pensacola, FL, USA
|
Posted: Wed Nov 14, 2012 6:11 am |
well, the switch could change the reference variable for the cure?
|
|
_________________ Discord: Shalimarwildcat |
|
|
|
Zoticus Beginner
Joined: 16 Jan 2010 Posts: 24
|
Posted: Wed Nov 14, 2012 7:48 am |
You're right, it could..
Actually, that's probably how I'll do it.
I'll write back if it works out. |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|