PHPWarrior\Abilities\Detonate::bomb PHP Method

bomb() public method

public bomb ( $direction, $x, $y, $damage_amount )
    public function bomb($direction, $x, $y, $damage_amount)
    {
        if ($this->unit->position) {
            $receiver = $this->space($direction, $x, $y)->unit();
            if ($receiver) {
                if (isset($receiver->abilities['explode'])) {
                    $receiver->say(__("caught in bomb's flames which detonates ticking explosive"));
                    $receiver->abilities['explode']->perform();
                } else {
                    $this->damage($receiver, $damage_amount);
                }
            }
        }
    }