From eace9ffbab367ccc5346c770cf01430b114ddfe8 Mon Sep 17 00:00:00 2001 From: heuzef Date: Thu, 11 Dec 2014 19:58:01 +0100 Subject: [PATCH] =?UTF-8?q?ajout=20enemy=20Ajout=20des=20enemies,=20foncti?= =?UTF-8?q?onnels,=20pas=20encore=20personalis=C3=A9=20proprement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/ecomonde.css | 56 +++++++++++++--------- index.php | 2 +- .../enemy/Loup Garrou.xml | 21 ++++++++ play/action.php | 2 +- play/action_enemy.php | 24 ++++++++++ play/enemy.php | 41 ++++++++++++++++ play/index.php | 54 ++++++++++++++++++++- 7 files changed, 173 insertions(+), 27 deletions(-) create mode 100755 medias/c0f08ae603e364cb554fe71c9fc94ffd/enemy/Loup Garrou.xml create mode 100644 play/action_enemy.php create mode 100644 play/enemy.php diff --git a/css/ecomonde.css b/css/ecomonde.css index a764844..bc3b758 100755 --- a/css/ecomonde.css +++ b/css/ecomonde.css @@ -52,11 +52,11 @@ font-weight: bold; text-align: center; color: black; - text-shadow: - #FFF 1px 1px, - #FFF -1px 1px, - #FFF -1px -1px, - #FFF 1px -1px; + text-shadow: + #FFF 1px 1px, + #FFF -1px 1px, + #FFF -1px -1px, + #FFF 1px -1px; } .progress-bar-eco span { @@ -73,7 +73,7 @@ -moz-transition: width .4s ease-in-out; -ms-transition: width .4s ease-in-out; -o-transition: width .4s ease-in-out; - transition: width .4s ease-in-out; + transition: width .4s ease-in-out; } .verte span { @@ -83,7 +83,7 @@ background-image: -moz-linear-gradient(top, #28b62c, #2BD630); background-image: -ms-linear-gradient(top, #28b62c, #2BD630); background-image: -o-linear-gradient(top, #28b62c, #2BD630); - background-image: linear-gradient(top, #28b62c, #2BD630); + background-image: linear-gradient(top, #28b62c, #2BD630); } .bleue span { @@ -93,7 +93,7 @@ background-image: -moz-linear-gradient(top, #416BE8, #419AE8); background-image: -ms-linear-gradient(top, #416BE8, #419AE8); background-image: -o-linear-gradient(top, #416BE8, #419AE8); - background-image: linear-gradient(top, #416BE8, #419AE8); + background-image: linear-gradient(top, #416BE8, #419AE8); } .jaune span { @@ -103,7 +103,7 @@ background-image: -moz-linear-gradient(top, #FFD700, #FAF27F); background-image: -ms-linear-gradient(top, #FFD700, #FAF27F); background-image: -o-linear-gradient(top, #FFD700, #FAF27F); - background-image: linear-gradient(top, #FFD700, #FAF27F); + background-image: linear-gradient(top, #FFD700, #FAF27F); } .rouge span { @@ -113,7 +113,7 @@ background-image: -moz-linear-gradient(top, #E31B1B, #FF6B6B); background-image: -ms-linear-gradient(top, #E31B1B, #FF6B6B); background-image: -o-linear-gradient(top, #E31B1B, #FF6B6B); - background-image: linear-gradient(top, #E31B1B, #FF6B6B); + background-image: linear-gradient(top, #E31B1B, #FF6B6B); } .blanche span { @@ -123,7 +123,7 @@ background-image: -moz-linear-gradient(top, #ADDFFF, #CCFFFC); background-image: -ms-linear-gradient(top, #ADDFFF, #CCFFFC); background-image: -o-linear-gradient(top, #ADDFFF, #CCFFFC); - background-image: linear-gradient(top, #ADDFFF, #CCFFFC); + background-image: linear-gradient(top, #ADDFFF, #CCFFFC); } .noire span { @@ -133,7 +133,7 @@ background-image: -moz-linear-gradient(top, #8128B5, #792DA6); background-image: -ms-linear-gradient(top, #8128B5, #792DA6); background-image: -o-linear-gradient(top, #8128B5, #792DA6); - background-image: linear-gradient(top, #8128B5, #792DA6); + background-image: linear-gradient(top, #8128B5, #792DA6); } .shine span { @@ -151,13 +151,13 @@ background: #fff; -moz-border-radius: 3px; -webkit-border-radius: 3px; - border-radius: 3px; - + border-radius: 3px; + -webkit-animation: animate-shine 2s ease-out infinite; - -moz-animation: animate-shine 2s ease-out infinite; + -moz-animation: animate-shine 2s ease-out infinite; } -@-webkit-keyframes animate-shine { +@-webkit-keyframes animate-shine { 0% {opacity: 0; width: 0;} 50% {opacity: .5;} 100% {opacity: 0; width: 95%;} @@ -174,20 +174,20 @@ -moz-box-shadow: 0 5px 5px rgba(255, 255, 255, .7) inset, 0 -5px 5px rgba(255, 255, 255, .7) inset; -webkit-box-shadow: 0 5px 5px rgba(255, 255, 255, .7) inset, 0 -5px 5px rgba(255, 255, 255, .7) inset; box-shadow: 0 5px 5px rgba(255, 255, 255, .7) inset, 0 -5px 5px rgba(255, 255, 255, .7) inset; - + -webkit-animation: animate-glow 1s ease-out infinite; - -moz-animation: animate-glow 1s ease-out infinite; + -moz-animation: animate-glow 1s ease-out infinite; } @-webkit-keyframes animate-glow { - 0% { -webkit-box-shadow: 0 5px 5px rgba(255, 255, 255, .7) inset, 0 -5px 5px rgba(255, 255, 255, .7) inset;} - 50% { -webkit-box-shadow: 0 5px 5px rgba(255, 255, 255, .3) inset, 0 -5px 5px rgba(255, 255, 255, .3) inset;} + 0% { -webkit-box-shadow: 0 5px 5px rgba(255, 255, 255, .7) inset, 0 -5px 5px rgba(255, 255, 255, .7) inset;} + 50% { -webkit-box-shadow: 0 5px 5px rgba(255, 255, 255, .3) inset, 0 -5px 5px rgba(255, 255, 255, .3) inset;} 100% { -webkit-box-shadow: 0 5px 5px rgba(255, 255, 255, .7) inset, 0 -5px 5px rgba(255, 255, 255, .7) inset;} } @-moz-keyframes animate-glow { - 0% { -moz-box-shadow: 0 5px 5px rgba(255, 255, 255, .7) inset, 0 -5px 5px rgba(255, 255, 255, .7) inset;} - 50% { -moz-box-shadow: 0 5px 5px rgba(255, 255, 255, .3) inset, 0 -5px 5px rgba(255, 255, 255, .3) inset;} + 0% { -moz-box-shadow: 0 5px 5px rgba(255, 255, 255, .7) inset, 0 -5px 5px rgba(255, 255, 255, .7) inset;} + 50% { -moz-box-shadow: 0 5px 5px rgba(255, 255, 255, .3) inset, 0 -5px 5px rgba(255, 255, 255, .3) inset;} 100% { -moz-box-shadow: 0 5px 5px rgba(255, 255, 255, .7) inset, 0 -5px 5px rgba(255, 255, 255, .7) inset;} } @@ -242,6 +242,16 @@ text-transform: uppercase; } +.enemy_name { + font-weight: bold; + font-size: 26px; + color: black; + margin-top: -8px; + margin-bottom: -20px; + margin-left: 10px; + text-transform: uppercase; +} + .p_light { text-align: center; padding: 5px; @@ -256,4 +266,4 @@ font-size: 30px; color: #8128B5; font-weight: bold; -} \ No newline at end of file +} diff --git a/index.php b/index.php index 1da58fd..8ec714e 100755 --- a/index.php +++ b/index.php @@ -186,7 +186,7 @@ $message[10]=' while ($fichier = readdir($dossier)) { - if ($fichier != "." && $fichier != ".." && $fichier != "map.jpg" && $fichier != "soft.mp3" && $fichier != "tonic.mp3" && $fichier != "hard.mp3" && $fichier != "light.mp3" && $fichier != "dark.mp3") + if ($fichier != "." && $fichier != ".." && $fichier != "map.jpg" && $fichier != "soft.mp3" && $fichier != "tonic.mp3" && $fichier != "hard.mp3" && $fichier != "light.mp3" && $fichier != "dark.mp3" && $fichier != "enemy") { $gamers = explode(".xml", $fichier); diff --git a/medias/c0f08ae603e364cb554fe71c9fc94ffd/enemy/Loup Garrou.xml b/medias/c0f08ae603e364cb554fe71c9fc94ffd/enemy/Loup Garrou.xml new file mode 100755 index 0000000..f9a63f4 --- /dev/null +++ b/medias/c0f08ae603e364cb554fe71c9fc94ffd/enemy/Loup Garrou.xml @@ -0,0 +1,21 @@ + + + + Loup Garrou + 0 + 10 + 0 + 0 + + 0 + 0 + 0 + 0 + 0 + 0 + + default + ... + 0 + + diff --git a/play/action.php b/play/action.php index 2edb18e..9d3ad3a 100755 --- a/play/action.php +++ b/play/action.php @@ -120,4 +120,4 @@ if (isset($_GET['gift_moins']) && $xml->entry->gift>0) { $xml->asXml('../medias/'.$hash.'/'.$nom_modif.'.xml'); header("location: index.php"); -?> \ No newline at end of file +?> diff --git a/play/action_enemy.php b/play/action_enemy.php new file mode 100644 index 0000000..3e1296f --- /dev/null +++ b/play/action_enemy.php @@ -0,0 +1,24 @@ +entry->hp<20) { + $xml->entry->hp++; +} + +if (isset($_GET['hp_moins']) && $xml->entry->hp>0) { + $xml->entry->hp--; +} + +$xml->asXml('../medias/'.$hash.'/enemy/'.$nom_modif.'.xml'); +header("location: index.php"); +?> diff --git a/play/enemy.php b/play/enemy.php new file mode 100644 index 0000000..b9d2e2a --- /dev/null +++ b/play/enemy.php @@ -0,0 +1,41 @@ +entry as $entry) { +?> + + +
+
+
+
+
+ nom; ?> +
+
+
+
+
+

  

+ hp; ?> +
+
+ nom, "-"); ?>nom, "+"); ?> +

+ +
+
+ enemy +
+
+
+
+
+ + + diff --git a/play/index.php b/play/index.php index 10ab0ee..45e4de5 100755 --- a/play/index.php +++ b/play/index.php @@ -15,9 +15,11 @@ +
logo +
@@ -38,11 +40,21 @@
+
+
+
+ +
+
+
+ +
+
@@ -63,6 +75,41 @@
+ + + +
+ + + '; + } + + // liste enemy + $folder = "../medias/".$hash."/enemy/"; + $dossier = opendir($folder); + while ($fichier = readdir($dossier)) + { + if ($fichier != "." && $fichier != "..") + { + $gamers = explode(".xml", $fichier); + include ("enemy.php"); + } + } + closedir($dossier); + ?> +
+ +
+
+ + +