blob: f3bfe6a0b1b26c0e8529bdc39d3059469bb88f82 (
plain) (
blame)
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.fourisland.frigidearth;
import java.awt.Color;
import java.awt.Point;
/**
*
* @author hatkirby
*/
public abstract class Mob
{
public int x;
public int y;
public int health;
public boolean hostile;
public Mob(int x, int y)
{
this.x = x;
this.y = y;
}
public Point getPosition()
{
return new Point(x,y);
}
public void moveInDirection(Direction dir)
{
Point to = dir.to(getPosition());
x = to.x;
y = to.y;
}
public abstract char getDisplayCharacter();
public abstract Color getDisplayColor();
public abstract String getName();
public abstract String getBattleMessage();
public abstract int getAttackPower();
public abstract int getBaseExperience();
}
|