Skip to content

Commit 44884bb

Browse files
Merge pull request #534 from bobjoe400/Big-Num-support
Sync up with main
2 parents 39a9b7d + 209d94c commit 44884bb

File tree

9 files changed

+153
-65
lines changed

9 files changed

+153
-65
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.5a~dev2",
12+
"version": "0.5.5b",
1313
"dependencies": [
1414
"Talisman (>=2.0.9)",
1515
"Steamodded (>=1.0.0~BETA-0314c)"

items/code.lua

Lines changed: 121 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2925,12 +2925,49 @@ local exploit = {
29252925
end
29262926
G.FUNCS.exploit_apply = function()
29272927
local hand_table = {
2928-
["High Card"] = { "high card", "high", "1oak", "1 of a kind", "haha one" },
2929-
["Pair"] = { "pair", "2oak", "2 of a kind", "m" },
2930-
["Two Pair"] = { "two pair", "2 pair", "mm", "pairpair" },
2931-
["Three of a Kind"] = { "three of a kind", "3 of a kind", "3oak", "trips", "triangle" },
2932-
["Straight"] = { "straight", "lesbian", "gay", "bisexual", "asexual" },
2933-
["Flush"] = { "flush", "skibidi", "toilet", "floosh" },
2928+
["High Card"] = {
2929+
"high card",
2930+
"high",
2931+
"1oak",
2932+
"1 of a kind",
2933+
"haha one",
2934+
},
2935+
["Pair"] = {
2936+
"pair",
2937+
"2oak",
2938+
"2 of a kind",
2939+
"m",
2940+
"window",
2941+
},
2942+
["Two Pair"] = {
2943+
"two pair",
2944+
"2 pair",
2945+
"mm",
2946+
"pairpair",
2947+
"pair of a kind",
2948+
},
2949+
["Three of a Kind"] = {
2950+
"three of a kind",
2951+
"3 of a kind",
2952+
"3oak",
2953+
"trips",
2954+
"triangle",
2955+
},
2956+
["Straight"] = {
2957+
"straight",
2958+
"lesbian",
2959+
"gay",
2960+
"bisexual",
2961+
"asexual",
2962+
"staircase",
2963+
},
2964+
["Flush"] = {
2965+
"flush",
2966+
"skibidi",
2967+
"toilet",
2968+
"floosh",
2969+
"monotone",
2970+
},
29342971
["Full House"] = {
29352972
"full house",
29362973
"full",
@@ -2947,14 +2984,69 @@ local exploit = {
29472984
"quads",
29482985
"four to the floor",
29492986
},
2950-
["Straight Flush"] = { "straight flush", "strush", "slush", "slushie", "slushy" },
2951-
["Five of a Kind"] = { "five of a kind", "5 of a kind", "5oak", "quints" },
2952-
["Flush House"] = { "flush house", "flouse", "outhouse" },
2953-
["Flush Five"] = { "flush five", "fish", "you know what that means", "five of a flush" },
2954-
["cry_Bulwark"] = { "bulwark", "flush rock", "stoned", "stone flush", "flush stone" },
2955-
["cry_Clusterfuck"] = { "clusterfuck", "fuck", "wtf" },
2956-
["cry_UltPair"] = { "ultimate pair", "ultpair", "ult pair", "pairpairpair" },
2957-
["cry_WholeDeck"] = { "the entire fucking deck", "deck", "tefd", "fifty-two", "you are fuck deck" },
2987+
["Straight Flush"] = {
2988+
"straight flush",
2989+
"strush",
2990+
"slush",
2991+
"slushie",
2992+
"slushy",
2993+
"monotone staircase",
2994+
},
2995+
["Five of a Kind"] = {
2996+
"five of a kind",
2997+
"5 of a kind",
2998+
"5oak",
2999+
"quints",
3000+
},
3001+
["Flush House"] = {
3002+
"flush house",
3003+
"flouse",
3004+
"outhouse",
3005+
"monotone house",
3006+
"the grey house",
3007+
},
3008+
["Flush Five"] = {
3009+
"flush five",
3010+
"fish",
3011+
"you know what that means",
3012+
"five of a flush",
3013+
"monotone fish",
3014+
},
3015+
["cry_Bulwark"] = {
3016+
"bulwark",
3017+
"flush rock",
3018+
"stoned",
3019+
"stone flush",
3020+
"flush stone",
3021+
"rock and stone",
3022+
},
3023+
["cry_Clusterfuck"] = {
3024+
"clusterfuck",
3025+
"fuck",
3026+
"wtf",
3027+
"cluster",
3028+
"what",
3029+
},
3030+
["cry_UltPair"] = {
3031+
"ultimate pair",
3032+
"ultpair",
3033+
"ult pair",
3034+
"pairpairpair",
3035+
"flush pair of a kind of a kind",
3036+
"2f2oakoak",
3037+
"two flush two of a kind of a kind",
3038+
},
3039+
["cry_WholeDeck"] = {
3040+
"the entire fucking deck",
3041+
"deck",
3042+
"tefd",
3043+
"fifty-two",
3044+
"you are fuck deck",
3045+
"deck of a kind",
3046+
"the entire deck",
3047+
"everything of a kind",
3048+
"everything",
3049+
},
29583050
}
29593051
local current_hand = nil
29603052
for k, v in pairs(SMODS.PokerHands) do
@@ -3091,13 +3183,21 @@ local rework = {
30913183
return { vars = {} }
30923184
end,
30933185
can_use = function(self, card)
3094-
return #G.jokers.highlighted == 1
3095-
and not G.jokers.highlighted[1].ability.eternal
3096-
and G.jokers.highlighted[1].ability.name ~= "cry-meteor"
3097-
and G.jokers.highlighted[1].ability.name ~= "cry-exoplanet"
3098-
and G.jokers.highlighted[1].ability.name ~= "cry-stardust"
3099-
and G.jokers.highlighted[1].config.center.rarity ~= "cry_cursed"
3100-
and (G.jokers.highlighted[1].ability.name ~= "Diet Cola" or Card.get_gameset(card) == "madness")
3186+
if not G.GAME.modifiers.cry_beta then
3187+
return #G.jokers.highlighted == 1
3188+
and not G.jokers.highlighted[1].ability.eternal
3189+
and G.jokers.highlighted[1].ability.name
3190+
~= ("cry-meteor" or "cry-exoplanet" or "cry-stardust" or "cry_cursed" or ("Diet Cola" or Card.get_gameset(
3191+
card
3192+
) == "madness"))
3193+
else
3194+
return #G.jokers.highlighted == 2
3195+
and not G.jokers.highlighted[1].ability.eternal
3196+
and G.jokers.highlighted[1].ability.name
3197+
~= ("cry-meteor" or "cry-exoplanet" or "cry-stardust" or "cry_cursed" or ("Diet Cola" or Card.get_gameset(
3198+
card
3199+
) == "madness"))
3200+
end
31013201
end,
31023202
use = function(self, card, area, copier)
31033203
local jkr = G.jokers.highlighted[1]

items/enhanced.lua

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -334,43 +334,9 @@ return {
334334
-- D Invisible Joker
335335

336336
if
337-
center.name == "Fortune Teller"
338-
or center.name == "Shoot the Moon"
339-
or center.name == "Riff-raff"
340-
or center.name == "Chaos the Clown"
341-
or center.name == "Dusk"
342-
or center.name == "Mime"
343-
or center.name == "Hack"
344-
or center.name == "Sock and Buskin"
345-
or center.name == "Invisible Joker"
346-
or center.name == "Swashbuckler"
347-
or center.name == "Smeared Joker"
348-
or center.name == "Certificate"
349-
or center.name == "Mr. Bones"
350-
or center.name == "Diet Cola"
351-
or center.name == "Luchador"
352-
or center.name == "Midas Mask"
353-
or center.name == "Shortcut"
354-
or center.name == "Seance"
355-
or center.name == "Superposition"
356-
or center.name == "Sixth Sense"
357-
or center.name == "DNA"
358-
or center.name == "Splash"
359-
or center.name == "Supernova"
360-
or center.name == "Pareidolia"
361-
or center.name == "Raised Fist"
362-
or center.name == "Marble Joker"
363-
or center.name == "Four Fingers"
364-
or center.name == "Joker Stencil"
365-
or center.name == "Showman"
366-
or center.name == "Blueprint"
367-
or center.name == "Oops! All 6s"
368-
or center.name == "Brainstorm"
369-
or center.name == "Cartomancer"
370-
or center.name == "Astronomer"
371-
or center.name == "Burnt Joker"
372-
or center.name == "Chicot"
373-
or center.name == "Perkeo"
337+
center
338+
and center.name
339+
== ("Fortune Teller" or "Shoot the Moon" or "Riff-raff" or "Chaos the Clown" or "Dusk" or "Mime" or "Hack" or "Sock and Buskin" or "Invisible Joker" or "Swashbuckler" or "Smeared Joker" or "Certificate" or "Mr. Bones" or "Diet Cola" or "Luchador" or "Midas Mask" or "Shortcut" or "Seance" or "Superposition" or "Sixth Sense" or "DNA" or "Splash" or "Supernova" or "Pareidolia" or "Raised Fist" or "Marble Joker" or "Four Fingers" or "Joker Stencil" or "Showman" or "Blueprint" or "Oops! All 6s" or "Brainstorm" or "Cartomancer" or "Astronomer" or "Burnt Joker" or "Chicot" or "Perkeo")
374340
then
375341
self.config.center.immutable = true
376342
end

items/epic.lua

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1973,7 +1973,12 @@ local spectrogram = {
19731973
end
19741974
end
19751975

1976-
if context.retrigger_joker_check and not context.retrigger_joker and context.other_card ~= self then
1976+
if
1977+
context.retrigger_joker_check
1978+
and not context.retrigger_joker
1979+
and context.other_card == G.jokers.cards[#G.jokers.cards]
1980+
and context.other_card ~= self
1981+
then
19771982
if card.ability.immutable.echonum and card.ability.immutable.echonum > 0 then
19781983
return {
19791984
message = localize("k_again_ex"),
@@ -2171,8 +2176,16 @@ local clockwork = { -- Steel Support: The Joker
21712176
and not context.end_of_round
21722177
and SMODS.has_enhancement(context.other_card, "m_steel")
21732178
and to_big(card.ability.extra.steelenhc) ~= to_big(1)
2174-
then -- effect 4
2175-
return { xmult = lenient_bignum(card.ability.extra.steelenhc) }
2179+
then
2180+
if context.other_card.debuff then
2181+
return {
2182+
message = localize("k_debuffed"),
2183+
colour = G.C.RED,
2184+
card = card,
2185+
}
2186+
else -- effect 4
2187+
return { xmult = lenient_bignum(card.ability.extra.steelenhc) }
2188+
end
21762189
end
21772190
--imo this secret effect can be madness only -Math
21782191
if

items/misc_joker.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1138,7 +1138,7 @@ local big_cube = {
11381138
name = "cry-Big Cube",
11391139
key = "big_cube",
11401140
joker_gate = "cry-Cube",
1141-
config = { extra = { x_chips = 6 } },
1141+
config = { extra = { x_chips = 6 }, override_x_chips_check = true },
11421142
pos = { x = 4, y = 4 },
11431143
rarity = 1,
11441144
order = 105,
@@ -8017,6 +8017,8 @@ local necromancer = {
80178017
and context.card.config.center.set == "Joker"
80188018
and G.GAME.jokers_sold
80198019
and #G.GAME.jokers_sold > 0
8020+
and not context.blueprint
8021+
and not context.retrigger_joker
80208022
then
80218023
local new_card = create_card(
80228024
"Joker",

items/spooky.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ local spy = {
651651
G.jokers.config.card_limit = G.jokers.config.card_limit - 1
652652
end,
653653
calculate = function(self, card, context)
654-
if context.cardarea == G.jokers and not context.before and not context.after then
654+
if context.joker_main then
655655
return {
656656
message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.x_mult } }),
657657
Xmult_mod = card.ability.x_mult,

lib/gameset.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,9 @@ function Card:get_gameset(center)
599599
end
600600
local csa = Card.set_ability
601601
function Card:set_ability(center, y, z)
602+
if not center then
603+
return
604+
end
602605
if not center.config then
603606
center.config = {} --crashproofing
604607
end

lib/misc.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ end
625625
function Cryptid.safe_get(t, ...)
626626
local current = t
627627
for _, k in ipairs({ ... }) do
628-
if current[k] == nil then
628+
if not current or current[k] == nil then
629629
return false
630630
end
631631
current = current[k]

lib/misprintize.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ function Cryptid.misprintize_tbl(name, ref_tbl, ref_value, clear, override, stac
4545
and not (k == "face_nominal")
4646
and not (k == "qty")
4747
and not (k == "x_mult" and v == 1 and not tbl.override_x_mult_check)
48+
and not (k == "x_chips" and v == 1 and not tbl.override_x_chips_check)
49+
and not (k == "h_x_chips")
4850
and not (k == "selected_d6_face")
4951
and not (k == "d_size")
5052
and not (k == "h_size")
@@ -96,6 +98,8 @@ function Cryptid.misprintize_tbl(name, ref_tbl, ref_value, clear, override, stac
9698
and not (_k == "face_nominal")
9799
and not (_k == "qty")
98100
and not (k == "x_mult" and v == 1 and not tbl[k].override_x_mult_check)
101+
and not (k == "x_chips" and v == 1 and not tbl[k].override_x_chips_check)
102+
and not (k == "h_x_chips")
99103
and not (_k == "selected_d6_face")
100104
and not (k == "d_size")
101105
and not (k == "h_size")

0 commit comments

Comments
 (0)