Skip to content

Commit f1ffe1c

Browse files
authored
Merge pull request #753 from SpectralPack/temp
sync changes with branch
2 parents 14aa00f + 24dd11f commit f1ffe1c

File tree

15 files changed

+2079
-587
lines changed

15 files changed

+2079
-587
lines changed

Cryptid.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"priority": 114,
1010
"badge_colour": "708b91",
1111
"badge_text_colour": "FFFFFF",
12-
"version": "0.5.10~dev3",
12+
"version": "0.5.10",
1313
"dependencies": [
1414
"Steamodded (>=1.0.0~BETA-0614a)"
1515
],
3.17 KB
Binary file not shown.

assets/1x/intercept_sprite.png

318 Bytes
Loading
4.44 KB
Binary file not shown.

assets/2x/intercept_sprite.png

514 Bytes
Loading

items/code.lua

Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1033,15 +1033,19 @@ local exploit = {
10331033
return true
10341034
end,
10351035
use = function(self, card, area, copier)
1036+
-- Un-use the card (re-use code is in lib/misc.lua)
10361037
if not card.ability.cry_multiuse or to_big(card.ability.cry_multiuse) <= to_big(1) then
10371038
G.GAME.CODE_DESTROY_CARD = copy_card(card)
10381039
G.consumeables:emplace(G.GAME.CODE_DESTROY_CARD)
1039-
else
1040-
G.GAME.CODE_DESTROY_CARD = card
1040+
G.GAME.CODE_DESTROY_CARD.ability.cry_multiuse = nil
1041+
end
1042+
if card.ability.cry_multiuse then
10411043
card.ability.cry_multiuse = card.ability.cry_multiuse + 1
10421044
end
1045+
10431046
G.GAME.USING_CODE = true
10441047
G.GAME.USING_EXPLOIT = true
1048+
G.GAME.ACTIVE_CODE_CARD = G.GAME.CODE_DESTROY_CARD or card
10451049
G.FUNCS.overlay_menu({ definition = G.UIDEF.exploit_menu() })
10461050
end,
10471051
}
@@ -3082,12 +3086,18 @@ local class = {
30823086
return { vars = { Cryptid.safe_get(card, "ability", "max_highlighted") or self.config.max_highlighted } }
30833087
end,
30843088
use = function(self, card, area, copier)
3089+
-- Un-use the card
30853090
if not card.ability.cry_multiuse or to_big(card.ability.cry_multiuse) <= to_big(1) then
30863091
G.GAME.CODE_DESTROY_CARD = copy_card(card)
30873092
G.consumeables:emplace(G.GAME.CODE_DESTROY_CARD)
3093+
G.GAME.CODE_DESTROY_CARD.ability.cry_multiuse = nil
3094+
end
3095+
if card.ability.cry_multiuse then
3096+
card.ability.cry_multiuse = card.ability.cry_multiuse + 1
30883097
end
30893098
G.GAME.USING_CODE = true
30903099
G.GAME.USING_CLASS = card.ability.max_highlighted
3100+
G.GAME.ACTIVE_CODE_CARD = G.GAME.CODE_DESTROY_CARD or card
30913101
G.FUNCS.overlay_menu({ definition = create_UIBox_class() })
30923102
end,
30933103
init = function(self)
@@ -3111,10 +3121,19 @@ local class = {
31113121
end
31123122
G.hand:unhighlight_all()
31133123
ccl(self)
3114-
if G.GAME.CODE_DESTROY_CARD then
3115-
G.GAME.CODE_DESTROY_CARD:start_dissolve()
3116-
G.GAME.CODE_DESTROY_CARD = nil
3124+
-- Re-use the card
3125+
if G.GAME.ACTIVE_CODE_CARD then
3126+
if
3127+
not G.GAME.ACTIVE_CODE_CARD.ability.cry_multiuse
3128+
or to_big(G.GAME.ACTIVE_CODE_CARD.ability.cry_multiuse) <= to_big(1)
3129+
then
3130+
G.GAME.ACTIVE_CODE_CARD:start_dissolve()
3131+
else
3132+
G.GAME.ACTIVE_CODE_CARD.ability.cry_multiuse =
3133+
lenient_bignum(to_big(G.GAME.ACTIVE_CODE_CARD.ability.cry_multiuse) - to_big(1))
3134+
end
31173135
end
3136+
G.GAME.ACTIVE_CODE_CARD = nil
31183137
end
31193138
else
31203139
ccl(self)
@@ -3306,12 +3325,18 @@ local variable = {
33063325
return { vars = { Cryptid.safe_get(card, "ability", "max_highlighted") or self.config.max_highlighted } }
33073326
end,
33083327
use = function(self, card, area, copier)
3328+
-- Un-use the card
33093329
if not card.ability.cry_multiuse or to_big(card.ability.cry_multiuse) <= to_big(1) then
33103330
G.GAME.CODE_DESTROY_CARD = copy_card(card)
33113331
G.consumeables:emplace(G.GAME.CODE_DESTROY_CARD)
3332+
G.GAME.CODE_DESTROY_CARD.ability.cry_multiuse = nil
3333+
end
3334+
if card.ability.cry_multiuse then
3335+
card.ability.cry_multiuse = card.ability.cry_multiuse + 1
33123336
end
33133337
G.GAME.USING_CODE = true
33143338
G.GAME.USING_VARIABLE = card.ability.max_highlighted
3339+
G.GAME.ACTIVE_CODE_CARD = G.GAME.CODE_DESTROY_CARD or card
33153340
G.FUNCS.overlay_menu({ definition = create_UIBox_variable_code() })
33163341
end,
33173342
init = function(self)
@@ -3335,10 +3360,19 @@ local variable = {
33353360
end
33363361
G.hand:unhighlight_all()
33373362
ccl(self)
3338-
if G.GAME.CODE_DESTROY_CARD then
3339-
G.GAME.CODE_DESTROY_CARD:start_dissolve()
3340-
G.GAME.CODE_DESTROY_CARD = nil
3363+
-- Re-use the card
3364+
if G.GAME.ACTIVE_CODE_CARD then
3365+
if
3366+
not G.GAME.ACTIVE_CODE_CARD.ability.cry_multiuse
3367+
or to_big(G.GAME.ACTIVE_CODE_CARD.ability.cry_multiuse) <= to_big(1)
3368+
then
3369+
G.GAME.ACTIVE_CODE_CARD:start_dissolve()
3370+
else
3371+
G.GAME.ACTIVE_CODE_CARD.ability.cry_multiuse =
3372+
lenient_bignum(to_big(G.GAME.ACTIVE_CODE_CARD.ability.cry_multiuse) - to_big(1))
3373+
end
33413374
end
3375+
G.GAME.ACTIVE_CODE_CARD = nil
33423376
end
33433377
else
33443378
ccl(self)
@@ -3485,7 +3519,8 @@ local log = {
34853519
local pseudorandom = copy_table(G.GAME.pseudorandom)
34863520
local j = {}
34873521
for i = 1, 5 do
3488-
j[#j + 1] = G.localization.descriptions["Joker"][Cryptid.predict_joker("sho")].name
3522+
local next_joker = G.localization.descriptions["Joker"][Cryptid.predict_joker("sho")]
3523+
j[#j + 1] = next_joker and next_joker.name or "[NOT A JOKER]"
34893524
end
34903525
G.GAME.pseudorandom = copy_table(pseudorandom)
34913526
G.GAME.USING_CODE = true

items/misc.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1693,7 +1693,7 @@ local jollyedition = {
16931693
and context.cardarea == G.play
16941694
)
16951695
then
1696-
return { card and card.edition and card.edition.mult or self.config.mult } -- updated value
1696+
return { mult = card and card.edition and card.edition.mult or self.config.mult } -- updated value
16971697
end
16981698
if context.joker_main then
16991699
card.config.trigger = true -- context.edition triggers twice, this makes it only trigger once (only for jonklers)

items/misc_joker.lua

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2629,24 +2629,6 @@ local maze = {
26292629
order = 61,
26302630
immutable = true,
26312631
atlas = "atlastwo",
2632-
update = function(self, card, dt)
2633-
if G.STAGE == G.STAGES.RUN then
2634-
if G.GAME.current_round.hands_played > 0 then
2635-
G.GAME.current_round.hands_played = 0
2636-
end
2637-
if G.GAME.current_round.discards_used > 0 then
2638-
G.GAME.current_round.discards_used = 0
2639-
end
2640-
end
2641-
end,
2642-
add_to_deck = function(self, card, from_debuff)
2643-
if G.GAME.current_round.hands_played > 0 then
2644-
G.GAME.current_round.hands_played = 0
2645-
end
2646-
if G.GAME.current_round.discards_used > 0 then
2647-
G.GAME.current_round.discards_used = 0
2648-
end
2649-
end,
26502632
cry_credits = {
26512633
idea = {
26522634
"zy-b-org",

lib/content.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,14 @@ SMODS.Atlas({
789789
px = 73,
790790
py = 95,
791791
})
792+
793+
-- CCD Clarifier Sprite
794+
SMODS.Atlas({
795+
key = "cry_clarifier",
796+
path = "intercept_sprite.png",
797+
px = 71,
798+
py = 95,
799+
})
792800
SMODS.Atlas({
793801
key = "glowingSleeve",
794802
path = "sleeve_cry_glowing.png",

lib/misc.lua

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,8 +1168,8 @@ G.FUNCS.exit_overlay_menu_code = function(e)
11681168
and G.GAME.CODE_DESTROY_CARD.ability.cry_multiuse
11691169
then
11701170
G.GAME.CODE_DESTROY_CARD.ability.cry_multiuse = G.GAME.CODE_DESTROY_CARD.ability.cry_multiuse - 1
1171-
G.GAME.CODE_DESTROY_CARD = nil
11721171
end
1172+
G.GAME.CODE_DESTROY_CARD = nil
11731173
end
11741174

11751175
function G.UIDEF.exploit_menu()
@@ -1218,10 +1218,19 @@ function Controller:L_cursor_press(x, y)
12181218
and G.CONTROLLER.cursor_hover.target.config.on_demand_tooltip.filler.args
12191219
and G.GAME.hands[G.CONTROLLER.cursor_hover.target.config.on_demand_tooltip.filler.args]
12201220
then
1221-
if G.GAME.CODE_DESTROY_CARD then
1222-
G.GAME.CODE_DESTROY_CARD:start_dissolve()
1223-
G.GAME.CODE_DESTROY_CARD = nil
1221+
-- Re-use the Exploit card
1222+
if G.GAME.ACTIVE_CODE_CARD then
1223+
if
1224+
not G.GAME.ACTIVE_CODE_CARD.ability.cry_multiuse
1225+
or to_big(G.GAME.ACTIVE_CODE_CARD.ability.cry_multiuse) <= to_big(1)
1226+
then
1227+
G.GAME.ACTIVE_CODE_CARD:start_dissolve()
1228+
else
1229+
G.GAME.ACTIVE_CODE_CARD.ability.cry_multiuse =
1230+
lenient_bignum(to_big(G.GAME.ACTIVE_CODE_CARD.ability.cry_multiuse) - to_big(1))
1231+
end
12241232
end
1233+
G.GAME.ACTIVE_CODE_CARD = nil
12251234
G.GAME.cry_exploit_override = G.GAME.USING_EXPLOIT_HAND
12261235
G.FUNCS.exit_overlay_menu_code()
12271236
end

0 commit comments

Comments
 (0)