1 /*
2  * Seven Kingdoms: Ancient Adversaries
3  *
4  * Copyright 1997,1998 Enlight Software Ltd.
5  *
6  * This program is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
18  *
19  */
20 
21 //Filename   : OU_MONS.CPP
22 //Description: Unit Monster header file
23 
24 #ifndef __OU_MONS_H
25 #define __OU_MONS_H
26 
27 #ifndef __OUNIT_H
28 #include <OUNIT.h>
29 #endif
30 
31 enum	{	MONSTER_ACTION_STOP = 0,
32 			MONSTER_ACTION_ATTACK,
33 			MONSTER_ACTION_DEFENSE,
34 			MONSTER_ACTION_EXPAND,
35 		};
36 
37 struct UnitMonsterCrc;
38 
39 //----------- Define class Monster -----------//
40 
41 #pragma pack(1)
42 class UnitMonster : public Unit
43 {
44 public:
45 	char	monster_action_mode;
46 
47 public:
48 	UnitMonster();
49 
50 	char* unit_name(int withTitle=1);
51 
52 	void	set_monster_action_mode(char monsterActionMode);
53 
54 	void	process_ai();
55 	void 	die();
56 
57 	//-------------- multiplayer checking codes ---------------//
58 	virtual	uint8_t crc8();
59 	virtual	void	clear_ptr();
60 	virtual	void	init_crc(UnitMonsterCrc *c);
61 
62 private:
63 	int 	random_attack();
64 	int 	assign_to_firm();
65 	void 	group_order_monster(int destXLoc, int destYLoc, int actionType);
66 	void 	king_leave_scroll();
67 };
68 #pragma pack()
69 
70 //--------------------------------------------//
71 
72 #endif
73 
74