Skip to content

Commit 94844bd

Browse files
committed
ae, first try at legendary and other stuff
1 parent 48beb9b commit 94844bd

File tree

7 files changed

+27
-120
lines changed

7 files changed

+27
-120
lines changed

Cryptid.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"badge_text_colour": "FFFFFF",
1212
"version": "0.5.10",
1313
"dependencies": [
14-
"Steamodded (>=1.0.0~BETA-0623b)"
14+
"Steamodded (>=1.0.0~BETA-0711a)"
1515
],
1616
"conflicts": [
1717
"Saturn",

items/deck.lua

Lines changed: 4 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -353,58 +353,16 @@ local legendary = {
353353
},
354354
name = "cry-Legendary",
355355
key = "legendary",
356-
config = { cry_legendary = true, cry_legendary_rate = 0.2 },
356+
config = { cry_legendary = true, cry_legendary_rate = 0.33 },
357357
pos = { x = 0, y = 6 },
358358
atlas = "atlasdeck",
359359
order = 15,
360360
calculate = function(self, back, context)
361361
if context.context == "eval" and Cryptid.safe_get(G.GAME, "last_blind", "boss") then
362-
if G.jokers then
363-
if #G.jokers.cards < G.jokers.config.card_limit then
364-
local legendary_poll = pseudorandom(pseudoseed("cry_legendary"))
365-
legendary_poll = legendary_poll / (G.GAME.probabilities.normal or 1)
366-
if legendary_poll < self.config.cry_legendary_rate then
367-
local card = create_card("Joker", G.jokers, true, 4, nil, nil, nil, "")
368-
card:add_to_deck()
369-
card:start_materialize()
370-
G.jokers:emplace(card)
371-
return true
372-
else
373-
card_eval_status_text(
374-
G.jokers,
375-
"jokers",
376-
nil,
377-
nil,
378-
nil,
379-
{ message = localize("k_nope_ex"), colour = G.C.RARITY[4] }
380-
)
381-
end
382-
else
383-
card_eval_status_text(
384-
G.jokers,
385-
"jokers",
386-
nil,
387-
nil,
388-
nil,
389-
{ message = localize("k_no_room_ex"), colour = G.C.RARITY[4] }
390-
)
391-
end
392-
end
362+
SMODS.Events["ev_cry_choco10"]:finish()
363+
SMODS.Events["ev_cry_choco10"]:start()
393364
end
394365
end,
395-
apply = function(self)
396-
G.E_MANAGER:add_event(Event({
397-
func = function()
398-
if G.jokers then
399-
local card = create_card("Joker", G.jokers, true, 4, nil, nil, nil, "")
400-
card:add_to_deck()
401-
card:start_materialize()
402-
G.jokers:emplace(card)
403-
return true
404-
end
405-
end,
406-
}))
407-
end,
408366
unlocked = false,
409367
check_for_unlock = function(self, args)
410368
if Cryptid.safe_get(G, "jokers") then
@@ -669,7 +627,7 @@ local antimatter = {
669627
config = {
670628
cry_antimatter = true,
671629
cry_crit_rate = 0.25, --Critical Deck
672-
cry_legendary_rate = 0.2, --Legendary Deck
630+
cry_legendary_rate = 0.33, --Legendary Deck
673631
-- Enhanced Decks
674632
cry_force_enhancement = "random",
675633
cry_force_edition = "random",
@@ -877,23 +835,6 @@ local antimatter = {
877835
]]
878836
--
879837
--Legendary Deck
880-
if
881-
(Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_legendary", "wins", 8) or 0)
882-
~= 0
883-
or skip
884-
then
885-
G.E_MANAGER:add_event(Event({
886-
func = function()
887-
if G.jokers then
888-
local card = create_card("Joker", G.jokers, true, 4, nil, nil, nil, "")
889-
card:add_to_deck()
890-
card:start_materialize()
891-
G.jokers:emplace(card)
892-
return true
893-
end
894-
end,
895-
}))
896-
end
897838
--Encoded Deck
898839
if
899840
(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
@@ -1039,9 +1039,6 @@ local aequilibrium = {
10391039
demicoloncompat = true,
10401040
immutable = true,
10411041
loc_vars = function(self, info_queue, center)
1042-
if not center.edition or (center.edition and not center.edition.negative) then
1043-
info_queue[#info_queue + 1] = G.P_CENTERS.e_negative
1044-
end
10451042
local joker_generated = "???"
10461043
if G.GAME.aequilibriumkey and G.GAME.aequilibriumkey > 1 then
10471044
joker_generated = localize({
@@ -1057,11 +1054,14 @@ local aequilibrium = {
10571054
(context.cardarea == G.jokers and context.before and not context.retrigger_joker) or context.forcetrigger
10581055
then
10591056
for i = 1, math.floor(math.min(25, card.ability.extra.jokers)) do
1060-
local newcard = create_card("Joker", G.jokers, nil, nil, nil, nil, nil)
1061-
newcard:add_to_deck()
1062-
G.jokers:emplace(newcard)
1063-
newcard:set_edition({ negative = true }, true)
1057+
if #G.jokers.cards + G.GAME.joker_buffer < G.jokers.config.card_limit then
1058+
local newcard = create_card("Joker", G.jokers, nil, nil, nil, nil, nil)
1059+
newcard:add_to_deck()
1060+
G.jokers:emplace(newcard)
1061+
G.GAME.joker_buffer = G.GAME.joker_buffer + 1
1062+
end
10641063
end
1064+
G.GAME.joker_buffer = nil
10651065
return nil, true
10661066
end
10671067
end,

items/sleeve.lua

Lines changed: 2 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ if CardSleeves then
365365
name = "Legendary Sleeve",
366366
atlas = "atlasSleeves",
367367
pos = { x = 1, y = 1 },
368-
config = { cry_legendary = true, cry_legendary_rate = 0.2 },
368+
config = { cry_legendary = true, cry_legendary_rate = 0.33 },
369369
unlocked = true,
370370
unlock_condition = { deck = "Legendary Deck", stake = 1 },
371371
loc_vars = function(self)
@@ -406,19 +406,6 @@ if CardSleeves then
406406
end
407407
end
408408
end,
409-
apply = function(self)
410-
G.E_MANAGER:add_event(Event({
411-
func = function()
412-
if G.jokers then
413-
local card = create_card("Joker", G.jokers, true, 4, nil, nil, nil, "")
414-
card:add_to_deck()
415-
card:start_materialize()
416-
G.jokers:emplace(card)
417-
return true
418-
end
419-
end,
420-
}))
421-
end,
422409
})
423410
local spookysleeve = CardSleeves.Sleeve({
424411
key = "spooky_sleeve",
@@ -459,7 +446,7 @@ if CardSleeves then
459446
voucher = {},
460447
cry_antimatter = true,
461448
cry_crit_rate = 0.25, -- Critical Sleeve, Effect Rate
462-
cry_legendary_rate = 0.2, -- Legendary Sleeve, Effect Rate
449+
cry_legendary_rate = 0.33, -- Legendary Sleeve, Effect Rate
463450
cry_negative_rate = 20,
464451
cry_highlight_limit = 1e20,
465452
},
@@ -826,32 +813,6 @@ if CardSleeves then
826813
}))
827814
end
828815

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

items/voucher.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ local asteroglyph = { -- Heiroglyph T3; Set Ante to 0
909909
requires = { "v_petroglyph" },
910910
pools = { ["Tier3"] = true },
911911
config = {
912-
ante_mod = 1,
912+
ante_mod = 2,
913913
},
914914
loc_vars = function(self, info_queue, card)
915915
return { vars = { card.ability.ante_mod } }

lib/calculate.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ function eval_card(card, context)
1414
if card.will_shatter then
1515
return {}, {}
1616
end
17+
-- Store old probability for later reference
1718
local ret, post = ec(card, context)
1819
return ret, post
1920
end
@@ -359,6 +360,7 @@ function Card:cry_double_scale_calc(orig_ability, in_context_scaling)
359360
local obj = G.jokers.cards[i].config.center
360361
-- found one!
361362
if obj.cry_scale_mod and type(obj.cry_scale_mod) == "function" then
363+
362364
-- 'o' will be the new factor that the joker should scale by next time
363365
local o = obj:cry_scale_mod(
364366
G.jokers.cards[i],
@@ -434,6 +436,7 @@ function Card:cry_double_scale_calc(orig_ability, in_context_scaling)
434436
if (type(rep) == "table") and rep.repetitions and (rep.repetitions > 0) then
435437
for r = 1, rep.repetitions do
436438
card_eval_status_text(rep.card, "jokers", nil, nil, nil, rep)
439+
-- now, same thing as before, apply the scale-joker
437440
local o = obj:cry_scale_mod(
438441
G.jokers.cards[i],
439442
self,
@@ -755,6 +758,7 @@ function Cryptid.apply_scale_mod(jkr, orig_scale_scale, orig_scale_base, new_sca
755758
orig_scale_base,
756759
new_scale_base
757760
)
761+
758762
if o then
759763
if #dbl_info.scaler[info_i] == 2 then
760764
if

localization/en-us.lua

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -254,9 +254,10 @@ return {
254254
b_cry_legendary = {
255255
name = "Legendary Deck",
256256
text = {
257-
"Start with a {C:legendary}Legendary{C:legendary} Joker",
258-
"{C:green}1 in 5{} chance to create another",
259-
"when Boss Blind is defeated {C:inactive}(must have room){}",
257+
"{C:green}1 in 3{} chance to",
258+
"create a {C:legendary}Legendary{C:legendary} Joker",
259+
"when Boss Blind is defeated",
260+
"{C:inactive}(must have room){}"
260261
},
261262
unlock = {
262263
"Have {C:attention}2 Legendary Jokers",
@@ -3354,9 +3355,10 @@ return {
33543355
sleeve_cry_legendary_sleeve = {
33553356
name = "Legendary Sleeve",
33563357
text = {
3357-
"Start with an {C:legendary}Legendary{C:legendary} Joker",
3358-
"{C:green}1 in 5{} chance to create another",
3359-
"when Boss Blind is defeated {C:inactive}(must have room){}",
3358+
"{C:green}1 in 3{} chance to",
3359+
"create a {C:legendary}Legendary{C:legendary} Joker",
3360+
"when Boss Blind is defeated",
3361+
"{C:inactive}(must have room){}"
33603362
},
33613363
},
33623364
sleeve_cry_antimatter_sleeve = {
@@ -3366,7 +3368,6 @@ return {
33663368
"and {C:attention}special effects{}",
33673369
"of {C:attention}every{} sleeve won",
33683370
"with {C:gold}Gold Stake{}",
3369-
"{C:red}WIP",
33703371
},
33713372
},
33723373
},

0 commit comments

Comments
 (0)