@@ -2,14 +2,14 @@ | |||||
<response> | <response> | ||||
<entry> | <entry> | ||||
<nom>derpy</nom> | <nom>derpy</nom> | ||||
<level>0</level> | |||||
<hp>10</hp> | |||||
<level>2</level> | |||||
<hp>13</hp> | |||||
<xp>0</xp> | <xp>0</xp> | ||||
<money>0</money> | <money>0</money> | ||||
<attack>0</attack> | <attack>0</attack> | ||||
<defense>0</defense> | <defense>0</defense> | ||||
<ecos> | <ecos> | ||||
<verte>1</verte> | |||||
<verte>0</verte> | |||||
<bleue>0</bleue> | <bleue>0</bleue> | ||||
<jaune>1</jaune> | <jaune>1</jaune> | ||||
<rouge>3</rouge> | <rouge>3</rouge> | ||||
@@ -19,6 +19,13 @@ if (isset($_GET['level_down']) && $xml->entry->level>0) { | |||||
$xml->entry->level--; | $xml->entry->level--; | ||||
} | } | ||||
if (isset($_GET['heal']) && $xml->entry->hp<20 && $xml->entry->ecos->verte>0) { | |||||
$lvl=$xml->entry->level; | |||||
$hp=$xml->entry->hp; | |||||
$xml->entry->hp=$hp+2+$lvl; | |||||
$xml->entry->ecos->verte--; | |||||
} | |||||
if (isset($_GET['hp_plus']) && $xml->entry->hp<20) { | if (isset($_GET['hp_plus']) && $xml->entry->hp<20) { | ||||
$xml->entry->hp++; | $xml->entry->hp++; | ||||
} | } | ||||