File: weapon.h

package info (click to toggle)
aime 0.60.3-7
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 6,016 kB
  • ctags: 5,217
  • sloc: cpp: 77,611; ansic: 3,765; sh: 2,996; makefile: 234; sed: 93
file content (61 lines) | stat: -rw-r--r-- 1,371 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#ifndef _WEAPON_H
#define _WEAPON_H

#include "strings.h"
#include "moveable.h"
#include "builder.h"

enum hands {One_Handed, Two_Handed};

class Weapon : public Moveable
{
public:

   Weapon(char *the_name, char *the_area);
   virtual ~Weapon();

   virtual void write_object(FILE *the_file, int build_format);
   virtual void describe(Builder *the_builder);
   virtual void describe(Player *the_player);
   virtual int set_attrib(Builder *the_builder, Parse *the_parsed);
   virtual int copy_object(Entity *copy_obj);

   int      set_weapon_class(char *new_class);
   char     *get_weapon_class(void);

   void     set_damage(int new_damage);
   int      get_damage(void);
 
   void     set_wield_type(hands the_type);
   hands    get_wield_type();

   int      set_dep_strength(int the_strength);
   int      get_dep_strength(void);

   int      set_dep_dex(int the_dexterity);
   int      get_dep_dex(void);

   int      copy_weapon(Weapon *copy_from);
   Weapon *operator = (Weapon *copy_from);
   int      read_weapon_attrib(FILE *read_file, ErrLog *error_log);
   virtual  int get_mem_size();
   virtual  int get_mem_size_dynamic();

   int swing(Individual *attacker, Individual *target, Merger **proj_return);

 private:

   Weapon();

   Strings weapon_class;
   int     damage;

   hands   wield_type;

   int dep_strength;
   int dep_dexterity;

};

#endif