-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMob.cs
66 lines (52 loc) · 1.3 KB
/
Mob.cs
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
using System;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace room
{
class Mob
{
public ConsoleColor Color { get; set; }
public char Icon { get; set; }
public int X { get; set; }
public int Y { get; set; }
public int HomeX { get; set; }
public int HomeY { get; set; }
public int HP { get; set; }
public int BaseHP { get; set; }
public Weapon Weapon { get; set; }
public Armor Armor { get; set; }
public Mob()
{
}
public AI CurrentAI { get; set; }
public void Think(World w)
{
if (CurrentAI != null)
{
CurrentAI.Think(w, this);
}
}
public void Aggro()
{
CurrentAI = new Aggro();
Color = ConsoleColor.Red;
}
public void LoseAggro()
{
CurrentAI = new GoHomeAI(HomeX, HomeY);
Color = ConsoleColor.Yellow;
}
}
class Weapon
{
public int MinDamage { get; set; }
public int MaxDamage { get; set; }
public string Description { get; set; }
}
class Armor
{
public int Mitigation { get; set; }
public string Description { get; set; }
}
}