forked from threeofaband/bountiful
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathblinds.lua
More file actions
254 lines (248 loc) · 7.44 KB
/
blinds.lua
File metadata and controls
254 lines (248 loc) · 7.44 KB
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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
SMODS.Blind {
name = 'The Bereaved',
key = 'bereaved',
atlas = 'bbb_blind',
pos = {y = 0},
dollars = 5,
boss = { min = -100 },
mult = 1,
loc_vars = function(self)
if G.GAME and G.GAME.round_resets and to_number(G.GAME.round_resets.ante) then
if to_number(G.GAME.round_resets.ante) > 0 then
return {vars = { to_number(G.GAME.round_resets.ante) }}
else
return {vars = { 1 }}
end
else
return {vars = { 1 }}
end end,
loc_txt = {
name = 'The Bereaved',
text = { '-#1# Chips for each',
'remaining card in deck',}
},
vars = {'2 (Xante)'},
discovered = true,
boss_colour = HEX('5788CC'),
calculate = function(self, blind, context)
if context.final_scoring_step then
local chips = _G.hand_chips or 0
local call
if to_number(G.GAME.round_resets.ante) > 0 then
call = (#G.deck.cards * to_number(G.GAME.round_resets.ante))
else
call = #G.deck.cards
end
if chips - call >= 0 then
return {
chip_mod = -call,
sound = 'cancel',
}
else
return {
chip_mod = -chips,
sound = 'cancel',
}
end
end
end
}
SMODS.Blind {
name = 'The Brodequin',
key = 'brodequin',
atlas = 'bbb_blind',
pos = {y = 1},
dollars = 5,
boss = { min = -100 },
mult = 2,
loc_vars = function(self)
if G.GAME and G.GAME.round_resets and to_number(G.GAME.round_resets.ante) then
if to_number(G.GAME.round_resets.ante) > 0 then
return {vars = { 2 * to_number(G.GAME.round_resets.ante) }}
else
return {vars = { 2 }}
end
else
return {vars = { 2 }}
end end,
loc_txt = {
name = 'The Brodequin',
text = { '-#1# Mult for every',
'$5 you have',}
},
vars = {'2 (Xante)'},
discovered = true,
boss_colour = HEX('BE9B63'),
calculate = function(self, blind, context)
if context.final_scoring_step then
local mult = _G.mult or 0
local call
if to_number(G.GAME.round_resets.ante) > 0 then
call = (math.floor(G.GAME.dollars / 5) * to_number(G.GAME.round_resets.ante) * 2)
else
call = 2
end
if mult - call >= 0 then
return {
mult_mod = -call,
sound = 'cancel',
}
else
play_sound('cancel', 0.75, 0.7)
return {
mult_mod = -mult,
sound = 'cancel',
}
end
end
end
}
SMODS.Blind {
name = 'The Bunt',
key = 'bunt',
atlas = 'bbb_blind',
pos = {y = 2},
dollars = 5,
boss = { min = 2 },
mult = 2,
loc_txt = {
name = 'The Bunt',
text = { 'Uncommon jokers',
'give X0.8 Mult',}
},
discovered = true,
boss_colour = HEX('A6A6A6'),
calculate = function(self, blind, context)
if context.other_joker and (context.other_joker.config.center.rarity == 2 or context.other_joker.config.center.rarity == "Uncommon") then
return {
xmult = 0.7
}
end
end
}
SMODS.Blind {
name = 'The Bodewash',
key = 'bodewash',
atlas = 'bbb_blind',
pos = {y = 3},
dollars = 5,
boss = { min = 3 },
mult = 2,
loc_vars = function(self)
if G.GAME and G.GAME.round_resets and to_number(G.GAME.round_resets.ante) then
if to_number(G.GAME.round_resets.ante) > 0 then
return {vars = { 2 + to_number(G.GAME.round_resets.ante) }}
else
return {vars = { 2 }}
end
else
return {vars = { 2 }}
end end,
loc_txt = {
name = 'The Bodewash',
text = { '-#1# Chips for every',
'$1 you have',}
},
vars = {'2 (-ante)'},
discovered = true,
boss_colour = HEX('886979'),
calculate = function(self, blind, context)
if context.final_scoring_step then
local chips = _G.hand_chips or 0
local call
if to_number(G.GAME.round_resets.ante) > 0 then
call = G.GAME.dollars * ( to_number(G.GAME.round_resets.ante) + 2)
else
call = 2
end
if chips - call >= 0 then
return {
chip_mod = -call,
sound = 'cancel',
}
else
play_sound('cancel', 0.75, 0.7)
return {
chip_mod = -chips,
sound = 'cancel',
}
end
end
end
}
SMODS.Blind {
name = 'The Bloodthirsty',
key = 'bloodthirsty',
atlas = 'bbb_blind',
pos = {y = 4},
dollars = 5,
boss = { min = -100 },
mult = 2,
loc_txt = {
name = 'The Bloodthirsty',
text = { 'Most common suit',
'gives X0.8 Mult',}
},
discovered = true,
boss_colour = HEX('C3492F'),
calculate = function(self, blind, context)
if context.individual and context.cardarea == G.play then
local array, count, suits = {}, 0, {}
for k, card in ipairs( G.playing_cards ) do
local suit = card.base.suit
array[suit] = array[suit] or 0
array[suit] = array[suit] + 1
end
for suit, int in pairs(array) do
if int > count then
count = int
suits = {suit}
elseif int == count then
table.insert(suits, suit)
end
end
local claim = context.other_card.base.suit
for i = 1, #suits do
if suits[i] == claim then
return {
xmult = 0.8
}
end
end
end
end
}
SMODS.Blind {
name = 'The Burgee',
key = 'burgee',
atlas = 'bbb_blind',
pos = {y = 5},
dollars = 5,
boss = { min = -100 },
mult = 3,
loc_txt = {
name = 'The Burgee',
text = { '-#1# Chips for each',
'remaining discard',}
},
loc_vars = function(self)
if G.GAME and G.GAME.round_resets and to_number(G.GAME.round_resets.ante) then
if to_number(G.GAME.round_resets.ante) > 0 then
return {vars = { 30 * to_number(G.GAME.round_resets.ante) }}
else
return {vars = { 30 }}
end
else
return {vars = { 30 }}
end end,
vars = {'30 [Xante]'},
discovered = true,
boss_colour = HEX('C3492F'),
calculate = function(self, blind, context)
if context.final_scoring_step then
return {
chips = math.max(G.GAME.current_round.discards_left, 0) * -30 * math.max(to_number(G.GAME.round_resets.ante), 1)
}
end
end
}