├── README.md
├── img
├── 3776.png
├── Ishihara.png
├── pampa_v2.png
├── joker13_2x.png
├── kombini_2x.png
├── scope_dog.png
├── block_puzzle3.png
├── joker_open_2x.png
├── mixtape_pink.png
├── snecko_eye_2x.png
├── the_dream_2x1.png
├── Seal Bouquet_2x.png
├── fashion_design.png
├── flamingo_2x_v2.png
├── jazz_joker_2x_v2.png
├── joker_cherry_2x.png
├── joker_claw_2x_v2.png
├── joker_mahjong_2x.png
├── pimp_the_bus_2x.png
├── self_portrait_2x.png
├── spooky_joker_v3.png
├── voodoo_doll_2x.png
├── cafe_gourmand2_2x.png
├── joker_blackstar_2x.png
├── joker_gauss_v3_2x.png
├── joker_matryoshka_2x.png
├── joker_moon_rabbit_2x.png
├── joker_subway_map_2x_alt.png
└── joker_tiger_bikini_v2_2x.png
├── m6x11plus.ttf
├── assets
├── jimbo.png
├── 1x
│ ├── Jokers_mtl.png
│ ├── cards_rank13.png
│ └── cards_rank13_opt2.png
└── 2x
│ ├── Jokers_mtl.png
│ ├── cards_rank13.png
│ └── cards_rank13_opt2.png
├── style.css
├── index.html
├── addjokers.js
└── PampaJokers.lua
/README.md:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/README.md
--------------------------------------------------------------------------------
/img/3776.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/3776.png
--------------------------------------------------------------------------------
/m6x11plus.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/m6x11plus.ttf
--------------------------------------------------------------------------------
/assets/jimbo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/assets/jimbo.png
--------------------------------------------------------------------------------
/img/Ishihara.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/Ishihara.png
--------------------------------------------------------------------------------
/img/pampa_v2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/pampa_v2.png
--------------------------------------------------------------------------------
/img/joker13_2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/joker13_2x.png
--------------------------------------------------------------------------------
/img/kombini_2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/kombini_2x.png
--------------------------------------------------------------------------------
/img/scope_dog.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/scope_dog.png
--------------------------------------------------------------------------------
/img/block_puzzle3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/block_puzzle3.png
--------------------------------------------------------------------------------
/img/joker_open_2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/joker_open_2x.png
--------------------------------------------------------------------------------
/img/mixtape_pink.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/mixtape_pink.png
--------------------------------------------------------------------------------
/img/snecko_eye_2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/snecko_eye_2x.png
--------------------------------------------------------------------------------
/img/the_dream_2x1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/the_dream_2x1.png
--------------------------------------------------------------------------------
/assets/1x/Jokers_mtl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/assets/1x/Jokers_mtl.png
--------------------------------------------------------------------------------
/assets/2x/Jokers_mtl.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/assets/2x/Jokers_mtl.png
--------------------------------------------------------------------------------
/img/Seal Bouquet_2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/Seal Bouquet_2x.png
--------------------------------------------------------------------------------
/img/fashion_design.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/fashion_design.png
--------------------------------------------------------------------------------
/img/flamingo_2x_v2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/flamingo_2x_v2.png
--------------------------------------------------------------------------------
/img/jazz_joker_2x_v2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/jazz_joker_2x_v2.png
--------------------------------------------------------------------------------
/img/joker_cherry_2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/joker_cherry_2x.png
--------------------------------------------------------------------------------
/img/joker_claw_2x_v2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/joker_claw_2x_v2.png
--------------------------------------------------------------------------------
/img/joker_mahjong_2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/joker_mahjong_2x.png
--------------------------------------------------------------------------------
/img/pimp_the_bus_2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/pimp_the_bus_2x.png
--------------------------------------------------------------------------------
/img/self_portrait_2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/self_portrait_2x.png
--------------------------------------------------------------------------------
/img/spooky_joker_v3.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/spooky_joker_v3.png
--------------------------------------------------------------------------------
/img/voodoo_doll_2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/voodoo_doll_2x.png
--------------------------------------------------------------------------------
/assets/1x/cards_rank13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/assets/1x/cards_rank13.png
--------------------------------------------------------------------------------
/assets/2x/cards_rank13.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/assets/2x/cards_rank13.png
--------------------------------------------------------------------------------
/img/cafe_gourmand2_2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/cafe_gourmand2_2x.png
--------------------------------------------------------------------------------
/img/joker_blackstar_2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/joker_blackstar_2x.png
--------------------------------------------------------------------------------
/img/joker_gauss_v3_2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/joker_gauss_v3_2x.png
--------------------------------------------------------------------------------
/img/joker_matryoshka_2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/joker_matryoshka_2x.png
--------------------------------------------------------------------------------
/img/joker_moon_rabbit_2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/joker_moon_rabbit_2x.png
--------------------------------------------------------------------------------
/assets/1x/cards_rank13_opt2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/assets/1x/cards_rank13_opt2.png
--------------------------------------------------------------------------------
/assets/2x/cards_rank13_opt2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/assets/2x/cards_rank13_opt2.png
--------------------------------------------------------------------------------
/img/joker_subway_map_2x_alt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/joker_subway_map_2x_alt.png
--------------------------------------------------------------------------------
/img/joker_tiger_bikini_v2_2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/batabata3/balatro-pampa-joker-pack/HEAD/img/joker_tiger_bikini_v2_2x.png
--------------------------------------------------------------------------------
/style.css:
--------------------------------------------------------------------------------
1 | /* import m6x11plus.ttf */
2 |
3 | @font-face {
4 | font-family: 'm6x11plus';
5 | src: url('m6x11plus.ttf') format('truetype');
6 | }
7 |
8 | * {
9 | margin: 0;
10 | padding: 0;
11 | box-sizing: border-box;
12 |
13 | font-family: 'm6x11plus';
14 | text-shadow: #000 2px 2px 2px;
15 | }
16 |
17 | .bg {
18 | position: fixed;
19 | top: 0;
20 | left: 0;
21 | width: 100%;
22 | height: 100%;
23 | background: #000;
24 | opacity: 0.3;
25 | z-index: -1;
26 | pointer-events: none;
27 | }
28 |
29 | main {
30 | text-align: center;
31 | color: white;
32 | padding: 1rem;
33 | width: min(90rem, 100%);
34 | margin: 1rem auto;
35 | font-size: 1.5rem;
36 | }
37 |
38 | h1 {
39 | font-size: 3rem;
40 | margin-bottom: 1rem;
41 | }
42 |
43 | .jokers {
44 | display: grid;
45 | grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
46 | gap: 1rem;
47 | }
48 | .joker {
49 | display: flex;
50 | flex-direction: column;
51 | align-items: center;
52 | gap: 1rem;
53 | padding: 1rem;
54 | border: 2px solid white;
55 | border-radius: 1rem;
56 |
57 | background-color: #374244;
58 | }
59 | .joker img {
60 | height: 190px;
61 | image-rendering: pixelated;
62 | }
63 |
64 | #download {
65 | background-color: #374244;
66 | color: white;
67 | padding: 1rem;
68 | border: 2px solid white;
69 | border-radius: 1rem;
70 | cursor: pointer;
71 | }
72 |
73 | .rarity {
74 | width: 142px;
75 | border-radius: 8px;
76 | padding: 8px;
77 | }
--------------------------------------------------------------------------------
/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | Pampa Joker Pack
7 |
8 |
64 |
65 |
66 |
67 |
68 |
85 |
86 |
87 |
88 | Pampa Joker Pack
89 |
90 | adds 28 jokers into the game
91 | uses steamodded
92 | bye bye !
93 |
94 |
95 | Template made by notmario
96 | https://github.com/notmario/balatrowebsitetemplate
97 |
98 |
99 |
100 | download link
101 |
102 | download
103 |
104 |
105 | jokers
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
--------------------------------------------------------------------------------
/addjokers.js:
--------------------------------------------------------------------------------
1 | let jokers = [
2 | {
3 | name: "Pampa",
4 | text: [
5 | "Gain {C:money}$10{} at the end of round.",
6 | "{C:green}1 in 3{} chance this",
7 | "card is destroyed",
8 | "at end of round"
9 | ],
10 | image_url: "img/pampa_v2.png",
11 | rarity: "Common"
12 | },
13 | {
14 | name: "Jazz Trio",
15 | text: [
16 | "When played hand contains",
17 | "a scoring {C:attention}Jack{}, {C:attention}Queen{} and {C:attention}King{},",
18 | "upgrade {C:attention}2{} random {C:attention}Poker Hands{}"
19 | ],
20 | image_url: "img/jazz_joker_2x_v2.png",
21 | rarity: "Common"
22 | },
23 | {
24 | name: "Cherry",
25 | text: [
26 | "Gains {C:red}+2{} Mult whenever a pair",
27 | "is discarded. Destroyed",
28 | "after 12 pairs discarded"
29 | ],
30 | image_url: "img/joker_cherry_2x.png",
31 | rarity: "Common"
32 | },
33 | {
34 | name: "Subway Map",
35 | text: [
36 | "Gains {C:red}+4{} Mult if played hand",
37 | "contains the highest {C:attention}Straight{} so far.",
38 | ],
39 | image_url: "img/joker_subway_map_2x_alt.png",
40 | rarity: "Common"
41 | },
42 | {
43 | name: "Sliding Joker",
44 | text: [
45 | "Gains {C:red}+5{} Mult for each hand containing a {C:attention}Flush{}.",
46 | "Gains {C:chips}+25{} Chips for each hand containing a {C:attention}Straight{}.",
47 | "Resets at the end of each ante.",
48 | ],
49 | image_url: "img/block_puzzle3.png",
50 | rarity: "Common"
51 | },
52 | {
53 | name: "Matryoshka",
54 | text: [
55 | "{C:blue}+30{} chips for each unique",
56 | "scoring hand size played this round"
57 | ],
58 | image_url: "img/joker_matryoshka_2x.png",
59 | rarity: "Common"
60 | },
61 | {
62 | name: "Moon Rabbit",
63 | text: [
64 | "{C:green}1 in 2{} chance",
65 | "to generate a copy of {C:attention}The Fool{}",
66 | "when a hand containing a {C:attention}Full House{} is played"
67 | ],
68 | image_url: "img/joker_moon_rabbit_2x.png",
69 | rarity: "Common"
70 | },
71 | {
72 | name: "Bell Curve",
73 | text: [
74 | "Enhance one random card",
75 | "into a {C:attention}Lucky Card{} when",
76 | "first hand is drawn",
77 | ],
78 | image_url: "img/joker_gauss_v3_2x.png",
79 | rarity: "Common"
80 | },
81 | {
82 | name: "Claw",
83 | text: [
84 | "When any {C:attention}3{} is played, permanently give",
85 | "{C:chips}+1{} chips to ALL 3s in the deck."
86 | ],
87 | image_url: "img/joker_claw_2x_v2.png",
88 | rarity: "Common"
89 | },
90 | {
91 | name: "Café Gourmand",
92 | text: [
93 | "{C:chips}+80{} chips",
94 | "if hand has been played",
95 | "3 times or less."
96 | ],
97 | image_url: "img/cafe_gourmand2_2x.png",
98 | rarity: "Common"
99 | },
100 | {
101 | name: "Konbini",
102 | text: [
103 | "Gains +{C:mult}+2{} mult",
104 | "per unique {C:tarot}Tarot{}",
105 | "card used this run"
106 | ],
107 | image_url: "img/kombini_2x.png",
108 | rarity: "Common"
109 | },
110 | {
111 | name: "Ishihara Test",
112 | text: [
113 | "All {C:attention}9{} and {C:attention}6{} become",
114 | "{C:attention}Wild{} cards when played."
115 | ],
116 | image_url: "img/Ishihara.png",
117 | rarity: "Common"
118 | },
119 | {
120 | name: "Tiger Bikini",
121 | text: [
122 | "{C:red}+4{} Mult for each",
123 | "{C:hearts}hearts{} card above {C:attention}13{}",
124 | "in your full deck",
125 | ],
126 | image_url: "img/joker_tiger_bikini_v2_2x.png",
127 | rarity: "Uncommon"
128 | },
129 | {
130 | name: "Seal Bouquet",
131 | text: [
132 | "If first card of a {C:clubs}Spades{} flush",
133 | "contains a {C:attention}seal{}, add a random {C:attention}seal{}",
134 | "to another random card."
135 | ],
136 | image_url: "img/Seal Bouquet_2x.png",
137 | rarity: "Uncommon"
138 | },
139 | {
140 | name: "Mixtape",
141 | text: [
142 | "Gain {C:money}$2{} at the end of round for each",
143 | "enchanced {C:clubs}Clubs{} card in your deck.",
144 | ],
145 | image_url: "img/mixtape_pink.png",
146 | rarity: "Uncommon"
147 | },
148 | {
149 | name: "Flamingo",
150 | text: [
151 | "When played, {C:diamonds}Diamonds{} cards",
152 | "have {C:green}1 in 30{} chance",
153 | "to become {C:dark_edition}polychrome{}.",
154 | ],
155 | image_url: "img/flamingo_2x_v2.png",
156 | rarity: "Uncommon"
157 | },
158 | {
159 | name: "Voodoo Doll",
160 | text: [
161 | "{X:mult,C:white}X0.8 {} Mult",
162 | "for each unique played rank",
163 | "already played this round.",
164 | ],
165 | image_url: "img/voodoo_doll_2x.png",
166 | rarity: "Uncommon"
167 | },
168 | {
169 | name: "Snecko Eye",
170 | text: [
171 | "The ranks of first drawn cards",
172 | "each round are permanently randomized.",
173 | ],
174 | image_url: "img/snecko_eye_2x.png",
175 | rarity: "Uncommon"
176 | },
177 | {
178 | name: "3776",
179 | text: [
180 | "Each played {C:attention}3{},",
181 | "{C:attention}6{} or {C:attention}7{}, gives",
182 | "{C:mult}+6{} Mult when scored",
183 | "Retrigger all {C:attention}7{} "
184 | ],
185 | image_url: "img/3776.png",
186 | rarity: "Uncommon"
187 | },
188 | {
189 | name: "Mahjong Joker",
190 | text: [
191 | "Gains {X:mult,C:white} X0.3 {} Mult for",
192 | "every 3 hands containing",
193 | "{C:attention}Three of a Kind{}",
194 | ],
195 | image_url: "img/joker_mahjong_2x.png",
196 | rarity: "Uncommon"
197 | },
198 | {
199 | name: "Self Portrait",
200 | text: [
201 | "First unscoring face card turns",
202 | "into a random non-face rank."
203 | ],
204 | image_url: "img/self_portrait_2x.png",
205 | rarity: "Uncommon"
206 | },
207 | {
208 | name: "Pimp The Bus",
209 | text: [
210 | "Gains {X:mult,C:white}x0.1{} Mult",
211 | "for each consecutive scoring hand",
212 | "with at least one",
213 | "enhancement, edition or seal",
214 | ],
215 | image_url: "img/pimp_the_bus_2x.png",
216 | rarity: "Uncommon"
217 | },
218 | {
219 | name: "Grand Slam",
220 | text: [
221 | "{X:mult,C:white}x0.5{} Mult for each",
222 | "unique flush suit played this round ",
223 | ],
224 | image_url: "img/joker_open_2x.png",
225 | rarity: "Uncommon"
226 | },
227 | {
228 | name: "Scopedog",
229 | text: [
230 | "Playing a hand containing an",
231 | "{C:attention}Aces Three of a Kind{}",
232 | "disables the {C:attention}Boss Blind{}"
233 | ],
234 | image_url: "img/scope_dog.png",
235 | rarity: "Uncommon"
236 | },
237 | {
238 | name: "The Dream",
239 | text: [
240 | "{C:attention}Level Up{} secret poker hands",
241 | "when played"
242 | ],
243 | image_url: "img/the_dream_2x1.png",
244 | rarity: "Rare"
245 | },
246 | {
247 | name: "Fabric Design",
248 | text: [
249 | "When {C:attention}Blind{} is selected",
250 | "lose all {C:red}Discards{} and apply a random ",
251 | "{C:attention}enhancement{} to all cards in the deck.",
252 | "When removed, turn all cards back to normal."
253 | ],
254 | image_url: "img/fashion_design.png",
255 | rarity: "Rare"
256 | },
257 | {
258 | name: "Black Star",
259 | text: [
260 | "Prevents death once.",
261 | "Destroy all jokers and replace them",
262 | "with 2 random rare jokers."
263 | ],
264 | image_url: "img/joker_blackstar_2x.png",
265 | rarity: "Rare"
266 | },
267 | {
268 | name: "Trick or Treat",
269 | text: [
270 | "Gains {X:mult,C:white}x1{} Mult for each",
271 | "{C:spectral}Spectral{} card used this run"
272 | ],
273 | image_url: "img/spooky_joker_v3.png",
274 | rarity: "Rare"
275 | },
276 | // {
277 | // name: "Number 13",
278 | // text: [
279 | // "When any {C:attention}Glass Card{} breaks",
280 | // "add one {C:attention}Glass Rank 13{}",
281 | // "card to your deck"
282 | // ],
283 | // image_url: "img/joker13_2x.png",
284 | // rarity: "Rare"
285 | // },
286 | ]
287 |
288 | let cols = {
289 |
290 | MULT: "#FE5F55",
291 | CHIPS: "#009dff",
292 | MONEY: "#f3b958",
293 | XMULT: "#FE5F55",
294 | FILTER: "#ff9a00",
295 | ATTENTION: "#ff9a00",
296 | BLUE: "#009dff",
297 | RED: "#FE5F55",
298 | GREEN: "#4BC292",
299 | PALE_GREEN: "#56a887",
300 | ORANGE: "#fda200",
301 | IMPORTANT: "#ff9a00",
302 | GOLD: "#eac058",
303 | YELLOW: "#ffff00",
304 | CLEAR: "#00000000",
305 | WHITE: "#ffffff",
306 | PURPLE: "#8867a5",
307 | BLACK: "#374244",
308 | L_BLACK: "#4f6367",
309 | GREY: "#5f7377",
310 | CHANCE: "#4BC292",
311 | JOKER_GREY: "#bfc7d5",
312 | VOUCHER: "#cb724c",
313 | BOOSTER: "#646eb7",
314 | EDITION: "#ffffff",
315 | DARK_EDITION: "#000000",
316 | ETERNAL: "#c75985",
317 | DYN_UI: {
318 | MAIN: "#374244",
319 | DARK: "#374244",
320 | BOSS_MAIN: "#374244",
321 | BOSS_DARK: "#374244",
322 | BOSS_PALE: "#374244"
323 | },
324 | SO_1: {
325 | Hearts: "#f03464",
326 | Diamonds: "#f06b3f",
327 | Spades: "#403995",
328 | Clubs: "#235955",
329 | },
330 | SO_2: {
331 | Hearts: "#f83b2f",
332 | Diamonds: "#e29000",
333 | Spades: "#4f31b9",
334 | Clubs: "#008ee6",
335 | },
336 | SUITS: {
337 | Hearts: "#FE5F55",
338 | Diamonds: "#FE5F55",
339 | Spades: "#374649",
340 | Clubs: "#424e54",
341 | },
342 |
343 | SET: {
344 | Default: "#cdd9dc",
345 | Enhanced: "#cdd9dc",
346 | Joker: "#424e54",
347 | Tarot: "#424e54",
348 | Planet: "#424e54",
349 | Spectral: "#424e54",
350 | Voucher: "#424e54",
351 | },
352 | SECONDARY_SET: {
353 | Default: "#9bb6bdFF",
354 | Enhanced: "#8389DDFF",
355 | Joker: "#708b91",
356 | Tarot: "#a782d1",
357 | Planet: "#13afce",
358 | Spectral: "#4584fa",
359 | Voucher: "#fd682b",
360 | Edition: "#4ca893",
361 | },
362 | }
363 |
364 | let rarities = {
365 | "Common": "#009dff",
366 | "Uncommon": "#4BC292",
367 | "Rare": "#fe5f55",
368 | "Legendary": "#b26cbb"
369 | }
370 |
371 | regex = /{([^}]+)}/g;
372 |
373 | let jokers_div = document.querySelector(".jokers");
374 |
375 | for (let joker of jokers) {
376 | console.log("adding joker", joker.name);
377 |
378 | joker.text = joker.text.map((line) => { return line + "{}"});
379 |
380 | joker.text = joker.text.join("
");
381 | joker.text = joker.text.replaceAll("{}", "");
382 | joker.text = joker.text.replace(regex, function replacer(match, p1, offset, string, groups) {
383 | let classes = p1.split(",");
384 |
385 | let css_styling = "";
386 |
387 | for (let i = 0; i < classes.length; i++) {
388 | let parts = classes[i].split(":");
389 | if (parts[0] === "C") {
390 | css_styling += `color: ${cols[parts[1].toUpperCase()]};`;
391 | } else if (parts[0] === "X") {
392 | css_styling += `background-color: ${cols[parts[1].toUpperCase()]}; border-radius: 5px; padding: 0 5px;`;
393 | }
394 | }
395 |
396 | return ``;
397 | });
398 |
399 | let joker_div = document.createElement("div");
400 | joker_div.classList.add("joker");
401 | joker_div.innerHTML = `
402 | ${joker.name}
403 |
404 | ${joker.rarity}
405 | ${joker.text}
406 | `;
407 |
408 | jokers_div.appendChild(joker_div);
409 | }
--------------------------------------------------------------------------------
/PampaJokers.lua:
--------------------------------------------------------------------------------
1 | --- STEAMODDED HEADER
2 | --- MOD_NAME: Pampa Joker Pack
3 | --- MOD_ID: mtl_jkr
4 | --- MOD_AUTHOR: [Matelote]
5 | --- MOD_DESCRIPTION: Adds 28 Jokers in the game
6 |
7 |
8 | ----------------------------------------------
9 | ------------MOD CODE -------------------------
10 |
11 |
12 |
13 | function table_length(table)
14 | local count = 0
15 | for _ in pairs(table) do count = count + 1 end
16 | return count
17 | end
18 |
19 |
20 |
21 |
22 |
23 | function SMODS.INIT.MtlJokers()
24 |
25 | -- Localization
26 | G.localization.misc.dictionary.pampa_bye = "Bye Bye !"
27 | G.localization.misc.dictionary.k_upgrade_ex_claw = "Upgrade all 3s !"
28 | G.localization.misc.dictionary.ph_black_star = "Saved by Black Star"
29 | G.localization.misc.v_dictionary.sliding_joker = {"+#1# mult ! +#2# chips !"}
30 |
31 | init_localization()
32 |
33 | local mtlJokers = {
34 | j_jazztrio = {
35 | order = 151,
36 | unlocked = true,
37 | discovered = true,
38 | blueprint_compat = true,
39 | eternal_compat = true,
40 | rarity = 1,
41 | cost = 4,
42 | name = "Jazz Trio",
43 | set = "Joker",
44 | config = { extra = {}},
45 | pos = { x = 0, y = 0 },
46 | atlas = "MTLJoker"
47 | },
48 | j_subway = {
49 | order = 152,
50 | unlocked = true,
51 | discovered = true,
52 | blueprint_compat = true,
53 | eternal_compat = true,
54 | rarity = 1,
55 | cost = 5,
56 | name = "Subway Map",
57 | set = "Joker",
58 | config = { extra = {mult_gain=4, mult=0, hand=0}},
59 | pos = { x = 3, y = 0 },
60 | atlas = "MTLJoker"
61 | },
62 | j_snecko = {
63 | order = 153,
64 | unlocked = true,
65 | discovered = true,
66 | blueprint_compat = false,
67 | eternal_compat = true,
68 | rarity = 2,
69 | cost = 6,
70 | name = "Snecko Eye",
71 | set = "Joker",
72 | config = {h_size=0,extra ={deck=false}},
73 | pos = { x = 5, y = 1 },
74 | atlas = "MTLJoker"
75 | },
76 | j_sealbouquet = {
77 | order = 154,
78 | unlocked = true,
79 | discovered = true,
80 | blueprint_compat = true,
81 | eternal_compat = true,
82 | rarity = 2,
83 | cost = 7,
84 | name = "Seal Bouquet",
85 | set = "Joker",
86 | config = {},
87 | pos = {x=0,y=2},
88 | atlas = "MTLJoker"
89 | },
90 | j_mixtape = {
91 | order = 155,
92 | unlocked = true,
93 | discovered = true,
94 | blueprint_compat = true,
95 | eternal_compat = true,
96 | rarity = 2,
97 | cost = 7,
98 | name = "Mixtape",
99 | set = "Joker",
100 | config = {extra={money_gain=2, money=0}},
101 | pos = {x=1,y=2},
102 | atlas = "MTLJoker"
103 | },
104 | j_bikini = {
105 | order = 156,
106 | unlocked = true,
107 | discovered = true,
108 | blueprint_compat = true,
109 | eternal_compat = true,
110 | rarity = 2,
111 | cost = 7,
112 | name = "Tiger Bikini",
113 | set = "Joker",
114 | config = { extra = {mult=3, threshold=13}},
115 | pos = { x = 1, y = 0 },
116 | atlas = "MTLJoker"
117 | },
118 | j_flamingo = {
119 | order = 157,
120 | unlocked = true,
121 | discovered = true,
122 | blueprint_compat = true,
123 | eternal_compat = true,
124 | rarity = 2,
125 | cost = 7,
126 | name = "Flamingo",
127 | set = "Joker",
128 | config = {extra={odds=30}},
129 | pos = {x=2,y=2},
130 | atlas = "MTLJoker"
131 | },
132 | j_sliding = {
133 | order = 158,
134 | unlocked = true,
135 | discovered = true,
136 | blueprint_compat = true,
137 | eternal_compat = true,
138 | rarity = 1,
139 | cost = 4,
140 | name = "Sliding Joker",
141 | set = "Joker",
142 | config = {extra={mult=0, chips=0,mult_gain=5,chip_gain=25}},
143 | pos = {x=4,y=0},
144 | atlas = "MTLJoker"
145 | },
146 | j_claw = {
147 | order = 159,
148 | unlocked = true,
149 | discovered = true,
150 | blueprint_compat = true,
151 | eternal_compat = true,
152 | rarity = 2,
153 | cost = 6,
154 | name = "Claw",
155 | set = "Joker",
156 | config = {extra= {chip_gain=1}},
157 | pos = {x=4,y=1},
158 | atlas = "MTLJoker"
159 | },
160 | j_mahjong = {
161 | order = 160,
162 | unlocked = true,
163 | discovered = true,
164 | blueprint_compat = true,
165 | eternal_compat = true,
166 | rarity = 2,
167 | cost = 6,
168 | name = "Mahjong Joker",
169 | set = "Joker",
170 | config = {extra={xmult_gain=0.3,frequency=3,counter=0}, Xmult = 1},
171 | pos = {x=6,y=0},
172 | atlas = "MTLJoker"
173 | },
174 | j_blackstar = {
175 | order = 161,
176 | unlocked = true,
177 | discovered = true,
178 | blueprint_compat = false,
179 | eternal_compat = false,
180 | rarity = 3,
181 | cost = 8,
182 | name = "Black Star",
183 | set = "Joker",
184 | config = {},
185 | pos = {x=7,y=0},
186 | atlas = "MTLJoker"
187 | },
188 | j_moon = {
189 | order = 162,
190 | unlocked = true,
191 | discovered = true,
192 | blueprint_compat = true,
193 | eternal_compat = true,
194 | rarity = 1,
195 | cost = 5,
196 | name = "Moon Rabbit",
197 | set = "Joker",
198 | config = {extra={odds=2}},
199 | pos = {x=0,y=1},
200 | atlas = "MTLJoker"
201 | },
202 | j_bell = {
203 | order = 163,
204 | unlocked = true,
205 | discovered = true,
206 | blueprint_compat = true,
207 | eternal_compat = true,
208 | rarity = 1,
209 | cost = 5,
210 | name = "Bell Curve",
211 | set = "Joker",
212 | config = {},
213 | pos = {x=3,y=1},
214 | atlas = "MTLJoker"
215 | },
216 | j_konbini = {
217 | order = 164,
218 | unlocked = true,
219 | discovered = true,
220 | blueprint_compat = true,
221 | eternal_compat = true,
222 | rarity = 1,
223 | cost = 4,
224 | name = "Konbini",
225 | set = "Joker",
226 | config = {extra={mult=2}},
227 | pos = {x=3,y=2},
228 | atlas = "MTLJoker"
229 | },
230 | j_3776 = {
231 | order = 165,
232 | unlocked = true,
233 | discovered = true,
234 | blueprint_compat = true,
235 | eternal_compat = true,
236 | rarity = 2,
237 | cost = 6,
238 | name = "3776",
239 | set = "Joker",
240 | config = {extra={mult=6,repetitions=1}},
241 | pos = {x=4,y=2},
242 | atlas = "MTLJoker"
243 | },
244 | j_pampa = {
245 | order = 166,
246 | unlocked = true,
247 | discovered = true,
248 | blueprint_compat = false,
249 | eternal_compat = false,
250 | rarity = 1,
251 | cost = 5,
252 | name = "Pampa",
253 | set = "Joker",
254 | effect = "Bonus dollars",
255 | config = {extra={money=10,odds = 3}},
256 | pos = {x=5,y=2},
257 | atlas = "MTLJoker"
258 | } ,
259 | j_voodoo = {
260 | order = 10,
261 | unlocked = true,
262 | discovered = true,
263 | blueprint_compat = true,
264 | eternal_compat = true,
265 | rarity = 2,
266 | cost = 6,
267 | name = "Voodoo Doll",
268 | set = "Joker",
269 | config = {extra={hand="", hand_array={},x_mult_gain=0.8}},
270 | pos = {x=9,y=1},
271 | atlas = "MTLJoker"
272 | },
273 | j_cherry = {
274 | order = 0,
275 | unlocked = true,
276 | discovered = true,
277 | blueprint_compat = true,
278 | eternal_compat = false,
279 | rarity = 1,
280 | cost = 4,
281 | name = "Cherry",
282 | set = "Joker",
283 | config = {extra={mult_gain=2,pairs_discarded=0,hands_limit=12}},
284 | pos = {x=2,y=0},
285 | atlas = "MTLJoker"
286 | },
287 | j_cafeg = {
288 | order = 0,
289 | unlocked = true,
290 | discovered = true,
291 | blueprint_compat = true,
292 | eternal_compat = false,
293 | rarity = 1,
294 | cost = 4,
295 | name = "Café Gourmand",
296 | set = "Joker",
297 | config = {extra= {chips=80,n=3}},
298 | pos = {x=8,y=1},
299 | atlas = "MTLJoker"
300 | },
301 | j_pimpbus= {
302 | order = 0,
303 | unlocked = true,
304 | discovered = true,
305 | blueprint_compat = true,
306 | eternal_compat = true,
307 | rarity = 2,
308 | cost = 6,
309 | name = "Pimp The Bus",
310 | set = "Joker",
311 | config = {extra= {x_mult_gain=0.1}},
312 | pos = {x=7,y=1},
313 | atlas = "MTLJoker"
314 | },
315 | j_selfpaint= {
316 | order = 0,
317 | unlocked = true,
318 | discovered = true,
319 | blueprint_compat = false,
320 | eternal_compat = true,
321 | rarity = 2,
322 | cost = 6,
323 | name = "Self Portrait",
324 | set = "Joker",
325 | config = {extra= {}},
326 | pos = {x=8,y=2},
327 | atlas = "MTLJoker"
328 | },
329 | j_matry = {
330 | order = 0,
331 | unlocked = true,
332 | discovered = true,
333 | blueprint_compat = true,
334 | eternal_compat = true,
335 | rarity = 1,
336 | cost = 5,
337 | name = "Matryoshka",
338 | set = "Joker",
339 | config = {extra={chips=30,size_list={}}},
340 | pos = {x=2,y=1},
341 | atlas = "MTLJoker"
342 | },
343 | -- j_mathurine = {
344 | -- order = 6,
345 | -- unlocked = true,
346 | -- discovered = true,
347 | -- blueprint_compat = true,
348 | -- eternal_compat = true,
349 | -- rarity = 4,
350 | -- cost = 15,
351 | -- name = "Mathurine",
352 | -- set = "Joker",
353 | -- config = {extra={already_moved=false}},
354 | -- pos = {x=6,y=1},
355 | -- atlas = "MTLJoker"
356 | -- },
357 | j_trick = {
358 | order = 5,
359 | unlocked = true,
360 | discovered = true,
361 | blueprint_compat = true,
362 | eternal_compat = true,
363 | rarity = 3,
364 | cost = 8,
365 | name = "Trick or Treat",
366 | set = "Joker",
367 | config = {extra={x_mult_gain=1}},
368 | pos = { x = 9, y = 0 },
369 | atlas = "MTLJoker"
370 | },
371 | -- j_13 = {
372 | -- order = 3,
373 | -- unlocked = true,
374 | -- discovered = true,
375 | -- blueprint_compat = true,
376 | -- eternal_compat = true,
377 | -- rarity = 3,
378 | -- cost = 8,
379 | -- name = "Number 13",
380 | -- set = "Joker",
381 | -- config = {},
382 | -- pos = { x = 1, y = 1 },
383 | -- atlas = "MTLJoker"}
384 | -- ,
385 | j_fabric = {
386 | order = 3,
387 | unlocked = true,
388 | discovered = true,
389 | blueprint_compat = false,
390 | eternal_compat = true,
391 | rarity = 3,
392 | cost = 8,
393 | name = "Fabric Design",
394 | set = "Joker",
395 | config = {extra={added_to_deck=false}},
396 | pos = { x = 7, y = 2 },
397 | atlas = "MTLJoker"
398 | },
399 | j_open = {
400 | order = 0,
401 | unlocked = true,
402 | discovered = true,
403 | blueprint_compat = true,
404 | eternal_compat = true,
405 | rarity = 2,
406 | cost = 6,
407 | name = "Grand Slam",
408 | set = "Joker",
409 | config = {extra={xmult_gain=0.5,played_suits={},n_played_suits=0}},
410 | pos = {x=8,y=0},
411 | atlas = "MTLJoker"
412 | },
413 | j_thedream = {
414 | order = 0,
415 | unlocked = true,
416 | discovered = true,
417 | blueprint_compat = true,
418 | eternal_compat = true,
419 | rarity = 3,
420 | cost = 8,
421 | name = "The Dream",
422 | set = "Joker",
423 | config = {extra={}},
424 | pos = {x=0,y=3},
425 | atlas = "MTLJoker"
426 | },
427 | j_ishihara = {
428 | order = 0,
429 | unlocked = true,
430 | discovered = true,
431 | blueprint_compat = false,
432 | eternal_compat = true,
433 | rarity = 1,
434 | cost = 5,
435 | name = "Ishihara Test",
436 | set = "Joker",
437 | config = {extra={}},
438 | pos = {x=9,y=2},
439 | atlas = "MTLJoker"
440 | },
441 | j_scopedog = {
442 | order = 0,
443 | unlocked = true,
444 | discovered = true,
445 | blueprint_compat = false,
446 | eternal_compat = true,
447 | rarity = 2,
448 | cost = 6,
449 | name = "Scopedog",
450 | set = "Joker",
451 | config = {extra={}},
452 | pos = {x=5,y=0},
453 | atlas = "MTLJoker"
454 | },
455 | }
456 |
457 | -- Add Jokers to center and rarity ppools
458 | for k, v in pairs(mtlJokers) do
459 | v.key = k
460 | v.order = table_length(G.P_CENTER_POOLS['Joker']) + 1
461 | G.P_CENTERS[k] = v
462 | table.insert(G.P_CENTER_POOLS['Joker'], v)
463 | table.insert(G.P_JOKER_RARITY_POOLS[v.rarity], v)
464 | end
465 |
466 | table.sort(G.P_CENTER_POOLS["Joker"], function (a, b) return a.order < b.order end)
467 |
468 | -- Localization
469 | local jokerLocalization = {
470 |
471 | j_jazztrio = {
472 | name = "Jazz Trio",
473 | text = {
474 | "When played hand contains",
475 | "a scoring {C:attention}Jack{}, {C:attention}Queen{} and {C:attention}King{},",
476 | "upgrade {C:attention}2{} random {C:attention}Poker Hands{}"
477 | }
478 | },
479 | j_bikini = {
480 | name = "Tiger Bikini",
481 | text = {
482 | "{C:red}+#1#{} Mult for each",
483 | "{C:hearts}hearts{} card above {C:attention}#2#{}",
484 | "in your full deck",
485 | "{C:inactive}(Currently {C:red}+#3#{C:inactive} Mult)"
486 | }
487 | },
488 | j_cherry = {
489 | name = "Cherry",
490 | text = {
491 | "Gains {C:red}+#1#{} Mult whenever a pair",
492 | "is discarded. Destroyed",
493 | "after #3# pairs discarded",
494 | "{C:inactive}(Currently: {C:red}+#2#{} Mult){}"
495 |
496 | }
497 | },
498 | j_subway = {
499 | name = "Subway Map",
500 | text = {
501 | "Gains {C:red}+#1#{} Mult if played hand",
502 | "contains the highest {C:attention}Straight{} so far.",
503 | "{C:inactsive}(Highest rank: #3#){}",
504 | "{C:inactive}(Currently: +#2#){}",
505 | }
506 | },
507 | j_13 = {
508 | name = "Number 13",
509 | text = {
510 | "When any {C:attention}Glass Card{} breaks",
511 | "add one {C:attention}Glass Rank 13{}",
512 | "card to your deck"
513 | }
514 | },
515 | j_snecko = {
516 | name = "Snecko Eye",
517 | text = {
518 | "The ranks of first drawn cards",
519 | "each round are permanently randomized.",
520 | }
521 | },
522 | j_trick = {
523 | name = "Trick or Treat",
524 | text = {
525 | "Gains {X:mult,C:white}x#1#{} Mult for each",
526 | "{C:spectral}Spectral{} card used",
527 | "{C:inactive}(Currently {X:mult,C:white}x#2#{}){}"
528 | }
529 | },
530 | j_mathurine = {
531 | name = "Mathurine",
532 | text = {
533 | "{C:attention}Pins{} all jokers and copies",
534 | "ability of joker to the right thrice.",
535 | "Each time a hand is played, move {C:dark_edition}Mathurine{}",
536 | "one step to the right.",
537 | }
538 | },
539 | j_sealbouquet = {
540 | name = "Seal Bouquet",
541 | text = {
542 | "If first card of a {C:clubs}Spades{} flush",
543 | "contains a {C:attention}seal{}, add a random {C:attention}seal{}",
544 | "to another random card."
545 | }
546 | },
547 | j_mixtape = {
548 | name = "Mixtape",
549 | text = {
550 | "Gain {C:money}$#1#{} at the end of round for each",
551 | "enchanced {C:clubs}Clubs{} card in your deck.",
552 | "(Currently {C:money}$#2#{})",
553 | }
554 | },
555 | j_flamingo = {
556 | name = "Flamingo",
557 | text = {
558 | "When played, {C:diamonds}Diamonds{} cards",
559 | "have {C:green}#1# in #2#{} chance",
560 | "to become {C:dark_edition}polychrome{}.",
561 | }
562 | },
563 | j_voodoo = {
564 | name = "Voodoo Doll",
565 | text = {
566 | "{X:mult,C:white}X#1# {} Mult",
567 | "for each unique played rank",
568 | "already played this round.",
569 | "(Played ranks: {C:attention}#2#{})"
570 |
571 | }
572 | },
573 | j_sliding = {
574 | name = "Sliding Joker",
575 | text = {
576 | "Gains {C:red}+#1#{} Mult for each hand containing a {C:attention}Flush{}.",
577 | "Gains {C:chips}+#2#{} Chips for each hand containing a {C:attention}Straight{}.",
578 | "Resets at the end of each ante.",
579 | "(Currently: {C:red}+#3#{} Mult, {C:chips}+#4#{} Chips)"
580 | }
581 | },
582 | j_claw = {
583 | name = "Claw",
584 | text = {
585 | "When any {C:attention}3{} is played, permanently give",
586 | "{C:chips}+#1#{} chips to ALL 3s in the deck."
587 | }
588 | },
589 | j_matry = {
590 | name = "Matryoshka",
591 | text = {
592 | "{C:blue}+#1#{} chips for each unique",
593 | "scoring hand size played this round"
594 | }
595 | },
596 | j_3776 = {
597 | name = "3776",
598 | text = {
599 | "Each played {C:attention}3{},",
600 | "{C:attention}6{} or {C:attention}7{}, gives",
601 | "{C:mult}+#1#{} Mult when scored",
602 | "Retrigger all {C:attention}7{} "
603 | }
604 | },
605 | j_pampa = {
606 | name = "Pampa",
607 | text = {
608 | "Gain {C:money}$#1#{} at the end of round.",
609 | "{C:green}#2# in #3#{} chance this",
610 | "card is destroyed",
611 | "at end of round"
612 | }
613 | },
614 | j_bell = {
615 | name = "Bell Curve",
616 | text = {
617 | "Enhance one random card",
618 | "into a {C:attention}Lucky Card{} when",
619 | "first hand is drawn",
620 | }
621 | },
622 | j_moon = {
623 | name = "Moon Rabbit",
624 | text = {
625 | "{C:green}#1# in #2#{} chance",
626 | "to generate a copy of {C:attention}The Fool{}",
627 | "when a hand containing a {C:attention}Full House{} is played"
628 | }
629 | },
630 | j_mahjong = {
631 | name = "Mahjong Joker",
632 | text = {
633 | "Gains {X:mult,C:white} X#1# {} Mult for",
634 | "every #2# hands containing",
635 | "{C:attention}Three of a Kind{}",
636 | "{C:inactive}(#3#/#2#){}",
637 | "{C:inactive}(Currently {X:mult,C:white} X#4# {C:inactive} Mult)"
638 | }
639 | },
640 | j_blackstar = {
641 | name = "Black Star",
642 | text = {
643 | "Prevents death once.",
644 | "Destroy all jokers and replace them",
645 | "with 2 random rare jokers."
646 | }
647 | },
648 | j_cafeg = {
649 | name = "Café Gourmand",
650 | text = {
651 | "{C:chips}+#1#{} chips",
652 | "if hand has been played",
653 | "#2# times or less."
654 | }
655 | },
656 | j_konbini = {
657 | name = "Konbini",
658 | text = {
659 | "Gains {C:mult}+#1#{} mult",
660 | "per unique {C:tarot}Tarot{}",
661 | "card used this run",
662 | "{C:inactive}(Currently {C:mult}+#2#{}){}"
663 | }
664 | },
665 |
666 | j_fabric = {
667 | name = "Fabric Design",
668 | text = {
669 | "When {C:attention}Blind{} is selected",
670 | "lose all {C:red}Discards{} and apply a random ",
671 | "{C:attention}enhancement{} to all cards in the deck.",
672 | "When removed, turn all cards back to normal."
673 | }
674 | },
675 | j_selfpaint = {
676 | name = "Self Portrait",
677 | text = {
678 | "First unscoring face card turns",
679 | "into a random non-face rank."
680 | }
681 | },
682 | j_pimpbus = {
683 | name = "Pimp The Bus",
684 | text = {
685 | "Gains {X:mult,C:white}x#1#{} Mult",
686 | "for each consecutive scoring hand",
687 | "with at least one",
688 | "enhancement, edition or seal",
689 | "{C:inactive}(Currently {X:mult,C:white}x#2#{}){}"
690 | }
691 | },
692 | j_open = {
693 | name = "Grand Slam",
694 | text = {
695 | "{X:mult,C:white}x#1#{} Mult for each",
696 | "unique flush suit played this round ",
697 | "{C:inactive}(Played suits: #3# ){}",
698 | "{C:inactive}(Currently {X:mult,C:white}x#2#{} Mult){}"
699 | }
700 | },
701 | j_thedream = {
702 | name = "The Dream",
703 | text = {
704 | "{C:attention}Level Up{} secret poker hands",
705 | "when played"
706 | }
707 | },
708 | j_ishihara = {
709 | name = "Ishihara Test",
710 | text = {
711 | "All {C:attention}9{} and {C:attention}6{} become",
712 | "{C:attention}Wild{} cards when played."
713 | }
714 | },
715 | j_scopedog = {
716 | name = "Scopedog",
717 | text = {
718 | "Playing a hand containing an",
719 | "{C:attention}Aces Three of a Kind{}",
720 | "disables the {C:attention}Boss Blind{}"
721 | }
722 | }
723 | }
724 |
725 |
726 | for k, v in pairs(jokerLocalization) do
727 | G.localization.descriptions.Joker[k] = v
728 | end
729 |
730 | -- Update localization
731 | for g_k, group in pairs(G.localization) do
732 | if g_k == 'descriptions' then
733 | for _, set in pairs(group) do
734 | for _, center in pairs(set) do
735 | center.text_parsed = {}
736 | for _, line in ipairs(center.text) do
737 | center.text_parsed[#center.text_parsed + 1] = loc_parse_string(line)
738 | end
739 | center.name_parsed = {}
740 | for _, line in ipairs(type(center.name) == 'table' and center.name or { center.name }) do
741 | center.name_parsed[#center.name_parsed + 1] = loc_parse_string(line)
742 | end
743 | if center.unlock then
744 | center.unlock_parsed = {}
745 | for _, line in ipairs(center.unlock) do
746 | center.unlock_parsed[#center.unlock_parsed + 1] = loc_parse_string(line)
747 | end
748 | end
749 | end
750 | end
751 | end
752 | end
753 |
754 | -- Add Joker sprites
755 | local mtl_jkr_mod = SMODS.findModByID("mtl_jkr")
756 | local sprite_mtl = SMODS.Sprite:new("MTLJoker", mtl_jkr_mod.path, "Jokers_mtl.png", 71, 95, "asset_atli")
757 | sprite_mtl:register()
758 |
759 |
760 | -- Add Rank 13
761 | -- This rank can only be created by the joker Number 13
762 | -- Note: Suffix B will be picked by the function, for instance 13 of heart will be called "H_B"
763 | -- local cards_rank13 = SMODS.Sprite:new('cards_rank13', mtl_jkr_mod.path, 'cards_rank13.png', 71, 95, 'asset_atli')
764 | -- local cards_rank13_opt2 = SMODS.Sprite:new('cards_rank13_opt2', mtl_jkr_mod.path, 'cards_rank13_opt2.png', 71, 95, 'asset_atli')
765 | -- cards_rank13:register()
766 | -- cards_rank13_opt2:register()
767 | -- SMODS.Card:new_rank('13', 13, 'cards_rank13', 'cards_rank13_opt2', { x = 0 }, {
768 | -- Hearts = { y = 0 },
769 | -- Clubs = { y = 1 },
770 | -- Diamonds = { y = 2 },
771 | -- Spades = { y = 3 }
772 | -- }, {
773 | -- next= {},
774 | -- strength_effect = { ignore = true }
775 | -- })
776 |
777 |
778 | end
779 |
780 |
781 |
782 |
783 |
784 | ---------------------
785 | -- Joker abilities --
786 | ---------------------
787 | local set_abilityref = Card.set_ability
788 | function Card.set_ability(self, center, initial, delay_sprites)
789 | set_abilityref(self, center, initial, delay_sprites)
790 |
791 | if self.ability.name == "Tiger Bikini" then
792 | self:set_sprites(center)
793 | elseif self.ability.name == "Subway Map" then
794 | self:set_sprites(center)
795 | elseif self.ability.name == "Cherry" then
796 | self:set_sprites(center)
797 | elseif self.ability.name == "Jazz Trio" then
798 | self:set_sprites(center)
799 | elseif self.ability.name == "Number 13" then
800 | self:set_sprites(center)
801 | elseif self.ability.name == "Snecko Eye" then
802 | self:set_sprites(center)
803 | elseif self.ability.name == "Trick or Treat" then
804 | self:set_sprites(center)
805 | elseif self.ability.name == "Mathurine" then
806 | self:set_sprites(center)
807 | elseif self.ability.name == "Mixtape" then
808 | self:set_sprites(center)
809 | elseif self.ability.name == "Seal Bouquet" then
810 | self:set_sprites(center)
811 | elseif self.ability.name == "Flamingo" then
812 | self:set_sprites(center)
813 | elseif self.ability.name == "Voodoo Doll" then
814 | self:set_sprites(center)
815 | elseif self.ability.name == "Sliding Joker" then
816 | self:set_sprites(center)
817 | elseif self.ability.name == "Claw" then
818 | self:set_sprites(center)
819 | elseif self.ability.name == "Matryoshka" then
820 | self:set_sprites(center)
821 | elseif self.ability.name == "Cherry" then
822 | self:set_sprites(center)
823 | elseif self.ability.name == "Café Gourmand" then
824 | self:set_sprites(center)
825 | elseif self.ability.name == "Mahjong Joker" then
826 | self:set_sprites(center)
827 | elseif self.ability.name == "Black Star" then
828 | self:set_sprites(center)
829 | elseif self.ability.name == "Grand Slam" then
830 | self:set_sprites(center)
831 | elseif self.ability.name == "Moon Rabbit" then
832 | self:set_sprites(center)
833 | elseif self.ability.name == "Bell Curve" then
834 | self:set_sprites(center)
835 | elseif self.ability.name == "Konbini" then
836 | self:set_sprites(center)
837 | elseif self.ability.name == "3776" then
838 | self:set_sprites(center)
839 | elseif self.ability.name == "Pampa" then
840 | self:set_sprites(center)
841 | elseif self.ability.name == "Pimp The Bus" then
842 | self:set_sprites(center)
843 | elseif self.ability.name == "The Dream" then
844 | self:set_sprites(center)
845 | end
846 | end
847 |
848 |
849 |
850 |
851 | local calculate_jokerref = Card.calculate_joker
852 | function Card.calculate_joker(self, context)
853 | local calc_ref = calculate_jokerref(self, context)
854 | if self.ability.set == "Joker" and not self.debuff then
855 | if context.open_booster then
856 | elseif context.buying_card then
857 | elseif context.selling_self then
858 | elseif context.selling_card then
859 | elseif context.reroll_shop then
860 | elseif context.ending_shop then
861 | elseif context.skip_blind then
862 | elseif context.skipping_booster then
863 | elseif context.playing_card_added and not self.getting_sliced then
864 | elseif context.first_hand_drawn then
865 | if self.ability.name == 'Snecko Eye' and not context.blueprint then
866 | sendDebugMessage("subsequent hand drawn")
867 | -- Check if a hand or a discard was played
868 | G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.4, func = function()
869 | play_sound('tarot1')
870 | return true end }))
871 |
872 | for i=1, #G.hand.cards do
873 | local percent = 1.15 - (i-0.999)/(#G.hand.cards-0.998)*0.3
874 | G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.4,func = function() G.hand.cards[i]:flip();play_sound('card1', percent);G.hand.cards[i]:juice_up(0.3, 0.3);return true end }))
875 | end
876 |
877 | delay(0.5)
878 |
879 | G.E_MANAGER:add_event(Event({
880 | func = function()
881 | for i=1, #G.hand.cards do
882 | local _rank = pseudorandom_element({'2','3','4','5','6','7','8','9','T','J','Q','K','A'}, pseudoseed('ouija'))
883 | local card = G.hand.cards[i]
884 | local suit_prefix = string.sub(card.base.suit, 1, 1)..'_'
885 | local rank_suffix =_rank
886 | card:set_base(G.P_CARDS[suit_prefix..rank_suffix])
887 | end
888 | G.hand:sort()
889 | return true
890 | end}))
891 |
892 | for i=1, #G.hand.cards do
893 | local percent = 0.85 + (i-0.999)/(#G.hand.cards-0.998)*0.3
894 | G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.4,func = function() G.hand.cards[i]:flip();play_sound('tarot2', percent, 0.6);G.hand.cards[i]:juice_up(0.3, 0.3);return true end }))
895 | end
896 | delay(0.5)
897 | elseif self.ability.name == 'Bell Curve' then
898 | G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.4, func = function()
899 | sendDebugMessage(#G.hand.cards)
900 | --get non-enchanced cards in hand
901 | local non_enh_list={}
902 | for i=1, #G.hand.cards do
903 | if G.hand.cards[i].config.center == G.P_CENTERS.c_base then table.insert(non_enh_list,G.hand.cards[i]) end
904 | end
905 | if #non_enh_list>0 then
906 | enhanced_card = pseudorandom_element(non_enh_list, pseudoseed('bellcurve'))
907 | enhanced_card:set_ability(G.P_CENTERS.m_lucky , nil, true)
908 | play_sound('tarot1')
909 | enhanced_card:juice_up()
910 | end
911 | return true
912 | end
913 | }))
914 | elseif self.ability.name == 'Fabric Design' then
915 | self.ability.extra.added_to_deck = true --not the right place for this but eh
916 | G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.4, func = function()
917 | play_sound('tarot1')
918 | return true end }))
919 | for i=1, #G.hand.cards do
920 | local percent = 1.15 - (i-0.999)/(#G.hand.cards-0.998)*0.3
921 | G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.4,func = function() G.hand.cards[i]:flip();play_sound('card1', percent);G.hand.cards[i]:juice_up(0.3, 0.3);return true end }))
922 | end
923 |
924 | delay(0.5)
925 | G.E_MANAGER:add_event(Event({
926 | func = function()
927 | for i=1, #G.playing_cards do
928 | local card = G.playing_cards[i]
929 | local cen_pool = {}
930 | for k, v in pairs(G.P_CENTER_POOLS["Enhanced"]) do
931 | cen_pool[#cen_pool+1] = v
932 | end
933 | center = pseudorandom_element(cen_pool, pseudoseed('spe_card'))
934 |
935 | card:set_ability(center, nil, true)
936 | end
937 | return true
938 | end}))
939 |
940 | for i=1, #G.hand.cards do
941 | local percent = 0.85 + (i-0.999)/(#G.hand.cards-0.998)*0.3
942 | G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.4,func = function() G.hand.cards[i]:flip();play_sound('tarot2', percent, 0.6);G.hand.cards[i]:juice_up(0.3, 0.3);return true end }))
943 | end
944 | delay(0.5)
945 |
946 |
947 | end
948 | elseif context.setting_blind and not self.getting_sliced then
949 | if self.ability.name == 'Fabric Design' and not (context.blueprint_card or self).getting_sliced then
950 | G.E_MANAGER:add_event(Event({func = function()
951 | ease_discard(-G.GAME.current_round.discards_left, nil, true)
952 | return true end }))
953 | end
954 | elseif context.destroying_card then
955 |
956 | elseif context.cards_destroyed then
957 | -- if self.ability.name == 'Number 13' then
958 | -- --count number of cards destroyed
959 | -- local glasses = 0
960 | -- for k, v in ipairs(context.glass_shattered) do
961 | -- if v.shattered then
962 | -- glasses = glasses + 1
963 | -- end
964 | -- end
965 | -- sendDebugMessage("entering cards_destroyed")
966 | -- sendDebugMessage(glasses)
967 | -- -- Create card(s) - CAN be blueprinted
968 | -- if glasses > 0 then
969 | -- for i=1, glasses do
970 | -- sendDebugMessage("create card")
971 | -- G.deck.config.card_limit = G.deck.config.card_limit + 1
972 | -- G.E_MANAGER:add_event(Event({
973 | -- func = function()
974 | -- _suit = pseudorandom_element({'S','H','D','C'}, pseudoseed('13_create'))
975 | -- local _card = create_playing_card({front = G.P_CARDS[_suit..'_'..'B'], center = G.P_CENTERS.m_glass}, G.hand)
976 | -- if context.blueprint_card then context.blueprint_card:juice_up() else self:juice_up() end
977 | -- return true
978 | -- end}))
979 | -- end
980 | -- end
981 |
982 | -- return {
983 | -- message = localize('k_copied_ex'),
984 | -- colour = G.C.CHIPS,
985 | -- card = self,
986 | -- playing_cards_created = {true}
987 | -- }
988 | -- end
989 | elseif context.remove_playing_cards then
990 | if self.ability.name == 'Number 13' then
991 | --count number of cards destroyed
992 | local glasses = 0
993 | for k, val in ipairs(context.removed) do
994 | if val.shattered then glasses = glasses + 1 end
995 | end
996 | sendDebugMessage("entering cards_removed")
997 | sendDebugMessage(glasses)
998 | -- Create card(s) - CAN be blueprinted
999 | if glasses > 0 then
1000 | for i=1, glasses do
1001 | sendDebugMessage("create card")
1002 | G.deck.config.card_limit = G.deck.config.card_limit + 1
1003 | G.E_MANAGER:add_event(Event({
1004 | func = function()
1005 | _suit = pseudorandom_element({'S','H','D','C'}, pseudoseed('13_create'))
1006 | local _card = create_playing_card({front = G.P_CARDS[_suit..'_'..'B'], center = G.P_CENTERS.m_glass}, G.hand)
1007 | if context.blueprint_card then context.blueprint_card:juice_up() else self:juice_up() end
1008 | return true
1009 | end}))
1010 | end
1011 | end
1012 |
1013 | return
1014 | end
1015 | elseif context.using_consumeable then
1016 | -- if self.ability.name == 'Number 13' and not context.blueprint and context.consumeable.ability.name == 'The Hanged Man' then
1017 | -- --count number of cards destroyed
1018 | -- local glasses = 0
1019 | -- if not context.blueprint then
1020 | -- for k, val in ipairs(G.hand.highlighted) do
1021 | -- if val.ability.name == 'Glass Card' then glasses = glasses + 1 end
1022 | -- end
1023 | -- end
1024 | -- sendDebugMessage("ok")
1025 | -- sendDebugMessage(glasses)
1026 | -- -- Create card(s) - CAN be blueprinted
1027 | -- if glasses > 0 then
1028 | -- for i=1, glasses do
1029 | -- sendDebugMessage("create card")
1030 | -- G.deck.config.card_limit = G.deck.config.card_limit + 1
1031 | -- G.E_MANAGER:add_event(Event({
1032 | -- func = function()
1033 | -- _suit = pseudorandom_element({'S','H','D','C'}, pseudoseed('13_create'))
1034 | -- local _card = create_playing_card({front = G.P_CARDS[_suit..'_'..'B'], center = G.P_CENTERS.m_glass}, G.hand)
1035 | -- if context.blueprint_card then context.blueprint_card:juice_up() else self:juice_up() end
1036 | -- return true
1037 | -- end}))
1038 | -- end
1039 | -- end
1040 |
1041 | -- return
1042 | -- end
1043 | elseif context.debuffed_hand then
1044 | elseif context.pre_discard then
1045 | if self.ability.name == 'Cherry' then
1046 | local text,disp_text = G.FUNCS.get_poker_hand_info(G.hand.highlighted)
1047 | if text=="Pair" then
1048 | self.ability.extra.pairs_discarded=self.ability.extra.pairs_discarded+1
1049 | if (self.ability.extra.hands_limit-self.ability.extra.pairs_discarded) <= 0 then
1050 | G.E_MANAGER:add_event(Event({
1051 | func = function()
1052 | play_sound('tarot1')
1053 | self.T.r = -0.2
1054 | self:juice_up(0.3, 0.4)
1055 | self.states.drag.is = true
1056 | self.children.center.pinch.x = true
1057 | G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.3, blockable = false,
1058 | func = function()
1059 | G.jokers:remove_card(self)
1060 | self:remove()
1061 | self = nil
1062 | return true; end}))
1063 | return true
1064 | end
1065 | }))
1066 | return {
1067 | message = localize('k_eaten_ex'),
1068 | colour = G.C.FILTER
1069 | }
1070 | else
1071 | card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_upgrade_ex')})
1072 | end
1073 |
1074 | end
1075 |
1076 | end
1077 | elseif context.discard then
1078 | elseif context.end_of_round then
1079 | if context.individual then
1080 | elseif context.repetition then
1081 |
1082 | elseif not context.blueprint then
1083 | if self.ability.name == 'Grand Slam' then
1084 | self.ability.extra.n_played_suits=0
1085 | self.ability.extra.played_suits={}
1086 | end
1087 | if self.ability.name == 'Voodoo Doll' then
1088 | self.ability.extra.hand_array={}
1089 | self.ability.extra.hand=""
1090 | end
1091 | if self.ability.name == 'Pampa' then
1092 | if pseudorandom('Pampa') < G.GAME.probabilities.normal/self.ability.extra.odds then
1093 | G.E_MANAGER:add_event(Event({
1094 | func = function()
1095 | play_sound('tarot1')
1096 | self.T.r = -0.2
1097 | self:juice_up(0.3, 0.4)
1098 | self.states.drag.is = true
1099 | self.children.center.pinch.x = true
1100 | G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.3, blockable = false,
1101 | func = function()
1102 | G.jokers:remove_card(self)
1103 | self:remove()
1104 | self = nil
1105 | return true; end}))
1106 | return true
1107 | end
1108 | }))
1109 | return {
1110 | message = localize('pampa_bye')
1111 | }
1112 | else
1113 | return {
1114 | message = localize('k_safe_ex')
1115 | }
1116 | end
1117 | elseif self.ability.name == 'Sliding Joker' and G.GAME.blind.boss then
1118 | self.ability.extra.mult = 0
1119 | self.ability.extra.chips = 0
1120 | return {
1121 | message = localize('k_reset'),
1122 | colour = G.C.RED
1123 | }
1124 | elseif self.ability.name == 'Black Star' and context.game_over then
1125 | G.E_MANAGER:add_event(Event({
1126 | func = function()
1127 | G.hand_text_area.blind_chips:juice_up()
1128 | G.hand_text_area.game_chips:juice_up()
1129 |
1130 | --First remove all jokers and keep track of rarity, and edition and eternals
1131 | play_sound('tarot1')
1132 | n_jokers=#G.jokers.cards
1133 | local n_eternal=0
1134 | local n_negative=0
1135 | for i = 1, n_jokers do
1136 | --Check if the joker is eternal
1137 | if (G.jokers.cards[i].ability.eternal) then
1138 | n_eternal=n_eternal+1
1139 | else
1140 | G.jokers.cards[i]:start_dissolve()
1141 | end
1142 | end
1143 |
1144 | for i = 1, 2 do
1145 | if ((i + n_eternal) <= (G.jokers.config.card_limit)) then
1146 | --create new rare jokers
1147 | play_sound('timpani')
1148 | --local card = create_card('Joker', G.jokers, False, nil, nil, nil, nil, True and 'jud' or 'sou')
1149 | local card = create_card('Joker', G.jokers, nil, 0.99, nil, nil, nil, 'wra')
1150 | card:add_to_deck()
1151 | G.jokers:emplace(card)
1152 | end
1153 | end
1154 | return true
1155 | end
1156 | }))
1157 | return {
1158 | message = localize('k_saved_ex'),
1159 | saved = true,
1160 | colour = G.C.RED
1161 | }
1162 | end
1163 |
1164 | end
1165 | elseif context.repetition then
1166 | if context.cardarea == G.play then
1167 | if self.ability.name == '3776' and (
1168 | context.other_card:get_id() == 7) then
1169 | return {
1170 | message = localize('k_again_ex'),
1171 | repetitions = self.ability.extra.repetitions,
1172 | card = self
1173 | }
1174 | end
1175 | end
1176 | elseif context.other_joker then
1177 | elseif context.adding_to_deck then
1178 | elseif context.individual then
1179 | if context.cardarea == G.play then
1180 | -- if self.ability.name == 'Fibonacci' and (
1181 | -- context.other_card:get_id() == 2 or
1182 | -- context.other_card:get_id() == 3 or
1183 | -- context.other_card:get_id() == 5 or
1184 | -- context.other_card:get_id() == 8 or
1185 | -- context.other_card:get_id() == 14 or
1186 | -- context.other_card:get_id() == 15) then
1187 | -- return {
1188 | -- mult = self.ability.extra,
1189 | -- card = self
1190 | -- }
1191 | -- end
1192 | -- if self.ability.name == 'Odd Todd' and
1193 | -- ((context.other_card:get_id() <= 10 and
1194 | -- context.other_card:get_id() >= 0 and
1195 | -- context.other_card:get_id()%2 == 1) or
1196 | -- (context.other_card:get_id() == 14) or
1197 | -- (context.other_card:get_id() == 15))
1198 | -- then
1199 | -- return {
1200 | -- chips = self.ability.extra,
1201 | -- card = self
1202 | -- }
1203 | -- end
1204 | if self.ability.name == '3776' and (
1205 | context.other_card:get_id() == 3 or
1206 | context.other_card:get_id() == 7 or
1207 | context.other_card:get_id() == 6) then
1208 | return {
1209 | mult = self.ability.extra.mult,
1210 | card = self
1211 | }
1212 | end
1213 | if self.ability.name == 'Claw' then
1214 | if context.other_card:get_id() == 3 then
1215 | --loop on all cards
1216 | for k, v in pairs(G.playing_cards) do
1217 | if v:get_id() == 3 then
1218 | v.ability.perma_bonus = v.ability.perma_bonus or 0
1219 | v.ability.perma_bonus = v.ability.perma_bonus + self.ability.extra.chip_gain
1220 | end
1221 | end
1222 |
1223 | return {
1224 | extra = {message = localize('k_upgrade_ex_claw'), colour = G.C.CHIPS},
1225 | colour = G.C.CHIPS,
1226 | card = self
1227 | }
1228 | end
1229 | end
1230 | end
1231 | else
1232 | if context.cardarea == G.jokers then
1233 | if context.before then
1234 | if self.ability.name == 'Scopedog' then
1235 | if G.GAME.blind and ((not G.GAME.blind.disabled) and (G.GAME.blind:get_type() == 'Boss')) then
1236 | --check hand
1237 | local aces=0
1238 | for i = 1, #context.scoring_hand do
1239 | if context.scoring_hand[i]:get_id()==14 then
1240 | aces=aces+1
1241 | end
1242 | end
1243 | if aces >2 then
1244 | card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('ph_boss_disabled')})
1245 | G.GAME.blind:disable()
1246 | end
1247 |
1248 | end
1249 | end
1250 | if self.ability.name == 'Ishihara Test' and not context.blueprint then
1251 | local found_cards = {}
1252 | for k, v in ipairs(context.full_hand) do
1253 | if v:get_id()==6 or v:get_id()==9 then
1254 | found_cards[#found_cards+1] = v
1255 | v:set_ability(G.P_CENTERS.m_wild, nil, true)
1256 | G.E_MANAGER:add_event(Event({
1257 | func = function()
1258 | v:juice_up()
1259 | return true
1260 | end
1261 | }))
1262 | end
1263 | end
1264 | if #found_cards > 0 then
1265 | return {
1266 | colour = G.C.MONEY,
1267 | card = self
1268 | }
1269 | end
1270 | end
1271 | if self.ability.name == 'Mathurine' then
1272 | self.ability.extra.already_moved=false
1273 | end
1274 | if self.ability.name == 'Self Portrait' and not context.blueprint then
1275 | local first_face=true
1276 | for i = 1, #context.full_hand do
1277 | local scoring=false
1278 | if context.full_hand[i]:is_face() then
1279 | --check the card is not scoring
1280 | for j = 1, #context.scoring_hand do
1281 | if (context.scoring_hand[j] == context.full_hand[i]) then
1282 | scoring=true
1283 | end
1284 | end
1285 | if not scoring then --do the effect
1286 | if first_face then
1287 | first_face=false
1288 | local suit_prefix = string.sub(context.full_hand[i].base.suit, 1, 1)..'_'
1289 | local percent = 1.15 - (1-0.999)/(#G.hand.cards-0.998)*0.3
1290 | G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.15,func = function() context.full_hand[i]:flip();play_sound('card1', percent);context.full_hand[i]:juice_up(0.3, 0.3);return true end }))
1291 | delay(0.5)
1292 |
1293 | G.E_MANAGER:add_event(Event({
1294 | func = function()
1295 | local _rank = pseudorandom_element({'2','3','4','5','6','7','8','9','T','A'}, pseudoseed('selfportrait'))
1296 | local rank_suffix =_rank
1297 | context.full_hand[i]:set_base(G.P_CARDS[suit_prefix..rank_suffix])
1298 | return true
1299 | end}))
1300 |
1301 | local percent = 0.85 + (1-0.999)/(#G.hand.cards-0.998)*0.3
1302 | G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.15,func = function() context.full_hand[i]:flip();play_sound('tarot2', percent, 0.6);context.full_hand[i]:juice_up(0.3, 0.3);return true end }))
1303 | end
1304 | end
1305 | end
1306 | end
1307 |
1308 |
1309 | end
1310 |
1311 | if self.ability.name == "The Dream" then
1312 | if next(context.poker_hands["Flush House"]) then
1313 | --level up flush house
1314 | level_up_hand(self, "Flush House", false)
1315 | elseif next(context.poker_hands["Five of a Kind"]) then
1316 | --check if that is also a flush five
1317 | if next(context.poker_hands["Flush Five"]) then
1318 | --level up flush five
1319 | level_up_hand(self, "Flush Five", false)
1320 | else
1321 | --level up 5oak
1322 | level_up_hand(self, "Five of a Kind", false)
1323 | end
1324 | end
1325 | end
1326 |
1327 | if self.ability.name == 'Jazz Trio' then
1328 | -- check if one scoring king, queen and jack are in the played hand
1329 | local has_j = 0
1330 | local has_q = 0
1331 | local has_k = 0
1332 | for i = 1, #context.scoring_hand do
1333 | if context.scoring_hand[i]:get_id() == 11 then has_j=1 end
1334 | if context.scoring_hand[i]:get_id() == 12 then has_q=1 end
1335 | if context.scoring_hand[i]:get_id() == 13 then has_k=1 end
1336 | end
1337 | if has_j==1 and has_q==1 and has_k==1 then
1338 | --Get the current poker hand
1339 | --local k_hand,disp_text = G.FUNCS.get_poker_hand_info(G.hand.highlighted)
1340 | local k_hand,disp_text,poker_hands,scoring_hand,non_loc_disp_text = G.FUNCS.get_poker_hand_info(G.play.cards)
1341 | -- Upgrade two random poker hands
1342 | local possible_hands={}
1343 | -- Check which poker hands can be upgraded
1344 | for k, v in pairs(G.GAME.hands) do
1345 | if G.GAME.hands[k].visible then
1346 | table.insert(possible_hands,k)
1347 | end
1348 | end
1349 | -- Choose two random hands to upgrade (can be the same hand twice)
1350 | for i=1,2 do
1351 | local k_chosen = pseudorandom_element(possible_hands, pseudoseed('jazz'))
1352 | update_hand_text({sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3}, {handname=localize(k_chosen, 'poker_hands'),chips = G.GAME.hands[k_chosen].chips, mult = G.GAME.hands[k_chosen].mult, level=G.GAME.hands[k_chosen].level})
1353 | level_up_hand(self, k_chosen, false)
1354 | update_hand_text({sound = 'button', volume = 0.7, pitch = 0.8, delay = 0.3}, {handname=localize(k_hand, 'poker_hands'),chips = G.GAME.hands[k_hand].chips, mult = G.GAME.hands[k_hand].mult, level=G.GAME.hands[k_hand].level})
1355 | end
1356 | return {
1357 | message = localize('k_level_up_ex')
1358 | }
1359 | end
1360 | elseif self.ability.name == 'Moon Rabbit' and next(context.poker_hands["Full House"]) and (pseudorandom('moonrabbit') < G.GAME.probabilities.normal/self.ability.extra.odds) and #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
1361 | --generate The Fool
1362 | G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
1363 | G.E_MANAGER:add_event(Event({
1364 | func = (function()
1365 | G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.4,
1366 | func = function()
1367 | local card = create_card('Tarot',G.consumeables, nil, nil, nil, nil, 'c_fool', 'car')
1368 | card:add_to_deck()
1369 | G.consumeables:emplace(card)
1370 | G.GAME.consumeable_buffer = 0
1371 | return true
1372 | end}))
1373 | card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_plus_tarot'), colour = G.C.PURPLE})
1374 | return true
1375 | end)}))
1376 | elseif self.ability.name == 'Sliding Joker' and not context.blueprint then
1377 |
1378 | if next(context.poker_hands["Straight Flush"]) then
1379 | self.ability.extra.mult = self.ability.extra.mult + self.ability.extra.mult_gain
1380 | self.ability.extra.chips = self.ability.extra.chips + self.ability.extra.chip_gain
1381 | return {
1382 | message = localize('k_upgrade_ex'),
1383 | card = self
1384 | }
1385 | elseif next(context.poker_hands["Flush"]) then
1386 | self.ability.extra.mult = self.ability.extra.mult + self.ability.extra.mult_gain
1387 | return {
1388 | message = localize('k_upgrade_ex'),
1389 | card = self
1390 | }
1391 | elseif next(context.poker_hands["Straight"]) then
1392 | self.ability.extra.chips = self.ability.extra.chips + self.ability.extra.chip_gain
1393 | return {
1394 | message = localize('k_upgrade_ex'),
1395 | card = self
1396 | }
1397 | end
1398 |
1399 | elseif self.ability.name == 'Seal Bouquet' and next(context.poker_hands["Flush"]) then
1400 | --check if first card is a spade and has a seal
1401 | if context.scoring_hand[1]:is_suit('Spades') and context.scoring_hand[1].seal then
1402 |
1403 | --get a random number from 2 to 5 or 4
1404 | possible_cards={}
1405 | for i = 2, #context.scoring_hand do
1406 | table.insert(possible_cards,i)
1407 | end
1408 | local i_card=pseudorandom_element(possible_cards)
1409 | local seal_type = pseudorandom(pseudoseed('sealbouquet'..G.GAME.round_resets.ante))
1410 | G.E_MANAGER:add_event(Event({
1411 | func = function()
1412 | context.scoring_hand[i_card]:juice_up()
1413 | if seal_type > 0.75 then context.scoring_hand[i_card]:set_seal('Red')
1414 | elseif seal_type > 0.5 then context.scoring_hand[i_card]:set_seal('Blue')
1415 | elseif seal_type > 0.25 then context.scoring_hand[i_card]:set_seal('Gold')
1416 | else context.scoring_hand[i_card]:set_seal('Purple')
1417 | end
1418 | return true
1419 | end
1420 | }))
1421 | return {
1422 | message = localize("b_seals"),
1423 | card = self
1424 | }
1425 | end
1426 | elseif self.ability.name == 'Flamingo' then
1427 | for i = 1, #context.scoring_hand do
1428 | if context.scoring_hand[i]:is_suit('Diamonds') and (pseudorandom('flamingo') < G.GAME.probabilities.normal/self.ability.extra.odds) then
1429 | sendDebugMessage("diamond")
1430 | context.scoring_hand[i]:set_edition({polychrome = true}, true,false)
1431 | end
1432 | end
1433 | elseif self.ability.name == 'Subway Map' and next(context.poker_hands["Straight"]) and not context.blueprint then
1434 | local broadway_check=false
1435 | local rank_table={}
1436 | for i = 1, #context.scoring_hand do
1437 | table.insert(rank_table,context.scoring_hand[i]:get_id())
1438 | if context.scoring_hand[i]:get_id()==11 or context.scoring_hand[i]:get_id()==12 or context.scoring_hand[i]:get_id()==13 then broadway_check=true end
1439 | end
1440 | table.sort(rank_table, function(a,b) return a>b end)
1441 | local highest_rank=rank_table[1]
1442 | if highest_rank==14 and not broadway_check then
1443 | highest_rank=rank_table[2]
1444 | end
1445 | sendDebugMessage("Highest rank "..highest_rank)
1446 |
1447 | sendDebugMessage("previoous rank "..self.ability.extra.hand)
1448 | if (highest_rank> self.ability.extra.hand) then
1449 | self.ability.extra.mult = self.ability.extra.mult + self.ability.extra.mult_gain
1450 | sendDebugMessage("update")
1451 | self.ability.extra.hand=highest_rank
1452 | return {
1453 | message = localize('k_upgrade_ex'),
1454 | colour = G.C.MULT,
1455 | card = self
1456 | }
1457 | end
1458 |
1459 | elseif self.ability.name == "Mahjong Joker" and next(context.poker_hands["Three of a Kind"]) then
1460 | --check the counter
1461 | self.ability.extra.counter=self.ability.extra.counter+1
1462 | if (self.ability.extra.counter == self.ability.extra.frequency) then
1463 | self.ability.extra.counter=0
1464 | self.ability.x_mult=self.ability.x_mult+self.ability.extra.xmult_gain
1465 | G.E_MANAGER:add_event(Event({
1466 | func = function() card_eval_status_text(self, 'extra', nil, nil, nil, {message = localize{type='variable',key='a_xmult',vars={self.ability.x_mult}}}); return true
1467 | end}))
1468 | return
1469 | end
1470 |
1471 |
1472 | elseif self.ability.name == 'Pimp The Bus' and not context.blueprint then
1473 | local enhanced = false
1474 | for i = 1, #context.scoring_hand do
1475 | if context.scoring_hand[i].config.center ~= G.P_CENTERS.c_base then enhanced=true end
1476 | if context.scoring_hand[i].edition then enhanced=true end
1477 | if context.scoring_hand[i].seal then enhanced=true end
1478 | end
1479 | if not enhanced then
1480 | local last_mult = self.ability.x_mult
1481 | self.ability.x_mult = 1
1482 | if last_mult > 1 then
1483 | return {
1484 | card = self,
1485 | message = localize('k_reset')
1486 | }
1487 | end
1488 | else
1489 | self.ability.x_mult = self.ability.x_mult + self.ability.extra.x_mult_gain
1490 | end
1491 | end
1492 |
1493 | elseif context.after then
1494 | if self.ability.name == 'Mathurine' and not self.ability.extra.already_moved then --mathurine moves at the end of round, only once to prevent infinite moving loop
1495 | self.ability.extra.already_moved=true
1496 | G.E_MANAGER:add_event(Event({ func = function()
1497 | for i = 1, #G.jokers.cards do
1498 | G.jokers.cards[i].pinned=false
1499 | end
1500 | local mathurine_pos
1501 | for i = 1, #G.jokers.cards do
1502 | if G.jokers.cards[i].ability.name == 'Mathurine' then mathurine_pos=i end
1503 | end
1504 | if mathurine_pos <#G.jokers.cards then
1505 | G.jokers.cards[mathurine_pos], G.jokers.cards[mathurine_pos+1] = G.jokers.cards[mathurine_pos+1], G.jokers.cards[mathurine_pos]
1506 | else
1507 | G.jokers.cards[mathurine_pos], G.jokers.cards[1] = G.jokers.cards[1], G.jokers.cards[mathurine_pos]
1508 | end
1509 |
1510 | play_sound('cardSlide1', 0.85)
1511 |
1512 | for i = #G.jokers.cards,1,-1 do
1513 | G.jokers.cards[i].pinned=true
1514 | end
1515 | return true
1516 | end }))
1517 |
1518 | end
1519 |
1520 |
1521 |
1522 | else
1523 | if context.cardarea == G.jokers then
1524 | if self.ability.name == 'Tiger Bikini' then
1525 | --Check the number of hearts in the deck
1526 | local heart_number=0
1527 | for k, v in pairs(G.playing_cards) do
1528 | if v:is_suit('Hearts') then heart_number = heart_number+1 end
1529 | end
1530 | sendDebugMessage(heart_number)
1531 | sendDebugMessage(self.ability.extra.threshold)
1532 | if (heart_number > self.ability.extra.threshold) then
1533 | return {
1534 | message = localize{type='variable',key='a_mult',vars={self.ability.extra.mult*(heart_number - self.ability.extra.threshold)}},
1535 | mult_mod = self.ability.extra.mult*(heart_number - self.ability.extra.threshold),
1536 | colour = G.C.MULT
1537 | }
1538 | end
1539 | elseif self.ability.name == 'Konbini' then
1540 | local tarots_used = 0
1541 | for k, v in pairs(G.GAME.consumeable_usage) do
1542 | if v.set == 'Tarot' then tarots_used = tarots_used + 1 end
1543 | end
1544 | if tarots_used == 0 then return end
1545 | return {
1546 | message = localize{type='variable',key='a_mult',vars={self.ability.extra.mult*tarots_used}},
1547 | mult_mod = self.ability.extra.mult*tarots_used,
1548 | colour = G.C.MULT
1549 | }
1550 | elseif self.ability.name == 'Sliding Joker' then
1551 | return {
1552 | message = localize{type='variable',key='sliding_joker',vars={self.ability.extra.mult,self.ability.extra.chips}},
1553 | mult_mod = self.ability.extra.mult,
1554 | chip_mod = self.ability.extra.chips,
1555 | colour = G.C.MULT
1556 | }
1557 | elseif self.ability.name == 'Café Gourmand' then
1558 | if (G.GAME.hands[context.scoring_name].played<(self.ability.extra.n+1)) then
1559 | return {
1560 | message = localize{type='variable',key='a_chips',vars={self.ability.extra.chips}},
1561 | chip_mod = self.ability.extra.chips,
1562 | colour = G.C.CHIPS
1563 | }
1564 | else
1565 | -- Nope !
1566 | return
1567 | end
1568 | elseif self.ability.name == 'Subway Map' then
1569 | return {
1570 | message = localize{type='variable',key='a_mult',vars={self.ability.extra.mult}},
1571 | mult_mod = self.ability.extra.mult,
1572 | colour = G.C.MULT
1573 | }
1574 | elseif self.ability.name == 'Voodoo Doll' then
1575 | local common_ranks={}
1576 | if G.GAME.current_round.hands_played == 0 then --first hand: scoring is not possible
1577 | --reset the round rank array
1578 | self.ability.extra.hand_array={}
1579 | else --scoring is possible
1580 | --Check if played cards are in the rank array
1581 | for i = 1, #context.scoring_hand do
1582 | rank=context.scoring_hand[i]:get_id()
1583 | --loop on ranks played in previous hands
1584 | for j = 1, #self.ability.extra.hand_array do
1585 | if self.ability.extra.hand_array[j] == rank then
1586 | -- before adding the rank to the list of shared ranks, check if this is a duplicate
1587 | local duplicate_flag=false
1588 | for k=1, #common_ranks do
1589 | if common_ranks[k]==rank then duplicate_flag=true end
1590 | end
1591 | if not duplicate_flag then
1592 | table.insert(common_ranks,rank)
1593 | end
1594 | end
1595 | end
1596 | end
1597 | end
1598 |
1599 | -- Then, add played cards to this round rank array
1600 | for i = 1, #context.scoring_hand do
1601 | rank=context.scoring_hand[i]:get_id()
1602 | --check for duplicates already in the array
1603 | local duplicate_flag=false
1604 | for k=1, #self.ability.extra.hand_array do
1605 | if self.ability.extra.hand_array[k]==rank then duplicate_flag=true end
1606 | end
1607 | if not duplicate_flag then
1608 | table.insert(self.ability.extra.hand_array, rank)
1609 | end
1610 | end
1611 |
1612 | -- Update the string self.ability.extra.hand to indicate what ranks were played
1613 | --first sort the ranks
1614 | table.sort(self.ability.extra.hand_array)
1615 | --then convert to string
1616 | self.ability.extra.hand=""
1617 | for i = 1, #self.ability.extra.hand_array do
1618 | if i>1 then self.ability.extra.hand=self.ability.extra.hand .. "-" end
1619 | if (self.ability.extra.hand_array[i]<11) then
1620 | self.ability.extra.hand=self.ability.extra.hand .. tostring(self.ability.extra.hand_array[i])
1621 | elseif (self.ability.extra.hand_array[i]==11) then
1622 | self.ability.extra.hand=self.ability.extra.hand .. "J"
1623 | elseif (self.ability.extra.hand_array[i]==12) then
1624 | self.ability.extra.hand=self.ability.extra.hand .. "Q"
1625 | elseif (self.ability.extra.hand_array[i]==13) then
1626 | self.ability.extra.hand=self.ability.extra.hand .. "K"
1627 | elseif (self.ability.extra.hand_array[i]==14) then
1628 | self.ability.extra.hand=self.ability.extra.hand .. "A"
1629 | end
1630 |
1631 | end
1632 |
1633 | --Finally, send the score using the number of ranks in common_ranks
1634 | return {
1635 | message = localize{type='variable',key='a_xmult',vars={1+(#common_ranks * self.ability.extra.x_mult_gain)}},
1636 | Xmult_mod = 1+(#common_ranks * self.ability.extra.x_mult_gain)
1637 | }
1638 |
1639 | elseif self.ability.name == 'Cherry' then
1640 | return {
1641 | message = localize{type='variable',key='a_mult',vars={self.ability.extra.pairs_discarded*self.ability.extra.mult_gain}},
1642 | mult_mod = self.ability.extra.pairs_discarded*self.ability.extra.mult_gain,
1643 | colour = G.C.MULT
1644 | }
1645 | elseif self.ability.name == 'Grand Slam' then
1646 | if G.GAME.current_round.hands_played == 0 then --first hand: reset
1647 | self.ability.extra.n_played_suits=0
1648 | self.ability.extra.played_suits={}
1649 | end
1650 |
1651 | if next(context.poker_hands["Flush"]) then
1652 | --Get the flush suit
1653 | local suit
1654 | if context.scoring_hand[1]:is_suit('Hearts') then suit="Hearts" end
1655 | if context.scoring_hand[1]:is_suit('Spades') then suit="Spades" end
1656 | if context.scoring_hand[1]:is_suit('Clubs') then suit="Clubs" end
1657 | if context.scoring_hand[1]:is_suit('Diamonds') then suit="Diamonds" end
1658 | --check if suit is in the list
1659 | is_here=false
1660 | for k =1, #self.ability.extra.played_suits do
1661 | if suit == self.ability.extra.played_suits[k] then
1662 | is_here=true
1663 | end
1664 | end
1665 | -- if it's not there, add the suit to the list
1666 | if not is_here then
1667 | table.insert(self.ability.extra.played_suits, suit)
1668 | self.ability.extra.n_played_suits=self.ability.extra.n_played_suits+1
1669 | end
1670 | end
1671 |
1672 | -- compute score using the number of suits in the list
1673 | return {
1674 | message = localize{type='variable',key='a_xmult',vars={math.max(1+self.ability.extra.n_played_suits*self.ability.extra.xmult_gain,1)}},
1675 | Xmult_mod = math.max(1+self.ability.extra.n_played_suits*self.ability.extra.xmult_gain,1)
1676 | }
1677 |
1678 | elseif self.ability.name== "Pimp The Bus" and self.ability.x_mult > 0 then
1679 | return {
1680 | message = localize{type='variable',key='a_xmult',vars={self.ability.x_mult}},
1681 | Xmult_mod = self.ability.x_mult
1682 | }
1683 | elseif self.ability.name == 'Trick or Treat' and G.GAME.consumeable_usage_total and G.GAME.consumeable_usage_total.spectral > 0 then
1684 | return {
1685 | message = localize{type='variable',key='a_xmult',vars={math.max(1,self.ability.x_mult+G.GAME.consumeable_usage_total.spectral*self.ability.extra.x_mult_gain)}},
1686 | Xmult_mod = math.max(1,self.ability.x_mult+G.GAME.consumeable_usage_total.spectral*self.ability.extra.x_mult_gain)
1687 | }
1688 | elseif self.ability.name == 'Matryoshka' then
1689 | if G.GAME.current_round.hands_played == 0 then --first hand: reset
1690 | self.ability.extra.size_list={}
1691 | end
1692 | --get hand size
1693 | local duplicate_flag=false
1694 | for k =1, #self.ability.extra.size_list do
1695 | if #context.scoring_hand == self.ability.extra.size_list[k] then
1696 | duplicate_flag=true
1697 | end
1698 | end
1699 | if not duplicate_flag then
1700 | table.insert(self.ability.extra.size_list, #context.scoring_hand )
1701 | end
1702 | -- compute score using the number of elements in the list
1703 | return {
1704 | message = localize{type='variable',key='a_chips',vars={#self.ability.extra.size_list*self.ability.extra.chips}},
1705 | chip_mod = #self.ability.extra.size_list*self.ability.extra.chips
1706 | }
1707 |
1708 |
1709 | end
1710 | end
1711 | end
1712 | end
1713 | end
1714 | end
1715 |
1716 | return calc_ref
1717 | end
1718 |
1719 |
1720 | local calculate_dollar_bonusref = Card.calculate_dollar_bonus
1721 | function Card:calculate_dollar_bonus()
1722 | local calc_ref = calculate_dollar_bonusref(self)
1723 | if self.debuff then return end
1724 | if self.ability.set == "Joker" then
1725 | if self.ability.name == 'Pampa' then
1726 | return self.ability.extra.money
1727 | elseif self.ability.name== "Mixtape" then
1728 | -- compute the number of enhanced clubs in deck
1729 | local n_clubs=0
1730 | for k, v in pairs(G.playing_cards) do
1731 | if v:is_suit('Clubs') and v.config.center ~= G.P_CENTERS.c_base then n_clubs = n_clubs+1 end
1732 | end
1733 | return n_clubs*self.ability.extra.money_gain
1734 | end
1735 | end
1736 | return calc_ref
1737 | end
1738 |
1739 |
1740 |
1741 |
1742 |
1743 | local remove_from_deckref = Card.remove_from_deck
1744 | function Card:remove_from_deck(from_debuff)
1745 | sendDebugMessage("remove from deck")
1746 | local rem_ref = remove_from_deckref(self, from_debuff)
1747 | if self.ability.name== "Fabric Design" then
1748 | if self.ability.extra.added_to_deck then --dirty workaround because self.added_to_deck doesn't work ??
1749 | --turn cards to normal
1750 | if (G.playing_cards) then
1751 | for i=1, #G.playing_cards do
1752 | local card = G.playing_cards[i]
1753 | card:set_ability(G.P_CENTERS.c_base, nil, true)
1754 | end
1755 | end
1756 | end
1757 | end
1758 | if self.added_to_deck then
1759 | sendDebugMessage("self added to deck")
1760 | self.added_to_deck = false
1761 | --
1762 |
1763 | if self.ability.h_size ~= 0 then
1764 | G.hand:change_size(-self.ability.h_size)
1765 | end
1766 | if self.ability.d_size > 0 then
1767 | G.GAME.round_resets.discards = G.GAME.round_resets.discards - self.ability.d_size
1768 | ease_discard(-self.ability.d_size)
1769 | end
1770 | if self.ability.name == 'Credit Card' then
1771 | G.GAME.bankrupt_at = G.GAME.bankrupt_at + self.ability.extra
1772 | end
1773 | if self.ability.name == 'Chaos the Clown' then
1774 | G.GAME.current_round.free_rerolls = G.GAME.current_round.free_rerolls - 1
1775 | calculate_reroll_cost(true)
1776 | end
1777 | if self.ability.name == 'Turtle Bean' then
1778 | G.hand:change_size(-self.ability.extra.h_size)
1779 | end
1780 | if self.ability.name == 'Oops! All 6s' then
1781 | for k, v in pairs(G.GAME.probabilities) do
1782 | G.GAME.probabilities[k] = v/2
1783 | end
1784 | end
1785 | if self.ability.name == 'To the Moon' then
1786 | G.GAME.interest_amount = G.GAME.interest_amount - self.ability.extra
1787 | end
1788 | if self.ability.name == 'Astronomer' then
1789 | G.E_MANAGER:add_event(Event({func = function()
1790 | for k, v in pairs(G.I.CARD) do
1791 | if v.set_cost then v:set_cost() end
1792 | end
1793 | return true end }))
1794 | end
1795 |
1796 | if self.ability.name == 'Troubadour' then
1797 | G.hand:change_size(-self.ability.extra.h_size)
1798 | G.GAME.round_resets.hands = G.GAME.round_resets.hands - self.ability.extra.h_plays
1799 | end
1800 | if self.ability.name == 'Stuntman' then
1801 | G.hand:change_size(self.ability.extra.h_size)
1802 | end
1803 | if self.edition and self.edition.negative and not from_debuff and G.jokers then
1804 | if self.ability.consumeable then
1805 | G.consumeables.config.card_limit = G.consumeables.config.card_limit - 1
1806 | else
1807 | G.jokers.config.card_limit = G.jokers.config.card_limit - 1
1808 | end
1809 | end
1810 | if G.GAME.blind then G.E_MANAGER:add_event(Event({ func = function() G.GAME.blind:set_blind(nil, true, nil); return true end })) end
1811 | end
1812 |
1813 | return rem_ref
1814 | end
1815 |
1816 |
1817 |
1818 |
1819 |
1820 | -- handle joker description display
1821 | local generate_UIBox_ability_tableref = Card.generate_UIBox_ability_table
1822 | function Card.generate_UIBox_ability_table(self)
1823 | local card_type, hide_desc = self.ability.set or "None", nil
1824 | local loc_vars = nil
1825 | local main_start, main_end = nil, nil
1826 | local no_badge = nil
1827 |
1828 | if self.config.center.unlocked == false and not self.bypass_lock then -- For everyting that is locked
1829 | elseif card_type == 'Undiscovered' and not self.bypass_discovery_ui then -- Any Joker or tarot/planet/voucher that is not yet discovered
1830 | elseif self.debuff then
1831 | elseif card_type == 'Default' or card_type == 'Enhanced' then
1832 | elseif self.ability.set == 'Joker' then
1833 | local customJoker = false
1834 | if self.ability.name == 'Tiger Bikini' then
1835 | --Check the number of hearts in the deck
1836 | local heart_number=0
1837 | if (G.playing_cards) then
1838 | for k, v in pairs(G.playing_cards) do
1839 | if v:is_suit('Hearts') then heart_number = heart_number+1 end
1840 | end
1841 | loc_vars = {self.ability.extra.mult, self.ability.extra.threshold, math.max(0,self.ability.extra.mult*(heart_number-self.ability.extra.threshold))}
1842 | else
1843 | loc_vars = {self.ability.extra.mult, self.ability.extra.threshold, 0}
1844 |
1845 | end
1846 | customJoker= true
1847 | elseif self.ability.name=="Mixtape" then
1848 | -- compute the number of enhanced clubs in deck
1849 | local n_clubs=0
1850 | if (G.playing_cards) then
1851 | for k, v in pairs(G.playing_cards) do
1852 | if v:is_suit('Clubs') and v.config.center ~= G.P_CENTERS.c_base then n_clubs = n_clubs+1 end
1853 | end
1854 | loc_vars = {self.ability.extra.money_gain, self.ability.extra.money_gain*n_clubs}
1855 | else
1856 | loc_vars = {self.ability.extra.money_gain, 0}
1857 | end
1858 | customJoker = true
1859 | elseif self.ability.name=="Pampa" then
1860 | loc_vars = {self.ability.extra.money, ''..(G.GAME and G.GAME.probabilities.normal or 1), self.ability.extra.odds}
1861 | customJoker = true
1862 | elseif self.ability.name=="Flamingo" then
1863 | loc_vars = {''..(G.GAME and G.GAME.probabilities.normal or 1), self.ability.extra.odds}
1864 | customJoker = true
1865 | elseif self.ability.name == 'Cherry' then
1866 | loc_vars = {self.ability.extra.mult_gain, self.ability.extra.pairs_discarded*self.ability.extra.mult_gain, self.ability.extra.hands_limit-self.ability.extra.pairs_discarded}
1867 | customJoker = true
1868 | elseif self.ability.name == 'Subway Map' then
1869 | if self.ability.extra.hand== 14 then loc_vars = {self.ability.extra.mult_gain, self.ability.extra.mult, "A"}
1870 | elseif self.ability.extra.hand== 11 then loc_vars = {self.ability.extra.mult_gain, self.ability.extra.mult, "J"}
1871 | elseif self.ability.extra.hand== 12 then loc_vars = {self.ability.extra.mult_gain, self.ability.extra.mult, "Q"}
1872 | elseif self.ability.extra.hand== 13 then loc_vars = {self.ability.extra.mult_gain, self.ability.extra.mult, "K"}
1873 | else loc_vars = {self.ability.extra.mult_gain, self.ability.extra.mult, self.ability.extra.hand} end
1874 | customJoker = true
1875 | elseif self.ability.name == 'Sliding Joker' then
1876 | loc_vars = {self.ability.extra.mult_gain, self.ability.extra.chip_gain, self.ability.extra.mult, self.ability.extra.chips}
1877 | customJoker = true
1878 | elseif self.ability.name == 'Moon Rabbit' then
1879 | loc_vars = {''..(G.GAME and G.GAME.probabilities.normal or 1), self.ability.extra.odds}
1880 | customJoker = true
1881 | elseif self.ability.name == 'Claw' then
1882 | loc_vars = {self.ability.extra.chip_gain}
1883 | customJoker = true
1884 | elseif self.ability.name == 'Mahjong Joker' then
1885 | loc_vars = {self.ability.extra.xmult_gain,self.ability.extra.frequency,self.ability.extra.counter,self.ability.x_mult }
1886 | customJoker = true
1887 | elseif self.ability.name == 'Mixtape' then
1888 | loc_vars = {self.ability.extra.money_gain,self.ability.extra.money }
1889 | customJoker = true
1890 | elseif self.ability.name == 'Konbini' then
1891 | if G.GAME.consumeable_usage then
1892 | local tarots_used = 0
1893 | for k, v in pairs(G.GAME.consumeable_usage) do
1894 | if v.set == 'Tarot' then tarots_used = tarots_used + 1 end
1895 | end
1896 | loc_vars = {self.ability.extra.mult, self.ability.extra.mult*tarots_used}
1897 | else
1898 | loc_vars = {self.ability.extra.mult, 0}
1899 | end
1900 | customJoker = true
1901 | elseif self.ability.name == 'Voodoo Doll' then
1902 | loc_vars = {self.ability.extra.x_mult_gain,self.ability.extra.hand}
1903 | customJoker = true
1904 | elseif self.ability.name == 'Café Gourmand' then
1905 | loc_vars = {self.ability.extra.chips,self.ability.extra.n}
1906 | customJoker = true
1907 | elseif self.ability.name == 'Grand Slam' then
1908 | -- Get the string
1909 | local suit_string=""
1910 | if (self.ability.extra.played_suits) then
1911 | for i=1, #self.ability.extra.played_suits do
1912 | suit_string=suit_string .. self.ability.extra.played_suits[i] .. " "
1913 | end
1914 | end
1915 | loc_vars = {self.ability.extra.xmult_gain,math.max(1+self.ability.extra.n_played_suits*self.ability.extra.xmult_gain,1),suit_string}
1916 | customJoker = true
1917 | elseif self.ability.name == 'Snecko Eye' then
1918 | loc_vars = {self.ability.h_size}
1919 | customJoker = true
1920 | elseif self.ability.name == '3776' then
1921 | loc_vars = {self.ability.extra.mult}
1922 | customJoker = true
1923 | elseif self.ability.name == 'Matryoshka' then
1924 | loc_vars = {self.ability.extra.chips}
1925 | customJoker = true
1926 | elseif self.ability.name == 'Pimp The Bus' then
1927 | loc_vars = {self.ability.extra.x_mult_gain,self.ability.x_mult}
1928 | customJoker = true
1929 | elseif self.ability.name == 'Trick or Treat' then
1930 | loc_vars = {self.ability.extra.x_mult_gain, (G.GAME.consumeable_usage_total and math.max(1,self.ability.x_mult+G.GAME.consumeable_usage_total.spectral*self.ability.extra.x_mult_gain) or 1)}
1931 | customJoker = true
1932 | end
1933 | if customJoker then
1934 | local badges = {}
1935 | if (card_type ~= 'Locked' and card_type ~= 'Undiscovered' and card_type ~= 'Default') or self.debuff then
1936 | badges.card_type = card_type
1937 | end
1938 | if self.ability.set == 'Joker' and self.bypass_discovery_ui and (not no_badge) then
1939 | badges.force_rarity = true
1940 | end
1941 | if self.edition then
1942 | if self.edition.type == 'negative' and self.ability.consumeable then
1943 | badges[#badges + 1] = 'negative_consumable'
1944 | else
1945 | badges[#badges + 1] = (self.edition.type == 'holo' and 'holographic' or self.edition.type)
1946 | end
1947 | end
1948 | if self.seal then
1949 | badges[#badges + 1] = string.lower(self.seal) .. '_seal'
1950 | end
1951 | if self.ability.eternal then
1952 | badges[#badges + 1] = 'eternal'
1953 | end
1954 | if self.pinned then
1955 | badges[#badges + 1] = 'pinned_left'
1956 | end
1957 |
1958 | if self.sticker then
1959 | loc_vars = loc_vars or {};
1960 | loc_vars.sticker = self.sticker
1961 | end
1962 |
1963 | return generate_card_ui(self.config.center, nil, loc_vars, card_type, badges, hide_desc, main_start,
1964 | main_end)
1965 | end
1966 | end
1967 |
1968 | return generate_UIBox_ability_tableref(self)
1969 | end
1970 |
1971 |
1972 |
1973 | ----------------------------------------------
1974 | ------------MOD CODE END----------------------
1975 |
--------------------------------------------------------------------------------