nonebot-plugin-dnddicer 0.2.0__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/.gitattributes +7 -0
  2. nonebot_plugin_dnddicer-0.2.2/.github/workflows/docs.yml +75 -0
  3. nonebot_plugin_dnddicer-0.2.2/.github/workflows/release.yml +68 -0
  4. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/.gitignore +8 -0
  5. nonebot_plugin_dnddicer-0.2.2/CHANGELOG.md +84 -0
  6. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/PKG-INFO +41 -42
  7. nonebot_plugin_dnddicer-0.2.2/README.md +151 -0
  8. nonebot_plugin_dnddicer-0.2.2/docs/.vitepress/config.mts +89 -0
  9. nonebot_plugin_dnddicer-0.2.2/docs/.vitepress/plugins/chat-container.mts +210 -0
  10. nonebot_plugin_dnddicer-0.2.2/docs/.vitepress/scripts/sync-changelog.mjs +35 -0
  11. nonebot_plugin_dnddicer-0.2.2/docs/.vitepress/theme/index.ts +7 -0
  12. nonebot_plugin_dnddicer-0.2.2/docs/.vitepress/theme/style.css +136 -0
  13. nonebot_plugin_dnddicer-0.2.2/docs/guide/battle.md +163 -0
  14. nonebot_plugin_dnddicer-0.2.2/docs/guide/cast.md +160 -0
  15. nonebot_plugin_dnddicer-0.2.2/docs/guide/changelog.md +90 -0
  16. nonebot_plugin_dnddicer-0.2.2/docs/guide/character-card.md +225 -0
  17. nonebot_plugin_dnddicer-0.2.2/docs/guide/checks.md +190 -0
  18. nonebot_plugin_dnddicer-0.2.2/docs/guide/dm-guide.md +330 -0
  19. nonebot_plugin_dnddicer-0.2.2/docs/guide/faq.md +149 -0
  20. nonebot_plugin_dnddicer-0.2.2/docs/guide/hp-rest.md +340 -0
  21. nonebot_plugin_dnddicer-0.2.2/docs/guide/initiative.md +221 -0
  22. nonebot_plugin_dnddicer-0.2.2/docs/guide/overview.md +142 -0
  23. nonebot_plugin_dnddicer-0.2.2/docs/guide/quickstart.md +147 -0
  24. nonebot_plugin_dnddicer-0.2.2/docs/guide/roll-advanced.md +215 -0
  25. nonebot_plugin_dnddicer-0.2.2/docs/guide/roll-basics.md +137 -0
  26. nonebot_plugin_dnddicer-0.2.2/docs/index.md +54 -0
  27. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/__init__.py +5 -5
  28. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/character/__init__.py +1 -1
  29. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/character/constants.py +5 -6
  30. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/character/models.py +3 -7
  31. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/character/services.py +24 -10
  32. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/commands/__init__.py +2 -2
  33. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/commands/base.py +78 -14
  34. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/commands/battle.py +27 -15
  35. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/commands/character.py +125 -33
  36. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/commands/dnd.py +23 -25
  37. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/commands/group_config.py +4 -2
  38. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/commands/hp.py +199 -73
  39. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/commands/initiative.py +147 -53
  40. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/commands/npc.py +13 -2
  41. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/commands/roll.py +10 -10
  42. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/commands/roll_parse_args.py +1 -2
  43. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/commands/text.py +79 -30
  44. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/data/characters.py +1 -1
  45. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/data/initiative.py +1 -2
  46. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/data/npc_health.py +15 -2
  47. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/data/service_state.py +1 -1
  48. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/engine/__init__.py +3 -8
  49. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/engine/roll/__init__.py +3 -5
  50. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/engine/roll/_string_utils.py +3 -5
  51. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/engine/roll/ast_engine/__init__.py +1 -3
  52. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/engine/roll/ast_engine/adapter.py +2 -5
  53. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/engine/roll/ast_engine/ast_nodes.py +1 -3
  54. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/engine/roll/ast_engine/errors.py +1 -3
  55. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/engine/roll/ast_engine/evaluator.py +24 -3
  56. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/engine/roll/ast_engine/limits.py +1 -3
  57. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/engine/roll/ast_engine/parser.py +1 -3
  58. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/engine/roll/ast_engine/preprocessor.py +20 -3
  59. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/engine/roll/ast_engine/trace.py +57 -11
  60. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/engine/roll/default_dice.py +3 -5
  61. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/engine/roll/karma_runtime.py +1 -3
  62. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/engine/roll/result.py +1 -3
  63. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/engine/roll/roll_config.py +1 -3
  64. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/engine/roll/roll_const.py +1 -3
  65. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/engine/roll/roll_utils.py +1 -3
  66. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/engine/roll/sequence_runtime.py +2 -4
  67. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/initiative/__init__.py +1 -1
  68. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/initiative/models.py +6 -6
  69. nonebot_plugin_dnddicer-0.2.2/nonebot_plugin_dnddicer/platform/onebot_v11.py +164 -0
  70. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/version.py +1 -1
  71. nonebot_plugin_dnddicer-0.2.2/package-lock.json +2561 -0
  72. nonebot_plugin_dnddicer-0.2.2/package.json +15 -0
  73. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/pyproject.toml +4 -4
  74. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/battle_adjust.txt +13 -0
  75. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/battle_aoe.txt +5 -0
  76. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/battle_cleanup.txt +8 -0
  77. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/battle_errors.txt +12 -0
  78. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/battle_guide_hit.txt +8 -0
  79. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/battle_open.txt +4 -0
  80. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/battle_reinforce.txt +18 -0
  81. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/battle_round1.txt +48 -0
  82. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/battle_shield.txt +5 -0
  83. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/battle_tower.txt +21 -0
  84. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/battle_zero_down.txt +8 -0
  85. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/cast_setup.txt +37 -0
  86. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/char_record_error.txt +15 -0
  87. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/char_template.txt +15 -0
  88. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/char_view_other.txt +22 -0
  89. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/char_view_self.txt +13 -0
  90. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/check_attr.txt +6 -0
  91. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/check_cancel.txt +10 -0
  92. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/check_crit_fail.txt +6 -0
  93. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/check_halfling_luck.txt +4 -0
  94. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/check_mention.txt +6 -0
  95. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/check_multi.txt +7 -0
  96. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/check_no_card.txt +4 -0
  97. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/check_save_bonus.txt +6 -0
  98. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/check_skill_expertise.txt +6 -0
  99. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/dm_aoe.txt +6 -0
  100. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/dm_dark_roll.txt +5 -0
  101. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/dm_dm_turn.txt +5 -0
  102. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/dm_group_save.txt +5 -0
  103. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/dm_init_first.txt +15 -0
  104. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/dm_next_battle.txt +12 -0
  105. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/dm_player_hp.txt +9 -0
  106. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/dm_player_r.txt +12 -0
  107. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/dm_prep.txt +30 -0
  108. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/dm_prep_miss.txt +5 -0
  109. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/dm_records.txt +13 -0
  110. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/dm_turn_push.txt +17 -0
  111. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/dnd_roll.txt +9 -0
  112. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/dndx_record.txt +18 -0
  113. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/faq_default_face.txt +4 -0
  114. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/faq_dset.txt +6 -0
  115. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/faq_dset_denied.txt +8 -0
  116. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/hp_cleanup.txt +20 -0
  117. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/hp_expr_paren.txt +11 -0
  118. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/hp_resist_forms.txt +11 -0
  119. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/hp_set.txt +7 -0
  120. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/hp_target_search.txt +15 -0
  121. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/init_batch_shared.txt +6 -0
  122. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/init_batch_split.txt +5 -0
  123. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/init_check_link.txt +6 -0
  124. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/init_del_ambiguous.txt +8 -0
  125. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/init_dup_roll.txt +7 -0
  126. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/init_first.txt +4 -0
  127. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/init_mention_roll.txt +4 -0
  128. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/init_name_roll.txt +12 -0
  129. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/init_npc_fixed.txt +4 -0
  130. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/init_player_roll.txt +6 -0
  131. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/init_swap.txt +4 -0
  132. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/init_view.txt +13 -0
  133. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/init_view_final.txt +12 -0
  134. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/npc_persist.txt +4 -0
  135. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/npc_refill_next.txt +18 -0
  136. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/overview_name_chain.txt +14 -0
  137. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/quickstart_bot_info.txt +7 -0
  138. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/quickstart_bot_off.txt +4 -0
  139. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/quickstart_bot_on.txt +4 -0
  140. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/quickstart_first_roll.txt +6 -0
  141. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/quickstart_private_limits.txt +4 -0
  142. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/rest_after.txt +10 -0
  143. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/roll_adv_adv.txt +4 -0
  144. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/roll_adv_dark.txt +5 -0
  145. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/roll_adv_dis.txt +4 -0
  146. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/roll_adv_keep.txt +6 -0
  147. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/roll_adv_modifiers.txt +16 -0
  148. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/roll_adv_multi.txt +7 -0
  149. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/roll_adv_order_error.txt +6 -0
  150. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/roll_adv_reason.txt +6 -0
  151. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/roll_adv_resist.txt +6 -0
  152. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/roll_adv_short.txt +6 -0
  153. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/roll_adv_summary.txt +6 -0
  154. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/roll_adv_unimpl.txt +6 -0
  155. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/roll_basics_basic.txt +6 -0
  156. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/roll_basics_crit_1.txt +4 -0
  157. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/roll_basics_crit_20.txt +6 -0
  158. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/roll_basics_math.txt +6 -0
  159. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/roll_basics_plain_d.txt +6 -0
  160. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/baseline/roll_basics_space_error.txt +6 -0
  161. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/cast.py +145 -0
  162. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/harness.py +269 -0
  163. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/scenarios.py +993 -0
  164. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/test_docs_sync.py +123 -0
  165. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/test_examples_run.py +44 -0
  166. nonebot_plugin_dnddicer-0.2.2/tests/docs_examples/transcript.py +81 -0
  167. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/tests/engine/test_ast_error_semantics.py +25 -0
  168. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/tests/engine/test_ast_integration.py +85 -3
  169. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/tests/test_battle_command.py +41 -0
  170. nonebot_plugin_dnddicer-0.2.2/tests/test_character_command.py +486 -0
  171. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/tests/test_character_services.py +1 -1
  172. nonebot_plugin_dnddicer-0.2.2/tests/test_command_mentions.py +130 -0
  173. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/tests/test_dnd_command.py +40 -3
  174. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/tests/test_dset_command.py +15 -0
  175. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/tests/test_help_command.py +1 -1
  176. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/tests/test_hp_command.py +410 -27
  177. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/tests/test_initiative_command.py +284 -2
  178. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/tests/test_npc_health.py +180 -11
  179. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/tests/test_roll_command.py +114 -2
  180. nonebot_plugin_dnddicer-0.2.0/.github/workflows/release.yml +0 -42
  181. nonebot_plugin_dnddicer-0.2.0/README.md +0 -152
  182. nonebot_plugin_dnddicer-0.2.0/docs/guide/attributes.md +0 -98
  183. nonebot_plugin_dnddicer-0.2.0/docs/guide/battle.md +0 -115
  184. nonebot_plugin_dnddicer-0.2.0/docs/guide/character-card.md +0 -161
  185. nonebot_plugin_dnddicer-0.2.0/docs/guide/faq.md +0 -89
  186. nonebot_plugin_dnddicer-0.2.0/docs/guide/hp-rest.md +0 -206
  187. nonebot_plugin_dnddicer-0.2.0/docs/guide/initiative.md +0 -120
  188. nonebot_plugin_dnddicer-0.2.0/docs/guide/quickstart.md +0 -119
  189. nonebot_plugin_dnddicer-0.2.0/docs/guide/roll-syntax.md +0 -179
  190. nonebot_plugin_dnddicer-0.2.0/docs/index.md +0 -91
  191. nonebot_plugin_dnddicer-0.2.0/nonebot_plugin_dnddicer/platform/onebot_v11.py +0 -89
  192. nonebot_plugin_dnddicer-0.2.0/tests/test_character_command.py +0 -229
  193. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/.github/workflows/test.yml +0 -0
  194. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/.python-version +0 -0
  195. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/LICENSE +0 -0
  196. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/commands/bot.py +0 -0
  197. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/commands/help.py +0 -0
  198. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/config.py +0 -0
  199. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/data/__init__.py +0 -0
  200. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/data/group_config.py +0 -0
  201. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/data/schema.py +0 -0
  202. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/nonebot_plugin_dnddicer/platform/__init__.py +0 -0
  203. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/tests/conftest.py +0 -0
  204. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/tests/engine/test_ast_evaluator.py +0 -0
  205. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/tests/engine/test_ast_parser.py +0 -0
  206. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/tests/engine/test_ast_trace_errors_limits.py +0 -0
  207. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/tests/engine/test_default_ast_path.py +0 -0
  208. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/tests/fake_event.py +0 -0
  209. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/tests/test_bot_command.py +0 -0
  210. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/tests/test_command_starts.py +0 -0
  211. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/tests/test_data_schema.py +0 -0
  212. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/tests/test_error_fallback.py +0 -0
  213. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/tests/test_plugin.py +0 -0
  214. {nonebot_plugin_dnddicer-0.2.0 → nonebot_plugin_dnddicer-0.2.2}/uv.lock +0 -0
