BlueGit

blue-star tribegen

Files

tribegen / web / src / Events / HuntingEvent.php

HuntingEvent.php

various fixes
timfa Tim · pushed by timfa · 9 months ago
49730f61 History
HuntingEvent.php 723 B Download Raw
1<?php
2
3require_once __DIR__ . '/../../src/Events/Event.php';
4require_once __DIR__ . '/../../src/Classes/Kobold.php';
5
6class HuntingEvent extends Event
7{
8 public function execute()
9 {
10 $this->story = "The hunting party set out into the wilderness...\n\n";
11
12 $kobolds = $this->tribe->getAliveKobolds();
13
14 if (empty($kobolds)) {
15 $this->story .= "But there were no kobolds to hunt!";
16 return;
17 }
18
19 // TODO: Implement hunting logic
20 // This should use the kobold stats to determine success
21 // Can kill or injure kobolds, find items, etc.
22
23 $this->story .= "The hunters returned with valuable supplies.";
24
25 return $this->story;
26 }
27}