Compare commits
3 commits
8805738c50
...
9a63dbbc45
Author | SHA1 | Date | |
---|---|---|---|
9a63dbbc45 | |||
a720cbe1d2 | |||
3e09de564c |
1 changed files with 35 additions and 0 deletions
|
@ -111,5 +111,40 @@ class Entity{
|
|||
}
|
||||
|
||||
class Enemy extends Entity{
|
||||
private $actions = array();
|
||||
|
||||
public function getActions()
|
||||
{
|
||||
return $this->actions;
|
||||
}
|
||||
function addAction($name)
|
||||
{
|
||||
array_push($this->actions,$name);
|
||||
}
|
||||
public function resetActions()
|
||||
{
|
||||
$this->actions =array;
|
||||
}
|
||||
}
|
||||
|
||||
class Player extends Entity{
|
||||
private $class;
|
||||
|
||||
public function getClass(){
|
||||
return $this->class
|
||||
}
|
||||
public function __construct($name , $armour_class , $inisitive , $fullhp, $str , $dex , $con , $int , $wis , $chr,$class) {
|
||||
$this->setName($name);
|
||||
$this->setAC($armour_class);
|
||||
$this->setInisitive($inisitive);
|
||||
$this->setMaxHP($fullhp);
|
||||
$this->restoreToFullHP();
|
||||
$this->setStrength($str);
|
||||
$this->setDexterity($dex);
|
||||
$this->setConstitution($con);
|
||||
$this->setInisitive($int);
|
||||
$this->setWisdom($wis);
|
||||
$this->setCharisma($chr);
|
||||
$this->class = $class;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue