rabukasim / tools /debug /debug_comp.py
trioskosmos's picture
chore: remove large files for HF Space
9bd4ce5
raw
history blame contribute delete
539 Bytes
from compiler.parser_v2 import AbilityParserV2
parser = AbilityParserV2()
text = "{{toujyou.png|登場}}手札を1枚控え室に置いてもよい:相手のステージにいるコスト4以下のメンバーを2人までウェイトにする。"
abilities = parser.parse(text)
for ab in abilities:
print(f"Trigger: {ab.trigger}")
for eff in ab.effects:
print(f" Effect Type: {eff.effect_type}")
print(f" Target: {eff.target}")
print(f" Value: {eff.value}")
print(f" Params: {eff.params}")