Creator.cs 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. using System.Collections.Generic;
  2. using NTERA.EmuEra.Game.EraEmu.Sub;
  3. namespace NTERA.EmuEra.Game.EraEmu.GameData.Function
  4. {
  5. internal static partial class FunctionMethodCreator
  6. {
  7. static FunctionMethodCreator()
  8. {
  9. methodList = new Dictionary<string, FunctionMethod>();
  10. //キャラクタデータ系
  11. methodList["GETCHARA"] = new GetcharaMethod();
  12. methodList["GETSPCHARA"] = new GetspcharaMethod();
  13. methodList["CSVNAME"] = new CsvStrDataMethod(CharacterStrData.NAME);
  14. methodList["CSVCALLNAME"] = new CsvStrDataMethod(CharacterStrData.CALLNAME);
  15. methodList["CSVNICKNAME"] = new CsvStrDataMethod(CharacterStrData.NICKNAME);
  16. methodList["CSVMASTERNAME"] = new CsvStrDataMethod(CharacterStrData.MASTERNAME);
  17. methodList["CSVCSTR"] = new CsvcstrMethod();
  18. methodList["CSVBASE"] = new CsvDataMethod(CharacterIntData.BASE);
  19. methodList["CSVABL"] = new CsvDataMethod(CharacterIntData.ABL);
  20. methodList["CSVMARK"] = new CsvDataMethod(CharacterIntData.MARK);
  21. methodList["CSVEXP"] = new CsvDataMethod(CharacterIntData.EXP);
  22. methodList["CSVRELATION"] = new CsvDataMethod(CharacterIntData.RELATION);
  23. methodList["CSVTALENT"] = new CsvDataMethod(CharacterIntData.TALENT);
  24. methodList["CSVCFLAG"] = new CsvDataMethod(CharacterIntData.CFLAG);
  25. methodList["CSVEQUIP"] = new CsvDataMethod(CharacterIntData.EQUIP);
  26. methodList["CSVJUEL"] = new CsvDataMethod(CharacterIntData.JUEL);
  27. methodList["FINDCHARA"] = new FindcharaMethod(false);
  28. methodList["FINDLASTCHARA"] = new FindcharaMethod(true);
  29. methodList["EXISTCSV"] = new ExistCsvMethod();
  30. //汎用処理系
  31. methodList["VARSIZE"] = new VarsizeMethod();
  32. methodList["CHKFONT"] = new CheckfontMethod();
  33. methodList["CHKDATA"] = new CheckdataMethod("CHKDATA", EraSaveFileType.Normal);
  34. methodList["ISSKIP"] = new IsSkipMethod();
  35. methodList["MOUSESKIP"] = new MesSkipMethod(true);
  36. methodList["MESSKIP"] = new MesSkipMethod(false);
  37. methodList["GETCOLOR"] = new GetColorMethod(false);
  38. methodList["GETDEFCOLOR"] = new GetColorMethod(true);
  39. methodList["GETFOCUSCOLOR"] = new GetFocusColorMethod();
  40. methodList["GETBGCOLOR"] = new GetBGColorMethod(false);
  41. methodList["GETDEFBGCOLOR"] = new GetBGColorMethod(true);
  42. methodList["GETSTYLE"] = new GetStyleMethod();
  43. methodList["GETFONT"] = new GetFontMethod();
  44. methodList["BARSTR"] = new BarStringMethod();
  45. methodList["CURRENTALIGN"] = new CurrentAlignMethod();
  46. methodList["CURRENTREDRAW"] = new CurrentRedrawMethod();
  47. methodList["COLOR_FROMNAME"] = new ColorFromNameMethod();
  48. methodList["COLOR_FROMRGB"] = new ColorFromRGBMethod();
  49. //TODO:1810
  50. //methodList["CHKVARDATA"] = new CheckdataStrMethod("CHKVARDATA", EraSaveFileType.Var);
  51. methodList["CHKCHARADATA"] = new CheckdataStrMethod("CHKCHARADATA", EraSaveFileType.CharVar);
  52. //methodList["CHKGLOBALDATA"] = new CheckdataMethod("CHKGLOBALDATA", EraSaveFileType.Global);
  53. //methodList["FIND_VARDATA"] = new FindFilesMethod("FIND_VARDATA", EraSaveFileType.Var);
  54. methodList["FIND_CHARADATA"] = new FindFilesMethod("FIND_CHARADATA", EraSaveFileType.CharVar);
  55. //定数取得
  56. methodList["MONEYSTR"] = new MoneyStrMethod();
  57. methodList["PRINTCPERLINE"] = new GetPrintCPerLineMethod();
  58. methodList["PRINTCLENGTH"] = new PrintCLengthMethod();
  59. methodList["SAVENOS"] = new GetSaveNosMethod();
  60. methodList["GETTIME"] = new GettimeMethod();
  61. methodList["GETTIMES"] = new GettimesMethod();
  62. methodList["GETMILLISECOND"] = new GetmsMethod();
  63. methodList["GETSECOND"] = new GetSecondMethod();
  64. //数学関数
  65. methodList["RAND"] = new RandMethod();
  66. methodList["MIN"] = new MaxMethod(false);
  67. methodList["MAX"] = new MaxMethod(true);
  68. methodList["ABS"] = new AbsMethod();
  69. methodList["POWER"] = new PowerMethod();
  70. methodList["SQRT"] = new SqrtMethod();
  71. methodList["CBRT"] = new CbrtMethod();
  72. methodList["LOG"] = new LogMethod();
  73. methodList["LOG10"] = new LogMethod(10.0d);
  74. methodList["EXPONENT"] = new ExpMethod();
  75. methodList["SIGN"] = new SignMethod();
  76. methodList["LIMIT"] = new GetLimitMethod();
  77. //変数操作系
  78. methodList["SUMARRAY"] = new SumArrayMethod();
  79. methodList["SUMCARRAY"] = new SumArrayMethod(true);
  80. methodList["MATCH"] = new MatchMethod();
  81. methodList["CMATCH"] = new MatchMethod(true);
  82. methodList["GROUPMATCH"] = new GroupMatchMethod();
  83. methodList["NOSAMES"] = new NosamesMethod();
  84. methodList["ALLSAMES"] = new AllsamesMethod();
  85. methodList["MAXARRAY"] = new MaxArrayMethod();
  86. methodList["MAXCARRAY"] = new MaxArrayMethod(true);
  87. methodList["MINARRAY"] = new MaxArrayMethod(false, false);
  88. methodList["MINCARRAY"] = new MaxArrayMethod(true, false);
  89. methodList["GETBIT"] = new GetbitMethod();
  90. methodList["GETNUM"] = new GetnumMethod();
  91. methodList["GETPALAMLV"] = new GetPalamLVMethod();
  92. methodList["GETEXPLV"] = new GetExpLVMethod();
  93. methodList["FINDELEMENT"] = new FindElementMethod(false);
  94. methodList["FINDLASTELEMENT"] = new FindElementMethod(true);
  95. methodList["INRANGE"] = new InRangeMethod();
  96. methodList["INRANGEARRAY"] = new InRangeArrayMethod();
  97. methodList["INRANGECARRAY"] = new InRangeArrayMethod(true);
  98. methodList["GETNUMB"] = new GetnumMethod();
  99. //文字列操作系
  100. methodList["STRLENS"] = new StrlenMethod();
  101. methodList["STRLENSU"] = new StrlenuMethod();
  102. methodList["SUBSTRING"] = new SubstringMethod();
  103. methodList["SUBSTRINGU"] = new SubstringuMethod();
  104. methodList["STRFIND"] = new StrfindMethod(false);
  105. methodList["STRFINDU"] = new StrfindMethod(true);
  106. methodList["STRCOUNT"] = new StrCountMethod();
  107. methodList["TOSTR"] = new ToStrMethod();
  108. methodList["TOINT"] = new ToIntMethod();
  109. methodList["TOUPPER"] = new StrChangeStyleMethod(StrFormType.Upper);
  110. methodList["TOLOWER"] = new StrChangeStyleMethod(StrFormType.Lower);
  111. methodList["TOHALF"] = new StrChangeStyleMethod(StrFormType.Half);
  112. methodList["TOFULL"] = new StrChangeStyleMethod(StrFormType.Full);
  113. methodList["LINEISEMPTY"] = new LineIsEmptyMethod();
  114. methodList["REPLACE"] = new ReplaceMethod();
  115. methodList["UNICODE"] = new UnicodeMethod();
  116. methodList["UNICODEBYTE"] = new UnicodeByteMethod();
  117. methodList["CONVERT"] = new ConvertIntMethod();
  118. methodList["ISNUMERIC"] = new IsNumericMethod();
  119. methodList["ESCAPE"] = new EscapeMethod();
  120. methodList["ENCODETOUNI"] = new EncodeToUniMethod();
  121. methodList["CHARATU"] = new CharAtMethod();
  122. methodList["GETLINESTR"] = new GetLineStrMethod();
  123. methodList["STRFORM"] = new StrFormMethod();
  124. methodList["STRJOIN"] = new JoinMethod();
  125. methodList["GETCONFIG"] = new GetConfigMethod(true);
  126. methodList["GETCONFIGS"] = new GetConfigMethod(false);
  127. //html系
  128. methodList["HTML_GETPRINTEDSTR"] = new HtmlGetPrintedStrMethod();
  129. methodList["HTML_POPPRINTINGSTR"] = new HtmlPopPrintingStrMethod();
  130. methodList["HTML_TOPLAINTEXT"] = new HtmlToPlainTextMethod();
  131. methodList["HTML_ESCAPE"] = new HtmlEscapeMethod();
  132. // JVN: TR Commands here
  133. methodList["TR_NAME"] = new TRNameMethod();
  134. //methodList["TR_CSTR"] = new TRCSTRMethod();
  135. }
  136. private static Dictionary<string, FunctionMethod> methodList;
  137. public static Dictionary<string, FunctionMethod> GetMethodList()
  138. {
  139. return methodList;
  140. }
  141. }
  142. }