sachet.tin 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #nop ┌────────────────────────────────────────┐;
  2. #nop │锦囊 (97/101) │;
  3. #nop ├───五行宝石─────────────┬───────────────────┤;
  4. #nop │[J5A]雷☆精金*12 │[B4A]风☆玄冰*30 │;
  5. #nop ├───日月及中性五行宝石────────┴───────────────────┤;
  6. #nop │[S5C]雷◎玉髓*1 │;
  7. #nop ├───四灵宝石──────┬─────────────┬────────────┤;
  8. #nop │[G4A]风☆神龙骨*11 │[F4A]风☆凤凰羽*5 │[X4B]风★玄武甲*7 │;
  9. #nop │[G4B]风★神龙骨*8 │[F4B]风★凤凰羽*4 │[X4A]风☆玄武甲*7 │;
  10. #nop │ │ │[X3A]水☆玄武甲*7 │;
  11. #nop │ │ │[X3B]水★玄武甲*5 │;
  12. #nop └─────────────┴─────────────┴───北大侠客行────┘;
  13. #nop ;
  14. #list char[锦囊] create {};
  15. #action {^%S(%S %S) [%1/%2]$E} {
  16. #list char[锦囊] create {};
  17. #class char-parse-sachet open;
  18. #local level {地|山|水|风|雷|火|泽|天};
  19. #local type {☆|★|◎};
  20. #local wuxing {精金|木灵|玄冰|炎晶|玉髓};
  21. #local beast {玄武甲|神龙骨|凤凰羽|麒麟角};
  22. #local special {日魂|月魄};
  23. #local pattern {\(\s*(\d+)\)($level)($type)($wuxing|$beast|$special)\*(\d+)\s+};
  24. #action {^├───%*宝石───────┴─────────┴──────────┤$} {
  25. #nop;
  26. };
  27. #action {^│%*│$} {
  28. #local line {%%1};
  29. #replace line {│} {;};
  30. #local item {};
  31. #foreach {$line} {item} {
  32. #if { "$item" == "" } {
  33. #continue;
  34. };
  35. #nop {( 1)山★ 玄武甲*12};
  36. #local item {@__char_sachet_parse__{{$item}}};
  37. #var char[锦囊] {$char[锦囊]{$item[序号]}{$item}};
  38. };
  39. };
  40. #action {^╰─────────┴─────────┴─────────┴─%S────╯{|ID=char.sachet}$} {
  41. #delay tmp {};
  42. #class char-parse-sachet kill;
  43. };
  44. #class char-parse-sachet close;
  45. };
  46. #function {__char_sachet_parse__} {
  47. #local item {%1};
  48. #replace {item} {[%S]%*{☆|★|◎}%**%d} {
  49. {序号}{&1}
  50. {等级}{&2}
  51. {阴阳}{&3}
  52. {种类}{&4}
  53. {数量}{&5}
  54. };
  55. #return {$item};
  56. };