Użytkownik:West: Różnice pomiędzy wersjami

Z Altaron Wiki
Nie podano opisu zmian
Nie podano opisu zmian
Linia 80: Linia 80:
      
      
<script>
<script>
  const currentLevelSelect = document.querySelector('#currentLevel');
$(document).ready(function(){
  for (let i = 1; i <= 200; i++) {
const currentLevelSelect = document.querySelector('#currentLevel');
    const option = document.createElement('option');
const targetLevelSelect = document.querySelector('#targetLevel');
    option.value = i;
const professionInput = document.getElementById("profession");
    option.textContent = i;
const abilityInput = document.getElementById("ability")
    currentLevelSelect.appendChild(option);
  }


  const targetLevelSelect = document.querySelector('#targetLevel');
const updateLevels = function() {
const profession = document.getElementById("profession").value;
$(currentLevelSelect).html('');
const ability = document.getElementById("ability").value;
$(targetLevelSelect).html('');
const limit = Altaron.getSkillLimit(profession, ability);
for (let i = 2; i <= limit; i++) {
const limit = Altaron.getSkillLimit(professionInput.value, abilityInput.value);
  const option = document.createElement('option');
  option.value = i;
for (let i = 2; i <= limit; i++) {
  option.textContent = i;
const option = document.createElement('option');
  targetLevelSelect.appendChild(option);
option.value = i;
}
option.textContent = i;
 
targetLevelSelect.appendChild(option);
  function calculatePoints() {
currentLevelSelect.appendChild(option);
        var profession = document.getElementById("profession").value;
}
        var currentLevel = parseInt(document.getElementById("currentLevel").value);
};
        var targetLevel = parseInt(document.getElementById("targetLevel").value);
         var ability = document.getElementById("ability").value;
const clearInputErrors = function() {
document.getElementById("targetLevel").classList.remove("is-invalid");
document.getElementById("targetLevelLabel").classList.remove("text-danger");
};
 
$(profession).change(function(){
updateLevels();
});
$(ability).change(function(){
updateLevels();
});
window.calculatePoints = function() {
        var profession = professionInput.value;
         var ability = abilityInput.value;
        var currentLevel = parseInt(currentLevelSelect.value);
        var targetLevel = parseInt(targetLevelSelect.value);
         var pointsNeeded = 0;
         var pointsNeeded = 0;
         var limit = Altaron.getSkillLimit(profession, ability);
         var limit = Altaron.getSkillLimit(profession, ability);


  if (targetLevel > limit) {
clearInputErrors();
    document.getElementById("pointsNeeded").innerHTML ="Docelowy poziom jest większy niż maksymalny poziom " + limit + ".";
    document.getElementById("targetLevel").classList.add("is-invalid");
    document.getElementById("targetLevelLabel").classList.add("text-danger")
    return;
  }


  else if (targetLevel < currentLevel) {
if (targetLevel > limit) {
    document.getElementById("pointsNeeded").innerHTML ="Docelowy poziom " + targetLevel + " nie może być mniejszy od obecnego " + currentLevel + ".";
document.getElementById("pointsNeeded").innerHTML ="Docelowy poziom jest większy niż maksymalny poziom " + limit + ".";
    document.getElementById("targetLevel").classList.add("is-invalid");
document.getElementById("targetLevel").classList.add("is-invalid");
    document.getElementById("targetLevelLabel").classList.add("text-danger")
document.getElementById("targetLevelLabel").classList.add("text-danger")
    return;
return;
  }
}
else if (targetLevel < currentLevel) {
document.getElementById("pointsNeeded").innerHTML ="Docelowy poziom " + targetLevel + " nie może być mniejszy od obecnego " + currentLevel + ".";
document.getElementById("targetLevel").classList.add("is-invalid");
document.getElementById("targetLevelLabel").classList.add("text-danger")
return;
}


         for(var i = currentLevel; i < targetLevel; i++) {
         for(var i = currentLevel; i < targetLevel; i++) {
                pointsNeeded += Altaron.getLearnPointsForLevel(profession, ability, i);
pointsNeeded += Altaron.getLearnPointsForLevel(profession, ability, i);
         }
         }
        document.getElementById("pointsNeeded").innerHTML = "Brakuje Ci " + pointsNeeded + " punktów nauki.";
};
});


        document.getElementById("pointsNeeded").innerHTML = "Brakuje Ci " + pointsNeeded + " punktów nauki.";
  }
 
  function clearInputErrors(){
    document.getElementById("targetLevel").classList.remove("is-invalid");
    document.getElementById("targetLevelLabel").classList.remove("text-danger")
  }
</script>
</script>
</html>
</html>

Wersja z 12:45, 15 lut 2023

Spoiler
Notatka Jakis tekst zadania wiecej tekstu.


Macieij: linia 1
Gracz: linia 2323232
Macieij: linia 3


Zwój Przemiany.gif Jakiś tytuł okna
asda
dadaa
ad


Panelik 1

asdasdasd


Zwój Przemiany.gif Panelik

asdasdasd

Spoiler

Zadania Tajemnicza wieża Alchemika


Nazwa Wymagania Potrzebne przedmioty Status Szlachecki Nagroda
WIEŻA - dziwne notatki 55 poziom Nie Exp, dostęp do części mapy zwanej przeszłość