save and bone files now can be compressed with ZLib (wow!)
[k8-i-v-a-n.git] / src / game / team.h
blobcb834f78b02ff9a88d2497540654de8adc700b5d
1 /*
3 * Iter Vehemens ad Necem (IVAN)
4 * Copyright (C) Timo Kiviluoto
5 * Released under the GNU General
6 * Public License
8 * See LICENSING which should be included
9 * along with this file for more details
12 #ifndef __TEAM_H__
13 #define __TEAM_H__
15 #include <vector>
16 #include <list>
17 #include <map>
19 #include "typedef.h"
22 class outputfile;
23 class inputfile;
24 class character;
26 typedef std::vector<character *> charactervector;
29 class team {
30 public:
31 team ();
32 team (feuLong);
33 void SetRelation (team *, int);
34 int GetRelation (const team *) const;
35 void Hostility (team *);
36 feuLong GetID () const { return ID; }
37 void SetID (feuLong What) { ID = What; }
38 void Save (outputfile &) const;
39 void Load (inputfile &);
40 void SetLeader (character *What) { Leader = What; }
41 character *GetLeader () const { return Leader; }
42 std::list<character *>::iterator Add (character *);
43 void Remove (std::list<character *>::iterator);
44 const std::list<character *> &GetMember () const { return Member; }
45 int GetKillEvilness () const { return KillEvilness; }
46 void SetKillEvilness (int What) { KillEvilness = What; }
47 truth HasEnemy () const;
48 int GetMembers () const { return Member.size(); }
49 int GetEnabledMembers () const;
50 void MoveMembersTo (charactervector &);
52 private:
53 character *Leader;
54 std::map<feuLong, int> Relation;
55 std::list<character *> Member;
56 feuLong ID;
57 int KillEvilness;
61 outputfile &operator << (outputfile &, const team *);
62 inputfile &operator >> (inputfile &, team *&);
65 #endif