From caab9fe47d259abbaf2e21c91269b137673b5cbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o=20Marchal?= Date: Mon, 14 Mar 2022 21:30:46 +0100 Subject: [PATCH] Version 2.9 * Custom input for answer * Option for no timer * Play again button * Rewrite About page * Modernize clipboard copy * Lots of misc. fixes --- README.md | 1 - about.html | 77 ++++++++++++++++++++++-------------------- flashdex.html | 6 ++-- flashdex.js | 17 ++++------ index.html | 23 ++++++++----- interface.js | 61 +++++++++++++++++++++------------ poketest.js | 93 +++++++++++++++++++++++++++++++++++---------------- style.css | 48 +++++++++++++++++++++----- 8 files changed, 208 insertions(+), 118 deletions(-) diff --git a/README.md b/README.md index 587b51d..6f1e684 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,6 @@ Now that there are now more than 900 of them, and it's as useful as ever! The we ### Planned updates - Make answer choices closer by type -- Custom input answers for harder difficulty - Type weakness calculator ### Scripts diff --git a/about.html b/about.html index b8f4c3c..9af4da4 100644 --- a/about.html +++ b/about.html @@ -10,7 +10,7 @@ - Pokétest + Pokétest - About
@@ -32,54 +32,57 @@ morpeko

About

-

Who are you?

-

Hi! My name is Théo and I'm a game developer. I love Pokémon, but it has been getting hard to remember all those names, even though I always complete the Pokédex in my games!

- -

What is this website made with?

+

How to play: Pokétest

+

The Pokétest is a game where you have to guess the name of the Pokémon appearing. The following options are available:

+ +

Note: if the answer type is "Choice", you can use the "1", "2", "3" or "4" keys to answer. You can also use the "Enter" key to launch the game.

+ +

How to use: Flashdex

+

The Flashdex is a very simple Pokédex, useful to see the Pokémons in a good resolution. It is filtered by generation and alternate forms. You can chose the language in which it is displayed.

+

Types are displayed in the top-left corner, and generations on the top-right corner. If there are different artworks available for the Pokémon, arrows are displayed on the bottom-left corner. You can use them to switch between artworks. Please note that those are not always alternate forms, they are alternate artworks. For example:

+ + +

Website informations

- This website has been developed in JavaScript using the jQuery library.
- It uses the waitForImages plugin.
+ This website is HTML5 and CSS3 compliant.
+ It has been developed in JavaScript using the jQuery library.
+ It uses the waitForImages plugin.

All of those components are licensed under the MIT license, as is the website source code, which is available here.
- This website is HTML5 and CSS3 compliant. + If you found a bug or want to add a feature, you can always contact me or make a pull request. +

+

+ This website has been developed by Théo, a game developer having trouble to remember the name of all those monsters.

- -

Can I use my keyboard to play?

-

Yes! You can launch the game with "Enter", then press "1", "2", "3" or "4" to answer.

-

What is the «Infinite» option in the number of questions exactly?

-

When playing with the Infinite option, the game ends when you have 5 bad answers on all the set.

- - poliwag - -

This website doesn't work well on my browser.

-

Please contact me or make a pull request!

- -

Can you add more languages?

-

The game currently supports all of the languages available in the main games. If your language is not on the list, it probably uses the English names! I will not support other languages by myself, but you can always contribute by making a pull request!

- -

Can you add this feature?

-

Please contact me or make a pull request!

- -

Copyrights

-

The Pokémon names, the associated artworks and the Pokémon licence is trademarked by Nintendo and The Pokémon Company, 1996 - 2022.
- All the Pokémon artworks were taken from Bulbapedia, that I'd like to thank for their huge work for the Pokémon community.

+

Copyrights

+

The Pokémon names, the associated artworks and the Pokémon licence is trademarked by Nintendo and The Pokémon Company, 1996 - 2022.

+

All the Pokémon artworks were taken from Bulbapedia, that I'd like to thank for their huge work for the Pokémon community.

\ No newline at end of file diff --git a/flashdex.html b/flashdex.html index 6672d95..515823f 100644 --- a/flashdex.html +++ b/flashdex.html @@ -11,7 +11,7 @@ - Pokétest + Pokétest - Flashdex
@@ -39,6 +39,8 @@

The Flashdex is a very simple Pokédex, useful to see your favorite creatures in good resolution. Perfect for learning new names, and to see the different generations and different Pokémon forms!

+

For more details, please read the About page!

+

Select all

@@ -85,7 +87,7 @@

diff --git a/flashdex.js b/flashdex.js index f52ee42..a4c6ab1 100644 --- a/flashdex.js +++ b/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() + '' + '' + '#' + getFormattedNumber(pklist.mn[[pokemon_generation_list[i]]]["num"]) + ' ' + pklist.mn[[pokemon_generation_list[i]]][lang] + '' + '' - ); + ); } $('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"]; diff --git a/index.html b/index.html index 2fd84b5..a93a17d 100644 --- a/index.html +++ b/index.html @@ -31,13 +31,13 @@
Growlithe -

What is Pokétest?

+

Pokétest

Now updated for Pokémon Legends: Arceus!

There are now more than 900 Pocket Monsters, and a handful number of alternative forms. It's getting pretty tricky to know them all, let alone to catch them all. With Pokétest, you can train yourself and become unbeatable! Filter by generation, language and even by Mega Evolutions, Regional or Gigantamax Forms!

-

You can play with your keyboard: just press 1, 2, 3 or 4 to choose the answer!

+

For more details, please read the About page!

Configuration

@@ -104,6 +104,10 @@ + +

Answer type

+ +

Silhouette

@@ -124,13 +128,14 @@

Time to answer

seconds +
@@ -141,7 +146,7 @@