From dcadac73813291a86a4ab3aca44706fc9b8e3b5e Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Wed, 26 Jun 2024 09:20:15 +0800 Subject: chore(docs): add structures.svg and contributing guidance --- tests/test_BRP_pdfquery.py | 2 +- tests/test_BaseRule.py | 28 +++++++++++++++++++++++----- 2 files changed, 24 insertions(+), 6 deletions(-) (limited to 'tests') diff --git a/tests/test_BRP_pdfquery.py b/tests/test_BRP_pdfquery.py index 453e471..bda7bd1 100644 --- a/tests/test_BRP_pdfquery.py +++ b/tests/test_BRP_pdfquery.py @@ -3,4 +3,4 @@ from pdfquery import PDFQuery pdf = PDFQuery("../rule_book/BRP SRD 1.0 CHN.pdf") pdf.load() -print(pdf.get_page(1)) +print([dir(x) for x in dir(pdf.get_page(1))]) diff --git a/tests/test_BaseRule.py b/tests/test_BaseRule.py index f450c28..da5ac93 100644 --- a/tests/test_BaseRule.py +++ b/tests/test_BaseRule.py @@ -57,13 +57,31 @@ __rule_book__ = "BASIC ROLEPLAYING" # ============================================== # MyRule -from hrc.rules.BaseRule import JudgeRule +import hrc +from hrc.rules import BaseRule, Rules +from hrc.rules.BaseRule import CharacterCard, JudgeRule -class JudgeAttr(JudgeRule.Attribute): - """来自判定规则 - 属性判定 - 属性判定规则(模式)""" +class JudgeAttr(JudgeRule.Attribute): + """属性判定规则""" class JudgeCustom(JudgeRule.Custom): - ... + """自定义判定规则""" + + +class ChaAttr(CharacterCard.Attribute): + """人物卡属性列表""" + + +class ChaSkill(CharacterCard.Skill): + """人物卡技能列表""" + + +class ThePool(Rules[JudgeAttr, JudgeCustom]): + """规则包[池]""" + + __config__ = 'ThePool' + + + \ No newline at end of file -- cgit v1.2.3-70-g09d2