Browse Source

ajout hp max

master
heuzef 10 years ago
parent
commit
12e212ea9c
3 changed files with 23 additions and 3 deletions
  1. +1
    -1
      medias/c0f08ae603e364cb554fe71c9fc94ffd/Derpy.xml
  2. +1
    -1
      medias/c0f08ae603e364cb554fe71c9fc94ffd/zycheron.xml
  3. +21
    -1
      play/gamers.php

+ 1
- 1
medias/c0f08ae603e364cb554fe71c9fc94ffd/Derpy.xml View File

@@ -2,7 +2,7 @@
<response>
<entry>
<nom>Derpy</nom>
<level>0</level>
<level>2</level>
<hp>10</hp>
<xp>50</xp>
<money>999</money>


+ 1
- 1
medias/c0f08ae603e364cb554fe71c9fc94ffd/zycheron.xml View File

@@ -2,7 +2,7 @@
<response>
<entry>
<nom>zycheron</nom>
<level>0</level>
<level>1</level>
<hp>10</hp>
<xp>0</xp>
<money>0</money>


+ 21
- 1
play/gamers.php View File

@@ -31,7 +31,27 @@ foreach($xml->entry as $entry) {
<h3><i class="ionicons ion-egg" style="color:brown;";></i>&nbsp;<strong><?php echo $entry->money; ?></strong></h3>
</div>
<div class="col-lg-4">
<h3><i class="ionicons ion-heart" style="color:red;";></i>&nbsp;<strong><?php echo $entry->hp; ?></strong></h3>
<?php
$hp_max="10";
switch ($entry->level)
{
case 0:
$hp_max+=0;
break;
case 1:
$hp_max+=2;
break;
case 2:
$hp_max+=5;
break;
case 3:
$hp_max+=10;
break;
default:
echo "?";
}
?>
<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>


Loading…
Cancel
Save