skills.tin 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. #nop ╭───技能列表(共十六项)─┬─────────────┬──────┬──────┬──────╮
  2. #nop │名称 │ID │描述 │级别 │最大级别 │
  3. #nop ├───一项职业技能────┼─────────────┼──────┼──────┼──────┤
  4. #nop │ 占卜之术 │divination │不足挂齿 │82.0 │387 │
  5. #nop ├───六项基本知识────┼─────────────┼──────┼──────┼──────┤
  6. #nop │ 禅宗心法 │buddhism │半生不熟 │153.0 │- │
  7. #nop │ 鉴定之术 │identification │初窥门径 │54.0 │- │
  8. #nop │ 读书写字 │literate │半生不熟 │152.0 │- │
  9. #nop │ 医术 │medical-skill │新学乍用 │30.0 │- │
  10. #nop │ 妙手空空 │stealing │新学乍用 │10.0 │- │
  11. #nop │ 道家养生术 │taoism │深不可测 │948.23 │- │
  12. #nop ├───六项基本功夫────┼─────────────┼──────┼──────┼──────┤
  13. #nop │ 基本拳法 │cuff │半生不熟 │386.0 │387 │
  14. #nop │ 基本轻功 │dodge │半生不熟 │386.0 │387 │
  15. #nop │ 基本内功 │force │半生不熟 │386.0 │387 │
  16. #nop │ 基本招架 │parry │半生不熟 │386.0 │387 │
  17. #nop │ 基本剑法 │sword │半生不熟 │386.0 │387 │
  18. #nop ├───四项特殊功夫────┼─────────────┼──────┼──────┼──────┤
  19. #nop │□太极剑法 │taiji-jian │半生不熟 │386.0 │387 │
  20. #nop │□太极拳 │taiji-quan │半生不熟 │386.0 │387 │
  21. #nop │□太极神功 │taiji-shengong │第五重楼 │387.0 │387 │
  22. #nop │□梯云纵 │tiyunzong │半生不熟 │386.0 │387 │
  23. #nop ╰─────────────┴─────────────┴──────┴────北大侠客行────╯
  24. #nop;
  25. #function {basic_char_skills.Init} {
  26. #class char open;
  27. #var char[Skills] {};
  28. #class char close;
  29. #return true;
  30. };
  31. #action {^╭───技能列表(共%*项){(─|┬)*}──╮$} {
  32. #class {ParseSkills} open;
  33. #var char[Skills][currentType] {};
  34. #gag {^│名称};
  35. #action {^├───%%1项%%2──} {
  36. #var char[Skills][currentType] {%%2};
  37. };
  38. #local RST {\e[0m};
  39. #local RST__ {\e[2;37;0m};
  40. #local __I__ {$RST__│};
  41. #action {~^$RST│%*│%*│%*│%*│%*│{|ID=char.skills}} {
  42. #local line {%%0};
  43. #local code {%%2};
  44. #local level {%%4};
  45. #local limit {%%5};
  46. #replace {code} {\x1b[2;37;0m} {};
  47. #replace {level} {\x1b[2;37;0m} {};
  48. #replace {limit} {\x1b[2;37;0m} {};
  49. #replace level {+} {};
  50. #if { "$limit" == "%s%d%s" } {
  51. #math limit {$limit + 0};
  52. };
  53. #else {
  54. #local limit {0};
  55. };
  56. #if { $limit > 0 } {
  57. #nop 给技能加上彩色进度条,用来表示当前级别距离上限的程度;
  58. #local newCode {@__char_skills_colorit__{{$code};$level;$limit}};
  59. #replace code { } {};
  60. #replace line {$code\x1b[2;37;0m%s} {$newCode\e[0m};
  61. #echo {%s} {@Beautify{{$line}}};
  62. #local line {Skill/%%1/%%2/%%3/%%4/$limit};
  63. #replace line { } {};
  64. #showme {$line};
  65. #line gag;
  66. };
  67. };
  68. #action {^Skill/{□|Θ|}%%2/%%3/%%4/%%5/%%6$} {
  69. #local type ${char[Skills][currentType]};
  70. #local enabled {%%1};
  71. #local name {%%2};
  72. #local code {%%3};
  73. #local rank {%%4};
  74. #local level {%%5};
  75. #local limit {%%6};
  76. #replace name { } {};
  77. #if { "$enabled" == "□" } {
  78. #format enabled {true};
  79. };
  80. #else {
  81. #format enabled {false};
  82. };
  83. #local key {};
  84. #format key {char[Skills][%s]} {$name};
  85. #class char open;
  86. #var {$key} {
  87. {name}{$name}
  88. {type}{$type}
  89. {enabled}{$enabled}
  90. {code}{$code}
  91. {rank}{$rank}
  92. {level}{$level}
  93. {limit}{$limit}
  94. };
  95. #class char close;
  96. #line gag;
  97. };
  98. #action {^╰───{(┴|─)*}┴────%S────╯{|ID=char.skills}$} {
  99. #unvar char[Skills][currentType];
  100. #class {ParseSkills} kill;
  101. };
  102. #action {^你不是查看过吗?{|ID=char/skills}$} {
  103. #class {ParseSkills} kill;
  104. };
  105. #delay 5 {
  106. #class {ParseSkills} kill;
  107. };
  108. #class {ParseSkills} close;
  109. };
  110. #function {__char_skills_colorit__} {
  111. #local code {%1};
  112. #local level {%2};
  113. #local limit {%3};
  114. #local p {};
  115. #math p {$level * 100 / $limit};
  116. #format p {%d} {$p};
  117. #local color {};
  118. #if { $p < 15 } {
  119. #format color {%s} {<071>};
  120. };
  121. #elseif { $p < 30 } {
  122. #format color {%s} {<171>};
  123. };
  124. #elseif { $p < 60 } {
  125. #format color {%s} {<003>};
  126. };
  127. #elseif { $p < 90 } {
  128. #format color {%s} {<074>};
  129. };
  130. #elseif { $p < 100 } {
  131. #format color {%s} {<134>};
  132. };
  133. #elseif { $p == 100 } {
  134. #format color {%s} {<132>};
  135. };
  136. #elseif { $p > 100 } {
  137. #format color {%s} {<506>};
  138. };
  139. #local len {};
  140. #local len2 {};
  141. #local len3 {};
  142. #format {len} {%L} {$code};
  143. #format {code} {%p} {$code};
  144. #format {len2} {%L} {$code};
  145. #math len3 {$len - $len2};
  146. #format {code} {%s%${len3}s} {$code} {$p%};
  147. #local leftLen {};
  148. #math leftLen {$len * $level / $limit};
  149. #format leftLen {%d} {$leftLen};
  150. #local left {};
  151. #format {left} {${color}%.${leftLen}s<070>} {$code};
  152. #local right {};
  153. #local rightLen {};
  154. #math rightLen {$len - $leftLen};
  155. #format {right} {%r} {$code};
  156. #format {right} {%.${rightLen}s} {$right};
  157. #format {right} {<g08>%r} {$right};
  158. #return {$left$right};
  159. };
  160. #alias {char.GetSkills} {skills};