Skip to content

Commit 863507e

Browse files
committed
add pizza and pizza slice
1 parent 916d302 commit 863507e

File tree

4 files changed

+128
-0
lines changed

4 files changed

+128
-0
lines changed

assets/1x/atlastwo.png

9.71 KB
Loading

assets/2x/atlastwo.png

1.21 KB
Loading

items/misc_joker.lua

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10246,6 +10246,116 @@ local yarnball = { -- +1 to all listed probabilities for the highest cat tag lev
1024610246
end,
1024710247
}
1024810248

10249+
local pizza = { -- +1 to all listed probabilities for the highest cat tag level
10250+
cry_credits = {
10251+
idea = {
10252+
"Enemui",
10253+
},
10254+
art = {
10255+
"George The Rat",
10256+
},
10257+
code = {
10258+
"lord.ruby",
10259+
},
10260+
},
10261+
object_type = "Joker",
10262+
dependencies = {
10263+
items = {
10264+
"set_cry_misc_joker",
10265+
"j_cry_pizza_slice"
10266+
},
10267+
},
10268+
name = "cry-pizza",
10269+
key = "pizza",
10270+
atlas = "atlastwo",
10271+
pos = { x = 6, y = 5 },
10272+
rarity = 3,
10273+
cost = 8,
10274+
order = 141,
10275+
demicoloncompat = true,
10276+
config = { extra = { rounds_needed = 3, rounds_left = 3, slices = 6 }, immutable = {max_spawn = 100} },
10277+
loc_vars = function(self, info_queue, card)
10278+
info_queue[#info_queue+1] = G.P_CENTERS.j_cry_pizza_slice
10279+
return { vars = { number_format(card.ability.extra.rounds_needed), number_format(card.ability.extra.rounds_left),
10280+
number_format(math.min(card.ability.extra.slices, card.ability.immutable.max_spawn)) } }
10281+
end,
10282+
calculate = function(self, card, context)
10283+
if context.end_of_round and not context.retrigger_joker and not context.blueprint and not context.individual and not context.repetition then
10284+
card.ability.extra.rounds_left = card.ability.extra.rounds_left - 1
10285+
if to_big(card.ability.extra.rounds_left) < to_big(0) then
10286+
card.ability.extra.rounds_left = 0
10287+
else
10288+
return {
10289+
message = number_format(card.ability.extra.rounds_needed-card.ability.extra.rounds_left).."/"..number_format(card.ability.extra.rounds_needed),
10290+
colour = G.C.FILTER
10291+
}
10292+
end
10293+
end
10294+
if context.selling_self or context.forcetrigger then
10295+
if to_big(card.ability.extra.rounds_left) <= to_big(0) or context.forcetrigger then
10296+
for i = 1, to_number(math.min(card.ability.extra.slices, card.ability.immutable.max_spawn)), G.jokers.config.card_limit - #G.jokers.cards do
10297+
SMODS.add_card({
10298+
key = "j_cry_pizza_slice",
10299+
area = G.jokers
10300+
})
10301+
end
10302+
end
10303+
end
10304+
end
10305+
}
10306+
10307+
local pizza_slice = { -- +1 to all listed probabilities for the highest cat tag level
10308+
cry_credits = {
10309+
idea = {
10310+
"Enemui",
10311+
},
10312+
art = {
10313+
"George The Rat",
10314+
},
10315+
code = {
10316+
"lord.ruby",
10317+
},
10318+
},
10319+
object_type = "Joker",
10320+
dependencies = {
10321+
items = {
10322+
"set_cry_misc_joker",
10323+
"j_cry_pizza"
10324+
},
10325+
},
10326+
name = "cry-pizza_slice",
10327+
key = "pizza_slice",
10328+
atlas = "atlastwo",
10329+
pos = { x = 6, y = 4 },
10330+
rarity = 3,
10331+
cost = 8,
10332+
order = 141,
10333+
in_pool = function()
10334+
return false
10335+
end,
10336+
demicoloncompat = false,
10337+
config = { extra = { xmult = 1, xmult_mod = 0.5 } },
10338+
loc_vars = function(self, info_queue, card)
10339+
return { vars = { number_format(card.ability.extra.xmult_mod), number_format(card.ability.extra.xmult)} }
10340+
end,
10341+
calculate = function(self, card, context)
10342+
if context.joker_main then
10343+
return {
10344+
xmult = card.ability.xmult
10345+
}
10346+
end
10347+
if context.selling_card and context.card and context.card.config.center.key == "j_cry_pizza_slice" then
10348+
if context.card ~= card then
10349+
card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmult_mod
10350+
return {
10351+
message = localize{ type = "variable", key = "a_xmult", vars = { card.ability.extra.xmult } },
10352+
colour = G.C.FILTER
10353+
}
10354+
end
10355+
end
10356+
end
10357+
}
10358+
1024910359
local miscitems = {
1025010360
jimball_sprite,
1025110361
dropshot,
@@ -10372,6 +10482,8 @@ local miscitems = {
1037210482
sock_and_sock,
1037310483
brokenhome,
1037410484
--yarnball,
10485+
pizza,
10486+
pizza_slice
1037510487
}
1037610488
return {
1037710489
name = "Misc. Jokers",

localization/en-us.lua

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2682,6 +2682,22 @@ return {
26822682
"to all {C:green}listed probabilities",
26832683
},
26842684
},
2685+
j_cry_pizza = {
2686+
name = "Pizza",
2687+
text = {
2688+
"After {C:attention}#1#{} {C:inactive}[#2#]{} round#<s>1#",
2689+
"sell this Joker to create",
2690+
"{C:attention}#3#{} Pizza Slices"
2691+
},
2692+
},
2693+
j_cry_pizza_slice = {
2694+
name = "Pizza Slice",
2695+
text = {
2696+
"This Joker gains {X:mult,C:white}X#1#{}",
2697+
"per {C:attention}Pizza Slice{} sold",
2698+
"{C:inactive}(Currently{} {X:mult,C:white}X#2#{}{C:inactive}){}"
2699+
},
2700+
},
26852701
j_cry_spaceglobe = {
26862702
name = "Celestial Globe",
26872703
text = {

0 commit comments

Comments
 (0)