diff --git a/aura/0.png b/aura/0.png
new file mode 100644
index 0000000..3be37d2
Binary files /dev/null and b/aura/0.png differ
diff --git a/aura/1.png b/aura/1.png
new file mode 100644
index 0000000..7de558d
Binary files /dev/null and b/aura/1.png differ
diff --git a/aura/2.png b/aura/2.png
new file mode 100644
index 0000000..f08b10d
Binary files /dev/null and b/aura/2.png differ
diff --git a/index.html b/index.html
index d05a857..ee61a57 100644
--- a/index.html
+++ b/index.html
@@ -91,6 +91,12 @@ canvas {
border-style: solid;
border-width: 2px;
}
+.aura {
+ z-index: 0;
+ position: absolute;
+ height: 96px;
+ width: 96px;
+}
#actual-btn {
z-index: 6;
position: absolute;
@@ -688,6 +694,7 @@ canvas {
}
}
function openBox(gen, type) {
+ var type_arr = null;
if(shinyCharm) {
toggleShiny(gen, type);
return;
@@ -722,6 +729,8 @@ canvas {
var box = other_order[type];
if(arrays[box]) {
currently_previewing = arrays[box];
+ if(box == "Types")
+ type_arr = calcTypes();
}
}else if(gen == 10 && type == 22) {
// super favorite
@@ -812,6 +821,19 @@ canvas {
//change the position
ele.style.top = top_corner + 99*r;
ele.style.left = left_corner + 99*c + hole_offset;
+ if(type_arr) {
+ // manipulate the 1st/2nd/3rd auras
+ var tind = type_arr.indexOf(currently_previewing[pr_ind]);
+ if(tind >= 0) {
+ var aura = document.getElementById("aura"+tind);
+ aura.src = domlink + "aura/" + tind + ".png";
+ console.log(domlink + "aura/" + tind + ".png");
+ console.log(aura.src);
+ aura.style.top = top_corner + 99*r;
+ aura.style.left = left_corner + 99*c + hole_offset;
+ aura.style.zIndex = 8;
+ }
+ }
pr_ind++;
}
}
@@ -849,6 +871,9 @@ canvas {
ele.style.zIndex = 0;
}
document.getElementById('bubble').style.zIndex = 0;
+ document.getElementById('aura0').style.zIndex = 0;
+ document.getElementById('aura1').style.zIndex = 0;
+ document.getElementById('aura2').style.zIndex = 0;
if(teamSelect) {
document.getElementById('box'+currently_selecting[0]+"_"+currently_selecting[1]).src = "./blank.png";
teamSelect = false;
@@ -1138,6 +1163,35 @@ canvas {
writeSpindaCookie()
}
+ function calcTypes() {
+ var scores = {};
+ for(var t in type_count_array)
+ scores[type_count_array[t]] = 0;
+ for(var g in choices) {
+ for(var m in choices[g]) {
+ var mon_name = choices[g][m];
+ if(!mon_name || mon_name == "")
+ continue;
+ var mon_types = rev_map[mon_name];
+ if(!mon_types)
+ continue;
+ for(let ty in mon_types)
+ scores[mon_types[ty]]++;
+ }
+ }
+ // don't count spinda
+ scores["Normal"]--;
+ type_count_array.sort(function(a, b) {
+ return scores[b] - scores[a];
+ })
+ var fin = [];
+ for(var i=0; i<3; i++) {
+ if(scores[type_count_array[i]] > 0)
+ fin.push(type_count_array[i])
+ }
+ return fin;
+ }
+
// returns the cookie with the given name,
// or undefined if not found
function getCookie(name) {
@@ -1608,6 +1662,9 @@ canvas {
# You can also use this to keep backups
+
+
+
diff --git a/pokemon_arrays.js b/pokemon_arrays.js
index 1b28e9a..f06a28b 100644
--- a/pokemon_arrays.js
+++ b/pokemon_arrays.js
@@ -3455,3 +3455,18 @@ var arrays = {
]
}
var array_of_forms = ["GENESECT","GENESECT_1","GENESECT_2","GENESECT_3","GENESECT_4","LUNALA","LUNALA_1","SOLGALEO","SOLGALEO_1","MARSHADOW","MARSHADOW_1","MIMIKYU","MIMIKYU_1","ZACIAN","ZACIAN_2","ZAMAZENTA","ZAMAZENTA_2","ZARUDE","ZARUDE_1","PIKACHU","PIKACHU_2","PIKACHU_3","PIKACHU_4","PIKACHU_5","PIKACHU_6","PIKACHU_7","PIKACHU_8","PIKACHU_9","PIKACHU_10","PIKACHU_11","PIKACHU_12","PIKACHU_13","PIKACHU_14","PIKACHU_15","ABOMASNOW","ABOMASNOW_female","ALAKAZAM","ALAKAZAM_female","AIPOM","AIPOM_female","AMBIPOM","AMBIPOM_female","BEAUTIFLY","BEAUTIFLY_female","BIBAREL","BIBAREL_female","BIDOOF","BIDOOF_female","BLAZIKEN","BLAZIKEN_female","BUTTERFREE","BUTTERFREE_female","CACTURNE","CACTURNE_female","CAMERUPT","CAMERUPT_female","COMBEE","COMBEE_female","COMBUSKEN","COMBUSKEN_female","CROAGUNK","CROAGUNK_female","DODRIO","DODRIO_female","DODUO","DODUO_female","DONPHAN","DONPHAN_female","DUSTOX","DUSTOX_female","FINNEON","FINNEON_female","GARCHOMP","GARCHOMP_female","GIBLE","GIBLE_female","GIRAFARIG","GIRAFARIG_female","GLIGAR","GLIGAR_female","GLOOM","GLOOM_female","GOLBAT","GOLBAT_female","GOLDEEN","GOLDEEN_female","GULPIN","GULPIN_female","GYARADOS","GYARADOS_female","HERACROSS","HERACROSS_female","HOUNDOOM","HOUNDOOM_female","HYPNO","HYPNO_female","KADABRA","KADABRA_female","KRICKETOT","KRICKETOT_female","KRICKETUNE","KRICKETUNE_female","LEDIAN","LEDIAN_female","LEDYBA","LEDYBA_female","LUDICOLO","LUDICOLO_female","LUMINEON","LUMINEON_female","LUXIO","LUXIO_female","LUXRAY","LUXRAY_female","MAGIKARP","MAGIKARP_female","MAMOSWINE","MAMOSWINE_female","MEDICHAM","MEDICHAM_female","MEDITITE","MEDITITE_female","MEGANIUM","MEGANIUM_female","MILOTIC","MILOTIC_female","NUMEL","NUMEL_female","NUZLEAF","NUZLEAF_female","OCTILLERY","OCTILLERY_female","PIKACHU","PIKACHU_female","PILOSWINE","PILOSWINE_female","POLITOED","POLITOED_female","QUAGSIRE","QUAGSIRE_female","RAICHU","RAICHU_female","RATICATE","RATICATE_female","RATTATA","RATTATA_female","RELICANTH","RELICANTH_female","RHYDON","RHYDON_female","RHYHORN","RHYHORN_female","RHYPERIOR","RHYPERIOR_female","ROSELIA","ROSELIA_female","ROSERADE","ROSERADE_female","SCIZOR","SCIZOR_female","SCYTHER","SCYTHER_female","SEAKING","SEAKING_female","SHIFTRY","SHIFTRY_female","SHINX","SHINX_female","SNEASEL","SNEASEL_female","SNEASEL_1","SNEASEL_1_female","SNOVER","SNOVER_female","STARAPTOR","STARAPTOR_female","STARAVIA","STARAVIA_female","STARLY","STARLY_female","STEELIX","STEELIX_female","SUDOWOODO","SUDOWOODO_female","SWALOT","SWALOT_female","TANGROWTH","TANGROWTH_female","TOXICROAK","TOXICROAK_female","URSARING","URSARING_female","VENUSAUR","VENUSAUR_female","VILEPLUME","VILEPLUME_female","WEAVILE","WEAVILE_female","WOBBUFFET","WOBBUFFET_female","WOOPER","WOOPER_female"];
+
+var rev_map = {}
+var type_count_array = ["Grass", "Poison", "Fire", "Flying", "Dragon", "Water", "Bug",
+ "Normal", "Dark", "Electric", "Psychic", "Ground", "Ice",
+ "Steel", "Fairy", "Fighting", "Rock", "Ghost"]
+for(var type in type_count_array) {
+ let gens = arrays[type_count_array[type]];
+ for(let i=1; i