Skip to content

Commit 84761d1

Browse files
committed
value manip stuff
1 parent c1c923e commit 84761d1

File tree

5 files changed

+141
-11
lines changed

5 files changed

+141
-11
lines changed

items/epic.lua

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2675,7 +2675,7 @@ local oil_lamp = { --You want it? It's yours my friend
26752675
key = "oil_lamp",
26762676
pos = { x = 4, y = 5 },
26772677
config = { extra = { increase = 1.2 } },
2678-
rarity = "cry_epic",
2678+
rarity = 3,
26792679
cost = 15,
26802680
order = 300.5,
26812681
atlas = "atlastwo",
@@ -2743,9 +2743,11 @@ local oil_lamp = { --You want it? It's yours my friend
27432743
if i < #G.jokers.cards then
27442744
if not Card.no(G.jokers.cards[i + 1], "immutable", true) then
27452745
check = true
2746+
if G.jokers.cards[i + 1].ability.value_manip then
2747+
Cryptid.manipulate(G.jokers.cards[i + 1])
2748+
end
27462749
Cryptid.manipulate(G.jokers.cards[i + 1], { value = card.ability.extra.increase })
2747-
G.jokers.cards[i + 1].config.cry_oil_lamp = (G.jokers.cards[i + 1].config.cry_oil_lamp or 1)
2748-
* card.ability.extra.increase
2750+
G.jokers.cards[i + 1].ability.value_manip = true
27492751
end
27502752
end
27512753
end

items/misc_joker.lua

Lines changed: 120 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8843,8 +8843,11 @@ local tropical_smoothie = {
88438843
for i, v in pairs(G.jokers.cards) do
88448844
if v ~= card then
88458845
if not Card.no(v, "immutable", true) then
8846+
if v.ability.value_manip then
8847+
Cryptid.manipulate(v)
8848+
end
88468849
Cryptid.manipulate(v, { value = card.ability.extra })
8847-
v.config.cry_oil_lamp = (v.config.cry_oil_lamp or 1) * card.ability.extra
8850+
v.ability.value_manip = true
88488851
check = true
88498852
end
88508853
end
@@ -9142,6 +9145,121 @@ local necromancer = {
91429145
},
91439146
},
91449147
}
9148+
9149+
local oil_lamp = { --You want it? It's yours my friend
9150+
object_type = "Joker",
9151+
dependencies = {
9152+
items = {
9153+
"set_cry_misc_joker",
9154+
},
9155+
},
9156+
name = "cry-Oil-Lamp",
9157+
key = "oil_lamp",
9158+
pos = { x = 4, y = 5 },
9159+
config = { extra = { increase = 1.2 } },
9160+
rarity = 3,
9161+
cost = 15,
9162+
order = 127,
9163+
atlas = "atlastwo",
9164+
demicoloncompat = true,
9165+
immutable = true,
9166+
loc_vars = function(self, info_queue, card)
9167+
card.ability.blueprint_compat_ui = card.ability.blueprint_compat_ui or ""
9168+
card.ability.blueprint_compat_check = nil
9169+
return {
9170+
vars = { number_format(card.ability.extra.increase) },
9171+
main_end = (card.area and card.area == G.jokers) and {
9172+
{
9173+
n = G.UIT.C,
9174+
config = { align = "bm", minh = 0.4 },
9175+
nodes = {
9176+
{
9177+
n = G.UIT.C,
9178+
config = {
9179+
ref_table = card,
9180+
align = "m",
9181+
colour = G.C.JOKER_GREY,
9182+
r = 0.05,
9183+
padding = 0.06,
9184+
func = "blueprint_compat",
9185+
},
9186+
nodes = {
9187+
{
9188+
n = G.UIT.T,
9189+
config = {
9190+
ref_table = card.ability,
9191+
ref_value = "blueprint_compat_ui",
9192+
colour = G.C.UI.TEXT_LIGHT,
9193+
scale = 0.32 * 0.8,
9194+
},
9195+
},
9196+
},
9197+
},
9198+
},
9199+
},
9200+
} or nil,
9201+
}
9202+
end,
9203+
update = function(self, card, front)
9204+
if G.STAGE == G.STAGES.RUN then
9205+
for i = 1, #G.jokers.cards do
9206+
if G.jokers.cards[i] == card then
9207+
other_joker = G.jokers.cards[i + 1]
9208+
end
9209+
end
9210+
if other_joker and other_joker ~= card and not (Card.no(other_joker, "immutable", true)) then
9211+
card.ability.blueprint_compat = "compatible"
9212+
else
9213+
card.ability.blueprint_compat = "incompatible"
9214+
end
9215+
end
9216+
end,
9217+
calculate = function(self, card, context)
9218+
if
9219+
(context.end_of_round and not context.repetition and not context.individual and not context.blueprint)
9220+
or context.forcetrigger
9221+
then
9222+
local check = false
9223+
for i = 1, #G.jokers.cards do
9224+
if G.jokers.cards[i] == card then
9225+
if i < #G.jokers.cards then
9226+
if not Card.no(G.jokers.cards[i + 1], "immutable", true) then
9227+
check = true
9228+
if G.jokers.cards[i + 1].ability.value_manip then
9229+
Cryptid.manipulate(G.jokers.cards[i + 1])
9230+
end
9231+
Cryptid.manipulate(G.jokers.cards[i + 1], { value = card.ability.extra.increase })
9232+
G.jokers.cards[i + 1].ability.value_manip = true
9233+
end
9234+
end
9235+
end
9236+
end
9237+
if check then
9238+
card_eval_status_text(
9239+
card,
9240+
"extra",
9241+
nil,
9242+
nil,
9243+
nil,
9244+
{ message = localize("k_upgrade_ex"), colour = G.C.GREEN }
9245+
)
9246+
end
9247+
end
9248+
end,
9249+
cry_credits = {
9250+
idea = {
9251+
"AlexZGreat",
9252+
},
9253+
art = {
9254+
"AlexZGreat",
9255+
},
9256+
code = {
9257+
"Foegro",
9258+
},
9259+
},
9260+
}
9261+
9262+
91459263
local tax_fraud = {
91469264
object_type = "Joker",
91479265
dependencies = {
@@ -10630,6 +10748,7 @@ local miscitems = {
1063010748
paved_joker,
1063110749
fading_joker,
1063210750
poor_joker,
10751+
oil_lamp
1063310752
}
1063410753

1063510754
return {

items/spooky.lua

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1673,16 +1673,22 @@ local jawbreaker = {
16731673
if G.jokers.cards[i] == card then
16741674
if i > 1 then
16751675
if not Card.no(G.jokers.cards[i - 1], "immutable", true) then
1676+
if G.jokers.cards[i - 1].ability.value_manip then
1677+
Cryptid.manipulate(G.jokers.cards[i - 1])
1678+
end
16761679
Cryptid.manipulate(G.jokers.cards[i - 1], { value = 2 })
16771680
local v = G.jokers.cards[i - 1]
1678-
v.config.cry_oil_lamp = (v.config.cry_oil_lamp or 1) * card.ability.extra
1681+
v.ability.value_manip = true
16791682
end
16801683
end
16811684
if i < #G.jokers.cards then
16821685
if not Card.no(G.jokers.cards[i + 1], "immutable", true) then
1686+
if G.jokers.cards[i + 1].ability.value_manip then
1687+
Cryptid.manipulate(G.jokers.cards[i + 1])
1688+
end
16831689
Cryptid.manipulate(G.jokers.cards[i + 1], { value = 2 })
16841690
local v = G.jokers.cards[i + 1]
1685-
v.config.cry_oil_lamp = (v.config.cry_oil_lamp or 1) * card.ability.extra
1691+
v.ability.value_manip = true
16861692
end
16871693
end
16881694
end

lib/misc.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1566,10 +1566,10 @@ function end_round()
15661566
er()
15671567
if G.GAME.round_resets.blind_states.Big == "Defeated" then
15681568
for i = 1, #G.jokers.cards do
1569-
if G.jokers.cards[i].config.cry_oil_lamp then
1570-
m = G.jokers.cards[i].config.cry_oil_lamp
1569+
if G.jokers.cards[i].ability.value_manip then
1570+
m = G.jokers.cards[i].ability.value_manip
15711571
Cryptid.manipulate(G.jokers.cards[i], { value = 1 / m })
1572-
G.jokers.cards[i].config.cry_oil_lamp = nil
1572+
G.jokers.cards[i].ability.value_manip = nil
15731573
end
15741574
end
15751575
end

localization/en-us.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1824,6 +1824,7 @@ return {
18241824
"{C:attention}Double{} all values",
18251825
"of leftmost {C:attention}Joker",
18261826
"at end of round",
1827+
"{C:inactive}(Value Modifer stacks){}"
18271828
},
18281829
},
18291830
j_cry_ghost = {
@@ -1927,6 +1928,7 @@ return {
19271928
"When {C:attention}Boss Blind{} defeated,",
19281929
"Temporarily {C:attention}Double{} values of adjacent Jokers",
19291930
"{E:2,C:red}self destructs{}",
1931+
"{C:inactive}(Value Modifer does not stack){}"
19301932
},
19311933
},
19321934
j_cry_jimball = {
@@ -2348,9 +2350,9 @@ return {
23482350
j_cry_oil_lamp = {
23492351
name = "Oil Lamp",
23502352
text = {
2351-
"Temporarily Increase values of {C:attention}Joker{}",
2353+
"Increase values of {C:attention}Joker{}",
23522354
"to the right by {C:attention}Twenty{} Percent",
2353-
"for the remainder of this ante",
2355+
"{C:inactive}(Value Modifer does not stack){}"
23542356
},
23552357
},
23562358
j_cry_oldblueprint = {
@@ -2931,6 +2933,7 @@ return {
29312933
"Temporarily Increase values of all",
29322934
"{C:attention}Jokers{} by {C:attention}Fifty{} Percent",
29332935
"for the remainder of this ante",
2936+
"{C:inactive}(Value Modifer does not stack){}"
29342937
},
29352938
},
29362939
j_cry_unity = {

0 commit comments

Comments
 (0)