Skip to content

Commit ffdee1d

Browse files
authored
Merge branch 'balance-things' into temp
2 parents be5a735 + 508ada1 commit ffdee1d

File tree

11 files changed

+46
-154
lines changed

11 files changed

+46
-154
lines changed

Cryptid.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"badge_text_colour": "FFFFFF",
1212
"version": "0.5.10",
1313
"dependencies": [
14-
"Talisman (>=2.2.0a)",
1514
"Steamodded (>=1.0.0~BETA-0711a)"
1615
],
1716
"conflicts": [

items/deck.lua

Lines changed: 4 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -358,58 +358,16 @@ local legendary = {
358358
},
359359
name = "cry-Legendary",
360360
key = "legendary",
361-
config = { cry_legendary = true, cry_legendary_rate = 0.2 },
361+
config = { cry_legendary = true, cry_legendary_rate = 0.33 },
362362
pos = { x = 0, y = 6 },
363363
atlas = "atlasdeck",
364364
order = 15,
365365
calculate = function(self, back, context)
366366
if context.context == "eval" and Cryptid.safe_get(G.GAME, "last_blind", "boss") then
367-
if G.jokers then
368-
if #G.jokers.cards < G.jokers.config.card_limit then
369-
local legendary_poll = pseudorandom(pseudoseed("cry_legendary"))
370-
legendary_poll = legendary_poll / (G.GAME.probabilities.normal or 1)
371-
if legendary_poll < self.config.cry_legendary_rate then
372-
local card = create_card("Joker", G.jokers, true, 4, nil, nil, nil, "")
373-
card:add_to_deck()
374-
card:start_materialize()
375-
G.jokers:emplace(card)
376-
return true
377-
else
378-
card_eval_status_text(
379-
G.jokers,
380-
"jokers",
381-
nil,
382-
nil,
383-
nil,
384-
{ message = localize("k_nope_ex"), colour = G.C.RARITY[4] }
385-
)
386-
end
387-
else
388-
card_eval_status_text(
389-
G.jokers,
390-
"jokers",
391-
nil,
392-
nil,
393-
nil,
394-
{ message = localize("k_no_room_ex"), colour = G.C.RARITY[4] }
395-
)
396-
end
397-
end
367+
SMODS.Events["ev_cry_choco10"]:finish()
368+
SMODS.Events["ev_cry_choco10"]:start()
398369
end
399370
end,
400-
apply = function(self)
401-
G.E_MANAGER:add_event(Event({
402-
func = function()
403-
if G.jokers then
404-
local card = create_card("Joker", G.jokers, true, 4, nil, nil, nil, "")
405-
card:add_to_deck()
406-
card:start_materialize()
407-
G.jokers:emplace(card)
408-
return true
409-
end
410-
end,
411-
}))
412-
end,
413371
unlocked = false,
414372
check_for_unlock = function(self, args)
415373
if Cryptid.safe_get(G, "jokers") then
@@ -677,7 +635,7 @@ local antimatter = {
677635
config = {
678636
cry_antimatter = true,
679637
cry_crit_rate = 0.25, --Critical Deck
680-
cry_legendary_rate = 0.2, --Legendary Deck
638+
cry_legendary_rate = 0.33, --Legendary Deck
681639
-- Enhanced Decks
682640
cry_force_enhancement = "random",
683641
cry_force_edition = "random",
@@ -912,23 +870,6 @@ local antimatter = {
912870
]]
913871
--
914872
--Legendary Deck
915-
if
916-
(Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_legendary", "wins", 8) or 0)
917-
~= 0
918-
or skip
919-
then
920-
G.E_MANAGER:add_event(Event({
921-
func = function()
922-
if G.jokers then
923-
local card = create_card("Joker", G.jokers, true, 4, nil, nil, nil, "")
924-
card:add_to_deck()
925-
card:start_materialize()
926-
G.jokers:emplace(card)
927-
return true
928-
end
929-
end,
930-
}))
931-
end
932873
--Encoded Deck
933874
if
934875
(Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_encoded", "wins", 8) or 0)

items/exotic.lua

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1067,9 +1067,6 @@ local aequilibrium = {
10671067
demicoloncompat = true,
10681068
immutable = true,
10691069
loc_vars = function(self, info_queue, center)
1070-
if not center.edition or (center.edition and not center.edition.negative) then
1071-
info_queue[#info_queue + 1] = G.P_CENTERS.e_negative
1072-
end
10731070
local joker_generated = "???"
10741071
if G.GAME.aequilibriumkey and G.GAME.aequilibriumkey > 1 then
10751072
joker_generated = localize({
@@ -1085,11 +1082,14 @@ local aequilibrium = {
10851082
(context.cardarea == G.jokers and context.before and not context.retrigger_joker) or context.forcetrigger
10861083
then
10871084
for i = 1, math.floor(math.min(25, card.ability.extra.jokers)) do
1088-
local newcard = create_card("Joker", G.jokers, nil, nil, nil, nil, nil)
1089-
newcard:add_to_deck()
1090-
G.jokers:emplace(newcard)
1091-
newcard:set_edition({ negative = true }, true)
1085+
if #G.jokers.cards + G.GAME.joker_buffer < G.jokers.config.card_limit then
1086+
local newcard = create_card("Joker", G.jokers, nil, nil, nil, nil, nil)
1087+
newcard:add_to_deck()
1088+
G.jokers:emplace(newcard)
1089+
G.GAME.joker_buffer = G.GAME.joker_buffer + 1
1090+
end
10921091
end
1092+
G.GAME.joker_buffer = nil
10931093
return nil, true
10941094
end
10951095
end,

items/m.lua

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -565,8 +565,12 @@ local notebook = {
565565
end
566566
if
567567
to_number(jollycount) >= to_number(card.ability.extra.jollies) --if there are 5 or more jolly jokers
568-
or pseudorandom("cry_notebook")
569-
< cry_prob(card.ability.cry_prob, card.ability.extra.odds, card.ability.cry_rigged) / card.ability.extra.odds
568+
or SMODS.pseudorandom_probability(
569+
card,
570+
"cry_notebook",
571+
1,
572+
card and card.ability.extra.odds or self.config.extra.odds
573+
)
570574
then
571575
card.ability.immutable.slots = to_number(
572576
math.min(
@@ -842,9 +846,12 @@ local scrabble = {
842846
if context.cardarea == G.jokers and context.before and not context.retrigger_joker then
843847
local check = false
844848
if
845-
pseudorandom("scrabbleother")
846-
< cry_prob(card.ability.cry_prob, card.ability.extra.odds, card.ability.cry_rigged)
847-
/ card.ability.extra.odds
849+
SMODS.pseudorandom_probability(
850+
card,
851+
"scrabbleother",
852+
1,
853+
card and card.ability.extra.odds or self.config.extra.odds
854+
)
848855
then
849856
check = true
850857
local card = create_card("Joker", G.jokers, nil, 0.9, nil, nil, nil, "scrabbletile")

items/misc.lua

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ local echo = {
3535
calculate = function(self, card, context)
3636
if
3737
context.repetition
38-
and pseudorandom("echo")
39-
< cry_prob(card.ability.cry_prob or 1, card.ability.extra or 2, card.ability.cry_rigged) / (card.ability.extra or 2)
38+
and SMODS.pseudorandom_probability(card, "cry_echo", 1, card and card.ability.extra or self.config.extra)
4039
then
4140
return {
4241
message = localize("k_again_ex"),

items/misc_joker.lua

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7928,9 +7928,12 @@ local busdriver = {
79287928
if context.joker_main and (to_big(card.ability.extra.mult) > to_big(0)) then
79297929
local oddy = math.max(1, card.ability.extra.odds)
79307930
if
7931-
pseudorandom("busdriver")
7932-
< 1
7933-
- (1 / (cry_prob(card.ability.cry_prob, card.ability.extra.odds, card.ability.cry_rigged) * oddy))
7931+
SMODS.pseudorandom_probability(
7932+
card,
7933+
"cry_busdriver",
7934+
3,
7935+
card and card.ability.extra.odds or self.config.extra.odds
7936+
)
79347937
then
79357938
return {
79367939
message = localize({
@@ -9488,10 +9491,7 @@ local digitalhallucinations = {
94889491

94899492
if
94909493
context.open_booster
9491-
and (
9492-
pseudorandom("digi")
9493-
< cry_prob(card.ability.cry_prob, card.ability.odds, card.ability.cry_rigged) / card.ability.odds
9494-
)
9494+
and (SMODS.pseudorandom_probability(card, "digi", 1, card and card.ability.odds or self.config.odds))
94959495
then
94969496
local boosty = context.card
94979497
-- finally mod compat?

items/sleeve.lua

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ if CardSleeves then
366366
name = "Legendary Sleeve",
367367
atlas = "atlasSleeves",
368368
pos = { x = 1, y = 1 },
369-
config = { cry_legendary = true, cry_legendary_rate = 0.2 },
369+
config = { cry_legendary = true, cry_legendary_rate = 0.33 },
370370
unlocked = true,
371371
unlock_condition = { deck = "Legendary Deck", stake = 1 },
372372
loc_vars = function(self)
@@ -407,19 +407,6 @@ if CardSleeves then
407407
end
408408
end
409409
end,
410-
apply = function(self)
411-
G.E_MANAGER:add_event(Event({
412-
func = function()
413-
if G.jokers then
414-
local card = create_card("Joker", G.jokers, true, 4, nil, nil, nil, "")
415-
card:add_to_deck()
416-
card:start_materialize()
417-
G.jokers:emplace(card)
418-
return true
419-
end
420-
end,
421-
}))
422-
end,
423410
})
424411
local spookysleeve = CardSleeves.Sleeve({
425412
key = "spooky_sleeve",
@@ -460,7 +447,7 @@ if CardSleeves then
460447
voucher = {},
461448
cry_antimatter = true,
462449
cry_crit_rate = 0.25, -- Critical Sleeve, Effect Rate
463-
cry_legendary_rate = 0.2, -- Legendary Sleeve, Effect Rate
450+
cry_legendary_rate = 0.33, -- Legendary Sleeve, Effect Rate
464451
cry_negative_rate = 20,
465452
cry_highlight_limit = 1e20,
466453
},
@@ -829,32 +816,6 @@ if CardSleeves then
829816
}))
830817
end
831818

832-
-- Legendary Sleeve, Start Joker
833-
if
834-
(
835-
Cryptid.safe_get(
836-
G.PROFILES,
837-
G.SETTINGS.profile,
838-
"sleeve_usage",
839-
"sleeve_cry_legendary_sleeve",
840-
"wins_by_key",
841-
"stake_gold"
842-
) or 0
843-
) ~= 0
844-
then
845-
G.E_MANAGER:add_event(Event({
846-
func = function()
847-
if G.jokers then
848-
local card = create_card("Joker", G.jokers, true, 4, nil, nil, nil, "")
849-
card:add_to_deck()
850-
card:start_materialize()
851-
G.jokers:emplace(card)
852-
return true
853-
end
854-
end,
855-
}))
856-
end
857-
858819
-- Encoded Sleeve
859820
if
860821
(

items/voucher.lua

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -898,8 +898,11 @@ local asteroglyph = { -- Heiroglyph T3; Set Ante to 0
898898
pos = { x = 5, y = 2 },
899899
requires = { "v_petroglyph" },
900900
pools = { ["Tier3"] = true },
901-
loc_vars = function(self, info_queue)
902-
return { vars = { Cryptid.asteroglyph_ante() } }
901+
config = {
902+
ante_mod = 2,
903+
},
904+
loc_vars = function(self, info_queue, card)
905+
return { vars = { card.ability.ante_mod } }
903906
end,
904907
redeem = function(self)
905908
local mod = -G.GAME.round_resets.ante + Cryptid.asteroglyph_ante()

lib/calculate.lua

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,6 @@ function eval_card(card, context)
1515
return {}, {}
1616
end
1717
-- Store old probability for later reference
18-
local ggpn = G.GAME.probabilities.normal
19-
if card.ability.cry_rigged then
20-
G.GAME.probabilities.normal = 1e9
21-
end
2218
local ret, post = ec(card, context)
2319
if card.ability.cry_rigged then
2420
G.GAME.probabilities.normal = ggpn
@@ -461,10 +457,6 @@ function Card:cry_double_scale_calc(orig_ability, in_context_scaling)
461457
for r = 1, rep.repetitions do
462458
card_eval_status_text(rep.card, "jokers", nil, nil, nil, rep)
463459
-- now, same thing as before, apply the scale-joker
464-
local ggpn = G.GAME.probabilities.normal
465-
if G.jokers.cards[i].ability.cry_rigged then
466-
G.GAME.probabilities.normal = 1e9
467-
end
468460
local o = obj:cry_scale_mod(
469461
G.jokers.cards[i],
470462
self,
@@ -473,9 +465,6 @@ function Card:cry_double_scale_calc(orig_ability, in_context_scaling)
473465
orig_scale_base,
474466
new_scale_base
475467
)
476-
if G.jokers.cards[i].ability.cry_rigged then
477-
G.GAME.probabilities.normal = ggpn
478-
end
479468

480469
if o then
481470
if #dbl_info.scaler[info_i] == 2 then
@@ -815,9 +804,6 @@ function Cryptid.apply_scale_mod(jkr, orig_scale_scale, orig_scale_base, new_sca
815804
orig_scale_base,
816805
new_scale_base
817806
)
818-
if G.jokers.cards[i].ability.cry_rigged then
819-
G.GAME.probabilities.normal = ggpn
820-
end
821807

822808
if o then
823809
if #dbl_info.scaler[info_i] == 2 then

lib/overrides.lua

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -516,11 +516,6 @@ function Game:update(dt)
516516
G.STATE = G.STATES.SELECTING_HAND
517517
G.STATE_COMPLETE = false
518518
end
519-
if G.STATE == G.STATES.NEW_ROUND or G.STATE == G.STATES.HAND_PLAYED then
520-
none_eval = none_eval + dt
521-
else
522-
none_eval = 0
523-
end
524519
end
525520

526521
-- All the scattered set_cost hooks from all the pre refactor files moved into one hook

0 commit comments

Comments
 (0)