aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/examples
diff options
context:
space:
mode:
author简律纯 <i@jyunko.cn>2024-07-06 09:07:19 +0800
committer简律纯 <i@jyunko.cn>2024-07-06 09:07:19 +0800
commit0ed10486f719c23ab7e0e84d2e119a7fa5f70475 (patch)
tree095b77f6220fdf929de0a1de29332b1912aa30e1 /examples
parentc0518c138914b321d0fa2d7b0d1377f78ff85b3c (diff)
downloadHydroRollCore-0ed10486f719c23ab7e0e84d2e119a7fa5f70475.tar.gz
HydroRollCore-0ed10486f719c23ab7e0e84d2e119a7fa5f70475.zip
refactor!: rewrite core business logic
Diffstat (limited to 'examples')
-rw-r--r--examples/COC7/Character.py3
-rw-r--r--examples/COC7/Wiki.py4
-rw-r--r--examples/COC7/__init__.py2
-rw-r--r--examples/_BRP/src/__init__.py (renamed from examples/BRP/src/__init__.py)0
4 files changed, 6 insertions, 3 deletions
diff --git a/examples/COC7/Character.py b/examples/COC7/Character.py
index 37e2a4e..bb30661 100644
--- a/examples/COC7/Character.py
+++ b/examples/COC7/Character.py
@@ -4,9 +4,10 @@ import math
from typing import Union
from dataclasses import dataclass
-from hrc.rule import aliases
+from hrc.rule import Rule
from hrc.rule.BaseRule import CharacterCard
+aliases = Rule.aliases
@dataclass
class Attributes(CharacterCard.Attribute):
diff --git a/examples/COC7/Wiki.py b/examples/COC7/Wiki.py
index e6a730a..b97f717 100644
--- a/examples/COC7/Wiki.py
+++ b/examples/COC7/Wiki.py
@@ -1 +1,3 @@
-# MyRule \ No newline at end of file
+# MyRule
+
+class Wiki(): ... \ No newline at end of file
diff --git a/examples/COC7/__init__.py b/examples/COC7/__init__.py
index baea4c7..25acdaa 100644
--- a/examples/COC7/__init__.py
+++ b/examples/COC7/__init__.py
@@ -15,7 +15,7 @@ class COC7(Rule):
attr: Attributes = Depends() # 必须实现一个继承自 Character.Attribute 的子类
wiki: Wiki = Depends() # 可选实现一个 Wiki 类
- @core.event_post_processor_hook
+ @core.event_postprocessor_hook
async def auto_card(self):
if self.session and self.session.gid and self.ac:
if hasattr(self.pc.trans, "生命") or hasattr(self.pc.trans, "理智"):
diff --git a/examples/BRP/src/__init__.py b/examples/_BRP/src/__init__.py
index e69de29..e69de29 100644
--- a/examples/BRP/src/__init__.py
+++ b/examples/_BRP/src/__init__.py