YotogiOldPlay.cs 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  1. using System;
  2. using MaidStatus;
  3. using MaidStatus.Old;
  4. public static class YotogiOldPlay
  5. {
  6. public static YotogiOld.ExcitementStatus GetExcitementStatus(int excite)
  7. {
  8. if (excite < 0)
  9. {
  10. return YotogiOld.ExcitementStatus.Minus;
  11. }
  12. if (excite < 100)
  13. {
  14. return YotogiOld.ExcitementStatus.Small;
  15. }
  16. if (excite < 200)
  17. {
  18. return YotogiOld.ExcitementStatus.Medium;
  19. }
  20. return YotogiOld.ExcitementStatus.Large;
  21. }
  22. public static YotogiOld.RCType GetRCType(int before_excite, int current_excite)
  23. {
  24. if (0 <= before_excite && current_excite <= -1)
  25. {
  26. return YotogiOld.RCType.RC_1;
  27. }
  28. if (before_excite <= 199 && 200 <= current_excite)
  29. {
  30. return YotogiOld.RCType.RC2;
  31. }
  32. if (before_excite <= 99 && 100 <= current_excite)
  33. {
  34. return YotogiOld.RCType.RC1;
  35. }
  36. if (before_excite <= -1 && 0 <= current_excite)
  37. {
  38. return YotogiOld.RCType.RC0;
  39. }
  40. return YotogiOld.RCType.RCNull;
  41. }
  42. public static YotogiOld.RRCType GetRRCType(int before_excite, int current_excite)
  43. {
  44. if (before_excite == current_excite)
  45. {
  46. if (current_excite == -100)
  47. {
  48. return YotogiOld.RRCType.RRC_4;
  49. }
  50. if (current_excite == 300)
  51. {
  52. return YotogiOld.RRCType.RRC10;
  53. }
  54. }
  55. int num = (before_excite >= current_excite) ? -100 : 300;
  56. int num2 = (before_excite >= current_excite) ? 25 : -25;
  57. YotogiOld.RRCType rrctype = (num != 300) ? YotogiOld.RRCType.RRC_4 : YotogiOld.RRCType.RRC10;
  58. for (int i = 0; i < 16; i++)
  59. {
  60. if (num == 0 || num == 100 || num == 200)
  61. {
  62. num += num2;
  63. }
  64. if (0 < num)
  65. {
  66. if (before_excite < num && num <= current_excite)
  67. {
  68. return rrctype;
  69. }
  70. }
  71. else
  72. {
  73. if (before_excite <= num && num < current_excite)
  74. {
  75. return rrctype;
  76. }
  77. if (current_excite <= num && num < before_excite)
  78. {
  79. return rrctype;
  80. }
  81. }
  82. num += num2;
  83. rrctype += num2 / Math.Abs(num2);
  84. }
  85. return YotogiOld.RRCType.RRCNull;
  86. }
  87. public static YotogiOld.RRType GetRRType(int current_excite)
  88. {
  89. int num = Math.Abs(current_excite) / 50;
  90. if (current_excite < 0)
  91. {
  92. num++;
  93. if (2 < num)
  94. {
  95. num = 2;
  96. }
  97. num *= -1;
  98. }
  99. else if (5 < num)
  100. {
  101. num = 5;
  102. }
  103. return YotogiOld.RRType.RR1 + num;
  104. }
  105. public enum PlayerState
  106. {
  107. Normal,
  108. Insert
  109. }
  110. public struct Param
  111. {
  112. public static YotogiOldPlay.Param Create(Maid maid)
  113. {
  114. MaidStatus.Status status = maid.status;
  115. return new YotogiOldPlay.Param
  116. {
  117. cur_excite = status.currentExcite,
  118. cur_mind = status.currentMind,
  119. cur_reason = status.currentReason,
  120. inyoku = status.inyoku,
  121. m_value = status.mvalue,
  122. hentai = status.hentai,
  123. housi = status.housi,
  124. frustration = status.OldStatus.frustration,
  125. lovely = status.lovely,
  126. elegance = status.elegance,
  127. charm = status.charm,
  128. reception = status.reception,
  129. teach_rate = status.teachRate,
  130. yotogi_type_level = status.selectedYotogiClass.level,
  131. yotogi_type_total_exp = status.selectedYotogiClass.expSystem.GetTotalExp(),
  132. sexual = new Sexual(status.OldStatus.sexual)
  133. };
  134. }
  135. public static YotogiOldPlay.Param operator +(YotogiOldPlay.Param a, YotogiOldPlay.Param b)
  136. {
  137. return new YotogiOldPlay.Param
  138. {
  139. cur_excite = a.cur_excite + b.cur_excite,
  140. cur_mind = a.cur_mind + b.cur_mind,
  141. cur_reason = a.cur_reason + b.cur_reason,
  142. inyoku = a.inyoku + b.inyoku,
  143. m_value = a.m_value + b.m_value,
  144. hentai = a.hentai + b.hentai,
  145. housi = a.housi + b.housi,
  146. frustration = a.frustration + b.frustration,
  147. lovely = a.lovely + b.lovely,
  148. elegance = a.elegance + b.elegance,
  149. charm = a.charm + b.charm,
  150. reception = a.reception + b.reception,
  151. teach_rate = a.teach_rate + b.teach_rate,
  152. yotogi_type_level = a.yotogi_type_level + b.yotogi_type_level,
  153. yotogi_type_total_exp = a.yotogi_type_total_exp + b.yotogi_type_total_exp,
  154. sexual = a.sexual + b.sexual
  155. };
  156. }
  157. public static YotogiOldPlay.Param operator -(YotogiOldPlay.Param a, YotogiOldPlay.Param b)
  158. {
  159. return new YotogiOldPlay.Param
  160. {
  161. cur_excite = a.cur_excite - b.cur_excite,
  162. cur_mind = a.cur_mind - b.cur_mind,
  163. cur_reason = a.cur_reason - b.cur_reason,
  164. inyoku = a.inyoku - b.inyoku,
  165. m_value = a.m_value - b.m_value,
  166. hentai = a.hentai - b.hentai,
  167. housi = a.housi - b.housi,
  168. frustration = a.frustration - b.frustration,
  169. lovely = a.lovely - b.lovely,
  170. elegance = a.elegance - b.elegance,
  171. charm = a.charm - b.charm,
  172. reception = a.reception - b.reception,
  173. teach_rate = a.teach_rate - b.teach_rate,
  174. yotogi_type_level = a.yotogi_type_level - b.yotogi_type_level,
  175. yotogi_type_total_exp = a.yotogi_type_total_exp - b.yotogi_type_total_exp,
  176. sexual = a.sexual - b.sexual
  177. };
  178. }
  179. public int cur_excite;
  180. public int cur_mind;
  181. public int cur_reason;
  182. public int inyoku;
  183. public int m_value;
  184. public int hentai;
  185. public int housi;
  186. public int frustration;
  187. public int lovely;
  188. public int elegance;
  189. public int charm;
  190. public int reception;
  191. public int teach_rate;
  192. public int yotogi_type_level;
  193. public int yotogi_type_total_exp;
  194. public Sexual sexual;
  195. }
  196. }