public function take_damage($amount)
    {
        if ($this->is_bound()) {
            $this->unbind();
        }
        if ($this->health()) {
            $this->health -= $amount;
            $this->say(sprintf(
                __('takes %1$s damage, %2$s health power left'),
                $amount,
                $this->health()
            ));
            if ($this->health() <= 0) {
                $this->position = null;
                $this->say(__("dies"));
            }
        }
    }
public function take_damage($amount)
    {
        if ($this->is_bound()) {
            $this->unbind();
        }
        if ($this->health()) {
            $this->health -= $amount;
            $this->say(sprintf(
                __('takes %1$s damage, %2$s health power left'),
                $amount,
                $this->health()
            ));
            if ($this->health() <= 0) {
                $this->position = null;
                $this->say(__("dies"));
            }
        }
    }
public function take_damage ( $ amount ) { if ( $ this -> is_bound ( ) ) { $ this -> unbind ( ) ; } if ( $ this -> health ( ) ) { $ this -> health -= $ amount ; $ this -> say ( sprintf ( __ ( 'takes %1$s damage, %2$s health power left' ) , $ amount , $ this -> health ( ) ) ) ; if ( $ this -> health ( ) <= 0 ) { $ this -> position = null ; $ this -> say ( __ ( "dies" ) ) ; } } }
Take damage.

@param $amount
Take damage .