Version 2.9
* Custom input for answer * Option for no timer * Play again button * Rewrite About page * Modernize clipboard copy * Lots of misc. fixes
This commit is contained in:
17
flashdex.js
17
flashdex.js
@ -16,14 +16,12 @@ $(document).ready(function()
|
||||
|
||||
var EXCEPTION = 990; // urshifu g-max
|
||||
|
||||
|
||||
/************ GAME *************/
|
||||
/*******************************/
|
||||
|
||||
// loading json file
|
||||
$.getJSON('pokemon.json', function(pk)
|
||||
{
|
||||
|
||||
$('article #container #game #loading').hide();
|
||||
var pklist = pk;
|
||||
|
||||
@ -54,16 +52,17 @@ $(document).ready(function()
|
||||
// start the game when clicking on start game
|
||||
$('article #container .button input.start').click(function()
|
||||
{
|
||||
$('article #container #game #loading').show();
|
||||
$('article #container #game #flashdex').empty();
|
||||
|
||||
var lang = $('article select.lang option:selected').attr('id');
|
||||
var gen_list = new Array();
|
||||
var pokemon_generation_list = new Array();
|
||||
|
||||
generations();
|
||||
|
||||
$('article #container #game #flashdex').hide();
|
||||
if (gen_list.length == 0)
|
||||
return;
|
||||
|
||||
$('article #container #game #loading').show();
|
||||
$('article #container #game #flashdex').empty().hide();
|
||||
|
||||
function getFormText(pkmn)
|
||||
{
|
||||
@ -96,7 +95,7 @@ $(document).ready(function()
|
||||
|
||||
function getFormattedNumber(num)
|
||||
{
|
||||
if (num > 905 && num < 909)
|
||||
if (num > 905 && num < 909) // 9G temporary numbers
|
||||
return "???";
|
||||
if (num[0] == 'M' || num[0] == 'R' || num[0] == 'G')
|
||||
return num.substring(1, num.length);
|
||||
@ -137,7 +136,7 @@ $(document).ready(function()
|
||||
+ '<span class="name">' + '<strong>' + '#' + getFormattedNumber(pklist.mn[[pokemon_generation_list[i]]]["num"]) + '</strong> '
|
||||
+ pklist.mn[[pokemon_generation_list[i]]][lang] + '</span>'
|
||||
+ '</div>'
|
||||
);
|
||||
);
|
||||
}
|
||||
|
||||
$('article #container #game #flashdex').waitForImages(function()
|
||||
@ -304,8 +303,6 @@ $(document).ready(function()
|
||||
// multiple artworks
|
||||
function imageType(num)
|
||||
{
|
||||
//if (num["origin"] == "Kanto")
|
||||
// return num["num"] + "RB";
|
||||
if (num["sprite"])
|
||||
return num["num"] + "-0";
|
||||
return num["num"];
|
||||
|
Reference in New Issue
Block a user