Browse Source

Finalisation fiche enemy et ajouts fonctions reset

master
heuzef 10 years ago
parent
commit
01f5fe3c04
9 changed files with 57 additions and 39 deletions
  1. BIN
      img/logo_5.png
  2. BIN
      img/logo_6.png
  3. +0
    -21
      medias/c0f08ae603e364cb554fe71c9fc94ffd/enemy/Loup Garrou.xml
  4. +9
    -0
      medias/default/enemy.xml
  5. +17
    -4
      play/action.php
  6. +1
    -1
      play/action_enemy.php
  7. +5
    -0
      play/del_enemy.php
  8. +19
    -7
      play/enemy.php
  9. +6
    -6
      play/gamers.php

BIN
img/logo_5.png View File

Before After
Width: 1093  |  Height: 188  |  Size: 288 KiB Width: 1091  |  Height: 181  |  Size: 268 KiB

BIN
img/logo_6.png View File

Before After
Width: 1093  |  Height: 188  |  Size: 344 KiB Width: 1091  |  Height: 181  |  Size: 294 KiB

+ 0
- 21
medias/c0f08ae603e364cb554fe71c9fc94ffd/enemy/Loup Garrou.xml View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<response>
<entry>
<nom>Loup Garrou</nom>
<level>0</level>
<hp>10</hp>
<xp>0</xp>
<money>0</money>
<ecos>
<verte>0</verte>
<bleue>0</bleue>
<jaune>0</jaune>
<rouge>0</rouge>
<blanche>0</blanche>
<noire>0</noire>
</ecos>
<trans>default</trans>
<notes>...</notes>
<gift>0</gift>
</entry>
</response>

+ 9
- 0
medias/default/enemy.xml View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<response>
<entry>
<nom>enemy</nom>
<hp>3</hp>
<img>http://wiki.ecomonde.land/lib/exe/fetch.php?media=wiki:loup_garrou.jpg</img>
<url>http://wiki.ecomonde.land/doku.php?id=wiki:ennemies:loups_garrous</url>
</entry>
</response>

+ 17
- 4
play/action.php View File