@@ -12,6 +12,13 @@
12
12
  *.lock text eol=lf
13
13
  *.gitignore text eol=lf
14
14
  *.gitattributes text eol=lf
15
+ # 文档站(VitePress)前端文件
16
+ *.mts text eol=lf
17
+ *.ts text eol=lf
18
+ *.js text eol=lf
19
+ *.mjs text eol=lf
20
+ *.css text eol=lf
21
+ *.vue text eol=lf
15
22
 
16
23
  # 二进制文件不转换
17
24
  *.png binary
@@ -0,0 +1,75 @@
1
+ # 文档站部署(GitHub Pages)
2
+ #
3
+ # 触发时机 = 发布时机:只有推 v* 标签(发版)或手动触发时才构建并部署。
4
+ # 平时往 main 推送的文档改动只留在仓库里,不会改变线上页面——
5
+ # 需要让某个改动上线时,要么随下一次发版,要么在 Actions 里手动运行本工作流。
6
+ #
7
+ # 首次使用:仓库 Settings → Pages → Source 选「GitHub Actions」。
8
+ # 未启用前本工作流会自动跳过(保持绿色),启用后无需再改任何配置。
9
+ name: docs
10
+
11
+ on:
12
+ push:
13
+ tags:
14
+ - "v*"
15
+ workflow_dispatch:
16
+
17
+ permissions:
18
+ contents: read
19
+ pages: write
20
+ id-token: write
21
+
22
+ concurrency:
23
+ group: pages
24
+ cancel-in-progress: false
25
+
26
+ jobs:
27
+ check:
28
+ runs-on: ubuntu-latest
29
+ outputs:
30
+ enabled: ${{ steps.pages.outputs.enabled }}
31
+ steps:
32
+ - name: 检查 Pages 是否已启用
33
+ id: pages
34
+ env:
35
+ GH_TOKEN: ${{ github.token }}
36
+ run: |
37
+ if gh api "repos/$GITHUB_REPOSITORY/pages" > /dev/null 2>&1; then
38
+ echo "enabled=true" >> "$GITHUB_OUTPUT"
39
+ echo "Pages 已启用,继续构建与部署。"
40
+ else
41
+ echo "enabled=false" >> "$GITHUB_OUTPUT"
42
+ echo "::notice title=文档站尚未启用::仓库 Settings → Pages 还没把 Source 选为 GitHub Actions,跳过本次部署;启用后手动运行本工作流、或等下一次发版即可。"
43
+ fi
44
+
45
+ build:
46
+ needs: check
47
+ if: needs.check.outputs.enabled == 'true'
48
+ runs-on: ubuntu-latest
49
+ steps:
50
+ - uses: actions/checkout@v4
51
+ - uses: actions/setup-node@v4
52
+ with:
53
+ node-version: 22
54
+ cache: npm
55
+ cache-dependency-path: package-lock.json
56
+ - name: 安装文档站依赖
57
+ run: npm ci
58
+ # docs:build 自带「从 CHANGELOG.md 生成《更新日志》页」一步,站点更新日志随仓库同步
59
+ - name: 构建文档站
60
+ run: npm run docs:build
61
+ - uses: actions/configure-pages@v5
62
+ - uses: actions/upload-pages-artifact@v3
63
+ with:
64
+ path: docs/.vitepress/dist
65
+
66
+ deploy:
67
+ needs: build
68
+ runs-on: ubuntu-latest
69
+ environment:
70
+ name: github-pages
71
+ url: ${{ steps.deployment.outputs.page_url }}
72
+ steps:
73
+ - name: 部署到 GitHub Pages
74
+ id: deployment
75
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,68 @@
1
+ # 推 v* tag → 全量测试 → 构建并发布 PyPI(Trusted Publishing)+ 创建 GitHub Release
2
+ name: release
3
+
4
+ on:
5
+ push:
6
+ tags:
7
+ - "v*"
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+ strategy:
13
+ fail-fast: false
14
+ matrix:
15
+ python-version: ["3.11", "3.12", "3.13"]
16
+ steps:
17
+ - uses: actions/checkout@v4
18
+ - uses: astral-sh/setup-uv@v6
19
+ with:
20
+ python-version: ${{ matrix.python-version }}
21
+ - name: 全量测试
22
+ run: uv run pytest
23
+
24
+ release:
25
+ needs: test
26
+ runs-on: ubuntu-latest
27
+ permissions:
28
+ # 建 GitHub Release
29
+ contents: write
30
+ # PyPI Trusted Publishing(OIDC),无需存储 token
31
+ id-token: write
32
+ steps:
33
+ - uses: actions/checkout@v4
34
+ # 先于构建/发布校验并提取本版说明:缺小节时直接失败,不会出现「PyPI 已发、Release 没说明」的半成品
35
+ - name: 提取 CHANGELOG 本版说明
36
+ run: |
37
+ python3 - <<'PY'
38
+ import os, re, sys
39
+
40
+ version = os.environ["GITHUB_REF_NAME"].removeprefix("v")
41
+ lines = open("CHANGELOG.md", encoding="utf-8").read().splitlines()
42
+ body, capture = [], False
43
+ for line in lines:
44
+ if line.startswith("## "):
45
+ if capture:
46
+ break
47
+ capture = re.match(rf"^##\s*\[?{re.escape(version)}\]?(?:\s|$)", line) is not None
48
+ continue
49
+ if capture:
50
+ body.append(line)
51
+ notes = "\n".join(body).strip()
52
+ if not notes:
53
+ sys.exit(f"CHANGELOG.md 中没有 {version} 的小节:请先补写该版本小节并提交,再重新打标签发布。")
54
+ with open(".release-notes.md", "w", encoding="utf-8") as f:
55
+ f.write(notes + "\n")
56
+ print(notes)
57
+ PY
58
+ - uses: astral-sh/setup-uv@v6
59
+ - name: 构建 sdist + wheel
60
+ run: uv build
61
+ - name: 发布到 PyPI
62
+ uses: pypa/gh-action-pypi-publish@release/v1
63
+ - name: 创建 GitHub Release
64
+ uses: softprops/action-gh-release@v2
65
+ with:
66
+ # 正文取自 CHANGELOG 对应版本小节;generate_release_notes 再自动追加 Full Changelog 链接
67
+ body_path: .release-notes.md
68
+ generate_release_notes: true
@@ -39,3 +39,11 @@ doc/
39
39
  .idea/
