forked from JulianoCP/game-dungeon-crawler-lua
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMonster.lua
95 lines (72 loc) · 2.06 KB
/
Monster.lua
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
--[[
All Monsters used in the game.
Gets and Sets.
]]
local Monster = {}
Monster.__index = Monster
function Monster:new()
local monsters = {
m = {
name = "Ghost of Dead",
msg = "Booooooooooooooooooohhhhhhhhhhh",
damage = 8,
defese = 3,
dexterity = 2,
accuracy = 3,
critical = 1,
life = 50,
expWin = 50,
level = 0
},
m1 = {
name = "Akary Elameqn",
msg = "bYE ByE Retard !",
damage = 6,
defese = 2,
dexterity = 1,
accuracy = 2,
critical = 1,
life = 50,
expWin = 50,
level = 0
},
m2 = {
name = "Karuni Alcany",
msg = "Ugh Uga Your Die",
damage = 5,
defese = 1,
dexterity = 2,
accuracy = 3,
critical = 1,
life = 70,
expWin = 50,
level = 0
},
m3 = {
name = "Skelet Power",
msg = "Jqweh LIJqmET Pqolraaa!!!!",
damage = 15,
defese = 5,
dexterity = 10,
accuracy = 4,
critical = 1,
life = 80,
expWin = 50,
level = 0
},
}
setmetatable(monsters, Monster)
return monsters
end
function Monster:getAllMonster()
return self.monsters
end
function Monster:getMonster(tileName)
if tileName == "m" then return self.m
elseif tileName == "m1" then return self.m1
elseif tileName == "m2" then return self.m2
elseif tileName == "m3" then return self.m3
end
return self.m
end
return Monster