diff --git a/Entropy.lua b/Entropy.lua index 485020b1..cedf3663 100644 --- a/Entropy.lua +++ b/Entropy.lua @@ -1,7 +1,9 @@ local mod_path = "" .. SMODS.current_mod.path Entropy.path = mod_path -SMODS.load_file("lib/utils.lua")() +assert(Spectrallib, "Please make sure Spectrallib is installed instead of Cryptlib\nhttps://github.com/SpectralPack/Spectrallib/") + +assert(SMODS.load_file("lib/utils.lua"))() local i = { "lib/colours", @@ -37,7 +39,7 @@ local i = { --"items/jokers/epic_jokers", --"items/jokers/exotic_jokers", "items/jokers/rlegendary_jokers", - --"items/jokers/entropic_jokers", + "items/jokers/entropic_jokers", "items/jokers/dice_jokers", @@ -55,6 +57,8 @@ local i = { "items/altpath/blinds", "items/misc/runes", + "items/jokers/void_jokers", + "compat/compat_loader" } Entropy.load_files(i) @@ -70,7 +74,7 @@ if not Cryptid.mod_gameset_whitelist then Cryptid.mod_gameset_whitelist = {} end Cryptid.mod_gameset_whitelist["entr"] = true Cryptid.mod_gameset_whitelist["Entropy"] = true -Entropy.UpdateDailySeed() +Entropy.update_daily_seed() if Entropy.config.family_mode then Cryptid_config.family_mode = true @@ -102,4 +106,53 @@ SMODS.current_mod.calculate = function(self, context) end if G.P_CENTERS.e_negative then G.P_CENTERS.e_negative.no_doe = true -end \ No newline at end of file +end + +SMODS.current_mod.menu_cards = function() + return { + func = function() + for i, v in pairs(G.title_top.cards) do + if v.config.center.key == "c_cryptid" then + G.title_top:remove_card(v) + v:remove() + end + if v.base and v.base.value and v.base.value == "Ace" then + --G.title_top:remove_card(v) + --v:remove() + v:set_base() + G.P_CENTERS.j_entr_title_card.discovered = true + v:set_ability(G.P_CENTERS.j_entr_title_card) + if v.children.front then + v.children.front:remove() + v.children.front = nil + end + math.randomseed(os.time()) + if math.random() < 0.01 then + v:set_edition("e_entr_freaky") + else + v:set_edition("e_entr_solar") + end + end + end + end, + } +end + +SMODS.Joker { + key = "title_card", + atlas = "titlecard", + no_collection = true, + in_pool = function() return false end, + rarity = "entr_zenith", + pos = {x=0, y=0}, + soul_pos = {x=1, y=0}, + no_doe = true, + no_collection = true, + display_size = { w = 122, h = 122 }, + in_pool = function() + return false + end, + cry_order = 999999, + discovered = true, + unlocked = true +} \ No newline at end of file diff --git a/README.md b/README.md index 41649d4c..b818972e 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ A Chaotic Balatro mod focused on Inverted Consumables and expanding on Vanilla mechanics in various other ways Generally Vanilla adjacent but not exactly Vanilla+ -[Download CryptLib](https://github.com/SpectralPack/Cryptlib) +[Download SpectralLib](https://github.com/SpectralPack/Spectrallib/) Entropy currently adds: diff --git a/assets/1x/apeirostemma.png b/assets/1x/apeirostemma.png new file mode 100644 index 00000000..cafac7c5 Binary files /dev/null and b/assets/1x/apeirostemma.png differ diff --git a/assets/1x/blinds.png b/assets/1x/blinds.png index 86e77169..aaa134a7 100644 Binary files a/assets/1x/blinds.png and b/assets/1x/blinds.png differ diff --git a/assets/1x/crossmod/blindside_blinds.png b/assets/1x/crossmod/blindside_blinds.png new file mode 100644 index 00000000..4bb67bd4 Binary files /dev/null and b/assets/1x/crossmod/blindside_blinds.png differ diff --git a/assets/1x/crossmod/blindside_tags.png b/assets/1x/crossmod/blindside_tags.png new file mode 100644 index 00000000..6281eb2f Binary files /dev/null and b/assets/1x/crossmod/blindside_tags.png differ diff --git a/assets/1x/crossmod/finity_jokers.png b/assets/1x/crossmod/finity_jokers.png new file mode 100644 index 00000000..c1d29162 Binary files /dev/null and b/assets/1x/crossmod/finity_jokers.png differ diff --git a/assets/1x/curse_icons.png b/assets/1x/curse_icons.png new file mode 100644 index 00000000..58fbbc83 Binary files /dev/null and b/assets/1x/curse_icons.png differ diff --git a/assets/1x/exotic_jokers.png b/assets/1x/exotic_jokers.png index 4f968647..406c0a04 100644 Binary files a/assets/1x/exotic_jokers.png and b/assets/1x/exotic_jokers.png differ diff --git a/assets/1x/hold_me.png b/assets/1x/hold_me.png index 54585ce0..ca6e62be 100644 Binary files a/assets/1x/hold_me.png and b/assets/1x/hold_me.png differ diff --git a/assets/1x/jokers.png b/assets/1x/jokers.png index 359b8f26..e13f51a5 100644 Binary files a/assets/1x/jokers.png and b/assets/1x/jokers.png differ diff --git a/assets/1x/logo.png b/assets/1x/logo.png new file mode 100644 index 00000000..25d69885 Binary files /dev/null and b/assets/1x/logo.png differ diff --git a/assets/1x/other_consumables.png b/assets/1x/other_consumables.png index 18938beb..8291d7cd 100644 Binary files a/assets/1x/other_consumables.png and b/assets/1x/other_consumables.png differ diff --git a/assets/1x/partners.png b/assets/1x/partners.png index 67d8397a..c05bfd60 100644 Binary files a/assets/1x/partners.png and b/assets/1x/partners.png differ diff --git a/assets/1x/planetarium.png b/assets/1x/planetarium.png new file mode 100644 index 00000000..4db54ac9 Binary files /dev/null and b/assets/1x/planetarium.png differ diff --git a/assets/1x/reverse_tarots.png b/assets/1x/reverse_tarots.png index 93957015..9501fae6 100644 Binary files a/assets/1x/reverse_tarots.png and b/assets/1x/reverse_tarots.png differ diff --git a/assets/1x/ruby.png b/assets/1x/ruby.png index 419cb900..c853381f 100644 Binary files a/assets/1x/ruby.png and b/assets/1x/ruby.png differ diff --git a/assets/1x/searingjokesheet.png b/assets/1x/searingjokesheet.png new file mode 100644 index 00000000..2c4d95ea Binary files /dev/null and b/assets/1x/searingjokesheet.png differ diff --git a/assets/1x/titlecard.png b/assets/1x/titlecard.png new file mode 100644 index 00000000..6347a211 Binary files /dev/null and b/assets/1x/titlecard.png differ diff --git a/assets/1x/void_jokers.png b/assets/1x/void_jokers.png new file mode 100644 index 00000000..9f3bc312 Binary files /dev/null and b/assets/1x/void_jokers.png differ diff --git a/assets/1x/xekanos.png b/assets/1x/xekanos.png index 13c59870..fbc042c8 100644 Binary files a/assets/1x/xekanos.png and b/assets/1x/xekanos.png differ diff --git a/assets/2x/apeirostemma.png b/assets/2x/apeirostemma.png new file mode 100644 index 00000000..70a7305b Binary files /dev/null and b/assets/2x/apeirostemma.png differ diff --git a/assets/2x/blinds.png b/assets/2x/blinds.png index 7e24f013..0f054dcb 100755 Binary files a/assets/2x/blinds.png and b/assets/2x/blinds.png differ diff --git a/assets/2x/blindside_tags.png b/assets/2x/blindside_tags.png new file mode 100644 index 00000000..fca42b05 Binary files /dev/null and b/assets/2x/blindside_tags.png differ diff --git a/assets/2x/crossmod/blindside_blinds.png b/assets/2x/crossmod/blindside_blinds.png new file mode 100644 index 00000000..6320cdae Binary files /dev/null and b/assets/2x/crossmod/blindside_blinds.png differ diff --git a/assets/2x/crossmod/finity_jokers.png b/assets/2x/crossmod/finity_jokers.png new file mode 100644 index 00000000..f5d2a908 Binary files /dev/null and b/assets/2x/crossmod/finity_jokers.png differ diff --git a/assets/2x/curse_icons.png b/assets/2x/curse_icons.png new file mode 100644 index 00000000..c95f4f26 Binary files /dev/null and b/assets/2x/curse_icons.png differ diff --git a/assets/2x/exotic_jokers.png b/assets/2x/exotic_jokers.png index 26b7660e..85c3e6f5 100755 Binary files a/assets/2x/exotic_jokers.png and b/assets/2x/exotic_jokers.png differ diff --git a/assets/2x/hold_me.png b/assets/2x/hold_me.png index b9e3569c..a270e7dc 100644 Binary files a/assets/2x/hold_me.png and b/assets/2x/hold_me.png differ diff --git a/assets/2x/jokers.png b/assets/2x/jokers.png index bbc7b4d5..8db287e3 100644 Binary files a/assets/2x/jokers.png and b/assets/2x/jokers.png differ diff --git a/assets/2x/logo.png b/assets/2x/logo.png new file mode 100644 index 00000000..d46540f5 Binary files /dev/null and b/assets/2x/logo.png differ diff --git a/assets/2x/other_consumables.png b/assets/2x/other_consumables.png index 0b5745af..d5a99a33 100755 Binary files a/assets/2x/other_consumables.png and b/assets/2x/other_consumables.png differ diff --git a/assets/2x/partners.png b/assets/2x/partners.png index ecc061d9..aee28501 100755 Binary files a/assets/2x/partners.png and b/assets/2x/partners.png differ diff --git a/assets/2x/planetarium.png b/assets/2x/planetarium.png new file mode 100644 index 00000000..537650da Binary files /dev/null and b/assets/2x/planetarium.png differ diff --git a/assets/2x/reverse_tarots.png b/assets/2x/reverse_tarots.png index a8eb8a0a..ed2daa9b 100755 Binary files a/assets/2x/reverse_tarots.png and b/assets/2x/reverse_tarots.png differ diff --git a/assets/2x/ruby.png b/assets/2x/ruby.png index e154c9c2..6ac4f233 100755 Binary files a/assets/2x/ruby.png and b/assets/2x/ruby.png differ diff --git a/assets/2x/searingjokesheet.png b/assets/2x/searingjokesheet.png new file mode 100644 index 00000000..d4c66d5f Binary files /dev/null and b/assets/2x/searingjokesheet.png differ diff --git a/assets/2x/titlecard.png b/assets/2x/titlecard.png new file mode 100644 index 00000000..737e8078 Binary files /dev/null and b/assets/2x/titlecard.png differ diff --git a/assets/2x/void_jokers.png b/assets/2x/void_jokers.png new file mode 100644 index 00000000..861aca55 Binary files /dev/null and b/assets/2x/void_jokers.png differ diff --git a/assets/2x/xekanos.png b/assets/2x/xekanos.png index 115589c4..5ceab516 100755 Binary files a/assets/2x/xekanos.png and b/assets/2x/xekanos.png differ diff --git a/assets/fonts/m6x11plusphi.ttf b/assets/fonts/m6x11plusphi.ttf new file mode 100644 index 00000000..4d4c5c35 Binary files /dev/null and b/assets/fonts/m6x11plusphi.ttf differ diff --git a/assets/rand.png b/assets/rand.png new file mode 100644 index 00000000..a03212b4 Binary files /dev/null and b/assets/rand.png differ diff --git a/assets/shaders/eeshader.fs b/assets/shaders/eeshader.fs new file mode 100644 index 00000000..05e35be7 --- /dev/null +++ b/assets/shaders/eeshader.fs @@ -0,0 +1,212 @@ +#if defined(VERTEX) || __VERSION__ > 100 || defined(GL_FRAGMENT_PRECISION_HIGH) + #define PRECISION highp +#else + #define PRECISION mediump +#endif + +// Card rotation +extern PRECISION vec2 eeshader; + +extern PRECISION number dissolve; +extern PRECISION number realtime; +extern PRECISION number time; +extern PRECISION vec4 texture_details; +extern PRECISION vec2 image_details; +extern bool shadow; +extern PRECISION vec4 burn_colour_1; +extern PRECISION vec4 burn_colour_2; +extern Image second_image; + + + +number hue(number s, number t, number h) +{ + number hs = mod(h, 1.)*6.; + if (hs < 1.) return (t-s) * hs + s; + if (hs < 3.) return t; + if (hs < 4.) return (t-s) * (4.-hs) + s; + return s; +} + +vec4 RGB(vec4 c) +{ + if (c.y < 0.0001) + return vec4(vec3(c.z), c.a); + + number t = (c.z < .5) ? c.y*c.z + c.z : -c.y*c.z + (c.y+c.z); + number s = 2.0 * c.z - t; + return vec4(hue(s,t,c.x + 1./3.), hue(s,t,c.x), hue(s,t,c.x - 1./3.), c.w); +} + +vec4 HSL(vec4 c) +{ + number low = min(c.r, min(c.g, c.b)); + number high = max(c.r, max(c.g, c.b)); + number delta = high - low; + number sum = high+low; + + vec4 hsl = vec4(.0, .0, .5 * sum, c.a); + if (delta == .0) + return hsl; + + hsl.y = (hsl.z < .5) ? delta / sum : delta / (2.0 - sum); + + if (high == c.r) + hsl.x = (c.g - c.b) / delta; + else if (high == c.g) + hsl.x = (c.b - c.r) / delta + 2.0; + else + hsl.x = (c.r - c.g) / delta + 4.0; + + hsl.x = mod(hsl.x / 6., 1.); + hsl.y = 0.0; + hsl.z = hsl.z; + return hsl; +} + +#define PI 3.14159265358979323846 + +float rand(vec2 c){ + return fract(sin(dot(c.xy ,vec2(12.9898,78.233))) * 43758.5453); +} + +float noise(vec2 p, float freq ){ + float unit = 1./freq; + vec2 ij = floor(p/unit); + vec2 xy = mod(p,unit)/unit; + //xy = 3.*xy*xy-2.*xy*xy*xy; + xy = .5*(1.-cos(PI*xy)); + float a = rand((ij+vec2(0.,0.))); + float b = rand((ij+vec2(1.,0.))); + float c = rand((ij+vec2(0.,1.))); + float d = rand((ij+vec2(1.,1.))); + float x1 = mix(a, b, xy.x); + float x2 = mix(c, d, xy.x); + return mix(x1, x2, xy.y); +} + +float pNoise(vec2 p, int res){ + float persistance = .5; + float n = 0.; + float normK = 0.; + float f = 4.; + float amp = 1.; + int iCount = 0; + for (int i = 0; i<50; i++){ + n+=amp*noise(p, f); + f*=2.; + normK+=amp; + amp*=persistance; + if (iCount == res) break; + iCount++; + } + float nf = n/normK; + return nf*nf*nf*nf; +} + +vec4 dissolve_mask(vec4 final_pixel, vec2 texture_coords, vec2 uv); +// texture_coords = coolds of a original_pixel within the atlas texture +vec4 effect( vec4 colour, Image texture, vec2 texture_coords, vec2 screen_coords ) +{ + vec4 tex = Texel( texture, texture_coords); + vec2 real_uv = screen_coords; + vec2 uv = screen_coords; + + float dummy = 2; + if(shadow) {dummy = 3;} + if(uv.x > uv.x * 2) {uv = eeshader*dissolve*burn_colour_1.x*burn_colour_2.x*time*dummy;} + + float sprite_width = texture_details.z / image_details.x; // Normalized width + float min_x = texture_details.x * sprite_width; // min X + float max_x = (texture_details.x + 1.) * sprite_width; // max X + + float tilt_normalized = eeshader.x; + + float shiftX = 2.5 * sin(uv.y * (10.16 + 30.0 * uv.y * uv.y) + tilt_normalized * 1.5) // sine shift + affected by card rotation + / image_details.x; // shift X so normalize by X + + float newX = min(max_x, max(min_x, texture_coords.x + shiftX)); + + uv /= 20.; + float x = screen_coords.x-.5; + float y = screen_coords.y-.5; + float a = 1.-sqrt(x*x + y*y); + a=sqrt(a); + uv += uv.y*0.15; + vec2 q = uv.xy; + vec2 p = -1.0+2.0*q; + //p.x *= image_details.x/image_details.y; + // Rain + vec4 col2 = vec4(0,0,0,1); + vec2 st = p * vec2(.5, .01)+vec2(-(realtime)*6.-q.y*.6*-0.0, -(realtime)*6.); + float f = floor(mod((realtime)/9., 2.0)); + f = (pNoise(st, 10)+1.) * (pNoise(st*.733, 10) + 1.) * 1.55 / 4.; + f = clamp(pow(abs(f), 12.0) * 13.0, 0.0, q.y*.14); + col2 += f*8.; + col2.g = 0.0; + col2.b = 0.0; + col2.a = 1; + + return tex*0.65 + col2; +} + + + +vec4 dissolve_mask(vec4 final_pixel, vec2 texture_coords, vec2 uv) +{ + if (dissolve < 0.001) { + return vec4(shadow ? vec3(0.,0.,0.) : final_pixel.xyz, shadow ? final_pixel.a*0.3: final_pixel.a); + } + + float adjusted_dissolve = (dissolve*dissolve*(3.-2.*dissolve))*1.02 - 0.01; //Adjusting 0.0-1.0 to fall to -0.1 - 1.1 scale so the mask does not pause at extreme values + + float t = time * 10.0 + 2003.; + vec2 floored_uv = (floor((uv*texture_details.ba)))/max(texture_details.b, texture_details.a); + vec2 uv_scaled_centered = (floored_uv - 0.5) * 2.3 * max(texture_details.b, texture_details.a); + + vec2 field_part1 = uv_scaled_centered + 50.*vec2(sin(-t / 143.6340), cos(-t / 99.4324)); + vec2 field_part2 = uv_scaled_centered + 50.*vec2(cos( t / 53.1532), cos( t / 61.4532)); + vec2 field_part3 = uv_scaled_centered + 50.*vec2(sin(-t / 87.53218), sin(-t / 49.0000)); + + float field = (1.+ ( + cos(length(field_part1) / 19.483) + sin(length(field_part2) / 33.155) * cos(field_part2.y / 15.73) + + cos(length(field_part3) / 27.193) * sin(field_part3.x / 21.92) ))/2.; + vec2 borders = vec2(0.2, 0.8); + + float res = (.5 + .5* cos( (adjusted_dissolve) / 82.612 + ( field + -.5 ) *3.14)) + - (floored_uv.x > borders.y ? (floored_uv.x - borders.y)*(5. + 5.*dissolve) : 0.)*(dissolve) + - (floored_uv.y > borders.y ? (floored_uv.y - borders.y)*(5. + 5.*dissolve) : 0.)*(dissolve) + - (floored_uv.x < borders.x ? (borders.x - floored_uv.x)*(5. + 5.*dissolve) : 0.)*(dissolve) + - (floored_uv.y < borders.x ? (borders.x - floored_uv.y)*(5. + 5.*dissolve) : 0.)*(dissolve); + + if (final_pixel.a > 0.01 && burn_colour_1.a > 0.01 && !shadow && res < adjusted_dissolve + 0.8*(0.5-abs(adjusted_dissolve-0.5)) && res > adjusted_dissolve) { + if (!shadow && res < adjusted_dissolve + 0.5*(0.5-abs(adjusted_dissolve-0.5)) && res > adjusted_dissolve) { + final_pixel.rgba = burn_colour_1.rgba; + } else if (burn_colour_2.a > 0.01) { + final_pixel.rgba = burn_colour_2.rgba; + } + } + + return vec4(shadow ? vec3(0.,0.,0.) : final_pixel.xyz, res > adjusted_dissolve ? (shadow ? final_pixel.a*0.3: final_pixel.a) : .0); +} + + + +extern PRECISION vec2 mouse_screen_pos; +extern PRECISION float hovering; +extern PRECISION float screen_scale; + +#ifdef VERTEX +vec4 position( mat4 transform_projection, vec4 vertex_position ) +{ + if (hovering <= 0.){ + return transform_projection * vertex_position; + } + float mid_dist = length(vertex_position.xy - 0.5*love_ScreenSize.xy)/length(love_ScreenSize.xy); + vec2 mouse_offset = (vertex_position.xy - mouse_screen_pos.xy)/screen_scale; + float scale = 0.2*(-0.03 - 0.3*max(0., 0.3-mid_dist)) + *hovering*(length(mouse_offset)*length(mouse_offset))/(2. -mid_dist); + + return transform_projection * vertex_position + vec4(0,0,0,scale); +} +#endif \ No newline at end of file diff --git a/assets/shaders/flashlight.fs b/assets/shaders/flashlight.fs new file mode 100644 index 00000000..579d477c --- /dev/null +++ b/assets/shaders/flashlight.fs @@ -0,0 +1,90 @@ +#define PI 3.14159265358979323846 + +extern vec2 center_pos; +extern float dist; +extern float time; + +float rand(vec2 c){ + return fract(sin(dot(c.xy ,vec2(12.9898,78.233))) * 43758.5453); +} + +float psin(float x) { + return (1+sin(x))/2; +} + +float hash(vec2 p) { + return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453123); +} + +float noise(vec2 p) { + vec2 i = floor(p); + vec2 f = fract(p); + vec2 u = f * f * (3.0 - 2.0 * f); + return mix( + mix(hash(i + vec2(0.0, 0.0)), hash(i + vec2(1.0, 0.0)), u.x), + mix(hash(i + vec2(0.0, 1.0)), hash(i + vec2(1.0, 1.0)), u.x), + u.y + ); +} + +float fbm(vec2 p) { + float val = 0.0; + float amp = 0.5; + for (int i = 0; i < 5; i++) { + val += amp * noise(p); + p *= 2.0; + amp *= 0.5; + } + return val; +} + +// This is what actually changes the look of card +vec4 effect( vec4 colour, Image texture, vec2 tc, vec2 screen_coords ) +{ + + vec4 tex = Texel(texture, tc); + + + vec2 uv = screen_coords / love_ScreenSize.xy; + + // Sky base turbulence + float angle = time * 0.03; + mat2 rot = mat2(cos(angle), -sin(angle), sin(angle), cos(angle)); + vec2 ruv = rot * (uv - 0.5) + 0.5; + float skyBase = pow(fbm(ruv * 4.0), 1.6); + + // Orange glow wash + float glow = smoothstep(0.1, 0.9, uv.y); + vec3 orangeSky = mix(vec3(1.0, 0.1, 0.15), vec3(0.2, 0.05, 0.05), glow); + + // Forked lightning filaments + vec2 fork1UV = uv * vec2(12.0, 2.5) + vec2(time * 0.1, sin(time * 0.5) * 0.2); + float fork1 = smoothstep(0.6, 1.0, fbm(fork1UV)); + + vec2 fork2UV = uv * vec2(12.0, 2.5) + vec2(time * 0.07 + 1.3, cos(uv.y * 10.0 + time)); + float fork2 = smoothstep(0.6, 1.0, fbm(fork2UV)); + + float tendrilMask = clamp(fork1 + 0.5 * fork2, 0.0, 1.0); + + // Sky reaction — warm glow burst + green lightning aura + float reactionFalloff = exp(-8.0 * abs(uv.y - 0.25)); + vec3 warmFlash = vec3(1.0, 0.5, 0.2) * tendrilMask * reactionFalloff * 0.4; + vec3 lightningAura = vec3(0.0, 1.0, 0.6) * tendrilMask * reactionFalloff * 0.7; + + // Final blend + vec3 baseColor = mix(vec3(skyBase), orangeSky, 0.6); + vec3 finalColor = baseColor + warmFlash + lightningAura; + + tex.rgb = tex.rgb * ((dist - distance(center_pos, screen_coords))/dist) + finalColor * (1 - ((dist - distance(center_pos, screen_coords))/dist)) * 0.25; + + return tex; +} + + + +#ifdef VERTEX +vec4 position( mat4 transform_projection, vec4 vertex_position ) +{ + return transform_projection * vertex_position; +} +#endif \ No newline at end of file diff --git a/assets/shaders/invertradius.fs b/assets/shaders/invertradius.fs new file mode 100644 index 00000000..373b9cc9 --- /dev/null +++ b/assets/shaders/invertradius.fs @@ -0,0 +1,166 @@ +#define PI 3.14159265358979323846 + +extern vec2 center_pos; +extern float dist; +extern float time; + +float rand(vec2 c){ + return fract(sin(dot(c.xy,vec2(12.9898,78.233)))*43758.5453); +} + +float lindist(float a,float b){ + return abs(a-b); +} + +number hue(number s, number t, number h) +{ + number hs = mod(h, 1.)*6.; + if (hs < 1.) return (t-s) * hs + s; + if (hs < 3.) return t; + if (hs < 4.) return (t-s) * (4.-hs) + s; + return s; +} + +vec4 RGB(vec4 c) +{ + if (c.y < 0.0001) + return vec4(vec3(c.z), c.a); + + number t = (c.z < .5) ? c.y*c.z + c.z : -c.y*c.z + (c.y+c.z); + number s = 2.0 * c.z - t; + return vec4(hue(s,t,c.x + 1./3.), hue(s,t,c.x), hue(s,t,c.x - 1./3.), c.w); +} + +vec4 HSL(vec4 c) +{ + number low = min(c.r, min(c.g, c.b)); + number high = max(c.r, max(c.g, c.b)); + number delta = high - low; + number sum = high+low; + + vec4 hsl = vec4(.0, .0, .5 * sum, c.a); + if (delta == .0) + return hsl; + + hsl.y = (hsl.z < .5) ? delta / sum : delta / (2.0 - sum); + + if (high == c.r) + hsl.x = (c.g - c.b) / delta; + else if (high == c.g) + hsl.x = (c.b - c.r) / delta + 2.0; + else + hsl.x = (c.r - c.g) / delta + 4.0; + + hsl.x = mod(hsl.x / 6., 1.); + return hsl; +} + +vec2 polar_coords(vec2 pos,vec2 origin){ + vec2 normalized=pos-origin; + origin=vec2(0.,0.); + float r=distance(normalized,origin); + float theta=atan(normalized.y,normalized.x); + + return vec2(r,theta); +} + +float min_dist=dist; +float max_dist=2*dist; + +float get_t(vec2 pos){ + float d=distance(center_pos,pos); + float t=0.; + if(min_dist max_dist) { + float str = (rad - abs(max_mult-cdist)) / rad; + tex.rgb *= max(str*max_mult,1.0); + } + + return tex; +} + +#ifdef VERTEX +vec4 position(mat4 transform_projection,vec4 vertex_position) +{ + return transform_projection*vertex_position; +} +#endif \ No newline at end of file diff --git a/assets/shaders/pulseoutline.fs b/assets/shaders/pulseoutline.fs new file mode 100644 index 00000000..a6ffbac8 --- /dev/null +++ b/assets/shaders/pulseoutline.fs @@ -0,0 +1,185 @@ +#if defined(VERTEX) || __VERSION__ > 100 || defined(GL_FRAGMENT_PRECISION_HIGH) + #define MY_HIGHP_OR_MEDIUMP highp +#else + #define MY_HIGHP_OR_MEDIUMP mediump +#endif + +extern MY_HIGHP_OR_MEDIUMP vec2 pulseoutline; +extern MY_HIGHP_OR_MEDIUMP number dissolve; +extern MY_HIGHP_OR_MEDIUMP number time; +extern MY_HIGHP_OR_MEDIUMP number realtime; +extern MY_HIGHP_OR_MEDIUMP vec4 texture_details; +extern MY_HIGHP_OR_MEDIUMP vec2 image_details; +extern bool shadow; +extern MY_HIGHP_OR_MEDIUMP vec4 burn_colour_1; +extern MY_HIGHP_OR_MEDIUMP vec4 burn_colour_2; +extern MY_HIGHP_OR_MEDIUMP vec4 outline_color; + +vec4 dissolve_mask(vec4 tex, vec2 texture_coords, vec2 uv) +{ + if (dissolve < 0.001) { + return vec4(shadow ? vec3(0.,0.,0.) : tex.xyz, shadow ? tex.a*0.3: tex.a); + } + + float adjusted_dissolve = (dissolve*dissolve*(3.-2.*dissolve))*1.02 - 0.01; //Adjusting 0.0-1.0 to fall to -0.1 - 1.1 scale so the mask does not pause at extreme values + + float t = time * 10.0 + 2003.; + vec2 floored_uv = (floor((uv*texture_details.ba)))/max(texture_details.b, texture_details.a); + vec2 uv_scaled_centered = (floored_uv - 0.5) * 2.3 * max(texture_details.b, texture_details.a); + + vec2 field_part1 = uv_scaled_centered + 50.*vec2(sin(-t / 143.6340), cos(-t / 99.4324)); + vec2 field_part2 = uv_scaled_centered + 50.*vec2(cos( t / 53.1532), cos( t / 61.4532)); + vec2 field_part3 = uv_scaled_centered + 50.*vec2(sin(-t / 87.53218), sin(-t / 49.0000)); + + float field = (1.+ ( + cos(length(field_part1) / 19.483) + sin(length(field_part2) / 33.155) * cos(field_part2.y / 15.73) + + cos(length(field_part3) / 27.193) * sin(field_part3.x / 21.92) ))/2.; + vec2 borders = vec2(0.2, 0.8); + + float res = (.5 + .5* cos( (adjusted_dissolve) / 82.612 + ( field + -.5 ) *3.14)) + - (floored_uv.x > borders.y ? (floored_uv.x - borders.y)*(5. + 5.*dissolve) : 0.)*(dissolve) + - (floored_uv.y > borders.y ? (floored_uv.y - borders.y)*(5. + 5.*dissolve) : 0.)*(dissolve) + - (floored_uv.x < borders.x ? (borders.x - floored_uv.x)*(5. + 5.*dissolve) : 0.)*(dissolve) + - (floored_uv.y < borders.x ? (borders.x - floored_uv.y)*(5. + 5.*dissolve) : 0.)*(dissolve); + + if (tex.a > 0.01 && burn_colour_1.a > 0.01 && !shadow && res < adjusted_dissolve + 0.8*(0.5-abs(adjusted_dissolve-0.5)) && res > adjusted_dissolve) { + if (!shadow && res < adjusted_dissolve + 0.5*(0.5-abs(adjusted_dissolve-0.5)) && res > adjusted_dissolve) { + tex.rgba = burn_colour_1.rgba; + } else if (burn_colour_2.a > 0.01) { + tex.rgba = burn_colour_2.rgba; + } + } + + return vec4(shadow ? vec3(0.,0.,0.) : tex.xyz, res > adjusted_dissolve ? (shadow ? tex.a*0.3: tex.a) : .0); +} + +number hue(number s, number t, number h) +{ + number hs = mod(h, 1.)*6.; + if (hs < 1.) return (t-s) * hs + s; + if (hs < 3.) return t; + if (hs < 4.) return (t-s) * (4.-hs) + s; + return s; +} + +vec4 RGB(vec4 c) +{ + if (c.y < 0.0001) + return vec4(vec3(c.z), c.a); + + number t = (c.z < .5) ? c.y*c.z + c.z : -c.y*c.z + (c.y+c.z); + number s = 2.0 * c.z - t; + return vec4(hue(s,t,c.x + 1./3.), hue(s,t,c.x), hue(s,t,c.x - 1./3.), c.w); +} + +vec4 HSL(vec4 c) +{ + number low = min(c.r, min(c.g, c.b)); + number high = max(c.r, max(c.g, c.b)); + number delta = high - low; + number sum = high+low; + + vec4 hsl = vec4(.0, .0, .5 * sum, c.a); + if (delta == .0) + return hsl; + + hsl.y = (hsl.z < .5) ? delta / sum : delta / (2.0 - sum); + + if (high == c.r) + hsl.x = (c.g - c.b) / delta; + else if (high == c.g) + hsl.x = (c.b - c.r) / delta + 2.0; + else + hsl.x = (c.r - c.g) / delta + 4.0; + + hsl.x = mod(hsl.x / 6., 1.); + return hsl; +} + +vec4 effect( vec4 colour, Image texture, vec2 texture_coords, vec2 screen_coords ) +{ + vec4 tex = Texel(texture, texture_coords); + vec2 uv = (((texture_coords)*(image_details)) - texture_details.xy*texture_details.ba)/texture_details.ba; + + number low = min(tex.r, min(tex.g, tex.b)); + number high = max(tex.r, max(tex.g, tex.b)); + number delta = high - low; + + number saturation_fac = 1. - max(0., 0.05*(1.1-delta)); + + vec4 hsl = HSL(vec4(tex.r*saturation_fac, tex.g*saturation_fac, tex.b, tex.a)); + + float t = pulseoutline.y*2.221 + time; + vec2 floored_uv = (floor((uv*texture_details.ba)))/texture_details.ba; + vec2 uv_scaled_centered = (floored_uv - 0.5) * 50.; + + vec2 field_part1 = uv_scaled_centered + 50.*vec2(sin(-t / 13.6340), cos(-t / 9.4324)); + vec2 field_part2 = uv_scaled_centered + 50.*vec2(cos( t / 5.1532), cos( t / 6.4532)); + vec2 field_part3 = uv_scaled_centered + 50.*vec2(sin(-t / 8.53218), sin(-t / 4.0000)); + + float field = (1.+ ( + cos(length(field_part1) / 19.483) + sin(length(field_part2) / 33.155) * cos(field_part2.y / 15.73) + + cos(length(field_part3) / 27.193) * sin(field_part3.x / 21.92) ))/2.; + + float res = (.5 + .5* cos( (pulseoutline.x) * 2.612 + ( field + -.5 ) *3.14)); + + if (uv.x > uv.x * 2.) uv = pulseoutline; + + + //if (tex.a == 0.) discard; + float outline_width = 60. * (sin(realtime*2.) + 1.1)/2.; + float dist = 0.; + float delta2 = 0.0001; + for (float i = delta2; i <= delta2*outline_width; i+=3.*delta2) { + if (Texel(texture, texture_coords + vec2(i, 0.)).a > 0. + && ((((texture_coords+ vec2(i, 0.))*(image_details)) - texture_details.xy*texture_details.ba)/texture_details.ba).x < 1.) dist = 1.; + if (Texel(texture, texture_coords + vec2(-i, 0.)).a > 0. + && ((((texture_coords+ vec2(-i, 0.))*(image_details)) - texture_details.xy*texture_details.ba)/texture_details.ba).x > 0.) dist = 1.; + if (Texel(texture, texture_coords + vec2(0., i)).a > 0. + && ((((texture_coords+ vec2(0., i))*(image_details)) - texture_details.xy*texture_details.ba)/texture_details.ba).y < 1.) dist = 1.; + if (Texel(texture, texture_coords + vec2(0., -i)).a > 0. + && ((((texture_coords+ vec2(0., -i))*(image_details)) - texture_details.xy*texture_details.ba)/texture_details.ba).y > 0.) dist = 1.; + + if (Texel(texture, texture_coords + vec2(i, i)).a > 0. + && ((((texture_coords+ vec2(i, i))*(image_details)) - texture_details.xy*texture_details.ba)/texture_details.ba).x < 1. + && ((((texture_coords+ vec2(i, i))*(image_details)) - texture_details.xy*texture_details.ba)/texture_details.ba).y < 1.) + dist = 1.; + if (Texel(texture, texture_coords + vec2(-i, i)).a > 0. + && ((((texture_coords+ vec2(-i, i))*(image_details)) - texture_details.xy*texture_details.ba)/texture_details.ba).x > 0. + && ((((texture_coords+ vec2(-i, i))*(image_details)) - texture_details.xy*texture_details.ba)/texture_details.ba).y < 1.) + dist = 1.; + if (Texel(texture, texture_coords + vec2(i, -i)).a > 0. + && ((((texture_coords+ vec2(i, -i))*(image_details)) - texture_details.xy*texture_details.ba)/texture_details.ba).y > 0. + && ((((texture_coords+ vec2(i, -i))*(image_details)) - texture_details.xy*texture_details.ba)/texture_details.ba).x < 1.) + dist = 1.; + if (Texel(texture, texture_coords + vec2(-i, -i)).a > 0. + && ((((texture_coords+ vec2(-i, -i))*(image_details)) - texture_details.xy*texture_details.ba)/texture_details.ba).y > 0. + && ((((texture_coords+ vec2(-i, -i))*(image_details)) - texture_details.xy*texture_details.ba)/texture_details.ba).x > 0.) + dist = 1.; + } + + if (dist > 0.0 && tex.a <= 0.) { + return dissolve_mask(outline_color, texture_coords, uv); + } + + return dissolve_mask(tex, texture_coords, uv); +} + +extern MY_HIGHP_OR_MEDIUMP vec2 mouse_screen_pos; +extern MY_HIGHP_OR_MEDIUMP float hovering; +extern MY_HIGHP_OR_MEDIUMP float screen_scale; + +#ifdef VERTEX +vec4 position( mat4 transform_projection, vec4 vertex_position ) +{ + if (hovering <= 0.){ + return transform_projection * vertex_position; + } + float mid_dist = length(vertex_position.xy - 0.5*love_ScreenSize.xy)/length(love_ScreenSize.xy); + vec2 mouse_offset = (vertex_position.xy - mouse_screen_pos.xy)/screen_scale; + float scale = 0.2*(-0.03 - 0.3*max(0., 0.3-mid_dist)) + *hovering*(length(mouse_offset)*length(mouse_offset))/(2. -mid_dist); + + return transform_projection * vertex_position + vec4(0,0,0,scale); +} +#endif diff --git a/assets/shaders/rainbow.fs b/assets/shaders/rainbow.fs new file mode 100644 index 00000000..2f03fe3f --- /dev/null +++ b/assets/shaders/rainbow.fs @@ -0,0 +1,322 @@ +#if defined(VERTEX) || __VERSION__ > 100 || defined(GL_FRAGMENT_PRECISION_HIGH) + #define MY_HIGHP_OR_MEDIUMP highp +#else + #define MY_HIGHP_OR_MEDIUMP mediump +#endif + +extern MY_HIGHP_OR_MEDIUMP vec2 rainbow; +extern MY_HIGHP_OR_MEDIUMP number dissolve; +extern MY_HIGHP_OR_MEDIUMP number time; +extern MY_HIGHP_OR_MEDIUMP vec4 texture_details; +extern MY_HIGHP_OR_MEDIUMP vec2 image_details; +extern bool shadow; +extern MY_HIGHP_OR_MEDIUMP vec4 burn_colour_1; +extern MY_HIGHP_OR_MEDIUMP vec4 burn_colour_2; + +vec4 dissolve_mask(vec4 tex, vec2 texture_coords, vec2 uv) +{ + if (dissolve < 0.001) { + return vec4(shadow ? vec3(0.,0.,0.) : tex.xyz, shadow ? tex.a*0.3: tex.a); + } + + float adjusted_dissolve = (dissolve*dissolve*(3.-2.*dissolve))*1.02 - 0.01; //Adjusting 0.0-1.0 to fall to -0.1 - 1.1 scale so the mask does not pause at extreme values + + float t = time * 10.0 + 2003.; + vec2 floored_uv = (floor((uv*texture_details.ba)))/max(texture_details.b, texture_details.a); + vec2 uv_scaled_centered = (floored_uv - 0.5) * 2.3 * max(texture_details.b, texture_details.a); + + vec2 field_part1 = uv_scaled_centered + 50.*vec2(sin(-t / 143.6340), cos(-t / 99.4324)); + vec2 field_part2 = uv_scaled_centered + 50.*vec2(cos( t / 53.1532), cos( t / 61.4532)); + vec2 field_part3 = uv_scaled_centered + 50.*vec2(sin(-t / 87.53218), sin(-t / 49.0000)); + + float field = (1.+ ( + cos(length(field_part1) / 19.483) + sin(length(field_part2) / 33.155) * cos(field_part2.y / 15.73) + + cos(length(field_part3) / 27.193) * sin(field_part3.x / 21.92) ))/2.; + vec2 borders = vec2(0.2, 0.8); + + float res = (.5 + .5* cos( (adjusted_dissolve) / 82.612 + ( field + -.5 ) *3.14)) + - (floored_uv.x > borders.y ? (floored_uv.x - borders.y)*(5. + 5.*dissolve) : 0.)*(dissolve) + - (floored_uv.y > borders.y ? (floored_uv.y - borders.y)*(5. + 5.*dissolve) : 0.)*(dissolve) + - (floored_uv.x < borders.x ? (borders.x - floored_uv.x)*(5. + 5.*dissolve) : 0.)*(dissolve) + - (floored_uv.y < borders.x ? (borders.x - floored_uv.y)*(5. + 5.*dissolve) : 0.)*(dissolve); + + if (tex.a > 0.01 && burn_colour_1.a > 0.01 && !shadow && res < adjusted_dissolve + 0.8*(0.5-abs(adjusted_dissolve-0.5)) && res > adjusted_dissolve) { + if (!shadow && res < adjusted_dissolve + 0.5*(0.5-abs(adjusted_dissolve-0.5)) && res > adjusted_dissolve) { + tex.rgba = burn_colour_1.rgba; + } else if (burn_colour_2.a > 0.01) { + tex.rgba = burn_colour_2.rgba; + } + } + + return vec4(shadow ? vec3(0.,0.,0.) : tex.xyz, res > adjusted_dissolve ? (shadow ? tex.a*0.3: tex.a) : .0); +} + +number hue(number s, number t, number h) +{ + number hs = mod(h, 1.)*6.; + if (hs < 1.) return (t-s) * hs + s; + if (hs < 3.) return t; + if (hs < 4.) return (t-s) * (4.-hs) + s; + return s; +} + +vec4 RGB(vec4 c) +{ + if (c.y < 0.0001) + return vec4(vec3(c.z), c.a); + + number t = (c.z < .5) ? c.y*c.z + c.z : -c.y*c.z + (c.y+c.z); + number s = 2.0 * c.z - t; + return vec4(hue(s,t,c.x + 1./3.), hue(s,t,c.x), hue(s,t,c.x - 1./3.), c.w); +} + +vec4 HSL(vec4 c) +{ + number low = min(c.r, min(c.g, c.b)); + number high = max(c.r, max(c.g, c.b)); + number delta = high - low; + number sum = high+low; + + vec4 hsl = vec4(.0, .0, .5 * sum, c.a); + if (delta == .0) + return hsl; + + hsl.y = (hsl.z < .5) ? delta / sum : delta / (2.0 - sum); + + if (high == c.r) + hsl.x = (c.g - c.b) / delta; + else if (high == c.g) + hsl.x = (c.b - c.r) / delta + 2.0; + else + hsl.x = (c.r - c.g) / delta + 4.0; + + hsl.x = mod(hsl.x / 6., 1.); + return hsl; +} + +vec4 RGBtoHSV(vec4 rgb) +{ + vec4 hsv; + float minVal = min(min(rgb.r, rgb.g), rgb.b); + float maxVal = max(max(rgb.r, rgb.g), rgb.b); + float delta = maxVal - minVal; + + // Value + hsv.z = maxVal; + + // Saturation + if (maxVal != 0.0) + hsv.y = delta / maxVal; + else { + // r = g = b = 0, s = 0, v is undefined + hsv.y = 0.0; + hsv.x = -1.0; + return hsv; + } + + // Hue + if (rgb.r == maxVal) + hsv.x = (rgb.g - rgb.b) / delta; // between yellow & magenta + else if (rgb.g == maxVal) + hsv.x = 2.0 + (rgb.b - rgb.r) / delta; // between cyan & yellow + else + hsv.x = 4.0 + (rgb.r - rgb.g) / delta; // between magenta & cyan + + hsv.x = hsv.x * (1.0 / 6.0); + if (hsv.x < 0.0) + hsv.x += 1.0; + + // Alpha + hsv.w = rgb.a; + + return hsv; +} + +vec4 HSVtoRGB(vec4 hsv) { + vec4 rgb; + + float h = hsv.x * 6.0; + float c = hsv.z * hsv.y; + float x = c * (1.0 - abs(mod(h, 2.0) - 1.0)); + float m = hsv.z - c; + + if (h < 1.0) { + rgb = vec4(c, x, 0.0, hsv.a); + } else if (h < 2.0) { + rgb = vec4(x, c, 0.0, hsv.a); + } else if (h < 3.0) { + rgb = vec4(0.0, c, x, hsv.a); + } else if (h < 4.0) { + rgb = vec4(0.0, x, c, hsv.a); + } else if (h < 5.0) { + rgb = vec4(x, 0.0, c, hsv.a); + } else { + rgb = vec4(c, 0.0, x, hsv.a); + } + + rgb.rgb += m; + + return rgb; +} + +float bitxor(float val1, float val2) +{ + float outp = 0.; + for(int i = 1; i < 9; i++) { + float i_float = float(i); + outp += floor(mod(mod(floor(val1*pow(2.,-i_float)),pow(2.,i_float))+mod(floor(val2*pow(2.,-i_float)),pow(2.,i_float)),2.))*pow(2.,i_float); + } + return outp/256.; +} + +float mod2(float val1, float mod1) +{ + val1 /= mod1; + val1 -= floor(val1); + return(mod1 * val1); +} + +float mod2(float val1) +{ + return(mod2(val1, 1.)); +} + +float clampf(float val1) +{ + return(max(0., min(1., ceil(val1)))); +} + +float clampf2(float val1) +{ + return(max(0., min(1., val1))); +} + +float inverf(float val1) +{ + return(val1 + pow(val1, 5.) * pow(14. - 14.*pow(val1, 2.), -1.)); +} + +#define PI 3.14159265358979323846 + +float rand(vec2 c){ + return fract(sin(dot(c.xy ,vec2(12.9898,78.233))) * 43758.5453); +} + +float noise(vec2 p, float freq ){ + float unit = 1./freq; + vec2 ij = floor(p/unit); + vec2 xy = mod(p,unit)/unit; + //xy = 3.*xy*xy-2.*xy*xy*xy; + xy = .5*(1.-cos(PI*xy)); + float a = rand((ij+vec2(0.,0.))); + float b = rand((ij+vec2(1.,0.))); + float c = rand((ij+vec2(0.,1.))); + float d = rand((ij+vec2(1.,1.))); + float x1 = mix(a, b, xy.x); + float x2 = mix(c, d, xy.x); + return mix(x1, x2, xy.y); +} + +float pNoise(vec2 p, int res){ + float persistance = .5; + float n = 0.; + float normK = 0.; + float f = 4.; + float amp = 1.; + int iCount = 0; + for (int i = 0; i<50; i++){ + n+=amp*noise(p, f); + f*=2.; + normK+=amp; + amp*=persistance; + if (iCount == res) break; + iCount++; + } + float nf = n/normK; + return nf*nf*nf*nf; +} + +vec4 smoke(float time, vec2 uv, vec4 base_col) +{ + float p = (pNoise(uv + vec2(0, time), 1)); + p = p * p * 1.5; + return vec4(-0.6,-0.6,-0.6,1.) * (2.-p) + base_col * p * 3.5 / (pow(p, 0.3)); +} + +vec4 effect( vec4 colour, Image texture, vec2 texture_coords, vec2 screen_coords ) +{ + vec4 tex = Texel(texture, texture_coords); + vec2 uv = (((texture_coords)*(image_details)) - texture_details.xy*texture_details.ba)/texture_details.ba; + + float sprite_width = texture_details.z / image_details.x; + float min_x = texture_details.x * sprite_width; + float max_x = (texture_details.x + 1.) * sprite_width; + + float shiftX = 1.5 * sin(1.5 * uv.y * (10.16 + 3.55 * sin(rainbow.y/1.5))) * 1.45 * uv.y + / image_details.x; + + float newX = min(max_x, max(min_x, texture_coords.x + shiftX)); + + + // Dummy, doesn't do anything but at least it makes the shader useable + if (uv.x > uv.x * 2.){ + uv = rainbow; + } + + float mod = rainbow.r * 1.0; + + number low = min(tex.r, min(tex.g, tex.b)); + number high = max(tex.r, max(tex.g, tex.b)); + number delta = high - low; + + //vec4 hsl = HSL(vec4(tex.r, tex.g, tex.b, tex.a)); + + float t = rainbow.y*2.221 + time; + vec2 floored_uv = (floor((uv*texture_details.ba)))/texture_details.ba; + vec2 uv_scaled_centered = (floored_uv - 0.5) * 50.; + + vec2 field_part1 = uv_scaled_centered + 50.*vec2(sin(-t / 143.6340), cos(-t / 99.4324)); + vec2 field_part2 = uv_scaled_centered + 50.*vec2(cos( t / 53.1532), cos( t / 61.4532)); + vec2 field_part3 = uv_scaled_centered + 50.*vec2(sin(-t / 87.53218), sin(-t / 49.0000)); + + float field = (1.+ ( + cos(length(field_part1) / 19.483) + sin(length(field_part2) / 33.155) * cos(field_part2.y / 15.73) + + cos(length(field_part3) / 27.193) * sin(field_part3.x / 21.92) ))/2.; + + + vec4 pixel = Texel(texture, vec2(newX, texture_coords.y)); + vec4 hsl = HSL(vec4(tex.r, tex.g, tex.b, tex.a)); + float t2 = mod2(t/7.); + + float cx = uv_scaled_centered.x / 3.0; + float cy = uv_scaled_centered.y / 3.0; + float p = (sin(rainbow.y) + 1.) / 2.; + vec4 b1 = vec4(1.5, .2, .55, 1.); + vec4 b2 = vec4(1.5, .0, .0, 1.); + b1 = HSL(b1); b1.r = rainbow.y/4.; b1 = RGB(b1); + b2 = HSL(b2); b2.r = rainbow.y/4.; b2 = RGB(b2); + vec4 base_col = b1 * (1. - p) + b1 * p; + colour = (colour + vec4(-0.25,-0.25,-0.25,0)) * (1.-uv.y); + colour = colour * smoke(rainbow.y, uv, base_col) + base_col * (uv.y); + // colour = HSL(colour); + // colour.r = rainbow.y/3.; + // colour = RGB(colour); + return dissolve_mask(tex * 0.45 + colour * pixel * 0.75, texture_coords, uv); +} + +extern MY_HIGHP_OR_MEDIUMP vec2 mouse_screen_pos; +extern MY_HIGHP_OR_MEDIUMP float hovering; +extern MY_HIGHP_OR_MEDIUMP float screen_scale; + +vec4 position( mat4 transform_projection, vec4 vertex_position ) +{ + if (hovering <= 0.){ + return transform_projection * vertex_position; + } + float mid_dist = length(vertex_position.xy - 0.5*love_ScreenSize.xy)/length(love_ScreenSize.xy); + vec2 mouse_offset = (vertex_position.xy - mouse_screen_pos.xy)/screen_scale; + float scale = 0.2*(-0.03 - 0.3*max(0., 0.3-mid_dist)) + *hovering*(length(mouse_offset)*length(mouse_offset))/(2. -mid_dist); + + return transform_projection * vertex_position + vec4(0,0,0,scale); +} diff --git a/assets/shaders/vignette.fs b/assets/shaders/vignette.fs new file mode 100644 index 00000000..ea9c51ac --- /dev/null +++ b/assets/shaders/vignette.fs @@ -0,0 +1,23 @@ +extern float power; + +vec4 effect( vec4 colour, Image texture, vec2 texture_coords, vec2 screen_coords ) +{ + vec4 tex = Texel(texture, texture_coords); + vec2 uv = screen_coords/love_ScreenSize.xy; + float dx = abs(uv.x-0.5)*abs(uv.x-0.5); + float dy = abs(uv.y-0.5)*abs(uv.y-0.5); + float a = sqrt(dx+dy); + a *= a; + a = pow(a, power); + a = 2. * (1. - a); + if (a > 1.) {a = 1.;}; + a = 1. - a; + return tex * vec4(1-a, 1-a, 1-a, 1); +} + +#ifdef VERTEX +vec4 position( mat4 transform_projection, vec4 vertex_position ) +{ + return transform_projection * vertex_position; +} +#endif \ No newline at end of file diff --git a/assets/sounds/entropic_summon.ogg b/assets/sounds/entropic_summon.ogg new file mode 100644 index 00000000..c0817f28 Binary files /dev/null and b/assets/sounds/entropic_summon.ogg differ diff --git a/assets/sounds/music_entropic_ominous.ogg b/assets/sounds/music_entropic_ominous.ogg new file mode 100644 index 00000000..b795b32b Binary files /dev/null and b/assets/sounds/music_entropic_ominous.ogg differ diff --git a/assets/sounds/music_man.ogg b/assets/sounds/music_man.ogg new file mode 100644 index 00000000..2eb4bffa Binary files /dev/null and b/assets/sounds/music_man.ogg differ diff --git a/assets/sounds/sfx_invert.ogg b/assets/sounds/sfx_invert.ogg new file mode 100644 index 00000000..b5473293 Binary files /dev/null and b/assets/sounds/sfx_invert.ogg differ diff --git a/assets/sounds/void_generic.ogg b/assets/sounds/void_generic.ogg new file mode 100644 index 00000000..ce5e66c7 Binary files /dev/null and b/assets/sounds/void_generic.ogg differ diff --git a/assets/sounds/void_suck.ogg b/assets/sounds/void_suck.ogg new file mode 100644 index 00000000..e2861609 Binary files /dev/null and b/assets/sounds/void_suck.ogg differ diff --git a/assets/sounds/void_swap.ogg b/assets/sounds/void_swap.ogg new file mode 100644 index 00000000..3d8fc4dc Binary files /dev/null and b/assets/sounds/void_swap.ogg differ diff --git a/compat/blindside.lua b/compat/blindside.lua new file mode 100644 index 00000000..2fd7e3de --- /dev/null +++ b/compat/blindside.lua @@ -0,0 +1,9 @@ +if (SMODS.Mods["Blindside"] or {}).can_load then + + local files = { + "compat/blindside/tags", + "compat/blindside/blinds" + } + local items = Entropy.collect_files(files) + +end \ No newline at end of file diff --git a/compat/blindside/blinds.lua b/compat/blindside/blinds.lua new file mode 100644 index 00000000..ab3f86e1 --- /dev/null +++ b/compat/blindside/blinds.lua @@ -0,0 +1,333 @@ +BLINDSIDE.Blind({ + key = 'scarlet_sun', + atlas = 'blindside_blinds', + pos = {x = 0, y = 0}, + config = { + extra = { + asc_power = 0.75, + asc_powerup = 0.75 + } + }, + hues = {"Red"}, + hidden = true, + legendary = true, + calculate = function(self, card, context) + if (context.cardarea == G.hand) and context.main_scoring then + return { + plus_asc = card.ability.extra.asc_power * #G.play.cards + } + end + end, + loc_vars = function(self, info_queue, card) + return { + vars = { + card.ability.extra.asc_power + } + } + end, + upgrade = function(card) + if not card.ability.extra.upgraded then + card.ability.extra.asc_power = card.ability.extra.asc_power + card.ability.extra.asc_powerup + card.ability.extra.upgraded = true + end + end +}) + +BLINDSIDE.Blind({ + key = 'burgundy_baracuda', + atlas = 'blindside_blinds', + pos = {x = 0, y = 0}, + config = { + extra = { + mult = 1.5, + retriggers = 0, + retriggers_mod = 1, + multup = 0.5 + } + }, + hues = {"Red"}, + hidden = true, + legendary = true, + calculate = function(self, card, context) + if (context.cardarea == G.play) and context.main_scoring then + return { + xmult = card.ability.extra.mult + } + end + if context.cardarea == G.play and context.other_card == card and context.repetition then + local repetitions = card.ability.extra.retriggers + G.E_MANAGER:add_event(Event{ + trigger = "after", func = function() + card.ability.extra.retriggers = 0 + SMODS.calculate_effect{card = card, message = localize("k_reset_ex")} + return true + end + }) + if card.ability.extra.retriggers > 0 then + return { + repetitions = repetitions + } + end + end + if context.after and not card.ability.triggered and card.area == G.hand then + for i, v in pairs(G.play.cards) do + SMODS.scale_card(card, { + ref_table = card.ability.extra, + ref_value = "retriggers", + scalar_value = "retriggers_mod" + }) + end + G.E_MANAGER:add_event(Event{ + trigger = "after", func = function() + card.ability.triggered = nil + return true + end + }) + card.ability.triggered = true + end + if context.burn_card and context.cardarea == G.play and card.area == G.hand then + return { remove = true } + end + end, + loc_vars = function(self, info_queue, card) + info_queue[#info_queue+1] = {key = 'bld_burn', set = 'Other'} + return { + vars = { + card.ability.extra.mult, + card.ability.extra.retriggers, + card.ability.extra.retriggers_mod + } + } + end, + upgrade = function(card) + if not card.ability.extra.upgraded then + card.ability.extra.mult = card.ability.extra.mult + card.ability.extra.multup + card.ability.extra.upgraded = true + end + end +}) + +BLINDSIDE.Blind({ + key = 'diamond_dawn', + atlas = 'blindside_blinds', + pos = {x = 0, y = 0}, + config = { + extra = { + value = 999, + rescore = 1, + retrigger = 2, + rescore_up = 2, + } + }, + hues = {"Blue"}, + hidden = true, + legendary = true, + calculate = function(self, card, context) + if context.cardarea == G.play and context.main_scoring and context.scoring_hand then + return { + func = function() + local self_pos = nil + local retrigger_cards = {} + for i=1, #context.scoring_hand do + if context.scoring_hand[i] == card then + self_pos = i + end + end + if context.scoring_hand[self_pos-1] then + table.insert(retrigger_cards, context.scoring_hand[self_pos-1]) + end + if context.scoring_hand[self_pos+1] then + table.insert(retrigger_cards, context.scoring_hand[self_pos+1]) + end + for streak_index = 1, #retrigger_cards do + local streak_card = retrigger_cards[streak_index] + for _, play_card in ipairs(G.play.cards) do + if play_card == streak_card and streak_card.ability.extra.rescore ~= 1 then + card:juice_up() + local passed_context = context + card_eval_status_text(play_card, 'extra', nil, nil, nil, {message = localize('k_again_ex'),colour = G.C.DARK_EDITION}) + BLINDSIDE.rescore_card(play_card, passed_context) + card_eval_status_text(play_card, 'extra', nil, nil, nil, {message = localize('k_again_ex'),colour = G.C.DARK_EDITION}) + BLINDSIDE.rescore_card(play_card, passed_context) + if card.ability.extra.upgraded then + card_eval_status_text(play_card, 'extra', nil, nil, nil, {message = localize('k_again_ex'),colour = G.C.DARK_EDITION}) + BLINDSIDE.rescore_card(play_card, passed_context) + card_eval_status_text(play_card, 'extra', nil, nil, nil, {message = localize('k_again_ex'),colour = G.C.DARK_EDITION}) + BLINDSIDE.rescore_card(play_card, passed_context) + end + end + end + end + SMODS.calculate_context({rescore_cards = retrigger_cards}) + return true + end, + } + end + end, + loc_vars = function(self, info_queue, card) + return { + vars = { + card.ability.extra.retrigger + } + } + end, + upgrade = function(card) + if not card.ability.extra.upgraded then + card.ability.extra.upgraded = true + card.ability.extra.retrigger = card.ability.extra.retrigger + card.ability.extra.rescore_up + end + end +}) + +local card_is_colour_ref = Card.is_color +function Card:is_color(colour, debuff, flush_calc) + if self.config.center.key == "m_entr_diamond_dawn" then + local self_pos = nil + local retrigger_cards = {} + for i=1, #self.area.cards do + if self.area.cards[i] == self then + self_pos = i + end + end + if self.area.cards[self_pos-1] then + for i, v in pairs(self.area.cards[self_pos-1].ability.extra.hues) do + if v == colour then return true end + end + end + if self.area.cards[self_pos+1] then + for i, v in pairs(self.area.cards[self_pos+1].ability.extra.hues) do + if v == colour then return true end + end + end + end + return card_is_colour_ref(self, colour, debuff, flush_calc) +end + +BLINDSIDE.Blind({ + key = 'olive_orchard', + atlas = 'blindside_blinds', + pos = {x = 0, y = 0}, + config = { + extra = { + xmult = 0.1, + xmultup = 0.1 + } + }, + hues = {"Green"}, + hidden = true, + legendary = true, + calculate = function(self, card, context) + if context.pre_discard and context.cardarea == G.hand and card.highlighted and not card.triggered then + for i, v in pairs(G.hand.cards) do + if v ~= card then + SMODS.scale_card(v, { + ref_table = v.ability, + ref_value = "perma_x_mult", + scalar_table = card.ability.extra, + scalar_value = "xmult" + }) + end + end + card.triggered = true + G.E_MANAGER:add_event(Event{ + func = function() + card.triggered = nil + return true + end + }) + end + end, + loc_vars = function(self, info_queue, card) + return { + vars = { + card.ability.extra.xmult + } + } + end, + upgrade = function(card) + if not card.ability.extra.upgraded then + card.ability.extra.xmult = card.ability.extra.xmult + card.ability.extra.xmult_up + card.ability.extra.upgraded = true + end + end +}) + + +BLINDSIDE.Blind({ + key = 'citrine_comet', + atlas = 'blindside_blinds', + pos = {x = 0, y = 0}, + config = { + extra = { + asc = 0, + asc_mod = 0.5, + ascup = 0.25 + } + }, + hues = {"Yellow"}, + hidden = true, + legendary = true, + calculate = function(self, card, context) + if context.main_scoring and context.cardarea == G.play then + return { + plus_asc = card.ability.extra.asc + } + end + if context.cards_burned then + for i, v in pairs(context.cards_burned) do + SMODS.scale_card(card, { + ref_table = card.ability.extra, + ref_value = "asc", + scalar_value = "asc_mod" + }) + end + end + end, + loc_vars = function(self, info_queue, card) + return { + vars = { + card.ability.extra.asc, + card.ability.extra.asc_mod + } + } + end, + upgrade = function(card) + if not card.ability.extra.upgraded then + card.ability.extra.asc_mod = card.ability.extra.asc_mod + card.ability.extra.ascup + card.ability.extra.upgraded = true + end + end +}) + + +BLINDSIDE.Blind({ + key = 'alabaster_anchor', + atlas = 'blindside_blinds', + pos = {x = 0, y = 0}, + hues = {"Faded"}, + hidden = true, + legendary = true, + calculate = function(self, scard, context) + if context.before and context.cardarea == G.play then + local card = G.play.cards[#G.play.cards] + if card then + card.ability.extra.upgraded = nil + upgrade_blinds({card}) + if scard.ability.extra.upgraded then + card.ability.extra.upgraded = nil + upgrade_blinds({card}) + end + end + end + end, + loc_vars = function(self, info_queue, card) + return { + key = card.ability.extra.upgraded and "m_entr_alabaster_anchor_two" or nil + } + end, + upgrade = function(card) + if not card.ability.extra.upgraded then + card.ability.extra.upgraded = true + end + end +}) diff --git a/compat/blindside/tags.lua b/compat/blindside/tags.lua new file mode 100644 index 00000000..af54d304 --- /dev/null +++ b/compat/blindside/tags.lua @@ -0,0 +1,611 @@ +SMODS.Tag { + key = "asc_max", + config = { + xmult = 2, + xchips = 2 + }, + hide_ability = false, + atlas = 'blindside_tags', + pos = {x = 1, y = 0}, + blindside = true, + in_pool = function(self, args) + return false + end, + loc_vars = function(self, info_queue, tag) + return { + vars = { + tag.config.xmult, + tag.config.xchips + } + } + end, + apply = function(self, tag, context) + if context.type == 'shop_start' and not (next(SMODS.find_card("j_bld_taglock")) and not (G.GAME.blind.boss or G.GAME.last_joker)) then + tag:yep('+', G.C.RED, function() + return true end) + tag.triggered = true + end + if context.type == 'after_hand' then + mult = mod_mult(mult * tag.config.xmult) + chips = mod_chips(hand_chips * tag.config.xchips) + update_hand_text({delay = 0}, {mult = mult, chips = hand_chips}) + tag_area_status_text(tag, "X2", G.C.RED, false, 0) + tag_area_status_text(tag, "X2", G.C.CHIPS, false, 0) + G.E_MANAGER:add_event(Event({trigger = 'immediate', func = function() + play_sound('multhit2') + tag:juice_up() + return true + end})) + return true + end + end, +} + +SMODS.Tag { + key = "asc_recursive", + config = { + xchips_mod = 0.1, + }, + hide_ability = false, + atlas = 'blindside_tags', + pos = {x = 3, y = 0}, + blindside = true, + in_pool = function(self, args) + return false + end, + loc_vars = function(self, info_queue, tag) + return { + vars = { + 0.1, (1 + 0.1*#G.GAME.tags) + } + } + end, + apply = function(self, tag, context) + if context.type == 'shop_start' and not (next(SMODS.find_card("j_bld_taglock")) and not (G.GAME.blind.boss or G.GAME.last_joker)) then + tag:yep('+', G.C.MONEY, function() + return true end) + tag.triggered = true + end + if context.type == 'after_hand' then + hand_chips = mod_chips(hand_chips + (1 + 0.1*#G.GAME.tags)) + update_hand_text({delay = 0}, {chips = hand_chips, mult = mult}) + tag_area_status_text(tag, "X" .. tostring(1 + 0.1*#G.GAME.tags), G.C.BLUE, false, 0) + G.E_MANAGER:add_event(Event({trigger = 'immediate', func = function() + play_sound('chips1') + tag:juice_up() + return true + end})) + return true + end + end, +} + +SMODS.Tag { + key = "asc_memory", + hide_ability = false, + atlas = 'blindside_tags', + pos = {x = 4, y = 0}, + blindside = true, + in_pool = function(self, args) + return false + end, + apply = function(self, tag, context) + if context.type == 'immediate' then + tag:yep('+', G.C.bld_keepsake, function() + return true + end) + local card = nil + if G.jokers and #G.jokers.cards < G.jokers.config.card_limit then + card = SMODS.create_card { + set = "Joker", + rarity = "bld_keepsake", + area = G.jokers, + key_append = "memorytag" + } + card:set_edition(SMODS.poll_edition{guaranteed = true, options = BLINDSIDE.get_blindside_editions(), key = "entr_asc_keepsake"}) + card:add_to_deck() + G.jokers:emplace(card) + end + tag.triggered = true + return card + end + end, +} + +SMODS.Tag { + key = "asc_wave", + hide_ability = false, + atlas = 'blindside_tags', + pos = {x = 5, y = 0}, + blindside = true, + in_pool = function(self, args) + return false + end, + apply = function(self, tag, context) + if context.type == 'shop_start' and not (next(SMODS.find_card("j_bld_taglock")) and not (G.GAME.blind.boss or G.GAME.last_joker)) then + tag:yep('+', G.C.BLUE, function() + return true end) + tag.triggered = true + end + end, +} + +SMODS.Tag { + key = "asc_additive", + config = { + chance = 2, + trigger = 3, + }, + hide_ability = false, + atlas = 'blindside_tags', + pos = {x = 2, y = 1}, + blindside = true, + in_pool = function(self, args) + return false + end, + loc_vars = function(self, info_queue, tag) + return { + vars = { + 2, + 3, + } + } + end, + apply = function(self, tag, context) + if context.type == 'shop_start' and not (next(SMODS.find_card("j_bld_taglock")) and not (G.GAME.blind.boss or G.GAME.last_joker)) then + tag:yep('+', G.C.PURPLE, function() + return true end) + tag.triggered = true + end + if context.type == 'before' then + local converts = {} + for k, v in ipairs(context.scoring_hand) do + if SMODS.pseudorandom_probability(tag, pseudoseed("flip"), tag.ability.chance, tag.ability.trigger, 'flip') then + converts[#converts+1] = v + local enhancement = pseudorandom_element(SMODS.ObjectTypes.bld_obj_enhancements.enhancements, 'booster') + v:set_seal(enhancement, nil, true) + G.E_MANAGER:add_event(Event({ + func = function() + v:juice_up() + return true + end + })) + end + end + if #converts > 0 then + tag_area_status_text(tag, 'Enhance!', G.C.FILTER, false, 0) + end + end + end, + set_ability = function(self, tag) + tag.ability.chance = tag.config.chance + tag.ability.trigger = tag.config.trigger + end +} + + +SMODS.Tag { + key = "asc_debuff", + config = { + debuffed_hand = '['..localize('k_poker_hand')..']', + debuff_text = localize('k_debuff_tag') + }, + hide_ability = false, + atlas = 'blindside_tags', + pos = {x = 3, y = 1}, + blindside = true, + in_pool = function(self, args) + return false + end, + loc_vars = function(self, info_queue, tag) + return { + vars = { + (tag.ability and tag.ability.debuffed_hand and localize(tag.ability.debuffed_hand, 'poker_hands')) or ('['..localize('k_poker_hand')..']') + } + } + end, + apply = function(self, tag, context) + if context.type == 'shop_start' and not (next(SMODS.find_card("j_bld_taglock")) and not (G.GAME.blind.boss or G.GAME.last_joker)) then + tag:yep('+', G.C.DARK_EDITION, function() + return true end) + tag.triggered = true + end + if context.type == 'after_hand' then + local text = G.FUNCS.get_poker_hand_info(G.play.cards) + if text == tag.ability.debuffed_hand then + hand_chips = mod_chips(hand_chips * 0.5) + mult = mod_mult(mult * 0.5) + update_hand_text({delay = 0}, {chips = hand_chips, mult = mult}) + tag_area_status_text(tag, "X" .. tostring(1 + 0.1*#G.GAME.tags), G.C.BLUE, false, 0) + end + end + end, + set_ability = function(self, tag) + tag.ability.debuffed_hand = G.bolt_played_hand + tag.ability.debuff_text = (localize('k_debuff_tag') or "") .. (localize(tag.ability.debuffed_hand, 'poker_hands') or "") + end +} + +SMODS.Tag { + key = "asc_symmetry", + config = { + chance = 1, + trigger = 2, + }, + hide_ability = false, + atlas = 'blindside_tags', + pos = {x = 0, y = 2}, + blindside = true, + in_pool = function(self, args) + return false + end, + loc_vars = function(self, info_queue, tag) + local n,d = SMODS.get_probability_vars(tag, 1, 2) + return { + vars = { + n, + d, + } + } + end, + apply = function(self, tag, context) + if context.type == 'shop_start' and not (next(SMODS.find_card("j_bld_taglock")) and not (G.GAME.blind.boss or G.GAME.last_joker)) then + tag:yep('+', G.C.GREEN, function() + return true end) + tag.triggered = true + end + if context.type == 'scoring_card' then + BLINDSIDE.rescore_card(context.card, context.context) + local numerator, denominator = SMODS.get_probability_vars(tag, 1, 2, 'symmetry', true) + if pseudorandom('symmetry') < numerator / denominator and context.card.facing ~= 'back' and context.context.cardarea == G.play then + tag:juice_up() + tag_area_status_text(tag, localize('k_again_ex'), G.C.FILTER, false, 0) + BLINDSIDE.rescore_card(context.card, context.context) + end + end + end, + set_ability = function(self, tag) + tag.ability.chance = tag.config.chance + tag.ability.trigger = tag.config.trigger + end +} + + +SMODS.Tag { + key = "asc_prison_break", + hide_ability = false, + atlas = 'blindside_tags', + pos = {x = 4, y = 1}, + blindside = true, + in_pool = function(self, args) + return false + end, + apply = function(self, tag, context) + if not G.GAME.imprisonment_buffer and context.type == 'real_round_start' and not (next(SMODS.find_card("j_bld_taglock")) and not (G.GAME.blind.boss or G.GAME.last_joker)) and G.GAME.blind.boss then + G.GAME.imprisonment_buffer = true + G.E_MANAGER:add_event(Event({ + func = function () + if G.GAME.blind and not G.GAME.blind.disabled then + G.GAME.blind:disable() + G.GAME.blindassist:disable() + end + G.GAME.imprisonment_buffer = false + tag:yep('+', G.C.RED, function() + return true end) + tag.triggered = true + return true + end + })) + elseif not G.GAME.imprisonment_buffer and context.type == 'real_round_start' then + G.GAME.imprisonment_buffer = true + G.E_MANAGER:add_event(Event({ + func = function () + if G.GAME.blind and not G.GAME.blind.disabled then + G.GAME.blind:disable() + G.GAME.blindassist:disable() + end + G.GAME.imprisonment_buffer = false + return true + end + })) + end + end, +} + +SMODS.Tag { + key = "asc_collector", + hide_ability = false, + atlas = 'blindside_tags', + pos = {x = 0, y = 0}, + blindside = true, + in_pool = function(self, args) + return false + end, + apply = function(self, tag, context) + if context.type == 'symbol_pack_opened' then + tag:yep('+', G.C.DARK_EDITION, function() + return true + end) + G.E_MANAGER:add_event(Event({trigger = 'after', func = function() + if G.pack_cards and G.pack_cards.cards ~= nil and G.pack_cards.cards[1] and G.pack_cards.VT.y < G.ROOM.T.h then + for _, v in ipairs(G.pack_cards.cards) do + local edition = poll_edition('asc_collector', nil, true, true, {'e_bld_enameled', 'e_bld_finish', 'e_bld_mint'}) + v:set_edition(edition, true) + end + upgrade_blinds(G.pack_cards.cards) + return true + end + end})) + tag.triggered = true + end + end, +} + +SMODS.Tag { + key = "asc_magic", + hide_ability = false, + atlas = 'blindside_tags', + pos = {x = 5, y = 1}, + blindside = true, + in_pool = function(self, args) + return false + end, + apply = function(self, tag, context) + if context.type == 'immediate' then + tag:yep('+', G.C.ORANGE, function() + return true + end) + local card = nil + if G.jokers and #G.jokers.cards < G.jokers.config.card_limit then + card = SMODS.create_card { + set = "Joker", + rarity = "bld_curio", + area = G.jokers, + key_append = "magictag" + } + card:set_edition(SMODS.poll_edition{guaranteed = true, options = BLINDSIDE.get_blindside_editions(), key = "entr_asc_trinket"}) + card:add_to_deck() + G.jokers:emplace(card) + end + tag.triggered = true + return card + end + end, +} + + +SMODS.Tag { + key = "asc_joker", + hide_ability = false, + atlas = 'blindside_tags', + pos = {x = 1, y = 3}, + blindside = true, + in_pool = function(self, args) + return false + end, + apply = function(self, tag, context) + if context.type == 'after_hand' then + BLINDSIDE.chipsmodify(0.5, 0, 0) + end + + if context.type == 'shop_start' and not (next(SMODS.find_card("j_bld_taglock")) and not (G.GAME.blind.boss or G.GAME.last_joker)) then + tag:yep('+', G.C.MONEY, function() + return true end) + tag.triggered = true + end + end, +} + +SMODS.Tag { + key = "asc_awe", + hide_ability = false, + atlas = 'blindside_tags', + pos = {x = 3, y = 3}, + blindside = true, + in_pool = function(self, args) + return false + end, + apply = function(self, tag, context) + if context.type == 'shop_start' and not (next(SMODS.find_card("j_bld_taglock")) and not (G.GAME.blind.boss or G.GAME.last_joker)) then + for key, value in pairs(G.jokers.cards) do + value:set_debuff(false) + end + tag:yep('+', G.C.RED, function() + return true end) + tag.triggered = true + end + if context.type == 'before' then + for key, value in pairs(G.jokers.cards) do + value:set_debuff(false) + end + local t = pseudorandom("entr_asc_awe") < 0.5 and 1 or #G.jokers.cards + for i, trinket in ipairs(G.jokers.cards) do + if i == ts then + trinket:set_debuff(true) + end + end + end + end, +} + +SMODS.Tag { + key = "asc_mantle", + hide_ability = false, + atlas = 'blindside_tags', + pos = {x = 4, y = 3}, + blindside = true, + in_pool = function(self, args) + return false + end, + apply = function(self, tag, context) + if context.type == 'after_hand' then + local cards = choose_stuff(G.play.cards, 1, pseudoseed('mantle')) + G.E_MANAGER:add_event(Event({ + func = function () + destroy_blinds_and_calc(cards, tag) + G.E_MANAGER:add_event(Event({ + func = function () + G.E_MANAGER:add_event(Event({ + func = function () + cards[1]:remove() + return true + end + })) + return true + end + })) + return true + end + })) + end + + if context.type == 'shop_start' and not (next(SMODS.find_card("j_bld_taglock")) and not (G.GAME.blind.boss or G.GAME.last_joker)) then + tag:yep('+', G.C.MONEY, function() + return true end) + tag.triggered = true + end + end, +} + +SMODS.Tag { + key = "asc_downpour", + hide_ability = false, + atlas = 'blindside_tags', + config = { + extra = { + odds = 4, + odds_gain = 4 + } + }, + blindside = true, + loc_vars = function (self, info_queue, tag) + info_queue[#info_queue + 1] = {key = 'bld_modifiers', set = 'Other'} + local n,d = SMODS.get_probability_vars(tag, 1, 4) + return { + vars = { + n, + d, + } + } + end, + pos = {x = 5, y = 3}, + in_pool = function(self, args) + return false + end, + apply = function(self, tag, context) + if context.type == 'shop_start' and not (next(SMODS.find_card("j_bld_taglock")) and not (G.GAME.blind.boss or G.GAME.last_joker)) then + tag:yep('+', G.C.RED, function() + return true end) + tag.triggered = true + end + if context.type == 'after_hand' then + for key, value in pairs(G.play.cards) do + if (value.edition or value.seal) and SMODS.pseudorandom_probability(tag, pseudoseed('bld_downpour'), 1, 4, 'bld_downpour') then + G.E_MANAGER:add_event(Event({ + trigger = 'before', + delay = 0.4, + func = function() + value:set_edition(nil) + value:set_seal(nil) + play_sound('cardFan2') + value:juice_up() + return true + end + })) + end + end + end + end, +} + +SMODS.Tag { + key = "asc_burden", + hide_ability = false, + atlas = 'blindside_tags', + pos = {x = 2, y = 3}, + blindside = true, + in_pool = function(self, args) + return false + end, + apply = function(self, tag, context) + if context.type == 'shop_start' and not (next(SMODS.find_card("j_bld_taglock")) and not (G.GAME.blind.boss or G.GAME.last_joker)) then + tag:yep('+', G.C.RED, function() + return true end) + tag.triggered = true + end + if context.type == 'after_hand' then + if not G.GAME.dollar_buffer then + G.GAME.dollar_buffer = 0 + end + local amount = math.ceil(-math.max(0, G.GAME.dollars + G.GAME.dollar_buffer)/3) + if amount < 0 then + G.GAME.dollar_buffer = G.GAME.dollar_buffer + amount + ease_dollars(amount) + G.E_MANAGER:add_event(Event({ + func = function () + G.GAME.dollar_buffer = 0 + return true + end + })) + end + end + end, +} + +SMODS.Tag { + key = "asc_voodoo", + hide_ability = false, + atlas = 'blindside_tags', + pos = {x = 0, y = 3}, + blindside = true, + in_pool = function(self, args) + return false + end, + loc_vars = function (self, info_queue, tag) + info_queue[#info_queue+1] = G.P_CENTERS['p_bld_voodoo'] + end, + apply = function(self, tag, context) + if context.type == "new_blind_choice" then + local lock = tag.ID + G.CONTROLLER.locks[lock] = true + tag:yep('+', G.C.BLACK, function() + local key = 'p_bld_voodoo' + local card = Card(G.play.T.x + G.play.T.w/2 - G.CARD_W*1.27/2, + G.play.T.y + G.play.T.h/2-G.CARD_H*1.27/2, G.CARD_W*1.27, G.CARD_H*1.27, G.P_CARDS.empty, G.P_CENTERS[key], {bypass_discovery_center = true, bypass_discovery_ui = true}) + card.cost = 0 + card.from_tag = true + G.FUNCS.use_card({config = {ref_table = card}}) + card:start_materialize() + G.CONTROLLER.locks[lock] = nil + return true + end) + tag.triggered = true + return true + end + end, +} + +Entropy.AscendedTags.tag_bld_maxim = "tag_entr_asc_max" +Entropy.AscendedTags.tag_bld_recursive = "tag_entr_asc_recursive" +Entropy.AscendedTags.tag_bld_battery = "tag_entr_ascendant_effarcire" +Entropy.AscendedTags.tag_bld_reroll = "tag_entr_ascendant_credit" +Entropy.AscendedTags.tag_bld_additive = "tag_entr_asc_additive" +Entropy.AscendedTags.tag_bld_mining = "tag_entr_ascendant_universal" +Entropy.AscendedTags.tag_bld_strike = "tag_entr_ascendant_stock" +Entropy.AscendedTags.tag_bld_dental = "tag_entr_ascendant_stock" +Entropy.AscendedTags.tag_bld_symmetry = "tag_entr_asc_symmetry" +Entropy.AscendedTags.tag_bld_toss = "tag_entr_ascendant_effarcire" +Entropy.AscendedTags.tag_bld_wave = "tag_entr_asc_wave" +Entropy.AscendedTags.tag_bld_imprisonment = "tag_entr_asc_prison_break" +Entropy.AscendedTags.tag_bld_heartbreak = "tag_entr_asc_prison_break" +Entropy.AscendedTags.tag_bld_collector = "tag_entr_asc_collector" +Entropy.AscendedTags.tag_bld_neon = "tag_entr_ascendant_stock" +Entropy.AscendedTags.tag_bld_memory = "tag_entr_asc_memory" +Entropy.AscendedTags.tag_bld_magic = "tag_entr_asc_magic" +Entropy.AscendedTags.tag_bld_debuff = "tag_entr_asc_debuff" +Entropy.AscendedTags.tag_bld_joker = "tag_entr_asc_joker" +Entropy.AscendedTags.tag_bld_awe = "tag_entr_asc_awe" +Entropy.AscendedTags.tag_bld_mantle = "tag_entr_asc_mantle" +Entropy.AscendedTags.tag_bld_downpour = "tag_entr_asc_downpour" +Entropy.AscendedTags.tag_bld_voodoo = "tag_entr_asc_voodoo" +Entropy.AscendedTags.tag_bld_burden = "tag_entr_asc_burden" \ No newline at end of file diff --git a/compat/bunco.lua b/compat/bunco.lua index 8b8cca57..36bfd978 100644 --- a/compat/bunco.lua +++ b/compat/bunco.lua @@ -21,7 +21,7 @@ if (SMODS.Mods["Bunco"] or {}).can_load then }, pos = {x=8,y=0}, use = function(self, card2) - local cards = Entropy.GetHighlightedCards({G.hand}, card2, 1, card2.ability.select) + local cards = Entropy.get_highlighted_cards({G.hand}, card2, 1, card2.ability.select) for i, v in pairs(cards) do local card = cards[i] G.E_MANAGER:add_event(Event({ @@ -34,7 +34,7 @@ if (SMODS.Mods["Bunco"] or {}).can_load then end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local num = #Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) return num > 0 and num <= card.ability.select end, loc_vars = function(self, q, card) @@ -245,10 +245,10 @@ if (SMODS.Mods["Bunco"] or {}).can_load then }, pos = {x=8,y=1}, use = function(self, card2) - Entropy.LevelSuit("bunc_Fleurons", card2, 1, card2.ability.per_level) + Entropy.level_suit("bunc_Fleurons", card2, 1, card2.ability.per_level) end, bulk_use = function(self, card2, _, _, amount) - Entropy.LevelSuit("bunc_Fleurons", card2, amount, card2.ability.per_level) + Entropy.level_suit("bunc_Fleurons", card2, amount, card2.ability.per_level) end, can_use = function(self, card) return true @@ -300,10 +300,10 @@ if (SMODS.Mods["Bunco"] or {}).can_load then }, pos = {x=9,y=1}, use = function(self, card2) - Entropy.LevelSuit("bunc_Halberds", card2, 1, card2.ability.per_level) + Entropy.level_suit("bunc_Halberds", card2, 1, card2.ability.per_level) end, bulk_use = function(self, card2, _, _, amount) - Entropy.LevelSuit("bunc_Halberds", card2, amount, card2.ability.per_level) + Entropy.level_suit("bunc_Halberds", card2, amount, card2.ability.per_level) end, can_use = function(self, card) return true diff --git a/compat/compat_loader.lua b/compat/compat_loader.lua index 3117737b..1c79353d 100644 --- a/compat/compat_loader.lua +++ b/compat/compat_loader.lua @@ -13,13 +13,15 @@ local i = { "compat/bunco", "compat/hotpotato", "compat/vallkarri", + "compat/blindside" } Entropy.load_files(i) if Penumbra then - Penumbra.loc_keys["entr_music_entropic"] = "k_joker_in_greek" - Penumbra.loc_keys["entr_music_red_room"] = "k_mirrored_in_crimson" - Penumbra.loc_keys["entr_music_freebird"] = "k_freebird" - Penumbra.loc_keys["entr_music_fall"] = "k_portal_reference" - Penumbra.loc_keys["entr_music_entropy_is_endless"] = "k_entropy_is_endless" + Penumbra.register_track({key = "entr_music_entropic", loc_key = "k_joker_in_greek", author = "gemstonez"}) + Penumbra.register_track({key = "entr_music_red_room", loc_key = "k_mirrored_in_crimson", author = "lord.ruby"}) + Penumbra.register_track({key = "entr_music_freebird", loc_key = "k_freebird", author = "Lynyrd Skynyrd"}) + Penumbra.register_track({key = "entr_music_fall", loc_key = "k_portal_reference", author = "lord.ruby"}) + Penumbra.register_track({key = "entr_music_entropy_is_endless", loc_key = "k_entropy_is_endless", author = "gemstonez"}) + Penumbra.register_track({key = "entr_music_entropic_ominous", loc_key = "k_snd_ominous", author = "lord.ruby"}) end diff --git a/compat/cryptid.lua b/compat/cryptid.lua index 442f21ab..e8aa6c9c 100644 --- a/compat/cryptid.lua +++ b/compat/cryptid.lua @@ -12,7 +12,6 @@ if SMODS.Mods.Cryptid and SMODS.Mods.Cryptid.can_load then local files = { "compat/cryptid/cursed_jokers", "compat/cryptid/define", - "compat/cryptid/entropic_jokers", "compat/cryptid/epic_jokers", "compat/cryptid/exotic_jokers", "compat/cryptid/reverse_codes", @@ -57,141 +56,6 @@ if SMODS.Mods.Cryptid and SMODS.Mods.Cryptid.can_load then Cryptid.edeck_sprites.sticker.superego = {atlas="entr_crypt_deck", pos = {x=2,y=3}} -local containment = { - object_type = "Back", - order = 7002, - dependencies = { - items = { - "set_entr_decks" - } - }, - object_type = "Back", - name = "Deck of Containment", - key = "doc", - pos = { x = 2, y = 0 }, - atlas = "decks", - apply = function(self) - G.GAME.entropy = 0 - end, - calculate = function(self,back,context) - if context.final_scoring_step and number_format(0.002 + (0.998^(G.GAME.entropy/2))) ~= "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 to_big(G.GAME.hands[context.scoring_name].AscensionPower or 0) > to_big(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/2)))).." Chips", - hold = 2, - align = "cm", - offset = { x = 0, y = -2.7 }, - major = G.play, - }) - return true - end, - })) - return { - Echip_mod = 0.01 + (0.998^(G.GAME.entropy/2)), - 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(2) else ease_entropy(1) end - end - end - if context.after then - for i, v in pairs(G.jokers.cards) do - if v.edition and v.edition.key then ease_entropy(2) end - if i > G.jokers.config.card_limit then ease_entropy(1) end - end - end - end - } - if CardSleeves then - CardSleeves.Sleeve { - key = "doc", - atlas = "sleeves", - pos = { x = 2, y = 0 }, - apply = function() - if G.GAME.selected_back and G.GAME.selected_back.effect.center.original_key == "doc" then - G.E_MANAGER:add_event(Event({ - trigger = 'after', - func = function() - SMODS.add_card({ - rarity = "entr_entropic", - area = G.jokers, - set = "Joker", - key_append = "entr_doc_combo" - }) - return true - end - })) - else - G.GAME.entropy = 0 - end - end, - calculate = function(self,back,context) - if context.final_scoring_step and number_format(0.002 + (0.998^(G.GAME.entropy/2))) ~= "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 to_big(G.GAME.hands[context.scoring_name].AscensionPower or 0) > to_big(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/2)))).." Chips", - hold = 2, - align = "cm", - offset = { x = 0, y = -2.7 }, - major = G.play, - }) - return true - end, - })) - return { - Echip_mod = 0.01 + (0.998^(G.GAME.entropy/2)), - 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(2) else ease_entropy(1) end - end - end - if context.after then - for i, v in pairs(G.jokers.cards) do - if v.edition and v.edition.key then ease_entropy(2) end - if i > G.jokers.config.card_limit then ease_entropy(1) end - end - end - end - } - end - local supersede = { dependencies = { items = { @@ -253,7 +117,6 @@ local containment = { art = {"Lil. Mr. Slipstream"} } } - items[#items+1]=containment items[#items+1]=supersede items[#items+1]=ascension return { @@ -262,13 +125,12 @@ local containment = { elseif (SMODS.Mods["vallkarri"] or {}).can_load then Entropy.ValkarriOverCryptid = true local files = { - "compat/cryptid/entropic_jokers", "compat/cryptid/epic_jokers", "compat/cryptid/exotic_jokers", } local items = Entropy.collect_files(files) G.FUNCS.cry_asc_UI_set = function(e) - e.config.object.colours = { G.C.GOLD } + e.config.object.colours = { Entropy.get_asc_colour(G.GAME.current_round.current_hand.cry_asc_num) } e.config.object:update_text() end -- Needed because get_poker_hand_info isnt called at the end of the road @@ -287,13 +149,12 @@ elseif (SMODS.Mods["vallkarri"] or {}).can_load then elseif (SMODS.Mods["MyDreamJournal"] or {}).can_load then Entropy.MDJOverCryptid = true local files = { - "compat/cryptid/entropic_jokers", "compat/cryptid/epic_jokers", "compat/cryptid/exotic_jokers", } local items = Entropy.collect_files(files) G.FUNCS.cry_asc_UI_set = function(e) - e.config.object.colours = { G.C.GOLD } + e.config.object.colours = { Entropy.get_asc_colour(G.GAME.current_round.current_hand.cry_asc_num) } e.config.object:update_text() end -- Needed because get_poker_hand_info isnt called at the end of the road @@ -311,7 +172,7 @@ elseif (SMODS.Mods["MyDreamJournal"] or {}).can_load then } else G.FUNCS.cry_asc_UI_set = function(e) - e.config.object.colours = { G.C.GOLD } + e.config.object.colours = { Entropy.get_asc_colour(G.GAME.current_round.current_hand.cry_asc_num) } e.config.object:update_text() end -- Needed because get_poker_hand_info isnt called at the end of the road diff --git a/compat/cryptid/define.lua b/compat/cryptid/define.lua index 708c8572..67bba17e 100644 --- a/compat/cryptid/define.lua +++ b/compat/cryptid/define.lua @@ -13,7 +13,7 @@ local define = { hidden=true, soul_rate = 0, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.hand, G.consumeables, G.jokers, G.shop_booster, G.pack_cards, G.shop_jokers, G.shop_vouchers}, card, 1, 1) + local num = #Entropy.get_highlighted_cards({G.hand, G.consumeables, G.jokers, G.shop_booster, G.pack_cards, G.shop_jokers, G.shop_vouchers}, card, 1, 1) return num > 0 and num <= 1 end, @@ -64,7 +64,7 @@ local define = { elseif G.GAME.POINTER_SUBMENU == "Seal" then G.GAME.POINTER_PLAYING.seal = self.seal if G.GAME.POINTER_PLAYING then - local cards = Entropy.GetHighlightedCards({G.hand, G.consumeables, G.jokers, G.shop_booster, G.pack_cards, G.shop_jokers, G.shop_vouchers}, {}, 1, 1) + local cards = Entropy.get_highlighted_cards({G.hand, G.consumeables, G.jokers, G.shop_booster, G.pack_cards, G.shop_jokers, G.shop_vouchers}, {}, 1, 1) for i, card in pairs(cards) do if card.config.center.set == "Default" or card.config.center.set == "Enhanced" then G.GAME.DefineKeys = G.GAME.DefineKeys or {} @@ -102,7 +102,7 @@ local define = { G.GAME.CODE_DESTROY_CARD:start_dissolve() G.GAME.CODE_DESTROY_CARD = nil end - local cards = Entropy.GetHighlightedCards({G.hand, G.consumeables, G.jokers, G.shop_booster, G.pack_cards, G.shop_jokers, G.shop_vouchers}, {}, 1, 1) + local cards = Entropy.get_highlighted_cards({G.hand, G.consumeables, G.jokers, G.shop_booster, G.pack_cards, G.shop_jokers, G.shop_vouchers}, {}, 1, 1) if not G.GAME.DefineKeys then G.GAME.DefineKeys = {} end for i, card in pairs(cards) do if card.config.center.set == "Default" or card.config.center.set == "Enhanced" then diff --git a/compat/cryptid/epic_jokers.lua b/compat/cryptid/epic_jokers.lua index 6932ac59..58d3da55 100644 --- a/compat/cryptid/epic_jokers.lua +++ b/compat/cryptid/epic_jokers.lua @@ -48,7 +48,7 @@ local burnt_m = { local text, loc_disp_text, poker_hands, scoring_hand, disp_text = G.FUNCS.get_poker_hand_info(G.play.cards) if next(poker_hands["Pair"]) then - Entropy.FlipThen(cards, function(card) + Entropy.flip_then(cards, function(card) card:set_edition("e_entr_solar") end) end @@ -64,7 +64,7 @@ local burnt_m = { for i = 1, 1+jollycount do cards[#cards+1] = G.play.cards[i] or nil end - Entropy.FlipThen(cards, function(card) + Entropy.flip_then(cards, function(card) card:set_edition("e_entr_solar") end) end @@ -179,11 +179,11 @@ local trapezium = { end, })) end - return Entropy.RandomForcetrigger(card, card and card.ability.forcetrigger or 5, context) + return Entropy.random_forcetrigger(card, card and card.ability.forcetrigger or 5, context) end if context.individual and context.cardarea == G.play then if context.other_card.edition and context.other_card.edition.retrig then - return Entropy.RandomForcetrigger(card, card and card.ability.forcetrigger or 5, context) + return Entropy.random_forcetrigger(card, card and card.ability.forcetrigger or 5, context) end end if @@ -200,11 +200,11 @@ local trapezium = { card = card, } else - return Entropy.RandomForcetrigger(card, card and card.ability.forcetrigger or 5, context) + return Entropy.random_forcetrigger(card, card and card.ability.forcetrigger or 5, context) end end if context.forcetrigger then - return Entropy.RandomForcetrigger(card, card and card.ability.forcetrigger or 5, context) + return Entropy.random_forcetrigger(card, card and card.ability.forcetrigger or 5, context) end end, entr_credits = { @@ -233,7 +233,7 @@ local metanoia = { end, calculate = function (self, card, context) if (context.pre_discard) then - Entropy.FlipThen(G.hand.highlighted, function(card) + Entropy.flip_then(G.hand.highlighted, function(card) card:set_ability(G.P_CENTERS.m_entr_flesh) end) end @@ -471,7 +471,9 @@ local nyctophobia = { local cons = pseudorandom_element(G.consumeables.cards, pseudoseed("nyctophobia")) if cons then G.GAME.entr_used_cards = G.GAME.entr_used_cards or {} - cons:start_dissolve() + if not SMODS.is_eternal(cons) then + cons:start_dissolve() + end local num = (G.GAME.entr_used_cards[cons.config.center.key] or 0)*2 if cons.getQty then num = num * cons:getQty() @@ -537,7 +539,7 @@ local caviar = { if context.tag_create and Entropy.AscendedTags[context.tag.key] and not context.tag.ability.no_asc then card.ability.tags = card.ability.tags - 1 if to_number(card.ability.tags) <= 0.00000001 then - SMODS.destroy_cards(card, nil, nil, true) + SMODS.destroy_cards(card, true, nil, true) card_eval_status_text( card, "extra", diff --git a/compat/cryptid/exotic_jokers.lua b/compat/cryptid/exotic_jokers.lua index cf685bc8..712ca11d 100644 --- a/compat/cryptid/exotic_jokers.lua +++ b/compat/cryptid/exotic_jokers.lua @@ -26,65 +26,15 @@ local stillicidium = { calculate = function (self, card, context) if context.ending_shop or context.forcetrigger then local afterS = false + local cards = {} for i, v in pairs(G.jokers.cards) do - if (v.config.center_key ~= "j_entr_stillicidium" or context.forcetrigger) and i > GetAreaIndex(G.jokers.cards, card) + if (v.config.center_key ~= "j_entr_stillicidium" or context.forcetrigger) and i > Entropy.in_table(G.jokers.cards, card) and not v.ability.cry_absolute then --you cannot run, you cannot hide - G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.15,func = function() - --local c = create_card("Joker", G.jokers, nil, nil, nil, nil, key) - --c:add_to_deck() - --G.jokers:emplace(c) - --v:start_dissolve()# - local v2 = G.jokers.cards[i] - local index = ReductionIndex(v2, v2.config.center.set)-1 - while G.P_CENTER_POOLS[v2.config.center.set][index] and G.P_CENTER_POOLS[v2.config.center.set][index].no_doe or G.P_CENTER_POOLS[v2.config.center.set].no_collection do - index = index - 1 - end - if index < 1 then index = 1 end - if G.P_CENTER_POOLS[v2.config.center.set][index] then - key = G.P_CENTER_POOLS[v2.config.center.set][index].key - --local c = create_card("Joker", G.jokers, nil, nil, nil, nil, key) - --c:add_to_deck() - v2:start_dissolve() - G.jokers:remove_from_highlighted(v2, true) - local edition = v.edition - local sticker = v.sticker - v2 = create_card(v2.config.center.set, G.jokers, nil, nil, nil, nil, key) - v2:set_card_area(G.jokers) - v2:set_edition(edition) - v2:add_to_deck() - v2.sticker = sticker - G.jokers.cards[i] = v2 - end - return true - end - })) - end - end - - for i, v in pairs(G.consumeables.cards) do - if v.config.center_key ~= "j_entr_stillicidium" then - G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.15,func = function() - --local c = create_card("Joker", G.jokers, nil, nil, nil, nil, key) - --c:add_to_deck() - --G.jokers:emplace(c) - --v:start_dissolve() - local v2 = G.consumeables.cards[i] - v2.highlighted = false - if G.P_CENTER_POOLS[v2.config.center.set] and G.P_CENTER_POOLS[v2.config.center.set][ReductionIndex(v2, v2.config.center.set)-1] then - key = G.P_CENTER_POOLS[v2.config.center.set][ReductionIndex(v2, v2.config.center.set)-1].key - --local c = create_card("Joker", G.jokers, nil, nil, nil, nil, key) - --c:add_to_deck() - v2:start_dissolve() - v2 = create_card(v.config.center.set, G.jokers, nil, nil, nil, nil, key) - v2:add_to_deck() - v2:set_card_area(G.consumeables) - G.consumeables.cards[i] = v2 - end - return true - end - })) + cards[#cards+1] = v end end + Entropy.reduce_cards(cards, card) + Entropy.reduce_cards(G.consumeables.cards, card) end if context.individual and context.cardarea == G.play and context.other_card @@ -92,7 +42,7 @@ local stillicidium = { local card = context.other_card G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.15,func = function() card:juice_up(0.3, 0.3) - SMODS.change_base(card, card.base.suit, LowerCardRank(card)) + SMODS.modify_rank(card, -1) return true end })) end if (context.setting_blind and not context.blueprint and not card.getting_sliced) or context.forcetrigger then @@ -104,41 +54,6 @@ local stillicidium = { end } - -function LowerCardRank(card) - if not card.base then return nil end - local rank_suffix = math.min(card.base.id, 14) - if rank_suffix < 10 then rank_suffix = tostring(rank_suffix) - elseif rank_suffix == 10 then rank_suffix = '10' - elseif rank_suffix == 11 then rank_suffix = 'Jack' - elseif rank_suffix == 12 then rank_suffix = 'Queen' - elseif rank_suffix == 13 then rank_suffix = 'King' - elseif rank_suffix == 14 then rank_suffix = 'Ace' - end - return ({ - ruby_13 = "Ace", - Ace = "King", - King = "Queen", - Queen = "Jack", - Jack = "10", - ["10"] = "9", - ["9"] = "8", - ["8"] = "7", - ["7"] = "6", - ["6"] = "5", - ["5"] = "4", - ["4"] = "3", - ["3"] = "2", - ["2"] = "Ace", - })[tostring(rank_suffix)] -end -function GetAreaIndex(cards, card) - for i, v in pairs(cards) do - if v.config.center_key == card.config.center_key and v.unique_val == card.unique_val then return i end - end - return -1 -end - local libra = { order = 500 + 1, object_type = "Joker", @@ -353,9 +268,9 @@ local ridiculus_absens = { end end card.ability.extra.odds = pseudorandom("tmtrainer_odds") * 2 + 1 - Entropy.FlipThen(cards, function(card) + Entropy.flip_then(cards, function(card) card:set_edition("e_cry_glitched") - Entropy.TMTTrainize(card) + Entropy.randomize_TMT(card) end) end end, diff --git a/compat/cryptid/misc_jokers.lua b/compat/cryptid/misc_jokers.lua index 772c420b..e5dc037f 100644 --- a/compat/cryptid/misc_jokers.lua +++ b/compat/cryptid/misc_jokers.lua @@ -87,13 +87,13 @@ local solarflare = { })) end return { - asc = lenient_bignum(card.ability.asc), + x_asc = lenient_bignum(card.ability.asc), } end if context.individual and context.cardarea == G.play then if context.other_card.edition and context.other_card.edition.key == "e_entr_solar" then return { - asc = lenient_bignum(card.ability.asc), + x_asc = lenient_bignum(card.ability.asc), colour = G.C.MULT, card = card, } @@ -114,14 +114,14 @@ local solarflare = { } else return { - asc = lenient_bignum(card.ability.asc), + x_asc = lenient_bignum(card.ability.asc), card = card, } end end if context.forcetrigger then return { - asc = lenient_bignum(card.ability.asc), + x_asc = lenient_bignum(card.ability.asc), card = card, } end @@ -158,7 +158,7 @@ local code_m = { if not v.edition then cards[#cards+1] = v end end local jcard = pseudorandom_element(cards, pseudoseed("code_m")) - Entropy.FlipThen({jcard}, function(card) + Entropy.flip_then({jcard}, function(card) card:set_edition("e_cry_m") end) end diff --git a/compat/cryptid/other_consumables.lua b/compat/cryptid/other_consumables.lua index 24f930a0..fc7b83e7 100644 --- a/compat/cryptid/other_consumables.lua +++ b/compat/cryptid/other_consumables.lua @@ -1,4 +1,4 @@ -local downpour = Entropy.SealSpectral("downpour", {x=12,y=7}, "entr_cerulean",2000+24, "c_cry_typhoon", {art = {"Lil. Mr. Slipstream"}}) +local downpour = Entropy.seal_spectral("downpour", {x=12,y=7}, "entr_cerulean",2000+24, "c_cry_typhoon", {art = {"Lil. Mr. Slipstream"}}) local rift = { key = "rift", @@ -17,14 +17,14 @@ local rift = { pos = {x=11,y=8}, inversion = "c_cry_meld", use = function(self, card2) - local cards = Entropy.GetHighlightedCards({G.jokers, G.consumeables, G.hand}, card2, 1, card2.ability.num) - Entropy.FlipThen(cards, function(card) + local cards = Entropy.get_highlighted_cards({G.jokers, G.consumeables, G.hand}, card2, 1, card2.ability.num) + Entropy.flip_then(cards, function(card) card:juice_up() card:set_edition(SMODS.poll_edition({guaranteed = true, key = "entr_rift"})) end) end, can_use = function(self, card) - local cards = Entropy.GetHighlightedCards({G.jokers, G.consumeables, G.hand}, card, 1, card.ability.num) + local cards = Entropy.get_highlighted_cards({G.jokers, G.consumeables, G.hand}, card, 1, card.ability.num) return #cards > 0 and #cards <= card.ability.num end, loc_vars = function(self, q, card) @@ -43,7 +43,7 @@ local rift = { end } -local script = Entropy.SealSpectral("script", {x=6,y=8}, "entr_verdant",2000+25, "c_cry_source", {art = {"Lil. Mr. Slipstream"}}) +local script = Entropy.seal_spectral("script", {x=6,y=8}, "entr_verdant",2000+25, "c_cry_source", {art = {"Lil. Mr. Slipstream"}}) local dispel = { dependencies = { @@ -65,7 +65,7 @@ local dispel = { pos = {x=11,y=6}, --soul_pos = { x = 5, y = 0}, use = function(self, card, area, copier) - for i, v in pairs(Entropy.GetHighlightedCards({G.jokers}, card, 1, card.ability.select)) do + for i, v in pairs(Entropy.get_highlighted_cards({G.jokers}, card, 1, card.ability.select)) do if not v.entr_aleph then v:start_dissolve() G.GAME.banned_keys[v.config.center.key] = true @@ -73,7 +73,7 @@ local dispel = { end end, can_use = function(self, card) - local cards = Entropy.GetHighlightedCards({G.jokers}, card, 1, card.ability.select) + local cards = Entropy.get_highlighted_cards({G.jokers}, card, 1, card.ability.select) return #cards > 0 and #cards <= card.ability.select end, loc_vars = function(self, q, card) @@ -122,7 +122,7 @@ local cleanse = { end card.ability.perma_bonus = 0 end - Entropy.FlipThen(G.hand.cards, function(card, area) + Entropy.flip_then(G.hand.cards, function(card, area) total = total + (card.base.nominal-1) * card2.ability.dollarpc SMODS.change_base(card, "entr_nilsuit", "entr_nilrank") end) @@ -172,8 +172,8 @@ local fusion = { for i = 1, card2.ability.num do actual[#actual+1] = cards[i] end - Entropy.FlipThen(actual, function(card,area) - local sel = Entropy.GetHighlightedCards({G.jokers, G.consumeables, G.hand}, card2, 1, 1, {c_base=true})[1] + Entropy.flip_then(actual, function(card,area) + local sel = Entropy.get_highlighted_cards({G.jokers, G.consumeables, G.hand}, card2, 1, 1, {c_base=true})[1] if sel then local enhancement_type = sel.ability and sel.ability.set or sel.config.center.set if sel.area == G.hand then @@ -191,7 +191,7 @@ local fusion = { end) end, can_use = function(self, card) - return G.hand and #G.hand.cards > 0 and #Entropy.GetHighlightedCards({G.jokers, G.consumeables, G.hand}, card, 1, 1, {c_base=true}) == 1 + return G.hand and #G.hand.cards > 0 and #Entropy.get_highlighted_cards({G.jokers, G.consumeables, G.hand}, card, 1, 1, {c_base=true}) == 1 end, loc_vars = function(self, q, card) return { @@ -230,24 +230,24 @@ local substitute = { local voucher = pseudorandom_element(G.vouchers.cards, pseudoseed("substitute")) local tries = 100 local uvouchers = {} - while (SMODS.is_eternal(voucher) or voucher.ability.cry_absolute or Entropy.GetHigherVoucherTier(voucher.config.center.key) == nil) and tries > 0 do + while (SMODS.is_eternal(voucher) or voucher.ability.cry_absolute or Entropy.get_higher_voucher_tier(voucher.config.center.key) == nil) and tries > 0 do voucher = pseudorandom_element(G.vouchers.cards, pseudoseed("substitute")) tries = tries - 1 end uvouchers[#uvouchers+1] = voucher for i, v in pairs(voucher.config.center.requires or {}) do - if Entropy.InTable(G.vouchers.cards, v) then - local voucher2 = G.vouchers.cards[Entropy.InTable(G.vouchers.cards, v)] + if Entropy.in_table(G.vouchers.cards, v) then + local voucher2 = G.vouchers.cards[Entropy.in_table(G.vouchers.cards, v)] for i2, v2 in pairs(voucher2.config.center.requires or {}) do - if Entropy.InTable(G.vouchers.cards, v2) then - local voucher3 = G.vouchers.cards[Entropy.InTable(G.vouchers.cards, v2)] + if Entropy.in_table(G.vouchers.cards, v2) then + local voucher3 = G.vouchers.cards[Entropy.in_table(G.vouchers.cards, v2)] uvouchers[#uvouchers+1] = voucher3 end end uvouchers[#uvouchers+1] = voucher2 end end - --Entropy.GetHigherVoucherTier(voucher.config.center.key) + --Entropy.get_higher_voucher_tier(voucher.config.center.key) local area if G.STATE == G.STATES.HAND_PLAYED then @@ -295,7 +295,7 @@ local substitute = { end local card = create_card("Voucher", G.vouchers, nil, nil, nil, nil, nil, "entr_subby") - card:set_ability(G.P_CENTERS[Entropy.GetHigherVoucherTier(voucher.config.center.key) or voucher.config.center.key] or G.P_CENTERS[voucher.config.center.key]) + card:set_ability(G.P_CENTERS[Entropy.get_higher_voucher_tier(voucher.config.center.key) or voucher.config.center.key] or G.P_CENTERS[voucher.config.center.key]) card:add_to_deck() area:emplace(card) card.cost = 0 @@ -315,7 +315,7 @@ local substitute = { can_use = function(self, card) local usable_count = 0 for _, v in pairs(G.vouchers.cards) do - if not SMODS.is_eternal(v) and Entropy.GetHigherVoucherTier(v.config.center.key) and not v.ability.cry_absolute then + if not SMODS.is_eternal(v) and Entropy.get_higher_voucher_tier(v.config.center.key) and not v.ability.cry_absolute then usable_count = usable_count + 1 end end @@ -373,7 +373,7 @@ local evocation = { card:start_dissolve() local rare = nil if card.config.center.rarity ~= "j_entr_entropic" then - rare = Entropy.GetNextRarity(card.config.center.rarity or 1) or card.config.center.rarity + rare = Entropy.get_next_rarity(card.config.center.rarity or 1) or card.config.center.rarity end if rare == 1 then rare = "Common" end if rare == 2 then rare = "Uncommon" end @@ -429,7 +429,7 @@ local mimic = { pos = {x=12,y=6}, --soul_pos = { x = 5, y = 0}, use = function(self, card2, area, copier) - local orig = Entropy.GetHighlightedCards({G.shop_booster, G.shop_jokers, G.shop_vouchers, G.hand, G.consumeables, G.jokers, G.pack_cards}, card2, 1, 1)[1] + local orig = Entropy.get_highlighted_cards({G.shop_booster, G.shop_jokers, G.shop_vouchers, G.hand, G.consumeables, G.jokers, G.pack_cards}, card2, 1, 1)[1] local newcard = copy_card(orig) newcard:add_to_deck() newcard.ability.perishable = true @@ -455,7 +455,7 @@ local mimic = { end, can_use = function(self, card) - return #Entropy.GetHighlightedCards({G.shop_booster, G.shop_jokers, G.shop_vouchers, G.hand, G.consumeables, G.jokers, G.pack_cards}, card, 1, card.ability.num) == card.ability.num + return #Entropy.get_highlighted_cards({G.shop_booster, G.shop_jokers, G.shop_vouchers, G.hand, G.consumeables, G.jokers, G.pack_cards}, card, 1, card.ability.num) == card.ability.num end, loc_vars = function(self, q, card) return { @@ -493,7 +493,7 @@ local superego = { pos = {x=8,y=6}, --soul_pos = { x = 5, y = 0}, use = function(self, card2, area, copier) - local cards = Entropy.GetHighlightedCards({G.jokers}, card2, 1, card2.ability.num) + local cards = Entropy.get_highlighted_cards({G.jokers}, card2, 1, card2.ability.num) for i, card in ipairs(cards) do card.ability.superego = true card.ability.superego_copies = 0 @@ -504,7 +504,7 @@ local superego = { end end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.jokers}, card, 1, card.ability.num) + local num = #Entropy.get_highlighted_cards({G.jokers}, card, 1, card.ability.num) return num <= card.ability.num and num > 0 end, loc_vars = function(self, q, card) @@ -567,14 +567,14 @@ local engulf = { pos = {x=8,y=7}, --soul_pos = { x = 5, y = 0}, use = function(self, card2, area, copier) - for i, v in pairs(Entropy.GetHighlightedCards({G.hand}, card2, 1, card2.ability.num) ) do + for i, v in pairs(Entropy.get_highlighted_cards({G.hand}, card2, 1, card2.ability.num) ) do v:set_edition("e_entr_solar") v:juice_up() end end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.num) + local num = #Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.num) return num <= card.ability.num and num > 0 end, loc_vars = function(self, q, card) @@ -611,7 +611,7 @@ local offering = { pos = {x=9,y=7}, --soul_pos = { x = 5, y = 0}, use = function(self, card2, area, copier) - Entropy.FlipThen(G.jokers.cards, function(card, area) + Entropy.flip_then(G.jokers.cards, function(card, area) card.ability.rental = true end) G.E_MANAGER:add_event(Event({ @@ -666,7 +666,7 @@ local entomb = { pos = {x=9,y=6}, --soul_pos = { x = 5, y = 0}, use = function(self, card2, area, copier) - for i, v in pairs(Entropy.GetHighlightedCards({G.consumeables}, card2, 1, card2.ability.num)) do + for i, v in pairs(Entropy.get_highlighted_cards({G.consumeables}, card2, 1, card2.ability.num)) do local c if v.config.center.set == "Booster" then c = copy_card(v) @@ -684,7 +684,7 @@ local entomb = { end, can_use = function(self, card) - return G.consumeables and #Entropy.GetHighlightedCards({G.consumeables}, card, 1, card.ability.num) > 0 and #Entropy.GetHighlightedCards({G.consumeables}, card, 1, card.ability.num) <= card.ability.num + return G.consumeables and #Entropy.get_highlighted_cards({G.consumeables}, card, 1, card.ability.num) > 0 and #Entropy.get_highlighted_cards({G.consumeables}, card, 1, card.ability.num) <= card.ability.num end, loc_vars = function(self, q, card) return { @@ -716,30 +716,30 @@ local conduct = { pos = {x=10,y=6}, --soul_pos = { x = 5, y = 0}, use = function(self, card2, area, copier) - local card = Entropy.GetHighlightedCards({G.hand, G.jokers, G.consumeables, G.pack_cards}, card2, 1, 1)[1] + local card = Entropy.get_highlighted_cards({G.hand, G.jokers, G.consumeables, G.pack_cards}, card2, 1, 1)[1] local area = card.area - local edition = Entropy.FindPreviousInPool(card.edition.key, "Edition") + local edition = Entropy.find_previous_in_pool(card.edition.key, "Edition") local cards = {} for i, v in pairs(area.cards) do if area.cards[i+1] == card or area.cards[i-1] == card then cards[#cards+1]=v end end - Entropy.FlipThen(cards, function(card3, area, indx) + Entropy.flip_then(cards, function(card3, area, indx) card3:set_edition(edition) card3:add_to_deck() end) - Entropy.Unhighlight({G.hand, G.jokers, G.consumeables, G.pack_cards}) + Entropy.unhighlight({G.hand, G.jokers, G.consumeables, G.pack_cards}) end, can_use = function(self, card) - return #Entropy.GetHighlightedCards({G.hand, G.jokers, G.consumeables, G.pack_cards}, card, 1, 1) == 1 and Entropy.GetHighlightedCards({G.hand, G.jokers, G.consumeables, G.pack_cards}, card, 1, 1)[1].edition - and Entropy.GetHighlightedCards({G.hand, G.jokers, G.consumeables, G.pack_cards}, card, 1, 1)[1].edition.key + return #Entropy.get_highlighted_cards({G.hand, G.jokers, G.consumeables, G.pack_cards}, card, 1, 1) == 1 and Entropy.get_highlighted_cards({G.hand, G.jokers, G.consumeables, G.pack_cards}, card, 1, 1)[1].edition + and Entropy.get_highlighted_cards({G.hand, G.jokers, G.consumeables, G.pack_cards}, card, 1, 1)[1].edition.key end, loc_vars = function(self,q,card) local str = "none" - if #Entropy.GetHighlightedCards({G.hand, G.jokers, G.consumeables, G.pack_cards}, card) == 1 and Entropy.GetHighlightedCards({G.hand, G.jokers, G.consumeables, G.pack_cards}, card, 1, 1)[1].edition - and Entropy.FindPreviousInPool(Entropy.GetHighlightedCards({G.hand, G.jokers, G.consumeables, G.pack_cards}, card, 1, 1)[1].edition.key, "Edition") then - str = G.localization.descriptions.Edition[Entropy.FindPreviousInPool(Entropy.GetHighlightedCards({G.hand, G.jokers, G.consumeables, G.pack_cards}, card, 1, 1)[1].edition.key, "Edition")].name + if #Entropy.get_highlighted_cards({G.hand, G.jokers, G.consumeables, G.pack_cards}, card) == 1 and Entropy.get_highlighted_cards({G.hand, G.jokers, G.consumeables, G.pack_cards}, card, 1, 1)[1].edition + and Entropy.find_previous_in_pool(Entropy.get_highlighted_cards({G.hand, G.jokers, G.consumeables, G.pack_cards}, card, 1, 1)[1].edition.key, "Edition") then + str = G.localization.descriptions.Edition[Entropy.find_previous_in_pool(Entropy.get_highlighted_cards({G.hand, G.jokers, G.consumeables, G.pack_cards}, card, 1, 1)[1].edition.key, "Edition")].name end return { vars = { @@ -798,8 +798,8 @@ local pulsar = { 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) + ease_colour(G.C.UI_CHIPS, copy_table(Entropy.get_asc_colour(to_big(G.GAME.hands[ind].level) * to_big(amt) * to_big(card.ability.level))), 0.1) + ease_colour(G.C.UI_MULT, copy_table(Entropy.get_asc_colour(to_big(G.GAME.hands[ind].level) * to_big(amt) * to_big(card.ability.level))), 0.1) Cryptid.pulse_flame(0.01, sunlevel) used_consumable:juice_up(0.8, 0.5) G.E_MANAGER:add_event(Event({ @@ -867,12 +867,12 @@ local beyond = { local deletable_jokers = {} for k, v in pairs(G.jokers.cards) do if not SMODS.is_eternal(v) then - if not Entropy.DeckOrSleeve("doc") or to_big(G.GAME.entropy or 0) < to_big(100) then + if not Entropy.deck_or_sleeve("doc") or to_big(G.GAME.entropy or 0) < to_big(100) then deletable_jokers[#deletable_jokers + 1] = v end end end - if Entropy.DeckOrSleeve("doc") then + if Entropy.deck_or_sleeve("doc") then ease_entropy(-G.GAME.entropy) end local _first_dissolve = nil @@ -929,7 +929,7 @@ local penumbra = { pos = {x=2,y=2}, inversion = "c_cry_eclipse", use = function(self, card2) - local cards = Entropy.GetHighlightedCards({G.hand}, card2, 1, card2.ability.select) + local cards = Entropy.get_highlighted_cards({G.hand}, card2, 1, card2.ability.select) for i, v in pairs(cards) do local card = cards[i] G.E_MANAGER:add_event(Event({ @@ -943,7 +943,7 @@ local penumbra = { end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local num = #Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) return num > 0 and num <= card.ability.select end, loc_vars = function(self, q, card) @@ -980,9 +980,11 @@ local prophecy = { counter = 2 }, use = function(self, card, area, copier) - G.GAME.next_inversions_prophecy = G.GAME.last_fraud.key - G.GAME.last_fraud = nil - G.GAME.inversions_prophecy_counter = card.ability.counter + if G.GAME.last_fraud then + G.GAME.next_inversions_prophecy = G.GAME.last_fraud.key + G.GAME.last_fraud = nil + G.GAME.inversions_prophecy_counter = card.ability.counter + end end, can_use = function(self, card) return G.GAME.last_fraud @@ -1052,15 +1054,15 @@ local imp = { pos = {x=4,y=2}, inversion = "c_cry_seraph", use = function(self, card2) - local cards = Entropy.GetHighlightedCards({G.hand}, card2, 1, card2.ability.select) - Entropy.FlipThen(cards, function(card) + local cards = Entropy.get_highlighted_cards({G.hand}, card2, 1, card2.ability.select) + Entropy.flip_then(cards, function(card) card:set_ability(G.P_CENTERS.m_entr_dark) G.hand:remove_from_highlighted(card) end) end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local num = #Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) return num > 0 and num <= card.ability.select end, loc_vars = function(self, q, card) @@ -1099,8 +1101,8 @@ local integrity = { pos = {x=5,y=2}, inversion = "c_cry_instability", use = function(self, card2) - local cards = Entropy.FilterTable(Entropy.GetHighlightedCards({G.hand}, card2, 1, card2.ability.select), function(card) return card.config.center.key ~= "c_base" end) - Entropy.FlipThen(cards, function(card) + local cards = Entropy.filter_table(Entropy.get_highlighted_cards({G.hand}, card2, 1, card2.ability.select), function(card) return card.config.center.key ~= "c_base" end) + Entropy.flip_then(cards, function(card) local edition = SMODS.poll_edition({guaranteed = true, key = "entr_integrity"}) local seal = SMODS.poll_seal{guaranteed = true, key = "entropy"} card:set_edition(edition) @@ -1111,7 +1113,7 @@ local integrity = { end, can_use = function(self, card) - local num = #Entropy.FilterTable(Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select), function(card) return card.config.center.key ~= "c_base" end) + local num = #Entropy.filter_table(Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select), function(card) return card.config.center.key ~= "c_base" end) return num > 0 and num <= card.ability.select end, loc_vars = function(self, q, card) diff --git a/compat/cryptid/reverse_codes.lua b/compat/cryptid/reverse_codes.lua index ef8f61ed..ec16e816 100644 --- a/compat/cryptid/reverse_codes.lua +++ b/compat/cryptid/reverse_codes.lua @@ -342,7 +342,7 @@ local constant = { atlas = "consumables", pos = {x=2,y=2}, use = function(self, card, area, copier) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, 1) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, 1) for i, v in pairs(G.discard.cards) do if v.base.id == cards[1].base.id then copy_card(G.hand.highlighted[1],v) @@ -365,7 +365,7 @@ local constant = { end end, can_use = function(self, card) - return #Entropy.GetHighlightedCards({G.hand}, card, 1, 1) == 1 + return #Entropy.get_highlighted_cards({G.hand}, card, 1, 1) == 1 end, loc_vars = function(self, q, card) return { @@ -403,7 +403,7 @@ local pseudorandom = { } for i, v in pairs(allowed) do for ind, card in pairs(G[i] and G[i].cards or {}) do - Entropy.ApplySticker(card, "entr_pseudorandom") + Entropy.apply_sticker(card, "entr_pseudorandom") end end end, @@ -539,7 +539,7 @@ local inherit = { local card = Cryptid.get_highlighted_cards({ G.hand }, {}, 1, G.GAME.USING_CLASS or 1)[1] if card then local base_enh = card and card.config.center.key or "" - Entropy.ChangeEnhancements({G.discard, G.deck, G.hand}, self.config.center.key, base_enh, true) + Entropy.change_enhancements({G.discard, G.deck, G.hand}, self.config.center.key, base_enh, true) G.hand:unhighlight_all() end ccl(self) @@ -564,7 +564,7 @@ local inherit = { end end, can_use = function(self, card) - return #Entropy.GetHighlightedCards({G.hand}, card, 1, 1,{c_base=true}) == 1 + return #Entropy.get_highlighted_cards({G.hand}, card, 1, 1,{c_base=true}) == 1 end, loc_vars = function(self, q, card) return { @@ -599,7 +599,7 @@ local fork = { if area then area:remove_from_highlighted(card) end - local cards = Entropy.GetHighlightedCards({G.hand, G.pack_cards}, card, 1, card.ability.extra) + local cards = Entropy.get_highlighted_cards({G.hand, G.pack_cards}, card, 1, card.ability.extra) local total = #cards if total > 0 then for i, orig in pairs(cards) do @@ -623,7 +623,7 @@ local fork = { end end, can_use = function(self, card) - local cards = Entropy.GetHighlightedCards({G.hand, G.pack_cards}, card, 1, card.ability.extra) + local cards = Entropy.get_highlighted_cards({G.hand, G.pack_cards}, card, 1, card.ability.extra) local num = #cards for i, v in pairs(cards) do if v.area == G.pack_cards and not v.base.suit then num = num - 1 end @@ -664,7 +664,7 @@ local push = { G.jokers.cards[i]:start_dissolve() end end - local rarity = Entropy.GetJokerSumRarity() + local rarity = Entropy.get_joker_sum_rarity() G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.15,func = function() local rare = ({ [1] = "Common", @@ -693,12 +693,12 @@ local push = { local mstart = { Entropy.randomchar({"(Current rarity: "}) } - mstart[#mstart+1] = Entropy.randomchar({Entropy.GetJokerSumRarity(true) or "none"}) + mstart[#mstart+1] = Entropy.randomchar({Entropy.get_joker_sum_rarity(true) or "none"}) mstart[#mstart+1] = Entropy.randomchar({")"}) return { main_end = mstart, vars = { - Entropy.GetJokerSumRarity(true), + Entropy.get_joker_sum_rarity(true), colours = { {0.6969,0.6969,0.6969,1} } @@ -786,33 +786,19 @@ local decrement = { }, pos = {x=3,y=3}, use = function(self, card, area, copier) - Entropy.FlipThen(Entropy.GetHighlightedCards({G.jokers}, card, 1, card.ability.extra), function(card) - local ind = ReductionIndex(card, card.config.center.set)-1 - while G.P_CENTER_POOLS[card.config.center.set][ind] and G.P_CENTER_POOLS[card.config.center.set][ind].no_doe or G.P_CENTER_POOLS[card.config.center.set].no_collection do - ind = ind - 1 - end - if ind < 1 then ind = 1 end - if G.P_CENTER_POOLS.Joker[ind] then - card:set_ability(G.P_CENTERS[G.P_CENTER_POOLS.Joker[ind].key]) - end - G.jokers:remove_from_highlighted(card) - end) + Entropy.reduce_cards(Entropy.get_highlighted_cards({G.jokers}, card, 1, card.ability.extra), card) end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.jokers}, card, 1, card.ability.extra) + local num = #Entropy.get_highlighted_cards({G.jokers}, card, 1, card.ability.extra) return num > 0 and num <= card.ability.extra end, loc_vars = function(self, q, card) local name = "None" - local cards = Entropy.GetHighlightedCards({G.jokers, G.shop_jokers, G.shop_booster, G.shop_vouchers}, card, 1, card.ability.extra) + local cards = Entropy.get_highlighted_cards({G.jokers, G.shop_jokers, G.shop_booster, G.shop_vouchers}, card, 1, card.ability.extra) if cards and #cards > 0 then if cards[1].config.center.set == "Joker" or G.GAME.modifiers.cry_beta and cards[1].consumable then local first = cards[1] - local ind = ReductionIndex(cards[1], cards[1].config.center.set )-1 - while G.P_CENTER_POOLS[cards[1].config.center.set ][ind].no_doe or G.P_CENTER_POOLS[cards[1].config.center.set ].no_collection do - ind = ind - 1 - end - if ind < 1 then ind = 1 end + local ind = Entropy.reduction_index(cards[1], cards[1].config.center.set ) name = G.localization.descriptions[cards[1].config.center.set ][G.P_CENTER_POOLS[cards[1].config.center.set ][ind].key].name end end @@ -849,13 +835,13 @@ local invariant = { }, pos = {x=4,y=3}, use = function(self, card, area, copier) - Entropy.ApplySticker(Entropy.GetHighlightedCards({G.shop_jokers, G.shop_booster, G.shop_vouchers}, card, 1, card.ability.extra)[1], "entr_pinned") - local card = Entropy.GetHighlightedCards({G.shop_jokers, G.shop_booster, G.shop_vouchers}, card, 1, card.ability.extra)[1] + Entropy.apply_sticker(Entropy.get_highlighted_cards({G.shop_jokers, G.shop_booster, G.shop_vouchers}, card, 1, card.ability.extra)[1], "entr_pinned") + local card = Entropy.get_highlighted_cards({G.shop_jokers, G.shop_booster, G.shop_vouchers}, card, 1, card.ability.extra)[1] card:juice_up() end, can_use = function(self, card) - return #Entropy.GetHighlightedCards({G.shop_jokers, G.shop_booster, G.shop_vouchers}, card, 1, card.ability.extra) > 0 + return #Entropy.get_highlighted_cards({G.shop_jokers, G.shop_booster, G.shop_vouchers}, card, 1, card.ability.extra) > 0 end, loc_vars = function(self, q, card) q[#q+1] = {key = "entr_pinned", set="Other"} @@ -908,9 +894,9 @@ local pinned = { if not G.GAME.entr_pinned_cards then G.GAME.entr_pinned_cards = {} end if card.area then G.GAME.entr_pinned_cards[#G.GAME.entr_pinned_cards+1] = { - area = Entropy.GetAreaName(card.area), + area = Entropy.in_table(card.area), card = card.config.center.key, - pos = Entropy.GetIdxInArea(card) + pos = Entropy.get_idx_in_area(card) } end end, @@ -1049,7 +1035,7 @@ local sudo = { end, can_use = function(self, card) local num = G.PROFILES[G.SETTINGS.profile].cry_none and -1 or 0 - return #Entropy.GetHighlightedCards({G.hand}, card, 1, num) > num + return #Entropy.get_highlighted_cards({G.hand}, card, 1, num) > num end, loc_vars = function(self, q, card) end, @@ -1083,7 +1069,7 @@ local overflow = { pos = {x=2,y=4}, use = function(self, card, area, copier) G.GAME.Overflow = 9999 - Entropy.ChangeFullCSL(9999, localize("b_infinity")) + Entropy.change_selection_limit(9999, localize("b_infinity")) end, can_use = function(self, card) return true @@ -1119,7 +1105,7 @@ local refactor = { }, pos = {x=3,y=4}, use = function(self, card, area, copier) - local cards = Entropy.GetHighlightedCards({G.jokers}, card, 1, 1) + local cards = Entropy.get_highlighted_cards({G.jokers}, card, 1, 1) local edition = cards[1].edition local card = pseudorandom_element(G.jokers.cards, pseudoseed("refactor")) local tries = 0 @@ -1156,7 +1142,7 @@ local refactor = { end, can_use = function(self, card) - local num = Entropy.GetHighlightedCards({G.jokers}, card, 1, 1) + local num = Entropy.get_highlighted_cards({G.jokers}, card, 1, 1) return #num == 1 end, entr_credits = { @@ -1187,13 +1173,13 @@ local hotfix = { atlas = "consumables", pos = {x=1,y=5}, use = function(self, card, area, copier) - Entropy.ApplySticker(Entropy.GetHighlightedCards({G.hand, G.jokers, G.consumeables}, card, 1, 1)[1], "entr_hotfix") - local card = Entropy.GetHighlightedCards({G.hand, G.jokers, G.consumeables}, card, 1, 1)[1] + Entropy.apply_sticker(Entropy.get_highlighted_cards({G.hand, G.jokers, G.consumeables}, card, 1, 1)[1], "entr_hotfix") + local card = Entropy.get_highlighted_cards({G.hand, G.jokers, G.consumeables}, card, 1, 1)[1] card:juice_up() end, can_use = function(self, card) - return #Entropy.GetHighlightedCards({G.hand, G.jokers, G.consumeables}, card, 1, 1) == 1 + return #Entropy.get_highlighted_cards({G.hand, G.jokers, G.consumeables}, card, 1, 1) == 1 end, loc_vars = function(self, q, card) q[#q+1] = {key = "entr_hotfix", set="Other"} @@ -1275,13 +1261,13 @@ local desync_card = { atlas = "consumables", pos = {x=0,y=5}, use = function(self, card, area, copier) - Entropy.ApplySticker(Entropy.GetHighlightedCards({G.jokers, G.consumeables}, card, 1, 1)[1], "desync") - local card = Entropy.GetHighlightedCards({G.jokers, G.consumeables}, card, 1, 1)[1] + Entropy.apply_sticker(Entropy.get_highlighted_cards({G.jokers, G.consumeables}, card, 1, 1)[1], "desync") + local card = Entropy.get_highlighted_cards({G.jokers, G.consumeables}, card, 1, 1)[1] card:juice_up() end, can_use = function(self, card) - return #Entropy.GetHighlightedCards({G.jokers, G.consumeables}, card, 1, 1) == 1 + return #Entropy.get_highlighted_cards({G.jokers, G.consumeables}, card, 1, 1) == 1 end, loc_vars = function(self, q, card) q[#q+1] = {key = "desync", set="Other", vars = {"context.none"}} @@ -1335,7 +1321,7 @@ local ctrl_x = { G.GAME.ControlXCard = nil G.GAME.ControlXCardArea = nil else - local card = Entropy.GetHighlightedCards({G.hand, G.jokers, G.consumeables, G.shop_booster, G.shop_vouchers, G.shop_jokers, G.pack_cards}, card, 1, 1)[1] + local card = Entropy.get_highlighted_cards({G.hand, G.jokers, G.consumeables, G.shop_booster, G.shop_vouchers, G.shop_jokers, G.pack_cards}, card, 1, 1)[1] G.GAME.ControlXCard = { set = card.ability.set, key = card.config.center.key, @@ -1355,7 +1341,7 @@ local ctrl_x = { end end, can_use = function(self, card) - local cards = Entropy.GetHighlightedCards({G.hand, G.jokers, G.consumeables, G.shop_booster, G.shop_vouchers, G.shop_jokers, G.pack_cards}, card, 1, 1) + local cards = Entropy.get_highlighted_cards({G.hand, G.jokers, G.consumeables, G.shop_booster, G.shop_vouchers, G.shop_jokers, G.pack_cards}, card, 1, 1) return #cards == 1 or G[G.GAME.ControlXCardArea or ""] end, loc_vars = function() @@ -1392,7 +1378,7 @@ local multithread = { }, pos = {x=3,y=5}, use = function(self, card, area, copier) - for i, v in pairs(Entropy.GetHighlightedCards({G.hand}, card, 1, G.hand.config.card_limit)) do + for i, v in pairs(Entropy.get_highlighted_cards({G.hand}, card, 1, G.hand.config.card_limit)) do local c = copy_card(v) c:set_edition({ negative=true, @@ -1407,7 +1393,7 @@ local multithread = { end end, can_use = function(self, card) - return #Entropy.GetHighlightedCards({G.hand}, card, 1, G.hand.config.card_limit) > 0 + return #Entropy.get_highlighted_cards({G.hand}, card, 1, G.hand.config.card_limit) > 0 end, loc_vars = function(self, q, card) q[#q+1] = {key = "temporary", set="Other"} @@ -1578,14 +1564,14 @@ local local_card = { select = 3 }, use = function(self, card, area, copier) - for i, card in pairs(Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select)) do + for i, card in pairs(Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select)) do card.ability.temporary = true card:juice_up() end end, can_use = function(self, card) - return G.hand and #Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) > 0 and #Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) <= card.ability.select + return G.hand and #Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) > 0 and #Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) <= card.ability.select end, loc_vars = function(self, q, card) q[#q+1]={set="Other",key="temporary"} @@ -1624,13 +1610,13 @@ local interpolate = { }, use = function(self, card, area, copier) G.GAME.interpolate_cards = G.GAME.interpolate_cards or {} - for i, card in pairs(Entropy.GetHighlightedCards({G.jokers, G.consumeables}, card, 1, card.ability.select)) do + for i, card in pairs(Entropy.get_highlighted_cards({G.jokers, G.consumeables}, card, 1, card.ability.select)) do G.GAME.interpolate_cards[#G.GAME.interpolate_cards+1] = card.config.center.key card:start_dissolve() end end, can_use = function(self, card) - local cards = Entropy.GetHighlightedCards({G.jokers, G.consumeables}, card, 1, card.ability.select) + local cards = Entropy.get_highlighted_cards({G.jokers, G.consumeables}, card, 1, card.ability.select) return #cards > 0 and #cards <= card.ability.select end, loc_vars = function(self, q, card) @@ -1700,7 +1686,7 @@ local badarg = { }, use = function(self, card, area, copier) local text, loc_disp_text, poker_hands, scoring_hand, disp_text = - G.FUNCS.get_poker_hand_info(Entropy.GetHighlightedCards({G.hand}, card)) + G.FUNCS.get_poker_hand_info(Entropy.get_highlighted_cards({G.hand}, card)) if text and G.GAME.hands[text] then if not G.GAME.badarg then G.GAME.badarg = {} end G.GAME.badarg[text] = true @@ -1712,7 +1698,7 @@ local badarg = { end, can_use = function(self, card) local num = G.PROFILES[G.SETTINGS.profile].cry_none and -1 or 0 - return #Entropy.GetHighlightedCards({G.hand}, card) > num + return #Entropy.get_highlighted_cards({G.hand}, card) > num end, loc_vars = function(self, q, card) return { @@ -1854,46 +1840,32 @@ local desync = { calculate = function(self, card, context) if context.after then if card.ability.context == "after" then - if Entropy.ContextChecks(self, card, context, card.ability.context) then - card.ability.context = Entropy.RandomContext() - if Cryptid.demicolonGetTriggerable(card) then - local results = Cryptid.forcetrigger(card, context) - if results and results.jokers then - results.jokers.message = localize("cry_demicolon") - results.jokers.colour = G.C.RARITY.cry_epic - results.jokers.sound = "cry_demitrigger" - return results.jokers - end - return { - message = localize("cry_demicolon"), - colour = G.C.RARITY.cry_epic, - sound = "cry_demitrigger", - } - end + if Entropy.context_checks(self, card, context, card.ability.context) then + card.ability.context = Entropy.random_context() + Spectrallib.forcetrigger({ + card = card, + context = context, + colour = HEX("FF0000"), + message_card = card + }) end else - card.ability.context = Entropy.RandomContext() + card.ability.context = Entropy.random_context() end end - if Entropy.ContextChecks(self, card, context, card.ability.context) then + if Entropy.context_checks(self, card, context, card.ability.context) then if Cryptid.demicolonGetTriggerable(card) then - local results = Cryptid.forcetrigger(card, context) - if results and results.jokers then - results.jokers.message = localize("cry_demicolon") - results.jokers.colour = G.C.RARITY.cry_epic - results.jokers.sound = "cry_demitrigger" - return results.jokers - end - return { - message = localize("cry_demicolon"), - colour = G.C.RARITY.cry_epic, - sound = "cry_demitrigger", - } + Spectrallib.forcetrigger({ + card = card, + context = context, + colour = HEX("FF0000"), + message_card = card + }) end end end, apply = function(self,card,val) - card.ability.context = Entropy.RandomContext() + card.ability.context = Entropy.random_context() card.ability.desync = true end, loc_vars = function(self, q, card) diff --git a/compat/finity.lua b/compat/finity.lua index fbfece70..ca22877b 100644 --- a/compat/finity.lua +++ b/compat/finity.lua @@ -1,5 +1,4 @@ if FinisherBossBlindStringMap then - FinisherBossBlindStringMap["bl_entr_endless_entropy_phase_four"] = {"j_entr_endlessentropy", "Endless Entropy"} local ee_hand_funcs = { function(self, card, context) @@ -38,28 +37,12 @@ if FinisherBossBlindStringMap then while v == card do v = pseudorandom_element(G.jokers.cards, pseudoseed("ee_hand4")) end - if Cryptid.demicolonGetTriggerable(v)then - local results = Cryptid.forcetrigger(v, context) - if results then - for i, v in pairs(results) do - for i2, result in pairs(v) do - if Entropy.is_number(result) then - res[i2] = Entropy.StackEvalReturns(res[i2], result, i2) - else - res[i2] = result - end - end - end - end - card_eval_status_text( - v, - "extra", - nil, - nil, - nil, - { message = localize("cry_demicolon"), colour = G.C.GREEN } - ) - end + Spectrallib.forcetrigger({ + card = v, + context = context, + colour = G.C.GREEN, + message_card = card + }) end end end @@ -76,7 +59,7 @@ if FinisherBossBlindStringMap then for i = 1, 2 do actual[i] = cards[i] end - Entropy.FlipThen(actual, function(card) + Entropy.flip_then(actual, function(card) card:set_edition(G.hand.highlighted[1] and G.hand.highlighted[1].edition and G.hand.highlighted[1].edition.key) end) end @@ -104,7 +87,7 @@ if FinisherBossBlindStringMap then function(self, card, context) if context.joker_main then return { - eemult = 3 + emult = 3 } end end, @@ -112,7 +95,7 @@ if FinisherBossBlindStringMap then local endless_entropy = { object_type = "Joker", - key = "entr_endlessentropy", + key = "endlessentropy", order = 10^300, rarity = "finity_showdown", cost = 10, @@ -167,8 +150,300 @@ if FinisherBossBlindStringMap then } + local scarlet_sun = { + object_type = "Joker", + key = "scarlet_sun", + order = 10^10 + 1, + rarity = "finity_showdown", + cost = 10, + atlas = "finity_jokers", + pos = {x=0, y=0}, + soul_pos = {x = 1, y = 0}, + entr_credits = { + art = {"missingnumber"} + }, + config = { + asc_power = 1 + }, + loc_vars = function(self, q, card) + q[#q+1] = G.P_CENTERS.e_entr_sunny + return { + vars = { + card.ability.asc_power + } + } + end, + calculate = function(self, card, context) + if context.before then + local hearts = {} + for i, v in pairs(context.scoring_hand) do + if v:is_suit("Hearts") then hearts[#hearts+1] = v end + end + Entropy.flip_then(hearts, function(c) c:set_edition("e_entr_sunny") end) + end + if context.individual and context.cardarea == G.play then + return { + plus_asc = card.ability.asc_power + } + end + end, + in_pool = function() + return false + end, + } + + local olive_orchard = { + object_type = "Joker", + key = "olive_orchard", + order = 10^10 + 2, + rarity = "finity_showdown", + cost = 10, + atlas = "finity_jokers", + pos = {x=0, y=3}, + soul_pos = {x = 1, y = 3}, + entr_credits = { + art = {"missingnumber"} + }, + config = { + oxmult = 1, + xmult_gain = 0.25, + odds = 2 + }, + loc_vars = function(self, q, card) + local n, d = SMODS.get_probability_vars(card, 1, card.ability.odds, "entr_olive_orchard") + return { + vars = { + card.ability.oxmult, + card.ability.xmult_gain, + n, d + } + } + end, + calculate = function(self, card, context) + if context.card_perishing then + SMODS.scale_card(card, { + ref_table = card.ability, + ref_value = "oxmult", + scalar_value = "xmult_gain" + }) + end + if context.k_setting_blind then + if SMODS.pseudorandom_probability(card, "entr_olive_orchard", 1, card.ability.odds) then + local jokers = {} + for i, v in pairs(G.jokers.cards) do + if v ~= card then jokers[#jokers+1] = v end + end + local joker = pseudorandom_element(jokers, pseudoseed("entr_orchard_joker")) + if joker then + local copy = copy_card(joker) + copy:add_to_deck() + G.jokers:emplace(copy) + copy:set_edition("e_negative") + copy.ability.perishable = true + copy.ability.perish_tally = 5 + end + end + end + if context.joker_main then + return { + xmult = card.ability.oxmult + } + end + end, + in_pool = function() + return false + end, + } + + local burgundy_baracuda = { + object_type = "Joker", + key = "burgundy_baracuda", + order = 10^10 + 3, + rarity = "finity_showdown", + cost = 10, + atlas = "finity_jokers", + pos = {x=0, y=1}, + soul_pos = {x = 1, y = 1}, + entr_credits = { + art = {"missingnumber"} + }, + config = { + bxmult = 1, + xmult_gain = 0.25, + }, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.bxmult, + card.ability.xmult_gain, + } + } + end, + calculate = function(self, card, context) + if context.ending_shop and #G.consumeables.cards > 0 then + local cards = pseudorandom_element(G.consumeables.cards, pseudoseed("entr_baracuda")) + if not SMODS.is_eternal(cards) then + cards:start_dissolve() + end + SMODS.scale_card(card, { + ref_table = card.ability, + ref_value = "bxmult", + scalar_value = "xmult_gain" + }) + end + if context.joker_main then + return { + xmult = card.ability.bxmult + } + end + end, + in_pool = function() + return false + end, + } + + local citrine_comet = { + object_type = "Joker", + key = "citrine_comet", + order = 10^10 + 4, + rarity = "finity_showdown", + cost = 10, + atlas = "finity_jokers", + pos = {x=0, y=4}, + soul_pos = {x = 1, y = 4}, + entr_credits = { + art = {"missingnumber"} + }, + calculate = function(self, card, context) + if context.hand_drawn then + for i, v in pairs(context.hand_drawn) do + if pseudorandom("entr_comet") < 0.5 then + local copy = copy_card(v) + copy:add_to_deck() + G.hand:emplace(copy) + copy:set_edition("e_negative") + copy.ability.temporary = true + table.insert(G.playing_cards, copy) + end + end + end + end, + in_pool = function() + return false + end, + } + + local diamond_dawn = { + object_type = "Joker", + key = "diamond_dawn", + order = 10^10 + 4, + rarity = "finity_showdown", + cost = 10, + atlas = "finity_jokers", + pos = {x=0, y=2}, + soul_pos = {x = 1, y = 2}, + entr_credits = { + art = {"missingnumber"} + }, + config = { + dollars_earn = 0 + }, + loc_vars = function(self, _, card) + return { + vars = { + card.ability.dollars_earn + } + } + end, + calculate = function(self, card, context) + if context.after then + Entropy.flip_then({G.play.cards[#G.play.cards]}, function(c) + card.ability.dollars_earn = card.ability.dollars_earn + c:get_chip_bonus() + SMODS.change_base(c, "entr_nilsuit", "entr_nilrank") + end) + end + end, + calc_dollar_bonus = function(self, card) + local ret = card.ability.dollars_earn + card.ability.dollars_earn = 0 + G.E_MANAGER:add_event(Event{ + func = function() + SMODS.calculate_effect{card = card, message = localize("k_reset"), colour = G.C.RED} + return true + end + }) + if ret > 0 then + return ret + end + end, + in_pool = function() + return false + end, + } + + local alabaster_anchor = { + object_type = "Joker", + key = "alabaster_anchor", + order = 10^10 + 5, + rarity = "finity_showdown", + cost = 10, + atlas = "finity_jokers", + pos = {x=0, y=5}, + soul_pos = {x = 1, y = 5}, + entr_credits = { + art = {"missingnumber"} + }, + config = { + low = 0.9, + high = 1.2 + }, + loc_vars = function(self, q, card) + return { + vars ={ + card.ability.high, + card.ability.low + } + } + end, + calculate = function(self, card, context) + if context.pre_discard then + local cards = {} + for i, v in pairs(G.jokers.cards) do + if v ~= card then cards[#cards+1] = v end + end + pseudoshuffle(cards, pseudoseed("entr_anchor")) + if cards[1] then + Cryptid.manipulate(G.jokers.cards[i], { value = card.ability.high }) + end + if cards[2] then + Cryptid.manipulate(G.jokers.cards[i], { value = card.ability.low }) + end + end + end, + in_pool = function() + return false + end, + } + FinisherBossBlindStringMap["bl_entr_endless_entropy_phase_four"] = {"j_entr_endlessentropy", "Endless Entropy"} + FinisherBossBlindStringMap["bl_entr_scarlet_sun"] = {"j_entr_scarlet_sun", "Scarlet Sun"} + FinisherBossBlindStringMap["bl_entr_olive_orchard"] = {"j_entr_olive_orchard", "Olive Orchard"} + FinisherBossBlindStringMap["bl_entr_burgundy_baracuda"] = {"j_entr_burgundy_baracuda", "Burgundy Baracuda"} + FinisherBossBlindStringMap["bl_entr_citrine_comet"] = {"j_entr_citrine_comet", "Citrine Comet"} + FinisherBossBlindStringMap["bl_entr_diamond_dawn"] = {"j_entr_diamond_dawn", "Diamond Dawn"} + FinisherBossBlindStringMap["bl_entr_alabaster_anchor"] = {"j_entr_alabaster_anchor", "Alabaster Anchor"} return { items = { + scarlet_sun, + olive_orchard, + burgundy_baracuda, + citrine_comet, + diamond_dawn, + alabaster_anchor, + sorrowful_styx, + callous_choir, + pristine_pandora, + condemned_cassandra, + limitless_labyrinth, endless_entropy } } diff --git a/compat/grabbag.lua b/compat/grabbag.lua index fc0a105d..989cf20d 100644 --- a/compat/grabbag.lua +++ b/compat/grabbag.lua @@ -100,15 +100,11 @@ if (SMODS.Mods["GrabBag"] or {}).can_load then calculate = function(self, card, context) if context.after then if SMODS.pseudorandom_probability(card, 'entr_mini', 1, self.config.extra.odds) then - local index - for i, v in pairs(G.play.cards) do - if v == card then index = i end - end - if index then + local index = Entropy.in_table(card.area.cards, card) + if index > -1 then local card1 = G.play.cards[index-1] local card2 = G.play.cards[index+1] - if card1 then card1:start_dissolve(); card1.ability.temporary2 = true end - if card2 then card2:start_dissolve(); card2.ability.temporary2 = true end + SMODS.destroy_cards{card1, card2} end end end @@ -136,8 +132,8 @@ if (SMODS.Mods["GrabBag"] or {}).can_load then if context.before and context.cardarea == G.play then if SMODS.pseudorandom_probability(card, 'entr_sharp', 1, self.config.extra.odds) then - Entropy.FlipThen({card}, function(card) - local enh = Entropy.UpgradeEnhancement(card, false, {m_entr_disavowed = true}) + Entropy.flip_then({card}, function(card) + local enh = Entropy.upgrade_enhancement(card, false, {m_entr_disavowed = true}) if G.P_CENTERS[enh] then card:set_ability(G.P_CENTERS[enh]) end @@ -163,19 +159,19 @@ if (SMODS.Mods["GrabBag"] or {}).can_load then function Card:highlight(is_h, ...) if self.seal == "entr_vantablack" then if is_h and not self.highlighted and not self.added then - Entropy.ChangeFullCSL(1) + Entropy.change_selection_limit(1) self.added = true end if not is_h and self.highlighted and self.added then - Entropy.ChangeFullCSL(-1) + Entropy.change_selection_limit(-1) self.added = nil end end return highlight_ref(self, is_h, ...) end - local void = Entropy.SealSpectral("void", {x=5,y=1}, "entr_mini", 2500, "c_gb_dualism", nil, "crossmod_consumables", {1, 3}) - local sharpen = Entropy.SealSpectral("sharpen", {x=6,y=1}, "entr_sharp", 2501, "c_gb_gambit", nil, "crossmod_consumables", {1, 3}) - local singularity = Entropy.SealSpectral("singularity", {x=7,y=1}, "entr_vantablack", 2502, "c_gb_lotus", nil, "crossmod_consumables") + local void = Entropy.seal_spectral("void", {x=5,y=1}, "entr_mini", 2500, "c_gb_dualism", nil, "crossmod_consumables", {1, 3}) + local sharpen = Entropy.seal_spectral("sharpen", {x=6,y=1}, "entr_sharp", 2501, "c_gb_gambit", nil, "crossmod_consumables", {1, 3}) + local singularity = Entropy.seal_spectral("singularity", {x=7,y=1}, "entr_vantablack", 2502, "c_gb_lotus", nil, "crossmod_consumables") -- Sculpture - Visage -- Hourlgass - Sundial @@ -237,15 +233,15 @@ if (SMODS.Mods["GrabBag"] or {}).can_load then pos = {x=5,y=3}, --soul_pos = { x = 5, y = 0}, use = function(self, card, area, copier) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) - Entropy.FlipThen(cards, function(card) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) + Entropy.flip_then(cards, function(card) local suit = cards[1].base.suit SMODS.change_base(card, suit) card:set_edition("e_gb_temporary") end) end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local num = #Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) return num > 0 and num <= card.ability.select end, loc_vars = function(self, q, card) @@ -272,14 +268,14 @@ if (SMODS.Mods["GrabBag"] or {}).can_load then }, pos = {x=11,y=2}, use = function(self, card, area, copier) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) - Entropy.FlipThen(cards, function(card) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) + Entropy.flip_then(cards, function(card) SMODS.change_base(card, "entr_nilsuit", "Ace") card:set_edition("e_gb_temporary") end) end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local num = #Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) return num > 0 and num <= card.ability.select end, loc_vars = function(self, q, card) @@ -342,8 +338,8 @@ if (SMODS.Mods["GrabBag"] or {}).can_load then }, pos = {x=11,y=3}, use = function(self, card, area, copier) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) - Entropy.FlipThen(cards, function(card) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) + Entropy.flip_then(cards, function(card) card:set_edition("e_gb_temporary") local card_new = copy_card(card) card_new:add_to_deck() @@ -351,7 +347,7 @@ if (SMODS.Mods["GrabBag"] or {}).can_load then end) end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local num = #Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) return num > 0 end, demicoloncompat = true, @@ -375,14 +371,14 @@ if (SMODS.Mods["GrabBag"] or {}).can_load then }, pos = {x=7,y=2}, use = function(self, card, area, copier) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) - Entropy.FlipThen(cards, function(card) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) + Entropy.flip_then(cards, function(card) card:set_ability(G.P_CENTERS.m_gold) card:set_edition("e_gb_temporary") end) end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local num = #Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) return num > 0 and num <= card.ability.select end, loc_vars = function(self, q, card) @@ -410,15 +406,15 @@ if (SMODS.Mods["GrabBag"] or {}).can_load then pos = {x=12,y=2}, --soul_pos = { x = 5, y = 0}, use = function(self, card, area, copier) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) local rank = cards[1] and cards[1].base.value - Entropy.FlipThen(cards, function(card) + Entropy.flip_then(cards, function(card) SMODS.change_base(card, nil, rank) card:set_edition("e_gb_temporary") end) end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local num = #Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) return num > 0 and num <= card.ability.select end, loc_vars = function(self, q, card) @@ -446,15 +442,15 @@ if (SMODS.Mods["GrabBag"] or {}).can_load then pos = {x=7,y=4}, --soul_pos = { x = 5, y = 0}, use = function(self, card, area, copier) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) local ability = pseudorandom_element(G.P_JOKER_RARITY_POOLS[3], pseudoseed("entr_trickster")) - Entropy.FlipThen(cards, function(card) + Entropy.flip_then(cards, function(card) card:set_ability(ability) card:set_edition("e_gb_temporary") end) end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local num = #Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) return num > 0 and num <= card.ability.select end, loc_vars = function(self, q, card) @@ -481,14 +477,14 @@ if (SMODS.Mods["GrabBag"] or {}).can_load then }, pos = {x=6,y=2}, use = function(self, card, area, copier) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) - Entropy.FlipThen(cards, function(card) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) + Entropy.flip_then(cards, function(card) card:set_ability(G.P_CENTERS.m_glass) card:set_edition("e_gb_temporary") end) end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local num = #Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) return num > 0 and num <= card.ability.select end, loc_vars = function(self, q, card) @@ -545,14 +541,14 @@ if (SMODS.Mods["GrabBag"] or {}).can_load then }, pos = {x=8,y=2}, use = function(self, card, area, copier) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) - Entropy.FlipThen(cards, function(card) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) + Entropy.flip_then(cards, function(card) card:set_ability(G.P_CENTERS.m_lucky) card:set_edition("e_gb_temporary") end) end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local num = #Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) return num > 0 and num <= card.ability.select end, loc_vars = function(self, q, card) @@ -579,9 +575,9 @@ if (SMODS.Mods["GrabBag"] or {}).can_load then }, pos = {x=10,y=3}, use = function(self, card, area, copier) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, 1) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, 1) local create = card.ability.create - Entropy.FlipThen(cards, function(card) + Entropy.flip_then(cards, function(card) card:set_edition("e_gb_temporary") for i = 1, create do local card_new = copy_card(card) @@ -591,7 +587,7 @@ if (SMODS.Mods["GrabBag"] or {}).can_load then end) end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.hand}, card, 1, 1) + local num = #Entropy.get_highlighted_cards({G.hand}, card, 1, 1) return num > 0 and num <= 1 end, loc_vars = function(self, q, card) @@ -619,15 +615,15 @@ if (SMODS.Mods["GrabBag"] or {}).can_load then pos = {x=8,y=4}, --soul_pos = { x = 5, y = 0}, use = function(self, card, area, copier) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) local ability = pseudorandom_element(G.P_JOKER_RARITY_POOLS[1], pseudoseed("entr_trickster")) - Entropy.FlipThen(cards, function(card) + Entropy.flip_then(cards, function(card) card:set_ability(ability) card:set_edition("e_gb_temporary") end) end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local num = #Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) return num > 0 and num <= card.ability.select end, loc_vars = function(self, q, card) @@ -726,14 +722,14 @@ if (SMODS.Mods["GrabBag"] or {}).can_load then }, pos = {x=9,y=2}, use = function(self, card, area, copier) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) - Entropy.FlipThen(cards, function(card) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) + Entropy.flip_then(cards, function(card) card:set_ability(G.P_CENTERS.m_steel) card:set_edition("e_gb_temporary") end) end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local num = #Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) return num > 0 and num <= card.ability.select end, loc_vars = function(self, q, card) @@ -760,14 +756,14 @@ if (SMODS.Mods["GrabBag"] or {}).can_load then }, pos = {x=5,y=2}, use = function(self, card, area, copier) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) - Entropy.FlipThen(cards, function(card) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) + Entropy.flip_then(cards, function(card) card:set_ability(G.P_CENTERS.m_stone) card:set_edition("e_gb_temporary") end) end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local num = #Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) return num > 0 and num <= card.ability.select end, loc_vars = function(self, q, card) @@ -829,15 +825,15 @@ if (SMODS.Mods["GrabBag"] or {}).can_load then }, pos = {x=10,y=2}, use = function(self, card, area, copier) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) - Entropy.FlipThen(cards, function(card) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) + Entropy.flip_then(cards, function(card) SMODS.change_base(card, nil, "King") Entropy.randomize_rank_suit(card, nil, true, "entr_essence") card:set_edition("e_gb_temporary") end) end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local num = #Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) return num > 0 and num <= card.ability.select end, loc_vars = function(self, q, card) @@ -865,7 +861,7 @@ if (SMODS.Mods["GrabBag"] or {}).can_load then pos = {x=5 ,y=4}, use = function(self, card, area, copier) G.GAME.vanish_selection_limit = (G.GAME.vanish_selection_limit or 0) + card.ability.size - Entropy.ChangeFullCSL(card.ability.size) + Entropy.change_selection_limit(card.ability.size) end, can_use = function(self, card) return G.GAME.blind.in_blind diff --git a/compat/malverk.lua b/compat/malverk.lua index 584999b9..90dc4fd0 100644 --- a/compat/malverk.lua +++ b/compat/malverk.lua @@ -1,6 +1,6 @@ if (SMODS.Mods["malverk"] or {}).can_load then AltTexture({ - key = "rubycardt", + key = "rubycard", set = "Enhanced", path = "malverk/enhancements.png", loc_txt = { @@ -14,7 +14,7 @@ if (SMODS.Mods["malverk"] or {}).can_load then TexturePack({ key = "rubycard", textures = { - "entr_rubycardt", + "entr_rubycard", }, loc_txt = { name = "Ruby over Prismatic", diff --git a/compat/multiplayer.lua b/compat/multiplayer.lua index 13ad7452..101805aa 100644 --- a/compat/multiplayer.lua +++ b/compat/multiplayer.lua @@ -18,7 +18,7 @@ if (SMODS.Mods["Multiplayer"] or {}).can_load then } }, loc_vars = function(self, info_queue, card) - add_nemesis_info(info_queue) + MP.UTILS.add_nemesis_info(info_queue) return { vars = { 2 } } end, in_pool = function(self) diff --git a/items/altpath/blinds.lua b/items/altpath/blinds.lua index 82e0cac1..78be4f12 100644 --- a/items/altpath/blinds.lua +++ b/items/altpath/blinds.lua @@ -104,7 +104,7 @@ local gamma = { dollars = 6, altpath=true, boss = { - min = 1, + min = 2, }, in_pool = function() return G.GAME.entr_alt @@ -161,7 +161,7 @@ local delta = { function Entropy.evaluate_play_misc(text, disp_text, poker_hands, scoring_hand, non_loc_disp_text, percent, percent_delta) local mult = SMODS.Scoring_Parameters["mult"].current local hand_chips = SMODS.Scoring_Parameters["chips"].current - if Entropy.BlindIs("bl_entr_delta") and to_big(G.GAME.round_resets.hands) > to_big(G.GAME.current_round.hands_left) and not G.GAME.blind.disabled then + if Entropy.blind_is("bl_entr_delta") and to_big(G.GAME.round_resets.hands) > to_big(G.GAME.current_round.hands_left) and not G.GAME.blind.disabled then local used = G.GAME.round_resets.hands - G.GAME.current_round.hands_left used = math.max(used,2) mult = mult / used @@ -169,7 +169,7 @@ function Entropy.evaluate_play_misc(text, disp_text, poker_hands, scoring_hand, update_hand_text({delay=0}, {mult=mult}) delay(0.4) end - if Entropy.BlindIs("bl_entr_epsilon") and #G.play.cards > 1 and not G.GAME.blind.disabled then + if Entropy.blind_is("bl_entr_epsilon") and #G.play.cards > 1 and not G.GAME.blind.disabled then local used = #G.play.cards used = math.max(used,1) mult = mult / used @@ -177,7 +177,7 @@ function Entropy.evaluate_play_misc(text, disp_text, poker_hands, scoring_hand, update_hand_text({delay=0}, {mult=mult}) delay(0.4) end - if Entropy.BlindIs("bl_entr_rho") and #G.play.cards > 1 and not G.GAME.blind.disabled then + if Entropy.blind_is("bl_entr_rho") and #G.play.cards > 1 and not G.GAME.blind.disabled then local used = 1 local ranks = {} for i, v in ipairs(G.play.cards) do @@ -191,26 +191,18 @@ function Entropy.evaluate_play_misc(text, disp_text, poker_hands, scoring_hand, update_hand_text({delay=0}, {mult=mult}) delay(0.4) end - if Entropy.BlindIs("bl_entr_omicron") and to_big(G.GAME.round_resets.hands) <= to_big(G.GAME.current_round.hands_left) and not G.GAME.blind.disabled then + if Entropy.blind_is("bl_entr_omicron") and to_big(G.GAME.round_resets.hands) <= to_big(G.GAME.current_round.hands_left) and not G.GAME.blind.disabled then mult = 0 hand_chips = 0 end SMODS.Scoring_Parameters["mult"]:modify(mult - SMODS.Scoring_Parameters["mult"].current) SMODS.Scoring_Parameters["chips"]:modify(hand_chips - SMODS.Scoring_Parameters["chips"].current) - G.E_MANAGER:add_event(Event{ - trigger = "after", - blocking = false, - func = function() - G.GAME.asc_power_hand = nil - return true - end - }) return text, disp_text, poker_hands, scoring_hand, non_loc_disp_text, percent, percent_delta end local calc_scoreref = SMODS.calculate_round_score function SMODS.calculate_round_score(...) - if G.GAME.blind and Entropy.BlindIs("bl_entr_omicron") and not G.GAME.blind.config.done and not G.GAME.blind.disabled then return 0 end + if G.GAME.blind and Entropy.blind_is("bl_entr_omicron") and not G.GAME.blind.config.done and not G.GAME.blind.disabled then return 0 end return calc_scoreref(...) end @@ -291,17 +283,19 @@ local eta = { calculate = function(self, blind, context) if context.after and not G.GAME.blind.disabled then G.GAME.blind.suit_debuffed = pseudorandom_element({"Spades", "Hearts", "Diamonds", "Clubs"}, pseudoseed("eta_suit")) - for i, v in ipairs(G.hand.cards) do - SMODS.recalc_debuff(v) - end - for i, v in ipairs(G.deck.cards) do - SMODS.recalc_debuff(v) + for i, v in ipairs(G.I.CARD) do + if v.is_playing_card and v:is_playing_card() then + SMODS.recalc_debuff(v) + end end - G.GAME.blind:set_text() + G.GAME.blind.loc_debuff_lines = {} + G.FUNCS.HUD_blind_debuff(G.HUD_blind:get_UIE_by_ID('HUD_blind_debuff')) + G.GAME.blind:set_text() + G.FUNCS.HUD_blind_debuff(G.HUD_blind:get_UIE_by_ID('HUD_blind_debuff')) end end, recalc_debuff = function(self, card, from_blind) - if card.base.suit == G.GAME.blind.suit_debuffed then + if card.base.suit == G.GAME.blind.suit_debuffed and card.is_playing_card and card:is_playing_card() then return true end return false @@ -312,7 +306,10 @@ local eta = { trigger = "after", delay = 0.2, func = function() + G.GAME.blind.loc_debuff_lines = {} + G.FUNCS.HUD_blind_debuff(G.HUD_blind:get_UIE_by_ID('HUD_blind_debuff')) G.GAME.blind:set_text() + G.FUNCS.HUD_blind_debuff(G.HUD_blind:get_UIE_by_ID('HUD_blind_debuff')) return true end})) end, @@ -375,7 +372,7 @@ local iota = { loc_vars = function() if not G.GAME.blind.suit_debuffed then G.GAME.blind.suit_debuffed = pseudorandom_element({"Spades", "Hearts", "Diamonds", "Clubs"}, pseudoseed("eta_suit")) end return { - vars = {G.GAME.iotablind and G.localization.descriptions["Blind"][G.GAME.iotablind.key].name or "[random blind]"} + vars = {G.GAME.iotablind and G.localization.descriptions["Blind"][G.GAME.iotablind].name or "[random blind]"} } end, collection_loc_vars = function() @@ -384,407 +381,49 @@ local iota = { } end, in_pool = function() return G.GAME.entr_alt end, + set_blind = function() + G.GAME.iotablind = pseudorandom_element(G.P_BLINDS).key + while not G.P_BLINDS[G.GAME.iotablind].boss or G.P_BLINDS[G.GAME.iotablind].boss.showdown do + G.GAME.iotablind = pseudorandom_element(G.P_BLINDS).key + end + G.GAME.blind.loc_debuff_lines = {} + G.FUNCS.HUD_blind_debuff(G.HUD_blind:get_UIE_by_ID('HUD_blind_debuff')) + G.GAME.blind:set_text() + G.FUNCS.HUD_blind_debuff(G.HUD_blind:get_UIE_by_ID('HUD_blind_debuff')) + end, calculate = function(self, blind, context) if not G.GAME.blind.disabled then - for k, _ in pairs(Entropy.GetIota()) do - s = G.P_BLINDS[k] - if s.calculate then - s:calculate(blind, context) - end - end if context.after then - G.GAME.iotablind = pseudorandom_element(G.P_BLINDS) - while not G.GAME.iotablind.boss or G.GAME.iotablind.boss.showdown do - G.GAME.iotablind = pseudorandom_element(G.P_BLINDS) - end - G.GAME.blind:set_text() - end - end - end, - set_blind = function(self, reset, silent) - G.GAME.iotablind = pseudorandom_element(G.P_BLINDS) - while not G.GAME.iotablind.boss or G.GAME.iotablind.boss.showdown do - G.GAME.iotablind = pseudorandom_element(G.P_BLINDS) - end - G.GAME.blind:set_text() - for k, _ in pairs(Entropy.GetIota()) do - s = G.P_BLINDS[k] - if s.set_blind then - s:set_blind(reset, silent) - end - if s.name == "The Eye" and not reset then - G.GAME.blind.hands = { - ["Flush Five"] = false, - ["Flush House"] = false, - ["Five of a Kind"] = false, - ["Straight Flush"] = false, - ["Four of a Kind"] = false, - ["Full House"] = false, - ["Flush"] = false, - ["Straight"] = false, - ["Three of a Kind"] = false, - ["Two Pair"] = false, - ["Pair"] = false, - ["High Card"] = false, - } - end - if s.name == "The Mouth" and not reset then - G.GAME.blind.only_hand = false - end - if s.name == "The Fish" and not reset then - G.GAME.blind.prepped = nil - end - if s.name == "The Water" and not reset then - G.GAME.blind.discards_sub = G.GAME.current_round.discards_left - ease_discard(-G.GAME.blind.discards_sub) - end - if s.name == "The Needle" and not reset then - G.GAME.blind.hands_sub = G.GAME.round_resets.hands - 1 - ease_hands_played(-G.GAME.blind.hands_sub) - end - if s.name == "The Manacle" and not reset then - G.hand:change_size(-1) - end - if s.name == "Amber Acorn" and not reset and #G.jokers.cards > 0 then - G.jokers:unhighlight_all() - for k, v in ipairs(G.jokers.cards) do - v:flip() - end - if #G.jokers.cards > 1 then - G.E_MANAGER:add_event(Event({ - trigger = "after", - delay = 0.2, - func = function() - G.E_MANAGER:add_event(Event({ - func = function() - G.jokers:shuffle("aajk") - play_sound("cardSlide1", 0.85) - return true - end, - })) - delay(0.15) - G.E_MANAGER:add_event(Event({ - func = function() - G.jokers:shuffle("aajk") - play_sound("cardSlide1", 1.15) - return true - end, - })) - delay(0.15) - G.E_MANAGER:add_event(Event({ - func = function() - G.jokers:shuffle("aajk") - play_sound("cardSlide1", 1) - return true - end, - })) - delay(0.5) - return true - end, - })) - end - end - - --add new debuffs - for _, v in ipairs(G.playing_cards) do - if self:recalc_debuff(v, true) then v:set_debuff(true) end - end - for _, v in ipairs(G.jokers.cards) do - if not reset then - if self:recalc_debuff(v, true) then v:set_debuff(true) end - end - end - end - end, - defeat = function(self, silent) - for k, _ in pairs(Entropy.GetIota()) do - if G.P_BLINDS[k].defeat then - G.P_BLINDS[k]:defeat(silent) - end - if G.P_BLINDS[k].name == "The Manacle" and not self.disabled then - G.hand:change_size(1) - end - end - end, - press_play = function(self) - for k, _ in pairs(Entropy.GetIota()) do - s = G.P_BLINDS[k] - if s.press_play then - s:press_play() - end - if s.name == "The Hook" then - G.E_MANAGER:add_event(Event({ + G.E_MANAGER:add_event(Event{ func = function() - local any_selected = nil - local _cards = {} - for k, v in ipairs(G.hand.cards) do - _cards[#_cards + 1] = v + Spectrallib.defeat_copied_blinds(Spectrallib.get_copied_blinds(blind), self, silent) + G.GAME.iotablind = pseudorandom_element(G.P_BLINDS).key + while not G.P_BLINDS[G.GAME.iotablind].boss or G.P_BLINDS[G.GAME.iotablind].boss.showdown do + G.GAME.iotablind = pseudorandom_element(G.P_BLINDS).key end - for i = 1, 2 do - if G.hand.cards[i] then - local selected_card, card_key = pseudorandom_element(_cards, pseudoseed("ObsidianOrb")) - G.hand:add_to_highlighted(selected_card, true) - table.remove(_cards, card_key) - any_selected = true - play_sound("card1", 1) + Spectrallib.set_copied_blinds(Spectrallib.get_copied_blinds(blind), self, silent, reset) + G.GAME.blind.loc_debuff_lines = {} + G.FUNCS.HUD_blind_debuff(G.HUD_blind:get_UIE_by_ID('HUD_blind_debuff')) + G.GAME.blind:set_text() + G.FUNCS.HUD_blind_debuff(G.HUD_blind:get_UIE_by_ID('HUD_blind_debuff')) + SMODS.juice_up_blind() + 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) + for i, v in pairs(G.I.CARD) do + if v.set_debuff then + SMODS.recalc_debuff(v) end end - if any_selected then - G.FUNCS.discard_cards_from_highlighted(nil, true) - end - return true - end, - })) - G.GAME.blind.triggered = true - delay(0.7) - end - if s.name == "Crimson Heart" then - if G.jokers.cards[1] then - G.GAME.blind.triggered = true - G.GAME.blind.prepped = true - end - end - if s.name == "The Fish" then - G.GAME.blind.prepped = true - end - if s.name == "The Tooth" then - G.E_MANAGER:add_event(Event({ - trigger = "after", - delay = 0.2, - func = function() - for i = 1, #G.play.cards do - G.E_MANAGER:add_event(Event({ - func = function() - G.play.cards[i]:juice_up() - return true - end, - })) - ease_dollars(-1) - delay(0.23) - end - return true - end, - })) - G.GAME.blind.triggered = true - end - end - end, - modify_hand = function(self, cards, poker_hands, text, mult, hand_chips) - local new_mult = mult - local new_chips = hand_chips - local trigger = false - for k, _ in pairs(Entropy.GetIota()) do - s = G.P_BLINDS[k] - if s.modify_hand then - local this_trigger = false - new_mult, new_chips, this_trigger = s:modify_hand(cards, poker_hands, text, new_mult, new_chips) - trigger = trigger or this_trigger - end - if s.name == "The Flint" then - G.GAME.blind.triggered = true - new_mult = math.max(math.floor(new_mult * 0.5 + 0.5), 1) - new_chips = math.max(math.floor(new_chips * 0.5 + 0.5), 0) - trigger = true - end - end - return new_mult or mult, new_chips or hand_chips, trigger - end, - debuff_hand = function(self, cards, hand, handname, check) - G.GAME.blind.debuff_boss = nil - for k, _ in pairs(Entropy.GetIota()) do - s = G.P_BLINDS[k] - if s.debuff_hand and s:debuff_hand(cards, hand, handname, check) then - G.GAME.blind.debuff_boss = s - return true - end - if s.debuff then - G.GAME.blind.triggered = false - if s.debuff.hand and next(hand[s.debuff.hand]) then - G.GAME.blind.triggered = true - G.GAME.blind.debuff_boss = s - return true - end - if s.debuff.h_size_ge and #cards < s.debuff.h_size_ge then - G.GAME.blind.triggered = true - G.GAME.blind.debuff_boss = s - return true - end - if s.debuff.h_size_le and #cards > s.debuff.h_size_le then - G.GAME.blind.triggered = true - G.GAME.blind.debuff_boss = s - return true - end - if s.name == "The Eye" then - if G.GAME.blind.hands[handname] then - G.GAME.blind.triggered = true - G.GAME.blind.debuff_boss = s return true end - if not check then - G.GAME.blind.hands[handname] = true - end - end - if s.name == "The Mouth" then - if s.only_hand and s.only_hand ~= handname then - G.GAME.blind.triggered = true - G.GAME.blind.debuff_boss = s - return true - end - if not check then - s.only_hand = handname - end - end - end - if s.name == "The Arm" then - G.GAME.blind.triggered = false - if to_big(G.GAME.hands[handname].level) > to_big(1) then - G.GAME.blind.triggered = true - if not check then - SMODS.upgrade_poker_hands{hands = handname, from = G.GAME.blind.children.animatedSprite, level_up = -1} - G.GAME.blind:wiggle() - end - end - end - if s.name == "The Ox" then - G.GAME.blind.triggered = false - if handname == G.GAME.current_round.most_played_poker_hand then - G.GAME.blind.triggered = true - if not check then - ease_dollars(-G.GAME.dollars, true) - G.GAME.blind:wiggle() - end - end - end - end - return false - end, - drawn_to_hand = function(self) - for k, _ in pairs(Entropy.GetIota()) do - s = G.P_BLINDS[k] - if s.drawn_to_hand then - s:drawn_to_hand() - end - if s.name == "Cerulean Bell" then - local any_forced = nil - for k, v in ipairs(G.hand.cards) do - if v.ability.forced_selection then - any_forced = true - end - end - if not any_forced then - G.hand:unhighlight_all() - local forced_card = pseudorandom_element(G.hand.cards, pseudoseed("ObsidianOrb")) - if focred_card then - forced_card.ability.forced_selection = true - G.hand:add_to_highlighted(forced_card) - end - end - end - if s.name == "Crimson Heart" and G.GAME.blind.prepped and G.jokers.cards[1] then - local jokers = {} - for i = 1, #G.jokers.cards do - if not G.jokers.cards[i].debuff or #G.jokers.cards < 2 then - jokers[#jokers + 1] = G.jokers.cards[i] - end - G.jokers.cards[i]:set_debuff(false) - end - local _card = pseudorandom_element(jokers, pseudoseed("ObsidianOrb")) - if _card then - _card:set_debuff(true) - _card:juice_up() - G.GAME.blind:wiggle() - end - end - end - end, - stay_flipped = function(self, area, card) - for k, _ in pairs(Entropy.GetIota()) do - s = G.P_BLINDS[k] - if s.stay_flipped and s:stay_flipped(area, card) then - return true - end - if area == G.hand then - if - s.name == "The Wheel" - and pseudorandom(pseudoseed("ObsidianOrb")) < G.GAME.probabilities.normal / 7 - then - return true - end - if - s.name == "The House" - and G.GAME.current_round.hands_played == 0 - and G.GAME.current_round.discards_used == 0 - then - return true - end - if s.name == "The Mark" and card:is_face(true) then - return true - end - if s.name == "The Fish" and G.GAME.blind.prepped then - return true - end - end - end - end, - recalc_debuff = function(self, card, from_blind) - if card and type(card) == "table" and card.area then - for k, _ in pairs(Entropy.GetIota()) do - s = G.P_BLINDS[k] - if s.debuff_card then - s:debuff_card(card, from_blind) - end - if s.recalc_debuff then - s:recalc_debuff(card, from_blind) - end - if s.debuff and not G.GAME.blind.disabled and card.area ~= G.jokers then - --this part is buggy for some reason - if s.debuff.suit and Card.is_suit(card, s.debuff.suit, true) then - card:set_debuff(true) - return - end - if s.debuff.is_face == "face" and Card.is_face(card, true) then - card:set_debuff(true) - return - end - if s.name == "The Pillar" and card.ability.played_this_ante then - card:set_debuff(true) - return - end - if s.debuff.value and s.debuff.value == card.base.value then - card:set_debuff(true) - return - end - if s.debuff.nominal and s.debuff.nominal == card.base.nominal then - card:set_debuff(true) - return - end - end - if s.name == "Crimson Heart" and not G.GAME.blind.disabled and card.area == G.jokers then - return - end - if s.name == "Verdant Leaf" and not G.GAME.blind.disabled and card.area ~= G.jokers then - card:set_debuff(true) - return - end - end - end - end, - cry_before_play = function(self) - for k, _ in pairs(Entropy.GetIota()) do - s = G.P_BLINDS[k] - if s.cry_before_play then - s:cry_before_play() - end - end - end, - cry_after_play = function(self) - for k, _ in pairs(Entropy.GetIota()) do - s = G.P_BLINDS[k] - if s.cry_after_play then - s:cry_after_play() + }) end end end, + get_copied_blinds = function() + return G.GAME.iotablind + end } local kappa = { @@ -814,7 +453,7 @@ local kappa = { local hand_info = G.FUNCS.get_poker_hand_info G.FUNCS.get_poker_hand_info = function(_cards) local text, disp_text, poker_hands, scoring_hand, non_loc_disp_text, percent, percent_delta = hand_info(_cards) - if Entropy.BlindIs("bl_entr_kappa") and not G.GAME.blind.disabled then + if Entropy.blind_is("bl_entr_kappa") and not G.GAME.blind.disabled then scoring_hand2 = {} for i, v in ipairs(_cards) do if not SMODS.in_scoring(v, scoring_hand or {}) then @@ -828,13 +467,13 @@ end local never_scoresref = SMODS.never_scores function SMODS.never_scores(card, ...) - if (next(SMODS.find_card("j_splash")) or SMODS.always_scores(card, ...)) and Entropy.BlindIs("bl_entr_kappa") then return true end + if (next(SMODS.find_card("j_splash")) or SMODS.always_scores(card, ...)) and Entropy.blind_is("bl_entr_kappa") then return true end return never_scoresref(card, ...) end local always_scoresref = SMODS.always_scores function SMODS.always_scores(card, ...) - if card.config.center.key == "j_entr_false_vacuum_collapse" then return true end + if card.config.center.key == "j_entr_false_vacuum_collapse" or card.config.center.key == "phoenix_a" then return true end return always_scoresref(card, ...) end @@ -863,7 +502,7 @@ local lambda = { calculate = function(self, blind, context) if context.after and not G.GAME.blind.disabled then local _, _, _, hand = G.FUNCS.get_poker_hand_info(G.play.cards) - Entropy.FlipThen(hand, function(card) + Entropy.flip_then(hand, function(card) card.ability.debuff_timer = 5 card.ability.debuff_timer_max = 5 end) @@ -956,7 +595,7 @@ local xi = { end, calculate = function(self, blind, context) if context.pre_discard and not G.GAME.blind.discarded and not G.GAME.blind.disabled then - Entropy.FlipThen(G.hand.highlighted, function(card) + Entropy.flip_then(G.hand.highlighted, function(card) card.ability.eternal = true end) G.GAME.blind.discarded = true @@ -1117,23 +756,23 @@ local tau = { calculate = function(self, blind, context) if context.pre_discard and not G.GAME.blind.disabled then G.GAME.tau = G.GAME.tau - 1 - Entropy.ChangeFullCSL(-1) + Entropy.change_selection_limit(-1) end end, disable = function() - Entropy.ChangeFullCSL(-G.GAME.tau) + Entropy.change_selection_limit(-G.GAME.tau) G.GAME.tau = nil end, defeat = function() if not G.GAME.blind.disabled then - Entropy.ChangeFullCSL(-G.GAME.tau) + Entropy.change_selection_limit(-G.GAME.tau) G.GAME.tau = nil end end, set_blind = function() G.GAME.tau = G.GAME.tau or 0 G.GAME.tau = G.GAME.tau + 1 - Entropy.ChangeFullCSL(1) + Entropy.change_selection_limit(1) end } @@ -1264,7 +903,7 @@ local psi = { calculate = function(self, blind, context) if context.individual and context.cardarea == G.play and context.other_card and not G.GAME.blind.disabled then if pseudorandom("psi_blind") < G.GAME.probabilities.normal / 2 then - Entropy.FlipThen({context.other_card}, function(card) + Entropy.flip_then({context.other_card}, function(card) card:set_ability(G.P_CENTERS.m_entr_disavowed) end) end @@ -1516,19 +1155,19 @@ local labyrinth = { end, set_blind = function() Entropy.handle_card_limit(G.hand, 3) - Entropy.ChangeFullCSL(1) + Entropy.change_selection_limit(1) G.GAME.blind.cards = {} end, defeat = function() if not G.GAME.blind.disabled then Entropy.handle_card_limit(G.hand, -3) - Entropy.ChangeFullCSL(-1) + Entropy.change_selection_limit(-1) for i, v in ipairs(G.GAME.blind.cards) do v.ability.forced_selection = nil end end end, disable = function() Entropy.handle_card_limit(G.hand, -3) - Entropy.ChangeFullCSL(-1) + Entropy.change_selection_limit(-1) for i, v in ipairs(G.GAME.blind.cards) do v.ability.forced_selection = nil end end } @@ -1536,7 +1175,7 @@ local labyrinth = { local highlighted_ref = Card.highlight function Card:highlight(is_highlighted) highlighted_ref(self, is_highlighted) - if Entropy.BlindIs("bl_entr_labyrinth") then + if Entropy.blind_is("bl_entr_labyrinth") then if is_highlighted and self.area == G.hand then if not self.ability.forced_selection then local cards = {} @@ -1591,4 +1230,4 @@ return { cassandra, labyrinth } -} \ No newline at end of file +} diff --git a/items/inversions/reverse_planets.lua b/items/inversions/reverse_planets.lua index d4af8c9a..b1209e21 100644 --- a/items/inversions/reverse_planets.lua +++ b/items/inversions/reverse_planets.lua @@ -1,99 +1,4 @@ -local hand_row_ref = create_UIBox_current_hand_row -function create_UIBox_current_hand_row(handname, simple) - G.GAME.badarg = G.GAME.badarg or {} - if G.GAME.hands[handname].operator then - return (G.GAME.hands[handname].visible) and - (not simple and - {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.01, r = 0.1, colour = G.C.HAND_LEVELS[to_number(math.min(7, G.GAME.hands[handname].level))], minw = 1.5, outline = 0.8, outline_colour = G.C.WHITE}, nodes={ - {n=G.UIT.T, config={text = localize('k_level_prefix')..number_format(G.GAME.hands[handname].level), scale = 0.5, colour = G.C.UI.TEXT_DARK}} - }}, - {n=G.UIT.C, config={align = "cm", minw = 4.5, maxw = 4.5}, nodes={ - {n=G.UIT.T, config={text = ' '..localize(handname,'poker_hands'), scale = 0.45, colour = G.C.UI.TEXT_LIGHT, shadow = true}} - }} - }}, - {n=G.UIT.C, config={align = "cm", padding = 0.05, colour = G.C.BLACK,r = 0.1}, nodes={ - {n=G.UIT.C, config={align = "cr", padding = 0.01, r = 0.1, colour = G.GAME.badarg[handname] and HEX("FF0000") or G.C.CHIPS, minw = 1.1}, nodes={ - {n=G.UIT.T, config={text = G.GAME.badarg[handname] and "BAD" or number_format(G.GAME.hands[handname].chips, 1000000), scale = 0.45, colour = G.C.UI.TEXT_LIGHT}}, - {n=G.UIT.B, config={w = 0.08, h = 0.01}} - }}, - {n=G.UIT.T, config={text = G.GAME.hands[handname].operator and Entropy.FormatArrowMult(G.GAME.hands[handname].operator, "") or "X", scale = 0.45, colour = Entropy.get_arrow_color(G.GAME.hands[handname].operator or 0)}}, - {n=G.UIT.C, config={align = "cl", padding = 0.01, r = 0.1, colour = G.GAME.badarg[handname] and HEX("FF0000") or G.C.MULT, minw = 1.1}, nodes={ - {n=G.UIT.B, config={w = 0.08,h = 0.01}}, - {n=G.UIT.T, config={text = G.GAME.badarg[handname] and "ARG" or number_format(G.GAME.hands[handname].mult, 1000000), scale = 0.45, colour = G.C.UI.TEXT_LIGHT}} - }} - }}, - {n=G.UIT.C, config={align = "cm"}, nodes={ - {n=G.UIT.T, config={text = ' #', scale = 0.45, colour = G.C.UI.TEXT_LIGHT, shadow = true}} - }}, - {n=G.UIT.C, config={align = "cm", padding = 0.05, colour = G.C.L_BLACK,r = 0.1, minw = 0.9}, nodes={ - {n=G.UIT.T, config={text = G.GAME.hands[handname].played, scale = 0.45, colour = G.C.FILTER, shadow = true}}, - }} - }} - or {n=G.UIT.R, config={align = "cm", padding = 0.05, r = 0.1, colour = darken(G.C.JOKER_GREY, 0.1), force_focus = true, emboss = 0.05, hover = true, on_demand_tooltip = {text = localize(handname, 'poker_hand_descriptions'), filler = {func = create_UIBox_hand_tip, args = handname}}, focus_args = {snap_to = (simple and handname == 'Straight Flush')}}, nodes={ - {n=G.UIT.C, config={align = "cm", padding = 0, minw = 5}, nodes={ - {n=G.UIT.T, config={text = localize(handname,'poker_hands'), scale = 0.5, colour = G.C.UI.TEXT_LIGHT, shadow = true}} - }} - }}) - or nil - elseif G.GAME.hands[handname] and not G.GAME.hands[handname].AscensionPower then - return hand_row_ref(handname, simple) - else - if not (G.GAME.hands[handname]) then return {} end - if not G.GAME.badarg then G.GAME.badarg = {} end - local color = (G.GAME.badarg and G.GAME.badarg[handname] and HEX("FF0000")) or (G.GAME.hands[handname].TranscensionPower and HEX("84e1ff")) or G.C.GOLD - return (G.GAME.hands[handname].visible) and - (not simple and - {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 = to_big(G.GAME.hands[handname].level) < to_big(2) and G.C.UI.TEXT_LIGHT or G.C.HAND_LEVELS[to_number(math.min(7, G.GAME.hands[handname].level))], 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 = color}}, - {n=G.UIT.C, config={align = "cm", padding = 0.01, r = 0.1, colour = color, minw = 0.7}, nodes={ - {n=G.UIT.T, config={text = ""..number_format(to_big(G.GAME.hands[handname].AscensionPower) ^ to_big(G.GAME.hands[handname].TranscensionPower or 1), 1000000), scale = 0.45, colour = G.C.UI.TEXT_LIGHT}} - }} - }}, - {n=G.UIT.C, config={align = "cm", minw = 3.8, maxw = 3.8}, nodes={ - {n=G.UIT.T, config={text = ' '..localize(handname,'poker_hands'), scale = 0.45, colour = G.C.UI.TEXT_LIGHT, shadow = true}} - }} - }}, - {n=G.UIT.C, config={align = "cm", padding = 0.05, colour = G.C.BLACK,r = 0.1}, nodes={ - {n=G.UIT.C, config={align = "cr", padding = 0.01, r = 0.1, colour = color, minw = 1.1}, nodes={ - {n=G.UIT.T, config={text = G.GAME.badarg[handname] and "BAD" or number_format(Entropy.ascend_hand(G.GAME.hands[handname].chips,handname), 1000000), scale = 0.45, colour = G.C.UI.TEXT_LIGHT}}, - {n=G.UIT.B, config={w = 0.08, h = 0.01}} - }}, - {n=G.UIT.T, config={text = G.GAME.hands[handname].operator and Entropy.FormatArrowMult(G.GAME.hands[handname].operator, "") or "X", scale = 0.45, colour = color}}, - {n=G.UIT.C, config={align = "cl", padding = 0.01, r = 0.1, colour = color, minw = 1.1}, nodes={ - {n=G.UIT.B, config={w = 0.08,h = 0.01}}, - {n=G.UIT.T, config={text = G.GAME.badarg[handname] and "ARG" or number_format(Entropy.ascend_hand(G.GAME.hands[handname].mult,handname), 1000000), scale = 0.45, colour = G.C.UI.TEXT_LIGHT}} - }} - }}, - {n=G.UIT.C, config={align = "cm"}, nodes={ - {n=G.UIT.T, config={text = ' #', scale = 0.45, colour = G.C.UI.TEXT_LIGHT, shadow = true}} - }}, - {n=G.UIT.C, config={align = "cm", padding = 0.05, colour = G.C.L_BLACK,r = 0.1, minw = 0.9}, nodes={ - {n=G.UIT.T, config={text = G.GAME.hands[handname].played, scale = 0.45, colour = G.C.FILTER, shadow = true}}, - }} - }} - or {n=G.UIT.R, config={align = "cm", padding = 0.05, r = 0.1, colour = darken(G.C.JOKER_GREY, 0.1), force_focus = true, emboss = 0.05, hover = true, on_demand_tooltip = {text = localize(handname, 'poker_hand_descriptions'), filler = {func = create_UIBox_hand_tip, args = handname}}, focus_args = {snap_to = (simple and handname == 'Straight Flush')}}, nodes={ - {n=G.UIT.C, config={align = "cm", padding = 0, minw = 5}, nodes={ - {n=G.UIT.T, config={text = localize(handname,'poker_hands'), scale = 0.5, colour = G.C.UI.TEXT_LIGHT, shadow = true}} - }} - }}) - or nil - end -end - - -function Entropy.ascend_hand(num, hand) -- edit this function at your leisure - local ret = Cryptid.ascend(num, (G.GAME.hands[hand].AscensionPower or 0)) - return ret -end - -function Entropy.ReverseSuitUse(self, card, area, copier, num) +function Entropy.reverse_suit_use(self, card, area, copier, num) local handnames = card.ability.handnames local declare = { cry_Declare0 = true, @@ -108,7 +13,7 @@ function Entropy.ReverseSuitUse(self, card, area, copier, num) end SMODS.upgrade_poker_hands({hands = handnames, from = card, ascension_power = (card.ability.level + (G.GAME.entr_black_dwarf or 0)) * (num or 1)}) end -function Entropy.ReverseSuitLocVars(self, q, card, instant, noengulf) +function Entropy.reverse_suit_loc_vars(self, q, card, instant, noengulf) return { vars = { localize(card.ability.handnames[1], "poker_hands"), @@ -139,7 +44,7 @@ function Entropy.ReverseSuitLocVars(self, q, card, instant, noengulf) } end -function Entropy.ChunkLocVars(self, q, card, instant, noengulf) +function Entropy.chunk_loc_vars(self, q, card, instant, noengulf) return { vars = { G.GAME.hands[card.ability.handnames[1]].declare_cards and localize(card.ability.handnames[1], "poker_hands") or localize("cry_code_empty"), @@ -170,14 +75,14 @@ function Entropy.ChunkLocVars(self, q, card, instant, noengulf) } end -function Entropy.ReversePlanetUse(handname, card, amt) +function Entropy.reverse_planet_use(handname, card, amt) SMODS.upgrade_poker_hands({hands = handname, from = card, ascension_power = amt * (card.ability.level + (G.GAME.entr_black_dwarf or 0))}) end local planets = {} local order = 0 -function Entropy.RegisterReversePlanet(key, handname, sprite_pos, func, cost,level, name,set_badges,loc_vars,config, new_key, calc, art, atlas) +function Entropy.register_reverse_planet(key, handname, sprite_pos, func, cost,level, name,set_badges,loc_vars,config, new_key, calc, art, atlas) order = order + 1 planets[#planets+1]={ object_type="Consumable", @@ -203,12 +108,12 @@ function Entropy.RegisterReversePlanet(key, handname, sprite_pos, func, cost,lev can_bulk_use = true, use = function(self, card, area, copier) if func then func(self, card,area,copier) else - Entropy.ReversePlanetUse(card.ability.handname, card, 1) + Entropy.reverse_planet_use(card.ability.handname, card, 1) 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) + Entropy.reverse_planet_use(card.ability.handname, card, number) end end, can_use = function(self, card) @@ -244,7 +149,7 @@ function Entropy.RegisterReversePlanet(key, handname, sprite_pos, func, cost,lev then local value = G.P_CENTERS.v_observatory.config.extra return { - asc = to_big(value) ^ (card.ability.overflow_amount or 1), + x_asc = to_big(value) ^ (card.ability.overflow_amount or 1), } end end, @@ -343,9 +248,9 @@ if SMODS.Mods.Cryptid and SMODS.Mods.Cryptid.can_load then end, func = function(self,card,area,copier,number) if number and number ~= 1 then - Entropy.StarLuaBulk(self,card,area,copier,number) + Entropy.star_lua_bulk(self,card,area,copier,number) else - Entropy.StarLuaSingle(self,card,area,copier) + Entropy.star_lua_single(self,card,area,copier) end end, calc = function(self, card, context) @@ -359,7 +264,7 @@ if SMODS.Mods.Cryptid and SMODS.Mods.Cryptid.can_load then then local value = G.P_CENTERS.v_observatory.config.extra return { - asc = to_big(value) ^ (card.ability.overflow_amount or 1), + x_asc = to_big(value) ^ (card.ability.overflow_amount or 1), } end end @@ -394,7 +299,7 @@ if SMODS.Mods.Cryptid and SMODS.Mods.Cryptid.can_load then } end, func = function(self,card,area,copier,number) - Entropy.StrangeSingle(self,card,area,copier,number) + Entropy.strange_single(self,card,area,copier,number) end, calc = function() end, art="Binary" } @@ -407,9 +312,6 @@ if SMODS.Mods.Cryptid and SMODS.Mods.Cryptid.can_load then planetcolourone = G.C.UI.TEXT_DARK end local str = "X("..((G.GAME.sunnumber and G.GAME.sunnumber.not_modest or 0) + 1.25).."^"..(G.GAME.nemesisnumber and G.GAME.nemesisnumber > 0 and G.GAME.nemesisnumber+1 or "").."asc)" - if G.jokers and next(SMODS.find_card("j_entr_helios")) then - str = "^("..((G.GAME.sunnumber and G.GAME.sunnumber.not_modest or 0) + 1.75).."X"..(G.GAME.nemesisnumber and G.GAME.nemesisnumber > 0 and G.GAME.nemesisnumber+1 or "").."asc)" - end return { vars = { (G.GAME.nemesislevel or 0) + 1, @@ -473,12 +375,12 @@ if SMODS.Mods.Cryptid and SMODS.Mods.Cryptid.can_load then end end, } - Entropy.ReversePlanets[#Entropy.ReversePlanets+1] = {name="", key="Timantii", new_key = "jatka", sprite_pos={x=8,y=3},prefix = "cry", func = Entropy.ReverseSuitUse, config = {level=1,handnames = {"High Card", "Pair", "Two Pair"}}, loc_vars = Entropy.ReverseSuitLocVars, calc=Entropy.ReverseSuitCalc} - Entropy.ReversePlanets[#Entropy.ReversePlanets+1] = {name="", key="Klubi", new_key = "rouva", sprite_pos={x=9,y=3},prefix = "cry", func = Entropy.ReverseSuitUse, config = {level=1,handnames = {"Three of a Kind", "Straight", "Flush"}}, loc_vars = Entropy.ReverseSuitLocVars, calc=Entropy.ReverseSuitCalc} - Entropy.ReversePlanets[#Entropy.ReversePlanets+1] = {name="", key="Sydan", new_key = "paras", sprite_pos={x=10,y=3},prefix = "cry", func = Entropy.ReverseSuitUse, config = {level=1,handnames = {"Full House", "Four of a Kind", "Straight Flush"}}, loc_vars = Entropy.ReverseSuitLocVars, calc=Entropy.ReverseSuitCalc} - Entropy.ReversePlanets[#Entropy.ReversePlanets+1] = {name="", key="Lapio", new_key = "assa", sprite_pos={x=11,y=3},prefix = "cry", func = Entropy.ReverseSuitUse, config = {level=1,handnames = {"Five of a Kind", "Flush House", "Flush Five"}}, loc_vars = Entropy.ReverseSuitLocVars, calc=Entropy.ReverseSuitCalc} - Entropy.ReversePlanets[#Entropy.ReversePlanets+1] = {name="", key="Kaikki", new_key = "kivi", sprite_pos={x=12,y=3},prefix = "cry", func = Entropy.ReverseSuitUse, config = {level=1,handnames = {"cry_Bulwark", "cry_Clusterfuck", "cry_UltPair"}}, loc_vars = Entropy.ReverseSuitLocVars, calc=Entropy.ReverseSuitCalc} - Entropy.ReversePlanets[#Entropy.ReversePlanets+1] = {name="", key="voxel", new_key = "chunk", sprite_pos={x=1,y=7},prefix = "cry", func = Entropy.ReverseSuitUse, config = {level=1,handnames = {"cry_Declare0", "cry_Declare1", "cry_Declare2"}}, loc_vars = Entropy.ChunkLocVars, calc=Entropy.ReverseSuitCalc} + Entropy.ReversePlanets[#Entropy.ReversePlanets+1] = {name="", key="Timantii", new_key = "jatka", sprite_pos={x=8,y=3},prefix = "cry", func = Entropy.reverse_suit_use, config = {level=1,handnames = {"High Card", "Pair", "Two Pair"}}, loc_vars = Entropy.reverse_suit_loc_vars, calc=Entropy.reverse_suit_calc} + Entropy.ReversePlanets[#Entropy.ReversePlanets+1] = {name="", key="Klubi", new_key = "rouva", sprite_pos={x=9,y=3},prefix = "cry", func = Entropy.reverse_suit_use, config = {level=1,handnames = {"Three of a Kind", "Straight", "Flush"}}, loc_vars = Entropy.reverse_suit_loc_vars, calc=Entropy.reverse_suit_calc} + Entropy.ReversePlanets[#Entropy.ReversePlanets+1] = {name="", key="Sydan", new_key = "paras", sprite_pos={x=10,y=3},prefix = "cry", func = Entropy.reverse_suit_use, config = {level=1,handnames = {"Full House", "Four of a Kind", "Straight Flush"}}, loc_vars = Entropy.reverse_suit_loc_vars, calc=Entropy.reverse_suit_calc} + Entropy.ReversePlanets[#Entropy.ReversePlanets+1] = {name="", key="Lapio", new_key = "assa", sprite_pos={x=11,y=3},prefix = "cry", func = Entropy.reverse_suit_use, config = {level=1,handnames = {"Five of a Kind", "Flush House", "Flush Five"}}, loc_vars = Entropy.reverse_suit_loc_vars, calc=Entropy.reverse_suit_calc} + Entropy.ReversePlanets[#Entropy.ReversePlanets+1] = {name="", key="Kaikki", new_key = "kivi", sprite_pos={x=12,y=3},prefix = "cry", func = Entropy.reverse_suit_use, config = {level=1,handnames = {"cry_Bulwark", "cry_Clusterfuck", "cry_UltPair"}}, loc_vars = Entropy.reverse_suit_loc_vars, calc=Entropy.reverse_suit_calc} + Entropy.ReversePlanets[#Entropy.ReversePlanets+1] = {name="", key="voxel", new_key = "chunk", sprite_pos={x=1,y=7},prefix = "cry", func = Entropy.reverse_suit_use, config = {level=1,handnames = {"cry_Declare0", "cry_Declare1", "cry_Declare2"}}, loc_vars = Entropy.chunk_loc_vars, calc=Entropy.reverse_suit_calc} end Entropy.ReversePlanets[#Entropy.ReversePlanets+1] = {name="entr_derivative",key="wormhole",sprite_pos={x=4,y=0}, new_key="pocket_dimension", prefix = "entr", atlas = "consumables2", set_badges = function(self, card, badges) badges[1] = create_badge(localize("k_spatial_anomaly"), get_type_colour(self or card.config, card), nil, 1.2) @@ -548,18 +450,18 @@ end, func = function(self, card, area, copier, number) end end, config = {amt = 1, hands = 3}, loc_vars = function(self, q, card) return {vars = {card.ability.hands, card.ability.amt + (G.GAME.entr_black_dwarf or 0)}} end} -function Entropy.RegisterReversePlanets() +function Entropy.register_reverse_planets() Entropy.StarLocs = {} 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,v.new_key, v.calc, v.art, v.atlas) + Entropy.register_reverse_planet(v.key,v.name,v.sprite_pos,v.func,v.cost,v.level,v.name,v.set_badges,v.loc_vars,v.config,v.new_key, v.calc, v.art, v.atlas) planets[#planets].inversion = "c_"..((v.prefix and v.prefix.."_") or "")..v.key end end -Entropy.RegisterReversePlanets() +Entropy.register_reverse_planets() -function Entropy.StarLuaSingle(self,card,area,copier) +function Entropy.star_lua_single(self,card,area,copier) local used_consumable = copier or card if SMODS.pseudorandom_probability(card, 'starlua', 1, card.ability.odds) @@ -578,8 +480,8 @@ function Entropy.StarLuaSingle(self,card,area,copier) 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) + ease_colour(G.C.UI_CHIPS, copy_table(Entropy.get_asc_colour(card.ability.level)), 0.1) + ease_colour(G.C.UI_MULT, copy_table(Entropy.get_asc_colour(card.ability.level)), 0.1) Cryptid.pulse_flame(0.01, 1) used_consumable:juice_up(0.8, 0.5) G.E_MANAGER:add_event(Event({ @@ -650,7 +552,7 @@ function Entropy.StarLuaSingle(self,card,area,copier) end end -function Entropy.StarLuaBulk(self,card,area,copier,number) +function Entropy.star_lua_bulk(self,card,area,copier,number) local used_consumable = copier or card if SMODS.pseudorandom_probability(card, 'starlua', 1 * number, card.ability.odds) @@ -671,8 +573,8 @@ function Entropy.StarLuaBulk(self,card,area,copier,number) 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) + ease_colour(G.C.UI_CHIPS, copy_table(Entropy.get_asc_colour(card.ability.level*number*quota)), 0.1) + ease_colour(G.C.UI_MULT, copy_table(Entropy.get_asc_colour(card.ability.level*number*quota)), 0.1) Cryptid.pulse_flame(0.01, 1) used_consumable:juice_up(0.8, 0.5) G.E_MANAGER:add_event(Event({ @@ -743,7 +645,7 @@ function Entropy.StarLuaBulk(self,card,area,copier,number) end end -function Entropy.StrangeSingle(self, card, area, copier,num) +function Entropy.strange_single(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 @@ -763,8 +665,8 @@ function Entropy.StrangeSingle(self, card, area, copier,num) 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) + ease_colour(G.C.UI_CHIPS, copy_table(Entropy.get_asc_colour(G.GAME.strange_star*(num or 1))), 0.1) + ease_colour(G.C.UI_MULT, copy_table(Entropy.get_asc_colour(G.GAME.strange_star*(num or 1))), 0.1) Cryptid.pulse_flame(0.01, sunlevel) used_consumable:juice_up(0.8, 0.5) G.E_MANAGER:add_event(Event({ @@ -789,7 +691,7 @@ function Entropy.StrangeSingle(self, card, area, copier,num) ) end -function Entropy.ReverseSuitCalc(self, card, context) +function Entropy.reverse_suit_calc(self, card, context) for i, v in pairs(card.ability.handnames) do if G.GAME.used_vouchers.v_observatory @@ -800,7 +702,7 @@ function Entropy.ReverseSuitCalc(self, card, context) then local value = G.P_CENTERS.v_observatory.config.extra return { - asc = to_big(value) ^ (card.ability.overflow_amount or 1), + x_asc = to_big(value) ^ (card.ability.overflow_amount or 1), } end end diff --git a/items/inversions/reverse_runes.lua b/items/inversions/reverse_runes.lua index 22e74476..bee4a232 100644 --- a/items/inversions/reverse_runes.lua +++ b/items/inversions/reverse_runes.lua @@ -7,7 +7,9 @@ function Entropy.pact_mark(key) else tag.ability.count = (tag.ability.count or 0) + 1 local index = tag.ability.index - G.HUD_runes[index]:remove() + if G.HUD_runes[index] then + G.HUD_runes[index]:remove() + end local tag_sprite_ui, tag_sprite = tag:generate_UI_rune() G.HUD_runes[index] = UIBox{ definition = {n=G.UIT.ROOT, config={align = "tm", padding = 0.05, colour = G.C.CLEAR}, nodes={ @@ -19,6 +21,11 @@ function Entropy.pact_mark(key) major = index > 1 and G.HUD_runes[index-1] or G.ROOM_ATTACH} } end + if #G.HUD_runes > 6 then + for i = 2, #G.HUD_runes do + G.HUD_runes[i].config.offset.y = -0.9 + 0.9 * (6 / #G.HUD_runes) + end + end return tag.ability.count end @@ -601,7 +608,7 @@ function Card:start_dissolve(...) end }) end - elseif Entropy.has_rune("rune_entr_rebirth") and self:is_playing_card() then + elseif Entropy.has_rune("rune_entr_rebirth") and self:is_playing_card() and not G.entr_bypass_rebirth then card_eval_status_text( self, "extra", @@ -645,7 +652,7 @@ function Card:shatter(...) end }) end - elseif Entropy.has_rune("rune_entr_rebirth") and self:is_playing_card() then + elseif Entropy.has_rune("rune_entr_rebirth") and self:is_playing_card() and not G.entr_bypass_rebirth then card_eval_status_text( self, "extra", @@ -1010,14 +1017,47 @@ G.FUNCS.play_cards_from_highlighted = function(e) v.ability.entr_times_played = (v.ability.entr_times_played or 0) + 1 end local text = G.FUNCS.get_poker_hand_info(G.hand.highlighted) - if text == "Full House" and (next(SMODS.find_card("j_entr_ruby") or next(SMODS.find_card("j_entr_slipstream"))) or next(SMODS.find_card("j_entr_cassknows")) or next(SMODS.find_card("j_entr_crabus")) or next(SMODS.find_card("j_entr_grahkon")) or next(SMODS.find_card("j_entr_hexa"))) then + if text == "Full House" and (next(SMODS.find_card("j_entr_ruby") or next(SMODS.find_card("j_entr_slipstream"))) or next(SMODS.find_card("j_entr_cassknows")) or next(SMODS.find_card("j_entr_grahkon")) or next(SMODS.find_card("j_entr_hexa"))) then check_for_unlock({type = "suburban_jungle"}) end local text = G.FUNCS.get_poker_hand_info(G.hand.highlighted) if text == "entr_derivative" and next(SMODS.find_card("j_entr_antiderivative")) then check_for_unlock({type = "anti_derivative"}) end - G.GAME.asc_power_hand = 0 + for i, v in pairs(SMODS.find_card("j_entr_planetarium")) do + if v.ability.extra.hand == "Pair" then + local cards = {} + for i, v in pairs(G.hand.cards) do + if v.highlighted then cards[#cards+1] = v end + end + Entropy.flip_then({cards[1], cards[#cards]}, function(c) + if c == cards[1] then + copy_card(cards[#cards], cards[1]) + end + end) + break + end + if v.ability.extra.hand == "Flush" then + local hcards = {} + for i, v in pairs(G.hand.cards) do + if v.highlighted then hcards[#hcards+1] = v end + end + local suit = hcards[1] and hcards[1].base.suit + if suit then + local cards = {} + for i = 2, #hcards do + cards[#cards+1] = hcards[i] + end + pseudoshuffle(cards, pseudoseed("entr_planetarium_jupiter")) + Entropy.flip_then({hcards[1], cards[1], cards[2]}, function(c) + if c == cards[1] or c == cards[2] then + SMODS.change_base(c, suit) + end + end) + end + break + end + end play_ref(e) end @@ -1075,6 +1115,7 @@ local strength = { else G.deck:emplace(copy) end + playing_card_joker_effects({ copy }) end end local joker = pseudorandom_element(G.jokers.cards, pseudoseed("entr_strength")) @@ -1174,7 +1215,7 @@ local freedom = { }, use = function(self, rcard) Entropy.handle_card_limit(G.hand, -rcard.ability.hand_size) - Entropy.ChangeFullCSL(rcard.ability.selection_limit) + Entropy.change_selection_limit(rcard.ability.selection_limit) G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.2, func = function() play_sound('entr_pacts') if card and card.juice_up then card:juice_up(0.8, 0.5) end @@ -1582,7 +1623,7 @@ local blood = { for i, v in pairs(cards) do if v.ability.link then linktxt = v.ability.link end end - linktxt = linktxt or Entropy.StringRandom(8) + linktxt = linktxt or Entropy.string_random(8) pseudoshuffle(cards, pseudoseed("entr_blood")) for i = 1, math.min(#cards, card.ability.random) do local v = cards[i] @@ -1637,7 +1678,7 @@ local serpents = { set = "Omen", atlas = "rune_atlas", pos = {x=3,y=11}, - soul_pos = {x=999, y=999, extra = {x=4, y=11}}, + soul_pos = {x=4, y=11}, order = 7625, key = "serpents", entr_redraw_soul = true, @@ -1646,11 +1687,12 @@ local serpents = { immutable = true, no_select = true, hidden = true, + soul_set = "Pact", loc_vars = function(self, q, card) return {vars = {card.ability.dollars}} end, use = function(self, card) local omens = {} for i, v in pairs(G.P_CENTERS) do - if v.hidden and not v.no_collection and (not v.in_pool or v:in_pool({}) and v.key ~= "c_entr_serpents") then + if v.hidden and not v.no_collection and SMODS.add_to_pool(v, {}) and v.key ~= "c_entr_serpents" and not v.no_doe then omens[#omens+1] = v.key end end @@ -1712,4 +1754,4 @@ return { awakening, awakening_indicator, serpents, serpents_indicator } -} \ No newline at end of file +} diff --git a/items/inversions/reverse_spectrals.lua b/items/inversions/reverse_spectrals.lua index 23d6267a..12d5671e 100644 --- a/items/inversions/reverse_spectrals.lua +++ b/items/inversions/reverse_spectrals.lua @@ -21,8 +21,8 @@ local changeling = { for i = 1, card.ability.random do actual[i] = cards[i] end - Entropy.FlipThen(actual, function(card) - card:set_edition(SMODS.poll_edition({guaranteed = true, key = "entr_changeling"})) + Entropy.flip_then(actual, function(card) + card:set_edition(SMODS.poll_edition({guaranteed = true, key = "entr_changeling", no_negative = true})) SMODS.change_base(card, nil, pseudorandom_element({"King", "Queen", "Jack"}, pseudoseed("changeling_rank")), nil) end) end, @@ -61,12 +61,12 @@ local rend = { set = "Omen", use = function(self, card) - Entropy.FlipThen(Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select), function(card) + Entropy.flip_then(Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select), function(card) card:set_ability(G.P_CENTERS.m_entr_flesh) end) end, can_use = function(self, card) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) return #cards > 0 and #cards <= card.ability.select end, loc_vars = function(self, q, card) @@ -105,7 +105,7 @@ local inscribe = { pos = {x=8,y=4}, --soul_pos = { x = 5, y = 0}, use = function(self, card2, area, copier) - Entropy.FlipThen(Entropy.FilterTable(G.hand.cards, function(card) return not card:is_face() and card.base.value ~= "Ace" end), function(card, area) + Entropy.flip_then(Entropy.filter_table(G.hand.cards, function(card) return not card:is_face() and card.base.value ~= "Ace" end), function(card, area) card.base.nominal = card.base.nominal * card2.ability.chipmult card.ability.debuff_timer = 1 card.ability.debuff_timer_max = 1 @@ -130,10 +130,10 @@ local inscribe = { self:use(card) end } -local insignia = Entropy.SealSpectral("insignia", {x=9,y=4}, "entr_silver", 2000+3, "c_talisman", {art = {"Lil. Mr. Slipstream"}}) -local rendezvous = Entropy.SealSpectral("rendezvous", {x=10,y=5}, "entr_crimson",2000+10.5, "c_deja_vu") -local eclipse = Entropy.SealSpectral("eclipse", {x=12,y=5}, "entr_sapphire",2000+12, "c_trance", {art = {"Lil. Mr. Slipstream"}}) -local calamity = Entropy.SealSpectral("calamity", {x=6,y=6}, "entr_pink",2000+13, "c_medium",{art = {"Lil. Mr. Slipstream"}}) +local insignia = Entropy.seal_spectral("insignia", {x=9,y=4}, "entr_silver", 2000+3, "c_talisman", {art = {"Lil. Mr. Slipstream"}}) +local rendezvous = Entropy.seal_spectral("rendezvous", {x=10,y=5}, "entr_crimson",2000+10.5, "c_deja_vu") +local eclipse = Entropy.seal_spectral("eclipse", {x=12,y=5}, "entr_sapphire",2000+12, "c_trance", {art = {"Lil. Mr. Slipstream"}}) +local calamity = Entropy.seal_spectral("calamity", {x=6,y=6}, "entr_pink",2000+13, "c_medium",{art = {"Lil. Mr. Slipstream"}}) local siphon = { dependencies = { @@ -155,28 +155,30 @@ local siphon = { pos = {x=10,y=4}, --soul_pos = { x = 5, y = 0}, use = function(self, card2, area, copier) - local lower = Entropy.FindPreviousInPool(G.jokers.highlighted[1].edition.key, "Edition", "e_negative") + local lower = Entropy.find_previous_in_pool(G.jokers.highlighted[1].edition.key, "Edition", "e_negative") local cards = {} local rcards = {} for i, v in pairs(G.hand.cards) do if not v.edition then cards[#cards+1] = v end end pseudoshuffle(cards, pseudoseed("entr_siphon")) for i = 1, math.min(#cards, card2.ability.cards) do rcards[#rcards+1] = cards[i] end - Entropy.FlipThen(rcards, function(card, area) + Entropy.flip_then(rcards, function(card, area) card:set_edition(lower) end) - G.jokers.highlighted[1]:start_dissolve() + if not SMODS.is_eternal(G.jokers.highlighted[1]) then + G.jokers.highlighted[1]:start_dissolve() + end end, can_use = function(self, card) return G.jokers and #G.jokers.highlighted == 1 and G.jokers.highlighted[1] and G.jokers.highlighted[1].edition - and G.jokers.highlighted[1].ability and not G.jokers.highlighted[1].ability.cry_absolute + and not SMODS.is_eternal(G.jokers.highlighted[1]) end, loc_vars = function(self, q, card) local str = localize("k_none") - if G.jokers and #G.jokers.highlighted > 0 and G.jokers.highlighted[1].edition and Entropy.FindPreviousInPool(G.jokers.highlighted[1].edition.key, "Edition", "e_negative") then - str = G.localization.descriptions.Edition[Entropy.FindPreviousInPool(G.jokers.highlighted[1].edition.key, "Edition", "e_negative")].name + if G.jokers and #G.jokers.highlighted > 0 and G.jokers.highlighted[1].edition and Entropy.find_previous_in_pool(G.jokers.highlighted[1].edition.key, "Edition", "e_negative") then + str = G.localization.descriptions.Edition[Entropy.find_previous_in_pool(G.jokers.highlighted[1].edition.key, "Edition", "e_negative")].name end return { vars = { @@ -186,7 +188,7 @@ local siphon = { } end, entr_credits = { - idea = {"crabus"} + idea = {"user324897"} }, --TODO figure this shit out when force used } @@ -254,9 +256,9 @@ local disavow = { pos = {x=12,y=4}, --soul_pos = { x = 5, y = 0}, use = function(self, card, area, copier) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, 1) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, 1) local enh = cards[1] and cards[1].config.center_key or "m_base" - Entropy.FlipThen(G.hand.cards, function(card, area, ind) + Entropy.flip_then(G.hand.cards, function(card, area, ind) if card == cards[1] then card:set_ability(G.P_CENTERS["m_entr_disavowed"]) else @@ -265,7 +267,7 @@ local disavow = { end) end, can_use = function(self, card) - local cards = #Entropy.GetHighlightedCards({G.hand}, card, 1, 1) + local cards = #Entropy.get_highlighted_cards({G.hand}, card, 1, 1) return cards > 0 and cards <= 1 end, loc_vars = function(self, q, card) @@ -303,11 +305,11 @@ local pact = { --soul_pos = { x = 5, y = 0}, use = function(self, card, area, copier) local linktxt - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.selected) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.selected) for i, v in pairs(cards) do if v.ability.link then linktxt = v.ability.link end end - linktxt = linktxt or Entropy.StringRandom(8) + linktxt = linktxt or Entropy.string_random(8) for i, v in pairs(cards) do for i, v2 in pairs(G.hand.cards) do if v2 ~= v and v.ability.link and v.ability.link == v2.ability.link then @@ -325,7 +327,7 @@ local pact = { end, can_use = function(self, card) - local num = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.selected) + local num = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.selected) return #num <= card.ability.selected and #num > 0 end, loc_vars = function(self, q, card) @@ -369,7 +371,7 @@ local link = { end, apply = function(self,card,val) if not G.GAME.link then - G.GAME.link = Entropy.StringRandom(8) + G.GAME.link = Entropy.string_random(8) end card.ability.link = G.GAME.link end, @@ -411,11 +413,7 @@ local ichor = { end end, can_use = function(self, card) - if not G.jokers then return false end - for i, v in pairs(G.jokers.cards) do - if v.edition and v.edition.key == "e_negative" then return true end - end - return false + return G.jokers end, loc_vars = function(self, q, card) q[#q+1] = G.P_CENTERS.e_negative @@ -427,7 +425,6 @@ local ichor = { end, entr_credits = { idea = {"cassknows"}, - art = {"LFMoth"} }, demicoloncompat = true, force_use = function(self, card) @@ -466,11 +463,11 @@ local rejuvenate = { local ed = SMODS.poll_edition({guaranteed = true, key = "entr_rejuvenate_ed", no_negative = true}) local enh = G.P_CENTERS[SMODS.poll_enhancement({guaranteed = true})] local seal = SMODS.poll_seal{guaranteed = true, key = "rejuvenate"} - local card = Entropy.GetHighlightedCards({G.hand}, card2, 1, 1)[1] or pseudorandom_element(G.hand.cards, pseudoseed("rejuvenate"), 1, 1) + local card = Entropy.get_highlighted_cards({G.hand}, card2, 1, 1)[1] or pseudorandom_element(G.hand.cards, pseudoseed("rejuvenate"), 1, 1) card:set_edition(ed) card:set_ability(enh) card:set_seal(seal) - Entropy.FlipThen(actual, function(card3, area) + Entropy.flip_then(actual, function(card3, area) copy_card(card,card3) card3:set_edition(ed) card3:set_ability(enh) @@ -480,19 +477,19 @@ local rejuvenate = { ease_dollars(card2.ability.dollars) end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.hand}, card, 1, 1) + local num = #Entropy.get_highlighted_cards({G.hand}, card, 1, 1) return num <= 1 and num > 0 end, loc_vars = function(self, q, card) return { vars = { card.ability.num, - Entropy.FormatDollarValue(card.ability.dollars) + Entropy.format_dollar_value(card.ability.dollars) } } end, entr_credits = { - idea = {"crabus"}, + idea = {"user324897"}, art = {"Lil. Mr. Slipstream"} }, demicoloncompat = true, @@ -519,9 +516,9 @@ local crypt = { pos = {x=9,y=5}, --soul_pos = { x = 5, y = 0}, use = function(self, card2, area, copier) - local jokers = Entropy.GetHighlightedCards({G.jokers}, card2, 1, card2.ability.select) + local jokers = Entropy.get_highlighted_cards({G.jokers}, card2, 1, card2.ability.select) local selected = pseudorandom_element(jokers, pseudoseed("entr_crypt")) - Entropy.FlipThen(jokers, function(v, area) + Entropy.flip_then(jokers, function(v, area) if v ~= selected and v and selected then copy_card(selected, v) if v.edition and v.edition.key == "e_negative" then @@ -532,7 +529,7 @@ local crypt = { end, can_use = function(self, card) - local cards = Entropy.GetHighlightedCards({G.jokers}, card, 1, card.ability.select) + local cards = Entropy.get_highlighted_cards({G.jokers}, card, 1, card.ability.select) return #cards > 1 and #cards <= card.ability.select end, loc_vars = function(self, q, card) @@ -590,7 +587,7 @@ local charm = { } end end - for i, v in pairs(Entropy.GetHighlightedCards({G.jokers}, card2, 1, card2.ability.select)) do + for i, v in pairs(Entropy.get_highlighted_cards({G.jokers}, card2, 1, card2.ability.select)) do local edition = SMODS.poll_edition({ key = "entr_charm", options = editions, @@ -602,11 +599,10 @@ local charm = { end end, can_use = function(self, card) - local cards = Entropy.GetHighlightedCards({G.jokers}, card, 1, card.ability.select) + local cards = Entropy.get_highlighted_cards({G.jokers}, card, 1, card.ability.select) return #cards <= card.ability.select and #cards > 0 end, loc_vars = function(self, q, card) - q[#q+1] = G.P_CENTERS.e_entr_gilded q[#q+1] = {key="eternal",set="Other"} return { vars = { @@ -615,7 +611,7 @@ local charm = { } end, entr_credits = { - idea = {"crabus"} + idea = {"user324897"} }, demicoloncompat = true, force_use = function(self, card) @@ -643,7 +639,7 @@ local entropy = { pos = {x=7,y=6}, --soul_pos = { x = 5, y = 0}, use = function(self, card2, area, copier) - Entropy.FlipThen(Entropy.GetHighlightedCards({G.hand}, card2, 1, card2.ability.select), function(card,area) + Entropy.flip_then(Entropy.get_highlighted_cards({G.hand}, card2, 1, card2.ability.select), function(card,area) local edition = SMODS.poll_edition({guaranteed = true, key = "entr_entropy"}) local enhancement_type = pseudorandom_element({"Enhanced","Enhanced","Enhanced","Joker","Consumeables","Voucher","Booster"}, pseudoseed("entropy")) local enhancement = pseudorandom_element(G.P_CENTER_POOLS[enhancement_type], pseudoseed("entropy")).key @@ -663,7 +659,7 @@ local entropy = { end) end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local num = #Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) return num <= card.ability.select and num > 0 end, loc_vars = function(self, q, card) @@ -682,6 +678,12 @@ local entropy = { end } +SMODS.Shader({ + key="rainbow", + path="rainbow.fs" +}) + + local fervour = { dependencies = { items = { @@ -697,26 +699,215 @@ local fervour = { atlas = "consumables", name = "entr-Fervour", - soul_rate = 0, --probably only obtainable from flipsiding a gateway + soul_rate = 0, hidden = true, pos = {x=4,y=0}, - soul_set = "Omen", + soul_set = "Fraud", tsoul_pos = {x=5,y=0}, --soul_pos = { x = 5, y = 0}, use = function(self, card, area, copier) - 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_reverse_legendary", nil, nil, nil, "entr_fervour") - card:add_to_deck() - G.jokers:emplace(card) - card:juice_up(0.3, 0.5) - return true - end, - })) - delay(0.6) + if G.GAME.entropy and G.GAME.entropy > 100 then + G.entr_flashlight_distance = Entropy.max_diagonal() + G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.5, func = function() + --play_sound('tarot1') + --if card and card.juice_up then card:juice_up(0.8, 0.5) end + --G.TAROT_INTERRUPT_PULSE = true + G.entr_flashlight_enabled = true + local card_position = Entropy.get_card_pixel_pos(card) + G.entr_flashlight_center = card_position + G.E_MANAGER:add_event(Event({ + trigger = 'ease', + ease = 'inexpo', + ref_table = G, + ref_value = 'entr_flashlight_distance', + ease_to = 100, + delay = 0.5, + timer = "REAL", + func = (function(t) return t end), + blockable = false, + })) + return true end + })) + delay(1.75) + G.E_MANAGER:add_event(Event({trigger = 'after', delay = .6, func = function() + play_sound('tarot1') + if card and card.juice_up then card:juice_up(0.8, 0.5) end + G.TAROT_INTERRUPT_PULSE = true + G.E_MANAGER:add_event(Event({ + trigger = 'ease', + ease = 'inexpo', + ref_table = G, + ref_value = 'entr_flashlight_distance', + ease_to = G.entr_flashlight_distance * 3, + delay = 0.5, + timer = "REAL", + func = (function(t) return t end), + blockable = false, + })) + return true end + })) + G.E_MANAGER:add_event(Event({trigger = 'after', delay = 1.2, func = function() + G.E_MANAGER:add_event(Event({ + trigger = 'ease', + ease = 'inexpo', + ref_table = G, + ref_value = 'entr_flashlight_distance', + ease_to = G.entr_flashlight_distance / 1.35, + delay = 0.75, + timer = "REAL", + func = (function(t) return t end), + blockable = false, + })) + return true end + })) + delay(1.75) + G.E_MANAGER:add_event(Event({trigger = 'after', delay = .6, func = function() + play_sound('tarot1') + if card and card.juice_up then card:juice_up(0.8, 0.5) end + G.TAROT_INTERRUPT_PULSE = true + G.E_MANAGER:add_event(Event({ + trigger = 'ease', + ease = 'inexpo', + ref_table = G, + ref_value = 'entr_flashlight_distance', + ease_to = G.entr_flashlight_distance * 3, + delay = 0.5, + timer = "REAL", + func = (function(t) return t end), + blockable = false, + })) + return true end + })) + G.E_MANAGER:add_event(Event({trigger = 'after', delay = 1.2, func = function() + G.E_MANAGER:add_event(Event({ + trigger = 'ease', + ease = 'inexpo', + ref_table = G, + ref_value = 'entr_flashlight_distance', + ease_to = G.entr_flashlight_distance / 1.35, + delay = 0.75, + timer = "REAL", + func = (function(t) return t end), + blockable = false, + })) + return true end + })) + delay(1.75) + G.E_MANAGER:add_event(Event({trigger = 'after', delay = .6, func = function() + play_sound('tarot1') + if card and card.juice_up then card:juice_up(0.8, 0.5) end + G.TAROT_INTERRUPT_PULSE = true + G.E_MANAGER:add_event(Event({ + trigger = 'ease', + ease = 'inexpo', + ref_table = G, + ref_value = 'entr_flashlight_distance', + ease_to = G.entr_flashlight_distance * 3, + delay = 0.5, + timer = "REAL", + func = (function(t) return t end), + blockable = false, + })) + return true end + })) + G.E_MANAGER:add_event(Event({trigger = 'after', delay = 1.2, func = function() + G.E_MANAGER:add_event(Event({ + trigger = 'ease', + ease = 'inexpo', + ref_table = G, + ref_value = 'entr_flashlight_distance', + ease_to = G.entr_flashlight_distance / 1.35, + delay = 0.75, + timer = "REAL", + func = (function(t) return t end), + blockable = false, + })) + return true end + })) + delay(1.75) + G.E_MANAGER:add_event(Event({ + trigger = "after", + delay = 1.6, + func = function() + local card + play_sound("entr_entropic_summon", nil, 2) + G.GAME.entr_parakmi_bypass = true + card = create_card("Joker", G.jokers, nil, "entr_entropic", nil, nil, nil, "entr_fervour") + G.GAME.entr_parakmi_bypass = nil + ease_entropy(-G.GAME.entropy) + card:add_to_deck() + G.jokers:emplace(card) + card:juice_up(0.3, 0.5) + G.entr_invert_enabled = true + local card_position = Entropy.get_card_pixel_pos(card) + G.entr_invert_center = card_position + G.entr_invert_distance = 0 + G.E_MANAGER:add_event(Event({ + trigger = 'ease', + ease = 'outexpo', + ref_table = G, + ref_value = 'entr_flashlight_distance', + ease_to = 100000, + delay = 2, + timer = "REAL", + func = (function(t) return t end), + blockable = false, + }), "other") + G.E_MANAGER:add_event(Event({ + trigger = 'ease', + ease = 'insine', + ref_table = G, + ref_value = 'entr_invert_distance', + ease_to = Entropy.max_diagonal(), + delay = 8, + timer = "REAL", + func = (function(t) return t end), + blockable = false, + }), "other") + return true + end, + })) + G.E_MANAGER:add_event(Event({ + trigger = "after", + delay = 1.6, + func = function() + G.E_MANAGER:add_event(Event({ + trigger = "after", + delay = 4, + func = function() + G.entr_flashlight_enabled = false + return true + end + }), "other") + G.E_MANAGER:add_event(Event({ + trigger = "after", + delay = 4, + func = function() + G.entr_invert_enabled = false + return true + end + }), "other") + return true + end + })) + delay(1.75) + else + G.E_MANAGER:add_event(Event({ + trigger = "after", + delay = 0.4, + func = function() + play_sound("timpani") + G.GAME.entr_parakmi_bypass = true + local card = create_card("Joker", G.jokers, nil, "entr_reverse_legendary", nil, nil, nil, "entr_fervour") + G.GAME.entr_parakmi_bypass = nil + card:add_to_deck() + G.jokers:emplace(card) + card:juice_up(0.3, 0.5) + return true + end, + })) + delay(0.6) + end end, can_use = function(self, card) return G.jokers and #G.jokers.cards < G.jokers.config.card_limit @@ -778,8 +969,8 @@ local quasar = { 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) + ease_colour(G.C.UI_CHIPS, copy_table(Entropy.get_asc_colour(to_big(1) * to_big(amt) * to_big(0.5))), 0.1) + ease_colour(G.C.UI_MULT, copy_table(Entropy.get_asc_colour(to_big(1) * to_big(amt) * to_big(0.5))), 0.1) Cryptid.pulse_flame(0.01, sunlevel) used_consumable:juice_up(0.8, 0.5) G.E_MANAGER:add_event(Event({ @@ -862,9 +1053,9 @@ if Engulf then end end } - Engulf.SpecialWhitelist["c_entr_pulsar"] = true - Engulf.SpecialWhitelist["c_entr_quasar"] = true - Engulf.SpecialWhitelist["Omen"] = true + --Engulf.SpecialWhitelist["c_entr_pulsar"] = true + --Engulf.SpecialWhitelist["c_entr_quasar"] = true + --Engulf.SpecialWhitelist["Omen"] = true end local regenerate = { @@ -887,8 +1078,8 @@ local regenerate = { pos = {x=8,y=8}, --soul_pos = { x = 5, y = 0}, use = function(self, card, area, copier) - local cards = Entropy.GetHighlightedCards({G.hand, G.jokers, G.consumeable}, card, 1, card.ability.limit) - Entropy.FlipThen(cards, function(card) + local cards = Entropy.get_highlighted_cards({G.hand, G.jokers, G.consumeable}, card, 1, card.ability.limit) + Entropy.flip_then(cards, function(card) card.ability.bypass_aleph = true if card.config.center.set == "Enhanced" then if card.config.center.key == "m_entr_disavowed" then @@ -906,11 +1097,12 @@ local regenerate = { if card.base.suit == "entr_nilsuit" or card.base.value == "entr_nilrank" then Entropy.randomize_rank_suit(card, true, true, "regenerate") end - + card:set_debuff() + card.ability.bypass_aleph = nil end) end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.hand, G.jokers, G.consumeable}, card, 1, card.ability.limit) + local num = #Entropy.get_highlighted_cards({G.hand, G.jokers, G.consumeable}, card, 1, card.ability.limit) return num > 0 and num <= card.ability.limit end, loc_vars = function(self, q, card) @@ -977,14 +1169,14 @@ local purity = { pos = {x=9,y=8}, --soul_pos = { x = 5, y = 0}, use = function(self, card, area, copier) - for i, v in pairs(Entropy.GetHighlightedCards({G.jokers}, card, 1, card.ability.limit)) do - Entropy.ApplySticker(v, "entr_pure") + for i, v in pairs(Entropy.get_highlighted_cards({G.jokers}, card, 1, card.ability.limit)) do + Entropy.apply_sticker(v, "entr_pure") v:juice_up() end end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.jokers}, card, 1, card.ability.limit) + local num = #Entropy.get_highlighted_cards({G.jokers}, card, 1, card.ability.limit) return num > 0 and num <= card.ability.limit end, loc_vars = function(self, q, card) @@ -1041,16 +1233,16 @@ local transcend = { pos = {x=11,y=7}, --soul_pos = { x = 5, y = 0}, use = function(self, card, area, copier) - Entropy.FlipThen(Entropy.GetHighlightedCards({G.consumeables, G.hand, G.pack_cards, G.shop_jokers, G.shop_vouchers, G.shop_booster, G.jokers}, card, 1, card.ability.limit), function(card) + Entropy.flip_then(Entropy.get_highlighted_cards({G.consumeables, G.hand, G.pack_cards, G.shop_jokers, G.shop_vouchers, G.shop_booster, G.jokers}, card, 1, card.ability.limit), function(card) if card.config.center.key == "j_entr_parakmi" then check_for_unlock({ type = "parakmi_transcend" }) end - card:set_ability(Entropy.GetPooledCenter(Entropy.GetRandomSet(true))) + card:set_ability(Entropy.get_pooled_center(Entropy.get_random_set(true))) end) end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.consumeables, G.hand, G.pack_cards, G.shop_jokers, G.shop_vouchers, G.shop_booster, G.jokers}, card, 1, card.ability.limot) + local num = #Entropy.get_highlighted_cards({G.consumeables, G.hand, G.pack_cards, G.shop_jokers, G.shop_vouchers, G.shop_booster, G.jokers}, card, 1, card.ability.limot) return num > 0 and num <= card.ability.limit end, loc_vars = function(self, q, card) @@ -1092,7 +1284,7 @@ local weld = { no_select = true, --soul_pos = { x = 5, y = 0}, use = function(self, card, area, copier) - for i, card in pairs(Entropy.GetHighlightedCards({G.jokers}, card, 1, card.ability.select)) do + for i, card in pairs(Entropy.get_highlighted_cards({G.jokers}, card, 1, card.ability.select)) do card.ability.entr_aleph = true card:set_edition("e_negative") card:juice_up() @@ -1100,7 +1292,7 @@ local weld = { end end, can_use = function(self, card) - local cards = Entropy.GetHighlightedCards({G.jokers}, card, 1, card.ability.select) + local cards = Entropy.get_highlighted_cards({G.jokers}, card, 1, card.ability.select) return #cards > 0 and #cards <= card.ability.select end, loc_vars = function(self, q, card) @@ -1121,7 +1313,7 @@ local weld = { end } -local malediction = Entropy.SealSpectral("malediction", {x=2,y=0}, "entr_amber", 2000+37, "c_entr_enchant", nil, "consumables2") +local malediction = Entropy.seal_spectral("malediction", {x=2,y=0}, "entr_amber", 2000+37, "c_entr_enchant", nil, "consumables2") local idyll = { dependencies = { diff --git a/items/inversions/reverse_tarots.lua b/items/inversions/reverse_tarots.lua index a9be9d8f..76531310 100644 --- a/items/inversions/reverse_tarots.lua +++ b/items/inversions/reverse_tarots.lua @@ -151,7 +151,7 @@ local oracle = { for i = 1, card.ability.change do actual[i] = cards[i] end - Entropy.FlipThen(actual, function(card) + Entropy.flip_then(actual, function(card) card:set_ability(Entropy.pseudorandom_element(G.P_CENTER_POOLS.Star, pseudoseed("oracle_ccd"),function(e) return G.GAME.banned_keys[e.key] or e.no_doe end)) @@ -201,8 +201,8 @@ local princess = { use = function(self, card, area, copier) G.GAME.entr_princess = true for i, v in ipairs(G.I.CARD) do - if v.config and v.config.center and v.config.center.set == "Planet" and Entropy.Inversion(v.config.center) then - v:set_ability(G.P_CENTERS[Entropy.Inversion(v.config.center)]) + if v.config and v.config.center and v.config.center.set == "Planet" then + Entropy.invert(v) end end end, @@ -217,7 +217,7 @@ local princess = { end, entr_credits = { - idea = {"crabus"}, + idea = {"user324897"}, art = {"Lyman"} } } @@ -240,31 +240,35 @@ local servant = { inversion = "c_emperor", pos = {x=4, y = 0}, use = function(self, card, area, copier) - local cards = Entropy.GetHighlightedCards({G.hand, G.consumeables}, card, 1, card.ability.select) + local cards = Entropy.get_highlighted_cards({{cards = G.I.CARD}}, card, 1, card.ability.select) for i, v in pairs(cards) do - if Entropy.Inversion(v.config.center) then - local set = G.P_CENTERS[Entropy.Inversion(v.config.center)].set + if v.config and v.config.center and Entropy.inversion(v.config.center) and v.ability and v.ability.consumeable then + local set = G.P_CENTERS[Entropy.inversion(v.config.center)].set for i = 1, card.ability.create do - G.E_MANAGER:add_event(Event({ - func = function() - if G.consumeables.config.card_count < G.consumeables.config.card_limit then + if #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then + G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1 + G.E_MANAGER:add_event(Event({ + func = function() local c = create_card(set, G.consumeables, nil, nil, nil, nil, nil) G.GAME.last_inversion = nil c:add_to_deck() G.consumeables:emplace(c) + G.GAME.consumeable_buffer = 0 + return true end - return true - end - })) + })) + end end end end end, can_use = function(self, card) - local cards = Entropy.GetHighlightedCards({G.hand, G.consumeables}, card, 1, card.ability.select) + local cards = Entropy.get_highlighted_cards({{cards = G.I.CARD}}, card, 1, card.ability.select) local num = #cards - return num > 0 and num <= card.ability.select and Entropy.TableAny(cards, function(value) return Entropy.Inversion(value.config.center) end) + local offset = 0 + if card.area == G.consumeables.cards then offset = -1 end + return num > 0 and num <= card.ability.select and Entropy.in_table(cards, function(value) return Entropy.inversion(value.config.center) end) and #G.consumeables.cards + offset < G.consumeables.config.card_limit end, loc_vars = function(self, q, card) return { @@ -301,8 +305,8 @@ local heretic = { inversion = "c_heirophant", pos = {x=5, y = 0}, use = function(self, card, area, copier) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) - Entropy.FlipThen(cards, function(card) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) + Entropy.flip_then(cards, function(card) local modification = pseudorandom_element({"Seal", "Enhancement", "Edition", "Suit", "Rank"}, pseudoseed("heretic_modification")) if modification == "Seal" then local seal = pseudorandom_element(SMODS.Seal.obj_table, pseudoseed("heretic_seal")).key @@ -323,7 +327,7 @@ local heretic = { end) end, can_use = function(self, card) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) local num = #cards return num > 0 and num <= card.ability.select end, @@ -364,28 +368,25 @@ local feud = { inversion = "c_lovers", pos = {x=6, y = 0}, use = function(self, card, area, copier) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) local chips = 0 - local bonus_chips = 0 for i = 2, to_number(card.ability.select) do local new_card = cards[i] if new_card then - chips = chips + new_card.base.nominal - bonus_chips = bonus_chips + (new_card.ability and new_card.ability.bonus or 0) + chips = chips + new_card:get_chip_bonus() SMODS.destroy_cards(new_card) end end local mult = card.ability.chip_mult - Entropy.FlipThen(cards, function(card) - card.base.nominal = card.base.nominal + chips * mult - if to_big(bonus_chips) > to_big(0) then - card.ability.bonus = card.ability.bonus + bonus_chips * mult + Entropy.flip_then(cards, function(card) + if to_big(chips) > to_big(0) then + card.ability.bonus = card.ability.bonus + chips * mult end end) end, can_use = function(self, card) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) local num = #cards return num >= 2 and num <= card.ability.select end, @@ -422,15 +423,15 @@ local scar = { inversion = "c_chariot", pos = {x=7, y = 0}, use = function(self, card, area, copier) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) for i, v in pairs(cards) do - Entropy.ApplySticker(v, "scarred") + Entropy.apply_sticker(v, "scarred") v:juice_up() end end, can_use = function(self, card) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) local num = #cards return num > 0 and num <= card.ability.select end, @@ -495,7 +496,7 @@ local dagger = { inversion = "c_justice", pos = {x=8, y = 0}, use = function(self, card2, area, copier) - local cards = Entropy.GetHighlightedCards({G.hand}, card2, 1, card2.ability.select) + local cards = Entropy.get_highlighted_cards({G.hand}, card2, 1, card2.ability.select) local total = 0 local _hand, _tally = nil, -1 for k, v in ipairs(G.handlist) do @@ -505,7 +506,7 @@ local dagger = { end end for i, card in ipairs(cards) do - total = total + card.base.nominal + (card.ability.bonus or 0) + total = total + card:get_chip_bonus() end SMODS.destroy_cards(cards) update_hand_text({ sound = "button", volume = 0.7, pitch = 0.9, delay = 0 }, { level = G.GAME.hands[_hand].level, mult = Entropy.ascend_hand(G.GAME.hands[_hand].mult, _hand), chips = Entropy.ascend_hand(G.GAME.hands[_hand].chips, _hand), handname = localize(_hand, "poker_hands") }) @@ -519,7 +520,7 @@ local dagger = { G.GAME.hands[_hand].chips = G.GAME.hands[_hand].chips + total end, can_use = function(self, card) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) local num = #cards return num > 0 and num <= card.ability.select end, @@ -608,13 +609,13 @@ local whetstone = { pos = {x=0,y=1}, use = function(self, card2) if SMODS.pseudorandom_probability(card2, 'whetstone', 1, card2.ability.extra.odds) or G.cry_force_use then - local cards = Entropy.GetHighlightedCards({G.hand}, card2, 1, card2.ability.select) - Entropy.FlipThen(cards, function(card) - local enh = Entropy.UpgradeEnhancement(card, false, {m_entr_disavowed = true}) + local cards = Entropy.get_highlighted_cards({G.hand}, card2, 1, card2.ability.select) + Entropy.flip_then(cards, function(card) + local enh = Entropy.upgrade_enhancement(card, false, {m_entr_disavowed = true}) if G.P_CENTERS[enh] then card:set_ability(G.P_CENTERS[enh]) for i = 1, math.floor(pseudorandom("whetstone")*3+0.5) do - enh = Entropy.UpgradeEnhancement(card, false, {m_entr_disavowed = true}) + enh = Entropy.upgrade_enhancement(card, false, {m_entr_disavowed = true}) card:set_ability(G.P_CENTERS[enh]) end if enh ~= card.config.center.key then @@ -644,7 +645,7 @@ local whetstone = { end end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local num = #Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) return num > 0 and num <= card.ability.select end, loc_vars = function(self, q, card) @@ -686,7 +687,7 @@ local endurance = { pos = {x=1,y=1}, inversion = "c_strength", use = function(self, card2) - local cards = Entropy.GetHighlightedCards({G.hand, G.jokers, G.consumeables}, card2, 1, card2.ability.select) + local cards = Entropy.get_highlighted_cards({G.hand, G.jokers, G.consumeables}, card2, 1, card2.ability.select) G.GAME.endurance_rounds = (G.GAME.endurance_rounds or 3) for i, card in pairs(cards) do card.ability.debuff_timer = (card.ability.debuff_timer or 0) + G.GAME.endurance_rounds @@ -700,7 +701,7 @@ local endurance = { G.GAME.endurance_rounds = G.GAME.endurance_rounds + 1 end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.hand, G.jokers, G.consumeables}, card, 1, card.ability.select) + local num = #Entropy.get_highlighted_cards({G.hand, G.jokers, G.consumeables}, card, 1, card.ability.select) return num > 0 and num <= card.ability.select end, loc_vars = function(self, q, card) @@ -792,14 +793,14 @@ local statue = { inversion = "c_death", pos = {x=3,y=1}, use = function(self, card2) - local cards = Entropy.GetHighlightedCards({G.hand}, card2, 1, card2.ability.select) + local cards = Entropy.get_highlighted_cards({G.hand}, card2, 1, card2.ability.select) G.E_MANAGER:add_event(Event({ func = function() for i = 1, card2.ability.convert_per do local card3 = pseudorandom_element(G.deck.cards, pseudoseed("statue")) copy_card(#cards == 1 and cards[1] or pseudorandom_element(cards, pseudoseed("statue")), card3) end - Entropy.FlipThen(cards, function(card) + Entropy.flip_then(cards, function(card) card:set_ability(G.P_CENTERS.m_stone) card:set_edition() card.seal = nil @@ -810,7 +811,7 @@ local statue = { })) end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local num = #Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) return num > 0 and num <= card.ability.select and #G.hand.cards > 0 end, loc_vars = function(self, q, card) @@ -849,7 +850,7 @@ local feast = { pos = {x=4,y=1}, inversion = "c_temperance", use = function(self, card2) - local cards = Entropy.GetHighlightedCards({G.shop_jokers, G.shop_booster, G.shop_vouchers}, card2, 1, card2.ability.select) + local cards = Entropy.get_highlighted_cards({G.shop_jokers, G.shop_booster, G.shop_vouchers}, card2, 1, card2.ability.select) for i, v in pairs(cards) do local card = cards[i] G.E_MANAGER:add_event(Event({ @@ -863,7 +864,7 @@ local feast = { end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.shop_jokers, G.shop_booster, G.shop_vouchers}, card, 1, card.ability.select) + local num = #Entropy.get_highlighted_cards({G.shop_jokers, G.shop_booster, G.shop_vouchers}, card, 1, card.ability.select) return num > 0 and num <= card.ability.select end, loc_vars = function(self, q, card) @@ -944,12 +945,12 @@ local village = { pos = {x=6,y=1}, inversion = "c_tower", use = function(self, card2) - Entropy.FlipThen(G.hand.cards, function(card) + Entropy.flip_then(G.hand.cards, function(card) card.ability.bonus = (card.ability.bonus or 0) + card2.ability.chips end) end, bulk_use = function(self, card2, _, _, amount) - Entropy.FlipThen(G.hand.cards, function(card) + Entropy.flip_then(G.hand.cards, function(card) card.ability.bonus = (card.ability.bonus or 0) + card2.ability.chips * amount end) end, @@ -989,10 +990,10 @@ local ocean = { pos = {x=7,y=1}, inversion = "c_star", use = function(self, card2) - Entropy.LevelSuit("Diamonds", card2, 1, card2.ability.per_level) + Entropy.level_suit("Diamonds", card2, 1, card2.ability.per_level) end, bulk_use = function(self, card2, _, _, amount) - Entropy.LevelSuit("Diamonds", card2, amount, card2.ability.per_level) + Entropy.level_suit("Diamonds", card2, amount, card2.ability.per_level) end, can_use = function(self, card) return true @@ -1038,10 +1039,10 @@ local forest = { pos = {x=8,y=1}, inversion = "c_moon", use = function(self, card2) - Entropy.LevelSuit("Clubs", card2, 1, card2.ability.per_level) + Entropy.level_suit("Clubs", card2, 1, card2.ability.per_level) end, bulk_use = function(self, card2, _, _, amount) - Entropy.LevelSuit("Clubs", card2, amount, card2.ability.per_level) + Entropy.level_suit("Clubs", card2, amount, card2.ability.per_level) end, can_use = function(self, card) return true @@ -1087,10 +1088,10 @@ local mountain = { pos = {x=9,y=1}, inversion = "c_sun", use = function(self, card2) - Entropy.LevelSuit("Hearts", card2, 1, card2.ability.per_level) + Entropy.level_suit("Hearts", card2, 1, card2.ability.per_level) end, bulk_use = function(self, card2, _, _, amount) - Entropy.LevelSuit("Hearts", card2, amount, card2.ability.per_level) + Entropy.level_suit("Hearts", card2, amount, card2.ability.per_level) end, can_use = function(self, card) return true @@ -1177,10 +1178,10 @@ local tent = { pos = {x=1,y=2}, inversion = "c_world", use = function(self, card2) - Entropy.LevelSuit("Spades", card2, 1, card2.ability.per_level) + Entropy.level_suit("Spades", card2, 1, card2.ability.per_level) end, bulk_use = function(self, card2, _, _, amount) - Entropy.LevelSuit("Spades", card2, amount, card2.ability.per_level) + Entropy.level_suit("Spades", card2, amount, card2.ability.per_level) end, can_use = function(self, card) return true @@ -1230,7 +1231,7 @@ local frail = { } end, use = function(self, card2) - local cards = Entropy.GetHighlightedCards({G.hand}, card2, 1, card2.ability.select) + local cards = Entropy.get_highlighted_cards({G.hand}, card2, 1, card2.ability.select) local modifications = {} for i, v in pairs(cards) do if v.config.center.set == "Enhanced" then @@ -1260,7 +1261,7 @@ local frail = { end end, can_use = function(self, card) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) return #cards > 0 and #cards <= card.ability.select end, demicoloncompat = true, @@ -1293,7 +1294,8 @@ local inferno = { } end, use = function(self, card) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) + SMODS.calculate_context({remove_playing_cards = true, removed=cards}) for i, v in pairs(cards) do v:start_dissolve() end @@ -1302,7 +1304,7 @@ local inferno = { end end, can_use = function(self, card) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) return #cards > 0 end, demicoloncompat = true, diff --git a/items/jokers/dice_jokers.lua b/items/jokers/dice_jokers.lua index 7c7437d9..83207d81 100644 --- a/items/jokers/dice_jokers.lua +++ b/items/jokers/dice_jokers.lua @@ -50,7 +50,7 @@ local D1 = { end if context.pseudorandom_result and not card.ability.triggered then return { - message = localize("k_inactive") + message = localize("k_inactive_ex") } end end, @@ -286,115 +286,6 @@ local D7 = { end, } -local D8 = { - order = 205, - object_type = "Joker", - key = "d8", - rarity = 2, - cost = 5, - dependencies = { - items = { - "set_entr_dice_jokers", - } - }, - eternal_compat = true, - pos = { x = 6, y = 5 }, - atlas = "jokers", - config = { - denominator = 1 - }, - pools = {["Dice"] = true}, - loc_vars = function(self, q, card) - return {vars = { - number_format(card.ability.denominator) - }} - end, - calculate = function(self, card, context) - if context.mod_probability and not context.blueprint and not context.repetition then - return { - denominator = context.denominator - card.ability.denominator - } - end - end, -} - -local D10 = { - order = 206, - object_type = "Joker", - key = "d10", - rarity = 2, - cost = 5, - dependencies = { - items = { - "set_entr_dice_jokers", - } - }, - eternal_compat = true, - pos = { x = 7, y = 5 }, - atlas = "jokers", - config = { - min_d = -3, - max_d = 3, - min_n = -5, - max_n = 5 - }, - pools = {["Dice"] = true}, - calculate = function(self, card, context) - if context.mod_probability and not context.blueprint then - local n_mod = pseudorandom("d10_n", card.ability.min_n*100, card.ability.max_n*100)/100 - local d_mod = pseudorandom("d10_d", card.ability.min_d*100, card.ability.max_d*100)/100 - local num = context.numerator + n_mod - if num < 1 then - num = 1 - end - local den = context.denominator + d_mod - if den < 2 then - den = 2 - end - return { - numerator = num, - denominator = den - } - end - end, -} - -local D12 = { - order = 207, - object_type = "Joker", - key = "d12", - rarity = 2, - cost = 5, - dependencies = { - items = { - "set_entr_dice_jokers", - } - }, - eternal_compat = true, - pos = { x = 8, y = 5 }, - atlas = "jokers", - config = { - num_per = 1 - }, - loc_vars = function(self, queue, card) - return { - vars = { - number_format(card.ability.num_per) - } - } - end, - pools = {["Dice"] = true}, - calculate = function(self, card, context) - if context.mod_probability and not context.blueprint and not context.repetition then - local count = Overflow and G.consumeables:get_total_count() or #G.consumeables.cards - local num = context.numerator + count * card.ability.num_per - return { - numerator = num, - } - end - end, -} - local D100 = { order = 208, object_type = "Joker", @@ -500,17 +391,15 @@ local dice_shard = { pools = {["Dice"] = true}, loc_vars = function(self, q, card) local name = "None" - local cards = Entropy.GetHighlightedCards({G.jokers, G.shop_jokers, G.shop_booster, G.shop_vouchers}, card, 1, card.ability.extra) + local cards = Entropy.get_highlighted_cards({G.jokers, G.shop_jokers, G.shop_booster, G.shop_vouchers}, card, 1, card.ability.extra) if cards and #cards > 0 then if cards[1].config.center.set == "Joker" or G.GAME.modifiers.cry_beta and cards[1].consumable then local first = cards[1] - local ind = ReductionIndex(cards[1], cards[1].config.center.set )-1 - while G.P_CENTER_POOLS[cards[1].config.center.set ][ind].no_doe or G.P_CENTER_POOLS[cards[1].config.center.set][ind].no_collection do - ind = ind - 1 + local ind = Entropy.reduction_index(cards[1], cards[1].config.center.set ) + if G.P_CENTER_POOLS[cards[1].config.center.set][ind] then + name = localize { type = 'name_text', key = G.P_CENTER_POOLS[cards[1].config.center.set][ind].key, set = G.P_CENTER_POOLS[cards[1].config.center.set][ind].set } + q[#q+1] = G.P_CENTER_POOLS[cards[1].config.center.set][ind] end - if ind < 1 then ind = 1 end - name = localize { type = 'name_text', key = G.P_CENTER_POOLS[cards[1].config.center.set][ind].key, set = G.P_CENTER_POOLS[cards[1].config.center.set][ind].set } - q[#q+1] = G.P_CENTER_POOLS[cards[1].config.center.set][ind] end end return { @@ -528,22 +417,12 @@ local dice_shard = { end end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.jokers}, card, 1, 1) + local num = #Entropy.get_highlighted_cards({G.jokers}, card, 1, 1) return num > 0 and num <= 1 and to_big(card.ability.left) > to_big(0) end, use = function(self, card) card.ability.left = card.ability.left - 1 - Entropy.FlipThen(Entropy.GetHighlightedCards({G.jokers}, card, 1, 1), function(card) - local ind = ReductionIndex(card, card.config.center.set)-1 - while G.P_CENTER_POOLS[card.config.center.set][ind] and G.P_CENTER_POOLS[card.config.center.set][ind].no_doe or G.P_CENTER_POOLS[card.config.center.set].no_collection do - ind = ind - 1 - end - if ind < 1 then ind = 1 end - if G.P_CENTER_POOLS.Joker[ind] then - card:set_ability(G.P_CENTERS[G.P_CENTER_POOLS.Joker[ind].key]) - end - G.jokers:remove_from_highlighted(card) - end) + Entropy.reduce_cards(Entropy.get_highlighted_cards({G.jokers}, card, 1, 1), card) end } @@ -614,7 +493,7 @@ local nostalgic_d6 = { if G.GAME.modifiers.glitched_items then local gc = {p_card.config.center.key} for i = 1, G.GAME.modifiers.glitched_items - 1 do - gc[#gc+1] = Entropy.GetPooledCenter(p_card.config.center.set).key + gc[#gc+1] = Entropy.get_pooled_center(p_card.config.center.set).key end p_card.ability.glitched_crown = gc end diff --git a/compat/cryptid/entropic_jokers.lua b/items/jokers/entropic_jokers.lua similarity index 62% rename from compat/cryptid/entropic_jokers.lua rename to items/jokers/entropic_jokers.lua index e29f342b..6f3c364e 100644 --- a/compat/cryptid/entropic_jokers.lua +++ b/items/jokers/entropic_jokers.lua @@ -8,45 +8,127 @@ local epitachyno = { pos = {x=0,y=1}, soul_pos = { x = 2, y = 1, extra = { x = 1, y = 1 } }, config = { - extra = 1.1, - exp_mod = 0.05 + left = 1, + left_mod = 1, }, dependencies = { - items={"set_entr_entropics"} + items={"set_entr_entropics", "set_entr_actives"} }, demicoloncompat = true, loc_vars = function(self, info_queue, card) return { vars = { - card.ability.extra, - card.ability.exp_mod + card.ability.left, + card.ability.left_mod }, } end, calculate = function (self, card, context) - if (context.ending_shop and not context.blueprint and not context.retrigger_joker) or context.forcetrigger then - for i, v in pairs(G.jokers.cards) do - local check = false - local exp = card.ability.extra - --local card = G.jokers.cards[i] - if not Card.no(G.jokers.cards[i], "immutable", true) and (G.jokers.cards[i].config.center.key ~= "j_entr_epitachyno") then - Cryptid.manipulate(G.jokers.cards[i], { value = exp, type = "^" }) - check = true + if context.setting_blind then + Entropy.flip_then({card}, function(c) + c.ability.epitach_consumeable = Entropy.get_random_rare().key + local center = G.P_CENTERS[c.ability.epitach_consumeable] + if c.children.floating_sprite then + c.children.floating_sprite:remove() end - if check then - card_eval_status_text( - context.blueprint_card or G.jokers.cards[i], - "extra", - nil, - nil, - nil, - { message = localize("k_upgrade_ex"), colour = G.C.GREEN } - ) + if c.children.floating_sprite2 then + c.children.floating_sprite2:remove() end - end - card.ability.extra = card.ability.extra + card.ability.exp_mod + if c.children.center then + c.children.center:remove() + end + c.children.center = nil + c.children.floating_sprite = nil + c.children.floating_sprite2 = nil + c:set_sprites(G.P_CENTERS[c.ability.epitach_consumeable]) + if c.ability.epitach_consumeable == "c_soul" then + --c.children.floating_sprite = G.shared_soul + end + if c.children.floating_sprite2 then + c.children.floating_sprite2:set_sprite_pos(center.tsoul_pos and center.tsoul_pos.extra or center.soul_pos and center.soul_pos.extra or {x=999,y=999}) + end + if c.children.floating_sprite then + c.children.floating_sprite:set_sprite_pos(center.tsoul_pos or center.soul_pos or {x=999,y=999}) + end + end) + delay(0.5) + end + if context.end_of_round and not context.individual and not context.repetition and not context.blueprint then + local center = card.config.center + Entropy.flip_then({card}, function(c) + if c.children.floating_sprite then + c.children.floating_sprite:remove() + end + if c.children.floating_sprite2 then + c.children.floating_sprite2:remove() + end + if c.children.center then + c.children.center:remove() + end + c.children.center = nil + c.children.floating_sprite = nil + c.children.floating_sprite2 = nil + c.ability.epitach_consumeable = nil + c:set_sprites(c.config.center) + if c.children.floating_sprite2 then + c.children.floating_sprite2:set_sprite_pos(center.tsoul_pos and center.tsoul_pos.extra or center.soul_pos and center.soul_pos.extra or {x=999,y=999}) + end + if c.children.floating_sprite then + c.children.floating_sprite:set_sprite_pos(center.tsoul_pos or center.soul_pos or {x=999,y=999}) + end + end) + delay(0.5) + end + if (context.end_of_round and not context.blueprint and not context.individual and G.GAME.blind_on_deck == "Boss" and not context.repetition) or context.forcetrigger then + SMODS.scale_card(card, {ref_table = card.ability, ref_value = "left", scalar_value = "left_mod", scaling_message = {message = "+"..number_format(card.ability.left_mod)}}) end end, + set_sprites = function(self, card) + if card.ability and card.ability.epitach_consumeable then + G.E_MANAGER:add_event(Event{ + func = function() + if card.children.floating_sprite then + card.children.floating_sprite:remove() + end + if card.children.floating_sprite2 then + card.children.floating_sprite2:remove() + end + if card.children.center then + card.children.center:remove() + end + local center = G.P_CENTERS[card.ability.epitach_consumeable] + card.children.center = nil + card.children.floating_sprite = nil + card.children.floating_sprite2 = nil + card:set_sprites(center) + if card.children.floating_sprite2 then + card.children.floating_sprite2:set_sprite_pos(center.tsoul_pos and center.tsoul_pos.extra or center.soul_pos and center.soul_pos.extra or {x=999,y=999}) + end + if card.children.floating_sprite then + card.children.floating_sprite:set_sprite_pos(center.tsoul_pos or center.soul_pos or {x=999,y=999}) + end + if card.ability.epitach_consumeable == "c_soul" then + --card.children.floating_sprite = G.shared_soul + end + return true + end + }) + end + end, + can_use = function(self, card) + if card.ability.epitach_consumeable then + local dummy = Entropy.get_dummy(G.P_CENTERS[card.ability.epitach_consumeable], G.consumeables, card) + return to_big(card.ability.left) > to_big(0) and Card.can_use_consumeable(dummy) + end + end, + use = function(self, card) + local dummy = Entropy.get_dummy(G.P_CENTERS[card.ability.epitach_consumeable], G.consumeables, card) + Spectrallib.forcetrigger({ + card = dummy, + silent = true + }) + card.ability.left = card.ability.left - 1 + end, entr_credits = { art = {"Grahkon"} } @@ -64,7 +146,7 @@ local helios = { eternal_compat = true, pos = { x = 0, y = 2 }, config = { - extra = 1.1 + extra = 3 }, dependencies = { items = { @@ -74,25 +156,77 @@ local helios = { soul_pos = { x = 2, y = 2, extra = { x = 1, y = 2 } }, atlas = "exotic_jokers", loc_vars = function(self, info_queue, card) + info_queue[#info_queue+1] = {set = "Other", key = "entr_marked"} return { vars = { - 1.75 + ((G.GAME.sunnumber and G.GAME.sunnumber.not_modest or 0)), - (card.ability.extra or 1.1) + 0.4 + card.ability.extra }, } end, - add_to_deck = function() - Entropy.ChangeFullCSL(10000, localize("b_infinity")) - G.GAME.HyperspaceActuallyUsed = G.GAME.used_vouchers.v_cry_hyperspacetether - G.GAME.used_vouchers.v_cry_hyperspacetether = true - end, - remove_from_deck = function() - Entropy.ChangeFullCSL(-10000) - G.GAME.used_vouchers.v_cry_hyperspacetether = G.GAME.HyperspaceActuallyUsed + calculate = function(self, card, context) + if context.individual and context.cardarea == G.play then + for i, v in pairs(G.hand.cards) do + if v:get_id() == context.other_card:get_id() and not v.ability.entr_marked then + local c = v + G.E_MANAGER:add_event(Event{ + func = function() + c:juice_up() + c.ability.entr_marked = true + return true + end + }) + delay(0.25) + end + end + end + if context.before then + for i, v in pairs(G.I.CARD) do + if type(v) == "table" and v.ability and v.ability.entr_marked then + if v.area then + v.area:remove_card(v) + end + local h = v + G.E_MANAGER:add_event(Event{ + func = function() + h:highlight(true) + return true + end + }) + G.play:emplace(v) + end + end + end end, entr_credits = { art = {"Lil. Mr. Slipstream"} - } + }, + generate_ui = function(self, info_queue, card, desc_nodes, specific_vars, full_UI_table) + SMODS.Center.generate_ui(self, info_queue, card, desc_nodes, specific_vars, full_UI_table) + + local cards = {} + for i, v in pairs(G.I.CARD) do + if v.ability and v.ability.entr_marked and not v.ability.entr_marked_bypass then + local s = v:save() + local c = Card(0,0, G.CARD_W, G.CARD_H, pseudorandom_element(G.P_CARDS,pseudoseed("")), G.P_CENTERS.c_base) + c:load(s) + c.ability = SMODS.shallow_copy(c.ability) + c.ability.entr_marked_bypass = true + v.ability.entr_marked_bypass = nil + table.insert(cards, c) + end + end + if #cards > 0 then + Entropy.card_area_preview(G.entrCardsPrev, desc_nodes, { + cards = cards, + override = true, + w = 2.2, + h = 0.6, + ml = 0, + scale = 0.5, + func_delay = 1.0, + }) + end + end, } if Cryptid.big_num_blacklist then Cryptid.big_num_blacklist["j_entr_xekanos"] = true end @@ -131,7 +265,7 @@ local xekanos = { if (context.selling_card and not context.retrigger_joker) or context.forcetrigger then if not context.card then card.ability.ante_mod_mod = card.ability.ante_mod_mod * 0.5 - elseif context.card.ability.set == "Joker" and Entropy.RarityAbove("3",context.card.config.center.rarity,true) then + elseif context.card.ability.set == "Joker" and Entropy.rarity_above("3",context.card.config.center.rarity,true) then card.ability.ante_mod_mod = card.ability.ante_mod_mod * 0.5 end end @@ -163,30 +297,26 @@ local dekatria = { demicoloncompat = true, soul_pos = { x = 2, y = 5, extra = { x = 1, y = 5 } }, atlas = "exotic_jokers", - loc_vars = function(self, q, card) - if not card.edition or card.edition.key ~= "e_cry_m" then q[#q+1]=G.P_CENTERS.e_cry_m end - return { - vars = { - card.ability.e_mult_mod, - }, - } - end, calculate = function(self, card, context) - if context.joker_main or context.forcetrigger then - local pairs = 0 - for i = 1, #G.play.cards - 1 do - for j = i + 1, #G.play.cards do - local m, n = G.play.cards[i], G.play.cards[j] - if m:get_id() == n:get_id() then - pairs = pairs + 1 - end + if context.post_trigger and context.other_card.config and context.other_card.config.center_key ~= "j_entr_dekatria" then + local star = pseudorandom("entr_dekatria") < 0.25 + local pool = star and G.P_CENTER_POOLS.Star or G.P_CENTER_POOLS.Planet + local planet + local hand = context.other_context.scoring_name + for i, v in pairs(pool) do + if v.config and hand and (v.config.hand_type == hand or v.config.handname == hand) then + planet = v end end - local emult = pairs * card.ability.e_mult_mod return { - Emult_mod=emult, - message = "^" ..number_format(emult).. ' Mult', - colour = G.C.RED, + func = function() + if planet then + G.entr_add_to_stats = true + Card.use_consumeable(Entropy.get_dummy(G.P_CENTERS[planet.key], G.consumeables, context.other_card)) + G.entr_add_to_stats = nil + update_hand_text({delay = 0}, {mult = mult, chips = hand_chips}) + end + end } end end, @@ -205,9 +335,8 @@ local anaptyxi = { pos = { x = 0, y = 6 }, config = { extra = { - scale_base = 2, - scale=2, - scale_mod=1 + scale=0.5, + scale_mod=0.25 } }, dependencies = { @@ -249,28 +378,7 @@ local anaptyxi = { -- joker scaling stuff local original_scalar = other.ability.cry_scaling_info[args.scalar_value] - local new_scale = lenient_bignum( - to_big(original_scalar) - * ( - ( - 1 - + ( - (to_big(current_scaling) / to_big(original_scalar)) - ^ (to_big(1) / to_big(card.ability.extra.scale_base)) - ) - ) ^ to_big(card.ability.extra.scale_base) - ) - ) - if not Cryptid.is_card_big(other) and to_big(new_scale) >= to_big(1e300) then - new_scale = 1e300 - end - if number_format(to_big(new_scale)) == "Infinity" then - if not Cryptid.is_card_big(other) then - new_scale = 1e300 - else - new_scale = to_big(1e300) - end - end + local new_scale = current_scalar for i, v in pairs(G.jokers.cards) do if not Card.no(v, "immutable", true) and v ~= card and v ~= other then Cryptid.manipulate(v, { value = to_big(card.ability.extra.scale)*to_big(new_scale), type="+"}) @@ -287,7 +395,6 @@ local anaptyxi = { v.ability.extra.odds = to_number(v.ability.extra.odds) end end - args.scalar_table[args.scalar_value] = new_scale return { message = localize("k_upgrade_ex"), } @@ -460,6 +567,12 @@ local akyros = { if Cryptid.big_num_blacklist then Cryptid.big_num_blacklist["j_entr_katarraktis"] = true end +local function _get_fib(n) + local phi = (1 + math.sqrt(5))/2 + local res = math.floor((phi ^ (n + 1) - (1 - phi)^(n+1))/(math.sqrt(5))) + return res +end + local katarraktis = { order = 609, object_type = "Joker", @@ -498,8 +611,7 @@ local katarraktis = { end local diff = ind - this_ind if diff >= 1 then - if diff > 17 then diff = 17 end - local triggers = 2 ^ (diff - 1) + local triggers = _get_fib(diff) return { message = localize("k_again_ex"), repetitions = to_number(math.floor(math.min(math.min(card.ability.basetriggers,32) * triggers, 65536))), @@ -514,6 +626,11 @@ local katarraktis = { } } +SMODS.Font { + key = "phi", + path = "m6x11plusphi.ttf" +} + local ieros = { order = 603, object_type = "Joker", @@ -536,40 +653,6 @@ local ieros = { demicoloncompat = true, soul_pos = { x = 2, y = 4, extra = { x = 1, y = 4 } }, atlas = "exotic_jokers", - loc_vars = function(self, info_queue, card) - return { - vars = { - card.ability.e_chips - }, - } - end, - calculate = function(self, card, context) - if context.buying_card and not context.retrigger_joker then - if context.card.ability.set == "Joker" then - SMODS.scale_card(card, { - ref_table = card.ability, - ref_value = "e_chips", - scalar_table = {increase = (Entropy.ReverseRarityChecks[1] or 0)/20.0}, - scalar_value = "increase" - }) - end - end - if context.forcetrigger then - SMODS.scale_card(card, { - ref_table = card.ability, - ref_value = "e_chips", - scalar_table = {increase = (Entropy.ReverseRarityChecks[1] or 0)/20.0}, - scalar_value = "increase" - }) - end - if context.joker_main or context.forcetrigger then - return { - Echip_mod = card.ability.e_chips, - message = '^' .. number_format(card.ability.e_chips) .. ' Chips', - colour = { 0.8, 0.45, 0.85, 1 }, - } - end - end, entr_credits = { art = {"Lil. Mr. Slipstream"} } @@ -599,9 +682,9 @@ local exelixi = { atlas = "exotic_jokers", calculate = function(self, card, context) if context.individual and context.cardarea == G.play then - Entropy.FlipThen({context.other_card}, function(card) - if Entropy.UpgradeEnhancement(card, true, {m_entr_disavowed=true, m_entr_flesh=true}) then - card:set_ability(G.P_CENTERS[Entropy.UpgradeEnhancement(card, true, {m_entr_disavowed=true, m_entr_flesh=true})]) + Entropy.flip_then({context.other_card}, function(card) + if Entropy.upgrade_enhancement(card, true, {m_entr_disavowed=true, m_entr_flesh=true}) then + card:set_ability(G.P_CENTERS[Entropy.upgrade_enhancement(card, true, {m_entr_disavowed=true, m_entr_flesh=true})]) end end) return nil, true @@ -613,7 +696,7 @@ local exelixi = { if v == context.other_card then index = i end end local enh = G.P_CENTERS[G.hand.cards[index].config.center.key] - Entropy.FlipThen({G.hand.cards[index-1], G.hand.cards[index+1]}, function(card) + Entropy.flip_then({G.hand.cards[index-1], G.hand.cards[index+1]}, function(card) if card and G.hand.cards[index] then card:set_ability(enh) end end) end @@ -695,175 +778,122 @@ local apeirostemma = { rarity = "entr_entropic", cost = 150, config = { - immutable = { - dice_effect = 1, - }, - extra = { - --d2 - odds = 2, - --d3 - ee_chips = 1, - ee_chips_mod = 0.1, - --d5 - reroll_minus = 1, - --d6 - retriggers = 6 - - } + left = 1, + left_mod = 1, + sprite = math.floor(math.random() * 5) + 1 }, eternal_compat = true, dependencies = { items = { - "set_entr_entropics" + "set_entr_entropics", + "set_entr_actives" } }, blueprint_compat = true, demicoloncompat = true, - pos = { x = 3, y = 4 }, - soul_pos = { x = 5, y = 4, extra = { x = 4, y = 4 } }, - atlas = "exotic_jokers", + pos = { x = 0, y = 0 }, + soul_pos = { x = 0, y = 1, extra = { x = 1, y = 0 } }, + atlas = "apeirostemma", + set_ability = function(self, card) + card.ability.sprite = math.floor(pseudorandom("apeirostemma_sprite") * 5) + 1 + end, calculate = function(self, card, context) - local e = card.ability.immutable.dice_effect - if e == 1 then - if context.ending_shop or context.forcetrigger then - local jokers = {} - local consumables = {} - for i, v in pairs(G.jokers.cards) do - if v ~= card then jokers[#jokers+1] = v end - end - for i, v in pairs(G.consumeables.cards) do - if v ~= card then consumables[#consumables+1] = v end - end - local joker = pseudorandom_element(jokers, pseudoseed("apeiro_dice_1_joker")) - local cons = pseudorandom_element(consumables, pseudoseed("apeiro_dice_1_consumable")) - if joker then - local jc = copy_card(joker) - jc:add_to_deck() - G.jokers:emplace(jc) - jc:set_edition("e_negative") - end - if cons then - local cc = copy_card(cons) - cc:add_to_deck() - G.consumeables:emplace(cc) - cc:set_edition("e_negative") - end - end + if context.end_of_round then + card.ability.extra = nil end - if e == 2 then - if context.joker_main then - for i, v in pairs(G.jokers.cards) do - if SMODS.pseudorandom_probability(card, 'apeiro_dice_2', 1, card.ability.extra.odds) and v ~= card then - local results = Cryptid.forcetrigger(v, context) - if results then Entropy.EvaluateEffects(results, card) end - end - end - end - end - if e == 3 then - if context.joker_main or context.forcetrigger then - if #G.play.cards == 3 or context.forcetrigger then - card.ability.extra.ee_chips = card.ability.extra.ee_chips + card.ability.extra.ee_chips_mod - local msg = SMODS.scale_card(card, { - ref_table = card.ability, - ref_value = "ee_chips", - scalar_value = "ee_chips_mod" - }) - if not msg or type(msg) == "string" then - card_eval_status_text( - card, - "extra", - nil, - nil, - nil, - { message = localize("k_upgrade_ex") } - ) + if context.repetition or context.retrigger_joker_check then + if card.ability.extra then + for i, v in pairs(card.ability.extra) do + if i == context.other_card.unique_val then + return { + repetitions = v + } end end - return { - e_chips = card.ability.extra.ee_chips - } end end - if e == 4 then - if context.setting_blind or context.forcetrigger then - local c - for i, v in pairs(G.jokers.cards) do - if c then - Entropy.RerollJoker(card, v) + if context.after then + for i, v in pairs(card.ability.extra or {}) do + if G.P_CENTERS[i] then + for _ = 1, v do + G.E_MANAGER:add_event(Event{ + func = function() + Spectrallib.forcetrigger({ + card = Entropy.get_dummy(G.P_CENTERS[i], G.consumeables, card), + silent = true + }) + return true + end + }) end - if v == card then c = true end end end end - if e == 5 then - if context.buying_card or context.forcetrigger then - Cryptid.manipulate(card, {min = 1, max = 1.1, type="X"}) - card_eval_status_text( - card, - "extra", - nil, - nil, - nil, - { message = localize("k_upgrade_ex"), colour = G.C.GREEN } - ) - end + if (context.end_of_round and not context.blueprint and not context.individual and not context.repetition) or context.forcetrigger then + SMODS.scale_card(card, {ref_table = card.ability, ref_value = "left", scalar_value = "left_mod", scaling_message = {message = "+"..number_format(card.ability.left_mod)}}) end - if e == 6 then - if context.retrigger_joker_check - and not context.retrigger_joker then - return { - message = localize("k_again_ex"), - card = card, - repetitions = pseudorandom("apeirostemma_dice_6", 3, 9) - } - end - if context.repetition - and context.cardarea == G.play then - return { - message = localize("k_again_ex"), - card = card, - repetitions = pseudorandom("apeirostemma_dice_6", 3, 9) - } + end, + can_use = function(self, card) + local num = #Entropy.get_highlighted_cards({G.hand, G.jokers, G.consumeables}, card, 1, 9999) + return to_big(card.ability.left) > to_big(0) and num > 0 + end, + use = function(self, card) + local cards = Entropy.get_highlighted_cards({G.hand, G.jokers, G.consumeables}, card, 1, 9999) + card.ability.extra = {} + for i, v in pairs(cards) do + if v.ability.consumeable then + card.ability.extra[v.config.center_key] = (card.ability.extra[v.config.center_key] or 0) + 1 + else + card.ability.extra[v.unique_val] = (card.ability.extra[v.unique_val] or 0) + 1 end + local c = v + G.E_MANAGER:add_event(Event{ + func = function() + c.area:remove_from_highlighted(v) + c:highlight(false) + c:juice_up() + return true + end + }) + delay(0.5) end + card.ability.sprite = math.floor(pseudorandom("apeirostemma_sprite") * 5) + 1 + card.ability.left = card.ability.left - 1 end, loc_vars = function(self, q, card) - if G.SETTINGS.paused then - return {} - end - local e = card.ability.immutable.dice_effect - local vars = nil - if e == 2 then - local numerator, denominator = SMODS.get_probability_vars(card, 1, card.ability.extra.odds) - vars = { - numerator, - denominator - } - end - if e == 3 then - vars = { - number_format(card.ability.extra.ee_chips), - number_format(card.ability.extra.ee_chips_mod) - } - end - if e == 5 then - vars = { - number_format(card.ability.extra.reroll_minus) - } - end - if e == 6 then + return { vars = { - number_format(math.floor(math.min(card.ability.extra.retriggers, 100))) + card.ability.left, + card.ability.left_mod } - end - return { - key = "j_entr_apeirostemma_"..(card.ability.immutable.dice_effect or 1), - vars = vars } - end + end, + entr_credits = {art = {"Lil. Mr. Slipstream"}} } +SMODS.DrawStep({ + key = "apeirostemma", + order = 25, + func = function(self) + if self.config.center.key ~= "j_entr_apeirostemma" or not self.config.center.discovered or not self.config.center.unlocked then return end + local pos_map = { + {x = 0, y = 1}, + {x = 1, y = 1}, + {x = 2, y = 1}, + + {x = 0, y = 2}, + {x = 1, y = 2}, + {x = 2, y = 2}, + } + local pos = pos_map[self.ability.sprite] or {x = 0, y = 1} + if self.ability.pos ~= pos and pos and self.children.floating_sprite then + self.ability.pos = pos + self.children.floating_sprite:set_sprite_pos(pos) + self.children.floating_sprite:reset() + end + end, + conditions = { vortex = false, facing = "front" }, +}) local prismatikos = { order = 613, @@ -882,7 +912,7 @@ local prismatikos = { pos = { x = 3, y = 6 }, atlas = "exotic_jokers", calculate = function(self, card, context) - if context.individual and Entropy.DeckOrSleeve("doc") then + if context.individual and Entropy.deck_or_sleeve("doc") then ease_entropy(2) end if context.joker_main then @@ -928,24 +958,15 @@ local prismatikos = { end }) elseif result == 7 then - card.ability.destroy_hand = true - elseif result == 8 then for i, v in pairs(G.play.cards) do v:set_edition(poll_edition("prismatikos_edition", nil, true, true)) end - elseif result == 9 then + elseif result == 8 then G.GAME.blind.chips = G.GAME.blind.chips * 0.9 G.GAME.blind.chip_text = number_format(G.GAME.blind.chips) G.HUD_blind:recalculate() end end - if context.after and card.ability.destroy_hand then - card.ability.destroy_hand = nil - for i, v in pairs(G.hand.cards) do - v:start_dissolve() - v.ability.temporary2 = true - end - end if context.retrigger_joker_check then if pseudorandom(pseudoseed("prismatikos_retrigger")) then return { @@ -995,15 +1016,15 @@ local heimartai = { } end end, - entr_credits = {art = {"crabus"}} + entr_credits = {art = {"Lil. Mr. Slipstream"}} } return { items = { epitachyno, - ( not Entropy.ValkarriOverCryptid or not Entropy.MDJOverCryptid ) and helios or nil, + helios, xekanos, - ( not Entropy.ValkarriOverCryptid or not Entropy.MDJOverCryptid ) and dekatria or nil, + dekatria, anaptyxi, parakmi, exousia, diff --git a/items/jokers/misc_jokers.lua b/items/jokers/misc_jokers.lua index 55e9141e..0d4aa3e0 100644 --- a/items/jokers/misc_jokers.lua +++ b/items/jokers/misc_jokers.lua @@ -32,8 +32,8 @@ local surreal = { G.GAME.current_round.current_hand.mult = card.ability.qmult update_hand_text({delay = 0}, {chips = G.GAME.current_round.current_hand.chips and hand_chips, mult = card.ability.qmult}) return { - Eqmult_mod = (not Entropy.BlindIs("bl_entr_theta") or G.GAME.blind.disabled) and card.ability.qmult, - Eqchips_mod = (Entropy.BlindIs("bl_entr_theta") and not G.GAME.blind.disabled) and card.ability.qmult + Eqmult_mod = (not Entropy.blind_is("bl_entr_theta") or G.GAME.blind.disabled) and card.ability.qmult, + Eqchips_mod = (Entropy.blind_is("bl_entr_theta") and not G.GAME.blind.disabled) and card.ability.qmult } end end @@ -126,7 +126,7 @@ local recursive_joker = { card.ability.cost_set = false local card = copy_card(card) if context.forcetrigger and card.ability.desync then - card.ability.context = Entropy.RandomContext() + card.ability.context = Entropy.random_context() end card:add_to_deck() G.jokers:emplace(card) @@ -153,7 +153,7 @@ local dr_sunshine = { eternal_compat = true, pos = { x = 4, y = 1 }, atlas = "jokers", - pools = { ["Sunny"] = true, }, + pools = { ["Sunny"] = true, ["Music"] = true }, demicoloncompat = true, loc_vars = function(self, q, card) if Entropy.config.asc_power_tutorial then q[#q+1] = {set = "Other", key = "asc_power_tutorial"} end @@ -166,10 +166,11 @@ local dr_sunshine = { end, calculate = function(self, card, context) if context.remove_playing_cards and not context.blueprint or context.forcetrigger then - - SMODS.scale_card(card, {ref_table = card.ability, ref_value = "plus_asc", scalar_value = "plus_asc_mod", operation = function(ref_table, ref_value, initial, change) - ref_table[ref_value] = initial + (context.removed and #context.removed or 1)*change - end}) + if context.removed and #context.removed > 0 then + SMODS.scale_card(card, {ref_table = card.ability, ref_value = "plus_asc", scalar_value = "plus_asc_mod", operation = function(ref_table, ref_value, initial, change) + ref_table[ref_value] = initial + (context.removed and #context.removed or 1)*change + end}) + end end if (context.joker_main or context.forcetrigger) and to_big(card.ability.plus_asc) > to_big(0) then return { @@ -403,7 +404,7 @@ local insatiable_dagger = { })) SMODS.scale_card(card, {ref_table = card.ability, ref_value = "perc", scalar_value = "perc_mod", operation = "-", no_message = true}) if card.ability.perc <= 0 then - SMODS.destroy_cards(card, nil, nil, true) + SMODS.destroy_cards(card, true, nil, true) end end end @@ -860,6 +861,9 @@ local dating_simbo = { if context.destroying_card.ability.bonus then SMODS.scale_card(card, {ref_table = card.ability, ref_value = "chips", scalar_table = context.destroying_card.ability, scalar_value = "bonus", no_message = true}) end + if context.destroying_card.ability.suit_bonus then + SMODS.scale_card(card, {ref_table = card.ability, ref_value = "chips", scalar_table = context.destroying_card.ability, scalar_value = "suit_bonus", no_message = true}) + end return { remove = not SMODS.is_eternal(context.destroying_card) } end end @@ -966,7 +970,7 @@ local bossfight = { if context.after or context.forcetrigger then local cards = #G.play.cards if cards == math.floor(card.ability.cards) or context.forcetrigger then - Entropy.FlipThen(G.hand.cards, function(card2) + Entropy.flip_then(G.hand.cards, function(card2) card2.ability.bonus = (card2.ability.bonus or 0) + card.ability.chips end) end @@ -1010,6 +1014,7 @@ local phantom_shopper = { end, calculate = function(self, card, context) if context.selling_self or context.forcetrigger then + G.GAME.entr_parakmi_bypass = true SMODS.add_card{ set="Joker", area = G.jokers, @@ -1017,6 +1022,7 @@ local phantom_shopper = { legendary = card.ability.rarity == "Legendary", key_append = "entr_phantom_shopper" } + G.GAME.entr_parakmi_bypass = nil end if (context.ending_shop and not context.blueprint and not context.retrigger_joker) or context.forcetrigger then card.ability.progress = card.ability.progress + 1 @@ -1084,13 +1090,18 @@ local sunny_side_up = { calculate = function(self, card, context) if context.joker_main or context.forcetrigger then local asc = card.ability.asc - if not context.blueprint then SMODS.scale_card(card, {ref_table = card.ability, ref_value = "asc", scalar_value = "asc_mod", operation = "-"}) end + if not context.blueprint then SMODS.scale_card(card, {ref_table = card.ability, ref_value = "asc", scalar_value = "asc_mod", operation = "-", + scaling_message = { + message = localize("k_downgrade_ex"), + colour = G.C.RED + } + }) end if to_big(card.ability.asc) > to_big(0) then return { plus_asc = asc } else - SMODS.destroy_cards(card, nil, nil, true) + SMODS.destroy_cards(card, true, nil, true) end end end, @@ -1143,10 +1154,10 @@ local sunflower_seeds = { if not v.edition and v ~= card then cards[#cards+1] = v end end local jcard = pseudorandom_element(cards, pseudoseed("code_m")) - Entropy.FlipThen({jcard}, function(card) + Entropy.flip_then({jcard}, function(card) card:set_edition("e_entr_sunny") end) - SMODS.destroy_cards(card, nil, nil, true) + SMODS.destroy_cards(card, true, nil, true) return { message = localize("k_eaten_ex"), colour = G.C.FILTER, @@ -1245,7 +1256,7 @@ local sticker_sheet = { return { vars = { number_format(card.ability.per_sticker), - number_format(card.ability.per_sticker * Entropy.CountStickers()) + number_format(card.ability.per_sticker * Entropy.count_stickers(card)) } } end, @@ -1271,7 +1282,7 @@ local sticker_sheet = { if sticker == "perishable" then card.ability.perish_tally = 5 end card:juice_up() return { - mult = card2.ability.per_sticker * Entropy.CountStickers() + mult = card2.ability.per_sticker * Entropy.count_stickers(card) } end end, @@ -1315,7 +1326,7 @@ local fourbit = { card2.ability.left = card2.ability.left - 1 if to_big(card2.ability.left) <= to_big(0) then card2.ability.left = card2.ability.needed - Entropy.FlipThen({card}, function(card) + Entropy.flip_then({card}, function(card) card:set_ability(Entropy.Get4bit()) end) card_eval_status_text( @@ -1478,7 +1489,7 @@ local grotesque_joker = { end end, entr_credits = { - idea = {"crabus"}, + idea = {"user324897"}, art = {"LFMoth", "Lil. Mr. Slipstream"} } } @@ -1560,7 +1571,7 @@ local nucleotide = { key = card.config.center.key, set = card.config.center.set } - SMODS.change_base(new_card, Entropy.GetInverseSuit(card.base.suit), Entropy.GetInverseRank(card.base.id)) + SMODS.change_base(new_card, Entropy.get_inverse_suit(card.base.suit), Entropy.get_inverse_rank(card.base.id)) local jkr = card local found_index = 1 if jkr.edition then @@ -1578,8 +1589,7 @@ local nucleotide = { new_card:set_edition(G.P_CENTER_POOLS.Edition[found_index].key) G.hand:emplace(new_card) table.insert(G.playing_cards, new_card) - card:start_dissolve() - card.ability.temporary2 = true + SMODS.destroy_cards{card} return true end })) @@ -1668,8 +1678,8 @@ local qu = { calculate = function(self, card, context) if context.first_hand_drawn or context.forcetrigger then local card = pseudorandom_element(G.hand.cards, pseudoseed("qu_card")) - Entropy.FlipThen({card}, function(card) - local elem = Entropy.GetPooledCenter("Twisted") + Entropy.flip_then({card}, function(card) + local elem = Entropy.get_pooled_center("Twisted") card:set_ability(elem) end) G.E_MANAGER:add_event(Event({ @@ -1691,6 +1701,7 @@ local memento_mori = { order = 32, object_type = "Joker", key = "memento_mori", + pools = {Music = true}, rarity = 2, cost = 5, dependencies = { @@ -2107,8 +2118,7 @@ local roulette = { G.E_MANAGER:add_event(Event{ func = function() card.ability.immutable.curr_card = 0 - v:start_dissolve() - v.ability.temporary2 = true + SMODS.destroy_cards{v} return true end }) @@ -2244,8 +2254,8 @@ local ruby = { rarity = 4, cost = 20, atlas = "ruby_atlas", - pos = {x=0, y=0}, - soul_pos = {x = 1, y = 0}, + pos = {x=1, y=0}, + soul_pos = {x = 0, y = 0}, config = { jokers_needed = 2, jokers = 0, @@ -2411,7 +2421,7 @@ local cass = { Entropy.handle_card_limit(G.hand, card.ability.hand_size - old) elseif result == 2 then SMODS.scale_card(card, {ref_table = card.ability, ref_value = "selection_limit", scalar_value = "mod"}) - Entropy.ChangeFullCSL(card.ability.mod) + Entropy.change_selection_limit(card.ability.mod) elseif result == 3 then SMODS.scale_card(card, {ref_table = card.ability, ref_value = "hands", scalar_value = "mod"}) G.GAME.round_resets.hands = G.GAME.round_resets.hands + card.ability.mod @@ -2445,7 +2455,7 @@ local cass = { end, remove_from_deck = function(self, card) Entropy.handle_card_limit(G.hand, -card.ability.hand_size) - Entropy.ChangeFullCSL(-card.ability.selection_limit) + Entropy.change_selection_limit(-card.ability.selection_limit) if to_big(card.ability.hands) > to_big(0) then G.GAME.round_resets.hands = G.GAME.round_resets.hands - card.ability.hands ease_hands_played(-card.ability.hands) @@ -2465,7 +2475,7 @@ local cass = { end, add_to_deck = function(self, card) Entropy.handle_card_limit(G.hand, card.ability.hand_size) - Entropy.ChangeFullCSL(card.ability.selection_limit) + Entropy.change_selection_limit(card.ability.selection_limit) if to_big(card.ability.hands) > to_big(0) then G.GAME.round_resets.hands = G.GAME.round_resets.hands + card.ability.hands ease_hands_played(card.ability.hands) @@ -2508,88 +2518,6 @@ local cass = { }, } -local crabus = { - object_type = "Joker", - key = "crabus", - order = 303, - rarity = 4, - cost = 20, - atlas = "ruby_atlas", - pos = {x=0, y=3}, - soul_pos = {x = 1, y = 3}, - config = { - x_chips = 1, - x_chips_mod = 0.05 - }, - demicoloncompat = true, - perishable_compat = true, - blueprint_compat = true, - pronouns = "any_all", - calculate = function(self, card, context) - if context.before and not context.repetition and not context.blueprint then - local cards = {} - for i, v in pairs(context.full_hand) do - if not SMODS.in_scoring(v, context.scoring_hand) and v.config.center.key ~= "m_entr_dark" then cards[#cards+1] = v end - end - Entropy.FlipThen(cards, function(card) - card:set_ability(G.P_CENTERS.m_entr_dark) - end) - end - if context.setting_ability and not context.unchanged and context.new == "m_entr_dark" then - SMODS.scale_card(card, { - ref_table = card.ability, - ref_value = "x_chips", - scalar_value = "x_chips_mod" - }) - end - if context.individual and context.cardarea == G.play and SMODS.has_enhancement(context.other_card, "m_entr_dark") then - local cards = {} - local suits = {} - for i, v in ipairs(G.play.cards) do - if v.config.center.key == "m_cry_abstract" or v.config.center.key == "m_stone" or v.config.center.key == "m_wild" then - if not suits[v.config.center.key] then - suits[v.config.center.key] = true - cards[#cards+1]=true - end - else - if not suits[v.base.suit] then - suits[v.base.suit] = true - cards[#cards+1]=true - end - end - end - for i, v in ipairs(cards) do - card_eval_status_text( - context.other_card, - "extra", - nil, - nil, - nil, - { message = localize("k_upgrade_ex"), colour = G.C.GREEN } - ) - context.other_card.ability.xchips = context.other_card.ability.xchips + context.other_card.ability.xchip_mod - delay(0.3) - end - end - if context.joker_main then return {x_chips = card.ability.x_chips} end - end, - loc_vars = function(self, q, card) - q[#q+1] = G.P_CENTERS.m_entr_dark - return { - vars = { - number_format(card.ability.x_chips_mod), - number_format(card.ability.x_chips), - } - } - end, - entr_credits = {art = {"Lil. Mr. Slipstream"}, idea = {"crabus"}}, - dependencies = { - items = { - "set_entr_misc_jokers", - } - }, -} - local hexa = { object_type = "Joker", key = "hexa", @@ -2606,10 +2534,10 @@ local hexa = { demicoloncompat = true, perishable_compat = true, add_to_deck = function(self, card) - Entropy.ChangeFullCSL(card.ability.csl) + Entropy.change_selection_limit(card.ability.csl) end, remove_from_deck = function(self, card) - Entropy.ChangeFullCSL(-card.ability.csl) + Entropy.change_selection_limit(-card.ability.csl) end, loc_vars = function(self, q, card) return { @@ -2740,7 +2668,7 @@ local sandpaper = { trigger = "after", blocking = false, func = function() - for i, v in pairs(stones) do v:start_dissolve(); v.ability.temporary2 = true end + SMODS.destroy_cards(stones) if #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then SMODS.add_card{ set = "Rune", @@ -2761,7 +2689,6 @@ local sandpaper = { trigger = "after", blocking = false, func = function() - for i, v in pairs(stones) do v:start_dissolve(); v.ability.temporary2 = true end SMODS.add_card{ set = "Rune", area = G.consumeables, @@ -2917,7 +2844,6 @@ local chuckle_cola = { "set_entr_inversions" } }, - eternal_compat = true, pos = { x = 4, y = 7 }, atlas = "jokers", demicoloncompat = true, @@ -2941,7 +2867,7 @@ local chuckle_cola = { card.ability.triggers = card.ability.triggers - 1 context.other_card.ability.bonus = (context.other_card.ability.bonus or 0) + context.other_card:get_chip_bonus() * (card.ability.xchip_mod - 1) if card.ability.triggers <= 0 then - SMODS.destroy_cards(card, nil, nil, true) + SMODS.destroy_cards(card, true, nil, true) card.eaten = true return { message = localize("k_eaten_ex"), @@ -2970,7 +2896,7 @@ local antiderivative = { cost = 10, dependencies = { items = { - "set_entr_inversions" + "set_entr_misc_jokers" } }, eternal_compat = true, @@ -3106,7 +3032,7 @@ local alles = { cost = 6, dependencies = { items = { - "set_entr_inversions" + "set_entr_misc_jokers" } }, config = { @@ -3147,7 +3073,7 @@ local neuroplasticity = { cost = 8, dependencies = { items = { - "set_entr_inversions" + "set_entr_misc_jokers" } }, eternal_compat = true, @@ -3207,10 +3133,9 @@ local dragonfruit = { cost = 6, dependencies = { items = { - "set_entr_inversions" + "set_entr_misc_jokers" } }, - eternal_compat = true, pos = {x = 2, y = 8}, atlas = "jokers", config = { @@ -3220,10 +3145,10 @@ local dragonfruit = { perishable_compat = true, pools = {Food = true}, add_to_deck = function(self, card, from_debuff) - Entropy.ChangeFullCSL(card.ability.left) + Entropy.change_selection_limit(card.ability.left) end, remove_from_deck = function(self, card, from_debuff) - Entropy.ChangeFullCSL(-card.ability.left) + Entropy.change_selection_limit(-card.ability.left) end, loc_vars = function(self, q, card) return { @@ -3237,10 +3162,10 @@ local dragonfruit = { if context.after and not context.repetition and not context.blueprint then SMODS.scale_card(card, {ref_table = card.ability, ref_value = "left", scalar_value = "left_mod", operation = "-", no_message = true}) if not card.ability.entr_pure then - Entropy.ChangeFullCSL(- card.ability.left_mod) + Entropy.change_selection_limit(- card.ability.left_mod) end if card.ability.left <= 0 then - SMODS.destroy_cards(card, nil, nil, true) + SMODS.destroy_cards(card, true, nil, true) return { message = localize("k_eaten_ex"), colour = G.C.FILTER, @@ -3287,20 +3212,22 @@ local jestradiol = { SMODS.scale_card(card, {ref_table = card.ability, ref_value = "left", scalar_value = "left_mod", scaling_message = {message = "+"..number_format(card.ability.left_mod)}}) end end, - use_key = "b_transition", + use_button_config = { + key = "b_transition", + }, can_use = function(self, card) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.left) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.left) return to_big(card.ability.left) > to_big(0) and #cards > 0 and #cards <= card.ability.left end, use = function(self, card) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.left) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.left) for i, v in pairs(cards) do if to_big(card.ability.left) > to_big(0) then card.ability.left = card.ability.left - 1 end end card.ability.left = math.max(card.ability.left, 0) - Entropy.FlipThen(cards, function(card) + Entropy.flip_then(cards, function(card) SMODS.change_base(card, nil, "Queen") end) G.hand:unhighlight_all() @@ -3439,7 +3366,7 @@ local abacus = { perishable_compat = true, blueprint_compat = true, calculate = function(self, card, context) - if (context.individual and context.other_card.base.nominal and to_big(context.other_card.base.nominal + (context.other_card.ability.bonus or 0)) > to_big(0) and context.cardarea == G.play) or context.forcetrigger then + if (context.individual and context.other_card.base.nominal and to_big(context.other_card:get_chip_bonus()) > to_big(0) and context.cardarea == G.play) or context.forcetrigger then if not context.other_card then return { mult = 5 @@ -3448,7 +3375,7 @@ local abacus = { local id = context.other_card:get_id() if id <= 10 or id > 14 and not SMODS.has_no_rank(context.other_card) then return { - mult = math.ceil((context.other_card.base.nominal + (context.other_card.ability.bonus or 0)) / 2) + mult = math.ceil((context.other_card:get_chip_bonus()) / 2) } end end @@ -3697,7 +3624,6 @@ local red_fourty = { key = "red_fourty", rarity = 1, cost = 6, - eternal_compat = true, pos = {x = 4, y = 9}, atlas = "jokers", config = { @@ -3725,7 +3651,7 @@ local red_fourty = { if context.money_altered and context.from_shop and to_big(context.amount) < to_big(0) then SMODS.scale_card(card, {ref_table = card.ability, ref_value = "mult", scalar_value = "mult_mod", operation = "-", no_message = true}) if card.ability.mult <= 0 then - SMODS.destroy_cards(card, nil, nil, true) + SMODS.destroy_cards(card, true, nil, true) return { message = localize("k_eaten_ex"), colour = G.C.FILTER, @@ -3983,7 +3909,7 @@ local gold_bar = { } }) if to_big(card.ability.dollars) <= to_big(0) then - SMODS.destroy_cards(card, nil, nil, true) + SMODS.destroy_cards(card, true, nil, true) end return dollars end @@ -4032,7 +3958,7 @@ local scribbled_joker = { end end, entr_credits = { - idea = {"crabus"} + idea = {"user324897"} } } @@ -4086,7 +4012,7 @@ local jokers_against_humanity = { end end, entr_credits = { - idea = {"crabus"} + idea = {"user324897"} } } @@ -4125,7 +4051,7 @@ local blind_collectible_pack = { end end, entr_credits = { - idea = {"crabus"} + idea = {"user324897"} } } @@ -4167,7 +4093,7 @@ local prayer_card = { } end, entr_credits = { - idea = {"crabus"} + idea = {"user324897"} } } @@ -4274,7 +4200,7 @@ local grape_juice = { card.ability.left = card.ability.left - 1 local card = pseudorandom_element(G.hand.cards, pseudoseed("entr_grape_juice")) local enhancement = pseudorandom_element({"m_bonus", "m_wild", "m_mult"}, pseudoseed("entr_grape_juice")) - Entropy.FlipThen({card}, function(card) card:set_ability(G.P_CENTERS[enhancement]) end) + Entropy.flip_then({card}, function(card) card:set_ability(G.P_CENTERS[enhancement]) end) end, calculate = function(self, card, context) if (context.end_of_round and not context.blueprint and not context.individual and G.GAME.blind_on_deck == "Boss" and not context.repetition) or context.forcetrigger then @@ -4495,31 +4421,6 @@ local prismatic_shard = { end } -function Entropy.trigger_enhancement(enh, card) - if G.P_CENTERS[enh].demicoloncompat then - return G.P_CENTERS[enh]:calculate(card, {forcetrigger = true}) - end - local lucky = {} - if SMODS.pseudorandom_probability(card, 'entr_chameleon', 1, 5) then - lucky.mult = 20 - end - if SMODS.pseudorandom_probability(card, 'entr_chameleon', 1, 15) then - lucky.money = 20 - end - local funcs = { - m_mult = {mult = 4}, - m_bonus = {chips = 30}, - m_glass = {xmult = 2}, - m_steel = {xmult = 1.5}, - m_stone = {chips = 50}, - m_gold = {money=3}, - m_lucky = lucky - } - if funcs[enh] then - return funcs[enh] - end -end - function Entropy.get_chameleon() local enhs = {} for i, v in pairs(G.P_CENTER_POOLS.Enhanced) do @@ -4666,12 +4567,6 @@ local redkey = { end, } -function Entropy.get_by_sortid(id) - for i, v in pairs(G.jokers.cards) do - if v.sort_id == id then return v end - end -end - local polaroid = { order = 83, object_type = "Joker", @@ -4696,10 +4591,10 @@ local polaroid = { "set_entr_actives", } }, - can_use = function(self, card) return #Entropy.GetHighlightedCards({G.jokers}, card, 1, 1) > 0 and card.ability.left > 0 end, + can_use = function(self, card) return #Entropy.get_highlighted_cards({G.jokers}, card, 1, 1) > 0 and card.ability.left > 0 end, use = function(self, card) card.ability.left = card.ability.left - 1 - local cards = Entropy.GetHighlightedCards({G.jokers}, card, 1, 1) + local cards = Entropy.get_highlighted_cards({G.jokers}, card, 1, 1) for i, v in pairs(cards) do card.ability.immutable.target = v.sort_id end @@ -4884,8 +4779,8 @@ local captcha = { if v ~= card then cards[#cards+1] = v end end pseudoshuffle(cards, pseudoseed("entr_captcha")) - Entropy.FlipThen({cards[1]}, function(c) - c:set_ability(Entropy.GetPooledCenter(Entropy.GetRandomSet())) + Entropy.flip_then({cards[1]}, function(c) + c:set_ability(Entropy.get_pooled_center(Entropy.get_random_set())) end) card:juice_up() end, @@ -4904,124 +4799,6 @@ local captcha = { end, } -function Card:redeem_deck() - if self.ability.set == "Back" or self.ability.set == "Sleeve" then - G.GAME.current_round.voucher.spawn[self.config.center_key] = nil - local prev_state = G.STATE - stop_use() - if not self.config.center.discovered then - discover_card(self.config.center) - end - --G.STATE = G.STATES.SMODS_REDEEM_VOUCHER - - self.states.hover.can = false - local top_dynatext = nil - local bot_dynatext = nil - - G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.4, func = function() - top_dynatext = DynaText({string = localize{type = 'name_text', set = self.config.center.set, key = self.config.center.key}, colours = {G.C.WHITE}, rotate = 1,shadow = true, bump = true,float=true, scale = 0.9, pop_in = 0.6/G.SPEEDFACTOR, pop_in_rate = 1.5*G.SPEEDFACTOR}) - bot_dynatext = DynaText({string = localize('k_redeemed_ex'), colours = {G.C.WHITE}, rotate = 2,shadow = true, bump = true,float=true, scale = 0.9, pop_in = 1.4/G.SPEEDFACTOR, pop_in_rate = 1.5*G.SPEEDFACTOR, pitch_shift = 0.25}) - self:juice_up(0.3, 0.5) - play_sound('card1') - play_sound('coin1') - self.children.top_disp = UIBox{ - definition = {n=G.UIT.ROOT, config = {align = 'tm', r = 0.15, colour = G.C.CLEAR, padding = 0.15}, nodes={ - {n=G.UIT.O, config={object = top_dynatext}} - }}, - config = {align="tm", offset = {x=0,y=0},parent = self} - } - self.children.bot_disp = UIBox{ - definition = {n=G.UIT.ROOT, config = {align = 'tm', r = 0.15, colour = G.C.CLEAR, padding = 0.15}, nodes={ - {n=G.UIT.O, config={object = bot_dynatext}} - }}, - config = {align="bm", offset = {x=0,y=0},parent = self} - } - return true end })) - if self.cost ~= 0 then - ease_dollars(-self.cost) - inc_career_stat('c_shop_dollars_spent', self.cost) - end - --G.GAME.current_round.voucher = nil - - - delay(0.6) - G.E_MANAGER:add_event(Event({trigger = 'after', delay = 2.6, func = function() - top_dynatext:pop_out(4) - bot_dynatext:pop_out(4) - return true end })) - G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.5, func = function() - self.children.top_disp:remove() - self.children.top_disp = nil - self.children.bot_disp:remove() - self.children.bot_disp = nil - return true end })) - if self.children.use_button then self.children.use_button:remove(); self.children.use_button = nil end - if self.children.sell_button then self.children.sell_button:remove(); self.children.sell_button = nil end - if self.children.price then self.children.price:remove(); self.children.price = nil end - local in_pack = ((G.GAME.pack_choices and G.GAME.pack_choices > 0) or G.STATE == G.STATES.SMODS_BOOSTER_OPENED) and G.STATE ~= G.STATES.SHOP - G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.5, func = function() - G.FUNCS.buy_deckorsleeve{ - config = { - ref_table = self - } - } - if G.booster_pack then - if G.GAME.pack_choices and G.GAME.pack_choices >= 1 then - G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.5, func = function() - G.booster_pack.alignment.offset.y = G.booster_pack.alignment.offset.py - G.booster_pack.alignment.offset.py = nil - return true - end})) - elseif G.shop then - G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.5, func = function() - G.shop.alignment.offset.y = G.shop.alignment.offset.py - G.shop.alignment.offset.py = nil - return true - end})) - end - elseif not in_pack then - if G.shop then - G.shop.alignment.offset.y = G.shop.alignment.offset.py - G.shop.alignment.offset.py = nil - end - if G.blind_select then - G.blind_select.alignment.offset.y = G.blind_select.alignment.offset.py - G.blind_select.alignment.offset.py = nil - end - if G.round_eval then - G.round_eval.alignment.offset.y = G.round_eval.alignment.offset.py - G.round_eval.alignment.offset.py = nil - end - end - return true end })) - if in_pack then - G.GAME.pack_choices = G.GAME.pack_choices - 1 - if G.GAME.pack_choices <= 0 then - G.CONTROLLER.interrupt.focus = true - if prev_state == G.STATES.SMODS_BOOSTER_OPENED and booster_obj.name:find('Arcana') then inc_career_stat('c_tarot_reading_used', 1) end - if prev_state == G.STATES.SMODS_BOOSTER_OPENED and booster_obj.name:find('Celestial') then inc_career_stat('c_planetarium_used', 1) end - G.FUNCS.end_consumeable(nil, delay_fac) - elseif G.booster_pack and not G.booster_pack.alignment.offset.py and (not (G.GAME.pack_choices and G.GAME.pack_choices > 1)) then - G.booster_pack.alignment.offset.py = G.booster_pack.alignment.offset.y - G.booster_pack.alignment.offset.y = G.ROOM.T.y + 29 - end - else - if G.shop and not G.shop.alignment.offset.py then - G.shop.alignment.offset.py = G.shop.alignment.offset.y - G.shop.alignment.offset.y = G.ROOM.T.y + 29 - end - if G.blind_select and not G.blind_select.alignment.offset.py then - G.blind_select.alignment.offset.py = G.blind_select.alignment.offset.y - G.blind_select.alignment.offset.y = G.ROOM.T.y + 39 - end - if G.round_eval and not G.round_eval.alignment.offset.py then - G.round_eval.alignment.offset.py = G.round_eval.alignment.offset.y - G.round_eval.alignment.offset.y = G.ROOM.T.y + 29 - end - end - end -end - local deck_enlargment_pills = { order = 87, object_type = "Joker", @@ -5081,8 +4858,9 @@ local deck_enlargment_pills = { else area = G.play end - + G.GAME.entr_parakmi_bypass = true local card = create_card("RedeemableBacks", G.play, nil, nil, nil, nil, nil, "entr_large_deck") + G.GAME.entr_parakmi_bypass = nil if card.config.center.key == "j_joker" then card:set_ability(G.P_CENTERS.b_red) end @@ -5183,6 +4961,7 @@ local black_rose_green_sun = { order = 90, object_type = "Joker", key = "black_rose_green_sun", + pools = { ["Music"] = true }, rarity = 1, cost = 5, eternal_compat = true, @@ -5401,6 +5180,7 @@ local spiral_of_ants = { } } end, + pools = {Music = true}, config = { last_card = 9999, chips = 0, @@ -5418,7 +5198,7 @@ local spiral_of_ants = { card.ability.last_card = #G.play.cards else card.ability.last_card = 9999 - card.ability.chips = 1 + card.ability.chips = 0 card_eval_status_text( card, "extra", @@ -5662,7 +5442,6 @@ local shadow_crystal = { pos = {x = 1, y = 13}, atlas = "jokers", perishable_compat = true, - blueprint_compat = true, config = { extra = { odds = 2 @@ -5690,7 +5469,6 @@ local miracle_berry = { key = "miracle_berry", rarity = 2, cost = 7, - eternal_compat = true, pos = {x = 2, y = 13}, atlas = "jokers", pools = { @@ -5723,10 +5501,14 @@ local miracle_berry = { ref_value = "uses", scalar_table = {mod = 1}, scalar_value = "mod", - operation = "-" + operation = "-", + scaling_message = { + message = localize("k_downgrade_ex"), + colour = G.C.RED + } }) if card.ability.uses <= 0 then - SMODS.destroy_cards(card, nil, nil, true) + SMODS.destroy_cards(card, true, nil, true) card.getting_sliced = true end return { @@ -5756,10 +5538,7 @@ local meridian = { } }, loc_vars = function(self, q, card) - local index = 1 - for i, v in pairs(card.area and card.area.cards or {}) do - if v == card then index = i break end - end + local index = Entropy.in_table(card.area.cards, card) return { vars = { card.ability.multiplier * index @@ -5768,10 +5547,7 @@ local meridian = { end, calculate = function(self, card, context) if context.joker_main or context.forcetrigger then - local index = 0 - for i, v in pairs(card.area.cards) do - if v == card then index = i break end - end + local index = Entropy.in_table(card.area.cards, card) return { mult = card.ability.multiplier * index } @@ -5785,7 +5561,6 @@ local mango = { key = "mango", rarity = 2, cost = 7, - eternal_compat = true, pos = {x = 4, y = 13}, atlas = "jokers", pools = { @@ -5828,7 +5603,7 @@ local mango = { })) card.ability.hands_left = card.ability.hands_left - 1 if to_big(card.ability.hands_left) <= to_big(0) then - SMODS.destroy_cards(card, nil, nil, true) + SMODS.destroy_cards(card, true, nil, true) card.getting_sliced = true end return { @@ -5867,7 +5642,7 @@ local kitchenjokers = { } end, entr_credits = { - idea = {"cassknows", "crabus"} + idea = {"cassknows", "user324897"} } } @@ -6000,7 +5775,6 @@ local pineapple = { key = "pineapple", rarity = 2, cost = 7, - eternal_compat = true, pos = {x = 0, y = 15}, atlas = "jokers", dependencies = { @@ -6021,7 +5795,7 @@ local pineapple = { rcard.ability.perma_repetitions = rcard.ability.perma_repetitions + 1 if not context.forcetrigger then if card.ability.rounds - 1 <= 0 then - SMODS.destroy_cards(card, nil, nil, true) + SMODS.destroy_cards(card, true, nil, true) return { message = localize('k_eaten_ex'), colour = G.C.FILTER @@ -6124,7 +5898,7 @@ local stand_arrow = { end end, can_use = function(self, card) - local num = Entropy.GetHighlightedCards({G.jokers}, card, 1, 1) + local num = Entropy.get_highlighted_cards({G.jokers}, card, 1, 1) local no_ed = false for i, v in pairs(num) do if not v.edition then no_ed = true end @@ -6134,7 +5908,7 @@ local stand_arrow = { end, use = function(self, card) card.ability.left = card.ability.left - 1 - local cards = Entropy.GetHighlightedCards({G.jokers}, card, 1, 1) + local cards = Entropy.get_highlighted_cards({G.jokers}, card, 1, 1) for i, v in pairs(cards) do if SMODS.pseudorandom_probability(v, 'stand_arrow', 1, card.ability.odds) and not SMODS.is_eternal(v) then v:start_dissolve() @@ -6187,18 +5961,18 @@ local dancer = { demicoloncompat = true, calculate = function(self, card, context) if context.forcetrigger then - Entropy.ChangeFullCSL(card.ability.csl) + Entropy.change_selection_limit(card.ability.csl) G.GAME.round_resets.discards = G.GAME.round_resets.discards - card.ability.discards ease_discard(-card.ability.discards) end end, add_to_deck = function(self, card) - Entropy.ChangeFullCSL(card.ability.csl) + Entropy.change_selection_limit(card.ability.csl) G.GAME.round_resets.discards = G.GAME.round_resets.discards - card.ability.discards ease_discard(-card.ability.discards) end, remove_from_deck = function(self, card) - Entropy.ChangeFullCSL(-card.ability.csl) + Entropy.change_selection_limit(-card.ability.csl) G.GAME.round_resets.discards = G.GAME.round_resets.discards + card.ability.discards ease_discard(card.ability.discards) end, @@ -6274,21 +6048,6 @@ local monkeys_paw = { end } -function Entropy.kind_to_set(kind, c) - local check = { - Arcana = "Tarot", - Celestial = "Planet", - Ethereal = "Spectral", - Buffoon = "Joker", - Inverted = c and "Twisted" or nil - } - local kind2 = check[kind] or kind - check.Inverted = "Twisted" - local check2 = check[kind] or kind - if not G.P_CENTER_POOLS[kind2] and not G.P_CENTER_POOLS[check2] then return end - return kind2 -end - local magic_skin = { order = 114, object_type = "Joker", @@ -6440,18 +6199,6 @@ local lambda_calculus = { end, } -function Entropy.gather_values(card) - local total = 0 - for i, v in pairs(card.ability) do - if Entropy.is_number(v) and to_big(v) > to_big(1) and i ~= "order" then - total = total + v - elseif type(v) == "table" then - total = total + Entropy.gather_values({ability = v}) - end - end - return total -end - local elderberries = { order = 116, object_type = "Joker", @@ -6529,11 +6276,10 @@ local elderberries = { card.children.top_disp = nil return true end })) - if Cryptid.forcetriggerConsumableCheck(card) then - Cryptid.forcetrigger(card, {no_sound = true}) - elseif card:can_use_consumeable() then - card:use_consumeable() - end + Spectrallib.forcetrigger({ + card = card, + silent = true + }) G.E_MANAGER:add_event(Event{ trigger = "after", func = function() @@ -6556,7 +6302,6 @@ local blood_orange = { key = "blood_orange", rarity = 2, cost = 6, - eternal_compat = true, pos = {x = 7, y = 14}, atlas = "jokers", config = { @@ -6586,7 +6331,7 @@ local blood_orange = { if G.GAME.consumeable_buffer + #G.consumeables.cards < G.consumeables.config.card_limit then card.ability.cards = card.ability.cards - 1 if card.ability.cards <= 0 then - SMODS.destroy_cards(card, nil, nil, true) + SMODS.destroy_cards(card, true, nil, true) eated = true end G.E_MANAGER:add_event(Event{ @@ -6630,7 +6375,6 @@ local false_vacuum_collapse = { dependencies = { items = { "set_entr_misc_jokers", - "set_entr_inversions" } }, perishable_compat = true, @@ -6834,13 +6578,13 @@ local echo_chamber = { end end, can_use = function(self, card) - local cards = Entropy.GetHighlightedCards({G.consumeables, G.hand, G.jokers, G.pack_cards}, card, 1, 1, function(card) + local cards = Entropy.get_highlighted_cards({G.consumeables, G.hand, G.jokers, G.pack_cards}, card, 1, 1, function(card) return card.ability.consumeable and not card.config.center.hidden end) return #cards == 1 and to_big(card.ability.left) > to_big(0) end, use = function(self, card) - local cards = Entropy.GetHighlightedCards({G.consumeables, G.hand, G.jokers, G.pack_cards}, card, 1, 1, function(card) + local cards = Entropy.get_highlighted_cards({G.consumeables, G.hand, G.jokers, G.pack_cards}, card, 1, 1, function(card) return card.ability.consumeable and not card.config.center.hidden end) if #cards > 0 then @@ -6863,7 +6607,11 @@ local echo_chamber = { trigger = "after", delay = 0.1, func = function() - Cryptid.forcetrigger(Entropy.GetDummy(G.P_CENTERS[v], G.jokers, card), context) + Spectrallib.forcetrigger({ + card = Entropy.get_dummy(G.P_CENTERS[v], G.jokers, card), + context = context, + silent = true + }) return true end }) @@ -6886,7 +6634,6 @@ local milk = { key = "milk", rarity = 1, cost = 6, - eternal_compat = true, pos = {x = 2, y = 17}, atlas = "jokers", config = { @@ -6922,7 +6669,7 @@ local milk = { }) if card.ability.chips >= card.ability.chips_max then card.ability.chips = card.ability.chips_max - Entropy.FlipThen({card}, function(c) + Entropy.flip_then({card}, function(c) c:set_ability(G.P_CENTERS.j_entr_yogurt) end) return { @@ -6944,7 +6691,6 @@ local yogurt = { key = "yogurt", rarity = 1, cost = 6, - eternal_compat = true, pos = {x = 3, y = 17}, atlas = "jokers", config = { @@ -6983,7 +6729,7 @@ local yogurt = { }) if card.ability.chips <= card.ability.chips_mod then card.ability.chips = 0 - SMODS.destroy_cards(card, nil, nil, true) + SMODS.destroy_cards(card, true, nil, true) return { message = localize("k_spoiled_ex") } @@ -7003,7 +6749,6 @@ local box_of_chocolates = { key = "box_of_chocolates", rarity = 1, cost = 8, - eternal_compat = true, pos = {x = 8, y = 15}, atlas = "jokers", config = { @@ -7036,9 +6781,12 @@ local box_of_chocolates = { trigger = "after", blocking = false, func = function() - local card = pseudorandom_element(G.pack_cards.cards, pseudoseed("j_entr_chocolates")) - local r = Cryptid.forcetrigger(card, context) - SMODS.calculate_effect({message = localize("k_forcetrigger_ex"), colour = G.C.PURPLE}, card) + local card2 = pseudorandom_element(G.pack_cards.cards, pseudoseed("j_entr_chocolates")) + Spectrallib.forcetrigger({ + card = card2, + context = context, + message_card = card + }) return true end }) @@ -7049,7 +6797,7 @@ local box_of_chocolates = { if card.ability.uses <= 0 then ret.message = localize("k_eaten_ex") ret.colour = G.C.FILTER - SMODS.destroy_cards(card, nil, nil, true) + SMODS.destroy_cards(card, true, nil, true) else ret.message = "-1" ret.colour = G.C.RED @@ -7070,7 +6818,6 @@ local carrot_cake = { key = "carrot_cake", rarity = 2, cost = 8, - eternal_compat = true, pos = {x = 1, y = 17}, atlas = "jokers", config = { @@ -7101,7 +6848,7 @@ local carrot_cake = { if card.ability.uses <= 0 then ret.message = localize("k_eaten_ex") ret.colour = G.C.FILTER - SMODS.destroy_cards(card, nil, nil, true) + SMODS.destroy_cards(card, true, nil, true) else ret.message = "-1" ret.colour = G.C.RED @@ -7188,13 +6935,13 @@ local texas_hold_em = { } } end, - add_to_deck = function(self, card) Entropy.ChangeFullCSL(-card.ability.csl) end, - remove_from_deck = function(self, card) Entropy.ChangeFullCSL(card.ability.csl) end, + add_to_deck = function(self, card) Entropy.change_selection_limit(-card.ability.csl) end, + remove_from_deck = function(self, card) Entropy.change_selection_limit(card.ability.csl) end, calculate = function(self, card, context) if context.first_hand_drawn and context.hand_drawn or context.forcetrigger then card.ability.added_cards = {} local cards = {} - for i, v in pairs(context.hand_drawn) do + for i, v in pairs(context.hand_drawn or G.hand.cards) do if not v.ability.entr_marked then cards[#cards+1] = v end end if #cards > 0 then @@ -7204,30 +6951,6 @@ local texas_hold_em = { end end end - if context.before then - for i, v in pairs(G.I.CARD) do - if type(v) == "table" and v.ability and v.ability.entr_marked then - if v.area then - v.area:remove_card(v) - end - local h = v - G.E_MANAGER:add_event(Event{ - func = function() - h:highlight(true) - return true - end - }) - G.play:emplace(v) - end - end - end - if context.end_of_round and not context.repetition and not context.individual and not context.blueprint then - for i, v in pairs(G.I.CARD) do - if type(v) == "table" and v.ability and v.ability.entr_marked then - v.ability.entr_marked = nil - end - end - end end, entr_credits = { idea = {"cassknows"}, @@ -7299,7 +7022,8 @@ local fasciation = { local reps = 0 for i, v in pairs(context.scoring_hand) do if v == context.other_card then break end - if v:is_suit(context.other_card.base.suit) then + if (v:is_suit(context.other_card.base.suit) and not SMODS.has_no_suit(context.other_card)) + or (context.other_card:is_suit(v.base.suit) and not SMODS.has_no_suit(v)) then reps = reps + 1 end end @@ -7385,7 +7109,7 @@ local amaryllis = { end end if card.ability.colour == "red" and context.before then - Entropy.FlipThen(G.play.cards, function(c) SMODS.change_base(c, "Hearts") end) + Entropy.flip_then(G.play.cards, function(c) SMODS.change_base(c, "Hearts") end) end if card.ability.colour == "white" and context.setting_blind then if G.GAME.consumeable_buffer + #G.consumeables.cards < G.consumeables.config.card_limit then @@ -7488,7 +7212,7 @@ local cooking_pot = { if context.entr_food_added then card.ability.foods[#card.ability.foods+1] = context.other_card.config.center.key if #card.ability.foods > 3 then - SMODS.destroy_cards(card, nil, nil, true) + SMODS.destroy_cards(card, true, nil, true) return { message = localize("k_destroyed_ex") } @@ -7500,7 +7224,7 @@ local cooking_pot = { end local retted for i, v in pairs(card.ability.foods) do - local dummy = Entropy.GetDummy(G.P_CENTERS[v], G.jokers, card, true) + local dummy = Entropy.get_dummy(G.P_CENTERS[v], G.jokers, card, true) local ret, retr = Card.calculate_joker(dummy, context) if ret or retr then SMODS.calculate_effect{message = localize{type = "name_text", set = G.P_CENTERS[v].set, key = v}, card = card} end if ret and ret.card == dummy then ret.card = card end @@ -7520,7 +7244,6 @@ local brownies = { key = "brownies", rarity = 2, cost = 6, - eternal_compat = true, pos = {x = 0, y = 17}, atlas = "jokers", dependencies = { @@ -7546,7 +7269,7 @@ local brownies = { if context.using_consumeable or context.forcetrigger then card.ability.cards_left = card.ability.cards_left - 1 if card.ability.cards_left <= 0 then - SMODS.destroy_cards(card, nil, nil, true) + SMODS.destroy_cards(card, true, nil, true) return { dollars = card.ability.dollars, message = localize("k_eaten_ex") @@ -7648,17 +7371,20 @@ local void_cradle = { end end, can_use = function(self, card) - local cards = Entropy.GetHighlightedCards({G.consumeables}, card, 1, card.ability.left, function(c) return Entropy.Inversion(c) end) + local cards = Entropy.get_highlighted_cards({G.jokers, G.consumeables, G.hand}, card, 1, card.ability.left, function(c) return Entropy.inversion(c) end) return to_big(card.ability.left) > to_big(0) and #cards > 0 and #cards <= card.ability.left end, use = function(self, card) - local cards = Entropy.GetHighlightedCards({G.consumeables}, card, 1, card.ability.left, function(c) return Entropy.Inversion(c) end) - Entropy.FlipThen(cards, function(c) - G.GAME.entr_perma_inversions[c.config.center.key] = Entropy.Inversion(c); - c:set_ability(G.P_CENTERS[Entropy.Inversion(c)]) - end) + local cards = Entropy.get_highlighted_cards({G.jokers, G.consumeables, G,hand}, card, 1, card.ability.left, function(c) return Entropy.inversion(c) end) G.GAME.entr_perma_inversions = G.GAME.entr_perma_inversions or {} - card.ability.left = math.max(card.ability.left, 0) + for i, v in pairs(cards) do + local i = Entropy.inversion(v) + if i ~= "c_entr_flipside" then + G.GAME.entr_perma_inversions[v.config.center.key] = i + end + end + Entropy.invert(cards, true, true) + card.ability.left = math.max(card.ability.left - 1, 0) end, entr_credits = {art = {"mailingway"}} } @@ -7758,7 +7484,7 @@ local fthof = { }, calculate = function(self, card, context) if context.modify_shop_voucher and context.first_of_ante then - local key = Entropy.GetPooledCenter("Joker", nil, 3).key + local key = Entropy.get_pooled_center("Joker", nil, 3).key G.GAME.entr_parakmi_bypass = true local card = context.card if card and not (G.GAME.current_round.voucher.editions or {})[card.config.center.key] then @@ -7793,7 +7519,7 @@ local fthof = { end end if not is_voucher then - SMODS.destroy_cards(card, nil, nil, true) + SMODS.destroy_cards(card, true, nil, true) return { message = localize("k_backfired_ex"), colour = G.C.RED @@ -7812,6 +7538,631 @@ local fthof = { end } +local searing_joke = { + order = 137, + object_type = "Joker", + key = "searing_joke", + rarity = 2, + cost = 6, + eternal_compat = true, + pos = {x = 5, y = 17}, + atlas = "jokers", + dependencies = { + items = { + "set_entr_inversions", + } + }, + config = { + extra = {xmult = 2, xmult_mod = 1} + }, + can_be_inverted = true, + calculate = function(self, card, context) + if context.being_inverted then + SMODS.scale_card(card, { + ref_table = card.ability.extra, + ref_value = "xmult", + scalar_value = "xmult_mod" + }) + card.ability.extra.upgraded = (card.ability.extra.upgraded or 0) + 1 + return { + prevent_inversion = true + } + end + if context.joker_main then + return { + xmult = card.ability.extra.xmult + } + end + end, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.extra.xmult, + card.ability.extra.xmult_mod + } + } + end, +} + +local function _render_sprite(canvas, x, y, pos) + local quad = love.graphics.newQuad(43 * pos.x, 9 * pos.y, 43, 9, 142, 95) + canvas:renderTo(function() love.graphics.draw(G.ASSET_ATLAS["entr_searing"].image, quad, x, y, 0, 1, 1, 0, 0) end) +end + +SMODS.draw_ignore_keys.searing_sprite = true +SMODS.DrawStep({ + key = "searing_joke", + order = 25, + func = function(self) + local card = self.ability.glitched_crown and self.ability.glitched_crown[self.glitched_index] or self.config.center_key + if card ~= "j_entr_searing_joke" or not G.P_CENTERS[card].discovered or not G.P_CENTERS[card].unlocked then return end + + + if not self.children.searing_sprite then + self.children.searing_sprite = SMODS.CanvasSprite( + {X=0, Y=0, W=71, H=95, canvasW=71, canvasH=95, canvasScale=1} + ) + end + local sprite = self.children.searing_sprite + love.graphics.push() + love.graphics.origin() + sprite.canvas:renderTo(love.graphics.clear, 0, 0, 0, 0) + local str = number_format(math.floor(self.ability.extra.xmult)):gsub("%,", "") + local len = string.len(str) + _render_sprite(sprite.canvas, 8 + 1 * (len - 1), 58, {x = 0, y = math.min(len-1, 4)}) + local char_map = { + ["0"] = {x = 0, y = 9}, + ["1"] = {x = 0, y = 5}, + ["2"] = {x = 0, y = 6}, + ["3"] = {x = 0, y = 7}, + ["4"] = {x = 0, y = 8}, + ["5"] = {x = 1, y = 5}, + ["6"] = {x = 1, y = 6}, + ["7"] = {x = 1, y = 7}, + ["8"] = {x = 1, y = 8}, + ["9"] = {x = 1, y = 9}, + } + + local u_char_map = { + ["0"] = {x = 3, y = 3}, + ["1"] = {x = 1, y = 2}, + ["2"] = {x = 1, y = 3}, + ["3"] = {x = 1, y = 4}, + ["4"] = {x = 2, y = 1}, + ["5"] = {x = 2, y = 2}, + ["6"] = {x = 2, y = 3}, + ["7"] = {x = 2, y = 4}, + ["8"] = {x = 3, y = 1}, + ["9"] = {x = 3, y = 2}, + } + for i = 1, len do + _render_sprite(sprite.canvas, 8 + 1 * (len - 1) - 3 * ((len - i)), 58, char_map[str:sub(i,i)] or {x = 999, y = 999}) + end + + + local str2 = number_format(self.ability.extra.upgraded or 0):gsub("%,", "") + local len2 = string.len(str2) + + local width = 26 + (self.ability.extra.upgraded and (6 + 8 * len2) or 0) + + _render_sprite(sprite.canvas, 35 - width/2, 5, {x = 1, y = self.ability.extra.upgraded and 1 or 0}) + if self.ability.extra.upgraded then + for i = 1, len2 do + _render_sprite(sprite.canvas, 35 + 25 - width/2 + (7 * i), 5, u_char_map[str2:sub(i,i)] or {x = 999, y = 999}) + end + end + love.graphics.pop() + + sprite.role.draw_major = self + sprite:draw_shader("dissolve", nil, nil, nil, self.children.center) + end, + conditions = { vortex = false, facing = "front" }, +}) + +local ancestral_recall = { + order = 138, + object_type = "Joker", + key = "ancestral_recall", + rarity = 2, + cost = 6, + eternal_compat = true, + pos = {x = 6, y = 17}, + atlas = "jokers", + config = { + left = 1, + left_mod = 1, + hands = -1 + }, + dependencies = { + items = { + "set_entr_actives", + } + }, + loc_vars = function(self, q, card) + q[#q+1] = {set = "Other", key = "entr_marked"} + return { + vars = { + card.ability.left, + card.ability.left_mod, + card.ability.hands + } + } + end, + demicoloncompat = true, + calculate = function(self, card, context) + if (context.end_of_round and not context.blueprint and not context.individual and not context.repetition) or context.forcetrigger then + SMODS.scale_card(card, {ref_table = card.ability, ref_value = "left", scalar_value = "left_mod", scaling_message = {message = "+"..number_format(card.ability.left_mod)}}) + end + end, + can_use = function(self, card) + local cards = G.deck.cards + return to_big(card.ability.left) > to_big(0) and #cards > 0 and G.GAME.blind and G.GAME.blind.in_blind + end, + use = function(self, card) + card.ability.left = card.ability.left - 1 + for i = 1, math.min(3, #G.deck.cards) do + local card = draw_card(G.deck, G.hand, i*100/math.max(3, #G.deck.cards),'up', true) + local ind = i + G.E_MANAGER:add_event(Event{ + trigger = "after", + func = function() + local card = SMODS.drawn_cards[ind] + if card then + card:juice_up() + card.ability.entr_marked = true + end + return true + end + }) + end + ease_hands_played(card.ability.hands) + if G.GAME.current_round.hands_left <= -card.ability.hands then + end_round() + end + G.E_MANAGER:add_event(Event{ + trigger = "after", + func = function() + SMODS.drawn_cards = {} + return true + end + }) + end, + generate_ui = function(self, info_queue, card, desc_nodes, specific_vars, full_UI_table) + SMODS.Center.generate_ui(self, info_queue, card, desc_nodes, specific_vars, full_UI_table) + + local cards = {} + for i, v in pairs(G.I.CARD) do + if v.ability and v.ability.entr_marked and not v.ability.entr_marked_bypass then + local s = v:save() + local c = Card(0,0, G.CARD_W, G.CARD_H, pseudorandom_element(G.P_CARDS,pseudoseed("")), G.P_CENTERS.c_base) + c:load(s) + c.ability = SMODS.shallow_copy(c.ability) + c.ability.entr_marked_bypass = true + v.ability.entr_marked_bypass = nil + table.insert(cards, c) + end + end + if #cards > 0 then + Entropy.card_area_preview(G.entrCardsPrev, desc_nodes, { + cards = cards, + override = true, + w = 2.2, + h = 0.6, + ml = 0, + scale = 0.5, + func_delay = 1.0, + }) + end + end, +} + +local planetarium = { + order = 139, + object_type = "Joker", + key = "planetarium", + rarity = 3, + cost = 8, + eternal_compat = true, + pos = {x = 0, y = 0}, + soul_pos = {x = 4, y = 2}, + atlas = "planetarium", + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + config = { + extra = {hand = "none", fullhouse_dollars = 4, fullhouse_mult = 1.5, threeoak_mult = 2, fouroak_discards = 1, straight_dollars = 2,flushhouse_gain = 0.1, flushhouse_loss = 0.1, flushhouse_mult = 1} + }, + calculate = function(self, card, context) + if context.using_consumeable then + local v = context.consumeable + local hand = v.ability.hand_type or v.ability.handname + if hand then + card.ability.extra.hand = hand + card:juice_up() + end + end + if card.ability.extra.hand == "High Card" then + if context.after then + for i, v in pairs(G.play.cards) do + local c = v + if not SMODS.in_scoring(v, context.scoring_hand) then + G.E_MANAGER:add_event(Event{ + func = function() + c:juice_up() + c.ability.entr_marked = true + return true + end + }) + end + end + end + if context.evaluate_poker_hand then + return { + replace_scoring_hand = "High Card", + replace_scoring_name = "High Card" + } + end + end + if card.ability.extra.hand == "Three of a Kind" then + if context.individual and context.cardarea == G.play then + local sum = 0 + for i, v in pairs(G.play.cards) do + local id = v:get_id() + if id > 0 then sum = sum + id end + end + if sum % 3 == 0 then + return { + xmult = card.ability.extra.threeoak_mult + } + end + end + end + if card.ability.extra.hand == "Straight" then + if context.joker_main then + local ranks = {} + local nranks = 0 + for i, v in pairs(G.play.cards) do + local id = v:get_id() + if id < 0 then id = 0 end + if not ranks[id] then + ranks[id] = true + nranks = nranks + 1 + end + end + return { + dollars = card.ability.extra.straight_dollars * nranks + } + end + end + if card.ability.extra.hand == "Full House" then + if context.individual and context.cardarea == G.play then + local ids = {} + for i, v in pairs(context.scoring_hand) do + local id = v:get_id() + if id > 0 then ids[#ids+1] = id end + end + table.sort(ids) + return { + dollars = context.other_card:get_id() == ids[1] and card.ability.extra.fullhouse_dollars or nil, + xmult = context.other_card:get_id() == ids[#ids] and card.ability.extra.fullhouse_mult or nil + } + end + end + if card.ability.extra.hand == "Straight Flush" then + if context.before and G.GAME.blind_on_deck == "Boss" then + return { + level_up = -1 + } + end + end + if card.ability.extra.hand == "Four of a Kind" then + if context.joker_main then + ease_discard(card.ability.extra.fouroak_discards) + return { + message = localize("k_plus_discard"), + colour = G.C.RED + } + end + end + if card.ability.extra.hand == "Flush House" then + if context.joker_main then + return { + xmult = card.ability.extra.flushhouse_mult + } + end + if context.end_of_round and not context.individual and not context.repetition and not context.blueprint then + local num_pairs = 0 + local suits = 0 + local suit_map = {} + for i, v in pairs(SMODS.Suits) do + for _, c in pairs(context.scoring_hand) do + if c:is_suit(i) and not suit_map[i] then + suit_map[i] = true + suits = suits + 1 + end + end + end + for i = 1, #context.scoring_hand - 1 do + for j = i + 1, #context.scoring_hand do + local m, n = context.scoring_hand[i], context.scoring_hand[j] + if m:get_id() == n:get_id() then + num_pairs = num_pairs + 1 + end + end + end + if num_pairs > 0 then + SMODS.scale_card(card, { + ref_table = card.ability.extra, + ref_value = "flushhouse_mult", + scalar_value = "flushhouse_gain", + message_key = "a_xmult", + message_colour = G.C.RED, + operation = function(ref_table, ref_value, initial, change) + ref_table[ref_value] = initial + change * num_pairs + end + }) + end + if suits > 0 then + SMODS.scale_card(card, { + ref_table = card.ability.extra, + ref_value = "flushhouse_mult", + scalar_value = "flushhouse_loss", + operation = function(ref_table, ref_value, initial, change) + ref_table[ref_value] = initial - change * suits + end, + message_key = "a_xmult", + message_colour = G.C.RED + }) + end + end + end + if card.ability.extra.hand == "Five of a Kind" then + if context.before and #G.play.cards == 5 then + Entropy.flip_then(context.scoring_hand, function(c) + Entropy.randomise_once(c, { + "Enhancement","Enhancement","Enhancement","Enhancement", + "Seal", + "Edition","Edition", + }, "entr_planetarium_5oak", true) + Entropy.randomize_rank_suit(c, nil, true, "entr_planetarium_5oak_suit") + end) + end + end + if card.ability.extra.hand == "Flush Five" then + if context.end_of_round then + card.ability.extra.inactive = nil + end + end + if card.ability.extra.hand == "entr_derivative" then + if context.end_of_round and not context.repetition and not context.individual and not context.blueprint then + local c = G.hand.cards[1] + if c then + Entropy.flip_then({c}, function(c) + SMODS.change_base(c, "entr_nilsuit", "entr_nilrank") + end) + end + end + if context.repetition and (context.cardarea == G.play or context.cardarea == G.hand) and Entropy.true_suitless(context.other_card) then + return { + repetitions = 1 + } + end + end + if Entropy.Planetarium[card.ability.extra.hand] and Entropy.Planetarium[card.ability.extra.hand].calculate then + return Entropy.Planetarium[card.ability.extra.hand].calculate(self, card, context) + end + end, + loc_vars = function(self, q, card) + if card.ability.extra.hand == "High Card" then + q[#q+1] = {set = "Other", key = "entr_marked"} + end + local vars = {} + if card.ability.extra.hand == "Three of a Kind" then + vars = { + card.ability.extra.threeoak_mult + } + end + if card.ability.extra.hand == "Straight" then + vars = { + card.ability.extra.straight_dollars + } + end + if card.ability.extra.hand == "Full House" then + vars = { + card.ability.extra.fullhouse_dollars, + card.ability.extra.fullhouse_mult + } + end + if card.ability.extra.hand == "Four of a Kind" then + vars = { + card.ability.extra.fouroak_discards + } + end + if card.ability.extra.hand == "Flush House" then + vars = { + card.ability.extra.flushhouse_gain, + card.ability.extra.flushhouse_loss, + card.ability.extra.flushhouse_mult + } + end + if Entropy.Planetarium[card.ability.extra.hand] and Entropy.Planetarium[card.ability.extra.hand].loc_vars then + vars = Entropy.Planetarium[card.ability.extra.hand].loc_vars(self, q, card) + end + return { + key = card.ability.extra.hand ~= "none" and "j_entr_planetarium_"..card.ability.extra.hand or nil, + vars = vars + } + end, + generate_ui = function(self, info_queue, card, desc_nodes, specific_vars, full_UI_table) + SMODS.Center.generate_ui(self, info_queue, card, desc_nodes, specific_vars, full_UI_table) + if card.ability.extra.hand == "High Card" then + + local cards = {} + for i, v in pairs(G.I.CARD) do + if v.ability and v.ability.entr_marked and not v.ability.entr_marked_bypass then + local s = v:save() + local c = Card(0,0, G.CARD_W, G.CARD_H, pseudorandom_element(G.P_CARDS,pseudoseed("")), G.P_CENTERS.c_base) + c:load(s) + c.ability = SMODS.shallow_copy(c.ability) + c.ability.entr_marked_bypass = true + v.ability.entr_marked_bypass = nil + table.insert(cards, c) + end + end + if #cards > 0 then + Entropy.card_area_preview(G.entrCardsPrev, full_UI_table.multi_box[1], { + cards = cards, + override = true, + w = 2.2, + h = 0.6, + ml = 0, + scale = 0.5, + func_delay = 1.0, + }) + end + end + end, +} + +SMODS.DrawStep({ + key = "planetarium", + order = 25, + func = function(self) + if self.config.center.key ~= "j_entr_planetarium" then return end + local pos_map = { + ["High Card"] = {x = 1, y = 0}, + ["Pair"] = {x = 2, y = 0}, + ["Two Pair"] = {x = 3, y = 0}, + ["Three of a Kind"] = {x = 4, y = 0}, + ["Straight"] = {x = 5, y = 0}, + + ["Flush"] = {x = 1, y = 1}, + ["Full House"] = {x = 2, y = 1}, + ["Four of a Kind"] = {x = 3, y = 1}, + ["Straight Flush"] = {x = 4, y = 1}, + ["Five of a Kind"] = {x = 5, y = 1}, + + ["Flush House"] = {x = 1, y = 2}, + ["Flush Five"] = {x = 2, y = 2}, + ["entr_derivative"] = {x = 3, y = 2}, + } + local comp = Entropy.Planetarium[self.ability.extra.hand] or {} + local pos = comp.pos or pos_map[self.ability.extra.hand] or {x = 4, y = 2} + if self.ability.extra.pos ~= pos and pos then + self.ability.extra.pos = pos + self.children.floating_sprite.atlas = comp.atlas or G.ASSET_ATLAS["entr_planetarium"] + self.children.floating_sprite:set_sprite_pos(pos) + self.children.floating_sprite:reset() + end + end, + conditions = { vortex = false, facing = "front" }, +}) + +local double_down = { + order = 140, + object_type = "Joker", + key = "double_down", + rarity = 2, + cost = 6, + eternal_compat = true, + pos = {x = 8, y = 17}, + atlas = "jokers", + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + calculate = function(self, card, context) + if context.individual and not context.other_card.entr_will_be_marked and context.other_card.config.center_key == "m_lucky" and context.cardarea == G.play then + local c = context.other_card + c.entr_will_be_marked = true + G.E_MANAGER:add_event(Event{ + func = function() + c.ability.entr_marked = true + c.entr_will_be_marked = nil + return true + end + }) + return nil, true + end + end, + loc_vars = function(self, q) + q[#q+1] = G.P_CENTERS.m_lucky + q[#q+1] = {set = "Other", key = "entr_marked"} + end, + entr_credits = { + idea = {"cassknows"} + }, + generate_ui = function(self, info_queue, card, desc_nodes, specific_vars, full_UI_table) + SMODS.Center.generate_ui(self, info_queue, card, desc_nodes, specific_vars, full_UI_table) + + local cards = {} + for i, v in pairs(G.I.CARD) do + if v.ability and v.ability.entr_marked and not v.ability.entr_marked_bypass then + local s = v:save() + local c = Card(0,0, G.CARD_W, G.CARD_H, pseudorandom_element(G.P_CARDS,pseudoseed("")), G.P_CENTERS.c_base) + c:load(s) + c.ability = SMODS.shallow_copy(c.ability) + c.ability.entr_marked_bypass = true + v.ability.entr_marked_bypass = nil + table.insert(cards, c) + end + end + if #cards > 0 then + Entropy.card_area_preview(G.entrCardsPrev, desc_nodes, { + cards = cards, + override = true, + w = 2.2, + h = 0.6, + ml = 0, + scale = 0.5, + func_delay = 1.0, + }) + end + end, +} + +local wormwood = { + order = 141, + object_type = "Joker", + key = "wormwood", + rarity = 2, + cost = 6, + eternal_compat = true, + pos = {x = 7, y = 17}, + atlas = "jokers", + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + config = { + minus_mult = -0.25, + asc_power_chips = 0.05 + }, + calculate = function(self, card, context) + if context.individual and context.cardarea == G.play then + context.other_card.ability.perma_mult = context.other_card.ability.perma_mult + card.ability.minus_mult + return { + plus_asc = card.ability.asc_power_chips * context.other_card:get_chip_bonus() + } + end + end, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.minus_mult, + card.ability.asc_power_chips + } + } + end, + entr_credits = { + art = {"pangaea47"} + } +} + return { items = { surreal, @@ -7861,7 +8212,7 @@ return { ruby, slipstream, cass, - crabus, + user324897, hexa, grahkon, sandpaper, @@ -7957,6 +8308,11 @@ return { void_cradle, arachnophobia, pound_of_flesh, - fthof + fthof, + searing_joke, + ancestral_recall, + planetarium, + double_down, + wormwood } -} \ No newline at end of file +} diff --git a/items/jokers/rlegendary_jokers.lua b/items/jokers/rlegendary_jokers.lua index caf3718f..833a17c0 100644 --- a/items/jokers/rlegendary_jokers.lua +++ b/items/jokers/rlegendary_jokers.lua @@ -92,18 +92,8 @@ local tocihc = { if type == "Boss" then tag = Tag(get_next_tag_key()) - if context.forcetrigger then - G.GAME.blind.chips = G.GAME.blind.chips * 0.2 - G.GAME.blind.chip_text = number_format(G.GAME.blind.chips) - G.HUD_blind:recalculate() - end else - tag = Tag(G.GAME.round_resets.blind_tags[type]) - if not context.blueprint then - G.GAME.blind.chips = G.GAME.blind.chips * 0.2 - end - G.GAME.blind.chip_text = number_format(G.GAME.blind.chips) - G.HUD_blind:recalculate() + tag = Tag(G.GAME.round_resets.blind_tags[type]) --card:juice_up() end if Cryptid.is_shiny then @@ -232,7 +222,7 @@ local oinac = { calculate = function (self, card2, context) if context.destroy_card and context.cardarea == G.play and context.destroying_card then local card = copy_card(context.destroying_card) - SMODS.change_base(card, card.base.suit, Entropy.HigherCardRank(card)) + SMODS.change_base(card, card.base.suit, SMODS.modify_rank(card, 1)) card:add_to_deck() table.insert(G.playing_cards, card) G.hand:emplace(card) @@ -303,7 +293,7 @@ local entropy_card = { calculate = function (self, card, context) if context.joker_main or context.forcetrigger then return { - asc = 1+card.ability.num*card.ability.x_asc_mod + x_asc = 1+card.ability.num*card.ability.x_asc_mod } end end @@ -356,11 +346,11 @@ local kciroy = { }, demicoloncompat = true, add_to_deck = function(self, card) - Entropy.ChangeFullCSL(card.ability.csl) + Entropy.change_selection_limit(card.ability.csl) G.hand:change_size(math.min(card.ability.hs, 1000)) end, remove_from_deck = function(self, card) - Entropy.ChangeFullCSL(-card.ability.csl) + Entropy.change_selection_limit(-card.ability.csl) G.hand:change_size(-math.min(card.ability.hs, 1000)) end, calculate = function (self, card, context) @@ -406,8 +396,8 @@ local ybur = { cost = 20, blueprint_compat = true, eternal_compat = true, - pos = {x=2, y=0}, - soul_pos = {x = 1, y = 0}, + pos = {x=4, y=0}, + soul_pos = {x = 0, y = 0}, atlas = "ruby_atlas", demicoloncompat=true, loc_vars = function(self, info_queue, card) @@ -415,7 +405,7 @@ local ybur = { vars = { card.ability.e_chips, card.ability.e_chips_mod, - card.ability.active and localize("k_active") or localize("k_inactive") + card.ability.active and localize("k_active_ex") or localize("k_inactive_ex") }, } end, @@ -427,14 +417,8 @@ local ybur = { ref_table = card.ability, ref_value = "e_chips", scalar_value = "e_chips_mod", - scaling_message = { - message = localize({ - type = "variable", - key = "a_powchips", - vars = { card.ability.e_chips }, - }), - colour = { 0.8, 0.45, 0.85, 1 } - } + message_key = "a_powchips", + message_colour = { 0.8, 0.45, 0.85, 1 } }) end return { @@ -461,6 +445,7 @@ local ybur = { message = localize("k_reset") } end + end end, pronouns = "she_her", @@ -524,23 +509,6 @@ local zelavi = { pronouns = "he_they", } -function Entropy.missing_ranks() - local ranks = {} - for i, v in pairs(SMODS.Ranks) do - if not v.original_mod and not v.mod then ranks[v.id] = 0 end - end - for i, v in pairs(G.playing_cards or {}) do - if ranks[v.base.id] then - ranks[v.base.id] = ranks[v.base.id] + 1 - end - end - local total = 0 - for i, v in pairs(ranks) do - if v == 0 then total = total + 1 end - end - return total -end - local ssac = { order = 407, object_type = "Joker", @@ -571,8 +539,18 @@ local ssac = { calculate = function(self, card, context) if context.joker_main then for i = 1, math.min(math.ceil(Entropy.missing_ranks() / 2), (context.blueprint or context.repetition) and 1 or 99999) do - local j_r = (Cryptid.forcetrigger(G.jokers.cards[#G.jokers.cards], context) or {}).jokers - local c_r = G.consumeables.cards[#G.consumeables.cards] and Cryptid.forcetrigger(G.consumeables.cards[#G.consumeables.cards], context) or {} + Spectrallib.forcetrigger({ + card = G.jokers.cards[#G.jokers.cards], + context = context, + colour = Entropy.reverse_legendary_gradient, + message_card = card + }) + Spectrallib.forcetrigger({ + card = G.consumeables.cards[#G.consumeables.cards], + context = context, + colour = Entropy.reverse_legendary_gradient, + message_card = card + }) local v = G.play.cards[#G.play.cards] if G.play.cards and v then local results = eval_card(v, {cardarea=G.play,main_scoring=true, forcetrigger=true, individual=true}) or {} @@ -604,82 +582,6 @@ local ssac = { pronouns = "she_her", } -local subarc = { - order = 408, - object_type = "Joker", - key = "subarc", - dependencies = { - items = { - "set_entr_inversions", - } - }, - rarity = "entr_reverse_legendary", - cost = 20, - blueprint_compat = true, - eternal_compat = true, - pos = {x=2, y=3}, - soul_pos = {x = 3, y = 3}, - atlas = "ruby_atlas", - demicoloncompat=true, - config = { - mod = 0.05 - }, - entr_credits = { - art = {"Lil. Mr. Slipstream"}, - idea = {"crabus"}, - }, - loc_vars = function(self, info_queue, card) - info_queue[#info_queue+1] = G.P_CENTERS.e_entr_sunny - info_queue[#info_queue+1] = G.P_CENTERS.e_entr_solar - return { - vars = { - card.ability.mod - } - } - end, - calculate = function(self, card2, context) - if context.before then - for i, v in pairs(G.I.CARD) do - v.repetitions_triggered = 0 - end - end - if context.individual and context.cardarea == G.play then - context.other_card.repetitions_triggered = (context.other_card.repetitions_triggered or 0) + 1 - if context.other_card.repetitions_triggered > 1 then - local card = context.other_card - if not card.edition and not card.solar and not card.sunny then - card.sunny = true - G.E_MANAGER:add_event(Event{ - func = function() - card:set_edition("e_entr_sunny") - card:juice_up() - return true - end - }) - elseif (card.edition and card.edition.entr_sunny) or (card.sunny and not card.solar) then - card.solar = true - G.E_MANAGER:add_event(Event{ - func = function() - card:set_edition("e_entr_solar") - card:juice_up() - return true - end - }) - elseif (card.edition and card.edition.entr_solar) or card.solar then - card.edition.sol = card.edition.sol + card2.ability.mod - G.E_MANAGER:add_event(Event{ - func = function() - card:juice_up() - return true - end - }) - end - end - end - end, - pronouns = "he_him", -} - local axeh = { order = 409, object_type = "Joker", @@ -802,6 +704,25 @@ local nokharg = { pronouns = "he_him", } +SMODS.Shader{ + key = "pulseoutline", + path = "pulseoutline.fs", + send_vars = function() + local t = G.TIMERS.REAL or 0 + local grad = Entropy.current_rlegendary_gradient or Entropy.reverse_legendary_gradient + t = t % math.pi + return { + realtime = t, + outline_color = { + grad[1], + grad[2], + grad[3], + grad[4], + } + } + end +} + return { items = { oekrep, @@ -812,7 +733,6 @@ return { ybur, ssac, zelavi, - subarc, axeh, nokharg, SMODS.Mods.Cryptid and SMODS.Mods.Cryptid.can_load and entropy_card or nil, --lazy so this goes here diff --git a/items/jokers/void_jokers.lua b/items/jokers/void_jokers.lua new file mode 100644 index 00000000..299c1d3b --- /dev/null +++ b/items/jokers/void_jokers.lua @@ -0,0 +1,1356 @@ +local function text_width(text) + local size = 0.9 + local font = G.LANG.font + local calced_text_width = 0 + local offending_char_index + -- Math reproduced from DynaText:update_text + for i, c in utf8.chars(text or "") do + local tx = font.FONT:getWidth(c) * (0.33 * size) * G.TILESCALE * font.FONTSCALE + + 2.7 * 1 * G.TILESCALE * font.FONTSCALE + calced_text_width = calced_text_width + tx / (G.TILESIZE * G.TILESCALE) + end + + return calced_text_width * 0.75 +end + +local function name_text_better(key) + local ret_strings = {} + if pcall(function() + local name_text = G.localization.descriptions[G.P_CENTERS[key].set][key].name + if type(name_text) == "table" then + for i, line in ipairs(name_text) do + ret_strings[#ret_strings+1] = line + end + else + ret_strings = {name_text} + end + end) then + else ret_strings = {"ERROR"} end + return ret_strings +end + +function Entropy.generate_void_invert_uibox(center, info_queue, card, desc_nodes, specific_vars, full_UI_table) + -- generate normal joker ui + SMODS.Center.generate_ui(center, info_queue, card, desc_nodes, specific_vars, full_UI_table) + if center.generate_extra_ui then + center:generate_extra_ui(info_queue, card, desc_nodes, specific_vars, full_UI_table) + end + if not center.discovered or center.locked then return end + + local lines = SMODS.shallow_copy(G.localization.misc.v_dictionary_parsed.entr_void_desc or {}) + local vtext = localize{ type = "variable", key = "entr_void_desc", vars = { "a" } } -- the var doesn't matter here + + -- get every joker name + local names = {} + local commas = {} + for _, v in ipairs(center.corruptions) do + if G.P_CENTERS[v] then + for i, v in pairs(name_text_better(v)) do + names[#names+1] = v + end + commas[#commas+1] = #names + end + end + + local width_cap = text_width(vtext[1]) * 1.5 + local joker_lines = {{}} -- stores line info + local no_format_joker_lines = {""} -- keeps track of each line's length + local current_line = 1 + + local function add_name_to_desc(name, name_idx, multiline_part, multiline_last) + -- if a comma should be used + local separate = not (name_idx == #names or (multiline_part and not multiline_last)) and Spectrallib.in_table(commas, name_idx) + + -- check width + no_format_joker_lines[current_line] = no_format_joker_lines[current_line] .. name .. (separate and "," or "") + local too_wide = text_width(no_format_joker_lines[current_line]) > width_cap + + -- add name to lines + joker_lines[current_line][#joker_lines[current_line]+1] = { + strings = { name }, + control = { C = "attention" } + } + if separate then + joker_lines[current_line][#joker_lines[current_line]+1] = { + strings = { too_wide and "," or ", " }, + control = {} + } + end + + -- move to new line if current line has gotten too wide + if too_wide then + current_line = current_line + 1 + joker_lines[current_line] = {} + no_format_joker_lines[current_line] = "" + end + end + + -- go through all the names + for i, name in ipairs(names) do + add_name_to_desc(name, i) + end + + -- add lines to desc + for _, line in ipairs(joker_lines) do + lines[#lines+1] = line + end + + local localize_args = { + AUT = full_UI_table, + nodes = desc_nodes, + + vars = { + localize{ type = "name_text", set = "Joker", key = center.key } + } + } + -- taken from localize; adds the multibox + localize_args.AUT.multi_box = localize_args.AUT.multi_box or {} + local i = #full_UI_table.multi_box + 1 -- fucking janky ass method + for j, line in ipairs(lines) do + local final_line = SMODS.localize_box(line, localize_args) + if i == 1 or next(localize_args.AUT.info) then + localize_args.nodes[#localize_args.nodes+1] = final_line -- Sends main box to AUT.main + if not next(localize_args.AUT.info) then localize_args.nodes.main_box_flag = true end + elseif not next(localize_args.AUT.info) then + localize_args.AUT.multi_box[i-1] = localize_args.AUT.multi_box[i-1] or {} + localize_args.AUT.multi_box[i-1][#localize_args.AUT.multi_box[i-1]+1] = final_line + end + if not next(localize_args.AUT.info) and localize_args.AUT.box_colours then localize_args.AUT.box_colours[i] = localize_args.vars.box_colours and localize_args.vars.box_colours[i] or G.C.UI.BACKGROUND_WHITE end + end +end + +local apoptosis = { + order = 250, + object_type = "Joker", + key = "apoptosis", + rarity = "entr_void", + cost = 10, + eternal_compat = true, + perishable_compat = true, + demicoloncompat = true, + pos = {x = 0, y = 0}, + soul_pos = {x=0,y=1}, + atlas = "void_jokers", + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + corruptions = { + "j_entr_prismatic_shard", + "j_entr_blooming_crimson" + }, + config = { + extra = { + asc = 0.5 + } + }, + add_to_deck = function(self) + G.GAME.entr_perma_inversions = G.GAME.entr_perma_inversions or {} + for i, v in pairs(self.corruptions) do + G.GAME.entr_perma_inversions[v] = self.key + end + end, + calculate = function(self, card, context) + if context.individual and context.cardarea == G.hand and not context.end_of_round then + context.cardarea = G.play + context.main_scoring = true + local eval, post = eval_card(context.other_card, context) + context.cardarea = G.hand + context.main_scoring = nil + eval = eval or {} + local effects = {eval} + SMODS.calculate_context({individual = true, other_card=context.other_card, cardarea = G.play, scoring_hand = context.scoring_hand}) + for _,v in ipairs(post or {}) do effects[#effects+1] = v end + SMODS.trigger_effects(effects, context.other_card) + if context.other_card.config.center.set ~= "Enhanced" then + return { + plus_asc = card.ability.extra.asc + } + end + end + if context.forcetrigger then + for i, v in pairs(G.hand.cards) do + context.cardarea = G.play + context.main_scoring = true + local eval, post = eval_card(v, context) + context.cardarea = G.hand + context.main_scoring = nil + eval = eval or {} + local effects = {eval} + SMODS.calculate_context({individual = true, other_card=v, cardarea = G.play, scoring_hand = context.scoring_hand}) + for _,v in ipairs(post or {}) do effects[#effects+1] = v end + SMODS.trigger_effects(effects, v) + if v.config.center.set ~= "Enhanced" then + SMODS.calculate_effect{card = v, message_card = card, plus_asc = card.ability.extra.asc} + end + end + end + end, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.extra.asc + } + } + end, + generate_ui = Entropy.generate_void_invert_uibox, + entr_credits = {art = "pangaea47"} +} + +local egocentrism = { + order = 251, + object_type = "Joker", + key = "egocentrism", + rarity = "entr_void", + cost = 10, + eternal_compat = true, + perishable_compat = true, + demicoloncompat = true, + pos = {x = 1, y = 0}, + soul_pos = {x=1,y=1}, + atlas = "void_jokers", + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + corruptions = { + "j_blueprint", + "j_brainstorm", + "j_entr_broadcast", + "j_entr_polaroid" + }, + config = { + extra = { + asc = 0.5 + } + }, + add_to_deck = function(self) + G.GAME.entr_perma_inversions = G.GAME.entr_perma_inversions or {} + for i, v in pairs(self.corruptions) do + G.GAME.entr_perma_inversions[v] = self.key + end + end, + calculate = function(self, card, context) + if context.before and G.play.cards[1] then + G.play.cards[1]:set_debuff(true) + G.play.cards[1]:juice_up() + if G.play.cards[1] ~= G.play.cards[#G.play.cards] then + G.play.cards[#G.play.cards]:set_debuff(true) + G.play.cards[#G.play.cards]:juice_up() + end + end + if (context.joker_main or context.forcetrigger) and G.jokers.cards[#G.jokers.cards] ~= card then + Spectrallib.forcetrigger({ + card = G.jokers.cards[#G.jokers.cards], + context = context, + colour = Entropy.void_gradient, + message_card = card + }) + end + end, + loc_vars = function(self, info_queue, card) + card.ability.demicoloncompat_ui = card.ability.demicoloncompat_ui or "" + card.ability.demicoloncompat_ui_check = nil + local check = card.ability.check + return { + main_end = (card.area and card.area == G.jokers) + and { + { + n = G.UIT.C, + config = { align = "bm", minh = 0.4 }, + nodes = { + { + n = G.UIT.C, + config = { + ref_table = card, + align = "m", + -- colour = (check and G.C.cry_epic or G.C.JOKER_GREY), + colour = card.ability.colour, + r = 0.05, + padding = 0.08, + func = "blueprint_compat", + }, + nodes = { + { + n = G.UIT.T, + config = { + ref_table = card.ability, + ref_value = "demicoloncompat", + colour = G.C.UI.TEXT_LIGHT, + scale = 0.32 * 0.8, + }, + }, + }, + }, + }, + }, + } + or nil, + } + end, + update = function(self, card, front) + local other_joker = G.jokers and G.jokers.cards[#G.jokers.cards] + if G.STAGE == G.STAGES.RUN and other_joker then + local m = Cryptid.demicolonGetTriggerable(other_joker) + if m[1] and not m[2] then + card.ability.demicoloncompat = "Compatible" + card.ability.check = true + card.ability.colour = G.C.SECONDARY_SET.Enhanced + elseif m[2] then + card.ability.demicoloncompat = "Dangerous!" + card.ability.check = true + card.ability.colour = G.C.MULT + else + card.ability.demicoloncompat = "Incompatible" + card.ability.check = false + card.ability.colour = G.C.SUITS.Spades + end + end + end, + generate_ui = Entropy.generate_void_invert_uibox, +} + +local generator_meltdown = { + order = 252, + object_type = "Joker", + key = "generator_meltdown", + rarity = "entr_void", + cost = 10, + eternal_compat = true, + perishable_compat = true, + pos = {x = 2, y = 0}, + soul_pos = {x=2,y=1}, + atlas = "void_jokers", + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + corruptions = { + "j_space", + "j_burnt", + "j_supernova", + "j_entr_fused_lens" + }, + add_to_deck = function(self) + G.GAME.entr_perma_inversions = G.GAME.entr_perma_inversions or {} + for i, v in pairs(self.corruptions) do + G.GAME.entr_perma_inversions[v] = self.key + end + end, + generate_ui = Entropy.generate_void_invert_uibox, + entr_credits = {art = "pangaea47"} +} + +local voidheart = { + order = 253, + object_type = "Joker", + key = "voidheart", + rarity = "entr_void", + cost = 10, + eternal_compat = true, + perishable_compat = true, + pos = {x = 3, y = 0}, + soul_pos = {x=3,y=1}, + atlas = "void_jokers", + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + corruptions = { + "j_luchador", + "j_entr_blind_collectible_pack", + "j_entr_redkey" + }, + add_to_deck = function(self) + G.GAME.entr_perma_inversions = G.GAME.entr_perma_inversions or {} + for i, v in pairs(self.corruptions) do + G.GAME.entr_perma_inversions[v] = self.key + end + end, + loc_vars = function(self, q, card) + q[#q+1] = G.P_BLINDS.bl_entr_abyss + end, + generate_ui = Entropy.generate_void_invert_uibox, + entr_credits = {art = "pangaea47"} +} + +local unstable_rift = { + order = 254, + object_type = "Joker", + key = "unstable_rift", + rarity = "entr_void", + cost = 10, + eternal_compat = true, + pos = {x = 4, y = 0}, + soul_pos = {x=4,y=1}, + atlas = "void_jokers", + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + config = { + extra = { + mult = 0, + chips = 0, + val = 0 + } + }, + set_ability = function(self, card) + math.randomseed(os.time()) + card.ability.extra.val = card.ability.extra.val or math.random() --gay ass woke transgender math.random because syncing is for losers + end, + --this is seperate from inversions even though they are obtained via inverting so it gets to be different + corruptions = { + "j_mr_bones", + "j_entr_skullcry" + }, + generate_ui = function(self, info_queue, card, desc_nodes, specific_vars, full_UI_table) + Entropy.generate_void_invert_uibox(self, info_queue, card, desc_nodes, specific_vars, full_UI_table) + if G.jokers then + G.ARGS.flame_handler[tostring(card.ability.extra.val).."_chips"] = G.ARGS.flame_handler[tostring(card.ability.extra.val).."_chips"] or copy_table(G.ARGS.flame_handler.chips) + G.ARGS.flame_handler[tostring(card.ability.extra.val).."_chips"].id = "flame_"..tostring(card.ability.extra.val).."_chips" + G.ARGS.flame_handler[tostring(card.ability.extra.val).."_chips"].arg_tab = "flame_"..tostring(card.ability.extra.val).."_chips" + G.ARGS.flame_handler[tostring(card.ability.extra.val).."_mult"] = G.ARGS.flame_handler[tostring(card.ability.extra.val).."_mult"] or copy_table(G.ARGS.flame_handler.mult) + G.ARGS.flame_handler[tostring(card.ability.extra.val).."_mult"].id = "flame_"..tostring(card.ability.extra.val).."_mult" + G.ARGS.flame_handler[tostring(card.ability.extra.val).."_mult"].arg_tab = "flame_"..tostring(card.ability.extra.val).."_mult" + end + full_UI_table.main = { + {{ + n = G.UIT.C, + config = { align = "bm", minh = 0.4 }, + nodes = { + {n=G.UIT.R, config={align = "m", colour = G.C.BLACK, r = 0.05, padding = 0.1}, nodes={ + {n=G.UIT.C, config={align = "cr", minw = 1, minh = 0.5, r = 0.1, colour = G.C.BLUE, emboss = 0.05}, nodes={ + {n=G.UIT.O, config={func = 'flame_handler', no_role = true, id = 'flame_'..tostring(card.ability.extra.val).."_chips", object = Moveable(0,0,0,0), w = 0, h = 0, _w = 1 * 1.25, _h = 0.5 * 2.5}}, + {n=G.UIT.O, config={text = "chips_text", type = type, scale = 0.2*2.3, object = DynaText({ + string = {{ref_table = card.ability.extra, ref_value = "chips"}}, + colours = {G.C.UI.TEXT_LIGHT}, font = G.LANGUAGES['en-us'].font, shadow = true, float = true, scale = 0.2*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 = 0.2*2, colour = G.C.UI_MULT, shadow = true}}, + }}, + {n=G.UIT.C, config={align = "cl", minw = 1, minh = 0.5, r = 0.1, colour = G.C.RED, emboss = 0.05}, nodes={ + {n=G.UIT.O, config={func = 'flame_handler', no_role = true, id = 'flame_'..tostring(card.ability.extra.val).."_mult", object = Moveable(0,0,0,0), w = 0, h = 0, _w = 1 * 1.25, _h = 0.5 * 2.5}}, + {n=G.UIT.B, config={w = 0.1, h = 0.1}}, + {n=G.UIT.O, config={text = "mult_text", type = type, scale = 0.2*2.3, object = DynaText({ + string = {{ref_table = card.ability.extra, ref_value = "mult"}}, + colours = {G.C.UI.TEXT_LIGHT}, font = G.LANGUAGES['en-us'].font, shadow = true, float = true, scale = 0.2*2.3 + })}}, + }}, + }} + } + }}, + main_box_flag = true + } + end, + add_to_deck = function(self) + G.GAME.entr_perma_inversions = G.GAME.entr_perma_inversions or {} + for i, v in pairs(self.corruptions) do + G.GAME.entr_perma_inversions[v] = self.key + end + end, + entr_credits = {art = "pangaea47"} +} + +local calc_score = SMODS.calculate_round_score +SMODS.calculate_round_score = function(flames, ...) + if G.GAME.current_round.hands_left == 0 and next(SMODS.find_card("j_entr_unstable_rift")) then + local c = SMODS.find_card("j_entr_unstable_rift")[1] + return c.ability.extra.mult * c.ability.extra.chips + end + return calc_score(flames, ...) +end + +SMODS.Sticker({ + badge_colour = Entropy.void_gradient, + prefix_config = { key = false }, + key = "entr_death_mark", + atlas = "marked", + pos = { x = 1, y = 0 }, + should_apply = false, + draw = function(self, card) --don't draw shine + local notilt = nil + if card.area and card.area.config.type == "deck" then + notilt = true + end + G.shared_stickers[self.key].role.draw_major = card + G.shared_stickers[self.key]:draw_shader("dissolve", nil, nil, notilt, card.children.center) + end, + loc_vars = function(self, q, card) + if card.ability.consumeable then + return { + key = "entr_death_mark_consumeable" + } + end + end +}) + +SMODS.Sticker({ + badge_colour = Entropy.void_gradient, + prefix_config = { key = false }, + key = "void_temporary", + atlas = "marked", + pos = { x = 2, y = 0 }, + should_apply = false, + draw = function(self, card) --don't draw shine + local notilt = nil + if card.area and card.area.config.type == "deck" then + notilt = true + end + G.shared_stickers[self.key].role.draw_major = card + G.shared_stickers[self.key]:draw_shader("dissolve", nil, nil, notilt, card.children.center) + end, +}) + +local pluripotent_larvae = { + order = 255, + object_type = "Joker", + key = "pluripotent_larvae", + rarity = "entr_void", + cost = 10, + eternal_compat = true, + perishable_compat = true, + demicoloncompat = true, + pos = {x = 0, y = 2}, + soul_pos = {x=0,y=3}, + atlas = "void_jokers", + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + config = { + extra = { + asc_pow = 0, + asc_pow_mod = 0.3 + } + }, + corruptions = { + "j_riff_raff", + "j_invisible", + "j_entr_phantom_shopper", + }, + calculate = function(self, card, context) + if context.selling_self then + G.GAME.banned_keys.j_entr_pluripotent_larvae = true + local c = {} + for i, v in pairs(G.jokers.cards) do if v ~= card then c[#c+1] = v end end + Entropy.invert(c, true, true) + if #G.jokers.cards < G.jokers.config.card_limit then + for i = 1, G.jokers.config.card_limit - #G.jokers.cards + 1 do + G.E_MANAGER:add_event(Event{ + trigger = "after", + func = function() + play_sound("entr_void_generic") + SMODS.add_card { + set = "Joker", + rarity = "entr_void" + } + return true + end + }) + delay(1) + end + end + return nil, true + end + end, + add_to_deck = function(self) + G.GAME.entr_perma_inversions = G.GAME.entr_perma_inversions or {} + for i, v in pairs(self.corruptions) do + G.GAME.entr_perma_inversions[v] = self.key + end + end, + generate_ui = Entropy.generate_void_invert_uibox, +} + +local desiderium = { + order = 256, + object_type = "Joker", + key = "desiderium", + rarity = "entr_void", + cost = 10, + eternal_compat = true, + perishable_compat = true, + demicoloncompat = true, + pos = {x = 1, y = 2}, + soul_pos = {x=1,y=3}, + atlas = "void_jokers", + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + config = { + extra = { + joker_slots_mod = 1, + active = true + } + }, + corruptions = { + "j_entr_stand_arrow", + }, + calculate = function(self, card, context) + if context.end_of_round and context.main_eval then + if G.GAME.current_round.hands_left > 0 or G.GAME.current_round.discards_left > 0 then + card.ability.extra.active = nil + return { + message = localize("k_inactive_ex"), + colour = Entropy.void_gradient + } + end + end + if context.skip_blind then + card.ability.extra.active = nil + return { + message = localize("k_inactive_ex"), + colour = Entropy.void_gradient + } + end + if context.ante_end and context.ante_change then + if card.ability.extra.active then + G.E_MANAGER:add_event(Event{ + trigger = "after", + func = function() + card:juice_up() + Entropy.handle_card_limit(G.jokers, card.ability.extra.joker_slots_mod) + play_sound("entr_void_generic") + return true + end + }) + delay(1) + end + card.ability.extra.active = true + end + end, + add_to_deck = function(self) + G.GAME.entr_perma_inversions = G.GAME.entr_perma_inversions or {} + for i, v in pairs(self.corruptions) do + G.GAME.entr_perma_inversions[v] = self.key + end + end, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.extra.joker_slots_mod, + card.ability.extra.active and localize("k_active_ex") or localize("k_inactive_ex") + } + } + end, + generate_ui = Entropy.generate_void_invert_uibox, +} + +local nadir = { + order = 257, + object_type = "Joker", + key = "nadir", + rarity = "entr_void", + cost = 10, + eternal_compat = true, + perishable_compat = true, + demicoloncompat = true, + pos = {x = 2, y = 2}, + soul_pos = {x=2,y=3}, + atlas = "void_jokers", + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + config = { + extra = { + stored_jokers = {} + } + }, + corruptions = { + "j_entr_echo_chamber", + }, + calculate = function(self, card, context) + if (context.post_trigger and not context.other_card.debuff) or context.forcetrigger then + local key = pseudorandom_element(card.ability.extra.stored_jokers, pseudoseed("entr_nadir")) + local dummy + if key then + dummy = Entropy.get_dummy(G.P_CENTERS[key], card.area, card) + Spectrallib.forcetrigger{ + card = dummy, + silent = true + } + end + end + end, + can_use = function() + return #G.jokers.cards > 1 + end, + use = function(self, card) + for i, v in pairs(G.jokers.cards) do + if v ~= card then + local c = v + G.E_MANAGER:add_event(Event{ + trigger = "after", + delay = 0.5, + func = function() + play_sound("entr_void_suck") + card.ability.extra.stored_jokers[#card.ability.extra.stored_jokers+1] = c.config.center.key + c:start_dissolve() + return true + end + }) + end + end + end, + add_to_deck = function(self) + G.GAME.entr_perma_inversions = G.GAME.entr_perma_inversions or {} + for i, v in pairs(self.corruptions) do + G.GAME.entr_perma_inversions[v] = self.key + end + end, + loc_vars = function(self, q, card) + for i, v in pairs(card.ability.extra.stored_jokers) do q[#q+1] = G.P_CENTERS[v] end + end, + generate_ui = Entropy.generate_void_invert_uibox, + entr_credits = {art = "pangaea47"} +} + + +local yaldabaoth = { + order = 258, + object_type = "Joker", + key = "yaldabaoth", + rarity = "entr_void", + cost = 10, + eternal_compat = true, + perishable_compat = true, + demicoloncompat = true, + pos = {x = 3, y = 2}, + soul_pos = {x=3,y=3}, + atlas = "void_jokers", + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + config = { + extra = { + asc_pow = 0, + asc_pow_mod = 0.3 + } + }, + corruptions = { + "j_entr_sunny_joker", + "j_entr_dr_sunshine", + "j_entr_mark_of_the_beast", + }, + calculate = function(self, card, context) + if context.post_open_booster then + G.E_MANAGER:add_event(Event{ + trigger = "after", + blocking = false, + delay = 0.25, + func = function() + local card = pseudorandom_element(G.pack_cards.cards, pseudoseed("j_entr_chocolates")) + card.ability.entr_death_mark = true + card:juice_up() + return true + end + }) + return nil, true + end + if (context.post_trigger or context.individual) and context.other_card.ability and context.other_card.ability.entr_death_mark and not context.other_card.getting_sliced then + local c = context.other_card + c.getting_sliced = true + return { + func = function() + G.E_MANAGER:add_event(Event{ + func = function() + SMODS.scale_card(card, { + ref_table = card.ability.extra, + ref_value = "asc_pow", + scalar_value = "asc_pow_mod", + message_colour = Entropy.void_gradient + }) + SMODS.destroy_cards(c) + return true + end + }) + end + } + end + if context.using_consumeable and context.consumeable.ability.entr_death_mark then + SMODS.scale_card(card, { + ref_table = card.ability.extra, + ref_value = "asc_pow", + scalar_value = "asc_pow_mod", + message_colour = Entropy.void_gradient + }) + return nil, true + end + if context.joker_main or context.forcetrigger then + return { + plus_asc = card.ability.extra.asc_pow + } + end + end, + add_to_deck = function(self) + G.GAME.entr_perma_inversions = G.GAME.entr_perma_inversions or {} + for i, v in pairs(self.corruptions) do + G.GAME.entr_perma_inversions[v] = self.key + end + end, + loc_vars = function(self, q, card) + q[#q+1] = {set = "Other", key = "entr_death_mark"} + return { + vars = { + card.ability.extra.asc_pow_mod, + card.ability.extra.asc_pow + } + } + end, + generate_ui = Entropy.generate_void_invert_uibox, +} + +local mutagenesis = { + order = 259, + object_type = "Joker", + key = "mutagenesis", + rarity = "entr_void", + cost = 10, + eternal_compat = true, + perishable_compat = true, + demicoloncompat = true, + pos = {x = 4, y = 2}, + soul_pos = {x=4,y=3}, + atlas = "void_jokers", + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + config = { + extra = { + stored_jokers = {} + } + }, + corruptions = { + "j_dna", + "j_certificate", + "j_entr_jestradiol", + "j_entr_nucleotide" + }, + calculate = function(self, card, context) + if context.joker_main then + return Entropy.calc_perma_bonus_joker(card) + end + end, + add_to_deck = function(self) + G.GAME.entr_perma_inversions = G.GAME.entr_perma_inversions or {} + for i, v in pairs(self.corruptions) do + G.GAME.entr_perma_inversions[v] = self.key + end + end, + loc_vars = function(self, q, card) + for i, v in pairs(card.ability.extra.stored_jokers) do q[#q+1] = G.P_CENTERS[v] end + end, + generate_ui = Entropy.generate_void_invert_uibox, + generate_extra_ui = function(center, info_queue, card, desc_nodes, specific_vars, full_UI_table) + local vars = Entropy.get_perma_bonus_vars(card) + if vars and vars.nominal_chips then + localize{type = 'other', key = 'card_chips', nodes = desc_nodes, vars = {vars.nominal_chips}} + end + SMODS.localize_perma_bonuses(vars, desc_nodes) + end, + entr_credits = {art = "pangaea47"} +} + +local crooked_penny = { + order = 260, + object_type = "Joker", + key = "crooked_penny", + rarity = "entr_void", + cost = 10, + eternal_compat = true, + perishable_compat = true, + demicoloncompat = true, + pos = {x = 0, y = 4}, + soul_pos = {x=0,y=5}, + atlas = "void_jokers", + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + config = { + extra = { + mult = 1.5 + } + }, + corruptions = { + "j_credit_card", + "j_egg", + "j_entr_tenner", + "j_entr_oops_all_es", + "j_entr_masterful_gambit", + "j_entr_rugpull", + "j_entr_hash_miner", + }, + add_to_deck = function(self) + G.GAME.entr_perma_inversions = G.GAME.entr_perma_inversions or {} + for i, v in pairs(self.corruptions) do + G.GAME.entr_perma_inversions[v] = self.key + end + end, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.extra.mult + } + } + end, + generate_ui = Entropy.generate_void_invert_uibox, + entr_credits = {art = "pangaea47"} +} + +local phoenix_a = { + order = 261, + object_type = "Joker", + key = "phoenix_a", + rarity = "entr_void", + cost = 10, + eternal_compat = true, + perishable_compat = true, + demicoloncompat = true, + pos = {x = 1, y = 4}, + soul_pos = {x=1,y=5}, + atlas = "void_jokers", + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + config = { + extra = { + xchips = 1, + xmult = 1, + xchips_mod = 0.05, + xmult_mod = 0.05 + } + }, + calculate = function(self, card, context) + if context.before then + card.area:remove_card(card) + G.play:emplace(card) + card:highlight(true) + SMODS.change_base(card, "entr_nilsuit", "entr_nilrank") + G.E_MANAGER:add_event(Event{ + trigger = "after", + blocking = false, + func = function() + G.E_MANAGER:add_event(Event{ + trigger = "after", + func = function() + if card.area then + card.area:remove_card(card) + G.jokers:emplace(card) + end + return true + end + }) + return true + end + }) + local rank + for i = #G.play.cards, 1, -1 do + local dcard = G.play.cards[i] + local drank = dcard:get_id() + if dcard ~= card then + rank = rank or drank + if drank == rank then + G.play.cards[i].getting_sucked = true + SMODS.destroy_cards(dcard) + G.E_MANAGER:add_event(Event{ + func = function() + play_sound("entr_void_suck", nil, 3) + return true + end + }) + delay(0.5) + SMODS.scale_card(card, { + ref_table = card.ability.extra, + ref_value = "xmult", + scalar_value = "xmult_mod", + message_key = "a_xmult", + message_colour = G.C.RED + }) + SMODS.scale_card(card, { + ref_table = card.ability.extra, + ref_value = "xchips", + scalar_value = "xchips_mod", + message_key = "a_xchips", + message_colour = G.C.BLUE + }) + delay(0.5) + else + break + end + end + end + end + if context.individual and context.card == card then + return { + xmult = card.ability.extra.xmult, + xchips = card.ability.extra.xchips, + } + end + end, + corruptions = { + "j_trading", + "j_hologram", + "j_entr_memento_mori", + "j_entr_false_vacuum_collapse" + }, + add_to_deck = function(self) + G.GAME.entr_perma_inversions = G.GAME.entr_perma_inversions or {} + for i, v in pairs(self.corruptions) do + G.GAME.entr_perma_inversions[v] = self.key + end + end, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.extra.xmult_mod, + card.ability.extra.xchips_mod, + card.ability.extra.xmult, + card.ability.extra.xchips, + } + } + end, + generate_ui = Entropy.generate_void_invert_uibox, + entr_credits = {art = "pangaea47"} +} + +local antimatter_sheath = { + order = 262, + object_type = "Joker", + key = "antimatter_sheath", + rarity = "entr_void", + cost = 10, + eternal_compat = true, + perishable_compat = true, + demicoloncompat = true, + pos = {x = 2, y = 4}, + soul_pos = {x=2,y=5}, + atlas = "void_jokers", + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + config = { + extra = { + cards = 2, + xchips = 1, + xmult = 1, + xchips_mod = 0.05, + xmult_mod = 0.05 + } + }, + calculate = function(self, card, context) + if context.setting_blind or context.forcetrigger then + for i = 1, math.min(card.ability.extra.cards, 10) do + local _card = SMODS.create_card { key = "c_entr_dagger", area = G.discard } + _card.ability.void_temporary = true --third temporary because :3 + G.playing_card = (G.playing_card and G.playing_card + 1) or 1 + _card.playing_card = G.playing_card + table.insert(G.playing_cards, _card) + + G.E_MANAGER:add_event(Event({ + func = function() + G.hand:emplace(_card) + _card:start_materialize() + G.GAME.blind:debuff_card(_card) + G.hand:sort() + if context.blueprint_card then + context.blueprint_card:juice_up() + else + card:juice_up() + end + SMODS.calculate_context({ playing_card_added = true, cards = { _card } }) + return true + end + })) + save_run() + end + if not context.forcetrigger then return nil, true end + end + if context.individual and context.cardarea == G.play and context.other_card.config.center.key == "c_entr_dagger" then + local cards = {} + for i, v in pairs(G.hand.cards) do + if not SMODS.is_eternal(v) then + cards[#cards+1] = v + end + end + for i, v in pairs(G.discard.cards) do + if not SMODS.is_eternal(v) then + cards[#cards+1] = v + end + end + for i, v in pairs(G.deck.cards) do + if not SMODS.is_eternal(v) then + cards[#cards+1] = v + end + end + local c = pseudorandom_element(cards, pseudoseed("entr_sheath_destroy")) + SMODS.destroy_cards(c) + SMODS.scale_card(card, { + ref_table = card.ability.extra, + ref_value = "xmult", + scalar_value = "xmult_mod", + message_key = "a_xmult", + message_colour = G.C.RED + }) + SMODS.scale_card(card, { + ref_table = card.ability.extra, + ref_value = "xchips", + scalar_value = "xchips_mod", + message_key = "a_xchips", + message_colour = G.C.BLUE + }) + return nil, true + end + if context.joker_main or context.forcetrigger then + return { + xmult = card.ability.extra.xmult, + xchips = card.ability.extra.xchips, + } + end + end, + corruptions = { + "j_ceremonial", + "j_entr_solar_dagger", + "j_entr_insatiable_dagger", + "j_entr_antidagger" + }, + add_to_deck = function(self) + G.GAME.entr_perma_inversions = G.GAME.entr_perma_inversions or {} + for i, v in pairs(self.corruptions) do + G.GAME.entr_perma_inversions[v] = self.key + end + end, + loc_vars = function(self, q, card) + q[#q+1] = G.P_CENTERS.c_entr_dagger + return { + vars = { + card.ability.extra.cards, + card.ability.extra.xmult_mod, + card.ability.extra.xchips_mod, + card.ability.extra.xmult, + card.ability.extra.xchips, + } + } + end, + generate_ui = Entropy.generate_void_invert_uibox, +} + +local caledscratch = { + order = 263, + object_type = "Joker", + key = "caledscratch", + rarity = "entr_void", + cost = 10, + eternal_compat = true, + pos = {x = 3, y = 4}, + soul_pos = {x=3,y=5}, + atlas = "void_jokers", + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + config = { + extra = { + repetitions = 0 + } + }, + calculate = function(self, card, context) + if context.entr_repetition_blocked then + card.ability.extra.repetitions = card.ability.extra.repetitions + 1 + end + if context.retrigger_joker_check and context.other_card == card.area.cards[1] and card.ability.extra.repetitions > 0 then + local reps = card.ability.extra.repetitions + card.ability.extra.repetitions = 0 + return { + repetitions = reps, + colour = Entropy.void_gradient + } + end + end, + corruptions = { + "j_mime", + "j_dusk", + "j_sock_and_buskin", + "j_hack", + "j_selzer", + "j_entr_opal", + "j_entr_fasciation", + "j_entr_bell_curve", + "j_entr_rubber_ball", + "j_hanging_chad", + "j_entr_pineapple", + "j_entr_twisted_pair", + "j_entr_d7" + }, + add_to_deck = function(self) + G.GAME.entr_perma_inversions = G.GAME.entr_perma_inversions or {} + for i, v in pairs(self.corruptions) do + G.GAME.entr_perma_inversions[v] = self.key + end + end, + generate_ui = Entropy.generate_void_invert_uibox, +} + +local nyx = { + order = 264, + object_type = "Joker", + key = "nyx", + rarity = "entr_void", + cost = 20, + eternal_compat = true, + demicoloncompat = true, + pos = {x = 4, y = 4}, + soul_pos = {x=4,y=5}, + atlas = "void_jokers", + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + config = { + extra = { + mod = 3 + } + }, + in_pool = function() return false end, + calculate = function(self, card, context) + if context.setting_blind then + local num = 0 + for i, v in pairs(G.jokers.cards) do + if v.config.center.rarity ~= "entr_void" and not v.ability.void_temporary then + local card = SMODS.add_card{ + set = "Joker", rarity = "entr_void", edition = "e_negative" + } + card.ability.void_temporary = true + end + end + end + if context.forcetrigger then + G.E_MANAGER:add_event(Event{ + func = function() + local card = SMODS.add_card{ + set = "Joker", rarity = "entr_void", edition = "e_negative" + } + card.ability.void_temporary = true + return true + end + }) + end + end, + can_use = function(self, card) + local c = Entropy.get_highlighted_cards({{cards=G.I.CARD}}, card, 1, 1) + local cost = 0 + for i, v in pairs(c) do + cost = cost + card.ability.extra.mod * (card.sell_cost + v.sell_cost) + end + return G.GAME.dollars + (G.GAME.bankrupt_at or 0) >= cost + end, + use = function(self, card) + local c = Entropy.get_highlighted_cards({{cards=G.I.CARD}}, card, 1, 1) + local cost = 0 + for i, v in pairs(c) do + cost = cost + card.ability.extra.mod * (card.sell_cost + v.sell_cost) + v.ability.temporary = nil + v.ability.void_temporary = nil + v.ability.temporary2 = nil + local c2 = v + G.E_MANAGER:add_event(Event{ + trigger = "after", + func = function() + c2.area:remove_from_highlighted(c2) + c2:highlight() + play_sound("entr_void_suck") + return true + end + }) + delay(0.5) + end + ease_dollars(-cost) + end, + loc_vars = function(self, q, card) + q[#q+1] = {set = "Other", key = "void_temporary"} + local c = Entropy.get_highlighted_cards({{cards=G.I.CARD}}, card, 1, 1) + local cost = 0 + for i, v in pairs(c) do + cost = cost + card.ability.extra.mod * ((card.sell_cost or 10) + (v.sell_cost or 0)) + end + return { + vars = { + card.ability.extra.mod, + cost + } + } + end, + corruptions = { + "j_canio", + "j_triboulet", + "j_yorick", + "j_chicot", + "j_perkeo", + "j_entr_ruby", + "j_entr_slipstream", + "j_entr_cass", + "j_entr_hexa", + "j_entr_grahkon", + "j_entr_oinac", + "j_entr_teluobirt", + "j_entr_kciroy", + "j_entr_tocihc", + "j_entr_oekrep", + "j_entr_ybur", + "j_entr_zelavi", + "j_entr_ssac", + "j_entr_exah", + "j_entr_nokharg", + }, + add_to_deck = function(self) + G.GAME.entr_perma_inversions = G.GAME.entr_perma_inversions or {} + for i, v in pairs(self.corruptions) do + G.GAME.entr_perma_inversions[v] = self.key + end + end, + generate_ui = Entropy.generate_void_invert_uibox, +} + +return { + items = { + apoptosis, + egocentrism, + generator_meltdown, + voidheart, + unstable_rift, + pluripotent_larvae, + desiderium, + nadir, + mutagenesis, + crooked_penny, + yaldabaoth, + phoenix_a, + antimatter_sheath, + caledscratch, + nyx + } +} diff --git a/items/misc/atlases.lua b/items/misc/atlases.lua index f8d385ac..f0b1936c 100644 --- a/items/misc/atlases.lua +++ b/items/misc/atlases.lua @@ -320,4 +320,84 @@ SMODS.Atlas { path = "hold_me.png", px = 71, py = 95, - } \ No newline at end of file + } + +if (SMODS.Mods.Blindside or {}).can_load then + SMODS.Atlas { + key = 'blindside_tags', + path = 'crossmod/blindside_tags.png', + px = 34, + py = 34 + } + SMODS.Atlas { + key = 'blindside_blinds', + path = 'crossmod/blindside_blinds.png', + px = 71, + py = 95 + } +end + +if FinisherBossBlindStringMap then + SMODS.Atlas { + key = 'finity_jokers', + path = 'crossmod/finity_jokers.png', + px = 71, + py = 95 + } +end + +SMODS.Atlas { + key = "searing", + path = "searingjokesheet.png", + px = 43, + py = 9, +} + +SMODS.Atlas { + key = "planetarium", + path = "planetarium.png", + px = 71, + py = 95, +} + +SMODS.Atlas { + key = "modlogo", + path = "logo.png", + px = 583, + py = 280, +} + +SMODS.Atlas { + key = "apeirostemma", + path = "apeirostemma.png", + px = 71, + py = 95, +} + +SMODS.Atlas { + key = "rubysoul_big", + path = "ruby.png", + px = 71*3, + py = 95, +} + +SMODS.Atlas { + key = "titlecard", + path = "titlecard.png", + px = 122, + py = 122, +} + +SMODS.Atlas { + key = "curse_icons", + path = "curse_icons.png", + px = 34, + py = 34, +} + +SMODS.Atlas { + key = "void_jokers", + path = "void_jokers.png", + px = 71, + py = 95, +} \ No newline at end of file diff --git a/items/misc/blind_tokens.lua b/items/misc/blind_tokens.lua index 78917f9e..712fd822 100644 --- a/items/misc/blind_tokens.lua +++ b/items/misc/blind_tokens.lua @@ -1,6 +1,6 @@ Entropy.BlindC = {} local blinds = {} -function Entropy.RegisterBlinds() +function Entropy.register_blinds() local order = 12000 for i, v in pairs(G.P_BLINDS) do order = order + 1 @@ -70,7 +70,7 @@ function Entropy.RegisterBlinds() if not self.discovered then pos = {x = 9999, y = 9999} end - card.children.center.atlas = G.ANIMATION_ATLAS[not self.discovered and "entr_blank" or "blind_chips"] + card.children.center.atlas = G.ANIMATION_ATLAS["blind_chips"] card.children.center:set_sprite_pos({x=pos.x or 0, y=pos.y or 0}) if gc then card.children.center.T.h = 2 end end, @@ -156,11 +156,11 @@ function Entropy.RegisterBlinds() end if atlas and G.ANIMATION_ATLAS[atlas] and atlas ~= "blind_chips" then card.children.center.sprite_pos = {x=pos.x or 0, y=pos.y or 0} - card.children.center.atlas = G.ANIMATION_ATLAS[not self.discovered and "entr_blank" or atlas] + card.children.center.atlas = G.ANIMATION_ATLAS[atlas] card.children.center:reset() - card.children.center.atlas = G.ANIMATION_ATLAS[not self.discovered and "entr_blank" or atlas] + card.children.center.atlas = G.ANIMATION_ATLAS[atlas] else - card.children.center.atlas = G.ANIMATION_ATLAS[not self.discovered and "entr_blank" or "blind_chips"] + card.children.center.atlas = G.ANIMATION_ATLAS["blind_chips"] card.children.center:set_sprite_pos({x=pos.x or 0, y=pos.y or 0}) end if gc then card.children.center.T.h = 2 end diff --git a/items/misc/blinds.lua b/items/misc/blinds.lua index 6c53642b..66cea167 100644 --- a/items/misc/blinds.lua +++ b/items/misc/blinds.lua @@ -77,7 +77,7 @@ local dawn = { }, calculate = function(self, blind, context) if context.pre_discard and not G.GAME.blind.disabled then - Entropy.FlipThen(G.hand.highlighted, function(card, area) + Entropy.flip_then(G.hand.highlighted, function(card, area) SMODS.change_base(card, "entr_nilsuit", "entr_nilrank") end) end @@ -115,14 +115,14 @@ local orchard = { }, calculate = function(self, blind, context) if context.pre_discard and not G.GAME.blind.disabled then - Entropy.FlipThen(G.hand.cards, function(card, area) + Entropy.flip_then(G.hand.cards, function(card, area) if not card.highlighted then card:set_ability(G.P_CENTERS.m_entr_disavowed) end end) end if context.final_scoring_step and not G.GAME.blind.disabled then - Entropy.FlipThen(G.hand.cards, function(card, area) + Entropy.flip_then(G.hand.cards, function(card, area) card:set_ability(G.P_CENTERS.m_entr_disavowed) end) end @@ -157,23 +157,16 @@ local comet = { local remove = {} for i, v in pairs(G.hand.cards) do if v.destroy_adjacent and not v.destroyed_adjacent then - if G.hand.cards[i-1] and pseudorandom("citrine") < (Entropy.IsEE() and 0.2 or 0.5) and not SMODS.is_eternal(G.hand.cards[i-1]) then - G.hand.cards[i-1]:start_dissolve() - G.hand.cards[i-1].ability.temporary2 = true - remove[#remove+1]=G.hand.cards[i-1] + if G.hand.cards[i-1] and pseudorandom("citrine") < (Entropy.is_EE() and 0.2 or 0.5) and not SMODS.is_eternal(G.hand.cards[i-1]) then + SMODS.destroy_cards{G.hand.cards[i-1]} end - if G.hand.cards[i+1] and pseudorandom("citrine") < (Entropy.IsEE() and 0.2 or 0.5) and not SMODS.is_eternal(G.hand.cards[i-1]) then - G.hand.cards[i+1]:start_dissolve() - G.hand.cards[i+1].ability.temporary2 = true - remove[#remove+1]=G.hand.cards[i+1] + if G.hand.cards[i+1] and pseudorandom("citrine") < (Entropy.is_EE() and 0.2 or 0.5) and not SMODS.is_eternal(G.hand.cards[i-1]) then + SMODS.destroy_cards{G.hand.cards[i-1]} end v.destroy_adjacent = false v.destroyed_adjacent = true end end - if #remove >0 then - SMODS.calculate_context({remove_playing_cards = true, removed=remove}) - end end end, } @@ -238,7 +231,7 @@ local phase1 = { G.E_MANAGER:add_event(Event({ func = function() G.GAME.blind:set_blind(G.P_BLINDS[self.next_phase]) - Entropy.ChangePhase() + Entropy.change_phase() G.GAME.blind:juice_up() ease_hands_played(G.GAME.round_resets.hands-G.GAME.current_round.hands_left) ease_discard( @@ -251,6 +244,7 @@ local phase1 = { end end, set_blind = function() + G.GAME.EE_FADE_SPEED = nil G.GAME.EE_R = nil if not G.SPLASH_EE then G.SPLASH_EE = Sprite(-30, -13, G.ROOM.T.w+60, G.ROOM.T.h+22, G.ASSET_ATLAS["ui_1"], {x = 9999, y = 0}) @@ -261,7 +255,6 @@ local phase1 = { blockable = false, delay = 1 * G.SETTINGS.GAMESPEED, func = function() - G.GAME.EE_FADE = 0 G.SPLASH_EE:define_draw_steps({{ shader = 'entr_entropic_vortex', send = { @@ -311,6 +304,7 @@ local phase2 = { end, set_blind = function() G.GAME.EE_R = nil + G.GAME.EE_FADE_SPEED = nil if not G.SPLASH_EE then G.SPLASH_EE = Sprite(-30, -13, G.ROOM.T.w+60, G.ROOM.T.h+22, G.ASSET_ATLAS["ui_1"], {x = 9999, y = 0}) G.GAME.EE_FADE = 0 @@ -320,7 +314,6 @@ local phase2 = { blockable = false, delay = 1 * G.SETTINGS.GAMESPEED, func = function() - G.GAME.EE_FADE = 0 G.SPLASH_EE:define_draw_steps({{ shader = 'entr_entropic_vortex', send = { @@ -366,7 +359,7 @@ local phase3 = { if to_big(G.GAME.chips) > to_big(G.GAME.blind.chips) then G.GAME.chips = 0 G.GAME.blind:set_blind(G.P_BLINDS[self.next_phase]) - Entropy.ChangePhase() + Entropy.change_phase() G.GAME.blind:juice_up() ease_hands_played(G.GAME.round_resets.hands-G.GAME.current_round.hands_left) ease_discard( @@ -429,6 +422,7 @@ local phase3 = { G.GAME.blind.chip_text = number_format(G.GAME.blind.chips) G.HUD_blind:recalculate() G.GAME.EE_R = nil + G.GAME.EE_FADE_SPEED = nil if not G.SPLASH_EE then G.SPLASH_EE = Sprite(-30, -13, G.ROOM.T.w+60, G.ROOM.T.h+22, G.ASSET_ATLAS["ui_1"], {x = 9999, y = 0}) G.GAME.EE_FADE = 0 @@ -438,7 +432,6 @@ local phase3 = { blockable = false, delay = 1 * G.SETTINGS.GAMESPEED, func = function() - G.GAME.EE_FADE = 0 G.SPLASH_EE:define_draw_steps({{ shader = 'entr_entropic_vortex', send = { @@ -482,104 +475,9 @@ local phase4 = { 1, 1.5 }, in_pool = function() return false end, - calculate = function(self, blind, context) - for k, _ in pairs(Entropy.GetEEBlinds()) do - s = G.P_BLINDS[k] - if s.calculate then - s:calculate(blind, context) - end - end - end, set_blind = function(self, reset, silent) - for k, _ in pairs(Entropy.GetEEBlinds()) do - s = G.P_BLINDS[k] - if s.set_blind then - s:set_blind(reset, silent) - end - if s.name == "The Eye" and not reset then - G.GAME.blind.hands = { - ["Flush Five"] = false, - ["Flush House"] = false, - ["Five of a Kind"] = false, - ["Straight Flush"] = false, - ["Four of a Kind"] = false, - ["Full House"] = false, - ["Flush"] = false, - ["Straight"] = false, - ["Three of a Kind"] = false, - ["Two Pair"] = false, - ["Pair"] = false, - ["High Card"] = false, - } - end - if s.name == "The Mouth" and not reset then - G.GAME.blind.only_hand = false - end - if s.name == "The Fish" and not reset then - G.GAME.blind.prepped = nil - end - if s.name == "The Water" and not reset then - G.GAME.blind.discards_sub = G.GAME.current_round.discards_left - ease_discard(-G.GAME.blind.discards_sub) - end - if s.name == "The Needle" and not reset then - G.GAME.blind.hands_sub = G.GAME.round_resets.hands - 1 - ease_hands_played(-G.GAME.blind.hands_sub) - end - if s.name == "The Manacle" and not reset then - G.hand:change_size(-1) - end - if s.name == "Amber Acorn" and not reset and #G.jokers.cards > 0 then - G.jokers:unhighlight_all() - for k, v in ipairs(G.jokers.cards) do - v:flip() - end - if #G.jokers.cards > 1 then - G.E_MANAGER:add_event(Event({ - trigger = "after", - delay = 0.2, - func = function() - G.E_MANAGER:add_event(Event({ - func = function() - G.jokers:shuffle("aajk") - play_sound("cardSlide1", 0.85) - return true - end, - })) - delay(0.15) - G.E_MANAGER:add_event(Event({ - func = function() - G.jokers:shuffle("aajk") - play_sound("cardSlide1", 1.15) - return true - end, - })) - delay(0.15) - G.E_MANAGER:add_event(Event({ - func = function() - G.jokers:shuffle("aajk") - play_sound("cardSlide1", 1) - return true - end, - })) - delay(0.5) - return true - end, - })) - end - end - - --add new debuffs - for _, v in ipairs(G.playing_cards) do - if self:recalc_debuff(v, true) then v:set_debuff(true) end - end - for _, v in ipairs(G.jokers.cards) do - if not reset then - if self:recalc_debuff(v, true) then v:set_debuff(true) end - end - end - end G.GAME.EE_R = nil + G.GAME.EE_FADE_SPEED = nil if not G.SPLASH_EE then G.SPLASH_EE = Sprite(-30, -13, G.ROOM.T.w+60, G.ROOM.T.h+22, G.ASSET_ATLAS["ui_1"], {x = 9999, y = 0}) G.GAME.EE_FADE = 0 @@ -589,7 +487,6 @@ local phase4 = { blockable = false, delay = 1 * G.SETTINGS.GAMESPEED, func = function() - G.GAME.EE_FADE = 0 G.SPLASH_EE:define_draw_steps({{ shader = 'entr_entropic_vortex', send = { @@ -608,17 +505,9 @@ local phase4 = { end end, defeat = function(self, silent) - for k, _ in pairs(Entropy.GetEEBlinds()) do - if G.P_BLINDS[k].defeat then - G.P_BLINDS[k]:defeat(silent) - end - if G.P_BLINDS[k].name == "The Manacle" and not self.disabled then - G.hand:change_size(1) - end - end G.GAME.EEBeaten = true if G.GAME.EEBuildup then - Entropy.WinEE() + Entropy.win_EE() end G.GAME.EEBuildup = false check_for_unlock({ type = "beat_ee" }) @@ -637,285 +526,11 @@ local phase4 = { end }) end, - press_play = function(self) - for k, _ in pairs(Entropy.GetEEBlinds()) do - s = G.P_BLINDS[k] - if s.press_play then - s:press_play() - end - if s.name == "The Hook" then - G.E_MANAGER:add_event(Event({ - func = function() - local any_selected = nil - local _cards = {} - for k, v in ipairs(G.hand.cards) do - _cards[#_cards + 1] = v - end - for i = 1, 2 do - if G.hand.cards[i] then - local selected_card, card_key = pseudorandom_element(_cards, pseudoseed("ObsidianOrb")) - G.hand:add_to_highlighted(selected_card, true) - table.remove(_cards, card_key) - any_selected = true - play_sound("card1", 1) - end - end - if any_selected then - G.FUNCS.discard_cards_from_highlighted(nil, true) - end - return true - end, - })) - G.GAME.blind.triggered = true - delay(0.7) - end - if s.name == "Crimson Heart" then - if G.jokers.cards[1] then - G.GAME.blind.triggered = true - G.GAME.blind.prepped = true - end - end - if s.name == "The Fish" then - G.GAME.blind.prepped = true - end - if s.name == "The Tooth" then - G.E_MANAGER:add_event(Event({ - trigger = "after", - delay = 0.2, - func = function() - for i = 1, #G.play.cards do - G.E_MANAGER:add_event(Event({ - func = function() - G.play.cards[i]:juice_up() - return true - end, - })) - ease_dollars(-1) - delay(0.23) - end - return true - end, - })) - G.GAME.blind.triggered = true - end - end - end, - modify_hand = function(self, cards, poker_hands, text, mult, hand_chips) - local new_mult = mult - local new_chips = hand_chips - local trigger = false - for k, _ in pairs(Entropy.GetEEBlinds()) do - s = G.P_BLINDS[k] - if s.modify_hand then - local this_trigger = false - new_mult, new_chips, this_trigger = s:modify_hand(cards, poker_hands, text, new_mult, new_chips) - trigger = trigger or this_trigger - end - if s.name == "The Flint" then - G.GAME.blind.triggered = true - new_mult = math.max(math.floor(new_mult * 0.5 + 0.5), 1) - new_chips = math.max(math.floor(new_chips * 0.5 + 0.5), 0) - trigger = true - end - end - return new_mult or mult, new_chips or hand_chips, trigger - end, - debuff_hand = function(self, cards, hand, handname, check) - G.GAME.blind.debuff_boss = nil - for k, _ in pairs(Entropy.GetEEBlinds()) do - s = G.P_BLINDS[k] - if s.debuff_hand and s:debuff_hand(cards, hand, handname, check) then - G.GAME.blind.debuff_boss = s - return true - end - if s.debuff then - G.GAME.blind.triggered = false - if s.debuff.hand and next(hand[s.debuff.hand]) then - G.GAME.blind.triggered = true - G.GAME.blind.debuff_boss = s - return true - end - if s.debuff.h_size_ge and #cards < s.debuff.h_size_ge then - G.GAME.blind.triggered = true - G.GAME.blind.debuff_boss = s - return true - end - if s.debuff.h_size_le and #cards > s.debuff.h_size_le then - G.GAME.blind.triggered = true - G.GAME.blind.debuff_boss = s - return true - end - if s.name == "The Eye" then - if G.GAME.blind.hands[handname] then - G.GAME.blind.triggered = true - G.GAME.blind.debuff_boss = s - return true - end - if not check then - G.GAME.blind.hands[handname] = true - end - end - if s.name == "The Mouth" then - if s.only_hand and s.only_hand ~= handname then - G.GAME.blind.triggered = true - G.GAME.blind.debuff_boss = s - return true - end - if not check then - s.only_hand = handname - end - end - end - if s.name == "The Arm" then - G.GAME.blind.triggered = false - if to_big(G.GAME.hands[handname].level) > to_big(1) then - G.GAME.blind.triggered = true - if not check then - SMODS.upgrade_poker_hands{hands = handname, from = G.GAME.blind.children.animatedSprite, level_up = -1} - G.GAME.blind:wiggle() - end - end - end - if s.name == "The Ox" then - G.GAME.blind.triggered = false - if handname == G.GAME.current_round.most_played_poker_hand then - G.GAME.blind.triggered = true - if not check then - ease_dollars(-G.GAME.dollars, true) - G.GAME.blind:wiggle() - end - end - end - end - return false - end, - drawn_to_hand = function(self) - for k, _ in pairs(Entropy.GetEEBlinds()) do - s = G.P_BLINDS[k] - if s.drawn_to_hand then - s:drawn_to_hand() - end - if s.name == "Cerulean Bell" then - local any_forced = nil - for k, v in ipairs(G.hand.cards) do - if v.ability.forced_selection then - any_forced = true - end - end - if not any_forced then - G.hand:unhighlight_all() - local forced_card = pseudorandom_element(G.hand.cards, pseudoseed("ObsidianOrb")) - if focred_card then - forced_card.ability.forced_selection = true - G.hand:add_to_highlighted(forced_card) - end - end - end - if s.name == "Crimson Heart" and G.GAME.blind.prepped and G.jokers.cards[1] then - local jokers = {} - for i = 1, #G.jokers.cards do - if not G.jokers.cards[i].debuff or #G.jokers.cards < 2 then - jokers[#jokers + 1] = G.jokers.cards[i] - end - G.jokers.cards[i]:set_debuff(false) - end - local _card = pseudorandom_element(jokers, pseudoseed("ObsidianOrb")) - if _card then - _card:set_debuff(true) - _card:juice_up() - G.GAME.blind:wiggle() - end - end - end - end, - stay_flipped = function(self, area, card) - for k, _ in pairs(Entropy.GetEEBlinds()) do - s = G.P_BLINDS[k] - if s.stay_flipped and s:stay_flipped(area, card) then - return true - end - if area == G.hand then - if - s.name == "The Wheel" - and pseudorandom(pseudoseed("ObsidianOrb")) < G.GAME.probabilities.normal / 7 - then - return true - end - if - s.name == "The House" - and G.GAME.current_round.hands_played == 0 - and G.GAME.current_round.discards_used == 0 - then - return true - end - if s.name == "The Mark" and card:is_face(true) then - return true - end - if s.name == "The Fish" and G.GAME.blind.prepped then - return true - end - end - end - end, - recalc_debuff = function(self, card, from_blind) - if card and type(card) == "table" and card.area then - for k, _ in pairs(Entropy.GetEEBlinds()) do - s = G.P_BLINDS[k] - if s.debuff_card then - s:debuff_card(card, from_blind) - end - if s.recalc_debuff then - s:recalc_debuff(card, from_blind) - end - if s.debuff and not G.GAME.blind.disabled and card.area ~= G.jokers then - --this part is buggy for some reason - if s.debuff.suit and Card.is_suit(card, s.debuff.suit, true) then - card:set_debuff(true) - return - end - if s.debuff.is_face == "face" and Card.is_face(card, true) then - card:set_debuff(true) - return - end - if s.name == "The Pillar" and card.ability.played_this_ante then - card:set_debuff(true) - return - end - if s.debuff.value and s.debuff.value == card.base.value then - card:set_debuff(true) - return - end - if s.debuff.nominal and s.debuff.nominal == card.base.nominal then - card:set_debuff(true) - return - end - end - if s.name == "Crimson Heart" and not G.GAME.blind.disabled and card.area == G.jokers then - return - end - if s.name == "Verdant Leaf" and not G.GAME.blind.disabled and card.area ~= G.jokers then - card:set_debuff(true) - return - end - end - end - end, - cry_before_play = function(self) - for k, _ in pairs(Entropy.GetEEBlinds()) do - s = G.P_BLINDS[k] - if s.cry_before_play then - s:cry_before_play() - end - end - end, - cry_after_play = function(self) - for k, _ in pairs(Entropy.GetEEBlinds()) do - s = G.P_BLINDS[k] - if s.cry_after_play then - s:cry_after_play() - end - end - end, + get_copied_blinds = function() + local b = {} + for i, v in pairs(Entropy.get_EE_blinds()) do b[#b+1] = i end + return b + end } local endless_entropy = { @@ -966,12 +581,19 @@ local alabaster = { local highlight_ref = Card.highlight function Card:highlight(is_highlighted) - if Entropy.BlindIs("bl_entr_alabaster_anchor") and self.area == G.hand and G.hand then + if Entropy.blind_is("bl_entr_alabaster_anchor") and not G.GAME.blind.disabled and self.area == G.hand and G.hand then for i = 1, #G.jokers.cards do Cryptid.manipulate(G.jokers.cards[i], { value = 0.95 }) G.jokers.cards[i].config.cry_multiply = (G.jokers.cards[i].config.cry_multiply or 1) * 0.95 end end + if next(SMODS.find_card("j_entr_citrine_comet")) and self.edition and self.edition.negative then + if is_highlighted then + Entropy.change_selection_limit(1) + else + Entropy.change_selection_limit(-1) + end + end highlight_ref(self, is_highlighted) end @@ -991,7 +613,7 @@ end local ease_bg_cref = ease_background_colour_blind function ease_background_colour_blind(state, blind_override) - if G.GAME.EEBuildup and not Entropy.IsEE() then + if G.GAME.EEBuildup and not Entropy.is_EE() then ease_background_colour{new_colour = HEX("5f5f5f"), contrast = 3} else return ease_bg_cref(state, blind_override) @@ -1000,7 +622,7 @@ end local ease_bg_c_ref = ease_background_colour function ease_background_colour(tbl,...) - if G.GAME.EEBuildup and not Entropy.IsEE() then + if G.GAME.EEBuildup and not Entropy.is_EE() then ease_bg_c_ref{new_colour = HEX("5f5f5f"), contrast = 3} else return ease_bg_c_ref(tbl,...) @@ -1020,7 +642,7 @@ SMODS.Shader({ local void = { dependencies = { items = { - "set_entr_inversions" + "set_entr_blinds" } }, object_type = "Blind", @@ -1038,7 +660,7 @@ local void = { local rr = { dependencies = { items = { - "set_entr_inversions" + "set_entr_blinds" } }, object_type = "Blind", @@ -1051,6 +673,112 @@ local rr = { dollars = 3, in_pool = function(self) return false end } +if SMODS.ScreenShader then + SMODS.ScreenShader({ + key="eeshader", + path="eeshader.fs", + send_vars = function (sprite, card) + local t = G.TIMERS.REAL or 0 + t = t - 5000*math.floor(t/5000) + return { + realtime = t + } + end, + should_apply = function() + return G.GAME.EEBuildup or Entropy.is_EE() or (G.GAME.EE_FADE or 0) > 0 + end + }) + + SMODS.ScreenShader({ + key="vignette", + path="vignette.fs", + send_vars = function (sprite, card) + return { + power = G.GAME.entr_vignette_power or 2 + } + end, + should_apply = function() + return G.GAME.entr_vignette_power or G.entr_invert_enabled + end + }) + --TODO: special thanks in credits to lily for these two shaders + SMODS.ScreenShader { + key = "flashlight", + path = "flashlight.fs", + send_vars = function(self) + local t = G.TIMERS.REAL or 0 + t = t - 5000*math.floor(t/5000) + return { + center_pos = G.entr_flashlight_center or { love.graphics.getWidth() / 2, love.graphics.getHeight() / 2 }, + dist = G.entr_flashlight_distance or 500, + time = t or 0 + } + end, + should_apply = function(self) + return G.entr_flashlight_enabled + end, + order = 5, + + SMODS.ScreenShader { + key = "invert", + path = "invertradius.fs", + send_vars = function(self) + local t = G.TIMERS.REAL or 0 + t = t - 5000*math.floor(t/5000) + return { + center_pos = G.entr_invert_center or { love.graphics.getWidth() / 2, love.graphics.getHeight() / 2 }, + dist = G.entr_invert_distance or 500, + time = t or 0 + } + end, + should_apply = function(self) + return G.entr_invert_enabled + end, + order = 7 + } +} +end + +local abyss = { + dependencies = { + items = { + "set_entr_blinds" + } + }, + object_type = "Blind", + order = 4201, + key = "abyss", + pos = { x = 0, y = 16 }, + atlas = "redroom", + boss_colour = HEX("80396f"), + mult=1, + dollars = 3, + in_pool = function(self) return false end, + get_copied_blinds = function() + return G.GAME.abyss_blinds + end, + set_blind = function() + G.GAME.abyss_blinds = G.GAME.abyss_blinds or {} + G.GAME.blind.chips = G.GAME.blind.chips * (G.GAME.abyss_size_mod or 1) + G.GAME.blind.chip_text = number_format(G.GAME.blind.chips) + G.HUD_blind:recalculate() + end +} + +function Entropy.progress_abyss() + SMODS.ante_end = true; ease_ante(1) + SMODS.ante_end = nil; delay(0.4) + G.GAME.abyss_size_mod = 1 + G.GAME.abyss_blinds = {get_new_boss()} + G.GAME.abyss_just_lost = true +end + +function Entropy.defeat_abyss() + G.GAME.abyss_just_lost = nil + G.GAME.abyss_size_mod = (G.GAME.abyss_size_mod or 1) * 1.5 + G.GAME.abyss_blinds = G.GAME.abyss_blinds or {} + G.GAME.abyss_blinds[#G.GAME.abyss_blinds+1] = get_new_boss() +end return { items = { @@ -1066,6 +794,7 @@ return { endless_entropy, alabaster, void, - rr + rr, + abyss } } diff --git a/items/misc/boosters.lua b/items/misc/boosters.lua index a32a7455..35f8eb7a 100644 --- a/items/misc/boosters.lua +++ b/items/misc/boosters.lua @@ -167,7 +167,7 @@ function Entropy.get_rare_inversion(seed) local pool = {} for i, k in pairs(Entropy.RareInversions) do local v = G.P_CENTERS[k] - if not (G.GAME.used_jokers[v.key] and not SMODS.showman(v.key) and not v.can_repeat_soul) and (not v.in_pool or (type(v.in_pool) ~= "function") or v:in_pool({})) then + if not (G.GAME.used_jokers[v.key] and not SMODS.showman(v.key) and not v.can_repeat_soul) and SMODS.add_to_pool(v, {}) then pool[#pool+1] = k end end @@ -187,11 +187,25 @@ function create_inverted_card(area, seed) end end end - if Entropy.has_rune("rune_entr_oss") and not Entropy.has_rune("rune_entr_oss").triggered then - local c = Entropy.get_rare_inversion("rune_entr_oss") + if pseudorandom("entr_twisted_corrupted") < 0.01 then -- 1% chance + if num - 0.003 <= 0 or (Entropy.has_rune("rune_entr_oss") and not Entropy.has_rune("rune_entr_oss").triggered) then + if c then + if not (num - 0.003 <= 0) then + calculate_runes({generate_rare_consumable = true}) + Entropy.has_rune("rune_entr_oss").triggered = true + end + return SMODS.create_card{key = "j_entr_nyx"} + end + end + return SMODS.create_card{set = "Joker", rarity = "entr_void"} + end + if num - 0.003 <= 0 or (Entropy.has_rune("rune_entr_oss") and not Entropy.has_rune("rune_entr_oss").triggered) then + local c = Entropy.get_rare_inversion(not (num - 0.003 <= 0) and "rune_entr_oss" or nil) if c then - calculate_runes({generate_rare_consumable = true}) - Entropy.has_rune("rune_entr_oss").triggered = true + if not (num - 0.003 <= 0) then + calculate_runes({generate_rare_consumable = true}) + Entropy.has_rune("rune_entr_oss").triggered = true + end return create_card(G.P_CENTERS[c].set, area or G.pack_cards, nil, nil, true, true, c) end else @@ -205,12 +219,6 @@ function create_inverted_card(area, seed) return create_card("Spectral", area or G.pack_cards, nil, nil, true, true, nil, "rune_entr_mannaz") end end - if num - 0.003 <= 0 then - local c = Entropy.get_rare_inversion() - if c then - return create_card(G.P_CENTERS[c].set, area or G.pack_cards, nil, nil, true, true, c) - end - end local rune if pseudorandom("entr_generate_rune") < 0.06 then rune = true end if G.GAME.entr_diviner then diff --git a/items/misc/challenges.lua b/items/misc/challenges.lua index d358fbf0..1ae840de 100644 --- a/items/misc/challenges.lua +++ b/items/misc/challenges.lua @@ -27,6 +27,7 @@ local hyperbolic_chamber = { local gsr = Game.start_run function Game:start_run(args) + G.GAME.EE_SCREEN = nil G.butterfly_jokers = CardArea( 9999, 9999, 0, @@ -34,6 +35,7 @@ function Game:start_run(args) {card_limit = 9999, type = 'joker', highlight_limit = 0} ) G.HUD_runes = {} + G.HUD_curses = {} G.runes = {} gsr(self, args) if G.GAME.modifiers.entr_starting_ante_mten and not args.savetext then @@ -42,7 +44,15 @@ function Game:start_run(args) for i, v in pairs(G.butterfly_jokers.cards) do v:add_to_deck() end - if Entropy.DeckOrSleeve("doc") then + if G.GAME.curse then + add_curse_icon(Tag("tag_entr_curse_indicator")) + local atlas = Entropy.curses[G.GAME.curse].atlas or "entr_curse_icons" + local pos = Entropy.curses[G.GAME.curse].sprite_pos or {x = 0, y = 0} + local sprite = G.HUD_curses[1].actual.HUD_sprite + sprite.atlas = G.ASSET_ATLAS[atlas] + sprite:set_sprite_pos(pos) + end + if Entropy.deck_or_sleeve("doc") then -- G.HUD:remove() -- G.HUD = nil -- G.HUD = UIBox{ @@ -62,11 +72,11 @@ function Game:start_run(args) if G.GAME.cry_percrate and not G.GAME.cry_percrate["rune"] then G.GAME.cry_percrate["rune"] = 0 end G.jokers.config.highlighted_limit = 1e100 G.consumeables.config.highlighted_limit = 1e100 - if G.SPLASH_EE and not Entropy.IsEE() then + if G.SPLASH_EE and not Entropy.is_EE() then G.SPLASH_EE:remove() G.SPLASH_EE = nil end - if Entropy.IsEE() then + if Entropy.is_EE() then if not G.SPLASH_EE then G.SPLASH_EE = Sprite(-30, -13, G.ROOM.T.w+60, G.ROOM.T.h+22, G.ASSET_ATLAS["ui_1"], {x = 9999, y = 0}) end diff --git a/items/misc/content_sets.lua b/items/misc/content_sets.lua index 74915be2..c7bc7382 100644 --- a/items/misc/content_sets.lua +++ b/items/misc/content_sets.lua @@ -35,15 +35,13 @@ SMODS.ContentSet({ cry_order = 2, }) -if (SMODS.Mods["Cryptid"] or SMODS.Mods["vallkarri"] or {}).can_load then - SMODS.ContentSet({ - key = "entropics", - atlas = "exotic_jokers", - pos = { x = 3, y = 2 }, - soul_pos = { x = 5, y = 2, extra = { x = 4, y = 2 } }, - cry_order = 3, - }) -end +SMODS.ContentSet({ + key = "entropics", + atlas = "exotic_jokers", + pos = { x = 3, y = 2 }, + soul_pos = { x = 5, y = 2, extra = { x = 4, y = 2 } }, + cry_order = 3, +}) SMODS.ContentSet({ key = "vouchers", diff --git a/items/misc/dailies.lua b/items/misc/dailies.lua index bcab6d92..92363e0f 100644 --- a/items/misc/dailies.lua +++ b/items/misc/dailies.lua @@ -9,7 +9,7 @@ Entropy.SpecialDailies["06/01"] = { {id="entr_set_seed", value = "PRIDMNTH"} } }, - restrictions = Entropy.DailyBanlist(), + restrictions = Entropy.daily_banlist(), key = "c_entr_daily", id = "c_entr_daily", original_key = "daily", @@ -33,7 +33,7 @@ Entropy.SpecialDailies["06/02"] = { {id="entr_set_seed", value = "ASCPAIR2"} } }, - restrictions = Entropy.DailyBanlist(), + restrictions = Entropy.daily_banlist(), key = "c_entr_daily", id = "c_entr_daily", original_key = "daily", @@ -57,7 +57,7 @@ Entropy.SpecialDailies["06/04"] = { {id="entr_set_seed", value = "MEATNOIA"} } }, - restrictions = Entropy.DailyBanlist(), + restrictions = Entropy.daily_banlist(), key = "c_entr_daily", id = "c_entr_daily", original_key = "daily", @@ -81,7 +81,7 @@ Entropy.SpecialDailies["06/05"] = { {id="entr_set_seed", value = "CRACKEGG"} } }, - restrictions = Entropy.DailyBanlist(), + restrictions = Entropy.daily_banlist(), key = "c_entr_daily", id = "c_entr_daily", original_key = "daily", @@ -103,7 +103,7 @@ Entropy.SpecialDailies["06/06"] = { {id="entr_set_seed", value = "FRKYFDAY"} } }, - restrictions = Entropy.DailyBanlist(), + restrictions = Entropy.daily_banlist(), key = "c_entr_daily", id = "c_entr_daily", original_key = "daily", @@ -131,7 +131,7 @@ Entropy.SpecialDailies["06/08"] = { {id="entr_set_seed", value = "LOSEFACE"} } }, - restrictions = Entropy.DailyBanlist(), + restrictions = Entropy.daily_banlist(), key = "c_entr_daily", id = "c_entr_daily", original_key = "daily", @@ -169,7 +169,7 @@ Entropy.SpecialDailies["06/09"] = { {id="entr_set_seed", value = "5083L15K"} } }, - restrictions = Entropy.DailyBanlist(), + restrictions = Entropy.daily_banlist(), key = "c_entr_daily", id = "c_entr_daily", original_key = "daily", @@ -195,7 +195,7 @@ Entropy.SpecialDailies["06/10"] = { {id="entr_set_seed", value = "00000O00"} } }, - restrictions = Entropy.DailyBanlist(), + restrictions = Entropy.daily_banlist(), key = "c_entr_daily", id = "c_entr_daily", original_key = "daily", @@ -220,7 +220,7 @@ Entropy.SpecialDailies["06/11"] = { {id="entr_set_seed", value = "M1551NGN0"} } }, - restrictions = Entropy.DailyBanlist(), + restrictions = Entropy.daily_banlist(), key = "c_entr_daily", id = "c_entr_daily", original_key = "daily", @@ -258,7 +258,7 @@ Entropy.SpecialDailies["06/13"] = { {id="entr_set_seed", value = "1D4BL00N"} } }, - restrictions = Entropy.DailyBanlist(), + restrictions = Entropy.daily_banlist(), key = "c_entr_daily", id = "c_entr_daily", original_key = "daily", @@ -283,7 +283,7 @@ Entropy.SpecialDailies["06/14"] = { {id="entr_set_seed", value = "ST4RG4ZE"} } }, - restrictions = Entropy.DailyBanlist(), + restrictions = Entropy.daily_banlist(), key = "c_entr_daily", id = "c_entr_daily", original_key = "daily", @@ -305,7 +305,7 @@ Entropy.SpecialDailies["06/15"] = { {id="entr_set_seed", value = "DELT4T43"} } }, - restrictions = Entropy.DailyBanlist(), + restrictions = Entropy.daily_banlist(), key = "c_entr_daily", id = "c_entr_daily", original_key = "daily", @@ -327,7 +327,7 @@ local function check_daily_seed(code, body, headers) Entropy.DAILYSEED = os.date("%x") end end -function Entropy.UpdateDailySeed() +function Entropy.update_daily_seed() if Cryptid_config.HTTPS and https and https.asyncRequest then https.asyncRequest( "https://tools.aimylogic.com/api/now?tz=Europa/England&format=dd/MM/yyyy", diff --git a/items/misc/decks.lua b/items/misc/decks.lua index 30b78ffa..c3741888 100644 --- a/items/misc/decks.lua +++ b/items/misc/decks.lua @@ -16,7 +16,7 @@ local twisted = { G.GAME.round_resets.path_toggled = true G.GAME.entr_alt = not G.GAME.entr_alt G.GAME.round_resets.blind_choices.Boss = get_new_boss() - ease_background_colour{new_colour = Entropy.get_bg_colour(), contrast = 1} + ease_background_colour{new_colour = Spectrallib.get_bg_colour(), contrast = 1} if G.ARGS.spin then G.ARGS.spin.real = (G.SETTINGS.reduced_motion and 0 or 1)*(G.GAME.entr_alt and 0.3 or -0.3) end end, entr_credits = {art = {"Lil. Mr. Slipstream"}} @@ -233,7 +233,7 @@ end local get_type_colourref = get_type_colour function get_type_colour(_c, card) - if Entropy.IsEE() and card.debuff then + if Entropy.is_EE() and card.debuff then return Entropy.reverse_legendary_gradient end if card and card.ability and card.ability.glitched_crown and G.P_CENTERS[card.ability.glitched_crown[card.glitched_index]] then @@ -246,7 +246,7 @@ local can_use_ref = G.FUNCS.can_use_consumeable G.FUNCS.can_use_consumeable = function(e) local card = e.config.ref_table if card.ability.glitched_crown and G.P_CENTERS[card.ability.glitched_crown[card.glitched_index]] then - if Card.can_use_consumeable(Entropy.GetDummy(G.P_CENTERS[card.ability.glitched_crown[card.glitched_index]], card.area, card)) then + if Card.can_use_consumeable(Entropy.get_dummy(G.P_CENTERS[card.ability.glitched_crown[card.glitched_index]], card.area, card)) then e.config.colour = G.C.RED e.config.button = 'use_card' else @@ -262,7 +262,7 @@ local buy_and_use_ref = G.FUNCS.can_buy_and_use G.FUNCS.can_buy_and_use = function(e) local card = e.config.ref_table if card.ability.glitched_crown and G.P_CENTERS[card.ability.glitched_crown[card.glitched_index]] then - if (((to_big(e.config.ref_table.cost) > to_big(G.GAME.dollars - G.GAME.bankrupt_at)) and (to_big(e.config.ref_table.cost) > to_big(0))) or (not Card.can_use_consumeable(Entropy.GetDummy(G.P_CENTERS[card.ability.glitched_crown[card.glitched_index]], card.area, card)))) then + if (((to_big(e.config.ref_table.cost) > to_big(G.GAME.dollars - G.GAME.bankrupt_at)) and (to_big(e.config.ref_table.cost) > to_big(0))) or (not Card.can_use_consumeable(Entropy.get_dummy(G.P_CENTERS[card.ability.glitched_crown[card.glitched_index]], card.area, card)))) then e.UIBox.states.visible = false e.config.colour = G.C.UI.BACKGROUND_INACTIVE e.config.button = nil @@ -323,6 +323,76 @@ function calculate_reroll_cost(...) return ret end +local containment = { + object_type = "Back", + order = 7009, + dependencies = { + items = { + "set_entr_decks" + } + }, + object_type = "Back", + name = "Deck of Containment", + key = "doc", + pos = { x = 2, y = 0 }, + atlas = "decks", + apply = function(self) + G.GAME.entropy = 0 + end, + in_pool = function() return next(SMODS.find_card("j_entr_parakmi")) end, --redeem stuff + calculate = function(self,back,context) + if context.final_scoring_step and number_format(0.002 + (0.998^(G.GAME.entropy/2))) ~= "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 to_big(G.GAME.hands[context.scoring_name].AscensionPower or 0) > to_big(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 and "talisman_echip" or "cryl_echips", 1) + attention_text({ + scale = 1.4, + text = "^"..tostring(number_format(0.002 + (0.998^(G.GAME.entropy/2)))).." Chips", + hold = 2, + align = "cm", + offset = { x = 0, y = -2.7 }, + major = G.play, + }) + return true + end, + })) + return { + Echip_mod = 0.01 + (0.998^(G.GAME.entropy/2)), + 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(2) else ease_entropy(1) end + end + end + if context.after then + for i, v in pairs(G.jokers.cards) do + if v.edition and v.edition.key then ease_entropy(2) end + if i > G.jokers.config.card_limit then ease_entropy(1) end + end + end + end, + loc_vars = function() + return { + key = not (SMODS.Mods.Cryptid or {}).can_load and "b_entr_doc_cryptidless" or nil + } + end, +} + if CardSleeves then CardSleeves.Sleeve { key = "twisted", @@ -333,7 +403,7 @@ if CardSleeves then G.GAME.round_resets.path_toggled = true G.GAME.entr_alt = not G.GAME.entr_alt G.GAME.round_resets.blind_choices.Boss = get_new_boss() - ease_background_colour{new_colour = Entropy.get_bg_colour(), contrast = 1} + ease_background_colour{new_colour = Spectrallib.get_bg_colour(), contrast = 1} if G.ARGS.spin then G.ARGS.spin.real = (G.SETTINGS.reduced_motion and 0 or 1)*(G.GAME.entr_alt and 0.3 or -0.3) end @@ -450,11 +520,87 @@ if CardSleeves then atlas = "sleeves", pos = { x = 7, y = 0 }, apply = function() - change_shop_size(-1) - G.GAME.modifiers.glitched_items = (G.GAME.modifiers.glitched_items or 0) + 2 + change_shop_size(-1) + G.GAME.modifiers.glitched_items = (G.GAME.modifiers.glitched_items or 0) + 2 end, entr_credits = {art = {"LFMoth"}} } + + CardSleeves.Sleeve { + key = "doc", + atlas = "sleeves", + pos = { x = 2, y = 0 }, + loc_vars = function() + return { + key = not (SMODS.Mods.Cryptid or {}).can_load and "sleeve_entr_doc_cryptidless" or nil + } + end, + in_pool = function() return next(SMODS.find_card("j_entr_parakmi")) end, --redeem stuff + apply = function() + if G.GAME.selected_back and G.GAME.selected_back.effect.center.original_key == "doc" then + G.E_MANAGER:add_event(Event({ + trigger = 'after', + func = function() + SMODS.add_card({ + rarity = "entr_entropic", + area = G.jokers, + set = "Joker", + key_append = "entr_doc_combo" + }) + return true + end + })) + else + G.GAME.entropy = 0 + end + end, + calculate = function(self,back,context) + if context.final_scoring_step and number_format(0.002 + (0.998^(G.GAME.entropy/2))) ~= "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 to_big(G.GAME.hands[context.scoring_name].AscensionPower or 0) > to_big(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 and "talisman_echip" or "cryl_echips", 1) + attention_text({ + scale = 1.4, + text = "^"..tostring(number_format(0.002 + (0.998^(G.GAME.entropy/2)))).." Chips", + hold = 2, + align = "cm", + offset = { x = 0, y = -2.7 }, + major = G.play, + }) + return true + end, + })) + return { + Echip_mod = 0.01 + (0.998^(G.GAME.entropy/2)), + 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(2) else ease_entropy(1) end + end + end + if context.after then + for i, v in pairs(G.jokers.cards) do + if v.edition and v.edition.key then ease_entropy(2) end + if i > G.jokers.config.card_limit then ease_entropy(1) end + end + end + end + } end return { @@ -467,6 +613,7 @@ return { butterfly, gemstone, corrupted, - discordant + discordant, + containment } } \ No newline at end of file diff --git a/items/misc/editions.lua b/items/misc/editions.lua index 6454dd19..fd3d9bfd 100644 --- a/items/misc/editions.lua +++ b/items/misc/editions.lua @@ -41,7 +41,7 @@ local solar = { and context.cardarea == G.play ) then - return { asc = card and card.edition and card.edition.sol or 1.4 } + return { x_asc = card and card.edition and card.edition.sol or 1.4 } end if context.joker_main then card.config.trigger = true @@ -110,7 +110,7 @@ local fractured ={ context.main_scoring and context.cardarea == G.play ) then - return Entropy.RandomForcetrigger(card, card and card.edition and card.edition.retrig or 3, context) + return Entropy.random_forcetrigger(card, card and card.edition and card.edition.retrig or 3, context) end end, entr_credits = { @@ -237,18 +237,143 @@ local freaky = { if AurinkoAddons then AurinkoAddons.entr_solar = function(card, hand, instant, amount) if to_big(G.GAME.hands[hand].AscensionPower or 0) > to_big(0) then - local num = G.GAME.hands[hand].AscensionPower * ((card.edition.sol-1) ^ (amount or 1)) - SMODS.upgrade_poker_hands({hands = hand, from = card, ascension_power = num}) + local handname = hand + local used_consumable = card + local c + local m + local chips = Entropy.ascend_hand(G.GAME.hands[handname].chips, handname) + local mult = Entropy.ascend_hand(G.GAME.hands[handname].mult, handname) + if not instant then + c = copy_table(G.C.UI_CHIPS) + m = copy_table(G.C.UI_MULT) + 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 = "..." } + ) + end + local amt = G.GAME.hands[handname].AscensionPower + G.GAME.hands[handname].AscensionPower = to_big((G.GAME.hands[handname].AscensionPower or 0)) * (to_big(card.edition.sol) ^ (amount or 1)) + amt = G.GAME.hands[handname].AscensionPower - amt + chips = Entropy.ascend_hand(G.GAME.hands[handname].chips, handname) - chips + mult = Entropy.ascend_hand(G.GAME.hands[handname].mult, handname) - mult + if G.entr_add_to_stats then + SMODS.Scoring_Parameters.chips.current = SMODS.Scoring_Parameters.chips.current + chips + SMODS.Scoring_Parameters.mult.current = SMODS.Scoring_Parameters.mult.current + mult + end + if not instant then + 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, HEX("ffb400"), 0.1) + ease_colour(G.C.UI_MULT, HEX("ffb400"), 0.1) + Cryptid.pulse_flame(0.01, sunlevel) + if used_consumable and used_consumable.juice_up then used_consumable:juice_up(0.8, 0.5) end + G.E_MANAGER:add_event(Event({ + trigger = "after", + blockable = false, + blocking = false, + delay = 1.2, + func = function() + ease_colour(G.C.UI_CHIPS, c, 1) + ease_colour(G.C.UI_MULT, m, 1) + return true + end, + })) + return true + end, + })) + end + if not instant then + update_hand_text({ sound = "button", volume = 0.7, pitch = 0.9, delay = 0 }, { level ="X"..number_format((to_big(card.edition.sol) ^ (amount or 1))) }) + delay(1.6) + end + if not instant then + delay(1.6) + update_hand_text( + { sound = "button", volume = 0.7, pitch = 1.1, delay = 0 }, + { mult = 0, chips = 0, handname = "", level = "" } + ) + delay(1) + end + G.hand:parse_highlighted() + G.GAME.current_round.current_hand.cry_asc_num = 0 + G.GAME.current_round.current_hand.cry_asc_num_text = "" end end AurinkoAddons.entr_sunny = function(card, hand, instant, amount) - local num = 4*(amount or 1) - SMODS.upgrade_poker_hands({hands = hand, from = card, ascension_power = num}) + local amt = 2*(amount or 1) + local handname = hand + local used_consumable = card + local c + local m + local chips = Entropy.ascend_hand(G.GAME.hands[handname].chips, handname) + local mult = Entropy.ascend_hand(G.GAME.hands[handname].mult, handname) + if not instant then + c = copy_table(G.C.UI_CHIPS) + m = copy_table(G.C.UI_MULT) + 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 = "..." } + ) + end + G.GAME.hands[handname].AscensionPower = to_big((G.GAME.hands[handname].AscensionPower or 0)) + to_big(amt) + chips = Entropy.ascend_hand(G.GAME.hands[handname].chips, handname) - chips + mult = Entropy.ascend_hand(G.GAME.hands[handname].mult, handname) - mult + if G.entr_add_to_stats then + SMODS.Scoring_Parameters.chips.current = SMODS.Scoring_Parameters.chips.current + chips + SMODS.Scoring_Parameters.mult.current = SMODS.Scoring_Parameters.mult.current + mult + end + if not instant then + 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, HEX("ffb400"), 0.1) + ease_colour(G.C.UI_MULT, HEX("ffb400"), 0.1) + Cryptid.pulse_flame(0.01, sunlevel) + if used_consumable and used_consumable.juice_up then used_consumable:juice_up(0.8, 0.5) end + G.E_MANAGER:add_event(Event({ + trigger = "after", + blockable = false, + blocking = false, + delay = 1.2, + func = function() + ease_colour(G.C.UI_CHIPS, c, 1) + ease_colour(G.C.UI_MULT, m, 1) + return true + end, + })) + return true + end, + })) + end + if not instant then + update_hand_text({ sound = "button", volume = 0.7, pitch = 0.9, delay = 0 }, { level = (to_big(amt) > to_big(0) and "+" or "")..number_format(to_big(amt) ) }) + delay(1.6) + end + if not instant then + delay(1.6) + update_hand_text( + { sound = "button", volume = 0.7, pitch = 1.1, delay = 0 }, + { mult = 0, chips = 0, handname = "", level = "" } + ) + delay(1) + end + G.hand:parse_highlighted() + G.GAME.current_round.current_hand.cry_asc_num = 0 + G.GAME.current_round.current_hand.cry_asc_num_text = "" end AurinkoAddons.entr_freaky = function(card, hand, instant, amount) local hand_chips = G.GAME.hands[hand].chips - local mult = math.max(Entropy.ApproximateLogRecursion(hand_chips, card.edition.log_base, amount), hand_chips)/hand_chips - hand_chips = math.max(Entropy.ApproximateLogRecursion(hand_chips, card.edition.log_base, amount), hand_chips) + local mult = math.max(Entropy.approximate_log_recursion(hand_chips, card.edition.log_base, amount), hand_chips)/hand_chips + hand_chips = math.max(Entropy.approximate_log_recursion(hand_chips, card.edition.log_base, amount), hand_chips) G.GAME.hands[hand].chips = hand_chips if not instant then G.E_MANAGER:add_event(Event({ @@ -328,10 +453,6 @@ local neon = { local set_cost_ref = Card.set_cost function Card:set_cost() - if self.config.center.set == "Back" or self.config.center.set == "Sleeve" then - self.config.center.cost = 15 - self.base_cost = 15 - end set_cost_ref(self) for i, v in pairs(G.I.CARD) do if v.edition and v.edition.key == "e_entr_neon" and v.area and v.area.config.type ~= "shop" and not v.debuff then @@ -467,7 +588,7 @@ local kaleidoscopic = { eval = eval or {} local effects = {eval} if context.main_scoring then - eval.chips = v.base.nominal + v.ability.bonus or 0 + eval.chips = v:get_chip_bonus() or 0 SMODS.calculate_context({individual = true, other_card=v, cardarea = v.area}) end for _,v in ipairs(post or {}) do effects[#effects+1] = v end @@ -524,7 +645,11 @@ local gilded = { trigger = "after", delay = 1, func = function() - Cryptid.forcetrigger(Entropy.GetDummy(card.config.center, G.consumeables, card), context) + Spectrallib.forcetrigger({ + card = Entropy.get_dummy(card.config.center, G.consumeables, card), + context = context, + silent = true + }) return true end }) @@ -540,6 +665,11 @@ function Card:click(...) if G.SETTINGS.paused and self.edition and G.P_CENTERS[self.edition.key] and G.P_CENTERS[self.edition.key].sound then play_sound(G.P_CENTERS[self.edition.key].sound.sound, G.P_CENTERS[self.edition.key].sound.volume) end + if self.config.center.key == "j_entr_title_card" then + G.back_to_main = true + G.FUNCS["openModUI_entr"]() + G.back_to_main = nil + end if G.SETTINGS.paused and self.config and self.config.center_key == "j_entr_amaryllis" then self.ability.colour = ({ white = "red", diff --git a/items/misc/enhancements.lua b/items/misc/enhancements.lua index 3dc31323..3405f911 100644 --- a/items/misc/enhancements.lua +++ b/items/misc/enhancements.lua @@ -27,10 +27,7 @@ local flesh = { calculate = function(self, card, context) if (context.pre_discard and context.cardarea == G.hand and card.highlighted and pseudorandom("flesh") < (card.ability.cry_rigged and card.ability.extra.odds or G.GAME.probabilities.normal*(card.ability.extra.numerator/card.ability.extra.odds))) then - card.ability.temporary2 = true - card:remove_from_deck() - card:start_dissolve() - SMODS.calculate_context({remove_playing_cards = true, removed={card}}) + SMODS.destroy_cards{card} end end, entr_credits = { @@ -64,7 +61,7 @@ local prismatic = { "set_entr_entropics" } }, - order = 10000+4, + order = math.huge, object_type = "Enhancement", key = "prismatic", atlas = "enhancements", @@ -212,8 +209,8 @@ local ceramic = { card:flip() else card:shatter() + SMODS.destroy_cards(card, nil, nil, true) end - card.ability.temporary2 = true return true end, })) @@ -228,8 +225,8 @@ local ceramic = { card:flip() else card:shatter() + SMODS.destroy_cards(card, nil, nil, true) end - card.ability.temporary2 = true return true end, })) @@ -323,15 +320,15 @@ local kiln = { }, pos = {x=0,y=0}, use = function(self, card2) - local cards = Entropy.GetHighlightedCards({G.hand}, card2, 1, card2.ability.select) - Entropy.FlipThen(cards, function(card) + local cards = Entropy.get_highlighted_cards({G.hand}, card2, 1, card2.ability.select) + Entropy.flip_then(cards, function(card) card:set_ability(G.P_CENTERS.m_entr_ceramic) G.hand:remove_from_highlighted(card) end) end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local num = #Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) return num > 0 and num <= card.ability.select end, loc_vars = function(self, q, card) @@ -368,15 +365,15 @@ local comet = { }, pos = {x=0,y=3}, use = function(self, card2) - local cards = Entropy.GetHighlightedCards({G.hand}, card2, 1, card2.ability.select) - Entropy.FlipThen(cards, function(card) + local cards = Entropy.get_highlighted_cards({G.hand}, card2, 1, card2.ability.select) + Entropy.flip_then(cards, function(card) card:set_ability(G.P_CENTERS.m_entr_radiant) G.hand:remove_from_highlighted(card) end) end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + local num = #Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.select) return num > 0 and num <= card.ability.select end, loc_vars = function(self, q, card) @@ -518,6 +515,7 @@ local samsara = { G.E_MANAGER:add_event(Event{ func = function() SMODS.destroy_cards(card) + card.ability.temporary2 = true return true end }) @@ -591,4 +589,4 @@ return { ethereal, samsara } -} \ No newline at end of file +} diff --git a/items/misc/other.lua b/items/misc/other.lua index 2eaf567e..835937a6 100644 --- a/items/misc/other.lua +++ b/items/misc/other.lua @@ -93,19 +93,21 @@ SMODS.PokerHandPart { local all_pure = true if G.GAME.starting_params.akyrs_starting_letters then return {} end for i, card in ipairs(hand) do - if SMODS.has_no_suit(card) or card.config.center.key == "m_stone" - or card.config.center.overrides_base_rank - or card.base.suit == "entr_nilsuit" - or card.base.value == "entr_nilrank" - or SMODS.has_no_rank(card) - then --card.ability.name ~= "Gold Card" - eligible_cards[#eligible_cards+1] = card - end - if (SMODS.Mods["Cryptid"] or {}).can_load and card.config.center.key == "m_stone" then - stones = stones + 1 - end - if not card.ability.akyrs_special_card_type then - all_pure = false + if not BLINDSIDE or not BLINDSIDE.is_blindside(card.config.center.key) then + if SMODS.has_no_suit(card) or card.config.center.key == "m_stone" + or card.config.center.overrides_base_rank + or card.base.suit == "entr_nilsuit" + or card.base.value == "entr_nilrank" + or SMODS.has_no_rank(card) + then --card.ability.name ~= "Gold Card" + eligible_cards[#eligible_cards+1] = card + end + if (SMODS.Mods["Cryptid"] or {}).can_load and card.config.center.key == "m_stone" then + stones = stones + 1 + end + if not card.ability.akyrs_special_card_type then + all_pure = false + end end end if stones >= 5 or all_pure then return {} end @@ -183,103 +185,6 @@ local wormhole = { end, } -function Entropy.l_chipsmult(hand, card, l_chips, l_mult, instant) - if not instant then - update_hand_text({delay = 0}, {handname = localize(hand, "poker_hands"), level = G.GAME.hands[hand].level, mult = Entropy.ascend_hand(G.GAME.hands[hand].mult, hand), chips = Entropy.ascend_hand(G.GAME.hands[hand].chips, hand)}) - delay(1) - G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.2, func = function() - play_sound('tarot1') - if card and card.juice_up then card:juice_up(0.8, 0.5) end - G.TAROT_INTERRUPT_PULSE = true - return true end - })) - update_hand_text({delay = 0}, {handname = localize("k_level_chips"), chips = G.GAME.hands[hand].l_chips, mult = G.GAME.hands[hand].l_mult}) - delay(2) - end - G.GAME.hands[hand].l_chips = G.GAME.hands[hand].l_chips + l_chips - if not instant then - update_hand_text({sound = 'button', volume = 0.7, pitch = 0.9, delay = 0}, {chips = G.GAME.hands[hand].l_chips, StatusText = true}) - delay(0.7) - G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.2, func = function() - play_sound('tarot1') - if card and card.juice_up then card:juice_up(0.8, 0.5) end - G.TAROT_INTERRUPT_PULSE = true - return true end - })) - update_hand_text({delay = 0}, {handname = localize("k_level_mult"), chips = G.GAME.hands[hand].l_chips, mult = G.GAME.hands[hand].l_mult}) - delay(2) - G.GAME.hands[hand].l_mult = G.GAME.hands[hand].l_mult + l_mult - update_hand_text({sound = 'button', volume = 0.7, pitch = 0.9, delay = 0}, {mult = G.GAME.hands[hand].l_mult, StatusText = true}) - delay(0.7) - G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.2, func = function() - play_sound('tarot1') - if card and card.juice_up then card:juice_up(0.8, 0.5) end - G.TAROT_INTERRUPT_PULSE = true - return true end - })) - delay(1.3) - end - Cryptid.reset_to_none() -end - -function Entropy.xl_chips(hand, card, l_chips, instant) - if not instant then - update_hand_text({delay = 0}, {handname = localize(hand, "poker_hands"), level = G.GAME.hands[hand].level, mult = Entropy.ascend_hand(G.GAME.hands[hand].mult, hand), chips = Entropy.ascend_hand(G.GAME.hands[hand].chips, hand)}) - delay(1) - G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.2, func = function() - play_sound('tarot1') - if card and card.juice_up then card:juice_up(0.8, 0.5) end - G.TAROT_INTERRUPT_PULSE = true - return true end - })) - update_hand_text({delay = 0}, {handname = localize("k_level_chips"), chips = G.GAME.hands[hand].l_chips, mult = G.GAME.hands[hand].l_mult}) - delay(2) - end - G.GAME.hands[hand].l_chips = G.GAME.hands[hand].l_chips * l_chips - if not instant then - update_hand_text({sound = 'button', volume = 0.7, pitch = 0.9, delay = 0}, {chips = "X"..number_format(l_chips), StatusText = true}) - delay(0.7) - update_hand_text({delay = 0}, {handname = localize("k_level_mult"), chips = G.GAME.hands[hand].l_chips, mult = G.GAME.hands[hand].l_mult}) - G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.2, func = function() - play_sound('tarot1') - if card and card.juice_up then card:juice_up(0.8, 0.5) end - G.TAROT_INTERRUPT_PULSE = true - return true end - })) - delay(1.3) - end - Cryptid.reset_to_none() -end - -function Entropy.xl_mult(hand, card, l_mult, instant) - if not instant then - update_hand_text({delay = 0}, {handname = localize(hand, "poker_hands"), level = G.GAME.hands[hand].level, mult = Entropy.ascend_hand(G.GAME.hands[hand].mult, hand), chips = Entropy.ascend_hand(G.GAME.hands[hand].chips, hand)}) - delay(1) - G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.2, func = function() - play_sound('tarot1') - if card and card.juice_up then card:juice_up(0.8, 0.5) end - G.TAROT_INTERRUPT_PULSE = true - return true end - })) - update_hand_text({delay = 0}, {handname = localize("k_level_mult"), chips = G.GAME.hands[hand].l_chips, mult = G.GAME.hands[hand].l_mult}) - delay(2) - end - G.GAME.hands[hand].l_mult = G.GAME.hands[hand].l_mult * l_mult - if not intant then - update_hand_text({sound = 'button', volume = 0.7, pitch = 0.9, delay = 0}, {mult = "X"..number_format(l_mult), StatusText = true}) - delay(0.7) - update_hand_text({delay = 0}, {handname = localize("k_level_mult"), chips = G.GAME.hands[hand].l_chips, mult = G.GAME.hands[hand].l_mult}) - G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.2, func = function() - play_sound('tarot1') - if card and card.juice_up then card:juice_up(0.8, 0.5) end - G.TAROT_INTERRUPT_PULSE = true - return true end - })) - delay(1.3) - end - Cryptid.reset_to_none() -end - local tyche = { dependencies = { items = { diff --git a/items/misc/rarities.lua b/items/misc/rarities.lua index edf016a9..69abc815 100644 --- a/items/misc/rarities.lua +++ b/items/misc/rarities.lua @@ -1,50 +1,3 @@ -Entropy.entropic_gradient = SMODS.Gradient { - key = "entropic_gradient", - colours = { - G.C.RED, - G.C.GOLD, - G.C.GREEN, - G.C.BLUE, - G.C.PURPLE - } -} - -Entropy.transgender_gradient = SMODS.Gradient { - key = "transgender_gradient", - colours = { - HEX("5bcefa"), - HEX("f5a9b8"), - } -} - -Entropy.reverse_legendary_gradient = SMODS.Gradient { - key = "reverse_legendary_gradient", - colours = { - HEX("ff00c4"), - HEX("FF00FF"), - HEX("FF0000"), - } -} - -Entropy.zenith_gradient = SMODS.Gradient{ - key = "zenith_gradient", - colours = { - HEX("a20000"), - HEX("a15000"), - HEX("a3a101"), - HEX("626262"), - HEX("416600"), - HEX("028041"), - HEX("008284"), - HEX("005683"), - HEX("000056"), - HEX("2b0157"), - HEX("6a016a"), - HEX("77003c"), - } -} - - SMODS.Rarity { key = "entropic", badge_colour = Entropy.entropic_gradient @@ -76,7 +29,7 @@ function loc_colour(_c, default) entr_eqchips = HEX("5b89a6"), entr_freaky = HEX("ff00ea"), entr_transparent = {0,0,0,0}, - entr_trans = Entropy.transgender_gradient + entr_trans = Entropy.transgender_gradient, } for k, v in pairs(new_colors) do @@ -85,4 +38,23 @@ function loc_colour(_c, default) end return loc_colour_ref(_c, default) -end \ No newline at end of file +end + +local ease_colour_ref = ease_colour +function ease_colour(orig, new, ...) + if new.colours then orig = new return end + return ease_colour_ref(orig, new, ...) +end + +SMODS.Rarity { + key = "void", + badge_colour = Entropy.void_gradient, + default_weight = 0, + pools = { ["Joker"] = true }, + get_weight = function(self, weight, object_type) + if G.GAME.entr_alt then + return 0.03 + end + return 0 + end, +} \ No newline at end of file diff --git a/items/misc/runes.lua b/items/misc/runes.lua index 26fd02ea..7488dffa 100644 --- a/items/misc/runes.lua +++ b/items/misc/runes.lua @@ -531,7 +531,7 @@ local fehu_indicator = { if G.GAME.providence then mult = 1 end - Entropy.FlipThen(G.jokers.cards, function(card) + Entropy.flip_then(G.jokers.cards, function(card) card.ability.extra_value = (card.ability.extra_value or 0) + context.card.sell_cost * mult card:set_cost() end) @@ -771,13 +771,14 @@ local haglaz_indicator = { dependencies = {items = {"set_entr_runes"}}, calculate = function(self, rune, context) if context.after then - local cards = G.play.cards + local cards = {} + for i, v in pairs(G.play.cards) do + cards[#cards+1] = v + end G.E_MANAGER:add_event(Event{ - trigger = "after", - blocking = false, func = function() + SMODS.destroy_cards(cards, nil, true) for i, v in pairs(cards) do - v:start_dissolve() v.ability.temporary2 = true end return true @@ -793,10 +794,7 @@ local haglaz_indicator = { trigger = "after", blocking = false, func = function() - for i, v in pairs(cards) do - v:start_dissolve() - v.ability.temporary2 = true - end + SMODS.destroy_cards(cards) return true end }) @@ -1299,13 +1297,13 @@ local dagaz_indicator = { dependencies = {items = {"set_entr_runes"}}, calculate = function(self, rune, context) if context.consumable_emplaced and not rune.triggered then - if Entropy.Inversion(context.consumeable) then + if Entropy.inversion(context.consumeable) then rune.triggered = true return { --remove = true, func = function() context.consumeable:flip() - context.consumeable:set_ability(Entropy.Inversion(context.consumeable)) + context.consumeable:set_ability(Entropy.inversion(context.consumeable)) context.consumeable:flip() SMODS.calculate_context({entr_consumable_inverted = true, card = card}) if #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit and G.GAME.providence then diff --git a/items/misc/seals.lua b/items/misc/seals.lua index 49f772b5..d7efb0df 100644 --- a/items/misc/seals.lua +++ b/items/misc/seals.lua @@ -10,40 +10,6 @@ local crimson = { atlas = "seals", pos = {x=0,y=0}, badge_colour = HEX("8a0050"), - calculate = function(self, card, context) - if (context.cardarea == G.play or context.cardarea == G.hand) and not card.crimson_trigger and not card.crimson_trigger2 then - for i, v in ipairs(card.area and card.area.cards or {}) do - if card.area.cards[i+1] == card or card.area.cards[i-1] == card then - card.crimson_trigger2 = true - local eval, post = eval_card(v, context) - eval = eval or {} - local effects = {eval} - if (eval and next(eval)) or (post and next(post)) or (context.main_scoring and context.cardarea == G.play) then - SMODS.calculate_effect({message = localize("k_again_ex"), colour = HEX("8a0050"), card = v}) - if not card.crimson_trigger then - G.E_MANAGER:add_event(Event{ - trigger = "before", - func = function() - card.crimson_trigger = nil - return true - end - }) - end - card.crimson_trigger = true - end - card.crimson_trigger2 = nil - if context.main_scoring then - G.message_card = v - eval.chips = v.base.nominal + v.ability.bonus or 0 - SMODS.calculate_context({individual = true, other_card=v, cardarea = v.area, scoring_hand = context.scoring_hand}) - G.message_card = nil - end - for _,v in ipairs(post or {}) do effects[#effects+1] = v end - SMODS.trigger_effects(effects, v) - end - end - end - end, } local sapphire = { @@ -84,7 +50,7 @@ local silver = { return { func = function() for i, v in ipairs(G.hand.cards) do - local res = Entropy.GetRepetitions(v) + local res = Entropy.get_repetitions(v) if v.debuff then res.repetitions = nil end for i = 1, (res.repetitions or 0) + 1 do if i > 1 then @@ -118,7 +84,7 @@ local silver = { return { func = function() for i, v in ipairs(G.hand.cards) do - local res = Entropy.GetRepetitions(v) + local res = Entropy.get_repetitions(v) if v.debuff then res.repetitions = nil end for i = 1, (res.repetitions or 0) + 1 do if v.debuff then diff --git a/items/misc/sounds.lua b/items/misc/sounds.lua index 8bedfb91..f8402f30 100644 --- a/items/misc/sounds.lua +++ b/items/misc/sounds.lua @@ -11,7 +11,7 @@ SMODS.Sound({ key = "music_red_room", path = "music_red_room.ogg", select_music_track = function() - return G.GAME.blind and G.GAME.blind.name == "bl_entr_red" and 10^5 + return (G.GAME.blind and G.GAME.blind.name == "bl_entr_red") and 10^5 end, }) SMODS.Sound({ @@ -25,7 +25,7 @@ SMODS.Sound({ key = "music_fall", path = "music_fall.ogg", select_music_track = function() - return (((to_big(G.GAME.round_resets.ante) >= to_big(32) and not G.GAME.EEBeaten) and G.STATE == 1) or G.GAME.EEBuildup) and Entropy.CanEeSpawn() and 10^302 + return (((to_big(G.GAME.round_resets.ante) >= to_big(32) and not G.GAME.EEBeaten) and G.STATE == 1) or G.GAME.EEBuildup or (G.GAME.EE_FADE or 0) > 0) and Entropy.can_ee_spawn() and 10^302 end, }) @@ -39,7 +39,19 @@ SMODS.Sound({ bl_entr_endless_entropy_phase_three=true, bl_entr_endless_entropy_phase_four=true } - return (G.GAME.blind and blinds[G.GAME.blind.config.blind.key]) and 10^306 + return ((G.GAME.blind and blinds[G.GAME.blind.config.blind.key])) and 10^306 + end, +}) + +SMODS.Sound({ + key = "music_entropic_ominous", + path = "music_entropic_ominous.ogg", + select_music_track = function() + local ferv = G.entr_invert_enabled + for i, v in pairs((G.pack_cards or {cards = {}}).cards or {}) do + if v.config.center.key == "c_entr_fervour" then ferv = true; break end + end + return (ferv and G.GAME.entropy and G.GAME.entropy > 100) and 10^300 end, }) @@ -104,4 +116,34 @@ SMODS.Sound({ SMODS.Sound({ key = "runes", path = "runes.ogg", +}) + +SMODS.Sound({ + key = "invert", + path = "sfx_invert.ogg", + volume = 1.3 +}) + +SMODS.Sound({ + key = "entropic_summon", + path = "entropic_summon.ogg", + volume = 2 +}) + +SMODS.Sound({ + key = "void_generic", + path = "void_generic.ogg", + volume = 2 +}) + +SMODS.Sound({ + key = "void_swap", + path = "void_swap.ogg", + volume = 2 +}) + +SMODS.Sound({ + key = "void_suck", + path = "void_suck.ogg", + volume = 2 }) \ No newline at end of file diff --git a/items/misc/spectrals.lua b/items/misc/spectrals.lua index 77ff9f36..c1cb22bd 100644 --- a/items/misc/spectrals.lua +++ b/items/misc/spectrals.lua @@ -12,49 +12,34 @@ local flipside = { }, set = "Spectral", can_use = function(self, card) - local cards = Entropy.GetHighlightedCards({{cards = G.I.CARD}}, card, 1, card.ability.select) - cards = Entropy.FilterTable(cards, function(card) - return Entropy.Inversion(card) or card.config.center.key == "c_entr_flipside" + local cards = Entropy.get_highlighted_cards({{cards = G.I.CARD}}, card, 1, card.ability.select) + cards = Entropy.filter_table(cards, function(card) + return Entropy.inversion(card) or card.config.center.key == "c_entr_flipside" end) return #cards > 0 and #cards <= card.ability.select end, use = function(self, card) - local cards = Entropy.GetHighlightedCards({{cards = G.I.CARD}}, card, 1, card.ability.select) - local actual = Entropy.FilterTable(cards, function(card) - return Entropy.Inversion(card) + local cards = Entropy.get_highlighted_cards({{cards = G.I.CARD}}, card, 1, card.ability.select) + local actual = Entropy.filter_table(cards, function(card) + return Entropy.inversion(card) end) - Entropy.FlipThen(cards, function(card) - if card.config.center.key == "c_entr_flipside" then - local cards2 = {} - for i, card in pairs(G.I.CARD) do - if Entropy.Inversion(card) then - cards2[#cards2+1] = card - end - end - card:start_dissolve() - Entropy.FlipThen(cards2, function(card) - card.ability.fromflipside = true - card:set_ability(G.P_CENTERS[Entropy.Inversion(card)]) - if card.ability.glitched_crown then - for i,v in pairs(card.ability.glitched_crown) do - card.ability.glitched_crown[i] = Entropy.FlipsideInversions[v] - end - end - card.ability.fromflipside = false - SMODS.calculate_context({entr_consumable_inverted = true, card = card}) - end) - else - card.ability.fromflipside = true - card:set_ability(G.P_CENTERS[Entropy.Inversion(card)]) - if card.ability.glitched_crown then - for i,v in pairs(card.ability.glitched_crown) do - card.ability.glitched_crown[i] = Entropy.FlipsideInversions[v] - end + Entropy.invert(cards, true, true) + end, + can_be_inverted = true, + calculate = function(self, card, context) + if context.being_inverted then + local cards2 = {} + for i, card in pairs(G.I.CARD) do + if Entropy.inversion(card) and card.config.center.key ~= "c_entr_flipside" then + cards2[#cards2+1] = card end - card.ability.fromflipside = false - SMODS.calculate_context({entr_consumable_inverted = true, card = card}) end - end) + card:start_dissolve() + Entropy.invert(cards2, true, true) + return { + prevent_inversion = true1 + } + end end, loc_vars = function(self, q, card) return { @@ -85,13 +70,13 @@ local shatter = { } }, use = function(self, card, area, copier) - Entropy.FlipThen(Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.limit), function(card) + Entropy.flip_then(Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.limit), function(card) card:set_edition("e_entr_fractured") end) - Entropy.ChangeFullCSL(-card.ability.csl) + Entropy.change_selection_limit(-card.ability.csl) end, can_use = function(self, card) - local num = #Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.limit) + local num = #Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.limit) return num > 0 and num <= card.ability.limit end, loc_vars = function(self, q, card) @@ -127,31 +112,26 @@ local destiny = { }, use = function(self, card, area, copier) local remove = {} - local highlighted = Entropy.GetHighlightedCards({G.hand}, card, 5, 5) + local highlighted = Entropy.get_highlighted_cards({G.hand}, card, 5, 5) for i, v in pairs(highlighted) do if v.config.center.key ~= "c_base" or pseudorandom("crafting") < 0.4 then - if not SMODS.is_eternal(v) then - v:start_dissolve() - v.ability.temporary2 = true - end - remove[#remove+1]=v + SMODS.destroy_cards{v} else - Entropy.DiscardSpecific({v}) + Entropy.discard_specific({v}) end end - if #remove > 0 then SMODS.calculate_context({remove_playing_cards = true, removed=remove}) end - add_joker(Entropy.GetRecipe(highlighted)) + add_joker(Entropy.get_recipe(highlighted)) end, keep_on_use = function(self, card) - return Entropy.DeckOrSleeve("crafting") + return Entropy.deck_or_sleeve("crafting") end, can_use = function(self, card) - local highlighted = Entropy.GetHighlightedCards({G.hand}, card, 5, 5) + local highlighted = Entropy.get_highlighted_cards({G.hand}, card, 5, 5) return G.hand and #highlighted == 5 end, loc_vars = function(self, q, card) - local jok = G.hand and Entropy.GetRecipe(G.hand.highlighted) - local highlighted = Entropy.GetHighlightedCards({G.hand}, card, 5, 5) + local jok = G.hand and Entropy.get_recipe(G.hand.highlighted) + local highlighted = Entropy.get_highlighted_cards({G.hand}, card, 5, 5) if G.hand and #highlighted == 5 then q[#q+1] = jok and G.P_CENTERS[jok] or nil end @@ -162,13 +142,9 @@ local destiny = { end, no_doe = true, in_pool = function() - return not Entropy.DeckOrSleeve("crafting") + return not Entropy.deck_or_sleeve("crafting") end, - weight = 0, - demicoloncompat = true, - force_use = function(self, card) - self:use(card) - end + weight = 0, } local lust = { @@ -191,7 +167,7 @@ local lust = { for i, v in pairs(G.hand.cards) do if not v.edition then cards[#cards+1] = v end end pseudoshuffle(cards, pseudoseed("entr_lust")) for i = 1, math.min(#cards, card.ability.limit) do rcards[#rcards+1] = cards[i] end - Entropy.FlipThen(rcards, function(card) + Entropy.flip_then(rcards, function(card) card:set_edition("e_entr_freaky") end) end, @@ -362,9 +338,9 @@ local enchant = { highlighted = 1 }, pos = {x=1,y=0}, - use = Entropy.ModifyHandCardNF({seal="entr_ornate"}), + use = Entropy.modify_hand_card_NF({seal="entr_ornate"}), can_use = function(self, card) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.highlighted) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.highlighted) return #cards > 0 and #cards <= card.ability.highlighted end, loc_vars = function(self, q, card) @@ -426,4 +402,4 @@ return { enchant, manifest } -} \ No newline at end of file +} diff --git a/items/misc/stakes.lua b/items/misc/stakes.lua index 03396d95..9affa0cd 100644 --- a/items/misc/stakes.lua +++ b/items/misc/stakes.lua @@ -20,16 +20,6 @@ local copper = { colour = HEX("ff7747") } - -local ref = copy_card -function copy_card(old, new, ...) - local ret = ref(old, new, ...) - if not G.SETTINGS.paused and G.deck and G.GAME.modifiers.entr_copper and pseudorandom("entr_copper_stake") < 0.33 and (ret.config.center.set == "Default" or ret.config.center.set == "Enhanced") then - ret:set_ability(G.P_CENTERS.m_entr_disavowed) - end - return ret -end - local platinum = { dependencies = { items = { @@ -117,23 +107,67 @@ local obsidian = { Entropy.curses = { ["entr_blind"] = { key = "k_curse_blind", - desc_key = "k_curse_blind_desc" + desc_key = "k_curse_blind_desc", + sprite_pos = {x = 0, y = 0}, }, ["entr_darkness"] = { key = "k_curse_darkness", - desc_key = "k_curse_darkness_desc" + desc_key = "k_curse_darkness_desc", + sprite_pos = {x = 1, y = 0}, }, ["entr_lost"] = { key = "k_curse_lost", desc_key = "k_curse_lost_desc", - sprite_pos = {x = 0, y = 0}, + sprite_pos = {x = 2, y = 0}, }, ["entr_maze"] = { key = "k_curse_maze", - desc_key = "k_curse_maze_desc" + desc_key = "k_curse_maze_desc", + in_pool = function() + return G.GAME.ante ~= G.GAME.win_ante + end, + sprite_pos = {x = 3, y = 0}, } } +SMODS.Tag { + key = "curse_indicator", + atlas = "curse_icons", + no_collection = true, + in_pool = function() return false end, + loc_vars = function() + return { + key = G.GAME.curse and "tag_curse_"..G.GAME.curse + } + end +} + +function _G.add_curse_icon(_tag, no_copy) + G.HUD_curses = G.HUD_curses or {} + local tag_sprite_ui, tag_sprite = _tag:generate_UI() + G.HUD_curses[#G.HUD_curses+1] = UIBox{ + definition = {n=G.UIT.ROOT, config={align = "tm", padding = 0.05, colour = G.C.CLEAR}, nodes={ + tag_sprite_ui + }}, + config = { + align = G.HUD_curses[1] and 'bm' or 'br', + offset = G.HUD_curses[1] and {x=0,y=0} or {x=-0.8,y=0.4}, + major = G.HUD_curses[1] and G.HUD_curses[#G.HUD_curses] or G.consumeables} + } + discover_card(G.P_TAGS[_tag.key]) + unlock_card(G.P_TAGS[_tag.key]) + + _tag.HUD_tag = G.HUD_curses[#G.HUD_curses] + _tag.HUD_tag.actual = _tag + _tag.HUD_sprite = tag_sprite + _tag.ability.index = #G.HUD_curses + if #G.HUD_curses > 6 then + for i = 2, #G.HUD_curses do + G.HUD_curses[i].config.offset.y = -0.9 + 0.9 * (6 / #G.HUD_curses) + end + end +end + function Entropy.get_curse_rate() if not Entropy.config.curses_enabled then return 0 end if to_big(G.GAME.round_resets.ante) <= to_big(G.GAME.win_ante or 8) then return 0 end @@ -229,11 +263,13 @@ function Entropy.create_curse(key) G.GAME.entr_maze_applied = nil local curses = {} for i, v in pairs(Entropy.curses) do - curses[#curses+1] = i + if not v.in_pool or v:in_pool() then + curses[#curses+1] = i + end end G.GAME.curse = key or pseudorandom_element(curses, pseudoseed("entr_curse")) - local atlas = Entropy.curses[G.GAME.curse].atlas or "entr_curses_big" - local pos = Entropy.curses[G.GAME.curse].pos or {x = 0, y = 0} + local atlas = Entropy.curses[G.GAME.curse].atlas or "entr_curse_icons" + local pos = Entropy.curses[G.GAME.curse].sprite_pos or {x = 0, y = 0} attention_text({ scale = 1, text = localize(Entropy.curses[G.GAME.curse].key), @@ -241,9 +277,6 @@ function Entropy.create_curse(key) align = "cm", offset = { x = 0, y = -2.7 }, major = G.play, - atlas = atlas, - X = 0, Y = 0, W = 6, H = 6, - spos = pos }) attention_text({ scale = 0.7, @@ -260,6 +293,14 @@ function Entropy.create_curse(key) G.GAME.modifiers.cry_no_small_blind = G.GAME.modifiers.cry_no_small_blind_last G.GAME.modifiers.cry_no_small_blind_last = nil end + if not G.HUD_curses or #G.HUD_curses < 1 then + add_curse_icon(Tag("tag_entr_curse_indicator")) + elseif G.HUD_curses then + G.HUD_curses[1].actual:juice_up() + end + local sprite = G.HUD_curses[1].actual.HUD_sprite + sprite.atlas = G.ASSET_ATLAS[atlas] + sprite:set_sprite_pos(pos) end local dft = Blind.defeat @@ -272,6 +313,11 @@ function Blind:defeat(s) if pseudorandom("entr_curse") < G.GAME.curse_rate then Entropy.create_curse() else + if G.HUD_curses and G.HUD_curses[1] then + G.HUD_curses[1].actual:yep('+', G.C.PURPLE, function() + return true end) + G.HUD_curses = nil + end G.GAME.entr_maze_applied = nil G.GAME.curse = nil end diff --git a/items/misc/tags.lua b/items/misc/tags.lua index 95182080..353eee70 100644 --- a/items/misc/tags.lua +++ b/items/misc/tags.lua @@ -424,11 +424,11 @@ SMODS.Atlas { } - local rare = Entropy.RareTag(3, "rare", true, "Rare", {x=0,y=0}, 0, nil,3) - local epic = Entropy.RareTag("cry_epic", "epic", true, "cry_epic", {x=1,y=0}, 0, nil,4) - local legendary = Entropy.RareTag(4, "legendary", true, "Legendary", {x=2,y=0}, 0, true,5) - local exotic = Entropy.RareTag("cry_exotic", "exotic", true, "cry_exotic", {x=3,y=0}, 0, nil,6) - local entropic = Entropy.RareTag("entr_entropic", "entropic", true, "cry_exotic", {x=4,y=0}, 0, nil,7) + local rare = Entropy.rare_tag(3, "rare", true, "Rare", {x=0,y=0}, 0, nil,3) + local epic = Entropy.rare_tag("cry_epic", "epic", true, "cry_epic", {x=1,y=0}, 0, nil,4) + local legendary = Entropy.rare_tag(4, "legendary", true, "Legendary", {x=2,y=0}, 0, true,5) + local exotic = Entropy.rare_tag("cry_exotic", "exotic", true, "cry_exotic", {x=3,y=0}, 0, nil,6) + local entropic = Entropy.rare_tag("entr_entropic", "entropic", true, "cry_exotic", {x=4,y=0}, 0, nil,7) exotic.no_pointer = true entropic.no_pointer = true @@ -581,11 +581,11 @@ local saint = { end, shiny_atlas = "entr_shiny_asc_tags", } -local negative = Entropy.EditionTag("e_negative", "negative", true, {x=1,y=1}, 10.1) -local foil =Entropy.EditionTag("e_foil", "foil", true, {x=2,y=1},10.2) -local holo = Entropy.EditionTag("e_holo", "holo", true, {x=3,y=1},10.3) -local poly = Entropy.EditionTag("e_polychrome", "poly", true, {x=4,y=1},10.4) -local glass = Entropy.EditionTag("e_cry_glass", "glass", true, {x=5,y=1},10.5) +local negative = Entropy.edition_tag("e_negative", "negative", true, {x=1,y=1}, 10.1) +local foil =Entropy.edition_tag("e_foil", "foil", true, {x=2,y=1},10.2) +local holo = Entropy.edition_tag("e_holo", "holo", true, {x=3,y=1},10.3) +local poly = Entropy.edition_tag("e_polychrome", "poly", true, {x=4,y=1},10.4) +local glass = Entropy.edition_tag("e_cry_glass", "glass", true, {x=5,y=1},10.5) local better_voucher = { object_type = "Tag", @@ -618,12 +618,12 @@ local better_voucher = { } -local glitched = Entropy.EditionTag("e_cry_glitched", "glitched", true, {x=0,y=2},12) -local gold = Entropy.EditionTag("e_cry_gold", "gold", true, {x=1,y=2},13) -local blur = Entropy.EditionTag("e_cry_blur", "blurry", true, {x=2,y=2},14) -local m = Entropy.EditionTag("e_cry_m", "m", true, {x=3,y=2},15) -local mosaic = Entropy.EditionTag("e_cry_mosaic", "mosaic", true, {x=4,y=2},16) -local astral = Entropy.EditionTag("e_cry_astral", "astral", true, {x=5,y=2},17) +local glitched = Entropy.edition_tag("e_cry_glitched", "glitched", true, {x=0,y=2},12) +local gold = Entropy.edition_tag("e_cry_gold", "gold", true, {x=1,y=2},13) +local blur = Entropy.edition_tag("e_cry_blur", "blurry", true, {x=2,y=2},14) +local m = Entropy.edition_tag("e_cry_m", "m", true, {x=3,y=2},15) +local mosaic = Entropy.edition_tag("e_cry_mosaic", "mosaic", true, {x=4,y=2},16) +local astral = Entropy.edition_tag("e_cry_astral", "astral", true, {x=5,y=2},17) local infdiscard = { object_type = "Tag", @@ -655,18 +655,18 @@ local infdiscard = { shiny_atlas = "entr_shiny_asc_tags", } -local oversat = Entropy.EditionTag("e_cry_oversat", "oversat", true, {x=0,y=3},18) -local neon_asc = Entropy.EditionTag("e_entr_neon", "neon", true, {x=7,y=4},18.33) -local lowres_asc = Entropy.EditionTag("e_entr_lowres", "lowres", true, {x=7,y=3},18.66) -local sunny_asc = Entropy.EditionTag("e_entr_sunny", "sunny", true, {x=6,y=4},19) -local solar_asc = Entropy.EditionTag("e_entr_solar", "solar", true, {x=1,y=3},20, { +local oversat = Entropy.edition_tag("e_cry_oversat", "oversat", true, {x=0,y=3},18) +local neon_asc = Entropy.edition_tag("e_entr_neon", "neon", true, {x=7,y=4},18.33) +local lowres_asc = Entropy.edition_tag("e_entr_lowres", "lowres", true, {x=7,y=3},18.66) +local sunny_asc = Entropy.edition_tag("e_entr_sunny", "sunny", true, {x=6,y=4},19) +local solar_asc = Entropy.edition_tag("e_entr_solar", "solar", true, {x=1,y=3},20, { art = {"Grahkon"} }) -local fractured_asc = Entropy.EditionTag("e_entr_fractured", "fractured", true, {x=6,y=5},20.5) -local freaky_asc = Entropy.EditionTag("e_entr_freaky", "freaky", true, {x=7,y=5},20.75) +local fractured_asc = Entropy.edition_tag("e_entr_fractured", "fractured", true, {x=6,y=5},20.5) +local freaky_asc = Entropy.edition_tag("e_entr_freaky", "freaky", true, {x=7,y=5},20.75) -local kaleidoscopic_asc = Entropy.EditionTag("e_entr_kaleidoscopic", "kaleidoscopic", true, {x=7,y=2},20.9) -local gilded_asc = Entropy.EditionTag("e_entr_gilded", "gilded", true, {x=7,y=0},20.95) +local kaleidoscopic_asc = Entropy.edition_tag("e_entr_kaleidoscopic", "kaleidoscopic", true, {x=7,y=2},20.9) +local gilded_asc = Entropy.edition_tag("e_entr_gilded", "gilded", true, {x=7,y=0},20.95) local cat_asc = { object_type = "Tag", @@ -1579,7 +1579,7 @@ return { kaleidoscopic, gilded, rare, - epic, + not (SMODS.Mods["Cryptid"] or {}).can_load and {} or epic, legendary, not (SMODS.Mods["Cryptid"] or {}).can_load and {} or exotic, not (SMODS.Mods["Cryptid"] or {}).can_load and {} or entropic, diff --git a/lib/ascended.lua b/lib/ascended.lua index fc919d4c..9f13d274 100644 --- a/lib/ascended.lua +++ b/lib/ascended.lua @@ -1,75 +1,20 @@ -local pokerhandinforef = G.FUNCS.get_poker_hand_info -function G.FUNCS.get_poker_hand_info(_cards) - local text, loc_disp_text, poker_hands, scoring_hand, disp_text = pokerhandinforef(_cards) - -- Display text if played hand contains a Cluster and a Bulwark - -- Not Ascended hand related but this hooks in the same spot so i'm lumping it here anyways muahahahahahaha - local hidden = false - for i, v in pairs(scoring_hand) do - if v.facing == "back" then - hidden = true - break - end - end - -- Ascension power - local a_power = Cryptid.calculate_ascension_power( - text, - _cards, - scoring_hand, - G.GAME.used_vouchers.v_cry_hyperspacetether, - G.GAME.bonus_asc_power - ) - if a_power ~= 0 then - G.GAME.current_round.current_hand.cry_asc_num = a_power - -- Change mult and chips colors if hand is ascended - if not hidden then - if G.GAME.Overflow or (G.GAME.badarg and G.GAME.badarg[text]) then - ease_colour(G.C.UI_CHIPS, copy_table(HEX("FF0000")), 0.3) - ease_colour(G.C.UI_MULT, copy_table(HEX("FF0000")), 0.3) - if not G.C.UI_GOLD then G.C.UI_GOLD = G.C.GOLD end - ease_colour(G.C.GOLD, copy_table(HEX("FF0000")), 0.3) - else - ease_colour(G.C.GOLD, copy_table(HEX("EABA44")), 0.3) - ease_colour(G.C.UI_CHIPS, copy_table(G.C.GOLD), 0.3) - ease_colour(G.C.UI_MULT, copy_table(G.C.GOLD), 0.3) - end - - G.GAME.current_round.current_hand.cry_asc_num_text = ( - a_power - ) - and " (".. (to_big(a_power) >= to_big(0) and "+" or "") .. number_format(a_power) .. ")" - or "" - else - ease_colour(G.C.UI_CHIPS, G.C.BLUE, 0.3) - ease_colour(G.C.UI_MULT, G.C.RED, 0.3) - G.GAME.current_round.current_hand.cry_asc_num_text = "" - end - else - G.GAME.current_round.current_hand.cry_asc_num = 0 - if G.GAME.badarg and G.GAME.badarg[text] then - ease_colour(G.C.UI_CHIPS, copy_table(HEX("FF0000")), 0.3) - ease_colour(G.C.UI_MULT, copy_table(HEX("FF0000")), 0.3) - else - ease_colour(G.C.UI_CHIPS, G.C.BLUE, 0.3) - ease_colour(G.C.UI_MULT, G.C.RED, 0.3) - end - G.GAME.current_round.current_hand.cry_asc_num_text = "" - end - if to_big(G.GAME.current_round.current_hand.cry_asc_num) == to_big(0) then - ease_colour(G.C.UI_CHIPS, G.C.BLUE, 0.3) - ease_colour(G.C.UI_MULT, G.C.RED, 0.3) - end - return text, loc_disp_text, poker_hands, scoring_hand, disp_text -end - local calculate_ascension_power_ref = Cryptid.calculate_ascension_power function Cryptid.calculate_ascension_power(hand_name, hand_cards, hand_scoring_cards, tether, bonus) - if Entropy.BlindIs("bl_entr_scarlet_sun") and not G.GAME.blind.disabled then + if Entropy.blind_is("bl_entr_scarlet_sun") and not G.GAME.blind.disabled then + tether = true + end + if next(SMODS.find_card("j_entr_helios")) then tether = true end local final = calculate_ascension_power_ref(hand_name, hand_cards, hand_scoring_cards, tether, bonus) if next(SMODS.find_card("j_entr_hexa")) then final = final * 3 * #SMODS.find_card("j_entr_hexa") end + if next(SMODS.find_card("j_entr_helios")) then + local total = 0 + for i, v in pairs(SMODS.find_card("j_entr_helios")) do total = total + v.ability.extra end + final = final * total + end if next(SMODS.find_card("j_entr_axeh")) then for i, v in pairs(SMODS.find_card("j_entr_axeh")) do final = final * v.ability.asc_mod @@ -77,19 +22,22 @@ function Cryptid.calculate_ascension_power(hand_name, hand_cards, hand_scoring_c end final = final + (G.GAME.hands[hand_name] and G.GAME.hands[hand_name].AscensionPower or 0) final = final * (1+(G.GAME.nemesisnumber or 0)) - if Entropy.BlindIs("bl_entr_scarlet_sun") and not G.GAME.blind.disabled then - final = final * (Entropy.IsEE() and -0.25 or -1) + if Entropy.blind_is("bl_entr_scarlet_sun") and not G.GAME.blind.disabled then + final = final * (Entropy.is_EE() and -0.25 or -1) end return final end local hand_ascension_numbers_ref = Cryptid.hand_ascension_numbers function Cryptid.hand_ascension_numbers(hand_name, tether) - if Entropy.BlindIs("bl_entr_scarlet_sun") then return 0 end + if Entropy.blind_is("bl_entr_scarlet_sun") then return 0 end + if next(SMODS.find_card("j_entr_helios")) then + tether = true + end return hand_ascension_numbers_ref(hand_name, tether) end local asc_enabled_ref = Cryptid.ascension_power_enabled function Cryptid.ascension_power_enabled() - if next(SMODS.find_card("j_entr_hexa")) or Entropy.BlindIs("bl_entr_scarlet_sun") then return true end + if next(SMODS.find_card("j_entr_helios")) or next(SMODS.find_card("j_entr_hexa")) or Entropy.blind_is("bl_entr_scarlet_sun") then return true end if asc_enabled_ref then return asc_enabled_ref() end end diff --git a/lib/colours.lua b/lib/colours.lua index b031fcf4..46411ab1 100644 --- a/lib/colours.lua +++ b/lib/colours.lua @@ -16,4 +16,63 @@ G.C.Entropy.Dissolve = { Rune = G.C.Entropy.Rune } -G.C.ALTBG = HEX("41566f") \ No newline at end of file +G.C.ALTBG = HEX("41566f") + +G.C.Entropy.ORANGE = HEX("ff5e00") + +G.C.Entropy.DARK_GRAY = HEX("6a7895") +G.C.Entropy.LIGHT_GRAY = HEX("95ade0") + +Entropy.entropic_gradient = SMODS.Gradient { + key = "entropic_gradient", + colours = { + G.C.RED, + G.C.GOLD, + G.C.GREEN, + G.C.BLUE, + G.C.PURPLE + } +} + +Entropy.transgender_gradient = SMODS.Gradient { + key = "transgender_gradient", + colours = { + HEX("5bcefa"), + HEX("f5a9b8"), + } +} + +Entropy.reverse_legendary_gradient = SMODS.Gradient { + key = "reverse_legendary_gradient", + colours = { + HEX("ff00c4"), + HEX("FF00FF"), + HEX("FF0000"), + } +} + +Entropy.zenith_gradient = SMODS.Gradient{ + key = "zenith_gradient", + colours = { + HEX("a20000"), + HEX("a15000"), + HEX("a3a101"), + HEX("626262"), + HEX("416600"), + HEX("028041"), + HEX("008284"), + HEX("005683"), + HEX("000056"), + HEX("2b0157"), + HEX("6a016a"), + HEX("77003c"), + } +} + +Entropy.void_gradient = SMODS.Gradient { + key = "void_gradient", + colours = { + HEX("c678b4"), + HEX("c67886") + } +} \ No newline at end of file diff --git a/lib/config.lua b/lib/config.lua index c0302f31..04c9d6cf 100644 --- a/lib/config.lua +++ b/lib/config.lua @@ -19,88 +19,108 @@ local entrConfigTab = function() }, }, } - entr_nodes[#entr_nodes + 1] = UIBox_button({ - colour = G.C.CRY_GREENGRADIENT, - button = "your_collection_content_sets", - label = { localize("b_content_sets") }, - count = modsCollectionTally(G.P_CENTER_POOLS["Content Set"]), - minw = 5, - minh = 1.7, - scale = 0.6, - id = "your_collection_jokers", - }) - left_settings = { n = G.UIT.C, config = { align = "tl", padding = 0.05 }, nodes = {} } - right_settings = { n = G.UIT.C, config = { align = "tl", padding = 0.05 }, nodes = {} } - config = { n = G.UIT.R, config = { align = "tm", padding = 0 }, nodes = { left_settings, right_settings } } - entr_nodes[#entr_nodes + 1] = config - entr_nodes[#entr_nodes + 1] = create_toggle({ - label = localize("k_entr_profile_prefix"), - active_colour = HEX("40c76d"), - ref_table = Entropy.config, - ref_value = "profile_prefix", - }) - entr_nodes[#entr_nodes+1] = create_option_cycle({ - label = localize("flipside_info"), - scale = 0.8, - w = 6, - options = {localize("flipside_none"), localize("flipside_minimal"), localize("flipside_full")}, - opt_callback = "update_inversion_queue", - current_option = Entropy.config.inversion_queues, - }) - entr_nodes[#entr_nodes + 1] = create_toggle({ - label = localize("cry_family"), - active_colour = HEX("40c76d"), - ref_table = Cryptid_config, - ref_value = "family_mode", - callback = Cryptid.reload_localization, - }) - entr_nodes[#entr_nodes + 1] = create_toggle({ - label = localize("curses_enabled"), - active_colour = HEX("40c76d"), - ref_table = Entropy.config, - ref_value = "curses_enabled", - }) - if SMODS.Mods["Cryptid"] and SMODS.Mods["Cryptid"].can_load then + if not G.ENTROPY_PAGE_2 then G.ENTROPY_PAGE_2 = 1 end + if G.ENTROPY_PAGE_2 == 1 then + left_settings = { n = G.UIT.C, config = { align = "tl", padding = 0.1 }, nodes = {} } + right_settings = { n = G.UIT.C, config = { align = "tl", padding = 0.1 }, nodes = {} } + config = { n = G.UIT.R, config = { align = "tm", padding = 0 }, nodes = { left_settings, right_settings } } + entr_nodes[#entr_nodes + 1] = config + entr_nodes[#entr_nodes + 1] = UIBox_button({ + colour = G.C.CRY_GREENGRADIENT, + button = "your_collection_content_sets", + label = { localize("b_content_sets") }, + count = modsCollectionTally(G.P_CENTER_POOLS["Content Set"]), + minw = 5, + minh = 1.7, + scale = 0.6, + id = "your_collection_jokers", + }) + entr_nodes[#entr_nodes + 1] = config entr_nodes[#entr_nodes + 1] = create_toggle({ - label = localize("k_entr_faster_ante_scaling"), + label = localize("k_entr_profile_prefix"), active_colour = HEX("40c76d"), ref_table = Entropy.config, - ref_value = "ante_scaling", - callback = function() - end, + ref_value = "profile_prefix", + }) + entr_nodes[#entr_nodes+1] = create_option_cycle({ + label = localize("flipside_info"), + scale = 0.8, + w = 6, + options = {localize("flipside_none"), localize("flipside_minimal"), localize("flipside_full")}, + opt_callback = "update_inversion_queue", + current_option = Entropy.config.inversion_queues, + }) + entr_nodes[#entr_nodes + 1] = create_toggle({ + label = localize("cry_family"), + active_colour = HEX("40c76d"), + ref_table = Cryptid_config, + ref_value = "family_mode", + callback = Cryptid.reload_localization, }) entr_nodes[#entr_nodes + 1] = create_toggle({ - label = localize("k_entr_glitched"), + label = localize("curses_enabled"), active_colour = HEX("40c76d"), ref_table = Entropy.config, - ref_value = "override_glitched", - callback = function() - end, + ref_value = "curses_enabled", + }) + elseif G.ENTROPY_PAGE_2 == 2 then + left_settings = { n = G.UIT.C, config = { align = "tl", padding = 0.1 }, nodes = {} } + right_settings = { n = G.UIT.C, config = { align = "tl", padding = 0.1 }, nodes = {} } + config = { n = G.UIT.R, config = { align = "tm", padding = 0 }, nodes = { left_settings, right_settings } } + entr_nodes[#entr_nodes + 1] = config + entr_nodes[#entr_nodes + 1] = UIBox_button({ + colour = G.C.CRY_GREENGRADIENT, + button = "your_collection_content_sets", + label = { localize("b_content_sets") }, + count = modsCollectionTally(G.P_CENTER_POOLS["Content Set"]), + minw = 5, + minh = 1.7, + scale = 0.6, + id = "your_collection_jokers", + }) + entr_nodes[#entr_nodes + 1] = config + if SMODS.Mods["Cryptid"] and SMODS.Mods["Cryptid"].can_load then + entr_nodes[#entr_nodes + 1] = create_toggle({ + label = localize("k_entr_faster_ante_scaling"), + active_colour = HEX("40c76d"), + ref_table = Entropy.config, + ref_value = "ante_scaling", + callback = function() + end, + }) + entr_nodes[#entr_nodes + 1] = create_toggle({ + label = localize("k_entr_glitched"), + active_colour = HEX("40c76d"), + ref_table = Entropy.config, + ref_value = "override_glitched", + callback = function() + end, + }) + end + entr_nodes[#entr_nodes + 1] = create_toggle({ + label = localize("k_entr_omega_aleph"), + active_colour = HEX("40c76d"), + ref_table = Entropy.config, + ref_value = "omega_aleph", + callback = function() + end, + }) + entr_nodes[#entr_nodes + 1] = create_toggle({ + label = localize("k_entr_asc_tutorial"), + active_colour = HEX("40c76d"), + ref_table = Entropy.config, + ref_value = "asc_power_tutorial", + }) + entr_nodes[#entr_nodes+1] = create_slider({ + label = localize('k_entr_corrupted_speed'), + w = 5, + h = 0.4, + ref_table = Entropy.config, + ref_value = 'corrupted_speed', + min = 25, + max = 100 }) end - entr_nodes[#entr_nodes + 1] = create_toggle({ - label = localize("k_entr_omega_aleph"), - active_colour = HEX("40c76d"), - ref_table = Entropy.config, - ref_value = "omega_aleph", - callback = function() - end, - }) - entr_nodes[#entr_nodes + 1] = create_toggle({ - label = localize("k_entr_asc_tutorial"), - active_colour = HEX("40c76d"), - ref_table = Entropy.config, - ref_value = "asc_power_tutorial", - }) - entr_nodes[#entr_nodes+1] = create_slider({ - label = localize('k_entr_corrupted_speed'), - w = 5, - h = 0.4, - ref_table = Entropy.config, - ref_value = 'corrupted_speed', - min = 25, - max = 100 - }) return { n = G.UIT.ROOT, config = { @@ -112,8 +132,29 @@ local entrConfigTab = function() padding = 0.2, colour = G.C.BLACK, }, - nodes = entr_nodes, - } + nodes = { + { n = G.UIT.R, config = { align = "cm", r = 0.1, colour = {0,0,0,0}, emboss = 0.05 }, nodes = entr_nodes }, + { + n = G.UIT.R, + config = { align = "cm" }, + nodes = { + create_option_cycle({ + options = { + localize("k_page") .. " " .. tostring(1) .. "/" .. tostring(2), + localize("k_page") .. " " .. tostring(2) .. "/" .. tostring(2) + }, + w = 4.5, + cycle_shoulders = true, + opt_callback = "entr_set_config_page", + current_option = G.ENTROPY_PAGE_2 or 1, + colour = Entropy.reverse_legendary_gradient, + no_pips = true, + focus_args = { snap_to = true, nav = "wide" }, + }), + }, + } + }, + } end SMODS.current_mod.config_tab = entrConfigTab @@ -258,6 +299,7 @@ local entropyTabs = function() { label = localize("k_credits"), tab_definition_function = function() + if not G.ENTROPY_PAGE then G.ENTROPY_PAGE = 1 end entr_nodes = { { n = G.UIT.R, @@ -266,41 +308,93 @@ local entropyTabs = function() }, }, } - local credits = { - art = { - ["pangaea47"] = true - }, - idea = {}, - code = { - ["lord.ruby"]=true, - ["cassknows"]=true, - ["SleepyG11"]=true, - ["hayaunderscore"]=true, - ["AnnieTheEagle"]=true, - ["WhoNeedsAUsrName"]=true, - ["wingedcatgirl"]=true, - ["Lily Felli"]=true, - ["gemstonez"]=true, - ["triple6lexi"]=true, - ["Athebyne"] = true, - ["InvalidOS"] = true, - ["FirstTry"] = true, - ["Eris"] = true - }, - music = {gemstonez=true, Grahkon = true} - } - for i, v in pairs(G.P_CENTERS) do if v.entr_credits then - if v.entr_credits.idea then for i, v in pairs(v.entr_credits.idea) do credits.idea[v] = true end end - if v.entr_credits.art then for i, v in pairs(v.entr_credits.art) do credits.art[v] = true end end - if v.entr_credits.code then for i, v in pairs(v.entr_credits.code) do credits.code[v] = true end end - end end - settings = { n = G.UIT.C, config = { align = "tl", padding = 0.05 }, nodes = {} } + if G.ENTROPY_PAGE == 1 then + local credits = { + art = { + ["pangaea47"] = true + }, + idea = {}, + code = { + ["lord.ruby"]=true, + ["cassknows"]=true, + ["SleepyG11"]=true, + ["hayaunderscore"]=true, + ["AnnieTheEagle"]=true, + ["WhoNeedsAUsrName"]=true, + ["wingedcatgirl"]=true, + ["Lily Felli"]=true, + ["gemstonez"]=true, + ["triple6lexi"]=true, + ["Athebyne"] = true, + ["InvalidOS"] = true, + ["FirstTry"] = true, + ["Eris"] = true, + ["WilsontheWolf"] = true, + ["Soulware"] = true + }, + music = {gemstonez=true, Grahkon = true} + } + for i, v in pairs(G.P_CENTERS) do if v.entr_credits then + if v.entr_credits.idea then for i, v in pairs(v.entr_credits.idea) do credits.idea[v] = true end end + if v.entr_credits.art then for i, v in pairs(v.entr_credits.art) do credits.art[v] = true end end + if v.entr_credits.code then for i, v in pairs(v.entr_credits.code) do credits.code[v] = true end end + end end + settings = { n = G.UIT.C, config = { align = "tl", padding = 0.05 }, nodes = {} } - config = { n = G.UIT.R, config = { align = "tm", padding = 0 }, nodes = { settings } } - entr_nodes[#entr_nodes+1] = Entropy.generate_credits_nodes(credits.code, "code", entr_nodes) - entr_nodes[#entr_nodes+1] = Entropy.generate_credits_nodes(credits.idea, "idea", entr_nodes) - entr_nodes[#entr_nodes+1] = Entropy.generate_credits_nodes(credits.art, "art", entr_nodes) - entr_nodes[#entr_nodes+1] = Entropy.generate_credits_nodes(credits.music, "music", entr_nodes) + config = { n = G.UIT.R, config = { align = "tm", padding = 0 }, nodes = { settings } } + entr_nodes[#entr_nodes+1] = Entropy.generate_credits_nodes(credits.code, "code", entr_nodes) + entr_nodes[#entr_nodes+1] = Entropy.generate_credits_nodes(credits.idea, "idea", entr_nodes) + entr_nodes[#entr_nodes+1] = Entropy.generate_credits_nodes(credits.art, "art", entr_nodes) + entr_nodes[#entr_nodes+1] = Entropy.generate_credits_nodes(credits.music, "music", entr_nodes) + elseif G.ENTROPY_PAGE == 2 then + entr_nodes[#entr_nodes+1] = { n = G.UIT.C, config = { align = "tm", padding = 0 }, nodes = { + { + n = G.UIT.R, + config = { align = "tm"}, + nodes = { + { + n = G.UIT.O, + config = { + object = DynaText({ + string = "Special Thanks", + colours = { G.C.IMPORTANT }, + shadow = true, + scale = 0.7, + }), + }, + }, + }, + }, + { + n = G.UIT.R, + config = { align = "cm"}, + nodes = { + { + n = G.UIT.O, + config = { + object = DynaText({ + string = "Lily.Felli", + colours = { G.C.IMPORTANT }, + shadow = true, + scale = 0.5, + }), + }, + }, + { + n = G.UIT.O, + config = { + object = DynaText({ + string = " for: flashlight.fs and invertradius.fs", + colours = { G.C.WHITE }, + shadow = true, + scale = 0.4, + }), + }, + }, + }, + }, + } } + end entr_nodes[#entr_nodes + 1] = config return { n = G.UIT.ROOT, @@ -313,10 +407,83 @@ local entropyTabs = function() padding = 0.2, colour = G.C.BLACK, }, - nodes = entr_nodes, - } + nodes = { + { n = G.UIT.R, config = { align = "cm", r = 0.1, colour = {0,0,0,0}, emboss = 0.05 }, nodes = entr_nodes }, + { + n = G.UIT.R, + config = { align = "cm" }, + nodes = { + create_option_cycle({ + options = { + localize("k_page") .. " " .. tostring(1) .. "/" .. tostring(2), + localize("k_page") .. " " .. tostring(2) .. "/" .. tostring(2) + }, + w = 4.5, + cycle_shoulders = true, + opt_callback = "entr_set_credits_page", + current_option = G.ENTROPY_PAGE or 1, + colour = Entropy.reverse_legendary_gradient, + no_pips = true, + focus_args = { snap_to = true, nav = "wide" }, + }), + }, + } + }, + } end, }, } end + +G.FUNCS.entr_set_credits_page = function(args) + G.ENTROPY_PAGE = args.cycle_config.current_option + G.FUNCS["openModUI_entr"]() +end +G.FUNCS.entr_set_config_page = function(args) + G.ENTROPY_PAGE_2 = args.cycle_config.current_option + G.FUNCS["openModUI_entr"]() +end + +SMODS.current_mod.custom_ui = function(nodes) + local logo = { + n = G.UIT.R, + config = { + align = 'cm', + colour = {0,0,0,0}, + r = 0.3, + padding = 0.25 + }, + nodes = { + { + n = G.UIT.R, + config = { align = 'cm' }, + nodes = { + { + n = G.UIT.O, + config = { + object = SMODS.create_sprite( + 5, 0, + 8,4, + 'entr_modlogo', + { x = 0, y = 0 } + ) + } + } + } + } + } + } + table.insert(nodes, 2, logo) + return nodes +end + +SMODS.current_mod.ui_config = { + author_colour = Entropy.reverse_legendary_gradient, + tab_button_colour = Entropy.reverse_legendary_gradient, + back_colour = Entropy.reverse_legendary_gradient, + bg_colour = adjust_alpha(G.C.BLACK, 0.95), + colour = darken(G.C.BLACK, .2), + outline_colour = lighten(G.C.BLACK, .2), +} + SMODS.current_mod.extra_tabs = entropyTabs diff --git a/lib/fixes.lua b/lib/fixes.lua index ec1b6f72..3544341e 100644 --- a/lib/fixes.lua +++ b/lib/fixes.lua @@ -1,94 +1,3 @@ -G.FUNCS.flame_handler = function(e) - G.C.UI_CHIPLICK = G.C.UI_CHIPLICK or {1, 1, 1, 1} - G.C.UI_MULTLICK = G.C.UI_MULTLICK or {1, 1, 1, 1} - for i=1, 3 do - G.C.UI_CHIPLICK[i] = math.min(math.max(((G.C.UI_CHIPS[i]*0.5+G.C.YELLOW[i]*0.5) + 0.1)^2, 0.1), 1) - G.C.UI_MULTLICK[i] = math.min(math.max(((G.C.UI_MULT[i]*0.5+G.C.YELLOW[i]*0.5) + 0.1)^2, 0.1), 1) - end - - G.ARGS.flame_handler = G.ARGS.flame_handler or { - chips = { - id = 'flame_chips', - arg_tab = 'chip_flames', - colour = G.C.UI_CHIPS, - accent = G.C.UI_CHIPLICK - }, - mult = { - id = 'flame_mult', - arg_tab = 'mult_flames', - colour = G.C.UI_MULT, - accent = G.C.UI_MULTLICK - } - } - for k, v in pairs(G.ARGS.flame_handler) do - if e.config.id == v.id then - if not e.config.object:is(Sprite) or e.config.object.ID ~= v.ID then - e.config.object:remove() - e.config.object = Sprite(0, 0, 2.5, 2.5, G.ASSET_ATLAS["ui_1"], {x = 2, y = 0}) - v.ID = e.config.object.ID - G.ARGS[v.arg_tab] = { - intensity = 0, - real_intensity = 0, - intensity_vel = 0, - colour_1 = v.colour, - colour_2 = v.accent, - timer = G.TIMERS.REAL - } - e.config.object:set_alignment({ - major = e.parent, - type = 'bmi', - offset = {x=0,y=0}, - xy_bond = 'Weak' - }) - e.config.object:define_draw_steps({{ - shader = 'flame', - send = { - {name = 'time', ref_table = G.ARGS[v.arg_tab], ref_value = 'timer'}, - {name = 'amount', ref_table = G.ARGS[v.arg_tab], ref_value = 'real_intensity'}, - {name = 'image_details', ref_table = e.config.object, ref_value = 'image_dims'}, - {name = 'texture_details', ref_table = e.config.object.RETS, ref_value = 'get_pos_pixel'}, - {name = 'colour_1', ref_table = G.ARGS[v.arg_tab], ref_value = 'colour_1'}, - {name = 'colour_2', ref_table = G.ARGS[v.arg_tab], ref_value = 'colour_2'}, - {name = 'id', val = e.config.object.ID}, - }}}) - e.config.object:get_pos_pixel() - end - local _F = G.ARGS[v.arg_tab] - local exptime = math.exp(-0.4*G.real_dt) - if to_big(G.ARGS.score_intensity.earned_score) >= to_big(G.ARGS.score_intensity.required_score) and to_big(G.ARGS.score_intensity.required_score) > to_big(0) then - _F.intensity = ((G.pack_cards and not G.pack_cards.REMOVED) or (G.TAROT_INTERRUPT)) and 0 or math.max(0., math.log(G.ARGS.score_intensity.earned_score+1, 5)-2) - if Entropy.is_big(_F.intensity) then - if _F.intensity > to_big(85) then - _F.intensity = 85 - else - _F.intensity = _F.intensity:to_number() - end - elseif _F.intensity > 85 then - _F.intensity = 85 - end - else - _F.intensity = 0 - end - _F.timer = _F.timer + G.real_dt*(1 + _F.intensity*0.2) - if _F.intensity_vel < 0 then _F.intensity_vel = _F.intensity_vel*(1 - 10*G.real_dt) end - _F.intensity_vel = (1-exptime)*(_F.intensity - _F.real_intensity)*G.real_dt*25 + exptime*_F.intensity_vel - _F.real_intensity = math.max(0, _F.real_intensity + _F.intensity_vel) - - _F.real_intensity = (G.cry_flame_override and G.cry_flame_override['duration'] > 0) and ((_F.real_intensity + G.cry_flame_override['intensity'])/2) or _F.real_intensity - if to_big(_F.real_intensity) > to_big(85) then - _F.real_intensity = 85 - end - _F.change = (_F.change or 0)*(1 - 4.*G.real_dt) + ( 4.*G.real_dt)*(_F.real_intensity < _F.intensity - 0.0 and 1 or 0)*_F.real_intensity - _F.change = (G.cry_flame_override and G.cry_flame_override['duration'] > 0) and ((_F.change + G.cry_flame_override['intensity'])/2) or _F.change - end - end -end - - SMODS.Joker:take_ownership("cry_oil_lamp", { - rarity = "cry_epic" - }, true) - - SMODS.Joker:take_ownership("j_cry_redeo", { loc_vars = function(self, q, center) local ante_mod = center.ability.extra.ante_reduction @@ -197,93 +106,6 @@ function SMODS.get_blind_amount(ante) end end - -SMODS.Consumable:take_ownership("cry_white_hole", - { - use = function(self, card, area, copier) - local used_consumable = copier or card - local modest = Card.get_gameset(used_consumable) == "modest" - --Get most played hand type (logic yoinked from Telescope) - local _hand, _tally = nil, -1 - for k, v in ipairs(G.handlist) do - if G.GAME.hands[v].visible and G.GAME.hands[v].played > _tally then - _hand = v - _tally = G.GAME.hands[v].played - end - end - local removed_levels = 0 - for k, v in ipairs(G.handlist) do - if to_big(G.GAME.hands[v].level) > to_big(1) then - local this_removed_levels = G.GAME.hands[v].level - 1 - if - -- Due to how these poker hands are loaded they still techically exist even if Poker Hand Stuff is disabled - -- Because they still exist, While Hole needs to ignore levels from these if disabled (via Black Hole, Planet.lua, etc...) - (v ~= "cry_Bulwark" and v ~= "cry_Clusterfuck" and v ~= "cry_UltPair" and v ~= "cry_WholeDeck") - or Cryptid.enabled("set_cry_poker_hand_stuff") == true - then - if v ~= _hand or not modest then - removed_levels = removed_levels + this_removed_levels - SMODS.upgrade_poker_hands{hands = v, from = used_consumable, level_up = -this_removed_levels} - end - end - end - end - update_hand_text({ sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 }, { - handname = localize(_hand, "poker_hands"), - chips = G.GAME.hands[_hand].chips, - mult = G.GAME.hands[_hand].mult, - level = G.GAME.hands[_hand].level, - }) - if modest then - SMODS.upgrade_poker_hands{hands = v, from = used_consumable, level_up = 4} - else - SMODS.upgrade_poker_hands{hands = v, from = used_consumable, level_up = (3 * to_big(removed_levels))} - end - 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, number) - local used_consumable = copier or card - local modest = Card.get_gameset(used_consumable) == "modest" - --Get most played hand type (logic yoinked from Telescope) - local _hand, _tally = nil, -1 - for k, v in ipairs(G.handlist) do - if G.GAME.hands[v].visible and G.GAME.hands[v].played > _tally then - _hand = v - _tally = G.GAME.hands[v].played - end - end - local removed_levels = 0 - for k, v in ipairs(G.handlist) do - if to_big(G.GAME.hands[v].level) > to_big(1) then - local this_removed_levels = G.GAME.hands[v].level - 1 - removed_levels = removed_levels + this_removed_levels - if v ~= _hand or not modest then - SMODS.upgrade_poker_hands{hands = v, from = used_consumable, level_up = -this_removed_levels} - end - end - end - update_hand_text({ sound = "button", volume = 0.7, pitch = 0.8, delay = 0.3 }, { - handname = localize(_hand, "poker_hands"), - chips = G.GAME.hands[_hand].chips, - mult = G.GAME.hands[_hand].mult, - level = G.GAME.hands[_hand].level, - }) - if modest then - SMODS.upgrade_poker_hands{hands = v, from = used_consumable, level_up = 4 * number} - else - SMODS.upgrade_poker_hands{hands = v, from = used_consumable, level_up = ((to_big(3) ^ to_big(number)) * removed_levels)} - end - update_hand_text( - { sound = "button", volume = 0.7, pitch = 1.1, delay = 0 }, - { mult = 0, chips = 0, handname = "", level = "" } - ) - end, - } -,true) - local updateht_ref= update_hand_text function update_hand_text( args1, args2) if args2.handname == localize("cry_None", "poker_hands") and G.GAME.badarg and G.GAME.badarg["cry_None"] then @@ -319,37 +141,6 @@ function localize(args, misc_cat) return ref(args or {}, misc_cat) end -if PTASaka then - SMODS.Joker:take_ownership("payasaka_paya", { - calculate = function(self, card, context) - if not card.ability.extra.exponential_cnt then card.ability.extra.exponential_cnt = 0 end - if context.setting_blind and ((pseudorandom('paya_hell') < (G.GAME.probabilities.normal or 1) / card.ability.odds) or card.ability.cry_rigged) then - card.ability.extra.exponential_cnt = card.ability.extra.exponential_cnt + 1 - G.E_MANAGER:add_event(Event { - func = function() - G.GAME.paya_operator = G.GAME.paya_operator + 1 - return true - end - }) - return { - message = card.ability.extra.exponential_cnt == 1 and localize('k_active_ex') or localize('k_payasaka_hyperactive_ex'), - colour = card.ability.extra.exponential_cnt == 1 and G.C.GOLD or G.C.DARK_EDITION, - card = context.blueprint_card or card - } - end - while context.end_of_round and card.ability.extra.exponential_cnt > 0 and not context.individual do - card.ability.extra.exponential_cnt = card.ability.extra.exponential_cnt - 1 - G.E_MANAGER:add_event(Event { - func = function() - G.GAME.paya_operator = math.max(G.GAME.paya_operator - 1, 0) - return true - end - }) - card_eval_status_text(card, 'extra', nil, nil, nil, { message = localize('k_payasaka_inactive_ex') }) - end - end - }, true) -end SMODS.Booster:take_ownership("p_cry_code_normal_1", { create_card = function() if G.GAME.interpolate_cards and #G.GAME.interpolate_cards > 0 then diff --git a/lib/hooks.lua b/lib/hooks.lua index afdc172c..cac110d4 100644 --- a/lib/hooks.lua +++ b/lib/hooks.lua @@ -4,7 +4,10 @@ local card_drawref = Card.draw function Card:draw(layer) local ref = card_drawref(self, layer) if self.config and self.config.center then - if self.config.center.set == "Rune" and Entropy.providence_ui_active(self) then + if self.config.center.key == "c_entr_fervour" and G.GAME.entropy and G.GAME.entropy > 100 then + self.children.center:draw_shader('entr_rainbow', nil, self.ARGS.send_to_shader) + end + if self.config.center.set == "Rune" and Entropy.providence_ui_active(self) then self.children.center:draw_shader('entr_providence', nil, self.ARGS.send_to_shader) if self.children.floating_sprite then local scale_mod = 0.07 + 0.02*math.sin(1.8*G.TIMERS.REAL) + 0.00*math.sin((G.TIMERS.REAL - math.floor(G.TIMERS.REAL))*math.pi*14)*(1 - (G.TIMERS.REAL - math.floor(G.TIMERS.REAL)))^3 @@ -119,6 +122,7 @@ function end_round() for i, v in pairs({G.jokers, G.hand, G.consumeables, G.discard, G.deck}) do for ind, card in pairs(v.cards) do if card.ability then + if card.ability.entr_marked then card.ability.entr_marked = nil end if card.ability.entr_hotfix then card.ability.entr_hotfix_rounds = (card.ability.entr_hotfix_rounds or 5) - 1 if to_big(card.ability.entr_hotfix_rounds) <= to_big(0) then @@ -127,10 +131,12 @@ function end_round() Cryptid.manipulate(card, {min=0.1, max=10}) end end - if card.ability.temporary or card.ability.temporary2 then + if card.ability.temporary or card.ability.temporary2 or card.ability.void_temporary then if card.area ~= G.hand and card.area ~= G.play and card.area ~= G.jokers and card.area ~= G.consumeables then card.states.visible = false end card:remove_from_deck() + G.entr_bypass_rebirth = true card:start_dissolve() + G.entr_bypass_rebirth = nil if card.ability.temporary then remove_temp[#remove_temp+1]=card end end if card.ability.entr_yellow_sign then card.ability.entr_yellow_sign = nil end @@ -176,10 +182,6 @@ function end_round() if G.GAME.blind_on_deck == "Boss" then G.GAME.entr_princess = nil end - G.E_MANAGER:add_event(Event({ - trigger = 'immediate', - func = (function() G.GAME.asc_power_hand = 0; G.GAME.current_round.current_hand.cry_asc_num = 0;G.GAME.current_round.current_hand.cry_asc_num_text = '';return true end) - })) G.GAME.entr_antithesis_active = nil G.GAME.antithesis_index = nil end @@ -480,13 +482,6 @@ function SMODS.create_mod_badges(obj, badges) end end -function Entropy.shares_aspect(card1, card2) - if card1:get_id() == card2:get_id() then return true end - if card1.config.center.set ~= "Default" and card1.config.center.key == card2.config.center.key then return true end - if card1.edition and card2.edition and card1.edition.key == card2.edition.key then return true end - if card1.seal and card1.seal == card2.seal then return true end -end - local is_suitref = Card.is_suit function Card:is_suit(suit, bypass_debuff, flush_calc) if self.base.suit == "entr_nilsuit" and not next(SMODS.find_card("j_entr_opal")) then @@ -511,469 +506,6 @@ function Card:get_id() return ref(self) end - -G.FUNCS.can_reserve_joker = function(e) - local c1 = e.config.ref_table - if - #G.jokers.cards - < G.jokers.config.card_limit + (Cryptid.safe_get(c1, "edition", "negative") and 1 or 0) - then - e.config.colour = G.C.GREEN - e.config.button = "reserve_joker" - else - e.config.colour = G.C.UI.BACKGROUND_INACTIVE - e.config.button = nil - end -end -G.FUNCS.reserve_joker = function(e) - local c1 = e.config.ref_table - G.E_MANAGER:add_event(Event({ - trigger = "after", - delay = 0.1, - func = function() - local c2 = copy_card(c1, nil, nil, true, false) - c1:remove() - c2:add_to_deck() - G.jokers:emplace(c2) - SMODS.calculate_context({ pull_card = true, card = c1 }) - return true - end, - })) -end - -G.FUNCS.can_open_booster = function(e) - if - G.STATE == G.STATES.SELECTING_HAND or G.STATE == G.STATES.SHOP - then - e.config.colour = G.C.GREEN - e.config.button = "open_booster" - else - e.config.colour = G.C.UI.BACKGROUND_INACTIVE - e.config.button = nil - end -end -G.FUNCS.open_booster = function(e) - local c1 = e.config.ref_table - G.GAME.DefineBoosterState = G.STATE - delay(0.1) - local area = c1.area - if area == G.shop_vouchers then - G.GAME.current_round.voucher.spawn[c1.config.center_key] = nil - end - if c1.ability.booster_pos then G.GAME.current_round.used_packs[c1.ability.booster_pos] = 'USED' end - --draw_card(G.hand, G.play, 1, 'up', true, card, nil, true) - if not c1.from_tag then - G.GAME.round_scores.cards_purchased.amt = G.GAME.round_scores.cards_purchased.amt + 1 - end - if c1.RPerkeoPack then - G.RPerkeoPack = true - end - if G.blind_select then - G.blind_select:remove() - G.blind_prompt_box:remove() - end - e.config.ref_table.cost = 0 - e.config.ref_table:open() - if c1.ability.cry_multiuse and to_big(c1.ability.cry_multiuse) > to_big(1) then - local card = c1 - card.ability.cry_multiuse = card.ability.cry_multiuse - 1 - card.ability.extra_value = -1 * math.max(1, math.floor(card.cost/2)) - card:set_cost() - delay(0.4) - - -- i make my own card eval status text :D - - card:juice_up() - play_sound('generic1') - attention_text({ - text = format_ui_value(card.ability.cry_multiuse), - scale = 1.1, - hold = 0.6, - major = card, - backdrop_colour = G.C.SET[card.config.center.set], - align = 'bm', - offset = {x = 0, y = 0.2} - }) - local c2 = copy_card(c1) - c2:add_to_deck() - area:emplace(c2) - - end - --c1:remove() -end - -G.FUNCS.can_open_voucher = function(e) - local c1 = e.config.ref_table - e.config.colour = G.C.GREEN - e.config.button = "open_voucher" -end -G.FUNCS.open_voucher = function(e) - local state = G.STATE - local c1 = e.config.ref_table - c1.cost = 0 - local area = c1.area - c1:redeem() - c1:start_dissolve() - c1:remove() - if c1.ability.cry_multiuse and to_big(c1.ability.cry_multiuse) > to_big(1) then - local card = c1 - card.ability.cry_multiuse = card.ability.cry_multiuse - 1 - card.ability.extra_value = -1 * math.max(1, math.floor(card.cost/2)) - card:set_cost() - delay(0.4) - - -- i make my own card eval status text :D - - card:juice_up() - play_sound('generic1') - attention_text({ - text = format_ui_value(card.ability.cry_multiuse), - scale = 1.1, - hold = 0.6, - major = card, - backdrop_colour = G.C.SET[card.config.center.set], - align = 'bm', - offset = {x = 0, y = 0.2} - }) - local c2 = copy_card(c1) - c2:add_to_deck() - area:emplace(c2) - - end - G.STATE = state -end - -G.FUNCS.can_reserve_booster = function(e) - local c1 = e.config.ref_table - if - G.consumeables.config.card_count - < G.consumeables.config.card_limit + (Cryptid.safe_get(c1, "edition", "negative") and 1 or 0) - then - e.config.colour = G.C.GREEN - e.config.button = "reserve_booster" - else - e.config.colour = G.C.UI.BACKGROUND_INACTIVE - e.config.button = nil - end -end -G.FUNCS.reserve_booster = function(e) - local c1 = e.config.ref_table - --G.GAME.DefineBoosterState = G.STATE - --c1:open() - G.pack_cards:remove_card(c1) - G.consumeables.cards[#G.consumeables.cards + 1] = c1 - c1.area = G.consumeables - c1.parent = G.consumeables - c1.layered_parallax = G.consumeables.layered_parallax - G.consumeables:set_ranks() - G.consumeables:align_cards() - - SMODS.calculate_context({ pull_card = true, card = c1 }) - G.GAME.pack_choices = G.GAME.pack_choices - 1 - if G.GAME.pack_choices <= 0 then - G.FUNCS.end_consumeable(nil, delay_fac) - end - if c1.ability.glitched_crown then - local center = G.P_CENTERS[c1.ability.glitched_crown[c1.glitched_index]] - c1:set_ability(center) - c1.ability.glitched_crown = nil - end - --c1:remove() -end - -G.FUNCS.can_buy_deckorsleeve = function(e) - local c1 = e.config.ref_table - e.config.colour = G.C.GREEN - e.config.button = "buy_deckorsleeve_2" -end -G.FUNCS.can_buy_deckorsleeve_from_shop = function(e) - local c1 = e.config.ref_table - if to_big(G.GAME.dollars+G.GAME.bankrupt_at) > to_big(c1.cost) or Entropy.has_rune("rune_entr_naudiz") then - e.config.colour = G.C.GREEN - e.config.button = "buy_deckorsleeve_from_shop" - else - e.config.colour = G.C.UI.BACKGROUND_INACTIVE - e.config.button = nil - end -end -G.FUNCS.buy_deckorsleeve_from_shop = function(e) - local c1 = e.config.ref_table - --G.GAME.DefineBoosterState = G.STATE - --c1:open() - ease_dollars(-c1.cost) - G.FUNCS.redeem_deckorsleeve(e) -end - -G.FUNCS.buy_deckorsleeve_2 = function(e) - local c1 = e.config.ref_table - --G.GAME.DefineBoosterState = G.STATE - --c1:open() - G.FUNCS.redeem_deckorsleeve(e) -end - -G.FUNCS.redeem_deckorsleeve = function(e) - G.E_MANAGER:add_event(Event{ - trigger = "after", - func = function() - - local area - if G.STATE == G.STATES.HAND_PLAYED then - if not G.redeemed_vouchers_during_hand then - G.redeemed_vouchers_during_hand = - CardArea(G.play.T.x, G.play.T.y, G.play.T.w, G.play.T.h, { type = "play", card_limit = 5 }) - end - area = G.redeemed_vouchers_during_hand - else - area = G.play - end - - local card = e.config.ref_table - if card.config.center.key == "j_joker" then - card:set_ability(G.P_CENTERS.b_red) - end - card.area:remove_card(card) - card:add_to_deck() - area:emplace(card) - card.cost = 0 - card:redeem_deck() - return true - end - }) -end - -G.FUNCS.buy_deckorsleeve = function(e) - local c1 = e.config.ref_table - --G.GAME.DefineBoosterState = G.STATE - --c1:open() - if not c1.config then - c1.config = {} - end - if not c1.config.center then - c1.config.center = G.P_CENTERS[c1.center_key] - end - if c1.area then c1.area:remove_card(c1) end - if c1.config and c1.config.center and c1.config.center.apply then - local orig = G.GAME.starting_params.joker_slots - if c1.config.center.set == "Sleeve" then - c1.config.center:apply(c1.config.center) - else - c1.config.center:apply(false) - end - local diff = G.GAME.starting_params.joker_slots - orig - if to_big(diff) > to_big(0) then - Entropy.handle_card_limit(G.jokers, diff) - end - end - for i, v in pairs(c1.config and c1.config.center and c1.config.center.config or {}) do - if i == "hands" then - G.GAME.round_resets.hands = G.GAME.round_resets.hands + v - ease_hands_played(v) - end - if i == "discards" then - G.GAME.round_resets.discards = G.GAME.round_resets.discards + v - ease_discard(v) - end - if i == "joker_slot" then Entropy.handle_card_limit(G.jokers, v) end - if i == "hand_size" then Entropy.handle_card_limit(G.hand, v) end - if i == "dollars" then ease_dollars(v) end - if i == "spectral_rate" then G.GAME.spectral_rate = v end - if i == "plincoins" then ease_plincoins(v) end - if i == "jokers" then - delay(0.4) - G.E_MANAGER:add_event(Event({ - func = function() - for k, v in ipairs(c1.config.center.jokers) do - local card = create_card('Joker', G.jokers, nil, nil, nil, nil, v, 'deck') - card:add_to_deck() - G.jokers:emplace(card) - card:start_materialize() - end - return true - end - })) - end - if i == "voucher" then - G.GAME.used_vouchers[c1.config.center.config.voucher] = true - G.GAME.starting_voucher_count = (G.GAME.starting_voucher_count or 0) + 1 - G.E_MANAGER:add_event(Event({ - func = function() - Card.apply_to_run(nil, G.P_CENTERS[c1.config.center.config.voucher]) - return true - end - })) - end - if i == "consumables" then - delay(0.4) - G.E_MANAGER:add_event(Event({ - func = function() - for k, v in ipairs(c1.config.center.config.consumables) do - local card = create_card('Tarot', G.consumeables, nil, nil, nil, nil, v, 'deck') - card:add_to_deck() - G.consumeables:emplace(card) - end - return true - end - })) - end - if i == "vouchers" then - for k, v in pairs(c1.config.center.config.vouchers) do - G.GAME.used_vouchers[v] = true - G.GAME.starting_voucher_count = (G.GAME.starting_voucher_count or 0) + 1 - G.E_MANAGER:add_event(Event({ - func = function() - Card.apply_to_run(nil, G.P_CENTERS[v]) - return true - end - })) - end - end - if i == "consumable_slot" then - G.GAME.starting_params.consumable_slots = G.GAME.starting_params.consumable_slots + v - end - if i == "ante_scaling" then - G.GAME.starting_params.ante_scaling = v - end - if i == "boosters_in_shop" then - G.GAME.starting_params.boosters_in_shop = v - end - if i == "no_interest" then - G.GAME.modifiers.no_interest = true - end - if i == "extra_hand_bonus" then - G.GAME.modifiers.money_per_hand = v - end - if i == "extra_discard_bonus" then - G.GAME.modifiers.money_per_discard = v - end - if i == "no_faces" then - for i, v in pairs(G.playing_cards) do - if v:is_face() then - SMODS.change_base(v, nil, pseudorandom_element({"Ace", "2", "3", "4", "5", "6", "7", "8", "9", "10"}, pseudoseed("abandoned_redeem"))) - end - end - end - if i == "randomize_rank_suit" then - for i, v in pairs(G.playing_cards) do - Entropy.randomize_rank_suit(v, true, true, "erratic_midgame") - end - end - end - if c1.config and c1.config.center and c1.config.center.config and c1.config.center.config then - if c1.config.center.key == "b_checkered" or c1.config.center.key == "sleeve_casl_checkered" then - for i, v in pairs(G.playing_cards) do - if v:is_suit("Diamonds") then - SMODS.change_base(v, "Hearts") - elseif v:is_suit("Clubs") then - SMODS.change_base(v, "Spades") - elseif not v:is_suit("Hearts") and not v:is_suit("Spades") then - SMODS.change_base(v, pseudorandom_element({"Spades", "Hearts"}, pseudoseed("checkered_redeem")), nil) - end - end - elseif c1.config.center.key == "b_entr_doc" or c1.config.center.key == "sleeve_entr_doc" then - -- G.E_MANAGER:add_event(Event({ - -- trigger = "after", - -- delay = 0.1, - -- func = function() - -- G.HUD:remove() - -- G.HUD = nil - -- G.HUD = UIBox{ - -- definition = create_UIBox_HUD(), - -- config = {align=('cli'), offset = {x=-1.3,y=0},major = G.ROOM_ATTACH} - -- } - -- for i, v in pairs(G.hand_text_area) do - -- G.hand_text_area[i] = G.HUD:get_UIE_by_ID(v.config.id) - -- end - -- G.HUD_blind:remove() - -- G.HUD_blind = UIBox{ - -- definition = create_UIBox_HUD_blind_doc(), - -- config = {major = G.HUD:get_UIE_by_ID('row_blind'), align = 'cm', offset = {x=0,y=-10}, bond = 'Weak'} - -- } - -- G.HUD:recalculate() - -- G.HUD_blind:recalculate() - -- return true - -- end - -- })) - end - end - if c1.config and c1.config.center and c1.config.center.config and c1.config.center.config and c1.config.center.config.cry_beta then - local count = G.consumeables.config.card_limit - local cards = {} - for i, v in pairs(G.jokers.cards) do - cards[#cards+1]=v - end - for i, v in pairs(G.consumeables.cards) do - cards[#cards+1]=v - end - for i, v in pairs(cards) do - v.area:remove_card(v) - v:remove_from_deck() - end - G.consumeables:remove() - count = count + G.jokers.config.card_limit - G.jokers:remove() - G.consumeables = nil - local CAI = { - discard_W = G.CARD_W, - discard_H = G.CARD_H, - deck_W = G.CARD_W*1.1, - deck_H = 0.95*G.CARD_H, - hand_W = 6*G.CARD_W, - hand_H = 0.95*G.CARD_H, - play_W = 5.3*G.CARD_W, - play_H = 0.95*G.CARD_H, - joker_W = 4.9*G.CARD_W, - joker_H = 0.95*G.CARD_H, - consumeable_W = 2.3*G.CARD_W, - consumeable_H = 0.95*G.CARD_H - } - G.jokers = CardArea( - CAI.consumeable_W, 0, - CAI.joker_W+CAI.consumeable_W, - CAI.joker_H, - {card_limit = count, type = 'joker', highlight_limit = 1e100} - ) - G.consumeables = G.jokers - for i, v in pairs(cards) do - v:add_to_deck() - G.jokers:emplace(v) - end - end - G.GAME.entr_bought_decks = G.GAME.entr_bought_decks or {} - G.GAME.entr_bought_decks[#G.GAME.entr_bought_decks+1] = c1.config.center.key - c1:start_dissolve() - if c1.children.price then c1.children.price:remove() end - c1.children.price = nil - if c1.children.buy_button then c1.children.buy_button:remove() end - c1.children.buy_button = nil - remove_nils(c1.children) - - SMODS.calculate_context({ pull_card = true, card = c1 }) - --c1:remove() -end - -G.FUNCS.can_reserve_card_to_deck = function(e) - local c1 = e.config.ref_table - e.config.colour = G.C.GREEN - e.config.button = "reserve_card_to_deck" -end -G.FUNCS.reserve_card_to_deck = function(e) - local c1 = e.config.ref_table - G.E_MANAGER:add_event(Event({ - trigger = "after", - delay = 0.1, - func = function() - local c2 = copy_card(c1, nil, nil, true, false) - c1:remove() - c2:add_to_deck() - table.insert(G.playing_cards, c2) - G.deck:emplace(c2) - playing_card_joker_effects({ c2 }) - SMODS.calculate_context({ pull_card = true, card = c1 }) - return true - end, - })) -end - G.FUNCS.can_toggle_xekanos = function(e) if e.config.ref_table.ability.turned_off @@ -1044,221 +576,10 @@ G.FUNCS.sell_slot = function(e) Entropy.handle_card_limit(G.jokers, -1) end -G.FUNCS.can_use_joker = function(e) - local center = e.config.ref_table.config.center - if - center.can_use and center:can_use(e.config.ref_table) and not G.CONTROLLER.locked and not e.config.ref_table.debuff - then - e.config.colour = G.C.RED - e.config.button = "use_joker" - else - e.config.colour = G.C.UI.BACKGROUND_INACTIVE - e.config.button = nil - end -end -G.FUNCS.use_joker = function(e) - local int = G.TAROT_INTERRUPT - G.TAROT_INTERRUPT = true - local center = e.config.ref_table.config.center - if center.use then - center:use(e.config.ref_table) - end - e.config.ref_table:juice_up() - G.TAROT_INTERRUPT = int -end - --som local G_UIDEF_use_and_sell_buttons_ref = G.UIDEF.use_and_sell_buttons function G.UIDEF.use_and_sell_buttons(card) local abc = G_UIDEF_use_and_sell_buttons_ref(card) - -- Allow code cards to be reserved - if (card.area == G.consumeables or card.area == G.jokers) and (card.config.center.set == "Voucher" or card.ability.set == "Voucher") then - sell = {n=G.UIT.C, config={align = "cr"}, nodes={ - {n=G.UIT.C, config={ref_table = card, align = "cr",padding = 0.1, r=0.08, minw = 1.25, hover = true, shadow = true, colour = G.C.UI.BACKGROUND_INACTIVE, one_press = true, button = 'sell_card', func = 'can_sell_card', handy_insta_action = 'sell'}, nodes={ - {n=G.UIT.B, config = {w=0.1,h=0.6}}, - {n=G.UIT.C, config={align = "tm"}, nodes={ - {n=G.UIT.R, config={align = "cm", maxw = 1.25}, nodes={ - {n=G.UIT.T, config={text = localize('b_sell'),colour = G.C.UI.TEXT_LIGHT, scale = 0.4, shadow = true}} - }}, - {n=G.UIT.R, config={align = "cm"}, nodes={ - {n=G.UIT.T, config={text = localize('$'),colour = G.C.WHITE, scale = 0.4, shadow = true}}, - {n=G.UIT.T, config={ref_table = card, ref_value = 'sell_cost_label',colour = G.C.WHITE, scale = 0.55, shadow = true}} - }} - }} - }}, - }} - use = - {n=G.UIT.C, config={align = "cr"}, nodes={ - - {n=G.UIT.C, config={ref_table = card, align = "cr",maxw = 1.25, padding = 0.1, r=0.08, minw = 1.25, minh = (card.area and card.area.config.type == 'joker') and 0 or 1, hover = true, shadow = true, colour = G.C.UI.BACKGROUND_INACTIVE, one_press = true, button = 'open_voucher', func = 'can_open_voucher', handy_insta_action = 'use'}, nodes={ - {n=G.UIT.B, config = {w=0.1,h=0.6}}, - {n=G.UIT.T, config={text = localize('b_redeem'),colour = G.C.UI.TEXT_LIGHT, scale = 0.55, shadow = true}} - }} - }} - return { - n=G.UIT.ROOT, config = {padding = 0, colour = G.C.CLEAR}, nodes={ - {n=G.UIT.C, config={padding = 0.15, align = 'cl'}, nodes={ - {n=G.UIT.R, config={align = 'cl'}, nodes={ - sell - }}, - {n=G.UIT.R, config={align = 'cl'}, nodes={ - use - }}, - }}, - }} - end - if (card.ability.set == "Back" or card.ability.set == "Sleeve" or card.config.center.set == "Back" or card.config.center.set == "Sleeve") then - if card.area == G.hand or card.area == G.pack_cards then - return { - n=G.UIT.ROOT, config = {padding = 0, colour = G.C.CLEAR}, nodes={ - {n=G.UIT.R, config={ref_table = card, r = 0.08, padding = 0.1, align = "bm", minw = 0.5*card.T.w - 0.15, maxw = 0.9*card.T.w - 0.15, minh = 0.3*card.T.h, hover = true, shadow = true, colour = G.C.UI.BACKGROUND_INACTIVE, one_press = true, button = 'buy_deckorsleeve', func = 'can_buy_deckorsleeve', handy_insta_action = 'buy_or_sell'}, nodes={ - {n=G.UIT.T, config={text = localize('b_redeem'),colour = G.C.UI.TEXT_LIGHT, scale = 0.45, shadow = true}} - }}, - }} - end - if card.area == G.consumeables or card.area == G.jokers then - sell = {n=G.UIT.C, config={align = "cr"}, nodes={ - {n=G.UIT.C, config={ref_table = card, align = "cr",padding = 0.1, r=0.08, minw = 1.25, hover = true, shadow = true, colour = G.C.UI.BACKGROUND_INACTIVE, one_press = true, button = 'sell_card', func = 'can_sell_card', handy_insta_action = "sell"}, nodes={ - {n=G.UIT.B, config = {w=0.1,h=0.6}}, - {n=G.UIT.C, config={align = "tm"}, nodes={ - {n=G.UIT.R, config={align = "cm", maxw = 1.25}, nodes={ - {n=G.UIT.T, config={text = localize('b_sell'),colour = G.C.UI.TEXT_LIGHT, scale = 0.4, shadow = true}} - }}, - {n=G.UIT.R, config={align = "cm"}, nodes={ - {n=G.UIT.T, config={text = localize('$'),colour = G.C.WHITE, scale = 0.4, shadow = true}}, - {n=G.UIT.T, config={ref_table = card, ref_value = 'sell_cost_label',colour = G.C.WHITE, scale = 0.55, shadow = true}} - }} - }} - }}, - }} - use = - {n=G.UIT.C, config={align = "cr"}, nodes={ - - {n=G.UIT.C, config={ref_table = card, align = "cr",maxw = 1.25, padding = 0.1, r=0.08, minw = 1.25, minh = (card.area and card.area.config.type == 'joker') and 0 or 1, hover = true, shadow = true, colour = G.C.UI.BACKGROUND_INACTIVE, one_press = true, button = 'buy_deckorsleeve', func = 'can_buy_deckorsleeve', handy_insta_action = 'use'}, nodes={ - {n=G.UIT.B, config = {w=0.1,h=0.6}}, - {n=G.UIT.T, config={text = localize('b_redeem'),colour = G.C.UI.TEXT_LIGHT, scale = 0.55, shadow = true}} - }} - }} - return { - n=G.UIT.ROOT, config = {padding = 0, colour = G.C.CLEAR}, nodes={ - {n=G.UIT.C, config={padding = 0.15, align = 'cl'}, nodes={ - {n=G.UIT.R, config={align = 'cl'}, nodes={ - sell - }}, - {n=G.UIT.R, config={align = 'cl'}, nodes={ - use - }}, - }}, - }} - end - end - if ((card.area == G.consumeables or card.area == G.jokers) and G.consumeables and card.config.center.set == "Booster") then - sell = {n=G.UIT.C, config={align = "cr"}, nodes={ - {n=G.UIT.C, config={ref_table = card, align = "cr",padding = 0.1, r=0.08, minw = 1.25, hover = true, shadow = true, colour = G.C.UI.BACKGROUND_INACTIVE, one_press = true, button = 'sell_card', func = 'can_sell_card', handy_insta_action = 'sell'}, nodes={ - {n=G.UIT.B, config = {w=0.1,h=0.6}}, - {n=G.UIT.C, config={align = "tm"}, nodes={ - {n=G.UIT.R, config={align = "cm", maxw = 1.25}, nodes={ - {n=G.UIT.T, config={text = localize('b_sell'),colour = G.C.UI.TEXT_LIGHT, scale = 0.4, shadow = true}} - }}, - {n=G.UIT.R, config={align = "cm"}, nodes={ - {n=G.UIT.T, config={text = localize('$'),colour = G.C.WHITE, scale = 0.4, shadow = true}}, - {n=G.UIT.T, config={ref_table = card, ref_value = 'sell_cost_label',colour = G.C.WHITE, scale = 0.55, shadow = true}} - }} - }} - }}, - }} - use = - {n=G.UIT.C, config={align = "cr"}, nodes={ - - {n=G.UIT.C, config={ref_table = card, align = "cr",maxw = 1.25, padding = 0.1, r=0.08, minw = 1.25, minh = (card.area and card.area.config.type == 'joker') and 0 or 1, hover = true, shadow = true, colour = G.C.UI.BACKGROUND_INACTIVE, one_press = true, button = 'open_booster', func = 'can_open_booster', handy_insta_action = 'use'}, nodes={ - {n=G.UIT.B, config = {w=0.1,h=0.6}}, - {n=G.UIT.T, config={text = localize('b_open'),colour = G.C.UI.TEXT_LIGHT, scale = 0.55, shadow = true}} - }} - }} - return { - n=G.UIT.ROOT, config = {padding = 0, colour = G.C.CLEAR}, nodes={ - {n=G.UIT.C, config={padding = 0.15, align = 'cl'}, nodes={ - {n=G.UIT.R, config={align = 'cl'}, nodes={ - sell - }}, - {n=G.UIT.R, config={align = 'cl'}, nodes={ - use - }}, - }}, - }} - end - if (card.area == G.hand and G.hand) then --Add a use button - if card.config.center.set == "Joker" then - return { - n=G.UIT.ROOT, config = {padding = 0, colour = G.C.CLEAR}, nodes={ - {n=G.UIT.R, config={ref_table = card, r = 0.08, padding = 0.1, align = "bm", minw = 0.5*card.T.w - 0.15, maxw = 0.9*card.T.w - 0.15, minh = 0.3*card.T.h, hover = true, shadow = true, colour = G.C.UI.BACKGROUND_INACTIVE, one_press = true, button = 'reserve_joker', func = 'can_reserve_joker', handy_insta_action = 'buy_or_sell'}, nodes={ - {n=G.UIT.T, config={text = localize('b_select'),colour = G.C.UI.TEXT_LIGHT, scale = 0.45, shadow = true}} - }}, - }} - end - if card.config.center.set == "Booster" then - return { - n=G.UIT.ROOT, config = {padding = 0, colour = G.C.CLEAR}, nodes={ - {n=G.UIT.R, config={ref_table = card, r = 0.08, padding = 0.1, align = "bm", minw = 0.5*card.T.w - 0.15, maxw = 0.9*card.T.w - 0.15, minh = 0.3*card.T.h, hover = true, shadow = true, colour = G.C.UI.BACKGROUND_INACTIVE, one_press = true, button = 'open_booster', func = 'can_open_booster', handy_insta_action = 'buy_or_sell'}, nodes={ - {n=G.UIT.T, config={text = localize('b_open'),colour = G.C.UI.TEXT_LIGHT, scale = 0.45, shadow = true}} - }}, - }} - end - if card.config.center.set == "Voucher" then - return { - n=G.UIT.ROOT, config = {padding = 0, colour = G.C.CLEAR}, nodes={ - {n=G.UIT.R, config={ref_table = card, r = 0.08, padding = 0.1, align = "bm", minw = 0.5*card.T.w - 0.15, maxw = 0.9*card.T.w - 0.15, minh = 0.3*card.T.h, hover = true, shadow = true, colour = G.C.UI.BACKGROUND_INACTIVE, one_press = true, button = 'open_voucher', func = 'can_open_voucher', handy_insta_action = 'buy_or_sell'}, nodes={ - {n=G.UIT.T, config={text = localize('b_redeem'),colour = G.C.UI.TEXT_LIGHT, scale = 0.45, shadow = true}} - }}, - }} - end - end - --let boosters not be recursive - if (card.area == G.pack_cards and G.pack_cards) and card.config.center.set == "Booster" and not Entropy.ConsumablePackBlacklist[SMODS.OPENED_BOOSTER.config.center.key] then - return { - n=G.UIT.ROOT, config = {padding = 0, colour = G.C.CLEAR}, nodes={ - {n=G.UIT.R, config={ref_table = card, r = 0.08, padding = 0.1, align = "bm", minw = 0.5*card.T.w - 0.15, maxw = 0.9*card.T.w - 0.15, minh = 0.3*card.T.h, hover = true, shadow = true, colour = G.C.UI.BACKGROUND_INACTIVE, one_press = true, button = 'reserve_booster', func = 'can_reserve_booster', handy_insta_action = 'buy_or_sell'}, nodes={ - {n=G.UIT.T, config={text = localize('b_select'),colour = G.C.UI.TEXT_LIGHT, scale = 0.45, shadow = true}} - }}, - }} - end - if (card.area == G.jokers and G.jokers and card.config.center.use) and not card.debuff and card.config.center.set == "Joker" then - sell = {n=G.UIT.C, config={align = "cr"}, nodes={ - {n=G.UIT.C, config={ref_table = card, align = "cr",padding = 0.1, r=0.08, minw = 1.25, hover = true, shadow = true, colour = G.C.UI.BACKGROUND_INACTIVE, one_press = true, button = 'sell_card', func = 'can_sell_card', handy_insta_action = 'sell'}, nodes={ - {n=G.UIT.B, config = {w=0.1,h=0.6}}, - {n=G.UIT.C, config={align = "tm"}, nodes={ - {n=G.UIT.R, config={align = "cm", maxw = 1.25}, nodes={ - {n=G.UIT.T, config={text = localize('b_sell'),colour = G.C.UI.TEXT_LIGHT, scale = 0.4, shadow = true}} - }}, - {n=G.UIT.R, config={align = "cm"}, nodes={ - {n=G.UIT.T, config={text = localize('$'),colour = G.C.WHITE, scale = 0.4, shadow = true}}, - {n=G.UIT.T, config={ref_table = card, ref_value = 'sell_cost_label',colour = G.C.WHITE, scale = 0.55, shadow = true}} - }} - }} - }}, - }} - transition = {n=G.UIT.C, config={align = "cr"}, nodes={ - {n=G.UIT.C, config={ref_table = card, align = "cm",padding = 0.1, r=0.08, minw = 1.25, hover = true, shadow = true, colour = G.C.UI.BACKGROUND_INACTIVE, button = 'use_joker', func = 'can_use_joker', handy_insta_action = 'use'}, nodes={ - {n=G.UIT.B, config = {w=0.1,h=0.3}}, - {n=G.UIT.C, config={align = "tm"}, nodes={ - {n=G.UIT.R, config={align = "cm", maxw = 1.25}, nodes={ - {n=G.UIT.T, config={text = localize(card.config.center.use_key or "b_use"),colour = G.C.UI.TEXT_LIGHT, scale = 0.4, shadow = true}} - }}, - }} - }}, - }} - return { - n=G.UIT.ROOT, config = {padding = 0, colour = G.C.CLEAR}, nodes={ - {n=G.UIT.C, config={padding = 0, align = 'cl'}, nodes={ - {n=G.UIT.R, config={align = 'cl'}, nodes={ - sell - }}, - {n=G.UIT.R, config={align = 'cl'}, nodes={ - transition - }}, - }}, - }} - end if (card.area == G.jokers and G.jokers and card.config.center.key == "j_entr_akyros") and not card.debuff then sell = {n=G.UIT.C, config={align = "cr"}, nodes={ {n=G.UIT.C, config={ref_table = card, align = "cr",padding = 0.1, r=0.08, minw = 1.25, hover = true, shadow = true, colour = G.C.UI.BACKGROUND_INACTIVE, one_press = true, button = 'sell_card', func = 'can_sell_card', handy_insta_action = 'sell'}, nodes={ @@ -1390,117 +711,6 @@ function G.UIDEF.use_and_sell_buttons(card) }}, }}, }} - end - if Entropy.needs_use_button(card) and card.area == G.pack_cards and G.pack_cards and (Entropy.needs_pull_button(card) or (not SMODS.OPENED_BOOSTER or not SMODS.OPENED_BOOSTER.draw_hand and card.children.front and (card.ability.consumeable))) then - return { - n = G.UIT.ROOT, - config = { padding = -0.1, colour = G.C.CLEAR }, - nodes = { - { - n = G.UIT.R, - config = { - ref_table = card, - r = 0.08, - padding = 0.1, - align = "bm", - minw = 0.5 * card.T.w - 0.15, - minh = 0.1 * card.T.h or 0.7 * card.T.h, - maxw = 0.7 * card.T.w - 0.15, - hover = true, - shadow = true, - colour = G.C.UI.BACKGROUND_INACTIVE, - one_press = true, - button = "use_card", - func = card:is_playing_card() and "can_reserve_card_to_deck" or "can_reserve_card", - handy_insta_action = 'use' - }, - nodes = { - { - n = G.UIT.T, - config = { - text = Entropy.needs_pull_button(card), - colour = G.C.UI.TEXT_LIGHT, - scale = 0.55, - shadow = true, - }, - }, - }, - }, - { - n = G.UIT.R, - config = { - ref_table = card, - r = 0.08, - padding = 0.1, - align = "bm", - minw = 0.5 * card.T.w - 0.15, - maxw = 0.9 * card.T.w - 0.15, - minh = 0.1 * card.T.h, - hover = true, - shadow = true, - colour = G.C.UI.BACKGROUND_INACTIVE, - one_press = true, - button = "Do you know that this parameter does nothing?", - func = "can_use_consumeable", - handy_insta_action = 'use' - }, - nodes = { - { - n = G.UIT.T, - config = { - text = localize("b_use"), - colour = G.C.UI.TEXT_LIGHT, - scale = 0.45, - shadow = true, - }, - }, - }, - }, - { n = G.UIT.R, config = { align = "bm", w = 7.7 * card.T.w } }, - { n = G.UIT.R, config = { align = "bm", w = 7.7 * card.T.w } }, - { n = G.UIT.R, config = { align = "bm", w = 7.7 * card.T.w } }, - { n = G.UIT.R, config = { align = "bm", w = 7.7 * card.T.w } }, - -- Betmma can't explain it, neither can I - }, - } - elseif card.area == G.pack_cards and G.pack_cards and (Entropy.needs_pull_button(card) or (not SMODS.OPENED_BOOSTER or not SMODS.OPENED_BOOSTER.draw_hand and card.children.front and (card.ability.consumeable))) then - return { - n = G.UIT.ROOT, - config = { padding = -0.1, colour = G.C.CLEAR }, - nodes = { - { - n = G.UIT.R, - config = { - ref_table = card, - r = 0.08, - padding = 0.1, - align = "bm", - minw = 0.5 * card.T.w - 0.15, - minh = 0.7 * card.T.h, - maxw = 0.7 * card.T.w - 0.15, - hover = true, - shadow = true, - colour = G.C.UI.BACKGROUND_INACTIVE, - one_press = true, - button = "Do you know that this parameter does nothing?", - func = card:is_playing_card() and "can_reserve_card_to_deck" or "can_reserve_card", - handy_insta_action = 'use' - }, - nodes = { - { - n = G.UIT.T, - config = { - text = Entropy.needs_pull_button(card), - colour = G.C.UI.TEXT_LIGHT, - scale = 0.55, - shadow = true, - }, - }, - }, - }, - -- Betmma can't explain it, neither can I - }, - } end return abc end @@ -1522,8 +732,8 @@ G.FUNCS.sell_card = function(e) end local scie = SMODS.calculate_individual_effect -function SMODS.calculate_individual_effect(effect, scored_card, key, amount, from_edition) - if Entropy.BlindIs("bl_entr_theta") and not G.GAME.blind.disabled then +function SMODS.calculate_individual_effect(effect, scored_card, key, amount, from_edition, ...) + if Entropy.blind_is("bl_entr_theta") and not G.GAME.blind.disabled then --hacky solution --probably want a whitelist of effects in the future --but should work fine if everyone uses standard capitalisation @@ -1546,167 +756,78 @@ function SMODS.calculate_individual_effect(effect, scored_card, key, amount, fro scored_card = G.message_card end if string.find(key, "chip") and next(SMODS.find_card("j_entr_yogurt")) then - SMODS.calculate_context({entr_chips_calculated = true, other_card = scored_card or effect.card}) + SMODS.calculate_context({entr_chips_calculated = true, other_card = scored_card or effect.card}) end if scored_card and scored_card.ability and scored_card.ability.entr_value_fac and type(amount) == "number" then amount= amount * scored_card.ability.entr_value_fac end - ret = scie(effect, scored_card, key, amount, from_edition) - if ret then - return ret - end - if (key == 'eq_mult' or key == 'Eqmult_mod') then - mult = mod_mult(amount) - if not Entropy.should_skip_animations() then - Entropy.card_eval_status_text_eq(scored_card or effect.card or effect.focus, 'mult', amount, percent) + if key == "e_chips" or key == "echips" or key == "Echip_mod" then + for i, v in pairs(G.jokers.cards) do + if v.config.center_key == "j_entr_unstable_rift" then + v.ability.extra.chips = v.ability.extra.chips ^ (1 + (amount - 1) * 0.2) + end end - return true end - if (key == 'eq_chips' or key == 'Eqchips_mod') then - local chips = hand_chips - hand_chips = mod_chips(amount) - if not Entropy.should_skip_animations() then - Entropy.card_eval_status_text_eq(scored_card or effect.card or effect.focus, 'chips', amount, percent, nil, nil, "="..amount.. " Chips", G.C.BLUE) + if key == "e_mult" or key == "emult" or key == "Emult_mod" then + for i, v in pairs(G.jokers.cards) do + if v.config.center_key == "j_entr_unstable_rift" then + v.ability.extra.mult = v.ability.extra.mult ^ (1 + (amount - 1) * 0.2) + end end - return true end - if (key == 'asc') or (key == 'asc_mod') or key == "x_asc" then - local e = card_eval_status_text - for i, v in pairs(SMODS.find_card("j_entr_axeh")) do - amount = amount * v.ability.asc_mod - end - local hand - if G.GAME.asc_power_hand and G.GAME.asc_power_hand ~= 0 then hand = G.GAME.asc_power_hand end - local orig = to_big((hand or G.GAME.current_round.current_hand.cry_asc_num)) - if not G.GAME.asc_power_hand or G.GAME.asc_power_hand == 0 then G.GAME.asc_power_hand = G.GAME.current_round.current_hand.cry_asc_num end - G.GAME.asc_power_hand = to_big(G.GAME.asc_power_hand) * to_big(amount) - local text = number_format(to_big(G.GAME.asc_power_hand)) + ret = scie(effect, scored_card, key, amount, from_edition, ...) + if scored_card and next(SMODS.find_card("j_entr_mutagenesis")) and scored_card.is_playing_card and scored_card:is_playing_card() and (not effect.message_card or effect.message_card == scored_card) and key ~= "message" and key ~= "colour" then + for i, v in pairs(SMODS.find_card("j_entr_mutagenesis")) do + if Entropy.add_perma_bonus(v, key, amount) then if not Entropy.should_skip_animations() then - G.E_MANAGER:add_event(Event({ - func = function() - G.GAME.current_round.current_hand.cry_asc_num_text = (to_big(G.GAME.asc_power_hand) < to_big(0) and " (" or " (+") .. (text) .. ")" - return true + G.E_MANAGER:add_event(Event{ + trigger = "after", + func = function() + play_sound("entr_void_generic") + return true + end + }) end - })) - else - G.GAME.current_round.current_hand.cry_asc_num_text = (to_big(G.GAME.asc_power_hand) < to_big(0) and " (" or " (+") .. (text) .. ")" - end - card_eval_status_text = function() end - scie(effect, scored_card, "Xmult_mod", Cryptid.ascend(1, G.GAME.asc_power_hand - orig), false) - scie(effect, scored_card, "Xchip_mod", Cryptid.ascend(1, G.GAME.asc_power_hand - orig), false) - card_eval_status_text = e - if not Entropy.should_skip_animations() then - Entropy.card_eval_status_text_eq(scored_card or effect.card or effect.focus, 'mult', amount, percent, nil, nil, "X"..amount.." Asc", G.C.GOLD, "entr_e_solar", 0.6) + delay(0.1) + SMODS.calculate_effect({message = localize("k_upgrade_ex"), colour = Entropy.void_gradient, card = v}) + end end - return true end - if (key == 'plus_asc') or (key == 'plusasc_mod') then - local e = card_eval_status_text - for i, v in pairs(SMODS.find_card("j_entr_axeh")) do - amount = amount * v.ability.asc_mod - end - local hand - if G.GAME.asc_power_hand and G.GAME.asc_power_hand ~= 0 then hand = G.GAME.asc_power_hand end - local orig = to_big((hand or G.GAME.current_round.current_hand.cry_asc_num)) - if not G.GAME.asc_power_hand or G.GAME.asc_power_hand == 0 then G.GAME.asc_power_hand = G.GAME.current_round.current_hand.cry_asc_num or 0 end - G.GAME.asc_power_hand = to_big(G.GAME.asc_power_hand) + to_big(amount) - local text = number_format(to_big(G.GAME.asc_power_hand)) - if not Entropy.should_skip_animations() then - G.E_MANAGER:add_event(Event({ - func = function() - G.GAME.current_round.current_hand.cry_asc_num_text = (to_big(G.GAME.asc_power_hand) < to_big(0) and " (" or " (+") .. (text) .. ")" - return true - end - })) - else - G.GAME.current_round.current_hand.cry_asc_num_text = (to_big(G.GAME.asc_power_hand) < to_big(0) and " (" or " (+") .. (text) .. ")" - end - card_eval_status_text = function() end - scie(effect, scored_card, "Xmult_mod", Cryptid.ascend(1, G.GAME.asc_power_hand - orig), false) - scie(effect, scored_card, "Xchip_mod", Cryptid.ascend(1, G.GAME.asc_power_hand - orig), false) - card_eval_status_text = e - if not Entropy.should_skip_animations() then - Entropy.card_eval_status_text_eq(scored_card or effect.card or effect.focus, 'mult', amount, percent, nil, nil, (to_big(amount) < to_big(0) and "" or "+")..amount.." Asc", G.C.GOLD, "entr_e_solar", 0.6) + if (key == 'mult' or key == 'h_mult' or key == 'mult_mod') and amount then + for i, v in pairs(G.jokers.cards) do + if v.config.center_key == "j_entr_unstable_rift" then + v.ability.extra.mult = v.ability.extra.mult + amount * 0.2 + SMODS.calculate_effect({card = v, message = localize("k_upgrade_ex"), colour = G.C.RED}) + end end - return true end - if (key == 'exp_asc') or (key == 'exp_asc_mod') then - local e = card_eval_status_text - for i, v in pairs(SMODS.find_card("j_entr_axeh")) do - amount = amount * v.ability.asc_mod - end - local hand - if G.GAME.asc_power_hand and G.GAME.asc_power_hand ~= 0 then hand = G.GAME.asc_power_hand end - local orig = to_big((hand or G.GAME.current_round.current_hand.cry_asc_num)) - if not G.GAME.asc_power_hand or G.GAME.asc_power_hand == 0 then G.GAME.asc_power_hand = G.GAME.current_round.current_hand.cry_asc_num or 0 end - G.GAME.asc_power_hand = to_big(G.GAME.asc_power_hand) ^ to_big(amount) - local text = number_format(to_big(G.GAME.asc_power_hand)) - if not Entropy.should_skip_animations() then - G.E_MANAGER:add_event(Event({ - func = function() - G.GAME.current_round.current_hand.cry_asc_num_text = (to_big(G.GAME.asc_power_hand) < to_big(0) and " (" or " (+") .. (text) .. ")" - return true - end - })) - else - G.GAME.current_round.current_hand.cry_asc_num_text = (to_big(G.GAME.asc_power_hand) < to_big(0) and " (" or " (+") .. (text) .. ")" - end - card_eval_status_text = function() end - scie(effect, scored_card, "Xmult_mod", Cryptid.ascend(1, G.GAME.asc_power_hand - orig), false) - scie(effect, scored_card, "Xchip_mod", Cryptid.ascend(1, G.GAME.asc_power_hand - orig), false) - card_eval_status_text = e - if not Entropy.should_skip_animations() then - Entropy.card_eval_status_text_eq(scored_card or effect.card or effect.focus, 'mult', amount, percent, nil, nil, "^"..amount.." Asc", G.C.GOLD, "entr_e_solar", 0.6) + if (key == 'x_mult' or key == 'xmult' or key == 'Xmult' or key == 'x_mult_mod' or key == 'Xmult_mod') and amount ~= 1 then + for i, v in pairs(G.jokers.cards) do + if v.config.center_key == "j_entr_unstable_rift" then + v.ability.extra.mult = v.ability.extra.mult * (1 + (amount - 1) * 0.2) + SMODS.calculate_effect({card = v, message = localize("k_upgrade_ex"), colour = G.C.RED}) + end end - return true end - if (key == 'hyper_asc') or (key == 'hyper_asc_mod') or key == "hyperasc" or key == "hyperasc_mod" then - for i, v in pairs(SMODS.find_card("j_entr_axeh")) do - amount = amount * v.ability.asc_mod - end - local e = card_eval_status_text - local hand - if G.GAME.asc_power_hand and G.GAME.asc_power_hand ~= 0 then hand = G.GAME.asc_power_hand end - local orig = to_big((hand or G.GAME.current_round.current_hand.cry_asc_num)) - if not G.GAME.asc_power_hand or G.GAME.asc_power_hand == 0 then G.GAME.asc_power_hand = G.GAME.current_round.current_hand.cry_asc_num or 1 end - G.GAME.asc_power_hand = to_big(G.GAME.asc_power_hand):arrow(amount[1], amount[2]) - local text = number_format(to_big(G.GAME.asc_power_hand)) - if not Entropy.should_skip_animations() then - G.E_MANAGER:add_event(Event({ - func = function() - G.GAME.current_round.current_hand.cry_asc_num_text = (to_big(G.GAME.asc_power_hand) < to_big(0) and " (" or " (+") .. (text) .. ")" - return true - end - })) - else - G.GAME.current_round.current_hand.cry_asc_num_text = (to_big(G.GAME.asc_power_hand) < to_big(0) and " (" or " (+") .. (text) .. ")" - end - card_eval_status_text = function() end - scie(effect, scored_card, "Xmult_mod", Cryptid.ascend(1, G.GAME.asc_power_hand - orig), false) - scie(effect, scored_card, "Xchip_mod", Cryptid.ascend(1, G.GAME.asc_power_hand - orig), false) - card_eval_status_text = e - if not Entropy.should_skip_animations() then - Entropy.card_eval_status_text_eq(scored_card or effect.card or effect.focus, 'mult', amount, percent, nil, nil, Entropy.FormatArrowMult(amount[1], amount[2]).." Asc", G.C.GOLD, "entr_e_solar", 0.6) - end - return true + if (key == 'chips' or key == 'h_chips' or key == 'chip_mod') and amount then + for i, v in pairs(G.jokers.cards) do + if v.config.center_key == "j_entr_unstable_rift" then + v.ability.extra.chips = v.ability.extra.chips + amount * 0.2 + SMODS.calculate_effect({card = v, message = localize("k_upgrade_ex"), colour = G.C.BLUE}) + end + end end - if key == 'xlog_chips' then - local chips = hand_chips - local gt = to_big(chips) < to_big(0) and 1 or chips - local log = Talisman and Big and to_big(gt):log(to_big(amount)) or math.log(gt, amount) - hand_chips = mod_chips(to_big(chips) * math.max(log, 1)) - if not Entropy.should_skip_animations() then - Entropy.card_eval_status_text_eq(scored_card or effect.card or effect.focus, 'chips', 1, percent, nil, nil, "Chips Xlog(Chips)", G.C.BLUE, "entr_e_rizz", 0.6) + if (key == 'x_chips' or key == 'xchips' or key == 'Xchip_mod') and amount ~= 1 then + for i, v in pairs(G.jokers.cards) do + if v.config.center_key == "j_entr_unstable_rift" then + v.ability.extra.chips = v.ability.extra.chips * (1 + (amount - 1) * 0.2) + SMODS.calculate_effect({card = v, message = localize("k_upgrade_ex"), colour = G.C.BLUE}) + end end - return true end -end -for _, v in ipairs({'eq_mult', 'Eqmult_mod', 'eq_chips', 'Eqchips_mod', 'xlog_chips'}) do - table.insert(SMODS.scoring_parameter_keys or SMODS.calculation_keys or {}, v) -end -for _, v in ipairs({'asc', 'asc_mod', 'plus_asc', 'plusasc_mod', 'exp_asc', 'exp_asc_mod', 'x_asc', - 'hyper_asc', 'hyper_asc_mod', 'hyperasc', 'hyperasc_mod'}) do - table.insert(SMODS.other_calculation_keys or SMODS.calculation_keys or {}, v) + if ret then + return ret + end end local entr_define_dt = 0 @@ -1737,15 +858,6 @@ function Game:update(dt) bdt = 0 end update_ref(self, dt) - if G.STATE == nil and (G.pack_cards == nil or #G.pack_cards == 0) and G.GAME.DefineBoosterState then - G.STATE = G.GAME.DefineBoosterState - G.STATE_COMPLETE = false - G.GAME.DefineBoosterState = nil - end - if self.STATE == nil and not G.DefineBoosterState then - G.STATE = 1 - G.STATE_COMPLETE = false - end entr_define_dt = entr_define_dt + dt entr_prismatic_dt = entr_prismatic_dt + dt if G.P_CENTERS and G.P_CENTERS.c_entr_define and entr_define_dt > 0.5 then @@ -1818,7 +930,7 @@ function Game:update(dt) entr_grahkon_dt = entr_grahkon_dt + dt bdt = bdt + dt cdt = cdt + dt - if Entropy.DeckOrSleeve("ambisinister") and cdt > 0.05 and G.jokers then + if Entropy.deck_or_sleeve("ambisinister") and cdt > 0.05 and G.jokers then if not Entropy.last_csl then Entropy.last_csl = G.hand.config.highlighted_limit end if not Entropy.last_slots then Entropy.last_slots = (G.jokers.config.card_limit - #G.jokers.cards) end local slots_diff = (G.jokers.config.card_limit - #G.jokers.cards) - Entropy.last_slots @@ -1839,21 +951,22 @@ function Game:update(dt) SMODS.hand_limit_strings.play = G.GAME.starting_params.play_limit ~= 5 and localize('b_limit') .. G.GAME.starting_params.play_limit or '' Entropy.last_csl = G.hand.config.highlighted_limit end - if not Entropy.DeckOrSleeve("ambisinister") and cdt > 0.05 then + if not Entropy.deck_or_sleeve("ambisinister") and cdt > 0.05 then Entropy.last_csl = nil Entropy.last_slots = nil cdt = 0 end - if G.GAME.blind and (Entropy.BlindIs("bl_entr_endless_entropy_phase_one") - or Entropy.BlindIs("bl_entr_endless_entropy_phase_two") - or Entropy.BlindIs("bl_entr_endless_entropy_phase_three") - or Entropy.BlindIs("bl_entr_endless_entropy_phase_four")) + if G.GAME.blind and (Entropy.blind_is("bl_entr_endless_entropy_phase_one") + or Entropy.blind_is("bl_entr_endless_entropy_phase_two") + or Entropy.blind_is("bl_entr_endless_entropy_phase_three") + or Entropy.blind_is("bl_entr_endless_entropy_phase_four")) + or G.GAME.EE_SCREEN then G.GAME.EE_FADE = G.GAME.EE_FADE or 0 - G.GAME.EE_FADE = G.GAME.EE_FADE + dt * 0.5 + G.GAME.EE_FADE = G.GAME.EE_FADE + dt * 0.5 * (G.GAME.EE_FADE_SPEED or 4) eedt = eedt - dt - if eedt <= 0 then + if eedt <= 0 and G.GAME.blind then p_s = not p_s if p_s then local atlas = "entr_blinds" @@ -1871,11 +984,18 @@ function Game:update(dt) end end end - if G.GAME.EE_R then + if G.GAME.EE_FADE then + G.entr_rand_text = Entropy.string_random(6) + G.entr_rand_text2 = Entropy.string_random(6) + end + if G.GAME.EE_R and G.GAME.EE_FADE then if G.GAME.EE_FADE > 10 then G.GAME.EE_FADE = 10 end - G.GAME.EE_FADE = G.GAME.EE_FADE - dt * 3 + G.GAME.EE_FADE = G.GAME.EE_FADE - dt * 3 * (G.GAME.EE_FADE_SPEED or 1) + if G.GAME.EE_FADE <= 0 then + G.GAME.EE_R = nil + end end end @@ -1991,6 +1111,8 @@ Entropy.ParakmiBlacklist.Seal = true Entropy.ParakmiBlacklist.Stake = true Entropy.ParakmiBlacklist.Unique = true Entropy.ParakmiBlacklist.sleeve_casl_none = true +Entropy.ParakmiBlacklist["Rune Tag"] = true +Entropy.ParakmiBlacklist.DescriptionDummy = true Entropy.ChaosConversions.Command = "Twisted" Entropy.ChaosConversions.Star = "Twisted" Entropy.ChaosConversions.Omen = "Twisted" @@ -1998,8 +1120,7 @@ Entropy.ChaosConversions.Pact = "Twisted" local ref = create_card function create_card(_type, area, legendary, _rarity, skip_materialize, soulable, forced_key, key_append, ...) if (next(find_joker("j_entr_chaos")) or next(find_joker("j_entr_parakmi")) or G.GAME.modifiers.entr_parakmi) and not forced_key and not G.GAME.entr_parakmi_bypass then - _type = Entropy.GetRandomSet(next(find_joker("j_entr_parakmi")) or G.GAME.modifiers.entr_parakmi) - + _type = Entropy.get_random_set(next(find_joker("j_entr_parakmi")) or G.GAME.modifiers.entr_parakmi) end if _type == "CBlind" then _type = "BlindTokens" @@ -2012,7 +1133,7 @@ function create_card(_type, area, legendary, _rarity, skip_materialize, soulable if soulable and not forced_key and Entropy.has_rune("rune_entr_oss") then local valid = {} for _, v in ipairs(SMODS.Consumable.legendaries) do - if (_type == v.type.key or _type == v.soul_set) and not (G.GAME.used_jokers[v.key] and not SMODS.showman(v.key) and not v.can_repeat_soul) and (not v.in_pool or (type(v.in_pool) ~= "function") or v:in_pool({})) then + if (_type == v.type.key or _type == v.soul_set) and not (G.GAME.used_jokers[v.key] and not SMODS.showman(v.key) and not v.can_repeat_soul) and SMODS.add_to_pool(v, {}) then valid[#valid+1] = v end end @@ -2058,12 +1179,12 @@ function create_card(_type, area, legendary, _rarity, skip_materialize, soulable card.ability.cry_prob = 1 card.ability.extra.odds = 2 end - if (next(find_joker("j_entr_chaos")) or next(find_joker("j_entr_parakmi")) or G.GAME.modifiers.entr_parakmi) and not forced_key and not G.GAME.entr_parakmi_bypass then + if (next(find_joker("j_entr_chaos")) or next(find_joker("j_entr_parakmi")) or G.GAME.modifiers.entr_parakmi) and not forced_key and not _rarity and not G.GAME.entr_parakmi_bypass then if not G.SETTINGS.paused and not G.GAME.akyrs_any_drag then card.fromdefine = true end end - if card and card.config and card.config.center and card.config.center.key == "c_base" and Entropy.DeckOrSleeve("crafting") then + if card and card.config and card.config.center and card.config.center.key == "c_base" and Entropy.deck_or_sleeve("crafting") then if pseudorandom("crafting") < 0.5 then card:set_ability(SMODS.poll_enhancement({guaranteed = true, key = "entr_crafting"})) end @@ -2079,7 +1200,13 @@ function create_card(_type, area, legendary, _rarity, skip_materialize, soulable other_card = card }) if ret and (ret.set or ret.key) then - card:set_ability(ret.key and G.P_CENTERS[ret.key] or Entropy.GetPooledCenter(ret.set)) + card:set_ability(ret.key and G.P_CENTERS[ret.key] or Entropy.get_pooled_center(ret.set)) + SMODS.calculate_context{post_trigger = true, other_card = c, other_context = { + get_consumable_type = true, + set = card.config.center.set, + hidden = card.config.center.hidden, + other_card = card + }, other_ret = ret} break end end @@ -2097,186 +1224,21 @@ function create_card(_type, area, legendary, _rarity, skip_materialize, soulable return card end -local ref = SMODS.calculate_context -function SMODS.calculate_context(context, return_table) - local tbl = ref(context,return_table) - if G.GAME.entr_bought_decks then - for i, v in pairs(G.GAME.entr_bought_decks or {}) do - if G.P_CENTERS[v].calculate then - local ret = G.P_CENTERS[v].calculate(G.P_CENTERS[v], nil, context or {}) - for k,v in pairs(ret or {}) do - tbl[k] = v - end - end - end - end - if not return_table then - return tbl - end -end - -local trigger_effectref = Back.trigger_effect -function Back:trigger_effect(args, ...) - local chips, mult = trigger_effectref(self, args, ...) - if G.GAME.entr_bought_decks then - for i, v in pairs(G.GAME.entr_bought_decks or {}) do - if v == 'b_anaglyph' and args.context == 'eval' and G.GAME.last_blind and G.GAME.last_blind.boss then - G.E_MANAGER:add_event(Event({ - func = (function() - add_tag(Tag('tag_double')) - play_sound('generic1', 0.9 + math.random()*0.1, 0.8) - play_sound('holo1', 1.2 + math.random()*0.1, 0.4) - return true - end) - })) - end - if v == "b_plasma" and args.context == 'final_scoring_step' then - chips = chips or args.chips - mult = mult or args.mult - local tot = chips + mult - chips = math.floor(tot/2) - mult = math.floor(tot/2) - update_hand_text({delay = 0}, {mult = mult, chips = chips}) - - G.E_MANAGER:add_event(Event({ - func = (function() - local text = localize('k_balanced') - play_sound('gong', 0.94, 0.3) - play_sound('gong', 0.94*1.5, 0.2) - play_sound('tarot1', 1.5) - ease_colour(G.C.UI_CHIPS, {0.8, 0.45, 0.85, 1}) - ease_colour(G.C.UI_MULT, {0.8, 0.45, 0.85, 1}) - attention_text({ - scale = 1.4, text = text, hold = 2, align = 'cm', offset = {x = 0,y = -2.7},major = G.play - }) - G.E_MANAGER:add_event(Event({ - trigger = 'after', - blockable = false, - blocking = false, - delay = 4.3, - func = (function() - ease_colour(G.C.UI_CHIPS, G.C.BLUE, 2) - ease_colour(G.C.UI_MULT, G.C.RED, 2) - return true - end) - })) - G.E_MANAGER:add_event(Event({ - trigger = 'after', - blockable = false, - blocking = false, - no_delete = true, - delay = 6.3, - func = (function() - G.C.UI_CHIPS[1], G.C.UI_CHIPS[2], G.C.UI_CHIPS[3], G.C.UI_CHIPS[4] = G.C.BLUE[1], G.C.BLUE[2], G.C.BLUE[3], G.C.BLUE[4] - G.C.UI_MULT[1], G.C.UI_MULT[2], G.C.UI_MULT[3], G.C.UI_MULT[4] = G.C.RED[1], G.C.RED[2], G.C.RED[3], G.C.RED[4] - return true - end) - })) - return true - end) - })) - end - end - end - return chips, mult -end - -local ref = create_shop_card_ui -function create_shop_card_ui(card, type, area) - if card.config.center.set == "Back" or card.config.center.set == "Sleeve" then - G.E_MANAGER:add_event(Event({ - trigger = 'after', - delay = 0.43, - blocking = false, - blockable = false, - func = (function() - if card.opening then return true end - local t1 = { - n=G.UIT.ROOT, config = {minw = 0.6, align = 'tm', colour = darken(G.C.BLACK, 0.2), shadow = true, r = 0.05, padding = 0.05, minh = 1}, nodes={ - {n=G.UIT.R, config={align = "cm", colour = lighten(G.C.BLACK, 0.1), r = 0.1, minw = 1, minh = 0.55, emboss = 0.05, padding = 0.03}, nodes={ - {n=G.UIT.O, config={object = DynaText({string = {{prefix = localize('$'), ref_table = card, ref_value = 'cost'}}, colours = {G.C.MONEY},shadow = true, silent = true, bump = true, pop_in = 0, scale = 0.5})}}, - }} - }} - local t2 = { - n=G.UIT.ROOT, config = {ref_table = card, minw = 1.1, maxw = 1.3, padding = 0.1, align = 'bm', colour = G.C.GOLD, shadow = true, r = 0.08, minh = 0.94, func = 'can_buy_deckorsleeve_from_shop', one_press = true, button = 'buy_deckorsleeve_from_shop', hover = true}, nodes={ - {n=G.UIT.T, config={text = localize('b_buy'),colour = G.C.WHITE, scale = 0.5}} - }} - - card.children.price = UIBox{ - definition = t1, - config = { - align="tm", - offset = {x=0,y=1.5}, - major = card, - bond = 'Weak', - parent = card - } - } - - card.children.buy_button = UIBox{ - definition = t2, - config = { - align="bm", - offset = {x=0,y=-0.3}, - major = card, - bond = 'Weak', - parent = card - } - } - card.children.price.alignment.offset.y = card.ability.set == 'Booster' and 0.5 or 0.38 - - return true - end) - })) - else - ref(card, type, area) - end -end - -function Cryptid.ascend(num, curr2) -- edit this function at your leisure - G.GAME.sunnumber = G.GAME.sunnumber or {} - local snum - if type(G.GAME.sunnumber) == "table" then snum = G.GAME.sunnumber.not_modest or 0 - else snum = G.GAME.sunnumber end - curr2 = - curr2 or - ((G.GAME.current_round.current_hand.cry_asc_num or 0) + (G.GAME.asc_power_hand or 0)) * - (1 + (G.GAME.nemesisnumber or 0)) - local num2 = math.min(curr2 or 0, 50) - local diff = curr2 - num2 - if to_big(curr2 or 0) > to_big(40) then - num2 = num2 + diff ^ 0.3 - end - curr2 = num2 - if next(SMODS.find_card("j_entr_helios")) then - local curr = 1 - for i, v in pairs(G.jokers.cards) do - if not v.debuff and 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 num ^ (to_big((1.75 + snum)) * (to_big((curr2) * curr))) - else - return num * (to_big((1.25 + snum)) ^ to_big(curr2)) - end -end - local pokerhandinforef = G.FUNCS.get_poker_hand_info -function G.FUNCS.get_poker_hand_info(cards) +function G.FUNCS.get_poker_hand_info(cards,...) local _cards = {} for _, card in pairs(cards) do _cards[#_cards+1] = card end for _, card in pairs(G.I.CARD) do - if card.ability and card.ability.entr_marked then - if not card.highlighted and not Entropy.InTable(cards, card) then + if card.ability and card.ability.entr_marked and not card.ability.entr_marked_bypass then + if not card.highlighted and not Entropy.in_table(cards, card) then _cards[#_cards+1] = card end end end G.GAME.current_round.current_hand.cry_asc_num = 0 - if next(SMODS.find_card("j_entr_helios")) or (Entropy.BlindIs("bl_entr_scarlet_sun") and not G.GAME.blind.disabled) then G.GAME.used_vouchers.v_cry_hyperspacetether = true end - local text, loc_disp_text, poker_hands, scoring_hand, disp_text = pokerhandinforef(_cards) + local text, loc_disp_text, poker_hands, scoring_hand, disp_text = pokerhandinforef(_cards,...) if text and G.GAME.badarg and G.GAME.badarg[text] and text ~= "NULL" then G.boss_throw_hand = true G.bad_arg = true @@ -2290,7 +1252,7 @@ function G.FUNCS.get_poker_hand_info(cards) end local all_flesh = true for i, v in pairs(scoring_hand) do - if v.config.center.key ~= "m_entr_flesh" then all_flesh = false end + if type(v) == "table" and v.config and v.config.center and v.config.center.key ~= "m_entr_flesh" then all_flesh = false end end if all_flesh then if text == "Flush" then @@ -2352,7 +1314,7 @@ end local is_jollyref = Card.is_jolly function Card:is_jolly() if next(SMODS.find_card("j_entr_dekatria")) then return true end - return is_jollyref(self) + return is_jollyref and is_jollyref(self) or nil end local AscendantTags = { @@ -2512,9 +1474,13 @@ G.FUNCS.use_card = function(e, mute, nosave) end }) for i, v in pairs(SMODS.find_card("j_entr_shadow_crystal")) do - if SMODS.pseudorandom_probability(card, 'shadow_crystal', 1, v.ability.extra.odds) and Entropy.Inversion(card) and not card.config.center.hidden then - local dummy = Entropy.GetDummy(G.P_CENTERS[Entropy.Inversion(card)], card.area, card) - Cryptid.forcetrigger(dummy, {}) + if SMODS.pseudorandom_probability(card, 'shadow_crystal', 1, v.ability.extra.odds) and Entropy.inversion(card) and not card.config.center.hidden then + local dummy = Entropy.get_dummy(G.P_CENTERS[Entropy.inversion(card)], card.area, card) + Spectrallib.forcetrigger({ + card = dummy, + context = context, + silent = true + }) break end end @@ -2578,7 +1544,7 @@ end local set_abilityref = Card.set_ability function Card:set_ability(center, ...) if type(center) == "string" then center = G.P_CENTERS[center] end - if center and Entropy.is_inverted(center) and G.GAME.next_inversions_prophecy and not G.SETTINGS.paused then + if center and Entropy.is_inverted(center) and G.GAME.next_inversions_prophecy and not G.SETTINGS.paused and center.set ~= "Joker" then set_abilityref(self, G.P_CENTERS[G.GAME.next_inversions_prophecy], ...) G.GAME.inversions_prophecy_counter = (G.GAME.inversions_prophecy_counter or 2) - 1 else @@ -2597,13 +1563,13 @@ G.FUNCS.use_card = function(e, mute, nosave) card:set_ability(G.P_CENTERS[card.ability.glitched_crown[card.glitched_index]]) card.ability.glitched_crown = nil end - if card.config.center.set ~= "Booster" and Entropy.DeckOrSleeve("doc") then + if card.config.center.set ~= "Booster" and Entropy.deck_or_sleeve("doc") then local num = 1 for i, v in pairs(G.GAME.entr_bought_decks or {}) do if v == "b_entr_doc" or v == "sleeve_entr_doc" then num = num + 1 end end if Entropy.is_inverted(card.config.center) then - ease_entropy(2*num*Entropy.DeckOrSleeve("doc")) + ease_entropy(2*num*Entropy.deck_or_sleeve("doc")) else - ease_entropy(1*num*Entropy.DeckOrSleeve("doc")) + ease_entropy(1*num*Entropy.deck_or_sleeve("doc")) end end use_cardref(e, mute, nosave) @@ -2611,17 +1577,25 @@ 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/2)) and Entropy.DeckOrSleeve("doc") and Cryptid.enabled("c_entr_beyond") == true then - return create_card("Omen", G.pack_cards, nil, nil, true, true, "c_entr_beyond") - elseif to_big(pseudorandom("doc")) < to_big(1 - 0.996^(G.GAME.entropy/2)) and Entropy.DeckOrSleeve("doc") and Cryptid.enabled("c_cry_gateway") == true then - return create_card("Spectral", G.pack_cards, nil, nil, true, true, "c_cry_gateway") + if to_big(pseudorandom("doc")) < to_big(1 - 0.997^(G.GAME.entropy/2)) and Entropy.deck_or_sleeve("doc") then + if Cryptid.enabled("c_entr_beyond") == true then + return create_card("Omen", G.pack_cards, nil, nil, true, true, "c_entr_beyond") + elseif Cryptid.enabled("c_entr_fervour") then + return create_card("Omen", G.pack_cards, nil, nil, true, true, "c_entr_fervour") + end + elseif to_big(pseudorandom("doc")) < to_big(1 - 0.996^(G.GAME.entropy/2)) and Entropy.deck_or_sleeve("doc") then + if Cryptid.enabled("c_cry_gateway") == true then + return create_card("Spectral", G.pack_cards, nil, nil, true, true, "c_cry_gateway") + else + return create_card("Spectral", G.pack_cards, nil, nil, true, true, "c_soul") + end end return create_card("Spectral", G.pack_cards, nil, nil, true, true, nil, "spe") end },true) SMODS.Consumable:take_ownership("cry_gateway",{ use = function(self, card, area, copier) - if not Entropy.DeckOrSleeve("doc") and (#SMODS.find_card("j_jen_saint") + #SMODS.find_card("j_jen_saint_attuned")) <= 0 then + if not Entropy.deck_or_sleeve("doc") and (#SMODS.find_card("j_jen_saint") + #SMODS.find_card("j_jen_saint_attuned")) <= 0 then local deletable_jokers = {} for k, v in pairs(G.jokers.cards) do if not SMODS.is_eternal(v) then @@ -2657,7 +1631,7 @@ SMODS.Consumable:take_ownership("cry_gateway",{ end, })) delay(0.6) - if Entropy.DeckOrSleeve("doc") then + if Entropy.deck_or_sleeve("doc") then ease_entropy(-math.min(G.GAME.entropy, 5)) end end @@ -2665,7 +1639,7 @@ SMODS.Consumable:take_ownership("cry_gateway",{ local uibox_ref = create_UIBox_HUD function create_UIBox_HUD() local orig = uibox_ref() - if not Entropy.DeckOrSleeve("doc") then return orig end + if not Entropy.deck_or_sleeve("doc") then return orig end local scale = 0.4 local stake_sprite = get_stake_sprite(G.GAME.stake or 1, 0.5) @@ -2791,6 +1765,64 @@ function Cryptid.antimatter_apply(skip) end end +function G.FUNCS.can_enter_ee(e) + e.config.colour = G.C.CLEAR + e.config.button = 'enter_ee' +end +function G.FUNCS.enter_ee(e) + stop_use() + if G.blind_select then + G.GAME.facing_blind = true + G.E_MANAGER:add_event(Event({ + trigger = 'before', delay = 0.2, + func = function() + G.blind_select.alignment.offset.y = 40 + G.blind_select.alignment.offset.x = 0 + return true + end})) + G.E_MANAGER:add_event(Event({ + trigger = 'immediate', + func = function() + ease_round(1) + inc_career_stat('c_rounds', 1) + if _DEMO then + G.SETTINGS.DEMO_ROUNDS = (G.SETTINGS.DEMO_ROUNDS or 0) + 1 + inc_steam_stat('demo_rounds') + G:save_settings() + end + G.GAME.blind_on_deck = "Boss" + local _tag = e.UIBox:get_UIE_by_ID('tag_container') + G.GAME.round_resets.blind_tag = _tag and _tag.config and _tag.config.ref_table or nil + G.GAME.round_resets.blind = e.config.ref_table + G.GAME.round_resets.blind_states["Boss"] = 'Current' + G.blind_select:remove() + G.blind_select = nil + delay(0.2) + return true + end})) + G.E_MANAGER:add_event(Event({ + trigger = 'immediate', + func = function() + new_round() + return true + end + })) + G.E_MANAGER:add_event(Event({ + trigger = 'after', + func = function() + G.E_MANAGER:add_event(Event({ + trigger = 'after', + func = function() + G.GAME.blind:set_blind(G.P_BLINDS.bl_entr_endless_entropy_phase_one) + return true + end + })) + return true + end + })) + end +end + local uibox_ref = create_UIBox_blind_select function create_UIBox_blind_select() if G.GAME.USING_BREAK then @@ -2828,14 +1860,91 @@ function create_UIBox_blind_select() G.GAME.round_resets.red_room = nil return t else - if Entropy.CanEeSpawn() then - if to_big(G.GAME.round_resets.ante) < to_big(32) then G.GAME.EEBeaten = false end - if G.GAME.EEBuildup or (to_big(G.GAME.round_resets.ante) >= to_big(32) and not G.GAME.EEBeaten) then - G.GAME.round_resets.blind_choices.Boss = "bl_entr_endless_entropy_phase_one" - G.GAME.round_resets.blind_choices.Small = "bl_entr_void" - G.GAME.round_resets.blind_choices.Big = "bl_entr_void" - G.GAME.EEBuildup = true - ease_background_colour{new_colour = HEX("5f5f5f"), contrast = 3} + if to_big(G.GAME.round_resets.ante) < to_big(32) then G.GAME.EEBeaten = false end + if Entropy.can_ee_spawn() and G.GAME.EEBuildup or (to_big(G.GAME.round_resets.ante) >= to_big(32) and not G.GAME.EEBeaten) then + G.GAME.round_resets.blind_choices.Boss = "bl_entr_endless_entropy_phase_one" + G.GAME.round_resets.blind_choices.Small = "bl_entr_void" + G.GAME.round_resets.blind_choices.Big = "bl_entr_void" + G.GAME.EEBuildup = true + ease_background_colour{new_colour = HEX("5f5f5f"), contrast = 3} + if not G.SPLASH_EE then + G.GAME.EE_SCREEN = true + G.SPLASH_EE = Sprite(-30, -13, G.ROOM.T.w+60, G.ROOM.T.h+22, G.ASSET_ATLAS["ui_1"], {x = 9999, y = 0}) + G.GAME.EE_FADE = 0 + G.E_MANAGER:add_event(Event{ + trigger = "after", + blocking = false, + blockable = false, + delay = 1 * G.SETTINGS.GAMESPEED, + func = function() + G.SPLASH_EE:define_draw_steps({{ + shader = 'entr_entropic_vortex', + send = { + {name = 'time', ref_table = G.TIMERS, ref_value = 'REAL'}, + {name = 'vort_speed', val = 1}, + {name = 'colour_1', ref_table = G.C, ref_value = 'BLUE'}, + {name = 'colour_2', ref_table = G.C, ref_value = 'WHITE'}, + {name = 'mid_flash', val = 0}, + {name = 'transgender', ref_table = G.GAME, ref_value = "EE_FADE"}, + {name = 'vort_offset', val = (2*90.15315131*os.time())%100000}, + }}} + ) + return true + end + }) + end + attention_text({ + text = "CHALLENGE", + scale = 1.1, + hold = 60000, + major = G.play, + backdrop_colour = HEX("ff0000"), + align = 'cm', + offset = {x = 0, y = -3}, + }) + attention_text({ + text = "v", + scale = 0.8, + hold = 60000, + major = G.play, + align = 'cm', + offset = {x = 0, y = -2.35}, + }) + local index = #G.I.UIBOX + local index2 = #G.I.UIBOX - 1 + G.E_MANAGER:add_event(Event{ + blocking = false, + blockable = false, + func = function() + if G.GAME.blind.in_blind then + G.I.UIBOX[index]:remove() + G.I.UIBOX[index2]:remove() + table.remove(G.I.UIBOX, index) + table.remove(G.I.UIBOX, index2) + return true + end + end + }) + -- + return {n=G.UIT.ROOT, config = {align = 'tm',minw = 100, minh = 100, r = 0.15, colour = G.C.CLEAR, + func = 'can_enter_ee', one_press = true, button = 'enter_ee' + }, nodes={}} + else + if next(SMODS.find_card("j_entr_voidheart")) and not G.GAME.round_resets.red_room then + G.GAME.round_resets.blind_choices["Boss"] = "bl_entr_abyss" + G.GAME.blind_on_deck = "Boss" + G.GAME.round_resets.blind_states.Small = "Defeated" + G.GAME.round_resets.blind_states.Big = "Defeated" + G.GAME.round_resets.blind_states.Boss = "Select" + G.blind_select_opts = {} + G.blind_select_opts.boss = UIBox{definition = {n=G.UIT.ROOT, config={align = "cm", colour = G.C.CLEAR}, nodes={UIBox_dyn_container({create_UIBox_blind_choice('Boss')},false,get_blind_main_colour('Boss'), mix_colours(G.C.BLACK, get_blind_main_colour('Boss'), 0.8))}}, config = {align="bmi", offset = {x=0,y=0}}} or nil + + local t = {n=G.UIT.ROOT, config = {align = 'tm',minw = width, r = 0.15, colour = G.C.CLEAR}, nodes={ + {n=G.UIT.R, config={align = "cm", padding = 0.5}, nodes={ + {n=G.UIT.O, config={align = "cm", object = G.blind_select_opts.boss}}, + }} + }} + return t end end if G.GAME.modifiers.zenith then @@ -2921,12 +2030,56 @@ end local evaluate_poker_hand_ref = evaluate_poker_hand function evaluate_poker_hand(hand) - local results = evaluate_poker_hand_ref(hand) + local newhand = {} + for i, v in pairs(hand) do + newhand[#newhand+1] = v + end + for i, v in pairs(SMODS.find_card("j_entr_planetarium")) do + if v.ability.extra.hand == "Two Pair" then + local c1 = newhand[1] + local c2 = newhand[2] + newhand[#newhand+1] = c1 + newhand[#newhand+1] = c2 + end + end + local results = evaluate_poker_hand_ref(newhand) for i, v in ipairs(G.handlist) do if G.GAME.Interfered then results[v] = results[pseudorandom_element(G.handlist, pseudoseed("interfered"))] end end + for i, v in pairs(results) do + if G.GAME.atomikos_deleted and G.GAME.atomikos_deleted[i] then results[i] = {} end + if G.GAME.SudoHand and G.GAME.SudoHand[i] and #results[i] > 0 and Entropy.no_recurse_scoring(results) == i then results[G.GAME.SudoHand[i]] = results[i] end + end + local top + if results.bld_blind_high and next(results.bld_blind_high) then + results["High Card"] = {} + end + if G.GAME.overload then + for i, v in pairs(G.handlist) do + if not top and results[v] and results[v][1] then + top = {results[v][1]} + top.text = v + break + end + end + for i, v in pairs(G.handlist) do + if top then + results[v][1] = top[1] + end + end + end + if G.GAME.randomised_hand_map then + local results_copy = {} + for i, v in pairs(results) do + results_copy[i] = v + end + for i, v in pairs(G.GAME.randomised_hand_map) do + results[i] = results_copy[v] + end + end + results.top = top return results end @@ -2934,7 +2087,7 @@ local update_round_evalref = Game.update_round_eval function Game:update_round_eval(dt) update_round_evalref(self, dt) if G.GAME.Overflow then - Entropy.ChangeFullCSL(-G.GAME.Overflow) + Entropy.change_selection_limit(-G.GAME.Overflow) G.GAME.Overflow = nil end if G.GAME.Interfered then @@ -2962,7 +2115,7 @@ function Game:update_round_eval(dt) end end if dt > 60 * 30 then - Entropy.UpdateDailySeed() + Entropy.update_daily_seed() end end @@ -2972,14 +2125,12 @@ function create_card_for_shop(area) if card and card.ability.set == "Joker" and next(SMODS.find_card("j_entr_ieros")) then for i, v2 in pairs(G.jokers.cards) do if v2.config.center.key == "j_entr_ieros" then - while pseudorandom("ieros") < 0.33 do - local rare = nil - if card.config.center.rarity ~= "j_entr_entropic" then - rare = Entropy.GetNextRarity(card.config.center.rarity or 1) or card.config.center.rarity - end - local new_card = Entropy.GetRandomRarityCard(rare) - card:set_ability(G.P_CENTERS[new_card]) + local rare = nil + if card.config.center.rarity ~= "j_entr_entropic" then + rare = Entropy.get_next_rarity(card.config.center.rarity or 1) or card.config.center.rarity end + local new_card = Entropy.get_random_rarity_card(rare) + card:set_ability(G.P_CENTERS[new_card]) end end end @@ -3011,12 +2162,31 @@ end local use_cardref= G.FUNCS.use_card G.FUNCS.use_card = function(e, mute, nosave) - local val = use_cardref(e, mute, nosave) - if e.config.ref_table.ability.entr_pinned then - for i, v in pairs(G.GAME.entr_pinned_cards or {}) do - if v.card == e.config.ref_table.config.center.key then - G.GAME.entr_pinned_cards[i] = nil - return val + local card = e.config.ref_table + if card.ability.entr_death_mark and card.ability.consumeable then + card:start_dissolve() + SMODS.calculate_context({using_consumeable = true, consumeable = card, area = card.from_area}) + if G.STATE == G.STATES.SMODS_BOOSTER_OPENED and card.area == G.pack_cards then + G.E_MANAGER:add_event(Event{ + trigger = "after", + delay = 0.5, + func = function() + G.GAME.pack_choices = G.GAME.pack_choices - 1 + if G.GAME.pack_choices <= 0 then + G.FUNCS.end_consumeable(nil, delay_fac) + end + return true + end + }) + end + else + local val = use_cardref(e, mute, nosave) + if e.config.ref_table.ability.entr_pinned then + for i, v in pairs(G.GAME.entr_pinned_cards or {}) do + if v.card == e.config.ref_table.config.center.key then + G.GAME.entr_pinned_cards[i] = nil + return val + end end end end @@ -3061,8 +2231,6 @@ function Blind:disable() if not self.config.blind.no_disable then disable_ref(self) end end ---for wiki editors these arent 4 seperate blinds but 4 phases of endless entropy - local ref = G.FUNCS.reroll_boss G.FUNCS.reroll_boss = function(e) if G.GAME.EEBuildup then return end @@ -3092,6 +2260,17 @@ function Game:update(dt) end cdt = 0 end + local ferv + for i, v in pairs((G.pack_cards or {cards = {}}).cards or {}) do + if v.config.center.key == "c_entr_fervour" then ferv = true; break end + end + if ferv and G.GAME.entropy and G.GAME.entropy > 100 and 10^300 then + if not G.GAME.entr_vignette_power then G.GAME.entr_vignette_power = 100 end + G.GAME.entr_vignette_power = G.GAME.entr_vignette_power * 0.9 + 0.2 * 0.1 + elseif G.GAME.entr_vignette_power then + G.GAME.entr_vignette_power = G.GAME.entr_vignette_power * 0.999 + 100 * 0.001 + if G.GAME.entr_vignette_power > 75 then G.GAME.entr_vignette_power = nil end + end end local orig = create_UIBox_blind_popup @@ -3192,7 +2371,7 @@ function update_hand_text(config, vals) end total_angle = (total_angle/360)*2*3.141592 local base = {r=math.cos(total_angle),c=math.sin(total_angle)} - local str = Entropy.WhatTheFuck(base, vals.mult) + local str = Entropy.what_the_fuck(base, vals.mult) vals.mult = str end if (type(vals.chips) == "number" or type(vals.chips) == "table") and next(SMODS.find_card("j_entr_tesseract")) and math.abs(to_big(vals.chips)) > to_big(0.001) then @@ -3204,12 +2383,12 @@ function update_hand_text(config, vals) end total_angle = -(total_angle/360)*2*3.14159265 local base = {r=math.cos(total_angle),c=math.sin(total_angle)} - local str = Entropy.WhatTheFuck(base, vals.chips) + local str = Entropy.what_the_fuck(base, vals.chips) vals.chips = str end ref(config, vals) end -function Entropy.GetRecipeResult(val,jokerrares,seed) +function Entropy.get_recipe_result(val,jokerrares,seed) local rare = 1 local cost=0 for i, v in pairs({ @@ -3221,21 +2400,14 @@ function Entropy.GetRecipeResult(val,jokerrares,seed) cry_exotic=(SMODS.Mods["Cryptid"] or {}).can_load and 45 or nil, entr_entropic = (SMODS.Mods["Cryptid"] or {}).can_load and 70 or nil, }) do - if v >= cost and val >= v then + if (v or -9999) >= (cost or -1) and (val or -9999) >= (v or -1) then rare = i;cost=v end end return pseudorandom_element(jokerrares[rare] or {}, pseudoseed(seed)) or "j_joker" end -function Entropy.ConcatStrings(tbl) - local result = "" - for i, v in pairs(tbl) do result = result..v end - return result -end - - -function Entropy.GetRecipe(cards) +function Entropy.get_recipe(cards) if #cards == 5 then local enhancements = Entropy.EnhancementPoints local rares = {} @@ -3259,15 +2431,15 @@ function Entropy.GetRecipe(cards) end table.sort(enh, function(a,b)return (enhancements[a])>(enhancements[b]) end) G.GAME.JokerRecipes = G.GAME.JokerRecipes or {} - if not G.GAME.JokerRecipes[Entropy.ConcatStrings(enh)] then - G.GAME.JokerRecipes[Entropy.ConcatStrings(enh)]=Entropy.GetRecipeResult(sum, rares,Entropy.ConcatStrings(enh)) + if not G.GAME.JokerRecipes[Entropy.concat_strings(enh)] then + G.GAME.JokerRecipes[Entropy.concat_strings(enh)]=Entropy.get_recipe_result(sum, rares,Entropy.concat_strings(enh)) end - return Entropy.FixedRecipes[Entropy.ConcatStrings(enh)] or G.GAME.JokerRecipes[Entropy.ConcatStrings(enh)] + return Entropy.FixedRecipes[Entropy.concat_strings(enh)] or G.GAME.JokerRecipes[Entropy.concat_strings(enh)] end return "j_joker" end -Entropy.DiscardSpecific = function(cards) +Entropy.discard_specific = function(cards) for i, v in pairs(cards) do draw_card(G.hand, G.discard, i*100/#cards, 'down', false, v) end @@ -3344,7 +2516,7 @@ end local get_bossref = get_new_boss function get_new_boss() - if (G.GAME.EEBuildup or (to_big(G.GAME.round_resets.ante) >= to_big(32) and not G.GAME.EEBeaten) or G.GAME.modifiers.zenith) and Entropy.CanEeSpawn() then + if (G.GAME.EEBuildup or (to_big(G.GAME.round_resets.ante) >= to_big(32) and not G.GAME.EEBeaten) or G.GAME.modifiers.zenith) and Entropy.can_ee_spawn() then return "bl_entr_endless_entropy_phase_one" end if G.GAME.entr_alt then @@ -3361,7 +2533,6 @@ function get_new_boss() local eligible_bosses = {} for k, v in pairs(Entropy.AltBlinds) do if not v.boss then - elseif v.in_pool and type(v.in_pool) == 'function' then local res, options = v:in_pool({}) if @@ -3417,8 +2588,7 @@ function Card:change_suit(new_suit) change_suitref(self, new_suit) if not G.GAME.SuitBuffs then G.GAME.SuitBuffs = {} end if G.GAME.SuitBuffs[new_suit] then - self.ability.bonus = (self.ability.bonus or 0) + (G.GAME.SuitBuffs[new_suit] and G.GAME.SuitBuffs[new_suit].chips or 0) - (self.ability.bonus_from_suit or 0) - self.ability.bonus_from_suit = G.GAME.SuitBuffs[new_suit] and G.GAME.SuitBuffs[new_suit].chips or 0 + self.ability.suit_bonus = (G.GAME.SuitBuffs[new_suit] and G.GAME.SuitBuffs[new_suit].chips or 0) end end @@ -3525,14 +2695,14 @@ function end_round() if G.GAME.blind_on_deck == "Boss" then G.GAME.entr_vouchers_set = nil end - if Entropy.IsEE() and not (G.GAME.blind and G.GAME.blind.config and G.GAME.blind.config.blind.key == "bl_entr_endless_entropy_phase_four") then + if Entropy.is_EE() and not (G.GAME.blind and G.GAME.blind.config and G.GAME.blind.config.blind.key == "bl_entr_endless_entropy_phase_four") then if (G.GAME.blind and G.GAME.blind.config and ((G.GAME.blind.config.blind.key == "bl_entr_endless_entropy_phase_three" and to_big(G.GAME.chips) < to_big(G.GAME.blind.chips)) or (G.GAME.blind.config.blind.key ~= "bl_entr_endless_entropy_phase_three" and to_big(G.GAME.chips) >= to_big(G.GAME.blind.chips)))) then G.GAME.chips = 0 G.GAME.round_resets.lost = true G.E_MANAGER:add_event(Event({ func = function() G.GAME.blind:set_blind(G.P_BLINDS[G.GAME.blind.config.blind.next_phase]) - Entropy.ChangePhase() + Entropy.change_phase() G.GAME.blind:juice_up() ease_hands_played(G.GAME.round_resets.hands-G.GAME.current_round.hands_left) ease_discard( @@ -3553,46 +2723,11 @@ function end_round() G.GAME.candle_hand_size = nil end if G.GAME.vanish_selection_limit then - Entropy.ChangeFullCSL(-G.GAME.vanish_selection_limit) + Entropy.change_selection_limit(-G.GAME.vanish_selection_limit) G.GAME.vanish_selection_limit = nil end end -local generate_uiref = generate_card_ui -function generate_card_ui(_c, full_UI_table, specific_vars, card_type, badges, hide_desc, main_start, main_end, card) - if card_type == "Back" then - if card.config and card.config.center and card.config.center.collection_loc_vars then - specific_vars = (card.config.center:collection_loc_vars({}, card) or {}).vars - elseif card.config and card.config.center and card.config.center.loc_vars then - specific_vars = (card.config.center:loc_vars({}, card) or {}).vars - elseif card.config and card.config.center then - local loc_args = {} - local effect_config = card.config.center.config - local name_to_check = card.config.center.name - if name_to_check == 'Blue Deck' then loc_args = {effect_config.hands} - elseif name_to_check == 'Red Deck' then loc_args = {effect_config.discards} - elseif name_to_check == 'Yellow Deck' then loc_args = {effect_config.dollars} - elseif name_to_check == 'Green Deck' then loc_args = {effect_config.extra_hand_bonus, effect_config.extra_discard_bonus} - elseif name_to_check == 'Black Deck' then loc_args = {effect_config.joker_slot, -effect_config.hands} - elseif name_to_check == 'Magic Deck' then loc_args = {localize{type = 'name_text', key = 'v_crystal_ball', set = 'Voucher'}, localize{type = 'name_text', key = 'c_fool', set = 'Tarot'}} - elseif name_to_check == 'Nebula Deck' then loc_args = {localize{type = 'name_text', key = 'v_telescope', set = 'Voucher'}, -1} - elseif name_to_check == 'Ghost Deck' then - elseif name_to_check == 'Abandoned Deck' then - elseif name_to_check == 'Checkered Deck' then - elseif name_to_check == 'Zodiac Deck' then loc_args = {localize{type = 'name_text', key = 'v_tarot_merchant', set = 'Voucher'}, - localize{type = 'name_text', key = 'v_planet_merchant', set = 'Voucher'}, - localize{type = 'name_text', key = 'v_overstock_norm', set = 'Voucher'}} - elseif name_to_check == 'Painted Deck' then loc_args = {effect_config.hand_size,effect_config.joker_slot} - elseif name_to_check == 'Anaglyph Deck' then loc_args = {localize{type = 'name_text', key = 'tag_double', set = 'Tag'}} - elseif name_to_check == 'Plasma Deck' then loc_args = {effect_config.ante_scaling} - elseif name_to_check == 'Erratic Deck' then - end - specific_vars = loc_args - end - end - return generate_uiref(_c, full_UI_table, specific_vars, card_type, badges, hide_desc, main_start, main_end, card) -end - function G.UIDEF.usage_tabs() return create_UIBox_generic_options({back_func = 'high_scores', contents ={create_tabs( {tabs = { @@ -3710,14 +2845,14 @@ end local ref = G.UIDEF.run_setup function G.UIDEF.run_setup(from_game_over) - Entropy.UpdateDailySeed() + Entropy.update_daily_seed() return ref(from_game_over) end local draw_ref = G.FUNCS.draw_from_deck_to_hand G.FUNCS.draw_from_deck_to_hand = function(e) e = e or G.hand.config.card_limit - #G.hand.cards - if Entropy.BlindIs("bl_entr_pandora") then + if Entropy.blind_is("bl_entr_pandora") then local am = 0 for i = 1, e do if pseudorandom("bl_entr_pandora") < 0.33 then @@ -3742,69 +2877,13 @@ G.FUNCS.draw_from_deck_to_hand = function(e) draw_ref(e) end -local evaluate_ref = evaluate_poker_hand -function evaluate_poker_hand(hand) - local results = evaluate_ref(hand) - for i, v in pairs(results) do - if G.GAME.atomikos_deleted and G.GAME.atomikos_deleted[i] then results[i] = {} end - if G.GAME.SudoHand and G.GAME.SudoHand[i] and #results[i] > 0 and Entropy.no_recurse_scoring(results) == i then results[G.GAME.SudoHand[i]] = results[i] end - end - return results -end local ref = create_shop_card_ui function create_shop_card_ui(card, type, area) if (card.config.center.set == "Voucher" or card.config.center.set == "Booster" or type == "Voucher" or type == "Booster") and next(SMODS.find_card("j_entr_pound_of_flesh")) then card.ability.beast_mark =(card.ability.set == "Voucher" or type == "Voucher") and 3 or true end - if card.config.center.set == "Back" or card.config.center.set == "Sleeve" then - G.E_MANAGER:add_event(Event({ - trigger = 'after', - delay = 0.43, - blocking = false, - blockable = false, - func = (function() - if card.opening then return true end - local t1 = { - n=G.UIT.ROOT, config = {minw = 0.6, align = 'tm', colour = darken(G.C.BLACK, 0.2), shadow = true, r = 0.05, padding = 0.05, minh = 1}, nodes={ - {n=G.UIT.R, config={align = "cm", colour = lighten(G.C.BLACK, 0.1), r = 0.1, minw = 1, minh = 0.55, emboss = 0.05, padding = 0.03}, nodes={ - {n=G.UIT.O, config={object = DynaText({string = {{prefix = localize('$'), ref_table = card, ref_value = 'cost'}}, colours = {G.C.MONEY},shadow = true, silent = true, bump = true, pop_in = 0, scale = 0.5})}}, - }} - }} - local t2 = { - n=G.UIT.ROOT, config = {ref_table = card, minw = 1.1, maxw = 1.3, padding = 0.1, align = 'bm', colour = G.C.GOLD, shadow = true, r = 0.08, minh = 0.94, func = 'can_buy_deckorsleeve_from_shop', one_press = true, button = 'buy_deckorsleeve', hover = true}, nodes={ - {n=G.UIT.T, config={text = localize('b_redeem'),colour = G.C.WHITE, scale = 0.5}} - }} - - card.children.price = UIBox{ - definition = t1, - config = { - align="tm", - offset = {x=0,y=1.5}, - major = card, - bond = 'Weak', - parent = card - } - } - - card.children.buy_button = UIBox{ - definition = t2, - config = { - align="bm", - offset = {x=0,y=-0.3}, - major = card, - bond = 'Weak', - parent = card - } - } - card.children.price.alignment.offset.y = card.ability.set == 'Booster' and 0.5 or 0.38 - - return true - end) - })) - else - ref(card, type, area) - end + ref(card, type, area) end if SMODS.Mods.Multipack and SMODS.Mods.Multipack.can_load then @@ -3884,44 +2963,13 @@ function SMODS.is_poker_hand_visible(handname) return visible_ref(handname) end -local evaluate_poker_hand_ref = evaluate_poker_hand -function evaluate_poker_hand(cards) - local results = evaluate_poker_hand_ref(cards) - local top - if G.GAME.overload then - for i, v in pairs(G.handlist) do - if not top and results[v] and results[v][1] then - top = {results[v][1]} - top.text = v - break - end - end - for i, v in pairs(G.handlist) do - if top then - results[v][1] = top[1] - end - end - end - if G.GAME.randomised_hand_map then - local results_copy = {} - for i, v in pairs(results) do - results_copy[i] = v - end - for i, v in pairs(G.GAME.randomised_hand_map) do - results[i] = results_copy[v] - end - end - results.top = top - return results -end - local parse_ref = CardArea.parse_highlighted function CardArea:parse_highlighted() G.GAME.asc_power_hand = 0 parse_ref(self) local text,disp_text,poker_hands = G.FUNCS.get_poker_hand_info(self.highlighted) + if not G.GAME.old_operator then G.GAME.old_operator = G.GAME.current_scoring_calculation_key or "multiply" end if G.GAME.hands[text] and G.GAME.hands[text].operator then - if not G.GAME.old_operator then G.GAME.old_operator = G.GAME.current_scoring_calculation_key or "multiply" end SMODS.set_scoring_calculation(G.GAME.hands[text].operator) elseif G.GAME.old_operator then SMODS.set_scoring_calculation(G.GAME.old_operator) @@ -3963,10 +3011,8 @@ G.FUNCS.evaluate_play = function(e) G.E_MANAGER:add_event(Event{ trigger = "after", func = function() - if G.C.UI_CHIPS[1] == G.C.GOLD[1] then - ease_colour(G.C.UI_CHIPS, G.C.BLUE, 0.3) - ease_colour(G.C.UI_MULT, G.C.RED, 0.3) - end + ease_colour(G.C.UI_CHIPS, G.C.BLUE, 0.3) + ease_colour(G.C.UI_MULT, G.C.RED, 0.3) G.GAME.current_round.current_hand.cry_asc_num = 0 G.GAME.current_round.current_hand.cry_asc_num_text = "" return true @@ -3974,107 +3020,9 @@ G.FUNCS.evaluate_play = function(e) }) end -function Entropy.GetDummy(center, area, self, silent) - local abil = copy_table(center.config) or {} - abil.consumeable = copy_table(abil) - abil.name = center.name or center.key - abil.set = center.set - abil.t_mult = abil.t_mult or 0 - abil.t_chips = abil.t_chips or 0 - abil.x_mult = abil.x_mult or abil.Xmult or 1 - abil.extra_value = abil.extra_value or 0 - abil.d_size = abil.d_size or 0 - abil.mult = abil.mult or 0 - abil.effect = center.effect - abil.h_size = abil.h_size or 0 - abil.card_limit = abil.card_limit or 1 - abil.extra_slots_used = abil.extra_slots_used or 0 - local eligible_editionless_jokers = {} - for i, v in pairs(G.jokers and G.jokers.cards or {}) do - if not v.edition then - eligible_editionless_jokers[#eligible_editionless_jokers + 1] = v - end - end - local tbl = { - ability = abil, - config = { - center = center, - center_key = center.key - }, - juice_up = function(_, ...) - return self:juice_up(...) - end, - start_dissolve = function(_, ...) - if not _.silent then - return self:start_dissolve(...) - end - end, - remove = function(_, ...) - return self:remove(...) - end, - flip = function(_, ...) - return self:flip(...) - end, - can_use_consumeable = function(self, ...) - return Card.can_use_consumeable(self, ...) - end, - calculate_joker = function(self, ...) - return Card.calculate_joker(self, ...) - end, - can_calculate = function(self, ...) - return Card.can_calculate(self, ...) - end, - set_cost = function(self, ...) - Card.set_cost(self, ...) - end, - calculate_sticker = function(self, ...) - Card.calculate_sticker(self, ...) - end, - base_cost = 1, - extra_cost = 0, - original_card = self, - area = area, - added_to_deck = added_to_deck, - cost = self.cost, - sell_cost = self.sell_cost, - eligible_strength_jokers = eligible_editionless_jokers, - eligible_editionless_jokers = eligible_editionless_jokers, - T = self.T, - VT = self.VT, - CT = self.CT, - silent = silent - } - for i, v in pairs(Card) do - if type(v) == "function" and i ~= "flip_side" then - tbl[i] = function(_, ...) - return v(self, ...) - end - end - end - tbl.set_edition = function(s, ed, ...) - Card.set_edition(s, ed, ...) - end - tbl.get_chip_h_x_mult = function(s, ...) - local ret = SMODS.multiplicative_stacking(s.ability.h_x_mult or 1, - (not s.ability.extra_enhancement and s.ability.perma_h_x_mult) or 0) - return ret - end - tbl.get_chip_x_mult = function(s, ...) - local ret = SMODS.multiplicative_stacking(s.ability.x_mult or 1, - (not s.ability.extra_enhancement and s.ability.perma_x_mult) or 0) - return ret - end - tbl.use_consumeable = function(self, ...) - self.bypass_echo = true - local ret = Card.use_consumeable(self, ...) - self.bypass_echo = nil - end - return tbl -end - local use_ref = Card.use_consumeable function Card:use_consumeable(...) - if Entropy.DeckOrSleeve("gemstone") and SMODS.pseudorandom_probability(nil, "entr_gemstone_deck", 1, 3) and self.config.center.set ~= "Rune" then + if Entropy.deck_or_sleeve("gemstone") and SMODS.pseudorandom_probability(nil, "entr_gemstone_deck", 1, 3) and self.config.center.set ~= "Rune" then G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.4, func = function() attention_text({ text = localize('k_nope_ex'), @@ -4097,9 +3045,13 @@ function Card:use_consumeable(...) if not self.bypass_echo then if G.GAME.entr_echo and G.GAME.entr_echo[self.config.center.key] and #G.GAME.entr_echo[self.config.center.key] > 0 then for i, v in pairs(G.GAME.entr_echo[self.config.center.key]) do - local dum = Entropy.GetDummy(G.P_CENTERS[v], self.area, self) + local dum = Entropy.get_dummy(G.P_CENTERS[v], self.area, self) dum.bypass_echo = true - Cryptid.forcetrigger(dum, {}) + Spectrallib.forcetrigger({ + card = dum, + context = context, + silent = true + }) dum.bypass_echo = nil end end @@ -4245,7 +3197,7 @@ end local has_no_suitref = SMODS.has_no_suit function SMODS.has_no_suit(card, bypass) - if card.config.center.key == "j_entr_false_vacuum_collapse" then return true end + if card.config.center.key == "j_entr_false_vacuum_collapse" or card.config.center.key == "phoenix_a" then return true end if next(SMODS.find_card("j_entr_opal")) and not bypass then return false end @@ -4255,13 +3207,14 @@ end local has_no_rankref = SMODS.has_no_rank function SMODS.has_no_rank(card, bypass) - if card.config.center.key == "j_entr_false_vacuum_collapse" then return true end + if card.config.center.key == "j_entr_false_vacuum_collapse" or card.config.center.key == "phoenix_a" then return true end + if card.base.value == "entr_nilrank" and not next(SMODS.find_card("j_entr_opal")) then return true end return has_no_rankref(card) end local in_scoringref = SMODS.in_scoring function SMODS.in_scoring(card, ...) - if card.config.center.key == "j_entr_false_vacuum_collapse" then return true end + if card.config.center.key == "j_entr_false_vacuum_collapse" or card.config.center.key == "phoenix_a" then return true end return in_scoringref(card, ...) end @@ -4362,7 +3315,7 @@ function Card:open(...) return true end }) - if Entropy.DeckOrSleeve("crafting") then + if Entropy.deck_or_sleeve("crafting") then G.hand.config.highlighted_limit = math.max(G.hand.config.highlighted_limit, 5) end end @@ -4370,7 +3323,7 @@ end local new_round_ref = new_round function new_round(...) new_round_ref(...) - if Entropy.DeckOrSleeve("crafting") then + if Entropy.deck_or_sleeve("crafting") then G.hand.config.highlighted_limit = math.max(G.hand.config.highlighted_limit, 5) end end @@ -4388,52 +3341,16 @@ function copy_card(old, new, ...) end if old.base and old.base.nominal then copy.base.nominal = old.base.nominal end G.GAME.modifiers.entr_twisted = tw - return copy -end - -local toggle_shopref = G.FUNCS.toggle_shop -G.FUNCS.toggle_shop = function(e) - stop_use() - G.CONTROLLER.locks.toggle_shop = true - local check - for i, v in pairs(G.shop_jokers.cards) do - if v.facing == "back" then - G.E_MANAGER:add_event(Event{ - func = function() - v:flip() - return true - end - }) - check = true - delay(2) - card_eval_status_text( - v, - "extra", - nil, - nil, - nil, - { message = localize("k_nope_ex"), colour = G.C.RED } - ) - end + if copy.config and copy.config.center_key == "j_entr_unstable_rift" then + math.randomseed(os.time()) + copy.ability.extra.val = math.random() --gay ass woke transgender math.random because syncing is for losers end - - - if check then - delay(2) - G.E_MANAGER:add_event(Event{ - trigger = "after", - blocking = false, - func = function() - toggle_shopref(e) - return true - end - }) - else - toggle_shopref(e) + if not G.SETTINGS.paused and G.deck and G.GAME.modifiers.entr_copper and pseudorandom("entr_copper_stake") < 0.33 and (ret.config.center.set == "Default" or ret.config.center.set == "Enhanced") then + ret:set_ability(G.P_CENTERS.m_entr_disavowed) end + return copy end - local defeat_ref = Blind.defeat function Blind:defeat(silent, ...) if G.GAME.blind_on_deck == "Boss" then @@ -4560,7 +3477,7 @@ if HotPotato then {n=G.UIT.C, nodes = { {n=G.UIT.R, config={align = "cm", padding = 0.05}, nodes={ {n=G.UIT.C, config={align = "cm", padding = 0.1}, nodes={ - {n=G.UIT.R,config={id = 'next_round_button', align = "cm", minw = 1.8, minh = Entropy.CanSwitchAltPath() and 1 or 1.3, r=0.15,colour = G.C.RED, one_press = true, button = 'toggle_shop', hover = true,shadow = true}, nodes = { + {n=G.UIT.R,config={id = 'next_round_button', align = "cm", minw = 1.8, minh = Entropy.can_switch_alt_path() and 1 or 1.3, r=0.15,colour = G.C.RED, one_press = true, button = 'toggle_shop', hover = true,shadow = true}, nodes = { {n=G.UIT.R, config={align = "cm", padding = 0.07, focus_args = {button = 'y', orientation = 'cr'}, func = 'set_button_pip'}, nodes={ {n=G.UIT.R, config={align = "cm", maxw = 1.3}, nodes={ {n=G.UIT.T, config={text = localize('b_next_round_1'), scale = 0.4, colour = G.C.WHITE, shadow = true}} @@ -4570,7 +3487,7 @@ if HotPotato then }} }}, }}, - (Entropy.CanSwitchAltPath() and {n=G.UIT.R,config={id = 'change_path_button', align = "cm", minw = 1.8, minh = 1, r=0.15,colour = G.C.PURPLE, button = 'toggle_path', hover = true,shadow = true, func='can_toggle_path'}, nodes = { + (Entropy.can_switch_alt_path() and {n=G.UIT.R,config={id = 'change_path_button', align = "cm", minw = 1.8, minh = 1, r=0.15,colour = G.C.PURPLE, button = 'toggle_path', hover = true,shadow = true, func='can_toggle_path'}, nodes = { {n=G.UIT.R, config={align = "cm", padding = 0.07, focus_args = {button = 'leftshoulder', orientation = 'cr'}, func = 'set_button_pip'}, nodes={ {n=G.UIT.R, config={align = "cm", maxw = 1.3}, nodes={ {n=G.UIT.T, config={text = localize(G.GAME.entr_alt and 'b_change_path_3' or 'b_change_path_1'), scale = 0.4, colour = G.C.WHITE, shadow = true}} @@ -4580,7 +3497,7 @@ if HotPotato then }} }}, }} or nil), - {n=G.UIT.R, config={id = 'shop_reroll', align = "cm", minw = 1.8, minh = Entropy.CanSwitchAltPath() and 1 or 1.3, r=0.15,colour = G.C.GREEN, button = 'reroll_shop', func = 'can_reroll', hover = true,shadow = true}, nodes = { + {n=G.UIT.R, config={id = 'shop_reroll', align = "cm", minw = 1.8, minh = Entropy.can_switch_alt_path() and 1 or 1.3, r=0.15,colour = G.C.GREEN, button = 'reroll_shop', func = 'can_reroll', hover = true,shadow = true}, nodes = { {n=G.UIT.R, config={align = "cm", padding = 0.07, focus_args = {button = 'x', orientation = 'cr'}, func = 'set_button_pip'}, nodes={ {n=G.UIT.R, config={align = "cm", maxw = 1.3}, nodes={ {n=G.UIT.T, config={text = localize('k_reroll'), scale = 0.4, colour = G.C.WHITE, shadow = true}}, @@ -4648,23 +3565,54 @@ function SMODS.calculate_main_scoring(context, scoring_hand) for i, v in pairs(G.play.cards) do if v.config.center.key == "j_entr_false_vacuum_collapse" and not v.debuff then fvc_cards[#fvc_cards+1] = v end end for i, v in pairs(G.jokers.cards) do if v.config.center.key == "j_entr_false_vacuum_collapse" and not v.debuff then fvc_cards[#fvc_cards+1] = v end end for _, card in pairs(G.I.CARD) do - if card.ability and card.ability.entr_marked and not card.highlighted and not Entropy.InTable(scoring_hand or context.scoring_hand, card) then + if card.ability and card.ability.entr_marked and not card.ability.entr_marked_bypass and not card.highlighted and not Entropy.in_table(scoring_hand or context.scoring_hand, card) then fvc_cards[#fvc_cards+1] = card added_cards[#added_cards+1] = card end end - if context.cardarea ~= G.play or (not next(SMODS.find_card('j_entr_rubber_ball')) and not next(fvc_cards)) then + for i, v in pairs(G.play.cards) do if v.config.center.key == "j_entr_phoenix_a" and not v.debuff then fvc_cards[#fvc_cards+1] = v end end + for i, v in pairs(G.jokers.cards) do if v.config.center.key == "j_entr_phoenix_a" and not v.debuff then fvc_cards[#fvc_cards+1] = v end end + local ff_planetarium + for i, v in pairs(SMODS.find_card("j_entr_planetarium")) do + if v.ability.extra.hand == "Flush Five" then ff_planetarium = true break end + end + if context.cardarea ~= G.play or (not next(SMODS.find_card('j_entr_rubber_ball')) and not next(fvc_cards) and not ff_planetarium) then calc_main_scoring(context, scoring_hand) end - if context.cardarea == G.play and (next(SMODS.find_card('j_entr_rubber_ball')) or next(fvc_cards)) then + if context.cardarea == G.play and (next(SMODS.find_card('j_entr_rubber_ball')) or next(fvc_cards) or ff_planetarium) then if not G.rubber_cards or #G.rubber_cards.cards == 0 then G.rubber_cards = {cards = Entropy.rubber_ball_scoring(scoring_hand)} end for i, v in pairs(added_cards) do G.rubber_cards.cards[#G.rubber_cards.cards+1] = v end context.cardarea = G.rubber_cards context.scoring_hand = G.rubber_cards.cards + for i, v in pairs(G.rubber_cards.cards) do + if not SMODS.in_scoring(v, scoring_hand) then + local c = v + G.E_MANAGER:add_event(Event{ + func = function() + c:highlight(true) + return true + end + }) + end + end calc_main_scoring(context, G.rubber_cards.cards) context.cardarea = G.play + for i, v in pairs(G.rubber_cards.cards) do + if not SMODS.in_scoring(v, scoring_hand) then + local c = v + G.E_MANAGER:add_event(Event{ + trigger = "after", + blocking = false, + delay = 3, + func = function() + c:highlight() + return true + end + }) + end + end G.rubber_cards = nil end return @@ -4672,7 +3620,7 @@ end local base_shader_ref = Card.should_draw_base_shader function Card:should_draw_base_shader(...) - return base_shader_ref(self, ...) and not (self.debuff and Entropy.IsEE()) + return base_shader_ref(self, ...) and not (self.debuff and Entropy.is_EE()) end function Entropy.ee_taunt(taunt) @@ -4729,7 +3677,7 @@ function hotpot_horsechicot_market_section_init_cards() if G.GAME.modifiers.glitched_items then local gc = {new_shop_card.config.center.key} for i = 1, G.GAME.modifiers.glitched_items - 1 do - gc[#gc+1] = Entropy.GetPooledCenter("BlackMarketJokerless").key + gc[#gc+1] = Entropy.get_pooled_center("BlackMarketJokerless").key end new_shop_card.ability.glitched_crown = gc end @@ -4738,7 +3686,7 @@ function hotpot_horsechicot_market_section_init_cards() if G.GAME.modifiers.glitched_items then local gc = {new_shop_card.config.center.key} for i = 1, G.GAME.modifiers.glitched_items - 1 do - gc[#gc+1] = Entropy.GetPooledCenter("BlackMarket").key + gc[#gc+1] = Entropy.get_pooled_center("BlackMarket").key end new_shop_card.ability.glitched_crown = gc end @@ -4768,8 +3716,9 @@ function hotpot_horsechicot_market_section_init_cards() end -local forcetrigger_ref = Cryptid.forcetrigger -function Cryptid.forcetrigger(card, ...) +local forcetrigger_ref = Spectrallib.forcetrigger +function Spectrallib.forcetrigger(args, ...) + local card = args.card if card.ability.consumeable then local center = card.config.center if center and center.calculate then @@ -4780,14 +3729,14 @@ function Cryptid.forcetrigger(card, ...) edition:calculate(card, {pre_using_self = true, consumeable = card, area = card.from_area}) end end - return forcetrigger_ref(card, ...) + return forcetrigger_ref(args, ...) end local gnv_ref = SMODS.get_next_vouchers function SMODS.get_next_vouchers(vouchers) local ret = gnv_ref(vouchers) if G.GAME.deck_voucher_rate and (G.GAME.deck_voucher_round or 0) % G.GAME.deck_voucher_rate == 0 then - local center = Entropy.GetPooledCenter("Back").key + local center = Entropy.get_pooled_center("Back").key ret[#ret+1] = center ret.spawn[center] = true end @@ -4806,7 +3755,7 @@ end local unblind_void_ref = UnBlind_create_UIBox_blind function UnBlind_create_UIBox_blind(type) - if Entropy.CanEeSpawn() then + if Entropy.can_ee_spawn() then if to_big(G.GAME.round_resets.ante) < to_big(32) then G.GAME.EEBeaten = false end if G.GAME.EEBuildup or (to_big(G.GAME.round_resets.ante) >= to_big(32) and not G.GAME.EEBeaten) then G.GAME.round_resets.blind_choices.Boss = "bl_entr_endless_entropy_phase_one" @@ -4825,4 +3774,133 @@ function Blind:calculate(context, ...) if obj then return blind_calc_ref(self, context, ...) end +end + +local four_fingers_ref = SMODS.four_fingers +function SMODS.four_fingers(type, ...) + local ret = four_fingers_ref(type, ...) or 5 + for i, v in pairs(SMODS.find_card("j_entr_planetarium")) do + if v.ability.extra.hand == "Straight Flush" then + local level = (G.GAME.hands[G.calced_hand or ""] or {}).level + if level then + ret = ret - math.floor(level/ 3) + end + end + end + return ret +end + +local get_x_sameref = get_X_same +function get_X_same(x, hand,...) + for i, v in pairs(SMODS.find_card("j_entr_planetarium")) do + if v.ability.extra.hand == "Straight Flush" then + local level = (G.GAME.hands[G.calced_hand or ""] or {}).level + if level then + x = x - math.floor(level/ 3) + end + end + end + if x < 1 then x = 1 end + return get_x_sameref(x, hand,...) +end + +local scale_cardref = SMODS.scale_card +function SMODS.scale_card(card, tbl, ...) + if card.ability.entr_pure then + SMODS.calculate_effect({card = card, message = localize("k_nope_ex"), colour = G.C.RED}) + else + return scale_cardref(card, tbl, ...) + end +end + +local return_to_deck_ref = Spectrallib.return_to_deck +function Spectrallib.return_to_deck(...) + return return_to_deck_ref(...) or Spectrallib.blind_is("bl_entr_cassandra") or Spectrallib.blind_is("bl_entr_pi") +end + +local get_bg_ref = Spectrallib.get_bg_colour +function Spectrallib.get_bg_colour(...) + + if TDECKS then + local ret = TDECKS.get_bg_colour() + if ret then return ret end + end + return G.GAME.entr_alt and G.C.ALTBG or get_bg_ref(...) +end + +local blind_is_ref = Spectrallib.blind_is +function Spectrallib.blind_is(blind, ...) + return blind_is_ref(blind, ...) + or (Entropy.is_EE() and G.GAME.blind.config.blind.key == "bl_entr_endless_entropy_phase_four" and Entropy.EEWhitelist[blind]) --TODO: change how this works +end + +function Entropy.require(key) + key = string.gsub(key, "%.", "/") + local func = SMODS.load_file("lib/" ..key..".lua", "entr") or SMODS.load_file("lib/" ..key.."/init.lua", "entr") + return func and func() +end + +local row_ref = add_round_eval_row +function add_round_eval_row(config) + if string.find(config.name, "void_joker") then + local config = config or {} + local width = G.round_eval.T.w - 0.51 + local num_dollars = config.dollars or 1 + local scale = 0.9 + total_cashout_rows = (total_cashout_rows or 0) + 1 + if total_cashout_rows > 7 then + return + end + if config.name ~= 'blind1' then + if not G.round_eval.divider_added then + G.E_MANAGER:add_event(Event({ + trigger = 'after',delay = 0.25, + func = function() + local spacer = {n=G.UIT.R, config={align = "cm", minw = width}, nodes={ + {n=G.UIT.O, config={object = DynaText({string = {'......................................'}, colours = {G.C.WHITE},shadow = true, float = true, y_offset = -30, scale = 0.45, spacing = 13.5, font = G.LANGUAGES['en-us'].font, pop_in = 0})}} + }} + G.round_eval:add_child(spacer,G.round_eval:get_UIE_by_ID(config.bonus and 'bonus_round_eval' or 'base_round_eval')) + return true + end + })) + delay(0.6) + G.round_eval.divider_added = true + end + else + delay(0.2) + end + + delay(0.2) + G.E_MANAGER:add_event(Event({ + trigger = 'before',delay = 0.5, + func = function() + --Add the far left text and context first: + local left_text = {} + table.insert(left_text, {n=G.UIT.O, config={object = DynaText({string = localize{type = 'name_text', set = config.card.config.center.set, key = config.card.config.center.key}, colours = {Entropy.void_gradient}, shadow = true, pop_in = 0, scale = 0.6*scale, silent = true})}}) + full_row = {n=G.UIT.R, config={align = "cm", minw = 5}, nodes={ + {n=G.UIT.C, config={padding = 0.05, minw = width*0.55, minh = 0.61, align = "cl"}, nodes=left_text}, + {n=G.UIT.C, config={padding = 0.05,minw = width*0.45, align = "cr"}, nodes={{n=G.UIT.C, config={align = "cm", id = 'void_joker_'..config.name},nodes={}}}} + }} + G.round_eval:add_child(full_row,G.round_eval:get_UIE_by_ID(config.bonus and 'bonus_round_eval' or 'base_round_eval')) + play_sound('cancel', config.pitch or 1) + play_sound('highlight1',( 1.5*(config.pitch or 1)) or 1, 0.2) + if config.card then config.card:juice_up(0.7, 0.46) end + return true + end + })) + G.E_MANAGER:add_event(Event({ + trigger = 'before',delay = 0.38, + func = function() + G.round_eval:add_child( + {n=G.UIT.R, config={align = "cm", id = 'void_row'..'_'..config.name}, nodes={ + {n=G.UIT.O, config={object = DynaText({string = {"X"..number_format(config.void_multiplier)}, colours = {Entropy.void_gradient}, shadow = true, pop_in = 0, scale = 0.65, float = true})}} + }}, + G.round_eval:get_UIE_by_ID('void_joker_'..config.name)) + play_sound('entr_void_generic') + return true + end + })) + else + row_ref(config) + end end \ No newline at end of file diff --git a/lib/loader.lua b/lib/loader.lua index 771005af..cb9d36da 100644 --- a/lib/loader.lua +++ b/lib/loader.lua @@ -1,7 +1,7 @@ local loadmodsref = SMODS.injectItems function SMODS.injectItems(...) if Entropy.config.blind_tokens then - local results = Entropy.RegisterBlinds() + local results = Entropy.register_blinds() local items = {} if results then if results.init then results.init(results) end @@ -24,15 +24,84 @@ function SMODS.injectItems(...) Cryptid.pin_debuff["entr_entropic"] = true Cryptid.pin_debuff["entr_reverse_legendary"] = true end - loadmodsref(...) - + for i, v in pairs(G.P_TAGS) do + if v.blindside then + SMODS.ObjectTypes.bld_obj_blindside.cards[#SMODS.ObjectTypes.bld_obj_blindside.cards+1] = v.key + end + end G.ASSET_ATLAS["cry_gameset"] = Entropy.GamesetAtlas - if StockingStuffer then StockingStuffer.Ruby.get_dummy = Entropy.GetDummy end + if StockingStuffer then StockingStuffer.Ruby.get_dummy = Entropy.get_dummy end if not G.entr_hooked then local oldfunc = Game.main_menu Game.main_menu = function(change_context) + if not G.SAVED_GAME then + G.SAVED_GAME = get_compressed(G.SETTINGS.profile..'/'..'save.jkr') + if G.SAVED_GAME ~= nil then G.SAVED_GAME = STR_UNPACK(G.SAVED_GAME) end + end + if G.SAVED_GAME and G.SAVED_GAME.GAME and G.SAVED_GAME.GAME.EEBuildup then + G.GAME.EEBuildup = true + G.E_MANAGER:add_event(Event{ + trigger = "after", + blocking = false, + blockable = false, + delay = 0.25 * G.SETTINGS.GAMESPEED, + func = function() + G.GAME.EE_SCREEN = true + G.GAME.EE_R = true + if not G.SPLASH_EE then + G.SPLASH_EE = Sprite(-30, -13, G.ROOM.T.w+60, G.ROOM.T.h+22, G.ASSET_ATLAS["ui_1"], {x = 9999, y = 0}) + G.GAME.EE_FADE = 0 + G.GAME.EE_FADE_SPEED = 10 + G.E_MANAGER:add_event(Event{ + trigger = "after", + blocking = false, + blockable = false, + delay = 0.25 * G.SETTINGS.GAMESPEED, + func = function() + G.GAME.EE_FADE = 0 + G.SPLASH_EE:define_draw_steps({{ + shader = 'entr_entropic_vortex', + send = { + {name = 'time', ref_table = G.TIMERS, ref_value = 'REAL'}, + {name = 'vort_speed', val = 1}, + {name = 'colour_1', ref_table = G.C, ref_value = 'BLUE'}, + {name = 'colour_2', ref_table = G.C, ref_value = 'WHITE'}, + {name = 'mid_flash', val = 0}, + {name = 'transgender', ref_table = G.GAME, ref_value = "EE_FADE"}, + {name = 'vort_offset', val = (2*90.15315131*os.time())%100000}, + }}} + ) + return true + end + }) + end + return true + end + }) + else + G.E_MANAGER:add_event(Event{ + trigger = "after", + blocking = false, + blockable = false, + delay = 0.25 * G.SETTINGS.GAMESPEED, + func = function() + G.E_MANAGER:add_event(Event{ + trigger = "after", + blocking = false, + blockable = false, + delay = 0.25 * G.SETTINGS.GAMESPEED, + func = function() + G.GAME.EE_SCREEN = nil + G.GAME.EE_R = true + return true + end + }) + return true + end + }) + end local ret = oldfunc(change_context) G.SPLASH_BACK:define_draw_steps({ { @@ -41,66 +110,10 @@ function SMODS.injectItems(...) { name = "time", ref_table = G.TIMERS, ref_value = "REAL_SHADER" }, { name = "vort_speed", val = 0.4 }, { name = "colour_1", ref_table = Entropy, ref_value = "entropic_gradient" }, - { name = "colour_2", ref_table = G.C, ref_value = "PURPLE" }, + { name = "colour_2", ref_table = Entropy, ref_value = "reverse_legendary_gradient" }, }, }, }) - - G.E_MANAGER:add_event(Event({ - trigger = "after", - delay = 0, - blockable = false, - blocking = false, - func = function() - local ind1 - if SMODS.Mods.Cryptid and SMODS.Mods.Cryptid.can_load then - for i, v in pairs(G.title_top.cards) do - if v.config.center.key == "c_cryptid" then - v:set_ability(G.P_CENTERS.c_entr_entropy) - v.T.w = v.T.w * 1.1 * 1.2 - v.T.h = v.T.h * 1.1 * 1.2 - end - end - else - local newcard = Card( - G.title_top.T.x, - G.title_top.T.y, - G.CARD_W, - G.CARD_H, - G.P_CARDS.empty, - G.P_CENTERS.c_entr_entropy, - { bypass_discovery_center = true } - ) - -- recenter the title - G.title_top.T.w = G.title_top.T.w * 1.7675 - G.title_top.T.x = G.title_top.T.x - 0.8 - G.title_top:emplace(newcard) - -- make the card look the same way as the title screen Ace of Spades - newcard.T.w = newcard.T.w * 1.1 * 1.2 - newcard.T.h = newcard.T.h * 1.1 * 1.2 - newcard.no_ui = true - newcard.states.visible = false - if change_context == "splash" then - newcard.states.visible = true - newcard:start_materialize({ G.C.WHITE, G.C.WHITE }, true, 2.5) - else - newcard.states.visible = true - newcard:start_materialize({ G.C.WHITE, G.C.WHITE }, nil, 1.2) - end - end - for i, v in pairs(G.title_top.cards) do - if v.base and v.base.value and v.base.value == "Ace" then - math.randomseed(os.time()) - if math.random() < 0.01 then - v:set_edition("e_entr_freaky") - else - v:set_edition("e_entr_solar") - end - end - end - return true - end - })) return ret end diff --git a/lib/ui.lua b/lib/ui.lua index 5bbb8948..34b305fb 100644 --- a/lib/ui.lua +++ b/lib/ui.lua @@ -332,7 +332,7 @@ G.FUNCS.toggle_path = function(e) G.GAME.round_resets.path_toggled = true G.GAME.entr_alt = not G.GAME.entr_alt G.GAME.round_resets.blind_choices.Boss = get_new_boss() - ease_background_colour{new_colour = Entropy.get_bg_colour(), contrast = 1} + ease_background_colour{new_colour = Spectrallib.get_bg_colour(), contrast = 1} G.ARGS.spin.real = (G.SETTINGS.reduced_motion and 0 or 1)*(G.GAME.entr_alt and 0.3 or -0.3) SMODS.calculate_context{entr_path_changed = true, on_alt_path = G.GAME.entr_alt} play_sound("highlight2") @@ -342,8 +342,8 @@ end local ref = G.UIDEF.challenge_description function G.UIDEF.challenge_description(id, ...) if id == "daily" then - Entropy.UpdateDailySeed() - Entropy.GetDailyChallenge() + Entropy.update_daily_seed() + Entropy.get_daily_challenge() end return ref(id, ...) end diff --git a/lib/utils.lua b/lib/utils.lua index f7f400c4..daa980fa 100644 --- a/lib/utils.lua +++ b/lib/utils.lua @@ -1,84 +1,38 @@ -function Entropy.GetHighlightedCards(cardareas, ignorecard, min, max, blacklist) - return Cryptid.get_highlighted_cards(cardareas, ignorecard or {}, min or 1, max or 1, type(blacklist) == "table" and function(card) - return not blacklist[card.config.center.key] - end or blacklist) -end - -function Cryptid.get_highlighted_cards(areas, ignore, min, max, blacklist, seed) - ignore.checked = true - blacklist = blacklist or function() - return true - end - local cards = {} - for i, area in pairs(areas) do - if area.cards then - for i2, card in pairs(area.cards) do - if - card ~= ignore - and blacklist(card) - and (card.highlighted or G.cry_force_use) - and not card.checked - then - cards[#cards + 1] = card - card.checked = true - end - end - end - end - for i, v in ipairs(cards) do - v.checked = nil - end - if (#cards >= min and #cards <= max) or not G.cry_force_use then - ignore.checked = nil - return cards - else - for i, v in pairs(cards) do - v.f_use_order = i - end - pseudoshuffle(cards, pseudoseed("forcehighlight" or seed)) - local actual = {} - for i = 1, max do - if cards[i] and not cards[i].checked and actual ~= ignore and actual.original_card ~= ignore and actual ~= ignore.original_card then - actual[#actual + 1] = cards[i] - end - end - table.sort(actual, function(a, b) - return a.f_use_order < b.f_use_order - end) - for i, v in pairs(cards) do - v.f_use_order = nil - end - ignore.checked = nil - return actual - end - return {} -end - -function Entropy.FilterTable(table, func) - local temp = {} - for i, v in ipairs(table) do - if func(v, i) then - temp[#temp + 1] = v +function Entropy.inversion(card) + if not card then return end + local card = card.config and card.config.center or card + local key = card.key or card.config.center and card.config.center_key or "" + if card.can_be_inverted or card.corruptions then return key end + if card.set == "Joker" then + for i, v in pairs(G.P_CENTER_POOLS.Joker) do + if v.corruptions then + for i, c in pairs(v.corruptions) do if c == key then return v.key end end + end end end - return temp -end - -function Entropy.Inversion(card) - if not card then return end - return Entropy.FlipsideInversions[card.key or (card.config and card.config.center and card.config.center.key) or ""] + return Entropy.FlipsideInversions[card.key] end function Entropy.is_inverted(card) if not card then return end - return Entropy.FlipsideInversions[card.key or (card.config and card.config.center and card.config.center.key) or ""] and not Entropy.FlipsidePureInversions[card.key or (card.config and card.config.center and card.config.center.key) or ""] + local card = card.config and card.config.center or card + local key = card.key or card.config.center and card.config.center_key or "" + if card.set == "Joker" then + for i, v in pairs(G.P_CENTER_POOLS.Joker) do + if v.corruptions then + for i, c in pairs(v.corruptions) do if c == key then return true end end + end + end + if card.corruptions then return true end + end + return Entropy.FlipsideInversions[key] and not Entropy.FlipsidePureInversions[key] end function Entropy.inversion_queue(card, _c, first_pass) local info_queue = {} - if (Entropy.Inversion(card) or _c.key == "c_entr_flipside") and first_pass and Entropy.show_flipside(card, _c) and Entropy.config.inversion_queues > 1 then - if _c.key ~= "c_entr_flipside" then - local inversion = G.P_CENTERS[Entropy.Inversion(_c)] + if (Entropy.inversion(card) or _c.key == "c_entr_flipside" or _c.corruptions) and first_pass and Entropy.show_flipside(card, _c) and Entropy.config.inversion_queues > 1 and not c then + if _c.key ~= "c_entr_flipside" and _c.key ~= Entropy.inversion(card) and not _c.corruptions then + local inversion = G.P_CENTERS[Entropy.inversion(_c)] info_queue[#info_queue+1] = {key = "inversion_allowed", set = "Other", vars = {G.localization.descriptions[inversion.set][inversion.key].name}} if Entropy.config.inversion_queues > 2 then info_queue[#info_queue+1] = inversion @@ -90,83 +44,111 @@ function Entropy.inversion_queue(card, _c, first_pass) return info_queue end -function Entropy.FlipThen(cardlist, func, before, after) - if not Entropy.should_skip_animations() then - for i, v in ipairs(cardlist) do - local card = cardlist[i] - if card then - G.E_MANAGER:add_event( - Event( - { - trigger = "after", - delay = 0.1, - func = function() - if before then - before(card) - end - if card.flip then - card:flip() - end - return true - end - } - ) - ) - end - end - else - if before then - before(card) +function Entropy.invert(cards, flip, filter) + if cards.start_dissolve then cards = {cards} end + local c_temp = {} + for i, v in pairs(cards) do + if Entropy.inversion(v) or v.config.center.corruptions or not filter then + c_temp[#c_temp+1] = v end end - for i, v in ipairs(cardlist) do - local card = cardlist[i] - if card then - G.E_MANAGER:add_event( - Event( - { - trigger = "after", - delay = 0.15, - func = function() - func(card, cardlist, i) - return true + cards = c_temp + if flip and not Entropy.should_skip_animations() then + Entropy.flip_then(cards, { + {func = function(c) + c:juice_up() + play_sound("tarot1") + end, delay = 1.5}, + {func = function(c) + c:juice_up() + play_sound("tarot1") + end, delay = 1.5}, + {func = function(c) + c:juice_up() + play_sound("entr_invert") + end, delay = 1.5}, + {func = function(c) + local key = c.config.center_key + local i = Entropy.inversion(c) + if c.config.center.corruptions then + G.GAME.entr_perma_inversions = G.GAME.entr_perma_inversions or {} + for i, v in pairs(c.config.center.corruptions) do + G.GAME.entr_perma_inversions[v] = c.config.center.key + end + if c.ability.original_corruption then + i = c.ability.original_corruption + else + i = pseudorandom_element(c.config.center.corruptions, pseudoseed("entr_get_corruption")) + end + end + if i then + local ret = {} + if c.config.center.calculate then + ret = c.config.center:calculate(c, {being_inverted = true}) or {} + end + if not ret or not ret.prevent_inversion then + c.ability.fromflipside = true + c:set_ability(G.P_CENTERS[i]) + if G.P_CENTERS[i].corruptions then + c.ability.original_corruption = key + end + if c.ability.glitched_crown then + for i,v in pairs(c.ability.glitched_crown) do + c.ability.glitched_crown[i] = Entropy.FlipsideInversions[v] end - } - ) - ) - end - end - if not Entropy.should_skip_animations() then - for i, v in ipairs(cardlist) do - local card = cardlist[i] - if card then - G.E_MANAGER:add_event( - Event( - { - trigger = "after", - delay = 0.1, - func = function() - if card.flip then - card:flip() - end - if after then - after(card) - end - return true - end - } - ) - ) + end + c.ability.fromflipside = false + SMODS.calculate_context({entr_consumable_inverted = true, card = c}) + end + if next(ret or {}) then + SMODS.calculate_effect(ret, c) + end end - end + end, delay = 2.2}}) else - if after then - after(card) + + for i, c in pairs(cards) do + local key = c.config.center_key + local i = Entropy.inversion(c) + if c.config.center.corruptions then + G.GAME.entr_perma_inversions = G.GAME.entr_perma_inversions or {} + for i, v in pairs(c.config.center.corruptions) do + G.GAME.entr_perma_inversions[v] = c.config.center.key + end + if c.ability.original_corruption then + i = c.ability.original_corruption + else + i = pseudorandom_element(c.config.center.corruptions, pseudoseed("entr_get_corruption")) + end + end + if i then + local ret = {} + if c.config.center.calculate then + ret = c.config.center:calculate(c, {being_inverted = true}) + end + if not ret.prevent_inversion then + c.ability.fromflipside = true + c:set_ability(G.P_CENTERS[i]) + if G.P_CENTERS[i].corruptions then + c.ability.original_corruption = key + end + if c.ability.glitched_crown then + for i,v in pairs(c.ability.glitched_crown) do + c.ability.glitched_crown[i] = Entropy.FlipsideInversions[v] + end + end + c.ability.fromflipside = false + SMODS.calculate_context({entr_consumable_inverted = true, card = c}) + end + if next(ret) then + SMODS.calculate_effect(ret, c) + end + end end end end -function Entropy.SealSpectral(key, sprite_pos, seal,order, inversion, entr_credits, atlas, q_vars) +function Entropy.seal_spectral(key, sprite_pos, seal,order, inversion, entr_credits, atlas, q_vars) return { dependencies = { items = { @@ -186,9 +168,9 @@ function Entropy.SealSpectral(key, sprite_pos, seal,order, inversion, entr_credi pos = sprite_pos, inversion = inversion, --soul_pos = { x = 5, y = 0}, - use = Entropy.ModifyHandCardNF({seal=seal}), + use = Entropy.modify_hand_card_NF({seal=seal}), can_use = function(self, card) - local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.highlighted) + local cards = Entropy.get_highlighted_cards({G.hand}, card, 1, card.ability.highlighted) return #cards > 0 and #cards <= card.ability.highlighted end, loc_vars = function(self, q, card) @@ -210,304 +192,16 @@ function Entropy.SealSpectral(key, sprite_pos, seal,order, inversion, entr_credi } end -function Entropy.ModifyHandCard(modifications, cards) - return function() - Entropy.FlipThen(cards or G.hand.highlighted, function(mcard) - if modifications.suit or modifications.rank then - SMODS.change_base(mcard, modifications.suit, modifications.rank) - end - if modifications.enhancement then - mcard:set_ability(G.P_CENTERS[modifications.enhancement]) - end - if modifications.edition then - if type(modifications.edition) == "table" then - mcard:set_edition(modifications.edition) - else - mcard:set_edition(G.P_CENTERS[modifications.edition]) - end - end - if modifications.seal then - mcard:set_seal(modifications.seal) - end - if modifications.sticker then - Entropy.ApplySticker(mcard, modifications.sticker) - end - if modifications.extra then - for i, v in pairs(modifications.extra) do mcard.ability[i] = v end - end - end) - end -end - -function Entropy.ModifyHandCardNF(modifications, cards) - return function(self, card) - for i, mcard in pairs(cards or Entropy.GetHighlightedCards({G.hand}, {}, 1, card.ability.highlighted or 1)) do - G.E_MANAGER:add_event(Event({ --Add bonus chips from this card - delay = 0, - func = function() - if modifications.suit or modifications.rank then - SMODS.change_base(mcard, modifications.suit, modifications.rank) - end - if modifications.enhancement then - mcard:set_ability(G.P_CENTERS[modifications.enhancement]) - end - if modifications.edition then - if type(modifications.edition) == "table" then - mcard:set_edition(modifications.edition) - else - mcard:set_edition(G.P_CENTERS[modifications.edition]) - end - end - if modifications.seal then - mcard:set_seal(modifications.seal) - end - if modifications.sticker then - Entropy.ApplySticker(mcard, modifications.sticker) - end - if modifications.extra then - for i, v in pairs(modifications.extra) do mcard.ability[i] = v end - end - mcard:juice_up() - return true - end})) - end - - end -end - -function Entropy.FindPreviousInPool(item, pool, ignore) - for i, v in pairs(G.P_CENTER_POOLS[pool]) do - if G.P_CENTER_POOLS[pool][i].key == item then - local ind = i - 1 - while G.GAME.banned_keys[G.P_CENTER_POOLS[pool][ind].key] or G.P_CENTER_POOLS[pool][ind].no_doe or ind == ignore do - ind = ind - 1 - end - return G.P_CENTER_POOLS[pool][ind].key - end - end - return nil -end - -Entropy.charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890~#$^~#$^~#$^~#$^~#$^" -function Entropy.StringRandom(length) - local total = "" - for i = 0, length do - local val = math.random(1,#Entropy.charset) - total = total..(Entropy.charset:sub(val, val)) - end - return total -end - -function Entropy.FormatDollarValue(val) - if to_big(val) >= to_big(0) then - return localize("$")..val - else - return "-"..localize("$")..(-val) - end -end - -function Entropy.InTable(table, val) - for i, v in ipairs(table) do if v == val then return true end end -end - -function Entropy.GetNextRarity(rarity) - if rarity == "entr_reverse_legendary" then return "cry_exotic" end - for i, v in pairs(Entropy.RarityChecks) do - if v == rarity then return Entropy.RarityChecks[i+1] or v end - end - return rarity -end - -function Entropy.GetHigherVoucherTier(voucher_key) - for i, v in pairs(G.P_CENTER_POOLS.Voucher) do - if Entropy.InTable(v.requires or {}, voucher_key) then return v.key end - end -end - -local gfcfbs = G.FUNCS.check_for_buy_space -G.FUNCS.check_for_buy_space = function(card) - if - not card or card.ability.infinitesimal or card.ability.set == "Back" or card.ability.set == "Sleeve" - then - return true - end - return gfcfbs(card) -end - -function Entropy.RandomForcetrigger(card, num,context) - local res = { } - local cards = Entropy.GetRandomCards({G.jokers, G.hand, G.consumeables, G.play}, num, "fractured", function(card) return not card.edition or card.edition.key ~= "e_entr_fractured" end) - for i, v in pairs(cards) do - if Cryptid.demicolonGetTriggerable(v)[1] and (not v.edition or v.edition.key ~= "e_entr_fractured") then - local results = Cryptid.forcetrigger(v, context) - if results then - for i, v2 in pairs(results) do - for i2, result in pairs(type(v2) == "table" and v2 or {}) do - SMODS.calculate_individual_effect({[i2] = result}, card, i2, result, false) - end - end - end - card_eval_status_text( - v, - "extra", - nil, - nil, - nil, - { message = localize("cry_demicolon"), colour = G.C.GREEN } - ) - elseif v.base.id and (not v.edition or v.edition.key ~= "e_entr_fractured") then - local results = eval_card(v, {cardarea=G.play,main_scoring=true, forcetrigger=true, individual=true}) or {} - if results then - for i, v2 in pairs(results) do - for i2, result in pairs(type(v2) == "table" and v2 or {}) do - SMODS.calculate_individual_effect({[i2] = result}, card, i2, result, false) - end - end - end - local results = eval_card(v, {cardarea=G.hand,main_scoring=true, forcetrigger=true, individual=true}) or {} - if results then - for i, v2 in pairs(results) do - for i2, result in pairs(type(v2) == "table" and v2 or {}) do - SMODS.calculate_individual_effect({[i2] = result}, card, i2, result, false) - end - end - end - card_eval_status_text( - v, - "extra", - nil, - nil, - nil, - { message = localize("cry_demicolon"), colour = G.C.GREEN } - ) - end - end -end - -function Entropy.GetRandomSet(has_parakmi) - local pool = pseudorandom_element(G.P_CENTER_POOLS, pseudoseed(has_parakmi and "parakmi" or "chaos")) - local set = pool and pool[1] and pool[1].set - while not set or Entropy.ParakmiBlacklist[set] or (not has_parakmi and Entropy.ChaosBlacklist[set]) do - pool = pseudorandom_element(G.P_CENTER_POOLS, pseudoseed(has_parakmi and "parakmi" or "chaos")) - set = pool and pool[1] and pool[1].set - end - return set -end - -function Entropy.BlindIs(blind) - if G.GAME.blind and G.GAME.blind.config and G.GAME.blind.config.blind.key == blind then return true end - if Entropy.IsEE() and G.GAME.blind.config.blind.key == "bl_entr_endless_entropy_phase_four" and Entropy.EEWhitelist[blind] then return true end -end - -function Entropy.card_eval_status_text_eq(card, eval_type, amt, percent, dir, extra, pref, col, sound, vol, ta) - if card.area == G.butterfly_jokers and G.deck.cards[1] then - Entropy.card_eval_status_text_eq(G.deck.cards[1], eval_type, amt, percent, dir, extra, pref, col, sound, vol, true) +local orig_ref = Spectrallib.card_eval_status_text_eq +function Spectrallib.card_eval_status_text_eq(card, eval_type, amt, percent, dir, extra, pref, col, sound, vol, ta) + if card.area == G.butterfly_jokers and G.deck.cards[1] then + Spectrallib.card_eval_status_text_eq(G.deck.cards[1], eval_type, amt, percent, dir, extra, pref, col, sound, vol, true) return end - percent = percent or (0.9 + 0.2*math.random()) - if dir == 'down' then - percent = 1-percent - end - - if extra and extra.focus then card = extra.focus end - - local text = '' - local volume = vol or 1 - local card_aligned = 'bm' - local y_off = 0.15*G.CARD_H - if card.area == G.jokers or card.area == G.consumeables then - y_off = 0.05*card.T.h - elseif card.area == G.hand or ta then - y_off = -0.05*G.CARD_H - card_aligned = 'tm' - elseif card.area == G.play then - y_off = -0.05*G.CARD_H - card_aligned = 'tm' - elseif card.jimbo then - y_off = -0.05*G.CARD_H - card_aligned = 'tm' - end - local config = {} - local delay = 0.65 - local colour = config.colour or (extra and extra.colour) or ( G.C.FILTER ) - local extrafunc = nil - sound = sound or 'multhit1'--'other1' - amt = amt - text = (pref) or ("Mult = "..amt) - colour = col or G.C.MULT - config.type = 'fade' - config.scale = 0.7 - delay = delay*1.25 - if to_big(amt) > to_big(0) or to_big(amt) < to_big(0) then - if extra and extra.instant then - if extrafunc then extrafunc() end - attention_text({ - text = text, - scale = config.scale or 1, - hold = delay - 0.2, - backdrop_colour = colour, - align = card_aligned, - major = card, - offset = {x = 0, y = y_off} - }) - play_sound(sound, 0.8+percent*0.2, volume) - if not extra or not extra.no_juice then - card:juice_up(0.6, 0.1) - G.ROOM.jiggle = G.ROOM.jiggle + 0.7 - end - else - G.E_MANAGER:add_event(Event({ --Add bonus chips from this card - trigger = 'before', - delay = delay, - func = function() - if extrafunc then extrafunc() end - attention_text({ - text = text, - scale = config.scale or 1, - hold = delay - 0.2, - backdrop_colour = colour, - align = card_aligned, - major = card, - offset = {x = 0, y = y_off} - }) - play_sound(sound, 0.8+percent*0.2, volume) - if not extra or not extra.no_juice then - card:juice_up(0.6, 0.1) - G.ROOM.jiggle = G.ROOM.jiggle + 0.7 - end - return true - end - })) - end - end - if extra and extra.playing_cards_created then - playing_card_joker_effects(extra.playing_cards_created) - end + orig_ref(card, eval_type, amt, percent, dir, extra, pref, col, sound, vol, ta) end -function Entropy.FormatArrowMult(arrows, mult) - mult = type(mult) ~= "string" and number_format(mult) or mult - if to_big(arrows) <= to_big(-2.01) then - return "{"..arrows.."}"..mult - end - if to_big(arrows) < to_big(-1.1) then - return "="..mult - elseif to_big(arrows) < to_big(-0.1) then - return "+"..mult - elseif to_big(arrows) < to_big(6) then - if to_big(arrows) < to_big(1) then - return "X"..mult - end - local arr = "" - for i = 1, to_number(arrows) do - arr = arr.."^" - end - return arr..mult - else - return "{"..arrows.."}"..mult - end -end -function Entropy.RareTag(rarity, key, ascendant, colour, pos, fac, legendary,order) +function Entropy.rare_tag(rarity, key, ascendant, colour, pos, fac, legendary,order) return { object_type = "Tag", order = order, @@ -553,7 +247,7 @@ function Entropy.RareTag(rarity, key, ascendant, colour, pos, fac, legendary,ord } end -function Entropy.EditionTag(edition, key, ascendant, pos,order, credits) +function Entropy.edition_tag(edition, key, ascendant, pos,order, credits) return { object_type = "Tag", dependencies = { @@ -570,18 +264,59 @@ function Entropy.EditionTag(edition, key, ascendant, pos,order, credits) in_pool = ascendant and function() return false end or nil, apply = function(self, tag, context) if context.type == "store_joker_modify" then - tag:yep("+", G.C.RARITY[colour], function() - for i, v in pairs(G.shop_jokers.cards) do - v:set_edition(edition) + local any_to_edition + for i, v in pairs(G.shop_jokers.cards) do + if not v.will_be_editioned then + any_to_edition = true + v.will_be_editioned = true end - for i, v in pairs(G.shop_booster.cards) do - v:set_edition(edition) + end + for i, v in pairs(G.shop_booster.cards) do + if not v.will_be_editioned then + any_to_edition = true + v.will_be_editioned = true end - for i, v in pairs(G.shop_vouchers.cards) do - v:set_edition(edition) + end + for i, v in pairs(G.shop_vouchers.cards) do + if not v.will_be_editioned then + any_to_edition = true + v.will_be_editioned = true end - return true - end) + end + if any_to_edition then + tag:yep("+", G.C.RARITY[colour], function() + for i, v in pairs(G.shop_jokers.cards) do + if not v.edition then + v:set_edition(edition) + end + end + for i, v in pairs(G.shop_booster.cards) do + if not v.edition then + v:set_edition(edition) + end + end + for i, v in pairs(G.shop_vouchers.cards) do + if not v.edition then + v:set_edition(edition) + end + end + return true + end) + end + G.E_MANAGER:add_event(Event{ + func = function() + for i, v in pairs(G.shop_jokers.cards) do + v.will_be_editioned = nil + end + for i, v in pairs(G.shop_booster.cards) do + v.will_be_editioned = nil + end + for i, v in pairs(G.shop_vouchers.cards) do + v.will_be_editioned = nil + end + return true + end + }) tag.triggered = true end end, @@ -603,7 +338,7 @@ Entropy.EEWhitelist["bl_entr_diamond_dawn"]=true Entropy.EEWhitelist["bl_entr_olive_orchard"]=true Entropy.EEWhitelist["bl_entr_citrine_comet"]=true -function Entropy.GetEEBlinds() +function Entropy.get_EE_blinds() local blinds = {} for i, v in pairs(G.P_BLINDS) do if Entropy.EEWhitelist[i] then @@ -613,159 +348,10 @@ function Entropy.GetEEBlinds() return blinds end -function Entropy.GetRandomCards(areas, cardns, rpseudoseed, cond) - local cards = {} - for i, v in pairs(areas) do - for i2, v2 in pairs(v.cards) do - if not cond or cond(v2) then cards[#cards+1]=v2 end - end - end - pseudoshuffle(cards, pseudoseed(rpseudoseed or "fractured")) - local temp = {} - for i = 1, cardns do - temp[i] = cards[i] - end - return temp -end - -function Entropy.StackEvalReturns(orig, new, etype) - if etype == "Xmult" or etype == "x_mult" or etype == "Xmult_mod" or etype == "Xchips" or etype == "Xchip_mod" or etype == "asc" or etype == "Emult_mod" or etype == "Echip_mod" then return (orig or 1) * new else - return (orig or 0) + new - end -end - -function Entropy.DeckOrSleeve(key) - local num = 0 - if key == "doc" and G.GAME.modifiers.doc_antimatter then num = num + 1 end - if key == "butterfly" and G.GAME.modifiers.butterfly_antimatter then num = num + 1 end - if CardSleeves then - if G.GAME.selected_sleeve == ("sleeve_entr_"..key) or G.GAME.selected_sleeve == key then num = num + 1 end - end - for i, v in pairs(G.GAME.entr_bought_decks or {}) do - if v == "b_entr_"..key or v == key then num = num + 1 end - end - if G.GAME.selected_back and (G.GAME.selected_back.effect.center.original_key == key or G.GAME.selected_back.effect.center.key == key) then num = num + 1 end - return num > 0 and num or nil -end - -Entropy.charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890~#$^~#$^~#$^~#$^~#$^" -function Entropy.srandom(length, charset) - local total = "" - for i = 0, length do - local val = math.random(1,charset and #charset or #Entropy.charset) - total = total..((charset or Entropy.charset):sub(val, val)) - end - return total -end - -function Entropy.ChangeEnhancements(areas, enh, required, uhl) - for i, v in pairs(areas) do - if not v.cards then - areas[i] = { - cards = {v} - } - end - end - for i, v in pairs(areas) do - for i2, v2 in pairs(v.cards) do - if not required or (v2.config and v2.config.center.key == required) then - if enh == "null" then - v2:start_dissolve() - elseif enh == "ccd" then - - else - v2:set_ability(G.P_CENTERS[enh]) - v2:juice_up() - end - end - end - end -end - -function Entropy.ApplySticker(card, key) - if not card.ability then card.ability = {} end - if card.ability then - if not SMODS.Stickers[key] then return end - card.ability[key] = true - if SMODS.Stickers[key].apply then SMODS.Stickers[key].apply(SMODS.Stickers[key], card) end - end -end - -function Entropy.HigherCardRank(card) - if not card.base then return nil end - local rank_suffix = math.min(card.base.id, 14) - if rank_suffix < 10 then rank_suffix = tostring(rank_suffix) - elseif rank_suffix == 10 then rank_suffix = '10' - elseif rank_suffix == 11 then rank_suffix = 'Jack' - elseif rank_suffix == 12 then rank_suffix = 'Queen' - elseif rank_suffix == 13 then rank_suffix = 'King' - elseif rank_suffix == 14 then rank_suffix = 'Ace' - end - return ({ - Queen = "King", - Jack = "Queen", - ["10"] = "Jack", - ["9"] = "10", - ["8"] = "9", - ["7"] = "8", - ["6"] = "7", - ["5"] = "6", - ["4"] = "5", - ["3"] = "4", - ["2"] = "3", - Ace = "2", - King = "Ace", - })[tostring(rank_suffix)] -end - -Entropy.ReverseRarityChecks = { - -} -for i, v in ipairs(Entropy.RarityChecks) do - Entropy.ReverseRarityChecks[v]=i -end -function Entropy.RarityAbove(check, threshold, gte) - if not Entropy.ReverseRarityChecks[check] then Entropy.ReverseRarityChecks[check] = 1 end - if not Entropy.ReverseRarityChecks[threshold] then Entropy.ReverseRarityChecks[threshold] = 1 end - if gte then return Entropy.ReverseRarityChecks[check] < Entropy.ReverseRarityChecks[threshold] end - return Entropy.ReverseRarityChecks[check] <= Entropy.ReverseRarityChecks[threshold] -end -function Entropy.GetRandomRarityCard(rare) - if rare == 1 then rare = "Common" end - if rare == 2 then rare = "Uncommon" end - if rare == 3 then rare = "Rare" end - local _pool, _pool_key = get_current_pool("Joker", rare, rare == 4, "ieros") - local center = pseudorandom_element(_pool, pseudoseed(_pool_key)) - local it = 1 - while center == 'UNAVAILABLE' do - it = it + 1 - center = pseudorandom_element(_pool, pseudoseed(_pool_key..'_resample'..it)) - end - return center -end - -function Entropy.randomchar(arr) - return { - n = G.UIT.O, - config = { - object = DynaText({ - string = arr, - colours = { HEX("b1b1b1") }, - pop_in_rate = 9999999, - silent = true, - random_element = true, - pop_delay = 0.1, - scale = 0.3, - min_cycle_time = 0, - }), - }, - } -end - -function Entropy.GetJokerSumRarity(loc) +function Entropy.get_joker_sum_rarity(loc) if not G.jokers or #G.jokers.cards <= 0 then return "none" end local rarity = 1 - local sum = Entropy.SumJokerPoints() + local sum = Entropy.sum_joker_points() local last_sum = 0 for i, v in pairs(Entropy.RarityPoints) do if Entropy.is_big(sum) then @@ -793,26 +379,26 @@ function Entropy.GetJokerSumRarity(loc) })[rarity] or "k_"..rarity) end end -function Entropy.SumJokerPoints() +function Entropy.sum_joker_points() local total = 0 for i, v in pairs(G.jokers.cards) do - total = total + Entropy.GetJokerPoints(v) + total = total + Entropy.get_joker_points(v) end return total end -function Entropy.GetJokerPoints(card) +function Entropy.get_joker_points(card) local total = Entropy.RarityPoints[card.config.center.rarity] or 1 if card.edition then - local factor = to_big(Entropy.GetEditionFactor(card.edition)) ^ (1.7/(Entropy.RarityDiminishers[card.config.center.rarity] or 1)) + local factor = to_big(Entropy.get_edition_factor(card.edition)) ^ (1.7/(Entropy.RarityDiminishers[card.config.center.rarity] or 1)) total = total * factor end return total end -function Entropy.GetEditionFactor(edition) +function Entropy.get_edition_factor(edition) return Entropy.EditionFactors[edition.key] or 1 end -function Entropy.CanEeSpawn() +function Entropy.can_ee_spawn() if MP and MP.LOBBY and MP.LOBBY.code then return false end return Cryptid.enabled("bl_entr_endless_entropy_phase_one") and Cryptid.enabled("bl_entr_endless_entropy_phase_two") @@ -820,18 +406,6 @@ function Entropy.CanEeSpawn() and Cryptid.enabled("bl_entr_endless_entropy_phase_four") end -function Entropy.stringsplit(s) - local tbl = {} - for i = 1, #s do - tbl[#tbl+1]=s:sub(i,i) - end - return tbl -end - -function Entropy.TableAny(table, func) - for i, v in pairs(table) do if func(v) then return true end end -end - function Card:is_sunny() if self.config.center.key == "j_entr_sunny_joker" then return true end if self.config.center.key == "m_entr_radiant" then return true end @@ -840,35 +414,7 @@ function Card:is_sunny() return nil end -function Entropy.UpgradeEnhancement(card, bypass, blacklist) - local enh = card.config.center.key - if enh == "c_base" then return "m_bonus" end - local cards = {} - for i, v in pairs(G.P_CENTER_POOLS.Enhanced) do - if (not v.no_doe or bypass) and not blacklist[v.key] then cards[#cards+1]=v end - end - table.sort(cards, function(a, b) - return (a.upgrade_order or a.order) < (b.upgrade_order or b.order) - end) - for i, v in pairs(cards) do - if v.key == enh then return cards[i+1] and cards[i+1].key end - end - return nil -end -function Entropy.GetAreaName(area) - if not area then return nil end - for i, v in pairs(G) do - if v == area then return i end - end -end -function Entropy.GetIdxInArea(card) - if card and card.area then - for i, v in pairs(card.area.cards) do - if v.unique_val == card.unique_val then return i end - end - end -end -function Entropy.FormatTesseract(base) +function Entropy.format_tesseract(base) if math.abs(to_big(base.c)) < to_big(0.001) then base.c = 0;base.minusc=false end if math.abs(to_big(base.r)) < to_big(0.001) then base.r = 0;base.minusr=false end local minr = base.minusr and "-" or "" @@ -886,7 +432,7 @@ function Entropy.FormatTesseract(base) end -function Entropy.WhatTheFuck(base, val) +function Entropy.what_the_fuck(base, val) if to_big(base.r) < to_big(0) then base.r = -base.r base.minusr = true @@ -899,51 +445,19 @@ function Entropy.WhatTheFuck(base, val) if to_big(math.abs(base.r)) < to_big(0.0001) then base.r = 0 end base.c = to_big(base.c) * to_big(val) base.r = to_big(base.r) * to_big(val) - return Entropy.FormatTesseract(base) -end - -function Entropy.RandomContext(seed) - return pseudorandom_element({ - "before", - "pre_joker", - "joker_main", - "individual", - "pre_discard", - "remove_playing_cards", - "setting_blind", - "ending_shop", - "reroll_shop", - "selling_card", - "using_consumeable", - "playing_card_added" - }, pseudoseed(seed or "desync")) -end - -function Entropy.ContextChecks(self, card, context, currc, edition) - if not context.retrigger_joker and not context.blueprint and not context.forcetrigger and not context.post_trigger then - if currc == "before" and context.before then return true end - if currc == "pre_joker" and ((context.pre_joker) or (edition and context.main_scoring and context.cardarea == G.play)) then return true end - if currc == "joker_main" and ((context.joker_main) or (edition and context.main_scoring and context.cardarea == G.play)) then return true end - if currc == "individual" and ((context.individual and context.cardarea == G.play and not context.blueprint) or (edition and context.main_scoring and context.cardarea == G.play)) then return true end - if currc == "pre_discard" and context.pre_discard and context.cardarea == G.hand and not context.retrigger_joker and not context.blueprint then return true end - if currc == "remove_playing_cards" and context.remove_playing_cards and not context.blueprint then return true end - if currc == "setting_blind" and context.setting_blind then return true end - if currc == "ending_shop" and context.ending_shop then return true end - if currc == "reroll_shop" and context.reroll_shop then return true end - if currc == "selling_card" and context.selling_card then return true end - if currc == "using_consumeable" and context.using_consumeable then return true end - if currc == "playing_card_added" and context.playing_card_added then return true end - end + return Entropy.format_tesseract(base) end -function Entropy.IsEE() +function Entropy.is_EE() return G.GAME.blind and G.GAME.blind.config and G.GAME.blind.config.blind.key == "bl_entr_endless_entropy_phase_one" or G.GAME.blind and G.GAME.blind.config and G.GAME.blind.config.blind.key == "bl_entr_endless_entropy_phase_two" or G.GAME.blind and G.GAME.blind.config and G.GAME.blind.config.blind.key == "bl_entr_endless_entropy_phase_three" or G.GAME.blind and G.GAME.blind.config and G.GAME.blind.config.blind.key == "bl_entr_endless_entropy_phase_four" end -function Entropy.WinEE() +function Entropy.win_EE() + G.GAME.EE_SCREEN = false + G.GAME.EE_R = true G.E_MANAGER:add_event(Event({ trigger = 'immediate', func = (function() @@ -1012,7 +526,7 @@ Entropy.TMTrainerEffects["joker_random"] = function(key) SMODS.add_card({set = " Entropy.TMTrainerEffects["joker_choose_rarity"] = function(key) SMODS.add_card({set = "Joker", rarity = pseudorandom_element({1, 1, 1, 2, 2, 3, 3, "cry_epic"}, pseudoseed(key))}) end Entropy.TMTrainerEffects["edition"] = function(key) local element = pseudorandom_element(G.jokers.cards, pseudoseed(key)) - Entropy.FlipThen({element}, function(card) + Entropy.flip_then({element}, function(card) card:set_edition(SMODS.poll_edition({guaranteed = true, key = "entr_tmt_ed"})) end) end @@ -1021,26 +535,26 @@ Entropy.TMTrainerEffects["consumable"] = function(key) SMODS.add_card({key = Cry Entropy.TMTrainerEffects["enhancement_play"] = function(key) local enhancement = SMODS.poll_enhancement({guaranteed = true, key = "entr_tmt_enh"}) local element = pseudorandom_element(G.play.cards, pseudoseed(key)) - Entropy.FlipThen({element}, function(card) + Entropy.flip_then({element}, function(card) card:set_ability(G.P_CENTERS[enhancement]) end) end Entropy.TMTrainerEffects["enhancement_hand"] = function(key) local enhancement = SMODS.poll_enhancement({guaranteed = true, key = "entr_tmt_enh"}) local element = pseudorandom_element(G.hand.cards, pseudoseed(key)) - Entropy.FlipThen({element}, function(card) + Entropy.flip_then({element}, function(card) card:set_ability(G.P_CENTERS[enhancement]) end) end Entropy.TMTrainerEffects["random"] = function(key, context ) local res = {} for i = 1, 3 do - local results = Entropy.TMTrainerEffects[Entropy.RandomEffect()]("tmtrainer_actual_effect", context) or nil + local results = Entropy.TMTrainerEffects[Entropy.random_effect()]("tmtrainer_actual_effect", context) or nil if results then for i, v in pairs(results) do for i2, result in pairs(v) do if Entropy.is_number(result) then - res[i2] = Entropy.StackEvalReturns(res[i2], result, i2) + res[i2] = Entropy.stack_eval_returns(res[i2], result, i2) else res[i2] = result end @@ -1059,7 +573,7 @@ Entropy.TMTrainerScoring["xchips"]=true Entropy.TMTrainerScoring["echips"]=true Entropy.TMTrainerScoring["enhancement_play"]=true -function Entropy.RandomEffect(context) +function Entropy.random_effect(context) local keys = {} for i, v in pairs(Entropy.TMTrainerEffects) do keys[#keys+1] = i @@ -1076,9 +590,9 @@ function Entropy.RandomEffect(context) end return element end -function Entropy.TMTTrainize(card) - local context = Entropy.RandomContext() - local effect = Entropy.RandomEffect(context) +function Entropy.randomize_TMT(card) + local context = Entropy.random_context() + local effect = Entropy.random_effect(context) card.ability.tm_effect = effect card.ability.tm_context = context end @@ -1086,7 +600,7 @@ end SMODS.Edition:take_ownership("e_cry_glitched", { calculate = function(self, card, context) if card.ability.tm_effect then - if Entropy.ContextChecks(self, card, context, card.ability.tm_context, true) then + if Entropy.context_checks(self, card, context, card.ability.tm_context, true) then return Entropy.TMTrainerEffects[card.ability.tm_effect]("tmtrainer_actual_effect", card.ability.tm_context) or nil end end @@ -1098,17 +612,19 @@ SMODS.Edition:take_ownership("e_cry_glitched", { end }, true) -function Entropy.ChangePhase() +function Entropy.change_phase() G.STATE = 1 G.STATE_COMPLETE = false local remove_temp = {} for i, v in pairs({G.jokers, G.hand, G.consumeables, G.discard, G.deck}) do for ind, card in pairs(v.cards) do if card.ability then - if card.ability.temporary or card.ability.temporary2 then + if card.ability.temporary or card.ability.temporary2 or card.ability.void_temporary then if card.area ~= G.hand and card.area ~= G.play and card.area ~= G.jokers and card.area ~= G.consumeables then card.states.visible = false end card:remove_from_deck() + G.entr_bypass_rebirth = true card:start_dissolve() + G.entr_bypass_rebirth = nil if card.ability.temporary then remove_temp[#remove_temp+1]=card end end end @@ -1124,7 +640,7 @@ function Entropy.ChangePhase() end})) end -function Entropy.LevelSuit(suit, card, amt, chips_override) +function Entropy.level_suit(suit, card, amt, chips_override) amt = amt or 1 local used_consumable = copier or card if not G.GAME.SuitBuffs then G.GAME.SuitBuffs = {} end @@ -1141,8 +657,7 @@ function Entropy.LevelSuit(suit, card, amt, chips_override) G.GAME.SuitBuffs[suit].level = G.GAME.SuitBuffs[suit].level + amt for i, v in ipairs(G.I.CARD) do if v.base and v.base.suit == suit then - v.ability.bonus = (v.ability.bonus or 0) + (chips_override or 10)*amt - v.ability.bonus_from_suit = (v.ability.bonus_from_suit or 0) + (chips_override or 10)*amt + v.ability.suit_bonus = (v.ability.suit_bonus or 0) + (chips_override or 10)*amt end end G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.9, func = function() @@ -1175,66 +690,12 @@ function Entropy.LevelSuit(suit, card, amt, chips_override) ) end -function Entropy.GetRepetitions(card) - local res2 = {} - for i, v in ipairs(G.jokers.cards) do - local res = eval_card(v, {repetition=true, other_card=card,cardarea=card.area,card_effects={{},{}}}) or {} - if res.jokers and res.jokers.repetitions then - res2.repetitions = (res2.repetitions or 0) + res.jokers.repetitions - end - end - return res2 -end -function Entropy.CanSwitchAltPath() +function Entropy.can_switch_alt_path() return G.GAME.round_resets.blind_states[G.GAME.modifiers.cry_no_small_blind and "Big" or "Small"] == "Upcoming" and Cryptid.enabled("set_entr_altpath") == true end -function Entropy.ApproximateLogRecursion(orig, base, iter) - if to_big(iter) < to_big(1000) then - if to_big(orig) < to_big(base) then return orig end - local result = orig - for i = 1, to_number(iter) do - result = to_big(result) * to_big(math.log(to_big(result), to_big(base))) - end - return result - else - local m = iter/math.log(base) - local l1 = math.log(m) - local l2 = math.log(l1) - local E = iter * (l1 + l2 - 1 + ((l2-2)/l1)) - local result = to_big(2.718281846) ^ to_big(E) - return result - end -end - -function Entropy.change_play_limit_no_bs(mod,stroverride) - if SMODS.hand_limit_strings then - G.GAME.starting_params.play_limit = (G.GAME.starting_params.play_limit or 5) + mod - G.hand.config.highlighted_limit = math.max(G.GAME.starting_params.discard_limit or 5, G.GAME.starting_params.play_limit or 5) - local str = stroverride or G.GAME.starting_params.play_limit or "" - SMODS.hand_limit_strings.play = G.GAME.starting_params.play_limit ~= 5 and localize('b_limit') .. str or '' - else - G.hand.config.highlighted_limit = G.hand.config.highlighted_limit + mod - end -end - -function Entropy.change_discard_limit_no_bs(mod,stroverride) - G.GAME.starting_params.discard_limit = (G.GAME.starting_params.discard_limit or 5) + mod - G.hand.config.highlighted_limit = math.max(G.GAME.starting_params.discard_limit or 5, G.GAME.starting_params.play_limit or 5) - local str = stroverride or G.GAME.starting_params.discard_limit or "" - SMODS.hand_limit_strings.discard = G.GAME.starting_params.discard_limit ~= 5 and localize('b_limit') .. str or '' -end - -function Entropy.ChangeFullCSL(mod,stroverride) - if not SMODS.hand_limit_strings then SMODS.hand_limit_strings = {} end - Entropy.change_play_limit_no_bs(mod,stroverride) - if SMODS.hand_limit_strings then - Entropy.change_discard_limit_no_bs(mod,stroverride) - end -end - -function Entropy.GetIota() +function Entropy.get_iota() return {[G.GAME.iotablind.key] = G.GAME.iotablind} end @@ -1247,15 +708,15 @@ local function hash(str) return h end -function Entropy.GetDailyChallenge() - Entropy.UpdateDailySeed() +function Entropy.get_daily_challenge() + Entropy.update_daily_seed() local seed = Entropy.DAILYSEED --https://tools.aimylogic.com/api/now?tz=Europa/England&format=dd/MM/yyyy to:do use this math.randomseed(hash(seed)) - G.CHALLENGES["daily"] = Entropy.SpecialDailies[seed] or Entropy.SpecialDailies[os.date("%m").."/"..os.date("%d")] or Entropy.GenerateDaily() + G.CHALLENGES["daily"] = Entropy.SpecialDailies[seed] or Entropy.SpecialDailies[os.date("%m").."/"..os.date("%d")] or Entropy.generate_daily() end -function Entropy.GenerateDaily() - Entropy.UpdateDailySeed() +function Entropy.generate_daily() + Entropy.update_daily_seed() local seed = Entropy.DAILYSEED math.randomseed(hash(seed)) local allowed_rules = { @@ -1284,26 +745,26 @@ function Entropy.GenerateDaily() table.insert(arules, {id = 'entr_set_seed', value = Entropy.srandom(8, "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890")}) return { consumeables = { - {id = Entropy.GetInPoolDaily("Consumeables")}, - math.random(1, 100) < 40 and {id = Entropy.GetInPoolDaily("Consumeables")} or nil, + {id = Entropy.get_in_pool_daily("Consumeables")}, + math.random(1, 100) < 40 and {id = Entropy.get_in_pool_daily("Consumeables")} or nil, }, vouchers = { math.random(1, 100) < 50 and { - id = Entropy.GetInPoolDaily("Voucher") + id = Entropy.get_in_pool_daily("Voucher") } or nil, math.random(1, 100) < 10 and { - id = Entropy.GetInPoolDaily("Voucher") + id = Entropy.get_in_pool_daily("Voucher") } or nil }, jokers = { math.random(1, 100) < 75 and { - id = Entropy.GetInPoolDaily("Joker") + id = Entropy.get_in_pool_daily("Joker") } or nil, math.random(1, 100) < 25 and { - id = Entropy.GetInPoolDaily("Joker") + id = Entropy.get_in_pool_daily("Joker") } or nil, math.random(1, 100) < 2 and { - id = Entropy.GetInPoolDaily("Joker") + id = Entropy.get_in_pool_daily("Joker") } or nil }, rules = { @@ -1316,7 +777,7 @@ function Entropy.GenerateDaily() deck = { type = "Challenge Deck" }, - restrictions = Entropy.DailyBanlist() + restrictions = Entropy.daily_banlist() -- consumeables = { -- {id = G.P_CENTER_POOLS.Consumeables[math.random(1, #G.P_CENTER_POOLS.Consumeables)].key}, -- {id = G.P_CENTER_POOLS.Consumeables[math.random(1, #G.P_CENTER_POOLS.Consumeables)].key} @@ -1324,14 +785,14 @@ function Entropy.GenerateDaily() } end -function Entropy.GetInPoolDaily(pool) +function Entropy.get_in_pool_daily(pool) local allowed = { entr = true, Cryptid = true } local actual = {} for i, v in pairs(G.P_CENTER_POOLS[pool]) do - if (not v.no_doe and v.set ~= "CBlind" and (not v.original_mod or allowed[v.original_mod.id])) and not Entropy.DailyBanlistContains(v.key) then + if (not v.no_doe and v.set ~= "CBlind" and (not v.original_mod or allowed[v.original_mod.id])) and not Entropy.daily_banlistContains(v.key) then actual[#actual+1] = v end end @@ -1347,7 +808,7 @@ G.FUNCS.start_challenge_run = function(e) G.FUNCS.start_run(e, {stake = 1, challenge = G.CHALLENGES[e.config.id], seed =seed}) end - function Entropy.DailyBanlist() + function Entropy.daily_banlist() return { banned_cards = { {id="c_entr_decrement"}, @@ -1386,8 +847,8 @@ G.FUNCS.start_challenge_run = function(e) } end -function Entropy.DailyBanlistContains(key) - for i, v in pairs(Entropy.DailyBanlist().banned_cards) do +function Entropy.daily_banlistContains(key) + for i, v in pairs(Entropy.daily_banlist().banned_cards) do if v.id == key then return true end end end @@ -1407,31 +868,6 @@ function Card:is_food() if food[self.config.center.key] or Cryptid.safe_get(self.config.center, "pools", "Food") then return true end end -function Entropy.pseudorandom_element(table, seed, blacklist) - local elem = pseudorandom_element(table, seed) - local tries = 0 - while blacklist(elem) and tries < 100 do - elem = pseudorandom_element(table, seed) - tries = tries + 1 - end - return elem -end - - - -function Entropy.no_recurse_scoring(poker_hands) - local text - local scoring_hand - for _, v in ipairs(G.handlist) do - if next(poker_hands[v]) then - text = v - scoring_hand = poker_hands[v][1] - break - end - end - return text -end - function Entropy.get_arrow_color(operator) local colours = { [-1] = HEX("a26161"), @@ -1444,74 +880,6 @@ function Entropy.get_arrow_color(operator) return colours[operator] end -function Entropy.GetPooledCenter(_type, twisted, _rarity, _noparakmi) - local area = area or G.jokers - local center = G.P_CENTERS.b_red - - - --should pool be skipped with a forced key - if not forced_key and soulable and (not G.GAME.banned_keys['c_soul']) then - for _, v in ipairs(SMODS.Consumable.legendaries) do - if (_type == v.type.key or _type == v.soul_set) and not (G.GAME.used_jokers[v.key] and not next(find_joker("Showman")) and not v.can_repeat_soul) and (not v.in_pool or (type(v.in_pool) ~= "function") or v:in_pool({})) then - if pseudorandom('soul_'..v.key.._type..G.GAME.round_resets.ante) > (1 - v.soul_rate) then - if not G.GAME.banned_keys[v.key] then forced_key = v.key end - end - end - end - if (_type == 'Tarot' or _type == 'Spectral' or _type == 'Tarot_Planet') and - not (G.GAME.used_jokers['c_soul'] and not next(find_joker("Showman"))) then - if pseudorandom('soul_'.._type..G.GAME.round_resets.ante) > 0.997 then - forced_key = 'c_soul' - end - end - if (_type == 'Planet' or _type == 'Spectral') and - not (G.GAME.used_jokers['c_black_hole'] and not next(find_joker("Showman"))) then - if pseudorandom('soul_'.._type..G.GAME.round_resets.ante) > 0.997 then - forced_key = 'c_black_hole' - end - end - end - - if _type == 'Base' then - forced_key = 'c_base' - end - G.GAME.entr_parakmi_bypass = _noparakmi - if forced_key and not G.GAME.banned_keys[forced_key] then - center = G.P_CENTERS[forced_key] - _type = (center.set ~= 'Default' and center.set or _type) - else - local _pool, _pool_key = get_current_pool(_type, _rarity, legendary, key_append) - center = pseudorandom_element(_pool, pseudoseed(_pool_key)) - local it = 1 - while center == 'UNAVAILABLE' do - it = it + 1 - center = pseudorandom_element(_pool, pseudoseed(_pool_key..'_resample'..it)) - end - - center = G.P_CENTERS[center] - end - G.GAME.entr_parakmi_bypass = nil - return center -end - -function Entropy.CountStickers() - local total = 0 - for i, v in pairs(SMODS.Sticker.obj_table) do - for i2, v2 in pairs(G.I.CARD) do - if v2.ability and v2.ability[i] then - total = total + 1 - end - end - end - return total -end - -function Entropy.Unhighlight(areas) - for i, v in pairs(areas) do - v:unhighlight_all() - end -end - function Entropy.Get4bit() local key = "" local ptype = pseudorandom_element({ @@ -1523,12 +891,12 @@ function Entropy.Get4bit() if ptype == "Consumeable" then return G.P_CENTERS[Cryptid.random_consumable("4bit_c", nil, "c_fool").key] end - return Entropy.GetPooledCenter(ptype) + return Entropy.get_pooled_center(ptype) end local card_eval_status_text_ref = card_eval_status_text function card_eval_status_text(card, ...) - if card.silent then return end + if not card or card.silent then return end if G.deck and card and card.area == G.butterfly_jokers and G.deck.cards[1] then return card_eval_status_text_ref(G.deck.cards[1], ...) else @@ -1539,7 +907,7 @@ end local sell_cardref = Card.sell_card function Card:sell_card() if self.ability.set == "Joker" then - if Entropy.DeckOrSleeve("butterfly") then + if Entropy.deck_or_sleeve("butterfly") then local bcard = copy_card(self) bcard.states.visible = false G.jokers:remove_card(bcard) @@ -1568,85 +936,6 @@ function Cryptid.get_next_tag(override) if ref then return ref end end -function Entropy.GetInverseSuit(suit) - return ({ - Diamonds = "Hearts", - Hearts = "Diamonds", - Clubs = "Spades", - Spades = "Clubs" - })[suit] or suit -end - -function Entropy.GetInverseRank(rank) - return ({ - ["2"] = "Ace", - ["3"] = "King", - ["4"] = "Queen", - ["5"] = "Jack", - ["6"] = "10", - ["7"] = "9", - ["9"] = "7", - ["10"] = "6", - ["11"] = "5", - ["12"] = "4", - ["13"] = "3", - ["14"] = "2" - --["8"] = 8 duh - })[tostring(rank)] or rank -end - -function Entropy.EvaluateEffects(effects, card) - for i, v2 in pairs(effects) do - for i2, result in pairs(v2) do - SMODS.calculate_individual_effect({[i2] = result}, card, i2, result, false) - end - end -end - -function Entropy.RerollJoker(card, joker) - local jokers = {joker} - local deleted_joker_key = jokers[1].config.center.key - local rarity = jokers[1].config.center.rarity - jokers[1].getting_sliced = true - local legendary = nil - --please someone add a rarity api to steamodded - if rarity == 1 then - rarity = 0 - elseif rarity == 2 then - rarity = 0.9 - elseif rarity == 3 then - rarity = 0.99 - elseif rarity == 4 then - rarity = nil - legendary = true - end -- Deleted check for "cry epic" it was giving rare jokers by setting rarity to 1 - local _first_dissolve = nil - G.E_MANAGER:add_event(Event({ - trigger = "before", - delay = 0.75, - func = function() - jokers[1]:start_dissolve(nil, _first_dissolve) - _first_dissolve = true - return true - end, - })) - G.E_MANAGER:add_event(Event({ - trigger = "after", - delay = 0.4, - func = function() - play_sound("timpani") - local card = create_card("Joker", G.jokers, legendary, rarity, nil, nil, nil, "cry_commit") - card:add_to_deck() - G.jokers:emplace(card) - card:juice_up(0.3, 0.5) - if card.config.center.key == deleted_joker_key then - check_for_unlock({ type = "pr_unlock" }) - end - return true - end, - })) -end - function create_UIBox_HUD_blind_doc() local scale = 0.4 local stake_sprite = get_stake_sprite(G.GAME.stake or 1, 0.5) @@ -1724,6 +1013,7 @@ function Entropy.load_files(files) if not Entropy.contents[result.object_type] then Entropy.contents[result.object_type] = {} end result.cry_order = result.order result.perishable_compat = result.perishable_compat or false + result.blueprint_compat = result.blueprint_compat or false Entropy.contents[result.object_type][#Entropy.contents[result.object_type]+1]=result end end @@ -1746,7 +1036,7 @@ function Entropy.find_runes(key) return runes end -function Entropy.show_flipside() +function Entropy.show_flipside(card) for i, v in pairs((G.pack_cards or {}).cards or {}) do if ({ c_entr_flipside = true, @@ -1757,262 +1047,80 @@ function Entropy.show_flipside() return true end end - return next(SMODS.find_card("c_entr_flipside")) or next(SMODS.find_card("j_entr_void_cradle")) or next(SMODS.find_card("c_entr_dagaz")) or Entropy.has_rune("rune_entr_dagaz") or next(SMODS.find_card("j_entr_shadow_crystal")) -end - -function Entropy.randomise_once(card, types, seed) - local mtype = pseudorandom_element(types or {"Enhancement", "Edition", "Seal", "Base"}, pseudoseed(seed or "ihwaz")) - if mtype == "Edition" then - local edition = SMODS.poll_edition({guaranteed = true, key = "entr_ihwaz"}) - card:set_edition(edition) - card:juice_up() - end - if mtype == "Enhancement" then - local enhancement = SMODS.poll_enhancement({guaranteed = true, key = seed or "entr_ihwaz"}) - card:flip() - card:set_ability(G.P_CENTERS[enhancement]) - card:flip() - end - if mtype == "Seal" then - local seal = SMODS.poll_seal{guaranteed = true, key = seed or "ihwaz"} - card:set_seal(seal) - card:juice_up() - end - if mtype == "Base" then - card:flip() - Entropy.randomize_rank_suit(card, true, true, seed or "ihwaz") - card:flip() - end -end - -function Entropy.randomize_rank_suit(card, rank, suit, seed) - local ranks = {} - local suits = {} - if rank then - for i, v in pairs(SMODS.Ranks) do - if not v.in_pool or v:in_pool({}) then ranks[#ranks+1] = i end - end - end - if suit then - for i, v in pairs(SMODS.Suits) do - if not v.in_pool or v:in_pool({}) then suits[#suits+1] = i end - end + if card.config.center.set == "Joker" and next(SMODS.find_card("j_entr_pluripotent_larvae")) then + return true end - SMODS.change_base(card, pseudorandom_element(suits, pseudoseed(seed)),pseudorandom_element(ranks, pseudoseed(seed)), nil) -end - -function Entropy.is_in_shop(key, consumable) - local center = G.P_CENTERS[key] - if center.hidden or center.no_doe or center.no_collection then - return - elseif G.GAME.banned_keys[key] or not center.unlocked then - return - elseif center.set == "Joker" then - if type(center.rarity) == "number" and center.rarity <= 3 then - return center.unlocked or nil - end - local rare = ({ - "Common", - "Uncommon", - "Rare", - })[center.rarity] or center.rarity - if - SMODS.Rarities[rare] - and ( - SMODS.Rarities[rare].get_weight - or (SMODS.Rarities[rare].default_weight and SMODS.Rarities[rare].default_weight > 0) - ) - then - return center.unlocked or nil - end - return nil - else - if consumable then - if center.set == "Tarot" then - return G.GAME.tarot_rate * (G.GAME.cry_percrate.tarot / 100) > 0 or nil - end - if center.set == "Planet" then - return G.GAME.planet_rate * (G.GAME.cry_percrate.planet / 100) > 0 or nil - end - if center.set == "Spectral" then - return G.GAME.spectral_rate > 0 or nil - end - local num = G.GAME.cry_percrate and G.GAME.cry_percrate[center.set:lower()] or 100 - local val = G.GAME[center.set:lower() .. "_rate"] * ((num or 100) / 100) - return val > 0 - end - end - if center.in_pool then - return center:in_pool({}) - end - return center.unlocked or nil + return next(SMODS.find_card("c_entr_flipside")) or next(SMODS.find_card("j_entr_void_cradle")) or next(SMODS.find_card("c_entr_dagaz")) or Entropy.has_rune("rune_entr_dagaz") or next(SMODS.find_card("j_entr_shadow_crystal")) end function Entropy.misc_calculations(self, context) if not context then return end - if context.repetition and context.cardarea == G.play then + if context.ending_shop and G.GAME.dollars ~= 0 and next(SMODS.find_card("j_entr_crooked_penny")) then + SMODS.calculate_effect({card = SMODS.find_card("j_entr_crooked_penny")[1], dollars = -G.GAME.dollars}, SMODS.find_card("j_entr_crooked_penny")[1]) + end + if context.before then + for i, v in pairs(G.I.CARD) do + if type(v) == "table" and v.ability and v.ability.entr_marked and not v.ability.entr_marked_bypass then + if v.area then + v.area:remove_card(v) + end + local h = v + G.E_MANAGER:add_event(Event{ + func = function() + h:highlight(true) + return true + end + }) + G.play:emplace(v) + end + end + end + if context.repetition and context.other_card then local repetitions = 0 + local c_repetitions = 0 local chains_count = Entropy.has_rune("rune_entr_chains") and Entropy.has_rune("rune_entr_chains").ability.count or 0 - if (SMODS.is_eternal(context.other_card) or context.other_card.ability.eternal) and chains_count > 0 then + if (SMODS.is_eternal(context.other_card) or context.other_card.ability.eternal) and chains_count > 0 and context.cardarea == G.play then repetitions = repetitions + chains_count end - if repetitions > 0 then - return {repetitions = repetitions, message = localize("k_again_ex"), card = context.other_card} + local other_card = context.other_card + local index + for i, v in pairs(other_card.area.cards) do + if v == other_card then index = i; break end + end + if index then + if other_card.area.cards[index+1] and other_card.area.cards[index+1].seal == "entr_crimson" then + c_repetitions = c_repetitions + 1 + end + if other_card.area.cards[index-1] and other_card.area.cards[index-1].seal == "entr_crimson" then + c_repetitions = c_repetitions + 1 + end + end + if repetitions > 0 or c_repetitions > 0 then + if repetitions > 0 then + return {repetitions = repetitions, message = localize("k_again_ex"), card = context.other_card, extra = { + repetitions = c_repetitions, colour = HEX("8a0050"), message = localize("k_again_ex"), message_card = context.other_card + }} + else + return {repetitions = c_repetitions, colour = HEX("8a0050"), message = localize("k_again_ex"), message_card = context.other_card} + end end - end -end - -if not Cryptid.reset_to_none then - function Cryptid.reset_to_none() - update_hand_text({ delay = 0 }, { - mult = 0, - chips = 0, - level = "", - handname = "", - }) end end local reset_ref = Cryptid.reset_to_none function Cryptid.reset_to_none() - reset_ref() + if reset_ref then + reset_ref() + else + update_hand_text({delay = 0}, {mult = 0, chips = 0, handname = '', level = ''}) + end update_hand_text({ delay = 0.1 }, { level = "", }) end -function Entropy.true_suitless(card) - if SMODS.has_no_suit(card) or card.config.center.key == "m_stone" - or card.config.center.overrides_base_rank - or card.base.suit == "entr_nilsuit" - or card.base.value == "entr_nilrank" then return true end -end - -function Entropy.played_hands(threshold) - local total = 0 - for i, v in pairs(G.GAME.hands or {}) do - if to_big(v.played) > to_big(threshold) then - total = total + 1 - end - end - return total -end - -function Entropy.calculate_ratios(incl_vanilla, only_vanilla) - local total = 0 - local rarities = {} - for i, v in pairs(G.P_CENTER_POOLS.Joker) do - if (not only_vanilla and v.original_mod and v.original_mod.id == "entr") or (incl_vanilla and not v.original_mod) then - if not v.no_collection then - total = total + 1 - if not rarities[v.rarity] then rarities[v.rarity] = 0 end - rarities[v.rarity] = rarities[v.rarity] + 1 - end - end - end - for i, v in pairs(rarities) do - print(i.." = "..v.. " = "..(v/total * 100).."%") - end - print("total: "..total) -end - -function Entropy.return_to_deck() - return Entropy.BlindIs("bl_entr_cassandra") or Entropy.BlindIs("bl_entr_pi") -end - -function Entropy.get_bg_colour() - if TDECKS then - local ret = TDECKS.get_bg_colour() - if ret then return ret end - end - return G.GAME.entr_alt and G.C.ALTBG or G.C.BLIND['Small'] -end - -function Entropy.allow_spawning(center) - for i, v in pairs(G.I.CARD) do - if v.config and v.config.center and center and v.config.center.key == center.key then return SMODS.showman(center.key) or nil end - end - return true -end - function Entropy.get_reroll_height() - return Entropy.CanSwitchAltPath() and 1 or 1.6 -end - -function Entropy.can_be_pulled(card) - local center = card.ability.glitched_crown and G.P_CENTERS[card.ability.glitched_crown[card.glitched_index]] or card.config.center - if not card:selectable_from_pack(SMODS.OPENED_BOOSTER) and next(SMODS.find_card("j_entr_oekrep")) and card.ability.consumeable then - return not center.hidden and not center.no_select - end - return not center.no_select and (SMODS.ConsumableTypes[center.set] and SMODS.ConsumableTypes[center.set].can_be_pulled or center.can_be_pulled) and not center.hidden -end - -function Entropy.needs_pull_button(card) - local center = card.config.center - if not card:selectable_from_pack(SMODS.OPENED_BOOSTER) and next(SMODS.find_card("j_entr_oekrep")) and card.ability.consumeable then - return not center.hidden and not center.no_select and localize("b_select") - end - if not center.no_select and (SMODS.ConsumableTypes[center.set] and SMODS.ConsumableTypes[center.set].can_be_pulled or center.can_be_pulled) and not center.hidden then - local loc = SMODS.ConsumableTypes[center.set] and SMODS.ConsumableTypes[center.set].can_be_pulled or center.can_be_pulled - return localize(type(loc) == "string" and loc or "b_select") - end - for i, v in pairs(card.ability.glitched_crown or {}) do - local center = G.P_CENTERS[v] - if center and not center.no_select and (SMODS.ConsumableTypes[center.set] and SMODS.ConsumableTypes[center.set].can_be_pulled or center.can_be_pulled) and not center.hidden then - local loc = SMODS.ConsumableTypes[center.set] and SMODS.ConsumableTypes[center.set].can_be_pulled or center.can_be_pulled - return localize(type(loc) == "string" and loc or "b_select") - end - end -end - -function Entropy.needs_use_button(card) - local center = card.config.center - local center_cant_use = false - if not (center.no_use_button or (SMODS.ConsumableTypes[center.set] and SMODS.ConsumableTypes[center.set].no_use_button)) then - center_cant_use = true - end - for i, v in pairs(card.ability.glitched_crown or {}) do - local center = G.P_CENTERS[v] - if not (center.no_use_button or (SMODS.ConsumableTypes[center.set] and SMODS.ConsumableTypes[center.set].no_use_button)) then - center_cant_use = true - end - end - return center_cant_use -end - -function ReductionIndex(card, pool) - index = 0 - for i, v in pairs(G.P_CENTER_POOLS[pool]) do - if card.config and v.key == card.config.center_key then - return i - end - i = i + 1 - end -end - ---these currently only return a single value, but exist in case other effects get added that would need to be returned here -function Card:get_entr_plus_asc() - return self.ability.entr_perma_plus_asc -end - -function Card:get_entr_h_plus_asc() - return self.ability.entr_perma_h_plus_asc -end - -function Card:get_entr_asc() - return self.ability.entr_perma_asc + 1 -end - -function Card:get_entr_h_asc() - return self.ability.entr_perma_h_asc + 1 -end - -function Card:get_entr_exp_asc() - return self.ability.entr_perma_exp_asc + 1 -end - -function Card:get_entr_h_exp_asc() - return self.ability.entr_perma_h_exp_asc + 1 + return Entropy.can_switch_alt_path() and 1 or 1.6 end function Entropy.rubber_ball_scoring(cards) @@ -2047,6 +1155,24 @@ function Entropy.rubber_ball_scoring(cards) new_cards[#new_cards+1] = v end end + for i, v in pairs(SMODS.find_card("j_entr_planetarium")) do + if v.ability.extra.hand == "Flush Five" and not v.ability.extra.inactive then + local _card = copy_card(new_cards[1]) + if _card then + G.playing_card = (G.playing_card and G.playing_card + 1) or 1 + v.ability.extra.inactive = true + _card:add_to_deck() + G.play:emplace(_card) + _card.states.visible = nil + _card:start_materialize() + G.deck.config.card_limit = G.deck.config.card_limit + 1 + table.insert(G.playing_cards, _card) + new_cards[#new_cards+1] = _card + end + end + end + for i, v in pairs(G.play.cards) do if v.config.center.key == "j_entr_phoenix_a" and not v.debuff then new_cards[#new_cards+1] = v end end + for i, v in pairs(G.jokers.cards) do if v.config.center.key == "j_entr_phoenix_a" and not v.debuff then new_cards[#new_cards+1] = v end end return new_cards end @@ -2060,13 +1186,23 @@ function Entropy.post_create_card(card, from_booster, forced_key) if G.SETTINGS.paused then return end local set = card.config.center.set local key = card.config.center.key - - if card.config and card.config.center and Entropy.FlipsideInversions and not Entropy.is_inverted(center) - and pseudorandom("marked") < 0.10 and G.GAME.Marked and G.STATE == G.STATES.SHOP and (not card.area or not card.area.config.collection) and Entropy.Inversion(center) then - local c = G.P_CENTERS[Entropy.Inversion(center)] - card:set_ability(c) - key = c.key - set = c.set + if not Entropy.is_inverted(card.config.center) and set ~= "Joker" + and pseudorandom("marked") < 0.10 and G.GAME.Marked and G.STATE == G.STATES.SHOP and (not card.area or not card.area.config.collection) and Entropy.inversion(card) then + if card.config.center_key ~= "c_entr_flipside" then + local ret = {} + if card.config.center.calculate then + ret = card.config.center:calculate(card, {being_inverted = true}) or {} + end + if not ret.prevent_inversion then + local c = G.P_CENTERS[Entropy.inversion(card)] + card:set_ability(c) + key = c.key + set = c.set + end + if next(ret) and (not card.area or card.area.config.type ~= "shop") then + SMODS.calculate_effect(ret, card) + end + end elseif card.config and card.config.center and pseudorandom("trump_card") < 0.10 and G.GAME.TrumpCard and G.STATE == G.STATES.SMODS_BOOSTER_OPENED and TrumpCardAllow[set] and (not card.area or not card.area.config.collection) then @@ -2080,38 +1216,60 @@ function Entropy.post_create_card(card, from_booster, forced_key) key = "p_entr_twisted_pack_"..type set = "Booster" - elseif card.config and card.config.center and card.config.center.set == "Booster" and Entropy.DeckOrSleeve("doc") + elseif card.config and card.config.center and card.config.center.set == "Booster" and Entropy.deck_or_sleeve("doc") and to_big(pseudorandom("doc")) < to_big(1-(0.995^(G.GAME.entropy/2))) and G.STATE == G.STATES.SHOP and (not card.area or not card.area.config.collection) then local type = (G.P_CENTERS[key].cost == 6 and "jumbo_1") or (G.P_CENTERS[key].cost == 8 and "mega_1") or "normal_"..pseudorandom_element({1,2},pseudoseed("doc")) card:set_ability(G.P_CENTERS["p_spectral_"..type]) key = "p_spectral_"..type set = "Booster" end - if Entropy.Inversion(G.P_CENTERS[key]) and not G.SETTINGS.paused and (G.GAME.modifiers.entr_twisted or set == "Planet" and G.GAME.entr_princess) and not card.multiuse and (not card.ability or not card.ability.fromflipside) then - if (Entropy.allow_spawning(G.P_CENTERS[key]) and Entropy.allow_spawning(G.P_CENTERS[Entropy.Inversion(G.P_CENTERS[key])])) or forced_key or card.config.center.hidden then - local c = G.P_CENTERS[Entropy.Inversion(G.P_CENTERS[key])] - key = c.key - card:set_ability(c) - set = c.set - - else - local c = Entropy.GetPooledCenter(G.P_CENTERS[Entropy.Inversion(G.P_CENTERS[key])].set) - key = c.key - card:set_ability(c) - set = c.set + if Entropy.inversion(card) and not G.SETTINGS.paused and (G.GAME.modifiers.entr_twisted or set == "Planet" and G.GAME.entr_princess) and not card.multiuse and (not card.ability or not card.ability.fromflipside) and card.config.center.rarity ~= "entr_void" then + if card.config.center_key ~= "c_entr_flipside" then + local ret = {} + if card.config.center.calculate then + ret = card.config.center:calculate(card, {being_inverted = true}) or {} + end + if not ret.prevent_inversion then + if (Entropy.allow_spawning(G.P_CENTERS[key]) and Entropy.allow_spawning(G.P_CENTERS[Entropy.inversion(card)])) or forced_key or card.config.center.hidden then + local c = G.P_CENTERS[Entropy.inversion(card)] + key = c.key + card:set_ability(c) + set = c.set + + else + local c = Entropy.get_pooled_center(G.P_CENTERS[Entropy.inversion(card)].set) + key = c.key + card:set_ability(c) + set = c.set + end + end + if next(ret) and (not card.area or card.area.config.type ~= "shop") then + SMODS.calculate_effect(ret, card) + end end end - if Entropy.Inversion(G.P_CENTERS[key]) and not G.SETTINGS.paused and G.GAME.entr_perma_inversions and G.GAME.entr_perma_inversions[key] and not card.multiuse and (not card.ability or not card.ability.fromflipside) then - local c = G.P_CENTERS[Entropy.Inversion(G.P_CENTERS[key])] - key = c.key - card:set_ability(c) - set = c.set + if Entropy.inversion(card) and not G.SETTINGS.paused and G.GAME.entr_perma_inversions and G.GAME.entr_perma_inversions[key] and not card.multiuse and (not card.ability or not card.ability.fromflipside) then + if card.config.center_key ~= "c_entr_flipside" then + local ret = {} + if card.config.center.calculate then + ret = card.config.center:calculate(card, {being_inverted = true}) or {} + end + if not ret.prevent_inversion then + local c = G.P_CENTERS[Entropy.inversion(card)] + key = c.key + card:set_ability(c) + set = c.set + end + if next(ret) and (not card.area or card.area.config.type ~= "shop") then + SMODS.calculate_effect(ret, card) + end + end end set = G.P_CENTERS[key] and G.P_CENTERS[key].set or set if G.GAME.modifiers.glitched_items and not (set == "Default" or set == "Enhanced") then local gc = {key} for i = 1, G.GAME.modifiers.glitched_items - 1 do - gc[#gc+1] = Entropy.GetPooledCenter(set).key + gc[#gc+1] = Entropy.get_pooled_center(set).key end if from_booster then G.E_MANAGER:add_event(Event({trigger = 'after', blockable = false, blocking = false, func = function() @@ -2122,6 +1280,17 @@ function Entropy.post_create_card(card, from_booster, forced_key) card.ability.glitched_crown = gc end end + if G.GAME.entropy and G.GAME.entropy > 100 then + G.E_MANAGER:add_event(Event{ + func = function() + if card.config.center.key == "c_entr_fervour" then + local eval = function() return true end + juice_card_until(card, eval, true) + end + return true + end + }) + end end @@ -2132,8 +1301,8 @@ function SMODS.get_next_vouchers() if (next(find_joker("j_entr_chaos")) or next(find_joker("j_entr_parakmi")) or G.GAME.modifiers.entr_parakmi) then vouchers.spawn = {} for i, v in ipairs(vouchers) do - local set = Entropy.GetRandomSet(next(find_joker("j_entr_parakmi")) or G.GAME.modifiers.entr_parakmi) - local key = Entropy.GetPooledCenter(set).key + local set = Entropy.get_random_set(next(find_joker("j_entr_parakmi")) or G.GAME.modifiers.entr_parakmi) + local key = Entropy.get_pooled_center(set).key vouchers.spawn[key] = true vouchers[i] = key end @@ -2142,118 +1311,6 @@ function SMODS.get_next_vouchers() return vouchers end -function Entropy.handle_card_limit(area, num) - area.config.card_limit = area.config.card_limit + num - area:handle_card_limit() -end - -local upgrade_hands_ref = SMODS.upgrade_poker_hands -function SMODS.upgrade_poker_hands(args) - if type(args.hands) == "string" then args.hands = {args.hands} end - if not args.hands then args.hands = {} end - if next(SMODS.find_card("j_entr_strawberry_pie")) then - for i, v in pairs(SMODS.find_card("j_entr_strawberry_pie")) do - for index, hand in pairs(args.hands) do - if args.hands[index] == "Full House" or args.hands[index] == "Straight" or args.hands[index] == "Flush" then - args.hands[index] = "High Card" - end - end - end - end - if args.ascension_power then - local card = args.from - for i, v in pairs(args.hands) do - local amt = args.ascension_power - local handname = v - local used_consumable = card - local c - local m - if not args.instant then - c = copy_table(G.C.UI_CHIPS) - m = copy_table(G.C.UI_MULT) - 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 = "..." } - ) - end - G.GAME.hands[handname].AscensionPower = to_big((G.GAME.hands[handname].AscensionPower or 0)) + to_big(amt) - if not args.instant then - 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, HEX("ffb400"), 0.1) - ease_colour(G.C.UI_MULT, HEX("ffb400"), 0.1) - Cryptid.pulse_flame(0.01, sunlevel) - if used_consumable and used_consumable.juice_up then used_consumable:juice_up(0.8, 0.5) end - G.E_MANAGER:add_event(Event({ - trigger = "after", - blockable = false, - blocking = false, - delay = 1.2, - func = function() - ease_colour(G.C.UI_CHIPS, c, 1) - ease_colour(G.C.UI_MULT, m, 1) - return true - end, - })) - return true - end, - })) - end - if not args.instant then - update_hand_text({ sound = "button", volume = 0.7, pitch = 0.9, delay = 0 }, { level = (to_big(amt) > to_big(0) and "+" or "")..number_format(to_big(amt) ) }) - delay(1.6) - end - if card and card.edition and to_big(amt or 1) > to_big(0) and not noengulf and Engulf then - if Engulf.SpecialFuncs[card.config.center.key] then - else Engulf.EditionHand(card, handname, card.edition, amt, instant) end - end - if not args.instant then - delay(1.6) - update_hand_text( - { sound = "button", volume = 0.7, pitch = 1.1, delay = 0 }, - { mult = 0, chips = 0, handname = "", level = "" } - ) - delay(1) - end - G.hand:parse_highlighted() - G.GAME.current_round.current_hand.cry_asc_num = 0 - G.GAME.current_round.current_hand.cry_asc_num_text = "" - end - return - end - if args.per_level then - local mult = args.per_level.mult - local chips = args.per_level.chips - if mult or chips then - for i, v in pairs(args.hands) do - Entropy.l_chipsmult(v, args.from, chips, mult, args.instant) - end - end - return - end - if args.x_per_level then - local mult = args.x_per_level.mult - local chips = args.x_per_level.chips - if mult then - for i, v in pairs(args.hands) do - Entropy.xl_mult(v, args.from, mult, args.instant) - end - end - if chips then - for i, v in pairs(args.hands) do - Entropy.xl_chips(v, args.from, chips, args.instant) - end - end - return - end - return upgrade_hands_ref(args) -end - --Taken from Aikoyori's Shenanigans Entropy.card_area_preview = function(cardArea, desc_nodes, config) if not config then config = {} end @@ -2360,7 +1417,250 @@ function SMODS.add_voucher_to_shop(key, ...) return card end -function Entropy.should_skip_animations(strict) - if Talisman and Talisman.config_file.disable_anims then return true end - if Handy and Handy.animation_skip.get_value() >= (strict and 4 or 3) then return true end +local asc_col_ref = Spectrallib.get_asc_colour +function Spectrallib.get_asc_colour(amount, text) + if(G.GAME.Overflow or (G.GAME.badarg and G.GAME.badarg[text])) then return HEX("FF0000") end + return to_big(amount) >= to_big(0) and asc_col_ref(amount, text) or G.C.Entropy.DARK_GRAY +end + +local STP = loadStackTracePlus() +local utf8 = require("utf8") +function Entropy.fake_crash(msg) + msg = tostring(msg) + + --sendErrorMessage("Oops! The game crashed\n" .. STP.stacktrace(msg), 'StackTrace') + + if not love.window or not love.graphics or not love.event then + return + end + + + Entropy.crash_volume = Entropy.crash_volume or G.SETTINGS.SOUND.volume + G.SETTINGS.SOUND.volume = 0 + + love.graphics.reset() + local font = love.graphics.setNewFont("resources/fonts/m6x11plus.ttf", 20) + + local background = {0, 0, 1} + if G and G.C and G.C.BLACK then + background = G.C.BLACK + end + love.graphics.clear(background) + love.graphics.origin() + + local trace = STP.stacktrace("", 3) + + local sanitizedmsg = {} + for char in msg:gmatch(utf8.charpattern) do + table.insert(sanitizedmsg, char) + end + sanitizedmsg = table.concat(sanitizedmsg) + + local err = {} + + table.insert(err, "Oops! The game crashed:") + if sanitizedmsg:find("Syntax error: game.lua:4: '=' expected near 'Game'") then + table.insert(err, + 'Duplicate installation of Steamodded detected! Please clean your installation: Steam Library > Balatro > Properties > Installed Files > Verify integrity of game files.') + elseif sanitizedmsg:find("Syntax error: game.lua:%d+: duplicate label 'continue'") then + table.insert(err, + 'Duplicate installation of Steamodded detected! Please remove the duplicate steamodded/smods folder in your mods folder.') + else + table.insert(err, sanitizedmsg) + end + if #sanitizedmsg ~= #msg then + table.insert(err, "Invalid UTF-8 string in error message.") + end + + if V and SMODS and SMODS.save_game and V(SMODS.save_game or '0.0.0') ~= V(SMODS.version or '0.0.0') then + table.insert(err, 'This crash may be caused by continuing a run that was started on a previous version of Steamodded. Try creating a new run.') + end + + if V and V(MODDED_VERSION or '0.0.0') ~= V(RELEASE_VERSION or '0.0.0') then + table.insert(err, '\n\nDevelopment version of Steamodded detected! If you are not actively developing a mod, please try using the latest release instead.\n\n') + end + + if not V then + table.insert(err, '\nA mod you have installed has caused a syntax error through patching. Please share this crash with the mod developer.\n') + end + + local success, msg = pcall(getDebugInfoForCrash) + if success and msg then + table.insert(err, '\n' .. msg) + else + table.insert(err, "\n" .. "Failed to get additional context :/") + end + + for l in trace:gmatch("(.-)\n") do + table.insert(err, l) + end + + local p = table.concat(err, "\n") + + p = p:gsub("\t", "") + p = p:gsub("%[string \"(.-)\"%]", "%1") + + local scrollOffset = 0 + local endHeight = 0 + + local pos = 70 + local arrowSize = 20 + + local function calcEndHeight() + local font = love.graphics.getFont() + local rw, lines = font:getWrap(p, love.graphics.getWidth() - pos * 2) + local lineHeight = font:getHeight() + local atBottom = scrollOffset == endHeight and scrollOffset ~= 0 + endHeight = #lines * lineHeight - love.graphics.getHeight() + pos * 2 + if (endHeight < 0) then + endHeight = 0 + end + if scrollOffset > endHeight or atBottom then + scrollOffset = endHeight + end + end + + p = p .. "\n\nPress ESC to exit\nPress R to restart the game" + if love.system then + p = p .. "\nPress Ctrl+C or tap to copy this error" + end + + if not love.graphics.isActive() then + return + end + love.graphics.clear(background) + calcEndHeight() + love.graphics.printf(p, pos, pos - scrollOffset, love.graphics.getWidth() - pos * 2) + if scrollOffset ~= endHeight then + love.graphics.polygon("fill", love.graphics.getWidth() - (pos / 2), + love.graphics.getHeight() - arrowSize, love.graphics.getWidth() - (pos / 2) + arrowSize, + love.graphics.getHeight() - (arrowSize * 2), love.graphics.getWidth() - (pos / 2) - arrowSize, + love.graphics.getHeight() - (arrowSize * 2)) + end + if scrollOffset ~= 0 then + love.graphics.polygon("fill", love.graphics.getWidth() - (pos / 2), arrowSize, + love.graphics.getWidth() - (pos / 2) + arrowSize, arrowSize * 2, + love.graphics.getWidth() - (pos / 2) - arrowSize, arrowSize * 2) + end + love.graphics.present() +end + +local draw_ref = love.draw +function love.draw(...) + draw_ref(...) + if Entropy.do_fake_crash then + Entropy.fake_crash(Entropy.do_fake_crash) + elseif Entropy.crash_volume then + G.SETTINGS.SOUND.volume = Entropy.crash_volume + Entropy.crash_volume = nil + end +end + +function Entropy.add_perma_bonus(card, key, amount) + local keys = ({ + xlog_chips = "slib_perma_xlog_chips", + asc = "slib_perma_plus_asc", + asc_mod = "slib_perma_plus_asc", + plus_asc = "slib_perma_plus_asc", + plusasc_mod = "slib_perma_plus_asc", + exp_asc = "slib_perma_exp_asc", + exp_asc_mod = "slib_perma_exp_asc", + x_asc = "slib_perma_x_asc", + mult = "mult", + h_mult = "mult", + mult_mod = "mult", + x_mult = "x_mult", + Xmult = "x_mult", + xmult = "x_mult", + x_mult_mod = "x_mult", + Xmult_mod = "x_mult", + chips = "bonus", + h_chips = "bonus", + chip_mod = "bonus", + x_chips = "x_chips", + xchips = "x_chips", + Xchip_mod = "x_chips", + }) + key = keys[key] or key + if key == "x_chips" or key == "x_mult" or key == "slib_perma_x_asc" then + amount = amount - 1 + end + if card.ability["perma_"..key] or card.ability[key] then + local r = not card.ability["perma_"..key] and key or "perma_"..key + card.ability[r] = card.ability[r] + amount + return true + end +end + +function Entropy.calc_perma_bonus_joker(card) + local ret = {} + local chips = card:get_chip_bonus() + if chips ~= 0 then + ret.chips = chips + end + + local mult = card:get_chip_mult() + if mult ~= 0 then + ret.mult = mult + end + + local x_mult = SMODS.multiplicative_stacking(card.ability.x_mult or 1, (not card.ability.extra_enhancement and card.ability.perma_x_mult) or 0) + if x_mult > 0 then + ret.x_mult = x_mult + end + + local p_dollars = card:get_p_dollars() + if p_dollars ~= 0 then + ret.p_dollars = p_dollars + end + + local x_chips = card:get_chip_x_bonus() + if x_chips > 0 then + ret.x_chips = x_chips + end + + local xlog_chips = card:get_slib_xlog_chips() + if xlog_chips ~= 0 then + ret.xlog_chips = xlog_chips + end + local entr_plus_asc = card:get_slib_plus_asc() + if entr_plus_asc ~= 0 then + ret.plus_asc = entr_plus_asc + end + local entr_asc = card:get_slib_x_asc() + if entr_asc ~= 1 and entr_asc > 0 then + ret.x_asc = entr_asc + end + local entr_exp_asc = card:get_slib_exp_asc() + if entr_exp_asc ~= 1 then + ret.exp_asc = entr_exp_asc + end + return ret +end + +function Entropy.get_perma_bonus_vars(self) + return { playing_card = not not self.base.colour, value = self.base.value, suit = self.base.suit, colour = self.base.colour, + nominal_chips = to_big(self.ability.perma_bonus) > to_big(0) and self.ability.perma_bonus or nil, + bonus_x_chips = self.ability.perma_x_chips ~= 0 and (self.ability.perma_x_chips + 1) or nil, + slib_perma_xlog_chips = self.ability.slib_perma_xlog_chips ~= 0 and self.ability.slib_perma_xlog_chips or nil, + slib_perma_h_xlog_chips = self.ability.slib_perma_h_xlog_chips ~= 0 and self.ability.slib_perma_h_xlog_chips or nil, + slib_perma_plus_asc = self.ability.slib_perma_plus_asc ~= 0 and self.ability.slib_perma_plus_asc or nil, + slib_perma_h_plus_asc = self.ability.slib_perma_h_plus_asc ~= 0 and self.ability.slib_perma_h_plus_asc or nil, + slib_perma_x_asc = self.ability.slib_perma_x_asc ~= 0 and (self.ability.slib_perma_x_asc + 1) or nil, + slib_perma_h_x_asc = self.ability.slib_perma_h_x_asc ~= 0 and (self.ability.slib_perma_h_x_asc + 1) or nil, + slib_perma_exp_asc = self.ability.slib_perma_exp_asc ~= 0 and (self.ability.slib_perma_exp_asc + 1) or nil, + slib_perma_h_exp_asc = self.ability.slib_perma_h_exp_asc ~= 0 and (self.ability.slib_perma_h_exp_asc + 1) or nil, + suit_level = G.GAME.SuitBuffs and G.GAME.SuitBuffs[self.base.suit] and G.GAME.SuitBuffs[self.base.suit].level or nil, + bonus_mult = self.ability.perma_mult ~= 0 and self.ability.perma_mult or nil, + bonus_x_mult = self.ability.perma_x_mult ~= 0 and (self.ability.perma_x_mult + 1) or nil, + bonus_h_chips = self.ability.perma_h_chips ~= 0 and self.ability.perma_h_chips or nil, + bonus_h_x_chips = self.ability.perma_h_x_chips ~= 0 and (self.ability.perma_h_x_chips + 1) or nil, + bonus_h_mult = self.ability.perma_h_mult ~= 0 and self.ability.perma_h_mult or nil, + bonus_h_x_mult = self.ability.perma_h_x_mult ~= 0 and (self.ability.perma_h_x_mult + 1) or nil, + bonus_p_dollars = self.ability.perma_p_dollars ~= 0 and self.ability.perma_p_dollars or nil, + bonus_h_dollars = self.ability.perma_h_dollars ~= 0 and self.ability.perma_h_dollars or nil, + total_h_dollars = total_h_dollars ~= 0 and total_h_dollars or nil, + bonus_chips = bonus_chips ~= 0 and bonus_chips or nil, + bonus_repetitions = self.ability.perma_repetitions ~= 0 and self.ability.perma_repetitions or nil, + } end \ No newline at end of file diff --git a/localization/en-us.lua b/localization/en-us.lua index 0269880b..dd20891c 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -18,8 +18,8 @@ local decs = { m_entr_prismatic = { name = "Prismatic Card", text = { - "{X:dark_edition,C:white}^#1#{} Mult", - "increase by {X:dark_edition,C:white}^#2#{}", + "{X:slib_emult,C:white}^#1#{} Mult", + "increase by {X:slib_emult,C:white}^#2#{}", "when card is scored." } }, @@ -34,10 +34,10 @@ local decs = { m_entr_ceramic = { name = "Ceramic Card", text = { - "Has its own {C:attention}Rank{}, and", - "counts as every {C:attention}Suit{}", - "When scored {C:red}destroy{} this card", - "When destroyed create a {C:attention}random{} consumable" + "Has its own {C:attention}rank{} and", + "counts as every {C:attention}suit{}", + "When scored, {C:red}destroy{} this card", + "When destroyed, create a {C:attention}random{} consumable" } }, m_entr_radiant = { @@ -59,10 +59,93 @@ local decs = { m_entr_samsara = { name = "Samsara Card", text = { - "{C:red}Self Destructs{} when modified", + "{C:red}Self destructs{} when modified", "Create a {C:attention}copy{} of this card", "with {X:blue,C:white}+X#2#{} Chips when destroyed", - "{C:inactive}(Currently: {X:blue,C:white}X#1#{C:inactive})" + "{C:inactive}(Currently {X:blue,C:white}X#1#{C:inactive})" + } + }, + + --BLINDSIDE + m_entr_scarlet_sun = { + name = "Scarlet Sun", + text = { + "{X:red,C:white}Red{}", + "While held in hand,", + "gives {C:gold}+#1#{} Ascension Power", + "for each {C:attention}played{} Blind" + } + }, + m_entr_burgundy_baracuda = { + name = "Burgundy Barracuda", + text = { + { + "{X:red,C:white}Red{}", + "{X:mult,C:white}X#1#{} Mult", + }, + { + "Retriggers {C:attention}#2#{} times", + "Resets when played" + }, + { + "While held in hand", + "{C:attention}Burn{} all Blinds in", + "scoring hand and gain {C:attention}#3#{}", + "Retriggers for each", + "played Blind" + } + } + }, + m_entr_diamond_dawn = { + name = "Diamond Dawn", + text = { + { + "{X:chips,C:white}Blue{}", + "Retriggers adjacent ", + "scoring Blinds {C:attention}#1#{} times" + }, + { + "Copies the {C:attention}Hue{} of", + "adjacent Blinds" + }, + } + }, + m_entr_olive_orchard = { + name = "Olive Orchard", + text = { + "{X:green,C:white}Green{}", + "When this Blind is {C:attention}discarded{}", + "all Blinds held in hand gain", + "{X:mult,C:white}X#1#{} Mult" + } + }, + m_entr_citrine_comet = { + name = "Citrine Comet", + text = { + "{X:gold,C:white}Yellow{}", + "Gains {C:gold}#2#{} Ascension Power", + "when another Blind {C:attention}Burns{}", + "{C:inactive}(Currently {C:gold}#1#{C:inactive} Ascension Power){}" + } + }, + m_entr_alabaster_anchor = { + name = "Alabaster Anchor", + text = { + "{X:dark_edition,C:white}Faded{}", + "{C:dark_edition}Forcibly{} Upgrades", + "rightmost Blind if part of", + "scored hand", + "{C:inactive}(If possible)" + } + }, + m_entr_alabaster_anchor_two = { + name = "Alabaster Anchor", + text = { + "{X:dark_edition,C:white}Faded{}", + "{C:dark_edition}Forcibly{} Upgrades", + "rightmost Blind twice if part", + "of scored hand", + "{C:inactive}(If possible)" } }, }, @@ -144,7 +227,7 @@ local decs = { name = "Dice Jokers", text = { "{C:attention}Jokers{} that modify", - "probabilities based on dices", + "probabilities based on dice", "added by Entropy" }, }, @@ -169,7 +252,7 @@ local decs = { j_entr_compositor = { name = "Compositor", text = { - "When {C:attention}Blind{} is selected","print a random {C:attention}Twisted Card{}" + "When {C:attention}Blind{} is selected","print a random {C:attention}Inverted card{}" } }, @@ -212,17 +295,34 @@ local decs = { j_entr_epitachyno = { name = "Epitachyno", text = { - "{X:dark_edition,C:white}^#1#{} to all other Joker values", - "at the end of the {C:attention}shop{}", - "then increase {C:attention}exponent{} by {X:dark_edition,C:white}#2#{}" + { + "This Joker transforms into a", + "random {C:legendary,E:1}hidden{} consumable when", + "a {C:attention}Blind{} is selected" + }, + { + "Use this Joker to use", + "the {C:attention}current{} consumable", + }, + { + "This Joker gains {C:attention}#2#{} use#2#", + "when defeating a Boss Blind", + "{C:inactive}(Currently {C:attention}#1#{C:inactive} use#1#)" + } } }, j_entr_helios= { name = "Helios", text = { - "{X:dark_edition,C:white}Infinite{} {C:attention}card selection limit{}", - "Ascension formula is now {X:dark_edition,C:white}^(#1#X#2#n){}", - "{C:attention}All cards{} contribute to {C:Attention}Ascension power{}" + { + "When a card is scored {C:attention}all{}", + "cards held in hand with the", + "same {C:attention}rank{} become {C:attention}Marked{}" + }, + { + "All played cards provide", + "{C:gold}+#1#{} Ascension Power", + } } }, j_entr_xekanos = { @@ -239,19 +339,16 @@ local decs = { j_entr_ieros = { name = "Ieros", text = { - "{X:dark_edition,C:white}33%{} chance to upgrade", - "Joker {C:attention}rarities{} in the shop recursively", - "Gain {X:dark_edition,C:white}^Chips{} when buying a Joker", - "based on the Joker's {C:attention}rarity{}", - "{C:inactive}(Currently: {}{X:dark_edition,C:white}^#1#{}{C:inactive}){}", + "Jokers in the shop", + "have {C:entr_entropic}upgraded {C:attention}rarities", } }, j_entr_dekatria = { name = "Dekatria", text = { - "This Joker gives {X:dark_edition,C:white}^#1#{} mult", - "for every {C:attention}Pair{} in played hand", - "All cards are {C:dark_edition}Jolly{}", + "When another {C:attention}Joker{} triggers,", + "use the {C:planet}Planet{} or {C:purple}Star{}", + "card for the played {C:purple}poker hand{}" } }, j_entr_oekrep = { @@ -266,8 +363,8 @@ local decs = { j_entr_kciroy = { name = "Kciroy", text = { - "{C:dark_edition}+#1#{} Hand size, {C:dark_edition}+#2#{} card selection limit", - "This joker gains {X:dark_edition,C:white}^#3#{} Chips every", + "{C:dark_edition}+#1#{} hand size, {C:dark_edition}+#2#{} card selection limit", + "This Joker gains {X:dark_edition,C:white}^#3#{} Chips every", "{C:attention}#4#{} {C:inactive}[#5#]{} cards discarded", "{C:inactive}(Currently{} {X:dark_edition,C:white}^#6#{} {C:inactive}Chips){}" } @@ -277,14 +374,14 @@ local decs = { text = { "Fixed {C:green}50%{} chance to not", "progress when beating a Blind", - "and obtain the Blinds {C:attention}Skip Tag{}", + "and obtain the Blind's {C:attention}skip Tag{}", } }, j_entr_teluobirt = { name = "Teluobirt", text = { "Scored {C:attention}Jacks{} give {X:chips,C:white}XChips{}", - "equal to the {C:attention}number{} of played Jacks in the hand", + "equal to the {C:attention}number{} of played Jacks", "Retrigger {C:attention}scored{} Jacks based on their", "order in the played hand" } @@ -292,11 +389,11 @@ local decs = { j_entr_oinac = { name = "Oinac", text = { - "This Joker gains {X:dark_edition,C:white}^#1#{} Chips", + "This Joker gains {X:slib_echips,C:white}^#1#{} Chips", "when a {C:attention}face{} card is destroyed by this Joker", - "{C:attention}Played{} playing cards are destroyed", + "{C:attention}Played{} cards are destroyed", "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){}" + "{C:inactive}(Currently {}{X:slib_echips,C:white}^#2#{} {C:inactive}Chips){}" } }, j_entr_entropy_card = { @@ -304,8 +401,8 @@ local decs = { text = { "{X:gold,C:white}X#1#{} Ascension Power for", "each {C:attention}sun_with_face{} emoji in", - "Entropy's ascended hands channel", - "{C:inactive}(Currently:{} {X:gold,C:white}X#2#{}{C:inactive}){}", + "Entropy's #ascended-hands-worship channel", + "{C:inactive}(Currently{} {X:gold,C:white}X#2#{}{C:inactive}){}", "{C:blue,s:0.7}https://discord.gg/beqqy4Bb7m{}", } }, @@ -328,7 +425,6 @@ local decs = { j_entr_anaptyxi= { name = "Anaptyxi", text = { - "Scaling Jokers scale as a quadratic", "Scaling Jokers scale all other Jokers by", "{X:dark_edition,C:white}X#1#{} the same amount, then increase", "this by {X:dark_edition,C:white}X#2#{} at the end of round", @@ -348,7 +444,7 @@ local decs = { text = { "{C:attention}Anything{} can appear", "in the place of any card", - "{C:dark_edition}+#1#{} Shop Slots" + "{C:dark_edition}+#1#{} shop slots" } }, j_entr_exousia = { @@ -374,7 +470,7 @@ local decs = { text = { "Chooses one suit per hand", "Destroy all {C:attention}scored{} cards with that suit", - "{C:inactive}(Currently:{} {V:1}#1#{}{C:inactive}){}" + "{C:inactive}(Currently{} {V:1}#1#{}{C:inactive}){}" } }, j_entr_strawberry_pie = { @@ -391,7 +487,7 @@ local decs = { "When this Joker is {C:attention}sold{},", "create a copy of this Joker", "{C:red}Works once per round{}", - "{C:inactive}(Currently: #1#){}" + "{C:inactive}(Currently #1#){}" } }, j_entr_trapezium_cluster = { @@ -408,8 +504,8 @@ local decs = { "Retrigger the {C:attention}Joker{} to", "the right {C:attention}#1#{} time#1# then", "retrigger each subsequent", - "{C:attention}Joker{} {X:dark_edition,C:white}twice{} as", - "many times as the previous" + "{C:attention}Joker{} {X:dark_edition,C:white,f:entr_phi}Xo{} as many", + "times as the previous" } }, j_entr_dr_sunshine = { @@ -418,7 +514,7 @@ local decs = { "This {C:attention}Joker{} gains", "{C:gold}+#1#{} Ascension Power", "when a playing card is {C:attention}destroyed{}", - "{C:inactive}(Currently: {}{C:gold}+#2#{}{C:inactive}){}" + "{C:inactive}(Currently {}{C:gold}+#2#{}{C:inactive}){}" } }, j_entr_sunny_joker = { @@ -431,14 +527,14 @@ local decs = { name = "Metanoia", text = { "Discarded cards become", - "{C:attention}Flesh{} cards" + "{C:attention}Flesh{} Cards" } }, j_entr_antidagger = { name = "Anti-Dagger", text = { "Unbanish a random banished Joker", - "when a {C:attention}blind{} is selected", + "when a {C:attention}Blind{} is selected", "{C:green}#1# in #2#{} chance to {C:attention}banish{}", "this Joker instead" } @@ -449,9 +545,9 @@ local decs = { "When {C:attention}Blind{} is selected", "destroy Joker to the right", "and permanently add {C:attention}one quarter{}", - "its sell value to this Jokers", + "of its sell value to this Joker's", "{C:gold}Ascension Power{}", - "{C:inactive}(Currently: {C:gold}#1#{} {C:inactive}Ascension Power){}" + "{C:inactive}(Currently {C:gold}#1#{} {C:inactive}Ascension Power){}" } }, j_entr_insatiable_dagger = { @@ -476,7 +572,7 @@ local decs = { name = "Chocolate Egg", text = { "Create a random {C:dark_edition}Sunny{} {C:red}Rare{} Joker", - "when this joker is destroyed", + "when this Joker is destroyed", "Create a random {C:dark_edition}Sunny{} {C:cry_epic}Epic{} Joker instead", "when this Joker is {C:red}banished{}" } @@ -485,7 +581,7 @@ local decs = { name = "Chocolate Egg", text = { "Create a random {C:dark_edition}Sunny{} {C:red}Rare{} Joker", - "when this joker is destroyed", + "when this Joker is destroyed", } }, j_entr_antireal = { @@ -502,9 +598,9 @@ local decs = { text = { "{C:green}#1# in #2#{} chance for drawn cards", "to be given a {C:diamonds}Yellow Sign{} sticker", - "Played {C:diamonds}Diamonds{} {C:red}Banish{} a random Joker", + "Played {C:diamonds}Diamonds{} {C:red}banish{} a random Joker", "Selected {C:diamonds}Diamonds{} give {C:dark_edition}Temporary{}", - "to a random card of any type.", + "to a random card of any type", "Self destructs if {C:attention}7 Diamonds{} are held when hand played" } }, @@ -512,15 +608,15 @@ local decs = { name = "Lottery Ticket", text = { "Lose {C:gold}$#5#{} at the end of round", - "{C:green}#1# in #2#{} Chance to earn {C:gold}$#6#{}", - "{C:green}#3# in #4#{} Chance to earn {C:gold}$#7#{} instead" + "{C:green}#1# in #2#{} chance to earn {C:gold}$#6#{}", + "{C:green}#3# in #4#{} chance to earn {C:gold}$#7#{} instead" } }, j_entr_ruby = { name = "Ruby, Lord of Hope", text = { "Gain a random {C:attention}Tag{}", - "every {C:attention}#1#{} {C:inactive}[#2#]{} Jokers bought.", + "every {C:attention}#1#{} {C:inactive}[#2#]{} Jokers bought", "Tags may randomly become", "{C:entr_entropic}Ascended{}" } @@ -529,7 +625,7 @@ local decs = { name = "Slipstream, Heir of Time", text = { "Create an {C:red}Omen{} card", - "when blind is selected", + "when Blind is selected", "Held {C:red}Omens{} give {X:mult,C:white}X#1#{} Mult" } }, @@ -538,19 +634,9 @@ local decs = { text = { "Add {C:attention}#7#{} to a random", "stat when a {C:planet}Planet{} or {C:purple}Star{} card is used", - "{C:inactive}({C:blue}+#1#{C:inactive} Hand Size, {C:attention}+#2#{C:inactive} Card Selection Limit)", - "{C:inactive}({C:blue}+#3#{C:inactive} Hands and {C:red}+#4#{C:inactive} Discards)", - "{C:inactive}({C:dark_edition}+#5#{C:inactive} Consumable Slots, {C:attention}+#6#{C:inactive} Shop Slots)" - } - }, - j_entr_crabus = { - name = "Crabus, Heir of Doom", - text = { - "Unscoring cards become {C:attention}Dark Cards{}", - "{C:attention}Dark Cards{} scale when played", - "This Joker gains {X:chips,C:white}X#1#{} chips", - "whenever a {C:attention}Dark Card{} is added", - "{C:inactive}(Currently: {X:chips,C:white}X#2#{C:inactive} Chips)" + "{C:inactive}({C:blue}+#1#{C:inactive} hand size, {C:attention}+#2#{C:inactive} card selection limit)", + "{C:inactive}({C:blue}+#3#{C:inactive} hands and {C:red}+#4#{C:inactive} discards)", + "{C:inactive}({C:dark_edition}+#5#{C:inactive} consumable slots, {C:attention}+#6#{C:inactive} shop slots)" } }, j_entr_devilled_suns = { @@ -572,7 +658,7 @@ local decs = { j_entr_exelixi = { name = "Exelixi", text = { - "Upgrade the {C:attention}enhancement{}", + "Upgrade the {C:attention}Enhancement{}", "of playing cards when scored", "{C:attention}Enhancements{} are given to adjacent cards", "when {C:attention}discarding{} cards" @@ -588,33 +674,33 @@ local decs = { name = "Jokezmann Brain", text = { "When exiting the shop there is a", - "{C:green}#1# in #2#{} chance for each", - "empty joker slot to be filled with", - "a random {C:dark_edition}Perishable, Oversaturated{} Joker" + "{C:green}#1# in #2#{} chance for all", + "empty Joker slots to be filled with", + "random {C:dark_edition}Perishable, Oversaturated{} Jokers" } }, j_entr_libra = { name = "Libra", text = { - "Scored {C:dark_edition}Wild{} and {C:attention}Face{} cards", + "Scored {C:dark_edition}Wild{} and {C:attention}face{} cards", "balance their values with {C:attention}this{} Joker", - "{C:inactive}(Currently: {X:dark_edition,C:white}^#1#{} {C:inactive}Chips){}" + "{C:inactive}(Currently {X:slib_echips,C:white}^#1#{} {C:inactive}Chips){}" } }, j_entr_scorpio = { name = "Scorpio", text = { "Scored {C:attention}8s{} temporarily boost probabilities", - "Grant {X:dark_edition,C:white}^Chips{} based on {C:attention}8 d8s{}", - "Rolling {C:attention}Eight{} 8s instead grants {X:dark_edition,C:white}^#1#{} Chips" + "Grant {X:slib_echips,C:white}^Chips{} based on {C:attention}8 d8s{}", + "Rolling {C:attention}eight{} 8s instead grants {X:slib_echips,C:white}^#1#{} Chips" } }, j_entr_ridiculus_absens = { name = "Ridiculus Absens", text = { - "{C:green}#1# in #2#{} Scored non {C:dark_edition}Glitched{} cards", + "{C:green}#1# in #2#{} scored non-{C:dark_edition}Glitched{} cards", "become {C:dark_edition}Glitched{} and gain an extra effect", - "{C:attention}Randomise{} this probability when hand is {c:attention}played{}" + "{C:attention}Randomize{} this probability when hand is {c:attention}played{}" } }, @@ -622,26 +708,108 @@ local decs = { name = "Endless Entropy", text = { "Cycles through the {C:attention}following{} effects", - "when {C:blue}Hand{} is played and when {C:red}Discarding{} respectively", + "when {C:blue}hand{} is played and when {C:red}discarding{} respectively", "#1#", "#2#" } }, + + j_entr_scarlet_sun = { + name = "Scarlet Sun", + text = { + { + "Scored cards give", + "{C:attention}+#1#{} Ascension Power", + }, + { + "Apply {C:dark_edition}Sunny{} to", + "scored {C:hearts}Hearts{}" + } + } + }, + j_entr_burgundy_baracuda = { + name = "Burgundy Barracuda", + text = { + "At the end of the shop", + "{C:red}destroy{} a random consumable", + "and gain {X:mult,C:white}X#2#{} Mult", + "{C:inactive}(Currently {X:mult,C:white}X#1#{C:inactive} Mult)" + } + }, + j_entr_olive_orchard = { + name = "Olive Orchard", + text = { + { + "{C:green}#1# in #2#{} chance to create", + "a {C:dark_edition}Negative{} {C:attention}Perishable", + "copy of a random Joker when", + "Blind is selected", + "{C:inactive}(Excludes self)" + }, + { + "This Joker gains {X:mult,C:white}X#4#{} Mult", + "when a card Perishes", + "{C:inactive}(Currently {X:mult,C:white}X#3#{C:inactive} Mult)" + } + } + }, + j_entr_citrine_comet = { + name = "Citrine Comet", + text = { + { + "Fixed {C:green}50%{} chance to", + "create a {C:red}Temporary{} {C:dark_edition}Negative{}", + "copy of all drawn cards" + }, + { + "{C:dark_edition}Negative{} cards give", + "{C:attention}+1{} card selection limit", + "when selected" + } + } + }, + + j_entr_diamond_dawn = { + name = "Diamond Dawn", + text = { + { + "Strip the rank and suit", + "from the {C:attention}rightmost{}", + "scored card every hand and", + "add it to this Joker's {C:money}money{}", + }, + { + "Earn {C:gold}$#1#{} at end of round" + } + } + }, + + j_entr_alabaster_anchor = { + name = "Alabaster Anchor", + text = { + "When a card is {C:red}discarded{}", + "a random Joker gains {X:attention,C:white}X#1#{} values", + "and another random Joker gains", + "{X:attention,C:white}X#2#{} values", + "{C:inactive}(Excludes self)" + } + }, + j_entr_skullcry = { name = ":skullcry:", text = { - "Prevents death if chips scored are", + "Prevents Death if Chips scored are", "greater than {C:attention}log_#1#(Blind Requirement){}", - "{C:red}self destructs{} if chips are not", - "within {C:attention}#2#%{} of {C:attention}log_#1#(Blind Requirement){}" + "{C:red}Self destructs{} if Chips are not", + "within {C:attention}#2#%{} of {C:attention}log_#1#(Blind requirement){}" } }, j_entr_dating_simbo = { name = "Dating Sim-Bo", text = { "Scored {C:hearts}Hearts{} are destroyed", - "and their {C:blue}chips{} are {C:attention}added{} to this Joker", - "{C:inactive}(Currently: {}{C:blue}+#1#{} {C:inactive}Chips){}" + "and their {C:blue}Chips{} are {C:attention}added{} to this Joker", + "{C:inactive}(Currently {}{C:blue}+#1#{} {C:inactive}Chips){}" } }, j_entr_bossfight = { @@ -649,7 +817,7 @@ local decs = { text = { "If exactly {C:attention}#1#{} cards are played", "all cards held in {C:attention}hand{}", - "gain {C:blue}+#2#{} chip#2#" + "gain {C:blue}+#2#{} Chip#2#" } }, j_entr_sweet_tooth = { @@ -658,7 +826,7 @@ local decs = { "{C:blue}+#1#{} Chip#1#", "at the end of the {C:attention}shop{}", "destroy all {C:attention}Food{} or {C:attention}Candy{} Jokers", - "then increase this Jokers chips by {X:blue,C:white}X#2#{}", + "then increase this Joker's Chips by {X:blue,C:white}X#2#{}", "if any {c:attention}Food{} or {C:attention}Candy{} Jokers were destroyed" } }, @@ -690,7 +858,7 @@ local decs = { j_entr_code_m = { name = "M()", text = { - "When a {C:green}Code{} Card is used", + "When a {C:green}Code{} card is used", "apply {C:dark_edition}Jolly{} to a", "{C:attention}random{} Joker" } @@ -700,8 +868,8 @@ local decs = { name = "Sunflower Seeds", text = { "After playing {C:attention}#1#{} {C:inactive}[#2#]{}", - "{C:gold}Ascended{} hands apply {C:dark_edition}Sunny{}", - "to a {C:attention}random{} Joker and {C:red}Self Destruct{}" + "{C:gold}Ascended{} hands, apply {C:dark_edition}Sunny{}", + "to a {C:attention}random{} Joker and {C:red}self destruct{}" } }, j_entr_tenner = { @@ -717,7 +885,7 @@ local decs = { "for each applied {C:attention}sticker{}", "Apply a {C:attention}random{} sticker to", "a {C:attention}random{} scored card", - "{C:inactive}(Currently:{} {C:mult}+#2#{} {C:inactive}Mult){}" + "{C:inactive}(Currently{} {C:mult}+#2#{} {C:inactive}Mult){}" } }, @@ -725,24 +893,24 @@ local decs = { name = "Metamorphosis", text = { "Main Joker {C:attention}scoring{} effects", - "instead trigger when {C:attention}#1#{}'s are scored", - "rank changes every hand" + "instead trigger when {C:attention}#1#{}s are scored", + "Rank changes every hand" } }, j_entr_fourbit = { name = "4Bit Joker", text = { - "Every {C:attention}#1#{}th {C:inactive}[#2#]{} Scoring Card", + "Every {C:attention}#1#{}th {C:inactive}[#2#]{} scoring card", "has a {C:attention}random{} card applied", - "as an {C:attention}enhancement{}" + "as an {C:attention}Enhancement{}" } }, j_entr_scenic_route = { name = "Scenic Route", text = { "Create a {C:red}(~)$ new(){}", - "When a {C:attention}Boss Blind{}", + "when a {C:attention}Boss Blind{}", "is defeated", "{C:inactive}(Must have room){}" } @@ -768,9 +936,9 @@ local decs = { j_entr_nyctophobia = { name = "Nyctophobia", text = { - "When blind is selected, destroy", + "When Blind is selected, destroy", "a random {C:attention}consumable{} and draw two", - "random {C:dark_edition}Dark{} cards to hand for every time", + "random {C:dark_edition}Dark{} Cards to hand for every time", "that consumable was {C:attention}used{} previously" }, }, @@ -787,7 +955,7 @@ local decs = { name = "Nucleotide", text = { "Draw a copy of the first discarded", - "card per round with an {C:attention}inversed{} rank", + "card per round with an {C:attention}inverted{} rank", "and suit and an upgraded {C:dark_edition}Edition{} to {C:attention}hand{}" }, }, @@ -810,56 +978,15 @@ local decs = { j_entr_apeirostemma = { name = "Apeirostemma", text = { - "This Joker may cycle", - "between {C:attention}6{} different", - "effects" - } - }, - j_entr_apeirostemma_1 = { - name = "Apeirostemma (D1)", - text = { - "Copy a {C:attention}random{} Joker and", - "a {C:attention}random{} consumable at", - "the end of the shop then apply negative", - "to the copied cards", - "{C:inactive}(Apeirostemma excluded){}" - } - }, - j_entr_apeirostemma_2 = { - name = "Apeirostemma (D2)", - text = { - "{C:green}#1# in #2#{} chance", - "to {C:dark_edition}Force-Trigger{}", - "all other Jokers" - } - }, - j_entr_apeirostemma_3 = { - name = "Apeirostemma (D3)", - text = { - "This Joker gains {X:dark_edition,C:white}^#1#{} Chips", - "if exactly {C:attention}3{} cards are played", - "{C:inactive}(Currently{} {X:dark_edition,C:white}^#2#{}{C:inactive}){}" - } - }, - j_entr_apeirostemma_4 = { - name = "Apeirostemma (D4)", - text = { - "Reroll all Jokers to the {C:attention}Right{}", - "of this Joker when blind is selected" - } - }, - j_entr_apeirostemma_5 = { - name = "Apeirostemma (D5)", - text = { - "When a shop item is bought", - "increase this Jokers values by", - "{C:attention}X(1 - 1.1){} excluding this effect" - } - }, - j_entr_apeirostemma_6 = { - name = "Apeirostemma (D6)", - text = { - "Retrigger all cards {C:attention}3-9{} Times" + { + "Use this Joker to {C:attention}retrigger{}", + "all selected cards for {C:attention}one{} round", + }, + { + "This Joker gains {C:attention}#2#{} use#2#", + "when defeating a Blind", + "{C:inactive}(Currently {C:attention}#1#{C:inactive} use#1#)" + } } }, @@ -867,8 +994,8 @@ local decs = { name = "Qu", text = { "One {C:attention}random{} card in hand", - "gains a random {C:red}Twisted{} card", - "as an enhancement when {C:attention}blind{}", + "gains a random {C:red}Inverted{} card", + "as an Enhancement when {C:attention}Blind{}", "is selected" } }, @@ -880,14 +1007,14 @@ local decs = { "(Memento Mori Entropic Edit)" }, text = { - "The {C:attention}First{} played card", + "The {C:attention}first{} played card", "each round is {C:attention}destroyed{}" } }, j_entr_broadcast = { name = "Broadcast", text = { - "Copies the {C:attention}#1#{}#2# Jokers effect", + "Copies the {C:attention}#1#{}#2# Joker's effect", "Increases by {C:attention}1{} at end of round", "Resets after reaching your {C:attention}last{} Joker" } @@ -903,14 +1030,14 @@ local decs = { j_entr_d1 = { name = "D1", text = { - "The {C:attention}First{} Probability Roll", - "each round is {C:green}Guaranteed{}" + "The {C:attention}first{} probability roll", + "each round is {C:green}guaranteed{}" } }, j_entr_d4 = { name = "D4", text = { - "Probability Rolls are rolled {C:attention}Twice{}", + "Probability rolls are rolled {C:attention}twice{}", "with only {C:attention}one{} success needed" } }, @@ -918,9 +1045,9 @@ local decs = { j_entr_d6 = { name = "D6", text = { - "This Joker Gains {C:green}+#2#{} Numerator", - "when a Probability {C:red}fails{}", - "and resets when a Probability {C:green}succeeds{}", + "This Joker gains {C:green}+#2#{} numerator", + "when a probability {C:red}fails{}", + "and resets when a probability {C:green}succeeds{}", "{C:inactive}(Currently {C:green}+#1#{C:inactive})" } }, @@ -928,9 +1055,9 @@ local decs = { j_entr_eternal_d6 = { name = "Eternal D6", text = { - "When rerolling {C:green}#1# in #2#{} Chance", - "to {C:red}destroy{} a random shop card else gain", - "{C:green}+#4#{} Numerator, resets at the end of the ante", + "When rerolling, {C:green}#1# in #2#{} chance", + "to {C:red}destroy{} a random shop card, else gain", + "{C:green}+#4#{} numerator, resets at the end of the Ante", "{C:inactive}(Currently {C:green}+#3#{C:inactive})" } }, @@ -939,7 +1066,7 @@ local decs = { name = "D7", text = { "{C:green}#1# in #2#{} chance to", - "Retrigger each {C:green}Probability{}", + "retrigger each {C:green}probability{}", "based {C:attention}Joker{} and {C:attention}Enhancement{}" } }, @@ -947,21 +1074,21 @@ local decs = { name = "D8", text = { "Probabilities are rolled with", - "a {C:green}Denominator{} lowered by {C:attention}#1#{}", + "a {C:green}denominator{} lowered by {C:attention}#1#{}", } }, j_entr_d10 = { name = "D10", text = { "Probabilities are rolled with", - "{C:attention}randomly{} offset {C:green}Numerators{} and {C:green}Denominators{}", + "{C:attention}randomly{} offset {C:green}numerators{} and {C:green}denominators{}", } }, j_entr_d12 = { name = "D12", text = { - "{C:green}+#1#{} Numerator", - "for every {C:attention}held{} Consumable" + "{C:green}+#1#{} numerator", + "for every {C:attention}held{} consumable" } }, j_entr_d100 = { @@ -974,7 +1101,7 @@ local decs = { j_entr_capsule_machine = { name = "Capsule Machine", text = { - "When blind is selected", + "When Blind is selected", "create a {C:attention}Perishable{} {C:green}Dice{} {C:attention}Joker{}", "{C:inactive}(Must have room){}" } @@ -1026,15 +1153,15 @@ local decs = { name = "Inkbleed", text = { "Cards that {C:attention}share{} a", - "{C:attention}Rank{} or {C:attention}Modification{}", - "count as eachothers suit" + "{C:attention}rank{} or {C:attention}modification{}", + "count as each other's suit" }, }, j_entr_roulette = { name = "Roulette", text = { "{C:green}#1# in #2#{} chance for", - "each scored card to gain {C:red}+#3#{} Bonus Mult", + "each scored card to gain {C:red}+#3#{} bonus Mult", "Destroy every {C:attention}#4#{}th scoring card" }, }, @@ -1050,7 +1177,7 @@ local decs = { name = "Birthday Card", text = { "{X:mult,C:white}X#1#{} Mult if you have", - "atleast {C:attention}#2#{} held Consumables" + "at least {C:attention}#2#{} held consumables" }, }, j_entr_sandpaper = { @@ -1058,7 +1185,7 @@ local decs = { text = { "If played hand contains a {C:attention}Stone Card{}", "{C:red}destroy{} all played {C:attention}Stone Cards{}", - "and create a {C:attention}random{} {C:purple}Rune Card{}" + "and create a {C:attention}random{} {C:purple}Rune card{}" }, }, j_entr_purple_joker = { @@ -1081,7 +1208,7 @@ local decs = { name = "Torn Photograph", text = { "This Joker gains {X:mult,C:white}X#1#{} Mult", - "whenever a {C:red}Twisted{} card is sold", + "whenever a {C:red}Inverted{} card is sold", "{C:inactive}(Currently {X:mult,C:white}X#2#{C:inactive} Mult){}" }, }, @@ -1089,21 +1216,21 @@ local decs = { name = "Chuckle Cola", text = { "Multiply the {C:blue}Chips{} of {C:attention}scored{}", - "cards by {X:blue,C:white}X#1#{}, {C:red}Self Destructs{}", + "cards by {X:blue,C:white}X#1#{}, {C:red}self destructs{}", "after {C:attention}#2#{} card#2# scored" }, }, j_entr_antiderivative = { name = "Antiderivative", text = { - "{C:attention}Ranks{} and {C:attention}Suits{} are swapped", - "for {C:attention}Jokers{} and {C:attention}Poker Hand{} detection", + "{C:attention}Ranks{} and {C:attention}suits{} are swapped", + "for {C:attention}Jokers{} and {C:attention}poker hand{} detection", "{C:inactive,s:0.8}Spades, Hearts, Clubs, and Diamonds{}", "{C:inactive,s:0.8}count as Ace, King, Queen, Jack respectively{}" }, }, j_entr_alles = { - name = "Oops all e's!", + name = "Oops, All e's!", text = { "Earn {C:money}$#1#{} at end of round if", "you take {C:attention}more{} than {C:blue}1{} hand", @@ -1115,7 +1242,7 @@ local decs = { text = { "The first {C:attention}5{} letter or lower", "Word each round is {C:red}always{} counted", - "as a {C:attention}Valid{} Word" + "as a {C:attention}valid{} Word" }, }, j_entr_feynman_point = { @@ -1130,16 +1257,16 @@ local decs = { j_entr_neuroplasticity = { name = "Neuroplasticity", text = { - "Poker hands Calculate", - "as a {C:attention}random{} Hand which", - "Shuffles {C:attention}every round{}" + "Poker hands calculate", + "as a {C:attention}random{} hand", + "Changes {C:attention}every round{}" }, }, j_entr_dragonfruit = { name = "Dragonfruit", text = { - "{C:attention}+#1#{} Card Selection Limit", - "{C:attention}-#2#{} Card Selection Limit", + "{C:attention}+#1#{} card selection limit", + "{C:attention}-#2#{} card selection limit", "after every played hand" }, }, @@ -1148,9 +1275,9 @@ local decs = { text = { "Chooses an effect randomly when triggered", "{X:chips,C:white}???{} Chips, {X:mult,C:white}???{} Mult, {X:money,C:white}???{} Ascension Power", - "{X:money,C:white}???{} Money, {X:blue,C:white}???{} Hands", - "Create {C:attention}2{} Twisted Cards, Played Hand gains random {C:dark_edition}Editions{}", - "{X:attention,C:white}X0.9{} Blind Size. ...", + "{X:money,C:white}???{} money, {X:blue,C:white}???{} hands", + "Create {C:attention}2{} Inverted cards, played hand gains random {C:dark_edition}Editions{}", + "{X:attention,C:white}X0.9{} Blind size, ...", }, }, j_entr_jestradiol = { @@ -1161,7 +1288,7 @@ local decs = { "selected cards into {C:entr_trans}Queens{}", }, { - "This Joker Gains {C:attention}#2#{} use#2#", + "This Joker gains {C:attention}#2#{} use#2#", "when defeating a Boss Blind" } }, @@ -1185,7 +1312,7 @@ local decs = { name = "Radar", text = { "Earn the last played", - "{C:attention}poker hands{} level", + "{C:attention}poker hand's{} level", "as money at end of round", "{C:inactive}(Currently {C:money}$#1#{C:inactive})" }, @@ -1193,9 +1320,9 @@ local decs = { j_entr_abacus = { name = "Abacus", text = { - "Scored number cards give", + "Scored numbered cards give", "one half of their", - "{C:blue}chips{} as {C:red}mult{}" + "{C:blue}Chips{} as {C:red}Mult{}" }, }, j_entr_matryoshka_dolls = { @@ -1204,7 +1331,7 @@ local decs = { "{C:red}+#1#{} Mult", "When Blind is selected", "create a {C:attention}copy{} of this Joker", - "with {C:red}1{} fewer mult", + "with {C:red}1{} fewer Mult", "{C:inactive}(Must have room)" }, }, @@ -1237,8 +1364,8 @@ local decs = { name = "Fourty Benadryls", text = { "{C:blue}+#1#{} Chip#1#", - "for each ante", - "{C:inactive}(Currently: {C:blue}#2#{C:inactive} Chip#2#)" + "for each Ante", + "{C:inactive}(Currently {C:blue}#2#{C:inactive} Chip#2#)" }, }, j_entr_red_fourty = { @@ -1246,15 +1373,15 @@ local decs = { text = { "{C:red}+#1#{} Mult", "{C:red}-#2#{} Mult when", - "spending money in The Shop" + "spending money in the shop" }, }, j_entr_promotion = { name = "Promotion", text = { "Create a {C:attention}random{} Booster Pack", - "in the Consumables tray when", - "The Boss Blind is defeated", + "in the consumables tray when", + "the Boss Blind is defeated", "{C:inactive}(Must have room)" }, }, @@ -1280,7 +1407,7 @@ local decs = { "This Joker gains {C:red}+#1#{} Mult", "per each {C:attention}discarded{} card and", "{C:red}resets{} at the end of round", - "{C:inactive}(Currently: {C:red}#2#{C:inactive} Mult)" + "{C:inactive}(Currently {C:red}#2#{C:inactive} Mult)" }, }, j_entr_gold_bar = { @@ -1303,7 +1430,7 @@ local decs = { text = { "First scored card each", "hand becomes {C:attention}Eternal{}", - "Scored {C:attention}Eternal{} Cards give", + "Scored {C:attention}Eternal{} cards give", "{C:blue}+#1#{} Chips and", "{C:red}+#2#{} Mult" }, @@ -1320,9 +1447,9 @@ local decs = { j_entr_prayer_card = { name = "Prayer Card", text = { - "{C:attention}-#1#{} Blind Requirement", - "for each ante", - "{C:inactive}(Currently: {C:attention}#2#{C:inactive})" + "{C:attention}-#1#{} Blind requirement", + "for each Ante", + "{C:inactive}(Currently {C:attention}#2#{C:inactive})" }, }, j_entr_desert = { @@ -1330,8 +1457,8 @@ local decs = { text = { "This Joker gains {C:gold}+#1#{}", "Ascension Power if played hand", - "contains exactly {C:attention}1{} Card", - "{C:inactive}(Currently: {C:gold}#2#{C:inactive} Ascension Power)" + "contains exactly {C:attention}1{} card", + "{C:inactive}(Currently {C:gold}#2#{C:inactive} Ascension Power)" }, }, j_entr_rugpull = { @@ -1339,7 +1466,7 @@ local decs = { text = { "Earn no Payout", "{X:attention,C:white}X#1#{} The Payout amount", - "is added to this Jokers", + "is added to this Joker's", "{C:attention}sell value{} instead" }, }, @@ -1349,7 +1476,7 @@ local decs = { { "Use this Joker to", "turn a random card held in hand", - "into a {C:attention}Bonus{}, {C:attention}Mult{}, or {C:attention}Wild{} card", + "into a {C:attention}Bonus{}, {C:attention}Mult{}, or {C:attention}Wild{} Card", }, { "This Joker gains {C:attention}#2#{} use#2#", @@ -1361,14 +1488,14 @@ local decs = { j_entr_petrichor = { name = "Petrichor", text = { - "Non-Scored Cards", + "Non-scored cards", "give {C:blue}+#1#{} Chips" }, }, j_entr_otherworldly_joker = { name = "Otherworldly Joker", text = { - "Create a {C:red}Twisted{} Card", + "Create a {C:red}Inverted{} card", "when any {C:attention}Booster Pack{}", "is skipped", "{C:inactive}(Must have room){}" @@ -1377,16 +1504,16 @@ local decs = { j_entr_error = { name = "ERROR", text = { - "Calculated Effects are", + "Calculated effects are", "slightly {C:attention}offset{}", - "{C:inactive,S:0.8}(Ex. {C:blue}+30{C:inactive} Chips or {X:red,C:white}X2{C:inactive} Mult)" + "{C:inactive,S:0.8}(Eg. {C:blue}+30{C:inactive} Chips or {X:red,C:white}X2{C:inactive} Mult)" }, }, j_entr_thirteen_of_stars = { name = "Thirteen of Stars", text = { - "Gives a {C:attention}Quarter{} the", - "played Poker Hands {C:purple}Level{}", + "Gives one {C:attention}quarter{} of the", + "played poker hand's {C:purple}level{}", "as {C:gold}Ascension Power{}" }, }, @@ -1407,7 +1534,7 @@ local decs = { j_entr_prismatic_shard = { name = "Prismatic Shard", text = { - "Scored Cards give", + "Scored cards give", "{C:mult}+#1#{} Mult,", "{C:blue}+#2#{} Chips, or", "{C:gold}+#3#{} Ascension Power" @@ -1417,15 +1544,15 @@ local decs = { name = "Chameleon", text = { "Scores as a", - "Random {C:attention}Enhancement{}" + "random {C:attention}Enhancement{}" }, }, j_entr_thanatophobia = { name = "Thanatophobia", text = { - "Gives half of the {C:attention}sell value{} of all", - "sold or destroyed {C:attention}Jokers{} as mult", - "{C:inactive}(Currently: {C:mult}+#1#{C:inactive})" + "Gives half the {C:attention}sell value{} of all", + "sold or destroyed {C:attention}Jokers{} as Mult", + "{C:inactive}(Currently {C:mult}+#1#{C:inactive})" }, }, j_entr_redkey= { @@ -1446,7 +1573,7 @@ local decs = { name = "Polaroid", text = { { - "Use this Joker to copy another {C:attention}Jokers{}", + "Use this Joker to copy another {C:attention}Joker's{}", "abilities until next used", }, { @@ -1459,16 +1586,16 @@ local decs = { j_entr_car_battery = { name = "Car Battery", text = { - "Useable {C:attention}Jokers{} and {C:attention}Consumables{}", - "Gain {C:attention}#1#{} extra use", - "When defeating a Boss Blind", + "Useable {C:attention}Jokers{} and {C:attention}consumables{}", + "gain {C:attention}#1#{} extra use", + "when defeating a Boss Blind", }, }, j_entr_chair = { name = "Chair", text = { - "If Played hand is {C:attention}Three of a Kind", - "Apply {C:attention}Freaky{} to the {C:attention}third{}", + "If played hand is {C:attention}Three of a Kind", + "apply {C:attention}Freaky{} to the {C:attention}third{}", "scoring card" }, }, @@ -1477,10 +1604,10 @@ local decs = { text = { { "Use this Joker to apply a random", - "{C:attention}Joker{}, {C:attention}Consumable{}", + "{C:attention}Joker{}, {C:attention}consumable{}", "{C:attention}Booster Pack{} or {C:attention}Voucher{}", "as an Enhancement to a", - "{C:attention}Random{} Card held in hand" + "{C:attention}random{} card held in hand" }, { "This Joker gains {C:attention}#2#{} use#2#", @@ -1492,9 +1619,9 @@ local decs = { j_entr_deck_enlargement_pills = { name = "Deck Enlargement Pills", text = { - "After {C:attention}#1#{} {C:inactive}[#2#]{} Rounds", + "After {C:attention}#1#{} {C:inactive}[#2#]{} rounds", "sell this card to", - "{C:attention}Apply{} a random {C:attention}Deck's{} Effects" + "{C:attention}apply{} a random {C:attention}Deck's{} effects" }, }, j_entr_photocopy = { @@ -1502,7 +1629,7 @@ local decs = { text = { "The first card in {C:attention}Standard Packs{}", "always has your most common", - "{C:attention}Suit{} and {C:attention}Rank{}" + "{C:attention}suit{} and {C:attention}rank{}" }, }, @@ -1511,7 +1638,7 @@ local decs = { text = { "Extra played cards provide", "{C:gold}+3{} Ascension Power", - "{C:attention}+3{} Card Selection Limit" + "{C:attention}+3{} card selection limit" }, }, j_entr_hexa_cryptid = { @@ -1519,16 +1646,16 @@ local decs = { text = { "Extra played cards provide {X:gold,C:white}X3{}", "as much Ascension Power", - "{C:attention}+#1#{} Card Selection Limit" + "{C:attention}+#1#{} card selection limit" }, }, j_entr_grahkon = { name = "First Guardian, Grahkon", text = { { - "{C:attention}-#1#{} Blind Size", + "{C:attention}-#1#{} Blind size", "Increases by {X:attention,C:white}X#2#{} when a ", - "playing card is destroyed. Use this Joker to", + "playing card is destroyed, use this Joker to", "destroy {C:attention}#3#{} random card#3# in hand", }, { @@ -1542,10 +1669,10 @@ local decs = { name = "Ybur", text = { "Prevents Death once per Ante", - "if no blinds were skipped", - "This Joker gains {X:dark_edition,C:white}^#2#{} Chips", + "if no Blinds were skipped", + "This Joker gains {X:slib_echips,C:white}^#2#{} Chips", "when death is prevented", - "{C:inactive}(Currently: {X:dark_edition,C:white}^#1#{C:inactive} Chips, #3#)" + "{C:inactive}(Currently {X:slib_echips,C:white}^#1#{C:inactive} Chips, #3#)" }, }, j_entr_zelavi = { @@ -1554,25 +1681,16 @@ local decs = { "This Joker gains {X:blue,C:white}X#2#{} Chips", "whenever a {C:spectral}Spectral Pack{} is opened", "Each shop always contains a {C:spectral}Mega Spectral Pack{}", - "{C:inactive}(Currently: {X:blue,C:white}X#1#{C:inactive} Chips)" + "{C:inactive}(Currently {X:blue,C:white}X#1#{C:inactive} Chips)" }, }, j_entr_ssac = { name = "Swonkssac", text = { - "{C:attention}Forcetrigger{} the Rightmost", - "{C:attention}Joker{}, {C:attention}Playing Card{}, and {C:attention}Consumable{}", - "once for every two Base Ranks missing in the deck", - "{C:inactive}(Currently: {C:attention}#1#{C:inactive})" - }, - }, - j_entr_subarc = { - name = "Subarc", - text = { - "{C:attention}Retriggered{} Playing Card Editions are", - "Upgraded to {C:attention}Sunny{} and then {C:attention}Solar{}", - "Retriggered {C:attention}Solar{} cards gain", - "{X:gold,C:white}X#1#{} Ascension Power" + "{C:attention}Force-trigger{} the rightmost", + "{C:attention}Joker{}, {C:attention}playing card{}, and {C:attention}consumable{}", + "once for every two base ranks missing in full deck", + "{C:inactive}(Currently {C:attention}#1#{C:inactive})" }, }, j_entr_axeh = { @@ -1587,10 +1705,10 @@ local decs = { j_entr_nokharg = { name = "Nokharg", text = { - "Copies Played hand if no {C:red}discards{}", + "Copies played hand if no {C:red}discards{}", "have been used in the {C:attention}current round{}", "{X:attention,C:white}+X#2#{} Blind size for every copied card", - "{C:inactive}(Currently {X:attention,C:white}X#1#{C:inactive} Blind Size)" + "{C:inactive}(Currently {X:attention,C:white}X#1#{C:inactive} Blind size)" }, }, @@ -1598,8 +1716,8 @@ local decs = { name = "Enlightenment", text = { "Allows {C:attention}The Fool{} to copy", - "any {C:red}Non Inverted{} or {C:red}Hidden{} Consumable", - "or Booster Pack. Allows {C:red}The Master{} to copy", + "any {C:red}non-Inverted{} or {C:red}hidden{} consumable", + "or Booster Pack, allows {C:red}The Master{} to copy", "{C:red}Twisted Packs{}" }, }, @@ -1617,9 +1735,9 @@ local decs = { text = { "Probabilities are {C:attention}retriggered{}", "until they {C:green}succeed{}", - "gain {X:dark_edition,C:white}^Chips{} equal to the {C:attention}number of rolls{}", - "divided by the {C:green}probabilities denominator{}", - "{C:inactive}(Currently: {X:dark_edition,C:white}^#1#{C:inactive} Chips)" + "Gain {X:slib_echips,C:white}^Chips{} equal to the {C:attention}number of rolls{}", + "divided by the {C:green}probability's denominator{}", + "{C:inactive}(Currently {X:slib_echips,C:white}^#1#{C:inactive} Chips)" }, }, j_entr_jack_off = { @@ -1642,8 +1760,8 @@ local decs = { name = "Antipattern", text = { "This Joker gains {X:blue,C:white}X#1#{} Chips", - "for each {C:attention}Unique{} pair of {C:attention}Poker Hands{} played", - "{C:inactive}(Currently: {X:blue,C:white}X#2#{C:inactive} Chips)" + "for each {C:attention}Unique{} pair of {C:attention}poker hands{} played", + "{C:inactive}(Currently {X:blue,C:white}X#2#{C:inactive} Chips)" }, }, j_entr_spiral_of_ants = { @@ -1652,36 +1770,36 @@ local decs = { "This Joker gains {C:blue}+#1#{} Chips", "for each {C:attention}consecutive{} hand with {C:attention}fewer{}", "cards than the previous hand", - "{C:inactive}(Currently: {C:blue}+#2#{C:inactive} Chips)" + "{C:inactive}(Currently {C:blue}+#2#{C:inactive} Chips)" }, }, j_entr_fork_bomb = { name = "Fork Bomb", text = { "When {C:attention}Blind{} is selected", - "Create a {C:attention}copy{} of this Joker", - "{C:inactive}(Does not need room, Max of 16)" + "create a {C:attention}copy{} of this Joker", + "{C:inactive}(May overflow, max of 16)" }, }, j_entr_solar_panel = { name = "Solar Panel", text = { "Discarded {C:attention}Sunny{} and {C:attention}Radiant{}", - "cards give {C:money}$#1#{}" + "Cards give {C:money}$#1#{}" }, }, j_entr_kintsugi = { name = "Kintsugi", text = { - "{C:attention}Ceramic{} cards are turned", - "to {C:attention}Gold{} cards instead", + "{C:attention}Ceramic{} Cards are turned", + "to {C:attention}Gold{} Cards instead", "of {C:red}self destructing{}" }, }, j_entr_blooming_crimson = { name = "Blooming Crimson", text = { - "Scored Cards give", + "Scored cards give", "{X:mult,C:white}X#1#{} Mult,", "{X:blue,C:white}X#2#{} Chips, or", "{X:gold,C:white}X#3#{} Ascension Power" @@ -1700,10 +1818,10 @@ local decs = { name = "Shadow Crystal", text = { "Consumables have a {C:green}#1# in #2#{}", - " chance to also trigger their", + "chance to also trigger their", "{C:red}Inverted{} counterparts", - "{C:inactive}(If Possible)", - "{C:inactive}(Hidden Consumables Excluded)" + "{C:inactive}(If possible)", + "{C:inactive}(Hidden consumables excluded)" }, }, j_entr_miracle_berry = { @@ -1733,7 +1851,7 @@ local decs = { name = "Kitchen Joker", text = { "Food Jokers are {C:attention}more likely{}", - "to appear are {C:attention}X#1#{} as expensive", + "to appear, are {C:attention}X#1#{} as expensive", "and are {C:dark_edition}Low-Res{}" }, }, @@ -1741,7 +1859,7 @@ local decs = { name = "Hash Miner", text = { "{C:green}#1# in #2#{} chance to corrupt", - "played hands, Corrupted hands have a", + "played hands, corrupted hands have a", "{C:green}#3# in #4#{} chance to recover", "Gain {C:money}$#5#{} of sell value", "per corrupted hand at the end of round", @@ -1751,9 +1869,9 @@ local decs = { name = "Dice Shard", text = { { - "Use this Joker to transform a Selected", + "Use this Joker to transform a selected", "{C:attention}Joker{} into the previous Joker", - "according to the collection order", + "according to the Collection order", }, { "This Joker gains {C:attention}#2#{} use#2#", @@ -1765,15 +1883,15 @@ local decs = { j_entr_bell_curve = { name = "Bell Curve", text = { - "Retrigger all Played", + "Retrigger all played", "cards other than the", - "{C:attention}First{} and {C:attention}Last" + "{C:attention}first{} and {C:attention}last" }, }, j_entr_pineapple = { name = "Pineapple", text = { - "Add a {C:attention}Permanent{} Retrigger", + "Add a {C:attention}permanent{} retrigger", "to {C:attention}1{} random card from", "{C:attention}full deck{} at the end of", "the next {C:attention}#1#{} rounds" @@ -1793,7 +1911,7 @@ local decs = { text = { { "Use this Joker to {C:red}destroy{} a selected", - "Joker with a {C:green}#3# in #4#{} chance", + "Joker with a {C:green}#3# in #4#{} chance,", "otherwise apply {C:dark_edition}Polychrome, Negative{}", "{C:dark_edition}Sunny, Solar, Fractured{} or {C:dark_edition}Freaky{}", }, @@ -1807,8 +1925,8 @@ local decs = { j_entr_dancer = { name = "Dancer", text = { - "{C:attention}+#1#{} Card Selection Limit", - "{C:red}#2#{} Discards" + "{C:attention}+#1#{} card selection limit", + "{C:red}#2#{} discards" }, }, j_entr_kings_scepter = { @@ -1870,9 +1988,9 @@ local decs = { j_entr_blood_orange = { name = "Blood Orange", text = { - "Create an {C:red}Inverted{} Consumable", + "Create an {C:red}Inverted{} consumable", "for the next {C:attention}#1#{}", - "Playing cards destroyed", + "playing cards destroyed", "{C:inactive}(Must have room)" }, }, @@ -1900,9 +2018,9 @@ local decs = { text = { { "Use this Joker to destroy a selected", - "{C:attention}Consumable{}, the last three", - "Consumables destroyed by this", - "Joker are {C:attention}Triggered{} again", + "{C:attention}consumable{}, the last three", + "consumables destroyed by this", + "Joker are {C:attention}triggered{} again", "when another consumable is destroyed", "{C:inactive}({V:1}#5#{}, {V:2}#6#{}, {V:3}#7#{C:inactive})", "{C:inactive}(Hidden consumables excluded)" @@ -1920,7 +2038,7 @@ local decs = { text = { "This Joker gains {C:blue}+#2#{}", "Chips when a round is won", - "in more than {C:attention}One{} hand", + "in more than {C:attention}one{} hand", "Turns into {C:attention}Yogurt{} after", "reaching {C:blue}#3#{} Chips", "{C:inactive}(Currently {C:blue}+#1# {C:inactive}Chips)" @@ -1930,7 +2048,7 @@ local decs = { name = "Yogurt", text = { "This Joker loses {C:blue}#2#{}", - "Chips when any chip effect", + "Chips when any Chip effect", "is triggered", "{C:inactive}(Currently {C:blue}+#1# {C:inactive}Chips)" }, @@ -1938,7 +2056,7 @@ local decs = { j_entr_box_of_chocolates = { name = "Box of Chocolates", text = { - "{C:attention}Forcetrigger{} a random card", + "{C:attention}Force-trigger{} a random card", "from the next {C:attention}#1#{}", "opened {C:attention}Booster Packs{}" }, @@ -1963,10 +2081,10 @@ local decs = { j_entr_texas_hold_em = { name = "Texas Hold 'Em", text = { - "{C:red}-#1#{} Card Selection Limit", + "{C:red}-#1#{} card selection limit", "apply {C:attention}Marked{} to the", "first {C:attention}#2#{} cards drawn", - "each blind" + "each Blind" }, }, j_entr_fasciation = { @@ -2036,7 +2154,7 @@ local decs = { name = "Purple Amaryllis", text = { { - "Each {C:attention}Face Card{}", + "Each {C:attention}face card{}", "held in hand balances", "{C:blue}Chips{} and {C:red}Mult{}" }, @@ -2065,9 +2183,9 @@ local decs = { "Obtained {C:attention}Food{} Jokers are", "instead added to this Joker", "without being able to degrade", - "{C:red}self-destructs{} after {C:attention}3{}", + "{C:red}self destructs{} after {C:attention}3{}", "{C:attention}Food{} Jokers obtained", - "{C:inactive}(Currently: {C:attention}#1#{C:inactive}, {C:attention}#2#{C:inactive}, {C:attention}#3#{C:inactive})" + "{C:inactive}(Currently {C:attention}#1#{C:inactive}, {C:attention}#2#{C:inactive}, {C:attention}#3#{C:inactive})" }, }, j_entr_brownies = { @@ -2082,7 +2200,7 @@ local decs = { name = "{X:white,C:entr_transparent}______{} Joker", text = { "Flip a random Joker", - "and apply {C:attention}rental{} when", + "and apply {C:attention}Rental{} when", "Blind is selected", "{C:attention}rental{} Jokers give", "{C:mult}+#1#{} Mult" @@ -2093,13 +2211,13 @@ local decs = { text = { { "Use this Joker to {C:red}Invert{}", - "a selected Consumable", + "a selected consumable", "All {C:attention}future{} instances of", "this consumable are", "also {C:red}Inverted{}" }, { - "This Joker Gains {C:attention}#2#{} use#2#", + "This Joker gains {C:attention}#2#{} use#2#", "when defeating a Boss Blind", "{C:inactive}(Currently {C:attention}#1#{C:inactive} use#1#)" } @@ -2129,11 +2247,525 @@ local decs = { text = { "{C:attention}Vouchers{} in the shop are", "replaced by {C:dark_edition}Gilded{} {C:red}Rare{} Jokers", - "{C:green}#1# in #2#{} chance to {C:red}self-destruct{} ", + "{C:green}#1# in #2#{} chance to {C:red}self destruct{} ", "when buying any other card from", "the {C:attention}shop{}" } }, + j_entr_searing_joke = { + name = "Searing Joke", + text = { + "This Joker may be {C:red}Inverted{}", + "and gains {X:mult,C:white}X#2#{} Mult", + "when being {C:red}Inverted{}", + "{C:inactive}(Currently {X:mult,C:white}X#1#{C:inactive} Mult)" + } + }, + j_entr_ancestral_recall = { + name = "Ancestral Recall", + text = { + { + "Use this Joker to draw {C:attention}three{}", + "extra cards then apply", + "{C:attention}Marked{} to them", + "and lose {C:red}#3#{} Hands for", + "the rest of the current round" + }, + { + "This Joker gains {C:attention}#2#{} use#2#", + "when defeating a Blind", + "{C:inactive}(Currently {C:attention}#1#{C:inactive} use#1#)" + } + } + }, + + j_entr_planetarium = { + name = "Planetarium", + text = { + "Changes {C:entr_ascended}Effect{} based on", + "the last used hand specific", + "{C:planet}Planet{} or {C:purple}Star{} card" + } + }, + + ["j_entr_planetarium_High Card"] = { + name = "Planetarium: Pluto", + text = { + { + "All hands score as {C:attention}High Card{}" + }, + { + "Apply {C:attention}Marked{} to", + "all unscored cards" + }, + { + "Changes {C:entr_ascended}Effect{} based on", + "the last used hand specific", + "{C:planet}Planet{} or {C:purple}Star{} card" + } + } + }, + ["j_entr_planetarium_Pair"] = { + name = "Planetarium: Mercury", + text = { + { + "Before hand is played convert", + "the {C:attention}leftmost{} selected card", + "into the {C:attention}rightmost{} selected card" + }, + { + "Changes {C:entr_ascended}Effect{} based on", + "the last used hand specific", + "{C:planet}Planet{} or {C:purple}Star{} card" + } + } + }, + ["j_entr_planetarium_Two Pair"] = { + name = "Planetarium: Uranus", + text = { + { + "Poker Hands calculate", + "with an extra copy of the", + "{C:attention}first{} and {C:attention}second{} played cards" + }, + { + "Changes {C:entr_ascended}Effect{} based on", + "the last used hand specific", + "{C:planet}Planet{} or {C:purple}Star{} card" + } + } + }, + ["j_entr_planetarium_Three of a Kind"] = { + name = "Planetarium: Venus", + text = { + { + "If played {C:attention}Ranks{} add", + "to a multiple of {C:attention}3{}", + "scored cards give {X:mult,C:white}X#1#{} Mult" + }, + { + "Changes {C:entr_ascended}Effect{} based on", + "the last used hand specific", + "{C:planet}Planet{} or {C:purple}Star{} card" + } + } + }, + ["j_entr_planetarium_Flush"] = { + name = "Planetarium: Jupiter", + text = { + { + "Before hand is played convert", + "the {C:attention}suit{} of two other random", + "selected cards into the {C:attention}suit{}", + "of the leftmost selected card" + }, + { + "Changes {C:entr_ascended}Effect{} based on", + "the last used hand specific", + "{C:planet}Planet{} or {C:purple}Star{} card" + } + } + }, + ["j_entr_planetarium_Straight"] = { + name = "Planetarium: Saturn", + text = { + { + "Earn {C:money}$#1#{} for each", + "{C:attention}unique{} rank in played hand" + }, + { + "Changes {C:entr_ascended}Effect{} based on", + "the last used hand specific", + "{C:planet}Planet{} or {C:purple}Star{} card" + } + } + }, + ["j_entr_planetarium_Full House"] = { + name = "Planetarium: Terra", + text = { + { + "Lowest {C:attention}rank{} in played hand", + "earns {C:money}$#1#{} when scored", + "Highest {C:attention}rank{} in played hand", + "gives {X:mult,C:white}X#2#{} Mult" + }, + { + "Changes {C:entr_ascended}Effect{} based on", + "the last used hand specific", + "{C:planet}Planet{} or {C:purple}Star{} card" + } + } + }, + ["j_entr_planetarium_Straight Flush"] = { + name = "Planetarium: Neptune", + text = { + { + "{C:red}-1{} Level to", + "poker hands played", + "during the Boss Blind" + }, + { + "Hands Entropy.require{C:attention}1{}", + "less card to form for every", + "{C:attention}3{} levels they have" + }, + { + "Changes {C:entr_ascended}Effect{} based on", + "the last used hand specific", + "{C:planet}Planet{} or {C:purple}Star{} card" + } + } + }, + ["j_entr_planetarium_Four of a Kind"] = { + name = "Planetarium: Mars", + text = { + { + "Gain {C:red}+#1#{} Discard#1#", + "when a hand is played" + }, + { + "Changes {C:entr_ascended}Effect{} based on", + "the last used hand specific", + "{C:planet}Planet{} or {C:purple}Star{} card" + } + } + }, + ["j_entr_planetarium_Five of a Kind"] = { + name = "Planetarium: Planet X", + text = { + { + "If exactly {C:attention}5{} cards", + "are played all {C:attention}scored{} cards", + "gain a random {C:attention}Modification{} and", + "ranomize suits" + }, + { + "Changes {C:entr_ascended}Effect{} based on", + "the last used hand specific", + "{C:planet}Planet{} or {C:purple}Star{} card" + } + } + }, + ["j_entr_planetarium_Flush House"] = { + name = "Planetarium: Ceres", + text = { + { + "This Joker gains {X:mult,C:white}X#1#{}", + "Mult for every {C:attention}Pair{} in", + "the winning hand and loses {X:mult,C:white}X#2#{}", + "Mult for every {C:attention}Suit{} in", + "the winning hand", + "{C:inactive}(Currently {X:mult,C:white}X#3#{C:inactive} Mult)" + }, + { + "Changes {C:entr_ascended}Effect{} based on", + "the last used hand specific", + "{C:planet}Planet{} or {C:purple}Star{} card" + } + } + }, + ["j_entr_planetarium_Flush Five"] = { + name = "Planetarium: Eris", + text = { + { + "Copy the {C:attention}first{} scored card", + "each round then add it to", + "your {C:attention}played hand{}" + }, + { + "Changes {C:entr_ascended}Effect{} based on", + "the last used hand specific", + "{C:planet}Planet{} or {C:purple}Star{} card" + } + } + }, + ["j_entr_planetarium_entr_derivative"] = { + name = "Planetarium: Interloper", + text = { + { + "Strip the {C:attention}rank{} and {C:attention}suit{}", + "of {C:attention}leftmost{} card held in hand", + "at the end of round" + }, + { + "Retrigger all {C:attention}suitless{}", + "cards held in hand or", + "played" + }, + { + "Changes {C:entr_ascended}Effect{} based on", + "the last used hand specific", + "{C:planet}Planet{} or {C:purple}Star{} card" + } + } + }, + j_entr_double_down = { + name = "Double Down", + text = { + "Apply {C:attention}Marked{} to", + "scored {C:attention}Lucky{} cards" + } + }, + j_entr_wormwood = { + name = "Wormwood", + text = { + { + "Playing cards permanently lose", + "{C:red}#1#{} Mult when scored", + }, + { + "Scored cards give {C:gold}+#2#{}", + "Acension Power for each", + "{C:blue}chip{} they have" + } + } + }, + + --void jokers + j_entr_apoptosis = { + name = "Apoptosis", + text = { + { + "Held in hand cards {C:attion}score{}", + "as if they were {C:entr_void}played{}" + }, + { + "Unenhanced cards held in hand", + "give {C:gold}+#1#{} Ascension Power" + }, + { + "{s:0} " + }, + } + }, + j_entr_egocentrism = { + name = "Egocentrism", + text = { + { + "{C:entr_void}Forcetrigger{} the rightmost", + "Joker. Debuff the {C:attention}first{}", + "and {C:attention}last{} played cards" + }, + { + "{s:0} " + }, + } + }, + j_entr_generator_meltdown = { + name = "Generator Meltdown", + text = { + { + "When a Poker Hand is leveled Up", + "Swap {C:entr_void}25%{} of its {C:blue}Chips", + "with {C:entr_void}25%{} of its {C:red}Mult" + }, + { + "{s:0} " + }, + } + }, + j_entr_voidheart = { + name = "Voidheart", + text = { + { + "Replace all blinds", + "in ante with a singular", + "{C:entr_void}Abyss{} blind" + }, + { + "{s:0} " + }, + } + }, + j_entr_unstable_rift = { + name = "Unstable Rift", + text = { + { + " " + }, + { + "When {C:red}Mult{} or {C:blue}Chips{}", + "are changed add {C:entr_void}20%{} of", + "the change to this Jokers", + "{C:red}Mult{} and {C:blue}Chips{}" + }, + { + "On last hand of round", + "score using this Joker's", + "{C:mult}Mult{} and {C:blue}Chips{} instead", + "then {C:red}reset{}" + }, + { + "{s:0} " + }, + } + }, + j_entr_pluripotent_larvae = { + name = "Pluripotent Larvae", + text = { + { + "Sell this Joker to {C:entr_void}Invert{}", + "all {C:entr_void}Invertable{} Jokers and", + "then fill empty Joker slots", + "with {C:entr_void}Inverted{} Jokers" + }, + { + "{s:0} " + }, + } + }, + j_entr_desiderium = { + name = "Desiderium", + text = { + { + "Gain {C:entr_void}+#1#{} Joker Slot", + "if all {C:blue}Hands{} and {C:red}Discards{}", + "are used in an ante", + "{C:inactive}(Currently #2#)" + }, + { + "{s:0} " + } + } + }, + j_entr_nadir = { + name = "Nadir", + text = { + { + "Use this Joker to {C:entr_void}store{}", + "and destroy all other Jokers" + }, + { + "When another Joker triggers", + "{C:entr_void}forcetrigger{} a random stored Joker" + }, + { + "{s:0} " + } + } + }, + j_entr_yaldabaoth = { + name = "Yaldabaoth", + text = { + { + "Apply {C:entr_void}Marked for Death{}", + "to one {C:attetntion}random{} card per Booster Pack", + }, + { + "When a card {C:entr_void}Marked for Death{}", + "is destroyed gain {C:gold}+#1#{} Ascension Power", + "{C:inactive}(Currently {C:gold}+#2# {C:inactive}Ascension Power)" + }, + { + "{s:0} " + }, + } + }, + j_entr_mutagenesis = { + name = "Mutagenesis", + text = { + { + "Effects from {C:attention}Enhancements{} or", + "{C:dark_edition}Editions{} are added to this Joker", + }, + { + "{s:0} " + }, + } + }, + j_entr_crooked_penny = { + name = "Crooked Penny", + text = { + { + "Multiplies payout by {X:money,C:white}X#1#{}", + "for every {C:blue}Hand{} played this round", + "{C:inactive}(Extra copies stack additively)" + }, + { + "Set money to {C:entr_void}$0{}", + "when leaving the shop" + }, + { + "{s:0} " + }, + } + }, + j_entr_phoenix_a = { + name = "Phoenix A*", + text = { + { + "This Joker is played as the {C:entr_void}last{}", + "card of hand and destroys every", + "{C:entr_void}consecutive{} card with the same rank", + "starting from the end before scoring" + }, + { + "This Joker gains {X:mult,C:white}X#1#{} Mult", + "and {X:blue,C:white}X#2#{} Chips whenever", + "a card is destroyed by it", + "{C:inactive}(Currently {X:mult,C:white}X#3#{C:inactive} {X:blue,C:white}X#4#{C:inactive})" + }, + { + "{s:0} " + }, + } + }, + j_entr_antimatter_sheath = { + name = "Antimatter Sheath", + text = { + { + "When round begins add {C:attention}#1#{}", + "temporary copie#1# of", + "{C:attention}The Dagger{} to your hand" + }, + { + "When {C:attention}The Dagger{} is", + "scored destroy a {C:attention}random{}", + "card in full deck and gain", + "{X:mult,C:white}X#2#{} Mult and {X:chips,C:white}X#3#{} Chips", + "{C:inactive}(Currently {X:mult,C:white}X#4#{C:inactive}, {X:chips,C:white}X#5#{C:inactive})" + }, + { + "{s:0} " + }, + } + }, + j_entr_caledscratch = { + name = "Caledscratch", + text = { + { + "Playing card retriggers are", + "blocked and stored. Retrigger", + "leftmost {C:attention}Joker{} once for", + "every {C:entr_void}stored{} retrigger", + "then reset" + }, + { + "{s:0} " + }, + } + }, + j_entr_nyx = { + name = "Nyx, Lord of Void", + text = { + { + "When {C:attention}Blind{} is selected", + "create {C:attention}1{} {C:dark_edition}Negative{} {C:attention}Temporary{} ", + "{C:entr_void}Inverted{} Joker for every", + "other non-Inverted Joker" + }, + { + "Use this Joker for {X:money,C:white}X#1#{} this", + "Jokers cost and the highlighted", + "cards cost to remove {C:entr_void}Temporary{}", + "from all selected cards", + "{C:inactive}(Currently {C:money}$#2#{C:inactive})" + }, + { + "{s:0} " + } + } + } }, Blind = { bl_entr_red = { @@ -2142,6 +2774,15 @@ local decs = { "???" } }, + bl_entr_abyss = { + name = "The Abyss", + text = { + "Gains effects and increases", + "requirement when beaten", + "Ante increases upon loss when", + "losing twice in a row lose the run", + } + }, bl_entr_void = { name = "???", text = { @@ -2192,7 +2833,7 @@ local decs = { name = "Deceitful Decay", text = { "All you know shall crumble,", - "Dust to dust.", + "dust to dust.", "(Jokers and hand levels removed)" } }, @@ -2201,7 +2842,7 @@ local decs = { text = { "Void subsumes you,", "(Debuff leftmost Joker slot(s),", - "You must lose this blind.)" + "you must lose this Blind)" } }, bl_entr_endless_entropy_phase_four = { @@ -2215,8 +2856,8 @@ local decs = { bl_entr_alabaster_anchor = { name = "Alabaster Anchor", text = { - "Playing Hands, Discarding, and Select/Unselecting playing cards", - "Temporarily decreases joker values by 5%" + "Playing hands, discarding, and selecting/unselecting playing cards", + "temporarily decreases Joker values by 5%" } }, --alt blinds @@ -2230,29 +2871,29 @@ local decs = { bl_entr_beta = { name = "Beta", text = { - "-1 Hand Size", - "-1 more Hand Size per hand played" + "-1 hand size", + "-1 more hand size per hand played" } }, bl_entr_gamma = { name = "Gamma", text = { - "Divide base mult based on the", + "Divide base Mult based on the", "number of unplayed suits" } }, bl_entr_delta = { name = "Delta", text = { - "Divide final mult based on the", + "Divide final Mult based on the", "number of played hands", - "in this blind" + "in this Blind" } }, bl_entr_epsilon = { name = "Epsilon", text = { - "Divide final mult based on the", + "Divide final Mult based on the", "number of played cards" } }, @@ -2267,21 +2908,21 @@ local decs = { name = "Eta", text = { "#1# cards are debuffed", - "changes when hand played" + "Changes when hand played" } }, bl_entr_theta = { name = "Theta", text = { "Mult operations now", - "affect chips instead" + "affect Chips instead" } }, bl_entr_iota = { name = "Iota", text = { "Applies the effects of #1#", - "changes every hand played" + "Changes every hand played" } }, bl_entr_kappa = { @@ -2308,7 +2949,7 @@ local decs = { bl_entr_nu = { name = "Nu", text = { - "0.8x interest per", + "0.8x Interest per", "card trigger" } }, @@ -2316,7 +2957,7 @@ local decs = { name = "Xi", text = { "First discarded hand", - "becomes eternal" + "becomes Eternal" } }, bl_entr_omicron = { @@ -2330,13 +2971,13 @@ local decs = { name = "Pi", text = { "Discarded cards", - "return to Deck" + "return to deck" } }, bl_entr_rho = { name = "Rho", text = { - "Divide final mult based on the", + "Divide final Mult based on the", "number of played ranks" } }, @@ -2350,8 +2991,8 @@ local decs = { bl_entr_tau = { name = "Tau", text = { - "+1 Selection Limit", - "-1 Selection Limit", + "+1 selection limit", + "-1 selection limit", "when discarding" } }, @@ -2382,7 +3023,7 @@ local decs = { text = { "#1# in 2 chance for", "scored cards to become", - "disavowed" + "Disavowed" } }, bl_entr_omega = { @@ -2397,9 +3038,9 @@ local decs = { bl_entr_styx = { name = "Sorrowful Styx", text = { - "Jokers and Playing cards", + "Jokers and playing cards", "cannot be rearranged", - "Move 1 Joker and Playing Card", + "Move 1 Joker and playing card", "before hand is scored" } }, @@ -2413,10 +3054,10 @@ local decs = { bl_entr_pandora = { name = "Pristine Pandora", text = { - "#1# in 3 chance for", - "when cards are drawn", - "to instead draw a random", - "temporary card" + "#1# in 3 chance to", + "instead draw a random", + "Temporary card", + "when a card is drawn", } }, bl_entr_cassandra = { @@ -2431,10 +3072,10 @@ local decs = { bl_entr_labyrinth = { name = "Limitless Labyrinth", text = { - "+3 Hand Size, +1 Selection limit.", - "Cards cannot be unhighlighted", - "Highlight a random card when a", - "card is highlighted" + "+3 hand size, +1 selection limit", + "Cards cannot be deselected", + "Select a random card when a", + "card is selected" } }, }, @@ -2463,21 +3104,21 @@ local decs = { e_entr_freaky = { name = "Freaky", text = { - "Chips {X:entr_freaky,C:white}Xlog_#1#(Chips){}" + "{X:entr_freaky,C:white}Xlog_#1#(Chips){} Chips" }, }, e_entr_neon = { name = "Neon", text = { "Passively provides", - "{C:attention}X#1#{} Shop Costs" + "{C:attention}X#1#{} shop costs" }, }, e_entr_lowres = { name = "Low-Res", text = { - "{C:attention}Retrigger{} this cards {C:attention}#1#{} times", - "{C:attention}X#2#{} Card values {C:inactive}(If Possible){}" + "{C:attention}Retrigger{} this card {C:attention}#1#{} times", + "{C:attention}X#2#{} card values {C:inactive}(If possible){}" }, }, e_entr_kaleidoscopic = { @@ -2522,9 +3163,19 @@ local decs = { text = { "Gain {X:dark_edition,C:white}Entropy{} when playing", "Editioned/Enhanced cards, secret hands or", - "using consumables. {C:entr_entropic}Beyond{}, {C:cry_exotic}Gateway{}", + "using consumables, {C:entr_entropic}Beyond{}, {C:cry_exotic}Gateway{}", "and {C:spectral}Spectral Packs{} show up more often", - "chips are lowered based on {X:dark_edition,C:white}Entropy{}" + "Chips are lowered based on {X:dark_edition,C:white}Entropy{}" + } + }, + b_entr_doc_cryptidless = { + name = "Deck of Containment", + text = { + "Gain {X:dark_edition,C:white}Entropy{} when playing", + "Editioned/Enhanced cards, secret hands or", + "using consumables, {C:entr_entropic}Fervour?{}, {C:cry_exotic}Soul{}", + "and {C:spectral}Spectral Packs{} show up more often", + "Chips are lowered based on {X:dark_edition,C:white}Entropy{}" } }, b_entr_crafting = { @@ -2539,7 +3190,7 @@ local decs = { b_entr_butterfly = { name = "Butterfly Deck", text = { - "{C:attention}-2{} Joker Slots", + "{C:attention}-2{} Joker slots", "Sold Jokers have a {C:green}1 in 2{}", "chance to still trigger" } @@ -2547,36 +3198,36 @@ local decs = { b_entr_ambisinister = { name = "Ambisinister Deck", text = { - "{C:attention}Joker Slots{} and", - "{C:dark_edition}Card Selection Limit{}", + "{C:attention}Joker slots{} and", + "{C:dark_edition}card selection limit{}", "are now a shared resource", - "{C:attention}+3{} Joker Slots" + "{C:attention}+3{} Joker slots" } }, b_entr_gemstone = { name = "Gemstone Deck", text = { - "Non Rune Consumables have a {C:green}#1# in #2#{}", + "Non-Rune consumables have a {C:green}#1# in #2#{}", "chance to {C:red}fail{}, create a", - "random {C:purple}Rune Card{} every", - "{C:attention}2{} Non Rune Consumables used" + "random {C:purple}Rune card{} every", + "{C:attention}2{} non-Rune consumables used" } }, b_entr_corrupted = { name = "Corrupted Deck", text = { - "{C:attention}Jokers{} and {C:attention}Consumables{}", - "Cycle between {C:attention}3{} options", - "{C:red}-1{} Shop Slot" + "{C:attention}Jokers{} and {C:attention}consumables{}", + "cycle between {C:attention}3{} options", + "{C:red}-1{} shop slot" } }, b_entr_discordant = { name = "Malformed Deck", text = { - "Created {C:attention}Cards{}, {C:attention}Vouchers{}", - "and {C:attention}Boosters{} are replaced", + "Created {C:attention}cards{}, {C:attention}Vouchers{}", + "and {C:attention}Booster Packs{} are replaced", "by a random card type", - "Rerolls scale {C:red}Twice{} as fast" + "Rerolls scale {C:red}twice{} as fast" } }, }, @@ -2601,18 +3252,28 @@ local decs = { text = { "Gain {X:dark_edition,C:white}Entropy{} when playing", "Editioned/Enhanced cards, secret hands or", - "using consumables. {C:entr_entropic}Beyond{}, {C:cry_exotic}Gateway{}", + "using consumables, {C:entr_entropic}Beyond{}, {C:cry_exotic}Gateway{}", "and {C:spectral}Spectral Packs{} show up more often", - "chips are lowered based on {X:dark_edition,C:white}Entropy{}" + "Chips are lowered based on {X:dark_edition,C:white}Entropy{}" + } + }, + sleeve_entr_doc_cryptidless = { + name = "Anomalous Sleeve", + text = { + "Gain {X:dark_edition,C:white}Entropy{} when playing", + "Editioned/Enhanced cards, secret hands or", + "using consumables, {C:entr_entropic}Fervour?{}, {C:cry_exotic}Soul{}", + "and {C:spectral}Spectral Packs{} show up more often", + "Chips are lowered based on {X:dark_edition,C:white}Entropy{}" } }, sleeve_entr_ambisinister = { name = "Ambisinister Sleeve", text = { - "{C:attention}Joker Slots{} and", - "{C:dark_edition}Card Selection Limit{}", + "{C:attention}Joker slots{} and", + "{C:dark_edition}card selection limit{}", "are now a shared resource", - "{C:attention}+3{} Joker Slots" + "{C:attention}+3{} Joker slots" }, }, sleeve_entr_crafting = { @@ -2627,7 +3288,7 @@ local decs = { sleeve_entr_butterfly = { name = "Butterfly Sleeve", text = { - "{C:attention}-2{} Joker Slots", + "{C:attention}-2{} Joker slots", "Sold Jokers have a {C:green}1 in 2{}", "chance to still trigger" } @@ -2635,18 +3296,18 @@ local decs = { sleeve_entr_gemstone = { name = "Gemstone Sleeve", text = { - "Non Rune Consumables have a {C:green}#1# in #2#{}", + "Non-Rune consumables have a {C:green}#1# in #2#{}", "chance to {C:red}fail{}, create a", - "random {C:purple}Rune Card{} every", - "{C:attention}2{} Non Rune Consumables used" + "random {C:purple}Rune card{} every", + "{C:attention}2{} non-Rune consumables used" }, }, sleeve_entr_corrupted = { name = "Corrupted Sleeve", text = { - "{C:attention}Jokers{} and {C:attention}Consumables{}", - "Cycle between {C:attention}2{} options", - "{C:red}-1{} Shop Slot" + "{C:attention}Jokers{} and {C:attention}consumables{}", + "cycle between {C:attention}2{} options", + "{C:red}-1{} shop slot" } }, }, @@ -2664,7 +3325,7 @@ local decs = { name = "The Statue", text = { "Convert {C:attention}#1#{} random card#1#", - "in the whole deck to {C:attention}#2#{}", + "in full deck to {C:attention}#2#{}", "selected card#2# then transform the", "selected card#2# into a blank {C:attention}Stone Card{}" } @@ -2673,14 +3334,14 @@ local decs = { name = "Whetstone", text = { "{C:green}#1# in #2#{} chance to", - "randomly {C:attention}upgrade{} the enhancement", + "randomly {C:attention}upgrade{} the Enhancement", "of up to #3# selected card#3#" } }, c_entr_feast = { name = "The Feast", text = { - "{C:attention}Sell{} and {C:attention}Destroy{}", + "{C:attention}Sell{} and {C:attention}destroy{}", "#1##1# selected card#1#", "from the {C:attention}shop{}", "for {X:attention,C:white}X#2#{} their buy cost" @@ -2690,7 +3351,7 @@ local decs = { name = "The Servant", text = { "Create {C:attention}#1#{} random consumable#1# of an", - "{C:red}Inversed{} type of #2#{C:attention}#2#{} selected card#2#", + "{C:red}Inverted{} type of #2#{C:attention}#2#{} selected card#2#", "{C:inactive}(Must have room){}" } }, @@ -2706,32 +3367,31 @@ local decs = { name = "The Scar", text = { "Apply a {C:dark_edition}Scarred{} sticker", - "to up to {C:attention}#1#{} selected card#1#", - "selected in hand" + "to up to {C:attention}#1#{} selected card#1#" } }, c_entr_dagger = { name = "The Dagger", text = { - "Destroy {C:attention}#1#{} selected Playing Card#1#", - "and add {X:dark_edition,C:white}X#2#{} the chips", - "to your {C:attention}most played{} hand's chips" + "Destroy {C:attention}#1#{} selected playing card#1#", + "and add {X:dark_edition,C:white}X#2#{} the Chips", + "to your {C:attention}most played{} hand's Chips" } }, c_entr_penumbra = { name = "Penumbra", text = { - "Banish the enhancement of {C:attention}#1#{}", - "selected card#1# in hand", - "then {C:attention}destroy{} the selected card#1#" + "Banish the Enhancement of {C:attention}#1#{}", + "selected card#1#, then", + "{C:attention}destroy{} the selected card#1#" } }, c_entr_integrity = { name = "Integrity", text = { - "Remove the {C:attention}enhancement#1#{} of", + "Remove the {C:attention}Enhancement#1#{} of", "{C:attention}#1#{} selected card#1# then", - "add a random {C:dark_edition}seal and edition{}" + "add a random {C:dark_edition}Seal and Edition{}" } }, c_entr_forgiveness = { @@ -2744,8 +3404,8 @@ local decs = { c_entr_feud = { name = "The Feud", text = { - "Select {C:attentiom}#1#{} card#1#", - "Add {X:chips,C:white}X#3#{} the {C:attention}right{} cards {C:blue}chips{}", + "Select {C:attentiom}#1#{} card#1#,", + "add {X:chips,C:white}X#3#{} the {C:attention}right{} card's {C:blue}Chips{}", "to the {C:attention}left{} card then", "{C:attention}destroy{} the right card#2#" } @@ -2754,7 +3414,7 @@ local decs = { name = "The Advisor", text = { "Create an {C:attention}Enhanced{} copy", - "of your most played hands {C:attention}example{}", + "of your most played hand's {C:attention}example{}", "and {C:attention}draw{} it to hand" } }, @@ -2762,38 +3422,37 @@ local decs = { name = "The Heretic", text = { "Randomize one {C:attention}aspect{} or {C:attention}modification{}", - "of up to {C:attention}#1#{} selected card#1#", - "held in hand" + "of up to {C:attention}#1#{} selected card#1#" } }, c_entr_earl = { name = "The Earl", text = { "For the next round", - "spare {C:blue}Hands{} give {C:money}$#1#{}", - "and spare {C:red}Discards{} give {C:money}$#2#{}" + "spare {C:blue}hands{} give {C:money}$#1#{}", + "and spare {C:red}discards{} give {C:money}$#2#{}" } }, c_entr_mason = { name = "The Mason", text = { - "Create {C:attention}#1# Stone{} card#1#", - "with a random {C:attention}edition{}" + "Create {C:attention}#1# Stone{} Card#1#", + "with a random {C:attention}Edition{}" } }, c_entr_princess = { name = "The Princess", text = { "For the {C:attention}remainder{} of", - "the {C:attention}current{} ante", + "the {C:attention}current{} Ante,", "{C:planet}Planet{} cards are replaced", - "by {C:purple}Star{} cards" + "with {C:purple}Star{} cards" } }, c_entr_imp = { name = "The Imp", text = { - "Enhance {C:attention}#1#{} Selected card#1#", + "Enhance {C:attention}#1#{} selected card#1#", "into {C:attention}Dark{} Cards" } }, @@ -2863,7 +3522,7 @@ local decs = { name = "The Village", text = { "Give cards {C:attention}held{} in hand", - "{C:blue}+#1#{} bonus chips" + "{C:blue}+#1#{} bonus Chips" } }, c_entr_frail = { @@ -2878,7 +3537,7 @@ local decs = { name = "The Disturbance", text = { "Banish {C:attention}#1#{} selected card#1#", - "Without {C:attention}destroying{} them" + "without {C:attention}destroying{} them" } }, c_entr_avarice = { @@ -2898,8 +3557,8 @@ local decs = { c_entr_garden = { name = "The Garden", text = { - "{C:attention} Randomize{} the rank and suit of {C:attention}#1#{} cards", - "all into the same rank and suit" + "{C:attention}Converts{} the rank and suit of {C:attention}#1#{} cards", + "to a single random rank and suit" } }, c_entr_desert = { @@ -2930,7 +3589,7 @@ local decs = { name = "The Disturbance", text = { "Banish {C:attention}#1#{} selected card#1#", - "Without {C:attention}destroying{} them" + "without {C:attention}destroying{} them" } }, c_entr_avarice = { @@ -2950,8 +3609,8 @@ local decs = { c_entr_garden = { name = "The Garden", text = { - "{C:attention} Randomize{} the rank and suit of {C:attention}#1#{} cards", - "all into the same rank and suit" + "{C:attention}Converts{} the rank and suit of {C:attention}#1#{} cards", + "to a single random rank and suit" } }, c_entr_desert = { @@ -2978,14 +3637,14 @@ local decs = { "{S:0.8}({S:0.8,V:1}lvl.#2#{S:0.8}){} Level up", "{C:attention}#1#", "{C:mult}+#3#{} Mult and", - "{C:chips}+#4#{} chip#4#", + "{C:chips}+#4#{} Chip#4#", }, }, c_entr_tyche = { name = "Tyche", text = { "Level up the {C:blue}Chips{} and {C:red}Mult{}", - "per level of a {C:attention}random{} Poker Hand", + "per level of a {C:attention}random{} poker hand", "{C:mult}+#2#{} Mult per level and", "{C:chips}+#1#{} Chips per level" }, @@ -2995,7 +3654,7 @@ local decs = { text = { "Level up the {C:blue}Chips{} and {C:red}Mult{}", "per level of your {C:attention}highest{}", - "level Poker Hand", + "level poker hand", "{C:mult}+#2#{} Mult per level and", "{C:chips}+#1#{} Chips per level" }, @@ -3004,7 +3663,7 @@ local decs = { name = "Chiron", text = { "Level up the {C:blue}Chips{} per level", - "of a {C:attention}random{} Poker Hand", + "of a {C:attention}random{} poker hand", "{C:chips}X#1#{} Chips per level" }, }, @@ -3012,7 +3671,7 @@ local decs = { name = "Neith", text = { "Level up the {C:red}Mult{} per level", - "of a {C:attention}random{} Poker Hand", + "of a {C:attention}random{} poker hand", "{C:mult}X#1#{} Mult per level" }, }, @@ -3020,9 +3679,9 @@ local decs = { name = "Sputnik I", text = { "Level up {C:attention}#1#{}", - "random Poker Hands", + "random poker hands", "{C:mult}+???{} Mult and", - "{C:chips}+???{} chips", + "{C:chips}+???{} Chips", }, }, }, @@ -3061,13 +3720,13 @@ local decs = { v_entr_providence = { name = "Providence", text = { - "Runes have {C:purple,E:1}Enhanced{} effects", + "Runes have {C:purple,E:1}enhanced{} effects", }, }, v_entr_ascension = { name = "Ascension", text = { - "Copy the {C:attention}First", + "Copy the {C:attention}first", "used {C:purple}Rune{} each round" }, }, @@ -3082,7 +3741,7 @@ local decs = { v_entr_expansion_pack = { name = "Expansion Pack", text = { - "Create a {C:attention}Deck{}", + "Create a {C:attention}deck{}", "in the Voucher slots", "every {C:attention}2{} antes" }, @@ -3098,22 +3757,22 @@ local decs = { c_entr_root_kit = { name = "(~)$ rootkit", text = { - "For the next defeated Blind", + "For the next defeated Blind,", "spare hands give {C:red}$#1#{}", } }, c_entr_break = { name = "(~)$ break;", text = { - "Return to the {C:red}Blind selection{} screen", - "The {C:red}current Blind{} is still upcoming", + "Return to the {C:red}Blind selection{} screen,", + "the {C:red}current Blind{} is still upcoming", } }, c_entr_interference = { name = "(~)$ interference", text = { "{C:red}Randomizes{} {C:attention}played hands{}, {C:attention}Blind size{}", - "and {C:attention}payout{} for the remainder of", + "and {C:attention}Payout{} for the remainder of", "the {C:red}current round{}" } }, @@ -3146,7 +3805,7 @@ local decs = { "Transform {C:red}#1#{} selected {C:attention}Joker#1#{}", "to the {C:red}Joker{} that appears", "previously in the {C:red}collection{}", - "{C:inactive}(Currently: #2#){}" + "{C:inactive}(Currently #2#){}" } }, c_entr_cookies = { @@ -3173,8 +3832,8 @@ local decs = { name = "(~)$ ctrl+x", text = { "{C:red}#1#{} #2# {C:attention}card{},", - "{C:attention}Booster{}, or {C:attention}Voucher{}", - "{C:inactive}(Currently: #3#){}" + "{C:attention}Booster Pack{}, or {C:attention}Voucher{}", + "{C:inactive}(Currently #3#){}" } }, c_entr_segfault = { @@ -3213,7 +3872,7 @@ local decs = { c_entr_multithread = { name = "(~)$ multithread", text = { - "Create temporary {C:dark_edition}Negative{} copies", + "Create Temporary {C:dark_edition}Negative{} copies", "of all {C:red}selected{} cards in {C:red}hand{}", } }, @@ -3242,7 +3901,7 @@ local decs = { c_entr_quickload = { name = "(~)$ quickload", text = { - "{C:red}Retrigger{} the payout screen", + "{C:red}Retrigger{} the Payout screen", "with {C:red}no{} Blind money", } }, @@ -3278,32 +3937,32 @@ local decs = { c_entr_transpile = { name = "(~)$ transpile", text = { - "{C:dark_edition}#1#{} Joker Slots", - "{C:dark_edition}+#2#{} Consumable Slots", - "{C:dark_edition}+#3#{} Hand Size" + "{C:dark_edition}#1#{} Joker slots", + "{C:dark_edition}+#2#{} consumable slots", + "{C:dark_edition}+#3#{} hand size" } }, c_entr_detour = { name = "(~)$ detour", text = { - "Create a {C:attention}card, booster, or voucher{}", + "Create a {C:attention}card, booster pack, or voucher{}", "with a type {C:attention}corresponding{} to the", - "{C:attention}last obtained{} card, booster or voucher", - "{C:inactive}(Currently: #1#){}" + "{C:attention}last obtained{} card, booster pack or voucher", + "{C:inactive}(Currently #1#){}" } }, c_entr_mbr = { name = "(~)$ mbr", text = { "Add a {C:dark_edition}Banana Voucher Pack{}", - "to the booster packs of the current shop" + "to the Booster Packs of the current shop" } }, c_entr_desync = { name = "(~)$ desync", text = { "Apply a {C:red}Desync{} sticker to", - "1 selected Joker or Consumable", + "1 selected Joker or consumable", } }, c_entr_badarg = { @@ -3317,15 +3976,15 @@ local decs = { c_entr_interpolate = { name = "(~)$ interpolate", text = { - "Select and {C:red}Destroy{} #1# selected {C:attention}Joker#1#{}", - "or {C:attention}Consumable#1#{}, This card may", + "Select and {C:red}destroy{} #1# selected {C:attention}Joker#1#{}", + "or {C:attention}consumable#1#{}, this card may", "appear in future {C:red}Twisted{} or {C:cry_code}Program{} packs" } }, c_entr_overload = { name = "(~)$ overload", text = { - "The {C:attention}Next{} played hand", + "The {C:attention}next{} played hand", "counts as containing {C:red}all{}", "other hands" } @@ -3333,8 +3992,8 @@ local decs = { c_entr_echo = { name = "(~)$ echo", text = { - "Select {C:attention}Two{} consumables", - "Two {C:dark_edition}trigger{} each-others effects", + "Select {C:attention}two{} consumables", + "to {C:dark_edition}trigger{} each other's effects", "when they are used", "{C:inactive}(including from the shop){}" } @@ -3626,7 +4285,7 @@ local decs = { name = "Black Dwarf", text = { "Level up {C:gold}Ascension Power{}", - "Per Level of all Poker Hands", + "per level of all poker hands", "{C:gold}+#1#{} Ascension Power" } }, @@ -3634,30 +4293,31 @@ local decs = { name = "Frozen Star", text = { "Level up your {C:attention}highest{} level", - "Poker Hand {C:gold}+#1#{} Ascension Power" + "poker hand", + "{C:gold}+#1#{} Ascension Power" } }, c_entr_coatlicue = { name = "Coatlicue", text = { - "Level up a {C:attention}random{} Poker Hands", + "Level up a {C:attention}random{} poker hand's", "{C:gold}Ascension Power{} by {C:attention}1/20{}th", - "of its {C:chips}Chips{} per Level" + "of its {C:chips}Chips{} per level" } }, c_entr_threefour = { name = "34 Tauri", text = { - "Level up a {C:attention}random{} Poker Hands", - "{C:gold}Ascension Power{} by {C:attention}1/3{}th", - "of its {C:mult}Mult{} per Level" + "Level up a {C:attention}random{} poker hand's", + "{C:gold}Ascension Power{} by {C:attention}1/3{}rd", + "of its {C:mult}Mult{} per level" } }, c_entr_fuzzball = { name = "Fuzzball", text = { "Level up {C:attention}#1#{}", - "random Poker Hands", + "random poker hands", "{C:gold}+#2#{} Ascension Power", } }, @@ -3677,7 +4337,7 @@ local decs = { "a {C:entr_omen}selected card{} with", "a card of {C:entr_omen}your choice{}", "then {C:attention}destroy{} the selected card", - "{C:inactive}(Rare consumables and{}", + "{C:inactive}(Hidden consumables and{}", "{C:inactive}>=Exotic Jokers excluded){}" } }, @@ -3792,8 +4452,8 @@ local decs = { name = "Inscribe", text = { "Multiply the {C:attention}base{} Chips", - "of number cards in hand by {X:chips,C:white}X#1#{}", - "then {C:attention}debuff{} all number cards", + "of numbered cards in hand by {X:chips,C:white}X#1#{}", + "then {C:attention}debuff{} all numbered cards", "in hand for 1 round" } }, @@ -3803,7 +4463,7 @@ local decs = { "Destroy 1 selected {C:attention}Editioned{}", "Joker then apply the {C:attention}previous{} Edition", "to {C:attention}#2#{} random cards in hand", - "{C:inactive}(Currently: {C:dark_edition}#1#{C:inactive}, Excludes {C:dark_edition}Negative{C:inactive})" + "{C:inactive}(Currently {C:dark_edition}#1#{C:inactive}, excludes {C:dark_edition}Negative{C:inactive})" } }, c_entr_changeling = { @@ -3842,7 +4502,7 @@ local decs = { text = { "Convert up to {C:attention}#1#{}", "selected cards to", - "{C:attention}Flesh{} cards" + "{C:attention}Flesh{} Cards" } }, c_entr_rejuvenate = { @@ -3860,14 +4520,14 @@ local decs = { text = { "Select {C:attention}#1#{} Jokers and", "debuff a {C:attention}random{} selected", - "Joker then turn it into the", + "Joker, then turn it into the", "{C:attention}other{} Joker" } }, c_entr_charm = { name = "Charm", text = { - "Apply a {C:attention}Random{} {C:dark_edition}Edition{} and", + "Apply a {C:attention}random{} {C:dark_edition}Edition{} and", "{C:attention}Eternal{} to a selected Joker", } }, @@ -3897,7 +4557,7 @@ local decs = { c_entr_evocation = { name = "Evocation", text = { - "{C:attention}Upgrade{} #1# selected Jokers", + "{C:attention}Upgrade{} #1# selected Joker's", "rarity then destroy all other Jokers", "{C:blue}#2#{} hands" } @@ -3946,14 +4606,14 @@ local decs = { "Apply the {C:attention}previous{} Edition", "to adjacent cards of 1 selected card", "or consumable", - "{C:inactive}(Currently: #1#){}" + "{C:inactive}(Currently #1#){}" } }, c_entr_disavow = { name = "Disavow", text = { - "{C:red}Disavow{} {C:attention}1{} Selected Card", - "held in hand. All {C:attention}other{} cards held", + "{C:red}Disavow{} {C:attention}1{} selected card", + "held in hand, all {C:attention}other{} cards held", "in hand gain its Enhancement" } }, @@ -3990,7 +4650,7 @@ local decs = { c_entr_serpents = { name = "Pact of Serpents", text = { - "Create a random {C:attention}Rare{} Consumable", + "Create a random {C:legendary,E:1}hidden{} consumable", "{C:inactive}(May overflow){}" } }, @@ -4035,7 +4695,7 @@ local decs = { c_entr_idyll = { name = "Idyll", text = { - "Create a {C:attention}Copy{}", + "Create a {C:attention}copy{}", "and an {C:entr_entropic}Ascended{}", "variant of the last obtained {C:attention}Tag{}" } @@ -4097,58 +4757,58 @@ local decs = { name = "Cage", text = { "Apply {C:attention}Temporary{} to", - "{C:attention}#1#{} Selected Card#1#", - "Then change their suit into the", - "{C:attention}leftmost{} Selected Card's suit" + "{C:attention}#1#{} selected card#1#,", + "then change their suit into the", + "{C:attention}leftmost{} selected card's suit" } }, c_entr_implode = { name = "Implode", text = { "Apply {C:attention}Temporary{} to", - "{C:attention}#1#{} Selected Card#1#", - "Then turn them into {C:attention}Ace of Nils{}" + "{C:attention}#1#{} selected card#1#,", + "then turn them into {C:attention}Ace of Nils{}" } }, c_entr_meteor = { name = "Meteor", text = { "Apply {C:attention}Temporary{} to", - "{C:attention}#1#{} random Card#1# in hand", - "Then give them {C:purple}Sapphire{} Seals" + "{C:attention}#1#{} random card#1# in hand,", + "then give them {C:purple}Sapphire{} Seals" } }, c_entr_concentrate = { name = "Concentrate", text = { "Apply {C:attention}Temporary{} to", - "{C:attention}All{} Selected Cards", - "Then copy them to hand" + "{C:attention}all{} selected cards,", + "then copy them to hand" } }, c_entr_pyrite = { name = "Pyrite", text = { "Apply {C:attention}Temporary{} to", - "{C:attention}#1#{} Selected Card#1#", - "Then turn them into {C:attention}Gold Cards{}" + "{C:attention}#1#{} selected card#1#,", + "then turn them into {C:attention}Gold Cards{}" } }, c_entr_set = { name = "Set", text = { "Apply {C:attention}Temporary{} to", - "{C:attention}#1#{} Selected Card#1#", - "Then change their rank into the", - "{C:attention}leftmost{} Selected Card's rank" + "{C:attention}#1#{} selected card#1#,", + "then change their rank into the", + "{C:attention}leftmost{} selected card's rank" } }, c_entr_trickster = { name = "Trickster", text = { "Apply {C:attention}Temporary{} to", - "{C:attention}#1#{} Selected Card#1#", - "Then turn them into a", + "{C:attention}#1#{} selected card#1#,", + "then turn them into a", "random {C:red}Rare{} {C:attention}Joker{}" } }, @@ -4156,14 +4816,14 @@ local decs = { name = "Sundial", text = { "Apply {C:attention}Temporary{} to", - "{C:attention}#1#{} Selected Card#1#", - "Then turn them into {C:attention}Glass Cards{}" + "{C:attention}#1#{} selected card#1#,", + "then turn them into {C:attention}Glass Cards{}" } }, c_entr_candle = { name = "Candle", text = { - "{C:attention}+#1#{} Hand Size", + "{C:attention}+#1#{} hand size", "for this Blind" } }, @@ -4171,24 +4831,24 @@ local decs = { name = "Faith", text = { "Apply {C:attention}Temporary{} to", - "{C:attention}#1#{} Selected Card#1#", - "Then turn them into {C:attention}Lucky Cards{}" + "{C:attention}#1#{} selected card#1#,", + "then turn them into {C:attention}Lucky Cards{}" } }, c_entr_oasis = { name = "Oasis", text = { "Apply {C:attention}Temporary{} to", - "A Selected Card then", - "Copy it {C:attention}#1#{} times" + "a selected card, then", + "copy it {C:attention}#1#{} times" } }, c_entr_ragtag = { name = "Ragtag", text = { "Apply {C:attention}Temporary{} to", - "{C:attention}#1#{} Selected Card#1#", - "Then turn them into a", + "{C:attention}#1#{} selected card#1#,", + "then turn them into a", "random {C:blue}Common{} {C:attention}Joker{}" } }, @@ -4196,38 +4856,38 @@ local decs = { name = "Burn", text = { "Apply {C:attention}Temporary{} to", - "{C:attention}#1#{} random Card#1# in hand", - "Then give them {C:purple}Pink{} Seals" + "{C:attention}#1#{} random card#1# in hand,", + "then give them {C:purple}Pink{} Seals" } }, c_entr_escape = { name = "Escape", text = { "Apply {C:attention}Temporary{} to", - "{C:attention}#1#{} random Card#1# in hand", - "Then randomize them" + "{C:attention}#1#{} random card#1# in hand,", + "then randomize them" } }, c_entr_gbdecay = { name = "Decay", text = { "Apply {C:attention}Temporary{} to", - "{C:attention}#1#{} Selected Card#1#", - "Then turn them into {C:attention}Steel Cards{}" + "{C:attention}#1#{} selected card#1#,", + "then turn them into {C:attention}Steel Cards{}" } }, c_entr_visage = { name = "Visage", text = { "Apply {C:attention}Temporary{} to", - "{C:attention}#1#{} Selected Card#1#", - "Then turn them into {C:attention}Stone Cards{}" + "{C:attention}#1#{} selected card#1#,", + "then turn them into {C:attention}Stone Cards{}" } }, c_entr_nebula = { name = "Nebula", text = { - "Create {C:attention}#1#{} Random", + "Create {C:attention}#1#{} random", "{C:attention}Temporary{} Blind Tokens" } }, @@ -4235,15 +4895,15 @@ local decs = { name = "Essence", text = { "Apply {C:attention}Temporary{} to", - "{C:attention}#1#{} Selected Card#1#", - "Then turn them into {C:attention}Random{}", + "{C:attention}#1#{} selected card#1#,", + "then turn them into {C:attention}random{}", "suited Kings" } }, c_entr_manifest = { name = "Manifest", text = { - "{C:attention}+#1#{} Selection Limit", + "{C:attention}+#1#{} selection limit", "for this Blind" } }, @@ -4251,8 +4911,8 @@ local decs = { name = "Hope", text = { "Apply {C:attention}Temporary{} to", - "{C:attention}#1#{} random Card#1# in hand", - "Then give them {V:1}Silver{} Seals" + "{C:attention}#1#{} random card#1# in hand,", + "then give them {V:1}Silver{} Seals" } }, }, @@ -4279,7 +4939,7 @@ local decs = { name = "Flipside", text = { "Convert {C:attention}#1#{} selected consumable#1#", - "Into an {C:red}Inverted{} variant", + "into an {C:red}Inverted{} variant", } }, c_entr_destiny = { @@ -4287,7 +4947,7 @@ local decs = { text = { "Sacrifice {C:attention}5{} playing cards to craft", "one Joker based on their Enhancements", - "{C:inactive}(Currently: #1#){}" + "{C:inactive}(Currently #1#){}" } }, c_entr_shatter = { @@ -4295,7 +4955,7 @@ local decs = { text = { "Apply {C:dark_edition}Fractured{} to", "{C:attention}#1#{} selected cards in hand", - "{C:red}-#2#{} Card Selection Limit" + "{C:red}-#2#{} card selection limit" } }, c_entr_lust = { @@ -4327,17 +4987,17 @@ local decs = { name = "Rune of Oss", text = { "The next opened {C:attention}Booster Pack{}", - "will contain a {C:purple}Rare{} consumable", - "{C:inactive}(If Possible)" + "will contain a {C:legendary,E:1}hidden{} consumable", + "{C:inactive}(If possible)" } }, c_entr_oss_providence = { name = "Rune of Oss{C:purple}+{}", text = { "The next opened {C:attention}Booster Pack{}", - "will contain a {C:purple}Rare{} consumable", - "and a {C:purple}Rune{} is {C:purple,E:1}Generated{} when this occurs", - "{C:inactive}(If Possible)" + "will contain a {C:legendary,E:1}hidden{} consumable", + "and a {C:purple}Rune{} is {C:purple,E:1}generated{} when this occurs", + "{C:inactive}(If possible)" } }, c_entr_enchant = { @@ -4352,8 +5012,8 @@ local decs = { name = "Manifest", text = { "Create {C:entr_entropic}Ascended{}", - "variants of this antes", - "Skip Tags" + "variants of this Ante's", + "skip Tags" } }, }, @@ -4501,15 +5161,15 @@ local decs = { }, tag_entr_ascendant_voucher = { name = "{C:gold}Voucher Tag{}", - text = { "Adds one Tier {C:attention}3{} Voucher", "to the next shop" }, + text = { "Adds one tier {C:attention}3{} Voucher", "to the next shop" }, }, tag_entr_ascendant_voucher_cryptidless = { name = "{C:gold}Voucher Tag{}", - text = { "Adds {C:attention}Two{} Vouchers", "to the next shop" }, + text = { "Adds {C:attention}two{} Vouchers", "to the next shop" }, }, tag_entr_ascendant_better_voucher = { name = "{C:gold}Pristine Voucher Tag{}", - text = { "Adds 2 Tier {C:attention}3{} Vouchers", "to the next shop" }, + text = { "Adds 2 tier {C:attention}3{} Vouchers", "to the next shop" }, }, tag_entr_ascendant_saint = { name = "{C:gold}Saint Tag{}", @@ -4695,7 +5355,7 @@ local decs = { tag_entr_ascendant_arcane = { name = "{C:gold}Arcane Tag{}", text = { - "Obtain {C:attention}Two{} random {C:purple}Runes{}" + "Obtain {C:attention}two{} random {C:purple}Runes{}" }, }, @@ -4705,7 +5365,99 @@ local decs = { }, tag_entr_ascendant_kitty = { name = "{C:gold}Kitty Tag{}", - text = { "Every {C:attention}Kitty Tag{} owned", "Gives {X:chips,C:white}X#1#{} Chips" }, + text = { "Every {C:attention}Kitty Tag{} owned", "gives {X:chips,C:white}X#1#{} Chips" }, + }, + + tag_entr_asc_additive = { + name = "{C:gold}Additive Tag{}", + text = { "{C:green}#1# in #2# chance to enhance", "played Blinds" }, + }, + tag_entr_asc_max = { + name = "{C:gold}Max Tag{}", + text = { "{C:red}X2{} Mult and","{C:blue}X2{} Chips", "after hand is scored" }, + }, + tag_entr_asc_symmetry = { + name = "{C:gold}Symmetry Tag{}", + text = { "Retrigger each scoring Blind","{C:green}#1# in #2# chance to retrigger", "each scoring Blind twice" }, + }, + tag_entr_asc_recursive = { + name = "{C:gold}Recursive Tag{}", + text = { "{X:blue,C:white}X0.1{} Chips for", "each held tag", "{C:inactive}({X:blue,C:white}X#2#{C:inactive} Chips)" }, + }, + tag_entr_asc_wave = { + name = "{C:gold}Wave Tag{}", + text = { "Every {C:attention}played Blind{}", "counts in scoring" }, + }, + tag_entr_asc_prison_break = { + name = "{C:gold}Prisonbreak Tag{}", + text = { "Disable all {C:attention}Jokers", "this Ante" }, + }, + tag_entr_asc_collector = { + name = "{C:gold}Collector Tag{}", + text = { "Next opened {C:attention}Symbol Pack{}", "will have Editioned upgraded Blinds" }, + }, + tag_entr_asc_memory = { + name = "{C:gold}Memory Tag{}", + text = { "Create a random {C:bld_keepsake,E:1}Editioned Keepsake{}", "{C:inactive}(Must have room)" }, + }, + tag_entr_asc_magic = { + name = "{C:gold}Magic Tag{}", + text = { "Create a random {C:attention,E:1}Editioned Trinket{}", "{C:inactive}(Must have room)" }, + }, + tag_entr_asc_debuff = { + name = "{C:gold}Debuff Tag{}", + text = { "Halve {C:blue}Chips{} and {C:red}Mult{} after scoring", "if played hand is a {C:attention}#1#{}" }, + }, + tag_entr_asc_joker = { + name = "{C:gold}Joker Tag{}", + text = { "{C:red}+0.5{} Mult to Joker", "after each played hand" }, + }, + tag_entr_asc_mantle = { + name = "{C:gold}Mantle Tag{}", + text = { "Each hand, {C:red}destroys{}", "{C:attention}1{} played Blind" }, + }, + tag_entr_asc_awe = { + name = "{C:gold}Awe Tag{}", + text = { "Before each hand,", "{C:red}Debuff{} either your", "{C:attention}leftmost{} or {C:attention}rightmost{}", "Trinket" }, + }, + tag_entr_asc_downpour = { + name = "{C:gold}Downpour Tag{}", + text = { "After each hand,", "{C:green}#1# in #2#{} chance for each", "played Blind to lose", "all {C:attention}Modifiers{}" }, + }, + tag_entr_asc_voodoo = { + name = "{C:gold}Voodoo Tag{}", + text = { "Gives an unskippable", "{C:attention}Voodoo Pack{}" }, + }, + tag_entr_asc_burden = { + name = "{C:gold}Burden Tag{}", + text = { "After each hand,", "lose a {C:attention}third{} of held", "{C:money}money{} rounded down" }, + }, + + tag_curse_entr_blind = { + name = "Curse of The Blind", + text = { + "Cards in the shop", + "may be {C:red}flipped{}" + } + }, + tag_curse_entr_darkness = { + name = "Curse of Darkness", + text = { + "Booster packs have", + "{C:red}fewer{} choices" + } + }, + tag_curse_entr_lost = { + name = "Curse of The Lost", + text = { + "No {C:red}Small Blind{}" + } + }, + tag_curse_entr_maze = { + name = "Curse of The Maze", + text = { + "Blind order is {C:red}Randomized{}" + } }, }, ["Rune Tag"] = { @@ -4713,7 +5465,7 @@ local decs = { name = "Fehu", text = { "The next {C:attention}sold{} card", - "adds {C:attention}Half{} its sell", + "adds {C:attention}half{} its sell", "value to your Jokers" } }, @@ -4721,7 +5473,7 @@ local decs = { name = "Fehu{C:purple}+{}", text = { "The next {C:attention}sold{} card", - "adds its {C:purple,E:1}Full{} sell", + "adds its {C:purple,E:1}full{} sell", "value to your Jokers" } }, @@ -4729,7 +5481,7 @@ local decs = { name = "Uruz", text = { "Increases the next", - "{C:attention}payout{} by {X:gold,C:white}50%{}", + "{C:attention}Payout{} by {X:gold,C:white}50%{}", "{C:inactive}(Stacks additively){}" } }, @@ -4737,7 +5489,7 @@ local decs = { name = "Uruz{C:purple}+{}", text = { "Increases the next", - "{C:attention}payout{} by {X:purple,C:white,E:1}100%{}", + "{C:attention}Payout{} by {X:purple,C:white,E:1}100%{}", "{C:inactive}(Stacks additively){}" } }, @@ -4752,21 +5504,21 @@ local decs = { name = "Thurisaz{C:purple}+{}", text = { "Copies the next", - "{C:attention}discarded{} card {C:purple,E:1}Twice{}" + "{C:attention}discarded{} card {C:purple,E:1}twice{}" } }, rune_entr_ansuz = { name = "Ansuz", text = { "Copies the next", - "{C:attention}obtained{} tag or rune" + "{C:attention}obtained{} Tag or Rune" } }, rune_entr_ansuz_providence = { name = "Ansuz{C:purple}+{}", text = { - "Copies the next", - "{C:attention}obtained{} tag or rune {C:purple,E:1}Twice{}" + "Copies the next", + "{C:attention}obtained{} Tag or Rune {C:purple,E:1}twice{}" } }, rune_entr_raido = { @@ -4796,7 +5548,7 @@ local decs = { text = { "Levels up the", "next {C:attention}played{} hand", - "{C:purple,E:1}Twice{}" + "{C:purple,E:1}twice{}" } }, rune_entr_gebo = { @@ -4814,7 +5566,7 @@ local decs = { "Creates a card of", "the same type as the", "next {C:attention}sold{} card", - "{C:purple,E:1}(May Overflow){}" + "{C:purple,E:1}(May overflow){}" } }, @@ -4880,7 +5632,7 @@ local decs = { name = "Isaz{C:purple}+{}", text = { "Adds an additional", - "{C:purple,E:1}Half Price{} {C:attention}Voucher{} to", + "{C:purple,E:1}half price{} {C:attention}Voucher{} to", "the next shop" } }, @@ -4889,15 +5641,15 @@ local decs = { name = "Jera", text = { "Copies the next", - "{C:attention}used{} Consumable" + "{C:attention}used{} consumable" } }, rune_entr_jera_providence = { name = "Jera{C:purple}+{}", text = { "Copies the next", - "{C:attention}used{} Consumable", - "{C:purple,E:1}Twice{}" + "{C:attention}used{} consumable", + "{C:purple,E:1}twice{}" } }, @@ -4911,7 +5663,7 @@ local decs = { rune_entr_ihwaz_providence = { name = "Ihwaz{C:purple}+{}", text = { - "{C:purple,E:1}Fully{} Randomizes", + "{C:purple,E:1}Fully{} randomizes", "the next {C:attention}played{} card" } }, @@ -4977,30 +5729,30 @@ local decs = { text = { "Randomly {C:attention}modifies{}", "the next {C:attention}drawn card{}", - "{C:purple,E:1}Twice{}" + "{C:purple,E:1}twice{}" } }, rune_entr_berkano = { name = "Berkano", text = { - "Creates {C:attention}Two{} copies", - "of the next {C:red}Destroyed{} card" + "Creates {C:attention}two{} copies", + "of the next {C:red}destroyed{} card" } }, rune_entr_berkano_providence = { name = "Berkano{C:purple}+{}", text = { - "Creates {C:purple,E:1}Three{} copies", - "of the next {C:red}Destroyed{} card" + "Creates {C:purple,E:1}three{} copies", + "of the next {C:red}destroyed{} card" } }, rune_entr_ehwaz = { name = "Ehwaz", text = { - "Gives access to a {C:attention}Payout{} and a {C:attention}Shop{}", + "Gives access to a {C:attention}Payout{} and a {C:attention}shop{}", "on the next {C:attention}skipped{} Blind" } @@ -5008,8 +5760,8 @@ local decs = { rune_entr_ehwaz_providence = { name = "Ehwaz{C:purple}+{}", text = { - "Gives access to a {C:attention}Payout{} and a {C:attention}Shop{}", - "with {C:purple,E:1}+1{} Shop Slot", + "Gives access to a {C:attention}Payout{} and a {C:attention}shop{}", + "with {C:purple,E:1}+1{} shop slot", "on the next {C:attention}skipped{} Blind" } }, @@ -5017,7 +5769,7 @@ local decs = { rune_entr_mannaz = { name = "Mannaz", text = { - "Adds a {C:spectral}Spectral{} Card to", + "Adds a {C:spectral}Spectral{} card to", "the next {C:attention}opened{} Booster Pack" } @@ -5025,7 +5777,7 @@ local decs = { rune_entr_mannaz_providence = { name = "Mannaz{C:purple}+{}", text = { - "Adds {C:purple,E:1}Two{} {C:spectral}Spectral{} Cards to", + "Adds {C:purple,E:1}two{} {C:spectral}Spectral{} cards to", "the next {C:attention}opened{} Booster Pack" } }, @@ -5040,7 +5792,7 @@ local decs = { name = "Laguz{C:purple}+{}", text = { "Refunds the next {C:attention}discard{}", - "and temporarily gives {C:purple,E:1}+1{} Hand" + "and temporarily gives {C:purple,E:1}+1{} hand" } }, @@ -5057,7 +5809,7 @@ local decs = { "The next {C:attention}probability{} roll", "will {C:green}succeed{} with a", "{C:purple,E:1}33%{} chance to not consume", - "this rune when triggered" + "this Rune when triggered" } }, @@ -5065,15 +5817,15 @@ local decs = { name = "Dagaz", text = { "Inverts the next", - "{C:attention}obtained{} Consumable" + "{C:attention}obtained{} consumable" } }, rune_entr_dagaz_providence = { name = "Dagaz{C:purple}+{}", text = { "Inverts the next", - "{C:attention}obtained{} Consumable", - "{C:purple,E:1}Create{} a random inverted", + "{C:attention}obtained{} consumable", + "{C:purple,E:1}Create{} a random Inverted", "consumable when this occurs", "{C:inactive}(Must have room){}" } @@ -5098,17 +5850,17 @@ local decs = { name = "Oss", text = { "The next opened {C:attention}Booster Pack{}", - "will contain a {C:purple}Rare{} consumable", - "{C:inactive}(If Possible)" + "will contain a {C:legendary,E:1}hidden{} consumable", + "{C:inactive}(If possible)" } }, rune_entr_oss_providence = { name = "Oss{C:purple}+{}", text = { "The next opened {C:attention}Booster Pack{}", - "will contain a {C:purple}Rare{} consumable", - "and a {C:purple}Rune{} is {C:purple,E:1}Generated{} when this occurs", - "{C:inactive}(If Possible)" + "will contain a {C:legendary,E:1}hidden{} consumable", + "and a {C:purple}Rune{} is {C:purple,E:1}generated{} when this occurs", + "{C:inactive}(If possible)" } }, --pacts @@ -5149,7 +5901,7 @@ local decs = { "Marked by {C:red}Chains{}" }, { - "Retrigger all {C:attention}Eternal{} Playing Cards", + "Retrigger all {C:attention}Eternal{} playing cards", "The first {C:attention}drawn{} card each round becomes {C:attention}Eternal{}" } } @@ -5167,8 +5919,8 @@ local decs = { "Marked by {C:red}Envy{}" }, { - "Retrigger a {C:attention}random{} Joker", - "Which {C:attention}changes{} every round" + "Retrigger a {C:attention}random{} Joker,", + "target {C:attention}changes{} every round" } } }, @@ -5198,7 +5950,7 @@ local decs = { }, { "{C:attention}Booster Packs{} are", - "more {C:red}Expensive{}" + "more {C:red}expensive{}" } } }, @@ -5221,7 +5973,7 @@ local decs = { "Marked by {C:red}Gluttony{}" }, { - "{C:red}All{} Consumables are {C:attention}Eternal" + "{C:red}All{} consumables are {C:attention}Eternal" } } }, @@ -5232,8 +5984,8 @@ local decs = { "Marked by {C:red}Rebirth{}" }, { - "Playing Cards are {C:attention}Duplicated{}", - "instead of being {C:red}Destroyed{}" + "Playing cards are {C:attention}duplicated{}", + "instead of being {C:red}destroyed{}" } } }, @@ -5256,8 +6008,8 @@ local decs = { "Marked by {C:red}Darkness{}" }, { - "Playing Cards may be", - "drawn Face {C:red}Down{}" + "Playing cards may be", + "drawn face {C:red}down{}" } } }, @@ -5339,7 +6091,7 @@ local decs = { name = "Rune of Fehu", text = { "The next {C:attention}sold{} card", - "adds {C:attention}Half{} its sell", + "adds {C:attention}half{} its sell", "value to your Jokers" } }, @@ -5347,14 +6099,14 @@ local decs = { name = "Rune of Fehu{C:purple}+{}", text = { "The next {C:attention}sold{} card", - "adds its {C:purple,E:1}Full{} sell", + "adds its {C:purple,E:1}full{} sell", "value to your Jokers" } }, c_entr_uruz = { name = "Rune of Uruz", text = { - "The next {C:attention}payout{} is", + "The next {C:attention}Payout{} is", "increased by {X:gold,C:white}50%{}", "{C:inactive}(Stacks additively){}" } @@ -5362,7 +6114,7 @@ local decs = { c_entr_uruz_providence = { name = "Rune of Uruz{C:purple}+{}", text = { - "The next {C:attention}payout{} is", + "The next {C:attention}Payout{} is", "increased by {X:purple,C:white,E:1}100%{}", "{C:inactive}(Stacks additively){}" } @@ -5378,7 +6130,7 @@ local decs = { c_entr_thurisaz_providence = { name = "Rune of Thurisaz{C:purple}+{}", text = { - "Create {C:purple,E:1}Two{} {C:attention}copies{} of", + "Create {C:purple,E:1}two{} {C:attention}copies{} of", "the next {C:attention}discarded{} card", "and draw it to {C:attention}hand{}" } @@ -5387,21 +6139,21 @@ local decs = { name = "Rune of Ansuz", text = { "Create a {C:attention}copy{} of", - "the next {C:attention}obtained{} tag or rune", + "the next {C:attention}obtained{} Tag or Rune", } }, c_entr_ansuz_providence = { name = "Rune of Ansuz{C:purple}+{}", text = { - "Create {C:purple,E:1}Two{} {C:attention}copies{} of", - "the next {C:attention}obtained{} tag or rune", + "Create {C:purple,E:1}two{} {C:attention}copies{} of", + "the next {C:attention}obtained{} Tag or Rune", } }, c_entr_raido = { name = "Rune of Raido", text = { "{C:green}#1# in #2#{} chance that", - "The next {C:attention}change{} in", + "the next {C:attention}change{} in", "Ante is prevented" } }, @@ -5424,7 +6176,7 @@ local decs = { text = { "Level up the", "next {C:attention}played{} hand", - "{C:purple,E:1}Twice{}" + "{C:purple,E:1}twice{}" } }, @@ -5443,7 +6195,7 @@ local decs = { "Creates a card of", "the same type as the", "next {C:attention}sold{} card", - "{C:purple,E:1}(May Overflow){}" + "{C:purple,E:1}(May overflow){}" } }, @@ -5510,7 +6262,7 @@ local decs = { text = { "The next {C:attention}shop{}", "contains an additional {C:attention}Voucher{}", - "at {C:purple,E:1}Half Price{}" + "at {C:purple,E:1}half price{}" } }, @@ -5519,16 +6271,16 @@ local decs = { text = { "Create a {C:attention}copy{} of", "the next {C:attention}used{}", - "Consumable", - "{C:inactive}(Rare Consumables excluded)" + "consumable", + "{C:inactive}(Hidden consumables excluded)" } }, c_entr_jera_providence = { name = "Rune of Jera{C:purple}+{}", text = { - "Create {C:purple,E:1}Two{} {C:attention}copies{} of", + "Create {C:purple,E:1}two{} {C:attention}copies{} of", "the next {C:attention}used{}", - "Consumable" + "consumable" } }, c_entr_ihwaz = { @@ -5541,7 +6293,7 @@ local decs = { c_entr_ihwaz_providence = { name = "Rune of Ihwaz{C:purple}+{}", text = { - "{C:purple,E:1}Fully{} Randomize the", + "{C:purple,E:1}Fully{} randomize the", "next {C:attention}played{} card" } }, @@ -5558,7 +6310,7 @@ local decs = { text = { "Restock {C:attention}Booster Packs{}", "and {C:attention}temporarily{} grant", - "{C:purple,E:1}+1{} Shop slots", + "{C:purple,E:1}+1{} shop slots", "on the next {C:attention}reroll{}" } }, @@ -5596,45 +6348,45 @@ local decs = { c_entr_tiwaz = { name = "Rune of Tiwaz", text = { - "The next {C:attention}draw{} card", + "The next {C:attention}drawn{} card", "gains a {C:attention}random{} modification" } }, c_entr_tiwaz_providence = { name = "Rune of Tiwaz{C:purple}+{}", text = { - "The next {C:attention}draw{} card", - "gains {C:purple,E:1}Two{} {C:attention}random{} modification" + "The next {C:attention}drawn{} card", + "gains {C:purple,E:1}two{} {C:attention}random{} modifications" } }, c_entr_berkano = { name = "Rune of Berkano", text = { - "Create {C:attention}Two{} copies of", - "the next {C:red}Destroyed{} card" + "Create {C:attention}two{} copies of", + "the next {C:red}destroyed{} card" } }, c_entr_berkano_providence = { name = "Rune of Berkano{C:purple}+{}", text = { - "Create {C:purple,E:1}Three{} copies of", - "the next {C:red}Destroyed{} card" + "Create {C:purple,E:1}three{} copies of", + "the next {C:red}destroyed{} card" } }, c_entr_ehwaz = { name = "Rune of Ehwaz", text = { - "Gives access to a {C:attention}Payout{} and a {C:attention}Shop{}", + "Gives access to a {C:attention}Payout{} and a {C:attention}shop{}", "on the next {C:attention}skipped{} Blind" } }, c_entr_ehwaz_providence = { name = "Rune of Ehwaz{C:purple}+{}", text = { - "Gives access to a {C:attention}Payout{} and a {C:attention}Shop{}", - "with {C:purple,E:1}+1 Shop Slots{}", + "Gives access to a {C:attention}Payout{} and a {C:attention}shop{}", + "with {C:purple,E:1}+1 shop slots{}", "on the next {C:attention}skipped{} Blind" } }, @@ -5643,14 +6395,14 @@ local decs = { name = "Rune of Mannaz", text = { "The next {C:attention}opened{} Booster Pack", - "will contain a {C:spectral}Spectral{} Card" + "will contain a {C:spectral}Spectral{} card" } }, c_entr_mannaz_providence = { name = "Rune of Mannaz{C:purple}+{}", text = { "The next {C:attention}opened{} Booster Pack", - "will contain {C:purple,E:1}Two{} {C:spectral}Spectral{} Cards" + "will contain {C:purple,E:1}two{} {C:spectral}Spectral{} cards" } }, @@ -5666,7 +6418,7 @@ local decs = { text = { "The next {C:attention}discard{}", "is refunded and temporarily", - "gives {C:purple,E:1}+1{} Hands" + "gives {C:purple,E:1}+1{} hands" } }, @@ -5683,7 +6435,7 @@ local decs = { "The next {C:attention}probability{} roll", "will {C:green}succeed{} with a", "{C:purple,E:1}33%{} chance to not consume", - "this rune when triggered" + "this Rune when triggered" } }, @@ -5691,15 +6443,15 @@ local decs = { name = "Rune of Dagaz", text = { "Invert the next", - "{C:attention}obtained{} Consumable" + "{C:attention}obtained{} consumable" } }, c_entr_dagaz_providence = { name = "Rune of Dagaz{C:purple}+{}", text = { "Invert the next", - "{C:attention}obtained{} Consumable and", - "{C:purple,E:1}Create{} a random inverted", + "{C:attention}obtained{} consumable and", + "{C:purple,E:1}create{} a random Inverted", "consumable when this occurs", "{C:inactive}(Must have room){}" } @@ -5723,8 +6475,8 @@ local decs = { c_entr_avarice = { name = "Pact of Avarice", text = { - "Duplicated your highest {C:attention}Sell Value{}", - "Joker then multply all {C:attention}Current{} and {C:attention}Future{}", + "Duplicate your highest {C:attention}sell value{}", + "Joker then multply all {C:attention}current{} and {C:attention}future{}", "sell values by {X:red,C:white}X0.25{}", "{C:inactive}(Must have room, Strips negative)" } @@ -5733,15 +6485,15 @@ local decs = { name = "Pact of Rage", text = { "Randomly {C:red}destroy{} {C:attention}20%{}", - "of your {C:attention}full{} Deck", + "of your {C:attention}full{} deck", "{C:inactive}(Minimum of 5)" } }, c_entr_thorns = { name = "Pact of Thorns", text = { - "Apply {C:attention}Rental{} to {C:attention}#1#{} Random Jokers", - "then give them {C:attention}Random{} Editions" + "Apply {C:attention}Rental{} to {C:attention}#1#{} random Jokers", + "then give them {C:attention}random{} Editions" } }, c_entr_denial = { @@ -5749,30 +6501,30 @@ local decs = { text = { "Create a {C:attention}copy{} of the last {C:attention}sold{} card", "then {C:red}banish{} that card", - "{C:inactive}(Currently: {C:attention}#1#{C:inactive}, Must have room){}" + "{C:inactive}(Currently {C:attention}#1#{C:inactive}, must have room){}" } }, c_entr_chains = { name = "Pact of Chains", text = { "Retrigger all {C:attention}Eternal{}", - "Playing Card, the first {C:attention}drawn{} card", + "playing cards, the first {C:attention}drawn{} card", "each round becomes {C:attention}Eternal{}" } }, c_entr_decay = { name = "Pact of Decay", text = { - "{C:red}Remove{} {C:attention}#1#{} Level from {C:attention}#2#{} random hands", - "Your most played hand gains {C:attention}#3#{} Levels" + "{C:red}Remove{} {C:attention}#1#{} level from {C:attention}#2#{} random hands", + "Your most played hand gains {C:attention}#3#{} levels" } }, c_entr_envy = { name = "Pact of Envy", text = { - "{C:red}Destroy{} a {C:attention}Random{} Joker", - "Retrigger a {C:attention}random{} Joker", - "which changes each round" + "{C:red}Destroy{} a {C:attention}random{} Joker", + "Retrigger a {C:attention}random{} Joker,", + "target changes each round" } }, c_entr_youth = { @@ -5786,7 +6538,7 @@ local decs = { name = "Pact of Shards", text = { "Apply {C:dark_edition}Fractured{} to a", - "random Joker, {C:attention}Future{} playing card", + "random Joker, {C:attention}future{} playing card", "destruction may {C:red}fail{}" } }, @@ -5810,23 +6562,23 @@ local decs = { c_entr_gluttony = { name = "Pact of Gluttony", text = { - "{C:attention}+#1#{} Consumable Slots", - "{C:red}All{} Consumables are {C:attention}Eternal{}" + "{C:attention}+#1#{} consumable slots", + "{C:red}All{} consumables are {C:attention}Eternal{}" } }, c_entr_rebirth = { name = "Pact of Rebirth", text = { - "Playing Cards are {C:attention}Duplicated{}", - "instead of being {C:red}Destroyed{}", - "{C:blue}-#1#{} Hand Size" + "Playing cards are {C:attention}duplicated{}", + "instead of being {C:red}destroyed{}", + "{C:blue}-#1#{} hand size" } }, c_entr_despair = { name = "Pact of Despair", text = { "Enhance {C:attention}#1#{} random card#1#", - "in your {C:attention}full deck{}, Debuff {C:attention}#2#%{} of", + "in your {C:attention}full deck{}, debuff {C:attention}#2#%{} of", "cards in your {C:attention}full deck{} for {C:attention}#3#{} rounds" } }, @@ -5841,21 +6593,21 @@ local decs = { name = "Pact of Darkness", text = { "Apply {C:dark_edition}Negative{} to a random Joker", - "Playing cards may be drawn Face {C:red}Down{}" + "Playing cards may be drawn face {C:red}down{}" } }, c_entr_freedom = { name = "Pact of Freedom", text = { - "{C:attention}+#1#{} Card Selection Limit", - "{C:attention}-#2#{} Hand Size" + "{C:attention}+#1#{} card selection limit", + "{C:attention}-#2#{} hand size" } }, c_entr_eternity = { name = "Pact of Eternity", text = { "{C:gold}+#1#{} Ascension Power to your", - "most {C:attention}played{} hand, A random", + "most {C:attention}played{} hand, a random", "Joker becomes {C:attention}Eternal{}" } }, @@ -5871,13 +6623,13 @@ local decs = { text = { "{X:mult,C:white}X3.6{} Mult after hand played", "on the {C:attention}final hand{} of round", - "{C:blue}-#1#{} Hands" + "{C:blue}-#1#{} hands" } }, c_entr_dreams = { name = "Pact of Dreams", text = { - "Add {C:attention}#1#{} Random Tags", + "Gain {C:attention}#1#{} random Tags", "Small Blinds give no {C:attention}Reward{}" } }, @@ -5886,13 +6638,13 @@ local decs = { text = { "Apply random {C:dark_edition}Editions{}", "to the last discarded hand", - "{C:red}-#1#{} Discard#1#" + "{C:red}-#1#{} discard#1#" } }, c_entr_blood = { name = "Pact of Blood", text = { - "Randomly Link {C:attention}#1#{}", + "Randomly link {C:attention}#1#{}", "playing cards from your", "{C:attention}full deck{} together" } @@ -5901,7 +6653,7 @@ local decs = { name = "Pact of Awakening", text = { "Create a random {C:dark_edition}Negative{} Voucher", - "{C:attention}-#1#{} Booster Pack Slot#1#" + "{C:attention}-#1#{} Booster Pack slot#1#" } }, }, @@ -5909,7 +6661,7 @@ local decs = { c_entr_extrajoker = { name = "Extra Jokers", text = { - "{C:attention}+#1# Joker Slot{}", + "{C:attention}+#1# Joker slot{}", "{C:purple}-c.#2#{}" } }, @@ -5924,7 +6676,7 @@ local decs = { c_entr_extrahands = { name = "Extra Hands", text = { - "{C:blue}+#1# Hand{}", + "{C:blue}+#1# hand{}", "{C:purple}-c.#2#{}" } }, @@ -5938,7 +6690,7 @@ local decs = { c_entr_biggerpockets = { name = "Bigger Pockets", text = { - "{C:attention}+#1# Consumable Slot{}", + "{C:attention}+#1# consumable slot{}", "{C:purple}-c.#2#{}" } }, @@ -5964,7 +6716,7 @@ local decs = { "Ascension Power multiplies", "{C:blue}Chips{} and {C:mult}Mult", "by {X:gold,C:white}X(1.25 ^ Power)", - "{C:inactive,s:0.8}Ex. +0.5 Asc Power -> X1.11 Chips/Mult", + "{C:inactive,s:0.8}Eg. +0.5 Asc Power -> X1.11 Chips/Mult", "{C:inactive,s:0.6}This popup can be disabled in the config" } }, @@ -6013,8 +6765,8 @@ local decs = { echo_tooltip = { name = "(~)$ echo", text = { - "When this card is used", - "Also trigger {C:attention}#1#{}" + "When this card is used,", + "also trigger {C:attention}#1#{}" } }, temporary_debuff_tooltip = { @@ -6034,14 +6786,14 @@ local decs = { no_downside = { name = "Downside Negated", text = { - "Downside is Removed", + "Downside is removed", } }, no_downside_cond = { name = "Downside Negated", text = { - "Downside is Removed", - "When {X:dark_edition,C:white}Entropy{}", + "Downside is removed", + "when {X:dark_edition,C:white}Entropy{}", "is higher than {C:attention}100{}" } }, @@ -6104,7 +6856,7 @@ local decs = { group_name = "Blinds", text={ "Choose {C:attention}#1#{} of up to", - "{C:attention}#2#{} {C:attention}Blinds{} to", + "{C:attention}#2#{} {C:attention}Blind Tokens{} to", "be used immediately or taken", } }, @@ -6244,9 +6996,9 @@ local decs = { desync = { name = "Desync", text = { - "{C:dark_edition}Forcetrigger{}", + "{C:dark_edition}Force-trigger{}", "during {C:attention}#1#{}", - "Randomises when hand played" + "Randomizes when hand played" } }, entr_aleph = { @@ -6311,6 +7063,27 @@ local decs = { "this round" } }, + entr_death_mark = { + name = "Marked for Death", + text = { + "{C:red}Destroyed{} when", + "Triggered" + } + }, + void_temporary = { + name = "Temporary", + text = { + "{C:red}Destroyed{} at the", + "end of round" + } + }, + entr_death_mark_consumeable = { + name = "Marked for Death", + text = { + "{C:red}Destroyed{} instead", + "of being used" + } + }, entr_crimson_seal = { name = "Crimson Seal", text = { @@ -6365,7 +7138,7 @@ local decs = { entr_ornate_seal = { name = "Ornate Seal", text = { - "Creates a {C:purple}Rune{} Card", + "Creates a {C:purple}Rune{} card", "when {C:red}destroyed{}", "{C:inactive}(Must have room){}" } @@ -6373,9 +7146,9 @@ local decs = { entr_amber_seal = { name = "Amber Seal", text = { - "Creates a {C:red}Pact{} Card", + "Creates a {C:red}Pact{} card", "and {C:red}destroys{} itself", - "when {C:attention}Copied{} or {C:attention}Duplicated{}", + "when {C:attention}copied{} or {C:attention}duplicated{}", "{C:inactive}(Must have room){}" } }, @@ -6391,15 +7164,15 @@ local decs = { name = "Sharp Seal", text = { "{C:green}#1# in #2#{} chance to", - "upgrade this cards {C:attention}Enhancement{}", + "upgrade this card's {C:attention}Enhancement{}", "before scoring" } }, entr_vantablack_seal = { name = "Vantablack Seal", text = { - "{C:attention}+1{} Card Selection Limit", - "when highlighted" + "{C:attention}+1{} card selection limit", + "when selected" } }, link = { @@ -6419,7 +7192,7 @@ local decs = { } }, entr_yellow_sign = { - name = "Yellow sign", + name = "Yellow Sign", text = { "{C:attention}Temporarily{} counts", "as {C:diamonds}Diamonds{}" @@ -6429,7 +7202,7 @@ local decs = { name = "Scarred", text = { "{C:attention}Not{} removed from", - "hand when discarding", + "hand when discarding,", "extra cards are {C:attention}still{} drawn" } }, @@ -6443,38 +7216,15 @@ local decs = { entr_pure = { name = "Pure", text = { - "This Jokers values", + "This Joker's values", "cannot change" } }, - entr_perma_plus_asc = { - text = { - "{C:gold}#1#{} Ascension Power" - } - }, - entr_perma_h_plus_asc = { - text = { - "{C:gold}#1#{} Ascension Power while held in hand" - } - }, - entr_perma_asc = { - text = { - "{X:money,C:white}X#1#{} Ascension Power" - } - }, - entr_perma_h_asc = { + entr_card_suit_level = { text = { - "{X:money,C:white}X#1#{} Ascension Power while held in hand" - } - }, - entr_perma_exp_asc = { - text = { - "{X:money,C:white}^#1#{} Ascension Power" --i have no idea what colour this should be, just guessing - } - }, - entr_perma_h_exp_asc = { - text = { - "{X:money,C:white}^#1#{} Ascension Power while held in hand" + "--------------", + "{S:0.8,V:1}#1#{} {S:0.8}({S:0.8,V:2}lvl.#3#{})", + "{C:blue}+#2#{} Chips" } } }, @@ -6482,10 +7232,10 @@ local decs = { pnr_entr_parakmi = { name = "Tyhaois", text = { - "Booster packs may", - "may be randomised", + "Booster Packs may", + "may be randomized", "to another random", - "booster pack" + "Booster Pack" } } }, @@ -6493,7 +7243,7 @@ local decs = { entr_rune_tags = { name = "Rune Tags", text = { - "Hide or Display rune tags" + "Hide or Display Rune Tags" } } }, @@ -6504,7 +7254,19 @@ local decs = { "Toggles for various UI elements added by Entropy" } } - } + }, + Mod = { + entr = { + name = "Entropy", + text = { + "{s:1.2}A Very {C:red,s:1.2}Chaotic{s:1.2} Balatro mod inspired", + "{s:1.2}by {C:red,s:1.2}TBOI: Repentance{s:1.2} among other things", + "{s:1.2}focused on {C:red,s:1.2}Inverted{s:1.2} Consumables and", + "{s:1.2}expanding on Vanilla mechanics in various other ways", + "{s:1.2}Generally Vanilla adjacent but not exactly Vanilla{C:purple,s:1.2}+{}" + } + } + } }, misc = { tutorial = { @@ -6586,16 +7348,15 @@ local decs = { ach_entr_c_sharp = "Completionist#" }, achievement_descriptions = { - ach_entr_event_horizon = "Use define to turn Obelisk into Sob", + ach_entr_event_horizon = "Use #define to turn Obelisk into Sob", ach_entr_here_comes_the_sun = "Obtain a Sunny Joker", - ach_entr_megalyteri = "Reach {50000} on Dekatria", - ach_entr_acheros = "Beat Ante 32s boss blind, Endless Entropy", + ach_entr_acheros = "Beat Ante 32's Boss Blind, Endless Entropy", ach_entr_rift = "Beat Ante 8 on The Alternate Path", ach_entr_katevaino = "Use Transcend on Parakmi", ach_entr_joy_to_the_world = "Have the Wunjo Rune create another Wunjo Rune", - ach_entr_suburban_jungle = "Play a Full House whilst holding a Legendary Joker from Entropy", - ach_entr_f_x= "Play a Derivate whilst holding Antiderivative", - ach_entr_c_sharp = "Discover and Unlock all Vanilla and Entropy collection entries" + ach_entr_suburban_jungle = "Play a Full House while holding a Legendary Joker from Entropy", + ach_entr_f_x= "Play a Derivate while holding Antiderivative", + ach_entr_c_sharp = "Discover and Unlock all Vanilla and Entropy Collection entries" }, suits_plural = { entr_nilsuit = "Nil", @@ -6610,24 +7371,24 @@ local decs = { k_corrupted_ex = "Corrupted!", k_recovered_ex = "Recovered!", cry_demicolon = "Demitrigger!", - k_ee_hand_1 = "When hand is played, a random card becomes sunny", + k_ee_hand_1 = "When hand is played, a random card becomes Sunny", k_ee_hand_2 = "Cards cannot be debuffed", - k_ee_hand_3 = "X1.666 All Joker values when hand played", - k_ee_hand_4 = "Forcetrigger a random Joker", + k_ee_hand_3 = "X1.666 to all Joker values when hand played", + k_ee_hand_4 = "Force-trigger a random Joker", - k_ee_discard_1 = "Spread discarded card edition if 1 card discarded", - k_ee_discard_2 = "Create negatve banana copies of played cards", + k_ee_discard_1 = "Spread discarded card's Edition if 1 card discarded", + k_ee_discard_2 = "Create Negative Banana copies of played cards", k_ee_discard_3 = "Gain an Ascended Tag for each discarded card", - k_ee_discard_4 = "^^3 Mult", + k_ee_discard_4 = "^3 Mult", - k_before = "Before Scoring:", - k_pre_joker = "Before Joker Scoring:", - k_joker_main = "During Main Scoring:", - k_individual = "When a this card triggers:", + k_before = "Before scoring:", + k_pre_joker = "Before Joker scoring:", + k_joker_main = "During main scoring:", + k_individual = "When this card triggers:", k_pre_discard = "When discarding cards:", k_remove_playing_cards = "When playing cards are destroyed:", - k_setting_blind = "When entering a blind:", + k_setting_blind = "When entering a Blind:", k_ending_shop = "When leaving the shop:", k_reroll_shop = "When rerolling:", k_selling_card = "When a card is sold:", @@ -6644,17 +7405,18 @@ local decs = { k_tmtechips = "^??? Chips", k_tmtdollars = "+??? Dollars", - k_tmtjoker_random = "Create a random joker", - k_tmtjoker_choose_rarity = "Create a joker of a random rarity", - k_tmtedition = "Apply a random edition to a random joker", + k_tmtjoker_random = "Create a random Joker", + k_tmtjoker_choose_rarity = "Create a Joker of a random rarity", + k_tmtedition = "Apply a random Edition to a random Joker", k_tmtante = "-??? Ante", k_tmtconsumable = "Create a random consumable", - k_tmtenhancement_play = "One played card gets a new enhancement", - k_tmtenhancement_hand = "One card held in hand gets a new enhancement", + k_tmtenhancement_play = "One played card gets a new Enhancement", + k_tmtenhancement_hand = "One card held in hand gets a new Enhancement", k_tmtrandom = "Trigger 3 random effects", k_entr_entropic = "Entropic", k_entr_reverse_legendary = "Legendary?", + k_entr_void = "Void", k_entr_zenith = "Zenith", k_fraud = "Fraud", b_fraud_cards = "Fraud Cards", @@ -6716,7 +7478,7 @@ local decs = { b_sell_slot = "-Joker Slot", b_transition = "Transition", - b_cant_reroll="Dont even try", + b_cant_reroll="Don't even try.", ph_blind_score_less_than="Score less than", entr_nadir_placeholder = "3X Base", @@ -6741,7 +7503,7 @@ local decs = { entr_b_reset_gameset_madness = "Reset Gameset Config (Exalted)", entr_opened = "Opened!", - entr_kiy_banished = "Banished.", + entr_kiy_banished = "Banished", k_saved_heroic = "Not Heroic!", k_saved_just = "Not Just!", @@ -6761,7 +7523,7 @@ local decs = { cry_notif_antireal_d2 = "which is copyrighted and can't be", cry_notif_antireal_d3 = "used for streams and videos.", - k_entr_omega_aleph = "Aleph sticker stops Self Destruction (Unstable, Must Restart Game)", + k_entr_omega_aleph = "Aleph sticker stops self destruction (Unstable, Must Restart Game)", k_entr_corrupted_speed = "Corrupted Deck Cycling Speed (%)", k_saved_skullcry = "The power of Zenith Stake saves you", @@ -6799,26 +7561,27 @@ local decs = { cry_set_music = "Music", - k_inactive = "Inactive!", + k_inactive = "Inactive", + k_inactive_ex = "Inactive!", k_randomised = "Randomized!", k_saved_algiz = "Saved by Algiz", k_undebuffed_ex = "Undebuffed!", k_spatial_anomaly = "Spatial Anomaly", k_curse_blind = "Curse of The Blind", - k_curse_blind_desc = "Shop Cards may be Hidden", + k_curse_blind_desc = "Shop cards may be hidden", k_curse_darkness = "Curse of Darkness", - k_curse_darkness_desc = "Booster Packs have Less Choices", + k_curse_darkness_desc = "Booster Packs have less choices", k_curse_lost = "Curse of The Lost", k_curse_lost_desc = "No Small Blind", k_curse_maze = "Curse of The Maze", - k_curse_maze_desc = "Blind order is Randomised", - k_level_chips = "Chips per Level", - k_level_mult = "Mult per Level", - k_level_asc = "Ascension Power per Level", + k_curse_maze_desc = "Blind order is randomized", + k_level_chips = "Chips per level", + k_level_mult = "Mult per level", + k_level_asc = "Ascension Power per level", k_star_q = "Star?", k_moon = "Moon", k_satellite = "Satellite", @@ -6828,13 +7591,15 @@ local decs = { k_freebird = "Freebird", k_portal_reference = "The Part Where She Kills You", k_entropy_is_endless = "Entropy Is Endless", + k_snd_ominous = "snd_ominous", k_plus_rune = "+1 Rune", k_plus_star = "+1 Star", k_plus_pact = "+1 Pact", k_plus_omen = "+1 Omen", k_plus_tag = "+1 Tag", - k_plus_inverted = "+1 Twisted Card", + k_plus_inverted = "+1 Inverted Card", + k_plus_discard = "+1 Discard", k_switch_ex = "Switch!", k_bounce_ex = "Bounce!", @@ -6850,12 +7615,21 @@ local decs = { cry_code = { "Code: #1#" }, cry_idea = { "Idea: #1#" }, a_eqmult = { "Mult = #1#" }, - a_twisted = {"+#1# Twisted"}, + a_twisted = {"+#1# Inverted"}, + + entr_void_desc = { + "Permanently {C:entr_void}Invert{} all future", + "instances of the Jokers listed", + "below into {C:entr_void}#1#{}:", + "{s:0.1} " + } }, labels = { banana = "Banana", entr_pinned = "Invariant", entr_marked = "Marked", + entr_death_mark = "Marked for Death", + void_temporary = "Temporary", entr_hotfix = "Hotfixed", temporary = "Temporary", entr_pseudorandom = "Pseudorandom", @@ -6897,7 +7671,7 @@ local decs = { poker_hand_descriptions = { entr_All = { "A hand that contains every single", - "card found in a 52-card deck.", + "card found in a 52-card deck,", "plus an entire full set of Optics", "and Nils, plus one Nil rank of each suit", Cryptid_config.family_mode and "God is Dead" or "Fuck You, God is Dead", @@ -6919,9 +7693,9 @@ local decs = { c_entr_eco_friendly = "Eco-Friendly", }, v_text = { - ch_c_entr_no_planets = { "No Planets in the Shop" }, + ch_c_entr_no_planets = { "No Planets in the shop" }, ch_c_entr_starting_ante_mten = { "Start on Ante -10" }, - ch_c_entr_reverse_redeo = { "Invert Redeo's ante change" }, + ch_c_entr_reverse_redeo = { "Invert Redeo's Ante change" }, ch_c_entr_set_seed = {"Set Seed: #1#"} }, quips={ @@ -6939,9 +7713,9 @@ local decs = { "held R!" }, entr_lq_ee_4={ - "And in the end", + "And in the end,", "everything succumbs", - "to entropy..." + "to Entropy.." }, entr_lq_ee_5={ "Looks like you", @@ -7006,28 +7780,28 @@ local decs = { }, entr_lq_3 = { "Just one", - "more run" + "more run?" }, entr_lq_4 = { "Better luck", - "next time" + "next time..." }, entr_wq_1 = { "You really are", - "something huh?" + "something, huh?" }, entr_wq_2 = { "The power of entropy", - "shines within you" + "shines within you!" }, entr_wq_3 = { "I was right to", - "believe in you" + "believe in you!" }, entr_wq_4 = { - "Good Job now do", - "Iridium Stake" + "Good job... now do", + "Iridium Stake!" }, } }, diff --git a/lovely/compat.toml b/lovely/compat.toml index 68814743..3029f705 100644 --- a/lovely/compat.toml +++ b/lovely/compat.toml @@ -1,7 +1,7 @@ [manifest] version = "1.0.0" dump_lua = true -priority = -1 +priority = 1 [[patches]] [patches.pattern] @@ -63,223 +63,201 @@ payload = ''' ''' match_indent = true -# This is sacrilegious [[patches]] [patches.pattern] -target = "game.lua" -pattern = "self.GAME.starting_deck_size = #G.playing_cards" -position = "before" +target = '''=[SMODS vallkarri "Items/helpers.lua"]''' +pattern = '''if tag.key == "tag_valk_kitty" then''' +position = "at" payload = ''' -if G.GAME.modifiers.cry_ccd then - for k, v in pairs(G.playing_cards) do - v:set_ability(Cryptid.random_consumable('cry_ccd', nil, nil, nil, true), true, nil) - end -end +if tag.key == "tag_valk_kitty" or tag.key == "tag_entr_ascendant_kitty" then ''' match_indent = true -# Aura use conditions [[patches]] [patches.pattern] -target = "card.lua" -pattern = "if G.hand and (#G.hand.highlighted == 1) and G.hand.highlighted[1] and (not G.hand.highlighted[1].edition) then return true end" +target = '''=[SMODS stocking "main.lua"]''' +pattern = ''' +table.insert(collection.nodes[1].nodes[1].nodes[1].nodes[2].nodes[1].nodes, + {n=G.UIT.C, config = {align='cm'}, nodes = { + {n=G.UIT.R, config = {colour=G.C.WHITE, padding = 0.05, emboss = 0.05, maxh = 0.6, minh = 0.6, minw = 0.6, r=0.1, align='cm'}, nodes = { + {n=G.UIT.R, config = {align='cm', colour=HEX("22A617"), button = 'stocking_stuffer_help', hover = true, button_dist = 0, maxh = 0.5, minh = 0.5, minw = 0.5, r=0.1}, nodes = { + {n=G.UIT.T, config={text='?', scale = 0.4, colour = G.C.WHITE, shadow = true}} + }} + }} + }} +) +''' position = "at" payload = ''' -if self.area ~= G.hand then - return G.hand and (#G.hand.highlighted == 1) and G.hand.highlighted[1] and (not G.hand.highlighted[1].edition) -else - local idx = 1 - if G.hand.highlighted[1] == self then - local idx = 2 - end - return (#G.hand.highlighted == 2) and (not G.hand.highlighted[idx].edition) +for i, v in pairs(collection.nodes[1].nodes[1].nodes[1].nodes[2].nodes) do + table.insert(collection.nodes[1].nodes[1].nodes[1].nodes[2].nodes[i].nodes, + {n=G.UIT.C, config = {align='cm'}, nodes = { + {n=G.UIT.R, config = {colour=G.C.WHITE, padding = 0.05, emboss = 0.05, maxh = 0.6, minh = 0.6, minw = 0.6, r=0.1, align='cm'}, nodes = { + {n=G.UIT.R, config = {align='cm', colour=HEX("22A617"), button = 'stocking_stuffer_help', hover = true, button_dist = 0, maxh = 0.5, minh = 0.5, minw = 0.5, r=0.1}, nodes = { + {n=G.UIT.T, config={text='?', scale = 0.4, colour = G.C.WHITE, shadow = true}} + }} + }} + }} + ) + break end ''' match_indent = true -# Prevent counting CCD consumables for pack uses [[patches]] [patches.pattern] -target = "functions/button_callbacks.lua" -pattern = "if area == G.consumeables then" -position = "at" -payload = "if area == G.consumeables or area == G.hand then" -match_indent = true - -# Fix bugs from removing CCD -# This really shouldn't be in the card drawing code, but it doesn't really matter since that's where it crashes anyway lol -[[patches]] -[patches.pattern] -target = "card.lua" -pattern = "if not self.config.center.discovered and (self.ability.consumeable or self.config.center.unlocked) and not self.config.center.demo and not self.bypass_discovery_center then" -position = "before" -payload = "if self.ability.set == 'Enhanced' then self.ability.consumeable = nil end" -match_indent = true - -# Remove CCD from enhanced cards -[[patches]] -[patches.pattern] -target = "card.lua" -pattern = '''if center.consumeable then - self.ability.consumeable = center.config +target = '''=[SMODS stocking "main.lua"]''' +pattern = ''' +table.insert(ret_val.nodes[1].nodes[1].nodes[1].nodes[1].nodes, tag) ''' -position = "before" +position = "at" payload = ''' -if not center.consumeable then - self.ability.consumeable = nil +for i, v in pairs(ret_val.nodes[1].nodes[1].nodes[1].nodes) do + table.insert(ret_val.nodes[1].nodes[1].nodes[1].nodes[i].nodes, tag) + break end - ''' -match_indent = true - -#Fixes for negative CCD cards -[[patches]] -[patches.pattern] -target = "card.lua" -pattern = """ -if self.edition.type == 'negative' and self.ability.consumeable then - badges[#badges + 1] = 'negative_consumable' -elseif self.edition.type == 'negative' and (self.ability.set == 'Enhanced' or self.ability.set == 'Default') then - badges[#badges + 1] = 'negative_playing_card' -""" -position = "at" -payload = """ -if self.edition.type == 'negative' and self.playing_card then - badges[#badges + 1] = 'negative_playing_card' -elseif self.edition.type == 'negative' and self.ability.consumeable then - badges[#badges + 1] = 'negative_consumable' -""" -match_indent = true - -[[patches]] -[patches.pattern] -target = """=[SMODS _ "src/overrides.lua"]""" -pattern = """if self.ability.consumeable then""" -position = "at" -payload = """if self.ability.consumeable and not self.playing_card then""" +''' match_indent = true [[patches]] [patches.pattern] -target = "card.lua" -pattern = """if self.ability.consumeable then""" +target = '''=[SMODS Cryptlib "utilities.lua"]''' +pattern = ''' +local center = self.config.center +''' position = "at" -payload = """if self.ability.consumeable and not self.playing_card then""" +payload = ''' +local center = self.ability and self.ability.epitach_consumeable and G.P_CENTERS[self.ability.epitach_consumeable] or self.config.center +''' match_indent = true -# ui, ui, ui [[patches]] [patches.pattern] -target = "functions/UI_definitions.lua" -pattern = '''name_from_rows(AUT.name, is_playing_card and G.C.WHITE or nil),''' -position = "at" +target = '''=[SMODS Cryptlib "ascended.lua"]''' +pattern = ''' +if check then + starting = (tether and #hand_cards or #hand_scoring_cards) - check +end +''' +position = "after" payload = ''' -not (SMODS.Mods["Cryptid"] or {}).can_load and AUT.ccd and name_from_rows(AUT.ccd.name, G.C.WHITE) or nil, -not (SMODS.Mods["Cryptid"] or {}).can_load and AUT.ccd and desc_from_rows(AUT.ccd.main) or nil, -name_from_rows(AUT.name, is_playing_card and G.C.WHITE or nil), +if next(SMODS.find_card("j_entr_helios")) then + starting = #hand_cards +end ''' match_indent = true -# i love patching like five billion things [[patches]] [patches.pattern] -target = "card.lua" -pattern = '''return generate_card_ui(self.config.center, nil, loc_vars, card_type, badges, hide_desc, main_start, main_end, self)''' -position = "before" +target = '''=[SMODS Cryptid "lib/ascended.lua"]''' +pattern = ''' +if check then + starting = (tether and #hand_cards or #hand_scoring_cards) - check +end +''' +position = "after" payload = ''' -if card_type ~= 'Default' and card_type ~= 'Enhanced' and self.playing_card and not (SMODS.Mods["Cryptid"] or {}).can_load then - loc_vars = loc_vars or {} - loc_vars.ccd = { - playing_card = not not self.base.colour, value = self.base.value, suit = self.base.suit, colour = self.base.colour, - nominal_chips = self.base.nominal > 0 and self.base.nominal or nil, - bonus_chips = (self.ability.bonus + (self.ability.perma_bonus or 0)) > 0 and (self.ability.bonus + (self.ability.perma_bonus or 0)) or nil, - } +if next(SMODS.find_card("j_entr_helios")) then + starting = #hand_cards end ''' match_indent = true -# lalala ok this is a mess [[patches]] [patches.pattern] -target = "functions/common_events.lua" -pattern = '''local loc_vars = {}''' -position = "before" +target = '''functions/state_events.lua''' +pattern = ''' +if burned then + burned_cards[#burned_cards + 1] = G.hand.highlighted[i] + G.hand.highlighted[i]:start_burn(G.hand) + else +G.hand.highlighted[i].ability.discarded = true +''' +position = "at" payload = ''' -if specific_vars and specific_vars.ccd and not (SMODS.Mods["Cryptid"] or {}).can_load then - full_UI_table.ccd = {name = {}, main = {}} - localize{type = 'other', key = 'playing_card', set = 'Other', nodes = full_UI_table.ccd.name, vars = {localize(specific_vars.ccd.value, 'ranks'), localize(specific_vars.ccd.suit, 'suits_plural'), colours = {specific_vars.ccd.colour}}} - full_UI_table.ccd.name = full_UI_table.ccd.name[1] - if specific_vars.ccd.nominal_chips then - localize{type = 'other', key = 'card_chips', nodes = full_UI_table.ccd.main, vars = {specific_vars.ccd.nominal_chips}} - end - if specific_vars.ccd.bonus_chips then - localize{type = 'other', key = 'card_extra_chips', nodes = full_UI_table.ccd.main, vars = {specific_vars.ccd.bonus_chips}} - end +if burned then + burned_cards[#burned_cards + 1] = G.hand.highlighted[i] + G.hand.highlighted[i]:start_burn(G.hand) +else + G.hand.highlighted[i].ability.discarded = true end ''' match_indent = true [[patches]] [patches.pattern] -target = "card.lua" -pattern = '''end if self.ability.name == 'The Hermit' or self.ability.consumeable.hand_type or self.ability.name == 'Temperance' or self.ability.name == 'Black Hole' then''' +target = '''=[SMODS Blindside "items/tags/debuff.lua"]''' +pattern = ''' +tag.ability.debuff_text = localize('k_debuff_tag') .. localize(tag.ability.debuffed_hand, 'poker_hands') +''' position = "at" payload = ''' -end if self.ability.name == 'The Hermit' or (self.ability.consumeable and self.ability.consumeable.hand_type) or self.ability.name == 'Temperance' or self.ability.name == 'Black Hole' then +tag.ability.debuff_text = (localize('k_debuff_tag') or "") .. (localize(tag.ability.debuffed_hand, 'poker_hands') or tag.ability.debuffed_hand or "") ''' match_indent = true + [[patches]] [patches.pattern] -target = '''=[SMODS vallkarri "Items/helpers.lua"]''' -pattern = '''if tag.key == "tag_valk_kitty" then''' +target = '''functions/state_events.lua''' +pattern = ''' +local waved = false +for i = 1, #G.GAME.tags do + if G.GAME.tags[i].key == "tag_bld_wave" then + waved = true + end +end +''' position = "at" payload = ''' -if tag.key == "tag_valk_kitty" or tag.key == "tag_entr_ascendant_kitty" then +local waved = false +for i = 1, #G.GAME.tags do + if G.GAME.tags[i].key == "tag_bld_wave" or G.GAME.tags[i].key == "tag_entr_asc_wave" then + waved = true + end +end ''' match_indent = true + [[patches]] [patches.pattern] -target = '''=[SMODS stocking "main.lua"]''' +target = '''=[SMODS _ "src/overrides.lua"]''' pattern = ''' -table.insert(collection.nodes[1].nodes[1].nodes[1].nodes[2].nodes[1].nodes, - {n=G.UIT.C, config = {align='cm'}, nodes = { - {n=G.UIT.R, config = {colour=G.C.WHITE, padding = 0.05, emboss = 0.05, maxh = 0.6, minh = 0.6, minw = 0.6, r=0.1, align='cm'}, nodes = { - {n=G.UIT.R, config = {align='cm', colour=HEX("22A617"), button = 'stocking_stuffer_help', hover = true, button_dist = 0, maxh = 0.5, minh = 0.5, minw = 0.5, r=0.1}, nodes = { - {n=G.UIT.T, config={text='?', scale = 0.4, colour = G.C.WHITE, shadow = true}} - }} - }} - }} -) +local waved = false +for i = 1, #G.GAME.tags do + if G.GAME.tags[i].key == "tag_bld_wave" then + waved = true + end +end ''' position = "at" payload = ''' -for i, v in pairs(collection.nodes[1].nodes[1].nodes[1].nodes[2].nodes) do - table.insert(collection.nodes[1].nodes[1].nodes[1].nodes[2].nodes[i].nodes, - {n=G.UIT.C, config = {align='cm'}, nodes = { - {n=G.UIT.R, config = {colour=G.C.WHITE, padding = 0.05, emboss = 0.05, maxh = 0.6, minh = 0.6, minw = 0.6, r=0.1, align='cm'}, nodes = { - {n=G.UIT.R, config = {align='cm', colour=HEX("22A617"), button = 'stocking_stuffer_help', hover = true, button_dist = 0, maxh = 0.5, minh = 0.5, minw = 0.5, r=0.1}, nodes = { - {n=G.UIT.T, config={text='?', scale = 0.4, colour = G.C.WHITE, shadow = true}} - }} - }} - }} - ) - break +local waved = false +for i = 1, #G.GAME.tags do + if G.GAME.tags[i].key == "tag_bld_wave" or G.GAME.tags[i].key == "tag_entr_asc_wave" then + waved = true + end end ''' match_indent = true + [[patches]] [patches.pattern] -target = '''=[SMODS stocking "main.lua"]''' +target = '''game.lua''' pattern = ''' -table.insert(ret_val.nodes[1].nodes[1].nodes[1].nodes[1].nodes, tag) +if may.conf.Menu then + if may.mode == 1 then + replace_card:set_ability(G.P_CENTERS.m_mult, true, true) + else + replace_card:set_ability(G.P_CENTERS.m_may_super_mult, true, true) + end +end ''' position = "at" payload = ''' -for i, v in pairs(ret_val.nodes[1].nodes[1].nodes[1].nodes) do - table.insert(ret_val.nodes[1].nodes[1].nodes[1].nodes[i].nodes, tag) - break -end + ''' -match_indent = true \ No newline at end of file +match_indent = true +times = 2 \ No newline at end of file diff --git a/lovely/core.toml b/lovely/core.toml index 1d1213b8..1177c96d 100644 --- a/lovely/core.toml +++ b/lovely/core.toml @@ -15,18 +15,7 @@ Entropy.AltBlinds = {} Entropy.FlipsideInversions = {} Entropy.FlipsidePureInversions = {} Entropy.EnhancementFuncs = {} -Entropy.RarityChecks = (Cryptid and Cryptid.memepack) and { --using legacy stuff to check for cryptid and not cryptlib - [0]="cry_candy", - 1, - 2, - 3, - "cry_epic", - 4, - "cry_exotic", - "entr_entropic" -} or { - 1, 2, 3, 4 -} +Entropy.Planetarium = {} Entropy.BoosterSets = { ["Spectral"] = "p_spectral_mega_1", ["Tarot"] = "p_arcana_mega_1", @@ -53,9 +42,6 @@ Entropy.DefineBlacklist = { Edition = true } Entropy.SpecialDailies = {} -Entropy.ChaosBlacklist = {} -Entropy.ParakmiBlacklist = {} -Entropy.ChaosConversions = {} Entropy.AscendedTags = {} Entropy.BlindTokenBlacklist = { bl_entr_endless_entropy_phase_one = true, @@ -146,7 +132,6 @@ Entropy.FixedRecipes = { m_luckym_luckym_luckym_luckym_lucky = "j_lucky_cat", m_entr_fleshm_entr_fleshm_entr_fleshm_entr_fleshm_entr_flesh = "j_entr_grotesque_joker", m_entr_disavowedm_entr_disavowedm_entr_disavowedm_entr_disavowedm_entr_disavowed = "j_entr_tesseract", - m_entr_darkm_entr_darkm_entr_darkm_entr_darkm_entr_dark = "j_entr_crabus", m_entr_ceramicm_entr_ceramicm_entr_ceramicm_entr_ceramicm_entr_ceramic = "j_entr_memento_mori", c_basec_basec_basec_basem_entr_disavowed = "j_entr_surreal_joker", c_basem_multm_multm_multm_mult = "j_entr_red_fourty", @@ -256,52 +241,6 @@ end ''' match_indent = true - - -[[patches]] -[patches.pattern] -target = "functions/UI_definitions.lua" -pattern = "return create_UIBox_generic_options({contents ={create_tabs(" -position = "before" -payload = ''' - local tabs = { - - } - - local def = G.GAME.DefineKeys and { - label = localize('b_definitions'), - tab_definition_function = G.UIDEF.define_keys, - } or nil - local decks = G.GAME.entr_bought_decks and #G.GAME.entr_bought_decks > 0 and { - label = localize('b_decks'), - tab_definition_function = G.UIDEF.bought_decks, - } or nil - local stake = G.GAME.stake > 1 and { - label = localize('b_stake'), - tab_definition_function = G.UIDEF.current_stake, - } or nil - if def then tabs[#tabs+1] = def end - if decks then tabs[#tabs+1] = decks end - if stake then tabs[#tabs+1] = stake end -''' -match_indent = true - -[[patches]] -[patches.pattern] -target = "functions/UI_definitions.lua" -pattern = ''' - G.GAME.stake > 1 and { - label = localize('b_stake'), - tab_definition_function = G.UIDEF.current_stake, - } or nil, -''' -position = "at" -payload = ''' - tabs[1], - tabs[2], - tabs[3],''' -match_indent = true - [[patches]] [patches.pattern] target = "game.lua" @@ -318,7 +257,7 @@ if G.GAME.modifiers.ccd2 then "Consumeables", "Consumeables", }, pseudoseed("redefined")) - local center = Entropy.GetPooledCenter(ptype) + local center = Entropy.get_pooled_center(ptype) v:set_ability(center) discover_card(center) end @@ -418,6 +357,7 @@ if blind_choice.config.exponent then end blind_amt = initial end +blind_amt = blind_amt * (G.GAME.abyss_size_mod or 1) ''' match_indent = true @@ -598,7 +538,16 @@ target = "functions/state_events.lua" pattern = "if SMODS.saved then game_over = false end" position = "at" payload = ''' -if Entropy.IsEE() then +if next(SMODS.find_card("j_entr_voidheart")) then + + if game_over and not G.GAME.abyss_just_lost then + Entropy.progress_abyss() + game_over = false + elseif not game_over then + Entropy.defeat_abyss() + end +end +if Entropy.is_EE() then G.GAME.EECardCharacter = true if G.GAME.blind and G.GAME.blind.config and G.GAME.blind.config.blind.key == "bl_entr_endless_entropy_phase_three" then if to_big(G.GAME.chips) < to_big(G.GAME.blind.chips) then return end @@ -634,7 +583,7 @@ payload = ''' G.GAME.chips = 0 G.GAME.round_resets.lost = false G.GAME.blind:set_blind(G.P_BLINDS["bl_entr_endless_entropy_phase_two"]) - Entropy.ChangePhase() + Entropy.change_phase() G.GAME.blind:juice_up() G.GAME.current_round.hands_left = G.GAME.round_resets.hands ease_hands_played(G.GAME.round_resets.hands-G.GAME.current_round.hands_left) @@ -658,7 +607,7 @@ target = "functions/state_events.lua" pattern = "if not G.GAME.won and not G.GAME.seeded and not G.GAME.challenge then " position = "before" payload = ''' -if Entropy.IsEE() then +if Entropy.is_EE() then G.GAME.EECardCharacter = true end ''' @@ -955,8 +904,11 @@ ease_hands_played(-1) ''' payload = ''' local text, loc_disp_text, poker_hands, scoring_hand, disp_text = -G.FUNCS.get_poker_hand_info(Entropy.GetHighlightedCards({G.hand}, card)) -if not G.GAME.badarg or (G.GAME.badarg and not G.GAME.badarg[text]) then ease_hands_played(-1) else +G.FUNCS.get_poker_hand_info(Entropy.get_highlighted_cards({G.hand}, card)) +if not G.GAME.badarg or (G.GAME.badarg and not G.GAME.badarg[text]) then + ease_hands_played(-1) +else + end ''' position = "at" @@ -1085,7 +1037,7 @@ pattern = ''' ''' position = "at" payload = ''' - {n=G.UIT.R,config={id = 'next_round_button', align = "cm", minw = 2.8, minh = Entropy.CanSwitchAltPath() and 1 or 1.5, r=0.15,colour = G.C.RED, one_press = true, button = 'toggle_shop', hover = true,shadow = true}, nodes = { + {n=G.UIT.R,config={id = 'next_round_button', align = "cm", minw = 2.8, minh = Entropy.can_switch_alt_path() and 1 or 1.5, r=0.15,colour = G.C.RED, one_press = true, button = 'toggle_shop', hover = true,shadow = true}, nodes = { {n=G.UIT.R, config={align = "cm", padding = 0.07, focus_args = {button = 'y', orientation = 'cr'}, func = 'set_button_pip'}, nodes={ {n=G.UIT.R, config={align = "cm", maxw = 1.3}, nodes={ {n=G.UIT.T, config={text = localize('b_next_round_1'), scale = 0.4, colour = G.C.WHITE, shadow = true}} @@ -1095,7 +1047,7 @@ payload = ''' }} }}, }}, - (Entropy.CanSwitchAltPath() and {n=G.UIT.R,config={id = 'change_path_button', align = "cm", minw = 2.8, minh = 1, r=0.15,colour = G.C.PURPLE, button = 'toggle_path', hover = true,shadow = true, func='can_toggle_path'}, nodes = { + (Entropy.can_switch_alt_path() and {n=G.UIT.R,config={id = 'change_path_button', align = "cm", minw = 2.8, minh = 1, r=0.15,colour = G.C.PURPLE, button = 'toggle_path', hover = true,shadow = true, func='can_toggle_path'}, nodes = { {n=G.UIT.R, config={align = "cm", padding = 0.07, focus_args = {button = 'y', orientation = 'cr'}, func = 'set_button_pip'}, nodes={ {n=G.UIT.R, config={align = "cm", maxw = 1.3}, nodes={ {n=G.UIT.T, config={text = localize(G.GAME.entr_alt and 'b_change_path_3' or 'b_change_path_1'), scale = 0.4, colour = G.C.WHITE, shadow = true}} @@ -1119,23 +1071,6 @@ payload = ''' ''' match_indent = true - -[[patches]] -[patches.pattern] -target = "functions/common_events.lua" -pattern = ''' - elseif blindname == 'Small Blind' or blindname == 'Big Blind' or blindname == '' then - ease_background_colour{new_colour = G.C.BLIND['Small'], contrast = 1} - else -''' -position = "at" -payload = ''' - elseif blindname == 'Small Blind' or blindname == 'Big Blind' or blindname == '' then - ease_background_colour{new_colour = Entropy.get_bg_colour(), contrast = 1} - else -''' -match_indent = true - [[patches]] [patches.pattern] target = "functions/UI_definitions.lua" @@ -1177,7 +1112,7 @@ local challenge = G.CHALLENGES[args._id] ''' position = "after" payload = ''' -local challenge = G.CHALLENGES[args._id] or Entropy.GetDailyChallenge() +local challenge = G.CHALLENGES[args._id] or Entropy.get_daily_challenge() ''' match_indent = true @@ -1190,7 +1125,7 @@ local challenge = G.CHALLENGES[args._id] ''' position = "after" payload = ''' -local challenge = G.CHALLENGES[args._id] or Entropy.GetDailyChallenge() +local challenge = G.CHALLENGES[args._id] or Entropy.get_daily_challenge() ''' match_indent = true @@ -1206,7 +1141,7 @@ payload = ''' info_queue[#info_queue + 1] = v end end - if Entropy.DeckOrSleeve("doc") then + if Entropy.deck_or_sleeve("doc") then if _c.key == "c_entr_beyond" then info_queue[#info_queue+1] = {set="Other", key="no_downside_cond"} end @@ -1275,23 +1210,6 @@ position = "at" payload = "if not G.GAME.entr_fastened then table.sort(self.cards, function (a, b) return a.T.x + a.T.w/2 - 100*((a.pinned and not a.ignore_pinned) and a.sort_id or 0) < b.T.x + b.T.w/2 - 100*((b.pinned and not b.ignore_pinned) and b.sort_id or 0) end) end" match_indent = true -[[patches]] -[patches.pattern] -target = "functions/state_events.lua" -pattern = "draw_card(G.hand, G.discard, i*100/highlighted_count, 'down', false, G.hand.highlighted[i]) " -position = "at" -payload = '''draw_card(G.hand, Entropy.return_to_deck() and G.deck or G.discard, i*100/highlighted_count, 'down', false, G.hand.highlighted[i])''' -match_indent = true - -[[patches]] -[patches.pattern] -target = "functions/state_events.lua" -pattern = "draw_card(G.hand, G.discard, i*100/highlighted_count, 'down', false, G.hand.highlighted[i]) " -position = "at" -payload = '''draw_card(G.hand, Entropy.return_to_deck() and G.deck or G.discard, i*100/highlighted_count, 'down', false, G.hand.highlighted[i])''' -match_indent = true - - [[patches]] [patches.pattern] target = '''=[SMODS _ "src/overrides.lua"]''' @@ -1427,8 +1345,8 @@ pattern = ''' ''' position = "after" payload = ''' - if Entropy.DeckOrSleeve("butterfly") then - for i = 1, Entropy.DeckOrSleeve("butterfly") do + if Entropy.deck_or_sleeve("butterfly") then + for i = 1, Entropy.deck_or_sleeve("butterfly") do local jok = {cards = {}} for i, v in pairs(G.butterfly_jokers.cards) do if pseudorandom("entr_butterfly") < 0.5 then jok.cards[#jok.cards+1] = v end @@ -1722,7 +1640,7 @@ pattern = "create_shop_card_ui(card, 'Booster', G.shop_booster)" position = "before" payload = ''' if G.GAME.curse == "entr_darkness" then - if card.ability.extra then + if card.ability.extra and type(card.ability.extra) ~= "table" then card.ability.extra = card.ability.extra - 1 if to_big(card.ability.extra) < to_big(0) then card.ability.extra = 0 @@ -2098,7 +2016,7 @@ if self.draw_hand == true then G.FUNCS.draw_from_deck_to_hand() end ''' position = "at" payload = ''' -if self.draw_hand == true or G.GAME.mannaz_draw or next(SMODS.find_card("j_entr_miracle_berry")) or G.GAME.modifiers.entr_parakmi or (next(Entropy.find_runes("rune_entr_oss")) and Entropy.DeckOrSleeve("corrupted")) then G.FUNCS.draw_from_deck_to_hand(); G.GAME.mannaz_draw = nil end +if self.draw_hand == true or G.GAME.mannaz_draw or next(SMODS.find_card("j_entr_miracle_berry")) or G.GAME.modifiers.entr_parakmi or (next(Entropy.find_runes("rune_entr_oss")) and Entropy.deck_or_sleeve("corrupted")) then G.FUNCS.draw_from_deck_to_hand(); G.GAME.mannaz_draw = nil end ''' match_indent = true @@ -2539,7 +2457,7 @@ payload = ''' local area = context.scoring_hand if context.cardarea == G.play and G.rubber_cards then area = G.rubber_cards.cards; context.scoring_hand = G.rubber_cards.cards; scoring_hand = G.rubber_cards.cards end local in_scoring = scoring_hand and SMODS.in_scoring(card, area) -if (area[1]) == card and card.config.center.key == "j_entr_false_vacuum_collapse" then +if ((area[1]) == card and card.config.center.key == "j_entr_false_vacuum_collapse") or ((area[#area]) == card and card.config.center.key == "j_entr_phoenix_a") then in_scoring = true end if G.rubber_cards and scoring_hand [_] == scoring_hand [_-1] then @@ -2640,11 +2558,9 @@ pattern = '''if center.consumeable then self.ability.consumeable = center.config end ''' -position = "at" +position = "before" payload = ''' -if center.consumeable then - self.ability.consumeable = center.config -else +if not center.consumeable then self.ability.consumeable = nil end ''' @@ -2678,7 +2594,7 @@ end position = "at" payload = ''' if self.debuff then - if Entropy.IsEE() then + if Entropy.is_EE() then self.children.center:draw_shader('entr_brimstone', nil, self.ARGS.send_to_shader) if self.children.front and (self.ability.delayed or not self:should_hide_front()) then self.children.front:draw_shader('entr_brimstone', nil, self.ARGS.send_to_shader) @@ -2736,26 +2652,6 @@ end ''' match_indent = true -[[patches]] -[patches.pattern] -target = '''=[SMODS Cryptid "lib/forcetrigger.lua"]''' -pattern = "if Talisman and not Talisman.config_file.disable_anims then" -position = "at" -payload = ''' -if not Entropy.should_skip_animations() and (not context or not context.no_sound) then -''' -match_indent = true - -[[patches]] -[patches.pattern] -target = '''=[SMODS Cryptlib "forcetrigger.lua"]''' -pattern = "if Talisman and not Talisman.config_file.disable_anims then" -position = "at" -payload = ''' -if not Entropy.should_skip_animations() and (not context or not context.no_sound) then -''' -match_indent = true - [[patches]] [patches.pattern] target = '''card.lua''' @@ -2779,15 +2675,14 @@ position = "at" payload = ''' if next(effects) then if card.config.center.key == "j_entr_false_vacuum_collapse" then - local fvc_cards = {} - for i, v in pairs(G.play.cards) do if v.config.center.key == "j_entr_false_vacuum_collapse" and not v.debuff then fvc_cards[#fvc_cards+1] = v end end - for i, v in pairs(G.jokers.cards) do if v.config.center.key == "j_entr_false_vacuum_collapse" and not v.debuff then fvc_cards[#fvc_cards+1] = v end end - for i, v in pairs(fvc_cards) do - v.config.center:calculate(v, {individual = true, card = card}) - end + card.config.center:calculate(card, {individual = true, card = card}) end SMODS.calculate_card_areas('jokers', context, effects, { main_scoring = true }) SMODS.calculate_card_areas('individual', context, effects, { main_scoring = true }) + if card.config.center.key == "j_entr_phoenix_a" then + local ret = card.config.center:calculate(card, {individual = true, card = card}) + SMODS.calculate_effect(ret, card) + end end ''' match_indent = true @@ -2970,7 +2865,7 @@ match_indent = true [patches.pattern] target = 'card.lua' pattern = ''' -if G.STATE == G.STATES.SELECTING_HAND or G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK or G.STATE == G.STATES.PLANET_PACK or G.STATE == G.STATES.SMODS_BOOSTER_OPENED then +if self.ability.consumeable and self.ability.consumeable.max_highlighted then ''' position = 'after' payload = ''' @@ -3066,8 +2961,8 @@ position = 'before' payload = ''' if not G.GAME.entr_parakmi_bypass then if (next(find_joker("j_entr_chaos")) or next(find_joker("j_entr_parakmi")) or G.GAME.modifiers.entr_parakmi) then - local set = Entropy.GetRandomSet(next(find_joker("j_entr_parakmi")) or G.GAME.modifiers.entr_parakmi) - local key = Entropy.GetPooledCenter(set).key + local set = Entropy.get_random_set(next(find_joker("j_entr_parakmi")) or G.GAME.modifiers.entr_parakmi) + local key = Entropy.get_pooled_center(set).key G.GAME.current_round.used_packs[i] = key end end @@ -3199,26 +3094,6 @@ end ''' match_indent = true - -[[patches]] -[patches.pattern] -target = 'functions/common_events.lua' -pattern = ''' -if v.name == 'Black Hole' or v.name == 'The Soul' or v.hidden then - add = false -end -''' -position = 'before' -payload = ''' -local _total_weight = 0 -if v.set == "Back" or v.set == "Sleeve" then - if Entropy.DeckOrSleeve(v.key) or G.GAME.used_jokers[v.key] then - add = false - end -end -''' -match_indent = true - [[patches]] [patches.pattern] target = 'functions/common_events.lua' @@ -3283,8 +3158,14 @@ target = '''functions/state_events.lua''' pattern = ''' delay(0.4); SMODS.ante_end = true; ease_ante(1); SMODS.ante_end = nil; delay(0.4); check_for_unlock({type = 'ante_up', ante = G.GAME.round_resets.ante + 1}) ''' -position = 'after' +position = 'at' payload = ''' +delay(0.4) +if not next(SMODS.find_card("j_entr_voidheart")) then + SMODS.ante_end = true; ease_ante(1) + SMODS.ante_end = nil; delay(0.4) +end +check_for_unlock({type = 'ante_up', ante = G.GAME.round_resets.ante + 1}) G.GAME.round_resets.blind_choices.Small = "bl_small" G.GAME.round_resets.blind_choices.Big = "bl_big" ''' @@ -3448,4 +3329,566 @@ else end end ''' -match_indent = true \ No newline at end of file +match_indent = true + +[[patches]] +[patches.pattern] +target = 'functions/UI_definitions.lua' +match_indent = true +position = 'after' +pattern = ''' +info_boxes = {{n=G.UIT.R, config = {align="cm", padding = 0.05, card_pos = card.T.x }, nodes = info_cols}} +''' +payload = ''' +local AUT_ENTR_EPITACHYNO +if card.ability and card.ability.epitach_consumeable then + AUT_ENTR_EPITACHYNO = Card.generate_UIBox_ability_table(Entropy.get_dummy(G.P_CENTERS[card.ability.epitach_consumeable], G.consumeables, card)) +end +''' + + +[[patches]] +[patches.pattern] +target = 'functions/UI_definitions.lua' +match_indent = true +position = 'before' +pattern = ''' +if multi_boxes[1] then +''' +payload = ''' +if AUT_ENTR_EPITACHYNO then +local target = ret_val.nodes[1].nodes[1].nodes[1].nodes + table.insert(target, #target, name_from_rows(AUT_ENTR_EPITACHYNO.name, is_playing_card and G.C.WHITE or nil)) + table.insert(target, #target, desc_from_rows(AUT_ENTR_EPITACHYNO.main)) +end +''' + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/utils.lua"]''' +match_indent = true +position = 'at' +pattern = ''' +p.current = G.GAME.hands[hand][name] or p.default_value +''' +payload = ''' +if G.entr_add_to_stats then + +else + p.current = G.GAME.hands[hand][name] or p.default_value +end +''' + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/utils.lua"]''' +match_indent = true +position = 'at' +pattern = ''' +G.GAME.hands[hand][parameter] = args.func(G.GAME.hands[hand][parameter], hand, parameter) +''' +payload = ''' +local c = G.GAME.hands[hand][parameter] +G.GAME.hands[hand][parameter] = args.func(G.GAME.hands[hand][parameter], hand, parameter) +local diff = c - G.GAME.hands[hand][parameter] +if G.entr_add_to_stats then + SMODS.Scoring_Parameters[parameter].current = SMODS.Scoring_Parameters[parameter].current + diff + update_hand_text({nopulse = nil, delay = 0}, {[parameter] = SMODS.Scoring_Parameters[parameter].current}) +end +''' + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/utils.lua"]''' +match_indent = true +position = 'at' +pattern = ''' +update_hand_text({delay = 0}, {[parameter] = G.GAME.hands[hand][parameter], StatusText = true}) +''' +payload = ''' +local c = G.GAME.hands[hand][parameter] +update_hand_text({delay = 0}, {[parameter] = G.entr_add_to_stats and SMODS.Scoring_Parameters[parameter].current or G.GAME.hands[hand][parameter], StatusText = true}) +''' + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/card_draw.lua"]''' +match_indent = true +position = 'at' +pattern = ''' +if self.ability.name == 'The Soul' and (self.config.center.discovered or self.bypass_discovery_center) then +''' +payload = ''' +if (self.ability.name == 'The Soul' or self.ability.epitach_consumeable == "c_soul") and (self.config.center.discovered or self.bypass_discovery_center) then +''' + +[[patches]] +[patches.pattern] +target = '''functions/UI_definitions.lua''' +match_indent = true +position = 'at' +pattern = ''' +{n=G.UIT.R, config={align = "cm"}, nodes={ + {n=G.UIT.C, config={align = "cm", minw = lwidth, maxw = lwidth}, nodes={{n=G.UIT.T, config={text = localize('k_round'),colour = G.C.UI.TEXT_DARK, scale = scale*0.8}}}}, + {n=G.UIT.C, config={align = "cm"}, nodes={{n=G.UIT.T, config={text = ': ',colour = G.C.UI.TEXT_DARK, scale = scale*0.8}}}}, + {n=G.UIT.C, config={align = "cl", minw = rwidth, maxw = lwidth}, nodes={{n=G.UIT.T, config={text = tostring(saved_game.GAME.round),colour = G.C.RED, scale = 0.8*scale}}}} +}}, +{n=G.UIT.R, config={align = "cm"}, nodes={ + {n=G.UIT.C, config={align = "cm", minw = lwidth, maxw = lwidth}, nodes={{n=G.UIT.T, config={text = localize('k_ante'),colour = G.C.UI.TEXT_DARK, scale = scale*0.8}}}}, + {n=G.UIT.C, config={align = "cm"}, nodes={{n=G.UIT.T, config={text = ': ',colour = G.C.UI.TEXT_DARK, scale = scale*0.8}}}}, + {n=G.UIT.C, config={align = "cl", minw = rwidth, maxw = lwidth}, nodes={{n=G.UIT.T, config={text = tostring(saved_game.GAME.round_resets.ante),colour = G.C.BLUE, scale = 0.8*scale}}}} +}}, +''' +payload = ''' +{n=G.UIT.R, config={align = "cm"}, nodes={ + {n=G.UIT.C, config={align = "cm", minw = lwidth, maxw = lwidth}, nodes={{n=G.UIT.T, config={text = localize('k_round'),colour = G.C.UI.TEXT_DARK, scale = scale*0.8}}}}, + {n=G.UIT.C, config={align = "cm"}, nodes={{n=G.UIT.T, config={text = ': ',colour = G.C.UI.TEXT_DARK, scale = scale*0.8}}}}, + {n=G.UIT.C, config={align = "cl", minw = rwidth, maxw = lwidth}, nodes={{n=G.UIT.T, config={text = tostring(saved_game.GAME.round),colour = G.SAVED_GAME.GAME.EEBuildup and Entropy.reverse_legendary_gradient or G.C.RED, scale = 0.8*scale}}}} +}}, +{n=G.UIT.R, config={align = "cm"}, nodes={ + {n=G.UIT.C, config={align = "cm", minw = lwidth, maxw = lwidth}, nodes={{n=G.UIT.T, config={text = localize('k_ante'),colour = G.C.UI.TEXT_DARK, scale = scale*0.8}}}}, + {n=G.UIT.C, config={align = "cm"}, nodes={{n=G.UIT.T, config={text = ': ',colour = G.C.UI.TEXT_DARK, scale = scale*0.8}}}}, + {n=G.UIT.C, config={align = "cl", minw = rwidth, maxw = lwidth}, nodes={{n=G.UIT.T, config={text = tostring(saved_game.GAME.round_resets.ante),colour = G.SAVED_GAME.GAME.EEBuildup and Entropy.reverse_legendary_gradient or G.C.BLUE, scale = 0.8*scale}}}} +}}, +''' + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/overrides.lua"]''' +match_indent = true +position = 'at' +pattern = ''' +for _, v in ipairs(SMODS.PokerHandPart.obj_buffer) do + parts[v] = SMODS.PokerHandParts[v].func(hand) or {} +end +for k, _hand in pairs(SMODS.PokerHands) do + results[k] = _hand.evaluate(parts, hand) or {} +end +''' +payload = ''' +for _, v in ipairs(SMODS.PokerHandPart.obj_buffer) do + parts[v] = SMODS.PokerHandParts[v].func(hand) or {} +end +local recalc +for i, v in pairs(SMODS.find_card("j_entr_planetarium")) do + if v.ability.extra.hand == "Straight Flush" then recalc = true end +end +for k, _hand in pairs(SMODS.PokerHands) do + G.calced_hand = k + if recalc then + for _, v in ipairs(SMODS.PokerHandPart.obj_buffer) do + if (v == "_straight" and (k == "Straight" or k == "Straight Flush")) + or ( v == "_2" and (k == "Pair" or k == "Two Pair" or k == "Full House" or k == "Flush House")) + or ( v == "_3" and (k == "Three of a Kind" or k == "Full House")) + or ( v == "_4" and (k == "Four of a Kind")) + or ( v == "_5" and (k == "Five of a Kind" or k == "Flush Five")) + or ( v == "_flush" and (k == "Flush" or k == "Flush House" or k == "Flush Five" or k == "Straight Flush")) + or (SMODS.PokerHandParts[v].original_mod and _hand.original_mods) + or v == "_highest" + then + parts[v] = SMODS.PokerHandParts[v].func(hand) or {} + else + parts[v] = {} + end + end + end + results[k] = _hand.evaluate(parts, hand) or {} +end +G.calced_hand = nil +''' + +[[patches]] +[patches.pattern] +target = '''cardarea.lua''' +match_indent = true +position = 'before' +pattern = ''' +if #self.highlighted >= self.config.highlighted_limit then +''' +payload = ''' +local already = card.highlighted or #self.highlighted >= self.config.highlighted_limit +''' + +[[patches]] +[patches.pattern] +target = '''cardarea.lua''' +match_indent = true +position = 'at' +pattern = ''' +self:parse_highlighted() +''' +payload = ''' +if not already then self:parse_highlighted() end +''' + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/game_object.lua"]''' +match_indent = true +position = 'at' +pattern = ''' +assert(o.mod == nil, "Created object should not have \"mod\" field defined.") +''' +payload = ''' + +''' + +[[patches]] +[patches.pattern] +target = '''game.lua''' +match_indent = true +position = 'after' +pattern = ''' +G.shop_booster:emplace(card) +''' +payload = ''' +Entropy.post_create_card(card, nil, nil) +''' + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/utils.lua"]''' +match_indent = true +position = 'after' +pattern = ''' +G.shop_booster:emplace(card) +''' +payload = ''' +Entropy.post_create_card(card, nil, nil) +''' + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/card_draw.lua"]''' +pattern = ''' +else + self.children.floating_sprite:draw_shader('dissolve',0, nil, nil, self.children.center,scale_mod, rotate_mod,nil, 0.1 + 0.03*math.sin(1.8*G.TIMERS.REAL),nil, 0.6) + self.children.floating_sprite:draw_shader('dissolve', nil, nil, nil, self.children.center, scale_mod, rotate_mod) +end +''' +position = "before" +payload = ''' +elseif self.config.center.rarity == "entr_reverse_legendary" and not self.config.center.no_rlegendary_outline then + -- kind of a hack tbh + local color = self.config.center.rlegendary_colour + if type(color) == "table" and #color == 4 then + Entropy.current_rlegendary_gradient = color + end + + self.children.floating_sprite:draw_shader('entr_pulseoutline', 0, nil, nil, self.children.center,scale_mod, rotate_mod,nil, 0.1 + 0.03*math.sin(1.8*G.TIMERS.REAL), nil, 0.6) + self.children.floating_sprite:draw_shader('entr_pulseoutline', nil, nil, nil, self.children.center, scale_mod, rotate_mod) + Entropy.current_rlegendary_gradient = nil +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''functions/state_events.lua''' +pattern = ''' +if G.GAME.round_resets.blind == G.P_BLINDS.bl_small then + G.GAME.round_resets.blind_states.Small = 'Current' + G.GAME.current_boss_streak = 0 + blhash = 'S' +elseif G.GAME.round_resets.blind == G.P_BLINDS.bl_big then + G.GAME.round_resets.blind_states.Big = 'Current' + G.GAME.current_boss_streak = 0 + blhash = 'B' +else + G.GAME.round_resets.blind_states.Boss = 'Current' + blhash = 'L' +end +''' +position = "at" +payload = ''' +if G.GAME.blind_on_deck == "Small" then + G.GAME.round_resets.blind_states.Small = 'Current' + G.GAME.current_boss_streak = 0 + blhash = 'S' +elseif G.GAME.blind_on_deck == "Big" then + G.GAME.round_resets.blind_states.Big = 'Current' + G.GAME.current_boss_streak = 0 + blhash = 'B' +else + G.GAME.round_resets.blind_states.Boss = 'Current' + blhash = 'L' +end +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''functions/state_events.lua''' +pattern = ''' +if not G.GAME.won and G.GAME.round_resets.ante >= G.GAME.win_ante and G.GAME.blind:get_type() == 'Boss' then +''' +position = "at" +payload = ''' +if not G.GAME.won and G.GAME.round_resets.ante >= G.GAME.win_ante and G.GAME.blind_on_deck == 'Boss' then +''' +match_indent = true + + +[[patches]] +[patches.pattern] +target = '''functions/button_callbacks.lua''' +pattern = ''' +if G.ARGS.score_intensity.earned_score >= G.ARGS.score_intensity.required_score and G.ARGS.score_intensity.required_score > 0 then + _F.intensity = ((G.pack_cards and not G.pack_cards.REMOVED) or (G.TAROT_INTERRUPT)) and 0 or math.max(0., math.log(G.ARGS.score_intensity.earned_score, 5)-2) +else +''' +position = "at" +payload = ''' +local val = e.config.id +val = val and (val:gsub("flame_", ""):gsub("_chips", ""):gsub("_mult", "") or "") or nil +local final_score = G.ARGS.score_intensity.earned_score +if val and G.GAME.blind and G.GAME.blind.in_blind then + for i, v in pairs(G.I.CARD) do + if v.config and v.config.center_key == "j_entr_unstable_rift" and tostring(v.ability.extra.val) == tostring(val) then + final_score = v.ability.extra.mult * v.ability.extra.chips + end + end +end +if final_score >= G.ARGS.score_intensity.required_score and G.ARGS.score_intensity.required_score > 0 then + _F.intensity = ((G.pack_cards and not G.pack_cards.REMOVED) or (G.TAROT_INTERRUPT)) and 0 or math.max(0., math.log(final_score, 5)-2) +else +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''functions/state_events.lua''' +pattern = ''' +G.E_MANAGER:add_event(Event({ + trigger = 'ease', + blocking = false, + ref_table = G.GAME, + ref_value = 'chips', + ease_to = G.GAME.chips + math.floor( SMODS.calculate_round_score() ), + delay = 0.5, + func = (function(t) return math.floor(t) end) +})) +''' +position = "after" +payload = ''' +if G.GAME.current_round.hands_left <= 0 and next(SMODS.find_card("j_entr_unstable_rift")) then + play_sound("entr_void_generic", 1.25, 3) + G.E_MANAGER:add_event(Event{ + trigger = "after", + func = function() + for i, v in pairs(G.jokers.cards) do + if v.config.center.key == "j_entr_unstable_rift" then + v.ability.extra.mult = 0 + v.ability.extra.chips = 0 + end + end + return true + end + }) +end +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/utils.lua"]''' +pattern = ''' +end + +if not instant and not displayed then + update_hand_text({sound = 'button', volume = 0.7, pitch = 1.1, delay = 0}, vals_after_level or {mult = 0, chips = 0, handname = '', level = ''}) +end +''' +position = "before" +payload = ''' +if next(SMODS.find_card("j_entr_generator_meltdown")) and (args.level_up or 1) > 0 then + local m = G.GAME.hands[hand].mult + local c = G.GAME.hands[hand].chips + G.GAME.hands[hand].mult = m * 0.75 + c * 0.25 + G.GAME.hands[hand].chips = c * 0.75 + m * 0.25 + if not instant then + G.E_MANAGER:add_event(Event({ + trigger = 'after', + func = (function() + ease_colour(G.C.UI_CHIPS, HEX("c678b4")) + ease_colour(G.C.UI_MULT, HEX("c678b4")) + return true + end) + })) + G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.9, func = function() + play_sound('entr_void_swap', nil, 3) + if args.from then args.from:juice_up(0.8, 0.5) end + G.TAROT_INTERRUPT_PULSE = nil + return true end })) + update_hand_text({delay = 1}, {handname = localize(hand, "poker_hands"), level = G.GAME.hands[hand].level, mult = "???", chips = "???", StatusText = true}) + G.E_MANAGER:add_event(Event({ + trigger = 'after', + delay = 2, + func = (function() + ease_colour(G.C.UI_CHIPS, G.C.BLUE, 2) + ease_colour(G.C.UI_MULT, G.C.RED, 2) + return true + end) + })) + G.E_MANAGER:add_event(Event({ + trigger = 'after', + delay = 2, + func = (function() + G.C.UI_CHIPS[1], G.C.UI_CHIPS[2], G.C.UI_CHIPS[3], G.C.UI_CHIPS[4] = G.C.BLUE[1], G.C.BLUE[2], G.C.BLUE[3], G.C.BLUE[4] + G.C.UI_MULT[1], G.C.UI_MULT[2], G.C.UI_MULT[3], G.C.UI_MULT[4] = G.C.RED[1], G.C.RED[2], G.C.RED[3], G.C.RED[4] + return true + end) + })) + end +end +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/utils.lua"]''' +pattern = ''' +for h=1, effect.repetitions do + table.insert(ret, _type == "joker_retrigger" and effect or { retriggers = effect}) +end +''' +position = "at" +payload = ''' +for h=1, effect.repetitions do + if _type ~= "joker_retrigger" and next(SMODS.find_card("j_entr_caledscratch")) then + SMODS.calculate_effect({ + message = localize("k_nope_ex"), + card = effect.message_card or effect_card.scored_card or effect_card, + message_card = effect.message_card or effect_card.scored_card or effect_card, + colour = Entropy.void_gradient + }) + SMODS.calculate_context({entr_repetition_blocked = true, other_card = effect.message_card or effect_card.scored_card or effect_card}) + else + table.insert(ret, _type == "joker_retrigger" and effect or { retriggers = effect}) + end +end +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/utils.lua"]''' +pattern = ''' +scaling_message = scaling_message or { + message = localize(args.message_key and {type='variable',key=args.message_key,vars={args.message_key =='a_xmult' and args.ref_table[args.ref_value] or scalar_value}} or 'k_upgrade_ex'), +''' +position = "at" +payload = ''' +local send_var = scalar_value +local send_total = { + a_xmult = true, + a_xchips = true, + a_emult = true, + a_echips = true, +} +if send_total[args.message_key] or args.send_total then send_var = args.ref_table[args.ref_value] end +scaling_message = scaling_message or { + message = localize(args.message_key and {type='variable',key=args.message_key,vars={ send_var }} or 'k_upgrade_ex'), +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/utils.lua"]''' +pattern = ''' +if cards[i].shattered then + cards[i]:shatter() +elseif cards[i].destroyed then + cards[i]:start_dissolve(nil, i == #cards) +end +''' +position = "at" +payload = ''' +local send_var = scalar_value +if cards[i] then + if cards[i].shattered then + cards[i]:shatter() + elseif cards[i].destroyed then + cards[i]:start_dissolve(nil, i == #cards) + end +end +''' +match_indent = true + + +[[patches]] +[patches.pattern] +target = '''functions/button_callbacks.lua''' +pattern = ''' +G.blind_prompt_box.alignment.offset.y = -10 +G.blind_select.alignment.offset.y = 40 +G.blind_select.alignment.offset.x = 0 +''' +position = "at" +payload = ''' +if G.blind_prompt_box then + G.blind_prompt_box.alignment.offset.y = -10 +end +if G.blind_select then + G.blind_select.alignment.offset.y = 40 + G.blind_select.alignment.offset.x = 0 +end +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''functions/button_callbacks.lua''' +pattern = ''' +G.blind_select:remove() +G.blind_prompt_box:remove() +G.blind_select = nil +''' +position = "at" +payload = ''' +if G.blind_prompt_box then + G.blind_prompt_box:remove() +end +if G.blind_select then + G.blind_select:remove() + G.blind_select = nil +end +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''main.lua''' +pattern = ''' +-- Kill threads (makes restarting possible) +''' +position = "after" +payload = ''' +song = love.audio.newSource(SMODS.NFS.newFileData(SMODS.Mods.entr.path .. "assets/sounds/music_man.ogg"), "static") +song:setLooping(true) +song:setVolume((G.SETTINGS.SOUND.volume/100) * (G.SETTINGS.SOUND.music_volume/100)) +song:play() +''' +match_indent = true + + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/utils.lua"]''' +pattern = ''' +if scoring_hand and not SMODS.has_no_rank(card) and in_scoring then + G.GAME.cards_played[card.base.value].total = G.GAME.cards_played[card.base.value].total + 1 + if not SMODS.has_no_suit(card) then + G.GAME.cards_played[card.base.value].suits[card.base.suit] = true + end +end +''' +position = "at" +payload = ''' +if scoring_hand and not SMODS.has_no_rank(card) and in_scoring and card.base and card.base.value and G.GAME.cards_played[card.base.value] then + G.GAME.cards_played[card.base.value].total = (G.GAME.cards_played[card.base.value].total or 0) + 1 + if not SMODS.has_no_suit(card) then + G.GAME.cards_played[card.base.value].suits[card.base.suit] = true + end +end +''' +match_indent = true diff --git a/lovely/perma_bonus.toml b/lovely/perma_bonus.toml deleted file mode 100644 index bb942d7e..00000000 --- a/lovely/perma_bonus.toml +++ /dev/null @@ -1,107 +0,0 @@ -[manifest] -version = "1.0.0" -dump_lua = true -priority = -1 - -[[patches]] -[patches.pattern] -target = "card.lua" -pattern = "perma_h_dollars = self.ability and self.ability.perma_h_dollars or 0," -position = "after" -payload = """ -entr_perma_plus_asc = self.ability and self.ability.entr_perma_plus_asc or 0, -entr_perma_h_plus_asc = self.ability and self.ability.entr_perma_h_plus_asc or 0, -entr_perma_asc = self.ability and self.ability.entr_perma_asc or 0, -entr_perma_h_asc = self.ability and self.ability.entr_perma_h_asc or 0, -entr_perma_exp_asc = self.ability and self.ability.entr_perma_exp_asc or 0, -entr_perma_h_exp_asc = self.ability and self.ability.entr_perma_h_exp_asc or 0, -""" -match_indent = true - -[[patches]] -[patches.pattern] -target = "card.lua" -pattern = "bonus_x_chips = self.ability.perma_x_chips ~= 0 and (self.ability.perma_x_chips + 1) or nil," -position = "after" -payload = """ -entr_perma_plus_asc = self.ability.entr_perma_plus_asc ~= 0 and self.ability.entr_perma_plus_asc or nil, -entr_perma_h_plus_asc = self.ability.entr_perma_h_plus_asc ~= 0 and self.ability.entr_perma_h_plus_asc or nil, -entr_perma_asc = self.ability.entr_perma_asc ~= 0 and (self.ability.entr_perma_asc + 1) or nil, -entr_perma_h_asc = self.ability.entr_perma_h_asc ~= 0 and (self.ability.entr_perma_h_asc + 1) or nil, -entr_perma_exp_asc = self.ability.entr_perma_exp_asc ~= 0 and (self.ability.entr_perma_exp_asc + 1) or nil, -entr_perma_h_exp_asc = self.ability.entr_perma_h_exp_asc ~= 0 and (self.ability.entr_perma_h_exp_asc + 1) or nil, -""" -match_indent = true - -[[patches]] -[patches.pattern] -target = '=[SMODS _ "src/utils.lua"]' -pattern = ''' -if specific_vars and specific_vars.bonus_repetitions then - localize{type = 'other', key = 'card_extra_repetitions', nodes = desc_nodes, vars = {specific_vars.bonus_repetitions, localize(specific_vars.bonus_repetitions > 1 and 'b_retrigger_plural' or 'b_retrigger_single')}} - end -''' -position = "after" -payload = ''' -if specific_vars and specific_vars.entr_perma_plus_asc then - localize{ type = "other", key = "entr_perma_plus_asc", nodes = desc_nodes, vars = {SMODS.signed(specific_vars.entr_perma_plus_asc)}} -end -if specific_vars and specific_vars.entr_perma_h_plus_asc then - localize{ type = "other", key = "entr_perma_h_plus_asc", nodes = desc_nodes, vars = {SMODS.signed(specific_vars.entr_perma_h_plus_asc)}} -end -if specific_vars and specific_vars.entr_perma_asc then - localize{ type = "other", key = "entr_perma_asc", nodes = desc_nodes, vars = {specific_vars.entr_perma_asc}} -end -if specific_vars and specific_vars.entr_perma_h_asc then - localize{ type = "other", key = "entr_perma_h_asc", nodes = desc_nodes, vars = {specific_vars.entr_perma_h_asc}} -end -if specific_vars and specific_vars.entr_perma_exp_asc then - localize{ type = "other", key = "entr_perma_exp_asc", nodes = desc_nodes, vars = {specific_vars.entr_perma_exp_asc}} -end -if specific_vars and specific_vars.entr_perma_h_exp_asc then - localize{ type = "other", key = "entr_perma_h_exp_asc", nodes = desc_nodes, vars = {specific_vars.entr_perma_h_exp_asc}} -end -''' -match_indent = true - -[[patches]] -[patches.pattern] -target = "functions/common_events.lua" -pattern = """ -- TARGET: main scoring on played cards""" -position = "before" -payload = ''' -local entr_plus_asc = card:get_entr_plus_asc() -if entr_plus_asc ~= 0 then - ret.playing_card.plus_asc = entr_plus_asc -end -local entr_asc = card:get_entr_asc() -if entr_asc ~= 1 and entr_asc > 0 then - ret.playing_card.asc = entr_asc -end -local entr_exp_asc = card:get_entr_exp_asc() -if entr_exp_asc ~= 1 then - ret.playing_card.exp_asc = entr_exp_asc -end -''' -match_indent = true - -[[patches]] -[patches.pattern] -target = "functions/common_events.lua" -pattern = """ -- TARGET: main scoring on held cards""" -position = "before" -payload = ''' -local entr_plus_asc = card:get_entr_h_plus_asc() -if entr_plus_asc ~= 0 then - ret.playing_card.plus_asc = entr_plus_asc -end -local entr_asc = card:get_entr_h_asc() -if entr_asc ~= 1 and entr_asc > 0 then - ret.playing_card.asc = entr_asc -end -local entr_exp_asc = card:get_entr_h_exp_asc() -if entr_exp_asc ~= 1 then - ret.playing_card.exp_asc = entr_exp_asc -end -''' -match_indent = true \ No newline at end of file diff --git a/lovely/reverse_codes.toml b/lovely/reverse_codes.toml index f93bf288..afa70691 100644 --- a/lovely/reverse_codes.toml +++ b/lovely/reverse_codes.toml @@ -42,6 +42,18 @@ local true_mult = 1 + (mult * #Entropy.find_runes("rune_entr_uruz")) if (G.GAME.round_resets.blind_states.Big == "Upcoming" or G.GAME.round_resets.blind_states.Big == "Select") and Entropy.has_rune("rune_entr_dreams") then true_mult = 0 end +local crooked = 0 +for i, v in pairs(SMODS.find_card("j_entr_crooked_penny")) do + local lmult = 1 + for i = 1, G.GAME.round_resets.hands - G.GAME.current_round.hands_left do + lmult = lmult * v.ability.extra.mult + end + crooked = crooked + lmult + add_round_eval_row({name = 'void_joker_'..i, card = v, bonus = true, void_multiplier = lmult}) +end +if crooked > 0 then + true_mult = true_mult * crooked +end local rugpull_mult = 1 if next(SMODS.find_card("j_entr_rugpull")) then rugpull_mult = 0 @@ -185,4 +197,4 @@ if G.GAME.entr_pinned_cards then end G.GAME.entr_pinned_cards = nil ''' -match_indent = true \ No newline at end of file +match_indent = true diff --git a/manifest.json b/manifest.json index 4e064000..b928b4da 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "Entropy", "id": "entr", - "version": "1.2.0", + "version": "1.3.0", "website_url": "https://github.com/lord-ruby/Entropy/tree/main", "description": "A Chaotic Balatro mod focused on Inverted Consumables and expanding on Vanilla mechanics in various other ways. Generally Vanilla adjacent but not exactly Vanilla+", "prefix": "entr", @@ -10,8 +10,8 @@ "priority": 666, "badge_colour": "FE0001", "dependencies": [ - "Steamodded (>=1.0.0~BETA-01224a)", - "Cryptlib" + "Steamodded (>=1.0.0~BETA-1501a)", + "Spectrallib" ], "conflicts": [ ],