Re: [HELP][REQUEST]

From: Chris Proctor (cjp@YOYO.CC.MONASH.EDU.AU)
Date: 09/10/97


> -+that's in db.c, in the parse_object function.
> -+I've done similar stuff for room level restrictions, works exactly the
> -+same way.
>
> I kindof frown on this approach (like it matters what I frown at/on),
> because then you get into assigning obscure letters for each addition
> to the database file and it becomes confusing/hard to maintain in the
> future.  I really like just having an optional level field at the end
> of a string of numbers in the object, because it only appears when it's
> needed (well, I suspect OLC systems will write it out whether it is used
> or not).  It integrates the field into the actual database format, while
> keeping it completely backwards compatible.  And it's a very simple
> addition, at that.
>
> Say you have this line (pseudo-code):
>
>   if (sscanf(line, " %d %d %d ", &i, &j, &k) != 3)
>     error;
>
> to make an optional fourth argument all you have to do is,
>
>   if (sscanf(line, " %d %d %d %d ", &i, &j, &k, &l) < 3)
>     error;
>
> this way, 3-infinite (theoritically) arguments can be accepted on the
> same line [well, for as long as it fits the format], while only the
> first 3 are required.

Don't know that that format is any easier to understand, from a builder's
point of view, than the M <number> for material, L <number> for level, T
<number> for timer type format.
My way is less elegant, slightly hackish maybe, but as long as you don't
go overboard with extra variables it's fine. I only have 5 or so, and the
first letter of the name is free. so *shrug*.
Question of style, IMO.

> -+      "A double-edged sword lets you cut down
> -+      your enemies with the backswing as well."
> -+             -- Gerrard of the Weatherlight
>
> Well, kindof.  A single-edged sword is quite capable of this, too; and
> most double-edged swords (including long swords and Scottish claymores)
> functioned better as piercing weapons.  Besides, Japanese katanas
> (single-edged) cut far better than most, if not all, double-edged
> swords I've seen.

Quite right, of course. However the quote is a comment on the old saying
about double-edged swords, the implication being that you cut yourself
with them as well.
It's alluding to (in this case) spells that have detrimental effects on
their casters to balance the power of them, and ways to turn it to your
advantage, e.g. following a spell that damages everything in a room
(including the caster) and following it up with a spell that only works
if you're on half hp or less. That kind of thing.

Agreed RE: Katanas.
Though it's not really fair to compare something that can cut through a
human body in 1/100th of a second to most western swords.

Blah, I'm gonna change my .sig now. *grins*

_____________________________________________________
        "Conversations have no brackets".
                    -- Wooble the Fungus God
-----------------------------------------------------
     Check out Dominia Mud, on snafu.net.au 3333
  Or my homepage: http://yoyo.cc.monash.edu.au/~cjp


     +------------------------------------------------------------+
     | 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/08/00 PST