BlueGit

blue-star tribegen

Files

tribegen / web / src / Events / Event.php

Event.php

farming
timfa Tim · pushed by timfa · 9 months ago
569cc974 History
Event.php 793 B Download Raw
1<?php
2
3require_once __DIR__ . '/../../src/Classes/Tribe.php';
4
5abstract class Event
6{
7 protected $tribe;
8 protected $story = '';
9 protected $participants = []; // array of kobold ids
10
11 public function __construct(Tribe $tribe)
12 {
13 $this->tribe = $tribe;
14 }
15
16 abstract public function execute();
17
18 abstract public function getCost();
19
20 public function isAvailable()
21 {
22 return true;
23 }
24
25 public function setParticipants(array $koboldIds)
26 {
27 $this->participants = $koboldIds;
28 }
29
30 public function getParticipants()
31 {
32 return $this->participants;
33 }
34
35 abstract function getMinParticipants();
36
37 abstract function getMaxParticipants();
38
39 public function getStory()
40 {
41 return $this->story;
42 }
43}