BlueGit

blue-star tribegen

Files

tribegen / web / src / Events / HuntingEvent.php

HuntingEvent.php

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