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

SKY's Kingshot
편집 요약 없음
편집 요약 없음
 
30번째 줄: 30번째 줄:
     <div class="form-group hero-display">
     <div class="form-group hero-display">
       <label for="hero1Select">🛡️ 현재 사용 중인 영웅:</label>
       <label for="hero1Select">🛡️ 현재 사용 중인 영웅:</label>
       <select id="hero1Select" onchange="updateHero1Selection()"></select>
       <select id="hero1Select"></select>
       <img id="hero1Image" src="" alt="Your Hero" class="hero-image">
       <img id="hero1Image" src="" alt="Your Hero" class="hero-image">
     </div>
     </div>
36번째 줄: 36번째 줄:
     <div class="form-group hero-display">
     <div class="form-group hero-display">
       <label for="hero2Select">⚔️ 교체 후보 영웅:</label>
       <label for="hero2Select">⚔️ 교체 후보 영웅:</label>
       <select id="hero2Select" onchange="updateHeroImage('hero2')"></select>
       <select id="hero2Select"></select>
       <img id="hero2Image" src="" alt="Compare Hero" class="hero-image">
       <img id="hero2Image" src="" alt="Compare Hero" class="hero-image">
     </div>
     </div>
   </div>
   </div>


   <button class="calc-btn" onclick="compareHeroes()">영웅 교체 효율 분석하기</button>
   <button id="runCalcBtn" class="calc-btn">영웅 교체 효율 분석하기</button>
   <p id="message">위 스탯은 영웅의 기본 스탯을 기준으로 하며, 위젯이나 전용 장비 수치는 포함되지 않습니다.</p>
   <p id="message">위 스탯은 영웅의 기본 스탯을 기준으로 하며, 위젯이나 전용 장비 수치는 포함되지 않습니다.</p>
   <div id="results"></div>
   <div id="results"></div>
