Debian Codegraph @

artifact.h

raw symbols SCIP
1 /*
2 * PROPRIETARY INFORMATION. This software is proprietary to POWDER
3 * Development, and is not to be reproduced, transmitted, or disclosed
4 * in any way without written permission.
5 *
6 * Produced by: Jeff Lait
7 *
8 * POWDER Development
9 *
10 * NAME: artifact.h ( POWDER Library, C++ )
11 *
12 * COMMENTS:
13 * This handles the randart (cool name - always read that as
14 * random artwork rather than random artifacts). The idea is that
15 * artifact's properties are generated by their names. Thus, the
16 * long sword Foobar will be the same from game to game.
17 */
18
19 #ifndef __artifact__
20 #define __artifact__
21
22 #include "mygba.h"
23 #include "glbdef.h"
24 #include "buf.h"
25
26 class ARTIFACT
27 {
28 public:
29 ARTIFACT();
30 ~ARTIFACT();
31
32 bool hasattack;
33 ATTACK_DEF attack;
34 bool hasthrownattack;
35 ATTACK_DEF thrownattack;
36 s8 acbonus;
37 u8 lightradius;
38 u8 iscarryintrinsic;
39 char *intrinsics;
40
41 // This is used internally to chain the allocated artifacts.
42 // Treat this as private.
43 char *name;
44 ITEM_NAMES baseitem;
45 ARTIFACT *next;
46 };
47
48 // Global initialization code.
49 // This will reset the artifact tables. It should be called
50 // on new game or load.
51 void
52 artifact_init();
53
54 // Builds a random artifact name.
55 BUF
56 artifact_buildname(ITEM_NAMES baseitem);
57
58 //
59 // This builds an artifact table for the given item.
60 // The long sword Foobar has different properties than
61 // the wooden shield Foobar.
62 //
63 // The returned pointer is persistant.
64 //
65 ARTIFACT *
66 artifact_buildartifact(const char *name, ITEM_NAMES baseitem);
67
68 #endif
69