NEWBIE: CODE question.

From: Homer Simpson (fcolvin@metz.une.edu.au)
Date: 09/08/96


Hi all,
       I am changing the skill system in my mud so that its not quite so
class based. Every class will be able to prac every skill and spell, it
will just cost different prices, and be available at differnt levels
depending on the class. For this purpose I am making an array of all my
skills and spells with all the info need for each. I have included the
code below. What I am wondering is, whether the lines at the bottom are
correct, and will infact fill the array skill_list correctly. The numbers
havn't been entered yet, but the format is what I am going to use.

Thanks for the help.

Homer.

aka Fionn Colvin. :)



#define SIZE 800;

struct skillinfo {
    int Type;
    int Cost[4];
    int Level[4];
    int Max;
    int Prime;
};

/* {Skill Type, Mage Prac Cost, Priest Prac Cost, Rogue Prac Cost,
    Warrior Prac Cost, Minimum Mage Level, Minimum Priest Level,
    Minimum Rogue Level, Minimum Warrior Level, Maximum Increase Per Level, 
    Prime Stat For That Skill}, */

struct skillinfo skill_list[SIZE] = {

{0, 00, 00, 00, 00, 00, 00, 00, 00, 00, 0}, /*   0   Reserved          */
{2, 00, 00, 00, 00, 00, 00, 00, 00, 00, 0}, /*   1   Armor             */
{3, 00, 00, 00, 00, 00, 00, 00, 00, 00, 0}, /*   2   Teleport          */
{2, 00, 00, 00, 00, 00, 00, 00, 00, 00, 0}, /*   3   Bless             */
{2, 00, 00, 00, 00, 00, 00, 00, 00, 00, 0}, /*   4   Blindness         */
{3, 00, 00, 00, 00, 00, 00, 00, 00, 00, 0}, /*   5   Burning Hands     */

                  ..
                 etc.
                  ..

{0, 00, 00, 00, 00, 00, 00, 00, 00, 00, 0}  /* Number  Skill Name */
};
+-----------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   http://cspo.queensu.ca/~fletcher/Circle/list_faq.html   |
+-----------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/18/00 PST