</div>
</div>
<script>
// 1. 추출하신 레벨(티어) 데이터
const levelNames = [
    "0-Star (T0)", "0-Star (T1)", "0-Star (T2)", "0-Star (T3)", "0-Star (T4)", "0-Star (T5)",
    "1-Star (T0)", "1-Star (T1)", "1-Star (T2)", "1-Star (T3)", "1-Star (T4)", "1-Star (T5)",
    "2-Star (T0)", "2-Star (T1)", "2-Star (T2)", "2-Star (T3)", "2-Star (T4)", "2-Star (T5)",
    "3-Star (T0)", "3-Star (T1)", "3-Star (T2)", "3-Star (T3)", "3-Star (T4)", "3-Star (T5)",
    "4-Star (T0)", "4-Star (T1)", "4-Star (T2)", "4-Star (T3)", "4-Star (T4)", "4-Star (T5)",
    "Max"
];
// 2. 추출하신 킹샷 전체 영웅 데이터
const heroes = [
    {
        "name": "Olive",
        "type": "Archer",
        "stats": [11.36, 12.42, 13.47, 14.53, 15.59, 16.65, 18.55, 20.03, 21.51, 22.99, 24.47, 25.95, 28.62, 30.69, 32.76, 34.83, 36.9, 38.98, 42.71, 45.61, 48.51, 51.41, 54.31, 57.22, 62.44, 66.5, 70.56, 74.63, 78.69, 82.75, 90.07],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2025/07/olive-avatar.webp"
    },
    {
        "name": "Forrest",
        "type": "Infantry",
        "stats": [11.36, 12.42, 13.47, 14.53, 15.59, 16.65, 18.55, 20.03, 21.51, 22.99, 24.47, 25.95, 28.62, 30.69, 32.76, 34.83, 36.9, 38.98, 42.71, 45.61, 48.51, 51.41, 54.31, 57.22, 62.44, 66.5, 70.56, 74.63, 78.69, 82.75, 90.07],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2025/07/forrest-avatar.webp"
    },
    {
        "name": "Edwin",
        "type": "Cavalry",
        "stats": [11.36, 12.42, 13.47, 14.53, 15.59, 16.65, 18.55, 20.03, 21.51, 22.99, 24.47, 25.95, 28.62, 30.69, 32.76, 34.83, 36.9, 38.98, 42.71, 45.61, 48.51, 51.41, 54.31, 57.22, 62.44, 66.5, 70.56, 74.63, 78.69, 82.75, 90.07],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2025/07/edwin-avatar.webp"
    },
    {
        "name": "Seth",
        "type": "Infantry",
        "stats": [11.36, 12.42, 13.47, 14.53, 15.59, 16.65, 18.55, 20.03, 21.51, 22.99, 24.47, 25.95, 28.62, 30.69, 32.76, 34.83, 36.9, 38.98, 42.71, 45.61, 48.51, 51.41, 54.31, 57.22, 62.44, 66.5, 70.56, 74.63, 78.69, 82.75, 90.07],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2025/07/seth-avatar.webp"
    },
    {
        "name": "Diana",
        "type": "Archer",
        "stats": [13.88, 15.18, 16.47, 17.76, 19.05, 20.35, 22.67, 24.48, 26.29, 28.1, 29.91, 31.72, 34.98, 37.51, 40.04, 42.58, 45.11, 47.64, 52.5, 55.75, 59.29, 62.84, 66.39, 69.93, 76.32, 81.28, 86.25, 91.21, 96.18, 101.15, 110.08],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2025/07/diana-avatar-icon.webp"
    },
    {
        "name": "Quinn",
        "type": "Archer",
        "stats": [17.76, 19.32, 20.96, 22.61, 24.25, 25.9, 28.86, 31.16, 33.46, 35.77, 38.07, 40.37, 44.52, 47.74, 50.96, 54.19, 57.41, 60.64, 66.44, 70.95, 75.46, 79.98, 84.49, 89.01, 97.13, 103.45, 109.77, 116.09, 122.41, 128.73, 140.11],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2025/07/quinn-avatar.webp"
    },
    {
        "name": "Chenko",
        "type": "Cavalry",
        "stats": [17.76, 19.32, 20.96, 22.61, 24.25, 25.9, 28.86, 31.16, 33.46, 35.77, 38.07, 40.37, 44.52, 47.74, 50.96, 54.19, 57.41, 60.64, 66.44, 70.95, 75.46, 79.98, 84.49, 89.01, 97.13, 103.45, 109.77, 116.09, 122.41, 128.73, 140.11],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2025/07/chenko-avatar.webp"
    },
    {
        "name": "Howard",
        "type": "Infantry",
        "stats": [17.76, 19.32, 20.96, 22.61, 24.25, 25.9, 28.86, 31.16, 33.46, 35.77, 38.07, 40.37, 44.52, 47.74, 50.96, 54.19, 57.41, 60.64, 66.44, 70.95, 75.46, 79.98, 84.49, 89.01, 97.13, 103.45, 109.77, 116.09, 122.41, 128.73, 140.11],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2025/07/howard-avatar.webp"
    },
    {
        "name": "Gordon",
        "type": "Cavalry",
        "stats": [17.76, 19.32, 20.96, 22.61, 24.25, 25.9, 28.86, 31.16, 33.46, 35.77, 38.07, 40.37, 44.52, 47.74, 50.96, 54.19, 57.41, 60.64, 66.44, 70.95, 75.46, 79.98, 84.49, 89.01, 97.13, 103.45, 109.77, 116.09, 122.41, 128.73, 140.11],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2025/07/gordon-avatar.webp"
    },
    {
        "name": "Fahd",
        "type": "Cavalry",
        "stats": [17.76, 19.32, 20.96, 22.61, 24.25, 25.9, 28.86, 31.16, 33.46, 35.77, 38.07, 40.37, 44.52, 47.74, 50.96, 54.19, 57.41, 60.64, 66.44, 70.95, 75.46, 79.98, 84.49, 89.01, 97.13, 103.45, 109.77, 116.09, 122.41, 128.73, 140.11],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2025/07/fahd-avatar.webp"
    },
    {
        "name": "Amane",
        "type": "Archer",
        "stats": [17.76, 19.32, 20.96, 22.61, 24.25, 25.9, 28.86, 31.16, 33.46, 35.77, 38.07, 40.37, 44.52, 47.74, 50.96, 54.19, 57.41, 60.64, 66.44, 70.95, 75.46, 79.98, 84.49, 89.01, 97.13, 103.45, 109.77, 116.09, 122.41, 128.73, 140.11],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2025/07/amane-avatar.webp"
    },
    {
        "name": "Yeonwoo",
        "type": "Archer",
        "stats": [17.76, 19.32, 20.96, 22.61, 24.25, 25.9, 28.86, 31.16, 33.46, 35.77, 38.07, 40.37, 44.52, 47.74, 50.96, 54.19, 57.41, 60.64, 66.44, 70.95, 75.46, 79.98, 84.49, 89.01, 97.13, 103.45, 109.77, 116.09, 122.41, 128.73, 140.11],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2025/07/yeonwoo-avatar.webp"
    },
    {
        "name": "Jabel",
        "type": "Cavalry",
        "stats": [25.25, 27.6, 29.95, 32.3, 34.65, 37, 41.23, 44.52, 47.81, 51.1, 54.39, 57.68, 63.6, 68.2, 72.81, 77.42, 82.02, 86.63, 94.92, 101.37, 107.81, 114.26, 120.71, 127.16, 138.77, 147.79, 156.82, 165.85, 174.88, 183.91, 200.16],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2025/07/jabel.webp"
    },
    {
        "name": "Saul",
        "type": "Archer",
        "stats": [25.25, 27.6, 29.95, 32.3, 34.65, 37, 41.23, 44.52, 47.81, 51.1, 54.39, 57.68, 63.6, 68.2, 72.81, 77.42, 82.02, 86.63, 94.92, 101.37, 107.81, 114.26, 120.71, 127.16, 138.77, 147.79, 156.82, 165.85, 174.88, 183.91, 200.16],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2025/07/saul-kingshot.webp"
    },
    {
        "name": "Helga",
        "type": "Infantry",
        "stats": [25.25, 27.6, 29.95, 32.3, 34.65, 37, 41.23, 44.52, 47.81, 51.1, 54.39, 57.68, 63.6, 68.2, 72.81, 77.42, 82.02, 86.63, 94.92, 101.37, 107.81, 114.26, 120.71, 127.16, 138.77, 147.79, 156.82, 165.85, 174.88, 183.91, 200.16],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2025/07/helga-kingshot.webp"
    },
    {
        "name": "Amadeus",
        "type": "Infantry",
        "stats": [32.82, 35.88, 38.93, 41.99, 45.04, 48.1, 53.59, 57.87, 62.15, 66.43, 70.7, 74.98, 82.68, 88.66, 94.65, 100.64, 106.62, 112.61, 123.39, 131.78, 140.15, 148.53, 156.92, 165.3, 180.4, 192.12, 203.86, 215.6, 227.34, 239.08, 260.2],
        "image": "https://kingshotcalculator.com/wp-content/uploads/2025/07/amadeus.webp"
    },
    {
        "name": "Zoe",
        "type": "Infantry",
        "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/zoe-gen2-kingshot.webp"
    },
    {
        "name": "Hilde",
        "type": "Cavalry",
        "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>`;
    }
}
// 미디어위키 환경에 맞춰 데이터를 즉시 강제 로딩합니다.
setTimeout(function() {
    populateDropdowns();
}, 200);
</script>
</html>
</html>

2026년 5월 16일 (토) 23:28 기준 최신판

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

Your Hero
Compare Hero

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