blob: 7d9996c10f73239076188e7922616a61d5bcde7e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
package scalevalapokalypsi.Model.Entities.NPCs
import scalevalapokalypsi.Model.*
import scalevalapokalypsi.Model.Entities.*
/** A `NPC` object represents a non-playable in-game character controlled by
* the server using this objects `act` method. It can also be "talked to": it
* returns a dialog when asked for.
*
* A NPC object’s state is mutable: the NPC’s location and possessions can change,
* for instance.
*
* @param name the NPC's name
* @param initialLocation the NPC’s initial location
*/
abstract class NPC(
adventure: Adventure,
name: String,
initialLocation: Area,
initialHP: Int,
maxHp: Int
) extends Entity(adventure, name, initialLocation, initialHP, maxHp):
def getDialog: String
def act(): Unit
|