Skip to content

Commit 4eb0268

Browse files
etherware-novicejolly[bot]
andauthored
keychange (#794)
* done * jolly-bot: auto-format Lua files using Stylua * scale_card --------- Co-authored-by: jolly[bot] <jolly[bot]@users.noreply.github.com>
1 parent 3d1d6e5 commit 4eb0268

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

items/misc_joker.lua

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11002,6 +11002,58 @@ local thal = {
1100211002
end,
1100311003
}
1100411004

11005+
local keychange = {
11006+
cry_credits = {
11007+
idea = {
11008+
"arnideus",
11009+
},
11010+
art = {
11011+
"Tatteredlurker",
11012+
},
11013+
code = {
11014+
"candycanearter",
11015+
},
11016+
},
11017+
object_type = "Joker",
11018+
name = "cry-keychange",
11019+
key = "keychange",
11020+
atlas = "placeholders",
11021+
pos = { x = 1, y = 1 },
11022+
config = { extra = { xm = 1, xmgain = 0.25 } },
11023+
rarity = 2,
11024+
cost = 5,
11025+
order = 145,
11026+
demicoloncompat = true,
11027+
blueprint_compat = true,
11028+
11029+
loc_vars = function(self, info_queue, card)
11030+
return { vars = { card.ability.extra.xmgain, card.ability.extra.xm } }
11031+
end,
11032+
11033+
calculate = function(self, card, context)
11034+
if
11035+
context.before
11036+
and G.GAME.hands[context.scoring_name]
11037+
and G.GAME.hands[context.scoring_name].played_this_round < 2
11038+
then
11039+
SMODS.scale_card(card, {
11040+
ref_table = card.ability.extra,
11041+
ref_value = "xm",
11042+
scalar_value = "mgain",
11043+
})
11044+
end
11045+
11046+
if context.joker_main or context.force_trigger then
11047+
return { xmult = card.ability.extra.xm }
11048+
end
11049+
11050+
if context.end_of_round and context.main_eval and not context.blueprint then
11051+
card.ability.extra.xm = 1
11052+
return { message = localize("k_reset") }
11053+
end
11054+
end,
11055+
}
11056+
1100511057
local miscitems = {
1100611058
jimball_sprite,
1100711059
dropshot,
@@ -11135,6 +11187,7 @@ local miscitems = {
1113511187
poor_joker,
1113611188
broken_sync,
1113711189
thal,
11190+
keychange,
1113811191
}
1113911192

1114011193
return {

localization/en-us.lua

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1247,6 +1247,15 @@ return {
12471247
"{C:inactive}(Currently {C:white,X:mult}X#2#{C:inactive}){}",
12481248
},
12491249
},
1250+
j_cry_keychange = {
1251+
name = "Key Change",
1252+
text = {
1253+
"Gains {C:white,X:mult}X#1#{} if {C:attention}poker hand{} has",
1254+
"not been played this round",
1255+
"Resets at {C:attention}end of round{}",
1256+
"{C:inactive}(Currently {C:white,X:mult}X#2#{C:inactive{}){}",
1257+
},
1258+
},
12501259
j_cry_brittle = {
12511260
name = "Brittle Candy",
12521261
text = {

0 commit comments

Comments
 (0)