diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..e9d3670 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,171 @@ + +# see https://github.com/CppCXY/EmmyLuaCodeStyle +[*.lua] +# [basic] + +# optional space/tab +indent_style = space +# if indent_style is space, this is valid +indent_size = 4 +# if indent_style is tab, this is valid +tab_width = 4 +# none/single/double +quote_style = double + +continuation_indent = 4 +## extend option +# continuation_indent.before_block = 4 +# continuation_indent.in_expr = 4 +# continuation_indent.in_table = 4 + +# this mean utf8 length , if this is 'unset' then the line width is no longer checked +# this option decides when to chopdown the code +max_line_length = lf + +# optional crlf/lf/cr/auto, if it is 'auto', in windows it is crlf other platforms are lf +# in neovim the value 'auto' is not a valid option, please use 'unset' +end_of_line = auto + +# none/ comma / semicolon / only_kv_colon +table_separator_style = none + +#optional keep/never/always/smart +trailing_table_separator = smart + +# keep/remove/remove_table_only/remove_string_only +call_arg_parentheses = keep + +detect_end_of_line = false + +# this will check text end with new line +insert_final_newline = true + +# [space] +space_around_table_field_list = false + +space_before_attribute = false + +space_before_function_open_parenthesis = false + +space_before_function_call_open_parenthesis = false + +space_before_closure_open_parenthesis = false + +# optional always/only_string/only_table/none +# or true/false +space_before_function_call_single_arg = always +## extend option +## always/keep/none +# space_before_function_call_single_arg.table = always +## always/keep/none +# space_before_function_call_single_arg.string = always + +space_before_open_square_bracket = false + +space_inside_function_call_parentheses = false + +space_inside_function_param_list_parentheses = false + +space_inside_square_brackets = false + +# like t[#t+1] = 1 +space_around_table_append_operator = false + +ignore_spaces_inside_function_call = false + +# detail number or 'keep' +space_before_inline_comment = 1 + +# convert '---' to '--- ' or '--' to '-- ' +space_after_comment_dash = false + +# [operator space] +space_around_math_operator = true +# space_around_math_operator.exponent = false + +space_after_comma = true + +space_after_comma_in_for_statement = true + +# true/false or none/always/no_space_asym +space_around_concat_operator = true + +space_around_logical_operator = true + +# true/false or none/always/no_space_asym +space_around_assign_operator = true + +# [align] + +align_call_args = false + +align_function_params = true + +# true/false or always +align_continuous_assign_statement = true + +align_continuous_rect_table_field = true + +align_continuous_line_space = 2 + +align_if_branch = false + +# option none / always / contain_curly/ +align_array_table = true + +align_continuous_similar_call_args = false + +align_continuous_inline_comment = true +# option none / always / only_call_stmt +align_chain_expr = none + +# [indent] + +never_indent_before_if_condition = false + +never_indent_comment_on_if_branch = false + +keep_indents_on_empty_lines = false + +allow_non_indented_comments = false +# [line space] + +# The following configuration supports four expressions +# keep +# fixed(n) +# min(n) +# max(n) +# for eg. min(2) + +line_space_after_if_statement = fixed(2) + +line_space_after_do_statement = fixed(2) + +line_space_after_while_statement = fixed(2) + +line_space_after_repeat_statement = fixed(2) + +line_space_after_for_statement = fixed(2) + +line_space_after_local_or_assign_statement = max(2) + +line_space_after_function_statement = fixed(2) + +line_space_after_expression_statement = max(2) + +line_space_after_comment = fixed(1) + +line_space_around_block = fixed(1) +# [line break] +break_all_list_when_line_exceed = false + +auto_collapse_lines = false + +break_before_braces = false + +# [preference] +ignore_space_after_colon = false + +remove_call_expression_list_finish_comma = true +# keep / always / same_line / replace_with_newline / never +end_statement_with_semicolon = replace_with_newline diff --git a/manifest.json b/manifest.json index f8949e9..e28ca92 100644 --- a/manifest.json +++ b/manifest.json @@ -1,16 +1,21 @@ { "id": "jane", "name": "Almighty", - "author": ["jenwalter666", "Emik"], + "author": [ + "jenwalter666", + "Emik" + ], "description": "Fork of Jen's almanac that rebalances the mod by heavily toning down on the power creep and cutting out anything deemed not essential. Made out of genuine love for the original mod.", "prefix": "jane", "main_file": "src/main.lua", "badge_colour": "3c3cff", - "priority": 114, + "priority": 114, "dependencies": [ "Steamodded (>=1.0.0~ALPHA-1304a)", "Bakery (>=0.1.26~*)" ], - "conflicts": ["Jen"], - "version": "1.0.0" + "conflicts": [ + "Jen" + ], + "version": "1.0.1" } \ No newline at end of file diff --git a/src/back.lua b/src/back.lua index 361f33f..bc46567 100644 --- a/src/back.lua +++ b/src/back.lua @@ -2,7 +2,7 @@ SMODS.Atlas { px = 71, py = 95, key = "janedecks", - path = Jane.config.texture_pack .. "/b_jane_decks.png" + path = Jane.config.texture_pack .. "/b_jane_decks.png", } local eternal_text = Cryptid and "Absolute" or "Eternal" @@ -19,7 +19,7 @@ SMODS.Back { Cryptid and "set {C:attention}ante {}to the {C:attention}next" or "", Cryptid and "{C:attention}triangle number {}and create" or "", Cryptid and "an {C:spectral,E:1}Empowered Tag" or "create a {C:dark_edition}Negative {C:spectral,E:1}Soul", - } + }, }, apply = function(_) G.GAME.win_ante = Cryptid and G.GAME.win_ante * (G.GAME.win_ante + 1) / 2 or G.GAME.win_ante * 2 - 1 @@ -32,7 +32,7 @@ SMODS.Back { return true end) end - end + end, } local function add_rain_world_joker() @@ -77,8 +77,8 @@ SMODS.Back { text = { "Start with a {C:legendary}Rain World Joker", "Create another when", - "{C:attention}Boss Blind {}is defeated" - } + "{C:attention}Boss Blind {}is defeated", + }, }, apply = function(_) G.E_MANAGER:add_event(Event({func = add_rain_world_joker})) @@ -101,7 +101,7 @@ SMODS.Back { "playing cards are {C:green,E:1}randomized", "when they are added", "to your possession", - } + }, }, apply = function(_) G.GAME.mysterious = true @@ -110,7 +110,7 @@ SMODS.Back { save_run() return true end) - end + end, } SMODS.Back { @@ -122,11 +122,11 @@ SMODS.Back { text = { "{C:attention}Hidden{} cards {C:inactive}(ex. {C:spectral}The Soul{C:inactive})", "can {C:attention}appear normally{}", - } + }, }, apply = function(_) G.GAME.obsidian = true - end + end, } local function apply_orrery() @@ -154,11 +154,11 @@ SMODS.Back { text = { "{C:attention}Hand stats {}are", "always " .. (Cryptid and "{C:cry_ascendant}" or "{C:attention}") .. "equalized", - } + }, }, apply = function(_) apply_orrery() - end + end, } SMODS.Back { @@ -170,11 +170,11 @@ SMODS.Back { text = { "{C:attention}Ante increases", "{C:attention}half{} as strong", - } + }, }, apply = function(_) G.GAME.tortoise = true - end + end, } local function apply_weeck() @@ -222,11 +222,11 @@ SMODS.Back { "{C:attention}Wee Joker {}and a deck", "containing {C:attention}2 {C:purple,E:1}" .. eternal_text, "{C:attention}2's {}of {C:attention}each suit", - } + }, }, apply = function(_) apply_weeck() - end + end, } SMODS.Back { @@ -238,21 +238,23 @@ SMODS.Back { text = { "Applies the {C:legendary,E:1}upsides", "of {C:attention}every Jane deck", - } + }, }, apply = function(_) apply_orrery() - G.E_MANAGER:add_event(Event({func = function() - local wee = create_card("Joker", G.jokers, nil, nil, nil, nil, "j_wee", "weeck") - G.jokers:emplace(wee) - add_rain_world_joker() - G.GAME.mysterious = true - G.GAME.tortoise = true - G.GAME.obsidian = true - save_run() - return true - end})) + G.E_MANAGER:add_event(Event({ + func = function() + local wee = create_card("Joker", G.jokers, nil, nil, nil, nil, "j_wee", "weeck") + G.jokers:emplace(wee) + add_rain_world_joker() + G.GAME.mysterious = true + G.GAME.tortoise = true + G.GAME.obsidian = true + save_run() + return true + end, + })) end, trigger_effect = function(_, args) G.GAME.mysterious = nil @@ -280,7 +282,7 @@ function ease_ante(mod) if G.GAME.nitro then mod = Cryptid and (G.GAME.round_resets.ante < 0 and -G.GAME.round_resets.ante or - math.ceil(next_triangle_number(G.GAME.round_resets.ante) - G.GAME.round_resets.ante)) or + math.ceil(next_triangle_number(G.GAME.round_resets.ante) - G.GAME.round_resets.ante)) or (mod > 0 and mod * 2 or mod) end @@ -307,7 +309,7 @@ function CardArea:emplace(card, location, stay_flipped) local c = targets[i] c:set_base(pseudorandom_element(G.P_CARDS)) - if pseudorandom(pseudoseed("chancetime")) > 1 / (#G.P_CENTER_POOLS["Enhanced"]+1) then + if pseudorandom(pseudoseed("chancetime")) > 1 / (#G.P_CENTER_POOLS["Enhanced"] + 1) then c:set_ability(pseudorandom_element(G.P_CENTER_POOLS["Enhanced"], pseudoseed("spectral_chance"))) else c:set_ability(G.P_CENTERS["c_base"]) @@ -360,7 +362,7 @@ function CardArea:emplace(card, location, stay_flipped) play_sound("card1", 1.15 - (i - 0.999) / (#G.hand.cards - 0.998) * 0.3) targets[i]:juice_up(0.3, 0.3) return true - end + end, })) end @@ -370,7 +372,7 @@ function CardArea:emplace(card, location, stay_flipped) G.E_MANAGER:add_event(Event({ trigger = "after", delay = 0.1, - func = go(i) + func = go(i), })) end end @@ -396,7 +398,9 @@ function CardArea:emplace(card, location, stay_flipped) passes = 0 pooling = false tries = tries - 1 - selection = G.P_CENTERS[pseudorandom_element(pool or G.P_CENTER_POOLS.Consumeables, pseudoseed(seed or "jane_rnd_mysterious")).key] + + selection = G.P_CENTERS + [pseudorandom_element(pool or G.P_CENTER_POOLS.Consumeables, pseudoseed(seed or "jane_rnd_mysterious")).key] if ignore_pooling then pooling = true @@ -438,10 +442,12 @@ function CardArea:emplace(card, location, stay_flipped) card:remove_from_deck() card.added_to_deck = nil end + card:flip() card:juice_up(0.3, 0.3) play_sound("card1", 1, 0.6) end + return true end, 0.75) @@ -458,6 +464,7 @@ function CardArea:emplace(card, location, stay_flipped) card:add_to_deck() end end + return true end, 0.75) elseif self == G.consumeables then @@ -472,6 +479,7 @@ function CardArea:emplace(card, location, stay_flipped) card:juice_up(0.3, 0.3) play_sound("card1", 1, 0.6) end + return true end, 0.75) @@ -482,7 +490,10 @@ function CardArea:emplace(card, location, stay_flipped) card:flip() card:juice_up(0.3, 0.3) play_sound("card3", 1, 0.6) - card:set_ability(rnd("mysterious_deck_consumable", cen.hidden and {} or {"hidden"}, G.P_CENTER_POOLS[cen.set])) + + card:set_ability( + rnd("mysterious_deck_consumable", cen.hidden and {} or {"hidden"}, G.P_CENTER_POOLS[cen.set]) + ) if not card.added_to_deck then card:add_to_deck() diff --git a/src/blind.lua b/src/blind.lua index 854a8d2..9667141 100644 --- a/src/blind.lua +++ b/src/blind.lua @@ -4,7 +4,7 @@ SMODS.Atlas { frames = 21, key = "janeblinds", atlas_table = "ANIMATION_ATLAS", - path = Jane.config.texture_pack .. "/bl_jane_blinds.png" + path = Jane.config.texture_pack .. "/bl_jane_blinds.png", } local final_operations = { @@ -35,7 +35,7 @@ local function offset_operator(by) if type(inner) == "table" and type(inner.config) == "table" and (inner.config.text == final_operations[previous][1] or - inner.config.text == final_operations[2][1]) and + inner.config.text == final_operations[2][1]) and inner.config.text_drawable then if inner.config.text ~= txt then changed_text = true @@ -62,10 +62,10 @@ local function to_number(x) return type(x) == "table" and x:to_number() or x end -SMODS.Blind { +SMODS.Blind { loc_txt = { name = "The Descending", - text = {"Decrease Chip-Mult", "operator by 1 level"} + text = {"Decrease Chip-Mult", "operator by 1 level"}, }, key = "descending", config = {}, @@ -100,10 +100,10 @@ SMODS.Blind { end, } -SMODS.Blind { +SMODS.Blind { loc_txt = { name = "The Insignia", - text = {"Hand must contain", "only one suit"} + text = {"Hand must contain", "only one suit"}, }, key = "insignia", config = {}, @@ -131,10 +131,10 @@ SMODS.Blind { end, } -SMODS.Blind { +SMODS.Blind { loc_txt = { name = "The Wee", - text = {"Only 2s can be played"} + text = {"Only 2s can be played"}, }, key = "wee", config = {}, diff --git a/src/booster.lua b/src/booster.lua index edfbb16..b0ac457 100644 --- a/src/booster.lua +++ b/src/booster.lua @@ -2,7 +2,7 @@ SMODS.Atlas { px = 71, py = 95, key = "janebooster", - path = Jane.config.texture_pack .. "/p_jane_boosters.png" + path = Jane.config.texture_pack .. "/p_jane_boosters.png", } for i = 1, 2 do @@ -14,7 +14,7 @@ for i = 1, 2 do "Choose {C:attention}#1#{} of up to", "{C:attention}#2# playing cards{} to", "add to your deck", - } + }, }, atlas = "janebooster", pos = {x = 6, y = i - 1}, @@ -35,7 +35,7 @@ for i = 1, 2 do area = G.pack_cards, skip_materialize = true, soulable = true, - key_append = "sta" + key_append = "sta", } end, create_UIBox = function(_) @@ -45,7 +45,7 @@ for i = 1, 2 do ease_background_colour_blind(G.STATES.STANDARD_PACK) end, particles = function(_) - G.booster_pack_sparkles = Particles(1, 1, 0,0, { + G.booster_pack_sparkles = Particles(1, 1, 0, 0, { timer = 0.015, scale = 0.3, initialize = true, @@ -54,7 +54,7 @@ for i = 1, 2 do padding = -1, attach = G.ROOM_ATTACH, colours = {G.C.BLACK, G.C.RED}, - fill = true + fill = true, }) G.booster_pack_sparkles.fade_alpha = 1 @@ -72,7 +72,7 @@ for i = 1, 2 do "Choose {C:attention}#1#{} of up to", "{C:attention}#2# {C:tarot}Tarot{} cards to", "be used immediately", - } + }, }, atlas = "janebooster", pos = {x = 3 + i, y = 1}, @@ -109,7 +109,7 @@ for i = 1, 2 do ease_background_colour_blind(G.STATES.TAROT_PACK) end, particles = function(_) - G.booster_pack_sparkles = Particles(1, 1, 0,0, { + G.booster_pack_sparkles = Particles(1, 1, 0, 0, { timer = 0.015, scale = 0.2, initialize = true, @@ -118,7 +118,7 @@ for i = 1, 2 do padding = -1, attach = G.ROOM_ATTACH, colours = {G.C.WHITE, lighten(G.C.PURPLE, 0.4), lighten(G.C.PURPLE, 0.2), lighten(G.C.GOLD, 0.2)}, - fill = true + fill = true, }) G.booster_pack_sparkles.fade_alpha = 1 @@ -137,7 +137,7 @@ for i = 1, 2 do "Choose {C:attention}#1#{} of up to", "{C:attention}#2# {C:planet}Planet{} cards to", "be used immediately", - } + }, }, config = {extra = 2, choose = 1}, pos = {x = 3 + i, y = 0}, @@ -153,7 +153,7 @@ for i = 1, 2 do area = G.pack_cards, skip_materialize = true, soulable = true, - key_append = "pl1" + key_append = "pl1", } end @@ -190,7 +190,7 @@ for i = 1, 2 do ease_background_colour_blind(G.STATES.PLANET_PACK) end, particles = function(_) - G.booster_pack_stars = Particles(1, 1, 0,0, { + G.booster_pack_stars = Particles(1, 1, 0, 0, { fill = true, scale = 0.1, speed = 0.1, @@ -202,7 +202,7 @@ for i = 1, 2 do colours = {G.C.WHITE, HEX("a7d6e0"), HEX("fddca0")}, }) - G.booster_pack_meteors = Particles(1, 1, 0,0, { + G.booster_pack_meteors = Particles(1, 1, 0, 0, { speed = 4, timer = 2, fill = true, @@ -212,7 +212,7 @@ for i = 1, 2 do colours = {G.C.WHITE}, }) end, - set_ability = function (_, card, _, _) + set_ability = function(_, card, _, _) card.ability = card.ability or {} card.ability.set = "Booster" card.ability.name = "Mini Celestial Pack" @@ -230,7 +230,7 @@ for i = 1, 2 do "Choose {C:attention}#1#{} of up to", "{C:attention}#2# {C:spectral}Spectral{} cards to", "be used immediately", - } + }, }, config = {extra = 1, choose = 1}, pos = {x = 3 + i, y = 2}, @@ -256,7 +256,7 @@ for i = 1, 2 do ease_background_colour_blind(G.STATES.SPECTRAL_PACK) end, particles = function(_) - G.booster_pack_sparkles = Particles(1, 1, 0,0, { + G.booster_pack_sparkles = Particles(1, 1, 0, 0, { scale = 0.1, fill = true, speed = 0.2, @@ -284,7 +284,7 @@ if Cryptid then "Choose {C:attention}#1#{} of up to", "{C:attention}#2# {C:green}Code{} cards to", "be used immediately", - } + }, }, pos = {x = 6, y = 2}, config = {extra = 2, choose = 1}, @@ -319,7 +319,7 @@ if Cryptid then end for i = 1, 2 do - SMODS.Booster{ + SMODS.Booster { key = "minitoken" .. i, atlas = "janebooster", loc_txt = { @@ -328,7 +328,7 @@ for i = 1, 2 do "Choose {C:attention}#1#{} of up to", "{C:attention}#2# Token {}cards to", "be used immediately", - } + }, }, pos = {x = i - 1, y = 5}, config = {extra = 2, choose = 1}, @@ -350,35 +350,83 @@ for i = 1, 2 do {card_limit = size, highlight_limit = 1, type = "consumeable"} ) - local t = {n = G.UIT.ROOT, config = {align = "tm", r = 0.15, colour = G.C.CLEAR, padding = 0.15}, nodes = { - {n = G.UIT.R, config = {align = "cl", colour = G.C.CLEAR, r = 0.15, padding = 0.1, minh = 2, shadow = true}, nodes = { - {n = G.UIT.R, config = {align = "cm"}, nodes = { - {n = G.UIT.C, config = {align = "cm", padding = 0.1}, nodes = { - {n = G.UIT.C, config = {align = "cm", r = 0.2, colour = G.C.CLEAR, shadow = true}, nodes = { - {n = G.UIT.O, config = {object = G.pack_cards}}}}}}}}, - {n = G.UIT.R, config = {align = "cm"}, nodes = {}}, - {n = G.UIT.R, config = {align = "tm"}, nodes = { - {n = G.UIT.C,config = {align = "tm", padding = 0.05, minw = 2.4}, nodes = {}}, - {n = G.UIT.C,config = {align = "tm", padding = 0.05}, nodes = { - UIBox_dyn_container({ - {n = G.UIT.C, config = {align = "cm", padding = 0.05, minw = 4}, nodes = { - {n = G.UIT.R,config = {align = "bm", padding = 0.05}, nodes = { - {n = G.UIT.O, config = {object = DynaText({string = {"Token Pack"}, colours = {G.C.WHITE},shadow = true, rotate = true, bump = true, spacing = 2, scale = 0.7, maxw = 4, pop_in = 0.5})}}}}, - {n = G.UIT.R,config = {align = "bm", padding = 0.05}, nodes = { - {n = G.UIT.O, config = {object = DynaText({string = {localize("k_choose") .. " "}, colours = {G.C.WHITE},shadow = true, rotate = true, bump = true, spacing = 2, scale = 0.5, pop_in = 0.7})}}, - {n = G.UIT.O, config = {object = DynaText({string = {{ref_table = G.GAME, ref_value = "pack_choices"}}, colours = {G.C.WHITE},shadow = true, rotate = true, bump = true, spacing = 2, scale = 0.5, pop_in = 0.7})}}}}}} - })}}, - {n = G.UIT.C,config = {align = "tm", padding = 0.05, minw = 2.4}, nodes = { - {n = G.UIT.R,config = {minh = 0.2}, nodes = {}}, - {n = G.UIT.R,config = {align = "tm",padding = 0.2, minh = 1.2, minw = 1.8, r = 0.15,colour = G.C.GREY, one_press = true, button = "skip_booster", hover = true,shadow = true, func = "can_skip_booster"}, nodes = { - {n = G.UIT.T, config = {text = localize("b_skip"), scale = 0.5, colour = G.C.WHITE, shadow = true, focus_args = {button = "y", orientation = "bm"}, func = "set_button_pip"}}}}}}}}}}}} + local t = { + n = G.UIT.ROOT, + config = {align = "tm", r = 0.15, colour = G.C.CLEAR, padding = 0.15}, + nodes = { + { + n = G.UIT.R, + config = {align = "cl", colour = G.C.CLEAR, r = 0.15, padding = 0.1, minh = 2, shadow = true}, + nodes = { + { + n = G.UIT.R, + config = {align = "cm"}, + nodes = { + { + n = G.UIT.C, + config = {align = "cm", padding = 0.1}, + nodes = { + { + n = G.UIT.C, + config = {align = "cm", r = 0.2, colour = G.C.CLEAR, shadow = true}, + nodes = { + {n = G.UIT.O, config = {object = G.pack_cards}}}, + }}, + }}, + }, + {n = G.UIT.R, config = {align = "cm"}, nodes = {}}, + { + n = G.UIT.R, + config = {align = "tm"}, + nodes = { + {n = G.UIT.C, config = {align = "tm", padding = 0.05, minw = 2.4}, nodes = {}}, + { + n = G.UIT.C, + config = {align = "tm", padding = 0.05}, + nodes = { + UIBox_dyn_container({ + { + n = G.UIT.C, + config = {align = "cm", padding = 0.05, minw = 4}, + nodes = { + { + n = G.UIT.R, + config = {align = "bm", padding = 0.05}, + nodes = { + {n = G.UIT.O, config = {object = DynaText({string = {"Token Pack"}, colours = {G.C.WHITE}, shadow = true, rotate = true, bump = true, spacing = 2, scale = 0.7, maxw = 4, pop_in = 0.5})}}}, + }, + { + n = G.UIT.R, + config = {align = "bm", padding = 0.05}, + nodes = { + {n = G.UIT.O, config = {object = DynaText({string = {localize("k_choose") .. " "}, colours = {G.C.WHITE}, shadow = true, rotate = true, bump = true, spacing = 2, scale = 0.5, pop_in = 0.7})}}, + {n = G.UIT.O, config = {object = DynaText({string = {{ref_table = G.GAME, ref_value = "pack_choices"}}, colours = {G.C.WHITE}, shadow = true, rotate = true, bump = true, spacing = 2, scale = 0.5, pop_in = 0.7})}}}, + }}, + }, + })}, + }, + { + n = G.UIT.C, + config = {align = "tm", padding = 0.05, minw = 2.4}, + nodes = { + {n = G.UIT.R, config = {minh = 0.2}, nodes = {}}, + { + n = G.UIT.R, + config = {align = "tm", padding = 0.2, minh = 1.2, minw = 1.8, r = 0.15, colour = G.C.GREY, one_press = true, button = "skip_booster", hover = true, shadow = true, func = "can_skip_booster"}, + nodes = { + {n = G.UIT.T, config = {text = localize("b_skip"), scale = 0.5, colour = G.C.WHITE, shadow = true, focus_args = {button = "y", orientation = "bm"}, func = "set_button_pip"}}}, + }}, + }}, + }}, + }}, + } return t end, ease_background_colour = function(_) - ease_background_colour{new_colour = HEX(i == 1 and "F0C197" or "FD5F55"), special_colour = HEX("000000"), contrast = 5} + ease_background_colour {new_colour = HEX(i == 1 and "F0C197" or "FD5F55"), special_colour = HEX("000000"), contrast = 5} end, - in_pool = function (_, _) + in_pool = function(_, _) return G.GAME.used_vouchers.v_jane_token_voucher end, } diff --git a/src/edition.lua b/src/edition.lua index 32ec16b..3ac1cb5 100644 --- a/src/edition.lua +++ b/src/edition.lua @@ -11,13 +11,13 @@ SMODS.Edition({ "{C:chips}+#1#{}, {X:chips,C:white}x#2#{} & {X:chips,C:dark_edition}^#3#{} Chips", "{C:mult}+#4#{}, {X:mult,C:white}x#5#{} & {X:mult,C:dark_edition}^#6#{} Mult", "Generates {C:money}+$#7#", - } + }, }, config = {chips = 1, mult = 1, x_chips = 1.1, x_mult = 1.1, e_chips = 1.01, e_mult = 1.01, p_dollars = 1}, sound = { sound = "jane_e_polygloss", per = 1.2, - vol = 0.4 + vol = 0.4, }, weight = 8, extra_cost = 2, @@ -25,15 +25,17 @@ SMODS.Edition({ shader = "polygloss", apply_to_float = false, loc_vars = function(self) - return {vars = { - self.config.chips, - self.config.x_chips, - self.config.e_chips, - self.config.mult, - self.config.x_mult, - self.config.e_mult, - self.config.p_dollars - }} + return { + vars = { + self.config.chips, + self.config.x_chips, + self.config.e_chips, + self.config.mult, + self.config.x_mult, + self.config.e_mult, + self.config.p_dollars, + }, + } end, calculate = function(_, card, context) if context.pre_joker then @@ -74,8 +76,8 @@ SMODS.Edition({ "All card values are", "{C:attention}multiplied{} by {C:attention}up to " .. jumbo_modifier, "{C:inactive}(If possible)", - "{C:inactive,E:1,s:0.7}Whoa, it's huge!!{}" - } + "{C:inactive,E:1,s:0.7}Whoa, it's huge!!{}", + }, }, on_apply = function(card) G.E_MANAGER:add_event(Event({ @@ -84,7 +86,7 @@ SMODS.Edition({ func = function() Jane.resize(card, Jane.config.wee_sizemod) return true - end + end, })) local obj = card:gc() @@ -110,7 +112,7 @@ SMODS.Edition({ func = function() Jane.resize(card, 1 / Jane.config.wee_sizemod) return true - end + end, })) local was_added = card.added_to_deck @@ -129,7 +131,7 @@ SMODS.Edition({ sound = { sound = "jane_e_jumbo", per = 1, - vol = 0.5 + vol = 0.5, }, weight = 0.8, in_shop = true, diff --git a/src/joker.lua b/src/joker.lua index e92a85a..7021021 100644 --- a/src/joker.lua +++ b/src/joker.lua @@ -46,7 +46,7 @@ local granddad_palette = { HEX("155fd9"), HEX("ff8170"), HEX("ffffff"), - HEX("6c0700") + HEX("6c0700"), } local function food_jokers_count() @@ -136,7 +136,7 @@ SMODS.Joker { text = { "{C:attention}+#1# {}booster pack slot#2#", "{C:inactive,s:0.75,E:1}#3#{C:red,s:1.5,E:1}#4#", - } + }, }, config = {extra = {choices = Cryptid and 2 or 1}}, pos = {x = 0, y = 0}, @@ -145,12 +145,14 @@ SMODS.Joker { cost = 6, rarity = 2, loc_vars = function(_, _, card) - return {vars = { - card.ability.extra.choices, - card.ability.extra.choices == 1 and "" or "s", - Jane.sinister and "" or pseudorandom_element(maxie_quotes.normal, pseudoseed("MaxieQuotes")), - Jane.sinister and pseudorandom_element(maxie_quotes.scared, pseudoseed("MaxieQuotes")) or "", - }} + return { + vars = { + card.ability.extra.choices, + card.ability.extra.choices == 1 and "" or "s", + Jane.sinister and "" or pseudorandom_element(maxie_quotes.normal, pseudoseed("MaxieQuotes")), + Jane.sinister and pseudorandom_element(maxie_quotes.scared, pseudoseed("MaxieQuotes")) or "", + }, + } end, calculate = function(_, card, context) if context.starting_shop then @@ -158,7 +160,7 @@ SMODS.Joker { SMODS.add_booster_to_shop() end end - end + end, } function Jane.update_honey() @@ -223,7 +225,7 @@ SMODS.Joker { "#5#{C:attention}#6#", "{C:dark_edition}#7#{}#8#{C:inactive,s:0.75,E:1}#9#", "{C:inactive,s:0.75,E:1}#10#{C:red,s:1.5,E:1}#11#", - } + }, }, config = {extra = {level = "1"}}, -- Strings do not get mutated by other mods pos = {x = 0, y = 0}, @@ -257,19 +259,22 @@ SMODS.Joker { end end - return {vars = { - is_corrupted and " (" .. level_name(level - 2) .. ")" or "", - (exclusions or ""):sub(#separator), - is_corrupted and "" or " jokers", - is_corrupted and "jokers " or "", - is_corrupted and (level >= #Jane.rarity_names - 1 and "Cannot be upgraded." or "") or "Getting another ", - is_corrupted and "" or "Honey", - is_corrupted and "" or "corrupts ", - is_corrupted and "" or "this Joker", - Jane.sinister and "" or (is_corrupted and "*Her eyes are looking around," or ""), - Jane.sinister and "" or (is_corrupted and "as if she wants to say something...*" or "Buzzzzz! I'll do my best!"), - Jane.sinister and (is_corrupted and "..." or "S-STOP THAT!! YOU'RE FREAKING ME OOOUT!!!") or "", - }} + return { + vars = { + is_corrupted and " (" .. level_name(level - 2) .. ")" or "", + (exclusions or ""):sub(#separator), + is_corrupted and "" or " jokers", + is_corrupted and "jokers " or "", + is_corrupted and (level >= #Jane.rarity_names - 1 and "Cannot be upgraded." or "") or "Getting another ", + is_corrupted and "" or "Honey", + is_corrupted and "" or "corrupts ", + is_corrupted and "" or "this Joker", + Jane.sinister and "" or (is_corrupted and "*Her eyes are looking around," or ""), + Jane.sinister and "" or + (is_corrupted and "as if she wants to say something...*" or "Buzzzzz! I'll do my best!"), + Jane.sinister and (is_corrupted and "..." or "S-STOP THAT!! YOU'RE FREAKING ME OOOUT!!!") or "", + }, + } end, update = function(_, card, _) if card.added_to_deck and card.children.center and card.children.floating_sprite then @@ -322,7 +327,7 @@ local oxy_quotes = { "...H-how are you doing t-that...?", "This is... unsettling...", "S-... So much power...", - } + }, } function Jane.oxy(card, removed) @@ -347,7 +352,7 @@ function Jane.oxy(card, removed) nil, { message = (extra.is_corrupted and "+" or "-") .. destroyed_steel, - colour = extra.is_corrupted and G.C.PURPLE or G.C.GREY + colour = extra.is_corrupted and G.C.PURPLE or G.C.GREY, } ) end @@ -367,7 +372,7 @@ SMODS.Joker { "{C:dark_edition,E:1}#7#{}#8#", "#9#{C:dark_edition,E:1}#10#", "{C:inactive,s:0.75,E:1}#11#{C:red,s:1.5,E:1}#12#", - } + }, }, config = {extra = {corrupted_steel = 2.5, is_corrupted = false, milestone = 3, progress = 0}}, pos = {x = 0, y = 0}, @@ -385,20 +390,25 @@ SMODS.Joker { local effective = is_corrupted and progress or milestone - progress local plural = effective == 1 and "" or "s" - return {vars = { - is_corrupted and " (Corrupted)" or "", - amount, - is_corrupted and "Purifies " or "", - is_corrupted and "in " or "", - is_corrupted and "" or "Destroying ", - effective .. (is_corrupted and " round" or " steel card") .. plural, - is_corrupted and "" or "corrupts ", - is_corrupted and "Destroying steel cards" or "this Joker", - is_corrupted and "prolongs the " or "", - is_corrupted and "corruption" or "", - Jane.sinister and "" or (is_corrupted and pseudorandom_element(oxy_quotes.normal, pseudoseed("OxyQuotes")) or "We all cut close..."), - Jane.sinister and (is_corrupted and pseudorandom_element(oxy_quotes.scared, pseudoseed("OxyQuotes")) or "WHAT ARE YOU DOING DOWN THERE?!?") or "", - }} + return { + vars = { + is_corrupted and " (Corrupted)" or "", + amount, + is_corrupted and "Purifies " or "", + is_corrupted and "in " or "", + is_corrupted and "" or "Destroying ", + effective .. (is_corrupted and " round" or " steel card") .. plural, + is_corrupted and "" or "corrupts ", + is_corrupted and "Destroying steel cards" or "this Joker", + is_corrupted and "prolongs the " or "", + is_corrupted and "corruption" or "", + Jane.sinister and "" or + (is_corrupted and pseudorandom_element(oxy_quotes.normal, pseudoseed("OxyQuotes")) or "We all cut close..."), + Jane.sinister and + (is_corrupted and pseudorandom_element(oxy_quotes.scared, pseudoseed("OxyQuotes")) or "WHAT ARE YOU DOING DOWN THERE?!?") or + "", + }, + } end, update = function(_, card, _) if card.added_to_deck and card.children.center and card.children.floating_sprite then @@ -428,14 +438,14 @@ SMODS.Joker { nil, { message = extra.is_corrupted and "-1" or "+1", - colour = extra.is_corrupted and G.C.PURPLE or G.C.GREY + colour = extra.is_corrupted and G.C.PURPLE or G.C.GREY, } ) end if not extra.is_corrupting and ((extra.progress >= extra.milestone and not extra.is_corrupted) or - (extra.progress <= 0 and extra.is_corrupted)) then + (extra.progress <= 0 and extra.is_corrupted)) then extra.is_corrupting = true G.E_MANAGER:add_event(Event({ @@ -444,7 +454,7 @@ SMODS.Joker { card:flip() play_sound("card1") return true - end + end, })) G.E_MANAGER:add_event(Event({ @@ -457,7 +467,7 @@ SMODS.Joker { extra.is_corrupted = not extra.is_corrupted extra.is_corrupting = nil return true - end + end, })) end @@ -467,7 +477,7 @@ SMODS.Joker { local amount = extra.is_corrupted and extra.corrupted_steel or extra.steel return {x_chips = amount, x_mult = amount, colour = G.C.PURPLE, card = card}, true end - end + end, } if Cryptid then @@ -485,7 +495,7 @@ SMODS.Joker { "{X:dark_edition,C:chips}+" .. operator .. "#1#{C:chips} Chips{} for every", "{C:attention}unique Voucher redeemed", "{C:inactive}(Currently {X:dark_edition,C:chips}" .. operator .. "#2#{C:inactive})", - } + }, }, config = {big_num_scaler = true, extra = {tet = Cryptid and 0.1 or 0.5}}, pos = {x = 0, y = 0}, @@ -513,7 +523,7 @@ SMODS.Joker { [Cryptid and "e_chips" or "x_chips"] = num, }, true end - end + end, } SMODS.Joker { @@ -523,7 +533,7 @@ SMODS.Joker { text = { "This Joker has a {C:jane_RGB,E:1}strange", "{C:jane_RGB,E:1}reaction {}to scored {C:attention}7{}s", - } + }, }, config = {}, pos = {x = 0, y = 0}, @@ -557,54 +567,54 @@ SMODS.Joker { message = Cryptid and "+777" or "+77", chips = Cryptid and 777 or 77, colour = palette, - card = card + card = card, }, true elseif rnd == 2 then return { message = Cryptid and "+777 Mult" or "+77 Mult", mult = Cryptid and 777 or 77, colour = palette, - card = card + card = card, }, true elseif rnd == 3 then return { message = "+$7", dollars = 7, colour = palette, - card = card + card = card, }, true elseif rnd == 4 then return { message = Cryptid and "x7" or "x1.77", x_chips = Cryptid and 7 or 1.77, colour = palette, - card = card + card = card, }, true elseif rnd == 5 then return { message = Cryptid and "x7 Mult" or "x1.77 Mult", x_mult = Cryptid and 7 or 1.77, colour = palette, - card = card + card = card, }, true elseif rnd == 6 then return { message = "^1.77", e_chips = 1.77, colour = palette, - card = card + card = card, }, true else return { message = "^1.77 Mult", e_mult = 1.77, colour = palette, - card = card + card = card, }, true end end end - end + end, } SMODS.Joker { @@ -617,7 +627,7 @@ SMODS.Joker { "{C:attention}food or Peppino Joker", "in your possession", "{C:inactive}(Currently {X:dark_edition,C:red}" .. operator .. "#1#{C:red} Mult{C:inactive})", - } + }, }, pos = {x = 0, y = 0}, soul_pos = {x = 1, y = 0}, @@ -637,5 +647,5 @@ SMODS.Joker { [Cryptid and "e_mult" or "x_mult"] = 2 ^ count, }, true end - end + end, } diff --git a/src/main.lua b/src/main.lua index 1a6d7cb..ba82c1d 100644 --- a/src/main.lua +++ b/src/main.lua @@ -2,7 +2,7 @@ Jane = { config = { wee_sizemod = 1.25, texture_pack = "default", - bans = {"j_cry_crustulum", "c_cry_hammerspace"} + bans = {"j_cry_crustulum", "c_cry_hammerspace"}, }, } @@ -20,8 +20,8 @@ end function Jane.can_use() return not (((G.play and #G.play.cards > 0) or - (G.CONTROLLER.locked) or - (G.GAME.STOP_USE and G.GAME.STOP_USE > 0)) and + (G.CONTROLLER.locked) or + (G.GAME.STOP_USE and G.GAME.STOP_USE > 0)) and G.STATE ~= G.STATES.HAND_PLAYED and G.STATE ~= G.STATES.DRAW_TO_HAND and G.STATE ~= G.STATES.PLAY_TAROT) @@ -56,7 +56,7 @@ function Jane.card_status_text( backdrop_colour = colour or (G.C.FILTER), align = align or "bm", major = card, - offset = {x = xoffset or 0, y = yoffset or (-0.05*G.CARD_H)} + offset = {x = xoffset or 0, y = yoffset or (-0.05 * G.CARD_H)}, }) if sound then @@ -90,7 +90,7 @@ function Jane.card_status_text( backdrop_colour = colour or (G.C.FILTER), align = align or "bm", major = card, - offset = {x = xoffset or 0, y = yoffset or (-0.05*G.CARD_H)} + offset = {x = xoffset or 0, y = yoffset or (-0.05 * G.CARD_H)}, }) if sound then @@ -110,7 +110,7 @@ function Jane.card_status_text( end return true - end + end, })) end end @@ -132,7 +132,7 @@ function Jane.get_chipmult_sum(chips, mult) mult = mult or 0 local break_infinity = ((Talisman or {}).config_file or {}).break_infinity - local big = (break_infinity == "" or break_infinity == nil) and function (x) return x end or to_big + local big = (break_infinity == "" or break_infinity == nil) and function(x) return x end or to_big local op = Jane.get_operator() if op >= 3 then @@ -161,16 +161,16 @@ end function Jane.hidden(card) return G.GAME and not G.GAME.obsidian and - type(card) == 'table' and + type(card) == "table" and (card.name == "Black Hole" or card.name == "The Soul" or card.hidden) end function Jane.play_sound(sound, per, vol) G.E_MANAGER:add_event(Event({ func = function() - play_sound(sound,per,vol) + play_sound(sound, per, vol) return true - end + end, })) end @@ -187,8 +187,8 @@ function Jane.resize(card, mod, force_save) if card.area and ((G.shop_jokers and card.area == G.shop_jokers) or - (G.shop_booster and card.area == G.shop_booster) or - (G.shop_vouchers and card.area == G.shop_vouchers)) then + (G.shop_booster and card.area == G.shop_booster) or + (G.shop_vouchers and card.area == G.shop_vouchers)) then create_shop_card_ui(card) end end @@ -200,7 +200,7 @@ function Jane.q(fc, de, t, tr, bl, ba) delay = de, blockable = bl, blocking = ba, - func = fc + func = fc, })) end @@ -287,8 +287,8 @@ function Game:update(dt) for k, v in pairs(G.GAME.hands) do if orrery[k] and (orrery[k].mult ~= v.mult or - orrery[k].chips ~= v.chips or - orrery[k].level ~= v.level) then + orrery[k].chips ~= v.chips or + orrery[k].level ~= v.level) then inequalities = inequalities + 1 end @@ -304,7 +304,7 @@ function Game:update(dt) end pools.chips = pools.chips + inequalities * 150 - table.sort(hands, function (x, y) return x.order > y.order end) + table.sort(hands, function(x, y) return x.order > y.order end) for i, v in ipairs(hands) do v.mult = math.floor(pools.mult / count) + (small(pools.mult % count) >= i and 1 or 0) @@ -316,13 +316,16 @@ function Game:update(dt) orrery[k] = {chips = v.chips, level = v.level, mult = v.mult} end - hand(localize("k_all_hands"), math.floor(pools.chips / count), math.floor(pools.mult / count), math.floor(pools.level / count)) + hand(localize("k_all_hands"), math.floor(pools.chips / count), math.floor(pools.mult / count), + math.floor(pools.level / count)) delay(1) - update_hand_text({sound = "button", volume = 0.7, pitch = 1.1, delay = 0}, {mult = 0, chips = 0, handname = "", level = ""}) + update_hand_text({sound = "button", volume = 0.7, pitch = 1.1, delay = 0}, + {mult = 0, chips = 0, handname = "", level = ""}) end local function hsv(h, s, v) if s <= 0 then return v, v, v end + h = h * 6 local c = v * s local x = (1 - math.abs((h % 2) - 1)) * c diff --git a/src/misprintize.lua b/src/misprintize.lua index e12fd58..a8c70f3 100644 --- a/src/misprintize.lua +++ b/src/misprintize.lua @@ -1,6 +1,5 @@ -- The following code is slightly adapted from -- https://github.com/MathIsFun0/Cryptid/blob/main/lib/misprintize.lua - local base_values = {} local big_num_whitelist = { @@ -114,7 +113,6 @@ local function log_random(seed, min, max) end function Jane.misprintize_val(val, override, big) - return is_number(val) and check( format( val * log_random( @@ -153,30 +151,30 @@ function Jane.misprintize_tbl(name, ref_tbl, ref_value, clear, override, stack, tbl[k] = check( clear and base_values[name][k] - or format( - (stack and tbl[k] or base_values[name][k]) - * 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 - ), - "%.2g" + or format( + (stack and tbl[k] or base_values[name][k]) + * 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 ), + "%.2g" + ), big ) end else for _k, _ in pairs(tbl[k]) do if is_number(tbl[k][_k]) and not - (_k == "id") and not - (k == "perish_tally") and not - (k == "colour") and not - (_k == "suit_nominal") and not - (_k == "base_nominal") and not - (_k == "face_nominal") and not - (_k == "qty") and not - (k == "x_mult" and v == 1 and not tbl[k].override_x_mult_check) and not - (_k == "selected_d6_face") then + (_k == "id") and not + (k == "perish_tally") and not + (k == "colour") and not + (_k == "suit_nominal") and not + (_k == "base_nominal") and not + (_k == "face_nominal") and not + (_k == "qty") and not + (k == "x_mult" and v == 1 and not tbl[k].override_x_mult_check) and not + (_k == "selected_d6_face") then if not base_values[name] then base_values[name] = {} end @@ -191,15 +189,15 @@ function Jane.misprintize_tbl(name, ref_tbl, ref_value, clear, override, stack, tbl[k][_k] = check( clear and base_values[name][k][_k] - or format( - (stack and tbl[k][_k] or base_values[name][k][_k]) * - 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 - ), - "%.2g" + or format( + (stack and tbl[k][_k] or base_values[name][k][_k]) * + 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 ), + "%.2g" + ), big ) end @@ -247,10 +245,11 @@ function Jane.misprintize(card, override, force_reset, stack) end) end end + if (not force_reset or G.GAME.modifiers.cry_jkr_misprint_mod) and (G.GAME.modifiers.cry_misprint_min or override or card.ability.set == "Joker") and not stack or not - no(card, "immutable", true) then + no(card, "immutable", true) then if card.ability.name == "Ace Aequilibrium" then return end diff --git a/src/slugcat.lua b/src/slugcat.lua index 7d6026d..19def97 100644 --- a/src/slugcat.lua +++ b/src/slugcat.lua @@ -20,7 +20,7 @@ for _, v in pairs({ key = "jane" .. v, px = 71, py = 95, - path = Jane.config.texture_pack .. "/j_jane_" .. v .. ".png" + path = Jane.config.texture_pack .. "/j_jane_" .. v .. ".png", } end @@ -44,7 +44,7 @@ SMODS.Joker { "cards {C:attention}#1# time#2# {}if", "hand contains {C:attention}#3#", "or fewer card#4#", - } + }, }, config = {extra = {retriggers = 2, requirement = 4}}, pos = {x = 0, y = 0}, @@ -57,12 +57,14 @@ SMODS.Joker { local retriggers = extra.retriggers local requirement = extra.requirement - return {vars = { - retriggers, - retriggers == 1 and "" or "s", - requirement, - requirement == 1 and "" or "s" - }} + return { + vars = { + retriggers, + retriggers == 1 and "" or "s", + requirement, + requirement == 1 and "" or "s", + }, + } end, calculate = function(_, card, context) if not context.repetition or @@ -76,9 +78,9 @@ SMODS.Joker { message = localize("k_again_ex"), repetitions = card.ability.extra.retriggers, colour = G.C.ORANGE, - card = card + card = card, }, true - end + end, } SMODS.Joker { @@ -91,7 +93,7 @@ SMODS.Joker { "{C:attention}contribute to scoring {}and", "are all considered as", "the {C:attention}first played card", - } + }, }, pos = {x = 0, y = 0}, soul_pos = {x = 1, y = 0}, @@ -112,7 +114,7 @@ SMODS.Joker { (Cryptid and "an {C:spectral}Empowered Tag" or "a {C:dark_edition}Negative {C:spectral}Soul") .. " {}after #1#", "When {C:attention}sold#2#{}, turns#3#", "#4#{C:red}The Rot{} without rewards", - } + }, }, config = {extra = {rounds_left = hunter[1]}}, pos = {x = 0, y = 0}, @@ -129,12 +131,14 @@ SMODS.Joker { local rounds_left = card.ability.extra.rounds_left local sold = rounds_left - hunter[2] - return {vars = { - rounds_left .. rounds(rounds_left) .. (rounds_left <= 0 and "...?" or ""), - sold <= 0 and "" or " after " .. sold .. rounds(sold), - sold <= 0 and " into" or "", - sold <= 0 and "" or "into ", - }} + return { + vars = { + rounds_left .. rounds(rounds_left) .. (rounds_left <= 0 and "...?" or ""), + sold <= 0 and "" or " after " .. sold .. rounds(sold), + sold <= 0 and " into" or "", + sold <= 0 and "" or "into ", + }, + } end, update = function(_, card, _) if card.added_to_deck and card.children.center and card.children.floating_sprite then @@ -185,7 +189,7 @@ SMODS.Joker { return end - if context.selling_self and card.ability.extra.rounds_left <= hunter[2] then + if context.selling_self and card.ability.extra.rounds_left <= hunter[3] then spawn_rot() elseif not context.individual and not context.repetition and not context.retrigger_joker then if G.GAME.round_resets.hands <= 0 then @@ -215,7 +219,8 @@ SMODS.Joker { card.hunter_prep = nil card.ability.extra.rounds_left = card.ability.extra.rounds_left - 1 local rl = card.ability.extra.rounds_left - Jane.card_status_text(card, tostring(card.ability.extra.rounds_left), nil, nil, G.C.RED, nil, nil, nil, nil, nil, "generic1") + Jane.card_status_text(card, tostring(card.ability.extra.rounds_left), nil, nil, G.C.RED, nil, nil, nil, nil, + nil, "generic1") if rl > hunter[2] then card:juice_up(0.6, 0.1) @@ -251,7 +256,7 @@ SMODS.Joker { G.E_MANAGER:add_event(Event({trigger = "after", func = die})) end end - end + end, } SMODS.Joker { @@ -264,7 +269,7 @@ SMODS.Joker { "are {C:attention}multiplied{} by {C:attention}#1#", "when they are created", "{C:inactive}(If possible)", - } + }, }, loc_vars = function(_, _, center) return {vars = {center.ability.modifier}} @@ -304,7 +309,7 @@ SMODS.Joker { text = { "Grants the {C:green}ability{} to {C:red}destroy", "selected {C:attention}playing cards", - } + }, }, pos = {x = 0, y = 0}, soul_pos = {x = 1, y = 0}, @@ -334,7 +339,7 @@ SMODS.Joker { "You can choose {C:attention}any number of cards", "after opening {C:attention}any Booster Pack", "{C:attention}Booster Packs{} have {C:green}+#1#{} additional cards", - } + }, }, loc_vars = function(_, _, center) return {vars = {center.ability.extra.extrachoices}} @@ -373,7 +378,7 @@ function Card:open() end return true - end + end, })) end @@ -385,7 +390,7 @@ SMODS.Joker { text = { "Non-{C:dark_edition}editioned{} cards are", "{C:attention}given a random {C:dark_edition}Edition", - } + }, }, pos = {x = 0, y = 0}, soul_pos = {x = 1, y = 0}, @@ -416,7 +421,7 @@ function Card:draw(layer) self.facing == "front" and self.config and (self.added_to_deck or - (self.area and self.area == G.hand)) and not + (self.area and self.area == G.hand)) and not self.edition and (self.area == G.consumeables or cen.set ~= "Booster") and next(SMODS.find_card("j_jane_rivulet")) then @@ -462,7 +467,7 @@ SMODS.Joker { "{C:inactive,s:1.25}#10#{C:attention,s:1.25}#11#{C:inactive,s:1.25}#12#{C:inactive}#13#{C:jane_RGB}#14#" .. (Cryptid and "{C:inactive}" or "{C:inactive,s:0.75}") .. "#15#", - } + }, }, config = {extra = {karma = 0, max_karma = Cryptid and 10 or 3}}, pos = {x = 0, y = 0}, @@ -476,23 +481,25 @@ SMODS.Joker { local max_karma = extra.max_karma local attuned = karma >= max_karma - return {vars = { - attuned and " (Attuned)" or "", - Cryptid and "Ankh and Gateway" or "Ankh", - attuned and "" or "Attune ", - attuned and "" or "after using ", - attuned and (Cryptid and "^^" or "^") .. attunement() or max_karma, - attuned and "" or (Cryptid and " Gateways" or " Ankh or Soul Cards"), - attuned and " Chips " or "", - attuned and "& " or "", - attuned and "Mult" or "", - attuned and "" or "[", - attuned and "" or karma, - attuned and "" or " / " .. max_karma .. "]", - attuned and "(Cannot be debuffed" .. (Cryptid and "" or ", scales with ") or "", - attuned and (Cryptid and "" or "polygloss") or "", - attuned and ")" or "", - }} + return { + vars = { + attuned and " (Attuned)" or "", + Cryptid and "Ankh and Gateway" or "Ankh", + attuned and "" or "Attune ", + attuned and "" or "after using ", + attuned and (Cryptid and "^^" or "^") .. attunement() or max_karma, + attuned and "" or (Cryptid and " Gateways" or " Ankh or Soul Cards"), + attuned and " Chips " or "", + attuned and "& " or "", + attuned and "Mult" or "", + attuned and "" or "[", + attuned and "" or karma, + attuned and "" or " / " .. max_karma .. "]", + attuned and "(Cannot be debuffed" .. (Cryptid and "" or ", scales with ") or "", + attuned and (Cryptid and "" or "polygloss") or "", + attuned and ")" or "", + }, + } end, update = function(_, card, _) if card.added_to_deck and card.children.center and card.children.floating_sprite then @@ -534,9 +541,9 @@ SMODS.Joker { end if not (not context.blueprint and - (not context.retrigger_joker_check and not context.retrigger_joker) and - context.using_consumeable and - context.consumeable) then + (not context.retrigger_joker_check and not context.retrigger_joker) and + context.using_consumeable and + context.consumeable) then return end @@ -592,7 +599,7 @@ SMODS.Joker { card:flip() play_sound("card1") return true - end + end, })) G.E_MANAGER:add_event(Event({ @@ -603,9 +610,9 @@ SMODS.Joker { play_sound("card1") extra.is_attuned = true return true - end + end, })) - end + end, } if Cryptid then @@ -622,13 +629,13 @@ SMODS.Joker { "Clogs up your Joker slots", "{C:attention}Duplicates itself{} at the", "end of {C:attention}every ante", - } + }, }, pos = {x = 0, y = 0}, soul_pos = {x = 1, y = 0}, cost = 1, rarity = "jane_junk", - in_pool = function (_, _) + in_pool = function(_, _) for _, v in pairs(SMODS.find_card("j_jane_honey")) do if tonumber(v.ability.extra.level) == #Jane.rarity_ids - 1 then return true @@ -644,12 +651,12 @@ SMODS.Joker { local function is_end_of_ante() return not context.individual and not - context.repetition and not - card.debuff and - context.end_of_round and not - context.blueprint and - G.GAME.blind.boss and not - (G.GAME.blind.config and G.GAME.blind.config.bonus) + context.repetition and not + card.debuff and + context.end_of_round and not + context.blueprint and + G.GAME.blind.boss and not + (G.GAME.blind.config and G.GAME.blind.config.bonus) end local function spawn() @@ -658,12 +665,16 @@ SMODS.Joker { rot:add_to_deck() G.jokers:emplace(rot) Jane.card_status_text(rot, "...", nil, 0.05 * card.T.h, G.C.BLACK, 3, 0, 0, nil, "bm") + return true end if has_room() and not card.cloned and is_end_of_ante() then - spawn() + Jane.q(spawn, 0.5) else - card.cloned = false + Jane.q(function() + card.cloned = false + return true + end, 5) end - end + end, } diff --git a/src/spectral.lua b/src/spectral.lua index 93787cd..076229c 100644 --- a/src/spectral.lua +++ b/src/spectral.lua @@ -2,7 +2,7 @@ SMODS.Atlas { key = "janertarots", px = 71, py = 95, - path = Jane.config.texture_pack .. "/c_jane_reversetarots.png" + path = Jane.config.texture_pack .. "/c_jane_reversetarots.png", } SMODS.Sound({key = "draw", path = "draw.ogg"}) @@ -26,7 +26,7 @@ local function conjure(card, number) G.consumeables:emplace(spectral) card:juice_up(0.3, 0.5) return true - end + end, })) end end @@ -65,7 +65,7 @@ local function createfulldeck(enhancement, edition, amount, emplacement) end return true - end + end, })) end end @@ -90,7 +90,7 @@ local function randomize(targets, noanim) end if noanim then - for i=1, #targets do + for i = 1, #targets do local card = targets[i] card:set_base(pseudorandom_element(G.P_CARDS)) @@ -133,7 +133,7 @@ local function randomize(targets, noanim) play_sound("card1", percent) targets[i]:juice_up(0.3, 0.3) return true - end + end, })) end @@ -173,7 +173,7 @@ local function randomize(targets, noanim) play_sound("card3", percent, 0.6) card:juice_up(0.3, 0.3) return true - end + end, })) end end @@ -189,7 +189,7 @@ SMODS.Consumable { "{C:green,E:1}Randomises{} all cards in hand", "{C:inactive}(Rank, seal, edition,", "{C:inactive}enhancement, and suit)", - } + }, }, pos = {x = 0, y = 4}, cost = 4, @@ -204,12 +204,12 @@ SMODS.Consumable { play_sound("tarot1") card:juice_up(0.3, 0.5) return true - end + end, })) randomize(G.hand.cards) delay(0.5) - end + end, } SMODS.Consumable { @@ -222,7 +222,7 @@ SMODS.Consumable { "Creates {C:attention}#1#", "{C:spectral}Spectral{} cards", "{C:inactive}(Must have room)", - } + }, }, config = {extra = {spectrals = 2}}, pos = {x = 2, y = 4}, @@ -238,7 +238,7 @@ SMODS.Consumable { bulk_use = function(_, card, _, _, number) conjure(card, number) delay(0.6) - end + end, } SMODS.Consumable { @@ -251,7 +251,7 @@ SMODS.Consumable { "Create {C:attention}#1#{} {C:green}random {C:dark_edition}Negative", "{C:attention}Perishable {C:attention}Jokers{}, set {C:money}sell", "{C:money}value {}of {C:attention}all Jokers {}to {C:money}$0", - } + }, }, config = {extra = {shadows = 2}}, pos = {x = 3, y = 4}, @@ -278,7 +278,8 @@ SMODS.Consumable { G.jokers.cards[i].extra_cost = 0 G.jokers.cards[i].cost = 0 G.jokers.cards[i].sell_cost = 0 - G.jokers.cards[i].sell_cost_label = G.jokers.cards[i].facing == "back" and "?" or G.jokers.cards[i].sell_cost + G.jokers.cards[i].sell_cost_label = G.jokers.cards[i].facing == "back" and "?" or G.jokers.cards[i] + .sell_cost end end, bulk_use = function(_, card, _, _, number) @@ -301,12 +302,12 @@ SMODS.Consumable { G.jokers.cards[i].extra_cost = 0 G.jokers.cards[i].cost = 0 G.jokers.cards[i].sell_cost = 0 - G.jokers.cards[i].sell_cost_label = G.jokers.cards[i].facing == "back" and "?" or G.jokers.cards[i].sell_cost + G.jokers.cards[i].sell_cost_label = G.jokers.cards[i].facing == "back" and "?" or G.jokers.cards[i] + .sell_cost end - end + end, } - SMODS.Consumable { key = "rift", atlas = "janeacc", @@ -315,8 +316,8 @@ SMODS.Consumable { name = "Rift", text = { "{C:attention}Reset{} your deck to a", - "{C:attention}standard 52-card deck" - } + "{C:attention}standard 52-card deck", + }, }, cost = 15, pos = {x = 4, y = 4}, @@ -336,12 +337,12 @@ SMODS.Consumable { timer = "REAL", delay = time or 1, func = function() - return true - end + return true + end, }), queue) end realdelay(1) createfulldeck() - end + end, } diff --git a/src/tarot.lua b/src/tarot.lua index 6b2cf3a..c32c453 100644 --- a/src/tarot.lua +++ b/src/tarot.lua @@ -23,7 +23,6 @@ local blurbs = { "Juggling is one of my favourite passtimes!", "I wonder what's the deal with pairs?", "You don't need to understand math to enjoy watching the digits climb!", - "You should meet my friend Joseph; he's stuck in a Planet card!", "M!", } @@ -35,8 +34,8 @@ SMODS.Consumable { name = "Joker-in-a-Tarot", text = { "Create a {C:dark_edition}Negative {C:attention}default Joker", - "{C:inactive,E:1}#1#{}" - } + "{C:inactive,E:1}#1#{}", + }, }, loc_vars = function(_, _, _) return {vars = {blurbs[math.random(#blurbs)]}} @@ -59,5 +58,5 @@ SMODS.Consumable { for _ = 1, number do self:use(card, area, copier) end - end + end, } diff --git a/src/token.lua b/src/token.lua index d93ea13..d7bf152 100644 --- a/src/token.lua +++ b/src/token.lua @@ -2,7 +2,7 @@ SMODS.Atlas { key = "janetokens", px = 71, py = 95, - path = Jane.config.texture_pack .. "/c_jane_tokens.png" + path = Jane.config.texture_pack .. "/c_jane_tokens.png", } SMODS.Sound({key = "e_gilded", path = "e_gilded.ogg"}) @@ -12,7 +12,7 @@ SMODS.ConsumableType { default = "c_jane_token_tag_standard", loc_txt = { collection = "Tokens", - name = "Token" + name = "Token", }, shop_rate = 0, collection_rows = {5, 6}, @@ -21,62 +21,62 @@ SMODS.ConsumableType { } for _, v in pairs({ - {"tag_standard", "Standard", 0, 0, 3}, - {"tag_charm", "Charm", 1, 0, 5}, - {"tag_meteor", "Meteor", 2, 0, 5}, - {"tag_ethereal", "Ethereal", 3, 0, 5}, - {"tag_buffoon", "Buffoon", 4, 0, 8}, - {"tag_cry_console", "Console", 5, 0, 7}, + {"tag_standard", "Standard", 0, 0, 3}, + {"tag_charm", "Charm", 1, 0, 5}, + {"tag_meteor", "Meteor", 2, 0, 5}, + {"tag_ethereal", "Ethereal", 3, 0, 5}, + {"tag_buffoon", "Buffoon", 4, 0, 8}, + {"tag_cry_console", "Console", 5, 0, 7}, - {"tag_cry_loss", "Loss", 0, 1, 12}, - {"tag_cry_bundle", "Bundle", 1, 1, 10}, - {"tag_uncommon", "Uncommon", 2, 1, 3}, - {"tag_rare", "Rare", 3, 1, 5}, - {"tag_cry_epic", "Epic", 4, 1, 8}, - {"tag_cry_gourmond", "Gourmond", 5, 1, 4}, + {"tag_cry_loss", "Loss", 0, 1, 12}, + {"tag_cry_bundle", "Bundle", 1, 1, 10}, + {"tag_uncommon", "Uncommon", 2, 1, 3}, + {"tag_rare", "Rare", 3, 1, 5}, + {"tag_cry_epic", "Epic", 4, 1, 8}, + {"tag_cry_gourmond", "Gourmond", 5, 1, 4}, - {"tag_double", "Double", 0, 2, 6}, - {"tag_cry_triple", "Triple", 1, 2, 8}, - {"tag_cry_quadruple", "Quadruple", 2, 2, 10}, - {"tag_cry_quintuple", "Quintuple", 3, 2, 13}, - {"tag_skip", "Speed", 4, 2, 7}, - {"tag_economy", "Economy", 5, 2, 10}, + {"tag_double", "Double", 0, 2, 6}, + {"tag_cry_triple", "Triple", 1, 2, 8}, + {"tag_cry_quadruple", "Quadruple", 2, 2, 10}, + {"tag_cry_quintuple", "Quintuple", 3, 2, 13}, + {"tag_skip", "Speed", 4, 2, 7}, + {"tag_economy", "Economy", 5, 2, 10}, - {"tag_investment", "Investment", 0, 3, 8}, - {"tag_foil", "Foil", 1, 3, 3}, - {"tag_holo", "Holographic", 2, 3, 4}, - {"tag_polychrome", "Polychrome", 3, 3, 5}, - {"tag_negative", "Negative", 4, 3, 10}, + {"tag_investment", "Investment", 0, 3, 8}, + {"tag_foil", "Foil", 1, 3, 3}, + {"tag_holo", "Holographic", 2, 3, 4}, + {"tag_polychrome", "Polychrome", 3, 3, 5}, + {"tag_negative", "Negative", 4, 3, 10}, - {"tag_d_six", "Dice", 0, 4, 2}, - {"tag_orbital", "Orbital", 1, 4, 6}, - {"tag_top_up", "Top-up", 2, 4, 2}, - {"tag_cry_bettertop_up", "Top-up+", 3, 4, 3}, - {"tag_coupon", "Coupon", 4, 4, 10}, - {"tag_cry_memory", "Memory", 5, 4, 8}, + {"tag_d_six", "Dice", 0, 4, 2}, + {"tag_orbital", "Orbital", 1, 4, 6}, + {"tag_top_up", "Top-up", 2, 4, 2}, + {"tag_cry_bettertop_up", "Top-up+", 3, 4, 3}, + {"tag_coupon", "Coupon", 4, 4, 10}, + {"tag_cry_memory", "Memory", 5, 4, 8}, - {"tag_garbage", "Garbage", 0, 5, 6}, - {"tag_handy", "Handy", 1, 5, 8}, - {"tag_juggle", "Juggle", 2, 5, 2}, - {"tag_cry_schematic", "Schematic", 3, 5, 10}, - {"tag_voucher", "Voucher", 4, 5, 5}, - {"tag_cry_better_voucher", "Voucher+", 5, 5, 7}, + {"tag_garbage", "Garbage", 0, 5, 6}, + {"tag_handy", "Handy", 1, 5, 8}, + {"tag_juggle", "Juggle", 2, 5, 2}, + {"tag_cry_schematic", "Schematic", 3, 5, 10}, + {"tag_voucher", "Voucher", 4, 5, 5}, + {"tag_cry_better_voucher", "Voucher+", 5, 5, 7}, - {"tag_cry_gambler", "Gamble", 0, 6, 10}, - {"tag_cry_cat", "Cat", 1, 6, 1}, - {"tag_cry_mosaic", "Mosaic", 2, 6, 6}, - {"tag_cry_fragile", "Fragile", 3, 6, 7}, - {"tag_cry_astral", "Astral", 4, 6, 8}, - {"tag_cry_m", "M", 5, 6, 8}, + {"tag_cry_gambler", "Gamble", 0, 6, 10}, + {"tag_cry_cat", "Cat", 1, 6, 1}, + {"tag_cry_mosaic", "Mosaic", 2, 6, 6}, + {"tag_cry_fragile", "Fragile", 3, 6, 7}, + {"tag_cry_astral", "Astral", 4, 6, 8}, + {"tag_cry_m", "M", 5, 6, 8}, - {"tag_cry_blur", "Blurred", 0, 7, 11}, - {"tag_cry_oversat", "Oversaturated", 1, 7, 12}, - {"tag_cry_glitched", "Glitched", 2, 7, 13}, - {"tag_cry_gold", "Golden", 3, 7, 9}, - {"tag_cry_booster", "Booster", 4, 7, 4}, - {"tag_cry_scope", "Scope", 5, 7, 3}, + {"tag_cry_blur", "Blurred", 0, 7, 11}, + {"tag_cry_oversat", "Oversaturated", 1, 7, 12}, + {"tag_cry_glitched", "Glitched", 2, 7, 13}, + {"tag_cry_gold", "Golden", 3, 7, 9}, + {"tag_cry_booster", "Booster", 4, 7, 4}, + {"tag_cry_scope", "Scope", 5, 7, 3}, - {"tag_cry_banana", "Banana", 0, 8, 4}, + {"tag_cry_banana", "Banana", 0, 8, 4}, }) do if Cryptid or v[1]:sub(1, 7) ~= "tag_cry" then @@ -96,7 +96,7 @@ for _, v in pairs({ can_stack = true, can_divide = true, can_use = Jane.can_use, - in_pool = function (_, _) + in_pool = function(_, _) return G.GAME.used_vouchers.v_jane_token_voucher end, use = function(_, _, _, _) @@ -109,7 +109,7 @@ for _, v in pairs({ for _ = 1, number do add_tag(Tag(v[1])) end - end + end, } end end diff --git a/src/voucher.lua b/src/voucher.lua index 142859f..7d4753a 100644 --- a/src/voucher.lua +++ b/src/voucher.lua @@ -2,7 +2,7 @@ SMODS.Atlas { key = "janetokenvoucher", px = 71, py = 95, - path = Jane.config.texture_pack .. "/v_jane_token_voucher.png" + path = Jane.config.texture_pack .. "/v_jane_token_voucher.png", } SMODS.Voucher { @@ -13,11 +13,11 @@ SMODS.Voucher { text = { "{C:attention}Tokens {}can appear", "in the shop", - } + }, }, pos = {x = 0, y = 0}, cost = 15, - redeem = function (_, _) - G.GAME['jane_tokens_rate'] = 1.5 - end + redeem = function(_, _) + G.GAME["jane_tokens_rate"] = 1.5 + end, }