aboutsummaryrefslogtreecommitdiffstats
path: root/inc/Monster.inc
blob: 4450b59d9e73f3d7d8ec486f0a6b64937c88c34c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
<?php
/**
 * Represent an Item in the shop or in the Inventory.
 *
 * @author     Alexandre Renoux
 * @author     Pierre-Emmanuel Novac
 */
class Monster {
	/**
	 * Name of the Monster.
	 */
	public $name = "";

	/**
	 * Monster's icon.
	 */
	public $icon = "";

	/**
	 * Monster's description.
	 */
	public $desc = ""; // TODO: unused

	/**
	 * HP of the Monster.
	 */
	public $hp = 1;

	/**
	 *  Exp given by this monster.
	 */
	public $xp = 0;

	/**
	 * Monster's level.
	 */
	public $level = 1;


	/**
	 * Monster's constructor
	 *
	 * @param string $name  Monster's name
	 * @param int $level    Monster's level
	 * @param int $hp       Monster's HP
	 * @param int $xp       Exp given by the Monster
	 * @param string $icon  Item's icon
	 * @return void
	 */
	function __construct($name, $level, $hp, $xp, $icon) {
		$this->name = $name;
		$this->level = $level;
		$this->hp = $hp;
		$this->xp = $xp;
		$this->icon = $icon;
	}
}

?>