src/hcode/btech/btechstats_global.h

Go to the documentation of this file.
00001 
00002 /*
00003  * $Id: btechstats_global.h,v 1.1.1.1 2005/01/11 21:18:03 kstevens Exp $
00004  *
00005  * Author: Markus Stenberg <fingon@iki.fi>
00006  *
00007  *  Copyright (c) 1996 Markus Stenberg
00008  *  Copyright (c) 1998-2002 Thomas Wouters
00009  *  Copyright (c) 2000-2002 Cord Awtry
00010  *       All rights reserved
00011  *
00012  * Created: Thu Sep 19 22:40:49 1996 fingon
00013  * Last modified: Sat Jun  6 20:20:38 1998 fingon
00014  *
00015  */
00016 
00017 #ifndef BTECHSTATS_GLOBAL_H
00018 #define BTECHSTATS_GLOBAL_H
00019 
00020 #define VALUES_HEALTH 1         /* In PLBRUISE / PLLETHAL */
00021 #define VALUES_SKILLS 2         /* In PLSKILLS */
00022 #define VALUES_ATTRS  4         /* In PLATTRS */
00023 #define VALUES_ADVS   8         /* In PLADVS */
00024 #define VALUES_ALL    15
00025 #define VALUES_CO     6         /* Attr + Skill */
00026 
00027 
00028 #define CHAR_LASTSKILLTYPE CHAR_SOCIAL
00029 
00030 /* hmm. */
00031 
00032 #define CHAR_VALUE     0
00033 #define CHAR_SKILL     1
00034 #define CHAR_ADVANTAGE 2
00035 #define CHAR_ATTRIBUTE 3
00036 
00037 /* 4 diff. skill types */
00038 
00039 #define CHAR_ATHLETIC    0x0001
00040 #define CHAR_MENTAL      0x0002
00041 #define CHAR_PHYSICAL    0x0004
00042 #define CHAR_SOCIAL      0x0008
00043 
00044 /* Career-types */
00045 #define CAREER_CAVALRY   0x0010 /* Drive + Gun-Conv */
00046 #define CAREER_BMECH     0x0020 /* Bmech Pilot/Gun */
00047 #define CAREER_AERO      0x0040 /* Aero Pilot/Gun */
00048 #define CAREER_ARTILLERY 0x0080 /* Artillery-Gun */
00049 #define CAREER_DROPSHIP  0x0100 /* Dropship Pilot/Gun */
00050 #define CAREER_TECHMECH  0x0200
00051 #define CAREER_TECHVEH   0x0400
00052 #define CAREER_TECH      (CAREER_TECHMECH|CAREER_TECHVEH)
00053 #define CAREER_MISC      0x0800
00054 #define CAREER_ACADMISC  0x1000
00055 #define CAREER_RECON     0x2000
00056 #define SK_XP            0x4000 /* Always raise xp (not spammable) */
00057 
00058 #define XP_MAX    (256*256*256) /* Then we wrap ; tough beans */
00059 
00060 
00061 /* 3 diff. adv types */
00062 
00063 #define CHAR_ADV_VALUE  0
00064 #define CHAR_ADV_BOOL   1
00065 #define CHAR_ADV_EXCEPT 2
00066 
00067 #define CHAR_BLD 1
00068 #define CHAR_REF 2
00069 #define CHAR_INT 4
00070 #define CHAR_LRN 8
00071 #define CHAR_CHA 16
00072 
00073 #define GREEN 0
00074 #define REGULAR 1
00075 #define VETEREN 2
00076 #define ELITE 3
00077 #define HISTORICAL 4
00078 
00079 
00080 #include "p.btech.h"
00081 #include "p.btechstats.h"
00082 
00083 #define char_gvalue char_getstatvalue
00084 #define char_svalue char_setstatvalue
00085 
00086 #define char_getlives(a) char_getvalue(a, "lives")
00087 #define char_getxp(a) char_getvalue(a, "maxxp")
00088 #define char_getxpavail(a) char_getvalue(a, "xp")
00089 #define char_getxp(a) char_getvalue(a, "maxxp")
00090 #define char_getxpavail(a) char_getvalue(a, "xp")
00091 #define char_getbruise(a) char_getvalue((a), "bruise")
00092 #define char_getmaxbruise(a) char_getvalue((a), "maxbruise")
00093 #define char_getlethal(a) char_getvalue((a), "lethal")
00094 #define char_getmaxlethal(a) char_getvalue((a), "maxlethal")
00095 
00096 #define char_glives(a) char_gvalue(a, "lives")
00097 #define char_gxp(a) char_gvalue(a, "maxxp")
00098 #define char_gxpavail(a) char_gvalue(a, "xp")
00099 #define char_gbruise(a) char_gvalue((a), "bruise")
00100 #define char_gmaxbruise(a) (char_gvalue((a), "build")*10)
00101 #define char_glethal(a) char_gvalue((a), "lethal")
00102 #define char_gmaxlethal(a) (char_gvalue((a), "build")*10)
00103 
00104 #define char_setlives(a,b) char_setvalue((a), "lives", (b))
00105 #define char_setbruise(a,b) char_setvalue((a), "Bruise", (b))
00106 #define char_setmaxbruise(a,b) char_setvalue((a), "maxbruise", (b))
00107 #define char_setlethal(a,b) char_setvalue((a), "Lethal", (b))
00108 #define char_setmaxlethal(a,b) char_setvalue((a), "maxlethal", (b))
00109 
00110 #define char_slives(a,b) char_svalue((a), "lives", (b))
00111 #define char_sbruise(a,b) char_svalue((a), "bruise", (b))
00112 #define char_smaxbruise(a,b) char_svalue((a), "maxbruise", (b))
00113 #define char_slethal(a,b) char_svalue((a), "lethal", (b))
00114 #define char_smaxlethal(a,b) char_svalue((a), "maxlethal", (b))
00115 
00116 #define EE_NUMBER    11
00117 #define LIVES_NUMBER 5
00118 
00119 #define char_getstatvaluebycode(s,code) (code >= 0 ? (s->values[code] + (char_values[code].type == CHAR_SKILL ? char_xp_bonus(s,code) : 0) ): -1)
00120 #define char_getstatvaluebycode(s,code) (code >= 0 ? (s->values[code] + (char_values[code].type == CHAR_SKILL ? char_xp_bonus(s,code) : 0) ): -1)
00121 #define char_setstatvaluebycode(s,code,value) \
00122 if (code >= 0) \
00123   { if (code == EE_NUMBER) s->values[LIVES_NUMBER]+=value-s->values[code];\
00124   s->values[code] = value; }
00125 #define char_getvaluebycode(player,code) \
00126   char_getstatvaluebycode(retrieve_stats(player, VALUES_ALL), code)
00127 #define char_setvaluebycode(player,code,value) \
00128   { PSTATS *hm = retrieve_stats(player, VALUES_ALL); \
00129     char_setstatvaluebycode(hm, code, value); \
00130     store_stats(player, hm, VALUES_ALL); \
00131   }
00132 #endif                          /* BTECHSTATS_GLOBAL_H */

Generated on Mon May 28 04:25:20 2007 for BattletechMUX by  doxygen 1.4.7