Re: oasisolc addons

From: Brian Langenfeld (00206205@BIGRED.UNL.EDU)
Date: 10/01/98


> What I think you might want to do, is in the area where it asks you for
> the mobs level, you could put a switch( atoi(arg)) or whatever it is,
> with cases for each level you want different stuff for...  In those
> cases, put a GET_HP(olcmob) = 1000 or whatever you want(Note that isnot
> even resembling code in there, just an idea to get you started).  It'll
> make your medit.c file extremely large, but it's just an idea.

   Hmm.. how about setting this up at the top of medit.c:

const struct defaultMobStats
{
  int   hitNumDice;
  int   hitSizeDice;
  int   damNumDice;
  int   damSizeDice;
  int   experience;
  int   gold;
  int   armorClass;
  (et cetera)
}
default[ ] =
{
//  HND HSD DND DSD     EXP  GOLD    AC         LEVEL
  {   1,  1,  1,  1,      1,    0,  100 },      //  0
  {   2,  5,  7, 12,   2000,  150,  100 },      //  1
  {   3,  6,  8, 14,   2100,  213,  185 },      //  2
      .   .   .   .       .     .     .         //  .
      .   .   .   .       .     .     .         //  .
      .   .   .   .       .     .     .         //  .
  {  69, 69, 69, 69, 690000, 6900,  -69 }       // 69
};

   I suppose you could use formulae instead, but I'd prefer a hard-coded
array, myself.  Anyway, when a builder inputs a level (stored here in the
variable 'level'), run something like this:

  GET_LEVEL( pMob ) = level;
  GET_HND( pMob ) = default[ level ].hitNumDice;
  GET_HSD( pMob ) = default[ level ].hitSizeDice;
  GET_DND( pMob ) = default[ level ].damNumDice;
  GET_DND( pMob ) = default[ level ].damSizeDice;
  GET_EXP( pMob ) = default[ level ].experience;
  GET_GOLD( pMob ) = default[ level ].gold;
  GET_AC( pMob ) = default[ level ].armorClass;

   Piece of cake. :)  Hope this helps..

                                                        Brian




Disclaimer: All aforewritten code is MAILER CODE(tm).  It is meant to be a
guideline, NOT a 'plug-in' snippet. :)


     +------------------------------------------------------------+
     | 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