renamed alot of types; hope this will not break the game
[k8-i-v-a-n.git] / src / game / team.h
blobe8fe8a8030e0f1ed66d813b0c8ea3c9323b01189
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 (uLong);
33 void SetRelation (team *, int);
34 int GetRelation (const team *) const;
35 void Hostility (team *);
36 uLong GetID () const { return ID; }
37 void SetID (uLong 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<uLong, int> Relation;
55 std::list<character *> Member;
56 uLong ID;
57 int KillEvilness;
61 outputfile &operator << (outputfile &, const team *);
62 inputfile &operator >> (inputfile &, team *&);
65 #endif