영웅 통계 비교 계산기: 두 판 사이의 차이

SKY's Kingshot
편집 요약 없음
편집 요약 없음
164번째 줄: 164번째 줄:
         "name": "Hilde",
         "name": "Hilde",
         "type": "Cavalry",
         "type": "Cavalry",
         "stats": [30.3, 33.12, 35.94, 38
         "stats": [30.3, 33.12, 35.94, 38.76, 41.58, 44.4, 49.47, 53.42, 57.37, 61.32, 65.26, 69.21, 76.32, 81.84, 87.37, 92.9, 98.42, 103.95, 113.9, 121.64, 129.37, 137.11, 144.85, 152.59, 166.52, 177.34, 188.18, 192.02, 209.85, 220.69, 240.1],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2025/07/hilde-kingshot.webp"
    },
    {
        "name": "Marlin",
        "type": "Archer",
        "stats": [30.3, 33.12, 35.94, 38.76, 41.58, 44.4, 49.47, 53.42, 57.37, 61.32, 65.26, 69.21, 76.32, 81.84, 87.37, 92.9, 98.42, 103.95, 113.9, 121.64, 129.37, 137.11, 144.85, 152.59, 166.52, 177.34, 188.18, 192.02, 209.85, 220.69, 240.1],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2025/07/marlin-kingshot.webp"
    },
    {
        "name": "Eric",
        "type": "Infantry",
        "stats": [36.61, 40.02, 43.42, 46.83, 50.24, 53.65, 59.78, 64.55, 69.32, 74.09, 78.86, 83.63, 92.22, 98.89, 105.57, 112.25, 118.92, 125.61, 137.63, 146.98, 156.32, 165.67, 175.02, 184.38, 201.21, 214.29, 227.38, 240.48, 253.57, 266.66, 290.23],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2025/07/eric-avatar-icon.webp"
    },
    {
        "name": "Jaeger",
        "type": "Archer",
        "stats": [36.61, 40.02, 43.42, 46.83, 50.24, 53.65, 59.78, 64.55, 69.32, 74.09, 78.86, 83.63, 92.22, 98.89, 105.57, 112.25, 118.92, 125.61, 137.63, 146.98, 156.32, 165.67, 175.02, 184.38, 201.21, 214.29, 227.38, 240.48, 253.57, 266.66, 290.23],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2025/07/jaeger-icon-kingshot.webp"
    },
    {
        "name": "Petra",
        "type": "Cavalry",
        "stats": [36.61, 40.02, 43.42, 46.83, 50.24, 53.65, 59.78, 64.55, 69.32, 74.09, 78.86, 83.63, 92.22, 98.89, 105.57, 112.25, 118.92, 125.61, 137.63, 146.98, 156.32, 165.67, 175.02, 184.38, 201.21, 214.29, 227.38, 240.48, 253.57, 266.66, 290.23],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2025/07/petra-avatar-icon.webp"
    },
    {
        "name": "Alcar",
        "type": "Infantry",
        "stats": [46.71, 51.06, 55.4, 59.75, 64.1, 68.45, 76.27, 82.36, 88.44, 94.53, 100.62, 106.7, 117.66, 126.17, 134.69, 143.22, 151.73, 160.26, 175.6, 187.53, 199.44, 211.38, 223.31, 235.24, 256.72, 273.41, 290.11, 306.82, 323.52, 340.23, 370.29],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2025/09/alcar-avatar-image.webp"
    },
    {
        "name": "Rosa",
        "type": "Archer",
        "stats": [46.71, 51.06, 55.4, 59.75, 64.1, 68.45, 76.27, 82.36, 88.44, 94.53, 100.62, 106.7, 117.66, 126.17, 134.69, 143.22, 151.73, 160.26, 175.6, 187.53, 199.44, 211.38, 223.31, 235.24, 256.72, 273.41, 290.11, 306.82, 323.52, 340.23, 370.29],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2025/09/rosa-avatar-image.webp"
    },
    {
        "name": "Margot",
        "type": "Cavalry",
        "stats": [46.71, 51.06, 55.4, 59.75, 64.1, 68.45, 76.27, 82.36, 88.44, 94.53, 100.62, 106.7, 117.66, 126.17, 134.69, 143.22, 151.73, 160.26, 175.6, 187.53, 199.44, 211.38, 223.31, 235.24, 256.72, 273.41, 290.11, 306.82, 323.52, 340.23, 370.29],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2025/09/margot-avatar.webp"
    },
    {
        "name": "Long Fei",
        "type": "Infantry",
        "stats": [56.05, 61.27, 66.48, 71.7, 76.92, 82.14, 91.53, 98.83, 106.13, 113.44, 120.74, 128.04, 141.19, 151.4, 161.63, 171.87, 182.08, 192.31, 210.72, 225.04, 239.33, 253.65, 267.97, 282.29, 308.06, 328.09, 348.14, 368.18, 388.23, 408.28, 444.35],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2025/12/long-fei-avatar-icon.webp"
    },
    {
        "name": "Vivian",
        "type": "Archer",
        "stats": [56.05, 61.27, 66.48, 71.7, 76.92, 82.14, 91.53, 98.83, 106.13, 113.44, 120.74, 128.04, 141.19, 151.4, 161.63, 171.87, 182.08, 192.31, 210.72, 225.04, 239.33, 253.65, 267.97, 282.29, 308.06, 328.09, 348.14, 368.18, 388.23, 408.28, 444.35],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2025/12/vivian-avatar-icon.webp"
    },
    {
        "name": "Thrud",
        "type": "Cavalry",
        "stats": [56.05, 61.27, 66.48, 71.7, 76.92, 82.14, 91.53, 98.83, 106.13, 113.44, 120.74, 128.04, 141.19, 151.4, 161.63, 171.87, 182.08, 192.31, 210.72, 225.04, 239.33, 253.65, 267.97, 282.29, 308.06, 328.09, 348.14, 368.18, 388.23, 408.28, 444.35],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2025/12/thrud-avatar-icon.webp"
    },
    {
        "name": "Triton",
        "type": "Infantry",
        "stats": [68.17, 74.52, 80.86, 87.21, 93.55, 99.9, 111.32, 120.2, 129.08, 137.97, 146.85, 155.73, 171.72, 184.14, 196.58, 209.03, 221.45, 233.9, 256.28, 273.69, 291.08, 308.5, 325.91, 343.33, 374.67, 399.03, 423.41, 447.79, 472.17, 496.55, 540.43],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2026/03/triton-avatar-icon.webp"
    },
    {
        "name": "Yang",
        "type": "Archer",
        "stats": [68.17, 74.52, 80.86, 87.21, 93.55, 99.9, 111.32, 120.2, 129.08, 137.97, 146.85, 155.73, 171.72, 184.14, 196.58, 209.03, 221.45, 233.9, 256.28, 273.69, 291.08, 308.5, 325.91, 343.33, 374.67, 399.03, 423.41, 447.79, 472.17, 496.55, 540.43],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2026/03/yang-avatar-icon.webp"
    },
    {
        "name": "Sophia",
        "type": "Cavalry",
        "stats": [68.17, 74.52, 80.86, 87.21, 93.55, 99.9, 111.32, 120.2, 129.08, 137.97, 146.85, 155.73, 171.72, 184.14, 196.58, 209.03, 221.45, 233.9, 256.28, 273.69, 291.08, 308.5, 325.91, 343.33, 374.67, 399.03, 423.41, 447.79, 472.17, 496.55, 540.43],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2026/03/sophia-avatar-icon.webp"
    }
];
 