@@ -39,16 +39,25 @@ if (isset($_GET['xp_plusplus']) && $xml->entry->xp<99989) {
$xml->entry->xp+=10;
}
if (isset($_GET['money_moins']) && $xml->entry->money>0) {
$xml->entry->money--;
if (isset($_GET['xp_moinsmoins']) && $xml->entry->xp>9) {
$xml->entry->xp-=10;
}
if (isset($_GET['xp_reset'])) {
$xml->entry->xp=0;
}
if (isset($_GET['money_plus']) && $xml->entry->money<99999) {
$xml->entry->money+=1;
}
if (isset($_GET['xp_moinsmoins']) && $xml->entry->xp>9) {
$xml->entry->xp-=10;
if (isset($_GET['money_moins']) && $xml->entry->money>0) {
$xml->entry->money--;
}
if (isset($_GET['money_reset'])) {
$xml->entry->money=0;
}
if (isset($_GET['eco_verte_plus']) && $xml->entry->ecos->verte<5) {
@@ -118,6 +127,10 @@ if (isset($_GET['gift_moins']) && $xml->entry->gift>0) {
$xml->entry->gift--;
}
if (isset($_GET['gift_reset'])) {
$xml->entry->gift=0;
}
$xml->asXml('../medias/'.$hash.'/'.$nom_modif.'.xml');
header("location: index.php");
?>

+ 1
- 1
play/action_enemy.php View File

@@ -11,7 +11,7 @@ if (isset($_GET['entry'])) {
$xml = simplexml_load_file('../medias/'.$hash.'/enemy/'.$nom_modif.'.xml');
if (isset($_GET['hp_plus']) && $xml->entry->hp<20) {
if (isset($_GET['hp_plus']) && $xml->entry->hp<3) {
$xml->entry->hp++;
}


+ 5
- 0
play/del_enemy.php View File

@@ -0,0 +1,5 @@
<?php
include "../header.php";
unlink("../medias/".$hash."/enemy/".$_GET['enemy']);
header("location:index.php");
?>

+ 19
- 7
play/enemy.php View File

@@ -17,20 +17,32 @@ foreach($xml->entry as $entry) {
<div class="enemy_name">
<?php echo $entry->nom; ?>
</div>
<hr />
</div>
<div class="row">
<div class="col-lg-6">
<br />
<p style="font-size:40px;"><i class="ionicons ion-heart" style="color:red;";></i>&nbsp;<i class="ionicons ion-heart" style="color:red;";></i>&nbsp;<i class="ionicons ion-heart-broken" style="color:grey;";></i></p>
<?php echo $entry->hp; ?>
<div class="col-lg-5">
<a href="<?php echo $entry->url; ?>" target="_blank" /><img class="img-responsive img-rounded" src="<?php echo $entry->img; ?>" alt="enemy" />
</div>
<div class="col-lg-2">
<br />
<?php button_modif_hp_enemy("hp_moins", $entry->nom, "-"); ?><?php button_modif_hp_enemy("hp_plus", $entry->nom, "+"); ?>
<br /><br />
<button type="submit" class="btn btn-danger btn-sm"><i class="glyphicon glyphicon-remove-sign"></i></button>
<a href="del_enemy.php?enemy=<?php echo $fichier; ?>" class="btn btn-danger btn-sm"><i class="glyphicon glyphicon-remove-sign"></i></a>
</div>
<div class="col-lg-4">
<a href="http://wiki.ecomonde.land/doku.php?id=wiki:ennemies:loups_garrous" target="_blank" /><img class="img-responsive" src="http://wiki.ecomonde.land/lib/exe/fetch.php?w=600&tok=44210c&media=wiki:loup_garrou.jpg" alt="enemy" />
<div class="col-lg-5">
<br />
<?php if($entry->hp == 0): ?>
<p style="font-size:40px;"><i class="ionicons ion-heart-broken" style="color:grey;";></i>&nbsp;<i class="ionicons ion-heart-broken" style="color:grey;";></i>&nbsp;<i class="ionicons ion-heart-broken" style="color:grey;";></i></p>
<?php endif; ?>
<?php if($entry->hp == 1): ?>
<p style="font-size:40px;"><i class="ionicons ion-heart" style="color:red;";></i>&nbsp;<i class="ionicons ion-heart-broken" style="color:grey;";></i>&nbsp;<i class="ionicons ion-heart-broken" style="color:grey;";></i></p>
<?php endif; ?>
<?php if($entry->hp == 2): ?>
<p style="font-size:40px;"><i class="ionicons ion-heart" style="color:red;";></i>&nbsp;<i class="ionicons ion-heart" style="color:red;";></i>&nbsp;<i class="ionicons ion-heart-broken" style="color:grey;";></i></p>
<?php endif; ?>
<?php if($entry->hp == 3): ?>
<p style="font-size:40px;"><i class="ionicons ion-heart" style="color:red;";></i>&nbsp;<i class="ionicons ion-heart" style="color:red;";></i>&nbsp;<i class="ionicons ion-heart" style="color:red;";></i></p>
<?php endif; ?>
</div>
</div>
</div>


+ 6
- 6
play/gamers.php View File

@@ -34,7 +34,7 @@ foreach($xml->entry as $entry) {
<?php
$hp_max="10";
switch ($entry->level)
{
{
case 0:
$hp_max+=0;
break;
@@ -54,18 +54,18 @@ foreach($xml->entry as $entry) {
<h3><i class="ionicons ion-heart" style="color:red;";></i>&nbsp;<strong><?php echo $entry->hp; ?></strong><sub>/<?php echo $hp_max; ?></sub></h3>
</div>
<div class="col-lg-4">
<h3><i class="ionicons ion-flash" style="color:#FFD700;";></i>&nbsp;<strong><?php echo $entry->xp; ?></strong></h3>
<h3><i class="ionicons ion-flash" style="color:#FFD700;";></i>&nbsp;<strong><?php echo $entry->xp; ?></strong>&nbsp;</h3>
</div>
</div>
<div class="row">
<div class="col-lg-4">
<?php button_modif_money("money_moins", $entry->nom, "-"); ?><?php button_modif_money("money_plus", $entry->nom, "+"); ?>
<?php button_modif_money("money_reset", $entry->nom, '<i class="ionicons ion-arrow-return-left"></i>'); ?><?php button_modif_money("money_moins", $entry->nom, "-"); ?><?php button_modif_money("money_plus", $entry->nom, "+"); ?>
</div>
<div class="col-lg-4">
<?php button_modif_hp("hp_moins", $entry->nom, "-"); ?><?php button_modif_hp("hp_plus", $entry->nom, "+"); ?>
</div>
<div class="col-lg-4">
<?php button_modif_xp("xp_moinsmoins", $entry->nom, "--"); ?><?php button_modif_xp("xp_moins", $entry->nom, "-"); ?><?php button_modif_xp("xp_plus", $entry->nom, "+"); ?><?php button_modif_xp("xp_plusplus", $entry->nom, "++"); ?>
<?php button_modif_xp("xp_reset", $entry->nom, '<i class="ionicons ion-arrow-return-left"></i>'); ?><?php button_modif_xp("xp_moinsmoins", $entry->nom, "--"); ?><?php button_modif_xp("xp_moins", $entry->nom, "-"); ?><?php button_modif_xp("xp_plus", $entry->nom, "+"); ?><?php button_modif_xp("xp_plusplus", $entry->nom, "++"); ?>
</div>
</div>
</div>
@@ -164,7 +164,7 @@ foreach($xml->entry as $entry) {
</div>
<div class="col-lg-3">
<h4><i class="glyphicon glyphicon-gift" style="color:blue;";></i>&nbsp;<strong><?php echo $entry->gift; ?></strong></h4>
<?php button_modif_gift("gift_moins", $entry->nom, "-"); ?><?php button_modif_gift("gift_plus", $entry->nom, "+"); ?>
<?php button_modif_gift("gift_reset", $entry->nom, "<i class='ionicons ion-arrow-return-left'></i>"); ?><?php button_modif_gift("gift_moins", $entry->nom, "-"); ?><?php button_modif_gift("gift_plus", $entry->nom, "+"); ?>
</div>
<!-- notes -->
<div class="modal fade" id="notes<?php echo $itemnb;?>" tabindex="-1" role="dialog" aria-labelledby="notes<?php echo $itemnb;?>" aria-hidden="true">
@@ -191,4 +191,4 @@ foreach($xml->entry as $entry) {
</div>
<!-- /gamers -->
<?php } ?>
<?php } ?>

Loading…
Cancel
Save