1 | 1 |
new file mode 100755 |
... | ... |
@@ -0,0 +1,60 @@ |
1 |
+<?php |
|
2 |
+session_start(); |
|
3 |
+include('fonctions.php'); |
|
4 |
+connectionBDD(); |
|
5 |
+$_SESSION['pageprecedentCombat']; |
|
6 |
+switch($_GET['mort']){ |
|
7 |
+ case 0: |
|
8 |
+ //personne n'est mort |
|
9 |
+ header("location:combatpasFini.php"); |
|
10 |
+ break; |
|
11 |
+ case 1: |
|
12 |
+ //le monstre est mort |
|
13 |
+ //changement de la variable du monstre |
|
14 |
+ switch($_SESSION['varEnnemi']){ |
|
15 |
+ case "taverneRat1": |
|
16 |
+ $_SESSION['taverneRat']--; |
|
17 |
+ break; |
|
18 |
+ case "taverneRat2": |
|
19 |
+ $_SESSION['taverneRat']-=2; |
|
20 |
+ break; |
|
21 |
+ case "taverneRat3": |
|
22 |
+ $_SESSION['taverneRat']-=3; |
|
23 |
+ break; |
|
24 |
+ case "egliseCatacombes1": |
|
25 |
+ $_SESSION['egliseZombis']--; |
|
26 |
+ break; |
|
27 |
+ case "egliseCatacombes2": |
|
28 |
+ $_SESSION['egliseZombis']-=2; |
|
29 |
+ break; |
|
30 |
+ case "egliseCatacombes3": |
|
31 |
+ $_SESSION['egliseZombis']-=3; |
|
32 |
+ break; |
|
33 |
+ case "egliseCatacombes4": |
|
34 |
+ $_SESSION['egliseZombis']-=4; |
|
35 |
+ break; |
|
36 |
+ } |
|
37 |
+ //changement de l'indice de la rumeur de la taverne |
|
38 |
+ if($_SESSION['taverneRat']<0){ |
|
39 |
+ $_SESSION['taverneRumeur']=3; |
|
40 |
+ } |
|
41 |
+ //changement de l'xp |
|
42 |
+ $_SESSION['xp'] += $_SESSION['ennemiXp']; |
|
43 |
+ //changement de la variable de Triche |
|
44 |
+ if($_SESSION['triche']!=0&&$_SESSION['xp']>($_SESSION['xpMax']/2)){ |
|
45 |
+ $_SESSION['triche']=0; |
|
46 |
+ } |
|
47 |
+ //Test sur le changement de niveau. |
|
48 |
+ if($_SESSION['xp']>$_SESSION['xpMax']){ |
|
49 |
+ header("location:changementNiveau.php"); |
|
50 |
+ }else{ |
|
51 |
+ header("location:".$_SESSION['pageprecedentCombat']."?combatFini=1"); |
|
52 |
+ } |
|
53 |
+ break; |
|
54 |
+ case 2: |
|
55 |
+ //le perso est mort |
|
56 |
+ header("location:mort.php"); |
|
57 |
+ break; |
|
58 |
+} |
|
59 |
+mysql_close(); |
|
60 |
+?> |