// 3. 드롭다운 메뉴 초기화 세팅
function populateDropdowns() {
    const levelSelect = document.getElementById('levelSelect');
    const hero1Select = document.getElementById('hero1Select');
   
    // 레벨 추가
    levelNames.forEach((name, index) => {
        levelSelect.innerHTML += `<option value="${index}">${name}</option>`;
    });
    // 기본으로 Max(30번째 인덱스)나 4-Star (T5) 등을 선택 상태로 설정 가능
    levelSelect.selectedIndex = 30;
 
    // 내 영웅 추가
    heroes.forEach((hero, index) => {
        hero1Select.innerHTML += `<option value="${index}">${hero.name}</option>`;
    });
 
    updateHero1Selection();
}
 
// 4. 내 영웅 선택 시 비교 영웅 목록 업데이트
function updateHero1Selection() {
    const hero1Index = document.getElementById('hero1Select').value;
    const hero2Select = document.getElementById('hero2Select');
    const selectedHero = heroes[hero1Index];
   
    // 내 영웅 이미지 업데이트
    document.getElementById('hero1Image').src = selectedHero.image;
 
    // 비교 영웅 드롭다운 초기화
    hero2Select.innerHTML = '';
   
    // 내 영웅과 같은 타입이면서 배열상 뒤에 있는(세대가 더 높은) 영웅만 필터링
    heroes.forEach((hero, index) => {
        if(hero.type === selectedHero.type && index > hero1Index) {
            hero2Select.innerHTML += `<option value="${index}">${hero.name}</option>`;
        }
    });
 
    if(hero2Select.options.length === 0) {
        hero2Select.innerHTML = `<option value="">상위 영웅 없음</option>`;
        document.getElementById('hero2Image').src = "https://via.placeholder.com/80/333333/ffffff?text=None";
    } else {
        updateHeroImage('hero2');
    }
}
 
