Update index.php

This commit is contained in:
James 2022-09-30 08:12:16 +02:00
parent 7ed977b05a
commit 5362a73308

View File

@ -873,13 +873,16 @@
//Fill the tables
document.getElementById("totalscard").innerHTML = "<table><thead><tr><th>Variable</th><th>Pts</th></tr></thead><tbody>";
party_variables.forEach((element, i) => document.getElementById("totalscard").innerHTML += "<tr>" + party_variables_name[i] + "</tr>" + "<tr>" + element + "</tr>");
party_variables.forEach((element, i) => filltable(element, i);
encounter_variables.forEach((element, i) => document.getElementById("totalscard").innerHTML += "<tr>" + encounter_variables_name[i] + "</tr>" + "<tr>" + element + "</tr>");
document.getElementById("totalscard").innerHTML += +"</tbody></table>";
}
function filltable(element, i) {
document.getElementById("totalscard").innerHTML += "<tr><td>" + party_variables_name[i] + "</td><td>" + element + "</td></tr>")
}
function setDiff(difficulty) {
$("#diff_image").attr("src", "img/diff_" + difficulty.substring(3, 0) + ".jpg");