Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 41 additions & 38 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,41 @@
{
"editor.tabSize": 2,
"editor.detectIndentation": false,
"editor.formatOnSave": true,
"Lua.format.defaultConfig": {
"align_continuous_assign_statement": "false"
},
"Lua.workspace.library": [
"../lovely/dump",
"../smods",
"../Steamodded",
"../JokerDisplay",
"../CardSleeves"
],
"Lua.runtime.version": "Lua 5.1",
"Lua.codeLens.enable": true,
"Lua.completion.callSnippet": "Disable",
"Lua.hint.enable": true,
"Lua.hint.setType": true,
"Lua.type.inferParamType": false,
"editor.quickSuggestions": {
"other": "off"
},
"Lua.diagnostics.globals": [
"to_big",
"to_number",
"Event",
"create_UIBox_your_collection_stickers",
"create_UIBox_Other_GameObjects",
"hand_chips",
"mult",
"love",
"Back",
"PB_UTIL",
"G"
],
"Lua.diagnostics.libraryFiles": "Disable"
}
{
"editor.tabSize": 2,
"editor.detectIndentation": false,
"editor.formatOnSave": true,
"Lua.format.defaultConfig": {
"align_continuous_assign_statement": "false",
"align_continuous_rect_table_field": "false",
"align_array_table": "false",
"never_indent_before_if_condition": "true",
},
"Lua.workspace.library": [
"../lovely/dump",
"../smods",
"../Steamodded",
"../JokerDisplay",
"../CardSleeves"
],
"Lua.runtime.version": "Lua 5.1",
"Lua.codeLens.enable": true,
"Lua.completion.callSnippet": "Disable",
"Lua.hint.enable": true,
"Lua.hint.setType": true,
"Lua.type.inferParamType": false,
"editor.quickSuggestions": {
"other": "off"
},
"Lua.diagnostics.globals": [
"to_big",
"to_number",
"Event",
"create_UIBox_your_collection_stickers",
"create_UIBox_Other_GameObjects",
"hand_chips",
"mult",
"love",
"Back",
"PB_UTIL",
"G"
],
"Lua.diagnostics.libraryFiles": "Disable"
}
Binary file modified assets/1x/Boosters.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/1x/Decks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/1x/EGOGifts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/1x/Enhancements.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/1x/Jokers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/1x/MinorArcana.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/1x/Spectrals.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/1x/Stickers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/1x/Vouchers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/1x/paperclips.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/2x/Boosters.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/2x/Decks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/2x/EGOGifts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/2x/Enhancements.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/2x/Jokers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/2x/MinorArcana.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/2x/Spectrals.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/2x/Stickers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/2x/Vouchers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/2x/paperclips.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ return {
vouchers_enabled = true,
tags_enabled = true,
ranks_enabled = true,
ego_gifts_enabled = true,
spectrals_enabled = true,
plague_doctor_quotes_enabled = true
}
8 changes: 8 additions & 0 deletions content/atlas.lua
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ SMODS.Atlas {
path = 'MinorArcana.png'
}

-- Registers the atlas for E.G.O. Gifts
SMODS.Atlas {
key = 'ego_gift_atlas',
px = 71,
py = 95,
path = 'EGOGifts.png'
}

