Skip to content

Commit eb2f993

Browse files
committed
1.1.0 Update
1 parent 1f51216 commit eb2f993

40 files changed

+1681
-1148
lines changed

KHJokers.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"display_name": "KHJokers",
1010
"badge_colour": "c88465",
1111
"badge_text_colour": "FFFFFF",
12-
"version": "1.0.0",
12+
"version": "1.1.0",
1313
"dependencies": [
1414
"Steamodded (>=1.0.0~BETA-0711a)"
1515
]

KHJokers.lua

Lines changed: 129 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,71 @@
11
SMODS.Atlas {
2-
key = "modicon",
3-
path = "mod_icon.png",
4-
px = 34,
5-
py = 34,
2+
key = "modicon",
3+
path = "mod_icon.png",
4+
px = 34,
5+
py = 34,
66
}
77

88
SMODS.Atlas {
9-
key = "KHJokers",
10-
path = "KHJokers.png",
11-
px = 71,
12-
py = 95,
9+
key = "KHJokers",
10+
path = "KHJokers.png",
11+
px = 71,
12+
py = 95,
1313
}
1414

1515
SMODS.Atlas({
16-
key = 'consumabels',
17-
px = 71,
18-
py = 95,
19-
path = 'consumabels.png'
16+
key = 'consumabels',
17+
px = 71,
18+
py = 95,
19+
path = 'consumabels.png'
2020
})
2121

2222

2323
SMODS.Atlas({
24-
key = 'decks',
25-
px = 71,
26-
py = 95,
27-
path = 'decks.png'
24+
key = 'decks',
25+
px = 71,
26+
py = 95,
27+
path = 'decks.png'
2828
})
2929

30+
SMODS.Atlas {
31+
key = "KHSleeves",
32+
path = "cardsleeves.png",
33+
px = 71,
34+
py = 95,
35+
}
36+
3037
SMODS.Atlas({
3138
key = 'khblind',
3239
path = 'blinds.png',
33-
px = 34, py = 34,
40+
px = 34,
41+
py = 34,
3442
frames = 21,
35-
atlas_table = 'ANIMATION_ATLAS'})
43+
atlas_table = 'ANIMATION_ATLAS'
44+
})
45+
46+
-- adds Kingdom Hearts Joker to the title menu
47+
function Card:resize(mod, force_save)
48+
self:hard_set_T(self.T.x, self.T.y, self.T.w * mod, self.T.h * mod)
49+
remove_all(self.children)
50+
self.children = {}
51+
self.children.shadow = Moveable(0, 0, 0, 0)
52+
self:set_sprites(self.config.center, self.base.id and self.config.card)
53+
end
54+
55+
local mainmenuref2 = Game.main_menu
56+
Game.main_menu = function(change_context)
57+
local ret = mainmenuref2(change_context)
58+
59+
local newcard = SMODS.create_card({ key = 'j_kh_khtrilogy', area = G.title_top })
60+
G.title_top.T.w = G.title_top.T.w * 1.7675
61+
G.title_top.T.x = G.title_top.T.x - 0.8
62+
G.title_top:emplace(newcard)
63+
newcard:start_materialize()
64+
newcard:resize(1.1 * 1.2)
65+
newcard.no_ui = true
66+
return ret
67+
end
68+
3669

3770

