#!/usr/bin/env python3
"""
GA_Skill Blueprint 찾기
"""

import json
import sys
from pathlib import Path

def main():
    if len(sys.argv) < 2:
        print("사용법: python find_ga_skills.py <Blueprint.json 경로>")
        sys.exit(1)

    json_path = Path(sys.argv[1])

    print(f"로딩 중: {json_path}")
    with open(json_path, 'r', encoding='utf-8') as f:
        data = json.load(f)

    assets = data.get('Assets', [])
    print(f"총 Blueprint Assets: {len(assets)}")

    # GA_Skill 찾기 (대소문자 무시)
    ga_skills = [a for a in assets if 'ga_skill' in a.get('AssetName', '').lower()]
    print(f"GA_Skill Assets: {len(ga_skills)}")

    # 스토커별 분류
    stalkers = ['Hilda', 'Urud', 'Nave', 'Baran', 'Rio', 'Clad', 'Rene', 'Sinobu', 'Lian', 'Cazimord']

    for stalker in stalkers:
        stalker_gas = [a for a in ga_skills if stalker.lower() in a.get('AssetName', '').lower()]
        if stalker_gas:
            print(f"\n{stalker} GA_Skills: {len(stalker_gas)}개")
            for ga in stalker_gas[:10]:  # 최대 10개만 표시
                asset_name = ga.get('AssetName', 'UNKNOWN')
                print(f"  - {asset_name}")
            if len(stalker_gas) > 10:
                print(f"  ... 외 {len(stalker_gas) - 10}개 더")

if __name__ == "__main__":
    main()
