Roulette-a-donjons/001-200/js/index.js
2018-07-22 18:03:36 +02:00

430 lines
8.5 KiB
JavaScript

$(document).ready(function(){
var quoteSource=[
{
quote: "Crypte de Kardorim",
name:"Kardorim"
},
{
quote:"Grange du Tournesol Affamé",
name:"Tournesol Affamé"
},
{
quote:"Château Ensablé",
name:"Mob l'Éponge"
},
{
quote:"Cour du Bouftou Royal",
name:"Bouftou Royal"
},
{
quote:"Donjon des Scarafeuilles",
name:"Scarabosse Doré"
},
{
quote:"Donjon des Tofus",
name:"Botofu"
},
{
quote:"Maison Fantôme",
name:"Boostache"
},
{
quote:"Donjon des Squelettes",
name:"Chafer Rōnin"
},
{
quote:"Cache de Kankreblath",
name:"Kankreblath"
},
{
quote:"Donjon des Bworks",
name:"Bworkette"
},
{
quote:"Donjon des Forgerons",
name:"Coffre des Forgerons"
},
{
quote:"Donjon des Larves",
name:"Shin Larve"
},
{
quote:"Grotte Hesque",
name:"Corailleur Magistral"
},
{
quote:"Nid du Kwakwa",
name:"Kwakwa"
},
{
quote:"Caverne des Bulbes",
name:"Bulbig Brozeur"
},
{
quote: "Château du Wa Wabbit",
name:"Wa Wabbit"
},
{
quote:"Village kanniboul",
name:"Kanniboul Ebil"
},
{
quote:"Clos des Blops",
name:"Blops Royaux"
},
{
quote:"Gelaxième Dimension",
name:"Gelées Royales"
},
{
quote:"Laboratoire de Brumen Tinctorias",
name:"Nelween"
},
{
quote:"Cale de l'Arche d'Otomaï",
name:"Gourlo le Terrible"
},
{
quote:"Donjon des Craqueleurs",
name:"Craqueleur Légendaire"
},
{
quote:"Repaire de Daïgoro",
name:"Daïgoro"
},
{
quote:"Terrier du Wa Wabbit",
name:"Wa Wobot"
},
{
quote:"Cimetière des Mastodontes",
name:"Mantiscore"
},
{
quote:"Antre de la Reine Nyée",
name:"Reine Nyée"
},
{
quote:"Domaine Ancestral",
name:"Abraknyde Ancestral"
},
{
quote:"Bateau du Chouque",
name:"Chouque"
},
{
quote:"Chapiteau des Magik Riktus",
name:"Choudini"
},
{
quote:"Antre du Dragon Cochon",
name:"Dragon Cochon"
},
{
quote:"Caverne du Koulosse",
name:"Koulosse"
},
{
quote:"Tanière du Meulou",
name:"Meulou"
},
{
quote:"Arbre de Moon",
name:"Moon"
},
{
quote:"Théâtre de Dramak",
name:"mMître des Pantins"
},
{
quote:"Fabrique de Malléfisk",
name:"Malléfisk"
},
{
quote: "Goulet du Rasboul",
name:"Silf le Rasboul Majeur"
},
{
quote:"Bibliothèque du Maître Corbac",
name:"Maître Corbac"
},
{
quote:"Donjon des Rats de Bonta",
name:"Rat Blanc"
},
{
quote:"Donjon des Rats de Brâkmar",
name:"Rat Noir"
},
{
quote:"Miausolée du Pounicheur",
name:"Pounicheur"
},
{
quote:"Antre du Blops Multicolore Royal",
name:"Blops Multicolore Royal"
},
{
quote:"Centre du Labyrinthe du Minotoror",
name:"Minotoror"
},
{
quote:"Serre du Royalmouth",
name:"Royalmouth"
},
{
quote:"Repaire des Pandikazes",
name:"Maître Pandore"
},
{
quote:"Tofulailler Royal",
name:"Tofu Royal"
},
{
quote:"Donjon des Dragoeufs",
name:"Crocabulia"
},
{
quote:"Repaire de Skeunk",
name:"Skeunk"
},
{
quote:"Mégalithe de Fraktale",
name:"Fraktale"
},
{
quote:"Donjon des Kitsounes",
name:"Tanukouï San"
},
{
quote:"Volière de la Haute Truche",
name:"Haute Truche"
},
{
quote:"Caverne d'El Piko",
name:"El Piko"
},
{
quote:"Ring du Capitaine Ekarlatte",
name:"Capitaine Ekarlatte"
},
{
quote:"Donjon des Firefoux",
name:"Péki Péki"
},
{
quote:"Clairière du Chêne Mou",
name:"Chêne Mou"
},
{
quote:"Laboratoire du Tynril",
name:"Tynrils"
},
{
quote:"Excavation du Mansot Royal",
name:"Mansot Royal"
},
{
quote:"Épave du Grolandais Violent",
name:"Ben le Ripate"
},
{
quote:"Donjon des Rats du Château d'Amakna",
name:"Sphincter Cell"
},
{
quote:"Galerie du Phossile",
name:"Phossile"
},
{
quote: "Canopée du Kimbo",
name:"Kimbo"
},
{
quote:"Salle du Minotot",
name:"Minotot"
},
{
quote:"Hypogée de l'Obsidiantre",
name:"Obsidiantre"
},
{
quote:"Grotte de Kanigroula",
name:"Kanigroula"
},
{
quote:"Plateau de Ush",
name:"Ush Galesh"
},
{
quote:"Cavernes Givrefoux",
name:"Tengu Givrefoux"
},
{
quote:"Boyau du Père Ver",
name:"Père Ver"
},
{
quote:"Horologium de XLII",
name:"XLII"
},
{
quote:"Antre du Korriandre",
name:"Korriandre"
},
{
quote:"Antre du Kralamoure Géant",
name:"Kralamoure Géant"
},
{
quote:"Grotte du Bworker",
name:"Bworker"
},
{
quote:"Temple du Grand Ougah",
name:"Ougah"
},
{
quote:"Cave du Toxoliath",
name:"Toxoliath"
},
{
quote:"Cavernes du Kolosso",
name:"Kolosso"
},
{
quote:"Cavernes Nourricières",
name:"Fuji Givrefoux Nourricière"
},
{
quote:"Mine de Sakaï",
name:"N (nique Grolloum !)"
},
{
quote:"Antichambre du Glourséleste",
name:"Glourséleste"
},
{
quote:"Pyramide d'Ombre",
name:"Ombre"
},
{
quote:"Camp du Comte Razof",
name:"Comte Razof"
},
{
quote: "Forgefroide de Missiz Frizz",
name:"Missiz Frizz"
},
{
quote:"Transporteur de Sylargh",
name:"Sylargh"
},
{
quote:"Salons privés de Klime",
name:"Klime"
},
{
quote:"Laboratoire de Nileza",
name:"Nileza"
},
{
quote:"Donjon du Comte",
name:"Comte Harebourg"
},
{
quote:"Aquadôme de Merkator",
name:"Merkator"
},
{
quote:"Palais du roi Nidas",
name:"roi Nidas"
},
{
quote:"Trône de la Cour Sombre",
name:"Reine des Voleurs"
},
{
quote:"Ventre de la Baleine",
name:"Protozorreur"
},
{
quote:"Œil de Vortex",
name:"Vortex"
},
{
quote:"Défi du Chalœil",
name:"Chalœil"
},
{
quote:"Vaisseau du Capitaine Meno",
name:"Capitaine Meno"
},
{
quote:"Temple de Koutoulou",
name:"Larve de Koutoulou"
},
{
quote:"Palais de Dantinéa",
name:"Dantinéa"
},
{
quote:"Chambre de Tal Kasha",
name:"Tal Kasha"
},
{
quote:"Manoir des Katrepat",
name:"Anerice la Shushess"
},
{
quote:"Belvédère d'Ilyzaelle",
name:"Ilyzaelle"
},
{
quote:"Tour de Solar",
name:"Solar"
},
{
quote:"Tour de Bethel",
name:"Bethel Akarna"
},
{
quote:"Brasserie du roi Dazak",
name:"Dazak Martegel"
}
];
$('#quoteButton').click(function(evt){
//define the containers of the info we target
var quote = $('#quoteContainer p').text();
var quoteGenius = $('#quoteGenius').text();
//prevent browser's default action
evt.preventDefault();
//getting a new random number to attach to a quote and setting a limit
var sourceLength = quoteSource.length;
var randomNumber= Math.floor(Math.random()*sourceLength);
//set a new quote
for(i=0;i<=sourceLength;i+=1){
var newQuoteText = quoteSource[randomNumber].quote;
var newQuoteGenius = quoteSource[randomNumber].name;
//console.log(newQuoteText,newQuoteGenius);
var timeAnimation = 500;
var quoteContainer = $('#quoteContainer');
//fade out animation with callback
quoteContainer.fadeOut(timeAnimation, function(){
quoteContainer.html('');
quoteContainer.append('<p>'+newQuoteText+'</p>'+'<p id="quoteGenius">'+'- '+newQuoteGenius+'</p>');
//fadein animation.
quoteContainer.fadeIn(timeAnimation);
});
break;
};//end for loop
});//end quoteButton function
});//end document ready