-- Registers the atlas for Spectrals
SMODS.Atlas {
key = 'spectral_atlas',
Expand Down
12 changes: 4 additions & 8 deletions content/blind/taupe_treble.lua
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,10 @@ SMODS.Blind {
atlas = 'music_blinds_atlas',
pos = { y = 13 },

debuff_hand = function(self, cards, hand, handname, check)
if cards then
for _, v in ipairs(cards) do
if next(SMODS.get_enhancements(v)) then
return false
end
end
return true
recalc_debuff = function(self, card, from_blind)
if next(SMODS.get_enhancements(card)) then
return false
end
return true
end
}
8 changes: 4 additions & 4 deletions content/blind/whole.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ SMODS.Blind {
boss = {
min = 3
},
mult = 1,
mult = 2,
boss_colour = HEX('B7C977'),
atlas = 'music_blinds_atlas',
pos = { y = 7 },

recalc_debuff = function(self, card, from_blind)
if card.area ~= G.jokers then
if card.playing_card then
if not SMODS.has_no_rank(card) then
if G.GAME.paperback.ranks_scored_this_ante[card:get_id()] then
return true
return false
end
return true
end
end
return false
end
}
12 changes: 12 additions & 0 deletions content/booster/ego_gift_normal_1.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
PB_UTIL.EGO_GiftBooster {
key = 'ego_gift_normal_1',
atlas = 'boosters_atlas',
pos = { x = 0, y = 1 },
config = {
extra = 2,
choose = 1
},
weight = 1,
cost = 4,
discovered = false,
}
12 changes: 12 additions & 0 deletions content/booster/minor_arcana_mega_2.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
PB_UTIL.MinorArcanaBooster {
key = 'minor_arcana_mega_2',
atlas = 'boosters_atlas',
pos = { x = 6, y = 0 },
config = {
extra = 5,
choose = 2
},
weight = 0.25,
cost = 8,
discovered = false,
}
12 changes: 12 additions & 0 deletions content/booster/minor_arcana_normal_4.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
PB_UTIL.MinorArcanaBooster {
key = 'minor_arcana_normal_4',
atlas = 'boosters_atlas',
pos = { x = 7, y = 0 },
config = {
extra = 3,
choose = 1
},
weight = 1,
cost = 4,
discovered = false,
}
67 changes: 67 additions & 0 deletions content/deck/shimmering.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
if PB_UTIL.config.ego_gifts_enabled then
SMODS.Back {
key = 'shimmering',
atlas = 'decks_atlas',
config = {
joker_slot = -2,
extra = {
a_slot = 1,
}
},
pos = { x = 6, y = 0 },

locked_loc_vars = function(self, info_queue)
return { vars = { 10 } }
end,

loc_vars = function(self)
return {
vars = {
self.config.extra.a_slot,
self.config.joker_slot,
}
}
end,
check_for_unlock = function(self, args)
if args.type == 'paperback_sold_ego_gifts' then
return #G.GAME.paperback.sold_ego_gifts >= 10
end
end,
-- Utility function to recalculate consumable slot bonus
paperback_shimmering_update = function(self)
local sins = {}
local count = 0
for _, v in ipairs(G.consumeables.cards) do
if v.ability.sin and v.ability.sin ~= 'none' then
if not sins[v.ability.sin] then
sins[v.ability.sin] = true
count = count + 1
end
end
end


local change = count - G.GAME.paperback.shimmering_change
if change ~= 0 then
G.consumeables:change_size(change)

G.GAME.paperback.shimmering_change = count
end
end
}

local add_to_deck_ref = Card.add_to_deck
function Card.add_to_deck(...)
add_to_deck_ref(...)
if G.GAME.selected_back_key and G.GAME.selected_back_key.key == 'b_paperback_shimmering' then
G.GAME.selected_back_key:paperback_shimmering_update()
end
end
local remove_from_deck_ref = Card.remove_from_deck
function Card.remove_from_deck(...)
remove_from_deck_ref(...)
if G.GAME.selected_back_key and G.GAME.selected_back_key.key == 'b_paperback_shimmering' then
G.GAME.selected_back_key:paperback_shimmering_update()
end
end
end
18 changes: 17 additions & 1 deletion content/edition/dichrome.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,30 @@ SMODS.Edition {

loc_vars = function(self, info_queue, card)
return {
key = card.playing_card and 'e_paperback_dichrome_playing_card',
vars = {
(card.edition or {}).amount or self.config.amount
}
}
end,

calculate = function(self, card, context)
if context.setting_blind and card.ability.set == 'Joker' then
local should_trigger = (context.setting_blind and card.ability.set == 'Joker')
or (context.hand_drawn and card.playing_card)

-- Checks whether this card was one of the drawn cards
if should_trigger and context.hand_drawn then
should_trigger = false

for _, v in ipairs(context.hand_drawn) do
if v == card then
should_trigger = true
break
end
end
end

if should_trigger then
G.E_MANAGER:add_event(Event {
trigger = 'after',
delay = 1,
Expand Down
44 changes: 44 additions & 0 deletions content/ego_gift/blue_lighter.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
PB_UTIL.EGO_Gift {
key = 'blue_lighter',
config = {
sin = 'gloom',
xmult = 1,
a_xmult = 0.25
},
atlas = 'ego_gift_atlas',
pos = { x = 4, y = 1 },
soul_pos = { x = 4, y = 4 },

ego_loc_vars = function(self, info_queue, card)
return { vars = {
card.ability.a_xmult,
card.ability.xmult
} }
end,

ego_gift_calc = function(self, card, context)
if context.setting_blind then
if next(G.consumeables.cards) then
local targets = {}
for k, v in ipairs(G.consumeables.cards) do
if not (PB_UTIL.is_ego_gift(v) or SMODS.is_eternal(v)) then targets[#targets + 1] = v end
end
if next(targets) then
local to_destroy = pseudorandom_element(targets, pseudoseed('blue_lighter_destruction'))
SMODS.destroy_cards({ to_destroy })
card.ability.xmult = card.ability.xmult + card.ability.a_xmult
SMODS.calculate_effect({
message = localize('k_upgrade_ex'),
colour = G.C.MULT
}, card)
end
end
end

if context.joker_main then
return {
xmult = card.ability.xmult
}
end
end
}
49 changes: 49 additions & 0 deletions content/ego_gift/broken_glasses.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
PB_UTIL.EGO_Gift {
key = 'broken_glasses',
config = {
sin = 'gloom',
odds = 4
},
atlas = 'ego_gift_atlas',
pos = { x = 4, y = 2 },
soul_pos = { x = 4, y = 5 },

ego_loc_vars = function(self, info_queue, card)
local n, d = PB_UTIL.chance_vars(card, nil, 1, card.ability.odds)
return { vars = {
n, d
} }
end,
ego_gift_calc = function(self, card, context)
if context.remove_playing_cards and #context.removed > 0 and #context.removed <= 2 then
G.E_MANAGER:add_event(Event({
func = function()
local fx = {}
local _first_dissolve = nil
for _, v in ipairs(context.removed) do
for i = 1, 2, 1 do
G.playing_card = (G.playing_card or 0) + 1
local new_card = copy_card(v, nil, nil, G.playing_card)
new_card:add_to_deck()
G.deck.config.card_limit = G.deck.config.card_limit + 1
table.insert(G.playing_cards, new_card)
G.hand:emplace(new_card)
new_card:start_materialize(nil, _first_dissolve)
_first_dissolve = true
fx[#fx + 1] = new_card
end
end
playing_card_joker_effects(fx)
return true
end
}))

if PB_UTIL.chance(card, pseudoseed('broken_glasses'), nil, card.ability.odds) then
SMODS.destroy_cards({ card })
return {
message = localize('paperback_broken_ex')
}
end
end
end
}
Loading