blob: d00532f1e6bce19c25354f75709ae73a6a84111c (
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
60
61
62
|
<?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 = "";
/**
* @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;
$this->hp = $hp;
$this->xp = $xp;
$this->power = $power;
$this->icon = $icon;
}
}
?>
|