Skip to content

Commit 663af7c

Browse files
authored
i forgot what i changed but i need to merge this commit before i create branches because it's quite small
1 parent ab545be commit 663af7c

File tree

8 files changed

+76
-17
lines changed

8 files changed

+76
-17
lines changed

assets/1x/atlasexotic.png

7.42 KB
Loading

assets/1x/atlasnotjokers.png

16.8 KB
Loading

assets/2x/atlasexotic.png

10.8 KB
Loading

assets/2x/atlasnotjokers.png

67.8 KB
Loading

items/exotic.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ local universum = {
136136
end,
137137
cry_credits = {
138138
idea = { "Ein13" },
139-
art = { "Ein13" },
139+
art = { "Ein13/hydrogenperoxiide" },
140140
},
141141
init = function(self)
142142
--Universum Patches

items/misc.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1650,9 +1650,9 @@ local echo = {
16501650
loc_vars = function(self, info_queue, card)
16511651
return {
16521652
vars = {
1653-
self.config.retriggers,
1653+
card and card.ability.retriggers or self.config.retriggers,
16541654
card and cry_prob(card.ability.cry_prob or 1, card.ability.extra, card.ability.cry_rigged) or 1,
1655-
self.config.extra,
1655+
card and card.ability.extra or self.config.extra,
16561656
},
16571657
} -- note that the check for (card.ability.cry_prob or 1) is probably unnecessary due to cards being initialised with ability.cry_prob
16581658
end,
@@ -1743,9 +1743,9 @@ local seraph = {
17431743
name = "cry-Seraph",
17441744
key = "seraph",
17451745
order = 2,
1746-
pos = { x = 1, y = 2 },
1746+
pos = { x = 5, y = 3 },
17471747
config = { mod_conv = "m_cry_light", max_highlighted = 2 },
1748-
atlas = "placeholders",
1748+
atlas = "atlasnotjokers",
17491749
loc_vars = function(self, info_queue, card)
17501750
info_queue[#info_queue + 1] = G.P_CENTERS.m_cry_light
17511751

items/misc_joker.lua

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1757,9 +1757,9 @@ local gardenfork = {
17571757
calculate = function(self, card, context)
17581758
if context.cardarea == G.jokers and context.before and not context.blueprint then
17591759
for i = 1, #context.full_hand do
1760-
if SMODS.Ranks[context.full_hand[i].base.value].key == "Ace" then
1760+
if context.other_card:get_id() == 14 then
17611761
for j = 1, #context.full_hand do
1762-
if SMODS.Ranks[context.full_hand[j].base.value].key == "7" then
1762+
if context.other_card:get_id() == 7 then -- :( ekshpenshive
17631763
ease_dollars(card.ability.extra.money)
17641764
return { message = "$" .. card.ability.extra.money, colour = G.C.MONEY }
17651765
end
@@ -1801,8 +1801,8 @@ local lightupthenight = {
18011801
end,
18021802
calculate = function(self, card, context)
18031803
if context.cardarea == G.play and context.individual then
1804-
local rank = SMODS.Ranks[context.other_card.base.value].key
1805-
if rank == "2" or rank == "7" then
1804+
local rank = context.other_card:get_id()
1805+
if rank == 2 or rank == 7 then
18061806
return {
18071807
x_mult = card.ability.extra.xmult,
18081808
colour = G.C.RED,
@@ -1845,8 +1845,7 @@ local nosound = {
18451845
calculate = function(self, card, context)
18461846
if context.repetition then
18471847
if context.cardarea == G.play then
1848-
local rank = SMODS.Ranks[context.other_card.base.value].key
1849-
if rank == "7" then
1848+
if context.other_card:get_id() == 7 then
18501849
return {
18511850
message = localize("k_again_ex"),
18521851
repetitions = card.ability.extra.retriggers,
@@ -1901,8 +1900,8 @@ local antennastoheaven = {
19011900
}
19021901
end
19031902
if context.cardarea == G.play and context.individual and not context.blueprint then
1904-
local rank = SMODS.Ranks[context.other_card.base.value].key
1905-
if rank == "4" or rank == "7" then
1903+
local rank = context.other_card:get_id()
1904+
if rank == 4 or rank == 7 then
19061905
card.ability.extra.x_chips = card.ability.extra.x_chips + card.ability.extra.bonus
19071906
return {
19081907
extra = { focus = card, message = localize("k_upgrade_ex") },
@@ -1990,8 +1989,7 @@ local weegaming = {
19901989
calculate = function(self, card, context)
19911990
if context.repetition then
19921991
if context.cardarea == G.play then
1993-
local rank = SMODS.Ranks[context.other_card.base.value].key
1994-
if rank == "2" then
1992+
if context.other_card:get_id() == 2 then
19951993
return {
19961994
message = localize("k_again_ex"),
19971995
repetitions = card.ability.extra.retriggers,
@@ -5907,6 +5905,7 @@ local oldblueprint = {
59075905
end
59085906
end
59095907
if other_joker and other_joker ~= card then
5908+
59105909
context.blueprint = (context.blueprint and (context.blueprint + 1)) or 1
59115910
context.blueprint_card = context.blueprint_card or card
59125911

@@ -5915,12 +5914,20 @@ local oldblueprint = {
59155914
end
59165915

59175916
local other_joker_ret, trig = other_joker:calculate_joker(context)
5917+
local eff_card = context.blueprint_card or card
5918+
5919+
context.blueprint = nil
5920+
context.blueprint_card = nil
5921+
5922+
if other_joker_ret == true then
5923+
return other_joker_ret
5924+
end
59185925
if other_joker_ret or trig then
59195926
if not other_joker_ret then
59205927
other_joker_ret = {}
59215928
end
5922-
other_joker_ret.card = context.blueprint_card or card
5923-
other_joker_ret.colour = G.C.BLUE
5929+
other_joker_ret.card = eff_card
5930+
other_joker_ret.colour = darken(G.C.BLUE, 0.3)
59245931
other_joker_ret.no_callback = true
59255932
return other_joker_ret
59265933
end

lovely/ccd.toml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,55 @@ pattern = "if not self.config.center.discovered and (self.ability.consumeable or
5555
position = "before"
5656
payload = "if self.ability.set == 'Enhanced' then self.ability.consumeable = nil end"
5757
match_indent = true
58+
59+
# ui, ui, ui
60+
[[patches]]
61+
[patches.pattern]
62+
target = "functions/UI_definitions.lua"
63+
pattern = '''name_from_rows(AUT.name, is_playing_card and G.C.WHITE or nil),'''
64+
position = "at"
65+
payload = '''
66+
AUT.ccd and name_from_rows(AUT.ccd.name, G.C.WHITE) or nil,
67+
AUT.ccd and desc_from_rows(AUT.ccd.main) or nil,
68+
name_from_rows(AUT.name, is_playing_card and G.C.WHITE or nil),
69+
'''
70+
match_indent = true
71+
72+
# i love patching like five billion things
73+
[[patches]]
74+
[patches.pattern]
75+
target = "card.lua"
76+
pattern = '''return generate_card_ui(self.config.center, nil, loc_vars, card_type, badges, hide_desc, main_start, main_end, self)'''
77+
position = "before"
78+
payload = '''
79+
if card_type ~= 'Default' and card_type ~= 'Enhanced' and self.playing_card then
80+
loc_vars = loc_vars or {}
81+
loc_vars.ccd = {
82+
playing_card = not not self.base.colour, value = self.base.value, suit = self.base.suit, colour = self.base.colour,
83+
nominal_chips = self.base.nominal > 0 and self.base.nominal or nil,
84+
bonus_chips = (self.ability.bonus + (self.ability.perma_bonus or 0)) > 0 and (self.ability.bonus + (self.ability.perma_bonus or 0)) or nil,
85+
}
86+
end
87+
'''
88+
match_indent = true
89+
90+
# lalala ok this is a mess
91+
[[patches]]
92+
[patches.pattern]
93+
target = "functions/common_events.lua"
94+
pattern = '''local loc_vars = {}'''
95+
position = "before"
96+
payload = '''
97+
if specific_vars and specific_vars.ccd then
98+
full_UI_table.ccd = {name = {}, main = {}}
99+
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}}}
100+
full_UI_table.ccd.name = full_UI_table.ccd.name[1]
101+
if specific_vars.ccd.nominal_chips then
102+
localize{type = 'other', key = 'card_chips', nodes = full_UI_table.ccd.main, vars = {specific_vars.ccd.nominal_chips}}
103+
end
104+
if specific_vars.ccd.bonus_chips then
105+
localize{type = 'other', key = 'card_extra_chips', nodes = full_UI_table.ccd.main, vars = {specific_vars.ccd.bonus_chips}}
106+
end
107+
end
108+
'''
109+
match_indent = true

0 commit comments

Comments
 (0)