DSALaTeX provides macros and environments to aid the creation of adventures in the German pen&paper "Das Schwarze Auge" (DSA).
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

DSAchar.sty 17KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551
  1. \NeedsTeXFormat{LaTeX2e}
  2. \RequirePackage{xparse}
  3. \RequirePackage{booktabs}
  4. \RequirePackage{DSAproben,DSAwurf,DSAutil}
  5. \def\DSAchar@version{0.1}
  6. \def\DSAchar@date{2018-10-15}
  7. \ProvidesExplPackage
  8. {DSAchar} {\DSAchar@date}
  9. {\DSAchar@version} {DSA Charakterwerte}
  10. % Personenbezogen >>>
  11. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  12. \newcommand*\NeuerName[3]%>>>
  13. {
  14. \cs_new_protected:Npn #1
  15. {
  16. #2~#3
  17. \@ifstar {}
  18. {
  19. \cs_gset_protected:Npn #1 { #2 \@ifstar { ~#3 } {} }
  20. }
  21. }
  22. }%<<<
  23. \newcommand*\DSAcharEigStandard{8}
  24. \newcommand*\DSAcharGSStandard{8}
  25. \newcommand*\DSAcharRSStandard{0}
  26. \newcommand*\DSAcharBEStandard{0}
  27. \cs_generate_variant:Nn \tl_if_eq:nnTF { VnTF }
  28. \cs_generate_variant:Nn \tl_lower_case:n { V }
  29. \msg_new:nnn { DSAchar } { only~bool }%>>>
  30. { The~`#1`~key~accepts~only~the~boolean~values~`true`~and~`false`. }%<<<
  31. \msg_new:nnn { DSAchar } { unknown~key }%>>>
  32. { The~`#1`~key~is~unknown. }%<<<
  33. \tl_new:N \l_DSAchar_key_tl
  34. \tl_new:N \l_DSAchar_additional_defaults_tl
  35. \prop_const_from_keyval:Nn \c_DSAchar_key_type_prop%>>>
  36. {
  37. ,mu = int
  38. ,kl = int
  39. ,in = int
  40. ,ch = int
  41. ,ff = int
  42. ,ge = int
  43. ,ko = int
  44. ,kk = int
  45. ,le = int
  46. ,au = int
  47. ,mr = int
  48. ,ae = int
  49. ,ke = int
  50. ,ini = int
  51. ,gs = int
  52. ,rs = int
  53. ,be = int
  54. ,ws = int
  55. ,at = int
  56. ,pa = int
  57. ,fk = int
  58. ,waffe = tl
  59. ,links = tl
  60. ,rasse = tl
  61. ,kultur = tl
  62. ,profession = tl
  63. ,magier = bool
  64. ,geweihter = bool
  65. ,manoever = clist
  66. ,zauber = clist
  67. ,liturgien = clist
  68. ,sonderfertigkeiten = clist
  69. ,vorteile = clist % TODO: Ausgabe implementieren
  70. ,nachteile = clist % TODO: Ausgabe implementieren
  71. ,beschreibung = tl % TODO: Ausgabe implementieren
  72. }%<<<
  73. \prg_new_protected_conditional:Npnn \DSAchar_if_key_defined:n #1%>>>
  74. { T , F , TF }
  75. {
  76. \prop_get:NnNF \c_DSAchar_key_type_prop { #1 } \l_DSAchar_key_type_tl
  77. {
  78. \msg_error:nnn { DSAchar } { unknown~key } { #1 }
  79. }
  80. \DSAchar_if_key_defined:nnTF { \l_DSAchar_key_type_tl } { #1 }
  81. { \prg_return_true: }
  82. { \prg_return_false: }
  83. }%<<<
  84. \prg_new_conditional:Npnn \DSAchar_if_key_defined:nn #1 #2%>>>
  85. { T , F , TF }
  86. {
  87. \DSAchar_if_key_defined:nnnTF { \l_DSAchar_key_tl } { #1 } { #2 }
  88. { \prg_return_true: }
  89. { \prg_return_false: }
  90. }%<<<
  91. \prg_new_conditional:Npnn \DSAchar_if_key_defined:nnn #1 #2 #3%>>>
  92. { T , F , TF }
  93. {
  94. \cs_if_exist:cTF { l_DSAchar_ #1 _ #3 _ #2 }
  95. { \prg_return_true: }
  96. { \prg_return_false: }
  97. }%<<<
  98. \cs_new_protected:Npn \DSAchar_set_key:nn #1 #2%>>>
  99. {
  100. \prop_get:NnNF \c_DSAchar_key_type_prop { #1 } \l_DSAchar_key_type_tl
  101. {
  102. \msg_error:nnn { DSAchar } { unknown~key } { #1 }
  103. }
  104. \DSAchar_set_key:nnn \l_DSAchar_key_type_tl { #1 } { #2 }
  105. }%<<<
  106. \cs_generate_variant:Nn \DSAchar_set_key:nn { on }
  107. \cs_new_protected:Npn \DSAchar_set_key:nnn #1 #2 #3%>>>
  108. {
  109. \DSAchar_if_key_defined:nnF { #1 } { #2 }
  110. {
  111. \use:c { #1_new:c }
  112. { l_DSAchar_ \l_DSAchar_key_tl _#2_#1 }
  113. }
  114. \tl_if_eq:VnTF \l_DSAchar_key_type_tl { bool }
  115. {
  116. \str_case:nnTF { #3 }
  117. {
  118. { true } { \bool_set_true:c }
  119. { false } { \bool_set_false:c }
  120. }
  121. {
  122. { l_DSAchar_ \l_DSAchar_key_tl _#2_bool }
  123. }
  124. {
  125. \msg_error:nnn { DSAchar } { only~bool } { #2 }
  126. }
  127. }
  128. {
  129. \use:c { #1_set:cn }
  130. { l_DSAchar_ \l_DSAchar_key_tl _#2_#1 }
  131. { #3 }
  132. }
  133. }%<<<
  134. \cs_new:Npn \DSAchar_use_key:n #1%>>>
  135. {
  136. \prop_get:NnNF \c_DSAchar_key_type_prop { #1 } \l_DSAchar_key_type_tl
  137. {
  138. \msg_error:nnn { DSAchar } { unknown~key } { #1 }
  139. }
  140. \DSAchar_use_key:nn { \l_DSAchar_key_type_tl } { #1 }
  141. }%<<<
  142. \cs_generate_variant:Nn \DSAchar_use_key:n { x }
  143. \cs_new:Npn \DSAchar_use_key:nn #1 #2%>>>
  144. {
  145. \use:c { #1_use:c } { l_DSAchar_ \l_DSAchar_key_tl _#2_#1 }
  146. }%<<<
  147. \cs_new:Npn \DSAchar_use_int:n #1%>>>
  148. {
  149. \DSAchar_use_key:nn { int } { #1 }
  150. }%<<<
  151. \prg_new_conditional:Npnn \DSAchar_bool_if:n #1%>>>
  152. { T , F , TF }
  153. {
  154. \DSAchar_bool_if:nnTF { \l_DSAchar_key_tl } { #1 }
  155. { \prg_return_true: }
  156. { \prg_return_false: }
  157. }%<<<
  158. \prg_new_conditional:Npnn \DSAchar_bool_if:nn #1 #2%>>>
  159. { T , F , TF }
  160. {
  161. \bool_if:cTF { l_DSAchar_ #1 _ #2 _bool }
  162. { \prg_return_true: }
  163. { \prg_return_false: }
  164. }%<<<
  165. \cs_new_protected:Npn \DSAchar_def_undefined_key:nnn #1 #2 #3%>>>
  166. {
  167. \DSAchar_if_key_defined:nnF { #1 } { #2 }
  168. { \DSAchar_set_key:nnn { #1 } { #2 } { #3 } }
  169. }%<<<
  170. \cs_new_protected:Npn \DSAchar_def_undefined_key:nn #1 #2%>>>
  171. {
  172. \prop_get:NnNF \c_DSAchar_key_type_prop { #1 } \l_DSAchar_key_type_tl
  173. {
  174. \msg_error:nnn { DSAchar } { unknown~key } { #1 }
  175. }
  176. \DSAchar_def_undefined_key:nnn { \l_DSAchar_key_type_tl } { #1 } { #2 }
  177. }%<<<
  178. \cs_new_protected:Npn \DSAchar_typeset_basis_value:n #1%>>>
  179. {
  180. \makebox [ 0pt ] [ l ] { \MakeUppercase { #1 } : }
  181. \phantom { MU : } ~
  182. \phantom { 88 }
  183. \llap { \DSAchar_use_int:n { #1 } }
  184. }%<<<
  185. \cs_new_protected:Npn \DSAchar_set_default_values:%>>>
  186. {
  187. \DSAchar_set_key:nn { mu } { \DSAcharEigStandard }
  188. \DSAchar_set_key:nn { kl } { \DSAcharEigStandard }
  189. \DSAchar_set_key:nn { in } { \DSAcharEigStandard }
  190. \DSAchar_set_key:nn { ch } { \DSAcharEigStandard }
  191. \DSAchar_set_key:nn { ff } { \DSAcharEigStandard }
  192. \DSAchar_set_key:nn { ge } { \DSAcharEigStandard }
  193. \DSAchar_set_key:nn { ko } { \DSAcharEigStandard }
  194. \DSAchar_set_key:nn { kk } { \DSAcharEigStandard }
  195. \DSAchar_set_key:nn { gs } { \DSAcharGSStandard }
  196. \DSAchar_set_key:nn { rs } { \DSAcharRSStandard }
  197. \DSAchar_set_key:nn { be } { \DSAcharBEStandard }
  198. \DSAchar_set_key:nn { magier } { false }
  199. \DSAchar_set_key:nn { geweihter } { false }
  200. \DSAchar_set_key:nn { waffe } { \textit{keine} }
  201. }%<<<
  202. \cs_new:Npn \DSAchar_get_key_expandable:nn #1 #2%>>>
  203. {
  204. \DSAchar_get_key_expandable_inner_a:nf { #1 } { \tl_lower_case:n { #2 } }
  205. }%<<<
  206. \cs_new:Npn \DSAchar_get_key_expandable_inner_a:nn #1 #2%>>>
  207. {
  208. \DSAchar_get_key_expandable_inner_b:nnf { #1 } { #2 }
  209. { \prop_item:Nn \c_DSAchar_key_type_prop { #2 } }
  210. }%<<<
  211. \cs_new:Npn \DSAchar_get_key_expandable_inner_b:nnn #1 #2 #3%>>>
  212. {
  213. \use:c { #3_use:c } { l_DSAchar_#1_#2_#3 }
  214. }%<<<
  215. \cs_new:Npn \DSAchar_print_clist:nnn #1 #2 #3%>>>
  216. {
  217. \clist_use:cn { l_DSAchar_ #1 _ #2 _clist } { #3 }
  218. }%<<<
  219. \cs_new_protected:Npn \DSAchar_print_clist_labelled:nnnn #1 #2 #3 #4%>>>
  220. {
  221. \tl_set:Nn \l_DSAchar_key_tl { #1 }
  222. #3:~
  223. \DSAchar_if_key_defined:nTF { #2 }
  224. {
  225. \DSAchar_print_clist:nnn { #1 } { #2 } { #4 }
  226. }
  227. {
  228. \textit{keine}
  229. }
  230. }%<<<
  231. \cs_generate_variant:Nn \DSAchar_get_key_expandable_inner_a:nn { nf }
  232. \cs_generate_variant:Nn \DSAchar_get_key_expandable_inner_b:nnn { nnf }
  233. \keys_define:nn { DSAchar }%>>>
  234. {
  235. %,mu .code:n = \DSAchar_set_key:nn { mu } { #1 }
  236. %,kl .code:n = \DSAchar_set_key:nn { kl } { #1 }
  237. %,in .code:n = \DSAchar_set_key:nn { in } { #1 }
  238. %,ch .code:n = \DSAchar_set_key:nn { ch } { #1 }
  239. %,ff .code:n = \DSAchar_set_key:nn { ff } { #1 }
  240. %,ge .code:n = \DSAchar_set_key:nn { ge } { #1 }
  241. %,ko .code:n = \DSAchar_set_key:nn { ko } { #1 }
  242. %,kk .code:n = \DSAchar_set_key:nn { kk } { #1 }
  243. %,le .code:n = \DSAchar_set_key:nn { le } { #1 }
  244. %,au .code:n = \DSAchar_set_key:nn { au } { #1 }
  245. %,ws .code:n = \DSAchar_set_key:nn { ws } { #1 }
  246. %,ae .code:n = \DSAchar_set_key:nn { ae } { #1 }
  247. %,ke .code:n = \DSAchar_set_key:nn { ke } { #1 }
  248. %,mr .code:n = \DSAchar_set_key:nn { mr } { #1 }
  249. %,ini .code:n = \DSAchar_set_key:nn { ini } { #1 }
  250. %,gs .code:n = \DSAchar_set_key:nn { gs } { #1 }
  251. %,rs .code:n = \DSAchar_set_key:nn { rs } { #1 }
  252. %,be .code:n = \DSAchar_set_key:nn { be } { #1 }
  253. %,waffe .code:n = \DSAchar_set_key:nn { waffe } { #1 }
  254. %,links .code:n = \DSAchar_set_key:nn { links } { #1 }
  255. %,rasse .code:n = \DSAchar_set_key:nn { rasse } { #1 }
  256. %,kultur .code:n = \DSAchar_set_key:nn { kultur } { #1 }
  257. %,profession .code:n = \DSAchar_set_key:nn { profession } { #1 }
  258. %,magier .code:n = \DSAchar_set_key:nn { magier } { #1 }
  259. %,geweihter .code:n = \DSAchar_set_key:nn { geweihter } { #1 }
  260. %
  261. ,unknown .code:n =
  262. \tl_set:Nx \l_tmpa_tl { \str_lower_case:f { \l_keys_key_tl } }
  263. \DSAchar_set_key:on
  264. {
  265. \l_tmpa_tl
  266. } { #1 }
  267. ,klasse .meta:n = { profession = { #1 } }
  268. ,Klasse .meta:n = { profession = { #1 } }
  269. ,manöver .meta:n = { manoever = { #1 } }
  270. ,Manöver .meta:n = { manoever = { #1 } }
  271. }%<<<
  272. \NewDocumentCommand \NeueStandards { s +m }%>>>
  273. {
  274. \IfBooleanTF { #1 }
  275. { \tl_set:Nn }
  276. { \tl_put_right:Nn }
  277. \l_DSAchar_additional_defaults_tl { #2 }
  278. }%<<<
  279. \NewDocumentCommand \NeuerChar { m m m +m }%>>>
  280. {
  281. \tl_set:Nn \l_DSAchar_key_tl { #1 }
  282. \DSAchar_set_default_values:
  283. \DSAchar_set_key:nnn { tl } { fullname } { #2~#3 }
  284. \keys_set:nV { DSAchar } \l_DSAchar_additional_defaults_tl
  285. \keys_set:nn { DSAchar } { #4 }
  286. \exp_args:Nc \NeuerName { #1 } { #2 } { #3 }
  287. \DSAchar_def_undefined_key:nn { le }%>>>
  288. {
  289. \DSAchar_use_int:n { ko } +
  290. \DSAchar_use_int:n { kk } / 2
  291. }%<<<
  292. \DSAchar_def_undefined_key:nn { au }%>>>
  293. {
  294. (
  295. \DSAchar_use_int:n { mu } +
  296. \DSAchar_use_int:n { ko } +
  297. \DSAchar_use_int:n { ge }
  298. ) / 2
  299. }%<<<
  300. \DSAchar_def_undefined_key:nn { ws }%>>> Wundschwelle
  301. {
  302. \DSAchar_use_int:n { ko } / 2
  303. }%<<<
  304. \DSAchar_def_undefined_key:nn { ae }%>>>
  305. {
  306. (
  307. \DSAchar_use_int:n { mu } +
  308. \DSAchar_use_int:n { in } +
  309. \DSAchar_use_int:n { ch }
  310. ) / 2
  311. }%<<<
  312. \DSAchar_def_undefined_key:nn { at }%>>>
  313. {
  314. (
  315. \DSAchar_use_int:n { mu } +
  316. \DSAchar_use_int:n { ge } +
  317. \DSAchar_use_int:n { kk }
  318. ) / 5
  319. }%<<<
  320. \DSAchar_def_undefined_key:nn { pa }%>>>
  321. {
  322. (
  323. \DSAchar_use_int:n { in } +
  324. \DSAchar_use_int:n { ge } +
  325. \DSAchar_use_int:n { kk }
  326. ) / 5
  327. }%<<<
  328. \DSAchar_def_undefined_key:nn { fk }%>>> Fernkampf
  329. {
  330. (
  331. \DSAchar_use_int:n { in } +
  332. \DSAchar_use_int:n { ff } +
  333. \DSAchar_use_int:n { kk }
  334. ) / 5
  335. }%<<<
  336. \DSAchar_def_undefined_key:nn { ini }%>>>
  337. {
  338. (
  339. 2 * \DSAchar_use_int:n { mu } +
  340. \DSAchar_use_int:n { in } +
  341. \DSAchar_use_int:n { ge }
  342. ) / 5
  343. - \DSAchar_use_int:n { be }
  344. }%<<<
  345. \DSAchar_def_undefined_key:nn { mr }%>>>
  346. {
  347. (
  348. \DSAchar_use_int:n { mu } +
  349. \DSAchar_use_int:n { kl } +
  350. \DSAchar_use_int:n { ko }
  351. ) / 5
  352. }%<<<
  353. }%<<<
  354. \NewDocumentCommand \CharParse { m +m }%>>>
  355. {
  356. }%<<<
  357. \NewExpandableDocumentCommand \CharName { m }%>>>
  358. {
  359. \DSAchar_get_key_expandable_inner_b:nnn { #1 } { fullname } { tl }
  360. }%<<<
  361. \NewDocumentCommand \CharBasis { m }%>>>
  362. {
  363. \tl_set:Nn \l_DSAchar_key_tl { #1 }
  364. \begin{tabular}[t]{@{}l@{}}
  365. \textbf { \DSAchar_use_key:nn { tl } { fullname } } \\
  366. \begin{tabular}{@{}*4l@{}}
  367. \DSAchar_typeset_basis_value:n { mu }
  368. & \DSAchar_typeset_basis_value:n { kl }
  369. & \DSAchar_typeset_basis_value:n { in }
  370. & \DSAchar_typeset_basis_value:n { ch }
  371. \\
  372. \DSAchar_typeset_basis_value:n { ff }
  373. & \DSAchar_typeset_basis_value:n { ge }
  374. & \DSAchar_typeset_basis_value:n { ko }
  375. & \DSAchar_typeset_basis_value:n { kk }
  376. \\
  377. \DSAchar_typeset_basis_value:n { le }
  378. & \DSAchar_typeset_basis_value:n { au }
  379. & \DSAchar_typeset_basis_value:n { mr }
  380. \DSAchar_bool_if:nTF { magier }
  381. { & \DSAchar_typeset_basis_value:n { ae } }
  382. {}
  383. \DSAchar_bool_if:nTF { geweihter }
  384. { & \DSAchar_typeset_basis_value:n { ke } }
  385. {}
  386. \end{tabular}
  387. \end{tabular}
  388. }%<<<
  389. \NewDocumentCommand \CharEig { m m }%>>>
  390. {
  391. \tl_set:Nn \l_DSAchar_key_tl { #1 }
  392. \DSAchar_use_key:x { \tl_lower_case:n { #2 } }
  393. }%<<<
  394. \NewExpandableDocumentCommand \CharEigE { m m }%>>>
  395. {
  396. \DSAchar_get_key_expandable:nn { #1 } { #2 }
  397. }%<<<
  398. \NewDocumentCommand \CharKampf { O{\wd0} m }%>>>
  399. {
  400. \group_begin:
  401. \tl_set:Nn \l_DSAchar_key_tl { #2 }
  402. \setbox0\hbox
  403. {
  404. \begin{tabular}[t]{@{}l@{}}
  405. \CharBasis { #2 }\\
  406. \end{tabular}
  407. }
  408. \cs_set:Npn \width { \wd0 }
  409. \begin{tabular}[t]{@{}p{#1}@{}}
  410. \toprule
  411. \usebox0\\
  412. \DSAindentedThingy Waffe:~\DSAchar_use_key:n { waffe }\\
  413. \DSAchar_if_key_defined:nT { links }
  414. {
  415. \DSAindentedThingy Linke~Hand:~\DSAchar_use_key:n { links }
  416. \\
  417. }
  418. \DSAchar_typeset_basis_value:n { at }
  419. \hskip2\tabcolsep
  420. \DSAchar_typeset_basis_value:n { pa }
  421. \hskip2\tabcolsep
  422. \DSAchar_typeset_basis_value:n { fk }
  423. \hskip2\tabcolsep
  424. \DSAchar_typeset_basis_value:n { ini }
  425. \\
  426. \DSAchar_typeset_basis_value:n { rs }
  427. \hskip2\tabcolsep
  428. \DSAchar_typeset_basis_value:n { be }
  429. \hskip2\tabcolsep
  430. \DSAchar_typeset_basis_value:n { ws }
  431. \hskip2\tabcolsep
  432. \DSAchar_typeset_basis_value:n { gs }
  433. \\
  434. \DSAindentedThingy\CharSonderfertigkeiten { #2 }
  435. \\
  436. \DSAindentedThingy\CharManoever { #2 }
  437. \\
  438. \DSAchar_bool_if:nnT { #2 } { magier }
  439. { \DSAindentedThingy\CharZauber { #2 } \\ }%
  440. \DSAchar_bool_if:nnT { #2 } { geweihter }
  441. { \DSAindentedThingy\CharLiturgien { #2 } \\ }%
  442. \bottomrule
  443. \end{tabular}
  444. \group_end:
  445. }%<<<
  446. \NewDocumentCommand \CharKampfKurz { O{\wd0} m }%>>>
  447. {
  448. \group_begin:
  449. \tl_set:Nn \l_DSAchar_key_tl { #2 }
  450. \setbox0\hbox
  451. {
  452. \begin{tabular}[t]{@{}*4l@{}}
  453. \DSAchar_typeset_basis_value:n { le }
  454. & \DSAchar_typeset_basis_value:n { au }
  455. & \DSAchar_typeset_basis_value:n { mr }
  456. \DSAchar_bool_if:nTF { magier }
  457. { & \DSAchar_typeset_basis_value:n { ae } }
  458. {}
  459. \DSAchar_bool_if:nTF { geweihter }
  460. { & \DSAchar_typeset_basis_value:n { ke } }
  461. {}
  462. \\
  463. \DSAchar_typeset_basis_value:n { at }
  464. & \DSAchar_typeset_basis_value:n { pa }
  465. & \DSAchar_typeset_basis_value:n { fk }
  466. & \DSAchar_typeset_basis_value:n { ini }
  467. \end{tabular}
  468. }
  469. \cs_set:Npn \width { \wd0 }
  470. \begin{tabular}[t]{@{}p{#1}@{}}
  471. \toprule
  472. \textbf { \DSAchar_use_key:nn { tl } { fullname } }
  473. \\
  474. \DSAindentedThingy Waffe:~\DSAchar_use_key:n { waffe }
  475. \\
  476. \DSAchar_if_key_defined:nT { links }
  477. {
  478. \DSAindentedThingy Linke~Hand:~\DSAchar_use_key:n { links }
  479. \\
  480. }
  481. \usebox0
  482. \\
  483. \DSAchar_typeset_basis_value:n { rs }
  484. \hskip2\tabcolsep
  485. \DSAchar_typeset_basis_value:n { be }
  486. \hskip2\tabcolsep
  487. \DSAchar_typeset_basis_value:n { ws }
  488. \hskip2\tabcolsep
  489. \DSAchar_typeset_basis_value:n { gs }
  490. \\
  491. \DSAchar_if_key_defined:nnT { clist } { sonderfertigkeiten }
  492. {
  493. \DSAindentedThingy\CharSonderfertigkeiten { #2 }
  494. \\
  495. }
  496. \DSAchar_if_key_defined:nnT { clist } { manoever }
  497. {
  498. \DSAindentedThingy\CharManoever { #2 }
  499. \\
  500. }
  501. \DSAchar_bool_if:nnT { #2 } { magier }
  502. {
  503. \DSAchar_if_key_defined:nnT { clist } { zauber }
  504. {
  505. \DSAindentedThingy\CharZauber { #2 }
  506. \\
  507. }
  508. }
  509. \DSAchar_bool_if:nnT { #2 } { geweihter }
  510. {
  511. \DSAchar_if_key_defined:nnT { clist } { liturgien }
  512. {
  513. \DSAindentedThingy\CharLiturgien { #2 }
  514. \\
  515. }
  516. }
  517. \bottomrule
  518. \end{tabular}
  519. \group_end:
  520. }%<<<
  521. \NewDocumentCommand \CharManoever { O{,~} m }%>>>
  522. {
  523. \DSAchar_print_clist_labelled:nnnn { #2 } { manoever } { Manöver } { #1 }
  524. }%<<<
  525. \NewDocumentCommand \CharZauber { O{,~} m }%>>>
  526. {
  527. \DSAchar_print_clist_labelled:nnnn { #2 } { zauber } { Zauber } { #1 }
  528. }%<<<
  529. \NewDocumentCommand \CharLiturgien { O{,~} m }%>>>
  530. {
  531. \DSAchar_print_clist_labelled:nnnn { #2 } { liturgien } { Liturgien } { #1 }
  532. }%<<<
  533. \NewDocumentCommand \CharSonderfertigkeiten { O{,~} m }%>>>
  534. {
  535. \DSAchar_print_clist_labelled:nnnn
  536. { #2 } { sonderfertigkeiten } { Sonderfertigkeiten } { #1 }
  537. }%<<<
  538. \NewExpandableDocumentCommand \CharListe { O{,~} m m }%>>>
  539. {
  540. \DSAchar_print_clist:nnn { #2 } { #3 } { #1 }
  541. }%<<<
  542. \NewExpandableDocumentCommand \CharBoolTF { m m }%>>>
  543. {
  544. \DSAchar_bool_if:nnTF { #1 } { #2 }
  545. }%<<<
  546. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%<<<
  547. \endinput