40
40
  .DS_Store
41
41
  Thumbs.db
42
+
43
+ # ---- 发布流程临时产物(release workflow 提取的 Release 正文;本地试跑同名脚本时也会生成)----
44
+ .release-notes.md
45
+
46
+ # ---- 文档站(VitePress,仅构建文档用,不进发布产物)----
47
+ node_modules/
48
+ docs/.vitepress/dist/
49
+ docs/.vitepress/cache/
@@ -0,0 +1,84 @@
1
+ # 更新日志
2
+
3
+ 本文件按版本记录对外变化,分「新增 / 变更 / 修复 / 文档」四组,表述面向使用者(跑团玩家与 DM)。
4
+
5
+ <!-- 维护说明(渲染时不可见):
6
+
7
+ - 条目一律一条目一整行、不做软换行:本文件小节的正文会原样成为 GitHub Release 正文,而 Release 页面按「issue 式」渲染,单个换行会被渲染为真实换行。
8
+ - 打 `v*` 标签前,请先在下方补好该版本的小节(标题格式 `## [x.y.z] - 日期`):发布时 `.github/workflows/release.yml` 会提取与所推标签同名的小节作为 GitHub Release 的说明正文,缺小节即会在构建前直接失败。
9
+ -->
10
+
11
+ ## [0.2.2] - 2026-09-24
12
+
13
+ ### 变更
14
+
15
+ - **定位表述统一**:`.bot` 插件简介与插件元数据描述更新为「功能最全面、体验最好的 DND 骰娘」口径,清理旧的对齐式表述(掷骰引擎上游来源的致谢仅保留在许可位置)。
16
+
17
+ ### 修复
18
+
19
+ - **掷骰说明文字按四则运算还原**:修复算式说明里常量复合子表达式与一元负号的错位——如 `.rd6+2*2` 旧显示为 `1D6+2*2=[4]*2+4=8`(乘号挪用了骰块)、`-1d6+3` 丢负号、`12/(1+2)`、`3*d6` 同类错显;说明文字现与表达式结构一一对应,骰子结果与取骰规则不变。
20
+ - **私聊下的群聊限定命令不再静默**:角色卡、检定/豁免/攻击点、HP、先攻与战斗轮等按群归属的命令在私聊中发送时,会如常收到「该指令仅在群聊中可用。」提示(此前部分命令族没有回应)。
21
+ - **`.bot` 私聊回应文案修正**:不再写「私聊可直接使用本插件的全部功能」,改为如实说明私聊可用范围(掷骰、属性生成、`.帮助` 等可用;角色卡、检定、HP、先攻与战斗轮、群配置等仅限群聊)。
22
+
23
+ ### 文档
24
+
25
+ - **使用文档站上线**:手册式 15 页(快速开始、三章教程、参考组、更新日志),配固定示例团的真实取证示例;推 `v*` 标签时自动构建并部署到 GitHub Pages。
26
+ - README 改为手册式目录并挂文档站入口;全站正文统一骰记法(D20 等)与命令示例的最简写法。
27
+
28
+ ## [0.2.1] - 2026-09-22
29
+
30
+ ### 新增
31
+
32
+ - **@ 提及目标(DM 代操作)**:`.hp`、`.npc`、`.ri`、`.init del|first|swap`、`.回合`、`.角色卡`(可查看他人整卡,记录/清除仍仅限本人)、`.状态`、`.长休` 以及各检定点命令(含 `.先攻检定`)均可直接 @ 某位玩家,作用于其角色卡或先攻条目;游离的 @ 会被拦截并提示,不再静默按自己处理(此前 `.hp @玩家 -d4` 会误扣自己血量)。
33
+ - **玩家名称显示统一**:凡是需要显示玩家名的场景(`.r`/`.rh`、`.dnd`/`.dndx`、检定反馈、`.hp`、`.ri` 入表名等)统一按「角色卡名 → 群名片 → QQ 昵称 → 未知玩家(QQ号)」回退,末端兜底附带 QQ 号,便于 DM 定位是谁。
34
+
35
+ ### 变更
36
+
37
+ - `.hp del` / `.hp clr` 语义修订为**仅作用于 NPC 血量**:`del` 删除指定 NPC(支持 `/` 分隔多名称)、`clr` 清空本群全部 NPC 血量(含跨战斗保持的);无对象时只提示用法,目标解析到玩家角色卡时改为引导使用 `.角色卡清除`,不再直接删除整张角色卡。
38
+
39
+ ### 修复
40
+
41
+ - 优势/劣势别名粘连:`.rd劣势20+6` 这类面数错序写法不再被静默改写成错误骰式,改为报错引导;`K`/`KL` 取点超量时给出报错而非错误结果。
42
+ - `.hp` 目标匹配改为完全匹配优先(与 `.init` 一致):修复「地精」与「熊精」并存时 `.hp 地精` 命中错对象、`.hp del 地精` 删不掉的问题。
43
+ - 伤害/治疗结算最低为 0:修复伤害掷出负值后经抗性/易伤计算反而变成回血的问题;治疗为 0 时不再触发昏迷唤醒。
44
+ - `.hp` 目标未命中时补充引导提示(新建 NPC 需先加入先攻表才能设置 HP);回满提示中的命令独立成行,便于直接复制。
45
+
46
+ ### 文档
47
+
48
+ - README 命令表与使用文档(角色卡 / HP 管理 / 先攻列表 / 战斗轮 / 快速开始)补充 @ 用法与示例。
49
+
50
+ ## [0.2.0] - 2026-09-21
51
+
52
+ ### 新增
53
+
54
+ - **NPC / 怪物血量**:`.hp` 目标搜索扩展为三层(玩家角色卡 → NPC 血量 → 先攻表,NPC 经先攻表按需建立记录);先攻列表与 `.hp list` 显示 NPC 血量,`.hp del` 支持指定对象;`.init clr` / `.br` 清理未设最大值的临时血量,`.init del` 连带删除对应记录。
55
+ - **NPC 血量自动回满与跨战斗保持**:同名 NPC 以新条目加入先攻表时自动回满并给出提示(同一场战斗内重掷不触发);`.npc 持久` / `.npc 临时` 控制血量是否跨战斗保持。
56
+ - **`.dndx` 属性名绑定掷点**:4D6K3 掷点后将六项数值按固定顺序绑定力量/敏捷/体质/智力/感知/魅力(不降序排列,掷出即定配对,可直接抄入角色卡),与 `.dnd` 并存。
57
+
58
+ ### 修复
59
+
60
+ - `.dnd` 原因参数不再被静默丢弃:首词不是数字时整段视为原因(如 `.dnd 开卡`),分隔符放宽为任意空白。
61
+
62
+ ### 文档
63
+
64
+ - HP 管理新增「NPC / 怪物血量」章节;先攻列表、战斗轮、FAQ、命令总表与 README 同步。
65
+
66
+ ## [0.1.1] - 2026-09-10
67
+
68
+ ### 修复
69
+
70
+ - 依赖下限放宽至 NoneBot2 ≥ 2.4.0:兼容仍运行 2.4.x 的宿主(已在 2.4.0 环境实测全量测试通过)。
71
+
72
+ ## [0.1.0] - 2026-09-10
73
+
74
+ 首个公开版本:第一期功能全部落地。
75
+
76
+ ### 新增
77
+
78
+ - **掷骰**:`.r` / `.rh`——优势/劣势、保留最高、重掷、爆炸骰、连掷、暗骰、原因后缀、群默认骰面;仅 D20 出目 20/1 播报大成功/大失败。
79
+ - **角色卡与检定**:`.角色卡` / `.状态`(`$…$` 模板建卡,`.角色卡模板` 输出模板);检定/豁免/攻击点命令自动代入调整值、熟练与额外加值。
80
+ - **属性生成**:`.dnd`(4D6K3 掷点)。
81
+ - **HP 管理与长休**:`.hp`(查看 / 结算 / 列表 / 删除)、抗性/易伤与 AOE 伤害掷骰、`.长休`。
82
+ - **先攻列表**:`.init`(子指令)、`.ri`、`.先攻`,`.先攻检定` 与角色卡联动。
83
+ - **战斗轮**:`.br` / `.ed` / `.回合` / `.轮次`。
84
+ - **群配置与帮助**:`.dset` 群默认骰面、`.帮助` / `.help`、`.bot` 插件信息与群聊服务开关(群聊默认关闭,需 @ 机器人触发)。
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: nonebot-plugin-dnddicer
3
- Version: 0.2.0
4
- Summary: 专精 DND5e/5r 跑团的 NoneBot2 骰娘插件(屠龙骰):掷骰表达式、角色卡与检定、属性生成、HP 管理、先攻列表、战斗轮等,命令手感对齐 nonebot-dicepp
3
+ Version: 0.2.2
4
+ Summary: 专精 DND5e/5r 跑团的 NoneBot2 骰娘插件(屠龙骰):掷骰表达式、角色卡与检定、属性生成、HP 管理、先攻列表、战斗轮等
5
5
  Project-URL: Homepage, https://github.com/H-Elden/nonebot-plugin-dnddicer
