Skip to content
Open
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/atlasepic.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/atlasepic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
66 changes: 66 additions & 0 deletions items/epic.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2619,6 +2619,71 @@ local starfruit = {
end,
}

local sundial = {
object_type = "Joker",
dependencies = {
items = {
"set_cry_epic",
},
},
name = "cry-sundail",
key = "sundial",
rarity = "cry_epic",
cost = 14,
order = 300,
blueprint_compat = true,
demicoloncompat = true,
atlas = "atlasepic",
pos = { x = 5, y = 5 },
config = { extra = { handleft = 12, handloss = -1 } },

cry_credits = {
art = { "Tatturedlurker" },
code = { "candycanearter" },
idea = { "HexaCryonic" },
},

loc_vars = function(self, info_queue, center)
local active = "permanently"
if G.GAME.sundial then
active = "already active, does nothing"
end
return { vars = { number_format(center.ability.extra.handleft), G.GAME.sundial_amount, active } }
end,

in_pool = function(self)
return not G.GAME.sundial
end,

calculate = function(self, card, context)
if
context.before
and not context.blueprint
and not context.retrigger_joker
and not context.individual
and not context.repetition
and card.ability.extra.handleft > 0
then
SMODS.scale_card(card, {
ref_table = card.ability.extra,
ref_value = "handleft",
scalar_value = "handloss",
})
return { message = localize("k_upgrade_ex") }
end

if context.selling_self and not context.retrigger_joker and not context.blueprint then
if card.ability.extra.handleft < 1 then
G.GAME.sundial = true
G.GAME.cry_banished_keys[card.config.center.key] = true
return { message = localize("k_active_ex") }
else
return { message = localize("k_nope_ex") }
end
end
end,
}

return {
name = "Epic Jokers",
items = {
Expand Down Expand Up @@ -2649,5 +2714,6 @@ return {
clockwork,
demicolon,
starfruit,
sundial,
},
}
8 changes: 8 additions & 0 deletions lib/calculate.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
-- calculate.lua: modifications specifically for card calculation

-- this seems like a good spot to put the mod calc
SMODS.current_mod.calculate = function(self, context)
if context.setting_blind and G.GAME.sundial then
G.GAME.blind.chips = G.GAME.blind.chips * (1 - (G.GAME.sundial_amount / 100))
G.GAME.blind.chip_text = number_format(G.GAME.blind.chips)
end
end

-- deal with Rigged and Fragile when scoring a playing card
local ec = eval_card
function eval_card(card, context)
Expand Down
3 changes: 3 additions & 0 deletions lib/overrides.lua
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,9 @@ function Game:init_game_object()
g.cry_percrate[v:lower()] = 100
end

g.sundial = false
g.sundial_amount = 85

return g
end

Expand Down
8 changes: 8 additions & 0 deletions localization/en-us.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1615,6 +1615,14 @@ return {
"{C:attention}reroll{} in the shop",
},
},
j_cry_sundial = {
name = "Project Sundial",
text = {
"After playing #1# hands, {C:attention}sell this Joker",
"to reduce blind size by #2# percent",
"{C:red,E:1}#3#",
},
},
j_cry_digitalhallucinations = {
name = "Digital Hallucinations",
text = {
Expand Down