designs.h 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249
  1. #ifndef __DESIGNS_H
  2. #define __DESIGNS_H
  3. #include <string>
  4. struct Design {
  5. tag_t tag;
  6. std::string name;
  7. skins skin;
  8. tag_t flavor;
  9. unsigned int level;
  10. unsigned int count;
  11. unsigned int bonus_a_count;
  12. unsigned int bonus_b_count;
  13. tag_t slot;
  14. std::string descr;
  15. damage::attacks_t attacks;
  16. damage::defenses_t defenses;
  17. bool count_is_only_one;
  18. unsigned int stackrange;
  19. struct inc_stat_t {
  20. tag_t stat;
  21. double val;
  22. std::string msg;
  23. inc_stat_t() : val(0) {}
  24. };
  25. std::vector<inc_stat_t> inc_stat;
  26. struct inc_count_t {
  27. tag_t stat;
  28. int val;
  29. std::string msg_a;
  30. std::string msg_b;
  31. inc_count_t() : val(0) {}
  32. };
  33. std::vector<inc_count_t> inc_count;
  34. struct zero_stat_t {
  35. tag_t stat;
  36. std::string msg;
  37. };
  38. std::vector<zero_stat_t> zero_stat;
  39. bool usable;
  40. bool use_for_free;
  41. bool destructible;
  42. unsigned int throwrange;
  43. struct blast_t {
  44. unsigned int radius;
  45. unsigned int range;
  46. blast_t() : radius(0), range(0) {}
  47. };
  48. blast_t blast;
  49. int attack_level;
  50. mean_deviation_t gencount;
  51. bool melee;
  52. unsigned int lightradius;
  53. double digging;
  54. int descend;
  55. int safe_descend;
  56. struct useflags_t {
  57. bool blink;
  58. bool enable_spells;
  59. bool random_spell;
  60. bool dowsing;
  61. useflags_t() : blink(false), enable_spells(false), random_spell(false), dowsing(false) {}
  62. };
  63. useflags_t flags;
  64. struct cloud_t {
  65. tag_t terraintag;
  66. unsigned int radius;
  67. unsigned int range;
  68. cloud_t() : radius(0), range(0) {}
  69. };
  70. cloud_t cast_cloud;
  71. double worth;
  72. bool is_lit;
  73. struct permafeat_t {
  74. tag_t feat;
  75. int walk;
  76. int water;
  77. permafeat_t() : feat(), walk(-1), water(-1) {}
  78. };
  79. permafeat_t place_permafeat;
  80. struct tickstat_moon_t {
  81. tag_t stat;
  82. double height;
  83. mean_deviation_t v;
  84. tickstat_moon_t() : height(0), v(0, 1) {}
  85. };
  86. std::vector<tickstat_moon_t> tickstat_moon;
  87. struct tickstat_t {
  88. tag_t stat;
  89. double add;
  90. double mul;
  91. bool apply_count;
  92. tickstat_t() : add(0.0), mul(1.0), apply_count(true) {}
  93. };
  94. std::vector<tickstat_t> tickstat;
  95. struct spell_t {
  96. tag_t ca_tag;
  97. std::string name;
  98. };
  99. std::vector<spell_t> spells;
  100. bool count_is_rcode;
  101. tag_t genocide;
  102. enum {
  103. NO_WISH = 0,
  104. SIMPLE_WISH = 1,
  105. SPECIAL_WISH = 2
  106. } wishing;
  107. bool magic_mapping;
  108. bool heal_ailments;
  109. bool heal_polymorph;
  110. std::string action_name;
  111. struct take_summon_t {
  112. tag_t species;
  113. unsigned int needs_count;
  114. take_summon_t() : needs_count(0) {}
  115. };
  116. take_summon_t take_summon;
  117. bool forbid_wish;
  118. bool forbid_buy;
  119. int change_count;
  120. struct starsign_t {
  121. unsigned int day;
  122. unsigned int sign;
  123. starsign_t() : day(0), sign(0) {}
  124. };
  125. starsign_t starsign;
  126. struct summon_t {
  127. tag_t species;
  128. unsigned int count;
  129. summon_t() : count(0) {}
  130. };
  131. summon_t summon;
  132. struct polymorph_t {
  133. tag_t species;
  134. mean_deviation_t turns;
  135. std::string msg;
  136. };
  137. polymorph_t polymorph;
  138. struct fast_t {
  139. unsigned int slice;
  140. mean_deviation_t turns;
  141. fast_t() : slice(0) {}
  142. };
  143. fast_t fast;
  144. tag_t monster_raised;
  145. tag_t raise_monsters;
  146. struct charm_t {
  147. unsigned int range;
  148. std::string msg;
  149. charm_t() : range(0) {}
  150. };
  151. charm_t charm;
  152. bool label_spot;
  153. struct lucky_free_apply_t {
  154. tag_t stat;
  155. double factor;
  156. double threshold;
  157. lucky_free_apply_t() : factor(1), threshold(0) {}
  158. };
  159. lucky_free_apply_t lucky_free_apply;
  160. Design() : level(0), count(0), bonus_a_count(0), bonus_b_count(0), count_is_only_one(false), stackrange(0),
  161. usable(false), use_for_free(false), destructible(false),
  162. throwrange(0), attack_level(-1), gencount(1, 0), melee(false), lightradius(0), digging(0),
  163. descend(0), safe_descend(0), worth(0), is_lit(false), count_is_rcode(false), wishing(NO_WISH),
  164. magic_mapping(false),
  165. heal_ailments(false), heal_polymorph(false),
  166. forbid_wish(false), forbid_buy(false), change_count(0), label_spot(false)
  167. {}
  168. };
  169. #endif