-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathGods.lua
179 lines (177 loc) · 5.12 KB
/
Gods.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
local Player = require("Player")
local Functions = require("Functions")
local Gods = {}
Cards.GodoftheDead = {
name = "God of the Dead",
power = 20,
cost = 0,
tipo = "Unit",
stamina = 1,
description = "Can only be played if there are seven or more units in your graveyard. Ability: Summon a unit from your graveyard.",
effect = {condition = function(card,Player1,Player2)
local i = #Player1.graveyard
local n = 0
while i > 0 do
if Player1.graveyard[i].tipo == "Unit" then
n = n+1
end
i = i-1
end
if n > 6 then
return true
end
end,
ability = function(card,Player1,Player2)
local h = false
while h == false do
print("Summon a unit from your graveyard:")
print("0 - None")
Functions.printzone(Player1.graveyard)
local opcao = tonumber(io.read())
if opcao ~= nil and opcao == 0 then
h = true
elseif Player1.graveyard[opcao].tipo == "Unit" then
local card1 = Player1.graveyard[opcao]
while opcao <= #Player1.graveyard do
Player1.graveyard[opcao] = Player1.graveyard[opcao+1]
opcao = opcao+1
end
Functions.summon(card1,Player1,Player2)
h = true
else
print("SELECT A VALID OPTION!")
end
end
end
}
}
Cards.GodofWisdom = {
name = "God of Wisdom",
power = 19,
cost = 0,
tipo = "Unit",
stamina = 1,
description = "Can only be played if you have ten or more cards in hand. Ability: Play a card from your hand without paying its cost.",
effect = {condition = function(card,Player1,Player2)
if #Player1.hand > 9 then
return true
end
end,
ability = function(card,Player1,Player2)
local h = false
while h == false do
print("Play a card from your hand without paying its cost:")
print("0 - None")
Functions.printzone(Player1.hand)
local opcao = tonumber(io.read())
if opcao == 0 then
h = true
break
elseif opcao <= #Player1.hand and opcao > 0 then
card1 = Player1.hand[opcao]
local w = opcao
while w <= #Player1.hand do
Player1.hand[w] = Player1.hand[w+1]
w = w+1
end
Functions.play(card1,Player1,Player2)
h = true
else
print("SELECT A VALID OPTION!")
end
end
end
}
}
Cards.GodofNexus = {
name = "God of Nexus",
power = 22,
cost = 0,
tipo = "Unit",
stamina = 1,
description = "Can only be played if there are no cards in your deck. If summoned, shuffle your graveyard into your deck. Ability: Play the top card of your deck without paying its cost.",
effect = {condition = function(card,Player1,Player2)
if #Player1.deck == 0 then
return true
end
end,
ifsummoned = function(card,Player1,Player2)
local i = 1
while i <= #Player1.graveyard do
local card1 = Player1.graveyard[i]
Player1.graveyard[i] = Player1.graveyard[i+1]
Player1.deck[#Player1.deck+1] = card1
Functions.shuffle2(Player1.deck)
i = i+1
end
print(Player1.name.."'s graveyard was shuffle into the deck.")
end,
ability = function(card,Player1,Player2)
local card1 = Player1.deck[#Player1.deck]
Player1.deck[#Player1.deck] = nil
print(card1.name.." is played.")
Functions.play(card1,Player1,Player2)
end
}
}
Cards.GodofWealth = {
name = "God of Wealth",
power = 24,
cost = 0,
tipo = "Unit",
stamina = 1,
description = "Can only be played if you have 5 or more gold. Ability: Put any number of cards from your hand on the bottom of your deck, then draw that many cards.",
effect = {
}
}
Cards.GodofHealth = {
name = "God of Health",
power = 21,
cost = 0,
tipo = "Unit",
stamina = 1,
description = "Can only be played if you have 144 life or more. .",
effect = {
}
}
Cards.GodofGrowth = {
name = "God of Growth",
power = 23,
cost = 0,
tipo = "Unit",
stamina = 1,
description = "Can only be played if your level is 7 or higher. Whenever you would receive 1 gold, draw a card instead. You may pay for card's costs by discarding cards instead of paying gold.",
effect = {
}
}
Cards.GodofPain = {
name = "God of Pain",
power = 21,
cost = 0,
tipo = "Unit",
stamina = 1,
description = "Can only be played if no player has more than 20 life.--meh ",
effect = {
}
}
-- Cards.GodofStorm = {
-- name = "God of Storm",
-- power = 0,
-- cost = 0,
-- tipo = "Unit",
-- stamina = 1,
-- description = "",
-- effect = {
-- }
-- }
-- Cards. = {
-- name = "",
-- power = 0,
-- cost = 0,
-- tipo = "Unit",
-- stamina = 1,
-- description = "",
-- effect = {
-- }
-- }
return Gods