mods updates

This commit is contained in:
Vomitblood 2025-03-25 03:09:00 +08:00
parent 579a80139d
commit 281676c04d
228 changed files with 13616 additions and 3904 deletions

View file

@ -1,46 +0,0 @@
## Requirements
- [Lovely](https://github.com/ethangreen-dev/lovely-injector) - a Balatro injector.
## Installation
1. Install [Lovely](https://github.com/ethangreen-dev/lovely-injector?tab=readme-ov-file#manual-installation).
2. Download the [latest release](https://github.com/stupxd/Cartomancer/releases/) of this mod.
3. Unzip the folder, and move it into the `%appdata%/Balatro/Mods` folder.
4. Restart the game to load the mod.
## Features
1. Limit amount of cards visible in your deck pile, to make it appear smaller. Default limit is 100 cards, which can be modified in mod config menu.
![cards-pile-difference](git-assets/deck-pile.jpg)
2. Improved deck view
- Stack identical playing cards, which looks much cleaner and improves performance.
![stackable-cards-difference](git-assets/stackable-cards.jpg)
- Optionally, stack cards regardless of modifier, if your deck has tons of unique cards.
- Hide drawn cards from deck view
4. Custom scoring flames intensity and SFX volume.
5. Hide non-essential (edition) shaders.
6. Improved jokers management
- Option to hide all jokers (improves performance at 100+ jokers).
- Zoom into the jokers area for easier jokers management and navigation.
![zoom-jokers-difference](git-assets/zoom-jokers.jpg)
Settings for this mod can be found under `Mods` tab, if you use Steamodded 1.0.0 - find `Cartomancer`, and open `Config` tab.
If you play vanilla, go to `Settings` and open ![cartomancer](assets/1x/modicon.png) tab.
## Credits
[Jen Walter](https://github.com/jenwalter666/) for the code for UI box on stacked cards.
[Mysthaps](https://github.com/Mysthaps/) for most of the initial mod config code.

View file

@ -1,14 +0,0 @@
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0
# Patches applied before steamodded.
[[patches]]
[patches.copy]
target = "main.lua"
position = "prepend"
sources = [
"core/view-deck-steamodded.lua",
]

View file

@ -1,49 +0,0 @@
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0
# Patch dynamic ante display into
# function create_UIBox_your_collection_blinds(exit)
# this will only work for vanilla, as steamodded overrides this
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = "local ante_amounts = {}"
position = "before"
payload = '''
local min_ante = 1
local max_ante = 16
local spacing = 1 - 15*0.06
if G.GAME and G.GAME.round_resets and G.GAME.round_resets.ante then
local current_ante = G.GAME.round_resets.ante
if current_ante > 8 then
min_ante = current_ante - 8 + 1
max_ante = current_ante + 8
end
end
'''
match_indent = true
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = "for i = 1, math.min(16, math.max(16, G.PROFILES[G.SETTINGS.profile].high_scores.furthest_ante.amt)) do"
position = "at"
payload = '''
for i = min_ante, max_ante do
'''
match_indent = true
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = "local spacing = 1 - math.min(20, math.max(15, G.PROFILES[G.SETTINGS.profile].high_scores.furthest_ante.amt))*0.06"
position = "at"
payload = '''
-- :3
'''
match_indent = true

View file

@ -1,30 +0,0 @@
[manifest]
version = "1.0.0"
dump_lua = true
priority = 69
[[patches]]
[patches.regex]
target = "functions/button_callbacks.lua"
position = "at"
pattern = '''
(?<value>math\.max\(0\., math\.log\(G\.ARGS\.score_intensity\.earned_score, 5\)-2\))'''
payload = "Cartomancer.get_flames_intensity()"
[[patches]]
[patches.regex]
target = "functions/misc_functions.lua"
position = "at"
pattern = '''
(?<value>\(not G\.video_organ and G\.STATE == G\.STATES\.SPLASH\) and 0 or AC\[k\]\.vol and v\.volfunc\(AC\[k\]\.vol\) or 0)'''
payload = "Cartomancer.handle_flames_volume($value)"
[[patches]]
[patches.pattern]
target = 'functions/button_callbacks.lua'
pattern = '''_F.timer = _F.timer + G.real_dt*(1 + _F.intensity*0.2)'''
position = 'at'
payload = '''
_F.timer = Cartomancer.handle_flames_timer(_F.timer, _F.intensity)'''
match_indent = true

View file

@ -1,30 +0,0 @@
[manifest]
version = "1.0.0"
dump_lua = true
priority = 0
# Add no sort button to
# create_UIBox_buttons
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = '''
{n=G.UIT.T, config={text = localize('b_sort_hand'), scale = text_scale*0.8, colour = G.C.UI.TEXT_LIGHT}}'''
position = "before"
payload = '''
Cartomancer.SETTINGS.improved_hand_sorting and
create_toggle{ col = true, label = localize('b_sort_hand'), label_scale = text_scale*0.8, scale = 0.30, w = 0, shadow = true, ref_table = G.hand, ref_value = 'cart_sorting', callback = function () G.FUNCS.cartomancer_sort_hand_off() end }
or'''
match_indent = true
# Set default value of G.hand.cart_sorting
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = '''
function create_UIBox_buttons()'''
position = "after"
payload = '''
if G.hand and G.hand.cart_sorting == nil then G.hand.cart_sorting = true end
'''
match_indent = true

View file

@ -1,28 +0,0 @@
[manifest]
version = "1.0.0"
dump_lua = true
priority = 69
[[patches]]
[patches.pattern]
target = "cardarea.lua"
pattern = "self.children.area_uibox:draw()"
position = "after"
payload = '''
if self == G.jokers then
Cartomancer.add_visibility_controls()
end
'''
match_indent = true
[[patches]]
[patches.pattern]
target = "cardarea.lua"
pattern = "function CardArea:emplace(card, location, stay_flipped)"
position = "after"
payload = '''
if self == G.jokers then
Cartomancer.handle_joker_added(card)
end
'''
match_indent = true

View file

@ -1,20 +0,0 @@
[manifest]
version = "1.0.0"
dump_lua = true
priority = 69
[[patches]]
[patches.pattern]
target = 'engine/controller.lua'
pattern = "function Controller:key_press_update(key, dt)"
position = "after"
payload = '''
if key == "escape" and Cartomancer.INTERNAL_in_config then
Cartomancer.INTERNAL_in_config = false
if not Cartomancer.use_smods() then
Cartomancer.save_config()
end
end
'''
match_indent = true

View file

@ -1,86 +0,0 @@
[manifest]
version = "1.0.0"
dump_lua = true
priority = 69
# Make all drawn cards visible
[[patches]]
[patches.pattern]
target = "cardarea.lua"
pattern = "local stay_flipped = G.GAME and G.GAME.blind and G.GAME.blind:stay_flipped(self, card)"
position = "before"
payload = '''
if self == G.hand and not card.states.visible then
card.states.visible = true
end'''
match_indent = true
# Fix drawing specific card staying invisible
[[patches]]
[patches.pattern]
target = "functions/common_events.lua"
pattern = "local stay_flipped = G.GAME and G.GAME.blind and G.GAME.blind:stay_flipped(to, card)"
position = "before"
payload = '''
if card and to == G.hand and not card.states.visible then
card.states.visible = true
end'''
match_indent = true
# Replace drawing deck pile
[[patches]]
[patches.regex]
target = "cardarea.lua"
pattern = '''
(?<indent>[\t ]*)local deck_height \= \(self\.config\.deck_height or 0\.15\)\/52
[\t ]*for k, card in ipairs\(self\.cards\) do
[\t ]* if card\.facing \=\= 'front' then card\:flip\(\) end
[\t ]*
[\t ]* if not card\.states\.drag\.is then
[\t ]* card\.T\.x \= self\.T\.x \+ 0\.5\*\(self\.T\.w \- card\.T\.w\) \+ self\.shadow_parrallax\.x\*deck_height\*\(\#self\.cards\/\(self \=\= G\.deck and 1 or 2\) \- k\) \+ 0\.9\*self\.shuffle_amt\*\(1 \- k\*0\.01\)\*\(k%2 \=\= 1 and 1 or \-0\)
[\t ]* card\.T\.y \= self\.T\.y \+ 0\.5\*\(self\.T\.h \- card\.T\.h\) \+ self\.shadow_parrallax\.y\*deck_height\*\(\#self\.cards\/\(self \=\= G\.deck and 1 or 2\) \- k\)
[\t ]* card\.T\.r \= 0 \+ 0\.3\*self\.shuffle_amt\*\(1 \+ k\*0\.05\)\*\(k%2 \=\= 1 and 1 or \-0\)
[\t ]* card\.T\.x \= card\.T\.x \+ card\.shadow_parrallax\.x\/30
[\t ]* end
[\t ]*end'''
position = "at"
payload = '''
local display_limit
if not Cartomancer.SETTINGS.compact_deck_enabled then
display_limit = 999999
else
display_limit = Cartomancer.SETTINGS.compact_deck_visible_cards
end
local deck_height = (self.config.deck_height or 0.15)/52
local total_cards = #self.cards <= display_limit and #self.cards or display_limit -- limit height
local fixedX, fixedY, fixedR = nil, nil, nil
for k, card in ipairs(self.cards) do
if card.facing == 'front' then card:flip() end
if not card.states.drag.is then
if fixedX then
card.T.x = fixedX
card.T.y = fixedY
card.T.r = fixedR -- rotation
card.states.visible = false
else
card.T.x = self.T.x + 0.5*(self.T.w - card.T.w) + self.shadow_parrallax.x*deck_height*(total_cards/(self == G.deck and 1 or 2) - k) + 0.9*self.shuffle_amt*(1 - k*0.01)*(k%2 == 1 and 1 or -0)
card.T.y = self.T.y + 0.5*(self.T.h - card.T.h) + self.shadow_parrallax.y*deck_height*(total_cards/(self == G.deck and 1 or 2) - k)
card.T.r = 0 + 0.3*self.shuffle_amt*(1 + k*0.05)*(k%2 == 1 and 1 or -0)
card.T.x = card.T.x + card.shadow_parrallax.x/30
card.states.visible = true
if k >= display_limit then
fixedX = card.T.x
fixedY = card.T.y
fixedR = card.T.r
end
end
end
end'''
line_prepend = '$indent'

View file

@ -1,15 +0,0 @@
[manifest]
version = "1.0.0"
dump_lua = true
priority = 69
# Add unique count
[[patches]]
[patches.pattern]
target = "main.lua"
match_indent = true
pattern = "modded and {"
position = "before"
payload = '''
not unplayed_only and Cartomancer.add_unique_count() or nil, -- Cartomancer Steamodded 0.9.8 compatibility'''

View file

@ -1,31 +0,0 @@
[manifest]
version = "1.0.0"
dump_lua = true
priority = 69
# Initialize upvalue from file above, and override NFS.read now.
[[patches]]
[patches.pattern]
target = "main.lua"
match_indent = true
pattern = "SMODS.path = find_self(SMODS.MODS_DIR, 'core.lua', '--- STEAMODDED CORE')"
position = "after"
payload = '''
Cartomancer_nfs_read = NFS.read
NFS.read = Cartomancer_nfs_read_override
'''
# todo : use lovely for view deck patches
#[[patches]]
#[patches.pattern]
#target = "Steamodded - src/overrides.lua"
#match_indent = true
#pattern = "--- STEAMODDED CORE"
#position = "after"
#payload = '''
#-- YO WHADDUP
#print"------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"
#'''

View file

@ -1,118 +0,0 @@
[manifest]
version = "1.0.0"
dump_lua = true
priority = 69
#
# Vanilla patches
#
# Overwrite how suits are added
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = "table.insert(SUITS[v.base.suit], v)"
position = "at"
payload = '''
local greyed
if unplayed_only and not ((v.area and v.area == G.deck) or v.ability.wheel_flipped) then
greyed = true
end
local card_string = v:cart_to_string()
if greyed then
card_string = card_string .. "Greyed"
end
if greyed and Cartomancer.SETTINGS.deck_view_hide_drawn_cards then
-- Ignore this card.
elseif not SUITS[v.base.suit][card_string] then
table.insert(SUITS_SORTED[v.base.suit], card_string)
local _scale = 0.7
local copy = copy_card(v, nil, _scale)
copy.greyed = greyed
copy.stacked_quantity = 1
SUITS[v.base.suit][card_string] = copy
else
local stacked_card = SUITS[v.base.suit][card_string]
stacked_card.stacked_quantity = stacked_card.stacked_quantity + 1
end'''
match_indent = true
[[patches]]
[patches.regex]
target = "functions/UI_definitions.lua"
pattern = '''
if SUITS\[suit_map\[j\]\]\[1\] then
[\t ]*local view_deck = CardArea\('''
position = "at"
payload = '''
if SUITS_SORTED[suit_map[j]][1] then
local view_deck = CardArea('''
line_prepend = ''
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = "local suit_map = {'Spades', 'Hearts', 'Clubs', 'Diamonds'}"
position = "after"
payload = "local SUITS_SORTED = Cartomancer.tablecopy(SUITS)"
match_indent = true
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = "{card_limit = #SUITS[suit_map[j]], type = 'title', view_deck = true, highlight_limit = 0, card_w = G.CARD_W*0.7, draw_layers = {'card'}})"
position = "at"
payload = "{card_limit = #SUITS_SORTED[suit_map[j]], type = 'title', view_deck = true, highlight_limit = 0, card_w = G.CARD_W*0.7, draw_layers = {'card'}})"
match_indent = true
# Add unique count
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = '''modded and {n=G.UIT.R, config={align = "cm"}, nodes={'''
position = "before"
payload = "not unplayed_only and Cartomancer.add_unique_count() or nil,"
match_indent = true
# Overwrite cards copy and display code
[[patches]]
[patches.regex]
target = "functions/UI_definitions.lua"
pattern = '''
(?<indent>[\t ]*)for i = 1\, \#SUITS\[suit_map\[j\]\] do
[\t ]* if SUITS\[suit_map\[j\]\]\[i\] then
[\t ]* local greyed\, _scale = nil\, 0\.7
[\t ]* if unplayed_only and not \(\(SUITS\[suit_map\[j\]\]\[i\]\.area and SUITS\[suit_map\[j\]\]\[i\]\.area == G\.deck\) or SUITS\[suit_map\[j\]\]\[i\]\.ability\.wheel_flipped\) then
[\t ]* greyed = true
[\t ]* end
[\t ]* local copy = copy_card\(SUITS\[suit_map\[j\]\]\[i\]\,nil\, _scale\)
[\t ]* copy\.greyed = greyed
[\t ]* copy\.T\.x = view_deck\.T\.x \+ view_deck\.T\.w\/2
[\t ]* copy\.T\.y = view_deck\.T\.y
[\t ]*
[\t ]* copy:hard_set_T\(\)
[\t ]* view_deck:emplace\(copy\)
[\t ]* end
[\t ]*end'''
position = "at"
payload = '''
for i = 1, #SUITS_SORTED[suit_map[j]] do
local card_string = SUITS_SORTED[suit_map[j]][i]
local card = SUITS[suit_map[j]][card_string]
card.T.x = view_deck.T.x + view_deck.T.w/2
card.T.y = view_deck.T.y
card:create_quantity_display()
card:hard_set_T()
view_deck:emplace(card)
end
'''
line_prepend = '$indent'

View file

@ -1,14 +0,0 @@
[manifest]
version = "1.0.0"
dump_lua = true
priority = 69
[[patches]]
[patches.pattern]
target = 'game.lua'
pattern = '''G.FUNCS.blind_chip_UI_scale(G.hand_text_area.blind_chips)'''
position = 'before'
payload = '''
Cartomancer.update_tags_visibility()'''
match_indent = true

View file

@ -1,90 +0,0 @@
[manifest]
version = "1.0.0"
dump_lua = true
priority = 69
# Localization
[[patches]]
[patches.pattern]
target = "game.lua"
pattern = "boot_timer('prep stage', 'splash prep',1)"
position = "before"
payload = "Cartomancer.load_mod_file('internal/localization.lua', 'localization')"
match_indent = true
# Add tab button to settings menu
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
match_indent = true
position = "before"
pattern = '''local t = create_UIBox_generic_options({back_func = 'options',contents = {create_tabs('''
payload = '''
local settings_icon = Cartomancer.add_settings_icon()
if settings_icon then
tabs[#tabs+1] = {
colour = G.C.MONEY,
custom_button = {settings_icon},
tab_definition_function = Cartomancer.config_tab,
tab_definition_function_args = ''
}
end
'''
# Use custom button
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
match_indent = true
position = "at"
pattern = '''but_UI_label'''
payload = '''
args.ref_table and args.ref_table.custom_button or but_UI_label -- Cartomancer'''
# Use custom color
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
match_indent = true
position = "at"
pattern = '''colour = args.colour,'''
payload = '''
colour = args.ref_table and args.ref_table.colour or args.colour, -- Cartomancer'''
# From steamodded for vertical tabs support.
# Fix UIElement.config.chosen being overriden if choice=true is set
# UIElement:click()
[[patches]]
[patches.pattern]
target = "engine/ui.lua"
match_indent = true
position = "after"
pattern = "if self.config.choice then"
payload = " local chosen_temp = self.config.chosen"
[[patches]]
[patches.pattern]
target = "engine/ui.lua"
match_indent = true
position = "at"
pattern = "self.config.chosen = true"
payload = "self.config.chosen = chosen_temp or true"
# Add dynamic label support to UIBox_button
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
match_indent = true
position = "before"
pattern = "for k, v in ipairs(args.label) do"
payload = '''
if args.dynamic_label then
but_UI_label = {}
table.insert(but_UI_label, {n=G.UIT.R, config={align = "cm", padding = 0, minw = args.minw, maxw = args.maxw}, nodes={
{n=G.UIT.T, config={ref_table = args.dynamic_label, ref_value = 'text', scale = args.scale, colour = args.text_colour, shadow = args.shadow, focus_args = button_pip and args.focus_args or nil, func = button_pip,}}
}})
end
'''

View file

@ -1,58 +0,0 @@
[manifest]
version = "1.0.0"
dump_lua = true
priority = 69
# Replace joker sorting. Needs better mod compat
[[patches]]
[patches.pattern]
target = "cardarea.lua"
pattern = "if self.config.type == 'joker' or self.config.type == 'title_2' then"
position = "at"
payload = '''
if self == G.jokers and G.jokers.cart_jokers_expanded then
local align_cards = Cartomancer.expand_G_jokers()
-- This should work fine without cryptid. But because cryptid's patch is priority=0, it has to be this way
if not G.GAME.modifiers.cry_conveyor then
table.sort(self.cards, function (a, b) return a.T.x + a.T.w/2 - 100*(a.pinned and a.sort_id or 0) < b.T.x + b.T.w/2 - 100*(b.pinned and b.sort_id or 0) end)
end
if align_cards then
G.jokers:hard_set_cards()
end
elseif self.config.type == 'joker' or self.config.type == 'title_2' then'''
match_indent = true
# Hide all cards that are off-screen
[[patches]]
[patches.pattern]
target = "card.lua"
pattern = "if not self.states.visible then return end"
position = "after"
payload = '''
if self.VT.x < -3 or self.VT.x > G.TILE_W + 2.5 then return end'''
match_indent = true
# Add slider ID
[[patches]]
[patches.pattern]
target = "functions/UI_definitions.lua"
pattern = '''{n=G.UIT.B, config={w=startval,h=args.h, r = 0.1, colour = args.colour, ref_table = args, refresh_movement = true}},'''
position = "at"
payload = '''
{n=G.UIT.B, config={id = args.id, w=startval,h=args.h, r = 0.1, colour = args.colour, ref_table = args, refresh_movement = true}},
'''
match_indent = true
# Hide slider value
[[patches]]
[patches.regex]
target = "functions/UI_definitions.lua"
pattern = '''
(?<content>\{n=G\.UIT\.C\, config=\{align = "cm"\, minh = args\.h\,r = 0\.1\, minw = 0\.8\, colour = args\.colour\,shadow = true\}\, nodes=\{
[\t ]*\{n=G\.UIT\.T\, config=\{ref_table = args\, ref_value = 'text'\, scale = args\.text_scale\, colour = G\.C\.UI\.TEXT_LIGHT\, decimal_places = args\.decimal_places\}\}
[\t ]*\}\})\,'''
position = "at"
payload = '''
not args.hide_val and $content or nil'''

View file

Before

Width:  |  Height:  |  Size: 461 B

After

Width:  |  Height:  |  Size: 461 B

View file

Before

Width:  |  Height:  |  Size: 526 B

After

Width:  |  Height:  |  Size: 526 B

View file

Before

Width:  |  Height:  |  Size: 474 B

After

Width:  |  Height:  |  Size: 474 B

View file

Before

Width:  |  Height:  |  Size: 342 B

After

Width:  |  Height:  |  Size: 342 B

View file

@ -19,6 +19,7 @@ return {
-- todo: maybe custom shader for drawn cards to adjust opacity -- todo: maybe custom shader for drawn cards to adjust opacity
improved_hand_sorting = false, improved_hand_sorting = false,
dynamic_hand_align = false,
draw_non_essential_shaders = true, draw_non_essential_shaders = true,
hide_tags = false, hide_tags = false,
hide_consumables = false, hide_consumables = false,

View file

@ -1,4 +1,7 @@
-- THIS IS NO LONGER BEING USED
-- Leaving this in for sentimental value :)
local Cartomancer_replacements = { local Cartomancer_replacements = {
{ {
find = [[ find = [[
@ -16,21 +19,12 @@ for k, v in ipairs(G.playing_cards) do
if unplayed_only and not ((v.area and v.area == G.deck) or v.ability.wheel_flipped) then if unplayed_only and not ((v.area and v.area == G.deck) or v.ability.wheel_flipped) then
greyed = true greyed = true
end end
local card_string = v:cart_to_string() local card_string = v:cart_to_string {deck_view = true}
if greyed then if greyed then
card_string = card_string .. "Greyed" -- for some reason format doesn't work and final string is `sGreyed` card_string = card_string .. "Greyed" -- for some reason format doesn't work and final string is `sGreyed`
end end
if greyed and Cartomancer.SETTINGS.deck_view_hide_drawn_cards then if greyed and Cartomancer.SETTINGS.deck_view_hide_drawn_cards then
-- Ignore this card. -- Ignore this card.
elseif not Cartomancer.SETTINGS.deck_view_stack_enabled then
-- Don't stack cards
local _scale = 0.7
local copy = copy_card(v, nil, _scale)
copy.greyed = greyed
copy.stacked_quantity = 1
table.insert(SUITS_SORTED[v.base.suit], copy)
elseif not SUITS[v.base.suit][card_string] then elseif not SUITS[v.base.suit][card_string] then
-- Initiate stack -- Initiate stack
table.insert(SUITS_SORTED[v.base.suit], card_string) table.insert(SUITS_SORTED[v.base.suit], card_string)
@ -74,13 +68,8 @@ for i = 1%, %#SUITS%[suit_map%[j%]%] do
end]], end]],
place = [[ place = [[
for i = 1%, %#SUITS_SORTED%[suit_map%[j%]%] do for i = 1%, %#SUITS_SORTED%[suit_map%[j%]%] do
local card
if not Cartomancer.SETTINGS.deck_view_stack_enabled then
card = SUITS_SORTED%[suit_map%[j%]%]%[i%]
else
local card_string = SUITS_SORTED%[suit_map%[j%]%]%[i%] local card_string = SUITS_SORTED%[suit_map%[j%]%]%[i%]
card = SUITS%[suit_map%[j%]%]%[card_string%] local card = SUITS%[suit_map%[j%]%]%[card_string%]
end
card%.T%.x = view_deck%.T%.x %+ view_deck%.T%.w%/2 card%.T%.x = view_deck%.T%.x %+ view_deck%.T%.w%/2
card%.T%.y = view_deck%.T%.y card%.T%.y = view_deck%.T%.y

View file

@ -2,6 +2,11 @@
function Card:cart_to_string(args) function Card:cart_to_string(args)
local args = args or {} local args = args or {}
-- With deck stacking disabled, sort_id should make all cards unstacked in deck view.
if args.deck_view and not Cartomancer.SETTINGS.deck_view_stack_enabled then
return tostring(self.sort_id)
end
local suit = self.base and ( local suit = self.base and (
-- if has base, check for stone / no_suit -- if has base, check for stone / no_suit
-- only use NoSuit for unique_count, deck view displays every stone card in respective suit area -- only use NoSuit for unique_count, deck view displays every stone card in respective suit area
@ -19,7 +24,7 @@ function Card:cart_to_string(args)
rank = rank .. tostring(self:get_chip_bonus()) rank = rank .. tostring(self:get_chip_bonus())
end end
if not args.unique_count and Cartomancer.SETTINGS.deck_view_stack_modifiers then if args.deck_view and Cartomancer.SETTINGS.deck_view_stack_modifiers then
return string.format( return string.format(
"%s%s", "%s%s",
suit, suit,

View file

@ -16,3 +16,13 @@ local function recurse(target, ref_table)
end end
end end
recurse(loc_table, G.localization) recurse(loc_table, G.localization)
--local cas = CardArea.sort
--function CardArea:sort(method)
-- if method == 'sort_id' and self.cards[1] and self.cards[1].sort_id then
-- table.sort(self.cards, function (a, b) return a.sort_id > b.sort_id end )
-- return
-- end
--
-- return cas(self, method)
--end

View file

@ -143,6 +143,10 @@ Cartomancer.config_tab = function()
localization = 'carto_improved_hand_sorting', localization = 'carto_improved_hand_sorting',
callback = function () G.FUNCS.change_play_discard_position {to_key = G.SETTINGS.play_button_pos} end callback = function () G.FUNCS.change_play_discard_position {to_key = G.SETTINGS.play_button_pos} end
}, },
create_toggle_option {
ref_value = 'dynamic_hand_align',
localization = 'carto_dynamic_hand_align',
},
create_toggle_option { create_toggle_option {
ref_value = 'draw_non_essential_shaders', ref_value = 'draw_non_essential_shaders',
localization = 'carto_draw_non_essential_shaders', localization = 'carto_draw_non_essential_shaders',

View file

@ -34,6 +34,7 @@ return {
carto_draw_non_essential_shaders = "Draw non-essential shaders", carto_draw_non_essential_shaders = "Draw non-essential shaders",
carto_improved_hand_sorting = "Improved hand sorting", carto_improved_hand_sorting = "Improved hand sorting",
carto_dynamic_hand_align = "Improved hand align for huge hand size",
carto_hide_tags = "Hide tags", carto_hide_tags = "Hide tags",
carto_hide_consumables = "Hide consumables", carto_hide_consumables = "Hide consumables",
carto_hide_deck = "Hide deck", carto_hide_deck = "Hide deck",

View file

@ -6,7 +6,7 @@
--- PRIORITY: 69 --- PRIORITY: 69
--- BADGE_COLOR: FFD700 --- BADGE_COLOR: FFD700
--- DISPLAY_NAME: Cartomancer --- DISPLAY_NAME: Cartomancer
--- VERSION: 4.10 --- VERSION: 4.12
---------------------------------------------- ----------------------------------------------
------------MOD CODE ------------------------- ------------MOD CODE -------------------------

1
Cartomancer/version Executable file
View file

@ -0,0 +1 @@
4.12-fix

17
Cryptid/Cryptid.json Normal file
View file

@ -0,0 +1,17 @@
{
"id": "Cryptid",
"name": "Cryptid",
"display_name": "Cryptid",
"author": ["MathIsFun_, Cryptid and Balatro Discords"],
"description": "Adds unbalanced ideas to Balatro.",
"prefix": "cry",
"main_file": "Cryptid.lua",
"priority": 114,
"badge_colour": "708b91",
"badge_text_colour": "FFFFFF",
"version": "0.5.5",
"dependencies": [
"Talisman (>=2.0.9)",
"Steamodded (>=1.0.0~BETA-0308a)"
]
}

View file

@ -1,31 +1,14 @@
--- STEAMODDED HEADER
--- MOD_NAME: Cryptid
--- MOD_ID: Cryptid
--- PREFIX: cry
--- MOD_AUTHOR: [MathIsFun_, Cryptid and Balatro Discords]
--- MOD_DESCRIPTION: Adds unbalanced ideas to Balatro.
--- BADGE_COLOUR: 708b91
--- DEPENDENCIES: [Talisman>=2.0.9, Steamodded>=1.0.0~ALPHA-1312c]
--- VERSION: 0.5.4
--- PRIORITY: 2147483647
----------------------------------------------
------------MOD CODE -------------------------
-- Welcome to the Cryptid source code! -- Welcome to the Cryptid source code!
-- This is the main file for the mod, where everything is loaded and initialized. -- This is the main file for the mod, where everything is loaded and initialized.
-- If you're looking for a specific feature, browse the Items folder to see how it is implemented. -- If you're looking for a specific feature, browse the items folder to see how it is implemented.
-- If you're looking for a specific function, check the lib folder to see if it is there. -- If you're looking for a specific function, check the lib folder to see if it is there.
-- Initialize some important variables
if not Cryptid then if not Cryptid then
Cryptid = {} Cryptid = {}
end end
local mod_path = "" .. SMODS.current_mod.path -- this path changes when each mod is loaded, but the local variable will retain Cryptid's path local mod_path = "" .. SMODS.current_mod.path -- this path changes when each mod is loaded, but the local variable will retain Cryptid's path
Cryptid.path = mod_path Cryptid.path = mod_path
Cryptid_config = SMODS.current_mod.config Cryptid_config = SMODS.current_mod.config
-- This will save the current state even when settings are modified
Cryptid.enabled = copy_table(Cryptid_config)
-- Enable optional features -- Enable optional features
SMODS.current_mod.optional_features = { SMODS.current_mod.optional_features = {
@ -71,9 +54,14 @@ local function process_items(f, mod)
key = false, key = false,
atlas = false, atlas = false,
} }
item.mod_path = mod.path
if item.key then if item.key then
if item.object_type and SMODS[item.object_type].class_prefix then
item.key = SMODS[item.object_type].class_prefix .. "_" .. mod.prefix .. "_" .. item.key
else
item.key = mod.prefix .. "_" .. item.key item.key = mod.prefix .. "_" .. item.key
end end
end
if item.atlas then if item.atlas then
item.atlas = mod.prefix .. "_" .. item.atlas item.atlas = mod.prefix .. "_" .. item.atlas
end end
@ -153,7 +141,7 @@ for _, mod in pairs(SMODS.Mods) do
end end
process_items(f, mod) process_items(f, mod)
end end
if file == "Cryptid" then if file == "Cryptid" and path .. "Cryptid/" ~= Cryptid.path then
local files = NFS.getDirectoryItems(path .. "Cryptid") local files = NFS.getDirectoryItems(path .. "Cryptid")
for _, file in ipairs(files) do for _, file in ipairs(files) do
print("[CRYPTID] Loading file " .. file .. " from " .. mod.id) print("[CRYPTID] Loading file " .. file .. " from " .. mod.id)
@ -184,7 +172,7 @@ end
local inj = SMODS.injectItems local inj = SMODS.injectItems
function SMODS.injectItems(...) function SMODS.injectItems(...)
inj(...) inj(...)
cry_update_obj_registry() Cryptid.update_obj_registry()
for _, t in ipairs({ for _, t in ipairs({
G.P_CENTERS, G.P_CENTERS,
G.P_BLINDS, G.P_BLINDS,
@ -226,6 +214,7 @@ local cryptidConfigTab = function()
config = { n = G.UIT.R, config = { align = "tm", padding = 0 }, nodes = { left_settings, right_settings } } config = { n = G.UIT.R, config = { align = "tm", padding = 0 }, nodes = { left_settings, right_settings } }
cry_nodes[#cry_nodes + 1] = config cry_nodes[#cry_nodes + 1] = config
cry_nodes[#cry_nodes + 1] = UIBox_button({ cry_nodes[#cry_nodes + 1] = UIBox_button({
colour = G.C.CRY_GREENGRADIENT,
button = "your_collection_content_sets", button = "your_collection_content_sets",
label = { localize("b_content_sets") }, label = { localize("b_content_sets") },
count = modsCollectionTally(G.P_CENTER_POOLS["Content Set"]), count = modsCollectionTally(G.P_CENTER_POOLS["Content Set"]),
@ -237,18 +226,31 @@ local cryptidConfigTab = function()
--Add warning notifications later for family mode --Add warning notifications later for family mode
cry_nodes[#cry_nodes + 1] = create_toggle({ cry_nodes[#cry_nodes + 1] = create_toggle({
label = localize("cry_family"), label = localize("cry_family"),
active_colour = G.C.MONEY, active_colour = HEX("40c76d"),
ref_table = Cryptid_config, ref_table = Cryptid_config,
ref_value = "family_mode", ref_value = "family_mode",
callback = reload_cryptid_localization, callback = Cryptid.reload_localization,
}) })
cry_nodes[#cry_nodes + 1] = create_toggle({ cry_nodes[#cry_nodes + 1] = create_toggle({
label = localize("cry_experimental"), label = localize("cry_experimental"),
active_colour = G.C.MONEY, active_colour = HEX("1f8505"),
ref_table = Cryptid_config, ref_table = Cryptid_config,
ref_value = "experimental", ref_value = "experimental",
}) })
cry_nodes[#cry_nodes + 1] = create_toggle({
label = localize("cry_feat_https module"),
active_colour = HEX("b1c78d"),
ref_table = Cryptid_config,
ref_value = "HTTPS",
})
cry_nodes[#cry_nodes + 1] = create_toggle({
label = localize("cry_feat_menu"),
active_colour = HEX("1c5c23"),
ref_table = Cryptid_config,
ref_value = "menu",
})
cry_nodes[#cry_nodes + 1] = UIBox_button({ cry_nodes[#cry_nodes + 1] = UIBox_button({
colour = G.C.CRY_ALTGREENGRADIENT,
button = "reset_gameset_config", button = "reset_gameset_config",
label = { localize("b_reset_gameset_" .. (G.PROFILES[G.SETTINGS.profile].cry_gameset or "mainline")) }, label = { localize("b_reset_gameset_" .. (G.PROFILES[G.SETTINGS.profile].cry_gameset or "mainline")) },
minw = 5, minw = 5,
@ -292,26 +294,31 @@ local cryptidTabs = function()
} }
settings = { n = G.UIT.C, config = { align = "tl", padding = 0.05 }, nodes = {} } settings = { n = G.UIT.C, config = { align = "tl", padding = 0.05 }, nodes = {} }
settings.nodes[#settings.nodes + 1] = create_toggle({ settings.nodes[#settings.nodes + 1] = create_toggle({
active_colour = G.C.CRY_JOLLY,
label = localize("cry_mus_jimball"), label = localize("cry_mus_jimball"),
ref_table = Cryptid_config.Cryptid, ref_table = Cryptid_config.Cryptid,
ref_value = "jimball_music", ref_value = "jimball_music",
}) })
settings.nodes[#settings.nodes + 1] = create_toggle({ settings.nodes[#settings.nodes + 1] = create_toggle({
active_colour = G.C.CRY_JOLLY,
label = localize("cry_mus_code"), label = localize("cry_mus_code"),
ref_table = Cryptid_config.Cryptid, ref_table = Cryptid_config.Cryptid,
ref_value = "code_music", ref_value = "code_music",
}) })
settings.nodes[#settings.nodes + 1] = create_toggle({ settings.nodes[#settings.nodes + 1] = create_toggle({
active_colour = G.C.CRY_JOLLY,
label = localize("cry_mus_exotic"), label = localize("cry_mus_exotic"),
ref_table = Cryptid_config.Cryptid, ref_table = Cryptid_config.Cryptid,
ref_value = "exotic_music", ref_value = "exotic_music",
}) })
settings.nodes[#settings.nodes + 1] = create_toggle({ settings.nodes[#settings.nodes + 1] = create_toggle({
active_colour = G.C.CRY_JOLLY,
label = localize("cry_mus_high_score"), label = localize("cry_mus_high_score"),
ref_table = Cryptid_config.Cryptid, ref_table = Cryptid_config.Cryptid,
ref_value = "big_music", ref_value = "big_music",
}) })
settings.nodes[#settings.nodes + 1] = create_toggle({ settings.nodes[#settings.nodes + 1] = create_toggle({
active_colour = G.C.CRY_JOLLY,
label = localize("cry_mus_alt_bg"), label = localize("cry_mus_alt_bg"),
ref_table = Cryptid_config.Cryptid, ref_table = Cryptid_config.Cryptid,
ref_value = "alt_bg_music", ref_value = "alt_bg_music",

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 KiB

After

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 57 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 KiB

After

Width:  |  Height:  |  Size: 203 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 KiB

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 140 KiB

After

Width:  |  Height:  |  Size: 311 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 130 KiB

After

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 KiB

After

Width:  |  Height:  |  Size: 183 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 KiB

After

Width:  |  Height:  |  Size: 132 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 333 KiB

After

Width:  |  Height:  |  Size: 239 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 KiB

After

Width:  |  Height:  |  Size: 130 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 KiB

After

Width:  |  Height:  |  Size: 110 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.4 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 5 KiB

View file

@ -8,4 +8,6 @@ return {
}, },
["family_mode"] = false, ["family_mode"] = false,
["experimental"] = false, ["experimental"] = false,
["HTTPS"] = true,
["menu"] = true,
} }

Binary file not shown.

Binary file not shown.

View file

@ -1,36 +0,0 @@
require("love.system")
-- mac/linux support?
local script_path = debug.getinfo(1, "S").source:sub(2)
local script_dir = script_path:match("(.*/)")
package.path = script_dir .. "?.lua;" .. package.path
package.cpath = script_dir .. "?.so;" .. package.cpath
local index_os = love.system.getOS()
if index_os == "OS X" then
loc_https = require("macos-https")
elseif index_os == "Linux" then
loc_https = require("linux-https")
else
loc_https = require("https")
end
local last_update_time = 0
local initial = true
while true do
if (os.time() - last_update_time >= 60) or initial then
initial = nil
last_update_time = os.time()
local resp, txt = loc_https.request(
"https://discord.com/api/v10/invites/eUf9Ur6RyB?with_counts=true" .. "&v=" .. tostring(os.time())
)
if resp == 200 then
love.thread.getChannel("member_count"):push(txt)
else
love.thread.getChannel("member_error"):push("Failed to get count: " .. resp)
end
end
end

View file

@ -337,7 +337,7 @@ local home_realtor = {
atlas = "cry_achievements", atlas = "cry_achievements",
--reset_on_startup = true, --reset_on_startup = true,
unlock_condition = function(self, args) unlock_condition = function(self, args)
--todo: check for doe/antimatter sleeves --TODO: check for antimatter sleeve in the check_unlock when it's added
if args.type == "home_realtor" then if args.type == "home_realtor" then
return true return true
end end
@ -394,6 +394,20 @@ local perfectly_balanced = {
end end
end, end,
} }
local pin = {
object_type = "Achievement",
key = "pin",
order = 21,
hidden_text = true,
pos = { x = 3, y = 0 },
atlas = "cry_achievements",
bypass_all_unlocked = true,
unlock_condition = function(self, args)
if args.type == "lose_to_specific_blind" and args.blind == "cry-pin" then
return true
end
end,
}
-- TODO: Add new Achievements. -- TODO: Add new Achievements.
-- Current Ideas (Normal): -- Current Ideas (Normal):
@ -446,5 +460,6 @@ local achievement_objects = {
home_realtor, home_realtor,
traffic_jam, traffic_jam,
perfectly_balanced, perfectly_balanced,
--pin, Needs to be screened
} }
return { name = "Achievements", items = achievement_objects } return { name = "Achievements", items = achievement_objects }

View file

@ -546,10 +546,14 @@ local shackle = {
if G.GAME.modifiers.cry_force_edition and G.GAME.modifiers.cry_force_edition == "negative" then if G.GAME.modifiers.cry_force_edition and G.GAME.modifiers.cry_force_edition == "negative" then
return false return false
end end
return #advanced_find_joker(nil, nil, "e_negative", nil, true) ~= 0 return #Cryptid.advanced_find_joker(nil, nil, "e_negative", nil, true) ~= 0
end, end,
recalc_debuff = function(self, card, from_blind) recalc_debuff = function(self, card, from_blind)
if (card.area == G.jokers) and not G.GAME.blind.disabled and safe_get(card, "edition", "negative") == true then if
(card.area == G.jokers)
and not G.GAME.blind.disabled
and Cryptid.safe_get(card, "edition", "negative") == true
then
return true return true
end end
return false return false
@ -577,7 +581,7 @@ local pin = {
if not G.jokers or not G.jokers.cards then if not G.jokers or not G.jokers.cards then
return false return false
end end
return #advanced_find_joker(nil, { 1, 2, 3 }, nil, nil, true) < #G.jokers.cards return #Cryptid.advanced_find_joker(nil, { 1, 2, 3 }, nil, nil, true) < #G.jokers.cards
end, end,
recalc_debuff = function(self, card, from_blind) recalc_debuff = function(self, card, from_blind)
if if
@ -665,7 +669,7 @@ local tornado = {
order = 94, order = 94,
boss_colour = HEX("3dd9ca"), boss_colour = HEX("3dd9ca"),
loc_vars = function(self) loc_vars = function(self)
return { vars = { "" .. ((safe_get(G.GAME, "probabilities", "normal") or 1) * 2), 3 } } return { vars = { "" .. ((Cryptid.safe_get(G.GAME, "probabilities", "normal") or 1) * 2), 3 } }
end, end,
set_blind = function(self, reset, silent) set_blind = function(self, reset, silent)
if not reset then if not reset then
@ -673,10 +677,10 @@ local tornado = {
end end
end, end,
in_pool = function() in_pool = function()
return #advanced_find_joker("Oops! All 6s", nil, nil, { "eternal" }, nil) == 0 return #Cryptid.advanced_find_joker("Oops! All 6s", nil, nil, { "eternal" }, nil) == 0
end, end,
collection_loc_vars = function(self) collection_loc_vars = function(self)
return { vars = { "" .. ((safe_get(G.GAME, "probabilities", "normal") or 1) * 2), 3 } } return { vars = { "" .. ((Cryptid.safe_get(G.GAME, "probabilities", "normal") or 1) * 2), 3 } }
end, end,
debuff_hand = function(self, cards, hand, handname, check) debuff_hand = function(self, cards, hand, handname, check)
if if
@ -1301,7 +1305,9 @@ local trophy = {
order = 95, order = 95,
boss_colour = HEX("bbdb44"), boss_colour = HEX("bbdb44"),
set_blind = function(self, reset, silent) set_blind = function(self, reset, silent)
if not reset then
G.GAME.trophymod = true G.GAME.trophymod = true
end
end, end,
defeat = function(self, silent) defeat = function(self, silent)
if G.GAME.trophymod then if G.GAME.trophymod then

View file

@ -16,7 +16,9 @@ local sticker_sheet = {
modifiers = {}, modifiers = {},
}, },
restrictions = { restrictions = {
banned_cards = {}, banned_cards = {
{ id = "c_cry_lock" },
},
banned_other = {}, banned_other = {},
}, },
deck = { deck = {
@ -35,7 +37,9 @@ local sticker_sheet_plus = {
modifiers = {}, modifiers = {},
}, },
restrictions = { restrictions = {
banned_cards = {}, banned_cards = {
{ id = "c_cry_lock" },
},
banned_other = {}, banned_other = {},
}, },
deck = { deck = {
@ -74,6 +78,8 @@ local ballin = {
{ id = "c_familiar" }, { id = "c_familiar" },
{ id = "c_grim" }, { id = "c_grim" },
{ id = "c_incantation" }, { id = "c_incantation" },
{ id = "c_cry_eclipse" },
{ id = "c_cry_class" },
}, },
banned_other = {}, banned_other = {},
}, },
@ -122,6 +128,10 @@ local rush_hour_ii = {
{ id = "j_diet_cola" }, { id = "j_diet_cola" },
{ id = "v_directors_cut" }, { id = "v_directors_cut" },
{ id = "v_retcon" }, { id = "v_retcon" },
{ id = "j_cry_pickle" },
{ id = "v_cry_copies" },
{ id = "v_cry_tag_printer" },
{ id = "v_cry_clone_machine" },
}, },
banned_other = {}, banned_other = {},
}, },
@ -212,6 +222,10 @@ local rush_hour_iii = {
{ id = "j_diet_cola" }, { id = "j_diet_cola" },
{ id = "v_directors_cut" }, { id = "v_directors_cut" },
{ id = "v_retcon" }, { id = "v_retcon" },
{ id = "j_cry_pickle" },
{ id = "v_cry_copies" },
{ id = "v_cry_tag_printer" },
{ id = "v_cry_clone_machine" },
}, },
banned_other = {}, banned_other = {},
}, },
@ -241,6 +255,10 @@ local boss_rush = {
{ id = "j_diet_cola" }, { id = "j_diet_cola" },
{ id = "v_directors_cut" }, { id = "v_directors_cut" },
{ id = "v_retcon" }, { id = "v_retcon" },
{ id = "j_cry_pickle" },
{ id = "v_cry_copies" },
{ id = "v_cry_tag_printer" },
{ id = "v_cry_clone_machine" },
}, },
banned_other = {}, banned_other = {},
}, },
@ -264,8 +282,13 @@ local rng = {
{ id = "tag_uncommon" }, { id = "tag_uncommon" },
{ id = "tag_rare" }, { id = "tag_rare" },
{ id = "tag_top_up" }, { id = "tag_top_up" },
{ id = "tag_cry_epic" },
},
banned_cards = {
{ id = "j_cry_equilib" },
{ id = "c_cry_delete" },
{ id = "p_cry_meme_1", ids = { "p_cry_meme_1", "p_cry_meme_two", "p_cry_meme_three" } },
}, },
banned_cards = {},
banned_other = {}, banned_other = {},
}, },
} }
@ -311,15 +334,22 @@ local onlycard = {
{ id = "tag_meteor" }, { id = "tag_meteor" },
{ id = "tag_buffoon" }, { id = "tag_buffoon" },
{ id = "tag_ethereal" }, { id = "tag_ethereal" },
{ id = "tag_cry_bundle" },
{ id = "tag_cry_loss" },
{ id = "tag_cry_gambler" },
{ id = "tag_cry_empowered" },
{ id = "tag_cry_console" },
}, },
banned_cards = { banned_cards = {
{ id = "j_marble" }, { id = "j_marble" },
{ id = "j_dna" }, { id = "j_dna" },
{ id = "j_certificate" }, { id = "j_certificate" },
{ id = "j_cry_multjoker" },
{ id = "c_familiar" }, { id = "c_familiar" },
{ id = "c_grim" }, { id = "c_grim" },
{ id = "c_incantation" }, { id = "c_incantation" },
{ id = "c_cryptid" }, { id = "c_cryptid" },
{ id = "c_cry_replica" },
{ {
id = "p_celestial_normal_1", id = "p_celestial_normal_1",
ids = { ids = {
@ -364,6 +394,19 @@ local onlycard = {
"p_buffoon_mega_1", "p_buffoon_mega_1",
}, },
}, },
{
id = "p_cry_meme_1",
ids = {
"p_cry_meme_1",
"p_cry_meme_two",
"p_cry_meme_three",
},
},
{ id = "p_cry_empowered" },
{
id = "p_cry_code_normal_1",
ids = { "p_cry_code_normal_1", "p_cry_code_normal_2", "p_cry_code_jumbo_1", "p_cry_code_mega_1" },
},
}, },
banned_other = { banned_other = {
{ id = "bl_house", type = "blind" }, { id = "bl_house", type = "blind" },
@ -427,11 +470,25 @@ local joker_poker = {
{ id = "j_yorick" }, { id = "j_yorick" },
{ id = "j_perkeo" }, { id = "j_perkeo" },
{ id = "j_constellation" }, { id = "j_constellation" },
{ id = "j_cry_booster" },
{ id = "j_cry_wheelhope" },
{ id = "j_cry_hunger" },
{ id = "j_cry_sacrifice" },
{ id = "j_cry_doodlem" },
{ id = "j_cry_multjoker" },
{ id = "j_cry_stella_mortis" },
{ id = "j_cry_crustulum" },
{ id = "j_cry_cut" },
{ id = "j_cry_CodeJoker" },
{ id = "j_cry_copypaste" },
{ id = "j_cry_blender" },
{ id = "j_cry_python" },
}, },
banned_other = { banned_other = {
{ id = "bl_hook", type = "blind" }, { id = "bl_hook", type = "blind" },
{ id = "bl_arm", type = "blind" }, { id = "bl_arm", type = "blind" },
{ id = "bl_water", type = "blind" }, { id = "bl_water", type = "blind" },
{ id = "bl_cry_oldmanacle", type = "blind" },
}, },
}, },
} }
@ -453,82 +510,6 @@ function Game:start_run(args)
end end
--Add banned cards when specific features/mods are enabled here --Add banned cards when specific features/mods are enabled here
--TODO other mods --TODO other mods
if Cryptid.enabled["Blinds"] then
joker_poker.restrictions.banned_other[#joker_poker.restrictions.banned_other + 1] =
{ id = "bl_cry_oldmanacle", type = "blind" }
end
if Cryptid.enabled["Tags"] then
onlycard.restrictions.banned_tags[#onlycard.restrictions.banned_tags + 1] = { id = "tag_cry_bundle" }
onlycard.restrictions.banned_tags[#onlycard.restrictions.banned_tags + 1] = { id = "tag_cry_loss" }
onlycard.restrictions.banned_tags[#onlycard.restrictions.banned_tags + 1] = { id = "tag_cry_gambler" }
onlycard.restrictions.banned_tags[#onlycard.restrictions.banned_tags + 1] = { id = "tag_cry_empowered" }
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "p_cry_empowered" }
if Cryptid.enabled["Epic Jokers"] then
rng.restrictions.banned_tags[#rng.restrictions.banned_tags + 1] = { id = "tag_cry_epic" }
end
end
if Cryptid.enabled["Misc."] then
ballin.restrictions.banned_cards[#ballin.restrictions.banned_cards + 1] = { id = "c_cry_eclipse" }
rng.restrictions.banned_cards[#rng.restrictions.banned_cards + 1] =
{ id = "p_cry_meme_1", ids = { "p_cry_meme_1", "p_cry_meme_two", "p_cry_meme_three" } }
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] =
{ id = "p_cry_meme_1", ids = { "p_cry_meme_1", "p_cry_meme_two", "p_cry_meme_three" } }
end
if Cryptid.enabled["Misc. Jokers"] then
rush_hour_ii.restrictions.banned_cards[#rush_hour_ii.restrictions.banned_cards + 1] = { id = "j_cry_pickle" }
rush_hour_iii.restrictions.banned_cards[#rush_hour_iii.restrictions.banned_cards + 1] = { id = "j_cry_pickle" }
boss_rush.restrictions.banned_cards[#boss_rush.restrictions.banned_cards + 1] = { id = "j_cry_pickle" }
joker_poker.restrictions.banned_cards[#joker_poker.restrictions.banned_cards + 1] = { id = "j_cry_booster" }
joker_poker.restrictions.banned_cards[#joker_poker.restrictions.banned_cards + 1] = { id = "j_cry_wheelhope" }
joker_poker.restrictions.banned_cards[#joker_poker.restrictions.banned_cards + 1] = { id = "j_cry_hunger" }
end
if Cryptid.enabled["M Jokers"] then
joker_poker.restrictions.banned_cards[#joker_poker.restrictions.banned_cards + 1] = { id = "j_cry_sacrifice" }
if Cryptid.enabled["Epic Jokers"] then
joker_poker.restrictions.banned_cards[#joker_poker.restrictions.banned_cards + 1] = { id = "j_cry_doodlem" }
end
end
if Cryptid.enabled["Epic Jokers"] then
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "j_cry_multjoker" }
joker_poker.restrictions.banned_cards[#joker_poker.restrictions.banned_cards + 1] = { id = "j_cry_multjoker" }
end
if Cryptid.enabled["Exotic Jokers"] then
rng.restrictions.banned_cards[#rng.restrictions.banned_cards + 1] = { id = "j_cry_equilib" }
joker_poker.restrictions.banned_cards[#joker_poker.restrictions.banned_cards + 1] = { id = "j_cry_stella_mortis" }
joker_poker.restrictions.banned_cards[#joker_poker.restrictions.banned_cards + 1] = { id = "j_cry_crustulum" }
end
if Cryptid.enabled["Code Cards"] then
ballin.restrictions.banned_cards[#ballin.restrictions.banned_cards + 1] = { id = "c_cry_class" }
rng.restrictions.banned_cards[#rng.restrictions.banned_cards + 1] = { id = "c_cry_delete" }
onlycard.restrictions.banned_tags[#onlycard.restrictions.banned_tags + 1] = { id = "tag_cry_console" }
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = {
id = "p_cry_code_normal_1",
ids = { "p_cry_code_normal_1", "p_cry_code_normal_2", "p_cry_code_jumbo_1", "p_cry_code_mega_1" },
}
joker_poker.restrictions.banned_cards[#joker_poker.restrictions.banned_cards + 1] = { id = "j_cry_cut" }
joker_poker.restrictions.banned_cards[#joker_poker.restrictions.banned_cards + 1] = { id = "j_cry_CodeJoker" }
joker_poker.restrictions.banned_cards[#joker_poker.restrictions.banned_cards + 1] = { id = "j_cry_copypaste" }
joker_poker.restrictions.banned_cards[#joker_poker.restrictions.banned_cards + 1] = { id = "j_cry_blender" }
joker_poker.restrictions.banned_cards[#joker_poker.restrictions.banned_cards + 1] = { id = "j_cry_python" }
end
if Cryptid.enabled["Spectrals"] then
sticker_sheet.restrictions.banned_cards[#sticker_sheet.restrictions.banned_cards + 1] = { id = "c_cry_lock" }
sticker_sheet_plus.restrictions.banned_cards[#sticker_sheet_plus.restrictions.banned_cards + 1] =
{ id = "c_cry_lock" }
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_cry_replica" }
end
if Cryptid.enabled["Vouchers"] then
rush_hour_ii.restrictions.banned_cards[#rush_hour_ii.restrictions.banned_cards + 1] = { id = "v_cry_copies" }
rush_hour_iii.restrictions.banned_cards[#rush_hour_iii.restrictions.banned_cards + 1] = { id = "v_cry_copies" }
boss_rush.restrictions.banned_cards[#boss_rush.restrictions.banned_cards + 1] = { id = "v_cry_copies" }
rush_hour_ii.restrictions.banned_cards[#rush_hour_ii.restrictions.banned_cards + 1] = { id = "v_cry_tag_printer" }
rush_hour_iii.restrictions.banned_cards[#rush_hour_iii.restrictions.banned_cards + 1] = { id = "v_cry_tag_printer" }
boss_rush.restrictions.banned_cards[#boss_rush.restrictions.banned_cards + 1] = { id = "v_cry_tag_printer" }
rush_hour_ii.restrictions.banned_cards[#rush_hour_ii.restrictions.banned_cards + 1] = { id = "v_cry_clone_machine" }
rush_hour_iii.restrictions.banned_cards[#rush_hour_iii.restrictions.banned_cards + 1] =
{ id = "v_cry_clone_machine" }
boss_rush.restrictions.banned_cards[#boss_rush.restrictions.banned_cards + 1] = { id = "v_cry_clone_machine" }
end
if (SMODS.Mods["jen"] or {}).can_load then if (SMODS.Mods["jen"] or {}).can_load then
ballin.restrictions.banned_cards[#ballin.restrictions.banned_cards + 1] = { id = "c_jen_chance" } ballin.restrictions.banned_cards[#ballin.restrictions.banned_cards + 1] = { id = "c_jen_chance" }
ballin.restrictions.banned_cards[#ballin.restrictions.banned_cards + 1] = { id = "c_jen_token_tag_cry_bundle" } ballin.restrictions.banned_cards[#ballin.restrictions.banned_cards + 1] = { id = "c_jen_token_tag_cry_bundle" }
@ -581,21 +562,19 @@ if (SMODS.Mods["jen"] or {}).can_load then
onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_cryptid_ex" } onlycard.restrictions.banned_cards[#onlycard.restrictions.banned_cards + 1] = { id = "c_jen_cryptid_ex" }
end end
--end of banned cards --end of banned cards
local challenges = { sticker_sheet, sticker_sheet_plus, onlycard } local challenges = {
if Cryptid.enabled["Misc. Jokers"] then sticker_sheet,
challenges[#challenges + 1] = ballin sticker_sheet_plus,
challenges[#challenges + 1] = boss_rush onlycard,
challenges[#challenges + 1] = rng ballin,
challenges[#challenges + 1] = dagger_war boss_rush,
end rng,
if Cryptid.enabled["Blinds"] and Cryptid.enabled["Timer Mechanics"] then dagger_war,
challenges[#challenges + 1] = rush_hour rush_hour,
challenges[#challenges + 1] = rush_hour_ii rush_hour_ii,
challenges[#challenges + 1] = rush_hour_iii rush_hour_iii,
end joker_poker,
if Cryptid.enabled["Misc. Decks"] then --yoinking vfd code here }
challenges[#challenges + 1] = joker_poker
end
for k, v in pairs(G.P_CENTERS) do for k, v in pairs(G.P_CENTERS) do
if v.set == "Joker" then if v.set == "Joker" then

View file

@ -1,14 +1,5 @@
--note to self: refer to https://docs.google.com/document/d/1LNaIouU3vrtWIuPBdFCqLyjYAjVtq7t64xjHnckEY50/edit for order of remaining consumables --note to self: refer to https://docs.google.com/document/d/1LNaIouU3vrtWIuPBdFCqLyjYAjVtq7t64xjHnckEY50/edit for order of remaining consumables
local code = { local code = {
--[[
I'm assuming this won't work so it's commented out for now - Jevonn
dependencies = {
items = {
"set_cry_code",
},
},
]]
--
object_type = "ConsumableType", object_type = "ConsumableType",
key = "Code", key = "Code",
primary_colour = HEX("14b341"), primary_colour = HEX("14b341"),
@ -20,7 +11,28 @@ local code = {
can_stack = true, can_stack = true,
can_divide = true, can_divide = true,
} }
local code_digital_hallucinations_compat = {
colour = HEX("14b341"),
loc_key = "cry_plus_code",
create = function()
local ccard = create_card("Code", G.consumeables, nil, nil, nil, nil, nil, "diha")
ccard:set_edition({ negative = true }, true)
ccard:add_to_deck()
G.consumeables:emplace(ccard)
end,
}
local pack1 = { local pack1 = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -51,8 +63,20 @@ local pack1 = {
} }
end, end,
group_key = "k_cry_program_pack", group_key = "k_cry_program_pack",
cry_digital_hallucinations = code_digital_hallucinations_compat,
} }
local pack2 = { local pack2 = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -83,8 +107,20 @@ local pack2 = {
} }
end, end,
group_key = "k_cry_program_pack", group_key = "k_cry_program_pack",
cry_digital_hallucinations = code_digital_hallucinations_compat,
} }
local packJ = { local packJ = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -115,8 +151,20 @@ local packJ = {
} }
end, end,
group_key = "k_cry_program_pack", group_key = "k_cry_program_pack",
cry_digital_hallucinations = code_digital_hallucinations_compat,
} }
local packM = { local packM = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -147,8 +195,20 @@ local packM = {
} }
end, end,
group_key = "k_cry_program_pack", group_key = "k_cry_program_pack",
cry_digital_hallucinations = code_digital_hallucinations_compat,
} }
local console = { local console = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"p_cry_code_normal_1", "p_cry_code_normal_1",
@ -185,7 +245,7 @@ local console = {
if G.GAME.modifiers.cry_force_edition and not G.GAME.modifiers.cry_force_random_edition then if G.GAME.modifiers.cry_force_edition and not G.GAME.modifiers.cry_force_random_edition then
card:set_edition(nil, true, true) card:set_edition(nil, true, true)
elseif G.GAME.modifiers.cry_force_random_edition then elseif G.GAME.modifiers.cry_force_random_edition then
local edition = cry_poll_random_edition() local edition = Cryptid.poll_random_edition()
card:set_edition(edition, true, true) card:set_edition(edition, true, true)
end end
card:start_materialize() card:start_materialize()
@ -197,6 +257,17 @@ local console = {
end, end,
} }
local crash = { local crash = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -764,6 +835,17 @@ local crash = {
end, end,
} }
local payload = { local payload = {
cry_credits = {
idea = {
"Mjiojio",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -793,6 +875,17 @@ local payload = {
end, end,
} }
local reboot = { local reboot = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -835,6 +928,17 @@ local reboot = {
end, end,
} }
local revert = { local revert = {
cry_credits = {
idea = {
"Mjiojio",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -882,6 +986,17 @@ local revert = {
end, end,
} }
local semicolon = { local semicolon = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -943,6 +1058,17 @@ local semicolon = {
end, end,
} }
local malware = { local malware = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"HexaCryonic",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -1007,6 +1133,17 @@ local malware = {
end, end,
} }
local seed = { local seed = {
cry_credits = {
idea = {
"Mjiojio",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -1051,7 +1188,7 @@ local seed = {
if G.consumeables.highlighted[1] then if G.consumeables.highlighted[1] then
G.consumeables.highlighted[1].ability.cry_rigged = true G.consumeables.highlighted[1].ability.cry_rigged = true
end end
if safe_get(G, "pack_cards", "highlighted", 1) then if Cryptid.safe_get(G, "pack_cards", "highlighted", 1) then
G.pack_cards.highlighted[1].ability.cry_rigged = true G.pack_cards.highlighted[1].ability.cry_rigged = true
end end
end, end,
@ -1070,6 +1207,10 @@ local rigged = {
prefix_config = { key = false }, prefix_config = { key = false },
badge_colour = HEX("14b341"), badge_colour = HEX("14b341"),
draw = function(self, card) --don't draw shine draw = function(self, card) --don't draw shine
local notilt = nil
if card.area and card.area.config.type == "deck" then
notilt = true
end
if not G.shared_stickers["cry_rigged2"] then if not G.shared_stickers["cry_rigged2"] then
G.shared_stickers["cry_rigged2"] = G.shared_stickers["cry_rigged2"] =
Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS["cry_sticker"], { x = 5, y = 1 }) Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS["cry_sticker"], { x = 5, y = 1 })
@ -1078,21 +1219,32 @@ local rigged = {
G.shared_stickers[self.key].role.draw_major = card G.shared_stickers[self.key].role.draw_major = card
G.shared_stickers["cry_rigged2"].role.draw_major = card G.shared_stickers["cry_rigged2"].role.draw_major = card
G.shared_stickers[self.key]:draw_shader("dissolve", nil, nil, nil, card.children.center) G.shared_stickers[self.key]:draw_shader("dissolve", nil, nil, notilt, card.children.center)
card.hover_tilt = card.hover_tilt / 2 -- call it spaghetti, but it's what hologram does so... card.hover_tilt = card.hover_tilt / 2 -- call it spaghetti, but it's what hologram does so...
G.shared_stickers["cry_rigged2"]:draw_shader("dissolve", nil, nil, nil, card.children.center) G.shared_stickers["cry_rigged2"]:draw_shader("dissolve", nil, nil, notilt, card.children.center)
G.shared_stickers["cry_rigged2"]:draw_shader( G.shared_stickers["cry_rigged2"]:draw_shader(
"hologram", "hologram",
nil, nil,
card.ARGS.send_to_shader, card.ARGS.send_to_shader,
nil, notilt,
card.children.center card.children.center
) -- this doesn't really do much tbh, but the slight effect is nice ) -- this doesn't really do much tbh, but the slight effect is nice
card.hover_tilt = card.hover_tilt * 2 card.hover_tilt = card.hover_tilt * 2
end, end,
} }
local hook = { local hook = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -1189,7 +1341,7 @@ local hooked = {
var = localize({ type = "name_text", set = "Joker", key = G.jokers.cards[i].config.center.key }) var = localize({ type = "name_text", set = "Joker", key = G.jokers.cards[i].config.center.key })
end end
end end
var = var or "[no joker found - " .. (card.hook_id or "nil") .. "]" var = var or ("[no joker found - " .. (card.hook_id or "nil") .. "]")
end end
return { vars = { var or "hooked Joker" } } return { vars = { var or "hooked Joker" } }
end, end,
@ -1203,6 +1355,17 @@ local hooked = {
end, end,
} }
local variable = { local variable = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"AlexZGreat",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -1221,7 +1384,7 @@ local variable = {
order = 8, order = 8,
config = { max_highlighted = 2, extra = { enteredrank = "" } }, config = { max_highlighted = 2, extra = { enteredrank = "" } },
loc_vars = function(self, info_queue, card) loc_vars = function(self, info_queue, card)
return { vars = { safe_get(card, "ability", "max_highlighted") or self.config.max_highlighted } } return { vars = { Cryptid.safe_get(card, "ability", "max_highlighted") or self.config.max_highlighted } }
end, end,
use = function(self, card, area, copier) use = function(self, card, area, copier)
G.GAME.USING_CODE = true G.GAME.USING_CODE = true
@ -1491,6 +1654,17 @@ local variable = {
end, end,
} }
local class = { local class = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -1509,7 +1683,7 @@ local class = {
order = 16, order = 16,
config = { max_highlighted = 1, extra = { enteredrank = "" } }, config = { max_highlighted = 1, extra = { enteredrank = "" } },
loc_vars = function(self, info_queue, card) loc_vars = function(self, info_queue, card)
return { vars = { safe_get(card, "ability", "max_highlighted") or self.config.max_highlighted } } return { vars = { Cryptid.safe_get(card, "ability", "max_highlighted") or self.config.max_highlighted } }
end, end,
use = function(self, card, area, copier) use = function(self, card, area, copier)
G.GAME.USING_CODE = true G.GAME.USING_CODE = true
@ -1667,7 +1841,7 @@ local class = {
delay = 0.15, delay = 0.15,
func = function() func = function()
CARD:flip() CARD:flip()
CARD:set_ability(get_random_consumable("cry_class"), true, nil) CARD:set_ability(Cryptid.random_consumable("cry_class"), true, nil)
play_sound("tarot2", percent) play_sound("tarot2", percent)
CARD:juice_up(0.3, 0.3) CARD:juice_up(0.3, 0.3)
return true return true
@ -1765,6 +1939,17 @@ local class = {
end, end,
} }
local commit = { local commit = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -1832,6 +2017,17 @@ local commit = {
end, end,
} }
local merge = { local merge = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -1932,6 +2128,17 @@ local merge = {
end, end,
} }
local multiply = { local multiply = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -1958,8 +2165,8 @@ local multiply = {
G.jokers.highlighted[1].config.cry_multiply = 1 G.jokers.highlighted[1].config.cry_multiply = 1
end end
G.jokers.highlighted[1].config.cry_multiply = G.jokers.highlighted[1].config.cry_multiply * 2 G.jokers.highlighted[1].config.cry_multiply = G.jokers.highlighted[1].config.cry_multiply * 2
cry_with_deck_effects(G.jokers.highlighted[1], function(card) Cryptid.with_deck_effects(G.jokers.highlighted[1], function(card)
cry_misprintize(card, { min = 2, max = 2 }, nil, true) Cryptid.misprintize(card, { min = 2, max = 2 }, nil, true)
end) end)
end, end,
init = function(self) init = function(self)
@ -1970,8 +2177,8 @@ local multiply = {
for i = 1, #G.jokers.cards do for i = 1, #G.jokers.cards do
if G.jokers.cards[i].config.cry_multiply then if G.jokers.cards[i].config.cry_multiply then
m = G.jokers.cards[i].config.cry_multiply m = G.jokers.cards[i].config.cry_multiply
cry_with_deck_effects(G.jokers.cards[i], function(card) Cryptid.with_deck_effects(G.jokers.cards[i], function(card)
cry_misprintize(card, { min = 1 / m, max = 1 / m }, nil, true) Cryptid.misprintize(card, { min = 1 / m, max = 1 / m }, nil, true)
end) end)
G.jokers.cards[i].config.cry_multiply = nil G.jokers.cards[i].config.cry_multiply = nil
end end
@ -1980,6 +2187,17 @@ local multiply = {
end, end,
} }
local divide = { local divide = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -2036,6 +2254,18 @@ local divide = {
end, end,
} }
local delete = { local delete = {
cry_credits = {
idea = {
"Mjiojio",
},
art = {
"HexaCryonic",
},
code = {
"Math",
"Toneblock",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -2054,7 +2284,7 @@ local delete = {
cost = 4, cost = 4,
config = { cry_multiuse = 3 }, config = { cry_multiuse = 3 },
loc_vars = function(self, info_queue, card) loc_vars = function(self, info_queue, card)
return { vars = { safe_get(card, "ability", "cry_multiuse") or self.config.cry_multiuse } } return { vars = { Cryptid.safe_get(card, "ability", "cry_multiuse") or self.config.cry_multiuse } }
end, end,
can_use = function(self, card) can_use = function(self, card)
return G.STATE == G.STATES.SHOP return G.STATE == G.STATES.SHOP
@ -2087,7 +2317,7 @@ local delete = {
a = G.shop_vouchers a = G.shop_vouchers
c = G.shop_vouchers.highlighted[1] c = G.shop_vouchers.highlighted[1]
if c.shop_voucher then if c.shop_voucher then
G.GAME.current_round.voucher = nil G.GAME.current_round.voucher.spawn[c.config.center.key] = nil
G.GAME.current_round.cry_voucher_edition = nil G.GAME.current_round.cry_voucher_edition = nil
G.GAME.current_round.cry_voucher_stickers = G.GAME.current_round.cry_voucher_stickers =
{ eternal = false, perishable = false, rental = false, pinned = false, banana = false } { eternal = false, perishable = false, rental = false, pinned = false, banana = false }
@ -2156,6 +2386,17 @@ local delete = {
]] ]]
} }
local spaghetti = { local spaghetti = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -2189,6 +2430,17 @@ local spaghetti = {
end, end,
} }
local machinecode = { local machinecode = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -2209,24 +2461,24 @@ local machinecode = {
loc_vars = function(self, info_queue, center) loc_vars = function(self, info_queue, center)
return { return {
main_start = { main_start = {
randomchar(codechars6), Cryptid.randomchar(codechars6),
randomchar(codechars6), Cryptid.randomchar(codechars6),
randomchar(codechars6), Cryptid.randomchar(codechars6),
randomchar(codechars6), Cryptid.randomchar(codechars6),
randomchar(codechars6), Cryptid.randomchar(codechars6),
randomchar(codechars6), Cryptid.randomchar(codechars6),
}, },
} }
end, end,
use = function(self, card, area, copier) use = function(self, card, area, copier)
local card = create_card( local card = create_card(
"Consumeables", "Consumeables",
G.consumables, G.consumeables,
nil, nil,
nil, nil,
nil, nil,
nil, nil,
get_random_consumable("cry_machinecode", nil, "c_cry_machinecode").key, Cryptid.random_consumable("cry_machinecode", nil, "c_cry_machinecode").key,
c_cry_machinecode c_cry_machinecode
) )
card:set_edition({ cry_glitched = true }) card:set_edition({ cry_glitched = true })
@ -2237,11 +2489,11 @@ local machinecode = {
local a = {} local a = {}
local b local b
for i = 1, number do for i = 1, number do
b = get_random_consumable("cry_machinecode", nil, "c_cry_machinecode") b = Cryptid.random_consumable("cry_machinecode", nil, "c_cry_machinecode")
a[b] = (a[b] or 0) + 1 a[b] = (a[b] or 0) + 1
end end
for k, v in pairs(a) do for k, v in pairs(a) do
local card = create_card("Consumeables", G.consumables, nil, nil, nil, nil, k.key) local card = create_card("Consumeables", G.consumeables, nil, nil, nil, nil, k.key)
card:set_edition({ cry_glitched = true }) card:set_edition({ cry_glitched = true })
card:add_to_deck() card:add_to_deck()
if Incantation then if Incantation then
@ -2428,7 +2680,7 @@ local machinecode = {
codechars8 = { "M", "W", "m", "w", "¤", "", "Ø", "ø", "Ł" } codechars8 = { "M", "W", "m", "w", "¤", "", "Ø", "ø", "Ł" }
codechars9 = { "&", "@", "©", "«", "®", "»" } codechars9 = { "&", "@", "©", "«", "®", "»" }
codechars10 = { "Æ", "æ", "Œ", "œ" } codechars10 = { "Æ", "æ", "Œ", "œ" }
function randomchar(arr) function Cryptid.randomchar(arr)
return { return {
n = G.UIT.O, n = G.UIT.O,
config = { config = {
@ -2448,6 +2700,17 @@ local machinecode = {
end, end,
} }
local run = { local run = {
cry_credits = {
idea = {
"Mjiojio",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -2462,7 +2725,7 @@ local run = {
atlas = "code", atlas = "code",
order = 6, order = 6,
can_use = function(self, card) can_use = function(self, card)
return safe_get(G.GAME, "blind", "in_blind") return Cryptid.safe_get(G.GAME, "blind", "in_blind")
end, end,
can_bulk_use = true, can_bulk_use = true,
use = function(self, card, area, copier) use = function(self, card, area, copier)
@ -2549,6 +2812,17 @@ local run = {
end, end,
} }
local exploit = { local exploit = {
cry_credits = {
idea = {
"Mjiojio",
},
art = {
"HexaCryonic",
},
code = {
"Toneblock",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -2567,7 +2841,7 @@ local exploit = {
order = 28, order = 28,
config = { cry_multiuse = 2, extra = { enteredhand = "" } }, -- i don't think this ever uses config...? config = { cry_multiuse = 2, extra = { enteredhand = "" } }, -- i don't think this ever uses config...?
loc_vars = function(self, info_queue, card) loc_vars = function(self, info_queue, card)
return { vars = { safe_get(card, "ability", "cry_multiuse") or self.config.cry_multiuse } } return { vars = { Cryptid.safe_get(card, "ability", "cry_multiuse") or self.config.cry_multiuse } }
end, end,
can_use = function(self, card) can_use = function(self, card)
return true return true
@ -2754,6 +3028,17 @@ local exploit = {
end, end,
} }
local oboe = { local oboe = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -2774,9 +3059,9 @@ local oboe = {
can_bulk_use = true, can_bulk_use = true,
loc_vars = function(self, info_queue, card) loc_vars = function(self, info_queue, card)
if not card then if not card then
return { vars = { self.config.extra.choices, (safe_get(G.GAME, "cry_oboe") or 0) } } return { vars = { self.config.extra.choices, (Cryptid.safe_get(G.GAME, "cry_oboe") or 0) } }
end end
return { vars = { card.ability.extra.choices, (safe_get(G.GAME, "cry_oboe") or 0) } } return { vars = { card.ability.extra.choices, (Cryptid.safe_get(G.GAME, "cry_oboe") or 0) } }
end, end,
can_use = function(self, card) can_use = function(self, card)
return true return true
@ -2789,6 +3074,17 @@ local oboe = {
end, end,
} }
local rework = { local rework = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -2808,7 +3104,7 @@ local rework = {
cost = 4, cost = 4,
loc_vars = function(self, info_queue) loc_vars = function(self, info_queue)
info_queue[#info_queue + 1] = info_queue[#info_queue + 1] =
{ set = "Tag", key = "tag_cry_rework", specific_vars = { "[edition]", "[joker]" } } { set = "Tag", key = "tag_cry_rework", specific_vars = { "[edition]", "[joker]", "n" } }
return { vars = {} } return { vars = {} }
end, end,
can_use = function(self, card) can_use = function(self, card)
@ -2857,6 +3153,17 @@ local rework = {
end, end,
} }
local rework_tag = { local rework_tag = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"c_cry_rework", "c_cry_rework",
@ -2882,13 +3189,13 @@ local rework_tag = {
end end
return r return r
end end
local ed = safe_get(tag, "ability", "rework_edition") local ed = Cryptid.safe_get(tag, "ability", "rework_edition")
and localize({ type = "name_text", set = "Edition", key = tag.ability.rework_edition }) and localize({ type = "name_text", set = "Edition", key = tag.ability.rework_edition })
or "[" .. string.lower(localize("k_edition")) .. "]" or "[" .. string.lower(localize("k_edition")) .. "]"
return { return {
vars = { vars = {
ed, ed,
safe_get(tag, "ability", "rework_key") Cryptid.safe_get(tag, "ability", "rework_key")
and localize({ type = "name_text", set = "Joker", key = tag.ability.rework_key }) and localize({ type = "name_text", set = "Joker", key = tag.ability.rework_key })
or "[" .. string.lower(localize("k_joker")) .. "]", or "[" .. string.lower(localize("k_joker")) .. "]",
string.sub(ed, 1, 1) ~= "[" and p(ed) or "n", string.sub(ed, 1, 1) ~= "[" and p(ed) or "n",
@ -2999,10 +3306,8 @@ local patch = {
CARD:set_eternal(nil) CARD:set_eternal(nil)
end end
CARD.ability.banana = nil CARD.ability.banana = nil
if Cryptid.enabled["Spooky"] then
CARD.ability.cry_possessed = nil CARD.ability.cry_possessed = nil
SMODS.Stickers.cry_flickering:apply(CARD, nil) SMODS.Stickers.cry_flickering:apply(CARD, nil)
end
play_sound("tarot2", percent) play_sound("tarot2", percent)
CARD:juice_up(0.3, 0.3) CARD:juice_up(0.3, 0.3)
return true return true
@ -3025,11 +3330,9 @@ local patch = {
if not CARD.sob then if not CARD.sob then
CARD:set_eternal(nil) CARD:set_eternal(nil)
end end
CARD.ability.banana = nil CARD.ability.banana = notify_alert
if Cryptid.enabled["Spooky"] then
CARD.ability.cry_possessed = nil CARD.ability.cry_possessed = nil
SMODS.Stickers.cry_flickering:apply(CARD, nil) SMODS.Stickers.cry_flickering:apply(CARD, nil)
end
play_sound("card1", percent) play_sound("card1", percent)
CARD:juice_up(0.3, 0.3) CARD:juice_up(0.3, 0.3)
return true return true
@ -3053,10 +3356,8 @@ local patch = {
CARD:set_eternal(nil) CARD:set_eternal(nil)
end end
CARD.ability.banana = nil CARD.ability.banana = nil
if Cryptid.enabled["Spooky"] then
CARD.ability.cry_possessed = nil CARD.ability.cry_possessed = nil
SMODS.Stickers.cry_flickering:apply(CARD, nil) SMODS.Stickers.cry_flickering:apply(CARD, nil)
end
play_sound("card1", percent) play_sound("card1", percent)
CARD:juice_up(0.3, 0.3) CARD:juice_up(0.3, 0.3)
return true return true
@ -3066,6 +3367,17 @@ local patch = {
end, end,
} }
local ctrl_v = { local ctrl_v = {
cry_credits = {
idea = {
"ItsFlowwey",
},
art = {
"HexaCryonic",
},
code = {
"Foegro",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -3101,6 +3413,7 @@ local ctrl_v = {
card:add_to_deck() card:add_to_deck()
table.insert(G.playing_cards, card) table.insert(G.playing_cards, card)
G.hand:emplace(card) G.hand:emplace(card)
playing_card_joker_effects({ card })
return true return true
end, end,
})) }))
@ -3157,6 +3470,17 @@ local ctrl_v = {
end, end,
} }
local inst = { local inst = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Foegro",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -3223,6 +3547,17 @@ local inst = {
end, end,
} }
local alttab = { local alttab = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Toneblock",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -3243,7 +3578,7 @@ local alttab = {
can_bulk_use = true, can_bulk_use = true,
loc_vars = function(self, info_queue, card) loc_vars = function(self, info_queue, card)
local ret = localize("k_none") local ret = localize("k_none")
if safe_get(G.GAME, "blind", "in_blind") then if Cryptid.safe_get(G.GAME, "blind", "in_blind") then
if G.GAME.blind:get_type() == "Small" then if G.GAME.blind:get_type() == "Small" then
ret = localize({ type = "name_text", key = G.GAME.round_resets.blind_tags.Small, set = "Tag" }) ret = localize({ type = "name_text", key = G.GAME.round_resets.blind_tags.Small, set = "Tag" })
elseif G.GAME.blind:get_type() == "Big" then elseif G.GAME.blind:get_type() == "Big" then
@ -3255,7 +3590,7 @@ local alttab = {
return { vars = { ret } } return { vars = { ret } }
end, end,
can_use = function(self, card) can_use = function(self, card)
return safe_get(G.GAME, "blind", "in_blind") return Cryptid.safe_get(G.GAME, "blind", "in_blind")
end, end,
use = function(self, card, area, copier) use = function(self, card, area, copier)
local used_consumable = copier or card local used_consumable = copier or card
@ -3306,6 +3641,17 @@ local alttab = {
end, end,
} }
local automaton = { local automaton = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -3320,7 +3666,7 @@ local automaton = {
order = 5, order = 5,
atlas = "code", atlas = "code",
loc_vars = function(self, info_queue, card) loc_vars = function(self, info_queue, card)
return { vars = { safe_get(card, "ability", "create") or self.config.create } } return { vars = { Cryptid.safe_get(card, "ability", "create") or self.config.create } }
end, end,
can_use = function(self, card) can_use = function(self, card)
return #G.consumeables.cards < G.consumeables.config.card_limit or card.area == G.consumeables return #G.consumeables.cards < G.consumeables.config.card_limit or card.area == G.consumeables
@ -3385,6 +3731,17 @@ local green_seal = {
end, end,
} }
local source = { local source = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"cry_green", "cry_green",
@ -3442,6 +3799,17 @@ local source = {
end, end,
} }
local pointer = { local pointer = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -4291,6 +4659,17 @@ local pointer = {
end, end,
} }
local encoded = { local encoded = {
cry_credits = {
idea = {
"I forgot",
},
art = {
"Kailen",
},
code = {
"Kailen",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_code", "set_cry_code",
@ -4348,16 +4727,22 @@ local CodeJoker = {
pos = { x = 2, y = 4 }, pos = { x = 2, y = 4 },
loc_vars = function(self, info_queue, center) loc_vars = function(self, info_queue, center)
info_queue[#info_queue + 1] = { key = "e_negative_consumable", set = "Edition", config = { extra = 1 } } info_queue[#info_queue + 1] = { key = "e_negative_consumable", set = "Edition", config = { extra = 1 } }
return { key = Cryptid.gameset_loc(self, { exp_modest = "modest" }) }
end, end,
extra_gamesets = { "exp_modest" },
rarity = "cry_epic", rarity = "cry_epic",
cost = 11, cost = 11,
order = 109, order = 109,
blueprint_compat = true, blueprint_compat = true,
atlas = "atlasepic", atlas = "atlasepic",
calculate = function(self, card, context) calculate = function(self, card, context)
if context.setting_blind and not (context.blueprint_card or self).getting_sliced then if
context.setting_blind
and not (context.blueprint_card or self).getting_sliced
and (G.GAME.blind:get_type() == "Boss" or Cryptid.gameset(card) ~= "exp_modest")
then
play_sound("timpani") play_sound("timpani")
local card = create_card("Code", G.consumables, nil, nil, nil, nil) local card = create_card("Code", G.consumeables, nil, nil, nil, nil)
card:set_edition({ card:set_edition({
negative = true, negative = true,
}) })
@ -4385,7 +4770,7 @@ local CodeJoker = {
local count2 = 0 local count2 = 0
for k, v in pairs(G.P_CENTER_POOLS["Code"]) do for k, v in pairs(G.P_CENTER_POOLS["Code"]) do
count2 = count2 + 1 count2 = count2 + 1
if safe_get(v, "discovered") == true then if Cryptid.safe_get(v, "discovered") == true then
count = count + 1 count = count + 1
end end
end end
@ -4428,16 +4813,41 @@ local copypaste = {
) or 1, ) or 1,
card and card.ability.extra.odds or 2, card and card.ability.extra.odds or 2,
}, -- this effectively prevents a copypaste from ever initially misprinting at above 50% odds. still allows rigging/oops }, -- this effectively prevents a copypaste from ever initially misprinting at above 50% odds. still allows rigging/oops
key = Card.get_gameset(card) ~= "madness" and "j_cry_copypaste" or "j_cry_copypaste2", key = Cryptid.gameset_loc(self, { madness = "madness", exp_modest = "modest" }),
} }
end, end,
atlas = "atlasepic", atlas = "atlasepic",
extra_gamesets = { "exp_modest" },
gameset_config = {
exp_modest = { cost = 8, center = { rarity = 3 } },
},
calculate = function(self, card, context) calculate = function(self, card, context)
if context.pull_card and context.card.ability.set == "Code" and Cryptid.gameset(card) == "exp_modest" then
if #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
G.E_MANAGER:add_event(Event({
func = function()
local cards = copy_card(context.card)
cards:add_to_deck()
G.consumeables:emplace(cards)
return true
end,
}))
card_eval_status_text(
context.blueprint_card or card,
"extra",
nil,
nil,
nil,
{ message = localize("k_copied_ex") }
)
end
end
if if
context.using_consumeable context.using_consumeable
and context.consumeable.ability.set == "Code" and context.consumeable.ability.set == "Code"
and not context.consumeable.beginning_end and not context.consumeable.beginning_end
and not card.ability.extra.ckt and not card.ability.extra.ckt
and Cryptid.gameset(card) ~= "exp_modest"
then then
if #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then if #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
if if
@ -4603,7 +5013,7 @@ local blender = {
and not context.consumeable.beginning_end and not context.consumeable.beginning_end
then then
if #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then if #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
local card = create_card("Consumeables", G.consumables, nil, nil, nil, nil, nil, "cry_blender") local card = create_card("Consumeables", G.consumeables, nil, nil, nil, nil, nil, "cry_blender")
card:add_to_deck() card:add_to_deck()
G.consumeables:emplace(card) G.consumeables:emplace(card)
end end
@ -4811,7 +5221,11 @@ return {
end end
--Code from Betmma's Vouchers --Code from Betmma's Vouchers
G.FUNCS.can_reserve_card = function(e) G.FUNCS.can_reserve_card = function(e)
if #G.consumeables.cards < G.consumeables.config.card_limit then local c1 = e.config.ref_table
if
#G.consumeables.cards
< G.consumeables.config.card_limit + (Cryptid.safe_get(c1, "edition", "negative") and 1 or 0)
then
e.config.colour = G.C.GREEN e.config.colour = G.C.GREEN
e.config.button = "reserve_card" e.config.button = "reserve_card"
else else
@ -4837,6 +5251,7 @@ return {
c1.children.buy_button = nil c1.children.buy_button = nil
remove_nils(c1.children) remove_nils(c1.children)
G.consumeables:emplace(c1) G.consumeables:emplace(c1)
SMODS.calculate_context({ pull_card = true, card = c1 })
G.GAME.pack_choices = G.GAME.pack_choices - 1 G.GAME.pack_choices = G.GAME.pack_choices - 1
if G.GAME.pack_choices <= 0 then if G.GAME.pack_choices <= 0 then
G.FUNCS.end_consumeable(nil, delay_fac) G.FUNCS.end_consumeable(nil, delay_fac)

View file

@ -16,6 +16,13 @@ local very_fair = {
end, end,
init = function(self) init = function(self)
very_fair_quip = {} very_fair_quip = {}
local avts = SMODS.add_voucher_to_shop
function SMODS.add_voucher_to_shop(...)
if G.GAME.modifiers.cry_no_vouchers then
return
end
return avts(...)
end
end, end,
} }
local equilibrium = { local equilibrium = {
@ -43,13 +50,13 @@ local equilibrium = {
local valid_pools = { "Joker", "Consumeables", "Voucher", "Booster" } local valid_pools = { "Joker", "Consumeables", "Voucher", "Booster" }
for _, id in ipairs(valid_pools) do for _, id in ipairs(valid_pools) do
for k, v in pairs(G.P_CENTER_POOLS[id]) do for k, v in pairs(G.P_CENTER_POOLS[id]) do
if not center_no(v, "doe", k) then if not Cryptid.no(v, "doe", k) then
P_CRY_ITEMS[#P_CRY_ITEMS + 1] = v.key P_CRY_ITEMS[#P_CRY_ITEMS + 1] = v.key
end end
end end
end end
for k, v in pairs(G.P_CARDS) do for k, v in pairs(G.P_CARDS) do
if not center_no(v, "doe", k) then if not Cryptid.no(v, "doe", k) then
P_CRY_ITEMS[#P_CRY_ITEMS + 1] = v.key P_CRY_ITEMS[#P_CRY_ITEMS + 1] = v.key
end end
end end
@ -213,6 +220,7 @@ local redeemed = {
else else
area = G.play area = G.play
end end
if not G.cry_redeemed_buffer then G.cry_redeemed_buffer = {} end
if not G.cry_redeemed_buffer[v.key] and v.unlocked then if not G.cry_redeemed_buffer[v.key] and v.unlocked then
local card = create_card("Voucher", area, nil, nil, nil, nil, v.key) local card = create_card("Voucher", area, nil, nil, nil, nil, v.key)
G.cry_redeemed_buffer[v.key] = true G.cry_redeemed_buffer[v.key] = true
@ -253,8 +261,8 @@ local legendary = {
pos = { x = 0, y = 6 }, pos = { x = 0, y = 6 },
atlas = "atlasdeck", atlas = "atlasdeck",
order = 15, order = 15,
trigger_effect = function(self, args) calculate = function(self, back, context)
if args.context == "eval" and safe_get(G.GAME, "last_blind", "boss") then if context.context == "eval" and Cryptid.safe_get(G.GAME, "last_blind", "boss") then
if G.jokers then if G.jokers then
if #G.jokers.cards < G.jokers.config.card_limit then if #G.jokers.cards < G.jokers.config.card_limit then
local legendary_poll = pseudorandom(pseudoseed("cry_legendary")) local legendary_poll = pseudorandom(pseudoseed("cry_legendary"))
@ -383,12 +391,12 @@ local glowing = {
return { vars = { " " } } return { vars = { " " } }
end, end,
atlas = "glowing", atlas = "glowing",
trigger_effect = function(self, args) calculate = function(self, back, context)
if args.context == "eval" and safe_get(G.GAME, "last_blind", "boss") then if context.context == "eval" and Cryptid.safe_get(G.GAME, "last_blind", "boss") then
for i = 1, #G.jokers.cards do for i = 1, #G.jokers.cards do
if not Card.no(G.jokers.cards[i], "immutable", true) then if not Card.no(G.jokers.cards[i], "immutable", true) then
cry_with_deck_effects(G.jokers.cards[i], function(card) Cryptid.with_deck_effects(G.jokers.cards[i], function(card)
cry_misprintize(card, { min = 1.25, max = 1.25 }, nil, true) Cryptid.misprintize(card, { min = 1.25, max = 1.25 }, nil, true)
end) end)
end end
end end
@ -465,6 +473,9 @@ local antimatter = {
"set_cry_deck", "set_cry_deck",
}, },
}, },
loc_vars = function(self, info_queue, center)
return { key = Cryptid.gameset_loc(self, { mainline = "balanced", modest = "balanced" }) }
end,
name = "cry-Antimatter", name = "cry-Antimatter",
order = 76, order = 76,
key = "antimatter", key = "antimatter",
@ -479,44 +490,53 @@ local antimatter = {
cry_forced_draw_amount = 5, cry_forced_draw_amount = 5,
}, },
pos = { x = 2, y = 0 }, pos = { x = 2, y = 0 },
trigger_effect = function(self, args) calculate = function(self, back, context)
if args.context ~= "final_scoring_step" then if context.context ~= "final_scoring_step" then
antimatter_trigger_effect(self, args) Cryptid.antimatter_trigger(self, context)
else else
return antimatter_trigger_effect_final_scoring_step(self, args) return Cryptid.antimatter_trigger_final_scoring(self, context)
end end
end, end,
apply = function(self) apply = function(self)
antimatter_apply() Cryptid.antimatter_apply()
end, end,
atlas = "atlasdeck", atlas = "atlasdeck",
init = function(self) init = function(self)
function antimatter_apply() function Cryptid.antimatter_apply()
local bluecheck = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_blue", "wins", 8) local bluecheck = Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_blue", "wins", 8)
local yellowcheck = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_yellow", "wins", 8) local yellowcheck = Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_yellow", "wins", 8)
local abandonedcheck = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_abandoned", "wins", 8) local abandonedcheck =
local ghostcheck = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_ghost", "wins", 8) Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_abandoned", "wins", 8)
local redcheck = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_red", "wins", 8) local ghostcheck = Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_ghost", "wins", 8)
local checkeredcheck = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_checkered", "wins", 8) local redcheck = Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_red", "wins", 8)
local erraticcheck = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_erratic", "wins", 8) local checkeredcheck =
local blackcheck = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_black", "wins", 8) Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_checkered", "wins", 8)
local paintedcheck = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_painted", "wins", 8) local erraticcheck = Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_erratic", "wins", 8)
local greencheck = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_green", "wins", 8) local blackcheck = Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_black", "wins", 8)
local spookycheck = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_spooky", "wins", 8) local paintedcheck = Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_painted", "wins", 8)
local greencheck = Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_green", "wins", 8)
local spookycheck =
Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_spooky", "wins", 8)
local equilibriumcheck = local equilibriumcheck =
safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_equilibrium", "wins", 8) Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_equilibrium", "wins", 8)
local misprintcheck = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_misprint", "wins", 8) local misprintcheck =
local infinitecheck = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_infinite", "wins", 8) Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_misprint", "wins", 8)
local wormholecheck = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_wormhole", "wins", 8) local infinitecheck =
local redeemedcheck = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_redeemed", "wins", 8) Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_infinite", "wins", 8)
local legendarycheck = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_legendary", "wins", 8) local wormholecheck =
local encodedcheck = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_encoded", "wins", 8) Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_wormhole", "wins", 8)
local world = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_world_deck", "wins", 8) local redeemedcheck =
local sun = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_sun_deck", "wins", 8) Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_redeemed", "wins", 8)
local star = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_star_deck", "wins", 8) local legendarycheck =
local moon = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_moon_deck", "wins", 8) Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_legendary", "wins", 8)
local encodedcheck =
Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_encoded", "wins", 8)
local world = Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_world_deck", "wins", 8)
local sun = Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_sun_deck", "wins", 8)
local star = Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_star_deck", "wins", 8)
local moon = Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_moon_deck", "wins", 8)
if cry_get_gameset(G.P_CENTERS.b_cry_antimatter) == "madness" then if Cryptid.gameset(G.P_CENTERS.b_cry_antimatter) == "madness" then
bluecheck = 1 bluecheck = 1
yellowcheck = 1 yellowcheck = 1
abandonedcheck = 1 abandonedcheck = 1
@ -545,8 +565,8 @@ local antimatter = {
if (bluecheck or 0) ~= 0 then if (bluecheck or 0) ~= 0 then
G.GAME.starting_params.hands = G.GAME.starting_params.hands + 1 G.GAME.starting_params.hands = G.GAME.starting_params.hands + 1
end end
--All Consumables (see get_antimatter_consumables) --All Consumables (see Cryptid.get_antimatter_consumables)
local querty = get_antimatter_consumables() local querty = Cryptid.get_antimatter_consumables()
if #querty > 0 then if #querty > 0 then
delay(0.4) delay(0.4)
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
@ -578,15 +598,19 @@ local antimatter = {
if (redcheck or 0) ~= 0 then if (redcheck or 0) ~= 0 then
G.GAME.starting_params.discards = G.GAME.starting_params.discards + 1 G.GAME.starting_params.discards = G.GAME.starting_params.discards + 1
end end
-- All Decks with Vouchers (see get_antimatter_vouchers) -- All Decks with Vouchers (see Cryptid.get_antimatter_vouchers)
local vouchers = get_antimatter_vouchers() local vouchers = Cryptid.get_antimatter_vouchers()
if #vouchers > 0 then if #vouchers > 0 then
for k, v in pairs(vouchers) do for k, v in pairs(vouchers) do
if G.P_CENTERS[v] then if G.P_CENTERS[v] then
G.GAME.used_vouchers[v] = true G.GAME.used_vouchers[v] = true
G.GAME.cry_owned_vouchers[v] = true
G.GAME.starting_voucher_count = (G.GAME.starting_voucher_count or 0) + 1 G.GAME.starting_voucher_count = (G.GAME.starting_voucher_count or 0) + 1
G.E_MANAGER:add_event(Event({
func = function()
Card.apply_to_run(nil, G.P_CENTERS[v]) Card.apply_to_run(nil, G.P_CENTERS[v])
return true
end,
}))
end end
end end
end end
@ -659,14 +683,13 @@ local antimatter = {
-- Wormhole deck -- Wormhole deck
if (wormholecheck or 0) ~= 0 then if (wormholecheck or 0) ~= 0 then
G.GAME.modifiers.cry_negative_rate = 20 G.GAME.modifiers.cry_negative_rate = 20
--[[
Needs to check if exotic Jokers exist are enabled (whenever that happens)
if Cryptid.enabled("set_cry_exotic") == true then
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
func = function() func = function()
if G.jokers then if G.jokers then
local card = create_card("Joker", G.jokers, nil, "cry_exotic", nil, nil, nil, "cry_wormhole") local card =
create_card("Joker", G.jokers, nil, "cry_exotic", nil, nil, nil, "cry_wormhole")
card:add_to_deck() card:add_to_deck()
card:start_materialize() card:start_materialize()
G.jokers:emplace(card) G.jokers:emplace(card)
@ -674,9 +697,7 @@ local antimatter = {
end end
end, end,
})) }))
end
]]
--
end end
-- Redeemed deck -- Redeemed deck
if (redeemedcheck or 0) ~= 0 then if (redeemedcheck or 0) ~= 0 then
@ -709,9 +730,8 @@ local antimatter = {
end, end,
})) }))
end end
--Encoded Deck (TBA) --Encoded Deck
if (encodedcheck or 0) ~= 0 then if (encodedcheck or 0) ~= 0 then
--[[
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
func = function() func = function()
if G.jokers then if G.jokers then
@ -737,23 +757,27 @@ local antimatter = {
end end
end, end,
})) }))
]]
--
end end
end end
function antimatter_trigger_effect_final_scoring_step(self, args) function Cryptid.antimatter_trigger_final_scoring(self, context)
local critcheck = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_critical", "wins", 8) local critcheck =
local plasmacheck = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_plasma", "wins", 8) Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_critical", "wins", 8)
local plasmacheck = Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_plasma", "wins", 8)
if args.context == "final_scoring_step" then if Cryptid.gameset(G.P_CENTERS.b_cry_antimatter) == "madness" then
critcheck = 1
plasmacheck = 1
end
if context.context == "final_scoring_step" then
local crit_poll = pseudorandom(pseudoseed("cry_critical")) local crit_poll = pseudorandom(pseudoseed("cry_critical"))
crit_poll = crit_poll / (G.GAME.probabilities.normal or 1) crit_poll = crit_poll / (G.GAME.probabilities.normal or 1)
--Critical Deck --Critical Deck
if (critcheck or 0) ~= 0 then if (critcheck or 0) ~= 0 then
if crit_poll < self.config.cry_crit_rate then if crit_poll < self.config.cry_crit_rate then
args.mult = args.mult ^ 2 context.mult = context.mult ^ 2
update_hand_text({ delay = 0 }, { mult = args.mult, chips = args.chips }) update_hand_text({ delay = 0 }, { mult = context.mult, chips = context.chips })
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
func = function() func = function()
play_sound("talisman_emult", 1) play_sound("talisman_emult", 1)
@ -772,11 +796,11 @@ local antimatter = {
end end
end end
--Plasma Deck --Plasma Deck
local tot = args.chips + args.mult local tot = context.chips + context.mult
if (plasmacheck or 0) ~= 0 then if (plasmacheck or 0) ~= 0 then
args.chips = math.floor(tot / 2) context.chips = math.floor(tot / 2)
args.mult = math.floor(tot / 2) context.mult = math.floor(tot / 2)
update_hand_text({ delay = 0 }, { mult = args.mult, chips = args.chips }) update_hand_text({ delay = 0 }, { mult = context.mult, chips = context.chips })
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
func = function() func = function()
@ -825,21 +849,30 @@ local antimatter = {
delay(0.6) delay(0.6)
end end
return args.chips, args.mult return context.chips, context.mult
end end
end end
function antimatter_trigger_effect(self, args) function Cryptid.antimatter_trigger(self, context)
local glowingcheck = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_glowing", "wins", 8) local glowingcheck =
local legendarycheck = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_legendary", "wins", 8) Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_glowing", "wins", 8)
local anaglyphcheck = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_anaglyph", "wins", 8) local legendarycheck =
Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_legendary", "wins", 8)
local anaglyphcheck =
Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_anaglyph", "wins", 8)
if args.context == "eval" and safe_get(G.GAME, "last_blind", "boss") then if Cryptid.gameset(G.P_CENTERS.b_cry_antimatter) == "madness" then
glowingcheck = 1
legendarycheck = 1
anaglyphcheck = 1
end
if context.context == "eval" and Cryptid.safe_get(G.GAME, "last_blind", "boss") then
--Glowing Deck --Glowing Deck
if (glowingcheck or 0) ~= 0 then if (glowingcheck or 0) ~= 0 then
for i = 1, #G.jokers.cards do for i = 1, #G.jokers.cards do
cry_with_deck_effects(G.jokers.cards[i], function(card) Cryptid.with_deck_effects(G.jokers.cards[i], function(card)
cry_misprintize(card, { min = 1.25, max = 1.25 }, nil, true) Cryptid.misprintize(card, { min = 1.25, max = 1.25 }, nil, true)
end) end)
end end
end end
@ -889,11 +922,12 @@ local antimatter = {
end end
end end
function get_antimatter_vouchers(voucher_table) function Cryptid.get_antimatter_vouchers(voucher_table)
-- Create a table or use one that is passed into the function -- Create a table or use one that is passed into the function
if not voucher_table or type(voucher_table) ~= "table" then if not voucher_table or type(voucher_table) ~= "table" then
voucher_table = {} voucher_table = {}
end end
local skip = (Cryptid.gameset(G.P_CENTERS.b_cry_antimatter) == "madness")
-- Add Vouchers into the table by key -- Add Vouchers into the table by key
local function already_exists(t, voucher) local function already_exists(t, voucher)
@ -911,77 +945,56 @@ local antimatter = {
end end
end end
--Checks for nils in the extremely nested thing i'm checking for local nebulacheck = Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_nebula", "wins", 8)
local magiccheck = Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_magic", "wins", 8)
local nebulacheck = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_nebula", "wins", 8) local zodiaccheck = Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_zodiac", "wins", 8)
local magiccheck = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_magic", "wins", 8)
local zodiaccheck = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_zodiac", "wins", 8)
local equilibriumcheck = local equilibriumcheck =
safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_equilibrium", "wins", 8) Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_cry_equilibrium", "wins", 8)
--Nebula Deck --Nebula Deck
if (nebulacheck or 0) ~= 0 then if (nebulacheck or 0) ~= 0 or skip then
Add_voucher_to_the_table(voucher_table, "v_telescope") Add_voucher_to_the_table(voucher_table, "v_telescope")
end end
-- Magic Deck -- Magic Deck
if (magiccheck or 0) ~= 0 then if (magiccheck or 0) ~= 0 or skip then
Add_voucher_to_the_table(voucher_table, "v_crystal_ball") Add_voucher_to_the_table(voucher_table, "v_crystal_ball")
end end
-- Zodiac Deck -- Zodiac Deck
if (zodiaccheck or 0) ~= 0 then if (zodiaccheck or 0) ~= 0 or skip then
Add_voucher_to_the_table(voucher_table, "v_tarot_merchant") Add_voucher_to_the_table(voucher_table, "v_tarot_merchant")
Add_voucher_to_the_table(voucher_table, "v_planet_merchant") Add_voucher_to_the_table(voucher_table, "v_planet_merchant")
Add_voucher_to_the_table(voucher_table, "v_overstock_norm") Add_voucher_to_the_table(voucher_table, "v_overstock_norm")
end end
-- Deck Of Equilibrium -- Deck Of Equilibrium
if (equilibriumcheck or 0) ~= 0 then if (equilibriumcheck or 0) ~= 0 or skip then
Add_voucher_to_the_table(voucher_table, "v_overstock_norm") Add_voucher_to_the_table(voucher_table, "v_overstock_norm")
Add_voucher_to_the_table(voucher_table, "v_overstock_plus") Add_voucher_to_the_table(voucher_table, "v_overstock_plus")
end end
return voucher_table return voucher_table
end end
--Does this even need to be a function idk --Does this even need to be a function idk
function get_antimatter_consumables(consumable_table) function Cryptid.get_antimatter_consumables(consumable_table)
--Checks for nils in the extremely nested thing i'm checking for local skip = (Cryptid.gameset(G.P_CENTERS.b_cry_antimatter) == "madness")
-- Create a table or use one that is passed into the function
if not consumable_table or type(consumable_table) ~= "table" then if not consumable_table or type(consumable_table) ~= "table" then
consumable_table = {} consumable_table = {}
end end
-- Add Consumables into the table by key -- Add Consumables into the table by key
local magiccheck = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_magic", "wins", 8) local magiccheck = Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_magic", "wins", 8)
local ghostcheck = safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_ghost", "wins", 8) local ghostcheck = Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "deck_usage", "b_ghost", "wins", 8)
if (magiccheck or 0) ~= 0 then if (magiccheck or 0) ~= 0 or skip then
table.insert(consumable_table, "c_fool") table.insert(consumable_table, "c_fool")
table.insert(consumable_table, "c_fool") table.insert(consumable_table, "c_fool")
end end
if (ghostcheck or 0) ~= 0 then if (ghostcheck or 0) ~= 0 or skip then
table.insert(consumable_table, "c_hex") table.insert(consumable_table, "c_hex")
end end
return consumable_table return consumable_table
end end
--[[
local test = antimatter_trigger_effect
function antimatter_trigger_effect(self, args)
test(self, args)
if args.context == "eval" then
ease_dollars(900)
end
end
local test2 = get_antimatter_consumables
function get_antimatter_consumables(consumable_table)
if not consumable_table or type(consumable_table) ~= "table" then consumable_table = {} end
table.insert(consumable_table, "c_soul")
table.insert(consumable_table, "c_soul")
return test2(consumable_table)
end
]]
--
end, end,
} }

View file

@ -1,10 +1,5 @@
local atlasenhanced = { --Move all the stuff in here into atlasdeck.png later
object_type = "Atlas", --Also a lot of the edition decks have wrong proportions so those also need to get fixed
key = "atlasenhanced",
path = "atlasdeck.png",
px = 71,
py = 95,
}
local atlasedition = { local atlasedition = {
object_type = "Atlas", object_type = "Atlas",
key = "atlaseditiondeck", key = "atlaseditiondeck",
@ -16,11 +11,12 @@ local atlasedition = {
Cryptid.edeck_sprites = { Cryptid.edeck_sprites = {
edition = { edition = {
order = 1, order = 1,
default = { atlas = "centers", pos = { x = 5, y = 2 } }, default = { atlas = "cry_placeholders", pos = { x = 4, y = 2 } },
foil = { atlas = "cry_atlaseditiondeck", pos = { x = 0, y = 0 } }, foil = { atlas = "cry_atlaseditiondeck", pos = { x = 0, y = 0 } },
holo = { atlas = "cry_atlaseditiondeck", pos = { x = 1, y = 0 } }, holo = { atlas = "cry_atlaseditiondeck", pos = { x = 1, y = 0 } },
polychrome = { atlas = "cry_atlaseditiondeck", pos = { x = 2, y = 0 } }, polychrome = { atlas = "cry_atlaseditiondeck", pos = { x = 2, y = 0 } },
negative = { atlas = "cry_atlaseditiondeck", pos = { x = 3, y = 0 } }, negative = { atlas = "cry_atlaseditiondeck", pos = { x = 3, y = 0 } },
cry_glitched = { atlas = "cry_atlaseditiondeck", pos = { x = 4, y = 0 } },
cry_mosaic = { atlas = "cry_atlaseditiondeck", pos = { x = 0, y = 1 } }, cry_mosaic = { atlas = "cry_atlaseditiondeck", pos = { x = 0, y = 1 } },
cry_oversat = { atlas = "cry_atlaseditiondeck", pos = { x = 1, y = 1 } }, cry_oversat = { atlas = "cry_atlaseditiondeck", pos = { x = 1, y = 1 } },
cry_glass = { atlas = "cry_atlaseditiondeck", pos = { x = 2, y = 1 } }, cry_glass = { atlas = "cry_atlaseditiondeck", pos = { x = 2, y = 1 } },
@ -32,53 +28,57 @@ Cryptid.edeck_sprites = {
}, },
enhancement = { enhancement = {
order = 2, order = 2,
default = { atlas = "centers", pos = { x = 5, y = 2 } }, default = { atlas = "cry_placeholders", pos = { x = 4, y = 2 } },
m_bonus = { atlas = "cry_atlasenhanced", pos = { x = 3, y = 3 } }, m_bonus = { atlas = "cry_atlasdeck", pos = { x = 3, y = 3 } },
m_mult = { atlas = "cry_atlasenhanced", pos = { x = 2, y = 3 } }, m_mult = { atlas = "cry_atlasdeck", pos = { x = 2, y = 3 } },
m_wild = { atlas = "cry_atlasenhanced", pos = { x = 5, y = 3 } }, m_wild = { atlas = "cry_atlasdeck", pos = { x = 5, y = 3 } },
m_glass = { atlas = "cry_atlasenhanced", pos = { x = 4, y = 3 } }, m_glass = { atlas = "cry_atlasdeck", pos = { x = 4, y = 3 } },
m_steel = { atlas = "centers", pos = { x = 6, y = 1 } }, m_steel = { atlas = "cry_atlasdeck", pos = { x = 8, y = 4 } },
m_stone = { atlas = "centers", pos = { x = 5, y = 0 } }, m_stone = { atlas = "cry_atlasdeck", pos = { x = 6, y = 4 } },
m_gold = { atlas = "centers", pos = { x = 6, y = 0 } }, m_gold = { atlas = "cry_atlasdeck", pos = { x = 7, y = 4 } },
m_lucky = { atlas = "centers", pos = { x = 4, y = 1 } }, m_lucky = { atlas = "cry_atlasdeck", pos = { x = 6, y = 3 } },
m_cry_echo = { atlas = "cry_atlasenhanced", pos = { x = 1, y = 5 } }, m_cry_echo = { atlas = "cry_atlasdeck", pos = { x = 1, y = 5 } },
m_cry_light = { atlas = "cry_misc", pos = { x = 0, y = 3 } }, m_cry_light = { atlas = "cry_atlasdeck", pos = { x = 7, y = 3 } },
}, },
sticker = { sticker = {
order = 3, order = 3,
default = { atlas = "centers", pos = { x = 5, y = 2 } }, default = { atlas = "cry_placeholders", pos = { x = 4, y = 2 } },
eternal = { atlas = "cry_atlasenhanced", pos = { x = 5, y = 2 } }, eternal = { atlas = "cry_atlasdeck", pos = { x = 6, y = 0 } },
perishable = { atlas = "cry_atlasenhanced", pos = { x = 0, y = 3 } }, perishable = { atlas = "cry_atlasdeck", pos = { x = 7, y = 0 } },
rental = { atlas = "cry_atlasenhanced", pos = { x = 1, y = 3 } }, rental = { atlas = "cry_atlasdeck", pos = { x = 8, y = 0 } },
pinned = { atlas = "cry_atlasenhanced", pos = { x = 0, y = 5 } }, pinned = { atlas = "cry_atlasdeck", pos = { x = 7, y = 1 } },
banana = { atlas = "cry_atlasenhanced", pos = { x = 5, y = 4 } }, banana = { atlas = "cry_atlasdeck", pos = { x = 6, y = 1 } },
cry_rigged = { atlas = "cry_atlasdeck", pos = { x = 8, y = 1 } },
cry_absolute = { atlas = "cry_atlasdeck", pos = { x = 8, y = 2 } },
cry_possessed = { atlas = "cry_atlasdeck", pos = { x = 7, y = 2 } },
cry_flickering = { atlas = "cry_atlasdeck", pos = { x = 6, y = 2 } },
}, },
suit = { suit = {
order = 4, order = 4,
default = { atlas = "centers", pos = { x = 5, y = 2 } }, default = { atlas = "cry_placeholders", pos = { x = 4, y = 2 } },
Diamonds = { atlas = "cry_atlasenhanced", pos = { x = 2, y = 1 } }, Diamonds = { atlas = "cry_atlasdeck", pos = { x = 2, y = 1 } },
Hearts = { atlas = "cry_atlasenhanced", pos = { x = 3, y = 1 } }, Hearts = { atlas = "cry_atlasdeck", pos = { x = 3, y = 1 } },
Spades = { atlas = "cry_atlasenhanced", pos = { x = 4, y = 1 } }, Spades = { atlas = "cry_atlasdeck", pos = { x = 4, y = 1 } },
Clubs = { atlas = "cry_atlasenhanced", pos = { x = 5, y = 1 } }, Clubs = { atlas = "cry_atlasdeck", pos = { x = 5, y = 1 } },
}, },
seal = { seal = {
order = 5, order = 5,
default = { atlas = "centers", pos = { x = 5, y = 2 } }, default = { atlas = "cry_placeholders", pos = { x = 4, y = 2 } },
Gold = { atlas = "centers", pos = { x = 1, y = 2 } }, Gold = { atlas = "cry_atlasdeck", pos = { x = 3, y = 2 } },
Red = { atlas = "centers", pos = { x = 0, y = 0 } }, Red = { atlas = "cry_atlasdeck", pos = { x = 0, y = 2 } },
Blue = { atlas = "cry_atlasenhanced", pos = { x = 2, y = 2 } }, Blue = { atlas = "cry_atlasdeck", pos = { x = 2, y = 2 } },
Purple = { atlas = "cry_atlasenhanced", pos = { x = 1, y = 2 } }, Purple = { atlas = "cry_atlasdeck", pos = { x = 1, y = 2 } },
cry_azure = { atlas = "centers", pos = { x = 0, y = 2 } }, cry_azure = { atlas = "cry_atlasdeck", pos = { x = 8, y = 3 } },
cry_green = { atlas = "cry_atlasenhanced", pos = { x = 3, y = 5 } }, cry_green = { atlas = "cry_atlasdeck", pos = { x = 3, y = 5 } },
}, },
} }
cry_edeck_atlas_update = function(self) Cryptid.edeck_atlas_update = function(self)
local sprite = Cryptid.edeck_sprites[self.edeck_type] local sprite = Cryptid.edeck_sprites[self.edeck_type]
if not sprite then if not sprite then
error(self.edeck_type) error(self.edeck_type)
end end
local enh_info = { cry_get_enchanced_deck_info(self) } local enh_info = { Cryptid.enhanced_deck_info(self) }
sprite = sprite[enh_info[sprite.order]] or sprite.default sprite = sprite[enh_info[sprite.order]] or sprite.default
self.atlas, self.pos = sprite.atlas, sprite.pos self.atlas, self.pos = sprite.atlas, sprite.pos
return sprite return sprite
@ -96,13 +96,13 @@ local e_deck = {
order = 17, order = 17,
pos = { x = 5, y = 2 }, pos = { x = 5, y = 2 },
loc_vars = function(self, info_queue, center) loc_vars = function(self, info_queue, center)
local aaa = cry_get_enchanced_deck_info(self) local aaa = Cryptid.enhanced_deck_info(self)
return { vars = { localize({ type = "name_text", set = "Edition", key = "e_" .. aaa }) } } return { vars = { localize({ type = "name_text", set = "Edition", key = "e_" .. aaa }) } }
end, end,
edeck_type = "edition", edeck_type = "edition",
config = {}, config = { cry_no_edition_price = true },
apply = function(self) apply = function(self)
local aaa = cry_get_enchanced_deck_info(self) local aaa = Cryptid.enhanced_deck_info(self)
G.GAME.modifiers.cry_force_edition = aaa G.GAME.modifiers.cry_force_edition = aaa
--Ban Edition tags (They will never redeem) --Ban Edition tags (They will never redeem)
for k, v in pairs(G.P_TAGS) do for k, v in pairs(G.P_TAGS) do
@ -134,11 +134,11 @@ local et_deck = {
edeck_type = "enhancement", edeck_type = "enhancement",
config = {}, config = {},
loc_vars = function(self, info_queue, center) loc_vars = function(self, info_queue, center)
local _, bbb = cry_get_enchanced_deck_info(self) local _, bbb = Cryptid.enhanced_deck_info(self)
return { vars = { localize({ type = "name_text", set = "Enhanced", key = bbb }) } } return { vars = { localize({ type = "name_text", set = "Enhanced", key = bbb }) } }
end, end,
apply = function(self) apply = function(self)
local aaa, bbb = cry_get_enchanced_deck_info(self) local aaa, bbb = Cryptid.enhanced_deck_info(self)
G.GAME.modifiers.cry_force_enhancement = bbb G.GAME.modifiers.cry_force_enhancement = bbb
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
func = function() func = function()
@ -165,14 +165,14 @@ local sk_deck = {
edeck_type = "sticker", edeck_type = "sticker",
config = {}, config = {},
loc_vars = function(self, info_queue, center) loc_vars = function(self, info_queue, center)
local _, _, ccc = cry_get_enchanced_deck_info(self) local _, _, ccc = Cryptid.enhanced_deck_info(self)
if ccc == "pinned" then if ccc == "pinned" then
ccc = "pinned_left" ccc = "pinned_left"
end end
return { vars = { localize({ type = "name_text", set = "Other", key = ccc }) } } return { vars = { localize({ type = "name_text", set = "Other", key = ccc }) } }
end, end,
apply = function(self) apply = function(self)
local aaa, bbb, ccc = cry_get_enchanced_deck_info(self) local aaa, bbb, ccc = Cryptid.enhanced_deck_info(self)
G.GAME.modifiers.cry_force_sticker = ccc G.GAME.modifiers.cry_force_sticker = ccc
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
func = function() func = function()
@ -204,11 +204,11 @@ local st_deck = {
pos = { x = 5, y = 2 }, pos = { x = 5, y = 2 },
edeck_type = "suit", edeck_type = "suit",
loc_vars = function(self, info_queue, center) loc_vars = function(self, info_queue, center)
local _, _, _, ddd = cry_get_enchanced_deck_info(self) local _, _, _, ddd = Cryptid.enhanced_deck_info(self)
return { vars = { localize(ddd, "suits_plural") } } return { vars = { localize(ddd, "suits_plural") } }
end, end,
apply = function(self) apply = function(self)
local aaa, bbb, ccc, ddd = cry_get_enchanced_deck_info(self) local aaa, bbb, ccc, ddd = Cryptid.enhanced_deck_info(self)
if ddd == "Spades" then if ddd == "Spades" then
G.GAME.bosses_used["bl_goad"] = 1e308 G.GAME.bosses_used["bl_goad"] = 1e308
elseif ddd == "Hearts" then elseif ddd == "Hearts" then
@ -243,11 +243,11 @@ local sl_deck = {
config = {}, config = {},
edeck_type = "seal", edeck_type = "seal",
loc_vars = function(self, info_queue, center) loc_vars = function(self, info_queue, center)
local _, _, _, _, eee = cry_get_enchanced_deck_info(self) local _, _, _, _, eee = Cryptid.enhanced_deck_info(self)
return { vars = { localize({ type = "name_text", set = "Other", key = eee:lower() .. "_seal" }) } } return { vars = { localize({ type = "name_text", set = "Other", key = eee:lower() .. "_seal" }) } }
end, end,
apply = function(self) apply = function(self)
local aaa, bbb, ccc, ddd, eee = cry_get_enchanced_deck_info(self) local aaa, bbb, ccc, ddd, eee = Cryptid.enhanced_deck_info(self)
G.GAME.modifiers.cry_force_seal = eee G.GAME.modifiers.cry_force_seal = eee
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
func = function() func = function()
@ -312,7 +312,7 @@ return {
then then
self.config.center.immutable = true self.config.center.immutable = true
end end
if safe_get(center, "name") == "Default Base" then -- scuffed if Cryptid.safe_get(center, "name") == "Default Base" then -- scuffed
return sa( return sa(
self, self,
(not self.no_forced_enhancement and G.GAME.modifiers.cry_force_enhancement) (not self.no_forced_enhancement and G.GAME.modifiers.cry_force_enhancement)
@ -347,40 +347,40 @@ return {
function Card:change_suit(new_suit) function Card:change_suit(new_suit)
return cs(self, not self.no_forced_suit and G.GAME.modifiers.cry_force_suit or new_suit) return cs(self, not self.no_forced_suit and G.GAME.modifiers.cry_force_suit or new_suit)
end end
local sc = Card.set_cost
function Card:set_cost()
if self.edition and G.GAME.modifiers.cry_no_edition_price then
local m = cry_deep_copy(self.edition)
self.edition = nil
sc(self)
self.edition = m
else
sc(self)
end
end
local ccl = Card.click local ccl = Card.click
function Card:click() function Card:click()
ccl(self) ccl(self)
if if
Galdur Galdur
and (self.edeck_select or (self.area == safe_get(Galdur, "run_setup", "selected_deck_area") and safe_get( and Cryptid.safe_get(Galdur, "run_setup", "current_page") == 1
and (self.edeck_select or (self.area == Cryptid.safe_get(Galdur, "run_setup", "selected_deck_area") and Cryptid.safe_get(
self, self,
"config", "config",
"center", "center",
"edeck_type" "edeck_type"
))) )))
or ( or not Galdur
safe_get(G.GAME, "viewed_back", "effect", "center", "edeck_type") and (Cryptid.safe_get(G.GAME, "viewed_back", "effect", "center", "edeck_type") and (self.back == "viewed_back" or self.edeck_select))
and (self.back == "viewed_back" or self.edeck_select)
)
then then
if not G.cry_edeck_select then
Cryptid.enhancement_config_UI(Galdur and self.config.center or G.GAME.viewed_back.effect.center)
G.cry_edeck_select = true
else
if self.edeck_select then if self.edeck_select then
G.PROFILES[G.SETTINGS.profile]["cry_edeck_" .. self.config.center.edeck_type] = self.edeck_select G.PROFILES[G.SETTINGS.profile]["cry_edeck_" .. self.config.center.edeck_type] =
self.edeck_select
end end
cry_enhancement_config_UI(Galdur and self.config.center or G.GAME.viewed_back.effect.center) G.FUNCS.overlay_menu({
definition = G.UIDEF.run_setup("main_menu_play"),
})
G.cry_edeck_select = nil
end end
end end
function cry_enhancement_config_UI(center) end
function Cryptid.enhancement_config_UI(center)
if not center.edeck_type then
return
end
G.SETTINGS.paused = true G.SETTINGS.paused = true
G.your_collection = {} G.your_collection = {}
G.your_collection[1] = CardArea( G.your_collection[1] = CardArea(
@ -413,10 +413,10 @@ return {
end end
for i = 1, #editions do for i = 1, #editions do
local _center = cry_deep_copy(center) local _center = Cryptid.deep_copy(center)
_center.config["cry_force_" .. center.edeck_type] = editions[i] _center.config["cry_force_" .. center.edeck_type] = editions[i]
cry_edeck_atlas_update(_center) Cryptid.edeck_atlas_update(_center)
local card = create_generic_card(_center) local card = Cryptid.generic_card(_center)
card.edeck_select = editions[i] card.edeck_select = editions[i]
G.your_collection[1]:emplace(card) G.your_collection[1]:emplace(card)
end end
@ -440,5 +440,5 @@ return {
}) })
end end
end, end,
items = { e_deck, et_deck, sk_deck, st_deck, sl_deck, atlasenhanced, atlasedition }, items = { e_deck, et_deck, sk_deck, st_deck, sl_deck, atlasedition },
} }

View file

@ -17,7 +17,6 @@ One For all
-- Supercell -- Supercell
-- +15 Chips, +15 Mult, X2 Chips, X2 Mult, earn $3 at end of round -- +15 Chips, +15 Mult, X2 Chips, X2 Mult, earn $3 at end of round
-- TODO: Modest description
local supercell = { local supercell = {
object_type = "Joker", object_type = "Joker",
name = "cry-supercell", name = "cry-supercell",
@ -35,7 +34,10 @@ local supercell = {
blueprint_compat = true, blueprint_compat = true,
atlas = "atlasepic", atlas = "atlasepic",
loc_vars = function(self, info_queue, center) loc_vars = function(self, info_queue, center)
return { vars = { center.ability.extra.stat1, center.ability.extra.stat2, center.ability.extra.money } } return {
key = Cryptid.gameset_loc(self, { modest = "balanced" }),
vars = { center.ability.extra.stat1, center.ability.extra.stat2, center.ability.extra.money },
}
end, end,
calculate = function(self, card, context) calculate = function(self, card, context)
if context.joker_main then if context.joker_main then
@ -108,7 +110,11 @@ local membershipcardtwo = {
a = 8 a = 8
end end
return { return {
vars = { card.ability.extra.chips, card.ability.extra.chips * math.floor(GLOBAL_cry_member_count / a) }, key = Cryptid.gameset_loc(self, { modest = "balanced" }),
vars = {
card.ability.extra.chips,
card.ability.extra.chips * math.floor(Cryptid.member_count / a),
},
} }
end, end,
calculate = function(self, card, context) calculate = function(self, card, context)
@ -121,9 +127,9 @@ local membershipcardtwo = {
message = localize({ message = localize({
type = "variable", type = "variable",
key = "a_chips", key = "a_chips",
vars = { card.ability.extra.chips * math.floor(GLOBAL_cry_member_count / a) }, vars = { card.ability.extra.chips * math.floor(Cryptid.member_count / a) },
}), }),
chip_mod = card.ability.extra.chips * math.floor(GLOBAL_cry_member_count / a), chip_mod = card.ability.extra.chips * math.floor(Cryptid.member_count / a),
} }
end end
end, end,
@ -248,6 +254,17 @@ local sync_catalyst = {
return { return {
message = localize("k_balanced"), message = localize("k_balanced"),
colour = { 0.8, 0.45, 0.85, 1 }, colour = { 0.8, 0.45, 0.85, 1 },
func = function()
G.E_MANAGER:add_event(Event({
trigger = "after",
func = function()
play_sound("gong", 0.94, 0.3)
play_sound("gong", 0.94 * 1.5, 0.2)
play_sound("tarot1", 1.5)
return true
end,
}))
end,
} }
end end
end, end,
@ -262,25 +279,7 @@ local sync_catalyst = {
"Math", "Math",
}, },
}, },
unlocked = false, unlocked = true,
check_for_unlock = function(self, args)
if safe_get(G, "jokers") and safe_get(G.GAME, "round_resets", "ante") and G.GAME.round_resets.ante < 9 then
local rarities = {}
for i = 1, #G.jokers.cards do
local card = G.jokers.cards[i]
rarities[card.config.center.rarity .. "_rarity"] = true
end
if rarities["3_rarity"] and rarities["4_rarity"] and rarities["cry_epic_rarity"] then
unlock_card(self)
end
end
if args.type == "cry_lock_all" then
lock_card(self)
end
if args.type == "cry_unlock_all" then
unlock_card(self)
end
end,
} }
-- Negative Joker -- Negative Joker
@ -344,6 +343,9 @@ local canvas = {
cost = 18, cost = 18,
blueprint_compat = true, blueprint_compat = true,
atlas = "atlasepic", atlas = "atlasepic",
loc_vars = function(self, info_queue, center)
return { key = Cryptid.gameset_loc(self, { modest = "balanced" }) }
end,
calculate = function(self, card, context) calculate = function(self, card, context)
if context.retrigger_joker_check and not context.retrigger_joker then if context.retrigger_joker_check and not context.retrigger_joker then
local num_retriggers = 0 local num_retriggers = 0
@ -409,8 +411,9 @@ local error_joker = {
eternal_compat = false, eternal_compat = false,
atlas = "atlasepic", atlas = "atlasepic",
loc_vars = function(self, info_queue, center) loc_vars = function(self, info_queue, center)
if safe_get(G.GAME, "pseudorandom") and G.STAGE == G.STAGES.RUN then local ok, ret = pcall(Cryptid.predict_card_for_shop)
cry_error_msgs[#cry_error_msgs].string = "%%" .. predict_card_for_shop() if Cryptid.safe_get(G.GAME, "pseudorandom") and G.STAGE == G.STAGES.RUN and ok then
cry_error_msgs[#cry_error_msgs].string = "%%" .. ret
else else
cry_error_msgs[#cry_error_msgs].string = "%%J6" cry_error_msgs[#cry_error_msgs].string = "%%J6"
end end
@ -515,7 +518,7 @@ local error_joker = {
and not context.blueprint and not context.blueprint
then then
local eval = function(card) local eval = function(card)
return (safe_get(card, "ability", "loyalty_remaining") == 0) and not G.RESET_JIGGLES return (Cryptid.safe_get(card, "ability", "loyalty_remaining") == 0) and not G.RESET_JIGGLES
end end
juice_card_until(card, eval, true) juice_card_until(card, eval, true)
local jokers = {} local jokers = {}
@ -599,28 +602,29 @@ local error_joker = {
{ string = "%%ERROR", colour = G.C.CRY_ASCENDANT }, --temp string, this will be modified { string = "%%ERROR", colour = G.C.CRY_ASCENDANT }, --temp string, this will be modified
} }
function predict_pseudoseed(key) function Cryptid.predict_pseudoseed(key)
local M = G.GAME.pseudorandom[key] or pseudohash(key .. (G.GAME.pseudorandom.seed or "")) local M = G.GAME.pseudorandom[key] or pseudohash(key .. (G.GAME.pseudorandom.seed or ""))
local m = math.abs(tonumber(string.format("%.13f", (2.134453429141 + M * 1.72431234) % 1))) local m = math.abs(tonumber(string.format("%.13f", (2.134453429141 + M * 1.72431234) % 1)))
return (m + (G.GAME.pseudorandom.hashed_seed or 0)) / 2 return (m + (G.GAME.pseudorandom.hashed_seed or 0)) / 2
end end
function predict_card_for_shop() function Cryptid.predict_card_for_shop()
local total_rate = G.GAME.joker_rate + G.GAME.playing_card_rate local total_rate = G.GAME.joker_rate + G.GAME.playing_card_rate
for _, v in ipairs(SMODS.ConsumableType.obj_buffer) do for _, v in ipairs(SMODS.ConsumableType.obj_buffer) do
total_rate = total_rate + (G.GAME[v:lower() .. "_rate"] or 0) total_rate = total_rate + (G.GAME[v:lower() .. "_rate"] or 0)
end end
local polled_rate = pseudorandom(predict_pseudoseed("cdt" .. G.GAME.round_resets.ante)) * total_rate local polled_rate = pseudorandom(Cryptid.predict_pseudoseed("cdt" .. G.GAME.round_resets.ante)) * total_rate
local check_rate = 0 local check_rate = 0
-- need to preserve order to leave RNG unchanged -- need to preserve order to leave RNG unchanged
local rates = { local rates =
{
{ type = "Joker", val = G.GAME.joker_rate }, { type = "Joker", val = G.GAME.joker_rate },
{ type = "Tarot", val = G.GAME.tarot_rate }, { type = "Tarot", val = G.GAME.tarot_rate },
{ type = "Planet", val = G.GAME.planet_rate }, { type = "Planet", val = G.GAME.planet_rate },
{ {
type = (G.GAME.used_vouchers["v_illusion"] and pseudorandom(predict_pseudoseed("illusion")) > 0.6) type = (G.GAME.used_vouchers["v_illusion"] and pseudorandom(
and "Enhanced" Cryptid.predict_pseudoseed("illusion")
or "Base", ) > 0.6) and "Enhanced" or "Base",
val = G.GAME.playing_card_rate, val = G.GAME.playing_card_rate,
}, },
{ type = "Spectral", val = G.GAME.spectral_rate }, { type = "Spectral", val = G.GAME.spectral_rate },
@ -862,7 +866,7 @@ local number_blocks = {
vars = { vars = {
center.ability.extra.money, center.ability.extra.money,
center.ability.extra.money_mod, center.ability.extra.money_mod,
localize(safe_get(G.GAME, "current_round", "cry_nb_card", "rank") or "Ace", "ranks"), localize(Cryptid.safe_get(G.GAME, "current_round", "cry_nb_card", "rank") or "Ace", "ranks"),
}, },
} }
end, end,
@ -922,7 +926,12 @@ local double_scale = {
}, },
gameset_config = { gameset_config = {
modest = { cost = 20, center = { rarity = 4 } }, modest = { cost = 20, center = { rarity = 4 } },
exp_modest = { cost = 11 },
}, },
extra_gamesets = { "exp_modest" },
loc_vars = function(self, info_queue, center)
return { key = Cryptid.gameset_loc(self, { exp_modest = "modest" }) }
end,
order = 6, order = 6,
rarity = "cry_epic", rarity = "cry_epic",
cost = 18, cost = 18,
@ -930,6 +939,10 @@ local double_scale = {
atlas = "atlasepic", atlas = "atlasepic",
--todo: support jokers that scale multiple variables --todo: support jokers that scale multiple variables
cry_scale_mod = function(self, card, joker, orig_scale_scale, true_base, orig_scale_base, new_scale_base) cry_scale_mod = function(self, card, joker, orig_scale_scale, true_base, orig_scale_base, new_scale_base)
print(orig_scale_scale, true_base, orig_scale_base, new_scale_base)
if Cryptid.gameset(self) == "exp_modest" then
return true_base * 2
end
return orig_scale_scale + true_base return orig_scale_scale + true_base
end, end,
cry_credits = { cry_credits = {
@ -1293,7 +1306,7 @@ local curse_sob = {
}, },
unlocked = false, unlocked = false,
check_for_unlock = function(self, args) check_for_unlock = function(self, args)
if safe_get(G, "jokers") then if Cryptid.safe_get(G, "jokers") then
for i = 1, #G.jokers.cards do for i = 1, #G.jokers.cards do
if G.jokers.cards[i].config.center.key == "j_obelisk" and G.jokers.cards[i].ability.eternal then if G.jokers.cards[i].config.center.key == "j_obelisk" and G.jokers.cards[i].ability.eternal then
unlock_card(self) unlock_card(self)
@ -1565,7 +1578,7 @@ local altgoogol = {
madness = { center = { blueprint_compat = true }, copies = 2 }, madness = { center = { blueprint_compat = true }, copies = 2 },
}, },
loc_vars = function(self, info_queue, center) loc_vars = function(self, info_queue, center)
return { vars = { center.ability.copies } } return { key = Cryptid.gameset_loc(self, { modest = "balanced" }), vars = { center.ability.copies } }
end, end,
calculate = function(self, card, context) calculate = function(self, card, context)
local gameset = Card.get_gameset(card) local gameset = Card.get_gameset(card)
@ -1588,7 +1601,11 @@ local altgoogol = {
nil, nil,
nil, nil,
nil, nil,
(gameset == "modest" and (safe_get(chosen_joker, "edition", "negative")) or nil) (
gameset == "modest"
and (Cryptid.safe_get(chosen_joker, "edition", "negative"))
or nil
)
) )
card:add_to_deck() card:add_to_deck()
G.jokers:emplace(card) G.jokers:emplace(card)
@ -1650,36 +1667,31 @@ local soccer = {
"set_cry_epic", "set_cry_epic",
}, },
}, },
immutable = true, immutable = true, -- i swear i changed this... whatever
rarity = "cry_epic", rarity = "cry_epic",
order = 58, order = 58,
cost = 20, cost = 20,
atlas = "atlasepic", atlas = "atlasepic",
loc_vars = function(self, info_queue, center) loc_vars = function(self, info_queue, center)
return { vars = { center.ability.extra.holygrail } } return { key = Cryptid.gameset_loc(self, { modest = "balanced" }), vars = { center.ability.extra.holygrail } }
end, end,
add_to_deck = function(self, card, from_debuff) --TODO: Card in booster packs, Voucher slots add_to_deck = function(self, card, from_debuff)
card.ability.extra.holygrail = math.floor(card.ability.extra.holygrail) card.ability.extra.holygrail = math.floor(card.ability.extra.holygrail)
G.jokers.config.card_limit = G.jokers.config.card_limit local mod = card.ability.extra.holygrail
+ ((Card.get_gameset(card) == "modest") and 0 or card.ability.extra.holygrail) G.jokers.config.card_limit = G.jokers.config.card_limit + ((Card.get_gameset(card) == "modest") and 0 or mod)
G.consumeables.config.card_limit = G.consumeables.config.card_limit + card.ability.extra.holygrail G.consumeables.config.card_limit = G.consumeables.config.card_limit + mod
G.hand:change_size(card.ability.extra.holygrail) G.hand:change_size(mod)
if not G.GAME.modifiers.cry_booster_packs then SMODS.change_booster_limit(mod)
G.GAME.modifiers.cry_booster_packs = 2 SMODS.change_voucher_limit(mod)
end
G.GAME.modifiers.cry_booster_packs = G.GAME.modifiers.cry_booster_packs + card.ability.extra.holygrail
change_shop_size(card.ability.extra.holygrail)
end, end,
remove_from_deck = function(self, card, from_debuff) remove_from_deck = function(self, card, from_debuff)
G.jokers.config.card_limit = G.jokers.config.card_limit card.ability.extra.holygrail = math.floor(card.ability.extra.holygrail)
- ((Card.get_gameset(card) == "modest") and 0 or card.ability.extra.holygrail) local mod = card.ability.extra.holygrail
G.consumeables.config.card_limit = G.consumeables.config.card_limit - card.ability.extra.holygrail G.jokers.config.card_limit = G.jokers.config.card_limit + ((Card.get_gameset(card) == "modest") and 0 or -mod)
G.hand:change_size(-card.ability.extra.holygrail) G.consumeables.config.card_limit = G.consumeables.config.card_limit - mod
if not G.GAME.modifiers.cry_booster_packs then G.hand:change_size(-mod)
G.GAME.modifiers.cry_booster_packs = 2 SMODS.change_booster_limit(-mod)
end SMODS.change_voucher_limit(-mod)
G.GAME.modifiers.cry_booster_packs = G.GAME.modifiers.cry_booster_packs - card.ability.extra.holygrail
change_shop_size(card.ability.extra.holygrail * -1)
end, end,
cry_credits = { cry_credits = {
idea = { idea = {
@ -1746,7 +1758,7 @@ local fleshpanopticon = {
card.gone = false card.gone = false
G.GAME.blind.chips = G.GAME.blind.chips * card.ability.extra.boss_size G.GAME.blind.chips = G.GAME.blind.chips * card.ability.extra.boss_size
G.GAME.blind.chip_text = number_format(G.GAME.blind.chips) G.GAME.blind.chip_text = number_format(G.GAME.blind.chips)
G.HUD_blind:recalculate(true) G.HUD_blind:recalculate()
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
func = function() func = function()
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
@ -1780,7 +1792,7 @@ local fleshpanopticon = {
nil, nil,
nil, nil,
nil, nil,
Cryptid.enabled["Exotic Jokers"] and "c_cry_gateway" or "c_soul", Cryptid.enabled("c_cry_gateway") and "c_cry_gateway" or "c_soul",
"sup" "sup"
) )
card:set_edition({ negative = true }, true) card:set_edition({ negative = true }, true)
@ -1881,6 +1893,49 @@ local spectrogram = {
}, },
}, },
} }
local jtron = {
object_type = "Joker",
dependencies = {
items = {
"set_cry_epic",
},
},
name = "cry-jtron",
key = "jtron",
config = { extra = { bonus = 1, current = 0 } },
rarity = "cry_epic",
cost = 14,
order = 64,
blueprint_compat = true,
atlas = "atlasepic",
pos = { x = 2, y = 5 },
loc_vars = function(self, info_queue, center)
info_queue[#info_queue + 1] = G.P_CENTERS.j_joker
center.ability.extra.current = 1 + center.ability.extra.bonus * #SMODS.find_card("j_joker")
return { vars = { center.ability.extra.bonus, center.ability.extra.current } }
end,
calculate = function(self, card, context)
card.ability.extra.current = 1 + card.ability.extra.bonus * #SMODS.find_card("j_joker")
if context.cardarea == G.jokers and context.joker_main then
return {
message = localize({
type = "variable",
key = "a_powmult",
vars = {
number_format(card.ability.extra.current),
},
}),
Emult_mod = card.ability.extra.current,
colour = G.C.DARK_EDITION,
}
end
end,
cry_credits = {
idea = { "AlexZGreat" },
art = { "Darren_The_Frog" },
code = { "candycanearter" },
},
}
return { return {
name = "Epic Jokers", name = "Epic Jokers",
items = { items = {
@ -1907,5 +1962,6 @@ return {
soccer, soccer,
fleshpanopticon, fleshpanopticon,
spectrogram, spectrogram,
jtron,
}, },
} }

View file

@ -17,7 +17,12 @@ local gateway = {
order = 90, order = 90,
hidden = true, --default soul_set and soul_rate of 0.3% in spectral packs is used hidden = true, --default soul_set and soul_rate of 0.3% in spectral packs is used
can_use = function(self, card) can_use = function(self, card)
return true if (#SMODS.find_card("j_jen_saint") + #SMODS.find_card("j_jen_saint_attuned")) > 0 then
return #G.jokers.cards < G.jokers.config.card_limit
else
--Don't allow use if everything is eternal and there is no room
return #Cryptid.advanced_find_joker(nil, nil, nil, { "eternal" }, true, "j") < G.jokers.config.card_limit
end
end, end,
use = function(self, card, area, copier) use = function(self, card, area, copier)
if (#SMODS.find_card("j_jen_saint") + #SMODS.find_card("j_jen_saint_attuned")) <= 0 then if (#SMODS.find_card("j_jen_saint") + #SMODS.find_card("j_jen_saint_attuned")) <= 0 then
@ -136,7 +141,7 @@ local universum = {
end, end,
cry_credits = { cry_credits = {
idea = { "Ein13" }, idea = { "Ein13" },
art = { "Ein13/hydrogenperoxiide" }, art = { "Ein13", "hydro" },
}, },
init = function(self) init = function(self)
--Universum Patches --Universum Patches
@ -315,7 +320,7 @@ local exponentia = {
vars = { number_format(to_big(v.ability.extra.Emult)) }, vars = { number_format(to_big(v.ability.extra.Emult)) },
}), }),
}) })
exponentia_scale_mod(v, v.ability.extra.Emult_mod, old, v.ability.extra.Emult) Cryptid.exponentia_scale_mod(v, v.ability.extra.Emult_mod, old, v.ability.extra.Emult)
end end
end end
return ret return ret
@ -427,7 +432,7 @@ local redeo = {
end, end,
cry_credits = { cry_credits = {
idea = { "Enemui" }, idea = { "Enemui" },
art = { "Jevonn" }, art = { "Jevonn", "Darren_The_Frog" },
code = { "Math", "jenwalter666" }, code = { "Math", "jenwalter666" },
}, },
init = function(self) init = function(self)
@ -505,7 +510,7 @@ local effarcire = {
end, end,
cry_credits = { cry_credits = {
idea = { "Frix" }, idea = { "Frix" },
art = { "AlexZGreat" }, art = { "AlexZGreat", "Catformer" },
code = { "jenwalter666" }, code = { "jenwalter666" },
}, },
} }
@ -693,7 +698,7 @@ local scalae = {
) ^ card.ability.extra.scale ) ^ card.ability.extra.scale
) )
) )
if (new_scale < to_big(1e100)) or not is_card_big(joker) then if (new_scale < to_big(1e100)) or not Cryptid.is_card_big(joker) then
if new_scale >= to_big(1e300) then if new_scale >= to_big(1e300) then
new_scale = 1e300 new_scale = 1e300
else else
@ -704,7 +709,19 @@ local scalae = {
end end
end, end,
loc_vars = function(self, info_queue, card) loc_vars = function(self, info_queue, card)
return { vars = { number_format(card.ability.extra.scale + 1), number_format(card.ability.extra.scale_mod) } } local example = { 2, 3, 4 }
for i = 1, #example do
example[i] = to_big(example[i]) ^ (card.ability.extra.scale + 1)
end
return {
vars = {
number_format(card.ability.extra.scale + 1),
number_format(card.ability.extra.scale_mod),
example[1],
example[2],
example[3],
},
}
end, end,
cry_credits = { cry_credits = {
idea = { "Mathguy" }, idea = { "Mathguy" },
@ -794,7 +811,7 @@ local stella_mortis = {
end, end,
cry_credits = { cry_credits = {
idea = { "SMG9000" }, idea = { "SMG9000" },
art = { "SMG9000" }, art = { "SMG9000", "George the Rat", "patchy", "lolxDdj" },
code = { "SMG9000" }, code = { "SMG9000" },
}, },
} }
@ -819,7 +836,7 @@ local circulus_pistoris = {
loc_vars = function(self, info_queue, center) loc_vars = function(self, info_queue, center)
return { return {
vars = { vars = {
safe_get(center, "edition", "cry_oversat") and "tau" or "pi", Cryptid.safe_get(center, "edition", "cry_oversat") and "tau" or "pi",
center.ability.extra.hands_remaining, center.ability.extra.hands_remaining,
}, },
} }
@ -833,7 +850,7 @@ local circulus_pistoris = {
) )
then then
local pi = math.pi local pi = math.pi
if safe_get(card, "edition", "cry_oversat") then if Cryptid.safe_get(card, "edition", "cry_oversat") then
pi = 2 * pi pi = 2 * pi
end end
return { return {
@ -842,7 +859,7 @@ local circulus_pistoris = {
message = localize({ message = localize({
type = "variable", type = "variable",
key = "a_powmultchips", key = "a_powmultchips",
vars = { (safe_get(card, "edition", "cry_oversat") and "tau" or "pi") }, vars = { (Cryptid.safe_get(card, "edition", "cry_oversat") and "tau" or "pi") },
}), }),
colour = { 0.8, 0.45, 0.85, 1 }, --plasma colors colour = { 0.8, 0.45, 0.85, 1 }, --plasma colors
} }
@ -850,7 +867,7 @@ local circulus_pistoris = {
end, end,
cry_credits = { cry_credits = {
idea = { "SMG9000", "Math" }, --not sure if there's more ppl I'm missing idea = { "SMG9000", "Math" }, --not sure if there's more ppl I'm missing
art = { "HexaCryonic" }, art = { "HexaCryonic", "ori" },
code = { "SMG9000", "Math" }, code = { "SMG9000", "Math" },
}, },
} }
@ -973,7 +990,7 @@ local aequilibrium = {
-- --
cry_credits = { cry_credits = {
idea = { "Elial2" }, idea = { "Elial2" },
art = { "Elial2" }, art = { "Elial2", "unexian", "hydro" },
code = { "Elial2" }, code = { "Elial2" },
}, },
} }
@ -1025,7 +1042,7 @@ local facile = {
end, end,
cry_credits = { cry_credits = {
idea = { "Enemui" }, idea = { "Enemui" },
art = { "Kailen" }, art = { "Kailen", "hydro" },
code = { "Jevonn" }, code = { "Jevonn" },
}, },
} }
@ -1047,7 +1064,7 @@ local gemino = {
"Jolly Open Winner", "Jolly Open Winner",
"Requiacity", "Requiacity",
}, },
art = { "Requiacity" }, art = { "unexian" },
code = { "Math" }, code = { "Math" },
}, },
rarity = "cry_exotic", rarity = "cry_exotic",
@ -1106,8 +1123,8 @@ local gemino = {
local check = false local check = false
local card = G.jokers.cards[1] local card = G.jokers.cards[1]
if not Card.no(G.jokers.cards[1], "immutable", true) then if not Card.no(G.jokers.cards[1], "immutable", true) then
cry_with_deck_effects(G.jokers.cards[1], function(card) Cryptid.with_deck_effects(G.jokers.cards[1], function(card)
cry_misprintize(card, { min = 2, max = 2 }, nil, true) Cryptid.misprintize(card, { min = 2, max = 2 }, nil, true)
end) end)
check = true check = true
end end
@ -1169,7 +1186,7 @@ local energia = {
end, end,
cry_credits = { cry_credits = {
idea = { "jenwalter666" }, idea = { "jenwalter666" },
art = { "Kailen" }, art = { "unexian" },
code = { "Math" }, code = { "Math" },
}, },
} }
@ -1417,7 +1434,7 @@ local formidiulosus = {
no_dbl = true, no_dbl = true,
update = function(self, card, front) update = function(self, card, front)
card.ability.extra.Emult = 1 card.ability.extra.Emult = 1
+ (card.ability.extra.Emult_mod * #advanced_find_joker(nil, "cry_candy", nil, nil, true)) + (card.ability.extra.Emult_mod * #Cryptid.advanced_find_joker(nil, "cry_candy", nil, nil, true))
end, end,
calculate = function(self, card, context) calculate = function(self, card, context)
if if
@ -1446,12 +1463,7 @@ local formidiulosus = {
G.jokers:emplace(card) G.jokers:emplace(card)
end end
end end
if if context.cardarea == G.jokers and (to_big(card.ability.extra.Emult) > to_big(1)) and context.joker_main then
context.cardarea == G.jokers
and (to_big(card.ability.extra.Emult) > to_big(1))
and not context.before
and not context.after
then
return { return {
message = localize({ message = localize({
type = "variable", type = "variable",
@ -1467,7 +1479,7 @@ local formidiulosus = {
end, end,
cry_credits = { cry_credits = {
idea = { "HexaCryonic", "Kailen" }, idea = { "HexaCryonic", "Kailen" },
art = { "Foegro" }, art = { "Foegro", "hydro" },
code = { "Foegro" }, code = { "Foegro" },
}, },
} }
@ -1493,7 +1505,7 @@ local items = {
--verisimile, WHY IS THIS AN EXOTIC???????????????????? --verisimile, WHY IS THIS AN EXOTIC????????????????????
--rescribere, [NEEDS REFACTOR] --rescribere, [NEEDS REFACTOR]
duplicare, duplicare,
--formidiulosus formidiulosus,
} }
return { return {
name = "Exotic Jokers", name = "Exotic Jokers",

View file

@ -449,7 +449,7 @@ if JokerDisplay then
}, },
text_config = { colour = G.C.CHIPS }, text_config = { colour = G.C.CHIPS },
calc_function = function(card) calc_function = function(card)
card.joker_display_values.stat = card.ability.extra.chips * (GLOBAL_cry_member_count or 1) card.joker_display_values.stat = card.ability.extra.chips * Cryptid.member_count
end, end,
} }
JokerDisplay.Definitions["j_cry_redeo"] = { JokerDisplay.Definitions["j_cry_redeo"] = {
@ -578,7 +578,7 @@ if JokerDisplay then
e_mult = ( e_mult = (
card.ability.name == "Jolly Joker" card.ability.name == "Jolly Joker"
or card.edition and card.edition.key == "e_cry_m" or card.edition and card.edition.key == "e_cry_m"
or safe_get(card, "pools", "M") or Cryptid.safe_get(card, "pools", "M")
) )
and mod_joker.ability.extra.mult * JokerDisplay.calculate_joker_triggers(mod_joker) and mod_joker.ability.extra.mult * JokerDisplay.calculate_joker_triggers(mod_joker)
or nil, or nil,
@ -1753,8 +1753,7 @@ if JokerDisplay then
}, },
}, },
calc_function = function(card) calc_function = function(card)
card.joker_display_values.stat = card.joker_display_values.stat = math.max(1, card.ability.extra.Xmult_mod * Cryptid.member_count)
math.max(1, (card.ability.extra.Xmult_mod * (GLOBAL_cry_member_count or 1)))
end, end,
} }
JokerDisplay.Definitions["j_cry_cryptidmoment"] = { JokerDisplay.Definitions["j_cry_cryptidmoment"] = {
@ -1806,7 +1805,7 @@ if JokerDisplay then
{ {
border_nodes = { border_nodes = {
{ text = "X" }, { text = "X" },
{ ref_table = "card.ability.extra", ref_value = "mult", retrigger_type = "exp" }, { ref_table = "card.ability.extra", ref_value = "monster", retrigger_type = "exp" },
}, },
}, },
}, },

View file

@ -15,7 +15,7 @@ local jollysus = {
}, },
immutable = true, immutable = true,
loc_vars = function(self, info_queue, center) loc_vars = function(self, info_queue, center)
if cry_card_enabled("e_cry_m") == true then if Cryptid.enabled("e_cry_m") == true then
info_queue[#info_queue + 1] = G.P_CENTERS.e_cry_m info_queue[#info_queue + 1] = G.P_CENTERS.e_cry_m
end end
return { vars = { center.ability.extra.active } } return { vars = { center.ability.extra.active } }
@ -39,7 +39,7 @@ local jollysus = {
card.ability.extra.spawn = false card.ability.extra.spawn = false
end end
local card = create_card("Joker", G.jokers, nil, nil, nil, nil, nil, "jollysus") local card = create_card("Joker", G.jokers, nil, nil, nil, nil, nil, "jollysus")
if cry_card_enabled("e_cry_m") == true then if Cryptid.enabled("e_cry_m") == true then
card:set_edition({ cry_m = true }) card:set_edition({ cry_m = true })
end end
card:add_to_deck() card:add_to_deck()
@ -58,7 +58,7 @@ local jollysus = {
card.ability.extra.spawn = false card.ability.extra.spawn = false
end end
local card = create_card("Joker", G.jokers, nil, nil, nil, nil, nil, "jollysus") local card = create_card("Joker", G.jokers, nil, nil, nil, nil, nil, "jollysus")
if cry_card_enabled("e_cry_m") == true then if Cryptid.enabled("e_cry_m") == true then
card:set_edition({ cry_m = true }) card:set_edition({ cry_m = true })
end end
card:add_to_deck() card:add_to_deck()
@ -368,7 +368,7 @@ local mneon = {
if context.end_of_round and not context.blueprint and not context.individual and not context.repetition then if context.end_of_round and not context.blueprint and not context.individual and not context.repetition then
local jollycount = 0 local jollycount = 0
for i = 1, #G.jokers.cards do for i = 1, #G.jokers.cards do
if G.jokers.cards[i]:is_jolly() or safe_get(G.jokers.cards[i], "pools", "M") then if G.jokers.cards[i]:is_jolly() or Cryptid.safe_get(G.jokers.cards[i].config.center, "pools", "M") then
jollycount = jollycount + 1 jollycount = jollycount + 1
end end
end end
@ -490,11 +490,10 @@ local bonk = {
object_type = "Joker", object_type = "Joker",
name = "cry-bonk", name = "cry-bonk",
key = "bonk", key = "bonk",
pools = { ["M"] = true }, pools = { ["M"] = true, ["Meme"] = true },
order = 256, order = 256,
pos = { x = 2, y = 2 }, pos = { x = 2, y = 2 },
config = { extra = { chips = 6, bonus = 1, xchips = 3, type = "Pair" } }, config = { extra = { chips = 6, bonus = 1, xchips = 3, type = "Pair" } },
pools = { ["Meme"] = true },
loc_vars = function(self, info_queue, center) loc_vars = function(self, info_queue, center)
info_queue[#info_queue + 1] = G.P_CENTERS.j_jolly info_queue[#info_queue + 1] = G.P_CENTERS.j_jolly
return { return {
@ -649,7 +648,7 @@ local scrabble = {
blueprint_compat = true, blueprint_compat = true,
atlas = "atlasone", atlas = "atlasone",
loc_vars = function(self, info_queue, card) loc_vars = function(self, info_queue, card)
if cry_card_enabled("e_cry_m") == true then if Cryptid.enabled("e_cry_m") == true then
info_queue[#info_queue + 1] = G.P_CENTERS.e_cry_m info_queue[#info_queue + 1] = G.P_CENTERS.e_cry_m
end end
return { return {
@ -669,7 +668,7 @@ local scrabble = {
then then
check = true check = true
local card = create_card("Joker", G.jokers, nil, 0.9, nil, nil, nil, "scrabbletile") local card = create_card("Joker", G.jokers, nil, 0.9, nil, nil, nil, "scrabbletile")
if cry_card_enabled("e_cry_m") == true then if Cryptid.enabled("e_cry_m") == true then
card:set_edition({ cry_m = true }) card:set_edition({ cry_m = true })
end end
card:add_to_deck() card:add_to_deck()
@ -781,6 +780,7 @@ local sacrifice = {
}, },
art = { art = {
"Jevonn", "Jevonn",
"George the Rat",
}, },
code = { code = {
"Jevonn", "Jevonn",
@ -1060,7 +1060,9 @@ local smallestm = {
if context.cardarea == G.jokers and context.before then if context.cardarea == G.jokers and context.before then
--This isn't retrigger joker compatible for some reason --This isn't retrigger joker compatible for some reason
if context.scoring_name == card.ability.extra.type then if context.scoring_name == card.ability.extra.type then
add_tag(Tag("tag_cry_double_m")) local tag = Tag("tag_cry_double_m")
tag.ability.shiny = cry_rollshinybool()
add_tag(tag)
play_sound("generic1", 0.9 + math.random() * 0.1, 0.8) play_sound("generic1", 0.9 + math.random() * 0.1, 0.8)
play_sound("holo1", 1.2 + math.random() * 0.1, 0.4) play_sound("holo1", 1.2 + math.random() * 0.1, 0.4)
card_eval_status_text(context.blueprint_card or card, "extra", nil, nil, nil, { card_eval_status_text(context.blueprint_card or card, "extra", nil, nil, nil, {
@ -1218,7 +1220,9 @@ local mprime = {
elseif context.other_joker then elseif context.other_joker then
if if
context.other_joker context.other_joker
and (context.other_joker:is_jolly() or safe_get(context.other_joker, "pools", "M")) and (
context.other_joker:is_jolly() or Cryptid.safe_get(context.other_joker.config.center, "pools", "M")
)
then then
if not Talisman.config_file.disable_anims then if not Talisman.config_file.disable_anims then
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
@ -1284,7 +1288,11 @@ local macabre = {
v ~= card v ~= card
and not v:is_jolly() and not v:is_jolly()
and v.config.center.key ~= "j_cry_mprime" and v.config.center.key ~= "j_cry_mprime"
and not (v.ability.eternal or v.getting_sliced or safe_get(v, "pools", "M")) and not (
v.ability.eternal
or v.getting_sliced
or Cryptid.safe_get(v.config.center, "pools", "M")
)
then then
destroyed_jokers[#destroyed_jokers + 1] = v destroyed_jokers[#destroyed_jokers + 1] = v
end end
@ -1401,29 +1409,25 @@ local longboi = {
name = "cry-longboi", name = "cry-longboi",
key = "longboi", key = "longboi",
pos = { x = 5, y = 4 }, pos = { x = 5, y = 4 },
config = { extra = { mult = nil, bonus = 0.75 } }, config = { extra = { monster = 1, bonus = 0.75 } },
rarity = 1, rarity = 1,
cost = 5, cost = 5,
order = 261, order = 261,
pools = { ["M"] = true }, pools = { ["M"] = true },
no_dbl = true,
blueprint_compat = true, blueprint_compat = true,
eternal_compat = false, eternal_compat = false,
loc_vars = function(self, info_queue, center) loc_vars = function(self, info_queue, center)
return { return {
vars = { vars = {
math.max(0.75, math.floor(center.ability.extra.bonus)), math.max(0.75, center.ability.extra.bonus),
(center.ability.extra.mult ~= nil and center.ability.extra.mult or (G.GAME.monstermult or 1)), center.ability.extra.monster,
}, },
} }
end, end,
atlas = "atlasthree", atlas = "atlasthree",
calculate = function(self, card, context) calculate = function(self, card, context)
if context.end_of_round and not context.individual and not context.repetition then if context.end_of_round and not context.individual and not context.repetition then
if not G.GAME.monstermult then G.GAME.monstermult = G.GAME.monstermult + math.max(0.75, card.ability.extra.bonus)
G.GAME.monstermult = 1
end
G.GAME.monstermult = G.GAME.monstermult + math.max(0.75, math.floor(card.ability.extra.bonus))
if not context.retrigger_joker then if not context.retrigger_joker then
return { return {
card_eval_status_text(context.blueprint_card or card, "extra", nil, nil, nil, { card_eval_status_text(context.blueprint_card or card, "extra", nil, nil, nil, {
@ -1432,21 +1436,19 @@ local longboi = {
}), }),
} }
end end
elseif context.joker_main and ((card.ability.extra.mult or 1) > 1) then elseif context.joker_main and card.ability.extra.monster > 1 then
return { return {
message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.extra.mult } }), message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.extra.monster } }),
Xmult_mod = card.ability.extra.mult, Xmult_mod = card.ability.extra.monster,
} }
end end
end, end,
add_to_deck = function(self, card, from_debuff) set_ability = function(self, card, from_debuff)
if (not from_debuff and card.ability.extra.mult == nil) or card.checkmonster then card.ability.extra.monster = G.GAME and G.GAME.monstermult or 1
--Stops Things like Gemini from updating mult when it isn't supposed to if card.ability.extra.monster >= 1234567654321 then
if card.checkmonster then card.children.center:set_sprite_pos({ x = 7, y = 5 })
card.checkmonster = nil elseif card.ability.extra.monster >= 12321 then
end card.children.center:set_sprite_pos({ x = 7, y = 6 })
card.ability.extra.mult = G.GAME.monstermult or 1
end end
end, end,
cry_credits = { cry_credits = {
@ -1462,6 +1464,7 @@ local longboi = {
}, },
} }
local ret_items = { local ret_items = {
jollysus,
bubblem, bubblem,
foodm, foodm,
mstack, mstack,
@ -1481,7 +1484,7 @@ local ret_items = {
mprime, mprime,
} }
--retriggering system for M Vouchers --retriggering system for M Vouchers
function get_m_retriggers(self, card, context) function Cryptid.get_m_retriggers(self, card, context)
local text, disp_text, poker_hands, scoring_hand, non_loc_disp_text = G.FUNCS.get_poker_hand_info(G.play.cards) local text, disp_text, poker_hands, scoring_hand, non_loc_disp_text = G.FUNCS.get_poker_hand_info(G.play.cards)
if G.GAME.used_vouchers.v_cry_pairamount_plus then if G.GAME.used_vouchers.v_cry_pairamount_plus then
local pairs = 0 local pairs = 0

View file

@ -1,5 +1,26 @@
-- Packs -- Packs
local meme_digital_hallucinations_compat = {
colour = G.C.CRY_ASCENDANT,
loc_key = "k_plus_joker",
create = function()
local ccard = create_card("Meme", G.jokers, nil, nil, true, true, nil, "diha")
ccard:set_edition({ negative = true }, true)
ccard:add_to_deck()
G.jokers:emplace(ccard) --Note: Will break if any non-Joker gets added to the meme pool
end,
}
local meme1 = { local meme1 = {
cry_credits = {
idea = {
"Jevonn",
},
art = {
"Jevonn",
},
code = {
"Jevonn",
},
},
object_type = "Booster", object_type = "Booster",
dependencies = { dependencies = {
items = { items = {
@ -16,7 +37,7 @@ local meme1 = {
weight = 0.18 / 3, --0.18 base ÷ 3 since there are 3 identical packs weight = 0.18 / 3, --0.18 base ÷ 3 since there are 3 identical packs
create_card = function(self, card) create_card = function(self, card)
if if
Cryptid.enabled["Misc. Jokers"] Cryptid.enabled("j_cry_waluigi")
and not (G.GAME.used_jokers["j_cry_waluigi"] and not next(find_joker("Showman"))) and not (G.GAME.used_jokers["j_cry_waluigi"] and not next(find_joker("Showman")))
then then
if pseudorandom("meme1_" .. G.GAME.round_resets.ante) > 0.997 then if pseudorandom("meme1_" .. G.GAME.round_resets.ante) > 0.997 then
@ -43,13 +64,24 @@ local meme1 = {
SMODS.Booster.update_pack(self, dt) SMODS.Booster.update_pack(self, dt)
end, end,
group_key = "k_cry_meme_pack", group_key = "k_cry_meme_pack",
cry_digital_hallucinations = meme_digital_hallucinations_compat,
} }
local meme2 = { local meme2 = {
cry_credits = {
idea = {
"Jevonn",
},
art = {
"Jevonn",
},
code = {
"Jevonn",
},
},
object_type = "Booster", object_type = "Booster",
dependencies = { dependencies = {
items = { items = {
"set_cry_misc", "set_cry_misc",
"p_cry_meme_1",
}, },
}, },
key = "meme_two", key = "meme_two",
@ -62,7 +94,7 @@ local meme2 = {
weight = 0.18 / 3, --0.18 base ÷ 3 since there are 3 identical packs weight = 0.18 / 3, --0.18 base ÷ 3 since there are 3 identical packs
create_card = function(self, card) create_card = function(self, card)
if if
Cryptid.enabled["Misc. Jokers"] Cryptid.enabled("j_cry_waluigi")
and not (G.GAME.used_jokers["j_cry_waluigi"] and not next(find_joker("Showman"))) and not (G.GAME.used_jokers["j_cry_waluigi"] and not next(find_joker("Showman")))
then then
if pseudorandom("memetwo_" .. G.GAME.round_resets.ante) > 0.997 then if pseudorandom("memetwo_" .. G.GAME.round_resets.ante) > 0.997 then
@ -89,14 +121,24 @@ local meme2 = {
SMODS.Booster.update_pack(self, dt) SMODS.Booster.update_pack(self, dt)
end, end,
group_key = "k_cry_meme_pack", group_key = "k_cry_meme_pack",
cry_digital_hallucinations = meme_digital_hallucinations_compat,
} }
local meme3 = { local meme3 = {
cry_credits = {
idea = {
"Jevonn",
},
art = {
"Jevonn",
},
code = {
"Jevonn",
},
},
object_type = "Booster", object_type = "Booster",
dependencies = { dependencies = {
items = { items = {
"set_cry_misc", "set_cry_misc",
"p_cry_meme_1",
"p_cry_meme_two",
}, },
}, },
key = "meme_three", key = "meme_three",
@ -109,7 +151,7 @@ local meme3 = {
weight = 0.18 / 3, --0.18 base ÷ 3 since there are 3 identical packs weight = 0.18 / 3, --0.18 base ÷ 3 since there are 3 identical packs
create_card = function(self, card) create_card = function(self, card)
if if
Cryptid.enabled["Misc. Jokers"] Cryptid.enabled("j_cry_waluigi")
and not (G.GAME.used_jokers["j_cry_waluigi"] and not next(find_joker("Showman"))) and not (G.GAME.used_jokers["j_cry_waluigi"] and not next(find_joker("Showman")))
then then
if pseudorandom("memethree_" .. G.GAME.round_resets.ante) > 0.997 then if pseudorandom("memethree_" .. G.GAME.round_resets.ante) > 0.997 then
@ -136,6 +178,7 @@ local meme3 = {
SMODS.Booster.update_pack(self, dt) SMODS.Booster.update_pack(self, dt)
end, end,
group_key = "k_cry_meme_pack", group_key = "k_cry_meme_pack",
cry_digital_hallucinations = meme_digital_hallucinations_compat,
} }
if not AurinkoAddons then if not AurinkoAddons then
@ -149,6 +192,18 @@ local mosaic_shader = {
path = "mosaic.fs", path = "mosaic.fs",
} }
local mosaic = { local mosaic = {
cry_credits = {
idea = {
"Mystic Misclick",
},
--Replace with Shader later
art = {
"Math",
},
code = {
"Math",
},
},
object_type = "Edition", object_type = "Edition",
dependencies = { dependencies = {
items = { items = {
@ -202,6 +257,17 @@ local oversat_shader = {
path = "oversat.fs", path = "oversat.fs",
} }
local oversat = { local oversat = {
cry_credits = {
idea = {
"Math",
},
art = {
"Math",
},
code = {
"Math",
},
},
object_type = "Edition", object_type = "Edition",
dependencies = { dependencies = {
items = { items = {
@ -222,26 +288,32 @@ local oversat = {
get_weight = function(self) get_weight = function(self)
return G.GAME.edition_rate * self.weight return G.GAME.edition_rate * self.weight
end, end,
-- Note: Duping playing cards resets the base chips for some reason
on_apply = function(card) on_apply = function(card)
cry_with_deck_effects(card, function(card) if not card.ability.cry_oversat then
cry_misprintize(card, { Cryptid.with_deck_effects(card, function(card)
Cryptid.misprintize(card, {
min = 2, min = 2,
max = 2, max = 2,
}, nil, true) }, nil, true)
end) end)
if card.config.center.apply_oversat then if card.config.center.apply_oversat then
card.config.center:apply_oversat(card, function(val) card.config.center:apply_oversat(card, function(val)
return cry_misprintize_val(val, { return Cryptid.misprintize_val(val, {
min = 2, min = 2 * (G.GAME.modifiers.cry_misprint_min or 1),
max = 2, max = 2 * (G.GAME.modifiers.cry_misprint_max or 1),
}, is_card_big(card), true) }, Cryptid.is_card_big(card))
end) end)
end end
end
card.ability.cry_oversat = true
end, end,
on_remove = function(card) on_remove = function(card)
cry_with_deck_effects(card, function(card) Cryptid.with_deck_effects(card, function(card)
cry_misprintize(card, { min = 0.5, max = 0.5 }, nil, true) Cryptid.misprintize(card, { min = 1, max = 1 }, true)
Cryptid.misprintize(card) -- Correct me if i'm wrong but this is for misprint deck. or atleast it is after this patch
end) end)
card.ability.cry_oversat = nil
end, end,
init = function(self) init = function(self)
AurinkoAddons.cry_oversat = function(card, hand, instant, amount) AurinkoAddons.cry_oversat = function(card, hand, instant, amount)
@ -300,6 +372,14 @@ local glitched_shader = {
path = "glitched.fs", path = "glitched.fs",
} }
local glitched = { local glitched = {
cry_credits = {
art = {
"Samario",
},
code = {
"Math",
},
},
object_type = "Edition", object_type = "Edition",
dependencies = { dependencies = {
items = { items = {
@ -320,29 +400,32 @@ local glitched = {
get_weight = function(self) get_weight = function(self)
return G.GAME.edition_rate * self.weight return G.GAME.edition_rate * self.weight
end, end,
-- Note: This is happening even when it shouldn't (like in deck view) -- Note: Duping playing cards resets the base chips for some reason
-- Also messes with rank sort order a bit for some reason
on_apply = function(card) on_apply = function(card)
cry_with_deck_effects(card, function(card) if not card.ability.cry_glitched then
cry_misprintize(card, { Cryptid.with_deck_effects(card, function(card)
Cryptid.misprintize(card, {
min = 0.1, min = 0.1,
max = 10, max = 10,
}, nil, true) }, nil, true)
end) end)
if card.config.center.apply_glitched then if card.config.center.apply_glitched then
card.config.center:apply_glitched(card, function(val) card.config.center:apply_glitched(card, function(val)
return cry_misprintize_val(val, { return Cryptid.misprintize_val(val, {
min = 0.1 * (G.GAME.modifiers.cry_misprint_min or 1), min = 0.1 * (G.GAME.modifiers.cry_misprint_min or 1),
max = 10 * (G.GAME.modifiers.cry_misprint_max or 1), max = 10 * (G.GAME.modifiers.cry_misprint_max or 1),
}, is_card_big(card), true) }, Cryptid.is_card_big(card))
end) end)
end end
end
card.ability.cry_glitched = true
end, end,
on_remove = function(card) on_remove = function(card)
cry_with_deck_effects(card, function(card) Cryptid.with_deck_effects(card, function(card)
cry_misprintize(card, { min = 1, max = 1 }, true) Cryptid.misprintize(card, { min = 1, max = 1 }, true)
cry_misprintize(card) -- Correct me if i'm wrong but this is for misprint deck. or atleast it is after this patch Cryptid.misprintize(card) -- Correct me if i'm wrong but this is for misprint deck. or atleast it is after this patch
end) end)
card.ability.cry_glitched = nil
end, end,
init = function(self) init = function(self)
local randtext = { local randtext = {
@ -431,14 +514,14 @@ local glitched = {
AurinkoAddons.cry_glitched = function(card, hand, instant, amount) AurinkoAddons.cry_glitched = function(card, hand, instant, amount)
local modc = G.GAME.hands[hand].l_chips local modc = G.GAME.hands[hand].l_chips
* cry_log_random( * Cryptid.log_random(
pseudoseed("cry_aurinko_chips_misprint" .. G.GAME.round_resets.ante), pseudoseed("cry_aurinko_chips_misprint" .. G.GAME.round_resets.ante),
(G.GAME.modifiers.cry_misprint_min or 1) / 10, (G.GAME.modifiers.cry_misprint_min or 1) / 10,
(G.GAME.modifiers.cry_misprint_max or 1) * 10 (G.GAME.modifiers.cry_misprint_max or 1) * 10
) )
* amount * amount
local modm = G.GAME.hands[hand].l_mult local modm = G.GAME.hands[hand].l_mult
* cry_log_random( * Cryptid.log_random(
pseudoseed("cry_aurinko_mult_misprint" .. G.GAME.round_resets.ante), pseudoseed("cry_aurinko_mult_misprint" .. G.GAME.round_resets.ante),
(G.GAME.modifiers.cry_misprint_min or 1) / 10, (G.GAME.modifiers.cry_misprint_min or 1) / 10,
(G.GAME.modifiers.cry_misprint_max or 1) * 10 (G.GAME.modifiers.cry_misprint_max or 1) * 10
@ -525,6 +608,15 @@ local astral_shader = {
path = "astral.fs", path = "astral.fs",
} }
local astral = { local astral = {
cry_credits = {
--Don't remember who came up with this idea
art = {
"AlexZGreat",
},
code = {
"Math",
},
},
object_type = "Edition", object_type = "Edition",
dependencies = { dependencies = {
items = { items = {
@ -578,6 +670,17 @@ local blurred_shader = {
path = "blur.fs", path = "blur.fs",
} }
local blurred = { local blurred = {
cry_credits = {
idea = {
"stupid",
},
art = {
"stupid",
},
code = {
"stupid",
},
},
object_type = "Edition", object_type = "Edition",
dependencies = { dependencies = {
items = { items = {
@ -641,6 +744,17 @@ local noisy_stats = {
}, },
} }
local noisy = { local noisy = {
cry_credits = {
idea = {
"Math",
},
art = {
"jenwalter666",
},
code = {
"Math",
},
},
object_type = "Edition", object_type = "Edition",
dependencies = { dependencies = {
items = { items = {
@ -902,6 +1016,18 @@ local jollyeditionshader = {
path = "m.fs", path = "m.fs",
} }
local jollyedition = { local jollyedition = {
cry_credits = {
idea = {
"Jevonn",
},
art = {
"stupid",
"Math",
},
code = {
"Jevonn",
},
},
object_type = "Edition", object_type = "Edition",
dependencies = { dependencies = {
items = { items = {
@ -1034,6 +1160,17 @@ local glass_shader = {
end, end,
} }
local glass_edition = { local glass_edition = {
cry_credits = {
idea = {
"Math",
},
art = {
"stupid",
},
code = {
"Math",
},
},
object_type = "Edition", object_type = "Edition",
dependencies = { dependencies = {
items = { items = {
@ -1163,6 +1300,17 @@ local gold_shader = {
end, end,
} }
local gold_edition = { local gold_edition = {
cry_credits = {
idea = {
"Math",
},
art = {
"stupid",
},
code = {
"Math",
},
},
object_type = "Edition", object_type = "Edition",
dependencies = { dependencies = {
items = { items = {
@ -1219,9 +1367,9 @@ local double_sided = {
modest = { disabled = true }, modest = { disabled = true },
mainline = { disabled = true }, mainline = { disabled = true },
madness = { disabled = true }, madness = { disabled = true },
experimental = {}, exp = {},
}, },
extra_gamesets = { "experimental" }, extra_gamesets = { "exp" },
key = "double_sided", key = "double_sided",
shader = false, shader = false,
order = 32, order = 32,
@ -1235,6 +1383,9 @@ local double_sided = {
vol = 0.3, vol = 0.3,
}, },
cry_credits = { cry_credits = {
code = {
"Math",
},
jolly = { jolly = {
"Jolly Open Winner", "Jolly Open Winner",
"Axolotolus", "Axolotolus",
@ -1282,7 +1433,7 @@ local double_sided = {
local area = e.config.ref_table.area local area = e.config.ref_table.area
area:remove_card(e.config.ref_table) area:remove_card(e.config.ref_table)
mergedcard:init_dbl_side() mergedcard:init_dbl_side()
copy_dbl_card(e.config.ref_table, mergedcard.dbl_side) Cryptid.copy_dbl_card(e.config.ref_table, mergedcard.dbl_side)
e.config.ref_table:remove() e.config.ref_table:remove()
e.config.ref_table = nil e.config.ref_table = nil
return true return true
@ -1430,7 +1581,7 @@ local double_sided = {
self.ability.eternal = true self.ability.eternal = true
end end
end end
function copy_dbl_card(C, c, deck_effects) function Cryptid.copy_dbl_card(C, c, deck_effects)
if not deck_effects then if not deck_effects then
Cdeck = C.added_to_deck Cdeck = C.added_to_deck
cdeck = c.added_to_deck cdeck = c.added_to_deck
@ -1445,11 +1596,11 @@ local double_sided = {
self:set_edition(nil, true) self:set_edition(nil, true)
end end
if not self.dbl_side then if not self.dbl_side then
self.dbl_side = cry_deep_copy(self) self.dbl_side = Cryptid.deep_copy(self)
self.dbl_side:set_ability(G.P_CENTERS.j_joker) self.dbl_side:set_ability(G.P_CENTERS.j_joker)
-- self.dbl_side:set_base(G.P_CARDS.empty) -- RIGHT HERE THIS RIGHT HERE THATS YOUR DAM CULPRIT -- self.dbl_side:set_base(G.P_CARDS.empty) -- RIGHT HERE THIS RIGHT HERE THATS YOUR DAM CULPRIT
if self.area == G.hand then if self.area == G.hand then
self.dbl_side = cry_deep_copy(self) self.dbl_side = Cryptid.deep_copy(self)
self.dbl_side:set_ability(G.P_CENTERS.c_base) self.dbl_side:set_ability(G.P_CENTERS.c_base)
end end
self.dbl_side.added_to_deck = false self.dbl_side.added_to_deck = false
@ -1458,7 +1609,7 @@ local double_sided = {
end end
function Card:dbl_side_flip() function Card:dbl_side_flip()
local init_dbl_side = self:init_dbl_side() local init_dbl_side = self:init_dbl_side()
local tmp_side = cry_deep_copy(self.dbl_side) local tmp_side = Cryptid.deep_copy(self.dbl_side)
self.children.center.scale = { x = self.children.center.atlas.px, y = self.children.center.atlas.py } self.children.center.scale = { x = self.children.center.atlas.px, y = self.children.center.atlas.py }
self.T.w, self.T.h = G.CARD_W, G.CARD_H self.T.w, self.T.h = G.CARD_W, G.CARD_H
local active_side = self local active_side = self
@ -1468,8 +1619,8 @@ local double_sided = {
if not init_dbl_side then if not init_dbl_side then
active_side:remove_from_deck(true) active_side:remove_from_deck(true)
end end
copy_dbl_card(self, self.dbl_side, false) Cryptid.copy_dbl_card(self, self.dbl_side, false)
copy_dbl_card(tmp_side, self, false) Cryptid.copy_dbl_card(tmp_side, self, false)
active_side:add_to_deck(true) active_side:add_to_deck(true)
self.children.center:set_sprite_pos(G.P_CENTERS[self.config.center.key].pos) self.children.center:set_sprite_pos(G.P_CENTERS[self.config.center.key].pos)
if self.base then if self.base then
@ -1519,7 +1670,7 @@ local double_sided = {
end end
end end
if cardTable.dbl_side then if cardTable.dbl_side then
self.dbl_side = cry_deep_copy(self) self.dbl_side = Cryptid.deep_copy(self)
cload(self.dbl_side, cardTable.dbl_side) cload(self.dbl_side, cardTable.dbl_side)
if self.dbl_side.ability.set == "Default" and self.ability.set ~= "Default" then if self.dbl_side.ability.set == "Default" and self.ability.set ~= "Default" then
self.dbl_side:set_ability(G.P_CENTERS.c_base, true) self.dbl_side:set_ability(G.P_CENTERS.c_base, true)
@ -1626,6 +1777,12 @@ local meld = {
end end
end, end,
cry_credits = { cry_credits = {
art = {
"Linus Goof Balls",
},
code = {
"Math",
},
jolly = { jolly = {
"Jolly Open Winner", "Jolly Open Winner",
"Axolotolus", "Axolotolus",
@ -1652,6 +1809,17 @@ local meld = {
-- Enhancements/Tarots -- Enhancements/Tarots
local echo = { local echo = {
cry_credits = {
idea = {
"Mystic Misclick",
},
art = {
"Coronacht",
},
code = {
"AlexZGreat",
},
},
object_type = "Enhancement", object_type = "Enhancement",
dependencies = { dependencies = {
items = { items = {
@ -1686,6 +1854,17 @@ local echo = {
end, end,
} }
local eclipse = { local eclipse = {
cry_credits = {
idea = {
"Mystick Misclick",
},
art = {
"AlexZGreat",
},
code = {
"AlexZGreat",
},
},
object_type = "Consumable", object_type = "Consumable",
dependencies = { dependencies = {
items = { items = {
@ -1707,6 +1886,17 @@ local eclipse = {
end, end,
} }
local light = { local light = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"AlexZGreat",
},
code = {
"AlexZGreat",
},
},
object_type = "Enhancement", object_type = "Enhancement",
dependencies = { dependencies = {
items = { items = {
@ -1747,6 +1937,17 @@ local light = {
end, end,
} }
local seraph = { local seraph = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"sachertote",
},
code = {
"AlexZGreat",
},
},
object_type = "Consumable", object_type = "Consumable",
dependencies = { dependencies = {
items = { items = {
@ -1768,6 +1969,17 @@ local seraph = {
end, end,
} }
local blessing = { local blessing = {
cry_credits = {
idea = {
"5381",
},
art = {
"RattlingSnow353",
},
code = {
"Jevonn",
},
},
object_type = "Consumable", object_type = "Consumable",
dependencies = { dependencies = {
items = { items = {
@ -1793,10 +2005,10 @@ local blessing = {
func = function() func = function()
if G.consumeables.config.card_limit > #G.consumeables.cards then if G.consumeables.config.card_limit > #G.consumeables.cards then
play_sound("timpani") play_sound("timpani")
local forced_key = get_random_consumable("blessing", nil, "c_cry_blessing") local forced_key = Cryptid.random_consumable("blessing", nil, "c_cry_blessing")
local _card = create_card( local _card = create_card(
"Consumeables", "Consumeables",
G.consumables, G.consumeables,
nil, nil,
nil, nil,
nil, nil,
@ -1817,6 +2029,17 @@ local blessing = {
-- Seals -- Seals
local azure_seal = { local azure_seal = {
cry_credits = {
idea = {
"stupid",
},
art = {
"stupid",
},
code = {
"stupid",
},
},
object_type = "Seal", object_type = "Seal",
dependencies = { dependencies = {
items = { items = {
@ -1867,6 +2090,17 @@ local azure_seal = {
end, end,
} }
local typhoon = { local typhoon = {
cry_credits = {
idea = {
"stupid",
},
art = {
"stupid",
},
code = {
"stupid",
},
},
object_type = "Consumable", object_type = "Consumable",
dependencies = { dependencies = {
items = { items = {
@ -1943,20 +2177,24 @@ local absolute = {
should_apply = false, should_apply = false,
no_sticker_sheet = true, no_sticker_sheet = true,
draw = function(self, card, layer) draw = function(self, card, layer)
local notilt = nil
if card.area and card.area.config.type == "deck" then
notilt = true
end
G.shared_stickers["cry_absolute"].role.draw_major = card G.shared_stickers["cry_absolute"].role.draw_major = card
G.shared_stickers["cry_absolute"]:draw_shader("dissolve", nil, nil, nil, card.children.center) G.shared_stickers["cry_absolute"]:draw_shader("dissolve", nil, nil, notilt, card.children.center)
G.shared_stickers["cry_absolute"]:draw_shader( G.shared_stickers["cry_absolute"]:draw_shader(
"polychrome", "polychrome",
nil, nil,
card.ARGS.send_to_shader, card.ARGS.send_to_shader,
nil, notilt,
card.children.center card.children.center
) )
G.shared_stickers["cry_absolute"]:draw_shader( G.shared_stickers["cry_absolute"]:draw_shader(
"voucher", "voucher",
nil, nil,
card.ARGS.send_to_shader, card.ARGS.send_to_shader,
nil, notilt,
card.children.center card.children.center
) )
end, end,

View file

@ -76,41 +76,12 @@ local dropshot = {
}, },
art = { art = {
"Mystic Misclick", "Mystic Misclick",
"George the Rat",
}, },
code = { code = {
"Math", "Math",
}, },
}, },
init = function(self)
local gigo = Game.init_game_object
function Game:init_game_object()
local g = gigo(self)
g.current_round.cry_dropshot_card = { suit = "Spades" }
return g
end
local rcc = reset_castle_card
function reset_castle_card()
rcc()
if not G.GAME.current_round.cry_dropshot_card then
G.GAME.current_round.cry_dropshot_card = {}
end
G.GAME.current_round.cry_dropshot_card.suit = "Spades"
local valid_castle_cards = {}
for k, v in ipairs(G.playing_cards) do
if v.ability.effect ~= "Stone Card" then
valid_castle_cards[#valid_castle_cards + 1] = v
end
end
if valid_castle_cards[1] then
local castle_card =
pseudorandom_element(valid_castle_cards, pseudoseed("cry_dro" .. G.GAME.round_resets.ante))
if not G.GAME.current_round.cry_dropshot_card then
G.GAME.current_round.cry_dropshot_card = {}
end
G.GAME.current_round.cry_dropshot_card.suit = castle_card.base.suit
end
end
end,
} }
local happyhouse = { local happyhouse = {
object_type = "Joker", object_type = "Joker",
@ -144,9 +115,15 @@ local happyhouse = {
if if
card.ability.extra.check == 114 card.ability.extra.check == 114
and G.GAME.round_resets.ante < 8 and G.GAME.round_resets.ante < 8
and not ( and not (G.GAME.selected_back.effect.center.key == "antimatter" or G.GAME.selected_back.effect.center.key == "equilibrium")
G.GAME.selected_back.effect.center.key == "antimatter" and (
or G.GAME.selected_back.effect.center.key == "equilibrium" not CardSleeves
or (
CardSleeves
and G.GAME.selected_sleeve
-- and G.GAME.selected_sleeve ~= "sleeve_cry_antimatter_sleeve" TODO: Add check if Antimatter sleeve gets added
and G.GAME.selected_sleeve ~= "sleeve_cry_equilibrium_sleeve"
)
) )
then --Yes, the cut off point is boss blind Ante 7. I'm evil >:3. then --Yes, the cut off point is boss blind Ante 7. I'm evil >:3.
check_for_unlock({ type = "home_realtor" }) check_for_unlock({ type = "home_realtor" })
@ -262,7 +239,7 @@ local potofjokes = {
end, end,
calculate = function(self, card, context) calculate = function(self, card, context)
if context.end_of_round and not context.individual and not context.repetition and not context.blueprint then if context.end_of_round and not context.individual and not context.repetition and not context.blueprint then
G.hand:change_size(math.min(1000 - card.ability.extra.h_size, card.ability.extra.h_mod)) G.hand:change_size(math.min(math.max(0, 1000 - card.ability.extra.h_size), card.ability.extra.h_mod))
card.ability.extra.h_size = card.ability.extra.h_size + card.ability.extra.h_mod card.ability.extra.h_size = card.ability.extra.h_size + card.ability.extra.h_mod
return { return {
message = localize({ type = "variable", key = "a_handsize", vars = { card.ability.extra.h_mod } }), message = localize({ type = "variable", key = "a_handsize", vars = { card.ability.extra.h_mod } }),
@ -326,7 +303,7 @@ local queensgambit = {
if context.destroying_card and not context.blueprint then if context.destroying_card and not context.blueprint then
if if
G.GAME.current_round.current_hand.handname == "Royal Flush" G.GAME.current_round.current_hand.handname == "Royal Flush"
and SMODS.Ranks[context.destroying_card.base.value].key == "Queen" and context.destroying_card:get_id() == 12
then then
card_eval_status_text( card_eval_status_text(
card, card,
@ -347,7 +324,7 @@ local queensgambit = {
return true return true
end, end,
})) }))
return nil, true return { remove = not context.destroying_card.ability.eternal }
end end
end end
end, end,
@ -387,7 +364,7 @@ local wee_fib = {
calculate = function(self, card, context) calculate = function(self, card, context)
if context.cardarea == G.play and context.individual and not context.blueprint then if context.cardarea == G.play and context.individual and not context.blueprint then
local rank = context.other_card:get_id() local rank = context.other_card:get_id()
if rank == "Ace" or rank == "2" or rank == "3" or rank == "5" or rank == "8" then if rank == 14 or rank == 2 or rank == 3 or rank == 5 or rank == 8 then
card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_mod card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.mult_mod
return { return {
@ -638,7 +615,11 @@ local pickle = {
calculate = function(self, card, context) calculate = function(self, card, context)
if context.skip_blind then if context.skip_blind then
for i = 1, math.min(20, card.ability.extra.tags) do for i = 1, math.min(20, card.ability.extra.tags) do
local tag = Tag(get_next_tag_key("cry_pickle")) local tag_key = get_next_tag_key("cry_pickle")
if tag_key == "tag_boss" then
i = i - 1 --skip these, as they can cause bugs with pack opening from other tags
else
local tag = Tag(tag_key)
if tag.name == "Orbital Tag" then if tag.name == "Orbital Tag" then
local _poker_hands = {} local _poker_hands = {}
for k, v in pairs(G.GAME.hands) do for k, v in pairs(G.GAME.hands) do
@ -648,9 +629,7 @@ local pickle = {
end end
tag.ability.orbital_hand = pseudorandom_element(_poker_hands, pseudoseed("cry_pickle_orbital")) tag.ability.orbital_hand = pseudorandom_element(_poker_hands, pseudoseed("cry_pickle_orbital"))
end end
if tag.name == "Boss Tag" then tag.ability.shiny = cry_rollshinybool()
i = i - 1 --skip these, as they can cause bugs with pack opening from other tags
else
add_tag(tag) add_tag(tag)
end end
end end
@ -670,8 +649,8 @@ local pickle = {
card_eval_status_text(card, "extra", nil, nil, nil, { card_eval_status_text(card, "extra", nil, nil, nil, {
message = localize({ message = localize({
type = "variable", type = "variable",
key = card.ability.extra.tags == 1 and "a_tag_minus" or "a_tags_minus", key = card.ability.extra.tags_mod == 1 and "a_tag_minus" or "a_tags_minus",
vars = { card.ability.extra.tags }, vars = { card.ability.extra.tags_mod },
})[1], })[1],
colour = G.C.FILTER, colour = G.C.FILTER,
}) })
@ -711,6 +690,7 @@ local pickle = {
}, },
art = { art = {
"Mystic Misclick", "Mystic Misclick",
"unexian",
}, },
code = { code = {
"Math", "Math",
@ -795,7 +775,7 @@ local triplet_rhythm = {
if context.joker_main and context.scoring_hand then if context.joker_main and context.scoring_hand then
local threes = 0 local threes = 0
for i = 1, #context.scoring_hand do for i = 1, #context.scoring_hand do
if context.scoring_hand[i]:get_id() then if context.scoring_hand[i]:get_id() == 3 then
threes = threes + 1 threes = threes + 1
end end
end end
@ -840,18 +820,12 @@ local booster = {
return { vars = { math.min(25, center.ability.extra.booster_slots) } } return { vars = { math.min(25, center.ability.extra.booster_slots) } }
end, end,
add_to_deck = function(self, card, from_debuff) add_to_deck = function(self, card, from_debuff)
if not G.GAME.modifiers.cry_booster_packs then local mod = math.min(25, card.ability.extra.booster_slots)
G.GAME.modifiers.cry_booster_packs = 2 SMODS.change_booster_limit(mod)
end
G.GAME.modifiers.cry_booster_packs = G.GAME.modifiers.cry_booster_packs
+ math.min(25, card.ability.extra.booster_slots)
end, end,
remove_from_deck = function(self, card, from_debuff) remove_from_deck = function(self, card, from_debuff)
if not G.GAME.modifiers.cry_booster_packs then local mod = math.min(25, card.ability.extra.booster_slots)
G.GAME.modifiers.cry_booster_packs = 2 SMODS.change_booster_limit(-mod)
end
G.GAME.modifiers.cry_booster_packs = G.GAME.modifiers.cry_booster_packs
- math.min(25, card.ability.extra.booster_slots)
end, end,
cry_credits = { cry_credits = {
idea = { idea = {
@ -945,6 +919,7 @@ local chili_pepper = {
}, },
art = { art = {
"Mystic Misclick", "Mystic Misclick",
"George the Rat",
}, },
code = { code = {
"Math", "Math",
@ -975,7 +950,7 @@ local compound_interest = {
local bonus = math.max(0, math.floor(0.01 * card.ability.extra.percent * (G.GAME.dollars or 1))) local bonus = math.max(0, math.floor(0.01 * card.ability.extra.percent * (G.GAME.dollars or 1)))
local old = card.ability.extra.percent local old = card.ability.extra.percent
card.ability.extra.percent = card.ability.extra.percent + card.ability.extra.percent_mod card.ability.extra.percent = card.ability.extra.percent + card.ability.extra.percent_mod
compound_interest_scale_mod(card, card.ability.extra.percent_mod, old, card.ability.extra.percent) Cryptid.compound_interest_scale_mod(card, card.ability.extra.percent_mod, old, card.ability.extra.percent)
if bonus > to_big(0) then if bonus > to_big(0) then
return bonus return bonus
end end
@ -1194,14 +1169,14 @@ local seal_the_deal = {
end, end,
set_ability = function(self, card, initial, delay_sprites) set_ability = function(self, card, initial, delay_sprites)
local sealtable = { "blue", "red", "purple" } local sealtable = { "blue", "red", "purple" }
if Cryptid.enabled["Misc."] then if Cryptid.enabled("cry_azure") then
sealtable[#sealtable + 1] = "azure" sealtable[#sealtable + 1] = "azure"
end end
if Cryptid.enabled["Code Cards"] then if Cryptid.enabled("cry_green") then
sealtable[#sealtable + 1] = "green" sealtable[#sealtable + 1] = "green"
end end
card.ability.extra = pseudorandom_element(sealtable, pseudoseed("abc")) card.ability.extra = pseudorandom_element(sealtable, pseudoseed("abc"))
if G.P_CENTERS["j_cry_seal_the_deal"].discovered then if self.discovered then
--Gold (ULTRA RARE!!!!!!!!) --Gold (ULTRA RARE!!!!!!!!)
if pseudorandom("xyz") <= 0.000001 and not (card.area and card.area.config.collection) then if pseudorandom("xyz") <= 0.000001 and not (card.area and card.area.config.collection) then
card.children.center:set_sprite_pos({ x = 6, y = 4 }) card.children.center:set_sprite_pos({ x = 6, y = 4 })
@ -1320,7 +1295,7 @@ local jimball = {
end, end,
add_to_deck = function(self, card, from_debuff) add_to_deck = function(self, card, from_debuff)
if not from_debuff then if not from_debuff then
create_cryptid_notif_overlay("jimball") Cryptid.notification_overlay("jimball")
end end
end, end,
atlas = "jimball", atlas = "jimball",
@ -1394,7 +1369,7 @@ local sus = {
local function is_impostor(card) local function is_impostor(card)
return card.base.value and SMODS.Ranks[card.base.value].key == "King" and card:is_suit("Hearts") return card.base.value and SMODS.Ranks[card.base.value].key == "King" and card:is_suit("Hearts")
end end
if context.end_of_round and context.cardarea == G.jokers then if context.end_of_round and context.cardarea == G.jokers and not context.blueprint and not context.retrigger_joker then
if not card.ability.used_round or card.ability.used_round ~= G.GAME.round then if not card.ability.used_round or card.ability.used_round ~= G.GAME.round then
card.ability.chosen_card = nil card.ability.chosen_card = nil
end end
@ -1477,6 +1452,7 @@ local sus = {
}, },
art = { art = {
"Jevonn", "Jevonn",
"unexian",
}, },
code = { code = {
"Math", "Math",
@ -1498,11 +1474,10 @@ local fspinner = {
return { vars = { center.ability.extra.chips, center.ability.extra.chip_mod } } return { vars = { center.ability.extra.chips, center.ability.extra.chip_mod } }
end, end,
rarity = 1, rarity = 1,
cost = 6, cost = 5,
order = 77, order = 77,
blueprint_compat = true, blueprint_compat = true,
perishable_compat = false, perishable_compat = false,
atlas = "fspinner",
calculate = function(self, card, context) calculate = function(self, card, context)
if context.before and not context.blueprint then if context.before and not context.blueprint then
local play_more_than = (G.GAME.hands[context.scoring_name].played or 0) local play_more_than = (G.GAME.hands[context.scoring_name].played or 0)
@ -1530,6 +1505,7 @@ local fspinner = {
}, },
art = { art = {
"Jevonn", "Jevonn",
"George the Rat",
}, },
code = { code = {
"Jevonn", "Jevonn",
@ -1755,18 +1731,21 @@ local gardenfork = {
return { vars = { center.ability.extra.money } } return { vars = { center.ability.extra.money } }
end, end,
calculate = function(self, card, context) calculate = function(self, card, context)
if context.cardarea == G.jokers and context.before and not context.blueprint then if context.cardarea == G.jokers and context.before and context.full_hand then
local has_ace = false
local has_7 = false
for i = 1, #context.full_hand do for i = 1, #context.full_hand do
if context.other_card:get_id() == 14 then if context.full_hand[i]:get_id() == 14 then
for j = 1, #context.full_hand do has_ace = true
if context.other_card:get_id() == 7 then -- :( ekshpenshive elseif context.full_hand[i]:get_id() == 7 then
has_7 = true
end
end
if has_ace and has_7 then
ease_dollars(card.ability.extra.money) ease_dollars(card.ability.extra.money)
return { message = "$" .. card.ability.extra.money, colour = G.C.MONEY } return { message = "$" .. card.ability.extra.money, colour = G.C.MONEY }
end end
end end
end
end
end
end, end,
cry_credits = { cry_credits = {
idea = { idea = {
@ -1933,6 +1912,10 @@ local hunger = {
name = "cry-hunger", name = "cry-hunger",
key = "hunger", key = "hunger",
config = { extra = { money = 3 } }, config = { extra = { money = 3 } },
extra_gamesets = { "exp_modest" },
gameset_config = {
exp_modest = { extra = { money = 2 } },
},
pos = { x = 3, y = 0 }, pos = { x = 3, y = 0 },
rarity = 2, rarity = 2,
cost = 6, cost = 6,
@ -2071,7 +2054,7 @@ local redbloon = {
"Roguefort Cookie", "Roguefort Cookie",
}, },
art = { art = {
"Jevonn", "Darren_The_Frog",
}, },
code = { code = {
"Jevonn", "Jevonn",
@ -2557,7 +2540,7 @@ local sapling = {
}, },
name = "cry-sapling", name = "cry-sapling",
key = "sapling", key = "sapling",
pos = { x = 3, y = 2 }, pos = { x = 3, y = 2 }, --todo animations
config = { extra = { score = 0, req = 18, check = nil } }, config = { extra = { score = 0, req = 18, check = nil } },
rarity = 2, rarity = 2,
cost = 6, cost = 6,
@ -2569,8 +2552,9 @@ local sapling = {
vars = { vars = {
center.ability.extra.score, center.ability.extra.score,
center.ability.extra.req, center.ability.extra.req,
cry_card_enabled("set_cry_epic") == true and localize("k_cry_epic") or localize("k_rare"), Cryptid.enabled("set_cry_epic") == true and localize("k_cry_epic") or localize("k_rare"),
colours = { G.C.RARITY[cry_card_enabled("set_cry_epic") == true and "cry_epic" or 3] }, colours = { G.C.RARITY[Cryptid.enabled("set_cry_epic") == true and "cry_epic" or 3] },
Cryptid.enabled("set_cry_epic") == true and localize("cry_sapling_an") or localize("cry_sapling_a"),
}, },
} }
end, end,
@ -2594,7 +2578,7 @@ local sapling = {
end end
elseif context.selling_self and not context.blueprint and not context.retrigger_joker then elseif context.selling_self and not context.blueprint and not context.retrigger_joker then
if card.ability.extra.score >= card.ability.extra.req then if card.ability.extra.score >= card.ability.extra.req then
local value = cry_card_enabled("set_cry_epic") == true and "cry_epic" or 0.99 local value = Cryptid.enabled("set_cry_epic") == true and "cry_epic" or 0.99
card_eval_status_text( card_eval_status_text(
card, card,
"extra", "extra",
@ -2626,6 +2610,7 @@ local sapling = {
}, },
art = { art = {
"Jevonn", "Jevonn",
"George the Rat",
}, },
code = { code = {
"Jevonn", "Jevonn",
@ -2707,7 +2692,7 @@ local spaceglobe = {
"Jevonn", "Jevonn",
}, },
art = { art = {
"Jevonn", "Selicre",
}, },
code = { code = {
"Jevonn", "Jevonn",
@ -3089,7 +3074,7 @@ local rnjoker = {
blueprint_compat = true, blueprint_compat = true,
set_ability = function(self, card, initial, delay_sprites) set_ability = function(self, card, initial, delay_sprites)
card.ability.abilities = {} card.ability.abilities = {}
rnjoker_randomize(card) Cryptid.rnjoker_randomize(card)
end, end,
calculate = function(self, card, context) calculate = function(self, card, context)
if card.ability and card.ability.abilities then if card.ability and card.ability.abilities then
@ -3746,7 +3731,7 @@ local rnjoker = {
end end
end end
G.hand:change_size(-hand_size) G.hand:change_size(-hand_size)
rnjoker_randomize(card) Cryptid.rnjoker_randomize(card)
return { return {
message = localize("k_reset"), message = localize("k_reset"),
colour = G.C.RED, colour = G.C.RED,
@ -3818,7 +3803,7 @@ local rnjoker = {
} }
localize(target) localize(target)
else else
localalize_with_direct(new_loc, target) Cryptid.direct_localize(new_loc, target)
end end
end, end,
calc_dollar_bonus = function(self, card) calc_dollar_bonus = function(self, card)
@ -3845,7 +3830,7 @@ local rnjoker = {
}, },
}, },
init = function(self) init = function(self)
function rnjoker_randomize(card) function Cryptid.rnjoker_randomize(card)
card.ability.abilities = {} card.ability.abilities = {}
card.ability.extra = {} card.ability.extra = {}
card.ability.extra.value = {} card.ability.extra.value = {}
@ -4214,7 +4199,7 @@ local rnjoker = {
values.text_parsed = text_parsed values.text_parsed = text_parsed
card.ability.abilities = { values } card.ability.abilities = { values }
end end
function localalize_with_direct(loc_target, args, misc_cat) function Cryptid.direct_localize(loc_target, args, misc_cat)
if loc_target then if loc_target then
for _, lines in for _, lines in
ipairs( ipairs(
@ -4361,7 +4346,7 @@ local duos = {
calculate = function(self, card, context) calculate = function(self, card, context)
if context.joker_main and (to_big(card.ability.x_mult) > to_big(1)) then if context.joker_main and (to_big(card.ability.x_mult) > to_big(1)) then
if if
context.poker_hands ~= nil and next(context.poker_hands["Two Pair"]) context.poker_hands ~= nil and next(context.poker_hands[card.ability.type])
or context.poker_hands ~= nil and next(context.poker_hands["Full House"]) or context.poker_hands ~= nil and next(context.poker_hands["Full House"])
then then
return { return {
@ -4407,7 +4392,7 @@ local home = {
blueprint_compat = true, blueprint_compat = true,
calculate = function(self, card, context) calculate = function(self, card, context)
if context.joker_main and (to_big(card.ability.x_mult) > to_big(1)) then if context.joker_main and (to_big(card.ability.x_mult) > to_big(1)) then
if context.poker_hands ~= nil and next(context.poker_hands["Full House"]) then if context.poker_hands ~= nil and next(context.poker_hands[card.ability.type]) then
return { return {
message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.x_mult } }), message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.x_mult } }),
colour = G.C.RED, colour = G.C.RED,
@ -4451,7 +4436,7 @@ local nuts = {
blueprint_compat = true, blueprint_compat = true,
calculate = function(self, card, context) calculate = function(self, card, context)
if context.joker_main and (to_big(card.ability.x_mult) > to_big(1)) then if context.joker_main and (to_big(card.ability.x_mult) > to_big(1)) then
if context.poker_hands ~= nil and next(context.poker_hands["Straight Flush"]) then if context.poker_hands ~= nil and next(context.poker_hands[card.ability.type]) then
return { return {
message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.x_mult } }), message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.x_mult } }),
colour = G.C.RED, colour = G.C.RED,
@ -4495,7 +4480,7 @@ local quintet = {
blueprint_compat = true, blueprint_compat = true,
calculate = function(self, card, context) calculate = function(self, card, context)
if context.joker_main and (to_big(card.ability.x_mult) > to_big(1)) then if context.joker_main and (to_big(card.ability.x_mult) > to_big(1)) then
if context.poker_hands ~= nil and next(context.poker_hands["Five of a Kind"]) then if context.poker_hands ~= nil and next(context.poker_hands[card.ability.type]) then
return { return {
message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.x_mult } }), message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.x_mult } }),
colour = G.C.RED, colour = G.C.RED,
@ -4511,7 +4496,7 @@ local quintet = {
return false return false
end, end,
check_for_unlock = function(self, args) check_for_unlock = function(self, args)
if args.type == "cry_win_with_hand" and args.hand == "Five of a Kind" then if args.type == "win" and G.GAME.last_hand_played == "Five of a Kind" then
return true return true
end end
end, end,
@ -4549,7 +4534,7 @@ local unity = {
blueprint_compat = true, blueprint_compat = true,
calculate = function(self, card, context) calculate = function(self, card, context)
if context.joker_main and (to_big(card.ability.x_mult) > to_big(1)) then if context.joker_main and (to_big(card.ability.x_mult) > to_big(1)) then
if context.poker_hands ~= nil and next(context.poker_hands["Flush House"]) then if context.poker_hands ~= nil and next(context.poker_hands[card.ability.type]) then
return { return {
message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.x_mult } }), message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.x_mult } }),
colour = G.C.RED, colour = G.C.RED,
@ -4565,7 +4550,7 @@ local unity = {
return false return false
end, end,
check_for_unlock = function(self, args) check_for_unlock = function(self, args)
if args.type == "cry_win_with_hand" and args.hand == "Flush House" then if args.type == "win" and G.GAME.last_hand_played == "Flush House" then
return true return true
end end
end, end,
@ -4603,7 +4588,7 @@ local swarm = {
blueprint_compat = true, blueprint_compat = true,
calculate = function(self, card, context) calculate = function(self, card, context)
if context.joker_main and (to_big(card.ability.x_mult) > to_big(1)) then if context.joker_main and (to_big(card.ability.x_mult) > to_big(1)) then
if context.poker_hands ~= nil and next(context.poker_hands["Flush Five"]) then if context.poker_hands ~= nil and next(context.poker_hands[card.ability.type]) then
return { return {
message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.x_mult } }), message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.x_mult } }),
colour = G.C.RED, colour = G.C.RED,
@ -4619,7 +4604,7 @@ local swarm = {
return false return false
end, end,
check_for_unlock = function(self, args) check_for_unlock = function(self, args)
if args.type == "cry_win_with_hand" and args.hand == "Flush Five" then if args.type == "win" and G.GAME.last_hand_played == "Flush Five" then
return true return true
end end
end, end,
@ -4659,7 +4644,7 @@ local stronghold = {
blueprint_compat = true, blueprint_compat = true,
calculate = function(self, card, context) calculate = function(self, card, context)
if context.joker_main and (to_big(card.ability.x_mult) > to_big(1)) then if context.joker_main and (to_big(card.ability.x_mult) > to_big(1)) then
if context.poker_hands ~= nil and next(context.poker_hands["cry_Bulwark"]) then if context.poker_hands ~= nil and next(context.poker_hands[card.ability.type]) then
return { return {
message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.x_mult } }), message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.x_mult } }),
colour = G.C.RED, colour = G.C.RED,
@ -4675,7 +4660,7 @@ local stronghold = {
return false return false
end, end,
check_for_unlock = function(self, args) check_for_unlock = function(self, args)
if args.type == "cry_win_with_hand" and args.hand == "cry_Bulwark" then if args.type == "win" and G.GAME.last_hand_played == "cry_Bulwark" then
return true return true
end end
end, end,
@ -4704,7 +4689,7 @@ local wtf = {
blueprint_compat = true, blueprint_compat = true,
calculate = function(self, card, context) calculate = function(self, card, context)
if context.joker_main and (to_big(card.ability.x_mult) > to_big(1)) then if context.joker_main and (to_big(card.ability.x_mult) > to_big(1)) then
if context.poker_hands ~= nil and next(context.poker_hands["cry_Clusterfuck"]) then if context.poker_hands ~= nil and next(context.poker_hands[card.ability.type]) then
return { return {
message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.x_mult } }), message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.x_mult } }),
colour = G.C.RED, colour = G.C.RED,
@ -4720,7 +4705,7 @@ local wtf = {
return false return false
end, end,
check_for_unlock = function(self, args) check_for_unlock = function(self, args)
if args.type == "cry_win_with_hand" and args.hand == "cry_Clusterfuck" then if args.type == "win" and G.GAME.last_hand_played == "cry_Clusterfuck" then
return true return true
end end
end, end,
@ -4749,7 +4734,7 @@ local clash = {
blueprint_compat = true, blueprint_compat = true,
calculate = function(self, card, context) calculate = function(self, card, context)
if context.joker_main and (to_big(card.ability.x_mult) > to_big(1)) then if context.joker_main and (to_big(card.ability.x_mult) > to_big(1)) then
if context.poker_hands ~= nil and next(context.poker_hands["cry_UltPair"]) then if context.poker_hands ~= nil and next(context.poker_hands[card.ability.type]) then
return { return {
message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.x_mult } }), message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.x_mult } }),
colour = G.C.RED, colour = G.C.RED,
@ -4765,7 +4750,7 @@ local clash = {
return false return false
end, end,
check_for_unlock = function(self, args) check_for_unlock = function(self, args)
if args.type == "cry_win_with_hand" and args.hand == "cry_UltPair" then if args.type == "win" and G.GAME.last_hand_played == "cry_UltPair" then
return true return true
end end
end, end,
@ -4792,7 +4777,7 @@ local filler = {
cost = 1, cost = 1,
blueprint_compat = true, blueprint_compat = true,
calculate = function(self, card, context) calculate = function(self, card, context)
if context.joker_main and context.poker_hands and next(context.poker_hands["High Card"]) then if context.joker_main and context.poker_hands and next(context.poker_hands[card.ability.type]) then
return { return {
message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.x_mult } }), message = localize({ type = "variable", key = "a_xmult", vars = { card.ability.x_mult } }),
colour = G.C.RED, colour = G.C.RED,
@ -5692,6 +5677,7 @@ local coin = {
}, },
art = { art = {
"Timetoexplode", "Timetoexplode",
"George the Rat",
}, },
code = { code = {
"Jevonn", "Jevonn",
@ -5923,6 +5909,7 @@ local oldblueprint = {
}, },
art = { art = {
"Linus Goof Balls", "Linus Goof Balls",
"unexian",
}, },
code = { code = {
"Math", "Math",
@ -6202,17 +6189,17 @@ local membershipcard = {
blueprint_compat = true, blueprint_compat = true,
atlas = "atlasthree", atlas = "atlasthree",
loc_vars = function(self, info_queue, card) loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.Xmult_mod, card.ability.extra.Xmult_mod * GLOBAL_cry_member_count } } return { vars = { card.ability.extra.Xmult_mod, card.ability.extra.Xmult_mod * Cryptid.member_count } }
end, end,
calculate = function(self, card, context) calculate = function(self, card, context)
if context.joker_main and card.ability.extra.Xmult_mod * GLOBAL_cry_member_count > 1 then if context.joker_main and card.ability.extra.Xmult_mod * Cryptid.member_count > 1 then
return { return {
message = localize({ message = localize({
type = "variable", type = "variable",
key = "a_xmult", key = "a_xmult",
vars = { card.ability.extra.Xmult_mod * GLOBAL_cry_member_count }, vars = { card.ability.extra.Xmult_mod * Cryptid.member_count },
}), }),
Xmult_mod = card.ability.extra.Xmult_mod * GLOBAL_cry_member_count, Xmult_mod = card.ability.extra.Xmult_mod * Cryptid.member_count,
} }
end end
end, end,
@ -6610,6 +6597,7 @@ local astral_bottle = {
}, },
}, },
name = "cry-astral_bottle", name = "cry-astral_bottle",
extra_gamesets = { "exp_modest", "exp_mainline", "exp_madness" },
key = "astral_bottle", key = "astral_bottle",
eternal_compat = false, eternal_compat = false,
pos = { x = 7, y = 0 }, pos = { x = 7, y = 0 },
@ -6622,21 +6610,47 @@ local astral_bottle = {
if not center.edition or (center.edition and not center.edition.cry_astral) then if not center.edition or (center.edition and not center.edition.cry_astral) then
info_queue[#info_queue + 1] = G.P_CENTERS.e_cry_astral info_queue[#info_queue + 1] = G.P_CENTERS.e_cry_astral
end end
return {
key = Cryptid.gameset_loc(
self,
{ exp_modest = "mainline", exp_mainline = "mainline", exp_madness = "madness" }
),
}
end, end,
calculate = function(self, card, context) calculate = function(self, card, context)
if context.selling_self and not context.retrigger_joker and not context.blueprint then if context.selling_self and not context.retrigger_joker and not context.blueprint then
local g = Cryptid.gameset(card)
local effect = { { astral = true, perishable = true } }
if g == "exp_modest" or g == "exp_mainline" then
effect = { { astral = true }, { perishable = true } }
end
if g == "exp_madness" then
effect = { { astral = true } }
end
local jokers = {} local jokers = {}
for i = 1, #G.jokers.cards do for i = 1, #G.jokers.cards do
if G.jokers.cards[i] ~= card and not G.jokers.cards[i].debuff and not G.jokers.cards[i].edition then if G.jokers.cards[i] ~= card and not G.jokers.cards[i].debuff and not G.jokers.cards[i].edition then
jokers[#jokers + 1] = G.jokers.cards[i] jokers[#jokers + 1] = G.jokers.cards[i]
end end
end end
if #jokers > 0 then if #jokers >= #effect then
card_eval_status_text(card, "extra", nil, nil, nil, { message = localize("k_duplicated_ex") }) card_eval_status_text(card, "extra", nil, nil, nil, { message = localize("k_duplicated_ex") })
local chosen_joker = pseudorandom_element(jokers, pseudoseed("trans")) for i = 1, #effect do
local chosen_joker = pseudorandom_element(jokers, pseudoseed("astral_bottle"))
if effect[i].astral then
chosen_joker:set_edition({ cry_astral = true }) chosen_joker:set_edition({ cry_astral = true })
end
if effect[i].perishable then
chosen_joker.ability.perishable = true -- Done manually to bypass perish compat chosen_joker.ability.perishable = true -- Done manually to bypass perish compat
chosen_joker.ability.perish_tally = G.GAME.perishable_rounds chosen_joker.ability.perish_tally = G.GAME.perishable_rounds
end
for i = 1, #jokers do
if jokers[i] == chosen_joker then
table.remove(jokers, i)
break
end
end
end
return nil, true return nil, true
else else
card_eval_status_text(card, "extra", nil, nil, nil, { message = localize("k_no_other_jokers") }) card_eval_status_text(card, "extra", nil, nil, nil, { message = localize("k_no_other_jokers") })
@ -6644,6 +6658,38 @@ local astral_bottle = {
end end
end, end,
} }
local kittyprinter = {
dependencies = {
items = {
"tag_cry_cat",
},
},
object_type = "Joker",
name = "cry-kittyprinter",
key = "kittyprinter",
config = { extra = { Xmult = 2 } },
pos = { x = 3, y = 5 },
rarity = 2,
cost = 6,
atlas = "atlasone",
order = 133,
blueprint_compat = true,
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.Xmult } }
end,
calculate = function(self, card, context)
if context.joker_main then
return {
message = localize({
type = "variable",
key = "a_xmult",
vars = { card.ability.extra.Xmult },
}),
Xmult_mod = card.ability.extra.Xmult,
}
end
end,
}
local kidnap = { local kidnap = {
object_type = "Joker", object_type = "Joker",
dependencies = { dependencies = {
@ -6732,7 +6778,7 @@ local exposed = {
atlas = "atlastwo", atlas = "atlastwo",
blueprint_compat = true, blueprint_compat = true,
loc_vars = function(self, info_queue, center) loc_vars = function(self, info_queue, center)
return { vars = { center.ability.extra } } return { vars = { math.min(40, center.ability.extra) } }
end, end,
update = function(self, card, dt) update = function(self, card, dt)
if G.deck and card.added_to_deck then if G.deck and card.added_to_deck then
@ -6779,7 +6825,7 @@ local mask = {
order = 124, order = 124,
blueprint_compat = true, blueprint_compat = true,
loc_vars = function(self, info_queue, center) loc_vars = function(self, info_queue, center)
return { vars = { center.ability.extra } } return { vars = { math.min(40, center.ability.extra) } }
end, end,
update = function(self, card, dt) update = function(self, card, dt)
if G.deck and card.added_to_deck then if G.deck and card.added_to_deck then
@ -6834,8 +6880,13 @@ local tropical_smoothie = {
for i, v in pairs(G.jokers.cards) do for i, v in pairs(G.jokers.cards) do
if v ~= card then if v ~= card then
if not Card.no(v, "immutable", true) then if not Card.no(v, "immutable", true) then
cry_with_deck_effects(v, function(cards) Cryptid.with_deck_effects(v, function(cards)
cry_misprintize(cards, { min = card.ability.extra, max = card.ability.extra }, nil, true) Cryptid.misprintize(
cards,
{ min = card.ability.extra, max = card.ability.extra },
nil,
true
)
end) end)
check = true check = true
end end
@ -6983,7 +7034,7 @@ local cookie = {
cost = 4, cost = 4,
atlas = "atlastwo", atlas = "atlastwo",
order = 133, order = 133,
config = { extra = { chips = 150, chip_mod = 1 } }, config = { extra = { chips = 200, chip_mod = 1 } },
blueprint_compat = true, blueprint_compat = true,
eternal_compat = false, eternal_compat = false,
perishable_compat = false, perishable_compat = false,
@ -7080,6 +7131,7 @@ local necromancer = {
and context.card.sell_cost > 0 and context.card.sell_cost > 0
and context.card.config.center.set == "Joker" and context.card.config.center.set == "Joker"
and G.GAME.jokers_sold and G.GAME.jokers_sold
and #G.GAME.jokers_sold > 0
then then
local card = create_card( local card = create_card(
"Joker", "Joker",
@ -7182,8 +7234,8 @@ local oil_lamp = { --You want it? It's yours my friend
if i < #G.jokers.cards then if i < #G.jokers.cards then
if not Card.no(G.jokers.cards[i + 1], "immutable", true) then if not Card.no(G.jokers.cards[i + 1], "immutable", true) then
check = true check = true
cry_with_deck_effects(G.jokers.cards[i + 1], function(cards) Cryptid.with_deck_effects(G.jokers.cards[i + 1], function(cards)
cry_misprintize( Cryptid.misprintize(
cards, cards,
{ min = card.ability.extra.increase, max = card.ability.extra.increase }, { min = card.ability.extra.increase, max = card.ability.extra.increase },
nil, nil,
@ -7243,8 +7295,8 @@ local tax_fraud = {
return { vars = { center.ability.extra.money } } return { vars = { center.ability.extra.money } }
end, end,
calc_dollar_bonus = function(self, card) calc_dollar_bonus = function(self, card)
if #advanced_find_joker(nil, nil, nil, { "rental" }, true) ~= 0 then if #Cryptid.advanced_find_joker(nil, nil, nil, { "rental" }, true) ~= 0 then
return card.ability.extra.money * #advanced_find_joker(nil, nil, nil, { "rental" }, true) return card.ability.extra.money * #Cryptid.advanced_find_joker(nil, nil, nil, { "rental" }, true)
end end
end, end,
cry_credits = { cry_credits = {
@ -7280,10 +7332,13 @@ local pity_prize = {
end, end,
calculate = function(self, card, context) calculate = function(self, card, context)
if context.skipping_booster then if context.skipping_booster then
local tag local tag_key
repeat repeat
tag = Tag(get_next_tag_key("cry_pity_prize")) tag_key = get_next_tag_key("cry_pity_prize")
until tag.name ~= "Boss Tag" and tag.name ~= "Gambler's Tag" and tag.name ~= "Empowered Tag" until tag_key ~= "tag_boss" --I saw pickle not generating boss tags because it apparently causes issues, so I did the same here
-- this is my first time seeing repeat... wtf
local tag = Tag(tag_key)
tag.ability.shiny = cry_rollshinybool()
if tag.name == "Orbital Tag" then if tag.name == "Orbital Tag" then
local _poker_hands = {} local _poker_hands = {}
for k, v in pairs(G.GAME.hands) do for k, v in pairs(G.GAME.hands) do
@ -7373,6 +7428,27 @@ local digitalhallucinations = {
) )
then then
local boosty = context.card local boosty = context.card
-- finally mod compat?
if boosty.config.center.cry_digital_hallucinations then
local conf = boosty.config.center.cry_digital_hallucinations
G.E_MANAGER:add_event(Event({
trigger = "before",
delay = 0.0,
func = function()
conf.create()
return true
end,
}))
card_eval_status_text(
context.blueprint_card or card,
"extra",
nil,
nil,
nil,
{ message = localize(conf.loc_key), colour = conf.colour }
)
return nil, true
end
local consums = { "Arcana", "Celestial", "Spectral" } local consums = { "Arcana", "Celestial", "Spectral" }
local short1 = { "tarot", "planet", "spectral" } local short1 = { "tarot", "planet", "spectral" }
local short2 = { "Tarot", "Planet", "Spectral" } local short2 = { "Tarot", "Planet", "Spectral" }
@ -7382,7 +7458,7 @@ local digitalhallucinations = {
trigger = "before", trigger = "before",
delay = 0.0, delay = 0.0,
func = function() func = function()
local ccard = create_card(short2[i], G.consumables, nil, nil, nil, nil, nil, "diha") local ccard = create_card(short2[i], G.consumeables, nil, nil, nil, nil, nil, "diha")
ccard:set_edition({ negative = true }, true) ccard:set_edition({ negative = true }, true)
ccard:add_to_deck() ccard:add_to_deck()
G.consumeables:emplace(ccard) G.consumeables:emplace(ccard)
@ -7400,34 +7476,21 @@ local digitalhallucinations = {
return nil, true -- this triggers BEFORE a retrigger joker and looks like jank. i can't get a message showing up without status text so this is the best option rn return nil, true -- this triggers BEFORE a retrigger joker and looks like jank. i can't get a message showing up without status text so this is the best option rn
end end
end end
if boosty.ability.name:find("code") then
G.E_MANAGER:add_event(Event({
trigger = "before",
delay = 0.0,
func = function()
local ccard = create_card("Code", G.consumables, nil, nil, nil, nil, nil, "diha")
ccard:set_edition({ negative = true }, true)
ccard:add_to_deck()
G.consumeables:emplace(ccard)
return true
end,
}))
card_eval_status_text(
context.blueprint_card or card,
"extra",
nil,
nil,
nil,
{ message = localize("cry_plus_code"), colour = G.C.SET.Code }
)
return nil, true
end
if boosty.ability.name:find("Buffoon") then if boosty.ability.name:find("Buffoon") then
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
trigger = "before", trigger = "before",
delay = 0.0, delay = 0.0,
func = function() func = function()
local ccard = create_card("Joker", G.jokers, nil, nil, nil, nil, nil, "diha") local ccard = create_card(
boosty.ability.name:find("meme") and "Meme" or "Joker",
G.jokers,
nil,
nil,
nil,
nil,
nil,
"diha"
) -- who up wasting their cycles rn
ccard:set_edition({ negative = true }, true) ccard:set_edition({ negative = true }, true)
ccard:add_to_deck() ccard:add_to_deck()
G.jokers:emplace(ccard) G.jokers:emplace(ccard)
@ -7462,6 +7525,7 @@ local digitalhallucinations = {
ccard:set_edition({ negative = true }, true) ccard:set_edition({ negative = true }, true)
ccard:start_materialize({ G.C.SECONDARY_SET.Enhanced }) ccard:start_materialize({ G.C.SECONDARY_SET.Enhanced })
G.play:emplace(ccard) G.play:emplace(ccard)
playing_card_joker_effects({ ccard }) -- odd timing
table.insert(G.playing_cards, ccard) table.insert(G.playing_cards, ccard)
return true return true
end, end,
@ -7482,8 +7546,6 @@ local digitalhallucinations = {
end, end,
})) }))
draw_card(G.play, G.deck, 90, "up", nil) draw_card(G.play, G.deck, 90, "up", nil)
playing_card_joker_effects({ true }) -- who knows what most this stuff does, i just copied it from marble jonkler
return nil, true return nil, true
end end
end end
@ -7522,7 +7584,7 @@ local arsonist = {
if context.destroying_card then if context.destroying_card then
local eval = evaluate_poker_hand(context.full_hand) local eval = evaluate_poker_hand(context.full_hand)
if next(eval["Full House"]) then if next(eval["Full House"]) then
return true return not context.destroying_card.ability.eternal
end end
end end
end, end,
@ -7531,7 +7593,7 @@ local arsonist = {
"AlexZGreat", "AlexZGreat",
}, },
art = { art = {
"Darren_the_frog", "Darren_The_Frog",
}, },
code = { code = {
"AlexZGreat", "AlexZGreat",
@ -7600,6 +7662,115 @@ local zooble = {
}, },
}, },
} }
local lebaron_james = {
object_type = "Joker",
dependencies = {
items = {
"set_cry_misc_joker",
},
},
name = "cry-LeBaron James",
pools = { ["Meme"] = true },
key = "lebaron_james",
pos = { x = 2, y = 5 },
config = { extra = { h_mod = 1 } },
rarity = 3,
cost = 6,
atlas = "atlasone",
order = 133,
no_dbl = true,
immutable = true, -- has issues with value manip and not easy to fix
loc_vars = function(self, info_queue, center)
return { vars = { center.ability.extra.h_mod } }
end,
calculate = function(self, card, context)
if context.cardarea == G.play and context.individual then
if context.other_card:get_id() == 13 then
local h_size = math.max(0, math.min(1000 - 0, card.ability.extra.h_mod))
G.hand:change_size(math.floor(h_size))
G.GAME.round_resets.temp_handsize = (G.GAME.round_resets.temp_handsize or 0) + math.floor(h_size)
if math.floor(h_size) > 0 then
return {
message = localize({ type = "variable", key = "a_handsize", vars = { math.floor(h_size) } }),
colour = G.C.FILTER,
card = card,
}
end
end
end
end,
cry_credits = {
idea = {
"indefenite_idiot",
"HexaCryonic",
},
code = {
"AlexZGreat",
},
art = {
"lamborghiniofficial",
},
},
init = function(self)
-- Calculate enhancements for kings as if held in hand
-- Note that for enhancements that work when played and held in hand, this will fail
-- Not tested since no enhancements use this yet (Steel is weird, and Gold won't work)
local cce = Card.calculate_enhancement
function Card:calculate_enhancement(context)
local ret = cce(self, context)
if
not ret
and next(SMODS.find_card("j_cry_lebaron_james"))
and SMODS.Ranks[self.base.value].key == "King"
and context.cardarea == G.play
then
context.cardarea = G.hand
local ret = cce(self, context)
context.cardarea = G.play
end
return ret
end
end,
}
local huntingseason = { -- If played hand contains three cards, destroy the middle card after scoring
object_type = "Joker",
dependencies = {
items = {
"set_cry_misc_joker",
},
},
name = "cry-huntingseason",
key = "huntingseason",
pos = { x = 4, y = 5 },
order = 134,
immutable = true,
rarity = 2,
cost = 7,
blueprint_compat = false,
atlas = "atlasone",
calculate = function(self, card, context)
if
(context.cardarea == G.play or context.cardarea == "unscored")
and context.destroy_card == context.full_hand[2]
and #context.full_hand == 3 -- 3 cards in played hand
and not context.blueprint
and not context.retrigger_joker
then
return { remove = not context.destroy_card.ability.eternal }
end
end,
cry_credits = {
art = {
"Unexian",
},
idea = {
"Nova",
},
code = {
"Nova",
},
},
}
local miscitems = { local miscitems = {
jimball_sprite, jimball_sprite,
dropshot, dropshot,
@ -7683,6 +7854,7 @@ local miscitems = {
savvy, savvy,
subtle, subtle,
discreet, discreet,
kittyprinter,
kidnap, kidnap,
exposed, exposed,
mask, mask,
@ -7710,6 +7882,8 @@ local miscitems = {
fuckedup, fuckedup,
foolhardy, foolhardy,
translucent, translucent,
lebaron_james,
huntingseason,
} }
return { return {
name = "Misc. Jokers", name = "Misc. Jokers",

View file

@ -1,4 +1,15 @@
local timantti = { local timantti = {
cry_credits = {
idea = {
"Jevonn",
},
art = {
"jenwalter666",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_planet", "set_cry_planet",
@ -48,10 +59,10 @@ local timantti = {
} }
end, end,
use = function(self, card, area, copier) use = function(self, card, area, copier)
suit_level_up(self, card, area, copier) Cryptid.suit_level_up(self, card, area, copier)
end, end,
bulk_use = function(self, card, area, copier, number) bulk_use = function(self, card, area, copier, number)
suit_level_up(self, card, area, copier, number) Cryptid.suit_level_up(self, card, area, copier, number)
end, end,
calculate = function(self, card, context) calculate = function(self, card, context)
if if
@ -72,6 +83,17 @@ local timantti = {
end, end,
} }
local klubi = { local klubi = {
cry_credits = {
idea = {
"Jevonn",
},
art = {
"jenwalter666",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_planet", "set_cry_planet",
@ -121,10 +143,10 @@ local klubi = {
} }
end, end,
use = function(self, card, area, copier) use = function(self, card, area, copier)
suit_level_up(self, card, area, copier) Cryptid.suit_level_up(self, card, area, copier)
end, end,
bulk_use = function(self, card, area, copier, number) bulk_use = function(self, card, area, copier, number)
suit_level_up(self, card, area, copier, number) Cryptid.suit_level_up(self, card, area, copier, number)
end, end,
calculate = function(self, card, context) calculate = function(self, card, context)
if if
@ -145,6 +167,17 @@ local klubi = {
end, end,
} }
local sydan = { local sydan = {
cry_credits = {
idea = {
"Jevonn",
},
art = {
"jenwalter666",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_planet", "set_cry_planet",
@ -194,10 +227,10 @@ local sydan = {
} }
end, end,
use = function(self, card, area, copier) use = function(self, card, area, copier)
suit_level_up(self, card, area, copier) Cryptid.suit_level_up(self, card, area, copier)
end, end,
bulk_use = function(self, card, area, copier, number) bulk_use = function(self, card, area, copier, number)
suit_level_up(self, card, area, copier, number) Cryptid.suit_level_up(self, card, area, copier, number)
end, end,
calculate = function(self, card, context) calculate = function(self, card, context)
if if
@ -218,6 +251,17 @@ local sydan = {
end, end,
} }
local lapio = { local lapio = {
cry_credits = {
idea = {
"Jevonn",
},
art = {
"jenwalter666",
},
code = {
"Math",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_planet", "set_cry_planet",
@ -267,10 +311,10 @@ local lapio = {
} }
end, end,
use = function(self, card, area, copier) use = function(self, card, area, copier)
suit_level_up(self, card, area, copier) Cryptid.suit_level_up(self, card, area, copier)
end, end,
bulk_use = function(self, card, area, copier, number) bulk_use = function(self, card, area, copier, number)
suit_level_up(self, card, area, copier, number) Cryptid.suit_level_up(self, card, area, copier, number)
end, end,
calculate = function(self, card, context) calculate = function(self, card, context)
if if
@ -291,6 +335,17 @@ local lapio = {
end, end,
} }
local kaikki = { local kaikki = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"HexaCryonic",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_planet", "set_cry_planet",
@ -341,10 +396,10 @@ local kaikki = {
} }
end, end,
use = function(self, card, area, copier) use = function(self, card, area, copier)
suit_level_up(self, card, area, copier) Cryptid.suit_level_up(self, card, area, copier)
end, end,
bulk_use = function(self, card, area, copier, number) bulk_use = function(self, card, area, copier, number)
suit_level_up(self, card, area, copier, number) Cryptid.suit_level_up(self, card, area, copier, number)
end, end,
calculate = function(self, card, context) calculate = function(self, card, context)
if if
@ -365,6 +420,17 @@ local kaikki = {
end, end,
} }
local planetlua = { local planetlua = {
cry_credits = {
idea = {
"Jevonn",
},
art = {
"Jevonn",
},
code = {
"Jevonn",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_planet", "set_cry_planet",
@ -659,6 +725,17 @@ local planetlua = {
end, end,
} }
local nstar = { local nstar = {
cry_credits = {
idea = {
"Jevonn",
},
art = {
"Jevonn",
},
code = {
"Jevonn",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_planet", "set_cry_planet",
@ -689,7 +766,7 @@ local nstar = {
--Add +1 to amount of neutron stars used this run --Add +1 to amount of neutron stars used this run
G.GAME.neutronstarsusedinthisrun = G.GAME.neutronstarsusedinthisrun + 1 G.GAME.neutronstarsusedinthisrun = G.GAME.neutronstarsusedinthisrun + 1
local neutronhand = neutronstarrandomhand() --Random poker hand local neutronhand = Cryptid.get_random_hand() --Random poker hand
update_hand_text({ sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 }, { update_hand_text({ sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 }, {
handname = localize(neutronhand, "poker_hands"), handname = localize(neutronhand, "poker_hands"),
chips = G.GAME.hands[neutronhand].chips, chips = G.GAME.hands[neutronhand].chips,
@ -711,7 +788,7 @@ local nstar = {
local neutronhand = "n/a" local neutronhand = "n/a"
for i = 1, number do for i = 1, number do
G.GAME.neutronstarsusedinthisrun = G.GAME.neutronstarsusedinthisrun + 1 G.GAME.neutronstarsusedinthisrun = G.GAME.neutronstarsusedinthisrun + 1
neutronhand = neutronstarrandomhand() neutronhand = Cryptid.get_random_hand()
handstolv[neutronhand] = (handstolv[neutronhand] or 0) + G.GAME.neutronstarsusedinthisrun handstolv[neutronhand] = (handstolv[neutronhand] or 0) + G.GAME.neutronstarsusedinthisrun
end end
for k, v in pairs(handstolv) do for k, v in pairs(handstolv) do
@ -756,7 +833,7 @@ local nstar = {
end end
end, end,
init = function(self) init = function(self)
function neutronstarrandomhand(ignore, seed, allowhidden) function Cryptid.get_random_hand(ignore, seed, allowhidden)
--From JenLib's get_random_hand --From JenLib's get_random_hand
local chosen_hand local chosen_hand
ignore = ignore or {} ignore = ignore or {}
@ -783,6 +860,18 @@ local nstar = {
end, end,
} }
local sunplanet = { local sunplanet = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Jevonn",
"Toneblock",
},
},
--TODO: disable ascendant hands if this is disabled --TODO: disable ascendant hands if this is disabled
dependencies = { dependencies = {
items = { items = {
@ -821,7 +910,7 @@ local sunplanet = {
play_sound("tarot1") play_sound("tarot1")
ease_colour(G.C.UI_CHIPS, copy_table(G.C.GOLD), 0.1) ease_colour(G.C.UI_CHIPS, copy_table(G.C.GOLD), 0.1)
ease_colour(G.C.UI_MULT, copy_table(G.C.GOLD), 0.1) ease_colour(G.C.UI_MULT, copy_table(G.C.GOLD), 0.1)
cry_pulse_flame(0.01, sunlevel) Cryptid.pulse_flame(0.01, sunlevel)
used_consumable:juice_up(0.8, 0.5) used_consumable:juice_up(0.8, 0.5)
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
trigger = "after", trigger = "after",
@ -861,7 +950,7 @@ local sunplanet = {
play_sound("tarot1") play_sound("tarot1")
ease_colour(G.C.UI_CHIPS, copy_table(G.C.GOLD), 0.1) ease_colour(G.C.UI_CHIPS, copy_table(G.C.GOLD), 0.1)
ease_colour(G.C.UI_MULT, copy_table(G.C.GOLD), 0.1) ease_colour(G.C.UI_MULT, copy_table(G.C.GOLD), 0.1)
cry_pulse_flame(0.01, (sunlevel - 1) + number) Cryptid.pulse_flame(0.01, (sunlevel - 1) + number)
used_consumable:juice_up(0.8, 0.5) used_consumable:juice_up(0.8, 0.5)
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
trigger = "after", trigger = "after",
@ -920,6 +1009,17 @@ local sunplanet = {
end, end,
} }
local abelt = { local abelt = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"HexaCryonic",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_poker_hand_stuff", "set_cry_poker_hand_stuff",
@ -955,6 +1055,17 @@ local abelt = {
generate_ui = 0, generate_ui = 0,
} }
local void = { local void = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"HexaCryonic",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_poker_hand_stuff", "set_cry_poker_hand_stuff",
@ -990,6 +1101,17 @@ local void = {
generate_ui = 0, generate_ui = 0,
} }
local marsmoons = { local marsmoons = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"HexaCryonic",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_poker_hand_stuff", "set_cry_poker_hand_stuff",
@ -1025,6 +1147,17 @@ local marsmoons = {
generate_ui = 0, generate_ui = 0,
} }
local universe = { local universe = {
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"HexaCryonic",
},
},
dependencies = { dependencies = {
items = { items = {
"set_cry_poker_hand_stuff", "set_cry_poker_hand_stuff",
@ -1059,7 +1192,7 @@ local universe = {
end, end,
generate_ui = 0, generate_ui = 0,
} }
function suit_level_up(center, card, area, copier, number) function Cryptid.suit_level_up(center, card, area, copier, number)
local used_consumable = copier or card local used_consumable = copier or card
if not number then if not number then
number = 1 number = 1

View file

@ -1,51 +1,47 @@
if CardSleeves then if CardSleeves then
local encodedsleeve = CardSleeves.Sleeve({ local veryfairsleeve = CardSleeves.Sleeve({
key = "encoded_sleeve", key = "very_fair_sleeve",
name = "Encoded Sleeve", name = "Very Fair Sleeve",
atlas = "atlasSleeves", atlas = "atlasSleeves",
pos = { x = 1, y = 0 }, pos = { x = 0, y = 2 },
config = {}, config = { hands = -2, discards = -2 },
unlocked = true, unlocked = true,
unlock_condition = { deck = "Encoded Deck", stake = 1 }, unlock_condition = { deck = "Very Fair Deck", stake = 1 },
loc_vars = function(self) loc_vars = function(self)
return { vars = {} } return { vars = {} }
end, end,
trigger_effect = function(self, args) end, trigger_effect = function(self, args) end,
apply = function(self) apply = function(self)
G.E_MANAGER:add_event(Event({ G.GAME.starting_params.hands = G.GAME.starting_params.hands + self.config.hands
func = function() G.GAME.starting_params.discards = G.GAME.starting_params.discards + self.config.discards
if G.jokers then G.GAME.modifiers.cry_no_vouchers = true
-- Adding a before spawning becuase jen banned copy_paste end,
if init = function(self)
G.P_CENTERS["j_cry_CodeJoker"] very_fair_quip = {}
and (G.GAME.banned_keys and not G.GAME.banned_keys["j_cry_CodeJoker"]) local avts = SMODS.add_voucher_to_shop
then function SMODS.add_voucher_to_shop(...)
local card = create_card("Joker", G.jokers, nil, nil, nil, nil, "j_cry_CodeJoker") if G.GAME.modifiers.cry_no_vouchers then
card:add_to_deck() return
card:start_materialize()
G.jokers:emplace(card)
end end
if return avts(...)
G.P_CENTERS["j_cry_copypaste"]
and (G.GAME.banned_keys and not G.GAME.banned_keys["j_cry_copypaste"])
then
local card = create_card("Joker", G.jokers, nil, nil, nil, nil, "j_cry_copypaste")
card:add_to_deck()
card:start_materialize()
G.jokers:emplace(card)
end
return true
end end
end, end,
})) })
--DOWNSIDE: local infinitesleeve = CardSleeves.Sleeve({
key = "infinite_sleeve",
G.GAME.joker_rate = 0 name = "Unlimited Sleeve",
G.GAME.planet_rate = 0 atlas = "atlasSleeves",
G.GAME.tarot_rate = 0 pos = { x = 4, y = 0 },
G.GAME.code_rate = 1e100 config = { cry_highlight_limit = 1e20, hand_size = 1 },
unlocked = true,
unlock_condition = { deck = "Infinite Deck", stake = 1 },
loc_vars = function(self)
return { vars = {} }
end,
trigger_effect = function(self, args) end,
apply = function(self)
G.GAME.modifiers.cry_highlight_limit = self.config.cry_highlight_limit
end, end,
}) })
@ -85,40 +81,6 @@ if CardSleeves then
end, end,
}) })
local infinitesleeve = CardSleeves.Sleeve({
key = "infinite_sleeve",
name = "Unlimited Sleeve",
atlas = "atlasSleeves",
pos = { x = 4, y = 0 },
config = { cry_highlight_limit = 1e20, hand_size = 1 },
unlocked = true,
unlock_condition = { deck = "Infinite Deck", stake = 1 },
loc_vars = function(self)
return { vars = {} }
end,
trigger_effect = function(self, args) end,
apply = function(self)
G.GAME.modifiers.cry_highlight_limit = self.config.cry_highlight_limit
end,
})
local conveyorsleeve = CardSleeves.Sleeve({
key = "conveyor_sleeve",
name = "Conveyor Sleeve",
atlas = "atlasSleeves",
pos = { x = 5, y = 0 },
config = { cry_conveyor = true },
unlocked = true,
unlock_condition = { deck = "Conveyor Deck", stake = 1 },
loc_vars = function(self)
return { vars = {} }
end,
trigger_effect = function(self, args) end,
apply = function(self)
G.GAME.modifiers.cry_conveyor = true
end,
})
local CCDsleeve = CardSleeves.Sleeve({ local CCDsleeve = CardSleeves.Sleeve({
key = "ccd_sleeve", key = "ccd_sleeve",
name = "CCD Sleeve", name = "CCD Sleeve",
@ -166,6 +128,23 @@ if CardSleeves then
end, end,
}) })
local conveyorsleeve = CardSleeves.Sleeve({
key = "conveyor_sleeve",
name = "Conveyor Sleeve",
atlas = "atlasSleeves",
pos = { x = 5, y = 0 },
config = { cry_conveyor = true },
unlocked = true,
unlock_condition = { deck = "Conveyor Deck", stake = 1 },
loc_vars = function(self)
return { vars = {} }
end,
trigger_effect = function(self, args) end,
apply = function(self)
G.GAME.modifiers.cry_conveyor = true
end,
})
local redeemedsleeve = CardSleeves.Sleeve({ local redeemedsleeve = CardSleeves.Sleeve({
key = "redeemed_sleeve", key = "redeemed_sleeve",
name = "Redeemed Sleeve", name = "Redeemed Sleeve",
@ -182,6 +161,30 @@ if CardSleeves then
end, end,
}) })
local glowingsleeve = CardSleeves.Sleeve({
key = "glowing_sleeve",
name = "Glowing Sleeve",
atlas = "atlasSleeves",
pos = { x = 0, y = 2 },
config = { cry_glowing = true },
unlocked = true,
unlock_condition = { deck = "Glowing Deck", stake = 1 },
loc_vars = function(self)
return { vars = { " " } }
end,
calculate = function(self, back, context)
if context.context == "eval" and Cryptid.safe_get(G.GAME, "last_blind", "boss") then
for i = 1, #G.jokers.cards do
if not Card.no(G.jokers.cards[i], "immutable", true) then
Cryptid.with_deck_effects(G.jokers.cards[i], function(card)
Cryptid.misprintize(card, { min = 1.25, max = 1.25 }, nil, true)
end)
end
end
end
end,
})
local criticalsleeve = CardSleeves.Sleeve({ local criticalsleeve = CardSleeves.Sleeve({
key = "critical_sleeve", key = "critical_sleeve",
name = "Critical Sleeve", name = "Critical Sleeve",
@ -238,6 +241,119 @@ if CardSleeves then
end end
end, end,
}) })
local encodedsleeve = CardSleeves.Sleeve({
key = "encoded_sleeve",
name = "Encoded Sleeve",
atlas = "atlasSleeves",
pos = { x = 1, y = 0 },
config = {},
unlocked = true,
unlock_condition = { deck = "Encoded Deck", stake = 1 },
loc_vars = function(self)
return { vars = {} }
end,
trigger_effect = function(self, args) end,
apply = function(self)
G.E_MANAGER:add_event(Event({
func = function()
if G.jokers then
-- Adding a before spawning becuase jen banned copy_paste
if
G.P_CENTERS["j_cry_CodeJoker"]
and (G.GAME.banned_keys and not G.GAME.banned_keys["j_cry_CodeJoker"])
then
local card = create_card("Joker", G.jokers, nil, nil, nil, nil, "j_cry_CodeJoker")
card:add_to_deck()
card:start_materialize()
G.jokers:emplace(card)
end
if
G.P_CENTERS["j_cry_copypaste"]
and (G.GAME.banned_keys and not G.GAME.banned_keys["j_cry_copypaste"])
then
local card = create_card("Joker", G.jokers, nil, nil, nil, nil, "j_cry_copypaste")
card:add_to_deck()
card:start_materialize()
G.jokers:emplace(card)
end
return true
end
end,
}))
--DOWNSIDE:
G.GAME.joker_rate = 0
G.GAME.planet_rate = 0
G.GAME.tarot_rate = 0
G.GAME.code_rate = 1e100
end,
})
local nostalgicsleeve = CardSleeves.Sleeve({
key = "beta_sleeve",
name = "Nostalgic Sleeve",
atlas = "atlasSleeves",
pos = { x = 0, y = 2 },
config = { cry_beta = true },
unlocked = true,
unlock_condition = { deck = "Nostalgic Deck", stake = 1 },
loc_vars = function(self)
return { vars = {} }
end,
trigger_effect = function(self, args) end,
apply = function(self)
G.GAME.modifiers.cry_beta = true
end,
})
local bountifulsleeve = CardSleeves.Sleeve({
key = "bountiful_sleeve",
name = "Bountiful Sleeve",
atlas = "atlasSleeves",
pos = { x = 0, y = 2 },
config = { cry_forced_draw_amount = 5 },
unlocked = true,
unlock_condition = { deck = "Bountiful Deck", stake = 1 },
loc_vars = function(self)
return { vars = {} }
end,
trigger_effect = function(self, args) end,
apply = function(self)
G.GAME.modifiers.cry_forced_draw_amount = self.config.cry_forced_draw_amount
end,
})
local beigesleeve = CardSleeves.Sleeve({
key = "beige_sleeve",
name = "Beige Sleeve",
atlas = "atlasSleeves",
pos = { x = 3, y = 1 },
unlocked = true,
unlock_condition = { deck = "Beige Deck", stake = 1 },
loc_vars = function(self)
local key
if self.get_current_deck_key() == "b_cry_beige" then
key = self.key .. "_alt"
return { key = key, vars = {} }
end
return { vars = {} }
end,
trigger_effect = function(self, args) end,
apply = function(self)
if self.get_current_deck_key() ~= "b_cry_beige" then
G.GAME.modifiers.cry_common_value_quad = true
else
G.GAME.modifiers.cry_uncommon_value_quad = true
end
end,
})
local legendarysleeve = CardSleeves.Sleeve({ local legendarysleeve = CardSleeves.Sleeve({
key = "legendary_sleeve", key = "legendary_sleeve",
name = "Legendary Sleeve", name = "Legendary Sleeve",
@ -328,38 +444,52 @@ if CardSleeves then
})) }))
end, end,
}) })
local bountifulsleeve = CardSleeves.Sleeve({ local antimattersleeve = CardSleeves.Sleeve({
key = "bountiful_sleeve", key = "antimatter_sleeve",
name = "Bountiful Sleeve", name = "Antimatter Sleeve",
atlas = "atlasSleeves", atlas = "atlasSleeves",
pos = { x = 0, y = 2 }, pos = { x = 0, y = 2 },
config = { cry_forced_draw_amount = 5 }, config = {
cry_antimatter = true,
cry_crit_rate = 0.25, --Critical Deck
cry_legendary_rate = 0.2, --Legendary Deck
-- Enhanced Decks
cry_force_enhancement = "random",
cry_force_edition = "random",
cry_force_seal = "random",
cry_forced_draw_amount = 5,
},
unlocked = true, unlocked = true,
unlock_condition = { deck = "Bountiful Deck", stake = 1 }, unlock_condition = { deck = "Antimatter Deck", stake = 1 },
loc_vars = function(self) loc_vars = function(self)
return { vars = {} } return { vars = {} }
end, end,
trigger_effect = function(self, args) end, trigger_effect = function(self, args) end,
apply = function(self) apply = function(self)
G.GAME.modifiers.cry_forced_draw_amount = self.config.cry_forced_draw_amount Cryptid.antimatter_apply()
end, end,
}) })
local sleeveitems = {} local sleeveitems = {}
if CardSleeves then if CardSleeves then
sleeveitems = { sleeveitems = {
encodedsleeve, veryfairsleeve,
infinitesleeve,
equilibriumsleeve, equilibriumsleeve,
misprintsleeve, misprintsleeve,
infinitesleeve,
conveyorsleeve,
CCDsleeve, CCDsleeve,
wormholesleeve, wormholesleeve,
conveyorsleeve,
redeemedsleeve, redeemedsleeve,
glowingsleeve,
criticalsleeve, criticalsleeve,
encodedsleeve,
nostalgicsleeve,
bountifulsleeve,
beigesleeve,
legendarysleeve, legendarysleeve,
spookysleeve, spookysleeve,
bountifulsleeve, antimattersleeve,
} }
end end
end end

View file

@ -1,4 +1,15 @@
local white_hole = { local white_hole = {
cry_credits = {
idea = {
"y_not_tony",
},
art = {
"5381",
},
code = {
"Math",
},
},
object_type = "Consumable", object_type = "Consumable",
dependencies = { dependencies = {
items = { items = {
@ -35,12 +46,19 @@ local white_hole = {
for k, v in ipairs(G.handlist) do for k, v in ipairs(G.handlist) do
if to_big(G.GAME.hands[v].level) > to_big(1) then if to_big(G.GAME.hands[v].level) > to_big(1) then
local this_removed_levels = G.GAME.hands[v].level - 1 local this_removed_levels = G.GAME.hands[v].level - 1
removed_levels = removed_levels + this_removed_levels if
-- Due to how these poker hands are loaded they still techically exist even if Poker Hand Stuff is disabled
-- Because they still exist, While Hole needs to ignore levels from these if disabled (via Black Hole, Planet.lua, etc...)
(v ~= "cry_Bulwark" and v ~= "cry_Clusterfuck" and v ~= "cry_UltPair" and v ~= "cry_WholeDeck")
or Cryptid.enabled("set_cry_poker_hand_stuff") == true
then
if v ~= _hand or not modest then if v ~= _hand or not modest then
removed_levels = removed_levels + this_removed_levels
level_up_hand(used_consumable, v, true, -this_removed_levels) level_up_hand(used_consumable, v, true, -this_removed_levels)
end end
end end
end end
end
update_hand_text({ sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 }, { update_hand_text({ sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 }, {
handname = localize(_hand, "poker_hands"), handname = localize(_hand, "poker_hands"),
chips = G.GAME.hands[_hand].chips, chips = G.GAME.hands[_hand].chips,
@ -100,6 +118,17 @@ local white_hole = {
end, end,
} }
local vacuum = { local vacuum = {
cry_credits = {
idea = {
"Mjiojio",
},
art = {
"Linus Goof Balls",
},
code = {
"jenwalter666",
},
},
object_type = "Consumable", object_type = "Consumable",
dependencies = { dependencies = {
items = { items = {
@ -176,6 +205,17 @@ local vacuum = {
end, end,
} }
local hammerspace = { local hammerspace = {
cry_credits = {
idea = {
"jenwalter666",
},
art = {
"AlexZGreat",
},
code = {
"jenwalter666",
},
},
object_type = "Consumable", object_type = "Consumable",
dependencies = { dependencies = {
items = { items = {
@ -226,7 +266,7 @@ local hammerspace = {
delay = 0.15, delay = 0.15,
func = function() func = function()
CARD:flip() CARD:flip()
CARD:set_ability(get_random_consumable("cry_hammerspace", nil, "c_cry_hammerspace", nil, true)) CARD:set_ability(Cryptid.random_consumable("cry_hammerspace", nil, "c_cry_hammerspace", nil, true))
play_sound("tarot2", percent) play_sound("tarot2", percent)
CARD:juice_up(0.3, 0.3) CARD:juice_up(0.3, 0.3)
return true return true
@ -236,6 +276,17 @@ local hammerspace = {
end, end,
} }
local lock = { local lock = {
cry_credits = {
idea = {
"Ein13",
},
art = {
"Jevonn",
},
code = {
"jenwalter666",
},
},
object_type = "Consumable", object_type = "Consumable",
dependencies = { dependencies = {
items = { items = {
@ -250,6 +301,9 @@ local lock = {
cost = 4, cost = 4,
order = 1, order = 1,
atlas = "atlasnotjokers", atlas = "atlasnotjokers",
loc_vars = function(self, info_queue, card)
info_queue[#info_queue + 1] = { key = "eternal", set = "Other" }
end,
can_use = function(self, card) can_use = function(self, card)
return #G.jokers.cards > 0 return #G.jokers.cards > 0
end, end,
@ -295,10 +349,8 @@ local lock = {
CARD:set_eternal(nil) CARD:set_eternal(nil)
end end
CARD.ability.banana = nil CARD.ability.banana = nil
if Cryptid.enabled["Spooky"] then
CARD.ability.cry_possessed = nil CARD.ability.cry_possessed = nil
SMODS.Stickers.cry_flickering:apply(CARD, nil) SMODS.Stickers.cry_flickering:apply(CARD, nil)
end
play_sound("card1", percent) play_sound("card1", percent)
CARD:juice_up(0.3, 0.3) CARD:juice_up(0.3, 0.3)
return true return true
@ -348,6 +400,17 @@ local lock = {
end, end,
} }
local trade = { local trade = {
cry_credits = {
idea = {
"5381",
},
art = {
"RattlingSnow353",
},
code = {
"Math",
},
},
object_type = "Consumable", object_type = "Consumable",
dependencies = { dependencies = {
items = { items = {
@ -471,6 +534,17 @@ local trade = {
end, end,
} }
local analog = { local analog = {
cry_credits = {
idea = {
"y_not_tony",
},
art = {
"RattlingSnow353",
},
code = {
"Math",
},
},
object_type = "Consumable", object_type = "Consumable",
dependencies = { dependencies = {
items = { items = {
@ -531,6 +605,19 @@ local analog = {
end, end,
} }
local summoning = { local summoning = {
cry_credits = {
idea = {
"AlexZGreat",
},
art = {
--Summoning's sprite takes some parts from an unused sprite by Rattlingsnow so i'm crediting both users
"Kailen",
"RattlingSnow353",
},
code = {
"Jevonn",
},
},
object_type = "Consumable", object_type = "Consumable",
dependencies = { dependencies = {
items = { items = {
@ -547,8 +634,8 @@ local summoning = {
loc_vars = function(self, info_queue, center) loc_vars = function(self, info_queue, center)
return { return {
vars = { vars = {
cry_card_enabled("set_cry_epic") == true and localize("k_cry_epic") or localize("k_rare"), Cryptid.enabled("set_cry_epic") == true and localize("k_cry_epic") or localize("k_rare"),
colours = { G.C.RARITY[cry_card_enabled("set_cry_epic") == true and "cry_epic" or 3] }, colours = { G.C.RARITY[Cryptid.enabled("set_cry_epic") == true and "cry_epic" or 3] },
}, },
} }
end, end,
@ -556,7 +643,7 @@ local summoning = {
return #G.jokers.cards > 0 return #G.jokers.cards > 0
and #G.jokers.cards <= G.jokers.config.card_limit and #G.jokers.cards <= G.jokers.config.card_limit
--Prevent use if slots are full and all jokers are eternal (would exceed limit) --Prevent use if slots are full and all jokers are eternal (would exceed limit)
and #advanced_find_joker(nil, nil, nil, { "eternal" }, true, "j") < G.jokers.config.card_limit and #Cryptid.advanced_find_joker(nil, nil, nil, { "eternal" }, true, "j") < G.jokers.config.card_limit
end, end,
use = function(self, card, area, copier) use = function(self, card, area, copier)
local used_consumable = copier or card local used_consumable = copier or card
@ -567,7 +654,7 @@ local summoning = {
end end
end end
local chosen_joker = pseudorandom_element(G.jokers.cards, pseudoseed("cry_summoning")) local chosen_joker = pseudorandom_element(G.jokers.cards, pseudoseed("cry_summoning"))
local value = cry_card_enabled("set_cry_epic") == true and "cry_epic" or 0.99 local value = Cryptid.enabled("set_cry_epic") == true and "cry_epic" or 0.99
local _first_dissolve = nil local _first_dissolve = nil
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
trigger = "before", trigger = "before",
@ -598,6 +685,17 @@ local summoning = {
end, end,
} }
local replica = { local replica = {
cry_credits = {
idea = {
"Mystic Misclick",
},
art = {
"RattlingSnow353",
},
code = {
"Math",
},
},
object_type = "Consumable", object_type = "Consumable",
dependencies = { dependencies = {
items = { items = {
@ -703,16 +801,15 @@ local ritual = {
atlas = "atlasnotjokers", atlas = "atlasnotjokers",
pos = { x = 5, y = 1 }, pos = { x = 5, y = 1 },
can_use = function(self, card) can_use = function(self, card)
--TODO: CCD card compat if card.area ~= G.hand then
if #G.hand.highlighted > card.ability.max_highlighted then return G.hand and (#G.hand.highlighted == 1) and G.hand.highlighted[1] and not G.hand.highlighted[1].edition
return false else
local idx = 1
if G.hand.highlighted[1] == card then
idx = 2
end end
for _, v in ipairs(G.hand.highlighted) do return (#G.hand.highlighted == 2) and not G.hand.highlighted[idx].edition
if v.edition then
return false
end end
end
return true
end, end,
use = function(self, card, area, copier) use = function(self, card, area, copier)
local used_consumable = copier or card local used_consumable = copier or card

View file

@ -117,10 +117,6 @@ local choco_dice = {
no_dbl = true, no_dbl = true,
loc_vars = function(self, info_queue, center) loc_vars = function(self, info_queue, center)
if not center then --tooltip if not center then --tooltip
elseif not center.added_to_deck then
for i = 1, 10 do
info_queue[#info_queue + 1] = { set = "Other", key = "ev_cry_choco" .. i }
end
else else
SMODS.Events["ev_cry_choco" .. center.ability.extra.roll]:loc_vars(info_queue, center) SMODS.Events["ev_cry_choco" .. center.ability.extra.roll]:loc_vars(info_queue, center)
end end
@ -139,7 +135,7 @@ local choco_dice = {
then then
--todo: check if duplicates of event are already started/finished --todo: check if duplicates of event are already started/finished
SMODS.Events["ev_cry_choco" .. card.ability.extra.roll]:finish() SMODS.Events["ev_cry_choco" .. card.ability.extra.roll]:finish()
card.ability.extra.roll = roll_dice("cry_choco", 1, 10, { ignore_value = card.ability.extra.roll }) card.ability.extra.roll = Cryptid.roll("cry_choco", 1, 10, { ignore_value = card.ability.extra.roll })
SMODS.Events["ev_cry_choco" .. card.ability.extra.roll]:start() SMODS.Events["ev_cry_choco" .. card.ability.extra.roll]:start()
return { return {
message = tostring(card.ability.extra.roll), message = tostring(card.ability.extra.roll),
@ -566,10 +562,10 @@ local choco9 = {
init = function(self) init = function(self)
local ed = ease_dollars local ed = ease_dollars
function ease_dollars(mod, instant) function ease_dollars(mod, instant)
if mod == 0 then if to_big(mod) == to_big(0) then
return return
end end
if G.GAME.events.ev_cry_choco9 and mod > to_big(0) then if G.GAME.events.ev_cry_choco9 and to_big(mod) > to_big(0) then
mod = mod * 2 mod = mod * 2
end end
return ed(mod, instant) return ed(mod, instant)
@ -703,7 +699,7 @@ local spy = {
desc_nodes[#desc_nodes + 1] = res.main_end desc_nodes[#desc_nodes + 1] = res.main_end
end end
else else
local secret_card = cry_deep_copy(G.P_CENTERS[card.ability.extra.secret_card]) local secret_card = Cryptid.deep_copy(G.P_CENTERS[card.ability.extra.secret_card])
secret_card.ability = secret_card.config secret_card.ability = secret_card.config
local target = { local target = {
type = "descriptions", type = "descriptions",
@ -1359,8 +1355,8 @@ local jawbreaker = {
not Card.no(G.jokers.cards[i - 1], "immune_to_chemach", true) not Card.no(G.jokers.cards[i - 1], "immune_to_chemach", true)
and not Card.no(G.jokers.cards[i - 1], "immutable", true) and not Card.no(G.jokers.cards[i - 1], "immutable", true)
then then
cry_with_deck_effects(G.jokers.cards[i - 1], function(card) Cryptid.with_deck_effects(G.jokers.cards[i - 1], function(card)
cry_misprintize(card, { min = 2, max = 2 }, nil, true) Cryptid.misprintize(card, { min = 2, max = 2 }, nil, true)
end) end)
end end
end end
@ -1369,8 +1365,8 @@ local jawbreaker = {
not Card.no(G.jokers.cards[i + 1], "immune_to_chemach", true) not Card.no(G.jokers.cards[i + 1], "immune_to_chemach", true)
and not Card.no(G.jokers.cards[i + 1], "immutable", true) and not Card.no(G.jokers.cards[i + 1], "immutable", true)
then then
cry_with_deck_effects(G.jokers.cards[i + 1], function(card) Cryptid.with_deck_effects(G.jokers.cards[i + 1], function(card)
cry_misprintize(card, { min = 2, max = 2 }, nil, true) Cryptid.misprintize(card, { min = 2, max = 2 }, nil, true)
end) end)
end end
end end

View file

@ -1,4 +1,15 @@
local cat = { local cat = {
cry_credits = {
idea = {
"Catman",
},
art = {
"5381",
},
code = {
"Math",
},
},
object_type = "Tag", object_type = "Tag",
dependencies = { dependencies = {
items = { items = {
@ -7,11 +18,26 @@ local cat = {
}, },
atlas = "tag_cry", atlas = "tag_cry",
pos = { x = 0, y = 2 }, pos = { x = 0, y = 2 },
config = { level = 1 },
key = "cat", key = "cat",
name = "cry-Cat Tag", name = "cry-Cat Tag",
order = 12, order = 12,
loc_vars = function(self, info_queue, tag)
return { vars = { tag.ability.level or 1 } }
end,
} }
local epic_tag = { local epic_tag = {
cry_credits = {
idea = {
"Jevonn",
},
art = {
"Math",
},
code = {
"Math",
},
},
object_type = "Tag", object_type = "Tag",
dependencies = { dependencies = {
items = { items = {
@ -56,6 +82,17 @@ local epic_tag = {
end, end,
} }
local schematic = { local schematic = {
cry_credits = {
idea = {
"Jevonn",
},
art = {
"Jevonn",
},
code = {
"Jevonn",
},
},
object_type = "Tag", object_type = "Tag",
dependencies = { dependencies = {
items = { items = {
@ -103,6 +140,18 @@ local schematic = {
end, end,
} }
local empoweredPack = { local empoweredPack = {
cry_credits = {
idea = {
"Mystic Misclick",
"Mjiojio",
},
art = {
"Jevonn",
},
code = {
"Math",
},
},
object_type = "Booster", object_type = "Booster",
dependencies = { dependencies = {
items = { items = {
@ -145,15 +194,49 @@ local empoweredPack = {
G.booster_pack_sparkles:fade(1, 0) G.booster_pack_sparkles:fade(1, 0)
end, end,
create_card = function(self, card, i) create_card = function(self, card, i)
if i % 2 == 1 and Cryptid.enabled["Exotic Jokers"] then if
i % 2 == 1
and Cryptid.enabled("c_cry_gateway") == true
and not G.GAME.used_jokers["c_cry_gateway"]
and not next(find_joker("Showman"))
then
return create_card("Spectral", G.pack_cards, nil, nil, true, true, "c_cry_gateway") return create_card("Spectral", G.pack_cards, nil, nil, true, true, "c_cry_gateway")
else elseif not G.GAME.used_jokers["c_soul"] and not next(find_joker("Showman")) then
return create_card("Spectral", G.pack_cards, nil, nil, true, true, "c_soul") return create_card("Spectral", G.pack_cards, nil, nil, true, true, "c_soul")
else
return create_card("Spectral", G.pack_cards, nil, nil, true, true)
end end
end, end,
group_key = "k_spectral_pack", group_key = "k_spectral_pack",
cry_digital_hallucinations = {
colour = G.C.SECONDARY_SET.Spectral,
loc_key = "k_plus_spectral",
create = function()
local ccard
if pseudorandom(pseudoseed("diha")) < 0.5 then
ccard = create_card("Spectral", G.consumeables, nil, nil, true, true, "c_soul")
else
ccard = create_card("Spectral", G.consumeables, nil, nil, true, true, "c_cry_gateway")
end
ccard:set_edition({ negative = true }, true)
ccard:add_to_deck()
G.consumeables:emplace(ccard)
end,
},
} }
local empowered = { local empowered = {
cry_credits = {
idea = {
"Mystic Misclick",
"Mjiojio",
},
art = {
"5381",
},
code = {
"Math",
},
},
object_type = "Tag", object_type = "Tag",
dependencies = { dependencies = {
items = { items = {
@ -171,7 +254,7 @@ local empowered = {
loc_vars = function(self, info_queue) loc_vars = function(self, info_queue)
info_queue[#info_queue + 1] = G.P_CENTERS.p_spectral_normal_1 info_queue[#info_queue + 1] = G.P_CENTERS.p_spectral_normal_1
info_queue[#info_queue + 1] = { set = "Spectral", key = "c_soul" } info_queue[#info_queue + 1] = { set = "Spectral", key = "c_soul" }
if Cryptid.enabled["Exotic Jokers"] then if Cryptid.enabled("c_cry_gateway") then
info_queue[#info_queue + 1] = { set = "Spectral", key = "c_cry_gateway" } info_queue[#info_queue + 1] = { set = "Spectral", key = "c_cry_gateway" }
end end
return { vars = {} } return { vars = {} }
@ -197,7 +280,7 @@ local empowered = {
if G.GAME.modifiers.cry_force_edition and not G.GAME.modifiers.cry_force_random_edition then if G.GAME.modifiers.cry_force_edition and not G.GAME.modifiers.cry_force_random_edition then
card:set_edition(nil, true, true) card:set_edition(nil, true, true)
elseif G.GAME.modifiers.cry_force_random_edition then elseif G.GAME.modifiers.cry_force_random_edition then
local edition = cry_poll_random_edition() local edition = Cryptid.poll_random_edition()
card:set_edition(edition, true, true) card:set_edition(edition, true, true)
end end
card:start_materialize() card:start_materialize()
@ -213,6 +296,17 @@ local empowered = {
end, end,
} }
local gambler = { local gambler = {
cry_credits = {
idea = {
"Catman",
},
art = {
"SpoofyGuy",
},
code = {
"Math",
},
},
object_type = "Tag", object_type = "Tag",
dependencies = { dependencies = {
items = { items = {
@ -224,7 +318,7 @@ local gambler = {
order = 13, order = 13,
atlas = "tag_cry", atlas = "tag_cry",
pos = { x = 2, y = 0 }, pos = { x = 2, y = 0 },
config = { type = "immediate", odds = 4 }, config = { type = "new_blind_choice", odds = 4 },
min_ante = 2, min_ante = 2,
key = "gambler", key = "gambler",
loc_vars = function(self, info_queue) loc_vars = function(self, info_queue)
@ -232,18 +326,31 @@ local gambler = {
return { vars = { G.GAME.probabilities.normal or 1, self.config.odds } } return { vars = { G.GAME.probabilities.normal or 1, self.config.odds } }
end, end,
apply = function(self, tag, context) apply = function(self, tag, context)
if context.type == "immediate" then if context.type == "new_blind_choice" then
if pseudorandom("cry_gambler_tag") < G.GAME.probabilities.normal / tag.config.odds then if pseudorandom("cry_gambler_tag") < G.GAME.probabilities.normal / tag.config.odds then
local lock = tag.ID local lock = tag.ID
G.CONTROLLER.locks[lock] = true G.CONTROLLER.locks[lock] = true
tag:yep("+", G.C.SECONDARY_SET.Spectral, function() tag:yep("+", G.C.SECONDARY_SET.Spectral, function()
local tag = Tag("tag_cry_empowered") local emp = Tag("tag_cry_empowered")
add_tag(tag) if tag.ability.shiny then -- good fucking luck
emp.ability.shiny = cry_rollshinybool()
end
add_tag(emp)
tag.triggered = true
emp:apply_to_run({ type = "new_blind_choice" })
G.CONTROLLER.locks[lock] = nil G.CONTROLLER.locks[lock] = nil
return true return true
end) end)
else else
tag:nope() tag:nope()
tag.triggered = true
for i = 1, #G.GAME.tags do
if G.GAME.tags[i] ~= tag then
if G.GAME.tags[i]:apply_to_run({ type = "new_blind_choice" }) then
break
end
end
end
end end
tag.triggered = true tag.triggered = true
return true return true
@ -251,6 +358,17 @@ local gambler = {
end, end,
} }
local bundle = { local bundle = {
cry_credits = {
idea = {
"Mystic Misclick",
},
art = {
"5381",
},
code = {
"Math",
},
},
object_type = "Tag", object_type = "Tag",
dependencies = { dependencies = {
items = { items = {
@ -261,7 +379,7 @@ local bundle = {
order = 16, order = 16,
atlas = "tag_cry", atlas = "tag_cry",
pos = { x = 0, y = 0 }, pos = { x = 0, y = 0 },
config = { type = "immediate" }, config = { type = "new_blind_choice" },
key = "bundle", key = "bundle",
min_ante = 2, min_ante = 2,
loc_vars = function(self, info_queue) loc_vars = function(self, info_queue)
@ -272,14 +390,20 @@ local bundle = {
return { vars = {} } return { vars = {} }
end, end,
apply = function(self, tag, context) apply = function(self, tag, context)
if context.type == "immediate" then if context.type == "new_blind_choice" then
local lock = tag.ID local lock = tag.ID
G.CONTROLLER.locks[lock] = true G.CONTROLLER.locks[lock] = true
tag:yep("+", G.C.ATTENTION, function() tag:yep("+", G.C.ATTENTION, function()
add_tag(Tag("tag_standard")) local tags = { "standard", "charm", "meteor", "buffoon" }
add_tag(Tag("tag_charm")) for i, v in ipairs(tags) do
add_tag(Tag("tag_meteor")) local _tag = Tag("tag_" .. v)
add_tag(Tag("tag_buffoon")) _tag.ability.shiny = cry_rollshinybool()
add_tag(_tag)
if i == 1 then
tag.triggered = true
_tag:apply_to_run({ type = "new_blind_choice" })
end
end
G.CONTROLLER.locks[lock] = nil G.CONTROLLER.locks[lock] = nil
return true return true
end) end)
@ -289,6 +413,17 @@ local bundle = {
end, end,
} }
local memory = { local memory = {
cry_credits = {
idea = {
"y_not_tony",
},
art = {
"5381",
},
code = {
"Math",
},
},
object_type = "Tag", object_type = "Tag",
dependencies = { dependencies = {
items = { items = {
@ -351,6 +486,17 @@ local memory = {
end, end,
} }
local glitched_tag = { local glitched_tag = {
cry_credits = {
idea = {
"Jevonn",
},
art = {
"Jevonn",
},
code = {
"Jevonn",
},
},
object_type = "Tag", object_type = "Tag",
dependencies = { dependencies = {
items = { items = {
@ -373,6 +519,9 @@ local glitched_tag = {
apply = function(self, tag, context) apply = function(self, tag, context)
if context.type == "store_joker_modify" then if context.type == "store_joker_modify" then
local _applied = nil local _applied = nil
if Cryptid.forced_edition() then
tag:nope()
end
if not context.card.edition and not context.card.temp_edition and context.card.ability.set == "Joker" then if not context.card.edition and not context.card.temp_edition and context.card.ability.set == "Joker" then
local lock = tag.ID local lock = tag.ID
G.CONTROLLER.locks[lock] = true G.CONTROLLER.locks[lock] = true
@ -392,6 +541,17 @@ local glitched_tag = {
end, end,
} }
local oversat_tag = { local oversat_tag = {
cry_credits = {
idea = {
"Jevonn",
},
art = {
"Jevonn",
},
code = {
"Jevonn",
},
},
object_type = "Tag", object_type = "Tag",
dependencies = { dependencies = {
items = { items = {
@ -414,6 +574,9 @@ local oversat_tag = {
apply = function(self, tag, context) apply = function(self, tag, context)
if context.type == "store_joker_modify" then if context.type == "store_joker_modify" then
local _applied = nil local _applied = nil
if Cryptid.forced_edition() then
tag:nope()
end
if not context.card.edition and not context.card.temp_edition and context.card.ability.set == "Joker" then if not context.card.edition and not context.card.temp_edition and context.card.ability.set == "Joker" then
local lock = tag.ID local lock = tag.ID
G.CONTROLLER.locks[lock] = true G.CONTROLLER.locks[lock] = true
@ -433,6 +596,17 @@ local oversat_tag = {
end, end,
} }
local mosaic_tag = { local mosaic_tag = {
cry_credits = {
idea = {
"Jevonn",
},
art = {
"Jevonn",
},
code = {
"Jevonn",
},
},
object_type = "Tag", object_type = "Tag",
dependencies = { dependencies = {
items = { items = {
@ -455,6 +629,9 @@ local mosaic_tag = {
apply = function(self, tag, context) apply = function(self, tag, context)
if context.type == "store_joker_modify" then if context.type == "store_joker_modify" then
local _applied = nil local _applied = nil
if Cryptid.forced_edition() then
tag:nope()
end
if not context.card.edition and not context.card.temp_edition and context.card.ability.set == "Joker" then if not context.card.edition and not context.card.temp_edition and context.card.ability.set == "Joker" then
local lock = tag.ID local lock = tag.ID
G.CONTROLLER.locks[lock] = true G.CONTROLLER.locks[lock] = true
@ -474,6 +651,17 @@ local mosaic_tag = {
end, end,
} }
local gold_tag = { local gold_tag = {
cry_credits = {
idea = {
"Jevonn",
},
art = {
"Jevonn",
},
code = {
"Jevonn",
},
},
object_type = "Tag", object_type = "Tag",
dependencies = { dependencies = {
items = { items = {
@ -496,6 +684,9 @@ local gold_tag = {
apply = function(self, tag, context) apply = function(self, tag, context)
if context.type == "store_joker_modify" then if context.type == "store_joker_modify" then
local _applied = nil local _applied = nil
if Cryptid.forced_edition() then
tag:nope()
end
if not context.card.edition and not context.card.temp_edition and context.card.ability.set == "Joker" then if not context.card.edition and not context.card.temp_edition and context.card.ability.set == "Joker" then
local lock = tag.ID local lock = tag.ID
G.CONTROLLER.locks[lock] = true G.CONTROLLER.locks[lock] = true
@ -515,6 +706,17 @@ local gold_tag = {
end, end,
} }
local glass_tag = { local glass_tag = {
cry_credits = {
idea = {
"Jevonn",
},
art = {
"Jevonn",
},
code = {
"Jevonn",
},
},
object_type = "Tag", object_type = "Tag",
dependencies = { dependencies = {
items = { items = {
@ -537,6 +739,9 @@ local glass_tag = {
apply = function(self, tag, context) apply = function(self, tag, context)
if context.type == "store_joker_modify" then if context.type == "store_joker_modify" then
local _applied = nil local _applied = nil
if Cryptid.forced_edition() then
tag:nope()
end
if not context.card.edition and not context.card.temp_edition and context.card.ability.set == "Joker" then if not context.card.edition and not context.card.temp_edition and context.card.ability.set == "Joker" then
local lock = tag.ID local lock = tag.ID
G.CONTROLLER.locks[lock] = true G.CONTROLLER.locks[lock] = true
@ -556,6 +761,17 @@ local glass_tag = {
end, end,
} }
local blur_tag = { local blur_tag = {
cry_credits = {
idea = {
"Jevonn",
},
art = {
"Jevonn",
},
code = {
"Jevonn",
},
},
object_type = "Tag", object_type = "Tag",
dependencies = { dependencies = {
items = { items = {
@ -578,6 +794,9 @@ local blur_tag = {
apply = function(self, tag, context) apply = function(self, tag, context)
if context.type == "store_joker_modify" then if context.type == "store_joker_modify" then
local _applied = nil local _applied = nil
if Cryptid.forced_edition() then
tag:nope()
end
if not context.card.edition and not context.card.temp_edition and context.card.ability.set == "Joker" then if not context.card.edition and not context.card.temp_edition and context.card.ability.set == "Joker" then
local lock = tag.ID local lock = tag.ID
G.CONTROLLER.locks[lock] = true G.CONTROLLER.locks[lock] = true
@ -598,6 +817,17 @@ local blur_tag = {
} }
--order 8 reserved for Noisy tag (if it ever has a shader / comes into existence) --order 8 reserved for Noisy tag (if it ever has a shader / comes into existence)
local astral_tag = { local astral_tag = {
cry_credits = {
idea = {
"Jevonn",
},
art = {
"Jevonn",
},
code = {
"Jevonn",
},
},
object_type = "Tag", object_type = "Tag",
dependencies = { dependencies = {
items = { items = {
@ -620,6 +850,9 @@ local astral_tag = {
apply = function(self, tag, context) apply = function(self, tag, context)
if context.type == "store_joker_modify" then if context.type == "store_joker_modify" then
local _applied = nil local _applied = nil
if Cryptid.forced_edition() then
tag:nope()
end
if not context.card.edition and not context.card.temp_edition and context.card.ability.set == "Joker" then if not context.card.edition and not context.card.temp_edition and context.card.ability.set == "Joker" then
local lock = tag.ID local lock = tag.ID
G.CONTROLLER.locks[lock] = true G.CONTROLLER.locks[lock] = true
@ -639,6 +872,17 @@ local astral_tag = {
end, end,
} }
local m_tag = { local m_tag = {
cry_credits = {
idea = {
"Jevonn",
},
art = {
"Jevonn",
},
code = {
"Jevonn",
},
},
object_type = "Tag", object_type = "Tag",
dependencies = { dependencies = {
items = { items = {
@ -661,6 +905,9 @@ local m_tag = {
apply = function(self, tag, context) apply = function(self, tag, context)
if context.type == "store_joker_modify" then if context.type == "store_joker_modify" then
local _applied = nil local _applied = nil
if Cryptid.forced_edition() then
tag:nope()
end
if not context.card.edition and not context.card.temp_edition and context.card.ability.set == "Joker" then if not context.card.edition and not context.card.temp_edition and context.card.ability.set == "Joker" then
local lock = tag.ID local lock = tag.ID
G.CONTROLLER.locks[lock] = true G.CONTROLLER.locks[lock] = true
@ -680,6 +927,17 @@ local m_tag = {
end, end,
} }
local double_m_tag = { local double_m_tag = {
cry_credits = {
idea = {
"Jevonn",
},
art = {
"Jevonn",
},
code = {
"Jevonn",
},
},
object_type = "Tag", object_type = "Tag",
dependencies = { dependencies = {
items = { items = {
@ -702,21 +960,7 @@ local double_m_tag = {
apply = function(self, tag, context) apply = function(self, tag, context)
if context.type == "store_joker_create" then if context.type == "store_joker_create" then
local card local card
local option = {} card = create_card("M", context.area, nil, nil, nil, nil, nil, pseudoseed("M_is_love_M_is_life"))
for k, _ in pairs(Cryptid.M_jokers) do
if G.P_CENTERS[k] then
option[#option + 1] = k
end
end
card = create_card(
"Joker",
context.area,
nil,
nil,
nil,
nil,
pseudorandom_element(option, pseudoseed("M_is_love_M_is_life"))
)
card:set_edition({ card:set_edition({
cry_m = true, cry_m = true,
}) })
@ -737,6 +981,17 @@ local double_m_tag = {
end, end,
} }
local banana = { local banana = {
cry_credits = {
idea = {
"Jevonn",
},
art = {
"Jevonn",
},
code = {
"Jevonn",
},
},
object_type = "Tag", object_type = "Tag",
dependencies = { dependencies = {
items = { items = {
@ -806,6 +1061,17 @@ local banana = {
end, end,
} }
local scope = { local scope = {
cry_credits = {
idea = {
"Jevonn",
},
art = {
"Jevonn",
},
code = {
"Jevonn",
},
},
object_type = "Tag", object_type = "Tag",
dependencies = { dependencies = {
items = { items = {
@ -835,6 +1101,17 @@ local scope = {
end, end,
} }
local loss = { local loss = {
cry_credits = {
idea = {
"Jevonn",
},
art = {
"Jevonn",
},
code = {
"Jevonn",
},
},
object_type = "Tag", object_type = "Tag",
dependencies = { dependencies = {
items = { items = {
@ -874,7 +1151,7 @@ local loss = {
if G.GAME.modifiers.cry_force_edition and not G.GAME.modifiers.cry_force_random_edition then if G.GAME.modifiers.cry_force_edition and not G.GAME.modifiers.cry_force_random_edition then
card:set_edition(nil, true, true) card:set_edition(nil, true, true)
elseif G.GAME.modifiers.cry_force_random_edition then elseif G.GAME.modifiers.cry_force_random_edition then
local edition = cry_poll_random_edition() local edition = Cryptid.poll_random_edition()
card:set_edition(edition, true, true) card:set_edition(edition, true, true)
end end
card:start_materialize() card:start_materialize()
@ -887,6 +1164,17 @@ local loss = {
end, end,
} }
local gourmand = { local gourmand = {
cry_credits = {
idea = {
"Personthateatcheese",
},
art = {
"Personthateatcheese",
},
code = {
"Jevonn",
},
},
object_type = "Tag", object_type = "Tag",
dependencies = { dependencies = {
items = { items = {
@ -920,6 +1208,17 @@ local gourmand = {
end, end,
} }
local better_top_up = { local better_top_up = {
cry_credits = {
idea = {
"Mjiojio",
},
art = {
"Jevonn",
},
code = {
"Jevonn",
},
},
object_type = "Tag", object_type = "Tag",
dependencies = { dependencies = {
items = { items = {
@ -961,6 +1260,17 @@ local better_top_up = {
end, end,
} }
local better_voucher = { local better_voucher = {
cry_credits = {
idea = {
"Mystic Misclick",
},
art = {
"Mystic Misclick",
},
code = {
"Jevonn",
},
},
object_type = "Tag", object_type = "Tag",
dependencies = { dependencies = {
items = { items = {
@ -982,7 +1292,7 @@ local better_voucher = {
if context.type == "voucher_add" then if context.type == "voucher_add" then
tag:yep("+", G.C.SECONDARY_SET.Voucher, function() tag:yep("+", G.C.SECONDARY_SET.Voucher, function()
G.ARGS.voucher_tag = G.ARGS.voucher_tag or {} G.ARGS.voucher_tag = G.ARGS.voucher_tag or {}
local voucher_key = get_next_megavoucher_key(true) local voucher_key = Cryptid.next_tier3_key(true)
G.ARGS.voucher_tag[voucher_key] = true G.ARGS.voucher_tag[voucher_key] = true
G.shop_vouchers.config.card_limit = G.shop_vouchers.config.card_limit + 1 G.shop_vouchers.config.card_limit = G.shop_vouchers.config.card_limit + 1
local card = Card( local card = Card(
@ -994,13 +1304,13 @@ local better_voucher = {
G.P_CENTERS[voucher_key], G.P_CENTERS[voucher_key],
{ bypass_discovery_center = true, bypass_discovery_ui = true } { bypass_discovery_center = true, bypass_discovery_ui = true }
) )
cry_misprintize(card) Cryptid.misprintize(card)
create_shop_card_ui(card, "Voucher", G.shop_vouchers) create_shop_card_ui(card, "Voucher", G.shop_vouchers)
card:start_materialize() card:start_materialize()
if G.GAME.modifiers.cry_force_edition and not G.GAME.modifiers.cry_force_random_edition then if G.GAME.modifiers.cry_force_edition and not G.GAME.modifiers.cry_force_random_edition then
card:set_edition(nil, true) card:set_edition(nil, true)
elseif G.GAME.modifiers.cry_force_random_edition then elseif G.GAME.modifiers.cry_force_random_edition then
local edition = cry_poll_random_edition() local edition = Cryptid.poll_random_edition()
card:set_edition(edition, true) card:set_edition(edition, true)
end end
@ -1038,6 +1348,17 @@ local better_voucher = {
end, end,
} }
local booster = { local booster = {
cry_credits = {
idea = {
"Watermelon Lover",
},
art = {
"Maw",
},
code = {
"Jevonn",
},
},
object_type = "Tag", object_type = "Tag",
dependencies = { dependencies = {
items = { items = {
@ -1059,7 +1380,7 @@ local booster = {
local lock = tag.ID local lock = tag.ID
G.CONTROLLER.locks[lock] = true G.CONTROLLER.locks[lock] = true
tag:yep("+", G.C.BLUE, function() tag:yep("+", G.C.BLUE, function()
G.GAME.boostertag = true G.GAME.boostertag = (G.GAME.boostertag or 0) + 1
G.CONTROLLER.locks[lock] = nil G.CONTROLLER.locks[lock] = nil
return true return true
end) end)

View file

@ -119,7 +119,7 @@ local test3 = {
}, },
}, },
loc_vars = function(self, info_queue, card) loc_vars = function(self, info_queue, card)
local a, b, c, d, e = cry_get_enchanced_deck_info() local a, b, c, d, e = Cryptid.enhanced_deck_info()
return { vars = { a, b, c, d, e } } return { vars = { a, b, c, d, e } }
end, end,
cry_credits = { cry_credits = {

View file

@ -6,6 +6,18 @@ local voucher_atlas = {
py = 95, py = 95,
} }
local copies = { --Double tags become Triple Tags and are 2X as common local copies = { --Double tags become Triple Tags and are 2X as common
cry_credits = {
idea = {
"Catman",
"Mystic Misclick",
},
art = {
"Mystic Misclick",
},
code = {
"Math",
},
},
object_type = "Voucher", object_type = "Voucher",
dependencies = { dependencies = {
items = { items = {
@ -43,6 +55,18 @@ local copies = { --Double tags become Triple Tags and are 2X as common
end, end,
} }
local tag_printer = { --Double tags become Quadruple Tags and are 3X as common local tag_printer = { --Double tags become Quadruple Tags and are 3X as common
cry_credits = {
idea = {
"Catman",
"Mystic Misclick",
},
art = {
"Mystic Misclick",
},
code = {
"Math",
},
},
object_type = "Voucher", object_type = "Voucher",
dependencies = { dependencies = {
items = { items = {
@ -63,6 +87,18 @@ local tag_printer = { --Double tags become Quadruple Tags and are 3X as common
requires = { "v_cry_copies" }, requires = { "v_cry_copies" },
} }
local clone_machine = { --Double tags become Quintuple Tags and are 4X as common local clone_machine = { --Double tags become Quintuple Tags and are 4X as common
cry_credits = {
idea = {
"Catman",
"Mystic Misclick",
},
art = {
"Linus Goof Balls",
},
code = {
"Math",
},
},
object_type = "Voucher", object_type = "Voucher",
dependencies = { dependencies = {
items = { items = {
@ -85,6 +121,17 @@ local clone_machine = { --Double tags become Quintuple Tags and are 4X as common
requires = { "v_cry_tag_printer" }, requires = { "v_cry_tag_printer" },
} }
local command_prompt = { --Code cards can appear in the shop local command_prompt = { --Code cards can appear in the shop
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Mathguy",
},
},
object_type = "Voucher", object_type = "Voucher",
dependencies = { dependencies = {
items = { items = {
@ -117,6 +164,17 @@ local command_prompt = { --Code cards can appear in the shop
end, end,
} }
local satellite_uplink = { --Code cards may appear in any of the Celestial Packs local satellite_uplink = { --Code cards may appear in any of the Celestial Packs
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Mathguy",
},
},
object_type = "Voucher", object_type = "Voucher",
dependencies = { dependencies = {
items = { items = {
@ -135,6 +193,17 @@ local satellite_uplink = { --Code cards may appear in any of the Celestial Packs
requires = { "v_cry_command_prompt" }, requires = { "v_cry_command_prompt" },
} }
local quantum_computing = { --Code cards can spawn with Negative addition local quantum_computing = { --Code cards can spawn with Negative addition
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"Mathguy",
},
},
object_type = "Voucher", object_type = "Voucher",
dependencies = { dependencies = {
items = { items = {
@ -167,13 +236,19 @@ local pairing = { --Retrigger all M Jokers if played hand is a Pair
order = 5, order = 5,
pos = { x = 4, y = 5 }, pos = { x = 4, y = 5 },
cry_credits = { cry_credits = {
art = {
"lolxddj",
},
code = {
"Math",
},
jolly = { jolly = {
"Jolly Open Winner", "Jolly Open Winner",
"Xaltios", "Xaltios",
}, },
}, },
in_pool = function(self) in_pool = function(self)
local mcheck = get_m_jokers() local mcheck = Cryptid.get_m_jokers()
if mcheck > 0 then if mcheck > 0 then
return true return true
end end
@ -195,13 +270,19 @@ local repair_man = { --Retrigger all M Jokers if played hand contains a pair
pos = { x = 5, y = 5 }, pos = { x = 5, y = 5 },
requires = { "v_cry_pairing" }, requires = { "v_cry_pairing" },
cry_credits = { cry_credits = {
art = {
"lolxddj",
},
code = {
"Math",
},
jolly = { jolly = {
"Jolly Open Winner", "Jolly Open Winner",
"Xaltios", "Xaltios",
}, },
}, },
in_pool = function(self) in_pool = function(self)
local mcheck = get_m_jokers() local mcheck = Cryptid.get_m_jokers()
if mcheck > 0 then if mcheck > 0 then
return true return true
end end
@ -225,13 +306,19 @@ local pairamount_plus = { --Retrigger all M Jokers once for every pair contained
requires = { "v_cry_repair_man" }, requires = { "v_cry_repair_man" },
pools = { ["Tier3"] = true }, pools = { ["Tier3"] = true },
cry_credits = { cry_credits = {
art = {
"lolxddj",
},
code = {
"Math",
},
jolly = { jolly = {
"Jolly Open Winner", "Jolly Open Winner",
"Xaltios", "Xaltios",
}, },
}, },
in_pool = function(self) in_pool = function(self)
local mcheck = get_m_jokers() local mcheck = Cryptid.get_m_jokers()
if mcheck > 0 then if mcheck > 0 then
return true return true
end end
@ -254,6 +341,12 @@ local double_vision = { --Double-Sided cards appear 4x more frequently
info_queue[#info_queue + 1] = G.P_CENTERS.e_cry_double_sided info_queue[#info_queue + 1] = G.P_CENTERS.e_cry_double_sided
end, end,
cry_credits = { cry_credits = {
art = {
"Linus Goof Balls",
},
code = {
"Math",
},
jolly = { jolly = {
"Jolly Open Winner", "Jolly Open Winner",
"Axolotolus", "Axolotolus",
@ -279,6 +372,12 @@ local double_slit = { --Meld can appear in the shop and Arcana Packs
info_queue[#info_queue + 1] = G.P_CENTERS.c_cry_meld info_queue[#info_queue + 1] = G.P_CENTERS.c_cry_meld
end, end,
cry_credits = { cry_credits = {
art = {
"Linus Goof Balls",
},
code = {
"Math",
},
jolly = { jolly = {
"Jolly Open Winner", "Jolly Open Winner",
"Axolotolus", "Axolotolus",
@ -305,6 +404,12 @@ local double_down = { --After every round, X1.5 to all values on the back of Dou
info_queue[#info_queue + 1] = G.P_CENTERS.e_cry_double_sided info_queue[#info_queue + 1] = G.P_CENTERS.e_cry_double_sided
end, end,
cry_credits = { cry_credits = {
art = {
"Linus Goof Balls",
},
code = {
"Math",
},
jolly = { jolly = {
"Jolly Open Winner", "Jolly Open Winner",
"Axolotolus", "Axolotolus",
@ -312,6 +417,17 @@ local double_down = { --After every round, X1.5 to all values on the back of Dou
}, },
} }
local overstock_multi = { --+1 card slot[s], +1 booster pack slot[s] and +1 voucher slot[s] available in the shop local overstock_multi = { --+1 card slot[s], +1 booster pack slot[s] and +1 voucher slot[s] available in the shop
cry_credits = {
idea = {
"Frix",
},
art = {
"HexaCryonic",
},
code = {
"Jevonn",
},
},
object_type = "Voucher", object_type = "Voucher",
dependencies = { dependencies = {
items = { items = {
@ -329,35 +445,42 @@ local overstock_multi = { --+1 card slot[s], +1 booster pack slot[s] and +1 vouc
return { vars = { (card and card.ability.extra or self.config.extra) } } return { vars = { (card and card.ability.extra or self.config.extra) } }
end, end,
redeem = function(self, card) redeem = function(self, card)
if not G.GAME.modifiers.cry_booster_packs then local mod = math.floor(card and card.ability.extra or self.config.extra)
G.GAME.modifiers.cry_booster_packs = 2 SMODS.change_booster_limit(mod)
end
G.GAME.modifiers.cry_booster_packs = G.GAME.modifiers.cry_booster_packs
+ math.floor(card and card.ability.extra or self.config.extra) --Booster slots
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
func = function() --card slot func = function() --card slot
change_shop_size(math.floor(card and card.ability.extra or self.config.extra)) -- why is this in an event?
change_shop_size(mod)
return true return true
end, end,
})) }))
cry_bonusvouchermod(math.floor(card and card.ability.extra or self.config.extra)) SMODS.change_voucher_limit(mod)
end, end,
unredeem = function(self, card) unredeem = function(self, card)
if not G.GAME.modifiers.cry_booster_packs then local mod = math.floor(card and card.ability.extra or self.config.extra)
G.GAME.modifiers.cry_booster_packs = 2 SMODS.change_booster_limit(-mod)
end
G.GAME.modifiers.cry_booster_packs = G.GAME.modifiers.cry_booster_packs
- math.floor(card and card.ability.extra or self.config.extra) --Booster slots
G.E_MANAGER:add_event(Event({ G.E_MANAGER:add_event(Event({
func = function() --card slot func = function() --card slot
change_shop_size(-1 * math.floor(card and card.ability.extra or self.config.extra)) -- why is this in an event?
change_shop_size(-mod)
return true return true
end, end,
})) }))
cry_bonusvouchermod(-1 * math.floor(card and card.ability.extra or self.config.extra)) SMODS.change_voucher_limit(-mod)
end, end,
} }
local massproduct = { --All cards and packs in the shop cost $1 local massproduct = { --All cards and packs in the shop cost $1
cry_credits = {
idea = {
"Frix",
},
art = {
"Ein13",
},
code = {
"Jevonn",
},
},
object_type = "Voucher", object_type = "Voucher",
dependencies = { dependencies = {
items = { items = {
@ -399,6 +522,17 @@ local massproduct = { --All cards and packs in the shop cost $1
end, end,
} }
local curate = { --All cards appear with an Edition local curate = { --All cards appear with an Edition
cry_credits = {
idea = {
"Frix",
},
art = {
"Linus Goof Balls",
},
code = {
"Math",
},
},
object_type = "Voucher", object_type = "Voucher",
dependencies = { dependencies = {
items = { items = {
@ -423,6 +557,17 @@ local curate = { --All cards appear with an Edition
end, end,
} }
local rerollexchange = { --All rerolls cost $2 local rerollexchange = { --All rerolls cost $2
cry_credits = {
idea = {
"Project666",
},
art = {
"Linus Goof Balls",
},
code = {
"Jevonn",
},
},
object_type = "Voucher", object_type = "Voucher",
dependencies = { dependencies = {
items = { items = {
@ -471,6 +616,17 @@ local scope = { --Also unimplemented
pools = { ["Tier3"] = true }, pools = { ["Tier3"] = true },
} }
local dexterity = { --Permanently gain +2 hand[s] each round local dexterity = { --Permanently gain +2 hand[s] each round
cry_credits = {
idea = {
"Frix",
},
art = {
"Linus Goof Balls",
},
code = {
"Jevonn",
},
},
object_type = "Voucher", object_type = "Voucher",
dependencies = { dependencies = {
items = { items = {
@ -497,6 +653,17 @@ local dexterity = { --Permanently gain +2 hand[s] each round
end, end,
} }
local threers = { --Permanently gain +2 discard[s] each round local threers = { --Permanently gain +2 discard[s] each round
cry_credits = {
idea = {
"Frix",
},
art = {
"jenwalter666",
},
code = {
"Jevonn",
},
},
object_type = "Voucher", object_type = "Voucher",
dependencies = { dependencies = {
items = { items = {
@ -523,6 +690,18 @@ local threers = { --Permanently gain +2 discard[s] each round
end, end,
} }
local tacclimator = { --Tarot cards appear X6 more frequently in the shop All future Tarot cards are free local tacclimator = { --Tarot cards appear X6 more frequently in the shop All future Tarot cards are free
cry_credits = {
idea = {
"Frix",
},
art = {
"jenwalter666",
},
code = {
"Jevonn",
"Toneblock",
},
},
object_type = "Voucher", object_type = "Voucher",
dependencies = { dependencies = {
items = { items = {
@ -557,6 +736,18 @@ local tacclimator = { --Tarot cards appear X6 more frequently in the shop All
end, end,
} }
local pacclimator = { --Planet cards appear X6 more frequently in the shop All future Planet cards are free local pacclimator = { --Planet cards appear X6 more frequently in the shop All future Planet cards are free
cry_credits = {
idea = {
"Frix",
},
art = {
"jenwalter666",
},
code = {
"Jevonn",
"Toneblock",
},
},
object_type = "Voucher", object_type = "Voucher",
dependencies = { dependencies = {
items = { items = {
@ -591,6 +782,17 @@ local pacclimator = { --Planet cards appear X6 more frequently in the shop All
end, end,
} }
local moneybean = { --Raise the cap on interest earned in each round to $2.0e299 local moneybean = { --Raise the cap on interest earned in each round to $2.0e299
cry_credits = {
idea = {
"Frix",
},
art = {
"Watermelon lover",
},
code = {
"Jevonn",
},
},
object_type = "Voucher", object_type = "Voucher",
dependencies = { dependencies = {
items = { items = {
@ -629,6 +831,17 @@ local moneybean = { --Raise the cap on interest earned in each round to $2.0e299
end, end,
} }
local fabric = { --+2 Joker slot[s] local fabric = { --+2 Joker slot[s]
cry_credits = {
idea = {
"Frix",
},
art = {
"Linus Goof Balls",
},
code = {
"Jevonn",
},
},
object_type = "Voucher", object_type = "Voucher",
dependencies = { dependencies = {
items = { items = {
@ -685,6 +898,17 @@ local fabric = { --+2 Joker slot[s]
} }
--Order 87 reserved for Fake-out (unimplemented) --Order 87 reserved for Fake-out (unimplemented)
local asteroglyph = { --Set Ante to 0 local asteroglyph = { --Set Ante to 0
cry_credits = {
idea = {
"Frix",
},
art = {
"Hat Stack",
},
code = {
"jenwalter666",
},
},
object_type = "Voucher", object_type = "Voucher",
dependencies = { dependencies = {
items = { items = {
@ -698,10 +922,10 @@ local asteroglyph = { --Set Ante to 0
requires = { "v_petroglyph" }, requires = { "v_petroglyph" },
pools = { ["Tier3"] = true }, pools = { ["Tier3"] = true },
loc_vars = function(self, info_queue) loc_vars = function(self, info_queue)
return { vars = { asteroglyph_ante() } } return { vars = { Cryptid.asteroglyph_ante() } }
end, end,
redeem = function(self) redeem = function(self)
local mod = -G.GAME.round_resets.ante + asteroglyph_ante() local mod = -G.GAME.round_resets.ante + Cryptid.asteroglyph_ante()
ease_ante(mod) ease_ante(mod)
G.GAME.modifiers.cry_astero_ante = (G.GAME.modifiers.cry_astero_ante or 0) > 0 G.GAME.modifiers.cry_astero_ante = (G.GAME.modifiers.cry_astero_ante or 0) > 0
and math.min(math.ceil(G.GAME.modifiers.cry_astero_ante ^ 1.13), 1e300) and math.min(math.ceil(G.GAME.modifiers.cry_astero_ante ^ 1.13), 1e300)
@ -726,7 +950,7 @@ local asteroglyph = { --Set Ante to 0
end end
end, end,
init = function(self) init = function(self)
function asteroglyph_ante() function Cryptid.asteroglyph_ante()
if not (G.GAME or {}).modifiers then if not (G.GAME or {}).modifiers then
return 0 return 0
end end
@ -739,6 +963,17 @@ local asteroglyph = { --Set Ante to 0
} }
--Order 89 reserved for Ivory Script (unimplemented) --Order 89 reserved for Ivory Script (unimplemented)
local blankcanvas = { --+2 hand size local blankcanvas = { --+2 hand size
cry_credits = {
idea = {
"Frix",
},
art = {
"Watermelon lover",
},
code = {
"Jevonn",
},
},
object_type = "Voucher", object_type = "Voucher",
dependencies = { dependencies = {
items = { items = {
@ -775,6 +1010,17 @@ local blankcanvas = { --+2 hand size
end, end,
} }
local stickyhand = { --+1 card selection limit local stickyhand = { --+1 card selection limit
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"HexaCryonic",
},
},
object_type = "Voucher", object_type = "Voucher",
dependencies = { dependencies = {
items = { items = {
@ -805,6 +1051,17 @@ local stickyhand = { --+1 card selection limit
end, end,
} }
local grapplinghook = { --+1 card selection limit (replace me when "extra functionality" is added later) local grapplinghook = { --+1 card selection limit (replace me when "extra functionality" is added later)
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"HexaCryonic",
},
},
object_type = "Voucher", object_type = "Voucher",
dependencies = { dependencies = {
items = { items = {
@ -837,6 +1094,17 @@ local grapplinghook = { --+1 card selection limit (replace me when "extra functi
end, end,
} }
local hyperspacetether = { --+2 card selection limit + other stuff local hyperspacetether = { --+2 card selection limit + other stuff
cry_credits = {
idea = {
"HexaCryonic",
},
art = {
"HexaCryonic",
},
code = {
"HexaCryonic",
},
},
object_type = "Voucher", object_type = "Voucher",
dependencies = { dependencies = {
items = { items = {
@ -871,6 +1139,18 @@ local hyperspacetether = { --+2 card selection limit + other stuff
end, end,
} }
local triple = { --Copies voucher triple tag local triple = { --Copies voucher triple tag
cry_credits = {
idea = {
"Catman",
"Mystic Misclick",
},
art = {
"5381",
},
code = {
"Math",
},
},
object_type = "Tag", object_type = "Tag",
dependencies = { dependencies = {
items = { items = {
@ -923,6 +1203,18 @@ local triple = { --Copies voucher triple tag
end, end,
} }
local quadruple = { --Tag printer voucher quadruple tag local quadruple = { --Tag printer voucher quadruple tag
cry_credits = {
idea = {
"Catman",
"Mystic Misclick",
},
art = {
"5381",
},
code = {
"Math",
},
},
object_type = "Tag", object_type = "Tag",
dependencies = { dependencies = {
items = { items = {
@ -975,6 +1267,18 @@ local quadruple = { --Tag printer voucher quadruple tag
end, end,
} }
local quintuple = { --Clone machine voucher quintuple tag local quintuple = { --Clone machine voucher quintuple tag
cry_credits = {
idea = {
"Catman",
"Mystic Misclick",
},
art = {
"5381",
},
code = {
"Math",
},
},
object_type = "Tag", object_type = "Tag",
dependencies = { dependencies = {
items = { items = {
@ -1081,7 +1385,7 @@ return {
init = function() init = function()
--Add T3 Voucher pool for Golden Voucher Tag (in Tags.lua) and maybe other things in the future --Add T3 Voucher pool for Golden Voucher Tag (in Tags.lua) and maybe other things in the future
-- Uncursed this -Math -- Uncursed this -Math
function get_next_megavoucher_key(_from_tag) function Cryptid.next_tier3_key(_from_tag)
local _pool, _pool_key = get_current_pool("Tier3") local _pool, _pool_key = get_current_pool("Tier3")
if _from_tag then if _from_tag then
_pool_key = "Voucher_fromtag" _pool_key = "Voucher_fromtag"

View file

@ -95,11 +95,11 @@ function G.FUNCS.get_poker_hand_info(_cards)
["Pair"] = G.GAME.used_vouchers.v_cry_hyperspacetether and 2 or nil, ["Pair"] = G.GAME.used_vouchers.v_cry_hyperspacetether and 2 or nil,
["Two Pair"] = 4, ["Two Pair"] = 4,
["Three of a Kind"] = G.GAME.used_vouchers.v_cry_hyperspacetether and 3 or nil, ["Three of a Kind"] = G.GAME.used_vouchers.v_cry_hyperspacetether and 3 or nil,
["Straight"] = next(SMODS.find_card("j_four_fingers")) and cry_get_gameset() ~= "modest" and 4 or 5, ["Straight"] = next(SMODS.find_card("j_four_fingers")) and Cryptid.gameset() ~= "modest" and 4 or 5,
["Flush"] = next(SMODS.find_card("j_four_fingers")) and cry_get_gameset() ~= "modest" and 4 or 5, ["Flush"] = next(SMODS.find_card("j_four_fingers")) and Cryptid.gameset() ~= "modest" and 4 or 5,
["Full House"] = 5, ["Full House"] = 5,
["Four of a Kind"] = G.GAME.used_vouchers.v_cry_hyperspacetether and 4 or nil, ["Four of a Kind"] = G.GAME.used_vouchers.v_cry_hyperspacetether and 4 or nil,
["Straight Flush"] = next(SMODS.find_card("j_four_fingers")) and cry_get_gameset() ~= "modest" and 4 or 5, --debatable ["Straight Flush"] = next(SMODS.find_card("j_four_fingers")) and Cryptid.gameset() ~= "modest" and 4 or 5, --debatable
["cry_Bulwark"] = 5, ["cry_Bulwark"] = 5,
["Five of a Kind"] = 5, ["Five of a Kind"] = 5,
["Flush House"] = 5, ["Flush House"] = 5,
@ -110,7 +110,7 @@ function G.FUNCS.get_poker_hand_info(_cards)
} }
-- this is where all the logic for asc hands is. currently it's very simple but if you want more complex logic, here's the place to do it -- this is where all the logic for asc hands is. currently it's very simple but if you want more complex logic, here's the place to do it
if hand_table[text] and cry_card_enabled("set_cry_poker_hand_stuff") == true then if hand_table[text] and Cryptid.enabled("set_cry_poker_hand_stuff") == true then
G.GAME.current_round.current_hand.cry_asc_num = G.GAME.used_vouchers.v_cry_hyperspacetether G.GAME.current_round.current_hand.cry_asc_num = G.GAME.used_vouchers.v_cry_hyperspacetether
and #_cards - hand_table[text] and #_cards - hand_table[text]
or #scoring_hand - hand_table[text] or #scoring_hand - hand_table[text]
@ -130,11 +130,11 @@ function G.FUNCS.get_poker_hand_info(_cards)
or "" or ""
return text, loc_disp_text, poker_hands, scoring_hand, disp_text return text, loc_disp_text, poker_hands, scoring_hand, disp_text
end end
function cry_ascend(num) -- edit this function at your leisure function Cryptid.ascend(num) -- edit this function at your leisure
if cry_card_enabled("set_cry_poker_hand_stuff") ~= true then if Cryptid.enabled("set_cry_poker_hand_stuff") ~= true then
return num return num
end end
if cry_get_gameset() == "modest" then if Cryptid.gameset() == "modest" then
-- x(1.1 + 0.05 per sol) base, each card gives + (0.1 + 0.05 per sol) -- x(1.1 + 0.05 per sol) base, each card gives + (0.1 + 0.05 per sol)
if not G.GAME.current_round.current_hand.cry_asc_num then if not G.GAME.current_round.current_hand.cry_asc_num then
return num return num
@ -155,11 +155,11 @@ function cry_ascend(num) -- edit this function at your leisure
else else
return math.max( return math.max(
num, num,
num * ((1.25 + (0.05 * (G.GAME.sunnumber or 0))) ^ G.GAME.current_round.current_hand.cry_asc_num or 0) num * ((1.25 + (0.05 * (G.GAME.sunnumber or 0))) ^ (G.GAME.current_round.current_hand.cry_asc_num or 0))
) )
end end
end end
function cry_pulse_flame(duration, intensity) -- duration is in seconds, intensity is in idfk honestly, but it increases pretty quickly function Cryptid.pulse_flame(duration, intensity) -- duration is in seconds, intensity is in idfk honestly, but it increases pretty quickly
G.cry_flame_override = G.cry_flame_override or {} G.cry_flame_override = G.cry_flame_override or {}
G.cry_flame_override["duration"] = duration or 0.01 G.cry_flame_override["duration"] = duration or 0.01
G.cry_flame_override["intensity"] = intensity or 2 G.cry_flame_override["intensity"] = intensity or 2

View file

@ -4,7 +4,7 @@
local ec = eval_card local ec = eval_card
function eval_card(card, context) function eval_card(card, context)
if card.will_shatter then if card.will_shatter then
return return {}, {}
end end
-- Store old probability for later reference -- Store old probability for later reference
local ggpn = G.GAME.probabilities.normal local ggpn = G.GAME.probabilities.normal
@ -596,7 +596,7 @@ function Card:calculate_joker(context)
return ret, trig return ret, trig
end end
function exponentia_scale_mod(self, orig_scale_scale, orig_scale_base, new_scale_base) function Cryptid.exponentia_scale_mod(self, orig_scale_scale, orig_scale_base, new_scale_base)
local jkr = self local jkr = self
local dbl_info = G.GAME.cry_double_scale[jkr.sort_id] local dbl_info = G.GAME.cry_double_scale[jkr.sort_id]
if jkr.ability and type(jkr.ability) == "table" then if jkr.ability and type(jkr.ability) == "table" then
@ -751,7 +751,7 @@ function exponentia_scale_mod(self, orig_scale_scale, orig_scale_base, new_scale
end end
end end
function compound_interest_scale_mod(self, orig_scale_scale, orig_scale_base, new_scale_base) function Cryptid.compound_interest_scale_mod(self, orig_scale_scale, orig_scale_base, new_scale_base)
local jkr = self local jkr = self
local dbl_info = G.GAME.cry_double_scale[jkr.sort_id] local dbl_info = G.GAME.cry_double_scale[jkr.sort_id]
if jkr.ability and type(jkr.ability) == "table" then if jkr.ability and type(jkr.ability) == "table" then

View file

@ -15,8 +15,8 @@ SMODS.PokerHand({
{ "S_A", true, "m_stone" }, { "S_A", true, "m_stone" },
}, },
evaluate = function(parts, hand) evaluate = function(parts, hand)
if cry_card_enabled("set_cry_poker_hand_stuff") ~= true or cry_card_enabled("c_cry_asteroidbelt") ~= true then if Cryptid.enabled("set_cry_poker_hand_stuff") ~= true or Cryptid.enabled("c_cry_asteroidbelt") ~= true then
return return {}
end end
local stones = {} local stones = {}
for i, card in ipairs(hand) do for i, card in ipairs(hand) do
@ -27,6 +27,24 @@ SMODS.PokerHand({
return #stones >= 5 and { stones } or {} return #stones >= 5 and { stones } or {}
end, end,
}) })
SMODS.PokerHandPart({
key = "cfpart",
func = function(hand)
if Cryptid.enabled("set_cry_poker_hand_stuff") ~= true or Cryptid.enabled("c_cry_void") ~= true then
return {}
end
local eligible_cards = {}
for i, card in ipairs(hand) do
if true then --card.ability.name ~= "Gold Card"
eligible_cards[#eligible_cards + 1] = card
end
end
if #eligible_cards > 7 then
return { eligible_cards }
end
return {}
end,
})
SMODS.PokerHand({ SMODS.PokerHand({
key = "Clusterfuck", key = "Clusterfuck",
visible = false, visible = false,
@ -45,15 +63,13 @@ SMODS.PokerHand({
{ "C_5", true }, { "C_5", true },
}, },
evaluate = function(parts, hand) evaluate = function(parts, hand)
if cry_card_enabled("set_cry_poker_hand_stuff") ~= true or cry_card_enabled("c_cry_void") ~= true then
return
end
local other_hands = next(parts._flush) or next(parts._straight) or next(parts._all_pairs) local other_hands = next(parts._flush) or next(parts._straight) or next(parts._all_pairs)
if #hand > 7 then if next(parts.cry_cfpart) then
if not other_hands then if not other_hands then
return { hand } return { SMODS.merge_lists(parts.cry_cfpart) }
end end
end end
return {}
end, end,
}) })
SMODS.PokerHand({ SMODS.PokerHand({
@ -74,7 +90,7 @@ SMODS.PokerHand({
{ "H_7", true }, { "H_7", true },
}, },
evaluate = function(parts, hand) evaluate = function(parts, hand)
if cry_card_enabled("set_cry_poker_hand_stuff") ~= true or cry_card_enabled("c_cry_marsmoons") ~= true then if Cryptid.enabled("set_cry_poker_hand_stuff") ~= true or Cryptid.enabled("c_cry_marsmoons") ~= true then
return return
end end
local scoring_pairs = {} local scoring_pairs = {}
@ -110,7 +126,7 @@ SMODS.PokerHand({
end end
end end
if sc_max == #scored_cards / 2 - 1 and sc_unique == 1 then if sc_max == #scored_cards / 2 - 1 and sc_unique == 1 then
return return {}
end end
if #scored_cards >= 8 then if #scored_cards >= 8 then
return { scored_cards } return { scored_cards }
@ -179,7 +195,7 @@ SMODS.PokerHand({
{ "D_2", true }, { "D_2", true },
}, },
evaluate = function(parts, hand) evaluate = function(parts, hand)
if cry_card_enabled("set_cry_poker_hand_stuff") ~= true or cry_card_enabled("c_cry_universe") ~= true then if Cryptid.enabled("set_cry_poker_hand_stuff") ~= true or Cryptid.enabled("c_cry_universe") ~= true then
return return
end end
if #hand >= 52 then if #hand >= 52 then
@ -468,7 +484,7 @@ SMODS.Sound({
select_music_track = function() select_music_track = function()
return Cryptid_config.Cryptid return Cryptid_config.Cryptid
and Cryptid_config.Cryptid.exotic_music and Cryptid_config.Cryptid.exotic_music
and #advanced_find_joker(nil, "cry_exotic", nil, nil, true) ~= 0 and #Cryptid.advanced_find_joker(nil, "cry_exotic", nil, nil, true) ~= 0
end, end,
}) })
SMODS.Sound({ SMODS.Sound({
@ -582,6 +598,21 @@ SMODS.Atlas({
px = 34, px = 34,
py = 34, py = 34,
}) })
-- shiny tags
SMODS.Atlas({
key = "shinyv",
path = "shinyv.png",
px = 34,
py = 34,
})
SMODS.Atlas({
key = "shinyc",
path = "shinyc.png",
px = 34,
py = 34,
})
SMODS.Atlas({ SMODS.Atlas({
key = "atlasdeck", key = "atlasdeck",
path = "atlasdeck.png", path = "atlasdeck.png",

View file

@ -3,7 +3,7 @@
-- Currently this is very empty since D20 hasn't been fully implemented yet, but it should have a lot more later. -- Currently this is very empty since D20 hasn't been fully implemented yet, but it should have a lot more later.
--Will be moved to D20 file when that gets added --Will be moved to D20 file when that gets added
function roll_dice(seed, min, max, config) function Cryptid.roll(seed, min, max, config)
local val local val
while not val or (config and config.ignore_value == val) do while not val or (config and config.ignore_value == val) do
val = pseudorandom(seed, min, max) val = pseudorandom(seed, min, max)

View file

@ -9,7 +9,7 @@ SMODS.Event = SMODS.GameObject:extend({
"key", "key",
}, },
inject = function() end, inject = function() end,
set = "Event", set = "Other",
class_prefix = "ev", class_prefix = "ev",
-- This should be called to start an event. -- This should be called to start an event.
start = function(self) start = function(self)

View file

@ -137,17 +137,17 @@ G.FUNCS.cry_intro_part = function(_part)
G.yawetag.states.hover.can = true G.yawetag.states.hover.can = true
G.yawetag.states.drag.can = false G.yawetag.states.drag.can = false
G.yawetag.hover = Node.hover G.yawetag.hover = Node.hover
step = cry_intro_info({ step = Cryptid.intro_info({
text_key = "cry_intro_1", text_key = "cry_intro_1",
attach = { major = G.ROOM_ATTACH, type = "cm", offset = { x = 0, y = 0 } }, attach = { major = G.ROOM_ATTACH, type = "cm", offset = { x = 0, y = 0 } },
step = step, step = step,
}) })
step = cry_intro_info({ step = Cryptid.intro_info({
text_key = "cry_intro_2", text_key = "cry_intro_2",
attach = { major = G.ROOM_ATTACH, type = "cm", offset = { x = 0, y = -3 } }, attach = { major = G.ROOM_ATTACH, type = "cm", offset = { x = 0, y = -3 } },
step = step, step = step,
}) })
step = cry_intro_info({ step = Cryptid.intro_info({
text_key = "cry_intro_3", text_key = "cry_intro_3",
attach = { major = G.ROOM_ATTACH, type = "cm", offset = { x = 0, y = -3 } }, attach = { major = G.ROOM_ATTACH, type = "cm", offset = { x = 0, y = -3 } },
step = step, step = step,
@ -162,7 +162,7 @@ G.FUNCS.cry_intro_part = function(_part)
G.yawetag:set_alignment({ major = G.ROOM_ATTACH, type = "cm", offset = { x = 2.5, y = -3 } }) G.yawetag:set_alignment({ major = G.ROOM_ATTACH, type = "cm", offset = { x = 2.5, y = -3 } })
end, end,
}) })
step = cry_intro_info({ step = Cryptid.intro_info({
text_key = "cry_intro_4", text_key = "cry_intro_4",
attach = { major = G.ROOM_ATTACH, type = "cm", offset = { x = 0, y = -3 } }, attach = { major = G.ROOM_ATTACH, type = "cm", offset = { x = 0, y = -3 } },
step = step, step = step,
@ -238,7 +238,7 @@ G.FUNCS.cry_intro_part = function(_part)
config = { major = G.ROOM_ATTACH, type = "cm", offset = { x = 0, y = 2.5 } }, config = { major = G.ROOM_ATTACH, type = "cm", offset = { x = 0, y = 2.5 } },
}) })
G.gamesetUI.states.visible = false G.gamesetUI.states.visible = false
step = cry_intro_info({ step = Cryptid.intro_info({
text_key = "cry_intro_5", text_key = "cry_intro_5",
attach = { major = G.ROOM_ATTACH, type = "cm", offset = { x = 0, y = -3 } }, attach = { major = G.ROOM_ATTACH, type = "cm", offset = { x = 0, y = -3 } },
step = step, step = step,
@ -274,7 +274,7 @@ G.FUNCS.cry_intro_part = function(_part)
G.OVERLAY_TUTORIAL.Jimbo:remove_speech_bubble() G.OVERLAY_TUTORIAL.Jimbo:remove_speech_bubble()
G.OVERLAY_TUTORIAL.step = nil G.OVERLAY_TUTORIAL.step = nil
for i = 1, desc_length[_part] do for i = 1, desc_length[_part] do
step = cry_intro_info({ step = Cryptid.intro_info({
text_key = "cry_" .. _part .. "_" .. i, text_key = "cry_" .. _part .. "_" .. i,
attach = { major = G.ROOM_ATTACH, type = "cm", offset = { x = 0, y = -3 } }, attach = { major = G.ROOM_ATTACH, type = "cm", offset = { x = 0, y = -3 } },
step = step, step = step,
@ -283,7 +283,7 @@ G.FUNCS.cry_intro_part = function(_part)
}, },
}) })
end end
step = cry_intro_info({ step = Cryptid.intro_info({
no_button = true, no_button = true,
attach = { major = G.ROOM_ATTACH, type = "cm", offset = { x = 0, y = -3 } }, attach = { major = G.ROOM_ATTACH, type = "cm", offset = { x = 0, y = -3 } },
step = step, step = step,
@ -364,7 +364,7 @@ G.FUNCS.cry_gameset_confirm = function(e)
end end
end end
function cry_intro_info(args) function Cryptid.intro_info(args)
local overlay_colour = { 0.32, 0.36, 0.41, 0 } local overlay_colour = { 0.32, 0.36, 0.41, 0 }
ease_value(overlay_colour, 4, 0.6, nil, "REAL", true, 0.4) ease_value(overlay_colour, 4, 0.6, nil, "REAL", true, 0.4)
G.OVERLAY_TUTORIAL = G.OVERLAY_TUTORIAL G.OVERLAY_TUTORIAL = G.OVERLAY_TUTORIAL
@ -524,7 +524,7 @@ end
------------------------ ------------------------
-- Gets gameset sprite of current profile -- Gets gameset sprite of current profile
function gameset_sprite(scale, profile, force_gameset) function Cryptid.gameset_sprite(scale, profile, force_gameset)
gameset = force_gameset gameset = force_gameset
or G.PROFILES[profile or G.SETTINGS.profile].cry_gameset_overrides and "modified" or G.PROFILES[profile or G.SETTINGS.profile].cry_gameset_overrides and "modified"
or G.PROFILES[profile or G.SETTINGS.profile].cry_gameset or G.PROFILES[profile or G.SETTINGS.profile].cry_gameset
@ -547,7 +547,7 @@ function gameset_sprite(scale, profile, force_gameset)
end end
-- designed to work on any object type -- designed to work on any object type
function cry_get_gameset(card, center) function Cryptid.gameset(card, center)
if Jen then if Jen then
return "madness" return "madness"
end end
@ -577,11 +577,11 @@ function cry_get_gameset(card, center)
local gameset = G.PROFILES[G.SETTINGS.profile].cry_gameset or "mainline" local gameset = G.PROFILES[G.SETTINGS.profile].cry_gameset or "mainline"
if Cryptid_config.experimental and center.extra_gamesets then if Cryptid_config.experimental and center.extra_gamesets then
for i = 1, #center.extra_gamesets do for i = 1, #center.extra_gamesets do
if center.extra_gamesets[i] == "experimental_" .. gameset then if center.extra_gamesets[i] == "exp_" .. gameset then
gameset = "experimental_" .. gameset gameset = "exp_" .. gameset
break break
elseif center.extra_gamesets[i] == "experimental" then elseif center.extra_gamesets[i] == "exp" then
gameset = "experimental" gameset = "exp"
break break
end end
end end
@ -596,7 +596,7 @@ function cry_get_gameset(card, center)
end end
-- set_ability accounts for gamesets -- set_ability accounts for gamesets
function Card:get_gameset(center) function Card:get_gameset(center)
return cry_get_gameset(self, center) return Cryptid.gameset(self, center)
end end
local csa = Card.set_ability local csa = Card.set_ability
function Card:set_ability(center, y, z) function Card:set_ability(center, y, z)
@ -659,9 +659,9 @@ if not Jen then
end end
if self.gameset_select then if self.gameset_select then
Card.cry_set_gameset(self, self.config.center, self.config.center.force_gameset) Card.cry_set_gameset(self, self.config.center, self.config.center.force_gameset)
cry_update_obj_registry() Cryptid.update_obj_registry()
end end
cry_gameset_config_UI(self.config.center) Cryptid.gameset_config_UI(self.config.center)
end end
end end
end end
@ -669,7 +669,7 @@ if not Jen then
end end
-- gameset config UI -- gameset config UI
function cry_gameset_config_UI(center) function Cryptid.gameset_config_UI(center)
if not center then if not center then
center = G.viewedContentSet center = G.viewedContentSet
end end
@ -707,9 +707,9 @@ function cry_gameset_config_UI(center)
and center.gameset_config[gamesets[i]].disabled and center.gameset_config[gamesets[i]].disabled
) )
then then
local _center = cry_deep_copy(center) local _center = Cryptid.deep_copy(center)
_center.force_gameset = gamesets[i] _center.force_gameset = gamesets[i]
local card = create_generic_card(_center) local card = Cryptid.generic_card(_center)
card.gameset_select = true card.gameset_select = true
G.your_collection[1]:emplace(card) G.your_collection[1]:emplace(card)
--[[if not is_back then --[[if not is_back then
@ -769,7 +769,7 @@ end
function G.FUNCS.cry_gameset_config_UI() function G.FUNCS.cry_gameset_config_UI()
G.cry_prev_collec = "your_collection_content_sets" G.cry_prev_collec = "your_collection_content_sets"
cry_gameset_config_UI() Cryptid.gameset_config_UI()
end end
local collection_shtuff = { local collection_shtuff = {
@ -825,7 +825,7 @@ function get_type_colour(center, card)
end end
end end
if if
cry_get_gameset(card, center) == "disabled" Cryptid.gameset(card, center) == "disabled"
or (center.cry_disabled and (not card.gameset_select or center.cry_disabled.type ~= "manual")) or (center.cry_disabled and (not card.gameset_select or center.cry_disabled.type ~= "manual"))
then then
color = mix_colours(G.C.RED, G.C.GREY, 0.7) color = mix_colours(G.C.RED, G.C.GREY, 0.7)
@ -860,11 +860,11 @@ end
function G.FUNCS.reset_gameset_config() function G.FUNCS.reset_gameset_config()
G.PROFILES[G.SETTINGS.profile].cry_gameset_overrides = nil G.PROFILES[G.SETTINGS.profile].cry_gameset_overrides = nil
cry_update_obj_registry() Cryptid.update_obj_registry()
G:save_progress() G:save_progress()
end end
function cry_card_enabled(key, iter) function Cryptid.enabled(key, iter)
if not iter then if not iter then
iter = 0 iter = 0
end --iter is used to prevent infinite loops from freezing on startup end --iter is used to prevent infinite loops from freezing on startup
@ -872,20 +872,20 @@ function cry_card_enabled(key, iter)
print("Warning: Circular dependency with " .. key) print("Warning: Circular dependency with " .. key)
return true return true
end end
local card = cry_get_center(key) local card = Cryptid.get_center(key)
if if
not card not card
or cry_get_gameset(card) == "disabled" or Cryptid.gameset(card) == "disabled"
or card.gameset_config or card.gameset_config
and card.gameset_config[cry_get_gameset(card)] and card.gameset_config[Cryptid.gameset(card)]
and card.gameset_config[cry_get_gameset(card)].disabled and card.gameset_config[Cryptid.gameset(card)].disabled
then then
return { type = "manual" } return { type = "manual" }
end end
if card.dependencies then if card.dependencies then
if card.dependencies.items then if card.dependencies.items then
for i = 1, #card.dependencies.items do for i = 1, #card.dependencies.items do
if cry_card_enabled(card.dependencies.items[i], iter + 1) ~= true then if Cryptid.enabled(card.dependencies.items[i], iter + 1) ~= true then
return { type = "card_dependency", key = card.dependencies.items[i] } return { type = "card_dependency", key = card.dependencies.items[i] }
end end
end end
@ -910,7 +910,7 @@ function cry_card_enabled(key, iter)
return true return true
end end
function cry_get_center(key, m) function Cryptid.get_center(key, m)
if not m then if not m then
-- check for non game objects -- check for non game objects
if SMODS.Seals.obj_table and SMODS.Seals.obj_table[key] then if SMODS.Seals.obj_table and SMODS.Seals.obj_table[key] then
@ -922,7 +922,7 @@ function cry_get_center(key, m)
m = SMODS.GameObject m = SMODS.GameObject
if m.subclasses then if m.subclasses then
for k, v in pairs(m.subclasses) do for k, v in pairs(m.subclasses) do
local c = cry_get_center(key, v) local c = Cryptid.get_center(key, v)
if c then if c then
return c return c
end end
@ -932,15 +932,26 @@ function cry_get_center(key, m)
return m.obj_table and m.obj_table[key] return m.obj_table and m.obj_table[key]
end end
function Cryptid.gameset_loc(card, config)
local gameset = Cryptid.gameset(card)
if config[gameset] then
return card.key .. "_" .. config[gameset]
else
return card.key
end
end
------------------------------ ------------------------------
---- CARD ENABLING SYSTEM ---- ---- CARD ENABLING SYSTEM ----
------------------------------ ------------------------------
---@type fun(self: SMODS.GameObject|table, reason: table)?
SMODS.GameObject._disable = function(self, reason) SMODS.GameObject._disable = function(self, reason)
if not self.cry_disabled then if not self.cry_disabled then
self.cry_disabled = reason or { type = "manual" } --used to display more information that can be used later self.cry_disabled = reason or { type = "manual" } --used to display more information that can be used later
end end
end end
---@type fun(self: SMODS.GameObject|table)?
SMODS.GameObject.enable = function(self) SMODS.GameObject.enable = function(self)
if self.cry_disabled then if self.cry_disabled then
self.cry_disabled = nil self.cry_disabled = nil
@ -950,6 +961,7 @@ end
-- Note: For custom pools, these only support Center.pools, not ObjectType.cards -- Note: For custom pools, these only support Center.pools, not ObjectType.cards
-- That could cause issues with mod compat in the future -- That could cause issues with mod compat in the future
-- Potential improvement: automatic pool detection from gamesets? -- Potential improvement: automatic pool detection from gamesets?
---@type fun(self: SMODS.Center|table, reason: table)?
SMODS.Center._disable = function(self, reason) SMODS.Center._disable = function(self, reason)
if not self.cry_disabled then if not self.cry_disabled then
self.cry_disabled = reason or { type = "manual" } --used to display more information that can be used later self.cry_disabled = reason or { type = "manual" } --used to display more information that can be used later
@ -960,6 +972,7 @@ SMODS.Center._disable = function(self, reason)
G.P_CENTERS[self.key] = nil G.P_CENTERS[self.key] = nil
end end
end end
---@type fun(self: SMODS.Center|table)?
SMODS.Center.enable = function(self) SMODS.Center.enable = function(self)
if self.cry_disabled then if self.cry_disabled then
self.cry_disabled = nil self.cry_disabled = nil
@ -970,6 +983,8 @@ SMODS.Center.enable = function(self)
end end
end end
end end
---@type fun(self: SMODS.Joker|table)?
SMODS.Joker.enable = function(self) SMODS.Joker.enable = function(self)
if self.cry_disabled then if self.cry_disabled then
SMODS.Center.enable(self) SMODS.Center.enable(self)
@ -980,6 +995,7 @@ SMODS.Joker.enable = function(self)
end end
end end
end end
---@type fun(self: SMODS.Joker|table, reason: table)?
SMODS.Joker._disable = function(self, reason) SMODS.Joker._disable = function(self, reason)
if not self.cry_disabled then if not self.cry_disabled then
SMODS.Center._disable(self, reason) SMODS.Center._disable(self, reason)
@ -990,6 +1006,7 @@ SMODS.Joker._disable = function(self, reason)
end end
end end
end end
---@type fun(self: SMODS.Joker|table, rarity: string|number)?
SMODS.Joker.set_rarity = function(self, rarity) SMODS.Joker.set_rarity = function(self, rarity)
SMODS.remove_pool(G.P_JOKER_RARITY_POOLS[self.rarity], self.key) SMODS.remove_pool(G.P_JOKER_RARITY_POOLS[self.rarity], self.key)
self.rarity = rarity self.rarity = rarity
@ -1000,12 +1017,14 @@ SMODS.Joker.set_rarity = function(self, rarity)
end end
end end
---@type fun(self: SMODS.Consumable|table)?
SMODS.Consumable.enable = function(self) SMODS.Consumable.enable = function(self)
if self.cry_disabled then if self.cry_disabled then
SMODS.Center.enable(self) SMODS.Center.enable(self)
SMODS.insert_pool(G.P_CENTER_POOLS["Consumeables"], self) SMODS.insert_pool(G.P_CENTER_POOLS["Consumeables"], self)
end end
end end
---@type fun(self: SMODS.Consumable|table, reason: table)?
SMODS.Consumable._disable = function(self, reason) SMODS.Consumable._disable = function(self, reason)
if not self.cry_disabled then if not self.cry_disabled then
SMODS.Center._disable(self, reason) SMODS.Center._disable(self, reason)
@ -1013,6 +1032,7 @@ SMODS.Consumable._disable = function(self, reason)
end end
end end
---@type fun(self: SMODS.Tag|table, reason: table)?
SMODS.Tag._disable = function(self, reason) SMODS.Tag._disable = function(self, reason)
if not self.cry_disabled then if not self.cry_disabled then
self.cry_disabled = reason or { type = "manual" } --used to display more information that can be used later self.cry_disabled = reason or { type = "manual" } --used to display more information that can be used later
@ -1020,6 +1040,7 @@ SMODS.Tag._disable = function(self, reason)
G.P_TAGS[self.key] = nil G.P_TAGS[self.key] = nil
end end
end end
---@type fun(self: SMODS.Tag|table)?
SMODS.Tag.enable = function(self) SMODS.Tag.enable = function(self)
if self.cry_disabled then if self.cry_disabled then
self.cry_disabled = nil self.cry_disabled = nil
@ -1028,12 +1049,14 @@ SMODS.Tag.enable = function(self)
end end
end end
---@type fun(self: SMODS.Blind|table, reason: table)?
SMODS.Blind._disable = function(self, reason) SMODS.Blind._disable = function(self, reason)
if not self.cry_disabled then if not self.cry_disabled then
self.cry_disabled = reason or { type = "manual" } --used to display more information that can be used later self.cry_disabled = reason or { type = "manual" } --used to display more information that can be used later
G.P_BLINDS[self.key] = nil G.P_BLINDS[self.key] = nil
end end
end end
---@type fun(self: SMODS.Blind|table)?
SMODS.Blind.enable = function(self) SMODS.Blind.enable = function(self)
if self.cry_disabled then if self.cry_disabled then
self.cry_disabled = nil self.cry_disabled = nil
@ -1042,12 +1065,14 @@ SMODS.Blind.enable = function(self)
end end
--Removing seals from the center table causes issues --Removing seals from the center table causes issues
---@type fun(self: SMODS.Seal|table, reason: table)?
SMODS.Seal._disable = function(self, reason) SMODS.Seal._disable = function(self, reason)
if not self.cry_disabled then if not self.cry_disabled then
self.cry_disabled = reason or { type = "manual" } --used to display more information that can be used later self.cry_disabled = reason or { type = "manual" } --used to display more information that can be used later
SMODS.remove_pool(G.P_CENTER_POOLS[self.set], self.key) SMODS.remove_pool(G.P_CENTER_POOLS[self.set], self.key)
end end
end end
---@type fun(self: SMODS.Seal|table)?
SMODS.Seal.enable = function(self) SMODS.Seal.enable = function(self)
if self.cry_disabled then if self.cry_disabled then
self.cry_disabled = nil self.cry_disabled = nil
@ -1056,6 +1081,7 @@ SMODS.Seal.enable = function(self)
end end
--Removing editions from the center table causes issues, so instead we make them unable to spawn naturally --Removing editions from the center table causes issues, so instead we make them unable to spawn naturally
---@type fun(self: SMODS.Seal|table, reason: table)?
SMODS.Edition._disable = function(self, reason) SMODS.Edition._disable = function(self, reason)
if not self.cry_disabled then if not self.cry_disabled then
self.cry_disabled = reason or { type = "manual" } --used to display more information that can be used later self.cry_disabled = reason or { type = "manual" } --used to display more information that can be used later
@ -1066,6 +1092,7 @@ SMODS.Edition._disable = function(self, reason)
end end
end end
end end
---@type fun(self: SMODS.Seal|table)?
SMODS.Edition.enable = function(self) SMODS.Edition.enable = function(self)
if self.cry_disabled then if self.cry_disabled then
self.cry_disabled = nil self.cry_disabled = nil
@ -1075,19 +1102,19 @@ SMODS.Edition.enable = function(self)
end end
end end
function cry_update_obj_registry(m, force_enable) function Cryptid.update_obj_registry(m, force_enable)
if not m then if not m then
m = SMODS.GameObject m = SMODS.GameObject
if m.subclasses then if m.subclasses then
for k, v in pairs(m.subclasses) do for k, v in pairs(m.subclasses) do
cry_update_obj_registry(v, force_enable) Cryptid.update_obj_registry(v, force_enable)
end end
end end
end end
if m.obj_table then if m.obj_table then
for k, v in pairs(m.obj_table) do for k, v in pairs(m.obj_table) do
if v.mod and v.mod.id == "Cryptid" then if v.mod and v.mod.id == "Cryptid" then
local en = force_enable or cry_card_enabled(k) local en = force_enable or Cryptid.enabled(k)
if en == true then if en == true then
if v.cry_disabled then if v.cry_disabled then
v:enable() v:enable()
@ -1101,12 +1128,12 @@ function cry_update_obj_registry(m, force_enable)
end end
end end
end end
function cry_index_items(func, m) function Cryptid.index_items(func, m)
if not m then if not m then
m = SMODS.GameObject m = SMODS.GameObject
if m.subclasses then if m.subclasses then
for k, v in pairs(m.subclasses) do for k, v in pairs(m.subclasses) do
cry_index_items(func, v) Cryptid.index_items(func, v)
end end
end end
end end
@ -1120,9 +1147,9 @@ function cry_index_items(func, m)
end end
local init_item_prototypes_ref = Game.init_item_prototypes local init_item_prototypes_ref = Game.init_item_prototypes
function Game:init_item_prototypes() function Game:init_item_prototypes()
cry_update_obj_registry(nil, true) --force enable, to prevent issues with profile reloading Cryptid.update_obj_registry(nil, true) --force enable, to prevent issues with profile reloading
init_item_prototypes_ref(self) init_item_prototypes_ref(self)
cry_update_obj_registry() Cryptid.update_obj_registry()
end end
------------------------ ------------------------
@ -1325,7 +1352,7 @@ function create_UIBox_your_collection_content_sets()
if not center then if not center then
break break
end end
local card = create_generic_card( local card = Cryptid.generic_card(
center, center,
G.your_collection[j].T.x + G.your_collection[j].T.w / 2, G.your_collection[j].T.x + G.your_collection[j].T.w / 2,
G.your_collection[j].T.y G.your_collection[j].T.y
@ -1393,7 +1420,7 @@ function create_UIBox_your_collection_current_set()
end end
end end
end end
cry_index_items(is_in_set) Cryptid.index_items(is_in_set)
table.sort(joker_pool, function(a, b) table.sort(joker_pool, function(a, b)
return a.cry_order < b.cry_order return a.cry_order < b.cry_order
end) end)
@ -1415,7 +1442,7 @@ function create_UIBox_your_collection_current_set()
if not center then if not center then
break break
end end
local card = create_generic_card( local card = Cryptid.generic_card(
center, center,
G.your_collection[j].T.x + G.your_collection[j].T.w / 2, G.your_collection[j].T.x + G.your_collection[j].T.w / 2,
G.your_collection[j].T.y G.your_collection[j].T.y
@ -1478,7 +1505,7 @@ G.FUNCS.your_collection_content_set_page = function(args)
if not center then if not center then
break break
end end
local card = create_generic_card( local card = Cryptid.generic_card(
center, center,
G.your_collection[j].T.x + G.your_collection[j].T.w / 2, G.your_collection[j].T.x + G.your_collection[j].T.w / 2,
G.your_collection[j].T.y G.your_collection[j].T.y
@ -1510,7 +1537,7 @@ G.FUNCS.your_collection_current_set_page = function(args)
end end
end end
end end
cry_index_items(is_in_set) Cryptid.index_items(is_in_set)
table.sort(joker_pool, function(a, b) table.sort(joker_pool, function(a, b)
return a.cry_order < b.cry_order return a.cry_order < b.cry_order
end) end)
@ -1521,7 +1548,7 @@ G.FUNCS.your_collection_current_set_page = function(args)
if not center then if not center then
break break
end end
local card = create_generic_card( local card = Cryptid.generic_card(
center, center,
G.your_collection[j].T.x + G.your_collection[j].T.w / 2, G.your_collection[j].T.x + G.your_collection[j].T.w / 2,
G.your_collection[j].T.y G.your_collection[j].T.y
@ -1536,7 +1563,7 @@ end
---- GENERIC COLLECTIONS ----- ---- GENERIC COLLECTIONS -----
------------------------------ ------------------------------
function create_generic_card(center, x, y) function Cryptid.generic_card(center, x, y)
--todo: make gameset stickers play nicely with resized sprites --todo: make gameset stickers play nicely with resized sprites
local is_blind = center.set == "Blind" or center.cry_blind local is_blind = center.set == "Blind" or center.cry_blind
local is_tag = center.set == "Tag" or center.cry_tag local is_tag = center.set == "Tag" or center.cry_tag
@ -1552,29 +1579,29 @@ function create_generic_card(center, x, y)
if center.set == "Edition" then if center.set == "Edition" then
card:set_edition(center.key, true, true) card:set_edition(center.key, true, true)
end end
if safe_get(center, "config", "cry_antimatter") then if Cryptid.safe_get(center, "config", "cry_antimatter") then
card:set_edition("e_negative", true, true) card:set_edition("e_negative", true, true)
return card return card
end end
if safe_get(center, "config", "cry_force_edition") then if Cryptid.safe_get(center, "config", "cry_force_edition") then
card:set_edition({ [center.config.cry_force_edition] = true }, true, true) card:set_edition({ [center.config.cry_force_edition] = true }, true, true)
end end
if center.set == "Seal" then if center.set == "Seal" then
card:set_seal(center.key, true, true) card:set_seal(center.key, true, true)
card.config.center = cry_deep_copy(card.config.center) card.config.center = Cryptid.deep_copy(card.config.center)
card.config.center.force_gameset = center.force_gameset card.config.center.force_gameset = center.force_gameset
card.config.center.key = center.key card.config.center.key = center.key
end end
if safe_get(center, "config", "cry_force_seal") then if Cryptid.safe_get(center, "config", "cry_force_seal") then
card:set_seal(center.config.cry_force_seal, true, true) card:set_seal(center.config.cry_force_seal, true, true)
end end
if center.set == "Sticker" then if center.set == "Sticker" then
center:apply(card, true) center:apply(card, true)
card.config.center = cry_deep_copy(card.config.center) card.config.center = Cryptid.deep_copy(card.config.center)
card.config.center.force_gameset = center.force_gameset card.config.center.force_gameset = center.force_gameset
card.config.center.key = center.key card.config.center.key = center.key
end end
if safe_get(center, "config", "cry_force_sticker") then if Cryptid.safe_get(center, "config", "cry_force_sticker") then
SMODS.Stickers[center.config.cry_force_sticker]:apply(card, true) SMODS.Stickers[center.config.cry_force_sticker]:apply(card, true)
end end
return card return card
@ -1628,12 +1655,12 @@ function modsCollectionTally(pool, set)
if G.ACTIVE_MOD_UI and G.ACTIVE_MOD_UI.id == "Cryptid" then if G.ACTIVE_MOD_UI and G.ACTIVE_MOD_UI.id == "Cryptid" then
local obj_tally = { tally = 0, of = 0 } local obj_tally = { tally = 0, of = 0 }
--infer pool --infer pool
local _set = set or safe_get(pool, 1, "set") local _set = set or Cryptid.safe_get(pool, 1, "set")
--check for general consumables --check for general consumables
local consumable = false local consumable = false
if _set and safe_get(pool, 1, "consumeable") then if _set and Cryptid.safe_get(pool, 1, "consumeable") then
for i = 1, #pool do for i = 1, #pool do
if safe_get(pool, i, "set") ~= _set then if Cryptid.safe_get(pool, i, "set") ~= _set then
consumable = true consumable = true
break break
end end
@ -1651,22 +1678,22 @@ function modsCollectionTally(pool, set)
for _, v in pairs(pool) do for _, v in pairs(pool) do
if v.mod and G.ACTIVE_MOD_UI.id == v.mod.id and not v.no_collection then if v.mod and G.ACTIVE_MOD_UI.id == v.mod.id and not v.no_collection then
if consumable then if consumable then
if safe_get(v, "consumeable") then if Cryptid.safe_get(v, "consumeable") then
obj_tally.of = obj_tally.of + 1 obj_tally.of = obj_tally.of + 1
if cry_card_enabled(v.key) == true then if Cryptid.enabled(v.key) == true then
obj_tally.tally = obj_tally.tally + 1 obj_tally.tally = obj_tally.tally + 1
end end
end end
elseif set then elseif set then
if v.set and v.set == set then if v.set and v.set == set then
obj_tally.of = obj_tally.of + 1 obj_tally.of = obj_tally.of + 1
if cry_card_enabled(v.key) == true then if Cryptid.enabled(v.key) == true then
obj_tally.tally = obj_tally.tally + 1 obj_tally.tally = obj_tally.tally + 1
end end
end end
else else
obj_tally.of = obj_tally.of + 1 obj_tally.of = obj_tally.of + 1
if cry_card_enabled(v.key) == true then if Cryptid.enabled(v.key) == true then
obj_tally.tally = obj_tally.tally + 1 obj_tally.tally = obj_tally.tally + 1
end end
end end
@ -1768,7 +1795,7 @@ function create_UIBox_your_collection_seals()
modify_card = function(card, center) modify_card = function(card, center)
card:set_seal(center.key, true) card:set_seal(center.key, true)
-- Make disabled UI appear -- Make disabled UI appear
card.config.center = cry_deep_copy(card.config.center) card.config.center = Cryptid.deep_copy(card.config.center)
card.config.center.key = center.key card.config.center.key = center.key
end, end,
}) })
@ -1791,7 +1818,7 @@ function create_UIBox_your_collection_stickers()
card.ignore_pinned = true card.ignore_pinned = true
center:apply(card, true) center:apply(card, true)
-- Make disabled UI appear -- Make disabled UI appear
card.config.center = cry_deep_copy(card.config.center) card.config.center = Cryptid.deep_copy(card.config.center)
card.config.center.key = center.key card.config.center.key = center.key
end, end,
}) })

View file

@ -1,28 +1,23 @@
-- Update the Cryptid member count using HTTPS -- Update the Cryptid member count using HTTPS
function update_cry_member_count() local member_fallback = 24000
if Cryptid.enabled["HTTPS Module"] == true and Cryptid.mod_path then local https = require("SMODS.https")
if not GLOBAL_cry_member_update_thread then local last_update_time = 0
-- start up the HTTPS thread if needed local initial = true
local file_data = assert(NFS.newFileData(Cryptid.mod_path .. "https/thread.lua")) Cryptid.member_count = member_fallback
GLOBAL_cry_member_update_thread = love.thread.newThread(file_data) local function apply_discord_member_count(code, body, headers)
GLOBAL_cry_member_update_thread:start() if body then
end Cryptid.member_count = string.match(body, '"approximate_member_count"%s*:%s*(%d+)')
local old = GLOBAL_cry_member_count or 5624
-- get the HTTPS thread's value for Cryptid members
local ret = love.thread.getChannel("member_count"):pop()
if ret then
GLOBAL_cry_member_count = string.match(ret, '"approximate_member_count"%s*:%s*(%d+)') -- string matching a json is odd but should be fine?
end
if not GLOBAL_cry_member_count then
GLOBAL_cry_member_count = old
-- Something failed, print the error
local error = love.thread.getChannel("member_error"):pop()
if error then
sendDebugMessage(error)
end
end
else
-- Use a fallback value if HTTPS is disabled (you all are awesome)
GLOBAL_cry_member_count = 20000
end end
end end
function Cryptid.update_member_count()
if Cryptid_config.HTTPS then
if (os.time() - last_update_time >= 60) or initial then
initial = false
last_update_time = os.time()
https.asyncRequest(
"https://discord.com/api/v10/invites/eUf9Ur6RyB?with_counts=true" .. "&v=" .. tostring(os.time()),
apply_discord_member_count
)
end
end --you all are awesome :)
end

View file

@ -18,7 +18,7 @@ function loc_colour(_c, _default)
end end
-- More advanced version of find joker for things that need to find very specific things -- More advanced version of find joker for things that need to find very specific things
function advanced_find_joker(name, rarity, edition, ability, non_debuff, area) function Cryptid.advanced_find_joker(name, rarity, edition, ability, non_debuff, area)
local jokers = {} local jokers = {}
if not G.jokers or not G.jokers.cards then if not G.jokers or not G.jokers.cards then
return {} return {}
@ -63,7 +63,7 @@ function advanced_find_joker(name, rarity, edition, ability, non_debuff, area)
end end
if if
edition edition
and (v.edition and v.edition.key == edition) --[[ make this use safe_get later? if it's possible anyways]] and (v.edition and v.edition.key == edition) --[[ make this use Cryptid.safe_get later? if it's possible anyways]]
then then
check = check + 1 check = check + 1
end end
@ -104,7 +104,7 @@ function advanced_find_joker(name, rarity, edition, ability, non_debuff, area)
end end
if if
edition edition
and (v.edition and v.edition.key == edition) --[[ make this use safe_get later? if it's possible anyways]] and (v.edition and v.edition.key == edition) --[[ make this use Cryptid.safe_get later? if it's possible anyways]]
then then
check = check + 1 check = check + 1
end end
@ -175,29 +175,62 @@ function Card:set_sprites(_center, _front)
end end
end end
function cry_edition_to_table(edition) -- look mom i figured it out (this does NOT need to be a function)
if edition then
return { [edition] = true }
end
end
-- simple plural s function for localisation -- simple plural s function for localisation
function cry_pls(str, vars) function Cryptid.pluralize(str, vars)
if string.sub(str, 1, 1) == "p" or string.sub(str, 1, 1) == "s" or string.sub(str, 1, 1) == "y" then local inside = str:match("<(.-)>") -- finds args
num = vars[tonumber(string.sub(str, 2, -1))] local _table = {}
if num then if inside then
if math.abs(to_big(num) - 1) > to_big(0.001) then for v in inside:gmatch("[^,]+") do -- adds args to array
return string.sub(str, 1, 1) == "y" and "ies" or "s" table.insert(_table, v)
else end
return string.sub(str, 1, 1) == "y" and "y" or "" local num = vars[tonumber(string.match(str, ">(%d+)"))] -- gets reference variable
local plural = _table[1] -- default
local checks = { [1] = "=" } -- checks 1 by default
local checks1mod = false -- tracks if 1 was modified
if #_table > 1 then
for i = 2, #_table do
local isnum = tonumber(_table[i])
if isnum then
if not checks1mod then
checks[1] = nil
end -- dumb stuff
checks[isnum] = "<" .. (_table[i + 1] or "") -- do less than for custom values
if isnum == 1 then
checks1mod = true
end
i = i + 1
elseif i == 2 then
checks[1] = "=" .. _table[i]
end end
end end
end end
return false -- idk it doesn't really matter local function fch(str, c)
return string.sub(str, 1, 1) == c -- gets first char and returns boolean
end
local keys = {}
for k in pairs(checks) do
table.insert(keys, k)
end
table.sort(keys, function(a, b)
return a < b
end)
for _, k in ipairs(keys) do
if fch(checks[k], "=") then
if math.abs(to_big(num) - k) < to_big(0.001) then
return string.sub(checks[k], 2, -1)
end
elseif fch(checks[k], "<") then
if to_big(num) < to_big(k - 0.001) then
return string.sub(checks[k], 2, -1)
end
end
end
return plural
end
end end
-- generate a random edition (e.g. Antimatter Deck) -- generate a random edition (e.g. Antimatter Deck)
function cry_poll_random_edition() function Cryptid.poll_random_edition()
local random_edition = pseudorandom_element(G.P_CENTER_POOLS.Edition, pseudoseed("cry_ant_edition")) local random_edition = pseudorandom_element(G.P_CENTER_POOLS.Edition, pseudoseed("cry_ant_edition"))
while random_edition.key == "e_base" do while random_edition.key == "e_base" do
random_edition = pseudorandom_element(G.P_CENTER_POOLS.Edition, pseudoseed("cry_ant_edition")) random_edition = pseudorandom_element(G.P_CENTER_POOLS.Edition, pseudoseed("cry_ant_edition"))
@ -207,7 +240,7 @@ function cry_poll_random_edition()
end end
-- gets a random, valid consumeable (used for Hammerspace, CCD Deck, Blessing, etc.) -- gets a random, valid consumeable (used for Hammerspace, CCD Deck, Blessing, etc.)
function get_random_consumable(seed, excluded_flags, banned_card, pool, no_undiscovered) function Cryptid.random_consumable(seed, excluded_flags, banned_card, pool, no_undiscovered)
-- set up excluded flags - these are the kinds of consumables we DON'T want to have generating -- set up excluded flags - these are the kinds of consumables we DON'T want to have generating
excluded_flags = excluded_flags or { "hidden", "no_doe", "no_grc" } excluded_flags = excluded_flags or { "hidden", "no_doe", "no_grc" }
local selection = "n/a" local selection = "n/a"
@ -222,7 +255,7 @@ function get_random_consumable(seed, excluded_flags, banned_card, pool, no_undis
-- check if it is valid -- check if it is valid
if selection.discovered or not no_undiscovered then if selection.discovered or not no_undiscovered then
for k, v in pairs(excluded_flags) do for k, v in pairs(excluded_flags) do
if not center_no(selection, v, key, true) then if not Cryptid.no(selection, v, key, true) then
--Makes the consumable invalid if it's a specific card unless it's set to --Makes the consumable invalid if it's a specific card unless it's set to
--I use this so cards don't create copies of themselves (eg potential inf Blessing chain, Hammerspace from Hammerspace...) --I use this so cards don't create copies of themselves (eg potential inf Blessing chain, Hammerspace from Hammerspace...)
if not banned_card or (banned_card and banned_card ~= key) then if not banned_card or (banned_card and banned_card ~= key) then
@ -253,7 +286,7 @@ function Card:is_jolly()
return false return false
end end
function cry_with_deck_effects(card, func) function Cryptid.with_deck_effects(card, func)
if not card.added_to_deck then if not card.added_to_deck then
return func(card) return func(card)
else else
@ -264,7 +297,7 @@ function cry_with_deck_effects(card, func)
end end
end end
function cry_deep_copy(obj, seen) function Cryptid.deep_copy(obj, seen)
if type(obj) ~= "table" then if type(obj) ~= "table" then
return obj return obj
end end
@ -275,7 +308,7 @@ function cry_deep_copy(obj, seen)
local res = setmetatable({}, getmetatable(obj)) local res = setmetatable({}, getmetatable(obj))
s[obj] = res s[obj] = res
for k, v in pairs(obj) do for k, v in pairs(obj) do
res[cry_deep_copy(k, s)] = cry_deep_copy(v, s) res[Cryptid.deep_copy(k, s)] = Cryptid.deep_copy(v, s)
end end
return res return res
end end
@ -285,11 +318,11 @@ function SMODS.current_mod.reset_game_globals(run_start)
end end
--Used for m vouchers, perhaps this can have more applications in the future --Used for m vouchers, perhaps this can have more applications in the future
function get_m_jokers() function Cryptid.get_m_jokers()
local mcount = 0 local mcount = 0
if G.jokers then if G.jokers then
for i = 1, #G.jokers.cards do for i = 1, #G.jokers.cards do
if safe_get(G.jokers.cards[i], "pools", "M") then if Cryptid.safe_get(G.jokers.cards[i].config.center, "pools", "M") then
mcount = mcount + 1 mcount = mcount + 1
end end
if G.jokers.cards[i].ability.name == "cry-mprime" then if G.jokers.cards[i].ability.name == "cry-mprime" then
@ -325,16 +358,16 @@ function Card:no(m, no_no)
return Card.no(self, "no_" .. m, true) return Card.no(self, "no_" .. m, true)
end end
function center_no(center, m, key, no_no) function Cryptid.no(center, m, key, no_no)
if no_no then if no_no then
return center[m] or (G.GAME and G.GAME[m] and G.GAME[m][key]) or false return center[m] or (G.GAME and G.GAME[m] and G.GAME[m][key]) or false
end end
return center_no(center, "no_" .. m, key, true) return Cryptid.no(center, "no_" .. m, key, true)
end end
--todo: move to respective stake file --todo: move to respective stake file
--[from pre-refactor] make this always active to prevent crashes --[from pre-refactor] make this always active to prevent crashes
function cry_apply_ante_tax() function Cryptid.apply_ante_tax()
if G.GAME.modifiers.cry_ante_tax then if G.GAME.modifiers.cry_ante_tax then
local tax = math.max( local tax = math.max(
0, 0,
@ -348,7 +381,7 @@ end
--Changes main menu colors and stuff --Changes main menu colors and stuff
--has to be modified with new enabling system --has to be modified with new enabling system
if true then --Cryptid.enabled["Menu"] then if Cryptid_config.menu then
local oldfunc = Game.main_menu local oldfunc = Game.main_menu
Game.main_menu = function(change_context) Game.main_menu = function(change_context)
local ret = oldfunc(change_context) local ret = oldfunc(change_context)
@ -408,7 +441,7 @@ end
-- just dumping this garbage here -- just dumping this garbage here
-- this just ensures that extra voucher slots work as expected -- this just ensures that extra voucher slots work as expected
function cry_bonusvouchermod(mod) function Cryptid.bonus_voucher_mod(mod)
if not G.GAME.shop then if not G.GAME.shop then
return return
end end
@ -432,7 +465,7 @@ function cry_bonusvouchermod(mod)
{ bypass_discovery_center = true, bypass_discovery_ui = true } { bypass_discovery_center = true, bypass_discovery_ui = true }
) )
card.shop_cry_bonusvoucher = #curr_bonus card.shop_cry_bonusvoucher = #curr_bonus
cry_misprintize(card) Cryptid.misprintize(card)
if G.GAME.events.ev_cry_choco2 then if G.GAME.events.ev_cry_choco2 then
card.misprint_cost_fac = (card.misprint_cost_fac or 1) * 2 card.misprint_cost_fac = (card.misprint_cost_fac or 1) * 2
card:set_cost() card:set_cost()
@ -455,6 +488,27 @@ function cry_bonusvouchermod(mod)
end end
end end
function Cryptid.save()
local data = {
shinytags = {},
}
data.shinytags = copy_table(Cryptid.shinytagdata)
compress_and_save(G.SETTINGS.profile .. "/" .. "cryptidsave.jkr", STR_PACK(data))
end
local sppref = set_profile_progress
function set_profile_progress()
sppref()
if not Cryptid.shinytagdata.init then
for k, v in pairs(G.P_TAGS) do
if Cryptid.shinytagdata[k] == nil then
Cryptid.shinytagdata.init = true
Cryptid.shinytagdata[k] = false
end
end
end
end
Cryptid.big_num_whitelist = { Cryptid.big_num_whitelist = {
j_ride_the_bus = true, j_ride_the_bus = true,
j_egg = true, j_egg = true,
@ -505,7 +559,7 @@ Cryptid.big_num_whitelist = {
j_cry_mprime = true, j_cry_mprime = true,
} }
function is_card_big(joker) function Cryptid.is_card_big(joker)
local center = joker.config and joker.config.center local center = joker.config and joker.config.center
if not center then if not center then
return false return false
@ -515,7 +569,10 @@ function is_card_big(joker)
end end
--Utility function to check things without erroring --Utility function to check things without erroring
function safe_get(t, ...) ---@param t table
---@param ... any
---@return table|false
function Cryptid.safe_get(t, ...)
local current = t local current = t
for _, k in ipairs({ ... }) do for _, k in ipairs({ ... }) do
if current[k] == nil then if current[k] == nil then
@ -589,20 +646,20 @@ function Blind:cry_calc_ante_gain()
end end
return 1 return 1
end end
function cry_get_enchanced_deck_info(deck) function Cryptid.enhanced_deck_info(deck)
--only accounts for vanilla stuff at the moment (WIP) --only accounts for vanilla stuff at the moment (WIP)
local edition, enhancement, sticker, suit, seal = local edition, enhancement, sticker, suit, seal =
"e_" .. (safe_get(G.PROFILES, G.SETTINGS.profile, "cry_edeck_edition") or "foil"), "e_" .. (Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "cry_edeck_edition") or "foil"),
safe_get(G.PROFILES, G.SETTINGS.profile, "cry_edeck_enhancement") or "m_bonus", Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "cry_edeck_enhancement") or "m_bonus",
safe_get(G.PROFILES, G.SETTINGS.profile, "cry_edeck_sticker") or "eternal", Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "cry_edeck_sticker") or "eternal",
safe_get(G.PROFILES, G.SETTINGS.profile, "cry_edeck_suit") or "Spades", Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "cry_edeck_suit") or "Spades",
safe_get(G.PROFILES, G.SETTINGS.profile, "cry_edeck_seal") or "Gold" Cryptid.safe_get(G.PROFILES, G.SETTINGS.profile, "cry_edeck_seal") or "Gold"
-- Do Stuff -- Do Stuff
edition = (safe_get(G.P_CENTERS, edition) and edition or "e_foil"):sub(3) edition = (Cryptid.safe_get(G.P_CENTERS, edition) and edition or "e_foil"):sub(3)
enhancement = safe_get(G.P_CENTERS, enhancement) and enhancement or "m_bonus" enhancement = Cryptid.safe_get(G.P_CENTERS, enhancement) and enhancement or "m_bonus"
sticker = safe_get(SMODS.Stickers, sticker) and sticker or "eternal" sticker = Cryptid.safe_get(SMODS.Stickers, sticker) and sticker or "eternal"
suit = safe_get(SMODS.Suits, suit) and suit or "Spades" suit = Cryptid.safe_get(SMODS.Suits, suit) and suit or "Spades"
seal = safe_get(G.P_SEALS, seal) and seal or "Gold" seal = Cryptid.safe_get(G.P_SEALS, seal) and seal or "Gold"
local ret = { local ret = {
edition = edition, edition = edition,
enhancement = enhancement, enhancement = enhancement,
@ -613,7 +670,7 @@ function cry_get_enchanced_deck_info(deck)
for k, _ in pairs(ret) do for k, _ in pairs(ret) do
if G.GAME.modifiers["cry_force_" .. k] and not G.GAME.viewed_back then if G.GAME.modifiers["cry_force_" .. k] and not G.GAME.viewed_back then
ret[k] = G.GAME.modifiers["cry_force_" .. k] ret[k] = G.GAME.modifiers["cry_force_" .. k]
elseif safe_get(deck, "config", "cry_force_" .. k) then elseif Cryptid.safe_get(deck, "config", "cry_force_" .. k) then
ret[k] = deck.config["cry_force_" .. k] ret[k] = deck.config["cry_force_" .. k]
end end
end end
@ -625,7 +682,7 @@ function Cryptid.post_process(center)
center.calculate = function(self, card, context) center.calculate = function(self, card, context)
local ret, trig = vc(self, card, context) local ret, trig = vc(self, card, context)
if context.retrigger_joker_check and context.other_card == card then if context.retrigger_joker_check and context.other_card == card then
local reps = get_m_retriggers(self, card, context) local reps = Cryptid.get_m_retriggers(self, card, context)
if reps > 0 then if reps > 0 then
return { return {
message = localize("k_again_ex"), message = localize("k_again_ex"),
@ -641,7 +698,13 @@ end
-- Wrapper G.FUNCS function to reset localization -- Wrapper G.FUNCS function to reset localization
-- For resetting localization on the fly for family friendly toggle -- For resetting localization on the fly for family friendly toggle
function reload_cryptid_localization() function Cryptid.reload_localization()
SMODS.handle_loc_file(Cryptid.path) SMODS.handle_loc_file(Cryptid.path)
return init_localization() return init_localization()
end end
-- Checks if all jokers in shop will have editions (via Curate, Edition Decks, etc.)
-- Will cause edition tags to Nope!
function Cryptid.forced_edition()
return G.GAME.modifiers.cry_force_edition or G.GAME.used_vouchers.v_cry_curate
end

View file

@ -2,9 +2,9 @@
--Redefine these here because they're always used --Redefine these here because they're always used
Cryptid.base_values = {} Cryptid.base_values = {}
function cry_misprintize_tbl(name, ref_tbl, ref_value, clear, override, stack, big) function Cryptid.misprintize_tbl(name, ref_tbl, ref_value, clear, override, stack, big)
if name and ref_tbl and ref_value then if name and ref_tbl and ref_value then
tbl = cry_deep_copy(ref_tbl[ref_value]) tbl = Cryptid.deep_copy(ref_tbl[ref_value])
for k, v in pairs(tbl) do for k, v in pairs(tbl) do
if (type(tbl[k]) ~= "table") or is_number(tbl[k]) then if (type(tbl[k]) ~= "table") or is_number(tbl[k]) then
if if
@ -24,11 +24,11 @@ function cry_misprintize_tbl(name, ref_tbl, ref_value, clear, override, stack, b
if not Cryptid.base_values[name][k] then if not Cryptid.base_values[name][k] then
Cryptid.base_values[name][k] = tbl[k] Cryptid.base_values[name][k] = tbl[k]
end end
tbl[k] = cry_sanity_check( tbl[k] = Cryptid.sanity_check(
clear and Cryptid.base_values[name][k] clear and Cryptid.base_values[name][k]
or cry_format( or cry_format(
(stack and tbl[k] or Cryptid.base_values[name][k]) (stack and tbl[k] or Cryptid.base_values[name][k])
* cry_log_random( * Cryptid.log_random(
pseudoseed("cry_misprint" .. G.GAME.round_resets.ante), pseudoseed("cry_misprint" .. G.GAME.round_resets.ante),
override and override.min or G.GAME.modifiers.cry_misprint_min, override and override.min or G.GAME.modifiers.cry_misprint_min,
override and override.max or G.GAME.modifiers.cry_misprint_max override and override.max or G.GAME.modifiers.cry_misprint_max
@ -61,11 +61,11 @@ function cry_misprintize_tbl(name, ref_tbl, ref_value, clear, override, stack, b
if not Cryptid.base_values[name][k][_k] then if not Cryptid.base_values[name][k][_k] then
Cryptid.base_values[name][k][_k] = tbl[k][_k] Cryptid.base_values[name][k][_k] = tbl[k][_k]
end end
tbl[k][_k] = cry_sanity_check( tbl[k][_k] = Cryptid.sanity_check(
clear and Cryptid.base_values[name][k][_k] clear and Cryptid.base_values[name][k][_k]
or cry_format( or cry_format(
(stack and tbl[k][_k] or Cryptid.base_values[name][k][_k]) (stack and tbl[k][_k] or Cryptid.base_values[name][k][_k])
* cry_log_random( * Cryptid.log_random(
pseudoseed("cry_misprint" .. G.GAME.round_resets.ante), pseudoseed("cry_misprint" .. G.GAME.round_resets.ante),
override and override.min or G.GAME.modifiers.cry_misprint_min, override and override.min or G.GAME.modifiers.cry_misprint_min,
override and override.max or G.GAME.modifiers.cry_misprint_max override and override.max or G.GAME.modifiers.cry_misprint_max
@ -81,12 +81,12 @@ function cry_misprintize_tbl(name, ref_tbl, ref_value, clear, override, stack, b
ref_tbl[ref_value] = tbl ref_tbl[ref_value] = tbl
end end
end end
function cry_misprintize_val(val, override, big) function Cryptid.misprintize_val(val, override, big)
if is_number(val) then if is_number(val) then
val = cry_sanity_check( val = Cryptid.sanity_check(
cry_format( cry_format(
val val
* cry_log_random( * Cryptid.log_random(
pseudoseed("cry_misprint" .. G.GAME.round_resets.ante), pseudoseed("cry_misprint" .. G.GAME.round_resets.ante),
override and override.min or G.GAME.modifiers.cry_misprint_min, override and override.min or G.GAME.modifiers.cry_misprint_min,
override and override.max or G.GAME.modifiers.cry_misprint_max override and override.max or G.GAME.modifiers.cry_misprint_max
@ -98,7 +98,7 @@ function cry_misprintize_val(val, override, big)
end end
return val return val
end end
function cry_sanity_check(val, is_big) function Cryptid.sanity_check(val, is_big)
if is_big then if is_big then
if not val or type(val) == "number" and (val ~= val or val > 1e300 or val < -1e300) then if not val or type(val) == "number" and (val ~= val or val > 1e300 or val < -1e300) then
val = 1e300 val = 1e300
@ -115,7 +115,7 @@ function cry_sanity_check(val, is_big)
end end
return val return val
end end
function cry_misprintize(card, override, force_reset, stack) function Cryptid.misprintize(card, override, force_reset, stack)
if Card.no(card, "immutable", true) then if Card.no(card, "immutable", true) then
force_reset = true force_reset = true
end end
@ -123,7 +123,7 @@ function cry_misprintize(card, override, force_reset, stack)
if card.infinifusion then if card.infinifusion then
if card.config.center == card.infinifusion_center or card.config.center.key == "j_infus_fused" then if card.config.center == card.infinifusion_center or card.config.center.key == "j_infus_fused" then
calculate_infinifusion(card, nil, function(i) calculate_infinifusion(card, nil, function(i)
cry_misprintize(card, override, force_reset, stack) Cryptid.misprintize(card, override, force_reset, stack)
end) end)
end end
end end
@ -146,15 +146,31 @@ function cry_misprintize(card, override, force_reset, stack)
override.max = override.max * G.GAME.modifiers.cry_jkr_misprint_mod override.max = override.max * G.GAME.modifiers.cry_jkr_misprint_mod
end end
if G.GAME.modifiers.cry_misprint_min or override and override.min then if G.GAME.modifiers.cry_misprint_min or override and override.min then
cry_misprintize_tbl(card.config.center_key, card, "ability", nil, override, stack, is_card_big(card)) Cryptid.misprintize_tbl(
card.config.center_key,
card,
"ability",
nil,
override,
stack,
Cryptid.is_card_big(card)
)
if card.base then if card.base then
cry_misprintize_tbl(card.config.card_key, card, "base", nil, override, stack, is_card_big(card)) Cryptid.misprintize_tbl(
card.config.card_key,
card,
"base",
nil,
override,
stack,
Cryptid.is_card_big(card)
)
end end
end end
if G.GAME.modifiers.cry_misprint_min then if G.GAME.modifiers.cry_misprint_min then
--card.cost = cry_format(card.cost / cry_log_random(pseudoseed('cry_misprint'..G.GAME.round_resets.ante),override and override.min or G.GAME.modifiers.cry_misprint_min,override and override.max or G.GAME.modifiers.cry_misprint_max),"%.2f") --card.cost = cry_format(card.cost / Cryptid.log_random(pseudoseed('cry_misprint'..G.GAME.round_resets.ante),override and override.min or G.GAME.modifiers.cry_misprint_min,override and override.max or G.GAME.modifiers.cry_misprint_max),"%.2f")
card.misprint_cost_fac = 1 card.misprint_cost_fac = 1
/ cry_log_random( / Cryptid.log_random(
pseudoseed("cry_misprint" .. G.GAME.round_resets.ante), pseudoseed("cry_misprint" .. G.GAME.round_resets.ante),
override and override.min or G.GAME.modifiers.cry_misprint_min, override and override.min or G.GAME.modifiers.cry_misprint_min,
override and override.max or G.GAME.modifiers.cry_misprint_max override and override.max or G.GAME.modifiers.cry_misprint_max
@ -162,15 +178,15 @@ function cry_misprintize(card, override, force_reset, stack)
card:set_cost() card:set_cost()
end end
else else
cry_misprintize_tbl(card.config.center_key, card, "ability", true, nil, nil, is_card_big(card)) Cryptid.misprintize_tbl(card.config.center_key, card, "ability", true, nil, nil, Cryptid.is_card_big(card))
end end
if card.ability.consumeable then if card.ability.consumeable then
for k, v in pairs(card.ability.consumeable) do for k, v in pairs(card.ability.consumeable) do
card.ability.consumeable[k] = cry_deep_copy(card.ability[k]) card.ability.consumeable[k] = Cryptid.deep_copy(card.ability[k])
end end
end end
end end
function cry_log_random(seed, min, max) function Cryptid.log_random(seed, min, max)
math.randomseed(seed) math.randomseed(seed)
local lmin = math.log(min, 2.718281828459045) local lmin = math.log(min, 2.718281828459045)
local lmax = math.log(max, 2.718281828459045) local lmax = math.log(max, 2.718281828459045)

Some files were not shown because too many files have changed in this diff Show more