Was mache ich hier falsch???
<body>
<p class="title">Pokémon-Waisenhaus<br/></p>
<script type="text/javascript">
function test(){alert('Herzlich willkommen bei Mari\'s Pokémon-Waisenhaus! Erst mal könnt ihr ein paar Fragen beantworten. Bitte beantwortet sie nur mit \"1\" oder \"2\"!');
var a = prompt("Was möchtest du lieber? 1=Freunde haben 2=Champion werden.");
var b = prompt("Ruhst du gerne aus? 1=Ja. 2=Nein, ich möchte schließlich trainieren.");
var c = prompt("Was isst du am liebsten? 1=Obst und Gemüse. 2=Ein saftiges Steak.");
var d = prompt("Kannst du es verkraften, wenn du verlierst? 1=Ja klar. 2=Nicht wirklich.");
var e = prompt("Welche Art Pokémon bevorzugst du? 1=Stille Pokémon. 2=Hitzige Pokémon.")};
function pruefen(){
case "1":
switch (c) {
case "1":
switch (d) {
case "1":
switch (e) {
case "1": var Pokemon = 152; var Name = "Endivie"; break;
case "2": var Pokemon = 172; var Name = "Pichu"; break;
}
case "2":
switch (e) {
case "1": var Pokemon = 446; var Name = "Mampfaxo"; break;
case "2": var Pokemon = 252; var Name = "Geckarbor"; break;
}
}
case "2":
switch (d) {
case "1":
switch (e) {
case "1": var Pokemon = 300; var Name = "Eneco"; break;
case "2": var Pokemon = 155; var Name = "Feurigel"; break;
}
case "2":
switch (e) {
case "1": var Pokemon = 431; var Name = "Charmian"; break;
case "2": var Pokemon = 052; var Name = "Mauzi"; break;
}
}
}
case "2":
switch (c) {
case "1":
switch (d) {
case "1":
switch (e) {
case "1": var Pokemon = 258; var Name = "Hydropi"; break;
case "2": var Pokemon = 236; var Name = "Rabauz"; break;
}
case "2"
switch (e) {
case "1": var Pokemon = 387; var Name = "Chelast"; break;
case "2": var Pokemon = 239; var Name = "Elekid"; break;
}
}
case "2":
switch (d) {
case "1"
switch (e) {
case "1": var Pokemon = 360; var Name = "Isso"; break;
case "2": var Pokemon = 240; var Name = "Magby"; break;
}
case "2"
switch (e) {
case "1": var Pokemon = 158; var Name = "Karnimani"; break;
case "2": var Pokemon = 009; var Name = "Schiggy"; break;
}
}
}
}
case "2":
switch (b) {
case "1":
switch (c) {
case "1":
switch (d) {
case "1":
switch (e) {
case "1": var Pokemon = 439; var Name = "Wonneira"; break;
case "2": var Pokemon = 439; var Name = "Pantimimi"; break;
}
case "2":
switch (e) {
case "1": var Pokemon = 438; var Name = "Mobai"; break;
case "2": var Pokemon = 406; var Name = "Knospi"; break;
}
}
case "2":
switch (d) {
case "1":
switch (e) {
case "1": var Pokemon = 238; var Name = "Kussilla"; break;
case "2": var Pokemon = 393; var Name = "Plinfa"; break;
}
case "2":
switch (e) {
case "1": var Pokemon = 255; var Name = "Flemmli"; break;
case "2": var Pokemon = 001; var Name = "Bisasam"; break;
}
}
}
case "2":
switch (c) {
case "1":
switch (d) {
case "1":
switch (e) {
case "1": var Pokemon = 173; var Name = "Pii"; break;
case "2": var Pokemon = 174; var Name = "Fluffeluff"; break;
}
case "2":
switch (e) {
case "1": var Pokemon = 054; var Name = "Enton"; break;
case "2": var Pokemon = 390; var Name = "Panflam"; break;
}
}
case "2":
switch (d) {
case "1":
switch (e) {
case "1": var Pokemon = 458; var Name = "Mantirps"; break;
case "2": var Pokemon = 433; var Name = "Klingplim"; break;
}
case "2":
switch (e) {
case "1": var Pokemon = 298; var Name = "Azurill"; break;
case "2": var Pokemon = 004; var Name = "Glumanda"; break;
}
}
}
}
}
};
function schreiben(){
document.write("<p class=\"title\">Und dein Pokémon heißt:<\/p><br\/><img src=\"http:\/\/files.pokefans.net\/sprites\/dp\/" + Pokemon + ".png\" alt=\"" + Name + "\"/><br\/><p class=\"text\">" + Pokemon + "scheint sich zu freuen.<\/p>");
};
function los(){
test();
pruefen();
schreiben();
};
</script>
<noscript><p>Bitte schalte Javascript ein und kehre <a href="#">zurück</a>.</noscript>
<a href="javascript:los();"> Zu Professor Eich! </p>
</body>