YotogiPlay.cs 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. using System;
  2. using System.Collections.Generic;
  3. using MaidStatus;
  4. using Yotogis;
  5. public static class YotogiPlay
  6. {
  7. public static Yotogi.ExcitementStatus GetExcitementStatus(int excite)
  8. {
  9. if (excite < 0)
  10. {
  11. return Yotogi.ExcitementStatus.Minus;
  12. }
  13. if (excite < 100)
  14. {
  15. return Yotogi.ExcitementStatus.Small;
  16. }
  17. if (excite < 200)
  18. {
  19. return Yotogi.ExcitementStatus.Medium;
  20. }
  21. return Yotogi.ExcitementStatus.Large;
  22. }
  23. public static Yotogi.RCType GetRCType(int before_excite, int current_excite)
  24. {
  25. if (before_excite <= 199 && 200 <= current_excite)
  26. {
  27. return Yotogi.RCType.RC2;
  28. }
  29. if (before_excite <= 99 && 100 <= current_excite)
  30. {
  31. return Yotogi.RCType.RC1;
  32. }
  33. if (before_excite <= -1 && 0 <= current_excite)
  34. {
  35. return Yotogi.RCType.RC0;
  36. }
  37. return Yotogi.RCType.RCNull;
  38. }
  39. public static Yotogi.RRCType GetRRCType(int before_excite, int current_excite)
  40. {
  41. if (before_excite == current_excite && current_excite == 300)
  42. {
  43. return Yotogi.RRCType.RRC9;
  44. }
  45. Func<int, bool> func = delegate(int thresholdNum)
  46. {
  47. if (thresholdNum < 0)
  48. {
  49. return (before_excite <= thresholdNum && thresholdNum < current_excite) || (before_excite > thresholdNum && thresholdNum >= current_excite);
  50. }
  51. return before_excite < thresholdNum && thresholdNum <= current_excite;
  52. };
  53. foreach (KeyValuePair<int, Yotogi.RRCType> keyValuePair in new List<KeyValuePair<int, Yotogi.RRCType>>
  54. {
  55. new KeyValuePair<int, Yotogi.RRCType>(-50, Yotogi.RRCType.RRC_2),
  56. new KeyValuePair<int, Yotogi.RRCType>(-25, Yotogi.RRCType.RRC_1),
  57. new KeyValuePair<int, Yotogi.RRCType>(25, Yotogi.RRCType.RRC1),
  58. new KeyValuePair<int, Yotogi.RRCType>(50, Yotogi.RRCType.RRC2),
  59. new KeyValuePair<int, Yotogi.RRCType>(75, Yotogi.RRCType.RRC3),
  60. new KeyValuePair<int, Yotogi.RRCType>(125, Yotogi.RRCType.RRC4),
  61. new KeyValuePair<int, Yotogi.RRCType>(150, Yotogi.RRCType.RRC5),
  62. new KeyValuePair<int, Yotogi.RRCType>(175, Yotogi.RRCType.RRC6),
  63. new KeyValuePair<int, Yotogi.RRCType>(225, Yotogi.RRCType.RRC7),
  64. new KeyValuePair<int, Yotogi.RRCType>(250, Yotogi.RRCType.RRC8),
  65. new KeyValuePair<int, Yotogi.RRCType>(275, Yotogi.RRCType.RRC9),
  66. new KeyValuePair<int, Yotogi.RRCType>(300, Yotogi.RRCType.RRC9)
  67. })
  68. {
  69. if (func(keyValuePair.Key))
  70. {
  71. return keyValuePair.Value;
  72. }
  73. }
  74. return Yotogi.RRCType.RRCNull;
  75. }
  76. public static Yotogi.RRType GetRRType(int current_excite)
  77. {
  78. int num = Math.Abs(current_excite) / 50;
  79. if (current_excite < 0)
  80. {
  81. num++;
  82. if (2 < num)
  83. {
  84. num = 2;
  85. }
  86. num *= -1;
  87. }
  88. else if (5 < num)
  89. {
  90. num = 5;
  91. }
  92. return Yotogi.RRType.RR1 + num;
  93. }
  94. public enum PlayerState
  95. {
  96. Normal,
  97. Insert
  98. }
  99. public struct Param
  100. {
  101. public static YotogiPlay.Param Create(Maid maid)
  102. {
  103. Status status = maid.status;
  104. return new YotogiPlay.Param
  105. {
  106. currentExcite = status.currentExcite,
  107. currentMind = status.currentMind,
  108. cur_sensory = status.currentSensual,
  109. inyoku = status.inyoku,
  110. m_value = status.mvalue,
  111. hentai = status.hentai,
  112. housi = status.housi,
  113. lovely = status.lovely,
  114. elegance = status.elegance,
  115. charm = status.charm,
  116. reception = status.reception,
  117. teach_rate = status.teachRate,
  118. yotogi_type_level = status.selectedJobClass.level,
  119. yotogi_type_total_exp = status.selectedJobClass.expSystem.GetTotalExp()
  120. };
  121. }
  122. public static YotogiPlay.Param operator +(YotogiPlay.Param a, YotogiPlay.Param b)
  123. {
  124. return new YotogiPlay.Param
  125. {
  126. currentExcite = a.currentExcite + b.currentExcite,
  127. currentMind = a.currentMind + b.currentMind,
  128. cur_sensory = a.cur_sensory + b.cur_sensory,
  129. inyoku = a.inyoku + b.inyoku,
  130. m_value = a.m_value + b.m_value,
  131. hentai = a.hentai + b.hentai,
  132. housi = a.housi + b.housi,
  133. lovely = a.lovely + b.lovely,
  134. elegance = a.elegance + b.elegance,
  135. charm = a.charm + b.charm,
  136. reception = a.reception + b.reception,
  137. teach_rate = a.teach_rate + b.teach_rate,
  138. yotogi_type_level = a.yotogi_type_level + b.yotogi_type_level,
  139. yotogi_type_total_exp = a.yotogi_type_total_exp + b.yotogi_type_total_exp
  140. };
  141. }
  142. public static YotogiPlay.Param operator -(YotogiPlay.Param a, YotogiPlay.Param b)
  143. {
  144. return new YotogiPlay.Param
  145. {
  146. currentExcite = a.currentExcite - b.currentExcite,
  147. currentMind = a.currentMind - b.currentMind,
  148. cur_sensory = a.cur_sensory - b.cur_sensory,
  149. inyoku = a.inyoku - b.inyoku,
  150. m_value = a.m_value - b.m_value,
  151. hentai = a.hentai - b.hentai,
  152. housi = a.housi - b.housi,
  153. lovely = a.lovely - b.lovely,
  154. elegance = a.elegance - b.elegance,
  155. charm = a.charm - b.charm,
  156. reception = a.reception - b.reception,
  157. teach_rate = a.teach_rate - b.teach_rate,
  158. yotogi_type_level = a.yotogi_type_level - b.yotogi_type_level,
  159. yotogi_type_total_exp = a.yotogi_type_total_exp - b.yotogi_type_total_exp
  160. };
  161. }
  162. public int currentExcite;
  163. public int currentMind;
  164. public int cur_sensory;
  165. public int inyoku;
  166. public int m_value;
  167. public int hentai;
  168. public int housi;
  169. public int lovely;
  170. public int elegance;
  171. public int charm;
  172. public int reception;
  173. public int teach_rate;
  174. public int yotogi_type_level;
  175. public int yotogi_type_total_exp;
  176. }
  177. public class SuspendStore
  178. {
  179. public Skill.Data.Command.Data comand;
  180. }
  181. }