diff --git a/Entropy.lua b/Entropy.lua index 06e173d1..b86860b6 100644 --- a/Entropy.lua +++ b/Entropy.lua @@ -15,6 +15,7 @@ local i = { "hidden", "fixes", "stake", + "tags", "compat/loader" --"glop" } @@ -544,7 +545,7 @@ function SMODS.create_mod_badges(obj, badges) local scale_fac = calced_text_width > max_text_width and max_text_width / calced_text_width or 1 return scale_fac end - if obj.entr_credits.art or obj.entr_credits.code or obj.entr_credits.idea then + if obj.entr_credits.art or obj.entr_credits.code or obj.entr_credits.idea or obj.entr_credits.custom then local scale_fac = {} local min_scale_fac = 1 local strings = { "Entropy" } @@ -556,6 +557,9 @@ function SMODS.create_mod_badges(obj, badges) end end end + if obj.entr_credits.custom then + strings[#strings + 1] = localize({ type="variable", key = obj.entr_credits.custom.key, vars = { obj.entr_credits.custom.text } }) + end for i = 1, #strings do scale_fac[i] = calc_scale_fac(strings[i]) min_scale_fac = math.min(min_scale_fac, scale_fac[i]) @@ -651,24 +655,20 @@ function Controller:key_press_update(key, dt) G.CHOOSE_CARD:align_to_major() end end - - - SMODS.Sound({ - key = "music_entropic", - path = "music_entropic.ogg", + key = "music_zenith", + path = "music_zenith.ogg", select_music_track = function() - return Cryptid_config.Cryptid - and Cryptid_config.Cryptid.exotic_music and not G.GAME.Ruby - and #Cryptid.advanced_find_joker(nil, "entr_hyper_exotic", nil, nil, true) ~= 0 and 1^200 + return G.GAME.Ruby and 10^300 end, }) - SMODS.Sound({ - key = "music_zenith", - path = "music_zenith.ogg", + key = "music_entropic", + path = "music_entropic.ogg", select_music_track = function() - return G.GAME.Ruby and 10^300 + return Entropy.config + and Entropy.config.entropic_music + and #Cryptid.advanced_find_joker(nil, "entr_hyper_exotic", nil, nil, true) ~= 0 and 10^200 end, }) SMODS.Sound({ @@ -718,4 +718,4 @@ local entrConfigTab = function() } end -SMODS.current_mod.config_tab = entrConfigTab \ No newline at end of file +SMODS.current_mod.config_tab = entrConfigTab diff --git a/assets/1x/decks.png b/assets/1x/decks.png index 74281405..33e88fa1 100644 Binary files a/assets/1x/decks.png and b/assets/1x/decks.png differ diff --git a/assets/1x/other_consumables.png b/assets/1x/other_consumables.png index c2f158ec..05bac743 100644 Binary files a/assets/1x/other_consumables.png and b/assets/1x/other_consumables.png differ diff --git a/assets/1x/stickers.png b/assets/1x/stickers.png index 45689771..98838de7 100644 Binary files a/assets/1x/stickers.png and b/assets/1x/stickers.png differ diff --git a/assets/1x/tags.png b/assets/1x/tags.png new file mode 100644 index 00000000..6704ee06 Binary files /dev/null and b/assets/1x/tags.png differ diff --git a/assets/2x/decks.png b/assets/2x/decks.png index d84abb70..19db63a8 100644 Binary files a/assets/2x/decks.png and b/assets/2x/decks.png differ diff --git a/assets/2x/other_consumables.png b/assets/2x/other_consumables.png index 1d4504bf..8ecb9d3e 100644 Binary files a/assets/2x/other_consumables.png and b/assets/2x/other_consumables.png differ diff --git a/assets/2x/stickers.png b/assets/2x/stickers.png index ce4422af..dfeaa645 100644 Binary files a/assets/2x/stickers.png and b/assets/2x/stickers.png differ diff --git a/assets/2x/tags.png b/assets/2x/tags.png new file mode 100644 index 00000000..75df96d0 Binary files /dev/null and b/assets/2x/tags.png differ diff --git a/assets/sounds/woof1.ogg b/assets/sounds/woof1.ogg new file mode 100644 index 00000000..721062a1 Binary files /dev/null and b/assets/sounds/woof1.ogg differ diff --git a/assets/sounds/woof2.ogg b/assets/sounds/woof2.ogg new file mode 100644 index 00000000..1f4f6cec Binary files /dev/null and b/assets/sounds/woof2.ogg differ diff --git a/assets/sounds/woof3.ogg b/assets/sounds/woof3.ogg new file mode 100644 index 00000000..ab402797 Binary files /dev/null and b/assets/sounds/woof3.ogg differ diff --git a/compat/loader.lua b/compat/loader.lua index 65c389be..20f8847c 100644 --- a/compat/loader.lua +++ b/compat/loader.lua @@ -42,7 +42,20 @@ function SMODS.injectItems() LoadCompatibilities() Deobfuscate() loadmodsref() - for i, v in pairs(Entropy.FlipsideInversions) do Entropy.FlipsideInversions[v] = i end + Entropy.FlipsidePureInversions = copy_table(Entropy.FlipsideInversions) + SMODS.ObjectType({ + key = "Twisted", + default = "j_entr_memory_leak", + cards = {}, + inject = function(self) + SMODS.ObjectType.inject(self) + for i, v in pairs(Entropy.FlipsidePureInversions) do + self:inject_card(G.P_CENTERS[v]) + end + end, + }) + SMODS.ObjectTypes.Twisted:inject() + Entropy.ReverseFlipsideInversions() end diff --git a/consumable.lua b/consumable.lua index f553271a..2ac01ed0 100644 --- a/consumable.lua +++ b/consumable.lua @@ -1,62 +1,4 @@ SMODS.Atlas { key = 'miscc', path = 'other_consumables.png', px = 71, py = 95 } -SMODS.Consumable({ - key = "beyond", - set = "RSpectral", - unlocked = true, - discovered = true, - atlas = "miscc", - config = { - - }, - name = "entr-Beyond", - soul_rate = 0, --probably only obtainable from flipsiding a gateway - hidden = true, - --soul_pos = { x = 2, y = 0, extra = { x = 1, y = 0 } }, - use = function(self, card, area, copier) - if not G.GAME.banned_keys then - G.GAME.banned_keys = {} - end - for i, v in pairs(G.jokers.cards) do - G.GAME.banned_keys[v.config.center.key] = true - G.E_MANAGER:add_event(Event({ - trigger = "before", - delay = 0.75, - func = function() - if v.config.center.rarity == "cry_exotic" then - check_for_unlock({ type = "what_have_you_done" }) - end - v:start_dissolve(nil, _first_dissolve) - return true - end, - })) - end - G.E_MANAGER:add_event(Event({ - trigger = "after", - delay = 0.4, - func = function() - play_sound("timpani") - local card = create_card("Joker", G.jokers, nil, "entr_hyper_exotic", nil, nil, nil, "entr_beyond") - card:add_to_deck() - G.jokers:emplace(card) - card:juice_up(0.3, 0.5) - return true - end, - })) - delay(0.6) - end, - can_use = function(self, card) - return true - end, - loc_vars = function(self, q, card) - return { - vars = { - colours = { - {2,2,2,2} - } - } - } - end -}) Entropy.FlipsideInversions = { --spectrals @@ -65,6 +7,8 @@ Entropy.FlipsideInversions = { --tarots --["c_fool"] = "c_entr_fool", --planets + ["c_cry_white_hole"] = "c_entr_pulsar", + ["c_black_hole"] = "c_entr_quasar", --code ["c_cry_crash"] = "c_entr_memory_leak", ["c_cry_payload"] = "c_entr_root_kit", @@ -92,8 +36,6 @@ Entropy.FlipsideInversions = { ["c_cry_reboot"] = "c_entr_bootstrap", ["c_cry_pointer"] = "c_entr_define" } -Entropy.FlipsidePureInversions = copy_table(Entropy.FlipsideInversions) -Entropy.ReverseFlipsideInversions() SMODS.Consumable({ key = "flipside", set = "Spectral", diff --git a/decks.lua b/decks.lua index 4ae10cb0..4cd0c81c 100644 --- a/decks.lua +++ b/decks.lua @@ -29,4 +29,313 @@ SMODS.Back({ apply = function(self) G.GAME.modifiers.ccd2 = true end, -}) \ No newline at end of file +}) + +--chance of beyond showing up is 1 - 0.99^entropy +--chips exp is 0.02 + 0.98^entropy +SMODS.Back({ + object_type = "Back", + name = "Deck of Containment", + key = "doc", + pos = { x = 2, y = 0 }, + order = 1, + atlas = "decks", + apply = function(self) + G.GAME.entropy = 0 + end, + calculate = function(self,back,context) + if context.final_scoring_step and to_big(G.GAME.entropy) > to_big(1) then + if not ({ + ["High Card"]=true, + ["Pair"]=true, + ["Three of a Kind"]=true, + ["Two Pair"]=true, + ["Four of a Kind"]=true, + ["Flush"]=true, + ["Straight"]=true, + ["Straight Flush"]=true, + ["Full House"]=true + })[context.scoring_name] or (G.GAME.hands[context.scoring_name].AscensionPower or 0) > 0 then + ease_entropy(G.GAME.hands[context.scoring_name].level + (G.GAME.hands[context.scoring_name].AscensionPower or 0) or 1) + end + G.E_MANAGER:add_event(Event({ + func = function() + play_sound("talisman_echip", 1) + attention_text({ + scale = 1.4, + text = "^"..tostring(number_format(0.002 + (0.998^G.GAME.entropy))).." Chips", + hold = 2, + align = "cm", + offset = { x = 0, y = -2.7 }, + major = G.play, + }) + return true + end, + })) + return { + Echip_mod = 0.01 + (0.99^G.GAME.entropy), + colour = G.C.DARK_EDITION, + } + end + if context.individual and context.cardarea == G.play then + if context.other_card and (context.other_card.edition or context.other_card.ability.set == "Enhanced") then + if context.other_card.edition and context.other_card.ability.set == "Enhanced" then ease_entropy(4) else ease_entropy(2) end + end + end + end +}) +local use_cardref = G.FUNCS.use_card +G.FUNCS.use_card = function(e, mute, nosave) + local card = e.config.ref_table + if card.config.center.set ~= "Booster" and G.GAME.selected_back.effect.center.original_key == "doc" then + if Entropy.FlipsideInversions[card.config.center.key] and not Entropy.FlipsidePureInversions[card.config.center.key] then + ease_entropy(4) + else + ease_entropy(2) + end + end + use_cardref(e, mute, nosave) +end +SMODS.Booster:take_ownership_by_kind('Spectral', { + create_card = function(self, card, i) + G.GAME.entropy = G.GAME.entropy or 0 + if to_big(pseudorandom("doc")) < to_big(1 - 0.997^G.GAME.entropy) and G.GAME.selected_back.effect.center.original_key == "doc" then + ease_entropy(-G.GAME.entropy) + return create_card("RSpectral", G.pack_cards, nil, nil, true, true, "c_entr_beyond") + elseif to_big(pseudorandom("doc")) < to_big(1 - 0.996^G.GAME.entropy) and G.GAME.selected_back.effect.center.original_key == "doc" then + if to_big(G.GAME.entropy) < to_big(4) then ease_entropy(-G.GAME.entropy) else ease_entropy(-4) end + return create_card("RSpectral", G.pack_cards, nil, nil, true, true, "c_cry_gateway") + end + return {set = "Spectral", area = G.pack_cards, skip_materialize = true, soulable = true, key_append = "spe"} + end +},true) +SMODS.Consumable:take_ownership("cry_gateway",{ + use = function(self, card, area, copier) + if G.GAME.selected_back.effect.center.original_key ~= "doc" then + local deletable_jokers = {} + for k, v in pairs(G.jokers.cards) do + if not v.ability.eternal then + deletable_jokers[#deletable_jokers + 1] = v + end + end + local _first_dissolve = nil + G.E_MANAGER:add_event(Event({ + trigger = "before", + delay = 0.75, + func = function() + for k, v in pairs(deletable_jokers) do + if v.config.center.rarity == "cry_exotic" then + check_for_unlock({ type = "what_have_you_done" }) + end + v:start_dissolve(nil, _first_dissolve) + _first_dissolve = true + end + return true + end, + })) + end + G.E_MANAGER:add_event(Event({ + trigger = "after", + delay = 0.4, + func = function() + play_sound("timpani") + local card = create_card("Joker", G.jokers, nil, "cry_exotic", nil, nil, nil, "cry_gateway") + card:add_to_deck() + G.jokers:emplace(card) + card:juice_up(0.3, 0.5) + return true + end, + })) + delay(0.6) + end +},true) +local uibox_ref = create_UIBox_HUD +function create_UIBox_HUD() + if G.GAME.selected_back.effect.center.original_key ~= "doc" then return uibox_ref() end + local scale = 0.4 + local stake_sprite = get_stake_sprite(G.GAME.stake or 1, 0.5) + + local contents = {} + + local spacing = 0.13 + local temp_col = G.C.DYN_UI.BOSS_MAIN + local temp_col2 = G.C.DYN_UI.BOSS_DARK + contents.round = { + {n=G.UIT.R, config={align = "cm"}, nodes={ + {n=G.UIT.C, config={id = 'hud_hands',align = "cm", padding = 0.05, minw = 1.45, colour = temp_col, emboss = 0.05, r = 0.1}, nodes={ + {n=G.UIT.R, config={align = "cm", minh = 0.33, maxw = 1.35}, nodes={ + {n=G.UIT.T, config={text = localize('k_hud_hands'), scale = 0.85*scale, colour = G.C.UI.TEXT_LIGHT, shadow = true}}, + }}, + {n=G.UIT.R, config={align = "cm", r = 0.1, minw = 1.2, colour = temp_col2}, nodes={ + {n=G.UIT.O, config={object = DynaText({string = {{ref_table = G.GAME.current_round, ref_value = 'hands_left'}}, font = G.LANGUAGES['en-us'].font, colours = {G.C.BLUE},shadow = true, rotate = true, scale = 2*scale}),id = 'hand_UI_count'}}, + }} + }}, + {n=G.UIT.C, config={minw = spacing},nodes={}}, + {n=G.UIT.C, config={align = "cm", padding = 0.05, minw = 1.45, colour = temp_col, emboss = 0.05, r = 0.1}, nodes={ + {n=G.UIT.R, config={align = "cm", minh = 0.33, maxw = 1.35}, nodes={ + {n=G.UIT.T, config={text = localize('k_hud_discards'), scale = 0.85*scale, colour = G.C.UI.TEXT_LIGHT, shadow = true}}, + }}, + {n=G.UIT.R, config={align = "cm"}, nodes={ + {n=G.UIT.R, config={align = "cm", r = 0.1, minw = 1.2, colour = temp_col2}, nodes={ + {n=G.UIT.O, config={object = DynaText({string = {{ref_table = G.GAME.current_round, ref_value = 'discards_left'}}, font = G.LANGUAGES['en-us'].font, colours = {G.C.RED},shadow = true, rotate = true, scale = 2*scale}),id = 'discard_UI_count'}}, + }} + }}, + }}, + }}, + {n=G.UIT.R, config={minh = spacing},nodes={}}, + {n=G.UIT.R, config={align = "cm"}, nodes={ + {n=G.UIT.C, config={align = "cm", padding = 0.05, minw = 1.45*2 + spacing, minh = 1.15, colour = temp_col, emboss = 0.05, r = 0.1}, nodes={ + {n=G.UIT.R, config={align = "cm"}, nodes={ + {n=G.UIT.C, config={align = "cm", r = 0.1, minw = 1.28*2+spacing, minh = 1, colour = temp_col2}, nodes={ + {n=G.UIT.O, config={object = DynaText({string = {{ref_table = G.GAME, ref_value = 'dollars', prefix = localize('$')}}, + scale_function = function () + return scale_number(G.GAME.dollars, 2.2 * scale, 99999, 1000000) + end, maxw = 1.35, colours = {G.C.MONEY}, font = G.LANGUAGES['en-us'].font, shadow = true,spacing = 2, bump = true, scale = 2.2*scale}), id = 'dollar_text_UI'}} + }}, + }}, + }}, + }}, + {n=G.UIT.R, config={minh = spacing},nodes={}}, + {n=G.UIT.R, config={align = "cm"}, nodes={ + {n=G.UIT.C, config={id = 'hud_ante',align = "cm", padding = 0.05, minw = 1.45, minh = 1, colour = temp_col, emboss = 0.05, r = 0.1}, nodes={ + {n=G.UIT.R, config={align = "cm", minh = 0.33, maxw = 1.35}, nodes={ + {n=G.UIT.T, config={text = localize('k_ante'), scale = 0.85*scale, colour = G.C.UI.TEXT_LIGHT, shadow = true}}, + }}, + {n=G.UIT.R, config={align = "cm", r = 0.1, minw = 1.2, colour = temp_col2}, nodes={ + {n=G.UIT.O, config={object = DynaText({string = {{ref_table = G.GAME, ref_value = 'RubyAnteTextNum'}}, colours = {G.C.IMPORTANT},shadow = true, font = G.LANGUAGES['en-us'].font, scale = 2*scale}),id = 'ante_UI_count'}}, + {n=G.UIT.T, config={text = " ", scale = 0.3*scale}}, + {n=G.UIT.T, config={text = "/ ", scale = 0.7*scale, colour = G.C.WHITE, shadow = true}}, + {n=G.UIT.T, config={ref_table = G.GAME, ref_value='win_ante', scale = scale, colour = G.C.WHITE, shadow = true}} + }}, + }}, + {n=G.UIT.C, config={minw = spacing},nodes={}}, + {n=G.UIT.C, config={align = "cm", padding = 0.05, minw = 1.45, minh = 1, colour = temp_col, emboss = 0.05, r = 0.1}, nodes={ + {n=G.UIT.R, config={align = "cm", maxw = 1.35}, nodes={ + {n=G.UIT.T, config={text = localize('k_round'), minh = 0.33, scale = 0.85*scale, colour = G.C.UI.TEXT_LIGHT, shadow = true}}, + }}, + {n=G.UIT.R, config={align = "cm", r = 0.1, minw = 1.2, colour = temp_col2, id = 'row_round_text'}, nodes={ + {n=G.UIT.O, config={object = DynaText({string = {{ref_table = G.GAME, ref_value = 'round'}}, colours = {G.C.IMPORTANT},shadow = true, scale = 2*scale}),id = 'round_UI_count'}}, + }}, + }}, + }}, + } + + contents.hand = + {n=G.UIT.R, config={align = "cm", id = 'hand_text_area', colour = darken(G.C.BLACK, 0.1), r = 0.1, emboss = 0.05, padding = 0.03}, nodes={ + {n=G.UIT.C, config={align = "cm"}, nodes={ + {n=G.UIT.R, config={align = "cm", minh = 1.1}, nodes={ + {n=G.UIT.O, config={id = 'hand_name', func = 'hand_text_UI_set',object = DynaText({string = {{ref_table = G.GAME.current_round.current_hand, ref_value = "handname_text"}}, colours = {G.C.UI.TEXT_LIGHT}, shadow = true, float = true, scale = scale*1.4})}}, + {n=G.UIT.O, config={id = 'cry_asc', func = 'cry_asc_UI_set',object = DynaText({string = {{ref_table = G.GAME.current_round.current_hand, ref_value = "cry_asc_num_text"}}, colours = {G.C.GOLD}, shadow = true, float = true, scale = scale*1})}}, + {n=G.UIT.O, config={id = 'hand_chip_total', func = 'hand_chip_total_UI_set',object = DynaText({string = {{ref_table = G.GAME.current_round.current_hand, ref_value = "chip_total_text"}}, colours = {G.C.UI.TEXT_LIGHT}, shadow = true, float = true, scale = scale*1.4})}}, + {n=G.UIT.T, config={ref_table = G.GAME.current_round.current_hand, ref_value='hand_level', scale = scale, colour = G.C.UI.TEXT_LIGHT, id = 'hand_level', shadow = true}} + }}, + {n=G.UIT.R, config={align = "cm", minh = 1, padding = 0.1}, nodes={ + {n=G.UIT.C, config={align = "cr", minw = 2, minh =1, r = 0.1,colour = G.C.UI_CHIPS, id = 'hand_chip_area', emboss = 0.05}, nodes={ + {n=G.UIT.O, config={func = 'flame_handler',no_role = true, id = 'flame_chips', object = Moveable(0,0,0,0), w = 0, h = 0}}, + {n=G.UIT.O, config={id = 'hand_chips', func = 'hand_chip_UI_set',object = DynaText({string = {{ref_table = G.GAME.current_round.current_hand, ref_value = "chip_text"}}, colours = {G.C.UI.TEXT_LIGHT}, font = G.LANGUAGES['en-us'].font, shadow = true, float = true, scale = scale*2.3})}}, + {n=G.UIT.B, config={w=0.1,h=0.1}}, + }}, + {n=G.UIT.C, config={align = "cm"}, nodes={ + {n=G.UIT.T, config={text = "X", lang = G.LANGUAGES['en-us'], scale = scale*2, colour = G.C.UI_MULT, shadow = true}}, + }}, + {n=G.UIT.C, config={align = "cl", minw = 2, minh=1, r = 0.1,colour = G.C.UI_MULT, id = 'hand_mult_area', emboss = 0.05}, nodes={ + {n=G.UIT.O, config={func = 'flame_handler',no_role = true, id = 'flame_mult', object = Moveable(0,0,0,0), w = 0, h = 0}}, + {n=G.UIT.B, config={w=0.1,h=0.1}}, + {n=G.UIT.O, config={id = 'hand_mult', func = 'hand_mult_UI_set',object = DynaText({string = {{ref_table = G.GAME.current_round.current_hand, ref_value = "mult_text"}}, colours = {G.C.UI.TEXT_LIGHT}, font = G.LANGUAGES['en-us'].font, shadow = true, float = true, scale = scale*2.3})}}, + }} + }} + }} + }} + contents.dollars_chips = {n=G.UIT.R, config={align = "cm",r=0.1, padding = 0,colour = G.C.DYN_UI.BOSS_MAIN, emboss = 0.05, id = 'row_dollars_chips'}, nodes={ + {n=G.UIT.C, config={align = "cm", padding = 0.1}, nodes={ + {n=G.UIT.C, config={align = "cm", minw = 1.3}, nodes={ + {n=G.UIT.R, config={align = "cm", padding = 0, maxw = 1.3}, nodes={ + {n=G.UIT.T, config={text = localize('k_round'), scale = 0.42, colour = G.C.UI.TEXT_LIGHT, shadow = true}} + }}, + {n=G.UIT.R, config={align = "cm", padding = 0, maxw = 1.3}, nodes={ + {n=G.UIT.T, config={text =localize('k_lower_score'), scale = 0.42, colour = G.C.UI.TEXT_LIGHT, shadow = true}} + }} + }}, + {n=G.UIT.C, config={align = "cm", minw = 3.3, minh = 0.7, r = 0.1, colour = G.C.DYN_UI.BOSS_DARK}, nodes={ + {n=G.UIT.O, config={w=0.5,h=0.5 , object = stake_sprite, hover = true, can_collide = false}}, + {n=G.UIT.B, config={w=0.1,h=0.1}}, + {n=G.UIT.T, config={ref_table = G.GAME, ref_value = 'chips_text', lang = G.LANGUAGES['en-us'], scale = 0.85, colour = G.C.WHITE, id = 'chip_UI_count', func = 'chip_UI_set', shadow = true}} + }} + }} + }} + + + contents.buttons = { + {n=G.UIT.C, config={align = "cm", r=0.1, colour = G.C.CLEAR, shadow = true, id = 'button_area',padding=0.33}, nodes={ + {n=G.UIT.R, config={id = 'run_info_button', align = "cm", minh = 1, minw = 1.5,padding = 0.05, r = 0.1, hover = true, colour = G.C.RED, button = "run_info", shadow = true}, nodes={ + {n=G.UIT.R, config={align = "cm", padding = 0, maxw = 2}, nodes={ + {n=G.UIT.T, config={text = localize('b_run_info_1'), scale = 1.2*scale, colour = G.C.UI.TEXT_LIGHT, shadow = true}} + }}, + {n=G.UIT.R, config={align = "cm", padding = 0, maxw = 2}, nodes={ + {n=G.UIT.T, config={text = localize('b_run_info_2'), scale = 1*scale, colour = G.C.UI.TEXT_LIGHT, shadow = true, focus_args = {button = G.F_GUIDE and 'guide' or 'back', orientation = 'bm'}, func = 'set_button_pip'}} + }} + }}, + {n=G.UIT.R, config={align = "cm", minh = 1, minw = 2,padding = 0.05, r = 0.1, hover = true, colour = G.C.ORANGE, button = "options", shadow = true}, nodes={ + {n=G.UIT.C, config={align = "cm", maxw = 1.4, focus_args = {button = 'start', orientation = 'bm'}, func = 'set_button_pip'}, nodes={ + {n=G.UIT.T, config={text = localize('b_options'), scale = scale, colour = G.C.UI.TEXT_LIGHT, shadow = true}} + }}, + }}, + {n=G.UIT.R, config={align = "cm", minh = 1, minw = 2,padding = 0.05, r = 0.1, hover = true, colour=G.C.DYN_UI.BOSS_MAIN,emboss=0.05}, nodes={ + {n=G.UIT.R, config={align = "cm", maxw = 1.35}, nodes={ + {n=G.UIT.T, config={text = localize('k_entropy'), minh = 0.33, scale = 0.85*scale, colour = G.C.UI.TEXT_LIGHT, shadow = true}}, + }}, + {n=G.UIT.R, config={align = "cm", r = 0.1, minw = 1.8, colour = temp_col2, id = 'row_entropy_text'}, nodes={ + {n=G.UIT.O, config={object = DynaText({string = {{ref_table = G.GAME, ref_value = 'entropy'}}, colours = {G.C.IMPORTANT},shadow = true, scale = 2*scale}),id = 'entropy_UI_count'}}, + }}, + }} + }} + } + + return {n=G.UIT.ROOT, config = {align = "cm", padding = 0.03, colour = G.C.UI.TRANSPARENT_DARK}, nodes={ + {n=G.UIT.R, config = {align = "cm", padding= 0.05, colour = G.C.DYN_UI.MAIN, r=0.1}, nodes={ + {n=G.UIT.R, config={align = "cm", colour = G.C.DYN_UI.BOSS_DARK, r=0.1, minh = 30, padding = 0.08}, nodes={ + {n=G.UIT.R, config={align = "cm", minh = 0.3}, nodes={}}, + {n=G.UIT.R, config={align = "cm", id = 'row_blind', minw = 1, minh = 3.75}, nodes={ + {n=G.UIT.B, config={w=0, h=3.64, id = 'row_blind_bottom'}, nodes={}} + }}, + contents.dollars_chips, + contents.hand, + {n=G.UIT.R, config={align = "cm", id = 'row_round'}, nodes={ + {n=G.UIT.C, config={align = "cm"}, nodes=contents.buttons}, + {n=G.UIT.C, config={align = "cm"}, nodes=contents.round} + }}, + }} + }} + }} +end + + +function ease_entropy(mod) + G.E_MANAGER:add_event(Event({ + trigger = 'immediate', + func = function() + local round_UI = G.HUD:get_UIE_by_ID('entropy_UI_count') + mod = mod or 0 + local text = '+' + local col = G.C.IMPORTANT + if to_big(mod) < to_big(0) then + text = '' + col = G.C.RED + end + G.GAME.entropy = (G.GAME.entropy or 0) + mod + G.HUD:recalculate() + attention_text({ + text = text..tostring(math.abs(mod)), + scale = 1, + hold = 0.7, + cover = round_UI.parent, + cover_colour = col, + align = 'cm', + }) + --Play a chip sound + play_sound('timpani', 0.8) + play_sound('generic1') + return true + end + })) +end diff --git a/fixes.lua b/fixes.lua index 1cf52a42..ce814fa3 100644 --- a/fixes.lua +++ b/fixes.lua @@ -360,4 +360,10 @@ function GetArrowString(arrows, size) local str = "" for i = 1, arrows do str = str.."^" end return str..size +end +local load_ref = Blind.load +function Blind:load(blindTable) + if blindTable then + load_ref(self, blindTable) + end end \ No newline at end of file diff --git a/jokers.lua b/jokers.lua index e77d393c..69a4c093 100644 --- a/jokers.lua +++ b/jokers.lua @@ -461,6 +461,7 @@ local pokerhandinforef = G.FUNCS.get_poker_hand_info function G.FUNCS.get_poker_hand_info(_cards) if HasJoker("j_entr_helios") then G.GAME.used_vouchers.v_cry_hyperspacetether = true end local text, loc_disp_text, poker_hands, scoring_hand, disp_text = pokerhandinforef(_cards) + return text, loc_disp_text, poker_hands, scoring_hand, disp_text end diff --git a/localization/en-us.lua b/localization/en-us.lua index 11d96bb4..46b9980d 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -110,7 +110,8 @@ return { "and a card with +1 rank is drawn to the {C:attention}hand{}", "{C:inactive}(Currently: {}{X:dark_edition,C:white}^#2#{} {C:inactive}Chips){}" } - } + }, + }, Blind = { bl_entr_red = { @@ -135,6 +136,17 @@ return { "{C:attention}Joker{}, {C:attention}booster pack{},", "{C:attention}voucher{}, or {C:attention}consumable{}" } + }, + b_entr_doc = { + name = "Deck of Containment", + text = { + "{C:red}Beyond{} has higher chances of showing", + "up and {X:blue,C:white}Chips{} are lowered", + "based on how high your {X:dark_edition,C:white}Entropy{} is", + "Gain {X:dark_edition,C:white}Entropy{} when playing", + "editioned/enhanced cards, secret hands", + "or using consumables" + } } }, RTarot = { @@ -152,7 +164,7 @@ return { name = "Marked Cards", text = { "{C:red}Inverted{} consumables have a", - "fixed {C:red}25%{} chance to replace", + "fixed {C:red}10%{} chance to replace", "their regular counterparts" }, }, @@ -167,7 +179,7 @@ return { name = "Supersede", text = { "{C:red}Twisted{} booster packs have a", - "fixed {C:red}25%{} chance to replace", + "fixed {C:red}20%{} chance to replace", "any other booster pack in the shop" }, }, @@ -352,7 +364,220 @@ return { } } }, - RPlanet = {}, + RPlanet = { + c_entr_pluto = { + name = "Regulus", + text = { + "{S:0.8}({S:0.8,V:1}lvl.#1#{}{S:0.8,C:gold}#2#{}{S:0.8}){} Level up", + "{C:attention}#3#", + "{C:gold}+#4#{} Ascension Power" + } + }, + c_entr_mercury = { + name = "CZ Hydrae", + text = { + "{S:0.8}({S:0.8,V:1}lvl.#1#{}{S:0.8,C:gold}#2#{}{S:0.8}){} Level up", + "{C:attention}#3#", + "{C:gold}+#4#{} Ascension Power" + } + }, + c_entr_venus = { + name = "Vega", + text = { + "{S:0.8}({S:0.8,V:1}lvl.#1#{}{S:0.8,C:gold}#2#{}{S:0.8}){} Level up", + "{C:attention}#3#", + "{C:gold}+#4#{} Ascension Power" + } + }, + c_entr_earth = { + name = "Polaris", + text = { + "{S:0.8}({S:0.8,V:1}lvl.#1#{}{S:0.8,C:gold}#2#{}{S:0.8}){} Level up", + "{C:attention}#3#", + "{C:gold}+#4#{} Ascension Power" + } + }, + c_entr_mars = { + name = "Rho Cassiopeiae", + text = { + "{S:0.8}({S:0.8,V:1}lvl.#1#{}{S:0.8,C:gold}#2#{}{S:0.8}){} Level up", + "{C:attention}#3#", + "{C:gold}+#4#{} Ascension Power" + } + }, + c_entr_jupiter = { + name = "UU Pegasi", + text = { + "{S:0.8}({S:0.8,V:1}lvl.#1#{}{S:0.8,C:gold}#2#{}{S:0.8}){} Level up", + "{C:attention}#3#", + "{C:gold}+#4#{} Ascension Power" + } + }, + c_entr_saturn = { + name = "RS Persei", + text = { + "{S:0.8}({S:0.8,V:1}lvl.#1#{}{S:0.8,C:gold}#2#{}{S:0.8}){} Level up", + "{C:attention}#3#", + "{C:gold}+#4#{} Ascension Power" + } + }, + c_entr_uranus = { + name = "RT Ophiuchi", + text = { + "{S:0.8}({S:0.8,V:1}lvl.#1#{}{S:0.8,C:gold}#2#{}{S:0.8}){} Level up", + "{C:attention}#3#", + "{C:gold}+#4#{} Ascension Power" + } + }, + c_entr_neptune = { + name = "V349 Carinae", + text = { + "{S:0.8}({S:0.8,V:1}lvl.#1#{}{S:0.8,C:gold}#2#{}{S:0.8}){} Level up", + "{C:attention}#3#", + "{C:gold}+#4#{} Ascension Power" + } + }, + c_entr_ceres = { + name = "Procyon B", + text = { + "{S:0.8}({S:0.8,V:1}lvl.#1#{}{S:0.8,C:gold}#2#{}{S:0.8}){} Level up", + "{C:attention}#3#", + "{C:gold}+#4#{} Ascension Power" + } + }, + c_entr_planet_x = { + name = "Tauri", + text = { + "{S:0.8}({S:0.8,V:1}lvl.#1#{}{S:0.8,C:gold}#2#{}{S:0.8}){} Level up", + "{C:attention}#3#", + "{C:gold}+#4#{} Ascension Power" + } + }, + c_entr_eris = { + name = "Sirius B", + text = { + "{S:0.8}({S:0.8,V:1}lvl.#1#{}{S:0.8,C:gold}#2#{}{S:0.8}){} Level up", + "{C:attention}#3#", + "{C:gold}+#4#{} Ascension Power" + } + }, + c_entr_universe = { + name = Cryptid_config.family_mode and "Multiverse" or "The Multiverse In Its Fucking Entirety", + text = { + "{S:0.8}({S:0.8,V:1}lvl.#1#{}{S:0.8,C:gold}#2#{}{S:0.8}){} Level up", + "{C:attention}#3#", + "{C:gold}+#4#{} Ascension Power" + } + }, + c_entr_marsmoons = { + name = "Mizar & Alcor", + text = { + "{S:0.8}({S:0.8,V:1}lvl.#1#{}{S:0.8,C:gold}#2#{}{S:0.8}){} Level up", + "{C:attention}#3#", + "{C:gold}+#4#{} Ascension Power" + } + }, + c_entr_void = { + name = "Dark Matter", + text = { + "{S:0.8}({S:0.8,V:1}lvl.#1#{}{S:0.8,C:gold}#2#{}{S:0.8}){} Level up", + "{C:attention}#3#", + "{C:gold}+#4#{} Ascension Power" + } + }, + c_entr_asteroidbelt = { + name = "Dyson Swarm", + text = { + "{S:0.8}({S:0.8,V:1}lvl.#1#{}{S:0.8,C:gold}#2#{}{S:0.8}){} Level up", + "{C:attention}#3#", + "{C:gold}+#4#{} Ascension Power" + } + }, + c_entr_planetlua = { + name = "Star.lua", + text = { + "{C:green}#1# in #2#{} chance to", + "upgrade every", + "{C:legendary,E:1}poker hand{}", + "{C:gold}+#3#{} Ascension Power", + } + }, + c_entr_nstar = { + name = "Strange Star", + text = { + "Upgrade a random", + "{C:legendary,E:1}poker hand{}", + "{C:attention}+#2#{} {C:gold}Ascension Power{} for each", + "{C:attention}Strange Star{} used", + "in this run", + "{C:inactive}(Currently{C:attention} #1#{C:inactive}){}", + } + }, + c_entr_sunplanet = { + name = "Nemesis", + text = { + "{S:0.8}({S:0.8,V:1}lvl.#1#{S:0.8}){}", + "Increase exponent of", + "{C:attention}Ascended{} hands by {X:gold,C:white}+X#2#{}", + "{C:inactive}(Currently {X:gold,C:white}X(#3#^#4#asc){C:inactive})", + } + }, + c_entr_Sydan = { + name = "Paras", + text = { + "({V:1}lvl.#4#{}{C:gold}#8#{})({V:2}lvl.#5#{}{C:gold}#9#{})({V:3}lvl.#6#{}{C:gold}#10#{})", + "Level up", + "{C:attention}#1#{},", + "{C:attention}#2#{},", + "and {C:attention}#3#{}", + "{C:gold}+#7#{} Ascension Power" + }, + }, + c_entr_Timantti = { + name = "Jatka", + text = { + "({V:1}lvl.#4#{}{C:gold}#8#{})({V:2}lvl.#5#{}{C:gold}#9#{})({V:3}lvl.#6#{}{C:gold}#10#{})", + "Level up", + "{C:attention}#1#{},", + "{C:attention}#2#{},", + "and {C:attention}#3#{}", + "{C:gold}+#7#{} Ascension Power" + }, + }, + c_entr_Klubi = { + name = "Roua", + text = { + "({V:1}lvl.#4#{}{C:gold}#8#{})({V:2}lvl.#5#{}{C:gold}#9#{})({V:3}lvl.#6#{}{C:gold}#10#{})", + "Level up", + "{C:attention}#1#{},", + "{C:attention}#2#{},", + "and {C:attention}#3#{}", + "{C:gold}+#7#{} Ascension Power" + }, + }, + c_entr_Lapio = { + name = "Assa", + text = { + "({V:1}lvl.#4#{}{C:gold}#8#{})({V:2}lvl.#5#{}{C:gold}#9#{})({V:3}lvl.#6#{}{C:gold}#10#{})", + "Level up", + "{C:attention}#1#{},", + "{C:attention}#2#{},", + "and {C:attention}#3#{}", + "{C:gold}+#7#{} Ascension Power" + }, + }, + c_entr_Kaikki = { + name = "Kivi", + text = { + "({V:1}lvl.#4#{}{C:gold}#8#{})({V:2}lvl.#5#{}{C:gold}#9#{})({V:3}lvl.#6#{}{C:gold}#10#{})", + "Level up", + "{C:attention}#1#{},", + "{C:attention}#2#{},", + "and {C:attention}#3#{}", + "{C:gold}+#7#{} Ascension Power" + }, + }, + }, RSpectral = { c_entr_define = { name = "#1#define", @@ -379,7 +604,24 @@ return { "{V:1,E:1}Legendary? {}Joker", "{C:inactive}(Must have room)", }, - } + }, + c_entr_pulsar = { + name = "Pulsar", + text = { + "Upgrade every", + "{C:legendary,E:1}poker hand{}", + "{C:gold}+#1#{} Ascension Power", + } + }, + c_entr_quasar = { + name = "Quasar", + text = { + "Upgrade your most played", + "{C:legendary,E:1}poker hand{} based", + "on its current level", + "{C:gold}+#1#{} Ascension Power", + } + }, }, Spectral = { c_entr_flipside = { @@ -400,7 +642,11 @@ return { }, }, }, - Tag = { + Tag= { + tag_entr_dog = { + name = "Dog Tag", + text = { "Woof.", "{C:inactive}Level {C:dark_edition}#1#" }, + }, }, Other = { inversion_allowed = { @@ -458,6 +704,13 @@ return { "next round" } }, + temporary = { + name = "Temporary", + text = { + "{C:red}Destroyed{} at the end", + "of the round" + } + }, entr_entropic_sticker = { ['name'] = 'Entropic Sticker', ['text'] = { @@ -513,12 +766,21 @@ return { k_entr_faster_ante_scaling = "Scale blind scores quicker if you have an Entropic joker", k_entr_entropic_music = "Entropic Jokers (Joker in Greek by gemstonez)", - k_rplanet = "Star?", + k_rplanet = "Star", b_rplanet_cards = "Star Cards?", + k_planet_multiverse = Cryptid_config.family_mode and "Multiverse" or "The Actual Fucking Multiverse", + k_planet_binary_star = "Binary Star System", + k_planet_dyson_swarm = "Stellar Megastructure", + + k_entropy = "Entropy", + }, + v_dictionary = { + card_art = "Card Art: #1#" }, labels = { entr_pinned = "Invariant", entr_hotfix = "Hotfixed", + temporary = "Temporary", entr_pseudorandom = "Pseudorandom" } }, diff --git a/lovely/dog_tag.toml b/lovely/dog_tag.toml new file mode 100644 index 00000000..e253a6af --- /dev/null +++ b/lovely/dog_tag.toml @@ -0,0 +1,120 @@ +[manifest] +version = "1.0.0" +dump_lua = true +priority = -1 + +# bark bark +[[patches]] +[patches.pattern] +target = "tag.lua" +pattern = '''play_sound('tarot2', math.random()*0.1 + 0.55, 0.09)''' +position = "before" +payload = ''' +if self.key == 'tag_entr_dog' and not self.hide_ability then + play_sound('entr_woof'..math.random(3), 1.26, 0.12); +end''' +match_indent = true + +[[patches]] +[patches.pattern] +target = "tag.lua" +pattern = '''tag_sprite.stop_hover = function(_self) _self.hovering = false; Node.stop_hover(_self); _self.hover_tilt = 0 end''' +position = "after" +payload = ''' +tag_sprite.click = function(_self) + if self.key == 'tag_entr_dog' and self.HUD_tag then + for i = 1, #G.GAME.tags do + local other_cat = G.GAME.tags[i] + if other_cat.key == 'tag_entr_dog' then + if not self.ability.level then self.ability.level = 1 end + if not other_cat.ability.level then other_cat.ability.level = 1 end -- setting ability just doesn't seem to be working... so you get this + if (self.ability.level == other_cat.ability.level) and (other_cat ~= self) and not cry_too_fast_kitty then + cry_too_fast_kitty = true + local perc = (other_cat.ability.level + 1)/10 + if perc > 1 then perc = 1 end + + local edition = G.P_CENTER_POOLS.Edition[1] + local j = 1 + while j < other_cat.ability.level + 1 do + for i = 2, #G.P_CENTER_POOLS.Edition do + j = j + 1 + if j >= other_cat.ability.level + 1 then + edition = G.P_CENTER_POOLS.Edition[i] + break + end + end + end + + G.E_MANAGER:add_event(Event({ + delay = 0.0, + trigger = 'immediate', + func = (function() + attention_text({ + text = ""..other_cat.ability.level, + colour = G.C.WHITE, + scale = 1, + hold = 0.3/G.SETTINGS.GAMESPEED, + cover = other_cat.HUD_tag, + cover_colour = G.C.DARK_EDITION, + align = 'cm', + }) + play_sound('generic1', 0.8 + perc/2, 0.6) + play_sound('multhit1', 0.9 + perc/2, 0.4) + return true + end) + })) + G.E_MANAGER:add_event(Event({ + delay = 0.0, + trigger = 'immediate', + func = (function() + attention_text({ + text = "-", + colour = G.C.WHITE, + scale = 1, + hold = 0.3/G.SETTINGS.GAMESPEED, + cover = self.HUD_tag, + cover_colour = G.C.RED, + align = 'cm', + }) + return true + end) + })) + G.E_MANAGER:add_event(Event({ + func = (function() + self.HUD_tag.states.visible = false + return true + end) + })) + G.E_MANAGER:add_event(Event({ -- i have no idea what this does but i'm not messing with it + func = func + })) + + other_cat.ability.level = other_cat.ability.level + 1 + + if self.ability.shiny then + if not Cryptid.shinytagdata[self.key] then + Cryptid.shinytagdata[self.key] = true + Cryptid.save() + end + end + + G.E_MANAGER:add_event(Event({ + trigger = 'after', + delay = 0.7, + func = (function() + other_cat:juice_up(0.25, 0.1) + other_cat.ability.edshader = edition.shader + play_sound(edition.sound.sound, (edition.sound.per or 1)*1.3, (edition.sound.vol or 0.25)*0.6) + self:remove() + cry_too_fast_kitty = nil + return true + end) + })) + break + end + end + end + end +end +''' +match_indent = true \ No newline at end of file diff --git a/reverseCodes.lua b/reverseCodes.lua index 2e8aba85..5086d20b 100644 --- a/reverseCodes.lua +++ b/reverseCodes.lua @@ -18,6 +18,7 @@ SMODS.Consumable({ config = { }, + no_collection = true, pos = {x=0,y=1}, use = function(self, card, area, copier) error("\nx.x\nAw Snap!\nSomething went wrong whilst displaying this webpage.\n\nLearn More.") @@ -434,6 +435,9 @@ function end_round() }) end end + if card.ability.temporary then + card:start_dissolve() + end if card.ability.entr_pseudorandom then card.ability.entr_pseudorandom = false card.ability.cry_rigged = false @@ -1806,6 +1810,7 @@ SMODS.Consumable({ return #G.hand.highlighted > 0 end, loc_vars = function(self, q, card) + q[#q+1] = {key = "temporary", set="Other"} end, entr_credits = { idea = { @@ -1813,6 +1818,43 @@ SMODS.Consumable({ }, }, }) +SMODS.Sticker({ + atlas = "entr_stickers", + pos = { x = 3, y = 1 }, + key = "temporary", + no_sticker_sheet = true, + prefix_config = { key = false }, + badge_colour = HEX("FF0000"), + 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["entr_temporary2"] then + G.shared_stickers["entr_temporary2"] = + Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS["entr_stickers"], { x = 2, y = 1 }) + end -- no matter how late i init this, it's always late, so i'm doing it in the damn draw function + + G.shared_stickers[self.key].role.draw_major = card + G.shared_stickers["entr_temporary2"].role.draw_major = card + + 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... + G.shared_stickers["entr_temporary2"]:draw_shader("dissolve", nil, nil, notilt, card.children.center) + G.shared_stickers["entr_temporary2"]:draw_shader( + "hologram", + nil, + card.ARGS.send_to_shader, + notilt, + card.children.center + ) -- this doesn't really do much tbh, but the slight effect is nice + card.hover_tilt = card.hover_tilt * 2 + end, + apply = function(self,card,val) + card.ability.temporary = true + end, +}) function CardArea:get_card(card, discarded_only) if not self.cards then return end local _cards = discarded_only and {} or self.cards @@ -1830,17 +1872,6 @@ function CardArea:get_card(card, discarded_only) end return card end -local draw_ref = draw_card -function draw_card(from, to, percent, dir, sort, card, delay, mute, stay_flipped, vol, discarded_only) - if ((to == G.discard or to == G.deck) and (from == G.hand or from == G.play or from == G.discard)) - and from:get_card(card) and from:get_card(card).ability and from:get_card(card).ability.temporary then - card = from:remove_card(card) - card:start_dissolve() - --return card - else - return draw_ref(from, to, percent, dir, sort, card, delay, mute, stay_flipped, vol, discarded_only) - end -end function AreaExists(area) if area.config.type == "shop" then return G.STATE == G.STATES.SHOP end if area.config.type == "hand" then return G.STATE == G.STATES.SELECTING_HAND end @@ -1956,7 +1987,7 @@ function G.FUNCS.get_poker_hand_info(_cards) if G.GAME.hands[text] and G.GAME.hands[text].AscensionPower then G.GAME.current_round.current_hand.cry_asc_num = G.GAME.current_round.current_hand.cry_asc_num + G.GAME.hands[text].AscensionPower end - + G.GAME.current_round.current_hand.cry_asc_num = (G.GAME.current_round.current_hand.cry_asc_num or 0) * (1+(G.GAME.nemesisnumber or 0)) G.GAME.current_round.current_hand.cry_asc_num_text = ( G.GAME.current_round.current_hand.cry_asc_num and ((type(G.GAME.current_round.current_hand.cry_asc_num) == "table" and G.GAME.current_round.current_hand.cry_asc_num:gt(to_big(0)) or G.GAME.current_round.current_hand.cry_asc_num > 0)) ) @@ -2039,55 +2070,6 @@ Entropy.ExoticPlusPlus = { ["cry_exotic"] = true, ["entr_hyper_exotic"] = true } -SMODS.Consumable({ - key = "define", - set = "RSpectral", - unlocked = true, - discovered = true, - atlas = "miscc", - config = { - - }, - name = "entr-Define", - hidden = true, - pos = {x=4,y=4}, - --soul_pos = { x = 2, y = 0, extra = { x = 1, y = 0 } }, - use = function(self, card, area, copier) - if not G.GAME.DefineKeys then - G.GAME.DefineKeys = {} - end - - G.GAME.USING_CODE = true - G.GAME.USING_DEFINE = true - G.ENTERED_CARD = "" - G.CHOOSE_CARD = UIBox({ - definition = G.FUNCS.create_UIBox_define(card), - config = { - align = "cm", - offset = { x = 0, y = 10 }, - major = G.ROOM_ATTACH, - bond = "Weak", - instance_type = "POPUP", - }, - }) - G.CHOOSE_CARD.alignment.offset.y = 0 - G.ROOM.jiggle = G.ROOM.jiggle + 1 - G.CHOOSE_CARD:align_to_major() - end, - can_use = function(self, card) - return GetSelectedCards() > 1 and GetSelectedCards() < 3 and GetSelectedCard() and GetSelectedCard().config.center.key ~= "j_entr_ruby" - end, - loc_vars = function(self, q, card) - return { - vars = { - "#", - colours = { - HEX("ff00c4") - } - } - } - end, -}) function GetSelectedCard() for i, v in pairs(G) do diff --git a/reverseLegendaries.lua b/reverseLegendaries.lua index 0d20391f..73acf071 100644 --- a/reverseLegendaries.lua +++ b/reverseLegendaries.lua @@ -139,7 +139,8 @@ Entropy.BoosterSets = { ["Tarot"] = "p_arcana_mega_1", ["Planet"] = "p_celestial_mega_1", ["Code"] = "p_cry_code_mega_1", - ["RCode"] = "p_entr_twisted_pack_mega" + ["RCode"] = "p_entr_twisted_pack_mega", + ["RPlanet"] = "p_entr_twisted_pack_mega", } SMODS.Joker({ diff --git a/reversePlanets.lua b/reversePlanets.lua index 685e0ec5..8fd6c337 100644 --- a/reversePlanets.lua +++ b/reversePlanets.lua @@ -8,7 +8,7 @@ function create_UIBox_current_hand_row(handname, simple) {n=G.UIT.R, config={align = "cm", padding = 0.05, r = 0.1, colour = darken(G.C.JOKER_GREY, 0.1), emboss = 0.05, hover = true, force_focus = true, on_demand_tooltip = {text = localize(handname, 'poker_hand_descriptions'), filler = {func = create_UIBox_hand_tip, args = handname}}}, nodes={ {n=G.UIT.C, config={align = "cl", padding = 0, minw = 5}, nodes={ {n=G.UIT.C, config={align = "cm", padding = 0.05, colour = G.C.BLACK,r = 0.1}, nodes={ - {n=G.UIT.C, config={align = "cm", padding = 0.01, r = 0.1, colour = G.C.UI.TEXT_LIGHT, minw = 1.1}, nodes={ + {n=G.UIT.C, config={align = "cm", padding = 0.01, r = 0.1, colour = to_big(G.GAME.hands[handname].level) < to_big(2) and G.C.UI.TEXT_LIGHT or G.C.HAND_LEVELS[math.min(to_big(G.GAME.hands[handname].level):to_number(), 7)], minw = 1.1}, nodes={ {n=G.UIT.T, config={text = localize('k_level_prefix')..number_format(G.GAME.hands[handname].level, 1000000), scale = 0.45, colour = G.C.UI.TEXT_DARK}}, }}, {n=G.UIT.T, config={text = "+", scale = 0.45, colour = G.C.GOLD}}, @@ -54,10 +54,10 @@ function Entropy.ascend_hand(num, hand) -- edit this function at your leisure end if Cryptid.gameset() == "modest" then -- 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.hands[hand].AscensionPower then return num end - if G.GAME.current_round.current_hand.cry_asc_num <= 0 then + if to_big(G.GAME.hands[hand].AscensionPower) <= to_big(0) then return num end return math.max( @@ -66,14 +66,528 @@ function Entropy.ascend_hand(num, hand) -- edit this function at your leisure * ( 1 + 0.1 - + to_big(0.05 * (G.GAME.sunnumber or 0)) - + to_big((0.1 + (0.05 * (G.GAME.sunnumber or 0))) * to_big(G.GAME.hands[hand].AscensionPower or 0)) + + to_big((G.GAME.sunnumber or 0)) + + to_big((0.1 + ((G.GAME.sunnumber or 0))) * to_big(G.GAME.hands[hand].AscensionPower or 0) * (G.GAME.nemesisnumber or 1)) ) ) + elseif HasJoker("j_entr_helios") then + local curr = 1.5 + for i, v in pairs(G.jokers.cards) do + if v.config.center.key == "j_entr_helios" and to_big(v.ability.extra):gt(curr) then curr = v.ability.extra+0.4 end + end + return math.max( + num, + num + * to_big( + (1.75 + ((G.GAME.sunnumber or 0)))):tetrate( + to_big((G.GAME.hands[hand].AscensionPower or 0) * curr * (G.GAME.nemesisnumber or 1))) + ) else return math.max( num, - num * to_big((1.25 + (0.05 * (G.GAME.sunnumber or 0))) ^ to_big(G.GAME.hands[hand].AscensionPower or 0)) + num * to_big((1.25 + ((G.GAME.sunnumber or 0))) ^ to_big((G.GAME.hands[hand].AscensionPower or 0)* (G.GAME.nemesisnumber or 1))) ) + end +end + +function Entropy.ReverseSuitUse(self, card, area, copier, num) + local handnames = card.ability.handnames + for i, v in pairs(handnames) do + Entropy.ReversePlanetUse(v, card, num) + end +end +function Entropy.ReverseSuitLocVars(self, q, card) + return { + vars = { + localize(card.ability.handnames[1], "poker_hands"), + localize(card.ability.handnames[2], "poker_hands"), + localize(card.ability.handnames[3], "poker_hands"), + number_format(G.GAME.hands[card.ability.handnames[1]].level), + number_format(G.GAME.hands[card.ability.handnames[2]].level), + number_format(G.GAME.hands[card.ability.handnames[3]].level), + card.ability.level or 2, + G.GAME.hands[card.ability.handnames[1]].AscensionPower and " + "..number_format(G.GAME.hands[card.ability.handnames[1]].AscensionPower) or "", + G.GAME.hands[card.ability.handnames[2]].AscensionPower and " + "..number_format(G.GAME.hands[card.ability.handnames[2]].AscensionPower) or "", + G.GAME.hands[card.ability.handnames[3]].AscensionPower and " + "..number_format(G.GAME.hands[card.ability.handnames[3]].AscensionPower) or "", + colours = { + ( + to_big(G.GAME.hands[card.ability.handnames[1]].level) == to_big(1) and G.C.UI.TEXT_DARK + or G.C.HAND_LEVELS[to_big(math.min(7, G.GAME.hands[card.ability.handnames[1]].level)):to_number()] + ), + ( + to_big(G.GAME.hands[card.ability.handnames[2]].level) == to_big(1) and G.C.UI.TEXT_DARK + or G.C.HAND_LEVELS[to_big(math.min(7, G.GAME.hands[card.ability.handnames[2]].level)):to_number()] + ), + ( + to_big(G.GAME.hands[card.ability.handnames[3]].level) == to_big(1) and G.C.UI.TEXT_DARK + or G.C.HAND_LEVELS[to_big(math.min(7, G.GAME.hands[card.ability.handnames[3]].level)):to_number()] + ), + }, + }, + } +end +function Entropy.ReversePlanetUse(handname, card, amt) + amt = amt or 1 + local used_consumable = copier or card + card.ability.level = card.ability.level or 2 + delay(0.4) + update_hand_text( + { sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 }, + { handname = localize(handname,'poker_hands'), chips = "...", mult = "...", level = number_format(GAME.hands[handname].AscensionPower + G.GAME.hands[handname].level, 1000000) } + ) + G.GAME.hands[handname].AscensionPower = (G.GAME.hands[handname].AscensionPower or 0) + card.ability.level*amt + G.GAME.hands[handname].visible = true + delay(1.0) + G.E_MANAGER:add_event(Event({ + trigger = "after", + delay = 0.2, + func = function() + play_sound("tarot1") + 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) + Cryptid.pulse_flame(0.01, sunlevel) + used_consumable:juice_up(0.8, 0.5) + G.E_MANAGER:add_event(Event({ + trigger = "after", + blockable = false, + blocking = false, + delay = 1.2, + func = function() + ease_colour(G.C.UI_CHIPS, G.C.BLUE, 1) + ease_colour(G.C.UI_MULT, G.C.RED, 1) + return true + end, + })) + return true + end, + })) + update_hand_text({ sound = "button", volume = 0.7, pitch = 0.9, delay = 0 }, { level = to_big(G.GAME.hands[handname].AscensionPower + G.GAME.hands[handname].level) }) + delay(2.6) + update_hand_text( + { sound = "button", volume = 0.7, pitch = 1.1, delay = 0 }, + { mult = 0, chips = 0, handname = "", level = "" } + ) +end + +SMODS.ConsumableType({ + object_type = "ConsumableType", + key = "RPlanet", + primary_colour = HEX("845baa"), + secondary_colour = HEX("845baa"), + collection_rows = { 6, 6 }, + shop_rate = 0.0, + loc_txt = {}, + default = "c_entr_pluto" +}) + + +function Entropy.RegisterReversePlanet(key, handname, sprite_pos, func, cost,level, name,set_badges,loc_vars,config) + SMODS.Consumable({ + key = key, + set = "RPlanet", + unlocked = true, + discovered = true, + atlas = "miscc", + config = config or { + level = level or 2, + handname = handname + }, + cost = cost, + pos = sprite_pos, + set_card_type_badge = set_badges, + use = function(self, card, area, copier) + if func then func(self, card,area,copier) else Entropy.ReversePlanetUse(card.ability.handname, card) end + end, + bulk_use = function(self, card, area, copier, number) + if func then func(self, card,area,copier,number) else Entropy.ReversePlanetUse(card.ability.handname, card,number) end + end, + can_use = function(self, card) + return true + end, + loc_vars = loc_vars or function(self, q, card) + return { + vars = { + G.GAME.hands[card.ability.handname].level, + G.GAME.hands[card.ability.handname].AscensionPower and (" + "..G.GAME.hands[card.ability.handname].AscensionPower.."") or "", + localize(card.ability.handname,'poker_hands'), + card.ability.level, + colours = { + to_big(G.GAME.hands[card.ability.handname].level < to_big(2)) and G.C.BLACK or G.C.HAND_LEVELS[to_big(math.min(7, G.GAME.hands[card.ability.handname].level)):to_number()] + } + } + } + end, + }) +end +Entropy.ReversePlanets = { + {name="Pair",key="mercury",sprite_pos={x=7,y=0}}, + {name="Three of a Kind",key="venus",sprite_pos={x=8,y=0}}, + {name="Full House",key="earth",sprite_pos={x=9,y=0}}, + {name="Four of a Kind",key="mars",sprite_pos={x=10,y=0}}, + {name="Flush",key="jupiter",sprite_pos={x=11,y=0}}, + {name="Straight",key="saturn",sprite_pos={x=12,y=0}}, + {name="Two Pair",key="uranus",sprite_pos={x=6,y=1}}, + {name="Straight Flush",key="neptune",sprite_pos={x=7,y=1}}, + {name="High Card",key="pluto",sprite_pos={x=6,y=0}}, + {name="Five of a Kind",key="planet_x",sprite_pos={x=9,y=1}}, + {name="Flush House",key="ceres",sprite_pos={x=8,y=1}}, + {name="Flush Five",key="eris",sprite_pos={x=10,y=1}}, + {name="", key="planetlua",sprite_pos={x=8,y=2},prefix = "c_cry_",config = { + level = 2, + odds = 5 + }, + loc_vars = function(self,q,card) + return { + vars = { + card and cry_prob(card.ability.cry_prob, card.ability.odds, card.ability.cry_rigged), + card.ability.odds, + card.ability.level, + } + } + end, + func = function(self,card,area,copier,number) + if number and number ~= 1 then + Entropy.StarLuaBulk(self,card,area,copier,number) + else + Entropy.StarLuaSingle(self,card,area,copier) + end + end + }, + {name="cry_Bulwark", key="asteroidbelt",sprite_pos={x=12,y=1},prefix = "c_cry_",set_badges = function(self, card, badges) + badges[1] = create_badge(localize("k_planet_dyson_swarm"), get_type_colour(self or card.config, card), nil, 1.2) + end}, + {name="cry_Clusterfuck", key="void",sprite_pos={x=11,y=1},prefix = "c_cry_",set_badges = function(self, card, badges) + badges[1] = create_badge("", get_type_colour(self or card.config, card), nil, 1.2) + end}, + {name="cry_UltPair", key="marsmoons",sprite_pos={x=6,y=2},prefix = "c_cry_",set_badges = function(self, card, badges) + badges[1] = create_badge(localize("k_planet_binary_star"), get_type_colour(self or card.config, card), nil, 1.2) + end}, + {name="cry_WholeDeck", key="universe",sprite_pos={x=7,y=2},prefix = "c_cry_",set_badges = function(self, card, badges) + badges[1] = create_badge(localize("k_planet_multiverse"), get_type_colour(self or card.config, card), nil, 1.2) + end}, + {name="", key="nstar",sprite_pos={x=9,y=2},prefix = "c_cry_", + loc_vars = function(self,q,card) + return { + vars = { + G.GAME.strange_star or 0, + card.ability.level + } + } + end, + func = function(self,card,area,copier,number) + Entropy.StrangeSingle(self,card,area,copier,number) + end + }, + {name="", key="sunplanet",sprite_pos={x=10,y=2},prefix = "c_cry_", config = {extra = 0.1}, + loc_vars = function(self,q,card) + local levelone = (G.GAME.nemesislevel and G.GAME.nemesislevel or 0) + 1 + local planetcolourone = G.C.HAND_LEVELS[math.min(levelone, 7)] + if levelone == 1 then + planetcolourone = G.C.UI.TEXT_DARK + end + return { + vars = { + (G.GAME.nemesislevel or 0) + 1, + card.ability.extra or 0.1, + (G.GAME.sunnumber and G.GAME.sunnumber or 0) + 1.25, + (G.GAME.nemesisnumber and G.GAME.nemesisnumber > 0 and (G.GAME.nemesisnumber+1) ) or "", + colours = { planetcolourone }, + }, + } + end, + func = function(self,card,area,copier,number) + number = number or 1 + local used_consumable = copier or card + local nemesislevel = (G.GAME.nemesislevel and G.GAME.nemesislevel or 0) + number + G.GAME.nemesislevel = (G.GAME.nemesislevel or 0) + number + delay(0.4) + update_hand_text( + { sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 }, + { handname = localize("cry_asc_hands"), chips = "...", mult = "...", level = to_big(nemesislevel) } + ) + delay(1.0) + G.E_MANAGER:add_event(Event({ + trigger = "after", + delay = 0.2, + func = function() + play_sound("tarot1") + ease_colour(G.C.UI_CHIPS, copy_table(HEX("FF0000")), 0.1) + ease_colour(G.C.UI_MULT, copy_table(HEX("FF0000")), 0.1) + Cryptid.pulse_flame(0.01, nemesislevel) + used_consumable:juice_up(0.8, 0.5) + G.E_MANAGER:add_event(Event({ + trigger = "after", + blockable = false, + blocking = false, + delay = 1.2, + func = function() + ease_colour(G.C.UI_CHIPS, G.C.BLUE, 1) + ease_colour(G.C.UI_MULT, G.C.RED, 1) + return true + end, + })) + return true + end, + })) + update_hand_text({ sound = "button", volume = 0.7, pitch = 0.9, delay = 0 }, { level = to_big(nemesislevel + 1) }) + delay(2.6) + G.GAME.nemesisnumber = (G.GAME.nemesisnumber or 0) + card.ability.extra * number + update_hand_text( + { sound = "button", volume = 0.7, pitch = 1.1, delay = 0 }, + { mult = 0, chips = 0, handname = "", level = "" } + ) + end + }, + {name="", key="Timantti",sprite_pos={x=8,y=3},prefix = "c_cry_", func = Entropy.ReverseSuitUse, config = {level=2,handnames = {"High Card", "Pair", "Two Pair"}}, loc_vars = Entropy.ReverseSuitLocVars}, + {name="", key="Klubi",sprite_pos={x=9,y=3},prefix = "c_cry_", func = Entropy.ReverseSuitUse, config = {level=2,handnames = {"Three of a Kind", "Straight", "Flush"}}, loc_vars = Entropy.ReverseSuitLocVars}, + {name="", key="Sydan",sprite_pos={x=10,y=3},prefix = "c_cry_", func = Entropy.ReverseSuitUse, config = {level=2,handnames = {"Full House", "Four of a Kind", "Straight Flush"}}, loc_vars = Entropy.ReverseSuitLocVars}, + {name="", key="Lapio",sprite_pos={x=11,y=3},prefix = "c_cry_", func = Entropy.ReverseSuitUse, config = {level=2,handnames = {"Five of a Kind", "Flush House", "Flush Five"}}, loc_vars = Entropy.ReverseSuitLocVars}, + {name="", key="Kaikki",sprite_pos={x=12,y=3},prefix = "c_cry_", func = Entropy.ReverseSuitUse, config = {level=2,handnames = {"cry_Bulwark", "cry_Clusterfuck", "cry_UltPair"}}, loc_vars = Entropy.ReverseSuitLocVars}, +} +function Entropy.RegisterReversePlanets() + Entropy.RPlanetLocs = {} + for i, v in pairs(Entropy.ReversePlanets) do + Entropy.RegisterReversePlanet(v.key,v.name,v.sprite_pos,v.func,v.cost,v.level,v.name,v.set_badges,v.loc_vars,v.config) + Entropy.FlipsideInversions[(v.prefix or "c_")..v.key] = "c_entr_"..v.key end +end + +Entropy.RegisterReversePlanets() + + +function Entropy.StarLuaSingle(self,card,area,copier) + local used_consumable = copier or card + if + pseudorandom("starlua") + < cry_prob(card.ability.cry_prob, card.ability.odds, card.ability.cry_rigged) + / card.ability.odds + then --Code "borrowed" from black hole + delay(0.4) + update_hand_text( + { sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 }, + { handname = localize("k_all_hands"), chips = "...", mult = "...", level = "", } + ) + for i, v in pairs(G.GAME.hands) do + v.AscensionPower = (v.AscensionPower or 0) + card.ability.level + v.visible = true + end + delay(1.0) + G.E_MANAGER:add_event(Event({ + trigger = "after", + delay = 0.2, + func = function() + play_sound("tarot1") + 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) + Cryptid.pulse_flame(0.01, 1) + used_consumable:juice_up(0.8, 0.5) + G.E_MANAGER:add_event(Event({ + trigger = "after", + blockable = false, + blocking = false, + delay = 1.2, + func = function() + ease_colour(G.C.UI_CHIPS, G.C.BLUE, 1) + ease_colour(G.C.UI_MULT, G.C.RED, 1) + return true + end, + })) + return true + end, + })) + update_hand_text({ sound = "button", volume = 0.7, pitch = 0.9, delay = 0 }, { level = "+1" }) + delay(2.6) + update_hand_text( + { sound = "button", volume = 0.7, pitch = 1.1, delay = 0 }, + { mult = 0, chips = 0, handname = "", level = "" } + ) + else + G.E_MANAGER:add_event(Event({ + trigger = "after", + delay = 0.4, + func = function() --"borrowed" from Wheel Of Fortune + attention_text({ + text = localize("k_nope_ex"), + scale = 1.3, + hold = 1.4, + major = used_consumable, + backdrop_colour = G.C.SECONDARY_SET.Planet, + align = ( + G.STATE == G.STATES.TAROT_PACK + or G.STATE == G.STATES.SPECTRAL_PACK + or G.STATE == G.STATES.SMODS_BOOSTER_OPENED + ) + and "tm" + or "cm", + offset = { + x = 0, + y = ( + G.STATE == G.STATES.TAROT_PACK + or G.STATE == G.STATES.SPECTRAL_PACK + or G.STATE == G.STATES.SMODS_BOOSTER_OPENED + ) + and -0.2 + or 0, + }, + silent = true, + }) + G.E_MANAGER:add_event(Event({ + trigger = "after", + delay = 0.06 * G.SETTINGS.GAMESPEED, + blockable = false, + blocking = false, + func = function() + play_sound("tarot2", 0.76, 0.4) + return true + end, + })) + play_sound("tarot2", 1, 0.4) + used_consumable:juice_up(0.3, 0.5) + return true + end, + })) + end +end + +function Entropy.StarLuaBulk(self,card,area,copier,number) + local used_consumable = copier or card + if + pseudorandom("starlua") + < cry_prob(card.ability.cry_prob, card.ability.odds, card.ability.cry_rigged) * number + / card.ability.odds + then --Code "borrowed" from black hole + local quota = (cry_prob(card.ability.cry_prob, card.ability.odds, card.ability.cry_rigged) + / card.ability.odds) + delay(0.4) + update_hand_text( + { sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 }, + { handname = localize("k_all_hands"), chips = "...", mult = "...", level = "", } + ) + for i, v in pairs(G.GAME.hands) do + v.AscensionPower = (v.AscensionPower or 0) + card.ability.level*number*quota + v.visible = true + end + delay(1.0) + G.E_MANAGER:add_event(Event({ + trigger = "after", + delay = 0.2, + func = function() + play_sound("tarot1") + 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) + Cryptid.pulse_flame(0.01, 1) + used_consumable:juice_up(0.8, 0.5) + G.E_MANAGER:add_event(Event({ + trigger = "after", + blockable = false, + blocking = false, + delay = 1.2, + func = function() + ease_colour(G.C.UI_CHIPS, G.C.BLUE, 1) + ease_colour(G.C.UI_MULT, G.C.RED, 1) + return true + end, + })) + return true + end, + })) + update_hand_text({ sound = "button", volume = 0.7, pitch = 0.9, delay = 0 }, { level = "+1" }) + delay(2.6) + update_hand_text( + { sound = "button", volume = 0.7, pitch = 1.1, delay = 0 }, + { mult = 0, chips = 0, handname = "", level = "" } + ) + else + G.E_MANAGER:add_event(Event({ + trigger = "after", + delay = 0.4, + func = function() --"borrowed" from Wheel Of Fortune + attention_text({ + text = localize("k_nope_ex"), + scale = 1.3, + hold = 1.4, + major = used_consumable, + backdrop_colour = G.C.SECONDARY_SET.Planet, + align = ( + G.STATE == G.STATES.TAROT_PACK + or G.STATE == G.STATES.SPECTRAL_PACK + or G.STATE == G.STATES.SMODS_BOOSTER_OPENED + ) + and "tm" + or "cm", + offset = { + x = 0, + y = ( + G.STATE == G.STATES.TAROT_PACK + or G.STATE == G.STATES.SPECTRAL_PACK + or G.STATE == G.STATES.SMODS_BOOSTER_OPENED + ) + and -0.2 + or 0, + }, + silent = true, + }) + G.E_MANAGER:add_event(Event({ + trigger = "after", + delay = 0.06 * G.SETTINGS.GAMESPEED, + blockable = false, + blocking = false, + func = function() + play_sound("tarot2", 0.76, 0.4) + return true + end, + })) + play_sound("tarot2", 1, 0.4) + used_consumable:juice_up(0.3, 0.5) + return true + end, + })) + end +end + +function Entropy.StrangeSingle(self, card, area, copier,num) + local used_consumable = copier or card + --Get amount of Neutron stars use this run or set to 0 if nil + G.GAME.strange_star = G.GAME.strange_star or 0 + + --Add +1 to amount of neutron stars used this run + G.GAME.strange_star = G.GAME.strange_star + 1 + local handname = Cryptid.get_random_hand(nil, "sstar" .. G.GAME.round_resets.ante) --Random poker hand + delay(0.4) + update_hand_text( + { sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 }, + { handname = localize(handname,'poker_hands'), chips = "...", mult = "...", level = number_format(.GAME.hands[handname].AscensionPower + G.GAME.hands[handname].level, 1000000) } + ) + G.GAME.hands[handname].AscensionPower = (G.GAME.hands[handname].AscensionPower or 0) + G.GAME.strange_star*(num or 1) + G.GAME.hands[handname].visible = true + delay(1.0) + G.E_MANAGER:add_event(Event({ + trigger = "after", + delay = 0.2, + func = function() + play_sound("tarot1") + 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) + Cryptid.pulse_flame(0.01, sunlevel) + used_consumable:juice_up(0.8, 0.5) + G.E_MANAGER:add_event(Event({ + trigger = "after", + blockable = false, + blocking = false, + delay = 1.2, + func = function() + ease_colour(G.C.UI_CHIPS, G.C.BLUE, 1) + ease_colour(G.C.UI_MULT, G.C.RED, 1) + return true + end, + })) + return true + end, + })) + update_hand_text({ sound = "button", volume = 0.7, pitch = 0.9, delay = 0 }, { level = to_big(G.GAME.hands[handname].AscensionPower + G.GAME.hands[handname].level) }) + delay(2.6) + update_hand_text( + { sound = "button", volume = 0.7, pitch = 1.1, delay = 0 }, + { mult = 0, chips = 0, handname = "", level = "" } + ) end \ No newline at end of file diff --git a/reverseSpectrals.lua b/reverseSpectrals.lua index ec2fbbbc..842f8b53 100644 --- a/reverseSpectrals.lua +++ b/reverseSpectrals.lua @@ -3,7 +3,7 @@ SMODS.ConsumableType({ key = "RSpectral", primary_colour = HEX("ff00c4"), secondary_colour = HEX("ff00c4"), - collection_rows = { 4, 4 }, + collection_rows = { 4, 5 }, shop_rate = 0.0, loc_txt = {}, default = "c_entr_memory_leak" @@ -50,5 +50,275 @@ SMODS.Consumable({ } } } - end + end, + entr_credits = { + custom = {key="card_art", text="gudusername_53951"} + } +}) + +SMODS.Consumable({ + key = "quasar", + set = "RSpectral", + unlocked = true, + discovered = true, + atlas = "miscc", + config = { + level = 3 + }, + soul_rate = 0, + hidden = true, + pos = {x=7,y=3}, + --soul_pos = { x = 5, y = 0}, + use = function(self, card, area, copier,amt) + local amt = amt or 1 + local used_consumable = copier or card + delay(0.4) + local max=0 + local ind="High Card" + for i, v in pairs(G.GAME.hands) do + if v.played > max then + max = v.played + ind = i + end + end + update_hand_text( + { sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 }, + { handname = localize(ind,'poker_hands'), chips = "...", mult = "...", level = "" } + ) + G.GAME.hands[ind].AscensionPower = (G.GAME.hands[ind].AscensionPower or 0) + G.GAME.hands[ind].level * amt * card.ability.level + delay(1.0) + G.E_MANAGER:add_event(Event({ + trigger = "after", + delay = 0.2, + func = function() + play_sound("tarot1") + 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) + Cryptid.pulse_flame(0.01, sunlevel) + used_consumable:juice_up(0.8, 0.5) + G.E_MANAGER:add_event(Event({ + trigger = "after", + blockable = false, + blocking = false, + delay = 1.2, + func = function() + ease_colour(G.C.UI_CHIPS, G.C.BLUE, 1) + ease_colour(G.C.UI_MULT, G.C.RED, 1) + return true + end, + })) + return true + end, + })) + update_hand_text({ sound = "button", volume = 0.7, pitch = 0.9, delay = 0 }, { level = "+"..G.GAME.hands[ind].level..card.ability.level*amt }) + delay(2.6) + update_hand_text( + { sound = "button", volume = 0.7, pitch = 1.1, delay = 0 }, + { mult = 0, chips = 0, handname = "", level = "" } + ) + end, + bulk_use = function(self,card,area,copier,amt) + self.use(self,card,area,copier,amt) + end, + can_use = function(self, card) + return true + end, + loc_vars = function(self, q, card) + local max=0 + local ind="High Card" + for i, v in pairs(G.GAME.hands) do + if v.played > max then + max = v.played + ind = i + end + end + return { + vars = { + G.GAME.hands[ind].level * card.ability.level + } + } + end, +}) + + +SMODS.Consumable({ + key = "pulsar", + set = "RSpectral", + unlocked = true, + discovered = true, + atlas = "miscc", + config = { + level = 4 + }, + soul_rate = 0, + hidden = true, + pos = {x=6,y=3}, + --soul_pos = { x = 5, y = 0}, + use = function(self, card, area, copier,amt) + local amt = amt or 1 + local used_consumable = copier or card + delay(0.4) + update_hand_text( + { sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 }, + { handname = localize('k_all_hands'), chips = "...", mult = "...", level = "" } + ) + for i, v in pairs(G.GAME.hands) do + v.AscensionPower = (v.AscensionPower or 0) + card.ability.level*amt + v.visible = true + end + delay(1.0) + G.E_MANAGER:add_event(Event({ + trigger = "after", + delay = 0.2, + func = function() + play_sound("tarot1") + 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) + Cryptid.pulse_flame(0.01, sunlevel) + used_consumable:juice_up(0.8, 0.5) + G.E_MANAGER:add_event(Event({ + trigger = "after", + blockable = false, + blocking = false, + delay = 1.2, + func = function() + ease_colour(G.C.UI_CHIPS, G.C.BLUE, 1) + ease_colour(G.C.UI_MULT, G.C.RED, 1) + return true + end, + })) + return true + end, + })) + update_hand_text({ sound = "button", volume = 0.7, pitch = 0.9, delay = 0 }, { level = "+"..card.ability.level*amt }) + delay(2.6) + update_hand_text( + { sound = "button", volume = 0.7, pitch = 1.1, delay = 0 }, + { mult = 0, chips = 0, handname = "", level = "" } + ) + end, + bulk_use = function(self,card,area,copier,amt) + self.use(self,card,area,copier,amt) + end, + can_use = function(self, card) + return true + end, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.level + } + } + end, +}) + +SMODS.Consumable({ + key = "define", + set = "RSpectral", + unlocked = true, + discovered = true, + atlas = "miscc", + config = { + + }, + name = "entr-Define", + hidden = true, + pos = {x=4,y=4}, + --soul_pos = { x = 2, y = 0, extra = { x = 1, y = 0 } }, + use = function(self, card, area, copier) + if not G.GAME.DefineKeys then + G.GAME.DefineKeys = {} + end + + G.GAME.USING_CODE = true + G.GAME.USING_DEFINE = true + G.ENTERED_CARD = "" + G.CHOOSE_CARD = UIBox({ + definition = G.FUNCS.create_UIBox_define(card), + config = { + align = "cm", + offset = { x = 0, y = 10 }, + major = G.ROOM_ATTACH, + bond = "Weak", + instance_type = "POPUP", + }, + }) + G.CHOOSE_CARD.alignment.offset.y = 0 + G.ROOM.jiggle = G.ROOM.jiggle + 1 + G.CHOOSE_CARD:align_to_major() + end, + can_use = function(self, card) + return GetSelectedCards() > 1 and GetSelectedCards() < 3 and GetSelectedCard() and GetSelectedCard().config.center.key ~= "j_entr_ruby" + end, + loc_vars = function(self, q, card) + return { + vars = { + "#", + colours = { + HEX("ff00c4") + } + } + } + end, }) + +SMODS.Consumable({ + key = "beyond", + set = "RSpectral", + unlocked = true, + discovered = true, + atlas = "miscc", + config = { + + }, + name = "entr-Beyond", + soul_rate = 0, --probably only obtainable from flipsiding a gateway + hidden = true, + --soul_pos = { x = 2, y = 0, extra = { x = 1, y = 0 } }, + use = function(self, card, area, copier) + if not G.GAME.banned_keys then + G.GAME.banned_keys = {} + end + for i, v in pairs(G.jokers.cards) do + G.GAME.banned_keys[v.config.center.key] = true + G.E_MANAGER:add_event(Event({ + trigger = "before", + delay = 0.75, + func = function() + if v.config.center.rarity ~= "entr_hyper_exotic" or G.GAME.selected_back.effect.center.original_key ~= "doc" then + if v.config.center.rarity == "cry_exotic" then + check_for_unlock({ type = "what_have_you_done" }) + end + v:start_dissolve(nil, _first_dissolve) + end + return true + end, + })) + end + G.E_MANAGER:add_event(Event({ + trigger = "after", + delay = 0.4, + func = function() + play_sound("timpani") + local card = create_card("Joker", G.jokers, nil, "entr_hyper_exotic", nil, nil, nil, "entr_beyond") + card:add_to_deck() + G.jokers:emplace(card) + card:juice_up(0.3, 0.5) + return true + end, + })) + delay(0.6) + end, + can_use = function(self, card) + return true + end, + loc_vars = function(self, q, card) + return { + vars = { + colours = { + {2,2,2,2} + } + } + } + end +}) \ No newline at end of file diff --git a/tags.lua b/tags.lua new file mode 100644 index 00000000..3aa17739 --- /dev/null +++ b/tags.lua @@ -0,0 +1,31 @@ +SMODS.Atlas { + key = 'tags', + path = 'tags.png', + px = 34, + py = 34 + } + +SMODS.Tag({ + atlas = "tags", + pos = { x = 0, y = 0 }, + config = { level = 1 }, + key = "dog", + name = "entr-Dog Tag", + order = 12, + loc_vars = function(self, info_queue, tag) + return { vars = { tag.ability.level or 1 } } + end, +}) + +SMODS.Sound({ + key = "woof1", + path = "woof1.ogg", +}) +SMODS.Sound({ + key = "woof2", + path = "woof2.ogg", +}) +SMODS.Sound({ + key = "woof3", + path = "woof3.ogg", +}) \ No newline at end of file diff --git a/vouchers.lua b/vouchers.lua index 0104d17e..831f33db 100644 --- a/vouchers.lua +++ b/vouchers.lua @@ -48,17 +48,22 @@ local TrumpCardAllow = { } local matref = Card.set_ability function Card:set_ability(center, initial, delay_sprites) + G.GAME.entropy = G.GAME.entropy or 0 if self.config and self.config.center and Entropy.FlipsideInversions and Entropy.FlipsideInversions[self.config.center.key] - and pseudorandom("marked") < 0.25 and G.GAME.Marked and G.STATE == G.STATES.SHOP and (not self.area or not self.area.config.collection) then + and pseudorandom("marked") < 0.10 and G.GAME.Marked and G.STATE == G.STATES.SHOP and (not self.area or not self.area.config.collection) then matref(self, G.P_CENTERS[Entropy.FlipsideInversions[self.config.center.key]], initial, delay_sprites) elseif self.config and self.config.center - and pseudorandom("trump_card") < 0.25 and G.GAME.TrumpCard and G.STATE == G.STATES.SMODS_BOOSTER_OPENED + and pseudorandom("trump_card") < 0.10 and G.GAME.TrumpCard and G.STATE == G.STATES.SMODS_BOOSTER_OPENED and TrumpCardAllow[center.set] and (not self.area or not self.area.config.collection) then matref(self, G.P_CENTERS["c_entr_flipside"], initial, delay_sprites) elseif self.config and self.config.center and self.config.center.set == "Booster" - and pseudorandom("supersede") < 0.25 and G.GAME.Supersede and G.STATE == G.STATES.SHOP and (not self.area or not self.area.config.collection) then + and pseudorandom("supersede") < 0.20 and G.GAME.Supersede and G.STATE == G.STATES.SHOP and (not self.area or not self.area.config.collection) then local type = (center.cost == 6 and "jumbo") or (center.cost == 8 and "mega") or "normal" matref(self, G.P_CENTERS["p_entr_twisted_pack_"..type], initial, delay_sprites) + elseif self.config and self.config.center and self.config.center.set == "Booster" + and to_big(pseudorandom("doc")) < to_big(1-(0.995^G.GAME.entropy)) and G.STATE == G.STATES.SHOP and (not self.area or not self.area.config.collection) and G.GAME.selected_back.effect.center.original_key == "doc" then + local type = (center.cost == 6 and "jumbo_1") or (center.cost == 8 and "mega_1") or "normal_"..pseudorandom_element({1,2},pseudoseed("doc")) + matref(self, G.P_CENTERS["p_spectral_"..type], initial, delay_sprites) else matref(self, center, initial, delay_sprites) end @@ -83,7 +88,7 @@ SMODS.Booster({ group_key = "k_inverted_pack", cost = 4, draw_hand = true, - weight = 0, + weight = 0.75, hidden = true, kind = "Inverted", create_card = function (self, card, i) @@ -113,7 +118,7 @@ SMODS.Booster({ group_key = "k_inverted_pack", cost = 6, draw_hand = true, - weight = 0, + weight = 0.5, hidden = true, kind = "Inverted", create_card = function (self, card, i) @@ -143,7 +148,7 @@ SMODS.Booster({ group_key = "k_inverted_pack", cost = 8, draw_hand = true, - weight = 0, + weight = 0.25, hidden = true, kind = "Inverted", create_card = function (self, card, i) @@ -160,13 +165,10 @@ Entropy.RareInversions = { ["c_entr_fervour"] = "c_entr_fervour" } function create_inverted_card(area, seed) - local c = pseudorandom_element(Entropy.FlipsidePureInversions, pseudoseed(seed or "twisted")) - while not c or not G.P_CENTERS[c] or Entropy.RareInversions[c] do - c = pseudorandom_element(Entropy.FlipsidePureInversions, pseudoseed(seed or "twisted")) - end local num = pseudorandom("twisted_rare") if num - 0.01 <= 0 then - c = pseudorandom_element(Entropy.RareInversions, pseudoseed(seed or "twisted")) + local c = pseudorandom_element(Entropy.RareInversions, pseudoseed(seed or "twisted")) + return create_card(G.P_CENTERS[c].set, area or G.pack_cards, nil, nil, true, true, c) end - return create_card(G.P_CENTERS[c].set, area or G.pack_cards, nil, nil, true, true, c) + return create_card("Twisted", area or G.pack_cards, nil, nil, true, true, nil, "twisted") end \ No newline at end of file