Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ccd ui update, old bp fix, seraph+universum art #414

Merged
merged 2 commits into from
Feb 22, 2025
Merged
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
Binary file modified assets/1x/atlasexotic.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/atlasnotjokers.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/atlasexotic.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/atlasnotjokers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion items/exotic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ local universum = {
end,
cry_credits = {
idea = { "Ein13" },
art = { "Ein13" },
art = { "Ein13/hydrogenperoxiide" },
},
init = function(self)
--Universum Patches
Expand Down
8 changes: 4 additions & 4 deletions items/misc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1650,9 +1650,9 @@ local echo = {
loc_vars = function(self, info_queue, card)
return {
vars = {
self.config.retriggers,
card and card.ability.retriggers or self.config.retriggers,
card and cry_prob(card.ability.cry_prob or 1, card.ability.extra, card.ability.cry_rigged) or 1,
self.config.extra,
card and card.ability.extra or self.config.extra,
},
} -- note that the check for (card.ability.cry_prob or 1) is probably unnecessary due to cards being initialised with ability.cry_prob
end,
Expand Down Expand Up @@ -1743,9 +1743,9 @@ local seraph = {
name = "cry-Seraph",
key = "seraph",
order = 2,
pos = { x = 1, y = 2 },
pos = { x = 5, y = 3 },
config = { mod_conv = "m_cry_light", max_highlighted = 2 },
atlas = "placeholders",
atlas = "atlasnotjokers",
loc_vars = function(self, info_queue, card)
info_queue[#info_queue + 1] = G.P_CENTERS.m_cry_light

Expand Down
30 changes: 18 additions & 12 deletions items/misc_joker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1757,9 +1757,9 @@ local gardenfork = {
calculate = function(self, card, context)
if context.cardarea == G.jokers and context.before and not context.blueprint then
for i = 1, #context.full_hand do
if SMODS.Ranks[context.full_hand[i].base.value].key == "Ace" then
if context.other_card:get_id() == 14 then
for j = 1, #context.full_hand do
if SMODS.Ranks[context.full_hand[j].base.value].key == "7" then
if context.other_card:get_id() == 7 then -- :( ekshpenshive
ease_dollars(card.ability.extra.money)
return { message = "$" .. card.ability.extra.money, colour = G.C.MONEY }
end
Expand Down Expand Up @@ -1801,8 +1801,8 @@ local lightupthenight = {
end,
calculate = function(self, card, context)
if context.cardarea == G.play and context.individual then
local rank = SMODS.Ranks[context.other_card.base.value].key
if rank == "2" or rank == "7" then
local rank = context.other_card:get_id()
if rank == 2 or rank == 7 then
return {
x_mult = card.ability.extra.xmult,
colour = G.C.RED,
Expand Down Expand Up @@ -1845,8 +1845,7 @@ local nosound = {
calculate = function(self, card, context)
if context.repetition then
if context.cardarea == G.play then
local rank = SMODS.Ranks[context.other_card.base.value].key
if rank == "7" then
if context.other_card:get_id() == 7 then
return {
message = localize("k_again_ex"),
repetitions = card.ability.extra.retriggers,
Expand Down Expand Up @@ -1901,8 +1900,8 @@ local antennastoheaven = {
}
end
if context.cardarea == G.play and context.individual and not context.blueprint then
local rank = SMODS.Ranks[context.other_card.base.value].key
if rank == "4" or rank == "7" then
local rank = context.other_card:get_id()
if rank == 4 or rank == 7 then
card.ability.extra.x_chips = card.ability.extra.x_chips + card.ability.extra.bonus
return {
extra = { focus = card, message = localize("k_upgrade_ex") },
Expand Down Expand Up @@ -1990,8 +1989,7 @@ local weegaming = {
calculate = function(self, card, context)
if context.repetition then
if context.cardarea == G.play then
local rank = SMODS.Ranks[context.other_card.base.value].key
if rank == "2" then
if context.other_card:get_id() == 2 then
return {
message = localize("k_again_ex"),
repetitions = card.ability.extra.retriggers,
Expand Down Expand Up @@ -5915,12 +5913,20 @@ local oldblueprint = {
end

local other_joker_ret, trig = other_joker:calculate_joker(context)
local eff_card = context.blueprint_card or card

context.blueprint = nil
context.blueprint_card = nil

if other_joker_ret == true then
return other_joker_ret
end
if other_joker_ret or trig then
if not other_joker_ret then
other_joker_ret = {}
end
other_joker_ret.card = context.blueprint_card or card
other_joker_ret.colour = G.C.BLUE
other_joker_ret.card = eff_card
other_joker_ret.colour = darken(G.C.BLUE, 0.3)
other_joker_ret.no_callback = true
return other_joker_ret
end
Expand Down
52 changes: 52 additions & 0 deletions lovely/ccd.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,55 @@ pattern = "if not self.config.center.discovered and (self.ability.consumeable or
position = "before"
payload = "if self.ability.set == 'Enhanced' then self.ability.consumeable = nil end"
match_indent = true

# ui, ui, ui
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = '''name_from_rows(AUT.name, is_playing_card and G.C.WHITE or nil),'''
position = "at"
payload = '''
AUT.ccd and name_from_rows(AUT.ccd.name, G.C.WHITE) or nil,
AUT.ccd and desc_from_rows(AUT.ccd.main) or nil,
name_from_rows(AUT.name, is_playing_card and G.C.WHITE or nil),
'''
match_indent = true

# i love patching like five billion things
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = '''return generate_card_ui(self.config.center, nil, loc_vars, card_type, badges, hide_desc, main_start, main_end, self)'''
position = "before"
payload = '''
if card_type ~= 'Default' and card_type ~= 'Enhanced' and self.playing_card then
loc_vars = loc_vars or {}
loc_vars.ccd = {
playing_card = not not self.base.colour, value = self.base.value, suit = self.base.suit, colour = self.base.colour,
nominal_chips = self.base.nominal > 0 and self.base.nominal or nil,
bonus_chips = (self.ability.bonus + (self.ability.perma_bonus or 0)) > 0 and (self.ability.bonus + (self.ability.perma_bonus or 0)) or nil,
}
end
'''
match_indent = true

# lalala ok this is a mess
[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = '''local loc_vars = {}'''
position = "before"
payload = '''
if specific_vars and specific_vars.ccd then
full_UI_table.ccd = {name = {}, main = {}}
localize{type = 'other', key = 'playing_card', set = 'Other', nodes = full_UI_table.ccd.name, vars = {localize(specific_vars.ccd.value, 'ranks'), localize(specific_vars.ccd.suit, 'suits_plural'), colours = {specific_vars.ccd.colour}}}
full_UI_table.ccd.name = full_UI_table.ccd.name[1]
if specific_vars.ccd.nominal_chips then
localize{type = 'other', key = 'card_chips', nodes = full_UI_table.ccd.main, vars = {specific_vars.ccd.nominal_chips}}
end
if specific_vars.ccd.bonus_chips then
localize{type = 'other', key = 'card_extra_chips', nodes = full_UI_table.ccd.main, vars = {specific_vars.ccd.bonus_chips}}
end
end
'''
match_indent = true