Skip to content

Commit 7caea7b

Browse files
committed
pluralize fixes
1 parent 1d373e6 commit 7caea7b

File tree

5 files changed

+145
-116
lines changed

5 files changed

+145
-116
lines changed

items/epic.lua

Lines changed: 112 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2614,7 +2614,7 @@ local chad = {
26142614
name = "cry-Chad",
26152615
key = "chad",
26162616
pos = { x = 0, y = 3 },
2617-
order = 301,
2617+
order = 300.25,
26182618
config = {
26192619
extra = { retriggers = 2 },
26202620
immutable = { max_retriggers = 25 },
@@ -2655,6 +2655,116 @@ local chad = {
26552655
},
26562656
}
26572657

2658+
local oil_lamp = { --You want it? It's yours my friend
2659+
object_type = "Joker",
2660+
dependencies = {
2661+
items = {
2662+
"set_cry_misc_joker",
2663+
},
2664+
},
2665+
name = "cry-Oil-Lamp",
2666+
key = "oil_lamp",
2667+
pos = { x = 4, y = 5 },
2668+
config = { extra = { increase = 1.2 } },
2669+
rarity = "cry_epic",
2670+
cost = 15,
2671+
order = 300.5,
2672+
atlas = "atlastwo",
2673+
demicoloncompat = true,
2674+
immutable = true,
2675+
loc_vars = function(self, info_queue, card)
2676+
card.ability.blueprint_compat_ui = card.ability.blueprint_compat_ui or ""
2677+
card.ability.blueprint_compat_check = nil
2678+
return {
2679+
vars = { number_format(card.ability.extra.increase) },
2680+
main_end = (card.area and card.area == G.jokers) and {
2681+
{
2682+
n = G.UIT.C,
2683+
config = { align = "bm", minh = 0.4 },
2684+
nodes = {
2685+
{
2686+
n = G.UIT.C,
2687+
config = {
2688+
ref_table = card,
2689+
align = "m",
2690+
colour = G.C.JOKER_GREY,
2691+
r = 0.05,
2692+
padding = 0.06,
2693+
func = "blueprint_compat",
2694+
},
2695+
nodes = {
2696+
{
2697+
n = G.UIT.T,
2698+
config = {
2699+
ref_table = card.ability,
2700+
ref_value = "blueprint_compat_ui",
2701+
colour = G.C.UI.TEXT_LIGHT,
2702+
scale = 0.32 * 0.8,
2703+
},
2704+
},
2705+
},
2706+
},
2707+
},
2708+
},
2709+
} or nil,
2710+
}
2711+
end,
2712+
update = function(self, card, front)
2713+
if G.STAGE == G.STAGES.RUN then
2714+
for i = 1, #G.jokers.cards do
2715+
if G.jokers.cards[i] == card then
2716+
other_joker = G.jokers.cards[i + 1]
2717+
end
2718+
end
2719+
if other_joker and other_joker ~= card and not (Card.no(other_joker, "immutable", true)) then
2720+
card.ability.blueprint_compat = "compatible"
2721+
else
2722+
card.ability.blueprint_compat = "incompatible"
2723+
end
2724+
end
2725+
end,
2726+
calculate = function(self, card, context)
2727+
if
2728+
(context.end_of_round and not context.repetition and not context.individual and not context.blueprint)
2729+
or context.forcetrigger
2730+
then
2731+
local check = false
2732+
for i = 1, #G.jokers.cards do
2733+
if G.jokers.cards[i] == card then
2734+
if i < #G.jokers.cards then
2735+
if not Card.no(G.jokers.cards[i + 1], "immutable", true) then
2736+
check = true
2737+
Cryptid.manipulate(G.jokers.cards[i + 1], { value = card.ability.extra.increase })
2738+
G.jokers.cards[i + 1].config.cry_oil_lamp = (G.jokers.cards[i + 1].config.cry_oil_lamp or 1) * card.ability.extra.increase
2739+
end
2740+
end
2741+
end
2742+
end
2743+
if check then
2744+
card_eval_status_text(
2745+
card,
2746+
"extra",
2747+
nil,
2748+
nil,
2749+
nil,
2750+
{ message = localize("k_upgrade_ex"), colour = G.C.GREEN }
2751+
)
2752+
end
2753+
end
2754+
end,
2755+
cry_credits = {
2756+
idea = {
2757+
"AlexZGreat",
2758+
},
2759+
art = {
2760+
"AlexZGreat",
2761+
},
2762+
code = {
2763+
"Foegro",
2764+
},
2765+
},
2766+
}
2767+
26582768
return {
26592769
name = "Epic Jokers",
26602770
items = {
@@ -2686,5 +2796,6 @@ return {
26862796
demicolon,
26872797
starfruit,
26882798
chad,
2799+
oil_lamp
26892800
},
26902801
}

items/misc_joker.lua

Lines changed: 2 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -8835,6 +8835,7 @@ local tropical_smoothie = {
88358835
order = 125,
88368836
atlas = "atlastwo",
88378837
pools = { ["Food"] = true },
8838+
immutable = true,
88388839
loc_vars = function(self, info_queue, center)
88398840
return { vars = { number_format(center.ability.extra) } }
88408841
end,
@@ -8845,6 +8846,7 @@ local tropical_smoothie = {
88458846
if v ~= card then
88468847
if not Card.no(v, "immutable", true) then
88478848
Cryptid.manipulate(v, { value = card.ability.extra })
8849+
v.config.cry_oil_lamp = (v.config.cry_oil_lamp or 1) * card.ability.extra
88488850
check = true
88498851
end
88508852
end
@@ -9142,113 +9144,6 @@ local necromancer = {
91429144
},
91439145
},
91449146
}
9145-
local oil_lamp = { --You want it? It's yours my friend
9146-
object_type = "Joker",
9147-
dependencies = {
9148-
items = {
9149-
"set_cry_misc_joker",
9150-
},
9151-
},
9152-
name = "cry-Oil-Lamp",
9153-
key = "oil_lamp",
9154-
pos = { x = 4, y = 5 },
9155-
config = { extra = { increase = 1.2 } },
9156-
rarity = 3,
9157-
cost = 10,
9158-
order = 127,
9159-
atlas = "atlastwo",
9160-
demicoloncompat = true,
9161-
loc_vars = function(self, info_queue, card)
9162-
card.ability.blueprint_compat_ui = card.ability.blueprint_compat_ui or ""
9163-
card.ability.blueprint_compat_check = nil
9164-
return {
9165-
vars = { number_format(card.ability.extra.increase) },
9166-
main_end = (card.area and card.area == G.jokers) and {
9167-
{
9168-
n = G.UIT.C,
9169-
config = { align = "bm", minh = 0.4 },
9170-
nodes = {
9171-
{
9172-
n = G.UIT.C,
9173-
config = {
9174-
ref_table = card,
9175-
align = "m",
9176-
colour = G.C.JOKER_GREY,
9177-
r = 0.05,
9178-
padding = 0.06,
9179-
func = "blueprint_compat",
9180-
},
9181-
nodes = {
9182-
{
9183-
n = G.UIT.T,
9184-
config = {
9185-
ref_table = card.ability,
9186-
ref_value = "blueprint_compat_ui",
9187-
colour = G.C.UI.TEXT_LIGHT,
9188-
scale = 0.32 * 0.8,
9189-
},
9190-
},
9191-
},
9192-
},
9193-
},
9194-
},
9195-
} or nil,
9196-
}
9197-
end,
9198-
update = function(self, card, front)
9199-
if G.STAGE == G.STAGES.RUN then
9200-
for i = 1, #G.jokers.cards do
9201-
if G.jokers.cards[i] == card then
9202-
other_joker = G.jokers.cards[i + 1]
9203-
end
9204-
end
9205-
if other_joker and other_joker ~= card and not (Card.no(other_joker, "immutable", true)) then
9206-
card.ability.blueprint_compat = "compatible"
9207-
else
9208-
card.ability.blueprint_compat = "incompatible"
9209-
end
9210-
end
9211-
end,
9212-
calculate = function(self, card, context)
9213-
if
9214-
(context.end_of_round and not context.repetition and not context.individual and not context.blueprint)
9215-
or context.forcetrigger
9216-
then
9217-
local check = false
9218-
for i = 1, #G.jokers.cards do
9219-
if G.jokers.cards[i] == card then
9220-
if i < #G.jokers.cards then
9221-
if not Card.no(G.jokers.cards[i + 1], "immutable", true) then
9222-
check = true
9223-
Cryptid.manipulate(G.jokers.cards[i + 1], { value = card.ability.extra.increase })
9224-
end
9225-
end
9226-
end
9227-
end
9228-
if check then
9229-
card_eval_status_text(
9230-
card,
9231-
"extra",
9232-
nil,
9233-
nil,
9234-
nil,
9235-
{ message = localize("k_upgrade_ex"), colour = G.C.GREEN }
9236-
)
9237-
end
9238-
end
9239-
end,
9240-
cry_credits = {
9241-
idea = {
9242-
"AlexZGreat",
9243-
},
9244-
art = {
9245-
"AlexZGreat",
9246-
},
9247-
code = {
9248-
"Foegro",
9249-
},
9250-
},
9251-
}
92529147
local tax_fraud = {
92539148
object_type = "Joker",
92549149
dependencies = {
@@ -10699,7 +10594,6 @@ local miscitems = {
1069910594
--carved_pumpkin,
1070010595
cookie,
1070110596
necromancer,
10702-
oil_lamp,
1070310597
tax_fraud,
1070410598
pity_prize,
1070510599
digitalhallucinations,

items/spooky.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1668,11 +1668,15 @@ local jawbreaker = {
16681668
if i > 1 then
16691669
if not Card.no(G.jokers.cards[i - 1], "immutable", true) then
16701670
Cryptid.manipulate(G.jokers.cards[i - 1], { value = 2 })
1671+
local v = G.jokers.cards[i - 1]
1672+
v.config.cry_oil_lamp = (v.config.cry_oil_lamp or 1) * card.ability.extra
16711673
end
16721674
end
16731675
if i < #G.jokers.cards then
16741676
if not Card.no(G.jokers.cards[i + 1], "immutable", true) then
16751677
Cryptid.manipulate(G.jokers.cards[i + 1], { value = 2 })
1678+
local v = G.jokers.cards[i + 1]
1679+
v.config.cry_oil_lamp = (v.config.cry_oil_lamp or 1) * card.ability.extra
16761680
end
16771681
end
16781682
end

lib/misc.lua

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,9 @@ function Cryptid.pluralize(str, vars)
220220
table.sort(keys, function(a, b)
221221
return a < b
222222
end)
223+
if not (tonumber(num) or is_number(num)) then
224+
num = 1
225+
end
223226
for _, k in ipairs(keys) do
224227
if fch(checks[k], "=") then
225228
if to_big(math.abs(num - k)) < to_big(0.001) then
@@ -1557,3 +1560,18 @@ function Cryptid.upgrade_rarity(card, seed)
15571560
card:juice_up()
15581561
end
15591562
end
1563+
1564+
local er = end_round
1565+
function end_round()
1566+
er()
1567+
print(G.GAME.round_resets.blind_states)
1568+
if G.GAME.round_resets.blind_states.Big == "Defeated" then
1569+
for i = 1, #G.jokers.cards do
1570+
if G.jokers.cards[i].config.cry_oil_lamp then
1571+
m = G.jokers.cards[i].config.cry_oil_lamp
1572+
Cryptid.manipulate(G.jokers.cards[i], { value = 1 / m })
1573+
G.jokers.cards[i].config.cry_oil_lamp = nil
1574+
end
1575+
end
1576+
end
1577+
end

localization/en-us.lua

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1924,7 +1924,7 @@ return {
19241924
name = "Jawbreaker",
19251925
text = {
19261926
"When {C:attention}Boss Blind{} defeated,",
1927-
"{C:attention}double{} values of adjacent Jokers",
1927+
"Temporarily {C:attention}Double{} values of adjacent Jokers",
19281928
"{E:2,C:red}self destructs{}",
19291929
},
19301930
},
@@ -2347,8 +2347,9 @@ return {
23472347
j_cry_oil_lamp = {
23482348
name = "Oil Lamp",
23492349
text = {
2350-
"Increase values of {C:attention}Joker{} to the right",
2351-
"by {C:attention}X#1#{} at end of round",
2350+
"Temporarily Increase values of {C:attention}Joker{}",
2351+
"to the right by {C:attention}Twenty{} Percent",
2352+
"for the remainder of this ante"
23522353
},
23532354
},
23542355
j_cry_oldblueprint = {
@@ -2925,9 +2926,10 @@ return {
29252926
j_cry_tropical_smoothie = {
29262927
name = "Tropical Smoothie",
29272928
text = {
2928-
"Sell this card",
2929-
"to {C:attention}multiply{} values",
2930-
"of owned Jokers by {C:attention}X#1#{}",
2929+
"Sell this card to",
2930+
"Temporarily Increase values of all",
2931+
"{C:attention}Jokers{} by {C:attention}Fifty{} Percent",
2932+
"for the remainder of this ante"
29312933
},
29322934
},
29332935
j_cry_unity = {
@@ -3293,7 +3295,7 @@ return {
32933295
"{C:attention}same chance{} of",
32943296
"appearing in shops,",
32953297
"start run with",
3296-
"{C:attention,T:v_overstock_plus}+2 Shop Slots",
3298+
"{C:attention}+1 Shop Slots",
32973299
},
32983300
},
32993301
sleeve_cry_glowing_sleeve = {

0 commit comments

Comments
 (0)