Skip to content

Commit ba38a4e

Browse files
authored
New Joker: Emergency Chips (#805)
* first draft of emergency chips * second pass at the code * en-us localization text * added to list of items * added images added missing comma * making the atlas actually work * okay so like it actually works now * added "saved" and "nope" depending on what happens when you sell it * getting it to actually work
1 parent 10749ff commit ba38a4e

File tree

4 files changed

+70
-0
lines changed

4 files changed

+70
-0
lines changed

assets/1x/atlasthree.png

19.6 KB
Loading

assets/2x/atlasthree.png

19 KB
Loading

items/misc_joker.lua

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11054,6 +11054,66 @@ local keychange = {
1105411054
end,
1105511055
}
1105611056

11057+
local emergencychips = {
11058+
cry_credits = {
11059+
idea = {
11060+
"AlexZGreat",
11061+
},
11062+
art = {
11063+
"Tatteredlurker"
11064+
},
11065+
code = {
11066+
"BobJoe400",
11067+
},
11068+
},
11069+
object_type = "Joker",
11070+
name = "cry-emergencychips",
11071+
key = "emergencychips",
11072+
atlas = "atlasthree",
11073+
pos = { x = 2, y = 8 },
11074+
config = { immutable = { blind_mult = 0.2 } },
11075+
rarity = 1,
11076+
cost = 3,
11077+
order = 145,
11078+
demicoloncompat = false,
11079+
blueprint_compat = true,
11080+
11081+
loc_vars = function(self, info_queue, card)
11082+
return {
11083+
vars = {
11084+
number_format(card.ability.immutable.blind_mult * 100),
11085+
number_format(G and G.GAME and G.GAME.blind and G.GAME.blind.chips and to_big(G.GAME.blind.chips) > to_big(0) and (G.GAME.blind.chips * card.ability.immutable.blind_mult) or 0)
11086+
},
11087+
}
11088+
end,
11089+
11090+
calculate = function(self, card, context)
11091+
if context.selling_self and not context.forcetrigger then
11092+
if G.STATE ~= G.STATES.SELECTING_HAND then
11093+
return
11094+
end
11095+
11096+
G.E_MANAGER:add_event(Event({
11097+
func = function()
11098+
G.hand_text_area.game_chips:juice_up()
11099+
play_sound('glass'..math.random(1, 6), math.random()*0.2 + 0.9,0.5)
11100+
return true
11101+
end,
11102+
}))
11103+
11104+
G.GAME.chips = G.GAME.chips + G.GAME.blind.chips * card.ability.immutable.blind_mult
11105+
G.STATE = G.STATES.HAND_PLAYED
11106+
G.STATE_COMPLETE = false
11107+
11108+
if to_big(G.GAME.chips) >= to_big(G.GAME.blind.chips) then
11109+
return { message = localize("k_saved_ex")}
11110+
else
11111+
return { message = localize("k_nope_ex")}
11112+
end
11113+
end
11114+
end,
11115+
}
11116+
1105711117
local miscitems = {
1105811118
jimball_sprite,
1105911119
dropshot,
@@ -11188,6 +11248,7 @@ local miscitems = {
1118811248
broken_sync,
1118911249
thal,
1119011250
keychange,
11251+
emergencychips,
1119111252
}
1119211253

1119311254
return {

localization/en-us.lua

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1720,6 +1720,15 @@ return {
17201720
"{C:inactive,s:0.8}you don't deserve me at my 2x\"",
17211721
},
17221722
},
1723+
j_cry_emergencychips = {
1724+
name = "Emergency Chips",
1725+
text = {
1726+
"Immediately gain",
1727+
"{C:chips}#1#%{} of blind requirement",
1728+
"as score when sold",
1729+
"{C:inactive}(Currently {}{C:chips}#2#{}{C:inactive}){}",
1730+
}
1731+
},
17231732
j_cry_energia = {
17241733
name = "Energia",
17251734
text = {

0 commit comments

Comments
 (0)