/***********************************************************************\ * GENERAL * * GENERAL is by Jouster@COOLmud. He can be reached at * * dan@betterbox.net. This file falls under the GPL and the licenses * * of Diku, Merc, ROM, RoT, and any licenses that may apply to any * * portions of any file that this program may modify. * *^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^* * If you don't mind, I'd appreciate an email if you use this * * file in your code. Thanks. * * dan@betterbox.net * \***********************************************************************/ /***********************************************************************\ * VERSION HISTORY * * v0.1a--original development * \***********************************************************************/ #define MAX_GENERAL_RANK 10 #define G9 ( MAX_GENERAL_RANK - 1 ) #define G8 ( G9 - 1 ) #define G7 ( G8 - 1 ) #define G6 ( G7 - 1 ) #define G5 ( G6 - 1 ) #define G4 ( G5 - 1 ) #define G3 ( G4 - 1 ) #define G2 ( G3 - 1 ) #define G1 ( G2 - 1 ) #define LOG_NORMAL 0 #define LOG_ALWAYS 1 #define LOG_NEVER 2 extern bool fLogAll; #define GENERAL_RANK( ch ) ( IS_GENERAL( ch ) ? \ GENERAL_RANK_NUM( ch->pcdata->gnrl_rank ) : \ ( 0 ) ) #define GENERAL_RANK_NUM( x ) ( ( MAX_GENERAL_RANK + 1 ) - \ x ) struct gnrl_cmd_type { char * name; DO_FUN * do_fun; sh_int rank; sh_int log; }; /* Generals' commands */ DECLARE_DO_FUN( gnrl_advance ); DECLARE_DO_FUN( gnrl_cash ); DECLARE_DO_FUN( gnrl_level ); DECLARE_DO_FUN( gnrl_restore ); DECLARE_DO_FUN( gnrl_spellup ); DECLARE_DO_FUN( gnrl_transfer ); DECLARE_DO_FUN( gnrl_qp );