<?php

require_once __DIR__ . '/../../src/Events/Event.php';
require_once __DIR__ . '/../../src/Classes/Kobold.php';

class HuntingEvent extends Event
{
    public function getMinParticipants()
    {
        return 2;
    }

    public function getMaxParticipants()
    {
        return 5;
    }

    public function getCost()
    {
        return 25;
    }

    public function isAvailable()
    {
        return true;
    }

    public function execute()
    {
        $this->story = "The hunting party set out into the wilderness...\n\n";

        $kobolds = $this->tribe->getAliveKobolds();

        if (empty($kobolds)) {
            $this->story .= "But there were no kobolds to hunt!";
            return;
        }

        // TODO: Implement hunting logic
        // This should use the kobold stats to determine success
        // Can kill or injure kobolds, find items, etc.

        $this->story .= "The hunters returned with valuable supplies.";

        return $this->story;
    }
}
