Jeremy Music wrote: > Wow I didn't realize how hard this could be. I have been on a mud (and > even coded on a mud, should have looked at the source for this feature > then) that had permanent spellaffects on objects. (A ring that gave the > wearer permanent sanctuary, "gills" that gave the wearer waterbreathing, > "wings" that gave the wearer flying... you get the idea). > > I would like to keep this as simple as possible (and I already have innate > racial affects, and an ability to get them back after a dispel) and, best > case scenario, make it accessible through OLC. (like the APPLY code, > possibly even just expanding the APPLY code). > > Is there a way to make APPLY_SANCTUARY, APPLY_FLYING, APPLY_BLESS, etc.? > This would be the absolute best way (for me) of doing this if it is > possible. On a related topic: a while ago I came to a similar conclusion - there is affection bitvector and there are spell affects, they often do similar things but still are quite different, so we at RMUD decided to make this simplier. Here's what we did: for every possible affect flag there is (AFF_BLIND, AFF_INVIS, AFF_POISON, whatever) we created a spell that has this affect as a result. Now we no longer have any AFF_* constants, and use spell numbers instead, and don't have a problem adding any of the affects to an object: mud utilizes same bitvector. Note that our bless spell doesn't really create a unique affect - it just gives you some stat modifications, so we can't create an "autobless" item without charges. But we can as well put the same APPLY modifiers on the item (usually like +2 to hitroll, -1 to save_spell), making it essentially an AFF_BLESS. There is a different approach we practiced for some time, too - when putting on that object (say wings), cast the spell (fly for wings) on a character as if they quaffed a potion or used a wand with that spell on themselves. Then every tick you have to check if a spell wore off so that you recast it back that instant. Creates some fancy messages newbie players do enjoy ("You feel your body become blurry and unfocused." every 3 or so ticks), and spams veteran players quite a bit too since they tend to accumulate such stuff. ;) But it DOES have the advantage of using any spell regardless of whether it generates an unique affect or doesn't. (Of course not all spells are still useable like that, you can use Fly but not Locate Object, Fireball or Teleport.) Hope this might be helpful... the approach does require some coding, though. If you need any additional information, feel free to email me. Yaroslav +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://democracy.queensu.ca/~fletcher/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST