aboutsummaryrefslogtreecommitdiffstats
path: root/inc/Monster.inc
diff options
context:
space:
mode:
authoralexichi <alexbankai96@gmail.com>2016-05-11 11:56:19 +0200
committeralexichi <alexbankai96@gmail.com>2016-05-11 11:56:19 +0200
commit35efaf74e828b738a20324a664cf9c2e08ef47d4 (patch)
tree183b4704c87c61b690010efbd6f3b30218328bcc /inc/Monster.inc
parent2350d43a09495db18b22b86ffc815a84eeb35579 (diff)
parent1158d2063f00f38de19a4600566b244a942d86ba (diff)
downloadcandybox-35efaf74e828b738a20324a664cf9c2e08ef47d4.tar.gz
candybox-35efaf74e828b738a20324a664cf9c2e08ef47d4.tar.bz2
candybox-35efaf74e828b738a20324a664cf9c2e08ef47d4.tar.xz
candybox-35efaf74e828b738a20324a664cf9c2e08ef47d4.zip
Merge branch 'master' of piernov.org:candybox into alexichialexichi
Conflicts: inc/perso.inc
Diffstat (limited to 'inc/Monster.inc')
-rw-r--r--inc/Monster.inc45
1 files changed, 42 insertions, 3 deletions
diff --git a/inc/Monster.inc b/inc/Monster.inc
index ae48691..d00532f 100644
--- a/inc/Monster.inc
+++ b/inc/Monster.inc
@@ -1,14 +1,54 @@
<?php
-
+/**
+ * Represent an Item in the shop or in the Inventory.
+ *
+ * @package inc\Monster.inc
+ * @author Alexandre Renoux
+ * @author Pierre-Emmanuel Novac
+ */
class Monster {
+ /**
+ * @var string Name of the Monster.
+ */
public $name = "";
+
+ /**
+ * @var string Monster's icon.
+ */
public $icon = "";
- public $desc = "";
+
+ /**
+ * @var desc Monster's description.
+ */
+ public $desc = ""; // TODO: unused
+
+ /**
+ * @var int HP of the Monster.
+ */
public $hp = 1;
+
+ /**
+ * @var int Exp given by this monster.
+ */
public $xp = 0;
+
+ /**
+ * @var int Monster's level.
+ */
public $level = 1;
public $power = 1;
+ /**
+ * Monster's constructor
+ *
+ * @param string $name Monster's name
+ * @param int $level Monster's level
+ * @param int $hp Monster's HP
+ * @param int $power Monster's power
+ * @param int $xp Exp given by the Monster
+ * @param string $icon Item's icon
+ * @return void
+ */
function __construct($name, $level, $hp, $xp, $power, $icon) {
$this->name = $name;
$this->level = $level;
@@ -16,7 +56,6 @@ class Monster {
$this->xp = $xp;
$this->power = $power;
$this->icon = $icon;
-
}
}