LovecaSim / compiler /tests /reproduce_sd1_006.py
trioskosmos's picture
Upload folder using huggingface_hub
2113a6a verified
from compiler.parser_v2 import AbilityParserV2
from engine.models.ability import EffectType
def test_sd1_006():
parser = AbilityParserV2()
text = "{{toujyou.png|็™ปๅ ด}}ๆ‰‹ๆœญใฎใƒฉใ‚คใƒ–ใ‚ซใƒผใƒ‰ใ‚’1ๆžšๅ…ฌ้–‹ใ—ใฆใ‚‚ใ‚ˆใ„๏ผš่‡ชๅˆ†ใฎๆˆๅŠŸใƒฉใ‚คใƒ–ใ‚ซใƒผใƒ‰็ฝฎใๅ ดใซใ‚ใ‚‹ใ‚ซใƒผใƒ‰ใ‚’1ๆžšๆ‰‹ๆœญใซๅŠ ใˆใ‚‹ใ€‚ใใ†ใ—ใŸๅ ดๅˆใ€ใ“ใ‚Œใซใ‚ˆใ‚Šๅ…ฌ้–‹ใ—ใŸใ‚ซใƒผใƒ‰ใ‚’่‡ชๅˆ†ใฎๆˆๅŠŸใƒฉใ‚คใƒ–ใ‚ซใƒผใƒ‰็ฝฎใๅ ดใซ็ฝฎใใ€‚"
print(f"Parsing: {text}")
print("-" * 50)
parsed = parser.parse(text)
print("\nParsed Effects:")
for ability in parsed:
for effect in ability.effects:
print(f"Effect: {effect.effect_type}")
print(f"Params: {effect.params}")
print("-" * 30)
# Check if RECOVER_LIVE is present
has_recover = any(e.effect_type == EffectType.RECOVER_LIVE for ab in parsed for e in ab.effects)
if has_recover:
print("\nSUCCESS: RECOVER_LIVE found.")
else:
print("\nFAILURE: RECOVER_LIVE not found.")
if __name__ == "__main__":
test_sd1_006()