123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198 |
- using System;
- using System.Collections.Generic;
- using MaidStatus;
- public static class YotogiPlay
- {
- public static Yotogi.ExcitementStatus GetExcitementStatus(int excite)
- {
- if (excite < 0)
- {
- return Yotogi.ExcitementStatus.Minus;
- }
- if (excite < 100)
- {
- return Yotogi.ExcitementStatus.Small;
- }
- if (excite < 200)
- {
- return Yotogi.ExcitementStatus.Medium;
- }
- return Yotogi.ExcitementStatus.Large;
- }
- public static Yotogi.RCType GetRCType(int before_excite, int current_excite)
- {
- if (before_excite <= 199 && 200 <= current_excite)
- {
- return Yotogi.RCType.RC2;
- }
- if (before_excite <= 99 && 100 <= current_excite)
- {
- return Yotogi.RCType.RC1;
- }
- if (before_excite <= -1 && 0 <= current_excite)
- {
- return Yotogi.RCType.RC0;
- }
- return Yotogi.RCType.RCNull;
- }
- public static Yotogi.RRCType GetRRCType(int before_excite, int current_excite)
- {
- if (before_excite == current_excite && current_excite == 300)
- {
- return Yotogi.RRCType.RRC9;
- }
- Func<int, bool> func = delegate(int thresholdNum)
- {
- if (thresholdNum < 0)
- {
- return (before_excite <= thresholdNum && thresholdNum < current_excite) || (before_excite > thresholdNum && thresholdNum >= current_excite);
- }
- return before_excite < thresholdNum && thresholdNum <= current_excite;
- };
- foreach (KeyValuePair<int, Yotogi.RRCType> keyValuePair in new List<KeyValuePair<int, Yotogi.RRCType>>
- {
- new KeyValuePair<int, Yotogi.RRCType>(-50, Yotogi.RRCType.RRC_2),
- new KeyValuePair<int, Yotogi.RRCType>(-25, Yotogi.RRCType.RRC_1),
- new KeyValuePair<int, Yotogi.RRCType>(25, Yotogi.RRCType.RRC1),
- new KeyValuePair<int, Yotogi.RRCType>(50, Yotogi.RRCType.RRC2),
- new KeyValuePair<int, Yotogi.RRCType>(75, Yotogi.RRCType.RRC3),
- new KeyValuePair<int, Yotogi.RRCType>(125, Yotogi.RRCType.RRC4),
- new KeyValuePair<int, Yotogi.RRCType>(150, Yotogi.RRCType.RRC5),
- new KeyValuePair<int, Yotogi.RRCType>(175, Yotogi.RRCType.RRC6),
- new KeyValuePair<int, Yotogi.RRCType>(225, Yotogi.RRCType.RRC7),
- new KeyValuePair<int, Yotogi.RRCType>(250, Yotogi.RRCType.RRC8),
- new KeyValuePair<int, Yotogi.RRCType>(275, Yotogi.RRCType.RRC9),
- new KeyValuePair<int, Yotogi.RRCType>(300, Yotogi.RRCType.RRC9)
- })
- {
- if (func(keyValuePair.Key))
- {
- return keyValuePair.Value;
- }
- }
- return Yotogi.RRCType.RRCNull;
- }
- public static Yotogi.RRType GetRRType(int current_excite)
- {
- int num = Math.Abs(current_excite) / 50;
- if (current_excite < 0)
- {
- num++;
- if (2 < num)
- {
- num = 2;
- }
- num *= -1;
- }
- else if (5 < num)
- {
- num = 5;
- }
- return Yotogi.RRType.RR1 + num;
- }
- public enum PlayerState
- {
- Normal,
- Insert
- }
- public struct Param
- {
- public static YotogiPlay.Param Create(Maid maid)
- {
- Status status = maid.status;
- return new YotogiPlay.Param
- {
- currentExcite = status.currentExcite,
- currentMind = status.currentMind,
- cur_sensory = status.currentSensual,
- inyoku = status.inyoku,
- m_value = status.mvalue,
- hentai = status.hentai,
- housi = status.housi,
- lovely = status.lovely,
- elegance = status.elegance,
- charm = status.charm,
- reception = status.reception,
- teach_rate = status.teachRate,
- yotogi_type_level = status.selectedJobClass.level,
- yotogi_type_total_exp = status.selectedJobClass.expSystem.GetTotalExp()
- };
- }
- public static YotogiPlay.Param operator +(YotogiPlay.Param a, YotogiPlay.Param b)
- {
- return new YotogiPlay.Param
- {
- currentExcite = a.currentExcite + b.currentExcite,
- currentMind = a.currentMind + b.currentMind,
- cur_sensory = a.cur_sensory + b.cur_sensory,
- inyoku = a.inyoku + b.inyoku,
- m_value = a.m_value + b.m_value,
- hentai = a.hentai + b.hentai,
- housi = a.housi + b.housi,
- lovely = a.lovely + b.lovely,
- elegance = a.elegance + b.elegance,
- charm = a.charm + b.charm,
- reception = a.reception + b.reception,
- teach_rate = a.teach_rate + b.teach_rate,
- yotogi_type_level = a.yotogi_type_level + b.yotogi_type_level,
- yotogi_type_total_exp = a.yotogi_type_total_exp + b.yotogi_type_total_exp
- };
- }
- public static YotogiPlay.Param operator -(YotogiPlay.Param a, YotogiPlay.Param b)
- {
- return new YotogiPlay.Param
- {
- currentExcite = a.currentExcite - b.currentExcite,
- currentMind = a.currentMind - b.currentMind,
- cur_sensory = a.cur_sensory - b.cur_sensory,
- inyoku = a.inyoku - b.inyoku,
- m_value = a.m_value - b.m_value,
- hentai = a.hentai - b.hentai,
- housi = a.housi - b.housi,
- lovely = a.lovely - b.lovely,
- elegance = a.elegance - b.elegance,
- charm = a.charm - b.charm,
- reception = a.reception - b.reception,
- teach_rate = a.teach_rate - b.teach_rate,
- yotogi_type_level = a.yotogi_type_level - b.yotogi_type_level,
- yotogi_type_total_exp = a.yotogi_type_total_exp - b.yotogi_type_total_exp
- };
- }
- public int currentExcite;
- public int currentMind;
- public int cur_sensory;
- public int inyoku;
- public int m_value;
- public int hentai;
- public int housi;
- public int lovely;
- public int elegance;
- public int charm;
- public int reception;
- public int teach_rate;
- public int yotogi_type_level;
- public int yotogi_type_total_exp;
- }
- }
|