OU_MONS.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. //Filename : OU_MONS.CPP
  21. //Description: Unit Monster header file
  22. #ifndef __OU_MONS_H
  23. #define __OU_MONS_H
  24. #ifndef __OUNIT_H
  25. #include <OUNIT.h>
  26. #endif
  27. enum { MONSTER_ACTION_STOP = 0,
  28. MONSTER_ACTION_ATTACK,
  29. MONSTER_ACTION_DEFENSE,
  30. MONSTER_ACTION_EXPAND,
  31. };
  32. //----------- Define class Monster -----------//
  33. #pragma pack(1)
  34. class UnitMonster : public Unit
  35. {
  36. public:
  37. char monster_action_mode;
  38. public:
  39. UnitMonster();
  40. char* unit_name(int withTitle=1);
  41. void set_monster_action_mode(char monsterActionMode);
  42. void process_ai();
  43. void die();
  44. //-------------- multiplayer checking codes ---------------//
  45. virtual UCHAR crc8();
  46. virtual void clear_ptr();
  47. private:
  48. int random_attack();
  49. int assign_to_firm();
  50. void group_order_monster(int destXLoc, int destYLoc, int actionType);
  51. void king_leave_scroll();
  52. };
  53. #pragma pack()
  54. //--------------------------------------------//
  55. #endif