// 5. 교체 영웅 이미지 업데이트
function updateHeroImage(type) {
    if(type === 'hero2') {
        const h2Index = document.getElementById('hero2Select').value;
        if(h2Index !== "") {
            document.getElementById('hero2Image').src = heroes[h2Index].image;
        }
    }
}
 
// 6. 비교 로직
function compareHeroes() {
    const levelIdx = document.getElementById('levelSelect').value;
    const h1Idx = document.getElementById('hero1Select').value;
    const h2Idx = document.getElementById('hero2Select').value;
    const resBox = document.getElementById('results');
 
    if(h2Idx === "") {
        resBox.style.display = "block";
        resBox.style.color = "#ff4444";
        resBox.style.borderColor = "#ff4444";
        resBox.innerHTML = "❌ 비교할 상위 세대 영웅이 없습니다.";
        return;
    }
 
    const stat1 = heroes[h1Idx].stats[levelIdx];
    const stat2 = heroes[h2Idx].stats[levelIdx];
 
    resBox.style.display = "block";
 
    if(stat2 > stat1) {
        const diff = Math.round((stat2 / stat1 - 1) * 100);
        resBox.style.color = "#00ff00";
        resBox.style.borderColor = "#00ff00";
        resBox.innerHTML = `✅ 교체를 강력히 추천합니다! <br> (효율 ${diff}% 상승)<br><span style='font-size:13px; color:#aaa;'>현재 스탯: ${stat1} vs 교체 스탯: ${stat2}</span>`;
    } else {
        resBox.style.color = "#ff4444";
        resBox.style.borderColor = "#ff4444";
        resBox.innerHTML = `❌ 아직 교체할 타이밍이 아닙니다. <br><span style='font-size:13px; color:#aaa;'>현재 스탯: ${stat1} vs 교체 스탯: ${stat2}</span>`;
    }
}
 
window.onload = populateDropdowns;
</script>
</html>

2026년 5월 16일 (토) 23:21 판

⚔️ 킹샷 영웅 스탯 정밀 비교기

Your Hero
Compare Hero

위 스탯은 영웅의 기본 스탯을 기준으로 하며, 위젯이나 전용 장비 수치는 포함되지 않습니다.