Your browser lacks required capabilities. Please upgrade it or switch to another to continue.
Loading…
,,,,,,,,,,<html>
<img src="images/intro.jpg" alt="texte de début d'aventure">
<div id="test" class="dialogue">
<textarea id="sp">Hé ! Salut toi ! Bienvenue dans Deviens Une Légende. Je suis le professeur Cheum et je serai dès à présent ton agent. Demain c’est l’grand jour ! Tu le sais, de nombreux recruteurs seront là. Alors pour concrétiser toutes tes années d’entraînement et peut être un jour devenir une légende du foot, il va falloir performer. Allez… Il est temps de dormir, repose toi bien car une grande aventure t’attend. </textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
//var audio = new Audio('sons/clavier.mp3');
function Write(){
//audio.play();
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Le réveil" class="bouton" type="button">En route pour l'aventure de mes rêves...</button>
<<audio "start" loop play>>
<<set $physique to 30>>
<<set $charisme to 30>>
<<set $passes to 30>>
<<set $tirs to 30>>
<<set $defense to 30>>
<<set $dribbles to 30>><html>
<img src="images/réveil.jpg" alt="Texte au réveil">
<div id="test" class="dialogue">
<textarea id="sp">Alors mon grand ?! Bien dormi ? Bon, aujourd’hui c’est l'grand jour. Je compte sur toi pour tout donner pendant ton match de détection. Je n’ai pas, mais alors vraiment pas envie de devenir l’agent d’un joueur lambda ! Je ne veux que des superstars. Allez, mange bien et je t’y emmène. </textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Dire à votre agent qu’il vaut mieux partir maintenant pour arriver à l’heure et manger un peu sur la route->Pas assez mangé]]</div>
<div class="rep">[[Manger directement pour être en pleine forme en prenant le risque d’arriver en retard ->En retard]]
</div>
<<audio "baillement" play>>
<<audio "start" loop play>><html>
<img src="images/nrv.jpg" alt="agent pas content">
<div id="test" class="dialogue">
<textarea id="sp">On aurait dû partir plus tôt. Pour faire oublier ce retard tu as intérêt à te démarquer sur le terrain. Bon... prépare toi c’est le moment de tout donner ! </textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Se préparer sans râler et aller sur le terrain->Détection 1]]</div>
<div class="rep">[[Pleurer dans son coin et ne pas aller sur le terrain->Perdu 1]]</div>
<<audio "énervé" play>><html>
<img src="images/nrv.jpg" alt="agent pas content">
<div id="test" class="dialogue">
<textarea id="sp">Je t’avais dit de bien manger, tu vois qu'on est à l'heure ! J’espère que cela ne va pas influencer ta façon de jouer. Bon... Prépare toi c’est le moment de tout donner !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Se préparer sans râler et aller sur le terrain->Détection 1]]</div>
<div class="rep">[[Pleurer dans son coin et ne pas aller sur le terrain->Perdu 1]]</div>
<<audio "énervé" play>><html>
<img src="images/detection1.jpg" alt="Indication sur les matchs">
<div id="test" class="dialogue">
<textarea id="sp">Ah oui ! J’ai oublié de te dire, les matchs vont être un peu spéciaux… Enfin bref je te laisse découvrir ça. A toi d’être le meilleur car la concurrence sera rude. Oulalala on commence à tarder… Je te laisse, le coach va vous parler.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Aller écouter le discours du coach sans tergiverser|Détection 2]]</div>
<div class="rep">[[Faire un câlin à votre agent pour vous donner de la force|Détection 1.1]]
</div>
<<audio "start" stop>>
<<audio "poke" loop play>><html>
<img src="images/detection2.jpg" alt="Vent câlin">
<div id="test" class="dialogue">
<textarea id="sp">Euh... qu’est-ce que tu fais ?! Va donc écouter le coach avec tes futurs adversaires, pas le temps pour un câlin.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Aller écouter le discours du coach après ce vent monumental...|Détection 2]] </div>
<<audio "nani" play>>
<<set $charisme to $charisme-1>><html>
<img src="images/coach_détection.jpg" alt="Discours coach">
<div id="test" class="dialogue">
<textarea id="sp">SALUT LES NAZES ! Bon… Quand j’vois votre allure j’ai l’impression qu’on va pas aller loin. Donnez-vous à fond si vous voulez espérer être recrutés quelque part, c’est peut être le match de votre carrière alors à fond les ballons !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[DIRECTION LE PREMIER MATCH (Fiiiiiouuuu… Il était temps)->Détection 3]] </div>
<<audio "nani" stop>><canvas class="jeu1" id="myCanvas" width="480" height="320"></canvas>
<script>
document.getElementById("victoire").style.display="none";
document.getElementById("defaite").style.display="none";
var canvas = document.getElementById("myCanvas");
var ctx = canvas.getContext("2d");
var ballRadius = 10;
var x = canvas.width/2;
var y = canvas.height-30;
var dx = 2;
var dy = -2;
var paddleHeight = 10;
var paddleWidth = 75;
var paddleX = (canvas.width-paddleWidth)/2;
var rightPressed = false;
var leftPressed = false;
var brickRowCount = 5;
var brickColumnCount = 3;
var brickWidth = 75;
var brickHeight = 20;
var brickPadding = 10;
var brickOffsetTop = 30;
var brickOffsetLeft = 30;
var score = 0;
var lives = 2;
var bricks = [];
for(var c=0; c<brickColumnCount; c++) {
bricks[c] = [];
for(var r=0; r<brickRowCount; r++) {
bricks[c][r] = { x: 0, y: 0, status: 1 };
}
}
document.addEventListener("keydown", keyDownHandler, false);
document.addEventListener("keyup", keyUpHandler, false);
document.addEventListener("mousemove", mouseMoveHandler, false);
function keyDownHandler(e) {
if(e.keyCode == 39) {
rightPressed = true;
}
else if(e.keyCode == 37) {
leftPressed = true;
}
}
function keyUpHandler(e) {
if(e.keyCode == 39) {
rightPressed = false;
}
else if(e.keyCode == 37) {
leftPressed = false;
}
}
function mouseMoveHandler(e) {
var relativeX = e.clientX - canvas.offsetLeft;
if(relativeX > 0 && relativeX < canvas.width) {
paddleX = relativeX - paddleWidth/2;
}
}
function collisionDetection() {
for(var c=0; c<brickColumnCount; c++) {
for(var r=0; r<brickRowCount; r++) {
var b = bricks[c][r];
if(b.status == 1) {
if(x > b.x && x < b.x+brickWidth && y > b.y && y < b.y+brickHeight) {
dy = -dy;
b.status = 0;
score++;
if(score == brickRowCount*brickColumnCount) {
document.getElementById("victoire").style.display = "block";
}
}
}
}
}
}
function drawBall() {
ctx.beginPath();
ctx.arc(x, y, ballRadius, 0, Math.PI*2);
ctx.fillStyle = "#000000";
ctx.fill();
ctx.closePath();
}
function drawPaddle() {
ctx.beginPath();
ctx.rect(paddleX, canvas.height-paddleHeight, paddleWidth, paddleHeight);
ctx.fillStyle = "#000000";
ctx.fill();
ctx.closePath();
}
function drawBricks() {
for(var c=0; c<brickColumnCount; c++) {
for(var r=0; r<brickRowCount; r++) {
if(bricks[c][r].status == 1) {
var brickX = (r*(brickWidth+brickPadding))+brickOffsetLeft;
var brickY = (c*(brickHeight+brickPadding))+brickOffsetTop;
bricks[c][r].x = brickX;
bricks[c][r].y = brickY;
ctx.beginPath();
ctx.rect(brickX, brickY, brickWidth, brickHeight);
ctx.fillStyle = "#000000";
ctx.fill();
ctx.closePath();
}
}
}
}
function drawContour() {
ctx.fillStyle = "#000000";
ctx.fillRect(8, 3, 134, 22);
}
function drawAffiche() {
ctx.fillStyle = "#ffffff";
ctx.fillRect(10, 5, 130, 18);
}
function drawScore() {
ctx.font = "bold 12px Arial";
ctx.fillStyle = "#000000";
ctx.fillText("SCORE : "+score+" |", 13, 18);
}
function drawLives() {
ctx.font = "bold 12px Arial";
ctx.fillStyle = "#000000";
ctx.fillText("VIES : "+lives, 87, 18);
}
function draw() {
if (lives>0 && score <15) {
ctx.clearRect(0, 0, canvas.width, canvas.height);
drawContour();
drawAffiche();
drawBricks();
drawBall();
drawPaddle();
drawScore();
drawLives();
collisionDetection();
if(x + dx > canvas.width-ballRadius || x + dx < ballRadius) {
dx = -dx;
}
if(y + dy < ballRadius) {
dy = -dy;
}
else if(y + dy > canvas.height-ballRadius) {
if(x > paddleX && x < paddleX + paddleWidth) {
dy = -dy;
}
else {
lives--;
if(!lives) {
document.getElementById("defaite").style.display = "block";
return ;
}
else {
x = canvas.width/2;
y = canvas.height-30;
dx = 2;
dy = -2;
paddleX = (canvas.width-paddleWidth)/2;
}
}
}
if(rightPressed && paddleX < canvas.width-paddleWidth) {
paddleX += 7;
}
else if(leftPressed && paddleX > 0) {
paddleX -= 7;
}
x += dx;
y += dy;
requestAnimationFrame(draw);
} else {
drawScore();
drawLives();
return ;
}
}
draw();
</script>
<div id="victoire">C'est une victoire ! Super match, continue comme ça.
<button data-passage="Victoire 1" class="bouton" type="button">Continuer...</button></div>
<div id="defaite">C'est une défaite ! Tu feras mieux la prochaine fois.
<button data-passage="Défaite 1" class="bouton" type="button">Continuer...</button></div>
<<audio "poke" stop>>
<<audio "jeu1" loop play>><h1 class="debut">Deviens une légende</h1>
<button data-passage="Introduction" class="bouton" type="button">Commencer une partie</button>
<button data-passage="Informations" class="bouton" type="button">Principe du jeu</button>
<button data-passage="Crédits" class="bouton" type="button">Crédits</button>
<<audio "start" loop play>>
<<set $physique to 0>>
<<set $charisme to 0>>
<<set $passes to 0>>
<<set $tirs to 0>>
<<set $defense to 0>>
<<set $dribbles to 0>><h1>Deviens une légende</h1>
<div class="information">« Deviens une légende » est un jeu interactif sur le thème du sport et plus particulièrement du football. Vous serez amené à prendre la place d’un jeune joueur amateur en début de carrière qui rêve du plus haut niveau. Pour arriver à atteindre son rêve, c’est-à-dire de marquer
l’histoire du football et obtenir le Ballon d’Or, vous devrez prendre les bonnes décisions sur sa carrière. Vous participerez ainsi à différents petits jeux qui détermineront différentes opportunités qui lui seront proposées. Plus vous ferez les bons choix, plus la fin de votre carrière sera une réussite.</div>
<button data-passage="Introduction" class="bouton" type="button">OK JE ME LANCE !</button>
<button data-passage="Menu de démarrage" class="bouton" type="button">Retour au menu principal</button>
<<audio "start" loop play>><h2>Merci pour votre visite sur</h2>
<h1>Deviens une légende</h1>
<div class="information">//Deviens une légende// a été écrit par Arthur Oswald, Thomas Neveux et Paul-Alexis Savovic
Nous remercions toutes les personnes qui ont contribué à la réussite de ce jeu, que ce soit nos familles qui ont pu le tester, nos camarades de cours qui ont pu nous donner des conseils mais surtout Monsieur Serge Bouchardon pour son suivi et ses précieux conseils tout au long du semestre.</div>
<button data-passage="Menu de démarrage" class="bouton" type="button">Retour au menu principal</button>
<<audio "start" loop play>><html>
<img src="images/coach_détection2.jpg" alt="Le match va commencer DIRECTEMENT">
<div id="test" class="dialogue">
<textarea id="sp">Ce match va être... Spécial. C'est un casse-brique ! A l'aide des flèches du clavier ou de la souris, casse les 15 briques et ton match sera gagné ! ATTENTION, le match commence directement, alors sois concentré DÈS LE DÉBUT !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Détection 4" class="bouton" type="button">---------------- START ----------------</button>
<h1>GAME OVER</h1>
<html>
<div id="test" class="GameOver">
<textarea id="sp">C'est ici que l'aventure s'arrête pour toi. Tu n'étais tout simplement pas prêt à passer le cap et à devenir professionnel. Tu finis ta carrière en amateur sans jamais parvenir à dépasser le niveau district. Retente ta chance dès le départ en revenant dans le menu principal.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (100 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Menu de démarrage" class="bouton" type="button">Retour au menu principal</button>
<<audio "start" stop>>
<<audio "chèvre" play>>
<<set $physique to 0>>
<<set $charisme to 0>>
<<set $passes to 0>>
<<set $tirs to 0>>
<<set $defense to 0>>
<<set $dribbles to 0>><<set $club to "Sans contrat">>
<<set $salaire to 0>>
<<set $saison to 1>>
<<set $physique to 0>>
<<set $charisme to 0>>
<<set $passes to 0>>
<<set $tirs to 0>>
<<set $defense to 0>>
<<set $dribbles to 0>>
<<set $total to 0>>
<<set $mood to "Normal">>
<<cacheaudio "start" "sons/start.mp3">>
<<cacheaudio "baillement" "sons/baillement.mp3">>
<<cacheaudio "énervé" "sons/nrv.mp3">>
<<cacheaudio "chèvre" "sons/chevre.mp3">>
<<cacheaudio "poke" "sons/poke.mp3">>
<<cacheaudio "jeu1" "sons/free-money.mp3">>
<<cacheaudio "club1" "sons/pes5.mp3">>
<<cacheaudio "nani" "sons/nani.mp3">>
<<cacheaudio "bouh" "sons/bouuuh.mp3">>
<<cacheaudio "doodle" "sons/jump.mp3">>
<<cacheaudio "goal" "sons/goal.mp3">>
<<cacheaudio "mii" "sons/mii.mp3">>
<<cacheaudio "mii2" "sons/mii2.mp3">>
<<cacheaudio "spongebob" "sons/spongebob.mp3">>
<<cacheaudio "EDF" "sons/kavinsky-roadgame.mp3">>
<<cacheaudio "musiqueCL" "sons/musiqueCL.mp3">>
<<cacheaudio "sponsor" "sons/sponsor.mp3">>
<<cacheaudio "fifa" "sons/FIFA2005.mp3">>
<<masteraudio volume 0.05>>
<html>
<img src="images/agent1.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">T’as pas géré ! Je m’attendais à mieux comme prestation, va falloir revoir ton jeu de passe… c’était finalement pas le match de ta vie. Pour autant 3 équipes ont été séduites par ta pugnacité sur le terrain, va voir leur offre de plus près :</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[SC Schiltigheim|SC Schiltigheim]]</div>
<div class="rep">[[FC Dancefloor|FC Dancefloor]]</div>
<div class="rep">[[Association Sportive Yzeure 03 Auvergne|Association Sportive Yzeure 03 Auvergne]]</div>
<<audio "jeu1" stop>>
<<audio "club1" loop play>>
<<set $passes to $passes+5>>
<<set $defense to $defense+5>>
<<set $tirs to $tirs+3>>
<<set $physique to $physique+3>>
<<set $charisme to $charisme+2>><html>
<img src="images/agent1.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">Bon, pas mal pour un amateur… Mais c’est que le début, prends pas la grosse tête gamin ! En tout cas tu as tapé dans l’oeil de trois recruteurs, va voir leur offre de plus près :</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Lyon Duchère|Lyon Duchère]]</div>
<div class="rep">[[FC Apéro|FC Apéro]]</div>
<div class="rep">[[Red Star|Red star]]</div>
<<audio "jeu1" stop>>
<<audio "club1" loop play>>
<<set $passes to $passes+10>>
<<set $defense to $defense+10>>
<<set $tirs to $tirs+5>>
<<set $physique to $physique+5>>
<<set $charisme to $charisme+5>>''__SITUATION ACTUELLE :__''
- Saison : $saison
- Club : $club
- Salaire : $salaire € par mois
''__CARACTERISTIQUES :__''
<div class="carac">- Passes : $passes
- Défense : $defense
- Tirs : $tirs
- Dribbles : $dribbles
- Physique : $physique
- Charisme : $charisme</div><html>
<img src="images/agent1.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">Lyon Duchère te propose 1 an de contrat avec un salaire de 3000€ par mois. En prime, ils ont proposé de t'offrir une Twingo RS.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Victoire 1" class="bouton" type="button">Voir les autres offres</button>
<button data-passage="Choix Lyon D" class="bouton" type="button">Ok je fonce !</button><html>
<img src="images/agent1.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">Le FC Apéro te propose 1 an de contrat avec un salaire de 3200€ par mois. En prime, ils ont proposé de t'offrir un pack de bière.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Victoire 1" class="bouton" type="button">Voir les autres offres</button>
<button data-passage="Choix FC Apéro" class="bouton" type="button">Ok je fonce !</button><html>
<img src="images/agent1.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">Le Red Star te propose 1 an de contrat avec un salaire de 3000€ par mois. Tu auras en plus une prime à la signature de 10 000€.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Victoire 1" class="bouton" type="button">Voir les autres offres</button>
<button data-passage="Choix Red Star" class="bouton" type="button">Ok je fonce !</button><html>
<img src="images/agent1.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">Le SC Schiltigheim te propose 1 an de contrat avec un salaire de 1500€ par mois. En prime, ils t'ont proposé un accès illimité all-inclusive à la boîte de nuit de Schiltigheim un samedi par mois. Ils notent qu'ils ont de bonnes relations avec le Racing Club de Strasbourg qui est à proximité.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Défaite 1" class="bouton" type="button">Voir les autres offres</button>
<button data-passage="Choix SCS" class="bouton" type="button">Ok je fonce !</button><html>
<img src="images/agent1.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">Le FC Dancefloor te propose 1 an de contrat avec un salaire de 2000€ par mois. En prime, ils t'offrent 50% de réduction sur les cocktails du FC Dancefloor Club Disco.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Défaite 1" class="bouton" type="button">Voir les autres offres</button>
<button data-passage="Choix FC Dancefloor" class="bouton" type="button">Ok je fonce !</button><html>
<img src="images/agent1.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">L'Association Sportive Yzeure 03 Auvergne te propose 1 an de contrat avec un salaire de 1500€ par mois. En prime, ils t'ont proposé 1 d'abonnement gratuit à la salle de fitness.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Défaite 1" class="bouton" type="button">Voir les autres offres</button>
<button data-passage="Choix ASY03A" class="bouton" type="button">Ok je fonce !</button><html>
<img src="images/agent3.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">Super décision, tu auras toutes tes chances pour faire tes preuves. C'est un vrai tremplin pour le monde professionnel. Ne me déçois pas ! Bon... Je ne t'ai pas tout dit. Le président veut te rencontrer, je crois qu'il veut discuter plus en détails de ton salaire.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Rencontre président" class="bouton" type="button">Aller voir le président de votre nouveau club</button>
<<set $club to "Lyon Duchère">>
<<set $salaire to 3000>><html>
<img src="images/agent2.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">J’aime bien ton sens de l’humour, mais dans le monde du football, soit tu es sérieux et rigoureux pour être le meilleur, soit tu te laisses aller et tu sombreras dans l’ombre du football… Regarde, les autres offres qui sont plus intéressantes. Allez, change rapidement ce qui pourrait être une erreur fatale…</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Retour Victoire 1" class="bouton" type="button">Voir les autres offres...</button>
<<audio "énervé" play>><html>
<img src="images/agent3.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">Super décision, tu auras toutes tes chances pour faire tes preuves. C'est un vrai tremplin pour le monde professionnel. Ne me déçois pas ! Bon... Je ne t'ai pas tout dit. Le président veut te rencontrer, je crois qu'il veut discuter plus en détails de ton salaire.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Rencontre président" class="bouton" type="button">Aller voir le président de votre nouveau club</button>
<<set $club to "Red Star">>
<<set $salaire to 3000>><html>
<img src="images/agent2.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">J’aime bien ton sens de l’humour, mais dans le monde du football, soit tu es sérieux et rigoureux pour être le meilleur, soit tu te laisses aller et tu sombreras dans l’ombre du football… Regarde, le SC Schiltigheim te propose un accès gratuit en boîte 1 fois chaque mois. C’est déjà un choix plus raisonné, je te conseille de rapidement changer ce qui pourrait être une erreur fatale…</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Retour Défaite 1" class="bouton" type="button">Voir les autres offres...</button>
<<audio "énervé" play>><html>
<img src="images/agent3.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">Ma foi… à Schiltigheim, tu seras pas loin de la Meinau pour mater les matchs du RC Strasbourg ! Je compterai sur ton sérieux cette saison. La boite de nuit de Schiltigheim n’est pas ta deuxième maison. Bon... Je ne t'ai pas tout dit. Le président veut te rencontrer, je crois qu'il veut discuter plus en détails de ton salaire.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Rencontre président" class="bouton" type="button">Aller voir le président de votre nouveau club</button>
<<set $club to "SC Schiltigheim">>
<<set $salaire to 1500>><html>
<img src="images/agent3.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">Sage décision, tu auras toutes tes chances pour faire tes preuves, ne me déçois pas ! Bon... Je ne t'ai pas tout dit. Le président veut te rencontrer, je crois qu'il veut discuter plus en détails de ton salaire.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Rencontre président" class="bouton" type="button">Aller voir le président de votre nouveau club</button>
<<set $club to "AS Yzeure 03A">>
<<set $salaire to 1500>><html>
<img src="images/agent1.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">Allez, déconne pas et choisis un des 2 autres clubs qui seront bien plus intéressants pour ta carrière :</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Lyon Duchère|Lyon Duchère 2]]</div>
<div class="rep">[[Red Star|Red star 2]]</div>
<html>
<img src="images/agent1.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">Lyon Duchère te propose 1 an de contrat avec un salaire de 3000€ par mois. En prime, ils ont proposé de t'offrir une Twingo RS.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Retour Victoire 1" class="bouton" type="button">Voir toutes les offres</button>
<button data-passage="Choix Lyon D" class="bouton" type="button">Ok je fonce !</button><html>
<img src="images/agent1.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">Le Red Star te propose 1 an de contrat avec un salaire de 3000€ par mois. Tu auras en plus une prime à la signature de 10 000€.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Retour Victoire 1" class="bouton" type="button">Voir toutes les offres</button>
<button data-passage="Choix Red Star" class="bouton" type="button">Ok je fonce !</button><html>
<img src="images/agent1.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">Allez, déconne pas et choisis un des 2 autres clubs qui seront bien plus intéressants pour ta carrière :</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[SC Schiltigheim|SC Schiltigheim 2]]</div>
<div class="rep">[[Association Sportive Yzeure 03 Auvergne|Association Sportive Yzeure 03 Auvergne 2]]</div>
<html>
<img src="images/agent1.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">Le SC Schiltigheim te propose 1 an de contrat avec un salaire de 1500€ par mois. En prime, ils t'ont proposé un accès illimité all-inclusive à la boîte de nuit de Schiltigheim un samedi par mois. Ils notent qu'ils ont de bonnes relations avec le Racing Club de Strasbourg qui est à proximité.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Retour Défaite 1" class="bouton" type="button">Voir toutes les offres</button>
<button data-passage="Choix SCS" class="bouton" type="button">Ok je fonce !</button>
<html>
<img src="images/agent1.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">L'Association Sportive Yzeure 03 Auvergne te propose 1 an de contrat avec un salaire de 1500€ par mois. En prime, ils t'ont proposé 1 d'abonnement gratuit à la salle de fitness.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Retour Défaite 1" class="bouton" type="button">Voir toutes les offres</button>
<button data-passage="Choix ASY03A" class="bouton" type="button">Ok je fonce !</button><html>
<img src="images/prez1.jpg" alt="Président">
<div id="test" class="dialogue">
<textarea id="sp">Bonjour mon grand. Si je t'ai fait venir ici c'est tout d'abord pour te souhaiter la bienvenue au club. BON !!! Je ne vais pas passer par 4 chemins. Je considère que tout talent footballistique doit être complété par une connaissance fine de l’histoire du football. Alors tu vas devoir répondre à THE QCM ! A chaque bonne réponse, je suis prêt à augmenter ton salaire de 50€. Par contre, j’espère que tu as bien révisé tes fiches parce que chaque mauvaise réponse te coûtera 100€ de ton salaire. T'es prêt ?!</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[QCQUOI ?!|QCQUOI]]</div>
<div class="rep">[[Répondre au QCM sans poser plus de questions|QCM]]</div>
<html>
<img src="images/prez1.jpg" alt="Président">
<div id="test" class="dialogue">
<textarea id="sp">Un QCM petit... Concentre-toi et réponds à mes questions si tu ne veux pas perdre ton salaire. Tu vas aussi pouvoir l'augmenter alors râle pas !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[QCQUOI ?!|QCQUOI2]]</div>
<div class="rep">[[Répondre finalement au QCM sans poser plus de questions|QCM]]</div>
<html>
<img src="images/prez1.jpg" alt="Président">
<div id="test" class="dialogue">
<textarea id="sp">PREMIERE QUESTION : Ton objectif c'est d'avoir le Ballon d'Or pas vrai ?! Alors ce sera le thème de ce quiz ! Alors... En quelle année a-t-il été créé ?!</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[En 1956|GoodAnswer1]]</div>
<div class="rep">[[En 1972|BadAnswer1]]</div>
<div class="rep">[[En 1998|BadAnswer1]]</div><html>
<img src="images/prez1.jpg" alt="Président">
<div id="test" class="dialogue">
<textarea id="sp">Mauvaise réponse c'était en 1956. Eh ben, ça commence mal... Deuxième question, même thème : Qui fût le premier lauréat du Ballon d'Or ?! Tu vas pas la trouver celle là !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Raymond Kopa|BadAnswer2]]</div>
<div class="rep">[[Stanley Matthews|GoodAnswer2]]</div>
<div class="rep">[[Alfredo di Stefano|BadAnswer2]]</div>
<<set $salaire to $salaire-100>><html>
<img src="images/prez1.jpg" alt="Président">
<div id="test" class="dialogue">
<textarea id="sp">Bonne réponse !!! Deuxième question, même thème : Qui fût le premier lauréat du Ballon d'Or ?! Tu vas pas la trouver celle là !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Raymond Kopa|BadAnswer2]]</div>
<div class="rep">[[Stanley Matthews|GoodAnswer2]]</div>
<div class="rep">[[Alfredo di Stefano|BadAnswer2]]</div>
<<set $salaire to $salaire+50>>
<<set $charisme to $charisme+1>><html>
<img src="images/prez1.jpg" alt="Président">
<div id="test" class="dialogue">
<textarea id="sp">Ok bonne réponse... A croire que t'es pas trop mauvais finalement ! Troisième question et toujours le même thème : Le premier français à avoir obtenu le Ballon d'Or est...</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Raymond Kopa|GoodAnswer3]]</div>
<div class="rep">[[Just Fontaine|BadAnswer3]]</div>
<div class="rep">[[Michel Platini|BadAnswer3]]</div>
<<set $salaire to $salaire+50>>
<<set $charisme to $charisme+1>><html>
<img src="images/prez1.jpg" alt="Président">
<div id="test" class="dialogue">
<textarea id="sp">M'ouais... Ok bonne réponse on continue. Je suis sûr que tu t'y connais pas en football féminin. Alors toujours dans le même thème, en quelle année a été inventé le Ballon d'Or pour les féminines ?</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[En 2012|BadAnswer4]]</div>
<div class="rep">[[En 2014|BadAnswer4]]</div>
<div class="rep">[[En 2018|GoodAnswer4]]</div>
<<set $salaire to $salaire+50>>
<<set $charisme to $charisme+1>><html>
<img src="images/prez1.jpg" alt="Président">
<div id="test" class="dialogue">
<textarea id="sp">Bon j'ai rien dit, t'as l'air de t'y connaître un peu finalement. On va bien voir ça avec cette ULTIME et DERNIERE question. Qui était l'heureuse élue de ce premier Ballon d'Or féminin ?</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Megan Rapinoe|BadAnswer5]]</div>
<div class="rep">[[Ada Hegerberg|GoodAnswer5]]</div>
<div class="rep">[[Amandine Henry|BadAnswer5]]</div>
<<set $salaire to $salaire+50>>
<<set $charisme to $charisme+1>><html>
<img src="images/prez1.jpg" alt="Président">
<div id="test" class="dialogue">
<textarea id="sp">Bonne réponse ! Ce sera tout pour moi. Tu peux aller voir tes nouveaux coéquipiers, ils t'attendent au vestiaire. J'en ai oublié mes repères avec toutes ces questions. J'espère que ton nouveau salaire te conviendra... Allez, à bientôt !
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Foncer tête baissée aux vestiaires|Tête baissée]]</div>
<div class="rep">[[Demander à votre agent où sont les vestiaires|Demander]]</div>
<<set $salaire to $salaire+50>>
<<set $charisme to $charisme+1>><html>
<img src="images/prez1.jpg" alt="Président">
<div id="test" class="dialogue">
<textarea id="sp">Ok... Mauvaise réponse c'était Stanley Matthews... Bof bof tout ça. Allez, troisième question et toujours le même thème : Le premier français à avoir obtenu le Ballon d'Or est...</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Raymond Kopa|GoodAnswer3]]</div>
<div class="rep">[[Just Fontaine|BadAnswer3]]</div>
<div class="rep">[[Michel Platini|BadAnswer3]]</div>
<<set $salaire to $salaire-100>><html>
<img src="images/prez1.jpg" alt="Président">
<div id="test" class="dialogue">
<textarea id="sp">Bon eh bien j'avais raison t'as pas l'air de t'y connaître ! Mauvaise réponse, c'était en 2018... On va bien voir si tu arrives à te rattraper avec cette ULTIME et DERNIERE question. Qui était l'heureuse élue de ce premier Ballon d'Or féminin ?</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Megan Rapinoe|BadAnswer5]]</div>
<div class="rep">[[Ada Hegerberg|GoodAnswer5]]</div>
<div class="rep">[[Amandine Henry|BadAnswer5]]</div>
<<set $salaire to $salaire-100>><html>
<img src="images/prez1.jpg" alt="Président">
<div id="test" class="dialogue">
<textarea id="sp">M'ouais... Ou plutôt non. Mauvaise réponse, c'était Raymond Kopa ! Ok on continue. Je suis sûr que tu t'y connais pas en football féminin. Alors toujours dans le même thème, en quelle année a été inventé le Ballon d'Or pour les féminines ?</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[En 2012|BadAnswer4]]</div>
<div class="rep">[[En 2014|BadAnswer4]]</div>
<div class="rep">[[En 2018|GoodAnswer4]]</div>
<<set $salaire to $salaire-100>><html>
<img src="images/prez1.jpg" alt="Président">
<div id="test" class="dialogue">
<textarea id="sp">HA ! Mauvaise réponse c'était Ada Hegerberg ! Bof bof gamin... Perfectionne toi encore sur la culture footballistique. Ce sera tout pour moi. Tu peux aller voir tes nouveaux coéquipiers, ils t'attendent au vestiaire. J'en ai oublié mes repères avec toutes ces questions. J'espère que ton nouveau salaire te conviendra... Allez, à bientôt !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Foncer tête baissée aux vestiaires|Tête baissée]]</div>
<div class="rep">[[Demander à votre agent où sont les vestiaires|Demander]]</div>
<<set $salaire to $salaire-100>><html>
<img src="images/prez1.jpg" alt="Président">
<div id="test" class="dialogue">
<textarea id="sp">Un QCM petit... Concentre-toi et réponds à mes questions si tu ne veux pas perdre ton salaire. Tu vas aussi pouvoir l'augmenter alors râle pas !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[QCQUOI ?!|QCQUOI3]]</div>
<div class="rep">[[Répondre au QCM sans poser plus de questions|QCM]]</div><html>
<img src="images/prez1.jpg" alt="Président">
<div id="test" class="dialogue">
<textarea id="sp">Bon... T'es idiot ou quoi ? Je t'ai déjà expliqué 3 fois. Allez, réponds à mes questions, de toute façon t'as pas le choix.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Répondre finalement au QCM sans poser plus de questions|QCM]]
</div><html>
<img src="images/agent4.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">Pas si vite ! Déjà, bienvenue dans ton nouveau club. Cependant, j’espère que tu n’as pas oublié ton objectif et que ce QCM te l’a rappelé… Le ballon d’or ! Si tu en es arrivé là, c’est que tu es un joueur avec un potentiel d’exception, tu vas maintenant devoir faire tes preuves. Ca passe en premier par ton assiduité et ta rigueur à l’entraînement, c’est maintenant que ça va vraiment commencer ! Laisse moi t’emmener aux vestiaires, sinon tu vas encore te perdre !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Vestiaires" class="bouton" type="button">Direction les vestiaires</button>
<html>
<img src="images/agent4.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">Je t’y emmène ! Je tiens quand même à te souhaiter la bienvenue dans ton nouveau club. Cependant, j’espère que tu n’as pas oublié ton objectif et que ce QCM te l’a rappelé… Le ballon d’or ! Si tu en es arrivé là, c’est que tu es un joueur avec un potentiel d’exception, tu vas maintenant devoir faire tes preuves. Ca passe en premier par ton assiduité et ta rigueur à l’entraînement, c’est maintenant que ça va vraiment commencer !
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Vestiaires" class="bouton" type="button">Direction les vestiaires</button><html>
<img src="images/equipe1.jpg" alt="Equipe vestiaire">
<div id="test" class="dialogue">
<textarea id="sp">Hé toi ! T’es qui !? Tu t’es perdu ? Les tribunes des spectateurs c’est là-bas !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Vestiaires2" class="bouton" type="button">??!!</button>
<<audio "bouh" volume 1 play>><html>
<img src="images/equipe2.jpg" alt="Equipe vestiaire">
<div id="test" class="dialogue">
<textarea id="sp"> Euh ouais j’crois que t’as pas bien saisi ou tu te trouvais, un peu de respect toi ! </textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Faire le prétentieux : "Je crois que tu ne sais manifestement pas à qui tu t’adresses… Tu as devant toi le futur meilleur joueur du monde ! Tu vas voir de quoi je suis capable."|Prétentieux]]</div>
<div class="rep">[[Etre amical : "Salut, je suis ton nouveau coéquipier, ravi de te rencontrer !"|Amical]]</div>
<div class="rep">[[Etre provocateur : "Tu feras moins le malin quand tu me regarderas marquer depuis le banc de touche..."|Provocateur]]</div>
<<audio "bouh" volume 1 play>><html>
<img src="images/coach1_team1.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">OOOOHHHH !!! Arrêtez de bavarder là-bas, on commence l’entraînement maintenant !!! Aujourd'hui, on va faire du jeu, du jeu et encore du jeu ! Répartissez-vous en 3 équipes, celle qui prend un but sort du terrain et l’équipe qui est en attente la remplace. EXECUTION ! </textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Pré-Entrainement" class="bouton" type="button">Aller s'entrainer</button>
<<audio "énervé" play>>
<<set $mood to "Amical">>
<<set $charisme to $charisme+3>><html>
<img src="images/coach1_team1.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">OOOOHHHH !!! Arrêtez de bavarder là-bas, on commence l’entraînement maintenant !!! Aujourd'hui, on va faire du jeu, du jeu et encore du jeu ! Répartissez-vous en 3 équipes, celle qui prend un but sort du terrain et l’équipe qui est en attente la remplace. EXECUTION ! </textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Pré-Entrainement" class="bouton" type="button">Aller s'entrainer</button>
<<set $mood to "Provocateur">>
<<audio "énervé" play>>
<<set $charisme to $charisme+2>><html>
<img src="images/coach1_team1.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">OOOOHHHH !!! Arrêtez de bavarder là-bas, on commence l’entraînement maintenant !!! Aujourd'hui, on va faire du jeu, du jeu et encore du jeu ! Répartissez-vous en 3 équipes, celle qui prend un but sort du terrain et l’équipe qui est en attente la remplace. EXECUTION ! </textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Pré-Entrainement" class="bouton" type="button">Aller s'entrainer</button>
<<audio "énervé" play>>
<<set $mood to "Prétentieux">>
<<set $charisme to $charisme+1>><canvas id="jeu2" width="400" height="500">Navigateur non supporté</canvas>
<button onclick="myStopFunction()" class="bouton" id="stop">Continuer</button>
<script>
// On cahce l'affichage à la fin en fonction de victoire ou défaite
document.getElementById("stop").style.display="none";
document.getElementById("victoire").style.display="none";
document.getElementById("defaite").style.display="none";
// Recuperation de l'élement canvas et redimensionnement
var canvas = document.getElementById("jeu2");
// L'objet canvas
var ctx = canvas.getContext('2d');
// Les images
var DOODLE_IMG = new Image();
var PLATEFORME_IMG = new Image();
var FOND_IMG = new Image();
var FIN_IMG = new Image();
FOND_IMG.src = "images/fond_doodle.jpg"
DOODLE_IMG.src = "images/Doodle.png";
PLATEFORME_IMG.src = "images/plateforme.png";
FIN_IMG.src = "images/fin_doodle.jpg"
// Les Constantes
var APESANTEUR = 2;
var yMax = 0;
var yCurrent = 0;
var currentPoint = 0;
var rightPressed = false;
var leftPressed = false;
var lives = 3 ;
// Gestion du clavier
document.addEventListener("keydown", keyDownHandler, false);
document.addEventListener("keyup", keyUpHandler, false);
function keyDownHandler(e) {
if(e.keyCode == 39) {
rightPressed = true;
}
else if(e.keyCode == 37) {
leftPressed = true;
}
}
function keyUpHandler(e) {
if(e.keyCode == 39) {
rightPressed = false;
}
else if(e.keyCode == 37) {
leftPressed = false;
}
}
// Classe de Doodle (mouvement, taille...)
function Doodle() {
this.width = 60;
this.height = 80;
this.x = 195;
this.y = 500;
this.speed = 0;
this.print = function() {
ctx.drawImage(DOODLE_IMG, this.x, this.y);
}
this.jump = function(initSpeed) {
this.speed = initSpeed;
} ;
this.go = function() {
// Déplacement
if(rightPressed && (this.x < 340)) {
this.x += 15;
} else if (leftPressed && (this.x > 0)) {
this.x -= 15;
}
this.y = this.y - this.speed
// Gestion des colisions
colisionManage(this);
this.speed -= APESANTEUR;
this.print();
// Doodle sort du jeu :
if (this.speed<-50) {
lives--;
this.jump(75) ;
}
} ;
}
// Plateformes
function Plateforme(x, y) {
this.x = x;
this.y = y;
this.width = 100;
this.height = 15;
this.print = function() {
ctx.drawImage(PLATEFORME_IMG, this.x, this.y);
}
}
function printPlateformes(pf) {
for(var i = 0, to = pf.length; i < to; i++) {
pf[i].print();
}
}
function colisionManage(doodle) {
var pf = plateformes;
for(var i = 0, to = pf.length ; i < to ; i++) {
var info = '';
if((doodle.x >= pf[i].x && doodle.x <= (pf[i].x + pf[i].width)) || ((doodle.x + doodle.width) >= pf[i].x && (doodle.x + doodle.width) <= (pf[i].x + pf[i].width))) {
if(((doodle.y + doodle.height) >= pf[i].y && (doodle.y + doodle.height) <= (pf[i].y + pf[i].height))) {
if(doodle.speed < 0) {
doodle.jump(30);
}
}
}
}
}
function upPlateformes(up) {
var pf = plateformes;
var continuer = true;
for(var i = 0, to = pf.length; i < to; i++) {
pf[i].y += up;
}
while(continuer == true) {
if(pf[0].y >= 500) {
pf.shift();
} else {
continuer = false;
}
}
}
function createPlateformes(begin, end) {
var continuer = true;
if(yMax <= 2500) {
if(begin == 0) {
plateformes.push(new Plateforme(150, 585));
}
while(continuer == true) {
var y = rand(yMax+50, yMax+100);
var x = rand(0, 350);
yMax = y;
y = 500-y;
plateformes.push(new Plateforme(x, y));
if(yMax >= end) {
continuer = false;
}
}
} else {
while(continuer == true) {
var y = rand(yMax+100, yMax+160);
var x = rand(0, 350);
yMax = y;
y = 500-y;
plateformes.push(new Plateforme(x, y));
if(yMax <= end) {
continuer = false;
}
}
}
}
// Affichage du score :
function drawScore() {
ctx.font = "bold 21px Arial";
ctx.fillStyle = "#000000";
ctx.fillText("SCORE : "+currentPoint, canvas.width/2-185, 21);
}
function addPoint(point) {
currentPoint += point;
}
// Affichage des vies :
function drawLives() {
ctx.font = "bold 21px Arial";
ctx.fillStyle = "#000000";
ctx.fillText("VIES : "+lives, canvas.width/2+5, 21);
}
// Fond pour l'affichage des vies et du score
function drawContour() {
ctx.fillStyle = "#051545";
ctx.fillRect(canvas.width/2-195, 0, 295, 31);
}
function drawAffiche() {
ctx.fillStyle = "#ffffff";
ctx.fillRect(canvas.width/2-190, 0, 285, 26);
}
// On met à jour le fond
function rand(min, max) {
return Math.floor(Math.random() * (max - min + 1) + min);
}
function sceneUp() {
var up = Math.floor((heros.y + 250) / 10);
addPoint(up);
heros.y += up;
upPlateformes(up);
}
function go() {
if (lives>0 && currentPoint<5000) {
ctx.drawImage(FOND_IMG, 0, 0);
printPlateformes(plateformes);
heros.go();
if(heros.y <= 250) {
sceneUp();
}
drawContour();
drawAffiche();
drawScore();
drawLives();
} else {
ctx.drawImage(FIN_IMG, 0, 0);
document.getElementById("stop").style.display="block";
}
}
// C'est parti
var plateformes = new Array();
var heros = new Doodle();
createPlateformes(0, 100000);
heros.print();
heros.jump(30);
jeuRepeat = setInterval(go, 50);
function myStopFunction() {
clearInterval(jeuRepeat);
document.getElementById("jeu2").style.display="none";
document.getElementById("stop").style.display="none";
if(currentPoint>=5000){
document.getElementById("victoire").style.display="block";
} else {
document.getElementById("defaite").style.display="block";
}
}
</script>
<div id="victoire">Tu sembles avoir surpris tes coéquipiers ainsi que ton coach. Bravo ! Ton agent t'attend pour un débriefing.
<button data-passage="Victoire 2" class="bouton" type="button">Continuer</button></div>
<div id="defaite">Il semblerait que tu aies fait mauvaise impression... A toi de rectifier le tir. Ton agent t'attend pour un débriefing
<button data-passage="Défaite 2" class="bouton" type="button">Continuer</button></div><html>
<img src="images/agent6.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">Très bien petit, tu as exactement fait ce qu’il fallait pour un premier entraînement. Tes coéquipiers ont l’air de montrer un certain respect pour toi ! C’est plutôt une bonne nouvelle ! Fonce, ils t’attendent là-bas !
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="CoéquipiersV" class="bouton" type="button">Aller voir mes coéquipiers</button>
<<set $dribbles to $dribbles+10>>
<<set $physique to $physique+5>>
<<set $tirs to $tirs+3>>
<<audio "doodle" stop>>
<<audio "goal" loop play>><html>
<img src="images/agent5.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">Bon… il nous reste pas mal de chemin à parcourir. Tu viens de perdre beaucoup de popularité auprès de tes coéquipiers. Mais pas de panique… Tu as le premier match de la saison pour te rattraper, alors d’ici là, à toi de progresser pour montrer que tu es le meilleur, je vais t’y aider.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="CoéquipiersD" class="bouton" type="button">Aller voir mes coéquipiers</button>
<<set $dribbles to $dribbles+5>>
<<set $physique to $physique+3>>
<<set $tirs to $tirs+1>>
<<audio "doodle" stop>>
<<audio "goal" loop play>><html>
<img src="images/agent5.jpg" alt="Agent">
<div id="test" class="dialogue">
<textarea id="sp">Je ne m’attendais pas à des débuts comme ça dans le vestiaire, j’ai tout entendu. Impressionne-les sur le terrain et tout va bien se passer. Je connais un peu ce coach. Pendant l'entraînement, tu vas devoir sauter, sauter et encore sauter. Pour ça, aide toi des flèches de ton clavier. Tu auras 3 chances. Pendant ces 3 chances il va falloir que tu cumules 5000 points. Sinon, il ne sera sûrement pas satisfait de te performance.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Entrainement" class="bouton" type="button">---------------- START ----------------</button>
<<audio "club1" stop>>
<<audio "doodle" loop play>><<if $mood is "Amical">>
<html>
<img src="images/joueurteam1.jpg" alt="Joueur">
<div id="test" class="dialogue">
<textarea id="sp">Tu as bien joué pour ton premier entraînement ! Respect ! </textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Et t’as encore rien vu !|Repos1]]</div>
<div class="rep">[[Trop sympa ! Merci !|Repos2]]</div>
<<set $charisme to $charisme+1>>
<<endif>>
<<if $mood is "Prétentieux">>
<html>
<img src="images/joueurteam1.jpg" alt="Joueur">
<div id="test" class="dialogue">
<textarea id="sp">Et ben dis donc ! Je vois que tu faisais le modeste quand tu prétendais gagner 3 ballons d’or… Tu as bien joué pour ton premier entraînement ! Respect !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Et t’as encore rien vu !|Repos1]]</div>
<div class="rep">[[Trop sympa ! Merci !|Repos2]]</div>
<<set $charisme to $charisme+5>>
<<endif>>
<<if $mood is "Provocateur">>
<html>
<img src="images/joueurteam1.jpg" alt="Joueur">
<div id="test" class="dialogue">
<textarea id="sp">Pas mal le nouveau, mais tu vas commencer par chauffer le banc de touche.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Et t’as encore rien vu !|Repos1]]</div>
<div class="rep">[[Trop sympa ! Merci !|Repos2]]</div>
<<set $charisme to $charisme+2>>
<<endif>>
<<if $mood is "Amical">>
<html>
<img src="images/joueurteam1.jpg" alt="Joueur">
<div id="test" class="dialogue">
<textarea id="sp">Tu as bien joué pour ton premier entraînement ! Respect ! </textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[T’as encore rien vu ! Tu vas voir je suis bien meilleur que toi|Repos3]]</div>
<div class="rep">[[Ca peut arriver de pas être en forme. Je serai meilleur la prochaine fois|Repos3]]</div>
<<endif>>
<<if $mood is "Prétentieux">>
<html>
<img src="images/joueurteam1.jpg" alt="Joueur">
<div id="test" class="dialogue">
<textarea id="sp">Et ben dis donc ! Je vois que tu faisais le modeste quand tu prétendais gagner 3 ballons d’or… Tu as bien joué pour ton premier entraînement ! Respect !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[T’as encore rien vu ! Tu vas voir je suis bien meilleur que toi|Repos3]]</div>
<div class="rep">[[Ca peut arriver de pas être en forme. Je serai meilleur la prochaine fois|Repos3]]</div>
<<endif>>
<<if $mood is "Provocateur">>
<html>
<img src="images/joueurteam1.jpg" alt="Joueur">
<div id="test" class="dialogue">
<textarea id="sp">Pas mal le nouveau, mais tu vas commencer par chauffer le banc de touche.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[T’as encore rien vu ! Tu vas voir je suis bien meilleur que toi|Repos3]]</div>
<div class="rep">[[Ca peut arriver de pas être en forme. Je serai meilleur la prochaine fois|Repos3]]</div>
<<endif>>
<html>
<img src="images/intro.jpg" alt="texte de début d'aventure">
<div id="test" class="dialogue">
<textarea id="sp">Quelle journée ! Quoi qu’il en soit, tu peux encore faire mieux. Il reste encore 3 jours avant le premier match. Compte sur moi pour te pousser jusqu’au bout ! Allez repose toi bien, continue tes entrainements et tout se passera bien
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
//var audio = new Audio('sons/clavier.mp3');
function Write(){
//audio.play();
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="1erMatchOff" class="bouton" type="button">Avancer jusqu'au premier match</button>
<<set $charisme to $charisme+2>><html>
<img src="images/intro.jpg" alt="texte de début d'aventure">
<div id="test" class="dialogue">
<textarea id="sp">Quelle journée ! Quoi qu’il en soit, tu peux encore faire mieux. Il reste encore 3 jours avant le premier match. Compte sur moi pour te pousser jusqu’au bout ! Allez repose toi bien, continue tes entrainements et tout se passera bien
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
//var audio = new Audio('sons/clavier.mp3');
function Write(){
//audio.play();
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="1erMatchOff" class="bouton" type="button">Avancer jusqu'au premier match</button>
<<set $charisme to $charisme+1>><html>
<img src="images/intro.jpg" alt="texte de début d'aventure">
<div id="test" class="dialogue">
<textarea id="sp">Quelle journée ! Quoi qu’il en soit, tu peux encore faire mieux. Il reste encore 3 jours avant le premier match. Compte sur moi pour te pousser jusqu’au bout ! Allez repose toi bien, continue tes entrainements et tout se passera bien
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
//var audio = new Audio('sons/clavier.mp3');
function Write(){
//audio.play();
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="1erMatchOff" class="bouton" type="button">Avancer jusqu'au premier match</button><html>
<img src="images/CoachMatch1.jpg" alt="Discours coach">
<div id="test" class="dialogue">
<textarea id="sp">Bon les gars !!! Pour l’instant on garde la compo habituelle. Quant à toi le nouveau, tu seras sur le banc pour ton premier match, mais je compte sur toi quand tu vas rentrer.
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Montrer son mécontentement|Mécontentement]]</div>
<div class="rep">[[Ne pas broncher|PasBroncher]]</div><html>
<img src="images/CoachMatch1.jpg" alt="Discours coach">
<div id="test" class="dialogue">
<textarea id="sp">Et surtout, calme toi ! Sinon tu ne vas pas rentrer.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="1erMatchOffMiTemps" class="bouton" type="button">Regarder le début du match depuis le banc</button><html>
<img src="images/CoachMatch1-2.jpg" alt="Discours coach">
<div id="test" class="dialogue">
<textarea id="sp">Ne t’en fais pas, tu es ma botte secrète et je compte vraiment sur toi.
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="1erMatchOffMiTemps" class="bouton" type="button">Regarder le début du match depuis le banc</button>
<<set $charisme to $charisme+1>><html>
<img src="images/agentMiTemps1.jpg" alt="Agent au bord du terrain">
<div id="test" class="dialogue">
<textarea id="sp">Bien, du fait d’une forte accélération de l’espace temps et de la mauvaise performance de ton équipe, 45 minutes se sont écoulées. Le coach a l’air désespéré et sans grand espoir. Je crois qu’il va t’envoyer directement à l’échauffement. Prépare toi à rentrer sur le terrain. Et n’oublie pas, ce sont toujours les premières impressions qui sont les plus importantes, allez FONCE !
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="1erMatchOffMiTemps2" class="bouton" type="button">Regagner les vestiaires</button><html>
<img src="images/CoachMatch1.jpg" alt="Discours coach">
<div id="test" class="dialogue">
<textarea id="sp">NUL NUL NUL ! LES GARS !!! 2-0… J’aurais honte si j’étais vous parce qu’avec une telle performance on mériterait de perdre 7-0. Allez le nouveau, échauffe-toi tu vas rentrer directement. TON DERNIER ENTRAÎNEMENT VA TE SERVIR !
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Tout donner à l’échauffement pour être en pleine forme|EchauffementSerieux]]</div>
<div class="rep">[[S’économiser pour être en pleine forme aussi|EchauffementDemi]]</div><html>
<img src="images/CoachMatch1-3.jpg" alt="Agent au bord du terrain">
<div id="test" class="dialogue">
<textarea id="sp">C’est bien bon échauffement ! Mais te crame pas trop tout de suite…</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="JeuPremierMatchOf" class="bouton" type="button">Faire son entrée sur le terrain</button>
<<set $physique to $physique+1>><html>
<img src="images/CoachMatch1-3.jpg" alt="Agent au bord du terrain">
<div id="test" class="dialogue">
<textarea id="sp">Euh… C’était quoi cet échauffement ? Réveille toi, sinon j’hésiterai pas à te sortir aussi vite que tu es rentré !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="JeuPremierMatchOf" class="bouton" type="button">Faire son entrée sur le terrain</button><canvas id="jeu2" width="400" height="500">Navigateur non supporté</canvas>
<button onclick="myStopFunction()" class="bouton" id="stop">Continuer</button>
<script>
// On cache l'affichage à la fin en fonction de victoire ou défaite
document.getElementById("stop").style.display="none";
document.getElementById("victoire").style.display="none";
document.getElementById("defaite").style.display="none";
// Recuperation de l'élement canvas et redimensionnement
var canvas = document.getElementById("jeu2");
// L'objet canvas
var ctx = canvas.getContext('2d');
// Les images
var DOODLE_IMG = new Image();
var PLATEFORME_IMG = new Image();
var FOND_IMG = new Image();
var FIN_IMG = new Image();
FOND_IMG.src = "images/fond_doodle.jpg"
DOODLE_IMG.src = "images/Doodle.png";
PLATEFORME_IMG.src = "images/plateforme.png";
FIN_IMG.src = "images/fin_doodle2.jpg"
// Les Constantes
var APESANTEUR = 2;
var yMax = 0;
var yCurrent = 0;
var currentPoint = 0;
var rightPressed = false;
var leftPressed = false;
var lives = 4 ;
// Gestion du clavier
document.addEventListener("keydown", keyDownHandler, false);
document.addEventListener("keyup", keyUpHandler, false);
function keyDownHandler(e) {
if(e.keyCode == 39) {
rightPressed = true;
}
else if(e.keyCode == 37) {
leftPressed = true;
}
}
function keyUpHandler(e) {
if(e.keyCode == 39) {
rightPressed = false;
}
else if(e.keyCode == 37) {
leftPressed = false;
}
}
// Classe de Doodle (mouvement, taille...)
function Doodle() {
this.width = 60;
this.height = 80;
this.x = 195;
this.y = 500;
this.speed = 0;
this.print = function() {
ctx.drawImage(DOODLE_IMG, this.x, this.y);
}
this.jump = function(initSpeed) {
this.speed = initSpeed;
} ;
this.go = function() {
// Déplacement
if(rightPressed && (this.x < 340)) {
this.x += 15;
} else if (leftPressed && (this.x > 0)) {
this.x -= 15;
}
this.y = this.y - this.speed
// Gestion des colisions
colisionManage(this);
this.speed -= APESANTEUR;
this.print();
// Doodle sort du jeu :
if (this.speed<-50) {
lives--;
this.jump(75) ;
}
} ;
}
// Plateformes
function Plateforme(x, y) {
this.x = x;
this.y = y;
this.width = 100;
this.height = 15;
this.print = function() {
ctx.drawImage(PLATEFORME_IMG, this.x, this.y);
}
}
function printPlateformes(pf) {
for(var i = 0, to = pf.length; i < to; i++) {
pf[i].print();
}
}
function colisionManage(doodle) {
var pf = plateformes;
for(var i = 0, to = pf.length ; i < to ; i++) {
var info = '';
if((doodle.x >= pf[i].x && doodle.x <= (pf[i].x + pf[i].width)) || ((doodle.x + doodle.width) >= pf[i].x && (doodle.x + doodle.width) <= (pf[i].x + pf[i].width))) {
if(((doodle.y + doodle.height) >= pf[i].y && (doodle.y + doodle.height) <= (pf[i].y + pf[i].height))) {
if(doodle.speed < 0) {
doodle.jump(30);
}
}
}
}
}
function upPlateformes(up) {
var pf = plateformes;
var continuer = true;
for(var i = 0, to = pf.length; i < to; i++) {
pf[i].y += up;
}
while(continuer == true) {
if(pf[0].y >= 500) {
pf.shift();
} else {
continuer = false;
}
}
}
function createPlateformes(begin, end) {
var continuer = true;
if(yMax <= 2500) {
if(begin == 0) {
plateformes.push(new Plateforme(150, 585));
}
while(continuer == true) {
var y = rand(yMax+50, yMax+100);
var x = rand(0, 350);
yMax = y;
y = 500-y;
plateformes.push(new Plateforme(x, y));
if(yMax >= end) {
continuer = false;
}
}
} else {
while(continuer == true) {
var y = rand(yMax+100, yMax+160);
var x = rand(0, 350);
yMax = y;
y = 500-y;
plateformes.push(new Plateforme(x, y));
if(yMax <= end) {
continuer = false;
}
}
}
}
// Affichage du score :
function drawScore() {
ctx.font = "bold 21px Arial";
ctx.fillStyle = "#000000";
ctx.fillText("SCORE : "+currentPoint, canvas.width/2-185, 21);
}
function addPoint(point) {
currentPoint += point;
}
// Affichage des vies :
function drawLives() {
ctx.font = "bold 21px Arial";
ctx.fillStyle = "#000000";
ctx.fillText("VIES : "+lives, canvas.width/2+5, 21);
}
// Fond pour l'affichage des vies et du score
function drawContour() {
ctx.fillStyle = "#051545";
ctx.fillRect(canvas.width/2-195, 0, 295, 31);
}
function drawAffiche() {
ctx.fillStyle = "#ffffff";
ctx.fillRect(canvas.width/2-190, 0, 285, 26);
}
// On met à jour le fond
function rand(min, max) {
return Math.floor(Math.random() * (max - min + 1) + min);
}
function sceneUp() {
var up = Math.floor((heros.y + 250) / 10);
addPoint(up);
heros.y += up;
upPlateformes(up);
}
function go() {
if (lives>0 && currentPoint<10000) {
ctx.drawImage(FOND_IMG, 0, 0);
printPlateformes(plateformes);
heros.go();
if(heros.y <= 250) {
sceneUp();
}
drawContour();
drawAffiche();
drawScore();
drawLives();
} else {
ctx.drawImage(FIN_IMG, 0, 0);
document.getElementById("stop").style.display="block";
}
}
// C'est parti
var plateformes = new Array();
var heros = new Doodle();
createPlateformes(0, 100000);
heros.print();
heros.jump(30);
jeuRepeat = setInterval(go, 50);
function myStopFunction() {
clearInterval(jeuRepeat);
document.getElementById("jeu2").style.display="none";
document.getElementById("stop").style.display="none";
if(currentPoint>=5000){
document.getElementById("victoire").style.display="block";
} else {
document.getElementById("defaite").style.display="block";
}
}
</script>
<div id="victoire">Tu sembles avoir fait bonne impression. On dirait que tu as relevé le niveau de ton équipe
<button data-passage="Victoire1erMatchOf" class="bouton" type="button">Aller aux vestiaires</button></div>
<div id="defaite">Il semblerait que tu aies fait mauvaise impression... Ton équipe n'était pas non plus à la hauteur.
<button data-passage="Défaite1erMatchOf" class="bouton" type="button">Aller aux vestiaires</button></div>
<<audio "doodle" loop play>>
<<audio "goal" stop>><html>
<img src="images/coachMatch1.jpg" alt="Discours coach">
<div id="test" class="dialogue">
<textarea id="sp">C’est quoi ce bordel ! Vous n’êtes qu’une bande de bon à rien… Aucune cohésion dans cette équipe ! Heureusement que l’nouveau nous sauve la mise pour décrocher la victoire… Je peux pas tolérer un début de saison aussi laborieux, on joue un match de coupe capital dans 3 semaines, alors BOUGEZ VOUS !!!!</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Victoire1erMatchOf2" class="bouton" type="button">Prendre sa douche et rentrer</button>
<<set $passes to $passes+10>>
<<set $defense to $defense+10>>
<<set $tirs to $tirs+10>>
<<set $physique to $physique+10>>
<<set $charisme to $charisme+10>>
<<set $dribbles to $dribbles+10>><html>
<img src="images/coachMatch1.jpg" alt="Discours coach">
<div id="test" class="dialogue">
<textarea id="sp">7-0... On s’est fait détruire, super ! Ca va pas se passer comme ça toute l’année ! Techniquement : NUL ! Offensivement : NUL ! Défensivement : NUL ! NUL NUL NUL !!! Je vous rappelle qu’on a un match de coupe à jouer dans trois semaines ! Alors bougez vous !
Bon et toi le nouveau, t’as adapté ton niveau de jeu à celui de l’équipe : le niveau zéro… Y en a pas un pour rattraper l’autre ! J’me casse ! </textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Défaite1erMatchOf2" class="bouton" type="button">Prendre sa douche et rentrer</button>
<<set $passes to $passes+5>>
<<set $defense to $defense+5>>
<<set $tirs to $tirs+5>>
<<set $physique to $physique+5>>
<<set $charisme to $charisme+5>>
<<set $dribbles to $dribbles+5>>
<<audio "énervé" play>><html>
<img src="images/réveil.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Et ben heureusement que tu étais là. Tes coéquipiers sont vraiment mauvais et pas très sympas avec toi comme t’as pu le voir au dernier entraînement. Tu es le meilleur. On va vite progresser et passer cette saison pour continuer dans un meilleur club.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ReposMatch1" class="bouton" type="button">Aller se reposer</button><html>
<img src="images/réveil.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Bon il te reste la saison pour progresser… Tes coéquipiers sont vraiment mauvais en plus. On va avancer et vite partir de ce club si c’est possible à la fin de la saison.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ReposMatch1" class="bouton" type="button">Aller se reposer</button><html>
<img src="images/réveil.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Comme je t’ai dit hier, tu vas avoir une saison pour progresser. Le coach m’a appelé. Il veut que tu progresses mais il ne te connaît pas assez bien. Tu as RDV avec lui alors fonce.
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Dire que vous ne voulez pas aller au RDV|PasDeRDV]]</div>
<div class="rep">[[Foncer au RDV comme l’indique votre agent|RDV]]</div>
<<audio "doodle" stop>>
<<audio "mii" loop play>><html>
<img src="images/pasRDV.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Oh que si tu vas aller à ce RDV et je t’y emmène !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="RDV" class="bouton" type="button">Aller au RDV</button>
<html>
<img src="images/RDVcoach.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Ta première performance était pas mal. Du moins quand on voit tes coéquipiers à côté de toi. Je sais que tu ne vas pas rester longtemps ici aux vues de ton potentiel. Je vais donc te faire progresser tout au long de la saison et tu vas voir, tu te souviendras de moi ! Alors, quel type de joueur aimerais-tu être ? Cela me permettra de te faire progresser selon tes envies.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Dire que vous voulez être un fin technicien et que dribbler est votre passion|Technicien]]</div>
<div class="rep">[[Dire que vous souhaitez avant tout faire peur aux défenses et marquer des buts|Buteur]]</div>
<div class="rep">[[Dire que vous aimez servir le collectif avant tout, et que vous n’avez pas de préférences|Collectif]]</div>
<html>
<img src="images/RDVcoach.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Très bien, tu seras mon meneur de jeu. Comme je t’ai dit tu vas beaucoup progresser dans ce domaine ! J’espère que tu apprécieras ta saison à mes côtés. Bon on se retrouve plus tard !
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Technicien2" class="bouton" type="button">Remercier le coach et se tenir prêt pour les entraînements</button><html>
<img src="images/RDVcoach.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Très bien, tu seras mon attaquant de pointe. Comme je t’ai dit tu vas beaucoup progresser dans ce domaine ! J’espère que tu apprécieras ta saison à mes côtés. Bon on se retrouve plus tard !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Technicien2" class="bouton" type="button">Remercier le coach et se tenir prêt pour les entraînements</button><html>
<img src="images/RDVcoach.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Très bien, comme tu as pu le voir on manque de performance en défense, je vais donc t’orienter milieu défensif. Comme je t’ai dit tu vas beaucoup progresser dans ce domaine ! J’espère que tu apprécieras ta saison à mes côtés. Bon on se retrouve plus tard !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Collectif2" class="bouton" type="button">Remercier le coach et se tenir prêt pour les entraînements</button><html>
<img src="images/réveil.jpg">
<div id="test" class="dialogue">
<textarea id="sp">WAOUUUUUH !!!! QUELLE SAISON ! C’est passé super vite ! Et tu as fait beaucoup de progrès. Bon, tu as fait d’excellentes performances mais tu n’as pas pu maintenir ton équipe. On s’en doutait. En tout cas, tu as eu des propositions de clubs pour la saison prochaine. Allons les voir, viens dans mon bureau.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixClub2" class="bouton" type="button">Se rendre dans son bureau</button>
<<set $passes to $passes+20>>
<<set $defense to $defense+20>>
<<set $physique to $physique+10>>
<<set $charisme to $charisme+10>><html>
<img src="images/réveil.jpg">
<div id="test" class="dialogue">
<textarea id="sp">WAOUUUUUH !!!! QUELLE SAISON ! C’est passé super vite ! Et tu as fait beaucoup de progrès. Bon, tu as fait d’excellentes performances mais tu n’as pas pu maintenir ton équipe. On s’en doutait. En tout cas, tu as eu des propositions de clubs pour la saison prochaine. Allons les voir, viens dans mon bureau.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixClub2" class="bouton" type="button">Se rendre dans son bureau</button>
<<set $tirs to $tirs+20>>
<<set $physique to $physique+20>>
<<set $dribbles to $dribbles+20>><html>
<img src="images/réveil.jpg">
<div id="test" class="dialogue">
<textarea id="sp">WAOUUUUUH !!!! QUELLE SAISON ! C’est passé super vite ! Et tu as fait beaucoup de progrès. Bon, tu as fait d’excellentes performances mais tu n’as pas pu maintenir ton équipe. On s’en doutait. En tout cas, tu as eu des propositions de clubs pour la saison prochaine. Allons les voir, viens dans mon bureau.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixClub2" class="bouton" type="button">Se rendre dans son bureau</button>
<<set $passes to $passes+20>>
<<set $tirs to $tirs+20>>
<<set $dribbles to $dribbles+20>><<set $total to $dribbles + $passes + $tirs + $physique + $charisme + $defense>>
<<if $total <= 315>>
<html>
<img src="images/choixclub21.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Tu as un peu progressé cette année, mais ça aurait vraiment pu être mieux sur la durée... La ligue 1, ce sera pas pour cette fois. 2 clubs de Ligue 2 sont prêts à te recruter, c’est pas si mal ! Je te laisse regarder leurs offres de plus près</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixTFC" class="bouton" type="button">Toulouse FC</button>
<button data-passage="ChoixESTAC" class="bouton" type="button">ES Troyes AC</button>
<<else>>
<html>
<img src="images/choixclub22.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Tu as vraiment progressé cette année, c’est époustouflant... La ligue 1 mon petit, c’est maintenant ! 2 clubs de Ligue 1 sont prêts à te recruter et ça, ça n’a pas de prix ! Je te laisse regarder leurs offres de plus près, mais je t’avoue que j’ai déjà ma préférence.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixRCS" class="bouton" type="button">RC Strasbourg</button>
<button data-passage="ChoixFCM" class="bouton" type="button">FC Metz</button>
<<endif>><html>
<img src="images/choixTFC.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Le TFC vient de descendre en ligue 2. Ce sera donc un bon club même si ce n'est pas la ligue 1. Ils te proposent un salaire de 5500€, une prime à la signature de 35000€ tout ça pour un contrat de 3 ans. Alors t'en dis quoi ?</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixTFC2" class="bouton" type="button">Je fonce !</button>
<button data-passage="ChoixESTAC" class="bouton" type="button">Voir l'offre de l'ESTAC</button><html>
<img src="images/choixESTAC.jpg">
<div id="test" class="dialogue">
<textarea id="sp">L'ESTAC a manqué de peu la montée en ligue 1. Ce sera donc un bon club même si ce n'est pas encore la ligue 1. Ils te proposent un salaire de 5000€, une prime à la signature de 40000€ tout ça pour un contrat de 3 ans tout comme le TFC. Alors t'en dis quoi ?</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixESTAC2" class="bouton" type="button">Je fonce !</button>
<button data-passage="ChoixTFC" class="bouton" type="button">Voir l'offre du TFC</button><html>
<img src="images/choixTFC.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Ok tu en es sûr ?!</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixTFC3" class="bouton" type="button">Oui</button>
<button data-passage="ChoixTFC" class="bouton" type="button">Non</button><html>
<img src="images/choixTFC.jpg">
<div id="test" class="dialogue">
<textarea id="sp">En voilà un bon choix ! Allez on se revoit demain pour cette nouvelle aventure.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="DébutSaison2 2" class="bouton" type="button">Attendre le lendemain avec impatience</button>
<<set $club to "Toulouse FC">>
<<set $salaire to 5500>><html>
<img src="images/choixESTAC.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Ok tu en es sûr ?!</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixESTAC3" class="bouton" type="button">Oui</button>
<button data-passage="ChoixESTAC" class="bouton" type="button">Non</button><html>
<img src="images/choixESTAC.jpg">
<div id="test" class="dialogue">
<textarea id="sp">En voilà un bon choix ! Allez on se revoit demain pour cette nouvelle aventure.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="DébutSaison2 2" class="bouton" type="button">Attendre le lendemain avec impatience</button>
<<set $club to "ES Troyes AC">>
<<set $salaire to 5000>><html>
<img src="images/choixFCM.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Le FC Metz, ok c'est la Ligue 1, mais j'aime pas ce club. Un beau (ou pas) club sans histoire... Ils te proposent un salaire de 15000€, une prime à la signature de 50000€ tout ça pour un contrat de 3 ans. Alors t'en dis quoi ?</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixFCM2" class="bouton" type="button">Je fonce !</button>
<button data-passage="ChoixRCS" class="bouton" type="button">Voir l'offre de Strasbourg</button><html>
<img src="images/choixFCM.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Ok tu en es sûr ?! Parce que c'est vraiment nul là-bas</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixFCM3" class="bouton" type="button">Oui</button>
<button data-passage="ChoixFCM" class="bouton" type="button">Non</button><html>
<img src="images/choixFCM2.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Non mais... Tu es sûr ?!!</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixFCM4" class="bouton" type="button">Oui</button>
<button data-passage="ChoixFCM" class="bouton" type="button">Non</button><html>
<img src="images/choixRCS.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Le Racing Club de Strasbourg, c'est clairement LE TREMPLIN pour ta carrière. Un beau club historique. Ils te proposent un salaire de 20000€, une prime à la signature de 60000€ tout ça pour un contrat de 3 ans. Alors t'en dis quoi ?</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixRCS2" class="bouton" type="button">Je fonce !</button>
<button data-passage="ChoixFCM" class="bouton" type="button">Voir l'offre de Metz</button><html>
<img src="images/choixRCS.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Ok tu en es sûr ?!</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixRCS3" class="bouton" type="button">Oui</button>
<button data-passage="ChoixRCS" class="bouton" type="button">Non</button><html>
<img src="images/choixRCS.jpg">
<div id="test" class="dialogue">
<textarea id="sp">En voilà un bon choix ! Allez on se revoit demain pour cette nouvelle aventure.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="DébutSaison2" class="bouton" type="button">Attendre le lendemain avec impatience</button>
<<set $club to "RC Strasbourg">>
<<set $salaire to 20000>><html>
<img src="images/choixFCM2.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Ok arrête de déconner là... T'es vraiment sûr ?</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="GameOverMetz" class="bouton" type="button">Oui</button>
<button data-passage="ChoixFCM" class="bouton" type="button">Non</button><h1>GAME OVER</h1>
<html>
<div id="test" class="GameOver">
<textarea id="sp">C'est ici que l'aventure s'arrête pour toi. Tu n'étais tout simplement pas prêt à passer le cap et à devenir un grand joueur. Pourquoi ?! Bah parce que tu as choisi Metz. Le choix était très très très mauvais</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (100 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Menu de démarrage" class="bouton" type="button">Retour au menu principal</button>
<<audio "start" stop>>
<<audio "chèvre" play>>
<<set $physique to 0>>
<<set $charisme to 0>>
<<set $passes to 0>>
<<set $tirs to 0>>
<<set $defense to 0>>
<<set $dribbles to 0>><html>
<img src="images/newseason.jpg" alt="Réunion agent">
<div id="test" class="dialogue">
<textarea id="sp">Salut toi ! Tu as reçu un mail du président de ton nouveau club. Je vais te le lire : Bonjour, j’ai insisté pour te recruter au sein de notre équipe. Tu es pour moi l’étoile naissante du football. Nous accordons une grande importance à l’émergence de nouveaux talents. Alors tâche de ne pas me faire regretter mon choix. Cette année nous misons tout sur la Coupe pour la qualification au moins en Ligue Europa donc je serai particulièrement attentif à tes prestations dans ces matchs. Bien cordialement. El présidente.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="DébutSaison2Suite" class="bouton" type="button">Continuer</button>
<<set $saison to $saison + 1>><html>
<img src="images/newseason.jpg" alt="Réunion agent">
<div id="test" class="dialogue">
<textarea id="sp">Bon bah voilà... tu l'as compris ! On va tout donner pour la coupe cette année. Ces matchs de coupe sont parfaits pour se faire repérer en plus... Et oui pour conquérir le monde du foot, on ne va pas s'arrêter là. Comment souhaites-tu t'entraîner pour ces matchs ?</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Dire que vous allez travailler votre finition|Finition]]</div>
<div class="rep">[[Dire que vous allez travailler techniquement|Technique]]</div>
<div class="rep">[[Dire que vous allez travailler défensivement|Défense]]</div><html>
<img src="images/réveil.jpg" alt="Réunion agent">
<div id="test" class="dialogue">
<textarea id="sp">Très bonne idée, je t'y aiderai !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="VeilleCoupe" class="bouton" type="button">Avancer dans la saison</button>
<<set $tirs to $tirs+10>>
<<set $dribbles to $dribbles+10>><html>
<img src="images/réveil.jpg" alt="Réunion agent">
<div id="test" class="dialogue">
<textarea id="sp">Très bonne idée, je t'y aiderai !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="VeilleCoupe" class="bouton" type="button">Avancer dans la saison</button>
<<set $passes to $passes+10>>
<<set $dribbles to $dribbles+10>><html>
<img src="images/réveil.jpg" alt="Réunion agent">
<div id="test" class="dialogue">
<textarea id="sp">Très bonne idée, je t'y aiderai !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="VeilleCoupe" class="bouton" type="button">Avancer dans la saison</button>
<<set $physique to $physique+10>>
<<set $defense to $defense+10>><html>
<img src="images/coach_chap5.jpg" alt="coach content">
<div id="test" class="dialogue">
<textarea id="sp">Après une bonne première moitié de saison, on a atteint les quarts de finale de la Coupe de France les gars ! On est quasiment sûr d'être maintenu cette saison, on va donc pouvoir se concentrer sur cette Coupe. Vous voulez la qualification en Ligue Europa ?! Alors à demain et soyez frais pour jouer le quart de finale !
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Jour de Coupe 1" class="bouton" type="button">Le lendemain...</button><html>
<img src="images/coach_chap5.jpg" alt="coach content">
<div id="test" class="dialogue">
<textarea id="sp">Bon et bien nous y voilà ! Il va falloir tout donner durant ce match ! Beaucoup sont déjà au point pour ce match, alors c'est parti !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Coupe1" class="bouton" type="button">Commencer le quart de finale</button>
<<audio "mii" stop>>
<<audio "mii2" loop play>><canvas class="jeu1" id="myCanvas" width="480" height="320"></canvas>
<script>
document.getElementById("victoire").style.display="none";
document.getElementById("defaite").style.display="none";
var canvas = document.getElementById("myCanvas");
var ctx = canvas.getContext("2d");
var ballRadius = 10;
var x = canvas.width/2;
var y = canvas.height-30;
var dx = 2;
var dy = -2;
var paddleHeight = 10;
var paddleWidth = 75;
var paddleX = (canvas.width-paddleWidth)/2;
var rightPressed = false;
var leftPressed = false;
var brickRowCount = 5;
var brickColumnCount = 3;
var brickWidth = 75;
var brickHeight = 20;
var brickPadding = 10;
var brickOffsetTop = 30;
var brickOffsetLeft = 30;
var score = 0;
var lives = 3;
var bricks = [];
for(var c=0; c<brickColumnCount; c++) {
bricks[c] = [];
for(var r=0; r<brickRowCount; r++) {
bricks[c][r] = { x: 0, y: 0, status: 1 };
}
}
document.addEventListener("keydown", keyDownHandler, false);
document.addEventListener("keyup", keyUpHandler, false);
document.addEventListener("mousemove", mouseMoveHandler, false);
function keyDownHandler(e) {
if(e.keyCode == 39) {
rightPressed = true;
}
else if(e.keyCode == 37) {
leftPressed = true;
}
}
function keyUpHandler(e) {
if(e.keyCode == 39) {
rightPressed = false;
}
else if(e.keyCode == 37) {
leftPressed = false;
}
}
function mouseMoveHandler(e) {
var relativeX = e.clientX - canvas.offsetLeft;
if(relativeX > 0 && relativeX < canvas.width) {
paddleX = relativeX - paddleWidth/2;
}
}
function collisionDetection() {
for(var c=0; c<brickColumnCount; c++) {
for(var r=0; r<brickRowCount; r++) {
var b = bricks[c][r];
if(b.status == 1) {
if(x > b.x && x < b.x+brickWidth && y > b.y && y < b.y+brickHeight) {
dy = -dy;
b.status = 0;
score++;
if(score == brickRowCount*brickColumnCount) {
document.getElementById("victoire").style.display = "block";
}
}
}
}
}
}
function drawBall() {
ctx.beginPath();
ctx.arc(x, y, ballRadius, 0, Math.PI*2);
ctx.fillStyle = "#000000";
ctx.fill();
ctx.closePath();
}
function drawPaddle() {
ctx.beginPath();
ctx.rect(paddleX, canvas.height-paddleHeight, paddleWidth, paddleHeight);
ctx.fillStyle = "#000000";
ctx.fill();
ctx.closePath();
}
function drawBricks() {
for(var c=0; c<brickColumnCount; c++) {
for(var r=0; r<brickRowCount; r++) {
if(bricks[c][r].status == 1) {
var brickX = (r*(brickWidth+brickPadding))+brickOffsetLeft;
var brickY = (c*(brickHeight+brickPadding))+brickOffsetTop;
bricks[c][r].x = brickX;
bricks[c][r].y = brickY;
ctx.beginPath();
ctx.rect(brickX, brickY, brickWidth, brickHeight);
ctx.fillStyle = "#000000";
ctx.fill();
ctx.closePath();
}
}
}
}
function drawContour() {
ctx.fillStyle = "#000000";
ctx.fillRect(8, 3, 134, 22);
}
function drawAffiche() {
ctx.fillStyle = "#ffffff";
ctx.fillRect(10, 5, 130, 18);
}
function drawScore() {
ctx.font = "bold 12px Arial";
ctx.fillStyle = "#000000";
ctx.fillText("SCORE : "+score+" |", 13, 18);
}
function drawLives() {
ctx.font = "bold 12px Arial";
ctx.fillStyle = "#000000";
ctx.fillText("VIES : "+lives, 87, 18);
}
function draw() {
if (lives>0 && score <15) {
ctx.clearRect(0, 0, canvas.width, canvas.height);
drawContour();
drawAffiche();
drawBricks();
drawBall();
drawPaddle();
drawScore();
drawLives();
collisionDetection();
if(x + dx > canvas.width-ballRadius || x + dx < ballRadius) {
dx = -dx;
}
if(y + dy < ballRadius) {
dy = -dy;
}
else if(y + dy > canvas.height-ballRadius) {
if(x > paddleX && x < paddleX + paddleWidth) {
dy = -dy;
}
else {
lives--;
if(!lives) {
document.getElementById("defaite").style.display = "block";
return ;
}
else {
x = canvas.width/2;
y = canvas.height-30;
dx = 3;
dy = -3;
paddleX = (canvas.width-paddleWidth)/2;
}
}
}
if(rightPressed && paddleX < canvas.width-paddleWidth) {
paddleX += 7;
}
else if(leftPressed && paddleX > 0) {
paddleX -= 7;
}
x += dx;
y += dy;
requestAnimationFrame(draw);
} else {
drawScore();
drawLives();
return ;
}
}
draw();
</script>
<div id="victoire">Quel match et surtout quelle qualification en demie !
<button data-passage="Jour de Coupe 2" class="bouton" type="button">Continuer...</button></div>
<div id="defaite">C'est une défaite et surtout une élimination de la coupe...
<button data-passage="DéfaiteCoupe" class="bouton" type="button">Continuer...</button></div><html>
<img src="images/défaite_Ch5.jpg" alt="coach content">
<div id="test" class="dialogue">
<textarea id="sp">C’est dommage de s’arrêter là, mais ça reste une bonne performance dans l’ensemble. Atteindre les phases finales de la Coupe de France, c’est pas donné à tout le monde, donc relevez la tête et restez motivés !
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="FinSaison2" class="bouton" type="button">Continuer</button>
<<set $physique to $physique+10>><html>
<img src="images/coach_chap5.jpg" alt="coach content">
<div id="test" class="dialogue">
<textarea id="sp">Bien joué, on peut maintenant passer à la demi-finale ! Faites attention, ça va aller vite !
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Coupe2" class="bouton" type="button">En route pour la demi-finale</button>
<<set $defense to $defense+5>>
<<set $physique to $physique+5>>
<<set $charisme to $charisme+5>><canvas class="jeu3" id="myCanvas" width="720" height="480"></canvas>
<script>
document.getElementById("victoire").style.display="none";
document.getElementById("defaite").style.display="none";
var canvas = document.getElementById("myCanvas");
var ctx = canvas.getContext("2d");
var ballRadius = 10;
var x = canvas.width/2;
var y = canvas.height-30;
var dx = 3;
var dy = -3;
var paddleHeight = 10;
var paddleWidth = 75;
var paddleX = (canvas.width-paddleWidth)/2;
var rightPressed = false;
var leftPressed = false;
var brickRowCount = 8;
var brickColumnCount = 5;
var brickWidth = 75;
var brickHeight = 20;
var brickPadding = 10;
var brickOffsetTop = 30;
var brickOffsetLeft = 30;
var score = 0;
var lives = 3;
var bricks = [];
for(var c=0; c<brickColumnCount; c++) {
bricks[c] = [];
for(var r=0; r<brickRowCount; r++) {
bricks[c][r] = { x: 0, y: 0, status: 1 };
}
}
document.addEventListener("keydown", keyDownHandler, false);
document.addEventListener("keyup", keyUpHandler, false);
document.addEventListener("mousemove", mouseMoveHandler, false);
function keyDownHandler(e) {
if(e.keyCode == 39) {
rightPressed = true;
}
else if(e.keyCode == 37) {
leftPressed = true;
}
}
function keyUpHandler(e) {
if(e.keyCode == 39) {
rightPressed = false;
}
else if(e.keyCode == 37) {
leftPressed = false;
}
}
function mouseMoveHandler(e) {
var relativeX = e.clientX - canvas.offsetLeft;
if(relativeX > 0 && relativeX < canvas.width) {
paddleX = relativeX - paddleWidth/2;
}
}
function collisionDetection() {
for(var c=0; c<brickColumnCount; c++) {
for(var r=0; r<brickRowCount; r++) {
var b = bricks[c][r];
if(b.status == 1) {
if(x > b.x && x < b.x+brickWidth && y > b.y && y < b.y+brickHeight) {
dy = -dy;
b.status = 0;
score++;
if(score == brickRowCount*brickColumnCount) {
document.getElementById("victoire").style.display = "block";
}
}
}
}
}
}
function drawBall() {
ctx.beginPath();
ctx.arc(x, y, ballRadius, 0, Math.PI*2);
ctx.fillStyle = "#000000";
ctx.fill();
ctx.closePath();
}
function drawPaddle() {
ctx.beginPath();
ctx.rect(paddleX, canvas.height-paddleHeight, paddleWidth, paddleHeight);
ctx.fillStyle = "#000000";
ctx.fill();
ctx.closePath();
}
function drawBricks() {
for(var c=0; c<brickColumnCount; c++) {
for(var r=0; r<brickRowCount; r++) {
if(bricks[c][r].status == 1) {
var brickX = (r*(brickWidth+brickPadding))+brickOffsetLeft;
var brickY = (c*(brickHeight+brickPadding))+brickOffsetTop;
bricks[c][r].x = brickX;
bricks[c][r].y = brickY;
ctx.beginPath();
ctx.rect(brickX, brickY, brickWidth, brickHeight);
ctx.fillStyle = "#000000";
ctx.fill();
ctx.closePath();
}
}
}
}
function drawContour() {
ctx.fillStyle = "#000000";
ctx.fillRect(8, 3, 134, 22);
}
function drawAffiche() {
ctx.fillStyle = "#ffffff";
ctx.fillRect(10, 5, 130, 18);
}
function drawScore() {
ctx.font = "bold 12px Arial";
ctx.fillStyle = "#000000";
ctx.fillText("SCORE : "+score+" |", 13, 18);
}
function drawLives() {
ctx.font = "bold 12px Arial";
ctx.fillStyle = "#000000";
ctx.fillText("VIES : "+lives, 87, 18);
}
function draw() {
if (lives>0 && score <40) {
ctx.clearRect(0, 0, canvas.width, canvas.height);
drawContour();
drawAffiche();
drawBricks();
drawBall();
drawPaddle();
drawScore();
drawLives();
collisionDetection();
if(x + dx > canvas.width-ballRadius || x + dx < ballRadius) {
dx = -dx;
}
if(y + dy < ballRadius) {
dy = -dy;
}
else if(y + dy > canvas.height-ballRadius) {
if(x > paddleX && x < paddleX + paddleWidth) {
dy = -dy;
}
else {
lives--;
if(!lives) {
document.getElementById("defaite").style.display = "block";
return ;
}
else {
x = canvas.width/2;
y = canvas.height-30;
dx = 2;
dy = -2;
paddleX = (canvas.width-paddleWidth)/2;
}
}
}
if(rightPressed && paddleX < canvas.width-paddleWidth) {
paddleX += 7;
}
else if(leftPressed && paddleX > 0) {
paddleX -= 7;
}
x += dx;
y += dy;
requestAnimationFrame(draw);
} else {
drawScore();
drawLives();
return ;
}
}
draw();
</script>
<div id="victoire">Ce serait pas une qualification en finale ça ?! Siiiiiiii
<button data-passage="Jour de Coupe 3" class="bouton" type="button">Continuer...</button></div>
<div id="defaite">C'est une défaite et surtout une élimination de la coupe...
<button data-passage="DéfaiteCoupe" class="bouton" type="button">Continuer...</button></div><html>
<img src="images/coach_chap5.jpg" alt="coach content">
<div id="test" class="dialogue">
<textarea id="sp">Belle victoire malgré une mauvaise première mi-temps. Profitez-en parce que la finale va vite arriver !
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Jour de Coupe 3 Partie 2" class="bouton" type="button">Profiter avec le reste de l'équipe</button>
<<set $defense to $defense+5>>
<<set $physique to $physique+5>>
<<set $charisme to $charisme+5>><html>
<img src="images/victoire_Ch5.jpg" alt="équipe contente">
<div id="test" class="dialogue">
<textarea id="sp">ON EST EN FINAAAALE, ON EST EN FINAAAALE, ON EST, ON EST, ON EST EN FINAAAALE !!!!
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Jour de Coupe 3 Partie 3" class="bouton" type="button">Avancer jusqu'à la finale</button><html>
<img src="images/coach_chap5.jpg" alt="coach content">
<div id="test" class="dialogue">
<textarea id="sp">Plus qu’un match pour être Champions de France. Ce match devrait être encore plus corsé que le dernier, on y va à fond dès le début ! Ne refaites pas comme au dernier match, vous avez marché pendant toute la première mi-temps… Allez, tous sur le terrain, et surtout n'oubliez pas qu'une finale ça se joue pas, ça se gagne !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Coupe3" class="bouton" type="button">Jouer la finale</button><canvas class="jeu3" id="myCanvas" width="720" height="480"></canvas>
<script>
document.getElementById("victoire").style.display="none";
document.getElementById("defaite").style.display="none";
var canvas = document.getElementById("myCanvas");
var ctx = canvas.getContext("2d");
var ballRadius = 10;
var x = canvas.width/2;
var y = canvas.height-30;
var dx = 3;
var dy = -3;
var paddleHeight = 10;
var paddleWidth = 75;
var paddleX = (canvas.width-paddleWidth)/2;
var rightPressed = false;
var leftPressed = false;
var brickRowCount = 8;
var brickColumnCount = 8;
var brickWidth = 75;
var brickHeight = 20;
var brickPadding = 10;
var brickOffsetTop = 30;
var brickOffsetLeft = 30;
var score = 0;
var lives = 3;
var bricks = [];
for(var c=0; c<brickColumnCount; c++) {
bricks[c] = [];
for(var r=0; r<brickRowCount; r++) {
bricks[c][r] = { x: 0, y: 0, status: 1 };
}
}
document.addEventListener("keydown", keyDownHandler, false);
document.addEventListener("keyup", keyUpHandler, false);
document.addEventListener("mousemove", mouseMoveHandler, false);
function keyDownHandler(e) {
if(e.keyCode == 39) {
rightPressed = true;
}
else if(e.keyCode == 37) {
leftPressed = true;
}
}
function keyUpHandler(e) {
if(e.keyCode == 39) {
rightPressed = false;
}
else if(e.keyCode == 37) {
leftPressed = false;
}
}
function mouseMoveHandler(e) {
var relativeX = e.clientX - canvas.offsetLeft;
if(relativeX > 0 && relativeX < canvas.width) {
paddleX = relativeX - paddleWidth/2;
}
}
function collisionDetection() {
for(var c=0; c<brickColumnCount; c++) {
for(var r=0; r<brickRowCount; r++) {
var b = bricks[c][r];
if(b.status == 1) {
if(x > b.x && x < b.x+brickWidth && y > b.y && y < b.y+brickHeight) {
dy = -dy;
b.status = 0;
score++;
if(score == brickRowCount*brickColumnCount) {
document.getElementById("victoire").style.display = "block";
}
}
}
}
}
}
function drawBall() {
ctx.beginPath();
ctx.arc(x, y, ballRadius, 0, Math.PI*2);
ctx.fillStyle = "#000000";
ctx.fill();
ctx.closePath();
}
function drawPaddle() {
ctx.beginPath();
ctx.rect(paddleX, canvas.height-paddleHeight, paddleWidth, paddleHeight);
ctx.fillStyle = "#000000";
ctx.fill();
ctx.closePath();
}
function drawBricks() {
for(var c=0; c<brickColumnCount; c++) {
for(var r=0; r<brickRowCount; r++) {
if(bricks[c][r].status == 1) {
var brickX = (r*(brickWidth+brickPadding))+brickOffsetLeft;
var brickY = (c*(brickHeight+brickPadding))+brickOffsetTop;
bricks[c][r].x = brickX;
bricks[c][r].y = brickY;
ctx.beginPath();
ctx.rect(brickX, brickY, brickWidth, brickHeight);
ctx.fillStyle = "#000000";
ctx.fill();
ctx.closePath();
}
}
}
}
function drawContour() {
ctx.fillStyle = "#000000";
ctx.fillRect(8, 3, 134, 22);
}
function drawAffiche() {
ctx.fillStyle = "#ffffff";
ctx.fillRect(10, 5, 130, 18);
}
function drawScore() {
ctx.font = "bold 12px Arial";
ctx.fillStyle = "#000000";
ctx.fillText("SCORE : "+score+" |", 13, 18);
}
function drawLives() {
ctx.font = "bold 12px Arial";
ctx.fillStyle = "#000000";
ctx.fillText("VIES : "+lives, 87, 18);
}
function draw() {
if (lives>0 && score <64) {
ctx.clearRect(0, 0, canvas.width, canvas.height);
drawContour();
drawAffiche();
drawBricks();
drawBall();
drawPaddle();
drawScore();
drawLives();
collisionDetection();
if(x + dx > canvas.width-ballRadius || x + dx < ballRadius) {
dx = -dx;
}
if(y + dy < ballRadius) {
dy = -dy;
}
else if(y + dy > canvas.height-ballRadius) {
if(x > paddleX && x < paddleX + paddleWidth) {
dy = -dy;
}
else {
lives--;
if(!lives) {
document.getElementById("defaite").style.display = "block";
return ;
}
else {
x = canvas.width/2;
y = canvas.height-30;
dx = 3;
dy = -3;
paddleX = (canvas.width-paddleWidth)/2;
}
}
}
if(rightPressed && paddleX < canvas.width-paddleWidth) {
paddleX += 7;
}
else if(leftPressed && paddleX > 0) {
paddleX -= 7;
}
x += dx;
y += dy;
requestAnimationFrame(draw);
} else {
drawScore();
drawLives();
return ;
}
}
draw();
</script>
<div id="victoire">Vous l'avez cherché celle-là ! Bravo !
<button data-passage="Jour de Coupe 4" class="bouton" type="button">Continuer...</button></div>
<div id="defaite">C'est une défaite et surtout une élimination de la coupe...
<button data-passage="DéfaiteCoupe" class="bouton" type="button">Continuer...</button></div><html>
<img src="images/coach_chap5.jpg" alt="coach content">
<div id="test" class="dialogue">
<textarea id="sp">Je suis fier de vous tous ! Vous l’avez cherché cette coupe ! Vous êtes vraiment les meilleurs, vous l'avez mérité celle-là, profitez-en, on ne gagne pas des trophées tous les jours !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="VictoireCoupe" class="bouton" type="button">Célébrer la coupe</button>
<<set $defense to $defense+5>>
<<set $physique to $physique+5>>
<<set $charisme to $charisme+5>><html>
<img src="images/victoire_Ch5.jpg" alt="équipe contente">
<div id="test" class="dialogue">
<textarea id="sp">RAMENEZ LA COUPE A LA MAISOOONNN, ON LES A BIEN SOULEVÉ !!
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="FinSaison2" class="bouton" type="button">Continuer</button><html>
<img src="images/victoire_Ch5.jpg" alt="Soirée">
<div id="test" class="dialogue">
<textarea id="sp">Hey toi la superstar, on organise une bouffe avec l'équipe pour la fin de la saison. En plus, on ira en boite plus tard dans la soirée, ce sera génial ! Par contre, il va falloir répondre à une question importante pour pouvoir venir. T'es prêt ?</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Répondre à la question|Répondre]]</div>
<div class="rep">[[Dire que vous ne voulez pas répondre|PasRépondre]]</div>
<<audio "mii2" stop>>
<<audio "spongebob" loop play>><html>
<img src="images/newseason.jpg" alt="Réunion agent">
<div id="test" class="dialogue">
<textarea id="sp">Salut toi ! Tu as reçu un mail du président de ton nouveau club. Je vais te le lire : Bonjour, j’ai insisté pour te recruter au sein de notre équipe. Tu es pour moi l’étoile naissante du football. Nous accordons une grande importance à l’émergence de nouveaux talents. Alors tâche de ne pas me faire regretter mon choix. Cette année nous misons tout sur la montée en ligue 1 donc je serai particulièrement attentif à tes prestations en championnat. Bien cordialement. El présidente.
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="DébutSaison2 2Suite" class="bouton" type="button">Continuer</button>
<<set $saison to $saison + 1>><html>
<img src="images/newseason.jpg" alt="Réunion agent">
<div id="test" class="dialogue">
<textarea id="sp">Bon bah voilà... tu l'as compris ! On va tout donner pour le championnat cette année. Ces matchs seront parfaits pour se faire repérer en plus... Et oui pour conquérir le monde du foot, on ne va pas s'arrêter là. Comment souhaites-tu t'entraîner pour ces matchs ?</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Dire que vous allez travailler votre finition|Finition2]]</div>
<div class="rep">[[Dire que vous allez travailler techniquement|Technique2]]</div>
<div class="rep">[[Dire que vous allez travailler défensivement|Défense2]]</div><html>
<img src="images/réveil.jpg" alt="Réunion agent">
<div id="test" class="dialogue">
<textarea id="sp">Très bonne idée, je t'y aiderai !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="VeilleChamp" class="bouton" type="button">Avancer dans la saison</button>
<<set $tirs to $tirs+10>>
<<set $dribbles to $dribbles+10>><html>
<img src="images/réveil.jpg" alt="Réunion agent">
<div id="test" class="dialogue">
<textarea id="sp">Très bonne idée, je t'y aiderai !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="VeilleChamp" class="bouton" type="button">Avancer dans la saison</button>
<<set $passes to $passes+10>>
<<set $dribbles to $dribbles+10>><html>
<img src="images/réveil.jpg" alt="Réunion agent">
<div id="test" class="dialogue">
<textarea id="sp">Très bonne idée, je t'y aiderai !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="VeilleChamp" class="bouton" type="button">Avancer dans la saison</button>
<<set $physique to $physique+10>>
<<set $defense to $defense+10>><html>
<img src="images/coach_chap5.jpg" alt="coach content">
<div id="test" class="dialogue">
<textarea id="sp">Après une bonne saison, on a la possibilité de monter en Ligue 1 les gars ! Il nous reste 3 matchs pour faire l’exploit. 3 matchs c’est quoi ?! Ok, on dépend aussi du résultat des autres et le championnat est très serré ! Mais c’est pas une raison d’abandonner. Alors dès demain, tous à fond. Une défaite, sur les 3 matchs et on pourra oublier la montée.
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Jour de Champ 1" class="bouton" type="button">Le lendemain...</button><html>
<img src="images/coach_chap5.jpg" alt="coach content">
<div id="test" class="dialogue">
<textarea id="sp">Bon et bien nous y voilà ! Il va falloir tout donner durant ce match ! Beaucoup sont déjà au point pour ce match, alors c'est parti !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Champ1" class="bouton" type="button">Commencer le match</button>
<<audio "mii" stop>>
<<audio "mii2" loop play>><canvas class="jeu1" id="myCanvas" width="480" height="320"></canvas>
<script>
document.getElementById("victoire").style.display="none";
document.getElementById("defaite").style.display="none";
var canvas = document.getElementById("myCanvas");
var ctx = canvas.getContext("2d");
var ballRadius = 10;
var x = canvas.width/2;
var y = canvas.height-30;
var dx = 2;
var dy = -2;
var paddleHeight = 10;
var paddleWidth = 75;
var paddleX = (canvas.width-paddleWidth)/2;
var rightPressed = false;
var leftPressed = false;
var brickRowCount = 5;
var brickColumnCount = 3;
var brickWidth = 75;
var brickHeight = 20;
var brickPadding = 10;
var brickOffsetTop = 30;
var brickOffsetLeft = 30;
var score = 0;
var lives = 3;
var bricks = [];
for(var c=0; c<brickColumnCount; c++) {
bricks[c] = [];
for(var r=0; r<brickRowCount; r++) {
bricks[c][r] = { x: 0, y: 0, status: 1 };
}
}
document.addEventListener("keydown", keyDownHandler, false);
document.addEventListener("keyup", keyUpHandler, false);
document.addEventListener("mousemove", mouseMoveHandler, false);
function keyDownHandler(e) {
if(e.keyCode == 39) {
rightPressed = true;
}
else if(e.keyCode == 37) {
leftPressed = true;
}
}
function keyUpHandler(e) {
if(e.keyCode == 39) {
rightPressed = false;
}
else if(e.keyCode == 37) {
leftPressed = false;
}
}
function mouseMoveHandler(e) {
var relativeX = e.clientX - canvas.offsetLeft;
if(relativeX > 0 && relativeX < canvas.width) {
paddleX = relativeX - paddleWidth/2;
}
}
function collisionDetection() {
for(var c=0; c<brickColumnCount; c++) {
for(var r=0; r<brickRowCount; r++) {
var b = bricks[c][r];
if(b.status == 1) {
if(x > b.x && x < b.x+brickWidth && y > b.y && y < b.y+brickHeight) {
dy = -dy;
b.status = 0;
score++;
if(score == brickRowCount*brickColumnCount) {
document.getElementById("victoire").style.display = "block";
}
}
}
}
}
}
function drawBall() {
ctx.beginPath();
ctx.arc(x, y, ballRadius, 0, Math.PI*2);
ctx.fillStyle = "#000000";
ctx.fill();
ctx.closePath();
}
function drawPaddle() {
ctx.beginPath();
ctx.rect(paddleX, canvas.height-paddleHeight, paddleWidth, paddleHeight);
ctx.fillStyle = "#000000";
ctx.fill();
ctx.closePath();
}
function drawBricks() {
for(var c=0; c<brickColumnCount; c++) {
for(var r=0; r<brickRowCount; r++) {
if(bricks[c][r].status == 1) {
var brickX = (r*(brickWidth+brickPadding))+brickOffsetLeft;
var brickY = (c*(brickHeight+brickPadding))+brickOffsetTop;
bricks[c][r].x = brickX;
bricks[c][r].y = brickY;
ctx.beginPath();
ctx.rect(brickX, brickY, brickWidth, brickHeight);
ctx.fillStyle = "#000000";
ctx.fill();
ctx.closePath();
}
}
}
}
function drawContour() {
ctx.fillStyle = "#000000";
ctx.fillRect(8, 3, 134, 22);
}
function drawAffiche() {
ctx.fillStyle = "#ffffff";
ctx.fillRect(10, 5, 130, 18);
}
function drawScore() {
ctx.font = "bold 12px Arial";
ctx.fillStyle = "#000000";
ctx.fillText("SCORE : "+score+" |", 13, 18);
}
function drawLives() {
ctx.font = "bold 12px Arial";
ctx.fillStyle = "#000000";
ctx.fillText("VIES : "+lives, 87, 18);
}
function draw() {
if (lives>0 && score <15) {
ctx.clearRect(0, 0, canvas.width, canvas.height);
drawContour();
drawAffiche();
drawBricks();
drawBall();
drawPaddle();
drawScore();
drawLives();
collisionDetection();
if(x + dx > canvas.width-ballRadius || x + dx < ballRadius) {
dx = -dx;
}
if(y + dy < ballRadius) {
dy = -dy;
}
else if(y + dy > canvas.height-ballRadius) {
if(x > paddleX && x < paddleX + paddleWidth) {
dy = -dy;
}
else {
lives--;
if(!lives) {
document.getElementById("defaite").style.display = "block";
return ;
}
else {
x = canvas.width/2;
y = canvas.height-30;
dx = 3;
dy = -3;
paddleX = (canvas.width-paddleWidth)/2;
}
}
}
if(rightPressed && paddleX < canvas.width-paddleWidth) {
paddleX += 7;
}
else if(leftPressed && paddleX > 0) {
paddleX -= 7;
}
x += dx;
y += dy;
requestAnimationFrame(draw);
} else {
drawScore();
drawLives();
return ;
}
}
draw();
</script>
<div id="victoire">Quel match !
<button data-passage="Jour de Champ 2" class="bouton" type="button">Continuer...</button></div>
<div id="defaite">C'est une défaite...
<button data-passage="DéfaiteChamp" class="bouton" type="button">Continuer...</button></div><html>
<img src="images/coach_chap5.jpg" alt="coach content">
<div id="test" class="dialogue">
<textarea id="sp">Bien joué, on peut maintenant se projeter vers l’avant dernier match ! Faites attention, ça va aller plus vite et pour l’instant rien n’est fait… On a qu’un point d’avance !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Champ2" class="bouton" type="button">Jouer le match suivant</button>
<<set $defense to $defense+5>>
<<set $physique to $physique+5>>
<<set $charisme to $charisme+5>><html>
<img src="images/défaite_Ch5.jpg" alt="coach content">
<div id="test" class="dialogue">
<textarea id="sp"> C’est dommage de perdre ici… Aux vues des autres résultats on peut dire adieu à la Ligue 1... </textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="FinSaison2" class="bouton" type="button">Continuer</button>
<<set $physique to $physique+10>><canvas class="jeu3" id="myCanvas" width="720" height="480"></canvas>
<script>
document.getElementById("victoire").style.display="none";
document.getElementById("defaite").style.display="none";
var canvas = document.getElementById("myCanvas");
var ctx = canvas.getContext("2d");
var ballRadius = 10;
var x = canvas.width/2;
var y = canvas.height-30;
var dx = 3;
var dy = -3;
var paddleHeight = 10;
var paddleWidth = 75;
var paddleX = (canvas.width-paddleWidth)/2;
var rightPressed = false;
var leftPressed = false;
var brickRowCount = 8;
var brickColumnCount = 5;
var brickWidth = 75;
var brickHeight = 20;
var brickPadding = 10;
var brickOffsetTop = 30;
var brickOffsetLeft = 30;
var score = 0;
var lives = 3;
var bricks = [];
for(var c=0; c<brickColumnCount; c++) {
bricks[c] = [];
for(var r=0; r<brickRowCount; r++) {
bricks[c][r] = { x: 0, y: 0, status: 1 };
}
}
document.addEventListener("keydown", keyDownHandler, false);
document.addEventListener("keyup", keyUpHandler, false);
document.addEventListener("mousemove", mouseMoveHandler, false);
function keyDownHandler(e) {
if(e.keyCode == 39) {
rightPressed = true;
}
else if(e.keyCode == 37) {
leftPressed = true;
}
}
function keyUpHandler(e) {
if(e.keyCode == 39) {
rightPressed = false;
}
else if(e.keyCode == 37) {
leftPressed = false;
}
}
function mouseMoveHandler(e) {
var relativeX = e.clientX - canvas.offsetLeft;
if(relativeX > 0 && relativeX < canvas.width) {
paddleX = relativeX - paddleWidth/2;
}
}
function collisionDetection() {
for(var c=0; c<brickColumnCount; c++) {
for(var r=0; r<brickRowCount; r++) {
var b = bricks[c][r];
if(b.status == 1) {
if(x > b.x && x < b.x+brickWidth && y > b.y && y < b.y+brickHeight) {
dy = -dy;
b.status = 0;
score++;
if(score == brickRowCount*brickColumnCount) {
document.getElementById("victoire").style.display = "block";
}
}
}
}
}
}
function drawBall() {
ctx.beginPath();
ctx.arc(x, y, ballRadius, 0, Math.PI*2);
ctx.fillStyle = "#000000";
ctx.fill();
ctx.closePath();
}
function drawPaddle() {
ctx.beginPath();
ctx.rect(paddleX, canvas.height-paddleHeight, paddleWidth, paddleHeight);
ctx.fillStyle = "#000000";
ctx.fill();
ctx.closePath();
}
function drawBricks() {
for(var c=0; c<brickColumnCount; c++) {
for(var r=0; r<brickRowCount; r++) {
if(bricks[c][r].status == 1) {
var brickX = (r*(brickWidth+brickPadding))+brickOffsetLeft;
var brickY = (c*(brickHeight+brickPadding))+brickOffsetTop;
bricks[c][r].x = brickX;
bricks[c][r].y = brickY;
ctx.beginPath();
ctx.rect(brickX, brickY, brickWidth, brickHeight);
ctx.fillStyle = "#000000";
ctx.fill();
ctx.closePath();
}
}
}
}
function drawContour() {
ctx.fillStyle = "#000000";
ctx.fillRect(8, 3, 134, 22);
}
function drawAffiche() {
ctx.fillStyle = "#ffffff";
ctx.fillRect(10, 5, 130, 18);
}
function drawScore() {
ctx.font = "bold 12px Arial";
ctx.fillStyle = "#000000";
ctx.fillText("SCORE : "+score+" |", 13, 18);
}
function drawLives() {
ctx.font = "bold 12px Arial";
ctx.fillStyle = "#000000";
ctx.fillText("VIES : "+lives, 87, 18);
}
function draw() {
if (lives>0 && score <40) {
ctx.clearRect(0, 0, canvas.width, canvas.height);
drawContour();
drawAffiche();
drawBricks();
drawBall();
drawPaddle();
drawScore();
drawLives();
collisionDetection();
if(x + dx > canvas.width-ballRadius || x + dx < ballRadius) {
dx = -dx;
}
if(y + dy < ballRadius) {
dy = -dy;
}
else if(y + dy > canvas.height-ballRadius) {
if(x > paddleX && x < paddleX + paddleWidth) {
dy = -dy;
}
else {
lives--;
if(!lives) {
document.getElementById("defaite").style.display = "block";
return ;
}
else {
x = canvas.width/2;
y = canvas.height-30;
dx = 2;
dy = -2;
paddleX = (canvas.width-paddleWidth)/2;
}
}
}
if(rightPressed && paddleX < canvas.width-paddleWidth) {
paddleX += 7;
}
else if(leftPressed && paddleX > 0) {
paddleX -= 7;
}
x += dx;
y += dy;
requestAnimationFrame(draw);
} else {
drawScore();
drawLives();
return ;
}
}
draw();
</script>
<div id="victoire">Un petit pas vers le titre apparemment !!
<button data-passage="Jour de Champ 3" class="bouton" type="button">Continuer...</button></div>
<div id="defaite">C'est une défaite...
<button data-passage="DéfaiteChamp" class="bouton" type="button">Continuer...</button></div><html>
<img src="images/coach_chap5.jpg" alt="coach content">
<div id="test" class="dialogue">
<textarea id="sp">Belle victoire malgré une mauvaise première mi-temps. Profitez-en parce que le dernier match va arriver. Avec vos performances on a même la possibilité d’être champion… Mais si on perd, et que les équipes derrières nous gagnent, c’est fini...</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Jour de Champ 3 Partie 2" class="bouton" type="button">Profiter avec le reste de l'équipe</button>
<<set $defense to $defense+5>>
<<set $physique to $physique+5>>
<<set $charisme to $charisme+5>><html>
<img src="images/victoire_Ch5.jpg" alt="équipe contente">
<div id="test" class="dialogue">
<textarea id="sp">AUJOURD’HUI ! AUJOURD’HUI ! ON A JOUE ! ON A JOUE ! ON A GAGNE ! ON A GAGNE...</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Jour de Champ 3 Partie 3" class="bouton" type="button">Avancer jusqu'au dernier match</button><html>
<img src="images/coach_chap5.jpg" alt="coach content">
<div id="test" class="dialogue">
<textarea id="sp">Plus qu’un match pour la montée. Ce match devrait être encore plus corsé que le dernier, on y va à fond dès le début ! Ne refaites pas comme au dernier match, vous avez marché pendant toute la première mi-temps… Allez, tous sur le terrain !!</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Champ3" class="bouton" type="button">Jouer le dernier match</button><canvas class="jeu3" id="myCanvas" width="720" height="480"></canvas>
<script>
document.getElementById("victoire").style.display="none";
document.getElementById("defaite").style.display="none";
var canvas = document.getElementById("myCanvas");
var ctx = canvas.getContext("2d");
var ballRadius = 10;
var x = canvas.width/2;
var y = canvas.height-30;
var dx = 3;
var dy = -3;
var paddleHeight = 10;
var paddleWidth = 75;
var paddleX = (canvas.width-paddleWidth)/2;
var rightPressed = false;
var leftPressed = false;
var brickRowCount = 8;
var brickColumnCount = 8;
var brickWidth = 75;
var brickHeight = 20;
var brickPadding = 10;
var brickOffsetTop = 30;
var brickOffsetLeft = 30;
var score = 0;
var lives = 3;
var bricks = [];
for(var c=0; c<brickColumnCount; c++) {
bricks[c] = [];
for(var r=0; r<brickRowCount; r++) {
bricks[c][r] = { x: 0, y: 0, status: 1 };
}
}
document.addEventListener("keydown", keyDownHandler, false);
document.addEventListener("keyup", keyUpHandler, false);
document.addEventListener("mousemove", mouseMoveHandler, false);
function keyDownHandler(e) {
if(e.keyCode == 39) {
rightPressed = true;
}
else if(e.keyCode == 37) {
leftPressed = true;
}
}
function keyUpHandler(e) {
if(e.keyCode == 39) {
rightPressed = false;
}
else if(e.keyCode == 37) {
leftPressed = false;
}
}
function mouseMoveHandler(e) {
var relativeX = e.clientX - canvas.offsetLeft;
if(relativeX > 0 && relativeX < canvas.width) {
paddleX = relativeX - paddleWidth/2;
}
}
function collisionDetection() {
for(var c=0; c<brickColumnCount; c++) {
for(var r=0; r<brickRowCount; r++) {
var b = bricks[c][r];
if(b.status == 1) {
if(x > b.x && x < b.x+brickWidth && y > b.y && y < b.y+brickHeight) {
dy = -dy;
b.status = 0;
score++;
if(score == brickRowCount*brickColumnCount) {
document.getElementById("victoire").style.display = "block";
}
}
}
}
}
}
function drawBall() {
ctx.beginPath();
ctx.arc(x, y, ballRadius, 0, Math.PI*2);
ctx.fillStyle = "#000000";
ctx.fill();
ctx.closePath();
}
function drawPaddle() {
ctx.beginPath();
ctx.rect(paddleX, canvas.height-paddleHeight, paddleWidth, paddleHeight);
ctx.fillStyle = "#000000";
ctx.fill();
ctx.closePath();
}
function drawBricks() {
for(var c=0; c<brickColumnCount; c++) {
for(var r=0; r<brickRowCount; r++) {
if(bricks[c][r].status == 1) {
var brickX = (r*(brickWidth+brickPadding))+brickOffsetLeft;
var brickY = (c*(brickHeight+brickPadding))+brickOffsetTop;
bricks[c][r].x = brickX;
bricks[c][r].y = brickY;
ctx.beginPath();
ctx.rect(brickX, brickY, brickWidth, brickHeight);
ctx.fillStyle = "#000000";
ctx.fill();
ctx.closePath();
}
}
}
}
function drawContour() {
ctx.fillStyle = "#000000";
ctx.fillRect(8, 3, 134, 22);
}
function drawAffiche() {
ctx.fillStyle = "#ffffff";
ctx.fillRect(10, 5, 130, 18);
}
function drawScore() {
ctx.font = "bold 12px Arial";
ctx.fillStyle = "#000000";
ctx.fillText("SCORE : "+score+" |", 13, 18);
}
function drawLives() {
ctx.font = "bold 12px Arial";
ctx.fillStyle = "#000000";
ctx.fillText("VIES : "+lives, 87, 18);
}
function draw() {
if (lives>0 && score <64) {
ctx.clearRect(0, 0, canvas.width, canvas.height);
drawContour();
drawAffiche();
drawBricks();
drawBall();
drawPaddle();
drawScore();
drawLives();
collisionDetection();
if(x + dx > canvas.width-ballRadius || x + dx < ballRadius) {
dx = -dx;
}
if(y + dy < ballRadius) {
dy = -dy;
}
else if(y + dy > canvas.height-ballRadius) {
if(x > paddleX && x < paddleX + paddleWidth) {
dy = -dy;
}
else {
lives--;
if(!lives) {
document.getElementById("defaite").style.display = "block";
return ;
}
else {
x = canvas.width/2;
y = canvas.height-30;
dx = 3;
dy = -3;
paddleX = (canvas.width-paddleWidth)/2;
}
}
}
if(rightPressed && paddleX < canvas.width-paddleWidth) {
paddleX += 7;
}
else if(leftPressed && paddleX > 0) {
paddleX -= 7;
}
x += dx;
y += dy;
requestAnimationFrame(draw);
} else {
drawScore();
drawLives();
return ;
}
}
draw();
</script>
<div id="victoire">Vous l'avez cherché celle-là ! Bravo !
<button data-passage="Jour de Champ 4" class="bouton" type="button">Continuer...</button></div>
<div id="defaite">C'est une défaite...
<button data-passage="DéfaiteChamp" class="bouton" type="button">Continuer...</button></div><html>
<img src="images/coach_chap5.jpg" alt="coach content">
<div id="test" class="dialogue">
<textarea id="sp">JJe suis fier de vous tous ! Vous l’avez cherché cette montée ! Vous êtes vraiment les meilleurs !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="VictoireChamp" class="bouton" type="button">Célébrer la coupe</button>
<<set $defense to $defense+5>>
<<set $physique to $physique+5>>
<<set $charisme to $charisme+5>><html>
<img src="images/victoire_Ch5.jpg" alt="équipe contente">
<div id="test" class="dialogue">
<textarea id="sp">RAMENEZ LA COUPE A LA MAISOOONNN, ON LES A BIEN SOULEVÉ !!</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="FinSaison2" class="bouton" type="button">Continuer</button><html>
<img src="images/victoire_Ch5.jpg" alt="QCM2">
<div id="test" class="dialogue">
<textarea id="sp">Tiens toi près pour répondre à LA QUESTION : Avant de rentrer dans une discothèque, un de tes potes se fait recaler: Que fais tu ? </textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Je rentre pas, on est tous solidaires.|FirstAnswer]]</div>
<div class="rep">[[Je rentre coûte que coûte, tant pis pour lui.|SecondAnswer]]</div>
<html>
<img src="images/victoire_Ch5.jpg" alt="QCM2">
<div id="test" class="dialogue">
<textarea id="sp">T’es naze ! Allez stp !!!!</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Répondre" class="bouton" type="button">Répondre quand même</button>
<<set $charisme to $charisme-3>><html>
<img src="images/victoire_Ch5.jpg" alt="bonne réponse">
<div id="test" class="dialogue">
<textarea id="sp">Bonne réponse ! T'es un vrai, viens à la maison ce soir à 19h30. </textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Aller passer la soirée chez le capitaine de l'équipe et fêter la victoire en boîte|Soirée]]</div>
<div class="rep">[[Décliner la proposition et rester tranquillement devant la télé à la maison|Netflix]]</div>
<html>
<img src="images/défaite_Ch5.jpg" alt="mauvaise réponse">
<div id="test" class="dialogue">
<textarea id="sp">Mauvaise réponse ! Enfin, il s'agit pour nous d'un acte très égoïste. Désolé mais on n'a pas très envie de traîner avec toi ce soir.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Rester chez soi et regarder la télé|Netflix]]</div>
<html>
<img src="images/fond_disco.jpg" alt="fond disco">
<div id="test" class="dialogue">
<textarea id="sp">Hey toi, on organise un match de Beer Pong. En gros le premier qui tire la balle de ping pong dans tous les verres remplis de bière a gagné et fait boire tous les verres à son adversaire. Serge souhaite te défier et on me dit à l'oreillette qu'il a gagné les 3 derniers tournois...</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Accepter mais les avertir que vous êtes le meilleur|BeerPong]]</div>
<div class="rep">[[Refuser car vous ne souhaitez pas boire|PasBeerPong]]</div>
<<set $charisme to $charisme+5>><html>
<img src="images/intro.jpg" alt="netflix">
<div id="test" class="dialogue">
<textarea id="sp">Tu n'es pas allé faire la fête avec tes amis, c'est bien d'un côté mais... tu aurais pu aller t'amuser pour une fois. Ton charisme risque d'en prendre un coup. Bon du coup tu comptes faire quoi ?</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Regarder un match de foot|FootTélé]]</div>
<div class="rep">[[Regarder un documentaire de foot|FootTélé]]</div>
<div class="rep">[[Regarder une série sur Netflix|PasFootTélé]]</div>
<<set $physique to $physique+10>><html>
<img src="images/fond_disco2.jpg" alt="fond disco">
<div id="test" class="dialogue">
<textarea id="sp">En réalité, on ne peut pas défier Serge au Beer Pong… Tu vas perdre et boire à coup sûr beaucoup… beaucoup… très très beaucoup</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Tenter quand même sa chance au Beer Pong et prouver que vous êtes le meilleur|BadTrip]]</div>
<div class="rep">[[Renoncer et rentrer à la maison|FinSoirée]]</div>
<<set $charisme to $charisme+5>><html>
<img src="images/fond_disco.jpg" alt="fond disco">
<div id="test" class="dialogue">
<textarea id="sp">Ok bon de toute façon la soirée est bientôt finie...</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Se réveiller d'un coup et ambiancer la soirée|BadTrip]]</div>
<div class="rep">[[Rentrer à la maison|FinSoirée]]</div><html>
<img src="images/badtrip.jpg" alt="bad trip">
<div id="test" class="dialogue">
<textarea id="sp">Des bières, 2 tequilas et c'est le drame... Eh bien mon grand, heureusement que je suis là pour te surveiller... Tu n'as quand même pas jouer au beer pong contre Serge ? Je te ramène à la maison. Quelle honte... Bon j'espère que tu t'en rappeleras mais demain on va étudier les offres des nouveaux clubs pour la future saison... on se donne RDV dans mon bureau !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixClub3" class="bouton" type="button">Passer une mauvaise nuit et se réveiller</button>
<<set $charisme to $charisme+5>><html>
<img src="images/intro.jpg" alt="netflix">
<div id="test" class="dialogue">
<textarea id="sp">La soirée n’était pas folle ou tu ne sais pas faire la fête ? Quoi qu’il en soit, demain on va étudier des offres de clubs, alors ne te couche pas trop tard, on se donne RDV dans mon bureau !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixClub3" class="bouton" type="button">Passer une bonne nuit et se réveiller</button>
<<set $physique to $physique+5>>
<<set $charisme to $charisme-5>><<if $salaire <= 10000>>
<html>
<img src="images/choixclub22.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Tu as vraiment progressé cette année, c’est époustouflant... La ligue 1 mon petit, c’est maintenant ! 2 clubs de Ligue 1 sont prêts à te recruter et ça, ça n’a pas de prix ! Je te laisse regarder leurs offres de plus près, mais je t’avoue que j’ai déjà ma préférence, d'autant plus qu'un des 2 clubs joue la Ligue Europa</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixRCSA" class="bouton" type="button">RC Strasbourg</button>
<button data-passage="ChoixFCMetz" class="bouton" type="button">FC Metz</button>
<<else>>
<html>
<img src="images/choixclub31.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Salut mon grand ! Bon là c’est du très très lourd, tu as vraiment géré cette saison… En plus l’OM a été racheté et vise les sommets. Je te laisse regarder l’offre des 2 clubs mais à ta place, je ferais le choix du coeur !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixPSG" class="bouton" type="button">PSG</button>
<button data-passage="ChoixOM" class="bouton" type="button">OM</button>
<<endif>><html>
<img src="images/intro.jpg" alt="netflix">
<div id="test" class="dialogue">
<textarea id="sp">Très bon choix ! Je te rappelle que demain on va étudier des offres de clubs, alors ne te couche pas trop tard. Parce que si c’est pour rester toute la nuit devant la télé, tu aurais pu faire la fête avec tes amis ! On se donne RDV dans mon bureau !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixClub3" class="bouton" type="button">Passer une bonne nuit et se réveiller</button>
<<set $defense to $defense+5>><html>
<img src="images/intro.jpg" alt="netflix">
<div id="test" class="dialogue">
<textarea id="sp">Tant qu’on est là, tu pourrais regarder du foot au moins… Je te rappelle que demain on va étudier des offres de clubs, alors ne te couche pas trop tard. Parce que si c’est pour rester toute la nuit devant la télé, tu aurais pu faire la fête avec tes amis ! On se donne RDV dans mon bureau !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixClub3" class="bouton" type="button">Passer une bonne nuit et se réveiller</button><html>
<img src="images/choixRCS.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Le Racing Club de Strasbourg, c'est clairement LE TREMPLIN pour ta carrière. Un beau club historique. Ils te proposent un salaire de 20000€, une prime à la signature de 60000€ tout ça pour un contrat de 3 ans. Cette année, ils se sont qualifiés pour l'Europa Ligue ! Alors t'en dis quoi ?</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixRCSA2" class="bouton" type="button">Je fonce !</button>
<button data-passage="ChoixFCMetz" class="bouton" type="button">Voir l'offre de Metz</button><html>
<img src="images/choixFCM.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Le FC Metz, ok c'est la Ligue 1, mais j'aime pas ce club. Un beau (ou pas) club sans histoire... Ils te proposent un salaire de 15000€, une prime à la signature de 50000€ tout ça pour un contrat de 3 ans. Alors t'en dis quoi ?</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixFCMetz2" class="bouton" type="button">Je fonce !</button>
<button data-passage="ChoixRCSA" class="bouton" type="button">Voir l'offre de Strasbourg</button><html>
<img src="images/choixRCS.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Ok tu en es sûr ?!</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixRCSA3" class="bouton" type="button">Oui</button>
<button data-passage="ChoixRCSA" class="bouton" type="button">Non</button><html>
<img src="images/choixRCS.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Eh bien ! Les choses sérieuses vont commencer en plus tu vas avoir très vite une surprise !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="DébutSaison3-2" class="bouton" type="button">Continuer</button>
<<set $club to "RC Strasbourg">>
<<set $salaire to 20000>><html>
<img src="images/choixFCM.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Ok tu en es sûr ?! Parce que c'est vraiment nul là-bas</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixFCMetz3" class="bouton" type="button">Oui</button>
<button data-passage="ChoixFCMetz" class="bouton" type="button">Non</button><html>
<img src="images/choixFCM2.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Non mais... Tu es sûr ?!!</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixFCMetz4" class="bouton" type="button">Oui</button>
<button data-passage="ChoixFCMetz" class="bouton" type="button">Non</button><html>
<img src="images/choixFCM2.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Ok arrête de déconner là... T'es vraiment sûr ?</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="GameOverMetz" class="bouton" type="button">Oui</button>
<button data-passage="ChoixFCMetz" class="bouton" type="button">Non</button><html>
<img src="images/choixPSG.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Le PSG te propose 50000€ de salaire et une prime à la signature de 100000€, leur objectif principal est de gagner la Ligue des Champions, tout comme l'OM depuis leur rachat... A toi de faire le bon choix</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixPSG2" class="bouton" type="button">Je fonce !</button>
<button data-passage="ChoixOM" class="bouton" type="button">Voir l'offre de l'OM</button><html>
<img src="images/choixPSG.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Ok tu en es sûr ?!</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixPSG3" class="bouton" type="button">Oui</button>
<button data-passage="ChoixPSG" class="bouton" type="button">Non</button><html>
<img src="images/choixPSG.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Eh bien ! Les choses sérieuses vont commencer en plus tu vas avoir très vite une surprise !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="DébutSaison3" class="bouton" type="button">Continuer</button>
<<set $club to "PSG">>
<<set $salaire to 50000>><html>
<img src="images/choixOM.jpg">
<div id="test" class="dialogue">
<textarea id="sp">L'OM te propose 50000€ de salaire et une prime à la signature de 100000€, tout comme le PSG... Ils viennent d'êtres rachetés et visent les sommets de l'Europe ! A toi de faire le bon choix</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixOM2" class="bouton" type="button">Je fonce !</button>
<button data-passage="ChoixPSG" class="bouton" type="button">Voir l'offre du PSG</button><html>
<img src="images/choixOM.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Ok tu en es sûr ?!</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="ChoixOM3" class="bouton" type="button">Oui</button>
<button data-passage="ChoixOM" class="bouton" type="button">Non</button><html>
<img src="images/choixOM.jpg">
<div id="test" class="dialogue">
<textarea id="sp">Eh bien ! Les choses sérieuses vont commencer en plus tu vas avoir très vite une surprise !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="DébutSaison3" class="bouton" type="button">Continuer</button>
<<set $club to "OM">>
<<set $salaire to 50000>><html>
<img src="images/agent_content.png" alt="agent_content">
<div id="test" class="dialogue">
<textarea id="sp">Comme l’année dernière, le président t’a envoyé un mail de bienvenue au club, je te le lis : Bonjour, si nous t’avons recruté, ce n’est pas par hasard. Nous voyons en toi l’avenir du club. Notre objectif est simple : tout gagner. Mais l’objectif principal, c’est la ligue des champions ! Alors tiens toi prêt et prouve au monde entier que tu es prêt à passer un cap et à devenir le meilleur. Cordia… ATTTENDS !!!! Regarde la télé !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="TV" class="bouton" type="button">Hein quoi ?</button>
<<set $saison to $saison + 1>><<set $saison to $saison + 1>>
<html>
<img src="images/agent_content.png" alt="agent_content">
<div id="test" class="dialogue">
<textarea id="sp">Comme l’année dernière, le président t’a envoyé un mail de bienvenue au club, je te le lis : Bonjour, si nous t’avons recruté, ce n’est pas par hasard. Nous voyons en toi l’avenir du club. Notre objectif est simple : tout gagner. Mais l’objectif principal, c’est la ligue Europa ! Alors tiens toi prêt et prouve au monde entier que tu es prêt à passer un cap et à devenir le meilleur. Cordia… ATTTENDS !!!! Regarde la télé !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="TV2" class="bouton" type="button">Hein quoi ?</button>
<<set $saison to $saison + 1>><html>
<img src="images/agent_content.png" alt="agent_content">
<div id="test" class="dialogue">
<textarea id="sp">Eh oui ! Je t’avais dit que tu aurais une surprise ! Tu as été sélectionné en Équipe de France pour la première fois, c’est formidable ! Ne me fais pas une Rabiot et réponds vite à Dédé ! C’est parti pour Clairefontaine, et ça, dès samedi !!!</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Répondre à Dédé et partir pour Clairefontaine->Arrivée à Clairefontaine]]</div><html>
<img src="images/clairefontaine.png" alt="clairefontaine">
<div id="test" class="dialogue">
<textarea id="sp">Alors, impressionnant n’est-ce pas ! Toutes ces installations juste pour jouer au foot, le paradis ! Tu vas pouvoir t’entrainer avec les meilleurs joueurs français de ta génération, c’est l’occasion de progresser mon p’tit gars! Allez, motivé !!!
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep"> [[Dire que vous attendiez ce moment avec impatience|EDF1]] </div>
<div class="rep"> [[Dire que c’est l’aboutissement de votre travail|EDF1]] </div><html>
<img src="images/dd_in_da_place.png" alt="dd_le_boss">
<div id="test" class="dialogue">
<textarea id="sp">Bienvenue à Clairefontaine, je vois quelques nouvelles têtes dans le groupe, c’est le moment de me montrer ce que vous savez faire les nouveaux. On s’échauffe et on part sur un petit match amical. C’est parti, Olivier dirigera l’échauffement.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Suivre Olivier pour l’échauffement|EDF2]]</div><html>
<img src="images/dd_in_da_place.png" alt="dd_le_boss">
<div id="test" class="dialogue">
<textarea id="sp">C’est bon? Vous êtes chauds ? Et ben attention à vous parce que l'adversaire aussi ! C'est pour certains votre premier match dans le groupe, ne vous mettez pas la pression et tout va bien se passer. PS : Utilisez votre souris !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="EDFminijeu" class="bouton" type="button">Commencer le match</button><canvas id="pong" width="600" height="400" style="background: url(images/fondpong.jpg)"></canvas>
<button onclick="myStopFunction()" class="bouton" id="stop">Continuer</button>
<script>
var canvas = document.getElementById("pong");
document.getElementById("victoire").style.display="none";
document.getElementById("defaite").style.display="none";
document.getElementById("stop").style.display="none";
// getContext of canvas = methods and properties to draw and do a lot of thing to the canvas
var ctx = canvas.getContext('2d');
var background = new Image();
background.src = "images/fondpong.jpg";
// Ball object
var ball = {
x : canvas.width/2,
y : canvas.height/2,
radius : 10,
velocityX : 5,
velocityY : 5,
speed : 7,
color : "WHITE"
}
// User Paddle
var user = {
x : 0, // left side of canvas
y : (canvas.height - 100)/2, // -100 the height of paddle
width : 20,
height : 100,
score : 0,
color : "WHITE"
}
// COM Paddle
var com = {
x : canvas.width - 20, // - width of paddle
y : (canvas.height - 100)/2, // -100 the height of paddle
width : 20,
height : 100,
score : 0,
color : "WHITE"
}
// draw a rectangle, will be used to draw paddles
function drawRect(x, y, w, h, color){
ctx.fillStyle = color;
ctx.fillRect(x, y, w, h);
}
// draw circle, will be used to draw the ball
function drawArc(x, y, r, color){
ctx.fillStyle = color;
ctx.beginPath();
ctx.arc(x,y,r,0,Math.PI*2,true);
ctx.closePath();
ctx.fill();
}
// listening to the mouse
canvas.addEventListener("mousemove", getMousePos);
function getMousePos(evt){
let rect = canvas.getBoundingClientRect();
user.y = evt.clientY - rect.top - user.height/2;
}
// when COM or USER scores, we reset the ball
function resetBall(){
ball.x = canvas.width/2;
ball.y = canvas.height/2;
ball.velocityX = -ball.velocityX;
ball.speed = 7;
}
// draw text
function drawText(text,x,y){
ctx.fillStyle = "#FFF";
ctx.font = "75px fantasy";
ctx.fillText(text, x, y);
}
// collision detection
function collision(b,p){
p.top = p.y;
p.bottom = p.y + p.height;
p.left = p.x;
p.right = p.x + p.width;
b.top = b.y - b.radius;
b.bottom = b.y + b.radius;
b.left = b.x - b.radius;
b.right = b.x + b.radius;
return p.left < b.right && p.top < b.bottom && p.right > b.left && p.bottom > b.top;
}
// update function, the function that does all calculations
function update(){
// change the score of players, if the ball goes to the left "ball.x<0" computer win, else if "ball.x > canvas.width" the user win
if( ball.x - ball.radius < 0 ){
com.score++;
resetBall();
}else if( ball.x + ball.radius > canvas.width){
user.score++;
resetBall();
}
// the ball has a velocity
ball.x += ball.velocityX;
ball.y += ball.velocityY;
// computer plays for itself, and we must be able to beat it
// simple AI
com.y += ((ball.y - (com.y + com.height/2)))*0.03;
// when the ball collides with bottom and top walls we inverse the y velocity.
if(ball.y - ball.radius < 0 || ball.y + ball.radius > canvas.height){
ball.velocityY = -ball.velocityY;
}
// we check if the paddle hit the user or the com paddle
let player = (ball.x + ball.radius < canvas.width/2) ? user : com;
// if the ball hits a paddle
if(collision(ball,player)){
// play sound
// we check where the ball hits the paddle
let collidePoint = (ball.y - (player.y + player.height/2));
// normalize the value of collidePoint, we need to get numbers between -1 and 1.
// -player.height/2 < collide Point < player.height/2
collidePoint = collidePoint / (player.height/2);
// when the ball hits the top of a paddle we want the ball, to take a -45degees angle
// when the ball hits the center of the paddle we want the ball to take a 0degrees angle
// when the ball hits the bottom of the paddle we want the ball to take a 45degrees
// Math.PI/4 = 45degrees
let angleRad = (Math.PI/4) * collidePoint;
// change the X and Y velocity direction
let direction = (ball.x + ball.radius < canvas.width/2) ? 1 : -1;
ball.velocityX = direction * ball.speed * Math.cos(angleRad);
ball.velocityY = ball.speed * Math.sin(angleRad);
// speed up the ball everytime a paddle hits it.
ball.speed += 0.1;
}
}
// render function, the function that does al the drawing
function render(){
// clear the canvas
//drawRect(0, 0, canvas.width, canvas.height, "#000");
ctx.drawImage(background,0,0);
// draw the user score to the left
drawText(user.score,canvas.width/4,canvas.height/5);
// draw the COM score to the right
drawText(com.score,3*canvas.width/4,canvas.height/5);
// draw the net
//drawNet();
// draw the user's paddle
drawRect(user.x, user.y, user.width, user.height, user.color);
// draw the COM's paddle
drawRect(com.x, com.y, com.width, com.height, com.color);
// draw the ball
drawArc(ball.x, ball.y, ball.radius, ball.color);
}
function game(){
if (user.score<5 && com.score<5){
update();
render();
}
else{
ctx.drawImage(background,0,0);
document.getElementById("stop").style.display="block";
}
}
// number of frames per second
var framePerSecond = 50;
//call the game function 50 times every 1 Sec
loop = setInterval(game,1000/framePerSecond);
function myStopFunction() {
clearInterval(loop);
document.getElementById("pong").style.display="none";
document.getElementById("stop").style.display="none";
if(user.score>=5){document.getElementById("victoire").style.display="block"; }
if(com.score>=5){document.getElementById("defaite").style.display="block"; }
}
</script>
<div id="victoire">C'est une victoire ! On dirait que tu as fait très bonne impression.
<button data-passage="VictoireEDFMiniJeu" class="bouton" type="button">Continuer...</button></div>
<div id="defaite">C'est une défaite ! Didier Deschamps semble déçu.
<button data-passage="DéfaiteEDFMiniJeu" class="bouton" type="button">Continuer...</button></div>
<<audio "spongebob" stop>>
<<audio "EDF" loop play>><html>
<img src="images/dd_in_da_place.png" alt="dd_le_boss">
<div id="test" class="dialogue">
<textarea id="sp">Tu es sur la bonne voie si tu veux ta place pour la prochaine Coupe du Monde ! Allez, bonne douche!
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Aller aux vestiaires puis rentrer chez soi->EDF3]]</div>
<<set $passes to $passes+5>>
<<set $defense to $defense+5>>
<<set $tirs to $tirs+5>>
<<set $physique to $physique+5>>
<<set $charisme to $charisme+5>>
<<set $dribbles to $dribbles+5>><html>
<img src="images/dd_in_da_place.png" alt="dd_le_boss">
<div id="test" class="dialogue">
<textarea id="sp">Pas fameux tout ça, je vais mettre ça sur le stress de ta première sélection. Reste concentré !
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Aller aux vestiaires puis rentrer chez soi->EDF3]]</div>
<<set $passes to $passes+2>>
<<set $defense to $defense+2>>
<<set $tirs to $tirs+2>>
<<set $physique to $physique+2>>
<<set $charisme to $charisme+2>>
<<set $dribbles to $dribbles+2>><html>
<img src="images/journalistev1.png" alt="journalistev1">
<div id="test" class="dialogue">
<textarea id="sp">Bonjour, pourriez-vous accorder un instant au journal L’Équipe s’il-vous-plait ?
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep"> [[Oui bien sûr, avec plaisir !->EDF4]]</div>
<div class="rep">[[Non désolé, j’ai pas ton temps->EDF3.1]]</div>
<<set $Q11 to "Avec une personnalité agréable, il semble s’être intégré dans cette équipe. ">>
<<set $Q12 to "Joueur imbu de lui-même, il n’hésite pas à descendre ses futurs coéquipiers, avec qui il n’a joué qu’un jour rappelons-le. ">>
<<set $Q13 to "Même si son français laisse à désirer, il semble motivé pour jouer en Équipe de France. ">>
<<set $Q21 to "Fan de Karim, le simple fait de voir Olivier lui donne la nausée… Karim/Olivier, un débat qui scinde la communauté française du foot. ">>
<<set $Q22 to "Il est aussi réfléchi, calme, il accorde plus d’importance aux statistiques qu’à ses premières impressions sur le terrain. ">>
<<set $Q23 to "Olivier lui a laissé une bonne première impression en assurant son rôle de mentor et pilier dans cette équipe. ">>
<<set $Q31 to "Il reste lucide et sait qu’il faudra progresser pour intégrer le groupe de la Coupe du Monde, et c’est tout ce qu’on lui souhaite!">>
<<set $Q32 to "Malgré tout, il est confiant pour la Coupe du Monde (un peu trop d’ailleurs) et est certain d’être titulaire. Il va falloir qu’il assume après ces belles paroles!">>
<<set $Q33 to "Il fera tout pour aider son équipe vers la victoire, que ce soit sur le terrain ou sur le banc. Un joueur positif et dévoué.">><html>
<img src="images/journalistev1.png" alt="journalistev1">
<div id="test" class="dialogue">
<textarea id="sp">Très bien. Premièrement, comment s’est déroulé votre premier jour en Équipe de France?
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<<button [[(Amical) Très bien, j’ai fait une bonne performance à l'entraînement. Il faut que j’apprenne à connaître les autres joueurs, il y a déjà une bonne ambiance, tout devrait bien se passer. ->interview1]]>> <<set $Q1 to $Q11>> <<set $charisme to $charisme+3>><</button>>
<<button [[(Prétentieux) Le niveau est assez faible, mais je m’y attendais un peu… Champions du Monde, c’est plus ce que c’était... ->interview1]]>><<set $Q1 to $Q12>> <<set $charisme to $charisme+2>><</button>>
<<button [[(Footballeur cliché) Ah bé au niveau tekniko-taktik ils ont couru plus vite avec le ballon, mais si j’aurais pu je l'aurais fait, oui.->interview1]]><<set $Q1 to $Q13>><<set $charisme to $charisme+1>><</button>><html>
<img src="images/refus_interview.png" alt="refus_interview">
<div id="test" class="dialogue">
<textarea id="sp">Mais qu’est-ce que tu fais ! Rattrappe tout de suite ce journaliste et exuse-toi !! On remballe pas L’Équipe comme ça pauvre fou !
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Aller s’excuser auprès du journaliste et faire l’interview->EDF4]]</div><html>
<img src="images/journalistev1.png" alt="journalistev1">
<div id="test" class="dialogue">
<textarea id="sp">C’est noté, puis-je avoir votre avis sur Olivier?
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<<button [[(#TeamKarim) On sait tous qui est le meilleur avant-centre français, on ne compare pas la F1 au karting et je pense que Karim a plus sa place que lui dans cette équipe. ->interview2]]>><<set $Q2 to $Q21>><<set $charisme to $charisme+2>><</button>>
<<button [[(Neutre) Il fait partie du Top3 des meilleurs buteurs de l’Équipe de France et a gagné une Coupe du Monde : c’est un grand joueur français. ->interview2]]>><<set $Q2 to $Q22>><<set $charisme to $charisme+1>><</button>>
<<button [[(Amical) Olivier est un bon coéquipier, il m’a donné de bon conseil pendant l’entraînement. Je pense que je m’entendrais bien avec lui.->interview2]]>><<set $Q2 to $Q23>><<set $charisme to $charisme+3>><</button>><html>
<img src="images/journalistev1.png" alt="journalistev1">
<div id="test" class="dialogue">
<textarea id="sp">Une dernière question : Vous sentez-vous prêt pour disputer la prochaine Coupe du Monde ?</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<<button [[(Réaliste) Il faut déjà que je me fasse une place dans l’effectif, je vais m'entraîner dur pour être sélectionné. J’espère que ça paiera !->fin_interview]]>><<set $Q3 to $Q31>><<set $charisme to $charisme+3>><</button>>
<<button [[(Prétentieux) Bien sûr, avec moi dans l’équipe, c’est impossible qu’on perde un seul match. Préparez vos maillots à 3 étoiles! ->fin_interview]]>><<set $Q3 to $Q32>><<set $charisme to $charisme+1>><</button>>
<<button [[(Amical) J’ai confiance en mes coéquipiers pour remporter cette Coupe, avec ou sans moi. Je les soutiendrai jusqu’au bout et j’essaierai d’être un plus pour l’équipe !->fin_interview]]>><<set $Q3 to $Q33>><<set $charisme to $charisme+2>><</button>><html>
<img src="images/journalistev1.png" alt="journalistev1">
<div id="test" class="dialogue">
<textarea id="sp">Je vous remercie d’avoir répondu à mes questions, je rédigerai un petit paragraphe sur vous dans l’édition de demain. Au revoir !
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Au revoir !->FinEDF]]</div>
<html>
<img src="images/agent_content.png" alt="agent_content">
<div id="test" class="dialogue">
<textarea id="sp">Cette première semaine en Équipe de France est finie, il est temps de retourner mettre des buts en club en attendant de voir si tu reviendras pour la Coupe du Monde. D’ailleurs, l’article sur l’Équipe de France est paru dans le journal l’Équipe. Je te lis ton passage?
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Acquiescer->FinEDF2]]</div><<set $Q to $Q1+$Q2+$Q3>>
<img src="images/agent_content.png" alt="agent_content">
<div id="test" class="dialogue">
<div id="cont">$Q</div>
</div>
<button data-passage="RetourAuClub" class="bouton" type="button">Retour au club</button><<if $club is "PSG" or $club is "OM">>
<html>
<img src="images/agent_content.png" alt="agent_content">
<div id="test" class="dialogue">
<textarea id="sp">Alors ! T’es content de ce séjour chez les bleus ? Le coach veut te voir ! Il a l’air d’être plein d’ambition.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Dire que la coupe du monde est votre priorité absolue|BienDit1]]</div>
<div class="rep">[[Dire que vous préférez vous concentrer sur le club maintenant|BienDit1]]</div>
<<else>>
<html>
<img src="images/agent_content.png" alt="agent_content">
<div id="test" class="dialogue">
<textarea id="sp">Alors ! T’es content de ce séjour chez les espoirs ? Le coach veut te voir ! Il a l’air d’être plein d’ambition.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Dire que la coupe du monde des espoirs est votre priorité absolue|BienDit2]]</div>
<div class="rep">[[Dire que vous préférez vous concentrer sur le club maintenant|BienDit2]]</div>
<<endif>><html>
<img src="images/agent_content.png" alt="agent_content">
<div id="test" class="dialogue">
<textarea id="sp">Eh oui ! Je t’avais dit que tu aurais une surprise ! Tu as été sélectionné en Équipe de France Espoir pour la première fois, c’est formidable ! Didier Deschamps a décidé de s’occuper des jeunes en plus, super pour ta formation ! Ne me fais pas une Rabiot et réponds vite à Dédé ! C’est parti pour Clairefontaine, et ça, dès samedi !!! La coupe du monde espoir approche à grand pas !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Répondre à Dédé et partir pour Clairefontaine->Arrivée à Clairefontaine]]</div><html>
<img src="images/réveil.jpg" alt="agent_content">
<div id="test" class="dialogue">
<textarea id="sp">Bien dit ! Allez, comme je l’ai dit, vous avez une réunion, toi et ton équipe avec le coach. Alors c’est parti !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Réunion" class="bouton" type="button">Continuer</button><html>
<img src="images/réveil.jpg" alt="agent_content">
<div id="test" class="dialogue">
<textarea id="sp">Bien dit ! Allez, comme je l’ai dit, vous avez une réunion, toi et ton équipe avec le coach. Alors c’est parti !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Réunion2" class="bouton" type="button">Continuer</button><html>
<img src="images/CoachOrange.jpg" alt="Nouveau coach">
<div id="test" class="dialogue">
<textarea id="sp">Bonjour à tous et bon retour à ceux qui reviennent de leur séjour à international. Cette réunion a pour but de fixer les objectifs de cette saison. Comme vous vous en doutez, nous souhaitons tout gagner. Quand je dis tout, c’est tout. Notre effectif est bien renforcé, alors cette année, on ramènera la Ligue des Champions chez nous ! Le premier match de poule va arriver très vite alors préparez-vous. Ceux qui viennent d’arriver, venez me voir dans mon bureau un par un.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="BureauCoach" class="bouton" type="button">Rejoindre le coach dans son bureau</button>
<<audio "EDF" stop>>
<<audio "musiqueCL" loop play>><html>
<img src="images/CoachBureau.jpg" alt="Nouveau coach">
<div id="test" class="dialogue">
<textarea id="sp">Bon, tu sais les attentes qu’on a sur toi. Mais à quel poste es-tu le plus à l’aise ? Milieu offensif ? Ailier ? Attaquant de pointe ?</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Milieu offensif]]</div>
<div class="rep">[[Ailier]]</div>
<div class="rep">[[Attaquant de pointe]]</div>
<html>
<img src="images/CoachBureau.jpg" alt="Nouveau coach">
<div id="test" class="dialogue">
<textarea id="sp">Très bien, nous te préparons les entraînements spécifiques à ce poste. Tu débuteras ici en Champions League ! Alors sois prêt.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="MatchEurope" class="bouton" type="button">Avancer jusqu’au premier match de Ligue des Champions</button>
<<set $passes to $passes+5>>
<<set $tirs to $tirs+5>><html>
<img src="images/CoachBureau.jpg" alt="Nouveau coach">
<div id="test" class="dialogue">
<textarea id="sp">Très bien, nous te préparons les entraînements spécifiques à ce poste. Tu débuteras ici en Champions League ! Alors sois prêt.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="MatchEurope" class="bouton" type="button">Avancer jusqu’au premier match de Ligue des Champions</button>
<<set $tirs to $tirs+5>>
<<set $dribbles to $dribbles+5>><html>
<img src="images/CoachBureau.jpg" alt="Nouveau coach">
<div id="test" class="dialogue">
<textarea id="sp">Très bien, nous te préparons les entraînements spécifiques à ce poste. Tu débuteras ici en Champions League ! Alors sois prêt.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="MatchEurope" class="bouton" type="button">Avancer jusqu’au premier match de Ligue des Champions</button>
<<set $tirs to $tirs+5>>
<<set $physique to $physique+5>><html>
<img src="images/CoachOrange.jpg" alt="Nouveau coach">
<div id="test" class="dialogue">
<textarea id="sp">C’est aujourd’hui qu’on va montrer à l’Europe de quoi on est capable. Ne soyez pas impressionnés par les supporters et l’ambiance du stade. C’est à nous de leur faire peur ! Alors bougez-vous et montrez de quoi vous êtes capables !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="MatchEurope2" class="bouton" type="button">Commencer le match</button><html>
<img src="images/CoachOrange.jpg" alt="Nouveau coach">
<div id="test" class="dialogue">
<textarea id="sp">Bonjour à tous et bon retour à ceux qui reviennent de leur séjour à international. Cette réunion a pour but de fixer les objectifs de cette saison. Notre effectif est bien renforcé, alors cette année, on va tout donner pour la Ligue Europa ! Le premier match de poule va arriver très vite alors préparez-vous. Ceux qui viennent d’arriver, venez me voir dans mon bureau un par un.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="BureauCoach2" class="bouton" type="button">Rejoindre le coach dans son bureau</button>
<<audio "EDF" stop>>
<<audio "musiqueCL" loop play>><html>
<img src="images/CoachBureau.jpg" alt="Nouveau coach">
<div id="test" class="dialogue">
<textarea id="sp">Bon, tu sais les attentes qu’on a sur toi. Mais à quel poste es-tu le plus à l’aise ? Milieu offensif ? Ailier ? Attaquant de pointe ?</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Milieu offensif|MOC]]</div>
<div class="rep">[[Ailier|AGD]]</div>
<div class="rep">[[Attaquant de pointe|BU]]</div>
<html>
<img src="images/CoachBureau.jpg" alt="Nouveau coach">
<div id="test" class="dialogue">
<textarea id="sp">Très bien, nous te préparons les entraînements spécifiques à ce poste. Tu débuteras ici en Ligue Europa ! Alors sois prêt.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="MatchEurope" class="bouton" type="button">Avancer jusqu’au premier match de Ligue Europa</button>
<<set $tirs to $tirs+5>>
<<set $physique to $physique+5>><html>
<img src="images/CoachBureau.jpg" alt="Nouveau coach">
<div id="test" class="dialogue">
<textarea id="sp">Très bien, nous te préparons les entraînements spécifiques à ce poste. Tu débuteras ici en Ligue Europa ! Alors sois prêt.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="MatchEurope" class="bouton" type="button">Avancer jusqu’au premier match de Ligue Europa</button>
<<set $tirs to $tirs+5>>
<<set $dribbles to $dribbles+5>><html>
<img src="images/CoachBureau.jpg" alt="Nouveau coach">
<div id="test" class="dialogue">
<textarea id="sp">Très bien, nous te préparons les entraînements spécifiques à ce poste. Tu débuteras ici en Ligue Europa ! Alors sois prêt.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="MatchEurope" class="bouton" type="button">Avancer jusqu’au premier match de Ligue Europa</button>
<<set $tirs to $tirs+5>>
<<set $physique to $physique+5>><canvas id="pong" width="600" height="400" style="background: url(images/fondpong.jpg)"></canvas>
<button onclick="myStopFunction()" class="bouton" id="stop">Continuer</button>
<script>
var canvas = document.getElementById("pong");
document.getElementById("victoire").style.display="none";
document.getElementById("defaite").style.display="none";
document.getElementById("stop").style.display="none";
// getContext of canvas = methods and properties to draw and do a lot of thing to the canvas
var ctx = canvas.getContext('2d');
var background = new Image();
background.src = "images/fondpong.jpg";
// Ball object
var ball = {
x : canvas.width/2,
y : canvas.height/2,
radius : 10,
velocityX : 5,
velocityY : 5,
speed : 7,
color : "WHITE"
}
// User Paddle
var user = {
x : 0, // left side of canvas
y : (canvas.height - 100)/2, // -100 the height of paddle
width : 20,
height : 100,
score : 0,
color : "WHITE"
}
// COM Paddle
var com = {
x : canvas.width - 20, // - width of paddle
y : (canvas.height - 100)/2, // -100 the height of paddle
width : 20,
height : 100,
score : 0,
color : "WHITE"
}
// draw a rectangle, will be used to draw paddles
function drawRect(x, y, w, h, color){
ctx.fillStyle = color;
ctx.fillRect(x, y, w, h);
}
// draw circle, will be used to draw the ball
function drawArc(x, y, r, color){
ctx.fillStyle = color;
ctx.beginPath();
ctx.arc(x,y,r,0,Math.PI*2,true);
ctx.closePath();
ctx.fill();
}
// listening to the mouse
canvas.addEventListener("mousemove", getMousePos);
function getMousePos(evt){
let rect = canvas.getBoundingClientRect();
user.y = evt.clientY - rect.top - user.height/2;
}
// when COM or USER scores, we reset the ball
function resetBall(){
ball.x = canvas.width/2;
ball.y = canvas.height/2;
ball.velocityX = -ball.velocityX;
ball.speed = 7;
}
// draw text
function drawText(text,x,y){
ctx.fillStyle = "#FFF";
ctx.font = "75px fantasy";
ctx.fillText(text, x, y);
}
// collision detection
function collision(b,p){
p.top = p.y;
p.bottom = p.y + p.height;
p.left = p.x;
p.right = p.x + p.width;
b.top = b.y - b.radius;
b.bottom = b.y + b.radius;
b.left = b.x - b.radius;
b.right = b.x + b.radius;
return p.left < b.right && p.top < b.bottom && p.right > b.left && p.bottom > b.top;
}
// update function, the function that does all calculations
function update(){
// change the score of players, if the ball goes to the left "ball.x<0" computer win, else if "ball.x > canvas.width" the user win
if( ball.x - ball.radius < 0 ){
com.score++;
resetBall();
}else if( ball.x + ball.radius > canvas.width){
user.score++;
resetBall();
}
// the ball has a velocity
ball.x += ball.velocityX;
ball.y += ball.velocityY;
// computer plays for itself, and we must be able to beat it
// simple AI
com.y += ((ball.y - (com.y + com.height/2)))*0.035;
// when the ball collides with bottom and top walls we inverse the y velocity.
if(ball.y - ball.radius < 0 || ball.y + ball.radius > canvas.height){
ball.velocityY = -ball.velocityY;
}
// we check if the paddle hit the user or the com paddle
let player = (ball.x + ball.radius < canvas.width/2) ? user : com;
// if the ball hits a paddle
if(collision(ball,player)){
// play sound
// we check where the ball hits the paddle
let collidePoint = (ball.y - (player.y + player.height/2));
// normalize the value of collidePoint, we need to get numbers between -1 and 1.
// -player.height/2 < collide Point < player.height/2
collidePoint = collidePoint / (player.height/2);
// when the ball hits the top of a paddle we want the ball, to take a -45degees angle
// when the ball hits the center of the paddle we want the ball to take a 0degrees angle
// when the ball hits the bottom of the paddle we want the ball to take a 45degrees
// Math.PI/4 = 45degrees
let angleRad = (Math.PI/4) * collidePoint;
// change the X and Y velocity direction
let direction = (ball.x + ball.radius < canvas.width/2) ? 1 : -1;
ball.velocityX = direction * ball.speed * Math.cos(angleRad);
ball.velocityY = ball.speed * Math.sin(angleRad);
// speed up the ball everytime a paddle hits it.
ball.speed += 0.1;
}
}
// render function, the function that does al the drawing
function render(){
// clear the canvas
//drawRect(0, 0, canvas.width, canvas.height, "#000");
ctx.drawImage(background,0,0);
// draw the user score to the left
drawText(user.score,canvas.width/4,canvas.height/5);
// draw the COM score to the right
drawText(com.score,3*canvas.width/4,canvas.height/5);
// draw the net
//drawNet();
// draw the user's paddle
drawRect(user.x, user.y, user.width, user.height, user.color);
// draw the COM's paddle
drawRect(com.x, com.y, com.width, com.height, com.color);
// draw the ball
drawArc(ball.x, ball.y, ball.radius, ball.color);
}
function game(){
if (user.score<5 && com.score<5){
update();
render();
}
else{
ctx.drawImage(background,0,0);
document.getElementById("stop").style.display="block";
}
}
// number of frames per second
var framePerSecond = 50;
//call the game function 50 times every 1 Sec
loop = setInterval(game,1000/framePerSecond);
function myStopFunction() {
clearInterval(loop);
document.getElementById("pong").style.display="none";
document.getElementById("stop").style.display="none";
if(user.score>=5){document.getElementById("victoire").style.display="block"; }
if(com.score>=5){document.getElementById("defaite").style.display="block"; }
}
</script>
<div id="victoire">C'est une victoire ! Excellente performance, vous avez marqué ce premier match de poule.
<button data-passage="VictoirePouleLDC" class="bouton" type="button">Continuer...</button></div>
<div id="defaite">C'est une défaite ! Quelle mauvaise façon de démarrer ces phases de poule...
<button data-passage="DéfaitePouleLDC" class="bouton" type="button">Continuer...</button></div><html>
<img src="images/Coach3nrv.jpg" alt="Coach3">
<div id="test" class="dialogue">
<textarea id="sp">Très très mauvais début !!!!! Heureusement, il vous reste 5 matchs de poule pour vous rattraper !!! Alors vous avez intérêt à vous bouger à l’entraînement, sinon c’est moi qui vais vous bouger !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="DéfaitePouleLDC2" class="bouton" type="button">Continuer</button><html>
<img src="images/coach3content.jpg" alt="Coach3">
<div id="test" class="dialogue">
<textarea id="sp">C’est un bon début… si vous jouez comme ça, la finale va arriver très vite.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="VictoirePouleLDC2" class="bouton" type="button">Continuer</button>
<<set $defense to $defense+5>><html>
<img src="images/réveil.jpg" alt="agent_content">
<div id="test" class="dialogue">
<textarea id="sp">Je t’ai trouvé très bon sur le terrain aujourd’hui malgré la défaite de l'équipe !!! Des sponsors ont décidé de me contacter et ils veulent te voir ! Rejoins moi au bureau</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Sponsor" class="bouton" type="button">Aller voir les sponsors</button>
<<audio "musiqueCL" stop>>
<<audio "sponsor" loop play>><html>
<img src="images/agent4.jpg" alt="agent_content">
<div id="test" class="dialogue">
<textarea id="sp">Eh oui… y a pas que les clubs qui t’ont repéré après ce match, comme je te l’ai dit, des marques m’ont envoyé des propositions pour des sponsorings et des tournages de pub. Il va falloir faire un choix et rapidement, je te laisse faire. Pour les partenariats de sponsoring, voici ce qu’offre les marques en plus des chaussures de foot, des vêtements de sportswear, choisis bien : </textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Noke : 10 000€ par an, le style à l’américaine|Noke]]</div>
<div class="rep">[[Poma : 7 000€ par an, rien d’autre|Poma]]</div>
<div class="rep">[[Adodas : 9 000€ par an, la qualité allemande|Adodas]]</div><html>
<img src="images/réveil.jpg" alt="agent_content">
<div id="test" class="dialogue">
<textarea id="sp">Je t’ai trouvé très bon sur le terrain aujourd’hui !!! Des sponsors ont décidé de me contacter et ils veulent te voir ! Rejoins moi au bureau</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Sponsor" class="bouton" type="button">Aller voir les sponsors</button>
<<audio "musiqueCL" stop>>
<<audio "sponsor" loop play>><html>
<img src="images/agent4.jpg" alt="agent_content">
<div id="test" class="dialogue">
<textarea id="sp">Très bien, je suis pas très calé en mode donc ça me va. Passons aux pubs :</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Banano : promotion d’un jus de banane, déguisé en banane|Banano]]</div>
<div class="rep">[[L’Oréol : promotion Instagram d’un parfum au gazon|L'Oréol]]</div>
<div class="rep">[[Odi : voiture de sport à conduire|Odi]]</div>
<<set $charisme to $charisme+1>><html>
<img src="images/agent4.jpg" alt="agent_content">
<div id="test" class="dialogue">
<textarea id="sp">Très bien, je suis pas très calé en mode donc ça me va. Passons aux pubs :</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Banano : promotion d’un jus de banane, déguisé en banane|Banano]]</div>
<div class="rep">[[L’Oréol : promotion Instagram d’un parfum au gazon|L'Oréol]]</div>
<div class="rep">[[Odi : voiture de sport à conduire|Odi]]</div>
<<set $charisme to $charisme+3>><html>
<img src="images/agent4.jpg" alt="agent_content">
<div id="test" class="dialogue">
<textarea id="sp">Très bien, je suis pas très calé en mode donc ça me va. Passons aux pubs :</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Banano : promotion d’un jus de banane, déguisé en banane|Banano]]</div>
<div class="rep">[[L’Oréol : promotion Instagram d’un parfum au gazon|L'Oréol]]</div>
<div class="rep">[[Odi : voiture de sport à conduire|Odi]]</div>
<<set $charisme to $charisme+2>><html>
<img src="images/SponsoBof.jpg" alt="agent_content">
<div id="test" class="dialogue">
<textarea id="sp">Je suis pas un expert mais j’ai du goût ! Enfin bon si ça t’amuse, va pour Banano… mais ta réputation en prendra un coup. Dommage pour toi... Je m’occupe du contrat, tu peux rentrer te reposer !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="GoToTheFinal" class="bouton" type="button">Aller se reposer</button>
<<set $charisme to $charisme-10>><html>
<img src="images/SponsoBof.jpg" alt="agent_content">
<div id="test" class="dialogue">
<textarea id="sp">Je suis pas un expert mais j’ai du goût ! Enfin bon si ça t’amuse, va pour Banano… mais ta réputation en prendra un coup. Dommage pour toi... Je m’occupe du contrat, tu peux rentrer te reposer !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="GoToTheFinal" class="bouton" type="button">Aller se reposer</button>
<<set $charisme to $charisme-2>><html>
<img src="images/agent4.jpg" alt="agent_content">
<div id="test" class="dialogue">
<textarea id="sp">Je pense que c’était le meilleur choix à faire ! En tout cas, tu vas gagner en popularité avec ça. La classe ! Je m’occupe du contrat, tu peux rentrer te reposer !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="GoToTheFinal" class="bouton" type="button">Aller se reposer</button>
<<set $charisme to $charisme+5>><<if $club is "PSG" or $club is "OM">>
<html>
<img src="images/agent_content.png" alt="agent_content">
<div id="test" class="dialogue">
<textarea id="sp">BOOOOOOUUUUUUH !!!!! Salut toi… Eh ben ! T’as bien dormi ! On dirait que t’as oublié qu’aujourd’hui tu étais en finale Ligue des Champions ! Euh… Tu me demandes ce qu’il s’est passé ? Ben toi et ton équipe avez écrasé le championnat et la coupe de France et vous êtes en finale de Ligue des Champions ! Oui c’est dur de se rappeler de tout ça au réveil je sais… Allez, on fonce au briefing du coach !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="DiscoursPascal" class="bouton" type="button">Aller au match sans chercher à comprendre</button>
<<else>>
<html>
<img src="images/agent_content.png" alt="agent_content">
<div id="test" class="dialogue">
<textarea id="sp">BOOOOOOUUUUUUH !!!!! Salut toi… Eh ben ! T’as bien dormi ! On dirait que t’as oublié qu’aujourd’hui tu étais en finale de Ligue Europa ! Euh… Tu me demandes ce qu’il s’est passé ? Ben toi et ton équipe avez rempli tous les objectifs en championnat et en coupe de France… Et en bonus vous allez pouvoir écrire l’histoire en gagnant la première Ligue Europa du club. Oui c’est dur de se rappeler de tout ça au réveil je sais… Allez, on fonce au briefing du coach !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="DiscoursPascal" class="bouton" type="button">Aller au match sans chercher à comprendre</button>
<<endif>><html>
<img src="images/CoachOrange.jpg" alt="Nouveau coach">
<div id="test" class="dialogue">
<textarea id="sp">Vous méritez de gagner cette coupe. Le problème c'est pas tant de savoir si je vais passer pour un con, c'est de savoir si vous avez la capacité intellectuelle, physique, et technique de le faire ! C'est maintenant qu'il faut le faire, pas demain, ni hier. C'est maintenant. Il n'y a plus qu'à manger : le couvert est dressé. C'est magnifique, juste avant de partir en vacances. Au dernier moment, on passe la tête. Et ce qu'il y a de bien, je m'en suis rendu compte, c'est que je ne suis pas le seul à vous aimer !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="DiscoursPascal2" class="bouton" type="button">Continuer...</button>
<<audio "musiqueCL" loop play>>
<<audio "sponsor" stop>><html>
<img src="images/CoachOrange.jpg" alt="Nouveau coach">
<div id="test" class="dialogue">
<textarea id="sp">C'est juste beau, c'est juste votre vie… Alors c’est parti !!!</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="FinaleLDC" class="bouton" type="button">Commencer la finale</button>
<canvas id="pong" width="600" height="400" style="background: url(images/fondpong.jpg)"></canvas>
<button onclick="myStopFunction()" class="bouton" id="stop">Continuer</button>
<script>
var canvas = document.getElementById("pong");
document.getElementById("victoire").style.display="none";
document.getElementById("defaite").style.display="none";
document.getElementById("stop").style.display="none";
// getContext of canvas = methods and properties to draw and do a lot of thing to the canvas
var ctx = canvas.getContext('2d');
var background = new Image();
background.src = "images/fondpong.jpg";
// Ball object
var ball = {
x : canvas.width/2,
y : canvas.height/2,
radius : 10,
velocityX : 5,
velocityY : 5,
speed : 7,
color : "WHITE"
}
// User Paddle
var user = {
x : 0, // left side of canvas
y : (canvas.height - 100)/2, // -100 the height of paddle
width : 20,
height : 100,
score : 0,
color : "WHITE"
}
// COM Paddle
var com = {
x : canvas.width - 20, // - width of paddle
y : (canvas.height - 100)/2, // -100 the height of paddle
width : 20,
height : 100,
score : 0,
color : "WHITE"
}
// draw a rectangle, will be used to draw paddles
function drawRect(x, y, w, h, color){
ctx.fillStyle = color;
ctx.fillRect(x, y, w, h);
}
// draw circle, will be used to draw the ball
function drawArc(x, y, r, color){
ctx.fillStyle = color;
ctx.beginPath();
ctx.arc(x,y,r,0,Math.PI*2,true);
ctx.closePath();
ctx.fill();
}
// listening to the mouse
canvas.addEventListener("mousemove", getMousePos);
function getMousePos(evt){
let rect = canvas.getBoundingClientRect();
user.y = evt.clientY - rect.top - user.height/2;
}
// when COM or USER scores, we reset the ball
function resetBall(){
ball.x = canvas.width/2;
ball.y = canvas.height/2;
ball.velocityX = -ball.velocityX;
ball.speed = 7;
}
// draw text
function drawText(text,x,y){
ctx.fillStyle = "#FFF";
ctx.font = "75px fantasy";
ctx.fillText(text, x, y);
}
// collision detection
function collision(b,p){
p.top = p.y;
p.bottom = p.y + p.height;
p.left = p.x;
p.right = p.x + p.width;
b.top = b.y - b.radius;
b.bottom = b.y + b.radius;
b.left = b.x - b.radius;
b.right = b.x + b.radius;
return p.left < b.right && p.top < b.bottom && p.right > b.left && p.bottom > b.top;
}
// update function, the function that does all calculations
function update(){
// change the score of players, if the ball goes to the left "ball.x<0" computer win, else if "ball.x > canvas.width" the user win
if( ball.x - ball.radius < 0 ){
com.score++;
resetBall();
}else if( ball.x + ball.radius > canvas.width){
user.score++;
resetBall();
}
// the ball has a velocity
ball.x += ball.velocityX;
ball.y += ball.velocityY;
// computer plays for itself, and we must be able to beat it
// simple AI
com.y += ((ball.y - (com.y + com.height/2)))*0.04;
// when the ball collides with bottom and top walls we inverse the y velocity.
if(ball.y - ball.radius < 0 || ball.y + ball.radius > canvas.height){
ball.velocityY = -ball.velocityY;
}
// we check if the paddle hit the user or the com paddle
let player = (ball.x + ball.radius < canvas.width/2) ? user : com;
// if the ball hits a paddle
if(collision(ball,player)){
// play sound
// we check where the ball hits the paddle
let collidePoint = (ball.y - (player.y + player.height/2));
// normalize the value of collidePoint, we need to get numbers between -1 and 1.
// -player.height/2 < collide Point < player.height/2
collidePoint = collidePoint / (player.height/2);
// when the ball hits the top of a paddle we want the ball, to take a -45degees angle
// when the ball hits the center of the paddle we want the ball to take a 0degrees angle
// when the ball hits the bottom of the paddle we want the ball to take a 45degrees
// Math.PI/4 = 45degrees
let angleRad = (Math.PI/4) * collidePoint;
// change the X and Y velocity direction
let direction = (ball.x + ball.radius < canvas.width/2) ? 1 : -1;
ball.velocityX = direction * ball.speed * Math.cos(angleRad);
ball.velocityY = ball.speed * Math.sin(angleRad);
// speed up the ball everytime a paddle hits it.
ball.speed += 0.1;
}
}
// render function, the function that does al the drawing
function render(){
// clear the canvas
//drawRect(0, 0, canvas.width, canvas.height, "#000");
ctx.drawImage(background,0,0);
// draw the user score to the left
drawText(user.score,canvas.width/4,canvas.height/5);
// draw the COM score to the right
drawText(com.score,3*canvas.width/4,canvas.height/5);
// draw the net
//drawNet();
// draw the user's paddle
drawRect(user.x, user.y, user.width, user.height, user.color);
// draw the COM's paddle
drawRect(com.x, com.y, com.width, com.height, com.color);
// draw the ball
drawArc(ball.x, ball.y, ball.radius, ball.color);
}
function game(){
if (user.score<5 && com.score<5){
update();
render();
}
else{
ctx.drawImage(background,0,0);
document.getElementById("stop").style.display="block";
}
}
// number of frames per second
var framePerSecond = 50;
//call the game function 50 times every 1 Sec
loop = setInterval(game,1000/framePerSecond);
function myStopFunction() {
clearInterval(loop);
document.getElementById("pong").style.display="none";
document.getElementById("stop").style.display="none";
if(user.score>=5){document.getElementById("victoire").style.display="block"; }
if(com.score>=5){document.getElementById("defaite").style.display="block"; }
}
</script>
<div id="victoire">C'est une victoire ! CHAMPION MON FRERE !!!
<button data-passage="VictoireFinaleLDC" class="bouton" type="button">Continuer...</button></div>
<div id="defaite">C'est une défaite... Si proche du but...
<button data-passage="DéfaiteFinaleLDC" class="bouton" type="button">Continuer...</button></div>
<html>
<img src="images/coach3content.jpg" alt="Coach3">
<div id="test" class="dialogue">
<textarea id="sp">Vous l’avez fait ! Je reste sans voix… Merci pour tout… JE VOUS AIME</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="VictoireFinaleLDC2" class="bouton" type="button">Fêter la victoire et rentrer</button>
<<set $passes to $passes+3>>
<<set $defense to $defense+3>>
<<set $tirs to $tirs+3>>
<<set $physique to $physique+3>>
<<set $charisme to $charisme+3>>
<<set $dribbles to $dribbles+3>><html>
<img src="images/Coach3nrv.jpg" alt="Coach3">
<div id="test" class="dialogue">
<textarea id="sp">On ne peut pas vous en vouloir… Vous avez fait tout ce que vous avez pu ! Enfin… NULLLLLL !!!</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="DéfaiteFinaleLDC2" class="bouton" type="button">Rentrer chez soi en pleurant</button><html>
<img src="images/réveil.jpg" alt="agent_content">
<div id="test" class="dialogue">
<textarea id="sp">C’est pas grave mon grand, tu étais le meilleur ! Ce n’est pas de ta faute si vous avez pris 3 buts. Tu m’as fait rêver ! Allez maintenant on se prépare pour la coupe du monde !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="CDMStart" class="bouton" type="button">Objectif coupe du monde</button>
<<audio "EDF" loop play>>
<<audio "musiqueCL" stop>><html>
<img src="images/réveil.jpg" alt="agent_content">
<div id="test" class="dialogue">
<textarea id="sp">Tu es le meilleur ! Tu me fais rêver ! Allez maintenant on se prépare pour la coupe du monde !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="CDMStart" class="bouton" type="button">Objectif coupe du monde</button>
<<audio "EDF" loop play>>
<<audio "musiqueCL" stop>><<if $club is "PSG" or $club is "OM">>
<html>
<img src="images/agent_content.png" alt="agent_content">
<div id="test" class="dialogue">
<textarea id="sp">On a pas le temps de souffler, après cette coupe d’Europe, c’est l'heure de ta première Coupe du Monde ! Tu te reposeras dans l’avion, en route pour l’aéroport !
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Let’s go->CDMa2]]</div>
<<else>>
<html>
<img src="images/agent_content.png" alt="agent_content">
<div id="test" class="dialogue">
<textarea id="sp">On a pas le temps de souffler, après cette coupe d’Europe, c’est l'heure de ta première Coupe du Monde espoir! Tu te reposeras dans l’avion, en route pour l’aéroport !
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Let’s go->CDMa2]]</div>
<<endif>><html>
<img src="images/dd_vestiaires.png" alt="dd_vestiaires">
<div id="test" class="dialogue">
<textarea id="sp">Nous y voilà les p’tit gars ! La Coupe du Monde ! Les qualif’ c’était un échauffement, là on va affronter des vraies équipes ! Je vous rappelle qu’on est favoris et que tout le monde va nous attendre au tournant ! Un premier match, c’est fait pour se mettre en confiance et montrer aux autres qui sont les patrons ! Alors vous allez me faire un match de folie ! C’EST QUI LES PATROOOONS ???!
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[(avec toute l’équipe) ON EST LES PATROOOONS !!!!->CDMa4]]
</div>
<div class="rep">[[Ne rien dire->CDMa3]]
</div><html>
<img src="images/dd_chaud.png" alt="dd_chaud">
<div id="test" class="dialogue">
<textarea id="sp">VOILÀ ! JE VEUX DES GUERRIERS ! SUR LE TERRAIN !
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<<button [[OUAIS!!!->CDMa5]]>><</button>>
<<button [[Pourquoi il crie ?->CDMa5]]>><<set $charisme to $charisme-3>><</button>><html>
<img src="images/dd_chaud.png" alt="dd_chaud">
<div id="test" class="dialogue">
<textarea id="sp">J’AI RIEN ENTENDU !!! C’EST QUI LES PATROOOONS ???!
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[-(avec toute l’équipe) ON EST LES PATROOOONS !!!!->CDMa4]]
</div>
<div class="rep">[[Ne rien dire->CDMa3]]
</div><html>
<img src="images/dd_vestiaires.png" alt="dd_vestiaires">
<div id="test" class="dialogue">
<textarea id="sp">Oups, je n’ai pas eu le temps de vous expliquer la tactique. Tant pis, vous verrez bien !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Jeu catch ball 1" class="bouton" type="button">---------------- START ----------------</button>
<canvas id="catch_ball1" width="600" height="400" tabindex="1"></canvas>
<button onclick="myStopFunction()" class="bouton" id="stop_cb1"> Continuer </button>
<script>
document.getElementById("victoire").style.display="none";
document.getElementById("defaite").style.display="none";
document.getElementById("stop_cb1").style.display="none";
// Collect The Square game
// Get a reference to the canvas DOM element
var canvas = document.getElementById('catch_ball1');
// Get the canvas drawing context
var context = canvas.getContext('2d');
var fond = new Image();
fond.src = "image/fond.jpg";
var balle = new Image();
balle.src = "image/balle.png";
var joueur = new Image();
joueur.src = "image/joueur.png";
// Your score
var score = 0;
// Properties for your square
var x = 50; // X position
var y = 100; // Y position
var speed = 6; // Distance to move each frame
var sideLength = 50; // Length of each side of the square
// FLags to track which keys are pressed
var down = false;
var up = false;
var right = false;
var left = false;
// Properties for the target square
var targetX = 0;
var targetY = 0;
var targetLength = 50;
// Determine if number a is within the range b to c (exclusive)
function isWithin(a, b, c) {
return (a > b && a < c);
}
// Countdown timer (in seconds)
var countdown = 30;
// ID to track the setTimeout
var id = null;
// Listen for keydown events
canvas.addEventListener('keydown', function(event) {
event.preventDefault();
console.log(event.key, event.keyCode);
if (event.keyCode === 40) { // DOWN
down = true;
}
if (event.keyCode === 38) { // UP
up = true;
}
if (event.keyCode === 37) { // LEFT
left = true;
}
if (event.keyCode === 39) { // RIGHT
right = true;
}
});
// Listen for keyup events
canvas.addEventListener('keyup', function(event) {
event.preventDefault();
console.log(event.key, event.keyCode);
if (event.keyCode === 40) { // DOWN
down = false;
}
if (event.keyCode === 38) { // UP
up = false;
}
if (event.keyCode === 37) { // LEFT
left = false;
}
if (event.keyCode === 39) { // RIGHT
right = false;
}
});
// Show the start menu
function menu() {
erase();
context.drawImage(fond,0,0);
context.fillStyle = '#000000';
context.font = '30px Arial';
context.textAlign = 'center';
context.fillText('Touche plus de 20 ballons avec ta tête!', canvas.width / 2, canvas.height / 4);
context.font = '24px Arial';
context.fillText('Clique pour commencer, tu auras 30 secondes', canvas.width / 2, canvas.height / 2);
context.font = '18px Arial'
context.fillText('Utilise les flèches du clavier pour bouger ta tête', canvas.width / 2, (canvas.height / 4) * 3);
// Start the game on a click
canvas.addEventListener('click', startGame);
}
// Start the game
function startGame() {
// Reduce the countdown timer ever second
id = setInterval(function() {
countdown--;
}, 1000)
// Stop listening for click events
canvas.removeEventListener('click', startGame);
// Put the target at a random starting point
moveTarget();
// Kick off the draw loop
draw();
}
// Show the game over screen
function endGame() {
// Stop the countdown
clearInterval(id);
// Display the final score
erase();
context.fillStyle = '#000000';
context.font = '24px Arial';
context.textAlign = 'center';
context.fillText('Final Score: ' + score, canvas.width / 2, canvas.height / 2);
document.getElementById("stop_cb1").style.display="block";
}
// Move the target square to a random position
function moveTarget() {
targetX = Math.round(Math.random() * (canvas.width - targetLength));
targetY = Math.round(Math.random() * (canvas.height - targetLength))
}
// Clear the canvas
function erase() {
context.fillStyle = '#FFFFFF';
context.fillRect(0, 0, 600, 400);
}
// The main draw loop
function draw() {
erase();
// Move the square
if (down) {
y += speed;
}
if (up) {
y -= speed;
}
if (right) {
x += speed;
}
if (left) {
x -= speed;
}
// Keep the square within the bounds
if (y + sideLength > canvas.height) {
y = canvas.height - sideLength;
}
if (y < 0) {
y = 0;
}
if (x < 0) {
x = 0;
}
if (x + sideLength > canvas.width) {
x = canvas.width - sideLength;
}
// Collide with the target
if (isWithin(targetX, x, x + sideLength) || isWithin(targetX + targetLength, x, x + sideLength)) { // X
if (isWithin(targetY, y, y + sideLength) || isWithin(targetY + targetLength, y, y + sideLength)) { // Y
// Respawn the target
moveTarget();
// Increase the score
score++;
}
}
context.drawImage(fond,0,0);
// Draw the square
context.drawImage(joueur,x,y);
//context.fillStyle = '#FF0000';
//context.fillRect(x, y, sideLength, sideLength);
// Draw the target
context.drawImage(balle,targetX,targetY);
//context.fillStyle = '#00FF00';
//context.fillRect(targetX, targetY, targetLength, targetLength);
// Draw the score and time remaining
context.fillStyle = '#000000';
context.font = '24px Arial';
context.textAlign = 'left';
context.fillText('Score: ' + score, 10, 24);
context.fillText('Temps restant: ' + countdown, 10, 50);
// End the game or keep playing
if (countdown <= 0) {
endGame();
} else {
window.requestAnimationFrame(draw);
}
}
function myStopFunction() {
document.getElementById("stop_cb1").style.display="none";
if(score>=20){document.getElementById("victoire").style.display="block";}
if(score<20){document.getElementById("defaite").style.display="block";}
}
// Start the game
menu();
canvas.focus();
</script>
<div id="victoire">VICTOIRE !!! <button data-passage="CDMa7.1" class="bouton" type="button">Continuer...</button></div>
<div id="defaite">Défaite... <button data-passage="CDMa6.2" class="bouton" type="button">Continuer...</button></div>
<<audio "fifa" loop play>>
<<audio "EDF" stop>><html>
<img src="images/dd_chaud.png" alt="dd_chaud">
<div id="test" class="dialogue">
<textarea id="sp">ET OUI ! Des guerriers je vous dis ! On continue jusqu'en finale les gars !!!</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<<button [[(avec toute l’équipe) OUAIS COACH !!!!->CDMa8]]>><<set $charisme to $charisme+1>><<set $passes to $passes+1>><<set $defense to $defense+1>><<set $tirs to $tirs+1>><<set $dribbles to $dribbles+1>><<set $physique to $physique+1>><</button>>
<<button [[Ne rien dire->CDMa8]]>><<set $passes to $passes+1>><<set $defense to $defense+1>><<set $tirs to $tirs+1>><<set $dribbles to $dribbles+1>><<set $physique to $physique+1>><</button>>
<<audio "fifa" stop>>
<<audio "EDF" loop play>><html>
<img src="images/dd_chaud.png" alt="dd_chaud">
<div id="test" class="dialogue">
<textarea id="sp"> Des patrons en carton oui ! Heureusement que c’est qu’un match de poules hein ! On a plus le droit à l’erreur alors remuez-vous ! </textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Se remotiver pour la suite->CDMa8]]</div>
<div class="rep">[[Faire la grève->CDMafin]]</div>
<<audio "fifa" stop>>
<<audio "EDF" loop play>><html>
<img src="images/dd_vestiaires.png" alt="dd_vestiaires">
<div id="test" class="dialogue">
<textarea id="sp">C’est la demi-finale les coco ! On donne tout d’entrée de jeu et ça va le faire. Vous vous souvenez du jeu du premier match de poule? Bah j’espère pour vous ! Allez, à fond ! </textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Jeu catch ball 2" class="bouton" type="button">---------------- START ----------------</button>
<<set $charisme to $charisme-20>>
<html>
<img src="images/dd_chaud.png" alt="dd_chaud">
<div id="test" class="dialogue">
<textarea id="sp">Eh ben, on aura même pas passé les poules. Quelle honte !
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
[[game over->Epilogue]]<canvas id="catch_ball1" width="600" height="400" tabindex="1"></canvas>
<button onclick="myStopFunction()" class="bouton" id="stop_cb1"> Continuer </button>
<script>
document.getElementById("victoire").style.display="none";
document.getElementById("defaite").style.display="none";
document.getElementById("stop_cb1").style.display="none";
// Collect The Square game
// Get a reference to the canvas DOM element
var canvas = document.getElementById('catch_ball1');
// Get the canvas drawing context
var context = canvas.getContext('2d');
var fond = new Image();
fond.src = "image/fond.jpg";
var balle = new Image();
balle.src = "image/balle.png";
var joueur = new Image();
joueur.src = "image/joueur.png";
// Your score
var score = 0;
// Properties for your square
var x = 50; // X position
var y = 100; // Y position
var speed = 6; // Distance to move each frame
var sideLength = 50; // Length of each side of the square
// FLags to track which keys are pressed
var down = false;
var up = false;
var right = false;
var left = false;
// Properties for the target square
var targetX = 0;
var targetY = 0;
var targetLength = 50;
// Determine if number a is within the range b to c (exclusive)
function isWithin(a, b, c) {
return (a > b && a < c);
}
// Countdown timer (in seconds)
var countdown = 30;
// ID to track the setTimeout
var id = null;
// Listen for keydown events
canvas.addEventListener('keydown', function(event) {
event.preventDefault();
console.log(event.key, event.keyCode);
if (event.keyCode === 40) { // DOWN
down = true;
}
if (event.keyCode === 38) { // UP
up = true;
}
if (event.keyCode === 37) { // LEFT
left = true;
}
if (event.keyCode === 39) { // RIGHT
right = true;
}
});
// Listen for keyup events
canvas.addEventListener('keyup', function(event) {
event.preventDefault();
console.log(event.key, event.keyCode);
if (event.keyCode === 40) { // DOWN
down = false;
}
if (event.keyCode === 38) { // UP
up = false;
}
if (event.keyCode === 37) { // LEFT
left = false;
}
if (event.keyCode === 39) { // RIGHT
right = false;
}
});
// Show the start menu
function menu() {
erase();
context.drawImage(fond,0,0);
context.fillStyle = '#000000';
context.font = '30px Arial';
context.textAlign = 'center';
context.fillText('Touche plus de 30 ballons avec ta tête!', canvas.width / 2, canvas.height / 4);
context.font = '24px Arial';
context.fillText('Clique pour commencer, tu auras 30 secondes', canvas.width / 2, canvas.height / 2);
context.font = '18px Arial'
context.fillText('Utilise les flèches du clavier pour bouger ta tête', canvas.width / 2, (canvas.height / 4) * 3);
// Start the game on a click
canvas.addEventListener('click', startGame);
}
// Start the game
function startGame() {
// Reduce the countdown timer ever second
id = setInterval(function() {
countdown--;
}, 1000)
// Stop listening for click events
canvas.removeEventListener('click', startGame);
// Put the target at a random starting point
moveTarget();
// Kick off the draw loop
draw();
}
// Show the game over screen
function endGame() {
// Stop the countdown
clearInterval(id);
// Display the final score
erase();
context.fillStyle = '#000000';
context.font = '24px Arial';
context.textAlign = 'center';
context.fillText('Final Score: ' + score, canvas.width / 2, canvas.height / 2);
document.getElementById("stop_cb1").style.display="block";
}
// Move the target square to a random position
function moveTarget() {
targetX = Math.round(Math.random() * (canvas.width - targetLength));
targetY = Math.round(Math.random() * (canvas.height - targetLength))
}
// Clear the canvas
function erase() {
context.fillStyle = '#FFFFFF';
context.fillRect(0, 0, 600, 400);
}
// The main draw loop
function draw() {
erase();
// Move the square
if (down) {
y += speed;
}
if (up) {
y -= speed;
}
if (right) {
x += speed;
}
if (left) {
x -= speed;
}
// Keep the square within the bounds
if (y + sideLength > canvas.height) {
y = canvas.height - sideLength;
}
if (y < 0) {
y = 0;
}
if (x < 0) {
x = 0;
}
if (x + sideLength > canvas.width) {
x = canvas.width - sideLength;
}
// Collide with the target
if (isWithin(targetX, x, x + sideLength) || isWithin(targetX + targetLength, x, x + sideLength)) { // X
if (isWithin(targetY, y, y + sideLength) || isWithin(targetY + targetLength, y, y + sideLength)) { // Y
// Respawn the target
moveTarget();
// Increase the score
score++;
}
}
context.drawImage(fond,0,0);
// Draw the square
context.drawImage(joueur,x,y);
//context.fillStyle = '#FF0000';
//context.fillRect(x, y, sideLength, sideLength);
// Draw the target
context.drawImage(balle,targetX,targetY);
//context.fillStyle = '#00FF00';
//context.fillRect(targetX, targetY, targetLength, targetLength);
// Draw the score and time remaining
context.fillStyle = '#000000';
context.font = '24px Arial';
context.textAlign = 'left';
context.fillText('Score: ' + score, 10, 24);
context.fillText('Temps restant: ' + countdown, 10, 50);
// End the game or keep playing
if (countdown <= 0) {
endGame();
} else {
window.requestAnimationFrame(draw);
}
}
function myStopFunction() {
document.getElementById("stop_cb1").style.display="none";
if(score>=30){document.getElementById("victoire").style.display="block";}
if(score<30){document.getElementById("defaite").style.display="block";}
}
// Start the game
menu();
canvas.focus();
</script>
<div id="victoire">VICTOIRE !!! <button data-passage="CDMa9.1" class="bouton" type="button">Continuer...</button></div>
<div id="defaite">Défaite... <button data-passage="CDMa9.2" class="bouton" type="button">Continuer...</button></div>
<<audio "fifa" loop play>>
<<audio "EDF" stop>><<set $passes to $passes+1>><<set $defense to $defense+1>><<set $tirs to $tirs+1>><<set $dribbles to $dribbles+1>><<set $physique to $physique+1>>
<html>
<img src="images/dd_vestiaires.png" alt="dd_vestiaires">
<div id="test" class="dialogue">
<textarea id="sp">On va la chercher cette étoile ! Plus qu’un match et on est Champions du Monde ! Vous avez 5 jours pour récupérer avant la finale, profitez-en et soyez frais ! </textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Le jour de finale->CDMa10.1]]</div>
<<audio "fifa" stop>>
<<audio "EDF" loop play>><html>
<img src="images/dd_vestiaires.png" alt="dd_vestiaires">
<div id="test" class="dialogue">
<textarea id="sp">J’imagine que vous êtes tous très déçus, on a pas réussi à faire l’exploit… Je reste très fier de vous, vous avez fait un beau parcours cette année encore. Il vous reste la petite finale pour jouer la troisième place… Vous avez 4 jours pour récupérer avant celle-ci…
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<div class="rep">[[Le jour de la petite finale->CDMa10.2]]</div>
<<audio "fifa" stop>>
<<audio "EDF" loop play>><html>
<img src="images/dd_vestiaires.png" alt="dd_vestiaires">
<div id="test" class="dialogue">
<textarea id="sp">C’est le grand jour ! On a la possibilité d’écrire l’Histoire du foot aujourd’hui. Rappelez-vous, on ne change pas de tactique. Maintenant vous savez ce qu’il vous reste à faire : GAGNER CE MATCH ! </textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Jeu catch ball 3" class="bouton" type="button">---------------- START ----------------</button><html>
<img src="images/dd_vestiaires.png" alt="dd_vestiaires">
<div id="test" class="dialogue">
<textarea id="sp">C’est le jour J ! On a la possibilité de finir 3ème, alors même si cette petite finale n’a pas les saveurs d’une vrai finale, je compte sur vous pour tout donner !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Jeu catch ball 3.1" class="bouton" type="button">---------------- START ----------------</button><canvas id="catch_ball1" width="600" height="400" tabindex="1"></canvas>
<button onclick="myStopFunction()" class="bouton" id="stop_cb1"> Continuer </button>
<script>
document.getElementById("victoire").style.display="none";
document.getElementById("defaite").style.display="none";
document.getElementById("stop_cb1").style.display="none";
// Collect The Square game
// Get a reference to the canvas DOM element
var canvas = document.getElementById('catch_ball1');
// Get the canvas drawing context
var context = canvas.getContext('2d');
var fond = new Image();
fond.src = "image/fond.jpg";
var balle = new Image();
balle.src = "image/balle.png";
var joueur = new Image();
joueur.src = "image/joueur.png";
// Your score
var score = 0;
// Properties for your square
var x = 50; // X position
var y = 100; // Y position
var speed = 6; // Distance to move each frame
var sideLength = 50; // Length of each side of the square
// FLags to track which keys are pressed
var down = false;
var up = false;
var right = false;
var left = false;
// Properties for the target square
var targetX = 0;
var targetY = 0;
var targetLength = 50;
// Determine if number a is within the range b to c (exclusive)
function isWithin(a, b, c) {
return (a > b && a < c);
}
// Countdown timer (in seconds)
var countdown = 30;
// ID to track the setTimeout
var id = null;
// Listen for keydown events
canvas.addEventListener('keydown', function(event) {
event.preventDefault();
console.log(event.key, event.keyCode);
if (event.keyCode === 40) { // DOWN
down = true;
}
if (event.keyCode === 38) { // UP
up = true;
}
if (event.keyCode === 37) { // LEFT
left = true;
}
if (event.keyCode === 39) { // RIGHT
right = true;
}
});
// Listen for keyup events
canvas.addEventListener('keyup', function(event) {
event.preventDefault();
console.log(event.key, event.keyCode);
if (event.keyCode === 40) { // DOWN
down = false;
}
if (event.keyCode === 38) { // UP
up = false;
}
if (event.keyCode === 37) { // LEFT
left = false;
}
if (event.keyCode === 39) { // RIGHT
right = false;
}
});
// Show the start menu
function menu() {
erase();
context.drawImage(fond,0,0);
context.fillStyle = '#000000';
context.font = '30px Arial';
context.textAlign = 'center';
context.fillText('Touche plus de 34 ballons avec ta tête!', canvas.width / 2, canvas.height / 4);
context.font = '24px Arial';
context.fillText('Clique pour commencer, tu auras 30 secondes', canvas.width / 2, canvas.height / 2);
context.font = '18px Arial'
context.fillText('Utilise les flèches du clavier pour bouger ta tête', canvas.width / 2, (canvas.height / 4) * 3);
// Start the game on a click
canvas.addEventListener('click', startGame);
}
// Start the game
function startGame() {
// Reduce the countdown timer ever second
id = setInterval(function() {
countdown--;
}, 1000)
// Stop listening for click events
canvas.removeEventListener('click', startGame);
// Put the target at a random starting point
moveTarget();
// Kick off the draw loop
draw();
}
// Show the game over screen
function endGame() {
// Stop the countdown
clearInterval(id);
// Display the final score
erase();
context.fillStyle = '#000000';
context.font = '24px Arial';
context.textAlign = 'center';
context.fillText('Final Score: ' + score, canvas.width / 2, canvas.height / 2);
document.getElementById("stop_cb1").style.display="block";
}
// Move the target square to a random position
function moveTarget() {
targetX = Math.round(Math.random() * (canvas.width - targetLength));
targetY = Math.round(Math.random() * (canvas.height - targetLength))
}
// Clear the canvas
function erase() {
context.fillStyle = '#FFFFFF';
context.fillRect(0, 0, 600, 400);
}
// The main draw loop
function draw() {
erase();
// Move the square
if (down) {
y += speed;
}
if (up) {
y -= speed;
}
if (right) {
x += speed;
}
if (left) {
x -= speed;
}
// Keep the square within the bounds
if (y + sideLength > canvas.height) {
y = canvas.height - sideLength;
}
if (y < 0) {
y = 0;
}
if (x < 0) {
x = 0;
}
if (x + sideLength > canvas.width) {
x = canvas.width - sideLength;
}
// Collide with the target
if (isWithin(targetX, x, x + sideLength) || isWithin(targetX + targetLength, x, x + sideLength)) { // X
if (isWithin(targetY, y, y + sideLength) || isWithin(targetY + targetLength, y, y + sideLength)) { // Y
// Respawn the target
moveTarget();
// Increase the score
score++;
}
}
context.drawImage(fond,0,0);
// Draw the square
context.drawImage(joueur,x,y);
//context.fillStyle = '#FF0000';
//context.fillRect(x, y, sideLength, sideLength);
// Draw the target
context.drawImage(balle,targetX,targetY);
//context.fillStyle = '#00FF00';
//context.fillRect(targetX, targetY, targetLength, targetLength);
// Draw the score and time remaining
context.fillStyle = '#000000';
context.font = '24px Arial';
context.textAlign = 'left';
context.fillText('Score: ' + score, 10, 24);
context.fillText('Temps restant: ' + countdown, 10, 50);
// End the game or keep playing
if (countdown <= 0) {
endGame();
} else {
window.requestAnimationFrame(draw);
}
}
function myStopFunction() {
document.getElementById("stop_cb1").style.display="none";
if(score>=34){document.getElementById("victoire").style.display="block";}
if(score<34){document.getElementById("defaite").style.display="block";}
}
// Start the game
menu();
canvas.focus();
</script>
<div id="victoire">VICTOIRE !!! <button data-passage="CDMa11.1" class="bouton" type="button">Continuer...</button></div>
<div id="defaite">Défaite... <button data-passage="CDMa11.2" class="bouton" type="button">Continuer...</button></div>
<<audio "fifa" loop play>>
<<audio "EDF" stop>><canvas id="catch_ball1" width="600" height="400" tabindex="1"></canvas>
<button onclick="myStopFunction()" class="bouton" id="stop_cb1"> Continuer </button>
<script>
document.getElementById("victoire").style.display="none";
document.getElementById("defaite").style.display="none";
document.getElementById("stop_cb1").style.display="none";
// Collect The Square game
// Get a reference to the canvas DOM element
var canvas = document.getElementById('catch_ball1');
// Get the canvas drawing context
var context = canvas.getContext('2d');
var fond = new Image();
fond.src = "image/fond.jpg";
var balle = new Image();
balle.src = "image/balle.png";
var joueur = new Image();
joueur.src = "image/joueur.png";
// Your score
var score = 0;
// Properties for your square
var x = 50; // X position
var y = 100; // Y position
var speed = 6; // Distance to move each frame
var sideLength = 50; // Length of each side of the square
// FLags to track which keys are pressed
var down = false;
var up = false;
var right = false;
var left = false;
// Properties for the target square
var targetX = 0;
var targetY = 0;
var targetLength = 50;
// Determine if number a is within the range b to c (exclusive)
function isWithin(a, b, c) {
return (a > b && a < c);
}
// Countdown timer (in seconds)
var countdown = 30;
// ID to track the setTimeout
var id = null;
// Listen for keydown events
canvas.addEventListener('keydown', function(event) {
event.preventDefault();
console.log(event.key, event.keyCode);
if (event.keyCode === 40) { // DOWN
down = true;
}
if (event.keyCode === 38) { // UP
up = true;
}
if (event.keyCode === 37) { // LEFT
left = true;
}
if (event.keyCode === 39) { // RIGHT
right = true;
}
});
// Listen for keyup events
canvas.addEventListener('keyup', function(event) {
event.preventDefault();
console.log(event.key, event.keyCode);
if (event.keyCode === 40) { // DOWN
down = false;
}
if (event.keyCode === 38) { // UP
up = false;
}
if (event.keyCode === 37) { // LEFT
left = false;
}
if (event.keyCode === 39) { // RIGHT
right = false;
}
});
// Show the start menu
function menu() {
erase();
context.drawImage(fond,0,0);
context.fillStyle = '#000000';
context.font = '30px Arial';
context.textAlign = 'center';
context.fillText('Touche plus de 34 ballons avec ta tête!', canvas.width / 2, canvas.height / 4);
context.font = '24px Arial';
context.fillText('Clique pour commencer, tu auras 30 secondes', canvas.width / 2, canvas.height / 2);
context.font = '18px Arial'
context.fillText('Utilise les flèches du clavier pour bouger ta tête', canvas.width / 2, (canvas.height / 4) * 3);
// Start the game on a click
canvas.addEventListener('click', startGame);
}
// Start the game
function startGame() {
// Reduce the countdown timer ever second
id = setInterval(function() {
countdown--;
}, 1000)
// Stop listening for click events
canvas.removeEventListener('click', startGame);
// Put the target at a random starting point
moveTarget();
// Kick off the draw loop
draw();
}
// Show the game over screen
function endGame() {
// Stop the countdown
clearInterval(id);
// Display the final score
erase();
context.fillStyle = '#000000';
context.font = '24px Arial';
context.textAlign = 'center';
context.fillText('Final Score: ' + score, canvas.width / 2, canvas.height / 2);
document.getElementById("stop_cb1").style.display="block";
}
// Move the target square to a random position
function moveTarget() {
targetX = Math.round(Math.random() * (canvas.width - targetLength));
targetY = Math.round(Math.random() * (canvas.height - targetLength))
}
// Clear the canvas
function erase() {
context.fillStyle = '#FFFFFF';
context.fillRect(0, 0, 600, 400);
}
// The main draw loop
function draw() {
erase();
// Move the square
if (down) {
y += speed;
}
if (up) {
y -= speed;
}
if (right) {
x += speed;
}
if (left) {
x -= speed;
}
// Keep the square within the bounds
if (y + sideLength > canvas.height) {
y = canvas.height - sideLength;
}
if (y < 0) {
y = 0;
}
if (x < 0) {
x = 0;
}
if (x + sideLength > canvas.width) {
x = canvas.width - sideLength;
}
// Collide with the target
if (isWithin(targetX, x, x + sideLength) || isWithin(targetX + targetLength, x, x + sideLength)) { // X
if (isWithin(targetY, y, y + sideLength) || isWithin(targetY + targetLength, y, y + sideLength)) { // Y
// Respawn the target
moveTarget();
// Increase the score
score++;
}
}
context.drawImage(fond,0,0);
// Draw the square
context.drawImage(joueur,x,y);
//context.fillStyle = '#FF0000';
//context.fillRect(x, y, sideLength, sideLength);
// Draw the target
context.drawImage(balle,targetX,targetY);
//context.fillStyle = '#00FF00';
//context.fillRect(targetX, targetY, targetLength, targetLength);
// Draw the score and time remaining
context.fillStyle = '#000000';
context.font = '24px Arial';
context.textAlign = 'left';
context.fillText('Score: ' + score, 10, 24);
context.fillText('Temps restant: ' + countdown, 10, 50);
// End the game or keep playing
if (countdown <= 0) {
endGame();
} else {
window.requestAnimationFrame(draw);
}
}
function myStopFunction() {
document.getElementById("stop_cb1").style.display="none";
if(score>=34){document.getElementById("victoire").style.display="block";}
if(score<34){document.getElementById("defaite").style.display="block";}
}
// Start the game
menu();
canvas.focus();
</script>
<div id="victoire">VICTOIRE !!! <button data-passage="CDMa11.3" class="bouton" type="button">Continuer...</button></div>
<div id="defaite">Défaite... <button data-passage="CDMa11.4" class="bouton" type="button">Continuer...</button></div>
<<audio "fifa" loop play>>
<<audio "EDF" stop>><<set $charisme to $charisme+2>><<set $passes to $passes+2>><<set $defense to $defense+2>><<set $tirs to $tirs+2>><<set $dribbles to $dribbles+2>><<set $physique to $physique+2>>
<html>
<img src="images/dd_vestiaires.png" alt="dd_vestiaires">
<div id="test" class="dialogue">
<textarea id="sp">Vous pouvez être fiers de votre parcours. Une troisième, place ce n’est pas si mal ! On se reverra tous je l’espère ! </textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Epilogue" class="bouton" type="button">Fin du jeu </button>
<<audio "fifa" stop>>
<<audio "EDF" loop play>><html>
<img src="images/dd_vestiaires.png" alt="dd_vestiaires">
<div id="test" class="dialogue">
<textarea id="sp">Vous pouvez quand même être fiers de votre parcours… Une quatrième place ce n’est pas si mal… On a bien senti que vous n’étiez pas autant motivé que pour une vraie finale… On se reverra tous je l’espère !
</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Epilogue" class="bouton" type="button">Fin du jeu</button>
<<audio "fifa" stop>>
<<audio "EDF" loop play>><<set $charisme to $charisme+2>><<set $passes to $passes+2>><<set $defense to $defense+2>><<set $tirs to $tirs+2>><<set $dribbles to $dribbles+2>><<set $physique to $physique+2>>
<html>
<img src="images/CDM.png" alt="CDM">
<div id="test" class="dialogue">
<textarea id="sp">ON EST LES CHAMPIONS, ON EST LES CHAMPIONS ! ON EST, ON EST, ON EST LES CHAMPIOOOOONS !!! OUAIIIIIIS !!! </textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Epilogue" class="bouton" type="button">Fin du jeu</button>
<<audio "fifa" stop>>
<<audio "EDF" loop play>><html>
<img src="images/dd_vestiaires.png" alt="dd_vestiaires">
<div id="test" class="dialogue">
<textarea id="sp">J’imagine que vous êtes tous très déçus, on a pas réussi à faire l’exploit… Je reste très fier de vous, vous avez fait un beau parcours cette année encore. Une deuxième place ce n’est pas si mal… On se reverra tous je l’espère ! </textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (50 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Epilogue" class="bouton" type="button">Fin du jeu</button>
<<audio "fifa" stop>>
<<audio "EDF" loop play>><html>
<img src="images/réveil.jpg" alt="agent_content">
<div id="test" class="dialogue">
<textarea id="sp">Eh ben… On en a fait du chemin mon grand… Tu m’as fait rêver pendant ces 3 saisons. Tu as progressé si vite ! Pour ma part… J’ai décidé de prendre ma retraite. J’espère qu’on se reverra un jour, mais je pense que tu es prêt à voler de tes propres ailes. L’heure est venue de se dire au revoir… A bientôt je l’espère !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (200 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="END" class="bouton" type="button">Dire au revoir</button><<set $total to $dribbles + $passes + $tirs + $physique + $charisme + $defense>>
<<if $total >=540>>
<h1>Ballon d'Or</h1>
<html>
<div id="test" class="GameOver">
<textarea id="sp">Votre carrière fût une réussite depuis le début. Malgré les différents obstacles, vous avez su imposer votre style de jeu et montrer au monde entier que vous étiez le meilleur. C’est pourquoi, vous êtes devenu Ballon d’Or très rapidement.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (100 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Menu de démarrage" class="bouton" type="button">Retour au menu principal</button>
<<elseif $total<540 && $total>=510>>
<h1>3ème au Ballon d'Or</h1>
<html>
<div id="test" class="GameOver">
<textarea id="sp">Votre carrière fût très vite une réussite. Malgré les différents obstacles, vous avez su imposer votre style de jeu et montrer au monde entier ce dont vous êtes capable. Cependant, certains échecs ont fait que vous n’êtes pas parvenu à devenir LE meilleur. Certes, les résultats sont honorables et vous avez pu quand même vous classer 3ème au ballon d’or.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (100 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Menu de démarrage" class="bouton" type="button">Retour au menu principal</button>
<<elseif $total<510 && $total>=480>>
<h1>Top 10 des joueurs mondiaux</h1>
<html>
<div id="test" class="GameOver">
<textarea id="sp">Votre carrière aura démarré très tôt. Malgré les différents obstacles, vous avez su imposer votre style de jeu et montrer au monde entier ce dont vous êtes capable. Cependant, certains échecs ne vous ont pas permis d’imposer votre domination. Certains joueurs resteront toujours meilleurs que vous. Vous pouvez quand même être fier parce que vous parviendrez à être dans les 10 meilleurs joueurs du monde.</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (100 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Menu de démarrage" class="bouton" type="button">Retour au menu principal</button>
<<elseif $total<480 && $total>=360>>
<h1>Joueur classique de Ligue 1</h1>
<html>
<div id="test" class="GameOver">
<textarea id="sp">En voilà une belle carrière qui se profile… Une belle carrière en Ligue 1, sans jamais percer… Vous resterez sûrement la pépite, jusqu’au jour où… Vous vous ferez vieux. A ce moment-là vous serez un simple joueur de Ligue 1 parmi les autres. Parfois sur le banc, parfois titulaire…</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (100 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Menu de démarrage" class="bouton" type="button">Retour au menu principal</button>
<<else>>
<h1>Vous sombrez dans l'oubli...</h1>
<html>
<div id="test" class="GameOver">
<textarea id="sp">Bon… Votre carrière de footballeur n’était vraiment pas très fructueuse… Vous avez vite sombré dans l’oubli… La Ligue 1, c’est bien mais y rester c’est mieux. Et ça vous semblez ne jamais y avoir réussi… Quelques années, et le monde du foot vous aura déjà oublié !</textarea>
<div id="cont">
<p id="rs" >
</p>
</div>
</div>
<script>
var array = Array.from($("#sp ").val());
$("#sp").hide();
var i = 0;
var rand;
function Write(){
$("#rs").append(array[i]);
if(array[i]=="." || array[i]=="?" ||array[i]=="!") {rand = Math.floor(Math.random() * (1000 - 24 + 1)) + 24; } else {rand = Math.floor(Math.random() * (100 - 24 + 1)) + 24};
if(i<array.length) {
setTimeout(Write,rand);
}
i++;
}
Write();
</script>
</html>
<button data-passage="Menu de démarrage" class="bouton" type="button">Retour au menu principal</button>
<<endif>>