3871
KH = SMODS.current_mod
@@ -49,121 +82,135 @@ KH.config_tab = function()
4982
r = 0.1, minw = 5, align = "cm", padding = 0.2, colour = G.C.BLACK
5083
},
5184
nodes = {
52-
53-
create_toggle({
85+
86+
create_toggle({
5487
id = "enable_jokers",
5588
label = localize("k_khjokers_config_jokers"),
56-
info = {localize('k_khjokers_config_restart')},
89+
info = { localize('k_khjokers_config_restart') },
5790
ref_table = KH.config,
5891
ref_value = "enable_jokers",
5992
callback = function()
6093
KH:save_config()
6194
end,
6295
}),
63-
96+
6497
create_toggle({
6598
id = "enable_tarots",
6699
label = localize("k_khjokers_config_tarots"),
67-
info = {localize('k_khjokers_config_restart')},
100+
info = { localize('k_khjokers_config_restart') },
68101
ref_table = KH.config,
69102
ref_value = "enable_tarots",
70103
callback = function()
71104
KH:save_config()
72105
end
73106
}),
74-
75-
create_toggle({
107+
108+
create_toggle({
76109
id = "enable_spectrals",
77110
label = localize("k_khjokers_config_spectrals"),
78-
info = {localize('k_khjokers_config_restart')},
111+
info = { localize('k_khjokers_config_restart') },
79112
ref_table = KH.config,
80113
ref_value = "enable_spectrals",
81114
callback = function()
82115
KH:save_config()
83116
end
84117
}),
85-
118+
119+
120+
create_toggle({
121+
id = "enable_seal",
122+
label = localize("k_khjokers_config_seal"),
123+
info = { localize('k_khjokers_config_restart') },
124+
ref_table = KH.config,
125+
ref_value = "enable_seal",
126+
callback = function()
127+
KH:save_config()
128+
end
129+
}),
130+
131+
create_toggle({
132+
id = "enable_blind",
133+
label = localize("k_khjokers_config_blind"),
134+
info = { localize('k_khjokers_config_restart') },
135+
ref_table = KH.config,
136+
ref_value = "enable_blind",
137+
callback = function()
138+
KH:save_config()
139+
end
140+
}),
141+
86142
}
87143
}
88144
end
89145

90146
if KH.config.enable_jokers then
91-
local subdir = "content/cards"
92-
local cards = NFS.getDirectoryItems(SMODS.current_mod.path .. subdir)
93-
for _, filename in pairs(cards) do
94-
assert(SMODS.load_file(subdir .. "/" .. filename))()
95-
end
147+
local subdir = "content/cards"
148+
local cards = NFS.getDirectoryItems(SMODS.current_mod.path .. subdir)
149+
for _, filename in pairs(cards) do
150+
assert(SMODS.load_file(subdir .. "/" .. filename))()
151+
end
152+
SMODS.load_file("content/challenges/challenges.lua")() -- Loads Challenges if Jokers are enabled
96153
end
97154

98155
if KH.config.enable_tarots then
99-
SMODS.load_file("content/consumables/tarots.lua")()
156+
SMODS.load_file("content/consumables/tarots.lua")()
100157
end
101158

102-
if KH.config.enable_spectrals then
159+
if KH.config.enable_spectrals then
103160
SMODS.load_file("content/consumables/spectrals.lua")()
104161
end
105162

163+
if KH.config.enable_seal then
164+
SMODS.load_file("content/consumables/seal.lua")()
165+
end
166+
167+
if KH.config.enable_blind then
168+
SMODS.load_file("content/blinds/blinds.lua")()
169+
end
170+
106171
-- load Friends of Jimbo
107172
SMODS.load_file("content/collabs/kingdomheartsxbalatro.lua")()
108173

109174
-- Joker Display Compat
110175
if JokerDisplay then
111-
SMODS.load_file("content/JokerDisplay/joker_display_definitions.lua")()
176+
SMODS.load_file("content/JokerDisplay/joker_display_definitions.lua")()
112177
end
113178

114-
SMODS.load_file("content/consumables/seal.lua")()
115-
116-
SMODS.load_file("content/challenges/challenges.lua")()
117-
118-
119-
120-
-- blinds
121-
SMODS.Blind {
122-
key = 'khblind',
123-
loc_txt = {
124-
name = 'Shuffled',
125-
text = {
126-
'Shuffles Jokers',
127-
'When hand is played',
128-
}
129-
},
130-
vars = {},
131-
dollars = 5,
132-
mult = 2,
133-
debuff = {},
134-
boss = {min = 2, max = 10},
135-
boss_colour = HEX('c88465'),
136-
pos = {x = 0, y = 0},
137-
atlas = 'khblind',
138-
press_play = function(self)
139-
G.E_MANAGER:add_event(Event({
140-
trigger = 'after',
141-
delay = 0.2,
142-
func = function()
143-
for i = 1, 3 do
144-
G.E_MANAGER:add_event(Event({
145-
trigger = 'after',
146-
delay = 0.15 * (i - 1),
147-
func = function()
148-
G.jokers:shuffle('aajk')
149-
play_sound('cardSlide1', 0.85 + 0.15 * i)
150-
return true
151-
end
152-
}))
153-
end
154-
return true
155-
end
156-
}))
157-
end
158-
}
159-
179+
-- Decks
160180
SMODS.Back {
161181
key = 'kingdom',
162182
atlas = 'decks',
163183
pos = { x = 0, y = 0 },
164-
config = {vouchers = { "v_overstock_norm"},},
184+
config = { vouchers = { "v_overstock_norm" }, },
165185
loc_vars = function(self, info_queue, center)
166186
end,
167187
calculate = function(self, back, context)
168188
end
169189
}
190+
191+
-- CardSleeves Support!
192+
if CardSleeves then
193+
CardSleeves.Sleeve {
194+
key = 'kingdom',
195+
deck_buff = 'b_kh_kingdom',
196+
atlas = 'KHSleeves',
197+
pos = { x = 0, y = 0 },
198+
199+
loc_vars = function(self)
200+
local key, vars
201+
if self.get_current_deck_key() == "b_kh_kingdom" then
202+
key = self.key .. "_alt"
203+
self.config = { vouchers = { "v_overstock_plus" } }
204+
vars = { self.config.vouchers }
205+
else
206+
key = self.key
207+
self.config = { vouchers = { "v_overstock_norm" } }
208+
vars = { self.config.vouchers }
209+
end
210+
return { key = key, vars = vars }
211+
end,
212+
213+
calculate = function(self, sleeve, context)
214+
end
215+
}
216+
end

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Get the latest stable version from the [Releases](https://github.com/cloudzXIII/
1212
# Features
1313
Currently Adds the following:<br>
1414
- Kingdom Hearts x Friends of Jimbo
15-
- 20 Jokers
15+
- 20+ Jokers
1616
- 3 Challenges
1717
- 2 Spectral Cards
1818
- 1 Tarot Card
@@ -31,14 +31,19 @@ and more to come... stay tuned!
3131
3232
</details>
3333

34-
## JokerDisplay Support!
34+
## Crossmod Support!
3535
This Mod has JokerDisplay support! *woo hoo*
36+
- [JokerDisplay](https://github.com/larswijn/CardSleeves)
37+
38+
This Mod also has CardSleeves support! *yippee*
39+
- Adds 1 new sleeve: Kingdom Sleeve!
40+
- [CardSleeves](https://github.com/larswijn/CardSleeves)
3641

37-
- You can get that from https://github.com/nh6574/JokerDisplay
3842

3943
## Credits
4044
Credits to the following Mods and their devs! I borrowed/referenced their code while making this mod
4145
- [Paperback](https://github.com/Balatro-Paperback/paperback)
4246
- [Bunco](https://github.com/jumbocarrot0/Bunco/)
4347
- [Rofflatro](https://github.com/MamiKeRiko/Rofflatro)
4448
- [Cryptid](https://github.com/SpectralPack/Cryptid)
49+
- [Buffoonery](https://github.com/pinkmaggit-hub/Buffoonery)

assets/1x/KHJokers.png

3.52 KB
Loading

assets/1x/blinds.png

1.22 KB
Loading

assets/1x/cardsleeves.png

848 Bytes
Loading

assets/2x/KHJokers.png

4.57 KB
Loading

assets/2x/blinds.png

1.48 KB
Loading

assets/2x/cardsleeves.png

1.18 KB
Loading

config.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ return {
22
["enable_jokers"] = true,
33
["enable_tarots"] = true,
44
["enable_spectrals"] = true,
5-
}
5+
["enable_seal"] = true,
6+
["enable_blind"] = true,
7+
}

0 commit comments

Comments
 (0)