6
6
  Project-URL: Issues, https://github.com/H-Elden/nonebot-plugin-dnddicer/issues
7
7
  Project-URL: Repository, https://github.com/H-Elden/nonebot-plugin-dnddicer.git
@@ -30,32 +30,28 @@ Description-Content-Type: text/markdown
30
30
 
31
31
  # 屠龙骰(DNDDicer / nonebot-plugin-dnddicer)
32
32
 
33
- > 专精 **DND5e / DND5r** 跑团的 [NoneBot2](https://nonebot.dev/) 骰娘插件(OneBot V11 适配器),
34
- > 命令手感对齐 [nonebot-dicepp](https://github.com/pear-studio/nonebot-dicepp)(梨骰)。
33
+ > 专精 **DND5e / DND5r** 跑团的 [NoneBot2](https://nonebot.dev/) 骰娘插件(OneBot V11 适配器),致力于做功能最全面、体验最好的 DND 骰娘。
35
34
  >
36
- > 当前版本:**v0.2.0** · 完整使用手册见 **📖 [使用文档](./docs/index.md)**
35
+ > 当前版本:**v0.2.2** · 完整使用手册见 **📖 [使用文档](https://h-elden.github.io/nonebot-plugin-dnddicer/)**
37
36
 
38
37
  ## ✨ 简介
39
38
 
40
- DNDDicer 的目标是填补「NoneBot 商店中缺少 **DND5e/5r 专业 + 现代维护 + 插件形态** 骰娘」的空位:
41
- 以 DicePP 掷骰引擎与命令手感为基准,做独立的、零配置可加载的 NoneBot 插件,供任何已有
42
- 机器人从商店安装即用。
39
+ DNDDicer 的目标是填补「NoneBot 商店中缺少 **DND5e/5r 专业 + 现代维护 + 插件形态** 骰娘」的空位:围绕 DND 跑团全流程持续做深做全,致力于提供功能最全面、体验最好的 DND 骰娘,零配置可加载,供任何已有机器人从商店安装即用。
43
40
 
44
- - **掷骰引擎**:移植 nonebot-dicepp 的 AST 表达式引擎(Lark 文法),支持 `2d20kh1`、
45
- 优势/劣势、爆炸骰、连掷、暗骰等 DicePP 完整语法面;
46
- - **跑团全流程**:掷骰 → `.dnd` 属性生成 → 角色卡与检定/豁免/攻击点命令 → HP 管理
47
- (伤害掷骰、抗性/易伤、AOE 多目标结算、长休)→ 先攻列表与战斗轮;
48
- - **规则范围**:仅 DND5e/5r——专精 DND 定位,不做 COC/d100 体系与 `.mode` 模式切换;
41
+ - **掷骰引擎**:内置 AST 表达式引擎(Lark 文法),支持 `2d20kh1`、优势/劣势、爆炸骰、连掷、暗骰等完整掷骰语法;
42
+ - **跑团全流程**:掷骰 → `.dnd` 属性生成 → 角色卡与检定/豁免/攻击点命令 → HP 管理(伤害掷骰、抗性/易伤、AOE 多目标结算、长休)→ 先攻列表与战斗轮;
43
+ - **规则范围**:仅 DND5e/5r——专精 DND 定位,不做 COC/D100 体系与 `.mode` 模式切换;
49
44
  - **商店合规**:零配置可加载、本地存储走 `nonebot-plugin-localstore`、元数据完整、全程异步。
50
45
 
51
46
  ## 📖 使用文档
52
47
 
53
- 详细用法、输入/输出示例与常见问题见仓库 `docs/` 使用文档:
48
+ 详细用法、输入/输出示例与常见问题见使用文档(手册式分章,含跑团示例;**在线版**:<https://h-elden.github.io/nonebot-plugin-dnddicer/>,源文件在仓库 `docs/`):
54
49
 
55
- - [命令总表与快速开始](./docs/index.md) · [群管理与 FAQ](./docs/guide/faq.md)
56
- - [掷骰语法](./docs/guide/roll-syntax.md) · [角色卡与检定](./docs/guide/character-card.md)
57
- - [属性生成](./docs/guide/attributes.md) · [HP 管理](./docs/guide/hp-rest.md)
58
- - [先攻列表](./docs/guide/initiative.md) · [战斗轮](./docs/guide/battle.md)
50
+ - 开始:[快速开始](./docs/guide/quickstart.md) · [示例团与人物](./docs/guide/cast.md)
51
+ - 第一章 · 基础操作:[掷骰基础](./docs/guide/roll-basics.md) · [掷骰进阶](./docs/guide/roll-advanced.md) · [先攻列表](./docs/guide/initiative.md)
52
+ - 第二章 · 进阶操作:[角色卡与属性](./docs/guide/character-card.md) · [检定与豁免](./docs/guide/checks.md) · [HP 与长休](./docs/guide/hp-rest.md) · [战斗轮](./docs/guide/battle.md)
53
+ - 第三章 · DM 操作:[DM 实战指南](./docs/guide/dm-guide.md)
54
+ - 参考 · [命令总览](./docs/guide/overview.md) · [群管理与 FAQ](./docs/guide/faq.md)
59
55
 
60
56
  ## 📦 安装
61
57
 
@@ -85,23 +81,21 @@ plugins = ["nonebot_plugin_dnddicer"]
85
81
  | 配置项 | 类型 | 默认值 | 说明 |
86
82
  | --- | --- | --- | --- |
87
83
  | `dnddicer_command_priority` | `int` | `10` | 命令事件响应器基础优先级(越小越优先),与其他插件冲突时按需调整 |
88
- | `dnddicer_default_face` | `int` | `20` | 全局默认骰面(DND 惯例 d20;已配置 `.dset` 的群以群配置为准,此项作兜底) |
84
+ | `dnddicer_default_face` | `int` | `20` | 全局默认骰面(DND 惯例 D20;已配置 `.dset` 的群以群配置为准,此项作兜底) |
89
85
  | `dnddicer_enabled` | `bool` | `true` | 功能总开关,`false` 时只加载骨架、不注册命令 |
90
86
  | `dnddicer_use_host_command_starts` | `bool` | `false` | 是否兼容宿主 `COMMAND_START` 起始符(NoneBot 默认 `/`,开启后 `/.help` 等亦可触发)。默认只匹配 `.` / `。`,避免 `/help`、`/bot` 等常见单词命令与其他插件同时命中(冲突) |
91
87
 
92
88
  ## 🎲 用法
93
89
 
94
- > 命令以 `.`(或全角 `。`)开头,中英文别名对齐 DicePP;命令起始符默认仅 `.` / `。`,
95
- > 如需用宿主斜杠 `/` 等起始符触发(如 `/.help`),请设置配置项 `dnddicer_use_host_command_starts=true`。
96
- > **群聊服务默认关闭(白名单)**:需群主/管理员发送 `.bot on` 开启本群服务;`.bot off`
97
- > 关闭后本群不再响应命令(`.bot` 本身不受影响)。群聊中使用 `.bot` 需先 @ 本机器人;
98
- > 私聊不受服务开关限制,可直接使用全部功能。
90
+ > 命令以 `.`(或全角 `。`)开头;命令起始符默认仅 `.` / `。`,如需用宿主斜杠 `/` 等起始符触发(如 `/.help`),请设置配置项 `dnddicer_use_host_command_starts=true`。**群聊服务默认关闭(白名单)**:需群主/管理员发送 `.bot on` 开启本群服务;`.bot off` 关闭后本群不再响应命令(`.bot` 本身不受影响)。群聊中使用 `.bot` 需先 @ 本机器人;私聊不受服务开关限制,但可用命令更少——角色卡、检定、HP、先攻等仅限群聊(差异见[快速开始](./docs/guide/quickstart.md))。
91
+ >
92
+ > **DM 代操作(@ 提及目标)**:多数带目标的命令支持用 **@群成员** 指定目标——直连该成员在本群的角色卡,不受同名 NPC/改名影响,且可与名称混写(`.hp @玩家 -4d6`、`.hp @玩家;地精 -d4`、`.ri+3 @玩家`、`.init del @玩家`、`.回合 @玩家`、`.角色卡 @玩家`、`.力量豁免 @玩家`、`.先攻检定 @玩家` 等)。详见 [命令总览 - @ 提及目标](./docs/guide/overview.md#-提及目标dm-代操作)。
99
93
 
100
94
  ### 🎲 掷骰(群聊 / 私聊)
101
95
 
102
96
  | 命令 | 说明 |
103
97
  | --- | --- |
104
- | `.r [N#][hs][表达式] [原因]` | 掷骰表达式(`#` 连掷 1~10、`h` 暗骰、`s` 只显数值;仅 d20 有大成功/大失败播报) |
98
+ | `.r [N#][hs][表达式] [原因]` | 掷骰表达式(`#` 连掷 1~10、`h` 暗骰、`s` 只显数值;仅 D20 有大成功/大失败播报) |
105
99
  | `.rh [表达式] [原因]` | 暗骰(群内提示、结果私聊) |
106
100
 
107
101
  ### 📋 角色卡与检定(群聊)
@@ -110,9 +104,11 @@ plugins = ["nonebot_plugin_dnddicer"]
110
104
  | --- | --- |
111
105
  | `.角色卡模板` / `.角色卡记录 <模板>` | 查看示例卡 / 记录或覆盖角色卡(`$…$` 分段模板) |
112
106
  | `.角色卡` / `.角色卡清除` / `.状态` | 查看 / 删除角色卡 / 查看 HP 与生命骰摘要 |
113
- | `.力量检定` / `.察觉检定+1` 等 | 属性/技能/先攻检定点命令,自动代入调整值/熟练/加值(`2#` 连掷、`+d4` 等可追加) |
114
- | `.体质豁免` / `.敏捷攻击优势` 等 | 豁免/攻击点命令(原名直配,优势/劣势后缀) |
115
- | `.先攻检定` | 掷先攻并自动写入本群先攻列表 |
107
+ | `.角色卡 @玩家` / `.角色卡 角色名` | 查看**他人**整卡(任何人可查看;记录/清除仅限本人) |
108
+ | `.状态 @玩家` | 查看他人的 HP 与生命骰摘要 |
109
+ | `.力量检定` / `.察觉检定+1` 等 | 属性/技能/先攻检定点命令,自动代入调整值/熟练/加值(`2#` 连掷、`+d4` 等可追加;表达式右侧可加 `@玩家` 代掷) |
110
+ | `.体质豁免` / `.敏捷攻击优势` 等 | 豁免/攻击点命令(原名直配,优势/劣势后缀;同样支持尾部 `@玩家`) |
111
+ | `.先攻检定` / `.先攻检定 @玩家` | 掷先攻并自动写入本群先攻列表(@ 形式代不在场的玩家掷) |
116
112
 
117
113
  ### 🎯 属性生成(群聊 / 私聊)
118
114
 
@@ -127,18 +123,23 @@ plugins = ["nonebot_plugin_dnddicer"]
127
123
  | --- | --- |
128
124
  | `.hp [对象] 20/30 (5)` | 设置自己/队友/NPC HP(含临时 HP;先 `.ri 名称` 入先攻表后即可记录 NPC 血量) |
129
125
  | `.hp [对象] -2d6+3` 等 | 伤害/治疗(支持掷骰表达式;目标后加 `抗性`/`易伤` 后缀可减半/加倍,分号分隔多目标同发结算) |
130
- | `.hp` / `.hp list` / `.hp del [对象]` | 查看自己 / 本群列表(PC + NPC)/ 删除 |
126
+ | `.hp @玩家 …` / `.hp @玩家` | 对 @ 的玩家角色卡结算 / 查看(`.hp @玩家 -4d6`、`.hp @玩家;地精 -d4` 与名称混写;需该玩家已建卡) |
127
+ | `.hp` / `.hp list` | 查看自己 / 本群列表(PC + NPC) |
128
+ | `.hp del 名称` / `.hp clr` | 删除单个 / 清空全部 NPC 血量记录(玩家角色卡请用 `.角色卡清除`,玩家先攻条目用 `.init del`) |
131
129
  | `.npc 持久/临时 名称` | NPC 血量跨战斗保持 / 恢复默认(同名 NPC 新入先攻表默认自动回满并提示) |
132
- | `.长休` | 长休结算(回满 HP、清临时 HP、回复一半生命骰) |
130
+ | `.长休` / `.长休 @玩家` | 长休结算(回满 HP、清临时 HP、回复一半生命骰);@ 形式代不在场的玩家收尾 |
133
131
 
134
132
  ### ⚔️ 先攻与战斗轮(群聊)
135
133
 
136
134
  | 命令 | 说明 |
137
135
  | --- | --- |
138
136
  | `.ri[修正] [名称/…]` | 掷先攻入表(`.ri20 地精` 固定值、`3#` 批量、`.先攻` 别名) |
137
+ | `.ri+3 @玩家` | 代不在场的玩家掷先攻:条目名取角色卡名并与该玩家绑定(重掷替换、回合提醒与 `.hp` 解析同步生效) |
139
138
  | `.init` | 查看先攻列表(`del`/`clr`/`first`/`swap` 子指令) |
139
+ | `.init del/first/swap @玩家` | 子指令按玩家归属定位条目(角色卡改名后仍有效;未入表会给出提示) |
140
140
  | `.br` | 新建战斗轮(清空先攻表) |
141
141
  | `.回合` / `.轮次` | 查看/跳转当前回合与轮次(`.回合+2` 连续推进,轮到玩家自动 @ 提醒) |
142
+ | `.回合 @玩家` | 跳转到该玩家的条目(不受改名/同名歧义影响) |
142
143
  | `.ed` | 结束当前回合并自动推进(`.结束` 别名) |
143
144
 
144
145
  ### ⚙️ 群管理(群聊)
@@ -149,19 +150,18 @@ plugins = ["nonebot_plugin_dnddicer"]
149
150
  | `.bot [on/off]` | 插件信息查询 / 本群服务开关(群主/管理员,需 @) |
150
151
  | `.帮助` / `.help [命令]` | 命令总览 / 指定命令详细用法(如 `.help r`) |
151
152
 
152
- > 一期范围外功能会**显式提示而非静默**:`.r exp` 期望值采样、`.r a/n` 特殊判定;
153
- > 牌堆/随机表与规则查询(T2)、法术位/死亡豁免/BUFF 表(T3 候选)见下方路线。
153
+ > 一期范围外功能会**显式提示而非静默**:`.r exp` 期望值采样、`.r a/n` 特殊判定;牌堆/随机表与规则查询(T2)、法术位/死亡豁免/BUFF 表(T3 候选)见下方路线。
154
154
 
155
155
  ## 📄 版本与路线
156
156
 
157
- 1. ✅ **v0.1.0**(第一期 = T0 + T1 + 战斗轮简化版 + `.bot` 服务开关):掷骰引擎移植、`.r/.rh`、
158
- 帮助、群配置(`.dset`)、角色卡与检定/豁免/攻击、`.dnd` 属性生成、HP 管理与长休
159
- (含抗性/易伤与 AOE 伤害掷骰)、先攻列表、战斗轮——全部落地,全量测试通过;
160
- 2. ✅ **v0.2.0**:HP 抗性/易伤与 AOE 掷骰完善、`.dnd 原因` 兼容修复、
161
- **NPC/怪物血量**(三层目标搜索、先攻列表与 `.hp list` 联动、`.ri` 入表自动回满、
162
- `.npc 持久/临时` 跨战斗保持)、`.dndx` 属性名绑定掷点;
163
- 3. ⏳ **第二期 T2**:牌堆/随机表、规则查询;
164
- 4. ⏳(可选)**T3 增强期**:法术位管理(`.ss/.cast`)、死亡豁免闭环(`.ds`)、BUFF/临时加值表(`.buff`)等。
157
+ 1. ✅ **v0.1.0**(第一期 = T0 + T1 + 战斗轮简化版 + `.bot` 服务开关):掷骰引擎移植、`.r/.rh`、帮助、群配置(`.dset`)、角色卡与检定/豁免/攻击、`.dnd` 属性生成、HP 管理与长休(含抗性/易伤与 AOE 伤害掷骰)、先攻列表、战斗轮——全部落地,全量测试通过;
158
+ 2. ✅ **v0.2.0**:HP 抗性/易伤与 AOE 掷骰完善、`.dnd 原因` 兼容修复、**NPC/怪物血量**(三层目标搜索、先攻列表与 `.hp list` 联动、`.ri` 入表自动回满、`.npc 持久/临时` 跨战斗保持)、`.dndx` 属性名绑定掷点;
159
+ 3. ✅ **v0.2.1**:**@ 提及目标**(DM 可代玩家操作 `.hp`/`.npc`/`.ri`/`.回合` 等、查看角色卡)、玩家名称显示统一回退链、`.hp del/clr` 语义修订(仅作用 NPC 血量)、优势/劣势别名粘连等真机反馈修复;
160
+ 4. ✅ **v0.2.2**:掷骰说明文字按四则运算还原(常量复合子表达式与一元负号)、私聊下的群聊限定命令不再静默与 `.bot` 私聊文案修正;**使用文档站上线**(手册式 15 页,随发版自动部署);
161
+ 5. ⏳ **第二期 T2**:牌堆/随机表、规则查询;
162
+ 6. ⏳(可选)**T3 增强期**:法术位管理(`.ss/.cast`)、死亡豁免闭环(`.ds`)、BUFF/临时加值表(`.buff`)等。
163
+
164
+ 每版完整变更(新增 / 变更 / 修复 / 文档)见 [CHANGELOG.md](./CHANGELOG.md)。
165
165
 
166
166
  ## 📦 本地开发
167
167
 
@@ -176,7 +176,6 @@ uv run pytest
176
176
  ## 🤝 许可与致谢
177
177
 
178
178
  - 本项目(业务层与工程骨架)以 **MIT License** 发布,见 [LICENSE](./LICENSE)。
179
- - **掷骰引擎与命令语法移植自 [nonebot-dicepp](https://github.com/pear-studio/nonebot-dicepp)**
180
- (Copyright (c) 2022 pear-studio,MIT License):相关文件头保留上游版权声明与 MIT 许可全文,来源按 MIT 要求在 LICENSE 中注明。
179
+ - **掷骰引擎移植自 [nonebot-dicepp](https://github.com/pear-studio/nonebot-dicepp)**(Copyright (c) 2022 pear-studio,MIT License):引擎文件头保留上游版权声明,MIT 许可全文见 [LICENSE](./LICENSE)。
181
180
  - 规则查询类资料内容**不随插件分发**(版权归原权利方/译者),需要时由使用者自行提供。
182
181
  - 本项目与 nonebot-dicepp 无隶属关系,为独立命名的衍生/移植作品。
@@ -0,0 +1,151 @@
1
+ # 屠龙骰(DNDDicer / nonebot-plugin-dnddicer)
2
+
3
+ > 专精 **DND5e / DND5r** 跑团的 [NoneBot2](https://nonebot.dev/) 骰娘插件(OneBot V11 适配器),致力于做功能最全面、体验最好的 DND 骰娘。
4
+ >
5
+ > 当前版本:**v0.2.2** · 完整使用手册见 **📖 [使用文档](https://h-elden.github.io/nonebot-plugin-dnddicer/)**
6
+
7
+ ## ✨ 简介
8
+
9
+ DNDDicer 的目标是填补「NoneBot 商店中缺少 **DND5e/5r 专业 + 现代维护 + 插件形态** 骰娘」的空位:围绕 DND 跑团全流程持续做深做全,致力于提供功能最全面、体验最好的 DND 骰娘,零配置可加载,供任何已有机器人从商店安装即用。
10
+
11
+ - **掷骰引擎**:内置 AST 表达式引擎(Lark 文法),支持 `2d20kh1`、优势/劣势、爆炸骰、连掷、暗骰等完整掷骰语法;
12
+ - **跑团全流程**:掷骰 → `.dnd` 属性生成 → 角色卡与检定/豁免/攻击点命令 → HP 管理(伤害掷骰、抗性/易伤、AOE 多目标结算、长休)→ 先攻列表与战斗轮;
13
+ - **规则范围**:仅 DND5e/5r——专精 DND 定位,不做 COC/D100 体系与 `.mode` 模式切换;
14
+ - **商店合规**:零配置可加载、本地存储走 `nonebot-plugin-localstore`、元数据完整、全程异步。
15
+
16
+ ## 📖 使用文档
17
+
18
+ 详细用法、输入/输出示例与常见问题见使用文档(手册式分章,含跑团示例;**在线版**:<https://h-elden.github.io/nonebot-plugin-dnddicer/>,源文件在仓库 `docs/`):
19
+
20
+ - 开始:[快速开始](./docs/guide/quickstart.md) · [示例团与人物](./docs/guide/cast.md)
21
+ - 第一章 · 基础操作:[掷骰基础](./docs/guide/roll-basics.md) · [掷骰进阶](./docs/guide/roll-advanced.md) · [先攻列表](./docs/guide/initiative.md)
22
+ - 第二章 · 进阶操作:[角色卡与属性](./docs/guide/character-card.md) · [检定与豁免](./docs/guide/checks.md) · [HP 与长休](./docs/guide/hp-rest.md) · [战斗轮](./docs/guide/battle.md)
23
+ - 第三章 · DM 操作:[DM 实战指南](./docs/guide/dm-guide.md)
24
+ - 参考 · [命令总览](./docs/guide/overview.md) · [群管理与 FAQ](./docs/guide/faq.md)
25
+
26
+ ## 📦 安装
27
+
28
+ 通过 NB-CLI(推荐,与商店安装方式一致):
29
+
30
+ ```bash
31
+ nb plugin install nonebot-plugin-dnddicer
32
+ ```
33
+
34
+ 或通过包管理器安装后,在 `pyproject.toml` 的 `[tool.nonebot]` 中声明加载:
35
+
36
+ ```bash
37
+ pip install nonebot-plugin-dnddicer
38
+ ```
39
+
40
+ ```toml
41
+ [tool.nonebot]
42
+ plugins = ["nonebot_plugin_dnddicer"]
43
+ ```
44
+
45
+ > 依赖:Python ≥ 3.11,NoneBot2 ≥ 2.4.0,OneBot V11 适配器(`nb plugin install` 会自动安装依赖)。
46
+
47
+ ## ⚙️ 配置
48
+
49
+ 插件**零配置即可加载运行**,以下配置项全部可选(在 `.env` / 环境变量中设置):
50
+
51
+ | 配置项 | 类型 | 默认值 | 说明 |
52
+ | --- | --- | --- | --- |
53
+ | `dnddicer_command_priority` | `int` | `10` | 命令事件响应器基础优先级(越小越优先),与其他插件冲突时按需调整 |
54
+ | `dnddicer_default_face` | `int` | `20` | 全局默认骰面(DND 惯例 D20;已配置 `.dset` 的群以群配置为准,此项作兜底) |
55
+ | `dnddicer_enabled` | `bool` | `true` | 功能总开关,`false` 时只加载骨架、不注册命令 |
56
+ | `dnddicer_use_host_command_starts` | `bool` | `false` | 是否兼容宿主 `COMMAND_START` 起始符(NoneBot 默认 `/`,开启后 `/.help` 等亦可触发)。默认只匹配 `.` / `。`,避免 `/help`、`/bot` 等常见单词命令与其他插件同时命中(冲突) |
57
+
58
+ ## 🎲 用法
59
+
60
+ > 命令以 `.`(或全角 `。`)开头;命令起始符默认仅 `.` / `。`,如需用宿主斜杠 `/` 等起始符触发(如 `/.help`),请设置配置项 `dnddicer_use_host_command_starts=true`。**群聊服务默认关闭(白名单)**:需群主/管理员发送 `.bot on` 开启本群服务;`.bot off` 关闭后本群不再响应命令(`.bot` 本身不受影响)。群聊中使用 `.bot` 需先 @ 本机器人;私聊不受服务开关限制,但可用命令更少——角色卡、检定、HP、先攻等仅限群聊(差异见[快速开始](./docs/guide/quickstart.md))。
61
+ >
62
+ > **DM 代操作(@ 提及目标)**:多数带目标的命令支持用 **@群成员** 指定目标——直连该成员在本群的角色卡,不受同名 NPC/改名影响,且可与名称混写(`.hp @玩家 -4d6`、`.hp @玩家;地精 -d4`、`.ri+3 @玩家`、`.init del @玩家`、`.回合 @玩家`、`.角色卡 @玩家`、`.力量豁免 @玩家`、`.先攻检定 @玩家` 等)。详见 [命令总览 - @ 提及目标](./docs/guide/overview.md#-提及目标dm-代操作)。
63
+
64
+ ### 🎲 掷骰(群聊 / 私聊)
65
+
66
+ | 命令 | 说明 |
67
+ | --- | --- |
68
+ | `.r [N#][hs][表达式] [原因]` | 掷骰表达式(`#` 连掷 1~10、`h` 暗骰、`s` 只显数值;仅 D20 有大成功/大失败播报) |
69
+ | `.rh [表达式] [原因]` | 暗骰(群内提示、结果私聊) |
70
+
71
+ ### 📋 角色卡与检定(群聊)
72
+
73
+ | 命令 | 说明 |
74
+ | --- | --- |
75
+ | `.角色卡模板` / `.角色卡记录 <模板>` | 查看示例卡 / 记录或覆盖角色卡(`$…$` 分段模板) |
76
+ | `.角色卡` / `.角色卡清除` / `.状态` | 查看 / 删除角色卡 / 查看 HP 与生命骰摘要 |
77
+ | `.角色卡 @玩家` / `.角色卡 角色名` | 查看**他人**整卡(任何人可查看;记录/清除仅限本人) |
78
+ | `.状态 @玩家` | 查看他人的 HP 与生命骰摘要 |
79
+ | `.力量检定` / `.察觉检定+1` 等 | 属性/技能/先攻检定点命令,自动代入调整值/熟练/加值(`2#` 连掷、`+d4` 等可追加;表达式右侧可加 `@玩家` 代掷) |
80
+ | `.体质豁免` / `.敏捷攻击优势` 等 | 豁免/攻击点命令(原名直配,优势/劣势后缀;同样支持尾部 `@玩家`) |
81
+ | `.先攻检定` / `.先攻检定 @玩家` | 掷先攻并自动写入本群先攻列表(@ 形式代不在场的玩家掷) |
82
+
83
+ ### 🎯 属性生成(群聊 / 私聊)
84
+
85
+ | 命令 | 说明 |
86
+ | --- | --- |
87
+ | `.dnd [次数] [原因]` | 4D6K3 掷点生成六项属性(附合计与降序,自行分配给六属性) |
88
+ | `.dndx [次数] [原因]` | 4D6K3 掷点并绑定属性名(不排序,掷出即定、可直接抄入角色卡) |
89
+
90
+ ### ❤️ HP 与长休(群聊)
91
+
92
+ | 命令 | 说明 |
93
+ | --- | --- |
94
+ | `.hp [对象] 20/30 (5)` | 设置自己/队友/NPC HP(含临时 HP;先 `.ri 名称` 入先攻表后即可记录 NPC 血量) |
95
+ | `.hp [对象] -2d6+3` 等 | 伤害/治疗(支持掷骰表达式;目标后加 `抗性`/`易伤` 后缀可减半/加倍,分号分隔多目标同发结算) |
96
+ | `.hp @玩家 …` / `.hp @玩家` | 对 @ 的玩家角色卡结算 / 查看(`.hp @玩家 -4d6`、`.hp @玩家;地精 -d4` 与名称混写;需该玩家已建卡) |
97
+ | `.hp` / `.hp list` | 查看自己 / 本群列表(PC + NPC) |
98
+ | `.hp del 名称` / `.hp clr` | 删除单个 / 清空全部 NPC 血量记录(玩家角色卡请用 `.角色卡清除`,玩家先攻条目用 `.init del`) |
99
+ | `.npc 持久/临时 名称` | NPC 血量跨战斗保持 / 恢复默认(同名 NPC 新入先攻表默认自动回满并提示) |
100
+ | `.长休` / `.长休 @玩家` | 长休结算(回满 HP、清临时 HP、回复一半生命骰);@ 形式代不在场的玩家收尾 |
101
+
102
+ ### ⚔️ 先攻与战斗轮(群聊)
103
+
104
+ | 命令 | 说明 |
105
+ | --- | --- |
106
+ | `.ri[修正] [名称/…]` | 掷先攻入表(`.ri20 地精` 固定值、`3#` 批量、`.先攻` 别名) |
107
+ | `.ri+3 @玩家` | 代不在场的玩家掷先攻:条目名取角色卡名并与该玩家绑定(重掷替换、回合提醒与 `.hp` 解析同步生效) |
108
+ | `.init` | 查看先攻列表(`del`/`clr`/`first`/`swap` 子指令) |
109
+ | `.init del/first/swap @玩家` | 子指令按玩家归属定位条目(角色卡改名后仍有效;未入表会给出提示) |
110
+ | `.br` | 新建战斗轮(清空先攻表) |
111
+ | `.回合` / `.轮次` | 查看/跳转当前回合与轮次(`.回合+2` 连续推进,轮到玩家自动 @ 提醒) |
112
+ | `.回合 @玩家` | 跳转到该玩家的条目(不受改名/同名歧义影响) |
113
+ | `.ed` | 结束当前回合并自动推进(`.结束` 别名) |
114
+
115
+ ### ⚙️ 群管理(群聊)
116
+
117
+ | 命令 | 说明 |
118
+ | --- | --- |
119
+ | `.dset [表达式]` | 设置/查看群默认骰面(群主/管理员) |
120
+ | `.bot [on/off]` | 插件信息查询 / 本群服务开关(群主/管理员,需 @) |
121
+ | `.帮助` / `.help [命令]` | 命令总览 / 指定命令详细用法(如 `.help r`) |
122
+
123
+ > 一期范围外功能会**显式提示而非静默**:`.r exp` 期望值采样、`.r a/n` 特殊判定;牌堆/随机表与规则查询(T2)、法术位/死亡豁免/BUFF 表(T3 候选)见下方路线。
124
+
125
+ ## 📄 版本与路线
126
+
127
+ 1. ✅ **v0.1.0**(第一期 = T0 + T1 + 战斗轮简化版 + `.bot` 服务开关):掷骰引擎移植、`.r/.rh`、帮助、群配置(`.dset`)、角色卡与检定/豁免/攻击、`.dnd` 属性生成、HP 管理与长休(含抗性/易伤与 AOE 伤害掷骰)、先攻列表、战斗轮——全部落地,全量测试通过;
128
+ 2. ✅ **v0.2.0**:HP 抗性/易伤与 AOE 掷骰完善、`.dnd 原因` 兼容修复、**NPC/怪物血量**(三层目标搜索、先攻列表与 `.hp list` 联动、`.ri` 入表自动回满、`.npc 持久/临时` 跨战斗保持)、`.dndx` 属性名绑定掷点;
129
+ 3. ✅ **v0.2.1**:**@ 提及目标**(DM 可代玩家操作 `.hp`/`.npc`/`.ri`/`.回合` 等、查看角色卡)、玩家名称显示统一回退链、`.hp del/clr` 语义修订(仅作用 NPC 血量)、优势/劣势别名粘连等真机反馈修复;
130
+ 4. ✅ **v0.2.2**:掷骰说明文字按四则运算还原(常量复合子表达式与一元负号)、私聊下的群聊限定命令不再静默与 `.bot` 私聊文案修正;**使用文档站上线**(手册式 15 页,随发版自动部署);
131
+ 5. ⏳ **第二期 T2**:牌堆/随机表、规则查询;
132
+ 6. ⏳(可选)**T3 增强期**:法术位管理(`.ss/.cast`)、死亡豁免闭环(`.ds`)、BUFF/临时加值表(`.buff`)等。
133
+
134
+ 每版完整变更(新增 / 变更 / 修复 / 文档)见 [CHANGELOG.md](./CHANGELOG.md)。
135
+
136
+ ## 📦 本地开发
137
+
138
+ ```bash
139
+ # uv 方式(推荐;或使用 pip 安装 .[dev])
140
+ uv sync --group dev
141
+ uv run pytest
142
+ ```
143
+
144
+ 测试基于 [nonebug](https://github.com/nonebot/nonebug) 做 NoneBot 加载冒烟与全命令行为回归(与 NoneFlow 商店自动加载检查同思路)。
145
+
146
+ ## 🤝 许可与致谢
147
+
148
+ - 本项目(业务层与工程骨架)以 **MIT License** 发布,见 [LICENSE](./LICENSE)。
149
+ - **掷骰引擎移植自 [nonebot-dicepp](https://github.com/pear-studio/nonebot-dicepp)**(Copyright (c) 2022 pear-studio,MIT License):引擎文件头保留上游版权声明,MIT 许可全文见 [LICENSE](./LICENSE)。
150
+ - 规则查询类资料内容**不随插件分发**(版权归原权利方/译者),需要时由使用者自行提供。
151
+ - 本项目与 nonebot-dicepp 无隶属关系,为独立命名的衍生/移植作品。