예제 #1
0
 /**
  * hit method
  * @param Humanoid $fighter
  * @return string
  * */
 public function hit(Humanoid $fighter)
 {
     $this->setScore($this->getScore() + 10);
     $currLive = $fighter->getLive();
     $currLive -= 5;
     if ($currLive < 0) {
         $currLive = 0;
     }
     $fighter->setLive($currLive);
     return $this->getName() . " " . $this->getHitType() . " " . $fighter->getName();
 }
예제 #2
0
 /**
  * __construct method
  * @param string $name
  * */
 public function __construct($name)
 {
     parent::__construct($name);
     $this->setNoise('Barev');
     $this->setHitType('Harvacec');
 }
예제 #3
0
 /**
  * __construct method
  * @param string $name
  * */
 public function __construct($name)
 {
     parent::__construct($name);
     $this->setNoise('meow');
     $this->setHitType('scratch');
 }
예제 #4
0
 /**
  * __construct method
  * @param string $name
  * */
 public function __construct($name)
 {
     parent::__construct($name);
     $this->setNoise('haf');
     $this->setHitType('bit');
 }
예제 #5
0
 /**
  * __construct method
  * @param string $name
  * */
 public function __construct($name)
 {
     parent::__construct($name);
     $this->setNoise('i he he');
 }