OU_GOD.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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_GOD.CPP
  21. //Description: Unit God header file
  22. #ifndef __OU_GOD_H
  23. #define __OU_GOD_H
  24. #ifndef __OUNIT_H
  25. #include <OUNIT.h>
  26. #endif
  27. #ifndef __OFIRM_H
  28. #include <OFIRM.h>
  29. #endif
  30. //----------- Define class God -----------//
  31. #pragma pack(1)
  32. class UnitGod : public Unit
  33. {
  34. public:
  35. short god_id;
  36. short base_firm_recno; // recno of the seat of power which creates and supports this god unit
  37. char cast_power_type;
  38. short cast_origin_x, cast_origin_y;
  39. short cast_target_x, cast_target_y;
  40. public:
  41. virtual void init_derived();
  42. void pre_process();
  43. int process_attack();
  44. void disp_info(int refreshFlag);
  45. void detect_info();
  46. void cast_power(int castXLoc, int castYLoc);
  47. //-------------- multiplayer checking codes ---------------//
  48. virtual UCHAR crc8();
  49. virtual void clear_ptr();
  50. private:
  51. void consume_power_pray_points();
  52. void cast_on_loc(int castXLoc, int castYLoc);
  53. void cast_on_unit(int unitRecno, int divider);
  54. void cast_on_worker(Worker* workerPtr, int nationRecno, int divider);
  55. void viking_summon_rain();
  56. void viking_summon_tornado();
  57. void persian_cast_power(int unitRecno, int divider);
  58. void japanese_cast_power(int unitRecno, int divider);
  59. void maya_cast_power(int unitRecno, int divider);
  60. #ifdef AMPLUS
  61. void egyptian_cast_power(int unitRecno, int divider);
  62. void indian_cast_power(int unitRecno, int divider);
  63. void zulu_cast_power(int unitRecno, int divider);
  64. #endif
  65. void persian_cast_power(Worker* workerPtr, int nationRecno, int divider);
  66. void japanese_cast_power(Worker* workerPtr, int nationRecno, int divider);
  67. void maya_cast_power(Worker* workerPtr, int nationRecno, int divider);
  68. #ifdef AMPLUS
  69. void egyptian_cast_power(Worker *workerPtr, int nationRecno, int divider);
  70. void indian_cast_power(Worker *workerPtr, int nationRecno, int divider);
  71. void zulu_cast_power(Worker *workerPtr, int nationRecno, int divider);
  72. #endif
  73. //--------- AI functions ----------//
  74. void process_ai();
  75. void think_dragon();
  76. void think_maya_god();
  77. void think_phoenix();
  78. void think_viking_god();
  79. void think_persian_god();
  80. void think_chinese_dragon();
  81. void think_japanese_god();
  82. int think_god_attack_target(int& targetXLoc, int& targetYLoc);
  83. #ifdef AMPLUS
  84. void think_egyptian_god();
  85. void think_indian_god();
  86. void think_zulu_god();
  87. #endif
  88. };
  89. #pragma pack()
  90. //--------------------------------------------//
  91. #endif