diff --git a/Entropy.lua b/Entropy.lua index 19d52f70..485020b1 100644 --- a/Entropy.lua +++ b/Entropy.lua @@ -10,6 +10,7 @@ local i = { "lib/loader", "lib/ui", "lib/fixes", + "lib/ascended", "items/misc/atlases", "items/misc/rarities", @@ -60,6 +61,7 @@ Entropy.load_files(i) Entropy.display_name = SMODS.current_mod.display_name SMODS.current_mod.optional_features = { retrigger_joker = true, + post_trigger = true, } if not Cryptid.mod_whitelist then Cryptid.mod_whitelist = {} end @@ -91,6 +93,9 @@ if Cryptid.misprintize_value_blacklist then Cryptid.misprintize_value_blacklist.debuff_timer = false Cryptid.misprintize_value_blacklist.superego_copies = false Cryptid.misprintize_value_blacklist.entr_hotfix_rounds = false + Cryptid.misprintize_value_blacklist.debuff_timer = false + Cryptid.misprintize_value_blacklist.debuff_timer_max = false + Cryptid.misprintize_value_blacklist.left = false end SMODS.current_mod.calculate = function(self, context) return Entropy.misc_calculations(self, context) diff --git a/assets/1x/RubyDeck.png b/assets/1x/RubyDeck.png new file mode 100644 index 00000000..e056d295 Binary files /dev/null and b/assets/1x/RubyDeck.png differ diff --git a/assets/1x/RubyDeck2.png b/assets/1x/RubyDeck2.png new file mode 100644 index 00000000..6b6185f2 Binary files /dev/null and b/assets/1x/RubyDeck2.png differ diff --git a/assets/1x/blinds.png b/assets/1x/blinds.png index b9de48e9..abc747d0 100644 Binary files a/assets/1x/blinds.png and b/assets/1x/blinds.png differ diff --git a/assets/1x/boosters.png b/assets/1x/boosters.png index 229d3ed4..926661f1 100644 Binary files a/assets/1x/boosters.png and b/assets/1x/boosters.png differ diff --git a/assets/1x/crossmod/crossmod_consumables.png b/assets/1x/crossmod/crossmod_consumables.png index 6678ef76..7619ef21 100644 Binary files a/assets/1x/crossmod/crossmod_consumables.png and b/assets/1x/crossmod/crossmod_consumables.png differ diff --git a/assets/1x/crossmod/crossmod_tags.png b/assets/1x/crossmod/crossmod_tags.png new file mode 100644 index 00000000..be4e7b18 Binary files /dev/null and b/assets/1x/crossmod/crossmod_tags.png differ diff --git a/assets/1x/crossmod/valk_aesthetics.png b/assets/1x/crossmod/valk_aesthetics.png new file mode 100644 index 00000000..33f8e8dc Binary files /dev/null and b/assets/1x/crossmod/valk_aesthetics.png differ diff --git a/assets/1x/crypt_decks.png b/assets/1x/crypt_decks.png index 476e3fb5..d7204854 100644 Binary files a/assets/1x/crypt_decks.png and b/assets/1x/crypt_decks.png differ diff --git a/assets/1x/decks.png b/assets/1x/decks.png index 863edde2..6d1cbca5 100644 Binary files a/assets/1x/decks.png and b/assets/1x/decks.png differ diff --git a/assets/1x/enhancements.png b/assets/1x/enhancements.png index ae6f0dae..51144689 100644 Binary files a/assets/1x/enhancements.png and b/assets/1x/enhancements.png differ diff --git a/assets/1x/entr_nilsuit_hc.png b/assets/1x/entr_nilsuit_hc.png index b077b6fe..bbda84f5 100644 Binary files a/assets/1x/entr_nilsuit_hc.png and b/assets/1x/entr_nilsuit_hc.png differ diff --git a/assets/1x/entr_nilsuit_lc.png b/assets/1x/entr_nilsuit_lc.png index c376640e..45f1a059 100644 Binary files a/assets/1x/entr_nilsuit_lc.png and b/assets/1x/entr_nilsuit_lc.png differ diff --git a/assets/1x/exotic_jokers.png b/assets/1x/exotic_jokers.png index 717f8261..4f968647 100644 Binary files a/assets/1x/exotic_jokers.png and b/assets/1x/exotic_jokers.png differ diff --git a/assets/1x/grahkon.png b/assets/1x/grahkon.png new file mode 100644 index 00000000..9a0eabc4 Binary files /dev/null and b/assets/1x/grahkon.png differ diff --git a/assets/1x/jokers.png b/assets/1x/jokers.png index bc8f17b6..dc1c0cd8 100644 Binary files a/assets/1x/jokers.png and b/assets/1x/jokers.png differ diff --git a/assets/1x/malverk/spectrans/other_consumables.png b/assets/1x/malverk/spectrans/other_consumables.png index 09eaa0f1..1a3482eb 100644 Binary files a/assets/1x/malverk/spectrans/other_consumables.png and b/assets/1x/malverk/spectrans/other_consumables.png differ diff --git a/assets/1x/malverk/spectrans/runes.png b/assets/1x/malverk/spectrans/runes.png index 25873f79..74721d75 100644 Binary files a/assets/1x/malverk/spectrans/runes.png and b/assets/1x/malverk/spectrans/runes.png differ diff --git a/assets/1x/other_consumables.png b/assets/1x/other_consumables.png index 295058ff..73c53eb2 100644 Binary files a/assets/1x/other_consumables.png and b/assets/1x/other_consumables.png differ diff --git a/assets/1x/prismatic_shard.png b/assets/1x/prismatic_shard.png index 6c87ecd0..9ced9891 100644 Binary files a/assets/1x/prismatic_shard.png and b/assets/1x/prismatic_shard.png differ diff --git a/assets/1x/reverse_tarots.png b/assets/1x/reverse_tarots.png index c63b79f0..93957015 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 9584decc..419cb900 100644 Binary files a/assets/1x/ruby.png and b/assets/1x/ruby.png differ diff --git a/assets/1x/runes.png b/assets/1x/runes.png index fa33f684..265d10fd 100644 Binary files a/assets/1x/runes.png and b/assets/1x/runes.png differ diff --git a/assets/1x/second_consumables.png b/assets/1x/second_consumables.png index c184f0c3..e39eb8a9 100644 Binary files a/assets/1x/second_consumables.png and b/assets/1x/second_consumables.png differ diff --git a/assets/1x/sleeves.png b/assets/1x/sleeves.png index bce74078..8555d17d 100644 Binary files a/assets/1x/sleeves.png and b/assets/1x/sleeves.png differ diff --git a/assets/2x/RubyDeck.png b/assets/2x/RubyDeck.png new file mode 100644 index 00000000..7c85bfa9 Binary files /dev/null and b/assets/2x/RubyDeck.png differ diff --git a/assets/2x/RubyDeck2.png b/assets/2x/RubyDeck2.png new file mode 100644 index 00000000..a0ac1c91 Binary files /dev/null and b/assets/2x/RubyDeck2.png differ diff --git a/assets/2x/blinds.png b/assets/2x/blinds.png index 2ea03376..a0392f14 100755 Binary files a/assets/2x/blinds.png and b/assets/2x/blinds.png differ diff --git a/assets/2x/boosters.png b/assets/2x/boosters.png index b5148afa..8cddb369 100755 Binary files a/assets/2x/boosters.png and b/assets/2x/boosters.png differ diff --git a/assets/2x/crossmod/crossmod_consumables.png b/assets/2x/crossmod/crossmod_consumables.png index e7fa1cbd..64263497 100644 Binary files a/assets/2x/crossmod/crossmod_consumables.png and b/assets/2x/crossmod/crossmod_consumables.png differ diff --git a/assets/2x/crossmod/crossmod_tags.png b/assets/2x/crossmod/crossmod_tags.png new file mode 100644 index 00000000..3af5d7a5 Binary files /dev/null and b/assets/2x/crossmod/crossmod_tags.png differ diff --git a/assets/2x/crossmod/valk_aesthetics.png b/assets/2x/crossmod/valk_aesthetics.png new file mode 100644 index 00000000..74a46615 Binary files /dev/null and b/assets/2x/crossmod/valk_aesthetics.png differ diff --git a/assets/2x/crypt_decks.png b/assets/2x/crypt_decks.png index 2dd576db..2fb141dd 100755 Binary files a/assets/2x/crypt_decks.png and b/assets/2x/crypt_decks.png differ diff --git a/assets/2x/decks.png b/assets/2x/decks.png index 485feb33..96a9f5fa 100755 Binary files a/assets/2x/decks.png and b/assets/2x/decks.png differ diff --git a/assets/2x/enhancements.png b/assets/2x/enhancements.png index 20dc53b1..ec336781 100755 Binary files a/assets/2x/enhancements.png and b/assets/2x/enhancements.png differ diff --git a/assets/2x/entr_nilsuit_hc.png b/assets/2x/entr_nilsuit_hc.png index 42c6cd44..281b8f85 100755 Binary files a/assets/2x/entr_nilsuit_hc.png and b/assets/2x/entr_nilsuit_hc.png differ diff --git a/assets/2x/entr_nilsuit_lc.png b/assets/2x/entr_nilsuit_lc.png index 854e581f..e9bda8ee 100755 Binary files a/assets/2x/entr_nilsuit_lc.png and b/assets/2x/entr_nilsuit_lc.png differ diff --git a/assets/2x/exotic_jokers.png b/assets/2x/exotic_jokers.png index 6bc07773..26b7660e 100755 Binary files a/assets/2x/exotic_jokers.png and b/assets/2x/exotic_jokers.png differ diff --git a/assets/2x/grahkon.png b/assets/2x/grahkon.png new file mode 100644 index 00000000..f1f6893c Binary files /dev/null and b/assets/2x/grahkon.png differ diff --git a/assets/2x/jokers.png b/assets/2x/jokers.png index cdd179fc..f5495f61 100755 Binary files a/assets/2x/jokers.png and b/assets/2x/jokers.png differ diff --git a/assets/2x/malverk/spectrans/other_consumables.png b/assets/2x/malverk/spectrans/other_consumables.png index 15fc48f1..143d7b36 100644 Binary files a/assets/2x/malverk/spectrans/other_consumables.png and b/assets/2x/malverk/spectrans/other_consumables.png differ diff --git a/assets/2x/malverk/spectrans/runes.png b/assets/2x/malverk/spectrans/runes.png index 1e8daa0f..b225cb84 100644 Binary files a/assets/2x/malverk/spectrans/runes.png and b/assets/2x/malverk/spectrans/runes.png differ diff --git a/assets/2x/other_consumables.png b/assets/2x/other_consumables.png index 760d1972..5905c313 100755 Binary files a/assets/2x/other_consumables.png and b/assets/2x/other_consumables.png differ diff --git a/assets/2x/prismatic_shard.png b/assets/2x/prismatic_shard.png index 80014bd7..08f0462d 100644 Binary files a/assets/2x/prismatic_shard.png and b/assets/2x/prismatic_shard.png differ diff --git a/assets/2x/reverse_tarots.png b/assets/2x/reverse_tarots.png index 76f50315..a8eb8a0a 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 8be660d3..e154c9c2 100755 Binary files a/assets/2x/ruby.png and b/assets/2x/ruby.png differ diff --git a/assets/2x/runes.png b/assets/2x/runes.png index bc65b419..881a80ba 100755 Binary files a/assets/2x/runes.png and b/assets/2x/runes.png differ diff --git a/assets/2x/second_consumables.png b/assets/2x/second_consumables.png index abd77315..55b8f69b 100755 Binary files a/assets/2x/second_consumables.png and b/assets/2x/second_consumables.png differ diff --git a/assets/2x/sleeves.png b/assets/2x/sleeves.png index 421dce43..904d2091 100755 Binary files a/assets/2x/sleeves.png and b/assets/2x/sleeves.png differ diff --git a/assets/shaders/brimstone.fs b/assets/shaders/brimstone.fs new file mode 100644 index 00000000..1ce03c8a --- /dev/null +++ b/assets/shaders/brimstone.fs @@ -0,0 +1,317 @@ +#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 brimstone; +extern MY_HIGHP_OR_MEDIUMP vec2 entr_brimstone; +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(brimstone.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 = brimstone; + uv = entr_brimstone; + } + + float mod = brimstone.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 = brimstone.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(brimstone.y) + 1.) / 2.; + vec4 base_col = vec4(1.5, .2, .55, 1.) * (1. - p) + vec4(1.5, .0, .0, 1.) * p; + colour = (colour + vec4(-0.25,-0.25,-0.25,0)) * (1.-uv.y); + colour = colour * smoke(brimstone.y, uv, base_col) + base_col * (uv.y); + return dissolve_mask(tex * colour * pixel, 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/brimstone_badge.fs b/assets/shaders/brimstone_badge.fs new file mode 100644 index 00000000..5b708a7b --- /dev/null +++ b/assets/shaders/brimstone_badge.fs @@ -0,0 +1,148 @@ +#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 brimstone_badge; +extern MY_HIGHP_OR_MEDIUMP vec2 uibox_pos; +extern MY_HIGHP_OR_MEDIUMP vec2 uibox_size; + +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 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; +} + +#define PI 3.14159265358979323846 + +float rand(vec2 c){ + return fract(sin(dot(c.xy ,vec2(12.9898,78.233))) * 43758.5453); +} + + + +vec4 effect( vec4 colour, Image texture, vec2 texture_coords, vec2 screen_coords ) +{ + vec4 tex = colour; + + vec2 uv = (screen_coords - uibox_pos) / uibox_size.xy; + + //if (uv.x < 0.00001) { + // uv = (screen_coords - (uibox_pos / screen_scale)) / (uibox_size.xy * screen_scale); + //} + + uv.x = uv.x * (love_ScreenSize.x/love_ScreenSize.y); + uv.y = uv.y / (20.); + + vec4 hsl = HSL(vec4(tex.r, tex.g, tex.b, tex.a)); + + //float fuckyouGSL = min(0, 0.001 * (brimstone_badge.x + uibox_size.x + uibox_pos.x + screen_scale + time)); + + float t = 1543.1954 + brimstone_badge.y * 0.32151; + + float scale_const = 10; + + float cx = uv.x * scale_const * 0.45; + float cy = uv.y * scale_const * 1.5; + + //t *= 5; + + + hsl.x = 0.99; + hsl.y = 0.9; + hsl.z = 0; + + //float pulse = pow(2 * abs(pow(mod(-0.16 * cy - 0.15 * t - sin(5.2 * cx + 0.3 * t)/2 - sin(12.3 * cx + 0.11 * t)/5, 1), 2) - 0.5), 2); + + float flame1 = pow((sin(1.11 * cx - sin(1.11 * t))), 2) + pow((sin(1.11 * cy + 1.00 * t - sin(7 * t + 1.2 * cx))), 2); + float flame2 = pow((sin(2.10 * cx - sin(0.40 * t))), 2) + pow((sin(3.04 * cy + 2.41 * t - sin(-7 * t + 2 * cx))), 2); + float flame3 = pow((sin(6.14 * cx - sin(2.40 * t))), 2) + pow((sin(2.14 * cy + 3.41 * t)), 2); + //float flame4 = max(0, pow((sin(44.1 * cx - sin(4.77 * t))), 2) + pow((sin(0.66 * cy + 9.14 * t - sin(1.23 * t + cx))), 2)); + + float flamebundle = (- flame1 * flame2 - flame1 * flame3 + flame2 * flame3)/4; + + hsl.z += (1.2 * flame1 + 1.1 * flame2 + 0.7 * flame3 + flamebundle)/4;// * pulse; + hsl.x -= flamebundle/7; + + //hsl.z = pow(hsl.z, 2)/(pow(hsl.z, 2) + 1); + + //hsl.z += flame1 + flame2;// * pulse; + + number low = min(tex.r, min(tex.g, tex.b)); + number high = max(tex.r, max(tex.g, tex.b)); + number delta = high-low -0.1; + + + vec4 rgb = HSVtoRGB(hsl); + + //rgb.r += flame1; + //rgb.b += flame2; + //rgb.g += flame3; + + return vec4(rgb.r, rgb.g, rgb.b, 1); +} \ No newline at end of file diff --git a/assets/shaders/lowres.fs b/assets/shaders/lowres.fs index 53bdd4b9..2f879b90 100644 --- a/assets/shaders/lowres.fs +++ b/assets/shaders/lowres.fs @@ -221,10 +221,11 @@ vec4 effect( vec4 colour, Image texture, vec2 texture_coords, vec2 screen_coords vec4 hsl = HSL(vec4(tex.r, tex.g, tex.b, tex.a)); vec4 rgb = HSVtoRGB(hsl); + - rgb.r = rgb.r * (0.0 + floor(mod2(cx/9. + 0.0000) + 0.3333)); - rgb.g = rgb.g * (0.0 + 0.7 * floor(mod2(cx/9. + 0.3333) + 0.3333)); - rgb.b = rgb.b * (0.0 + floor(mod2(cx/9. + 0.6667) + 0.3333)); + rgb.r = rgb.r * (0.0 + 0.8 * floor(mod2(cx/9. + 0.0000) + 0.3333)); + rgb.g = rgb.g * (0.0 + 0.8 * floor(mod2(cx/9. + 0.3333) + 0.3333)); + rgb.b = rgb.b * (0.0 + 1.1 * floor(mod2(cx/9. + 0.6667) + 0.3333)); hsl = RGBtoHSV(rgb); @@ -234,8 +235,8 @@ vec4 effect( vec4 colour, Image texture, vec2 texture_coords, vec2 screen_coords //hsl.x = floor(cx/3)/3; //hsl.z = (3 + hsl.z)/5; - hsl.z -= max(0.0, pow(sin(6.28*mod2(cx/9. + 0.25)), 4.0) - 0.2); - hsl.z -= max(0.0, pow(sin(6.28*mod2(cy/9. + 0.25)), 4.0) - 0.2); + hsl.z -= max(0.0, pow(sin(6.28*mod2(cx/9. + 0.25)), 4.0) - 0.25); + hsl.z -= max(0.0, pow(sin(6.28*mod2(cy/7. + 0.25)), 4.0) - 0.25); hsl.z = max(hsl.z, 0.0); //hsl.z -= floor(mod2(cx/9 - 0.05) + 0.1); //hsl.z -= floor(mod2(cy/9 - 0.05) + 0.1); diff --git a/assets/shaders/splash.fs b/assets/shaders/splash.fs new file mode 100644 index 00000000..e918d760 --- /dev/null +++ b/assets/shaders/splash.fs @@ -0,0 +1,58 @@ +#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 number time; +extern MY_HIGHP_OR_MEDIUMP number vort_speed; +extern MY_HIGHP_OR_MEDIUMP vec4 colour_1; +extern MY_HIGHP_OR_MEDIUMP vec4 colour_2; +extern MY_HIGHP_OR_MEDIUMP number mid_flash; +extern MY_HIGHP_OR_MEDIUMP number vort_offset; +extern MY_HIGHP_OR_MEDIUMP float transgender; + +#define PIXEL_SIZE_FAC 700. +#define BLACK 0.6*vec4(79./255.,99./255., 103./255., 1./0.6) + +vec4 effect( vec4 colour, Image texture, vec2 texture_coords, vec2 screen_coords ) +{ + //Convert to UV coords (0-1) and floor for pixel effect + MY_HIGHP_OR_MEDIUMP number pixel_size = length(love_ScreenSize.xy)/PIXEL_SIZE_FAC; + MY_HIGHP_OR_MEDIUMP vec2 uv = (floor(screen_coords.xy*(1./pixel_size))*pixel_size - 0.5*love_ScreenSize.xy)/length(love_ScreenSize.xy); + MY_HIGHP_OR_MEDIUMP number uv_len = length(uv); + + //Adding in a center swirl, changes with time + MY_HIGHP_OR_MEDIUMP number speed = time*vort_speed; + MY_HIGHP_OR_MEDIUMP number new_pixel_angle = atan(uv.y, uv.x) + (2.2 + 0.4*min(6.,speed))*uv_len - 1. - speed*0.05 - min(6.,speed)*speed*0.02 + vort_offset; + MY_HIGHP_OR_MEDIUMP vec2 mid = (love_ScreenSize.xy/length(love_ScreenSize.xy))/2.; + MY_HIGHP_OR_MEDIUMP vec2 sv = vec2((uv_len * cos(new_pixel_angle) + mid.x), (uv_len * sin(new_pixel_angle) + mid.y)) - mid; + + //Now add the smoke effect to the swirled UV + + sv *= 30.; + speed = time*(6.)*vort_speed + vort_offset + 1033.; + MY_HIGHP_OR_MEDIUMP vec2 uv2 = vec2(sv.x+sv.y); + + for(int i=0; i < 5; i++) { + uv2 += sin(max(sv.x, sv.y)) + sv; + sv += 0.5*vec2(cos(5.1123314 + 0.353*uv2.y + speed*0.131121),sin(uv2.x - 0.113*speed)); + sv -= 1.0*cos(sv.x + sv.y) - 1.0*sin(sv.x*0.711 - sv.y); + } + + //Make the smoke amount range from 0 - 2 + MY_HIGHP_OR_MEDIUMP number smoke_res =min(2., max(-2., 1.5 + length(sv)*0.12 - 0.17*(min(10.,time*1.2 - 4.)))); + if (smoke_res < 0.2) { + smoke_res = (smoke_res - 0.2)*0.6 + 0.2; + } + + MY_HIGHP_OR_MEDIUMP number c1p = max(0.,1. - 2.*abs(1.-smoke_res)); + MY_HIGHP_OR_MEDIUMP number c2p = max(0.,1. - 2.*(smoke_res)); + MY_HIGHP_OR_MEDIUMP number cb = 1. - min(1., c1p + c2p); + + MY_HIGHP_OR_MEDIUMP vec4 ret_col = colour_1*c1p + colour_2*c2p + vec4(cb*BLACK.rgb, cb*colour_1.a); + MY_HIGHP_OR_MEDIUMP number mod_flash = max(mid_flash*0.8, max(c1p, c2p)*5. - 4.4) + mid_flash*max(c1p, c2p); + float dist = (uv.x)*(uv.x)+(uv.y)*(uv.y); + ret_col.a = transgender; + return ret_col*(0.15 - mod_flash) + mod_flash*vec4(1.5, .2, .55, transgender)*1.7*((sin(dist/10. + time/2.)+3.)/2.); +} \ No newline at end of file diff --git a/assets/sounds/bounce.ogg b/assets/sounds/bounce.ogg new file mode 100644 index 00000000..404e202b Binary files /dev/null and b/assets/sounds/bounce.ogg differ diff --git a/assets/sounds/music_dread.ogg b/assets/sounds/music_dread.ogg deleted file mode 100644 index 59e79466..00000000 Binary files a/assets/sounds/music_dread.ogg and /dev/null differ diff --git a/assets/sounds/polaroid.ogg b/assets/sounds/polaroid.ogg new file mode 100644 index 00000000..b3170075 Binary files /dev/null and b/assets/sounds/polaroid.ogg differ diff --git a/compat/compat_loader.lua b/compat/compat_loader.lua index bb745745..3117737b 100644 --- a/compat/compat_loader.lua +++ b/compat/compat_loader.lua @@ -10,7 +10,9 @@ local i = { "compat/aikoshen", "compat/tspectrals", "compat/grabbag", - "compat/bunco" + "compat/bunco", + "compat/hotpotato", + "compat/vallkarri", } Entropy.load_files(i) @@ -20,4 +22,4 @@ if Penumbra then 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" -end \ No newline at end of file +end diff --git a/compat/cryptid.lua b/compat/cryptid.lua index 7a3f0558..2a83d2fe 100644 --- a/compat/cryptid.lua +++ b/compat/cryptid.lua @@ -42,6 +42,8 @@ if SMODS.Mods.Cryptid and SMODS.Mods.Cryptid.can_load then Cryptid.edeck_sprites.enhancement.m_entr_prismatic = {atlas="entr_crypt_deck", pos = {x=3,y=1}} Cryptid.edeck_sprites.enhancement.m_entr_dark = {atlas="entr_crypt_deck", pos = {x=3,y=2}} Cryptid.edeck_sprites.enhancement.m_entr_ceramic = {atlas="entr_crypt_deck", pos = {x=1,y=4}} + Cryptid.edeck_sprites.enhancement.m_entr_ethereal = {atlas="entr_crypt_deck", pos = {x=4,y=4}} + Cryptid.edeck_sprites.enhancement.m_entr_samsara = {atlas="entr_crypt_deck", pos = {x=5,y=4}} Cryptid.edeck_sprites.sticker.entr_pinned = {atlas="entr_crypt_deck", pos = {x=4,y=1}} Cryptid.edeck_sprites.sticker.entr_hotfix = {atlas="entr_crypt_deck", pos = {x=5,y=1}} Cryptid.edeck_sprites.sticker.entr_pseudorandom = {atlas="entr_crypt_deck", pos = {x=6,y=1}} @@ -255,6 +257,31 @@ local containment = { return { items = items } +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:update_text() + end + -- Needed because get_poker_hand_info isnt called at the end of the road + local evaluateroundref = G.FUNCS.evaluate_round + function G.FUNCS.evaluate_round() + evaluateroundref() + -- This is just the easiest way to check if its gold because lua is annoying + 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 + end + return { + items = items + } else G.FUNCS.cry_asc_UI_set = function(e) e.config.object.colours = { G.C.GOLD } diff --git a/compat/cryptid/entropic_jokers.lua b/compat/cryptid/entropic_jokers.lua index fd5c1c62..9f2df4d0 100644 --- a/compat/cryptid/entropic_jokers.lua +++ b/compat/cryptid/entropic_jokers.lua @@ -94,7 +94,7 @@ local helios = { } } -Cryptid.big_num_blacklist["j_entr_xekanos"] = true +if Cryptid.big_num_blacklist then Cryptid.big_num_blacklist["j_entr_xekanos"] = true end local xekanos = { order = 602, object_type = "Joker", @@ -348,70 +348,6 @@ local parakmi = { end } -local AscendantTags = { - tag_uncommon="tag_entr_ascendant_rare", - tag_rare="tag_entr_ascendant_epic", - tag_negative="tag_entr_ascendant_negative", - tag_foil="tag_entr_ascendant_foil", - tag_holo="tag_entr_ascendant_holo", - tag_polychrome="tag_entr_ascendant_poly", - tag_investment="tag_entr_ascendant_stock", - tag_voucher="tag_entr_ascendant_voucher", - tag_boss="tag_entr_ascendant_blind", - tag_standard="tag_entr_ascendant_twisted", - tag_charm="tag_entr_ascendant_twisted", - tag_meteor="tag_entr_ascendant_twisted", - tag_buffoon="tag_entr_ascendant_ejoker", - tag_handy="tag_entr_ascendant_stock", - tag_garbage="tag_entr_ascendant_stock", - tag_ethereal="tag_entr_ascendant_twisted", - tag_coupon="tag_entr_ascendant_credit", - tag_double="tag_entr_ascendant_copying", - tag_juggle="tag_entr_ascendant_effarcire", - tag_d_six="tag_entr_ascendant_credit", - tag_top_up="tag_entr_ascendant_topup", - tag_skip="tag_entr_ascendant_stock", - tag_economy="tag_entr_ascendant_stock", - tag_orbital="tag_entr_ascendant_universal", - tag_cry_epic="tag_entr_ascendant_epic", - tag_cry_glitched="tag_entr_ascendant_glitched", - tag_cry_mosaic="tag_entr_ascendant_mosaic", - tag_cry_oversat="tag_entr_ascendant_oversat", - tag_cry_glass="tag_entr_ascendant_glass", - tag_cry_gold="tag_entr_ascendant_gold", - tag_cry_blur="tag_entr_ascendant_blurry", - tag_cry_astral="tag_entr_ascendant_astral", - tag_cry_m="tag_entr_ascendant_m", - tag_cry_double_m="tag_entr_ascendant_m", - tag_cry_cat="tag_entr_ascendant_cat", - tag_cry_gambler="tag_entr_ascendant_unbounded", - tag_cry_empowered="tag_entr_ascendant_unbounded", - tag_cry_better_voucher="tag_entr_ascendant_better_voucher", - tag_cry_memory="tag_entr_ascendant_copying", - tag_cry_better_top_up="tag_entr_ascendant_better_topup", - tag_cry_bundle="tag_entr_ascendant_ebundle", - tag_cry_gourmand="tag_entr_ascendant_saint", - tag_cry_triple="tag_entr_ascendant_copying", - tag_cry_quadruple="tag_entr_ascendant_copying", - tag_cry_quintuple="tag_entr_ascendant_copying", - tag_cry_scope="tag_entr_ascendant_infdiscard", - tag_cry_schematic="tag_entr_ascendant_canvas", - tag_cry_loss="tag_entr_ascendant_reference", - tag_cry_banana="tag_entr_ascendant_cavendish", - tag_cry_booster="tag_entr_ascendant_booster", - tag_cry_console="tag_entr_ascendant_twisted", - tag_entr_dog="tag_entr_ascendant_dog", - tag_entr_solar="tag_entr_ascendant_solar", - tag_entr_ascendant_rare="tag_entr_ascendant_epic", - tag_entr_ascendant_epic="tag_entr_ascendant_legendary", - --tag_entr_ascendant_legendary="tag_entr_ascendant_exotic", - --tag_entr_ascendant_exotic="tag_entr_ascendant_entropic", - tag_entr_sunny = "tag_entr_ascendant_sunny", - tag_entr_freaky = "tag_entr_ascendant_freaky", - tag_entr_fractured = "tag_entr_ascendant_fractured" -} -for i, v in pairs(AscendantTags) do Entropy.AscendedTags[i]=v end - local exousia = { order = 607, object_type = "Joker", @@ -453,7 +389,7 @@ local exousia = { end, calculate = function(self, card, context) if (context.setting_blind and not context.getting_sliced) or context.forcetrigger then - if to_big(card.ability.tags) > to_big(30) or type(card.ability.tags) == "table" then card.ability.tags = 30 end + if to_big(card.ability.tags) > to_big(30) or type(card.ability.tags) ~= "number" then card.ability.tags = 30 end for i = 1, math.min(card.ability.tags or 1,30) or 1 do tag = Tag(get_next_tag_key()) add_tag(tag) @@ -521,7 +457,7 @@ local akyros = { end } -Cryptid.big_num_blacklist["j_entr_katarraktis"] = true +if Cryptid.big_num_blacklist then Cryptid.big_num_blacklist["j_entr_katarraktis"] = true end local katarraktis = { order = 609, @@ -1025,12 +961,48 @@ local prismatikos = { end, } +local heimartai = { + order = 614, + object_type = "Joker", + key = "heimartai", + rarity = "entr_entropic", + cost = 150, + eternal_compat = true, + blueprint_compat = true, + dependencies = { + items = { + "set_entr_entropics" + } + }, + pos = { x = 6, y = 4 }, + soul_pos = { x = 8, y = 4, extra = { x = 7, y = 4 } }, + atlas = "exotic_jokers", + config = { + echips = 1 + }, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.echips + } + } + end, + calculate = function(self, card, context) + if context.joker_main then + return { + echips = card.ability.echips + } + end + end, + entr_credits = {art = {"crabus"}} +} + return { items = { epitachyno, - helios, + not Entropy.ValkarriOverCryptid and helios or nil, xekanos, - dekatria, + not Entropy.ValkarriOverCryptid and dekatria or nil, anaptyxi, parakmi, exousia, @@ -1040,6 +1012,7 @@ return { exelixi, atomikos, apeirostemma, - prismatikos + prismatikos, + heimartai } } diff --git a/compat/cryptid/epic_jokers.lua b/compat/cryptid/epic_jokers.lua index ca300be0..bf7ac747 100644 --- a/compat/cryptid/epic_jokers.lua +++ b/compat/cryptid/epic_jokers.lua @@ -1,16 +1,19 @@ +local rarity = Entropy.ValkarriOverCryptid and "valk_renowned" or "cry_epic" +local set = Entropy.ValkarriOverCryptid and "set_entr_misc_jokers" or "set_cry_epic" + local burnt_m = { - order = 100, + order = 250, object_type = "Joker", key = "burnt_m", config = { per_jolly=1 }, - rarity = "cry_epic", + rarity = rarity, cost = 10, dependencies = { items = { - "set_cry_epic" + set } }, blueprint_compat = true, @@ -69,10 +72,10 @@ local burnt_m = { } local chaos= { - order = 101, + order = 251, object_type = "Joker", key = "chaos", - rarity = "cry_epic", + rarity = rarity, cost = 15, @@ -84,18 +87,18 @@ local chaos= { } local dni = { - order = 102, + order = 252, object_type = "Joker", key = "dni", config = { suit = "Spades" }, - rarity = "cry_epic", + rarity = rarity, cost = 10, dependencies = { items = { - "set_cry_epic" + set } }, blueprint_compat = false, @@ -130,19 +133,19 @@ local dni = { } local trapezium = { - order = 103, + order = 253, object_type = "Joker", key = "trapezium_cluster", name="entr-trapezium_cluster", config = { forcetrigger=5 }, - rarity = "cry_epic", + rarity = rarity, cost = 10, dependencies = { items = { - "set_cry_epic" + set } }, blueprint_compat = true, @@ -203,19 +206,22 @@ local trapezium = { if context.forcetrigger then return Entropy.RandomForcetrigger(card, card and card.ability.forcetrigger or 5, context) end - end + end, + entr_credits = { + idea = {"cassknows"} + }, } local metanoia = { - order = 104, + order = 254, object_type = "Joker", key = "metanoia", - rarity = "cry_epic", + rarity = rarity, cost = 10, dependencies = { items = { - "set_cry_epic" + set } }, blueprint_compat = false, @@ -235,15 +241,15 @@ local metanoia = { } local antireal = { - order = 105, + order = 255, object_type = "Joker", key = "antireal", - rarity = "cry_epic", + rarity = rarity, cost = 15, dependencies = { items = { - "set_cry_epic" + set } }, blueprint_compat = true, @@ -273,7 +279,7 @@ local antireal = { end end, add_to_deck = function(self, card, from_debuff) - if not from_debuff then + if not from_debuff and Cryptid.notification_overlay then Cryptid.notification_overlay("antireal") end end, @@ -284,15 +290,15 @@ local antireal = { } local jokezmann_brain = { - order = 106, + order = 256, object_type = "Joker", key = "jokezmann_brain", - rarity = "cry_epic", + rarity = rarity, cost = 15, dependencies = { items = { - "set_cry_epic" + set } }, eternal_compat = true, @@ -341,15 +347,15 @@ local jokezmann_brain = { } local metamorphosis = { - order = 107, + order = 257, object_type = "Joker", key = "metamorphosis", - rarity = "cry_epic", + rarity = rarity, cost = 15, dependencies = { items = { - "set_cry_epic" + set } }, eternal_compat = true, @@ -438,15 +444,15 @@ local metamorphosis = { } local nyctophobia = { - order = 108, + order = 258, object_type = "Joker", key = "nyctophobia", - rarity = "cry_epic", + rarity = rarity, cost = 15, dependencies = { items = { - "set_cry_epic" + set } }, eternal_compat = true, @@ -503,17 +509,17 @@ local nyctophobia = { } local caviar = { - order = 108, + order = 258, object_type = "Joker", key = "caviar", - rarity = "cry_epic", + rarity = rarity, cost = 15, config = { tags = 8 }, dependencies = { items = { - "set_cry_epic" + set } }, eternal_compat = true, @@ -528,7 +534,7 @@ local caviar = { end, pools = {["Food"] = true}, calculate = function (self, card, context) - if context.tag_create and Entropy.AscendedTags[context.tag.key] then + 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) @@ -559,10 +565,10 @@ local caviar = { return { items = { - burnt_m, + not Entropy.ValkarriOverCryptid and burnt_m or nil, chaos, dni, - trapezium, + not Entropy.ValkarriOverCryptid and trapezium or nil, antireal, jokezmann_brain, metanoia, diff --git a/compat/cryptid/exotic_jokers.lua b/compat/cryptid/exotic_jokers.lua index 968be4fb..cb6694d7 100644 --- a/compat/cryptid/exotic_jokers.lua +++ b/compat/cryptid/exotic_jokers.lua @@ -1,15 +1,18 @@ +local rarity = Entropy.ValkarriOverCryptid and "valk_exquisite" or "cry_exotic" +local set = Entropy.ValkarriOverCryptid and "set_entr_misc_jokers" or "set_cry_exotic" + local stillicidium = { order = 500, object_type = "Joker", key = "stillicidium", - rarity = "cry_exotic", + rarity = rarity, cost = 50, atlas = "exotic_jokers", soul_pos = { x = 2, y = 0, extra = { x = 1, y = 0 } }, dependencies = { items = { - "set_cry_exotic" + set } }, blueprint_compat = true, @@ -101,15 +104,7 @@ local stillicidium = { 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 + function LowerCardRank(card) if not card.base then return nil end local rank_suffix = math.min(card.base.id, 14) @@ -148,7 +143,7 @@ local libra = { order = 500 + 1, object_type = "Joker", key = "libra", - rarity = "cry_exotic", + rarity = rarity, cost = 50, atlas = "exotic_jokers", @@ -157,7 +152,7 @@ local libra = { dependencies = { items = { - "set_cry_exotic" + set } }, @@ -185,18 +180,18 @@ local libra = { total = total + v values = values + 1 end - if type(v) == "table" and v.arrow and v ~= to_big(1) and v ~= to_big(0) then + if (Entropy.is_big(v)) and v ~= to_big(1) and v ~= to_big(0) then total = total + v values = values + 1 end end - if type(context.other_card.ability.extra) == "table" and not context.other_card.ability.extra.arrow then + if type(context.other_card.ability.extra) == "table" and not Entropy.is_big(context.other_card.ability.extra) then for i, v in pairs(context.other_card.ability.extra or {}) do if type(v) == "number" and v ~= 1 and v~= 0 then total = total + v values = values + 1 end - if type(v) == "table" and v.arrow and v ~= to_big(1) and v ~= to_big(0) then + if Entropy.is_big(v) and v ~= to_big(1) and v ~= to_big(0) then total = total + v values = values + 1 end @@ -208,16 +203,16 @@ local libra = { if type(v) == "number" and v ~= 1 and v~= 0 then context.other_card.ability[i] = total / values end - if type(v) == "table" and v.arrow and v ~= to_big(1) and v ~= to_big(0) then + if Entropy.is_big(v) and v ~= to_big(1) and v ~= to_big(0) then context.other_card.ability[i] = to_big(total / values) end end - if type(context.other_card.ability.extra) == "table" and not context.other_card.ability.extra.arrow then + if type(context.other_card.ability.extra) == "table" and not Entropy.is_big(context.other_card.ability.extra) then for i, v in pairs(context.other_card.ability.extra or {}) do if type(v) == "number" and v ~= 1 and v~= 0 then context.other_card.ability.extra[i] = total / values end - if type(v) == "table" and v.arrow and v ~= to_big(1) and v ~= to_big(0) then + if Entropy.is_big(v) and v ~= to_big(1) and v ~= to_big(0) then context.other_card.ability.extra[i] = to_big(total / values) end end @@ -240,7 +235,7 @@ local scorpio = { order = 500 + 2, object_type = "Joker", key = "scorpio", - rarity = "cry_exotic", + rarity = rarity, cost = 50, atlas = "exotic_jokers", @@ -249,7 +244,7 @@ local scorpio = { dependencies = { items = { - "set_cry_exotic" + set } }, config = { @@ -317,7 +312,7 @@ local ridiculus_absens = { order = 500 + 3, object_type = "Joker", key = "ridiculus_absens", - rarity = "cry_exotic", + rarity = rarity, cost = 50, atlas = "exotic_jokers", name = "entr-ridiculus_absens", @@ -326,7 +321,7 @@ local ridiculus_absens = { dependencies = { items = { - "set_cry_exotic" + set } }, config = { @@ -374,6 +369,6 @@ return { stillicidium, libra, scorpio, - ridiculus_absens + not Entropy.ValkarriOverCryptid and ridiculus_absens or nil } } \ No newline at end of file diff --git a/compat/cryptid/other_consumables.lua b/compat/cryptid/other_consumables.lua index 1c462b9a..3e9327c5 100644 --- a/compat/cryptid/other_consumables.lua +++ b/compat/cryptid/other_consumables.lua @@ -20,9 +20,7 @@ local rift = { local cards = Entropy.GetHighlightedCards({G.jokers, G.consumeables, G.hand}, card2, 1, card2.ability.num) Entropy.FlipThen(cards, function(card) card:juice_up() - card:set_edition(Entropy.pseudorandom_element(G.P_CENTER_POOLS.Edition, pseudoseed("rift"),function(e) - return G.GAME.banned_keys[e.key] or e.no_doe - end).key) + card:set_edition(SMODS.poll_edition({guaranteed = true, key = "entr_rift"})) end) end, can_use = function(self, card) @@ -1096,12 +1094,8 @@ local integrity = { 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 edition = Entropy.pseudorandom_element(G.P_CENTER_POOLS.Edition, pseudoseed("entropy"),function(e) - return G.GAME.banned_keys[e.key] or e.no_doe - end).key - local seal = Entropy.pseudorandom_element(G.P_CENTER_POOLS.Seal, pseudoseed("entropy"),function(e) - return G.GAME.banned_keys[e.key] or e.no_doe - end).key + local edition = SMODS.poll_edition({guaranteed = true, key = "entr_integrity"}) + local seal = SMODS.poll_seal{guaranteed = true, key = "entropy"} card:set_edition(edition) card:set_seal(seal) card:set_ability(G.P_CENTERS.c_base) @@ -1185,8 +1179,9 @@ local mallet = { self:use(card) end, entr_credits = { + idea = {"cassknows"}, art = {"LFMoth"} - } + }, } return { diff --git a/compat/cryptid/reverse_codes.lua b/compat/cryptid/reverse_codes.lua index 4e32cda5..e1b1ff22 100644 --- a/compat/cryptid/reverse_codes.lua +++ b/compat/cryptid/reverse_codes.lua @@ -297,23 +297,6 @@ local new = { end, } -local rr = { - dependencies = { - items = { - "set_entr_inversions" - } - }, - object_type = "Blind", - order = 4200, - key = "red", - pos = { x = 0, y = 0 }, - atlas = "blinds", - boss_colour = HEX("FF0000"), - mult=1, - dollars = 3, - in_pool = function(self) return false end -} - local interference = { dependencies = { items = { @@ -624,11 +607,7 @@ local fork = { G.E_MANAGER:add_event(Event({ trigger="immediate", func = function() - local ed = pseudorandom_element(G.P_CENTER_POOLS.Enhanced) - while ed.no_doe or G.GAME.banned_keys[ed.key] do - ed = pseudorandom_element(G.P_CENTER_POOLS.Enhanced) - end - card:set_ability(ed) + card:set_ability(SMODS.poll_enhancement({guaranteed = true, key = "entr_fork"})) card:set_edition({ cry_glitched = true, }) @@ -1272,10 +1251,10 @@ local hotfix_sticker = { apply = function(self,card,val) card.ability.entr_hotfix = true card.ability.entr_hotfix_rounds = 15 - if card.debuff then card.debuff = false end + if card.debuff then card:set_debuff(false) end end, calculate = function(self, card, context) - if card.debuff then card.debuff = false end + if card.debuff then card:set_debuff(false) end end } @@ -1696,7 +1675,10 @@ local overload = { demicoloncompat = true, force_use = function(self, card) self:use(card) - end + end, + entr_credits = { + idea = {"cassknows"} + }, } local badarg = { @@ -1930,7 +1912,6 @@ return { quickload, break_card, new, - rr, interference, constant, pseudorandom, diff --git a/compat/finity.lua b/compat/finity.lua index 03df8ae3..fbfece70 100644 --- a/compat/finity.lua +++ b/compat/finity.lua @@ -43,7 +43,7 @@ if FinisherBossBlindStringMap then if results then for i, v in pairs(results) do for i2, result in pairs(v) do - if type(result) == "number" or (type(result) == "table" and result.tetrate) then + if Entropy.is_number(result) then res[i2] = Entropy.StackEvalReturns(res[i2], result, i2) else res[i2] = result diff --git a/compat/grabbag.lua b/compat/grabbag.lua index 7e641000..33ed482b 100644 --- a/compat/grabbag.lua +++ b/compat/grabbag.lua @@ -868,7 +868,7 @@ if (SMODS.Mods["GrabBag"] or {}).can_load then Entropy.ChangeFullCSL(card.ability.size) end, can_use = function(self, card) - return G.GAMe.blind.in_blind + return G.GAME.blind.in_blind end, loc_vars = function(self, q, card) return {vars = {card.ability.size}} @@ -946,4 +946,4 @@ if (SMODS.Mods["GrabBag"] or {}).can_load then hope } } -end \ No newline at end of file +end diff --git a/compat/hotpotato.lua b/compat/hotpotato.lua new file mode 100644 index 00000000..073b7bc9 --- /dev/null +++ b/compat/hotpotato.lua @@ -0,0 +1,413 @@ +-- Hotpotato crossmod stuff +-- MTX cards are the inverse of Aura cards + +if (SMODS.Mods["HotPotato"] or {}).can_load then + SMODS.ConsumableType({ + key = "mtx", + collection_rows = { 4, 4 }, + primary_colour = G.C.GREEN, + secondary_colour = G.C.GREEN, + shop_rate = nil, + }) + -- Inverse justice aura, aka "Extra Joker" + SMODS.Consumable({ + key = "extrajoker", + dependencies = { + items = { + "set_entr_inversions", + } + }, + set = "mtx", + inversion = "c_hpot_justice", + atlas = "crossmod_consumables", + pos = { + x = 5, + y = 5 + }, + entr_credits = { + art = { "LFMoth" }, + idea = { "LFMoth" }, + code = { "LFMoth" }, + }, + config = { + extra = { + slots = 1, + credits = 700 + }, + }, + loc_vars = function(self, info_queue, card) + return { + vars = { card.ability.extra.slots, card.ability.extra.credits }, + } + end, + can_use = function(self, card) + if G.GAME.seeded == true and G.GAME.budget >= card.ability.extra.credits then -- check if run is seeded, check seeded creds + return true + elseif G.PROFILES[G.SETTINGS.profile].TNameCredits >= card.ability.extra.credits then -- otherwise, check normal creds + return true + else + return false + end + end, + use = function(self, card, area, copier) + G.E_MANAGER:add_event(Event({ + func = function() + HPTN.ease_credits(-card.ability.extra.credits, false) -- remove credits + return true + end, + })) + G.E_MANAGER:add_event(Event({ + func = function() + if G.jokers then + G.jokers.config.card_limit = G.jokers.config.card_limit + card.ability.extra.slots + end + return true + end, + })) + end, + demicoloncompat = true, + force_use = function(self, card) self:use(card) end + }) + SMODS.Consumable({ + key = "unstick", + dependencies = { + items = { + "set_entr_inversions", + } + }, + set = "mtx", + inversion = "c_hpot_fear", + atlas = "crossmod_consumables", + pos = { + x = 6, + y = 5 + }, + set_badges = function(self, card, badges) + SMODS.create_mod_badges({ mod = SMODS.find_mod("HotPotato")[1] }, badges) + end, + entr_credits = { + art = { "LFMoth" }, + idea = { "LFMoth" }, + code = { "LFMoth" }, + }, + config = { + extra = { + credits = 300 + }, + }, + loc_vars = function(self, info_queue, card) + return { + vars = { card.ability.extra.credits }, + } + end, + can_use = function(self, card) + if G.GAME.seeded == true and G.GAME.budget >= card.ability.extra.credits then -- check if run is seeded, check seeded creds + return true + elseif G.PROFILES[G.SETTINGS.profile].TNameCredits >= card.ability.extra.credits then -- otherwise, check normal creds + return true + else + return false + end + end, + use = function(self, card, area, copier) + G.E_MANAGER:add_event(Event({ + func = function() + HPTN.ease_credits(-card.ability.extra.credits, false) -- remove credits + return true + end, + })) + for k, v in ipairs(G.jokers.cards) do + G.E_MANAGER:add_event(Event({ + func = function() + for _, sticker in pairs(SMODS.Stickers) do + sticker:apply(v, false) + end + v:juice_up() + play_sound('card1') + return true + end, + })) + end + end, + demicoloncompat = true, + force_use = function(self, card) self:use(card) end + }) + SMODS.Consumable({ + key = "extrahands", + dependencies = { + items = { + "set_entr_inversions", + } + }, + set = "mtx", + inversion = "c_hpot_perception", + atlas = "crossmod_consumables", + pos = { + x = 7, + y = 5 + }, + entr_credits = { + art = { "LFMoth" }, + idea = { "LFMoth" }, + code = { "LFMoth" }, + }, + config = { + extra = { + hands = 1, + credits = 500 + }, + }, + loc_vars = function(self, info_queue, card) + return { + vars = { card.ability.extra.hands, card.ability.extra.credits }, + } + end, + can_use = function(self, card) + if G.GAME.seeded == true and G.GAME.budget >= card.ability.extra.credits then -- check if run is seeded, check seeded creds + return true + elseif G.PROFILES[G.SETTINGS.profile].TNameCredits >= card.ability.extra.credits then -- otherwise, check normal creds + return true + else + return false + end + end, + use = function(self, card, area, copier) + G.E_MANAGER:add_event(Event({ + func = function() + HPTN.ease_credits(-card.ability.extra.credits, false) -- remove credits + return true + end, + })) + G.E_MANAGER:add_event(Event({ + func = function() + G.GAME.round_resets.hands = G.GAME.round_resets.hands + card.ability.extra.hands + ease_hands_played(card.ability.extra.hands) + return true + end, + })) + end, + demicoloncompat = true, + force_use = function(self, card) self:use(card) end + }) + SMODS.Consumable({ + key = "moneybundle", + dependencies = { + items = { + "set_entr_inversions", + } + }, + set = "mtx", + inversion = "c_hpot_greatness", + atlas = "crossmod_consumables", + pos = { + x = 8, + y = 5 + }, + entr_credits = { + art = { "LFMoth" }, + idea = { "LFMoth" }, + code = { "LFMoth" }, + }, + config = { + extra = { + dollars = 50, + credits = 500 + }, + }, + loc_vars = function(self, info_queue, card) + return { + vars = { card.ability.extra.dollars, card.ability.extra.credits }, + } + end, + can_use = function(self, card) + if G.GAME.seeded == true and G.GAME.budget >= card.ability.extra.credits then -- check if run is seeded, check seeded creds + return true + elseif G.PROFILES[G.SETTINGS.profile].TNameCredits >= card.ability.extra.credits then -- otherwise, check normal creds + return true + else + return false + end + end, + use = function(self, card, area, copier) + G.E_MANAGER:add_event(Event({ + func = function() + HPTN.ease_credits(-card.ability.extra.credits, false) -- remove credits + return true + end, + })) + G.E_MANAGER:add_event(Event({ + func = function() + ease_dollars(card.ability.extra.dollars) + return true + end, + })) + end, + demicoloncompat = true, + force_use = function(self, card) self:use(card) end + }) + SMODS.Consumable({ + key = "biggerpockets", + dependencies = { + items = { + "set_entr_inversions", + } + }, + set = "mtx", + inversion = "c_hpot_clairvoyance", + atlas = "crossmod_consumables", + pos = { + x = 5, + y = 6 + }, + entr_credits = { + art = { "LFMoth" }, + idea = { "LFMoth" }, + code = { "LFMoth" }, + }, + config = { + extra = { + slots = 1, + credits = 600 + }, + }, + loc_vars = function(self, info_queue, card) + return { + vars = { card.ability.extra.slots, card.ability.extra.credits }, + } + end, + can_use = function(self, card) + if G.GAME.seeded == true and G.GAME.budget >= card.ability.extra.credits then -- check if run is seeded, check seeded creds + return true + elseif G.PROFILES[G.SETTINGS.profile].TNameCredits >= card.ability.extra.credits then -- otherwise, check normal creds + return true + else + return false + end + end, + use = function(self, card, area, copier) + G.E_MANAGER:add_event(Event({ + func = function() + HPTN.ease_credits(-card.ability.extra.credits, false) -- remove credits + return true + end, + })) + G.E_MANAGER:add_event(Event({ + func = function() + G.consumeables.config.card_limit = G.consumeables.config.card_limit + card.ability.extra.slots + return true + end, + })) + end, + demicoloncompat = true, + force_use = function(self, card) self:use(card) end + }) + SMODS.Consumable({ + key = "deckfix", + dependencies = { + items = { + "set_entr_inversions", + } + }, + set = "mtx", + inversion = "c_hpot_tenacity", + atlas = "crossmod_consumables", + pos = { + x = 6, + y = 6 + }, + entr_credits = { + art = { "LFMoth" }, + idea = { "LFMoth" }, + code = { "LFMoth" }, + }, + config = { + extra = { + max_highlighted = 5, + credits = 200 + }, + }, + loc_vars = function(self, info_queue, card) + return { + vars = { card.ability.extra.max_highlighted, card.ability.extra.credits }, + } + end, + can_use = function(self, card) + if G.hand and #G.hand.highlighted > 0 and #G.hand.highlighted <= card.ability.extra.max_highlighted then + if G.GAME.seeded == true and G.GAME.budget >= card.ability.extra.credits then -- check if run is seeded, check seeded creds + return true + elseif G.PROFILES[G.SETTINGS.profile].TNameCredits >= card.ability.extra.credits then -- otherwise, check normal creds + return true + else + return false + end + else + return false + end + end, + use = function(self, card, area, copier) + G.E_MANAGER:add_event(Event({ + func = function() + HPTN.ease_credits(-card.ability.extra.credits, false) -- remove credits + return true + end, + })) + G.E_MANAGER:add_event(Event({ + func = function() + SMODS.destroy_cards(G.hand.highlighted) + return true + end, + })) + end, + demicoloncompat = true, + force_use = function(self, card) self:use(card) end + }) + SMODS.Consumable({ + key = "generousdonation", + dependencies = { + items = { + "set_entr_inversions", + } + }, + set = "mtx", + inversion = "c_hpot_lunacy", + atlas = "crossmod_consumables", + pos = { + x = 7, + y = 6 + }, + entr_credits = { + art = { "LFMoth" }, + idea = { "LFMoth" }, + code = { "LFMoth" }, + }, + config = { + extra = { + credits = 1 + }, + }, + loc_vars = function(self, info_queue, card) + return { + vars = {card.ability.extra.credits }, + } + end, + can_use = function(self, card) + if G.GAME.seeded == true and G.GAME.budget >= card.ability.extra.credits then -- check if run is seeded, check seeded creds + return true + elseif G.PROFILES[G.SETTINGS.profile].TNameCredits >= card.ability.extra.credits then -- otherwise, check normal creds + return true + else + return false + end + end, + use = function(self, card, area, copier) + G.E_MANAGER:add_event(Event({ + func = function() + HPTN.ease_credits(-card.ability.extra.credits, false) -- remove credits + return true + end, + })) + end, + demicoloncompat = true, + force_use = function(self, card) self:use(card) end + }) +end diff --git a/compat/tspectrals.lua b/compat/tspectrals.lua index 8766e40a..59985717 100644 --- a/compat/tspectrals.lua +++ b/compat/tspectrals.lua @@ -33,19 +33,11 @@ if (SMODS.Mods["TSpectrals"] or {}).can_load then "c_entr_oss" } } - - local loadmodsref = SMODS.injectItems - function SMODS.injectItems(...) - loadmodsref(...) - if G.P_CENTERS.c_entr_oss then + local set_spritesref = Card.set_sprites + function Card:set_sprites(_center, _front) + if self.config.center.key == "c_entr_oss" then G.P_CENTERS.c_entr_oss.soul_pos = {x=4, y = 3} end - end - local set_abilityref = Card.set_ability - function Card:set_ability(center, ...) - if G.P_CENTERS.c_entr_oss.soul_pos and not G.P_CENTERS.c_entr_oss.soul_pos.soul_pos then - G.P_CENTERS.c_entr_oss.soul_pos = {x = 4, y = 3} - end - set_abilityref(self, center, ...) + set_spritesref(self,_center,_front) end end \ No newline at end of file diff --git a/compat/vallkarri.lua b/compat/vallkarri.lua new file mode 100644 index 00000000..a9a4c5ba --- /dev/null +++ b/compat/vallkarri.lua @@ -0,0 +1,190 @@ +if (SMODS.Mods["vallkarri"] or {}).can_load then + + local asc_kitty = { + object_type = "Tag", + dependencies = { + items = { + "set_entr_tags", + } + }, + order = 100, + key = "ascendant_kitty", + atlas = "crossmod_tags", + pos = {x=0,y=0}, + config = { chips = 1.1 }, + loc_vars = function(self, info_queue, tag) + return { vars = { tag.config.chips } } + end, + in_pool = function() return false end, + + apply = function(self, tag, context) + if context.type == "valk_final_scoring_step" then --functionality assisted by reading morefluff code + for i = 1, vallkarri.count_kitty_tags() do + local chips = tag.config.chips + G.CARD_H = -G.CARD_H -- manipulate y_off + SMODS.calculate_effect({ xchips = chips }, tag.HUD_tag) + G.CARD_H = -G.CARD_H + end + end + end + } + + local eternal_negative = { + object_type = "Tag", + dependencies = { + items = { + "set_entr_tags", + } + }, + order = 101, + key = "ascendant_negative_eternal", + atlas = "crossmod_tags", + pos = {x=1,y=0}, + config = { type = "store_joker_modify" }, + in_pool = function() return false end, + apply = function(self, tag, context) + if context.type == "store_joker_modify" then + tag:yep("+", nil, function() + for i, v in pairs(G.shop_jokers.cards) do + v:set_edition("e_negative") + v:set_eternal(true) + v.ability.eternal = true + end + for i, v in pairs(G.shop_booster.cards) do + v:set_edition("e_negative") + v:set_eternal(true) + v.ability.eternal = true + end + for i, v in pairs(G.shop_vouchers.cards) do + v:set_edition("e_negative") + v:set_eternal(true) + v.ability.eternal = true + end + return true + end) + tag.triggered = true + end + end, + loc_vars = function(s,q,c) + q[#q+1] = G.P_CENTERS.e_negative + end, + } + + local highway = { + object_type = "Consumable", + order = 9000 + 10, + key = "highway", + inversion = "c_valk_freeway", + pos = {x = 1, y = 2}, + tsoul_pos = {x=3, y=2, extra = {x=2,y=2}}, + dependencies = { + items = {"set_entr_entropics", "set_entr_inversions"} + }, + atlas = "crossmod_consumables", + set = "Omen", + no_select = true, + hidden=true, + soul_rate = 0, + use = function(self, card) + local deletable_jokers = {} + local rand = pseudorandom_element(G.jokers.cards, pseudoseed("entr_highway")) + for k, v in pairs(G.jokers.cards) do + if not SMODS.is_eternal(v) then + deletable_jokers[#deletable_jokers + 1] = v + end + end + G.E_MANAGER:add_event(Event({ + trigger = "before", + delay = 0.75, + func = function() + for k, v in pairs(deletable_jokers) do + if v.config.center.rarity == "cry_exotic" then + check_for_unlock({ type = "what_have_you_done" }) + end + v:start_dissolve(nil, _first_dissolve) + _first_dissolve = true + end + return true + end, + })) + 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_entropic", nil, nil, nil, "entr_beyond") + card:add_to_deck() + G.jokers:emplace(card) + card:juice_up(0.3, 0.5) + return true + end, + })) + delay(0.6) + end, + can_use = function() return true end, + demicoloncompat = true, + force_use = function(self, card) + self:use(card) + end + } + + local items = { + asc_kitty, + eternal_negative, + highway + } + local aesthetics = { + { pos = { x = 0, y = 0 }, edition = "e_entr_neon", key = "vintage" }, + { pos = { x = 1, y = 0 }, edition = "e_entr_lowres", key = "retro" }, + { pos = { x = 2, y = 0 }, edition = "e_entr_sunny", key = "ytp" }, + { pos = { x = 3, y = 0 }, edition = "e_entr_solar", key = "solarpunk" }, + { pos = { x = 4, y = 0 }, edition = "e_entr_fractured", key = "breakcore" }, + { pos = { x = 0, y = 1 }, edition = "e_entr_freaky", key = "lewd", credits = {art = {"gudusername_53951"}} }, + { pos = { x = 1, y = 1 }, edition = "e_entr_kaleidoscopic", key = "disco" }, + } + local order = 10000 + for i, v in pairs(aesthetics) do + items[#items+1] = { + object_type = "Consumable", + set = "Aesthetic", + key = v.key, + cost = 7, + pos = v.pos, + atlas = "aes", + config = { extra = { select = 1, edition = v.edition } }, + order = order, + loc_vars = function(self, info_queue, card) + info_queue[#info_queue + 1] = G.P_CENTERS[v.edition] + return { vars = { + card.ability.extra.select, + localize({ type = "name_text", set = "Edition", key = card.ability.extra.edition }) + } } + end, + can_use = function(self, card) + local sed = true + for i, jkr in ipairs(G.jokers.highlighted) do + if jkr.edition then + sed = false + end + end + return (#G.jokers.highlighted > 0) and (#G.jokers.highlighted <= card.ability.extra.select) and sed + end, + use = function(self, card, area, copier) + for i, high in ipairs(G.jokers.highlighted) do + high:set_edition(card.ability.extra.edition) + end + end, + dependencies = { + items = { + "set_entr_misc", + v.edition + } + }, + entr_credits = v.credits + } + order = order + 1 + end + return { + items = items + } +end \ No newline at end of file diff --git a/config.lua b/config.lua index 7261c340..4e705b22 100644 --- a/config.lua +++ b/config.lua @@ -6,5 +6,7 @@ return { ["override_glitched"] = true, ["omega_aleph"] = false, ["inversion_queues"] = 2, - ["curses_enabled"] = true + ["curses_enabled"] = true, + ["corrupted_speed"] = 100, + ["profile_prefix"] = true } \ No newline at end of file diff --git a/items/altpath/blinds.lua b/items/altpath/blinds.lua index 289e3f9f..c47cbc26 100644 --- a/items/altpath/blinds.lua +++ b/items/altpath/blinds.lua @@ -197,9 +197,23 @@ function Entropy.evaluate_play_misc(text, disp_text, poker_hands, scoring_hand, 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 + return calc_scoreref(...) +end + local epsilon = { dependencies = { items = { @@ -813,9 +827,15 @@ G.FUNCS.get_poker_hand_info = function(_cards) end local never_scoresref = SMODS.never_scores -function SMODS.never_scores(...) - if (next(SMODS.find_card("j_splash")) or SMODS.always_scores(...)) and Entropy.BlindIs("bl_entr_kappa") then return true end - return never_scoresref(...) +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 + 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 + return always_scoresref(card, ...) end local lambda = { @@ -966,6 +986,17 @@ local omicron = { in_pool = function() return G.GAME.entr_alt end, + calculate = function(self, blind, context) + if context.after then + G.E_MANAGER:add_event(Event { + trigger = "after", + func = function() + G.GAME.blind.config.done = true + return true + end + }) + end + end } local pi = { @@ -990,14 +1021,6 @@ local pi = { in_pool = function() return G.GAME.entr_alt end, - calculate = function(self, blind, context) - if context.pre_discard then - Entropy.FlipThen(G.hand.highlighted, function(card) - card.ability.perishable = true - card.ability.perish_tally = 5 - end) - end - end } local rho = { @@ -1066,7 +1089,7 @@ local sigma = { setting_blind = function() local avg = math.ceil((G.GAME.round_resets.hands+G.GAME.round_resets.discards)/2) ease_hands_played(avg-G.GAME.round_resets.hands) - ease_discard(abg-G.GAME.round_resets.discards) + ease_discard(avg-G.GAME.round_resets.discards) G.GAME.blind.triggered = true end } diff --git a/items/inversions/reverse_planets.lua b/items/inversions/reverse_planets.lua index 6857e86e..4cdcc6e5 100644 --- a/items/inversions/reverse_planets.lua +++ b/items/inversions/reverse_planets.lua @@ -1,5 +1,6 @@ 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 @@ -13,14 +14,14 @@ function create_UIBox_current_hand_row(handname, simple) }} }}, {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.C.CHIPS, minw = 1.1}, nodes={ - {n=G.UIT.T, config={text = number_format(G.GAME.hands[handname].chips, 1000000), scale = 0.45, colour = G.C.UI.TEXT_LIGHT}}, + {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.C.MULT, minw = 1.1}, nodes={ + {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 = number_format(G.GAME.hands[handname].mult, 1000000), scale = 0.45, colour = G.C.UI.TEXT_LIGHT}} + {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={ @@ -40,7 +41,8 @@ function create_UIBox_current_hand_row(handname, simple) return hand_row_ref(handname, simple) else if not (G.GAME.hands[handname]) then return {} end - local color = G.GAME.hands[handname].TranscensionPower and HEX("84e1ff") or G.C.GOLD + 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={ @@ -60,13 +62,13 @@ function create_UIBox_current_hand_row(handname, simple) }}, {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 = number_format(Entropy.ascend_hand(G.GAME.hands[handname].chips,handname), 1000000), scale = 0.45, colour = G.C.UI.TEXT_LIGHT}}, + {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 = number_format(Entropy.ascend_hand(G.GAME.hands[handname].mult,handname), 1000000), scale = 0.45, colour = G.C.UI.TEXT_LIGHT}} + {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={ @@ -113,7 +115,7 @@ function Entropy.ReverseSuitLocVars(self, q, card, instant, noengulf) number_format(G.GAME.hands[card.ability.handnames[1]].level), number_format(G.GAME.hands[card.ability.handnames[2]].level), number_format(G.GAME.hands[card.ability.handnames[3]].level), - (card.ability.level or 2) + (G.GAME.entr_black_dwarf or 0), + (card.ability.level or 1) + (G.GAME.entr_black_dwarf or 0), G.GAME.hands[card.ability.handnames[1]].AscensionPower and " + "..number_format(G.GAME.hands[card.ability.handnames[1]].AscensionPower) or "", G.GAME.hands[card.ability.handnames[2]].AscensionPower and " + "..number_format(G.GAME.hands[card.ability.handnames[2]].AscensionPower) or "", G.GAME.hands[card.ability.handnames[3]].AscensionPower and " + "..number_format(G.GAME.hands[card.ability.handnames[3]].AscensionPower) or "", @@ -144,7 +146,7 @@ function Entropy.ChunkLocVars(self, q, card, instant, noengulf) number_format(G.GAME.hands[card.ability.handnames[1]].level), number_format(G.GAME.hands[card.ability.handnames[2]].level), number_format(G.GAME.hands[card.ability.handnames[3]].level), - card.ability.level or 2, + card.ability.level or 1, G.GAME.hands[card.ability.handnames[1]].AscensionPower and " + "..number_format(G.GAME.hands[card.ability.handnames[1]].AscensionPower) or "", G.GAME.hands[card.ability.handnames[2]].AscensionPower and " + "..number_format(G.GAME.hands[card.ability.handnames[2]].AscensionPower) or "", G.GAME.hands[card.ability.handnames[3]].AscensionPower and " + "..number_format(G.GAME.hands[card.ability.handnames[3]].AscensionPower) or "", @@ -361,6 +363,13 @@ Entropy.ReversePlanets = { {name="Flush House",key="ceres",sprite_pos={x=8,y=1},new_key="procyon", art="Binary"}, {name="Flush Five",key="eris",sprite_pos={x=10,y=1},new_key="sirius", art="Binary"}, } +-- Spectrum Compat +if (SMODS.Mods["SpectrumAPI"] or {}).can_load then + Entropy.ReversePlanets[#Entropy.ReversePlanets+1] = {name="spa_Spectrum",key="Spectrum",sprite_pos={x=0,y=3}, new_key="starspectrum", prefix = "spa", atlas = "placeholder"} + Entropy.ReversePlanets[#Entropy.ReversePlanets+1] = {name="spa_Straight_Spectrum",key="Straight_Spectrum",sprite_pos={x=0,y=3}, new_key="starstraightspectrum", prefix = "spa", atlas = "placeholder"} + Entropy.ReversePlanets[#Entropy.ReversePlanets+1] = {name="spa_Spectrum_House",key="Spectrum_House",sprite_pos={x=0,y=3}, new_key="starhousespectrum", prefix = "spa", atlas = "placeholder"} + Entropy.ReversePlanets[#Entropy.ReversePlanets+1] = {name="spa_Spectrum_Five",key="Spectrum_Five",sprite_pos={x=0,y=3}, new_key="starfivespectrum", prefix = "spa", atlas = "placeholder"} +end -- putting this here its easier because of how dumb the system is if SMODS.Mods.Cryptid and SMODS.Mods.Cryptid.can_load then Entropy.ReversePlanets[#Entropy.ReversePlanets+1] = {name="", key="planetlua",sprite_pos={x=8,y=2}, new_key="starlua", prefix = "cry",config = { @@ -519,7 +528,7 @@ Entropy.ReversePlanets[#Entropy.ReversePlanets+1] = {name="entr_derivative",key= end} Entropy.ReversePlanets[#Entropy.ReversePlanets+1] = {name="",key="tyche",sprite_pos={x=0,y=2}, new_key="black_dwarf", prefix = "entr", atlas = "consumables2", set_badges = function(self, card, badges) badges[1] = create_badge(localize("k_star_q"), get_type_colour(self or card.config, card), nil, 1.2) -end, func = Entropy.bdwarf, config = {bdwarf = 0.5}, loc_vars = function(self, q, card) return {vars = {card.ability.bdwarf}} end} +end, func = Entropy.bdwarf, config = {bdwarf = 0.25}, loc_vars = function(self, q, card) return {vars = {card.ability.bdwarf}} end} Entropy.ReversePlanets[#Entropy.ReversePlanets+1] = {name="",key="theia",sprite_pos={x=1,y=2}, new_key="frozen_star", prefix = "entr", atlas = "consumables2", set_badges = function(self, card, badges) badges[1] = create_badge(localize("k_star_q"), get_type_colour(self or card.config, card), nil, 1.2) end, func = function(self, card, area, copier, number) @@ -530,7 +539,7 @@ end, func = function(self, card, area, copier, number) end end Entropy.ReversePlanetUse(hand, card, card.ability.amt + (G.GAME.entr_black_dwarf or 0)) -end, config = {amt = 0.75}, loc_vars = function(self, q, card) return {vars = {card.ability.amt + (G.GAME.entr_black_dwarf or 0)}} end} +end, config = {amt = 0.5}, loc_vars = function(self, q, card) return {vars = {card.ability.amt + (G.GAME.entr_black_dwarf or 0)}} end} Entropy.ReversePlanets[#Entropy.ReversePlanets+1] = {name="",key="chiron",sprite_pos={x=2,y=2}, new_key="coatlicue", prefix = "entr", atlas = "consumables2", set_badges = function(self, card, badges) badges[1] = create_badge(localize("k_star_q"), get_type_colour(self or card.config, card), nil, 1.2) diff --git a/items/inversions/reverse_runes.lua b/items/inversions/reverse_runes.lua index 3ee1b075..485a467e 100644 --- a/items/inversions/reverse_runes.lua +++ b/items/inversions/reverse_runes.lua @@ -86,13 +86,17 @@ local rage = { use = function(self, card) local cards = {} for i, v in pairs(G.playing_cards) do - cards[#cards+1] = v + if not SMODS.is_eternal(v) then + cards[#cards+1] = v + end end if #cards > 0 then + local a_cards = {} pseudoshuffle(cards, pseudoseed("entr_rage")) for i = 1, math.max(math.floor(#cards/5), math.min(#cards, 5)) do - cards[i]:start_dissolve() + a_cards[#a_cards+1] = cards[i] end + SMODS.destroy_cards(a_cards) end Entropy.pact_mark("rune_entr_rage") end, @@ -731,14 +735,6 @@ local gluttony = { end } -local set_abilityref = Card.set_ability -function Card:set_abilityref(...) - set_abilityref(self, ...) - if self.ability.consumeable and Entropy.has_rune("rune_entr_gluttony") then - self.ability.eternal = true - end -end - local can_sellref = Card.can_sell_card function Card:can_sell_card(context) if self.ability.eternal or SMODS.is_eternal(self, {from_sell = true}) then return false end @@ -838,7 +834,7 @@ 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"))) 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_crabus")) 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) @@ -1068,7 +1064,7 @@ local loyalty_indicator = Entropy.create_mark("loyalty", 7069, {x = 4, y = 6}, f func = function() attention_text({ scale = 1.4, - text = localize({ type = "variable", key = "a_xmult", vars = { 0.5 }}), + text = localize({ type = "variable", key = "a_xmult", vars = { 0.5 * rune.ability.count }}), hold = 2, align = "cm", offset = { x = 0, y = -2.7 }, @@ -1078,7 +1074,7 @@ local loyalty_indicator = Entropy.create_mark("loyalty", 7069, {x = 4, y = 6}, f end }) return { - Xmult_mod = 0.5, + Xmult_mod = 0.5 * rune.ability.count, } elseif context.final_scoring_step then rune.ability.hand = rune.ability.hand + 1 @@ -1118,7 +1114,7 @@ local brimstone_indicator = Entropy.create_mark("brimstone", 7070, {x = 5, y = 6 func = function() attention_text({ scale = 1.4, - text = localize({ type = "variable", key = "a_xmult", vars = { 3.6 }}), + text = localize({ type = "variable", key = "a_xmult", vars = { 3.6 * rune.ability.count }}), hold = 2, align = "cm", offset = { x = 0, y = -2.7 }, @@ -1128,7 +1124,7 @@ local brimstone_indicator = Entropy.create_mark("brimstone", 7070, {x = 5, y = 6 end }) return { - Xmult_mod = 3.6, + Xmult_mod = 3.6 * rune.ability.count, } end end) @@ -1363,12 +1359,10 @@ local serpents = { dependencies = {items = {"set_entr_runes", "set_entr_inversions"}}, inversion = "c_entr_oss", immutable = true, - config = { - dollars = 10 - }, + no_select = true, + hidden = true, loc_vars = function(self, q, card) return {vars = {card.ability.dollars}} end, use = function(self, card) - ease_dollars(-card.ability.dollars) 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 diff --git a/items/inversions/reverse_spectrals.lua b/items/inversions/reverse_spectrals.lua index df755262..7924bd9b 100644 --- a/items/inversions/reverse_spectrals.lua +++ b/items/inversions/reverse_spectrals.lua @@ -22,9 +22,7 @@ local changeling = { actual[i] = cards[i] end Entropy.FlipThen(actual, function(card) - card:set_edition(Entropy.pseudorandom_element(G.P_CENTER_POOLS.Edition, pseudoseed("changeling_edition"), function(e) - return G.GAME.banned_keys[e.key] or e.no_doe - end).key) + card:set_edition(SMODS.poll_edition({guaranteed = true, key = "entr_changeling"})) SMODS.change_base(card, nil, pseudorandom_element({"King", "Queen", "Jack"}, pseudoseed("changeling_rank")), nil) end) end, @@ -442,10 +440,12 @@ local ichor = { local joker = pseudorandom_element(Entropy.FilterTable(G.jokers.cards, function(card) return card.edition and card.edition.key == "e_negative" end), pseudoseed("ichor")) - joker:start_dissolve() - G.GAME.banned_keys[joker.config.center.key] = true - G.jokers:handle_card_limit(card.ability.num) - eval_card(joker, {banishing_card = true, banisher = card, card = joker, cardarea = joker.area}) + if joker then + joker:start_dissolve() + G.GAME.banned_keys[joker.config.center.key] = true + G.jokers:handle_card_limit(card.ability.num) + eval_card(joker, {banishing_card = true, banisher = card, card = joker, cardarea = joker.area}) + end end, can_use = function(self, card) if not G.jokers then return false end @@ -500,14 +500,9 @@ local rejuvenate = { for i = 1, card2.ability.num do actual[i] = cards[i] end - local ed = Entropy.pseudorandom_element(G.P_CENTER_POOLS.Edition, pseudoseed("rejuvenate"),function(e) - return G.GAME.banned_keys[e.key] or e.no_doe - end).key - local enh = G.P_CENTERS[pseudorandom_element(G.P_CENTER_POOLS.Enhanced, pseudoseed("rejuvenate")).key] - while enh.no_doe do enh = G.P_CENTERS[pseudorandom_element(G.P_CENTER_POOLS.Enhanced, pseudoseed("rejuvenate")).key] end - local seal = Entropy.pseudorandom_element(G.P_CENTER_POOLS.Seal, pseudoseed("rejuvenate"),function(e) - return G.GAME.banned_keys[e.key] or e.no_doe - end).key + local ed = SMODS.poll_edition({guaranteed = true, key = "entr_rejuvenate_ed"}) + 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) card:set_edition(ed) card:set_ability(enh) @@ -557,6 +552,7 @@ local crypt = { atlas = "consumables", config = { select = 2, + rounds = 3, }, pos = {x=9,y=5}, --soul_pos = { x = 5, y = 0}, @@ -571,6 +567,9 @@ local crypt = { if v ~= joker then copy_card(joker, v) v:set_edition() + v:set_debuff(true) + v.ability.debuff_timer = (v.ability.debuff_timer or 0) + card2.ability.rounds + v.ability.debuff_timer_max = (v.ability.debuff_timer_max or 0) + card2.ability.rounds end end) @@ -583,6 +582,7 @@ local crypt = { return { vars = { card.ability.select, + card.ability.rounds } } end, @@ -664,13 +664,8 @@ local entropy = { --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) - local edition = Entropy.pseudorandom_element(G.P_CENTER_POOLS.Edition, pseudoseed("entropy"),function(e) - return G.GAME.banned_keys[e.key] or e.no_doe - end).key - local enhancement_type = pseudorandom_element({"Enhanced","Enhanced","Enhanced","Joker","Consumable","Voucher","Booster"}, pseudoseed("entropy")) - if enhancement_type == "Consumable" then - enhancement_type = pseudorandom_element({"Tarot","Planet","Spectral","Code","Star","Omen","Command"}, pseudoseed("entropy")) - end + 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 while G.P_CENTERS[enhancement].no_doe or G.GAME.banned_keys[enhancement] or (enhancement_type == "Joker" and SMODS.Rarities[G.P_CENTERS[enhancement].rarity] and ( @@ -679,9 +674,7 @@ local entropy = { )) do enhancement = pseudorandom_element(G.P_CENTER_POOLS[enhancement_type], pseudoseed("entropy")).key end - local seal = Entropy.pseudorandom_element(G.P_CENTER_POOLS.Seal, pseudoseed("entropy"),function(e) - return G.GAME.banned_keys[e.key] or e.no_doe - end).key + local seal = SMODS.poll_seal{guaranteed = true, key = "entropy"} card:set_edition(edition) card:set_ability(G.P_CENTERS[enhancement]) card:set_seal(seal) @@ -723,10 +716,6 @@ local fervour = { inversion = "c_soul", atlas = "consumables", - config = { - - }, - no_select = true, name = "entr-Fervour", soul_rate = 0, --probably only obtainable from flipsiding a gateway hidden = true, @@ -786,7 +775,7 @@ local quasar = { atlas = "consumables", config = { - level = 3 + level = 2 }, no_select = true, soul_rate = 0, @@ -835,7 +824,8 @@ local quasar = { return true end, })) - update_hand_text({ sound = "button", volume = 0.7, pitch = 0.9, delay = 0 }, { level = "+"..G.GAME.hands[ind].level..card.ability.level*amt }) + update_hand_text({ sound = "button", volume = 0.7, pitch = 0.9, delay = 0 }, { level = "+"..(to_big(G.GAME.hands[ind].level) * to_big(amt) * to_big(card.ability.level)) }) + delay(1.0) delay(2.6) update_hand_text( { sound = "button", volume = 0.7, pitch = 1.1, delay = 0 }, @@ -1053,17 +1043,6 @@ function Cryptid.misprintize(card, ...) end end -local manipulate = Cryptid.manipulate -function Cryptid.manipulate(card, args) - if card and not card.ability.entr_pure then - local ret = manipulate(card, args) - if card.edition and card.edition.card_limit and card.area and not args.bypass_checks and not args.no_deck_effects then - card.area:handle_card_limit(card.edition.card_limit) - end - return ret - end -end - local transcend = { dependencies = { items = { @@ -1106,7 +1085,10 @@ local transcend = { demicoloncompat = true, force_use = function(self, card) self:use(card) - end + end, + entr_credits = { + idea = {"cassknows"} + }, } local weld = { @@ -1163,6 +1145,42 @@ local weld = { local malediction = Entropy.SealSpectral("malediction", {x=2,y=0}, "entr_amber", 2000+37, "c_entr_enchant", nil, "consumables2") +local idyll = { + dependencies = { + items = { + "set_entr_inversions", + } + }, + object_type = "Consumable", + order = 2000 + 38, + key = "idyll", + set = "Omen", + + inversion = "c_entr_manifest", + + atlas = "consumables", + pos = {x=2,y=8}, + use = function(self, card, area, copier) + if G.GAME.last_tag then + add_tag(Tag(G.GAME.last_tag)) + add_tag(Tag(Entropy.AscendedTags[G.GAME.last_tag] or G.GAME.last_tag)) + end + end, + can_use = function(self, card) + return G.GAME.last_tag + end, + loc_vars = function(self, q, card) + if G.GAME.last_tag then + q[#q+1] = G.P_TAGS[G.GAME.last_tag] + q[#q+1] = G.P_TAGS[Entropy.AscendedTags[G.GAME.last_tag] or G.GAME.last_tag] + end + end, + demicoloncompat = true, + force_use = function(self, card) + self:use(card) + end +} + return { items = { changeling, @@ -1192,6 +1210,7 @@ return { purity, transcend, weld, - malediction + malediction, + idyll } } diff --git a/items/inversions/reverse_tarots.lua b/items/inversions/reverse_tarots.lua index 27b1ae5d..1831512a 100644 --- a/items/inversions/reverse_tarots.lua +++ b/items/inversions/reverse_tarots.lua @@ -12,17 +12,31 @@ local master = { inversion = "c_fool", use = function(self, card, area, copier) if G.GAME.last_inversion then + local tw = G.GAME.modifiers.entr_twisted + G.GAME.modifiers.entr_twisted = nil local c = create_card(G.GAME.last_inversion.set, G.consumeables, nil, nil, nil, nil, G.GAME.last_inversion.key) G.GAME.last_inversion = nil c:add_to_deck() G.consumeables:emplace(c) + G.GAME.modifiers.entr_twisted = tw end end, can_use = function(self, card) - return G.GAME.last_inversion + local fac = card.area == G.consumeables and -1 or 0 + return G.consumeables.config.card_limit > #G.consumeables.cards + fac and G.GAME.last_inversion end, loc_vars = function(self, q, card) - card.ability.last_inversion = G.GAME.last_inversion and G.GAME.last_inversion.set and G.localization.descriptions[G.GAME.last_inversion.set][G.GAME.last_inversion.key].name or "None" + card.ability.last_inversion = G.GAME.last_inversion and G.GAME.last_inversion.set and G.localization.descriptions[G.GAME.last_inversion.set] and G.localization.descriptions[G.GAME.last_inversion.set][G.GAME.last_inversion.key].name or localize('k_none') + if G.GAME.last_inversion and card.ability.last_inversion == localize('k_none') then + local nodes = {} + localize{type = 'name', set = "Other", key = G.GAME.last_inversion.key, nodes = nodes} + if not nodes[1] then + localize{type = 'name', set = "Other", key = string.gsub(G.GAME.last_inversion.key, "_[0-9]*$", ""), nodes = nodes} + end + card.ability.last_inversion = nodes[1][1].nodes[1].config.object.string + elseif G.GAME.last_inversion and G.GAME.last_inversion.key~= "c_entr_master" then + q[#q+1] = G.P_CENTERS[G.GAME.last_inversion.key] + end return { main_end = (card.area and (card.area == G.consumeables or card.area == G.pack_cards or card.area == G.hand or card.area == G.shop_jokers or card.area == G.shop_booster or card.area == G.shop_vouchers)) and { { @@ -88,9 +102,7 @@ local mason = { area = G.hand }) SMODS.change_base(card, "entr_nilsuit", "entr_nilrank") - card:set_edition(Entropy.pseudorandom_element(G.P_CENTER_POOLS.Edition, pseudoseed("mason"),function(e) - return G.GAME.banned_keys[e.key] or e.no_doe - end).key) + card:set_edition(SMODS.poll_edition({guaranteed = true, key = "entr_mason"})) G.hand:emplace(card) table.insert(G.playing_cards, card) end @@ -143,9 +155,7 @@ local oracle = { 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)) - card:set_edition(Entropy.pseudorandom_element(G.P_CENTER_POOLS.Edition, pseudoseed("oracle_edition"),function(e) - return G.GAME.banned_keys[e.key] or e.no_doe - end).key) + card:set_edition(SMODS.poll_edition({guaranteed = true, key = "entr_oracle"})) end) end, can_use = function(self, card) @@ -164,7 +174,10 @@ local oracle = { demicoloncompat = true, force_use = function(self, card) self:use(card) - end + end, + entr_credits = { + idea = {"cassknows"} + }, } @@ -256,8 +269,8 @@ local servant = { loc_vars = function(self, q, card) return { vars = { + card.ability.create, card.ability.select, - card.ability.create } } end, @@ -296,16 +309,11 @@ local heretic = { card:set_seal(seal) end if modification == "Edition" then - local edition = Entropy.pseudorandom_element(G.P_CENTER_POOLS.Edition, pseudoseed("heretic_edition"),function(e) - return G.GAME.banned_keys[e.key] or e.no_doe - end).key + local edition = SMODS.poll_edition({guaranteed = true, key = "entr_heretic_ed"}) card:set_edition(edition) end if modification == "Enhancement" then - local enhancement = pseudorandom_element(G.P_CENTER_POOLS.Enhanced, pseudoseed("heretic_enhancement")).key - while G.P_CENTERS[enhancement].no_doe or G.GAME.banned_keys[enhancement] do - enhancement = pseudorandom_element(G.P_CENTER_POOLS.Enhanced, pseudoseed("heretic_enhancement")).key - end + local enhancement = SMODS.poll_enhancement({guaranteed = true, key = "entr_heretic_enh"}) card:set_ability(G.P_CENTERS[enhancement]) end if modification == "Suit" or modification == "Rank" then @@ -364,7 +372,7 @@ local feud = { if new_card then chips = chips + new_card.base.nominal bonus_chips = bonus_chips + (new_card.ability and new_card.ability.bonus or 0) - new_card:start_dissolve() + SMODS.destroy_cards(new_card) end end local mult = card.ability.chip_mult @@ -422,7 +430,7 @@ local scar = { end, can_use = function(self, card) - local cards = Entropy.GetHighlightedCards({G.hand, G.consumeables}, card, 1, card.ability.select) + local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) local num = #cards return num > 0 and num <= card.ability.select end, @@ -491,11 +499,7 @@ local dagger = { for i, card in ipairs(cards) do total = total + card.base.nominal + (card.ability.bonus or 0) end - Entropy.FlipThen(cards, function(card) - if not SMODS.is_eternal(card) then - card:start_dissolve() - end - 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"), StatusText = true }) delay(1.6) update_hand_text({ sound = "button", volume = 0.7, pitch = 0.9, delay = 0 }, { chips = "+"..total, handname = localize(_hand, "poker_hands"), StatusText = true }) @@ -541,20 +545,20 @@ local earl = { } }, config = { - max = 20, + per_hand = 4, + per_discard = 3 }, inversion = "c_hermit", pos = {x=9, y = 0}, - use = function(self, card2, area, copier) - local hands_taken = G.GAME.round_resets.hands - 1 - local discards_taken = G.GAME.round_resets.discards - 1 - ease_hands_played(-hands_taken) - ease_discard(-discards_taken) - G.GAME.round_resets.hands = 1 - G.GAME.round_resets.discards = 1 - G.GAME.earl_hands = hands_taken - G.GAME.earl_discards = discards_taken - ease_dollars((hands_taken + discards_taken) * 3) + use = function(self, card, area, copier) + if not G.GAME.earl_modifiers then + G.GAME.earl_modifiers = { + discard = G.GAME.modifiers.money_per_discard, + hand = G.GAME.modifiers.money_per_hand + } + end + G.GAME.modifiers.money_per_discard = (G.GAME.modifiers.money_per_discard or 0) + card.ability.per_discard + G.GAME.modifiers.money_per_hand = (G.GAME.modifiers.money_per_hand or 0) + card.ability.per_hand end, can_use = function(self, card) return true @@ -562,8 +566,8 @@ local earl = { loc_vars = function(self, q, card) return { vars = { - card.ability.max, - (G.GAME.round_resets.hands + G.GAME.round_resets.discards) * 3 + (G.GAME.modifiers.money_per_hand or 0) + card.ability.per_hand, + (G.GAME.modifiers.money_per_discard or 0) + card.ability.per_discard } } end, @@ -839,7 +843,8 @@ local feast = { } }, config = { - select = 2 + select = 2, + multiplier = 2 }, pos = {x=4,y=1}, inversion = "c_temperance", @@ -849,7 +854,7 @@ local feast = { local card = cards[i] G.E_MANAGER:add_event(Event({ func = function() - ease_dollars(card.cost) + ease_dollars(card.cost * card2.ability.multiplier) card:start_dissolve() return true end @@ -864,7 +869,8 @@ local feast = { loc_vars = function(self, q, card) return { vars = { - card.ability.select + card.ability.select, + card.ability.multiplier } } end, @@ -893,7 +899,7 @@ local companion = { use = function(self, card) G.E_MANAGER:add_event(Event({ func = function() - G.GAME.interest_cap = G.GAME.interest_cap + (card.ability.extra) + G.GAME.companion_interest_cap = (G.GAME.companion_interest_cap or 0) + (card.ability.extra) ease_dollars(math.min(G.GAME.interest_cap, 50)) return true end, @@ -948,7 +954,7 @@ local village = { end) end, can_use = function(self, card) - return true + return G.hand and #G.hand.cards > 0 end, loc_vars = function(self, q, card) return { @@ -1263,6 +1269,51 @@ local frail = { end } +local inferno = { + key = "inferno", + set = "Fraud", + atlas = "fraud", + object_type = "Consumable", + order = -901+34, + dependencies = { + items = { + "set_entr_inversions" + } + }, + config = { + per_past_three = 3 + }, + pos = {x=8,y=2}, + inversion = "c_entr_comet", + loc_vars = function(self, q, card) + return { + vars = { + card.ability.per_past_three + } + } + end, + use = function(self, card) + local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + for i, v in pairs(cards) do + v:start_dissolve() + end + if #cards > 2 then + ease_dollars(-(card.ability.per_past_three * (#cards - 2))) + end + end, + can_use = function(self, card) + local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + return #cards > 0 + end, + demicoloncompat = true, + force_use = function(self, card) + self:use(card) + end, + entr_credits = { + art = {"LFMoth"} + } +} + return { items = { master, @@ -1288,6 +1339,7 @@ return { tent, companion, village, - frail + frail, + inferno } } diff --git a/items/jokers/dice_jokers.lua b/items/jokers/dice_jokers.lua index 5e1ae04d..307b3c66 100644 --- a/items/jokers/dice_jokers.lua +++ b/items/jokers/dice_jokers.lua @@ -1,3 +1,28 @@ +local D0 = { + order = 199, + object_type = "Joker", + key = "d0", + rarity = 1, + cost = 6, + dependencies = { + items = { + "set_entr_dice_jokers", + } + }, + pools = {["Dice"] = true}, + eternal_compat = true, + pos = { x = 9, y = 12 }, + atlas = "jokers", + demicoloncompat = true, + calculate = function(self, card, context) + if context.fix_probability and not context.blueprint and not context.repetition then + return { + numerator = 0 + } + end + end, +} + local D1 = { order = 200, object_type = "Joker", @@ -123,7 +148,7 @@ local eternal_D6 = { numerator = 0, numerator_mod = 1, extra = { - odds = 3 + odds = 2 } }, demicoloncompat = true, @@ -215,8 +240,8 @@ local D7 = { and not context.retrigger_joker and context.other_card and context.other_card.config + and context.other_card.config.center and context.other_card.config.center.key ~= "j_entr_d7" - and Entropy.probability_cards[context.other_card.config.center.key] and SMODS.pseudorandom_probability( card, "entr_D7", @@ -224,17 +249,22 @@ local D7 = { card and card.ability.extra.odds or self.config.extra.odds ) then - return { - message = localize("k_again_ex"), - repetitions = 1, - card = card, - } + if not Entropy.probability_cards[context.other_card.config.center.key] and context.other_card.config.center.loc_vars then + context.other_card.config.center:loc_vars({}, context.other_card) + end + if Entropy.probability_cards[context.other_card.config.center.key] then + return { + message = localize("k_again_ex"), + repetitions = 1, + card = card, + } + end end if context.repetition and context.other_card and context.other_card.config - and Entropy.probability_cards[context.other_card.config.center.key] + and context.other_card.config.center and SMODS.pseudorandom_probability( card, "entr_D7", @@ -242,11 +272,16 @@ local D7 = { card and card.ability.extra.odds or self.config.extra.odds ) then - return { - message = localize("k_again_ex"), - repetitions = 1, - card = card, - } + if not Entropy.probability_cards[context.other_card.config.center.key] and context.other_card.config.center.loc_vars then + context.other_card.config.center:loc_vars({}, context.other_card) + end + if Entropy.probability_cards[context.other_card.config.center.key] then + return { + message = localize("k_again_ex"), + repetitions = 1, + card = card, + } + end end end, } @@ -406,7 +441,7 @@ local D100 = { } local capsule_machine = { - order = 209, + order = 211, object_type = "Joker", key = "capsule_machine", rarity = 2, @@ -442,8 +477,154 @@ local capsule_machine = { end, } +local dice_shard = { + order = 209, + object_type = "Joker", + key = "dice_shard", + rarity = 3, + cost = 10, + eternal_compat = true, + pos = { x = 9, y = 5 }, + atlas = "jokers", + config = { + left = 1, + left_mod = 1 + }, + dependencies = { + items = { + "set_entr_actives", + "set_entr_dice_jokers", + } + }, + perishable_compat = true, + 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) + 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 + 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 } + end + end + return { + vars = { + card.ability.left, + card.ability.left_mod, + name + } + } + 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 num = #Entropy.GetHighlightedCards({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) + end +} + +local nostalgic_d6 = { + order = 210, + object_type = "Joker", + key = "nostalgic_d6", + rarity = 3, + cost = 8, + eternal_compat = true, + pos = {x = 5, y = 14}, + atlas = "jokers", + config = { + dollars = 4 + }, + dependencies = { + items = { + "set_entr_actives", + } + }, + perishable_compat = true, + pools = {Dice = true}, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.dollars + } + } + end, + can_use = function(self, card) + return G.STATE == G.STATES.SMODS_BOOSTER_OPENED and (Entropy.kind_to_set(SMODS.OPENED_BOOSTER.config.center.kind) or SMODS.OPENED_BOOSTER.config.center.create_card) + end, + use = function(self, card) + ease_dollars(-card.ability.dollars) + for i, v in pairs(G.pack_cards.cards) do + v:start_dissolve() + local p_card + local k = SMODS.OPENED_BOOSTER and Entropy.kind_to_set(SMODS.OPENED_BOOSTER.config.center.kind, true) + if not k and SMODS.OPENED_BOOSTER.config.center.create_card and type(SMODS.OPENED_BOOSTER.config.center.create_card) == "function" then + local _card_to_spawn = SMODS.OPENED_BOOSTER.config.center:create_card(SMODS.OPENED_BOOSTERr, i) + local spawned + if type((_card_to_spawn or {}).is) == 'function' and _card_to_spawn:is(Card) then + spawned = _card_to_spawn + else + spawned = SMODS.create_card(_card_to_spawn) + end + p_card = spawned + else + if k == "Planet" or k == "Tarot" then + local rune + local rare_rune + if pseudorandom("entr_generate_rune") < 0.06 then rune = true end + if G.GAME.entr_diviner then + if pseudorandom("entr_generate_rune") < 0.06 then rune = true end + end + if rune then + k = "Rune" + end + end + p_card = SMODS.create_card { + set = k or "Joker", + area = k == "Twisted" and G.consumeables or nil, + key_append = "entr_nostalgic_d6", + } + end + G.pack_cards.cards[i] = p_card + p_card.area = G.pack_cards + 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 + end + p_card.ability.glitched_crown = gc + end + end + end, + entr_credits = {idea = {"Grahkon"}} +} + return { items = { + D0, D1, D4, D6, @@ -453,6 +634,8 @@ return { D10, D12, D100, + dice_shard, + nostalgic_d6, capsule_machine } } \ No newline at end of file diff --git a/items/jokers/misc_jokers.lua b/items/jokers/misc_jokers.lua index 4b2aafb1..e16f17ae 100644 --- a/items/jokers/misc_jokers.lua +++ b/items/jokers/misc_jokers.lua @@ -13,6 +13,7 @@ local surreal = { "set_entr_misc_jokers" } }, + perishable_compat = true, blueprint_compat = true, eternal_compat = true, pos = { x = 0, y = 0 }, @@ -49,6 +50,7 @@ local tesseract = { cost = 3, pools = { ["Meme"] = true }, + perishable_compat = true, blueprint_compat = true, eternal_compat = true, pos = { x = 1, y = 0 }, @@ -74,12 +76,25 @@ local strawberry_pie = { "set_entr_misc_jokers" } }, - blueprint_compat = false, + config = { + num = 2, + denom = 3 + }, + perishable_compat = true, + blueprint_compat = true, eternal_compat = true, pos = { x = 2, y = 1 }, atlas = "jokers", demicoloncompat = true, pools = { ["Food"] = true }, + loc_vars = function(self, q, card) + local n, d = SMODS.get_probability_vars(card, card.ability.num, card.ability.denom, "entr_strawberry") + return { + vars = { + n, d + } + } + end } local recursive_joker = { @@ -97,7 +112,8 @@ local recursive_joker = { "set_entr_misc_jokers" } }, - blueprint_compat = false, + perishable_compat = true, + blueprint_compat = true, eternal_compat = true, pos = { x = 3, y = 1 }, atlas = "jokers", @@ -115,6 +131,7 @@ local recursive_joker = { end if (context.selling_card and context.card == card and not card.ability.used_this_round) or context.forcetrigger then card.ability.used_this_round = true + card.ability.cost_set = false local card = copy_card(card) if context.forcetrigger and card.ability.desync then card.ability.context = Entropy.RandomContext() @@ -184,6 +201,7 @@ local sunny_joker = { "set_entr_misc_jokers" } }, + perishable_compat = true, blueprint_compat = true, eternal_compat = true, pos = { x = 5, y = 1 }, @@ -221,6 +239,7 @@ local antidagger = { "set_entr_misc_jokers" } }, + perishable_compat = true, blueprint_compat = true, immutable = true, eternal_compat = true, @@ -341,6 +360,11 @@ local insatiable_dagger = { "set_entr_misc_jokers" } }, + config = { + perc = 15, + perc_mod = 3 + }, + perishable_compat = true, blueprint_compat = true, eternal_compat = true, immutable = true, @@ -365,7 +389,7 @@ local insatiable_dagger = { play_sound("slice1", 0.96 + math.random() * 0.08) local check2 if not Card.no(G.jokers.cards[check], "immutable", true) then - Cryptid.manipulate(G.jokers.cards[check], { value = sliced_card.sell_cost * 0.05 + 1 }) + Cryptid.manipulate(G.jokers.cards[check], { value = sliced_card.sell_cost * (card.ability.perc / 100) + 1 }) check2 = true end if check2 then @@ -381,9 +405,21 @@ local insatiable_dagger = { return true end, })) + 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) + end end end end, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.perc, + card.ability.perc_mod + } + } + end, entr_credits = { idea = {"cassknows"}, art = {"Lyman"} @@ -402,7 +438,8 @@ local rusty_shredder = { "set_entr_misc_jokers" } }, - blueprint_compat=true, + perishable_compat = true, + blueprint_compat = true, immutable = true, eternal_compat = true, pos = { x = 7, y = 1 }, @@ -450,6 +487,7 @@ local chocolate_egg = { "set_entr_misc_jokers" } }, + perishable_compat = true, blueprint_compat = true, eternal_compat = true, pos = { x = 0, y = 2 }, @@ -511,7 +549,8 @@ local lotteryticket = { "set_entr_misc_jokers" } }, - blueprint_compat=true, + perishable_compat = true, + blueprint_compat = true, demicoloncompat=true, eternal_compat = true, pos = { x = 9, y = 0 }, @@ -587,7 +626,8 @@ local devilled_suns = { "set_entr_misc_jokers" } }, - blueprint_compat=true, + perishable_compat = true, + blueprint_compat = true, demicoloncompat=true, eternal_compat = true, pos = { x = 1, y = 2 }, @@ -636,6 +676,7 @@ local eden = { "set_entr_misc_jokers" } }, + perishable_compat = true, blueprint_compat = true, eternal_compat = true, pos = { x = 2, y = 2 }, @@ -705,7 +746,11 @@ local eden = { card = card, } end - end + end, + entr_credits = { + idea = {"cassknows"}, + art = {"cassknows"} + }, } local seventyseven = { @@ -723,6 +768,7 @@ local seventyseven = { "set_entr_misc_jokers" } }, + perishable_compat = true, blueprint_compat = true, eternal_compat = true, pos = { x = 3, y = 2 }, @@ -761,6 +807,7 @@ local skullcry = { "set_entr_misc_jokers" } }, + perishable_compat = true, blueprint_compat = true, eternal_compat = true, pos = { x = 8, y = 2 }, @@ -788,7 +835,7 @@ local skullcry = { end return { message = localize('k_saved_ex'), - saved = "k_saved_skullcry", + saved = localize("k_saved_skullcry"), colour = G.C.RED } end @@ -834,7 +881,6 @@ local dating_simbo = { return true end })) - card.ability.chips = card.ability.chips + math.max(context.destroying_card.base.nominal + (context.destroying_card.ability.bonus or 0), 0) SMODS.scale_card(card, {ref_table = card.ability, ref_value = "chips", scalar_table = context.destroying_card.base, scalar_value = "nominal"}) 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}) @@ -860,7 +906,7 @@ local sweet_tooth = { key = "sweet_tooth", config = { chips = 20, - chip_exp = 1.1 + chip_mul = 1.25 }, rarity = 3, cost = 8, @@ -869,6 +915,7 @@ local sweet_tooth = { "set_entr_misc_jokers" } }, + perishable_compat = true, blueprint_compat = true, eternal_compat = true, pos = { x = 0, y = 3 }, @@ -878,7 +925,7 @@ local sweet_tooth = { return { vars = { number_format(center.ability.chips), - number_format(center.ability.chip_exp) + number_format(center.ability.chip_mul) }, } end, @@ -897,9 +944,8 @@ local sweet_tooth = { end end if check then - card.ability.chips = to_big(card.ability.chips) ^ to_big(card.ability.chip_exp) - SMODS.scale_card(card, {ref_table = card.ability, ref_value = "chips", scalar_value = "chip_exp", operation = function(ref_table, ref_value, initial, change) - ref_table[ref_value] = initial ^ change + SMODS.scale_card(card, {ref_table = card.ability, ref_value = "chips", scalar_value = "chip_mul", operation = function(ref_table, ref_value, initial, change) + ref_table[ref_value] = initial * change end}) end end @@ -926,6 +972,7 @@ local bossfight = { "set_entr_misc_jokers" } }, + perishable_compat = true, blueprint_compat = true, eternal_compat = true, pos = { x = 1, y = 3 }, @@ -963,7 +1010,7 @@ local phantom_shopper = { config = { rarity = "Common", progress = 0, - needed_progress = 4 + needed_progress = 5 }, rarity = 2, cost = 8, @@ -972,6 +1019,7 @@ local phantom_shopper = { "set_entr_misc_jokers" } }, + perishable_compat = true, blueprint_compat = true, pos = { x = 3, y = 3 }, atlas = "jokers", @@ -1002,9 +1050,10 @@ local phantom_shopper = { card.ability.rarity = ({ Common = "Uncommon", Uncommon = "Rare", - Rare = "cry_epic", + Rare = (SMODS.Mods["Cryptid"] or {}).can_load and "cry_epic" or "Legendary", cry_epic = "Legendary" })[card.ability.rarity] or card.ability.rarity + card.ability.needed_progress = card.ability.needed_progress + 1 else card_eval_status_text( card, @@ -1038,6 +1087,7 @@ local sunny_side_up = { "set_entr_misc_jokers" } }, + perishable_compat = true, blueprint_compat = true, eternal_compat = true, pos = { x = 5, y = 3 }, @@ -1058,8 +1108,7 @@ local sunny_side_up = { calculate = function(self, card, context) if context.joker_main or context.forcetrigger then local asc = card.ability.asc - card.ability.asc = card.ability.asc - card.ability.asc_mod - SMODS.scale_card(card, {ref_table = card.ability, ref_value = "asc", scalar_value = "asc_mod", operation = "-"}) + if not context.blueprint then SMODS.scale_card(card, {ref_table = card.ability, ref_value = "asc", scalar_value = "asc_mod", operation = "-"}) end if to_big(card.ability.asc) > to_big(0) then return { plus_asc = asc @@ -1090,6 +1139,7 @@ local sunflower_seeds = { needed = 3, left = 3 }, + perishable_compat = true, blueprint_compat = true, eternal_compat = true, pos = { x = 7, y = 3 }, @@ -1157,6 +1207,7 @@ local tenner = { config = { dollars = 10 }, + perishable_compat = true, blueprint_compat = true, eternal_compat = true, pos = { x = 8, y = 3 }, @@ -1208,6 +1259,7 @@ local sticker_sheet = { config = { per_sticker = 2 }, + perishable_compat = true, blueprint_compat = true, eternal_compat = true, pos = { x = 9, y = 3 }, @@ -1265,7 +1317,8 @@ local fourbit = { needed = 16, left = 16 }, - blueprint_compat = false, + perishable_compat = true, + blueprint_compat = true, eternal_compat = true, pos = { x = 1, y = 4 }, pixel_size = { w = 53, h = 53 }, @@ -1310,6 +1363,9 @@ local fourbit = { end end end, + entr_credits = { + idea = {"cassknows"} + }, } local crimson_flask = { @@ -1458,6 +1514,7 @@ local dog_chocolate = { "tag_entr_dog" } }, + perishable_compat = true, blueprint_compat = true, eternal_compat = true, pos = { x = 4, y = 4 }, @@ -1499,6 +1556,7 @@ local nucleotide = { "set_entr_misc_jokers", } }, + perishable_compat = true, blueprint_compat = true, eternal_compat = true, pos = { x = 8, y = 6 }, @@ -1560,6 +1618,7 @@ local afterimage = { "set_entr_misc_jokers", } }, + perishable_compat = true, blueprint_compat = true, eternal_compat = true, pos = { x = 5, y = 4 }, @@ -1619,6 +1678,7 @@ local qu = { "set_entr_misc_jokers", } }, + perishable_compat = true, blueprint_compat = true, eternal_compat = true, pos = { x = 6, y = 4 }, @@ -1628,8 +1688,8 @@ local qu = { 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 = pseudorandom_element(Entropy.FlipsidePureInversions, pseudoseed("qu_twisted")) - card:set_ability(G.P_CENTERS[elem]) + local elem = Entropy.GetPooledCenter("Twisted") + card:set_ability(elem) end) G.E_MANAGER:add_event(Event({ blocking = false, @@ -1657,6 +1717,7 @@ local memento_mori = { "set_entr_misc_jokers", } }, + perishable_compat = true, blueprint_compat = true, eternal_compat = true, pos = { x = 8, y = 4 }, @@ -1695,6 +1756,7 @@ local broadcast = { "set_entr_misc_jokers", } }, + perishable_compat = true, blueprint_compat = true, eternal_compat = true, pos = { x = 0, y = 5 }, @@ -1782,6 +1844,8 @@ local milk_chocolate = { end, pools = {["Food"] = true}, demicoloncompat = true, + perishable_compat = true, + blueprint_compat = true, calculate = function(self, card, context) if context.selling_self or context.forcetrigger then G.E_MANAGER:add_event(Event({ @@ -1813,6 +1877,8 @@ local insurance_fraud = { pos = {x = 9, y = 7}, atlas = "jokers", demicoloncompat = true, + perishable_compat = true, + blueprint_compat = true, calculate = function(self, card, context) if (context.selling_card and context.card.config.center.set == "Tarot") or context.forcetrigger then G.E_MANAGER:add_event(Event({ @@ -1844,6 +1910,8 @@ local free_samples = { } }, eternal_compat = true, + perishable_compat = true, + blueprint_compat = true, pos = { x = 4, y = 6 }, atlas = "jokers", config = { @@ -1911,6 +1979,8 @@ local fused_lens = { }} end, demicoloncompat = true, + perishable_compat = true, + blueprint_compat = true, calculate = function(self, card, context) if (context.after and SMODS.pseudorandom_probability( card, @@ -1938,7 +2008,7 @@ local fused_lens = { end) })) return { - message = "+1 "..localize("k_star") + message = localize("k_plus_star") } end end, @@ -1956,6 +2026,8 @@ local opal = { } }, eternal_compat = true, + perishable_compat = true, + blueprint_compat = true, pos = { x = 5, y = 6 }, atlas = "jokers", calculate = function(self, card, context) @@ -1983,6 +2055,7 @@ local inkbleed = { } }, eternal_compat = true, + perishable_compat = true, pos = { x = 7, y = 6 }, atlas = "jokers", entr_credits = { @@ -2012,6 +2085,8 @@ local roulette = { } }, eternal_compat = true, + perishable_compat = true, + blueprint_compat = true, pos = {x = 0, y = 8}, atlas = "jokers", loc_vars = function(self, q, card) @@ -2082,7 +2157,7 @@ local debit_card = { atlas = "jokers", config = { amount = 1, - needed = 25, + needed = 35, current_spent = 0, current = 0 }, @@ -2097,7 +2172,6 @@ local debit_card = { } } end, - demicoloncompat = true, calculate = function(self, card, context) if context.money_altered and to_big(context.amount) < to_big(0) and not context.blueprint and context.from_shop then card.ability.current_spent = card.ability.current_spent - context.amount @@ -2118,7 +2192,9 @@ local debit_card = { end end, calc_dollar_bonus = function(self, card) - return card.ability.current + if to_big(card.ability.current) > to_big(0) then + return card.ability.current + end end, entr_credits = { art = {"Lil. Mr. Slipstream"} @@ -2152,7 +2228,8 @@ local birthday_card = { } } end, - demicoloncompat = true, + perishable_compat = true, + blueprint_compat = true, calculate = function(self, card, context) if Overflow then if context.joker_main and G.consumeables:get_total_count() >= card.ability.consumables then @@ -2185,29 +2262,68 @@ local ruby = { pos = {x=0, y=0}, soul_pos = {x = 1, y = 0}, config = { - xmult = 1, - xmult_mod = 2 + jokers_needed = 2, + jokers = 0, + already_triggered = false }, demicoloncompat = true, blueprint_compat = true, + pronouns = "she_her", calculate = function(self, card, context) - if context.entr_path_changed and not context.blueprint then - SMODS.scale_card(card, {ref_table = card.ability, ref_value = "xmult", scalar_value = "xmult_mod"}) - end - if context.joker_main or context.forcetrigger then - return { - xmult = card.ability.xmult - } + if context.buying_card and context.card.config.center.set == "Joker" then + if context.blueprint then + local off = 0 + for i = 1, #G.jokers.cards do + if G.jokers.cards[i] == context.blueprint_card then off = 1; break end + if G.jokers.cards[i] == card then break end + end + if card.ability.jokers + off == card.ability.jokers_needed then + add_tag(Tag(get_next_tag_key())) + return { + message = localize("k_plus_tag") + } + end + return { + message = number_format(card.ability.jokers + off).."/"..number_format(card.ability.jokers_needed) + } + else + card.ability.jokers = card.ability.jokers + 1 + local add + if card.ability.jokers >= card.ability.jokers_needed then + add_tag(Tag(get_next_tag_key())) + G.E_MANAGER:add_event(Event{ + func = function() + card.ability.jokers = 0 + return true + end + }) + add = true + end + if add then + return { + message = localize("k_plus_tag") + } + else + return { + message = number_format(card.ability.jokers).."/"..number_format(card.ability.jokers_needed) + } + end + end end end, loc_vars = function(self, q, card) return { vars = { - number_format(card.ability.xmult_mod), - number_format(card.ability.xmult) + number_format(card.ability.jokers_needed), + number_format(card.ability.jokers_needed - card.ability.jokers) } } - end + end, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, } local slipstream = { @@ -2223,6 +2339,9 @@ local slipstream = { xmult = 2, }, demicoloncompat = true, + perishable_compat = true, + blueprint_compat = true, + pronouns = "he_they", calculate = function(self, card, context) if context.setting_blind then if G.GAME.consumeable_buffer + #G.consumeables.cards < G.consumeables.config.card_limit then @@ -2239,7 +2358,7 @@ local slipstream = { }) G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1 return { - message = "+1 "..localize("k_omen") + message = localize("k_plus_omen") } end end @@ -2268,7 +2387,12 @@ local slipstream = { } } end, - entr_credits = {art = {"Lil. Mr. Slipstream"}} + entr_credits = {art = {"Lil. Mr. Slipstream"}}, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, } local cass = { @@ -2290,13 +2414,16 @@ local cass = { mod = 0.5 }, demicoloncompat = true, + blueprint_compat = true, + pronouns = "she_her", calculate = function(self, card, context) if context.using_consumeable and (context.consumeable.config.center.set == "Planet" or context.consumeable.config.center.set == "Star") then card.ability.mod = math.min(card.ability.mod, 20) local result = pseudorandom(pseudoseed("entr_cass"), 1, 6) if result == 1 then + local old = card.ability.hand_size SMODS.scale_card(card, {ref_table = card.ability, ref_value = "hand_size", scalar_value = "mod"}) - G.hand:handle_card_limit(card.ability.hand_size) + G.hand:handle_card_limit(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) @@ -2309,8 +2436,9 @@ local cass = { G.GAME.round_resets.discards = G.GAME.round_resets.discards + card.ability.mod ease_discard(card.ability.mod) elseif result == 5 then + local old = card.ability.consumable_slots SMODS.scale_card(card, {ref_table = card.ability, ref_value = "consumable_slots", scalar_value = "mod"}) - G.consumeables:handle_card_limit(card.ability.consumable_slots) + G.consumeables:handle_card_limit(card.ability.consumable_slots - old) elseif result == 6 then if to_big(card.ability.shop_slots) < to_big(4) then SMODS.scale_card(card, {ref_table = card.ability, ref_value = "shop_slots", scalar_value = "mod"}) @@ -2383,7 +2511,15 @@ local cass = { } } end, - entr_credits = {art = {"Lil. Mr. Slipstream"}} + entr_credits = {art = {"Lil. Mr. Slipstream"}}, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + entr_credits = { + idea = {"cassknows"} + }, } local crabus = { @@ -2400,11 +2536,14 @@ local crabus = { 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) then cards[#cards+1] = v end + 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) @@ -2449,6 +2588,7 @@ local crabus = { 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), @@ -2456,7 +2596,129 @@ local crabus = { } } end, - entr_credits = {art = {"Lil. Mr. Slipstream"}} + entr_credits = {art = {"Lil. Mr. Slipstream"}}, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, +} + +local hexa = { + object_type = "Joker", + key = "hexa", + order = 304, + rarity = 4, + cost = 20, + atlas = "ruby_atlas", + pos = {x=0, y=4}, + soul_pos = {x = 1, y = 4}, + config = { + asc_fac = 3, + csl = 3 + }, + demicoloncompat = true, + perishable_compat = true, + add_to_deck = function(self, card) + Entropy.ChangeFullCSL(card.ability.csl) + end, + remove_from_deck = function(self, card) + Entropy.ChangeFullCSL(-card.ability.csl) + end, + loc_vars = function(self, q, card) + return { + key = (SMODS.Mods["Cryptid"] or {}).can_load and "j_entr_hexa_cryptid" or nil, + vars = { + number_format(card.ability.csl) + } + } + end, + entr_credits = {art = {"HexaCryonic"}}, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + pronouns = "she_her", +} + +local grahkon = { + object_type = "Joker", + key = "grahkon", + order = 305, + rarity = 4, + cost = 20, + atlas = "grahkon_atlas", + pos = {x=0, y=0}, + soul_pos = {x = 1, y = 0}, + config = { + blind_size = 800, + value_inc = 1.08, + left = 1, + left_mod = 1, + cards = 4 + }, + demicoloncompat = true, + perishable_compat = true, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.blind_size, + card.ability.value_inc, + card.ability.cards, + card.ability.left_mod, + card.ability.left, + } + } + end, + entr_credits = {art = {"Lil. Mr. Slipstream"}}, + dependencies = { + items = { + "set_entr_actives", + } + }, + pronouns = "he_him", + + 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 + if context.remove_playing_cards and not context.blueprint then + for i, v in pairs(context.removed) do + SMODS.scale_card(card, { + ref_table = card.ability, + ref_value = "blind_size", + scalar_value = "value_inc", + operation = function(ref_table, ref_value, initial, change) + ref_table[ref_value] = initial * change + end, + }) + end + end + if (context.setting_blind and not context.blueprint and not card.getting_sliced) or context.forcetrigger then + G.GAME.blind.chips = G.GAME.blind.chips - card.ability.blind_size + G.GAME.blind.chip_text = number_format(G.GAME.blind.chips) + G.HUD_blind:recalculate() + end + end, + can_use = function(self, card) + return to_big(card.ability.left) > to_big(0) and G.hand and #G.hand.cards > 0 + end, + use = function(self, card) + card.ability.left = card.ability.left - 1 + local cards = {} + for i, v in pairs(G.hand.cards) do + if not SMODS.is_eternal(v) then + cards[#cards+1] = v + end + end + local a_cards = {} + pseudoshuffle(cards, pseudoseed("entr_grahkon")) + for i = 1, card.ability.cards do + a_cards[#a_cards+1] = cards[i] + end + SMODS.destroy_cards(a_cards) + end, } local sandpaper = { @@ -2477,7 +2739,8 @@ local sandpaper = { loc_vars = function(self, q, card) q[#q+1] = G.P_CENTERS.m_stone end, - demicoloncompat = true, + perishable_compat = true, + blueprint_compat = true, calculate = function(self, card, context) if context.after then local stones = {} @@ -2503,7 +2766,7 @@ local sandpaper = { end }) return { - message = "+1 "..localize("k_rune") + message = localize("k_plus_rune") } end end @@ -2540,6 +2803,7 @@ local purple_joker = { pos = { x = 1, y = 7 }, atlas = "jokers", demicoloncompat = true, + blueprint_compat = true, config = { xmult_mod = 0.2, xmult = 1 @@ -2580,7 +2844,7 @@ local chalice_of_blood = { object_type = "Joker", key = "chalice_of_blood", rarity = 3, - cost = 12, + cost = 8, dependencies = { items = { "set_entr_runes", @@ -2591,6 +2855,8 @@ local chalice_of_blood = { pos = { x = 2, y = 7 }, atlas = "jokers", demicoloncompat = true, + perishable_compat = true, + blueprint_compat = true, config = { xmult_mod = 0.75, }, @@ -2624,6 +2890,7 @@ local torn_photograph = { } }, eternal_compat = true, + blueprint_compat = true, pos = { x = 3, y = 7 }, pixel_size = { h = 95 / 1.2 }, atlas = "jokers", @@ -2668,9 +2935,11 @@ local chuckle_cola = { pos = { x = 4, y = 7 }, atlas = "jokers", demicoloncompat = true, + perishable_compat = true, + blueprint_compat = true, config = { - triggers = 20, - xchip_mod = 2 + triggers = 10, + xchip_mod = 1.5 }, pools = {Food = true}, loc_vars = function(self, q, card) @@ -2719,6 +2988,7 @@ local antiderivative = { } }, eternal_compat = true, + perishable_compat = true, pos = { x = 5, y = 7 }, atlas = "jokers", } @@ -2857,6 +3127,7 @@ local alles = { dollars = 8 }, eternal_compat = true, + perishable_compat = true, pos = { x = 6, y = 7 }, pixel_size = {h = 46}, atlas = "jokers", @@ -2898,6 +3169,7 @@ local feynman_point = { nearest_mod = 0.05 }, eternal_compat = true, + perishable_compat = true, pos = { x = 7, y = 7 }, atlas = "jokers", loc_vars = function(self, q, card) @@ -2919,6 +3191,10 @@ local feynman_point = { local calculate_jokerref = Card.calculate_joker function Card:calculate_joker(...) + local abil + if self.ability.entr_pure then + abil = copy_table(self.ability) + end local ret = calculate_jokerref(self, ...) if next(SMODS.find_card("j_entr_feynman_point")) and self.config.center.key ~= "j_entr_feynman_point" and not self.config.center.immutable and self.area == G.jokers then local highest = 0 @@ -2941,13 +3217,16 @@ function Card:calculate_joker(...) }) end end + if self.ability.entr_pure then + self.ability = abil + end return ret end local set_abilityref = Card.set_ability function Card:set_ability(...) set_abilityref(self, ...) - if self.config.center.set == "Joker" and self.config.center.key ~= "j_entr_feynman_point" then + if self.config.center and self.config.center.set == "Joker" and self.config.center.key ~= "j_entr_feynman_point" then if next(SMODS.find_card("j_entr_feynman_point")) then local highest = 0 for i, v in pairs(SMODS.find_card("j_entr_feynman_point")) do @@ -2991,6 +3270,7 @@ local neuroplasticity = { } }, eternal_compat = true, + perishable_compat = true, pos = {x = 3, y = 8}, atlas = "jokers", add_to_deck = function(self, card, from_debuff) @@ -3056,6 +3336,7 @@ local dragonfruit = { left = 5, left_mod = 1 }, + perishable_compat = true, pools = {Food = true}, add_to_deck = function(self, card, from_debuff) Entropy.ChangeFullCSL(card.ability.left) @@ -3074,7 +3355,9 @@ local dragonfruit = { calculate = function(self, card, context) 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}) - Entropy.ChangeFullCSL(- card.ability.left_mod) + if not card.ability.entr_pure then + Entropy.ChangeFullCSL(- card.ability.left_mod) + end if card.ability.left <= 0 then SMODS.destroy_cards(card, nil, nil, true) return { @@ -3082,12 +3365,10 @@ local dragonfruit = { colour = G.C.FILTER, } end - if not msg or type(msg) == "string" then - return { - message = msg or "-"..number_format(card.ability.left_mod), - colour = G.C.RED, - } - end + return { + message = msg or "-"..number_format(card.ability.left_mod), + colour = G.C.RED, + } end end } @@ -3106,6 +3387,11 @@ local jestradiol = { left = 3, left_mod = 1 }, + dependencies = { + items = { + "set_entr_actives", + } + }, loc_vars = function(self, q, card) return { vars = { @@ -3153,6 +3439,11 @@ local penny = { chips = 8 } }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, loc_vars = function(self, q, card) return { vars = { @@ -3162,15 +3453,10 @@ local penny = { end, pixel_size = { w = 32, h = 32 }, demicoloncompat = true, + blueprint_compat = true, 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 card.ability.extra.chips = to_big(card.ability.extra.chips) * 2 - SMODS.scale_card(card, { - ref_table = card.ability.extra, - ref_value = "chips", - scalar_table = {mod = 2}, - scalar_value = "mod" - }) return { message = localize("k_upgrade_ex"), chips = context.forcetrigger and card.ability.extra.chips or nil @@ -3196,6 +3482,11 @@ local slothful_joker = { config = { smult = 3 }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, loc_vars = function(self, q, card) return { vars = { @@ -3204,6 +3495,8 @@ local slothful_joker = { } end, demicoloncompat = true, + perishable_compat = true, + blueprint_compat = true, calculate = function(self, card, context) if (context.individual and Entropy.true_suitless(context.other_card) and context.cardarea == G.play) or context.forcetrigger then return { @@ -3225,6 +3518,12 @@ local radar = { config = { dollar_mult = 1 }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + perishable_compat = true, loc_vars = function(self, q, card) return { vars = { @@ -3251,7 +3550,14 @@ local abacus = { config = { dollar_mult = 1 }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, demicoloncompat = true, + 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) > to_big(0) and context.cardarea == G.play) or context.forcetrigger then local id = context.other_card:get_id() @@ -3276,6 +3582,13 @@ local matryoshka_dolls = { config = { mult = 4 }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + perishable_compat = true, + blueprint_compat = true, demicoloncompat = true, loc_vars = function(self, q, card) return { @@ -3327,6 +3640,13 @@ local menger_sponge = { chips_mod = 3, base_chips = 10 }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + perishable_compat = true, + blueprint_compat = true, demicoloncompat = true, loc_vars = function(self, q, card) return { @@ -3378,7 +3698,14 @@ local arbitration = { chips_mod = 3, base_chips = 10 }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, demicoloncompat = true, + perishable_compat = true, + blueprint_compat = true, loc_vars = function(self, q, card) q[#q+1] = G.P_CENTERS.c_judgement q[#q+1] = G.P_CENTERS.m_glass @@ -3420,7 +3747,14 @@ local masterful_gambit = { config = { dollars = 2 }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, demicoloncompat = true, + perishable_compat = true, + blueprint_compat = true, calculate = function(self, card, context) if (context.joker_main and #G.play.cards == 1) or context.forcetrigger then return { @@ -3449,8 +3783,15 @@ local fourty_benadryls = { config = { chip_mod = 15 }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, pixel_size = { h = 95 / 1.2 }, demicoloncompat = true, + perishable_compat = true, + blueprint_compat = true, calculate = function(self, card, context) if context.joker_main or context.forcetrigger then return { @@ -3481,7 +3822,13 @@ local red_fourty = { mult = 20, mult_mod = 2 }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, demicoloncompat = true, + perishable_compat = true, blueprint_compat = true, pools = {["Food"] = true}, loc_vars = function(self, q, card) @@ -3530,7 +3877,13 @@ local promotion = { mult = 20, mult_mod = 2 }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, demicoloncompat = true, + perishable_compat = true, blueprint_compat = true, calculate = function(self, card, context) if (context.end_of_round and not context.individual and not context.repetition) or context.forcetrigger then @@ -3568,8 +3921,14 @@ local offbrand = { mult = 6, dollars = 6 }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, pools = {["Food"] = true}, demicoloncompat = true, + perishable_compat = true, blueprint_compat = true, loc_vars = function(self, q, card) return { @@ -3607,8 +3966,14 @@ local girldinner = { mult = 3, chips = 40 }, - pools = {["Food"] = true}, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + pools = {["Food"] = true}, demicoloncompat = true, + perishable_compat = true, blueprint_compat = true, loc_vars = function(self, q, card) return { @@ -3632,7 +3997,7 @@ local girldinner = { end, entr_credits = { idea = { - "casknows" + "cassknows" } } } @@ -3650,7 +4015,13 @@ local recycling_bin = { mult = 0, mult_mod = 1 }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, demicoloncompat = true, + perishable_compat = true, blueprint_compat = true, loc_vars = function(self, q, card) return { @@ -3700,8 +4071,14 @@ local gold_bar = { dollars = 8, dollars_mod = 1 }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, pools = {["Food"] = true}, demicoloncompat = true, + perishable_compat = true, blueprint_compat = true, loc_vars = function(self, q, card) return { @@ -3742,7 +4119,13 @@ local scribbled_joker = { config = { chips = 60 }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, demicoloncompat = true, + perishable_compat = true, blueprint_compat = true, loc_vars = function(self, q, card) return { @@ -3784,6 +4167,13 @@ local jokers_against_humanity = { chips = 15, mult = 2 }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + perishable_compat = true, + blueprint_compat = true, demicoloncompat = true, blueprint_compat = true, loc_vars = function(self, q, card) @@ -3823,12 +4213,17 @@ local blind_collectible_pack = { object_type = "Joker", key = "blind_collectible_pack", rarity = 1, - cost = 6, - eternal_compat = true, + cost = 6, pos = {x = 3, y = 10}, atlas = "jokers", demicoloncompat = true, + perishable_compat = true, blueprint_compat = true, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, calculate = function(self, card, context) if context.selling_self or context.forcetrigger then if G.GAME.consumeable_buffer + #G.consumeables.cards < G.consumeables.config.card_limit then @@ -3862,10 +4257,16 @@ local prayer_card = { pos = {x = 4, y = 10}, atlas = "jokers", demicoloncompat = true, + perishable_compat = true, blueprint_compat = true, config = { amount = 100 }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, calculate = function(self, card, context) if context.setting_blind or context.forcetrigger then card.gone = false @@ -3903,6 +4304,11 @@ local desert = { asc = 0, asc_mod = 0.05 }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, calculate = function(self, card, context) if context.before and #G.play.cards == 1 then SMODS.scale_card(card, { @@ -3937,10 +4343,15 @@ local rugpull = { pos = {x = 6, y = 10}, atlas = "jokers", demicoloncompat = true, - blueprint_compat = true, + perishable_compat = true, config = { multiplier = 1.25 }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, loc_vars = function(self, q, card) return { vars = {card.ability.multiplier} @@ -3958,11 +4369,18 @@ local grape_juice = { pos = {x = 7, y = 10}, atlas = "jokers", demicoloncompat = true, - blueprint_compat = true, config = { left = 3, left_mod = 1 }, + dependencies = { + items = { + "set_entr_actives", + } + }, + pools = { + Food = true + }, loc_vars = function(self, q, card) return { vars = {card.ability.left, card.ability.left_mod} @@ -3992,10 +4410,16 @@ local petrichor = { pos = {x = 8, y = 10}, atlas = "jokers", demicoloncompat = true, + perishable_compat = true, blueprint_compat = true, config = { chips = 25 }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, loc_vars = function(self, q, card) return { vars = {card.ability.chips} @@ -4020,7 +4444,13 @@ local otherworldly_joker = { pos = {x = 9, y = 10}, atlas = "jokers", demicoloncompat = true, + perishable_compat = true, blueprint_compat = true, + dependencies = { + items = { + "set_entr_inversions", + } + }, calculate = function(self, card, context) if (context.skipping_booster) or context.forcetrigger then if G.GAME.consumeable_buffer + #G.consumeables.cards < G.consumeables.config.card_limit then @@ -4055,7 +4485,13 @@ local error_joker = { pos = {x = 0, y = 11}, atlas = "jokers", demicoloncompat = true, + perishable_compat = true, blueprint_compat = true, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, } local thirteen_of_stars = { @@ -4069,6 +4505,11 @@ local thirteen_of_stars = { atlas = "jokers", demicoloncompat = true, blueprint_compat = true, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, calculate = function(self, card, context) if (context.joker_main) or context.forcetrigger then local text = G.FUNCS.get_poker_hand_info(G.play.cards) @@ -4091,11 +4532,17 @@ local diode = { pos = {x = 2, y = 11}, atlas = "jokers", demicoloncompat = true, + perishable_compat = true, blueprint_compat = true, config = { mult = 6, chips = 40 }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, calculate = function(self, card, context) if context.after then card.ability.blue = not card.ability.blue @@ -4132,11 +4579,17 @@ local prismatic_shard = { soul_pos = {x = 0, y = 1}, atlas = "prismatic_shard", demicoloncompat = true, + perishable_compat = true, blueprint_compat = true, config = { mult = 2, - chips = 10, - plus_asc = 0.25 + chips = 8, + plus_asc = 0.15 + }, + dependencies = { + items = { + "set_entr_misc_jokers", + } }, calculate = function(self, card, context) if (context.individual and context.cardarea == G.play) or context.forcetrigger then @@ -4157,6 +4610,2205 @@ 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 + if not v.original_mod or v.demicoloncompat then + if v.key ~= "m_wild" then + enhs[#enhs+1] = v.key + end + end + end + return pseudorandom_element(enhs, pseudoseed("entr_chameleon_enh")) +end + +local chameleon = { + order = 80, + object_type = "Joker", + key = "chameleon", + rarity = 1, + cost = 6, + eternal_compat = true, + pos = {x = 9, y = 11}, + atlas = "jokers", + demicoloncompat = true, + perishable_compat = true, + blueprint_compat = true, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + calculate = function(self, card, context) + if context.joker_main then + local rand = Entropy.get_chameleon() + return Entropy.trigger_enhancement(rand) + end + end, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.mult, + card.ability.chips, + card.ability.plus_asc + } + } + end, + entr_credits = { + art = {"LFMoth"} + } +} + +local thanatophobia = { + order = 81, + object_type = "Joker", + key = "thanatophobia", + rarity = 1, + cost = 7, + eternal_compat = true, + pos = {x = 0, y = 12}, + atlas = "jokers", + demicoloncompat = true, + perishable_compat = true, + blueprint_compat = true, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + calculate = function(self, card, context) + if context.joker_main or context.forcetrigger then + if G.GAME.accumulated_sell_value then + return { + mult = G.GAME.accumulated_sell_value + } + end + end + end, + loc_vars = function(self, q, card) + return { + vars = { + G.GAME.accumulated_sell_value or 0 + } + } + end, + entr_credits = { + art = {"LFMoth"} + } +} + +local start_dissolveref = Card.start_dissolve +function Card:start_dissolve(...) + if self.config and self.config.center and self.config.center.set == "Joker" and G.jokers then + G.GAME.accumulated_sell_value = (G.GAME.accumulated_sell_value or 0) + self.sell_cost / 2 + end + return start_dissolveref(self, ...) +end + +local destroy_cardsref = SMODS.destroy_cards +function SMODS.destroy_cards(c, ...) + if c.config and c.config.center and c.config.center.set == "Joker" and G.jokers then + G.GAME.accumulated_sell_value = (G.GAME.accumulated_sell_value or 0) + c.sell_cost / 2 + end + return destroy_cardsref(c, ...) +end + +local redkey = { + order = 82, + object_type = "Joker", + key = "redkey", + rarity = 2, + cost = 8, + eternal_compat = true, + pos = {x = 3, y = 12}, + atlas = "jokers", + demicoloncompat = true, + config = { + left = 1, + left_mod = 1 + }, + dependencies = { + items = { + "set_entr_actives", + "bl_entr_red" + } + }, + loc_vars = function(self, q, card) + return { + vars = {card.ability.left, card.ability.left_mod} + } + end, + can_use = function(self, card) return to_big(card.ability.left) > to_big(0) and not G.GAME.round_resets.red_room and G.blind_select end, + use = function(self, card) + card.ability.left = card.ability.left - 1 + G.GAME.round_resets.red_room = true + G.GAME.round_resets.blind_states['Red'] = "Select" + if G.blind_select then + G.blind_select:remove() + G.blind_prompt_box:remove() + G.STATE_COMPLETE = false + 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 + 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, +} + +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", + key = "polaroid", + rarity = 3, + cost = 10, + eternal_compat = true, + pos = {x = 3, y = 11}, + atlas = "jokers", + demicoloncompat = true, + perishable_compat = true, + blueprint_compat = true, + config = { + left = 1, + left_mod = 1, + immutable = { + target = -1 + } + }, + dependencies = { + items = { + "set_entr_actives", + } + }, + can_use = function(self, card) return #Entropy.GetHighlightedCards({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) + for i, v in pairs(cards) do + card.ability.immutable.target = v.sort_id + end + card:juice_up() + play_sound("entr_polaroid") + end, + loc_vars = function(self, q, card) + local other_joker = G.jokers and Entropy.get_by_sortid(card.ability.immutable.target) + local compatible = other_joker and other_joker ~= card and other_joker.config.center.blueprint_compat + local main_end = { + { + n = G.UIT.C, + config = { align = "bm", minh = 0.4 }, + nodes = { + { + n = G.UIT.C, + config = { + ref_table = card, + align = "m", + colour = compatible and mix_colours(G.C.GREEN, G.C.JOKER_GREY, 0.8) + or mix_colours(G.C.RED, G.C.JOKER_GREY, 0.8), + r = 0.05, + padding = 0.06, + }, + nodes = { + { + n = G.UIT.T, + config = { + text = " " + .. (compatible and localize { type = 'name_text', set = other_joker.config.center.set, key = other_joker.config.center.key } or localize("k_incompatible")) + .. " ", + colour = G.C.UI.TEXT_LIGHT, + scale = 0.32 * 0.8, + }, + }, + }, + }, + }, + }, + } + return { + vars = { + card.ability.left, + card.ability.left_mod + }, + main_end = main_end + } + end, + 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 + if (card.ability.immutable.target or -1) > -1 then + local target = Entropy.get_by_sortid(card.ability.immutable.target) + if target then + local ret = SMODS.blueprint_effect(card, target, context) + return ret + end + end + end, +} + +function Entropy.overclock(v, card) + if v.config.center.use or v.ability.consumeable then + if v.ability.consumeable then + v.ability.cry_multiuse = v.ability.cry_multiuse or 1 + SMODS.scale_card(v, { + ref_table = v.ability, + ref_value = "cry_multiuse", + scalar_table = card.ability, + scalar_value = "uses_mod", + scaling_message = {message = "+"..number_format(card.ability.uses_mod)} + }) + elseif v.ability.left and v.ability.left_mod then + SMODS.scale_card(v, { + ref_table = v.ability, + ref_value = "left", + scalar_table = card.ability, + scalar_value = "uses_mod", + scaling_message = {message = "+"..number_format(card.ability.uses_mod)} + }) + end + end +end + +local car_battery = { + order = 84, + object_type = "Joker", + key = "car_battery", + rarity = 2, + cost = 6, + eternal_compat = true, + pos = {x = 4, y = 11}, + atlas = "jokers", + demicoloncompat = true, + perishable_compat = true, + blueprint_compat = true, + config = { + uses_mod = 1 + }, + dependencies = { + items = { + "set_entr_actives", + } + }, + calculate = function(self, card, context) + if (context.end_of_round and not context.individual and G.GAME.blind_on_deck == "Boss" and not context.repetition) or context.forcetrigger then + for i, v in pairs(G.jokers.cards) do + Entropy.overclock(v, card) + end + for i, v in pairs(G.consumeables.cards) do + Entropy.overclock(v, card) + end + end + end, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.uses_mod + } + } + end +} + +local chair = { + order = 85, + object_type = "Joker", + key = "chair", + rarity = 2, + cost = 6, + eternal_compat = true, + pos = {x = 5, y = 11}, + atlas = "jokers", + demicoloncompat = true, + perishable_compat = true, + blueprint_compat = true, + config = { + uses_mod = 1 + }, + dependencies = { + items = { + "set_entr_misc_jokers", + "e_entr_freaky" + } + }, + calculate = function(self, card, context) + if (context.before and context.scoring_name == "Three of a Kind") then + if #context.scoring_hand > 2 then + context.scoring_hand[3]:set_edition("e_entr_freaky") + end + end + end, + loc_vars = function(self, q, card) + q[#q+1] = G.P_CENTERS.e_entr_freaky + end +} + +local captcha = { + order = 86, + object_type = "Joker", + key = "captcha", + rarity = 2, + cost = 8, + eternal_compat = true, + pos = {x = 6, y = 11}, + atlas = "jokers", + demicoloncompat = true, + config = { + left = 1, + left_mod = 1 + }, + dependencies = { + items = { + "set_entr_actives", + } + }, + can_use = function(self, card) return G.hand and #G.hand.cards > 0 and card.ability.left > 0 end, + use = function(self, card) + card.ability.left = card.ability.left - 1 + local cards = {} + for i, v in pairs(G.hand.cards) do + 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())) + end) + card:juice_up() + end, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.left, + card.ability.left_mod + }, + } + end, + 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, +} + +function Card:redeem_deck() + if self.ability.set == "Back" or self.ability.set == "Sleeve" then + 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 })) + + G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.5, func = function() + G.FUNCS.buy_deckorsleeve{ + config = { + ref_table = self + } + } + return true end })) + + end +end + +local deck_enlargment_pills = { + order = 87, + object_type = "Joker", + key = "deck_enlargement_pills", + rarity = 3, + cost = 10, + pos = {x = 2, y = 12}, + atlas = "jokers", + demicoloncompat = true, + config = { + rounds = 2, + max_rounds = 2 + }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.max_rounds, + card.ability.rounds + } + } + end, + 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 + card.ability.rounds = card.ability.rounds - 1 + if to_big(card.ability.rounds) <= to_big(0) then + card.ability.rounds = 0 + if not card.ability.juiced then + local eval = function(card) return true end + juice_card_until(card, eval, true) + card.ability.juiced = true + end + end + if not context.forcetrigger then + return { + message = to_big(card.ability.rounds) > to_big(0) and number_format(card.ability.max_rounds - card.ability.rounds).."/"..number_format(card.ability.max_rounds) + or localize("k_active_ex") + } + end + end + if (context.selling_self and to_big(card.ability.rounds) <= to_big(0) and not context.blueprint) or context.forcetrigger then + 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 = create_card("RedeemableBacks", G.play, nil, nil, nil, nil, nil, "entr_large_deck") + if card.config.center.key == "j_joker" then + card:set_ability(G.P_CENTERS.b_red) + end + card:add_to_deck() + area:emplace(card) + card.cost = 0 + card:redeem_deck() + return true + end + }) + return nil, true + end + end, +} + +local photocopy = { + order = 88, + object_type = "Joker", + key = "photocopy", + rarity = 2, + cost = 7, + eternal_compat = true, + perishable_compat = true, + pos = {x = 8, y = 11}, + atlas = "jokers", + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, +} + +function Entropy.most_common_card() + local ranks = {} + local suits = {} + for i, v in pairs(G.playing_cards) do + ranks[v.base.value] = (ranks[v.base.value] or 0) + 1 + suits[v.base.suit] = (suits[v.base.suit] or 0) + 1 + end + local r = {} + local s = {} + for i, v in pairs(ranks) do r[#r+1] = {rank = i, num = v} end + for i, v in pairs(suits) do s[#s+1] = {suit = i, num = v} end + table.sort(r, function(a, b) return a.num > b.num end) + table.sort(s, function(a, b) return a.num > b.num end) + return { + id = r[1].rank, + suit = s[1].suit + } +end + +SMODS.Booster:take_ownership_by_kind("Standard", { + create_card = function(self, card, i) + local key + if pseudorandom("entr_rare_standard") < 0.003 or Entropy.has_rune("rune_entr_oss") then + if Entropy.has_rune("rune_entr_oss") then + Entropy.has_rune("rune_entr_oss").triggered = true + end + calculate_runes({generate_rare_consumable = true}) + key = "m_entr_ethereal" + end + card = create_card((pseudorandom(pseudoseed('stdset'..G.GAME.round_resets.ante)) > 0.6) and "Enhanced" or "Base", G.pack_cards, nil, nil, nil, true, key, 'sta') + if key then + card:set_ability(G.P_CENTERS[key]) + end + local edition_rate = 2 + local edition = poll_edition('standard_edition'..G.GAME.round_resets.ante, edition_rate, true) + card:set_edition(edition) + card:set_seal(SMODS.poll_seal({mod = 10}), true, true) + if next(SMODS.find_card("j_entr_photocopy")) and i == 1 then + local most_common = Entropy.most_common_card() + SMODS.change_base(card, most_common.suit, most_common.id) + end + return card + end +}) + +local enlightenment = { + order = 89, + object_type = "Joker", + key = "enlightenment", + rarity = 2, + cost = 6, + eternal_compat = true, + pos = {x = 1, y = 12}, + atlas = "jokers", + entr_credits = { + art = {"LFMoth"} + }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, +} + +local black_rose_green_sun = { + order = 90, + object_type = "Joker", + key = "black_rose_green_sun", + rarity = 1, + cost = 5, + eternal_compat = true, + perishable_compat = true, + blueprint_compat = true, + pos = {x = 6, y = 12}, + atlas = "jokers", + config = { + asc_pow = 0.05 + }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + demicoloncompat = true, + calculate = function(self, card, context) + if (context.individual and context.cardarea == G.hand and (context.other_card:is_suit("Spades") or context.other_card:is_suit("Clubs")) and not context.end_of_round) or context.forcetrigger then + return { + plus_asc = card.ability.asc_pow + } + end + end, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.asc_pow + } + } + end +} + + +local jack_off = { + order = 91, + object_type = "Joker", + key = "jack_off", + rarity = 1, + cost = 7, + eternal_compat = true, + perishable_compat = true, + blueprint_compat = true, + pos = {x = 6, y = 13}, + atlas = "jokers", + demicoloncompat = true, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + calculate = function(self, card, context) + if (context.individual and context.cardarea == G.play and (context.other_card:get_id() == SMODS.Ranks.Jack.id)) or context.forcetrigger then + local any_selected = nil + local _cards = {} + for _, playing_card in ipairs(G.hand.cards) do + if not playing_card.highlighted then + _cards[#_cards + 1] = playing_card + end + end + if G.hand.cards[1] then + local selected_card, card_index = pseudorandom_element(_cards, 'jacking_off') + if selected_card then + G.hand:add_to_highlighted(selected_card, true) + table.remove(_cards, card_index) + any_selected = true + play_sound('card1', 1) + end + end + if any_selected then G.FUNCS.discard_cards_from_highlighted(nil, true) end + end + end, + entr_credits = { + idea = {"cassknows"}, + art = {"LFMoth"} + } +} + +local fast_food = { + order = 92, + object_type = "Joker", + key = "fast_food", + rarity = 2, + cost = 7, + eternal_compat = true, + perishable_compat = true, + blueprint_compat = true, + pos = {x = 8, y = 14}, + atlas = "jokers", + loc_vars = function(self, q, card) + q[#q+1] = {set = "Other", key = "perishable", vars = {5, 5}} + end, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + demicoloncompat = true, + calculate = function(self, card, context) + if context.setting_blind or context.forcetrigger then + if G.GAME.joker_buffer + #G.jokers.cards < G.jokers.config.card_limit then + G.E_MANAGER:add_event(Event{ + func = function() + local ncard = SMODS.add_card{ + set = "Food", + area = G.jokers + } + ncard:set_perishable(true) + G.GAME.joker_buffer = 0 + return true + end + }) + G.GAME.joker_buffer = G.GAME.joker_buffer + 1 + return nil, true + end + end + end, +} + +local antipattern = { + order = 93, + object_type = "Joker", + key = "antipattern", + rarity = 2, + cost = 7, + eternal_compat = true, + blueprint_compat = true, + pos = {x = 4, y = 12}, + atlas = "jokers", + loc_vars = function(self, q, card) + local hands = {} + for i, v in pairs(G.handlist) do + hands[#hands+1] = {} + end + for i, v in pairs(card.ability.hand_pairs) do + hands[v[1]] = hands[v[1]] or {} + hands[v[1]][#hands[v[1]]+1] = v[2] + end + for i, v in pairs(hands) do + local vars = {localize(i, "poker_hands")} + if #v > 0 then + for i, v2 in pairs(v) do + vars[#vars+1] = localize(v2, "poker_hands") + end + for i = #vars, 12 do + vars[#vars+1] = "" + end + q[#q+1] = {set = "Other", key = "antipattern_pair", vars = vars} + end + end + return { + vars = { + card.ability.xchips_mod, + card.ability.xchips + } + } + end, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + config = { + hand_pairs = { + + }, + last_hand = "", + xchips = 1, + xchips_mod = 0.1 + }, + demicoloncompat = true, + calculate = function(self, card, context) + if context.joker_main or context.forcetrigger then + if card.ability.last_hand ~= "" then + local pair = {card.ability.last_hand, context.scoring_name} + local scale = true + for i, v in pairs(card.ability.hand_pairs) do + if v[1] == pair[1] and v[2] == pair[2] then scale = false; break end + end + if scale then + SMODS.scale_card(card, { + ref_table = card.ability, + ref_value = "xchips", + scalar_value = "xchips_mod" + }) + card.ability.hand_pairs[#card.ability.hand_pairs+1] = pair + end + end + card.ability.last_hand = context.scoring_name + return { + xchips = card.ability.xchips + } + end + end, + entr_credits = { + idea = {"cassknows"} + } +} + +local spiral_of_ants = { + order = 94, + object_type = "Joker", + key = "spiral_of_ants", + rarity = 1, + cost = 5, + eternal_compat = true, + perishable_compat = true, + blueprint_compat = true, + pos = {x = 5, y = 12}, + atlas = "jokers", + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.chips_mod, + card.ability.chips + } + } + end, + config = { + last_card = 9999, + chips = 0, + chips_mod = 50 + }, + demicoloncompat = true, + calculate = function(self, card, context) + if context.joker_main or context.forcetrigger then + if #G.play.cards < card.ability.last_card then + SMODS.scale_card(card, { + ref_table = card.ability, + ref_value = "chips", + scalar_value = "chips_mod" + }) + card.ability.last_card = #G.play.cards + else + card.ability.last_card = 9999 + card.ability.chips = 1 + card_eval_status_text( + card, + "extra", + nil, + nil, + nil, + { message = localize("k_reset") } + ) + end + return { + chips = card.ability.chips + } + end + end, + entr_credits = { + idea = {"cassknows"} + } +} + +local fork_bomb = { + order = 95, + object_type = "Joker", + key = "fork_bomb", + rarity = 1, + cost = 2, + eternal_compat = true, + perishable_compat = true, + blueprint_compat = true, + pos = {x = 7, y = 12}, + atlas = "jokers", + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + demicoloncompat = true, + calculate = function(self, card, context) + if context.setting_blind or context.forcetrigger then + if #SMODS.find_card("j_entr_fork_bomb") + (G.GAME.fork_bomb_buffer or 0) < 16 then + G.GAME.fork_bomb_buffer = (G.GAME.fork_bomb_buffer or 0) + 1 + G.E_MANAGER:add_event(Event{ + func = function() + local card2 = copy_card(card) + card.area:emplace(card2) + card2:add_to_deck() + G.GAME.fork_bomb_buffer = 0 + return true + end + }) + return { + message = ":(){ :|: & };:" + } + end + end + end, + entr_credits = { + idea = {"cassknows"} + }, +} + +local solar_panel = { + order = 96, + object_type = "Joker", + key = "solar_panel", + rarity = 1, + cost = 6, + eternal_compat = true, + perishable_compat = true, + blueprint_compat = true, + pos = {x = 8, y = 12}, + atlas = "jokers", + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + config = { + money = 4 + }, + loc_vars = function(self, q, card) + q[#q+1] = G.P_CENTERS.e_entr_sunny + q[#q+1] = G.P_CENTERS.m_entr_radiant + return { + vars = { + card.ability.money + } + } + end, + demicoloncompat = true, + calculate = function(self, card, context) + if (context.discard and context.other_card:is_sunny()) or context.forcetrigger then + return { + dollars = card.ability.money + } + end + end, +} + +local kintsugi = { + order = 97, + object_type = "Joker", + key = "kintsugi", + rarity = 1, + cost = 6, + eternal_compat = true, + perishable_compat = true, + pos = {x = 0, y = 13}, + atlas = "jokers", + dependencies = { + items = { + "set_entr_misc_jokers", + "m_entr_ceramic" + } + }, + loc_vars = function(self, q, card) + q[#q+1] = G.P_CENTERS.m_entr_ceramic + q[#q+1] = G.P_CENTERS.m_gold + end, + in_pool = function() + local any_ceramic + for i, v in pairs(G.playing_cards) do + if v.config.center.key == "m_entr_ceramic" then + return true + end + end + end +} + +local blooming_crimson = { + order = 98, + object_type = "Joker", + key = "blooming_crimson", + rarity = 2, + cost = 6, + eternal_compat = true, + pos = {x = 0, y = 2}, + soul_pos = {x = 1, y = 1}, + atlas = "prismatic_shard", + demicoloncompat = true, + perishable_compat = true, + blueprint_compat = true, + config = { + xmult = 1.15, + xchips = 1.15, + asc = 1.05 + }, + dependencies = { + items = { + "set_entr_misc_jokers", + "j_entr_prismatic_shard" + } + }, + calculate = function(self, card, context) + if (context.individual and context.cardarea == G.play) or context.forcetrigger then + local etype = pseudorandom_element({"xmult", "xchips", "asc"}, pseudoseed("blooming_crimson")) + return { + [etype] = card.ability[etype] + } + end + end, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.xmult, + card.ability.xchips, + card.ability.asc + } + } + end, + in_pool = function() + return G.GAME.pool_flags.prismatic_shard_gone + end +} + +local overpump = { + order = 99, + object_type = "Joker", + key = "overpump", + rarity = 2, + cost = 8, + eternal_compat = true, + pos = {x = 1, y = 14}, + atlas = "jokers", + demicoloncompat = true, + blueprint_compat = true, + config = { + xmult = 0, + xmult_mod = 1.5, + played = {}, + }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + calculate = function(self, card, context) + if context.joker_main or context.forcetrigger then + if not card.ability.played[context.scoring_name] then + SMODS.scale_card(card, { + ref_table = card.ability, + ref_value = "xmult", + scalar_value = "xmult_mod" + }) + card.ability.played[context.scoring_name] = true + end + if context.forcetrigger or G.GAME.current_round.hands_left <= 0 then + return { + xmult = card.ability.xmult + } + end + end + if context.end_of_round and not context.individual and not context.blueprint and not context.repetition then + card.ability.played = {} + card.ability.xmult = 0 + return { + message = localize("k_reset") + } + end + end, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.xmult, + card.ability.xmult_mod + } + } + end, + entr_credits = { + idea = {"cassknows"} + }, +} + +local shadow_crystal = { + order = 100, + object_type = "Joker", + key = "shadow_crystal", + rarity = 2, + cost = 7, + eternal_compat = true, + pos = {x = 1, y = 13}, + atlas = "jokers", + perishable_compat = true, + blueprint_compat = true, + config = { + extra = { + odds = 2 + } + }, + dependencies = { + items = { + "set_entr_inversions", + } + }, + loc_vars = function(self, q, card) + local numerator, denominator = SMODS.get_probability_vars(card, 1, card.ability.extra.odds) + return { + vars = { + numerator, + denominator + } + } + end +} + +local miracle_berry = { + order = 101, + object_type = "Joker", + key = "miracle_berry", + rarity = 2, + cost = 7, + eternal_compat = true, + pos = {x = 2, y = 13}, + atlas = "jokers", + pools = { + Food = true + }, + perishable_compat = true, + blueprint_compat = true, + config = { + uses = 4 + }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.uses + } + } + end, + calculate = function(self, card, context) + if context.get_consumable_type and not card.getting_sliced and not context.hidden and context.set ~= "Spectral" and context.set ~= "Omen" then + local pool = G.P_CENTER_POOLS[context.set] + local inverted = pool and pool[1] and Entropy.is_inverted(pool[1]) + if G.GAME.modifiers.entr_twisted then inverted = not inverted end + SMODS.scale_card(card, { + ref_table = card.ability, + ref_value = "uses", + scalar_table = {mod = 1}, + scalar_value = "mod", + operation = "-" + }) + if card.ability.uses <= 0 then + SMODS.destroy_cards(card, nil, nil, true) + card.getting_sliced = true + end + return { + set = inverted and "Omen" or "Spectral" + } + end + end, +} + +local meridian = { + order = 102, + object_type = "Joker", + key = "meridian", + rarity = 1, + cost = 5, + eternal_compat = true, + pos = {x = 3, y = 13}, + atlas = "jokers", + perishable_compat = true, + blueprint_compat = true, + config = { + multiplier = 5 + }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + loc_vars = function(self, q, card) + local index = 0 + for i, v in pairs(card.area.cards) do + if v == card then index = i break end + end + return { + vars = { + card.ability.multiplier * index + } + } + 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 + return { + mult = card.ability.multiplier * index + } + end + end, +} + +local mango = { + order = 103, + object_type = "Joker", + key = "mango", + rarity = 2, + cost = 7, + eternal_compat = true, + pos = {x = 4, y = 13}, + atlas = "jokers", + pools = { + Food = true + }, + perishable_compat = true, + blueprint_compat = true, + config = { + hands_left = 5 + }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.hands_left + } + } + end, + calculate = function(self, card, context) + if context.before and not card.getting_sliced then + local card2 = G.play.cards[1] + if card2 then + G.playing_card = (G.playing_card and G.playing_card + 1) or 1 + local _card = copy_card(card2, nil, nil, G.playing_card) + _card:add_to_deck() + G.deck.config.card_limit = G.deck.config.card_limit + 1 + table.insert(G.playing_cards, _card) + G.hand:emplace(_card) + _card.states.visible = nil + + G.E_MANAGER:add_event(Event({ + func = function() + _card:start_materialize() + return true + end + })) + 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) + card.getting_sliced = true + end + return { + message = card.getting_sliced and localize('k_eaten_ex') or localize("k_copied_ex"), + playing_cards_created = {_card} + } + end + end + end, +} + +local kitchenjokers = { + order = 104, + object_type = "Joker", + key = "kitchenjokers", + rarity = 2, + cost = 5, + eternal_compat = true, + pos = {x = 5, y = 13}, + atlas = "jokers", + config = { + off_perc = 0.25, + }, + perishable_compat = true, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + loc_vars = function(self, q, card) + q[#q+1] = G.P_CENTERS.e_entr_lowres + return { + vars = { + card.ability.off_perc, + } + } + end, + entr_credits = { + idea = {"cassknows", "crabus"} + } +} + +local hash_miner = { + order = 105, + object_type = "Joker", + key = "hash_miner", + rarity = 2, + cost = 7, + eternal_compat = true, + pos = {x = 9, y = 13}, + atlas = "jokers", + config = { + destroy_odds = 2, + revive_odds = 10, + per_corrupted = 2, + extra_value = 0 + }, + perishable_compat = true, + blueprint_compat = true, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + loc_vars = function(self, q, card) + local corrupted = 0 + for i, v in pairs(G.GAME.badarg or {}) do + corrupted = corrupted + 1 + end + local n, d = SMODS.get_probability_vars(card, 1, card.ability.destroy_odds, "hash_miner") + local n2, d2 = SMODS.get_probability_vars(card, 1, card.ability.revive_odds, "hash_miner") + return { + vars = { + n, d, + n2, d2, + card.ability.per_corrupted, + } + } + end, + calculate = function(self, card, context) + if context.after then + if SMODS.pseudorandom_probability(card, 'hash_miner', 1, card.ability.destroy_odds) then + if not G.GAME.badarg then G.GAME.badarg = {} end + G.GAME.badarg[context.scoring_name] = true + card_eval_status_text( + card, + "extra", + nil, + nil, + nil, + { message = localize("k_corrupted_ex"), colour = G.C.RED } + ) + end + for i, v in pairs(G.GAME.badarg or {}) do + if SMODS.pseudorandom_probability(card, 'hash_miner', 1, card.ability.revive_odds) then + G.GAME.badarg[i] = nil + card_eval_status_text( + card, + "extra", + nil, + nil, + nil, + { message = localize("k_recovered_ex"), colour = G.C.RED } + ) + end + end + end + if context.end_of_round and not context.individual and not context.blueprint and not context.repetition then + local corrupted = 0 + for i, v in pairs(G.GAME.badarg or {}) do + corrupted = corrupted + 1 + end + SMODS.scale_card(card, { + ref_table = card.ability, + ref_value = "extra_value", + scalar_value = "per_corrupted", + operation = function(ref_table, ref_value, initial, change) + ref_table[ref_value] = initial + (corrupted)*change + end, + scaling_message = { + message = localize('k_val_up'), + colour = G.C.MONEY + } + }) + card:set_cost() + end + end, + entr_credits = { + idea = {"cassknows"}, + art = {"candycanearter"} + } +} + +local bell_curve = { + order = 107, + object_type = "Joker", + key = "bell_curve", + rarity = 1, + cost = 6, + eternal_compat = true, + pos = {x = 7, y = 13}, + atlas = "jokers", + dependencies = { + items = { + "set_entr_misc_jokers" + } + }, + perishable_compat = true, + blueprint_compat = true, + demicoloncompat = true, + calculate = function(self, card, context) + if context.repetition and context.cardarea == G.play then + local index = 0 + for i, v in pairs(G.play.cards) do + if v == context.other_card then index = i; break end + end + if index ~= 1 and index ~= #G.play.cards then + return { + repetitions = 1 + } + end + end + end, +} + +local pineapple = { + order = 108, + object_type = "Joker", + key = "pineapple", + rarity = 2, + cost = 7, + eternal_compat = true, + pos = {x = 0, y = 15}, + atlas = "jokers", + dependencies = { + items = { + "set_entr_misc_jokers" + } + }, + config = { + rounds = 5 + }, + pools = {Food = true}, + perishable_compat = true, + blueprint_compat = true, + demicoloncompat = true, + calculate = function(self, card, context) + if (context.end_of_round and not context.individual and not context.blueprint and not context.repetition) or context.forcetrigger then + local rcard = pseudorandom_element(G.playing_cards, "entr_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) + return { + message = localize('k_eaten_ex'), + colour = G.C.FILTER + } + else + card.ability.rounds = card.ability.rounds - 1 + end + end + return { + message = localize("k_upgrade_ex") + } + end + end, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.rounds + } + } + end +} + +local rubber_ball = { + order = 109, + object_type = "Joker", + key = "rubber_ball", + rarity = 1, + cost = 4, + eternal_compat = true, + pos = {x = 6, y = 14}, + atlas = "jokers", + dependencies = { + items = { + "set_entr_misc_jokers" + } + }, + config = { + odds = 3, + }, + perishable_compat = true, + loc_vars = function(self, q, card) + local n, d = SMODS.get_probability_vars(card, 1, card.ability.odds, "rubber_ball") + return { + vars = { + n, d + } + } + end +} + +local stand_arrow = { + order = 110, + object_type = "Joker", + key = "stand_arrow", + rarity = 2, + cost = 8, + eternal_compat = true, + pos = {x = 8, y = 13}, + atlas = "jokers", + config = { + left = 1, + left_mod = 1, + odds = 2, + }, + dependencies = { + items = { + "set_entr_actives", + "e_entr_sunny", + "e_entr_solar", + "e_entr_freaky", + "e_entr_fractured" + } + }, + perishable_compat = true, + loc_vars = function(self, q, card) + local options = { + {key ="e_polychrome", weight = 1}, + {key ="e_negative", weight = 1}, + {key ="e_entr_sunny", weight = 1}, + {key ="e_entr_solar", weight = 1}, + {key ="e_entr_freaky", weight = 1}, + {key ="e_entr_fractured", weight = 1}, + } + for i, v in pairs(options) do + q[#q+1] = G.P_CENTERS[v] + end + local n, d = SMODS.get_probability_vars(card, 1, card.ability.odds, "stand_arrow") + return { + vars = { + card.ability.left, + card.ability.left_mod, + n, d + } + } + 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 num = Entropy.GetHighlightedCards({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 + end + if not no_ed then return end + 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 + local cards = Entropy.GetHighlightedCards({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() + elseif not v.edition then + local edition = SMODS.poll_edition({ + options = { + "e_polychrome", + "e_negative", + "e_entr_sunny", + "e_entr_solar", + "e_entr_freaky", + "e_entr_fractured" + }, + guaranteed = true + }) + v:set_edition(edition) + end + end + end +} + +local dancer = { + order = 111, + object_type = "Joker", + key = "dancer", + rarity = 1, + cost = 5, + eternal_compat = true, + pos = {x = 3, y = 15}, + atlas = "jokers", + config = { + csl = 2, + discards = 1 + }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + perishable_compat = true, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.csl, + -card.ability.discards + } + } + end, + demicoloncompat = true, + calculate = function(self, card, context) + if context.forcetrigger then + Entropy.ChangeFullCSL(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) + 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) + G.GAME.round_resets.discards = G.GAME.round_resets.discards + card.ability.discards + ease_discard(card.ability.discards) + end, + entr_credits = { + idea = {"cassknows"}, + art = {"candycanearter"} + } +} + +local kings_scepter = { + order = 112, + object_type = "Joker", + key = "kings_scepter", + rarity = 2, + cost = 6, + eternal_compat = true, + pos = {x = 2, y = 15}, + atlas = "jokers", + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + perishable_compat = true, + calculate = function(self, card, context) + if context.destroy_card and context.destroy_card.debuff and context.destroy_card.area == G.play then + return {remove = not SMODS.is_eternal(context.destroy_card)} + end + end, + entr_credits = { + idea = {"cassknows"} + } +} + +local monkeys_paw = { + order = 113, + object_type = "Joker", + key = "monkeys_paw", + atlas = "jokers", + rarity = 2, + cost = 6, + eternal_compat = true, + pos = {x = 1, y = 15}, + config = { + left = 3, + }, + dependencies = { + items = { + "set_entr_actives", + "set_entr_inversions", + "set_entr_runes" + } + }, + perishable_compat = true, + loc_vars = function(self, q, card) + q[#q+1] = {set = "Other", key = "eternal"} + return { + vars = { + card.ability.left, + } + } + end, + can_use = function(self, card) + return to_big(card.ability.left) > to_big(0) and #G.consumeables.cards < G.consumeables.config.card_limit + end, + use = function(self, card) + card.ability.left = card.ability.left - 1 + SMODS.add_card { + set = "Pact", + area = G.consumeables, + key_append = "entr_monkeys_paw" + }.ability.eternal = true + 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", + key = "magic_skin", + rarity = 3, + cost = 6, + eternal_compat = true, + pos = {x = 0, y = 14}, + atlas = "jokers", + config = { + left = 0, + left_mod = 1, + cards = 2 + }, + dependencies = { + items = { + "set_entr_actives", + } + }, + perishable_compat = true, + loc_vars = function(self, q, card) + local loc = G.STATE == G.STATES.SMODS_BOOSTER_OPENED and SMODS.OPENED_BOOSTER and Entropy.kind_to_set(SMODS.OPENED_BOOSTER.config.center.kind) + if loc == "ERROR" or (SMODS.OPENED_BOOSTER and not Entropy.kind_to_set(SMODS.OPENED_BOOSTER.config.center.kind) and SMODS.OPENED_BOOSTER.config.center.create_card) then + loc = localize(SMODS.OPENED_BOOSTER.config.center.group_key) + end + if G.STATE ~= G.STATES.SMODS_BOOSTER_OPENED or (SMODS.OPENED_BOOSTER and (not Entropy.kind_to_set(SMODS.OPENED_BOOSTER.config.center.kind) and not SMODS.OPENED_BOOSTER.config.center.create_card)) or SMODS.OPENED_BOOSTER.config.center.kind == "Standard" then + loc = "none" + end + loc = loc or "ERROR" + if SMODS.OPENED_BOOSTER and SMODS.OPENED_BOOSTER.config.center.no_magic_skin then + loc = "none" + end + return { + vars = { + card.ability.left, + localize("k_"..string.lower(loc)), + card.ability.cards, + card.ability.left_mod + } + } + end, + can_use = function(self, card) + if SMODS.OPENED_BOOSTER and SMODS.OPENED_BOOSTER.config and SMODS.OPENED_BOOSTER.config.center.kind == "Standard" then + return + end + return to_big(card.ability.left) > to_big(0) and G.STATE == G.STATES.SMODS_BOOSTER_OPENED and (Entropy.kind_to_set(SMODS.OPENED_BOOSTER.config.center.kind) or SMODS.OPENED_BOOSTER.config.center.create_card) + end, + use = function(self, card) + card.ability.left = card.ability.left - 1 + G.GAME.magic_skin_prob = (G.GAME.magic_skin_prob or 0) + 0.02 + for i = 1, card.ability.cards do + if SMODS.OPENED_BOOSTER and not SMODS.OPENED_BOOSTER.config.center.no_magic_skin then + local k = SMODS.OPENED_BOOSTER and Entropy.kind_to_set(SMODS.OPENED_BOOSTER.config.center.kind, true) + if not k and SMODS.OPENED_BOOSTER.config.center.create_card and type(SMODS.OPENED_BOOSTER.config.center.create_card) == "function" then + local _card_to_spawn = SMODS.OPENED_BOOSTER.config.center:create_card(SMODS.OPENED_BOOSTER, i) + local spawned + if type((_card_to_spawn or {}).is) == 'function' and _card_to_spawn:is(Card) then + spawned = _card_to_spawn + else + spawned = SMODS.create_card(_card_to_spawn) + end + if spawned.config.center.set == "Joker" then + G.jokers:emplace(spawned) + else + G.consumeables:emplace(spawned) + end + spawned:set_edition("e_negative") + else + if k == "Planet" or k == "Tarot" then + local rune + local rare_rune + if pseudorandom("entr_generate_rune") < 0.06 then rune = true end + if G.GAME.entr_diviner then + if pseudorandom("entr_generate_rune") < 0.06 then rune = true end + end + if rune then + k = "Rune" + end + end + SMODS.add_card { + set = k or "Joker", + area = k == "Twisted" and G.consumeables or nil, + key_append = "entr_magic_skin", + edition = "e_negative" + } + end + end + end + end, + 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, + entr_credits = {idea = {"Athebyne"}} +} + +local lambda_calculus = { + order = 115, + object_type = "Joker", + key = "lambda_calculus", + rarity = 2, + cost = 6, + eternal_compat = true, + pos = {x = 2, y = 14}, + atlas = "jokers", + config = { + chips = 0 + }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + perishable_compat = true, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.chips + } + } + end, + calculate = function(self, card, context) + if context.joker_main then + local chips = card.ability.chips + card.ability.chips = 0 + return { + chips = chips + } + end + if context.post_trigger and context.other_card ~= card then + local change = Entropy.gather_values(context.other_card) + if to_big(change) > to_big(0) then + card.ability.chips = card.ability.chips + change + card_eval_status_text( + card, + "extra", + nil, + nil, + nil, + { message = number_format(card.ability.chips), colour = G.C.BLUE } + ) + end + end + 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", + key = "elderberries", + rarity = 2, + cost = 6, + pos = {x = 3, y = 14}, + atlas = "jokers", + config = { + spectrals = 2 + }, + dependencies = { + items = { + "set_entr_misc_jokers", + } + }, + pools = {Food = true}, + perishable_compat = true, + blueprint_compat = true, + demicoloncompat = true, + loc_vars = function(self, q, card) + return { + vars = { + math.min(card.ability.spectrals, 100) + } + } + end, + calculate = function(self, card, context) + if context.selling_self or context.forcetrigger then + 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 + for i = 1, card.ability.spectrals do + local card = create_card("Spectral", G.play, nil, nil, nil, nil, nil, "entr_large_deck") + if card.config.center.key == "j_joker" then + card:set_ability(G.P_CENTERS.b_aura) + end + card:add_to_deck() + area:emplace(card) + + local top_dynatext = nil + + G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.4, func = function() + top_dynatext = DynaText({string = localize{type = 'name_text', set = card.config.center.set, key = card.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}) + card:juice_up(0.3, 0.5) + play_sound('card1') + play_sound('coin1') + card.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 = card} + } + + return true 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) + return true end })) + G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.5, func = function() + card.children.top_disp:remove() + 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 + G.E_MANAGER:add_event(Event{ + trigger = "after", + func = function() + card:start_dissolve() + return true + end + }) + end + return true + end + }) + return nil, true + end + end, +} + +local blood_orange = { + order = 118, + object_type = "Joker", + key = "blood_orange", + rarity = 2, + cost = 6, + eternal_compat = true, + pos = {x = 7, y = 14}, + atlas = "jokers", + config = { + cards = 10 + }, + dependencies = { + items = { + "set_entr_misc_jokers", + "set_entr_inversions" + } + }, + pools = {Food = true}, + perishable_compat = true, + blueprint_compat = true, + demicoloncompat = true, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.cards + } + } + end, + calculate = function(self, card, context) + if context.remove_playing_cards or context.forcetrigger then + local eated + for i, v in pairs(context.removed or {true}) do + 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) + eated = true + end + G.E_MANAGER:add_event(Event{ + func = function() + G.GAME.consumeable_buffer = 0 + SMODS.add_card{ + set = "Twisted", + area = G.consumeables, + key_append = "entr_blood_orange" + } + return true + end + }) + G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1 + card_eval_status_text( + card, + "extra", + nil, + nil, + nil, + { message = eated and localize("k_eaten_ex") or localize("k_plus_inverted"), colour = G.C.RED } + ) + end + end + end + end, +} + +local false_vacuum_collapse = { + order = 119, + object_type = "Joker", + key = "false_vacuum_collapse", + rarity = 2, + cost = 8, + eternal_compat = true, + pos = {x = 9, y = 14}, + atlas = "jokers", + config = { + cards = 10 + }, + dependencies = { + items = { + "set_entr_misc_jokers", + "set_entr_inversions" + } + }, + perishable_compat = true, + blueprint_compat = true, + demicoloncompat = true, + loc_vars = function(self, q, card) + return { + vars = { + card.ability.cards + } + } + end, + calculate = function(self, card, context) + if context.before then + card.area:remove_card(card) + G.play:emplace(card, "front") + 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() + card.area:remove_card(card) + G.jokers:emplace(card, "front") + return true + end + }) + return true + end + }) + end + if context.individual and context.card == card then + local d + for i = 2, #G.play.cards do + if G.play.cards[i] and not G.play.cards[i].getting_sucked and G.play.cards[i] ~= card and not d then + G.play.cards[i].getting_sucked = true + SMODS.destroy_cards(G.play.cards[i]) + d = true + end + end + end + end, +} + + +local eval_card_ref = eval_card +function eval_card(card, ...) + if card and not card.getting_sucked then + return eval_card_ref(card, ...) + end +end + +local mark_of_the_beast = { + order = 120, + object_type = "Joker", + key = "mark_of_the_beast", + rarity = 2, + cost = 8, + eternal_compat = true, + pos = {x = 4, y = 14}, + atlas = "jokers", + config = { + cards = 10 + }, + dependencies = { + items = { + "set_entr_misc_jokers", + "set_entr_inversions" + } + }, + perishable_compat = true, + blueprint_compat = true, + demicoloncompat = true, + loc_vars = function(self, q, card) + q[#q+1] = G.P_CENTERS.p_entr_twisted_pack_mega + end, + calculate = function(self, card, context) + if context.starting_shop or context.forcetrigger then + G.E_MANAGER:add_event(Event{ + func = function() + card:juice_up() + return true + end + }) + local card = Card(G.shop_booster.T.x + G.shop_booster.T.w/2, + G.shop_booster.T.y, G.CARD_W*1.27, G.CARD_H*1.27, G.P_CARDS.empty, G.P_CENTERS["p_entr_twisted_pack_mega"], {bypass_discovery_center = true, bypass_discovery_ui = true}) + card.ability.beast_mark = true + create_shop_card_ui(card, 'Booster', G.shop_booster) + card.ability.booster_pos = #G.shop_booster.cards + 1 + card:start_materialize() + card.cost = 0 + G.shop_booster:emplace(card) + return nil, true + end + if (context.reroll_shop and Entropy.has_rune("rune_entr_perthro")) then + G.E_MANAGER:add_event(Event{ + trigger = "after", + func = function() + G.E_MANAGER:add_event(Event{ + trigger = "after", + func = function() + card:juice_up() + local card = Card(G.shop_booster.T.x + G.shop_booster.T.w/2, + G.shop_booster.T.y, G.CARD_W*1.27, G.CARD_H*1.27, G.P_CARDS.empty, G.P_CENTERS["p_entr_twisted_pack_mega"], {bypass_discovery_center = true, bypass_discovery_ui = true}) + card.ability.beast_mark = true + create_shop_card_ui(card, 'Booster', G.shop_booster) + card.ability.booster_pos = #G.shop_booster.cards + 1 + card:start_materialize() + card.cost = 0 + G.shop_booster:emplace(card) + return true + end}) + return true + end + }) + end + end, +} + return { items = { surreal, @@ -4207,6 +6859,8 @@ return { slipstream, cass, crabus, + hexa, + grahkon, sandpaper, purple_joker, chalice_of_blood, @@ -4245,6 +6899,45 @@ return { error_joker, thirteen_of_stars, diode, - prismatic_shard + prismatic_shard, + chameleon, + thanatophobia, + redkey, + polaroid, + car_battery, + chair, + captcha, + deck_enlargment_pills, + photocopy, + enlightenment, + black_rose_green_sun, + jack_off, + fast_food, + antipattern, + spiral_of_ants, + fork_bomb, + solar_panel, + kintsugi, + blooming_crimson, + overpump, + shadow_crystal, + miracle_berry, + meridian, + mango, + kitchenjokers, + hash_miner, + bell_curve, + pineapple, + rubber_ball, + stand_arrow, + dancer, + kings_scepter, + monkeys_paw, + magic_skin, + lambda_calculus, + elderberries, + blood_orange, + false_vacuum_collapse, + mark_of_the_beast } } diff --git a/items/jokers/rlegendary_jokers.lua b/items/jokers/rlegendary_jokers.lua index 9983fe43..2f0f69c8 100644 --- a/items/jokers/rlegendary_jokers.lua +++ b/items/jokers/rlegendary_jokers.lua @@ -270,7 +270,7 @@ local entropy_card = { key = "entropy_card", config = { x_asc_mod = 1, - num = 913 --sun + num = 1091 --sun }, dependencies = { items = { @@ -382,6 +382,399 @@ local kciroy = { end end } + +local ybur = { + order = 405, + object_type = "Joker", + key = "ybur", + config = { + e_chips = 1, + e_chips_mod = 0.05, + active = true + }, + dependencies = { + items = { + "set_entr_inversions" + } + }, + rarity = "entr_reverse_legendary", + cost = 20, + blueprint_compat = true, + eternal_compat = true, + pos = {x=2, y=0}, + soul_pos = {x = 1, y = 0}, + atlas = "ruby_atlas", + demicoloncompat=true, + loc_vars = function(self, info_queue, card) + return { + vars = { + card.ability.e_chips, + card.ability.e_chips_mod, + card.ability.active and localize("k_active") or localize("k_inactive") + }, + } + end, + calculate = function (self, card, context) + if context.game_over and card.ability.active then + for i, card in pairs(SMODS.find_card("j_entr_ybur")) do + card.ability.active = false + SMODS.scale_card(card, { + 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 } + } + }) + end + return { + saved = localize(pseudorandom("ybur") < 0.5 and "k_saved_heroic" or "k_saved_just") + } + end + if context.joker_main or context.forcetrigger then + if to_big(card.ability.e_chips) ~= to_big(1) then + return { + echips = card.ability.e_chips, + } + end + end + if context.skip_blind and not context.blueprint and not context.repetition then + card.ability.active = false + return { + message = localize("k_inactive") + } + end + if (context.end_of_round and not context.individual and not context.repetition) then + if G.GAME.blind_on_deck == "Boss" then + card.ability.active = true + return { + message = localize("k_reset") + } + end + end + end, + pronouns = "she_her", +} + +local zelavi = { + order = 406, + object_type = "Joker", + key = "zelavi", + config = { + x_chips = 1, + x_chips_mod = 0.2 + }, + dependencies = { + items = { + "set_entr_inversions" + } + }, + entr_credits = { + art = {"Lil. Mr. Slipstream"} + }, + rarity = "entr_reverse_legendary", + cost = 20, + blueprint_compat = true, + eternal_compat = true, + pos = {x=2, y=1}, + soul_pos = {x = 3, y = 1}, + atlas = "ruby_atlas", + demicoloncompat=true, + loc_vars = function(self, info_queue, card) + info_queue[#info_queue+1] = G.P_CENTERS.p_spectral_mega_1 + return { + vars = { + card.ability.x_chips, + card.ability.x_chips_mod + }, + } + end, + calculate = function (self, card, context) + if context.open_booster and context.card.config.center.kind == "Spectral" then + SMODS.scale_card(card, { + ref_table = card.ability, + ref_value = "x_chips", + scalar_value = "x_chips_mod", + }) + end + if context.joker_main or context.forcetrigger then + if to_big(card.ability.x_chips) ~= to_big(1) then + return { + xchips = card.ability.x_chips, + } + end + end + if context.starting_shop then + if G.shop_booster.cards[1] then + G.shop_booster.cards[1]:set_ability(G.P_CENTERS.p_spectral_mega_1) + end + end + end, + 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", + key = "ssac", + dependencies = { + items = { + "set_entr_inversions" + } + }, + rarity = "entr_reverse_legendary", + cost = 20, + eternal_compat = true, + pos = {x=2, y=2}, + soul_pos = {x = 1, y = 2}, + atlas = "ruby_atlas", + demicoloncompat=true, + entr_credits = { + art = {"Lil. Mr. Slipstream"} + }, + loc_vars = function(self, info_queue, card) + return { + vars = { + math.ceil(Entropy.missing_ranks() / 2) + }, + } + end, + 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 {} + 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}) + 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}) + 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 + end + for i, v in pairs(j_r or {}) do + SMODS.calculate_individual_effect(j_r, card, i, v, false) + end + for i, v in pairs(c_r) do + SMODS.calculate_individual_effect(j_r, card, i, v, false) + end + end + end + end, + entr_credits = { + idea = {"cassknows"} + }, + 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"} + }, + 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", + key = "axeh", + config = { + asc_mod = 3 + }, + dependencies = { + items = { + "set_entr_inversions" + } + }, + rarity = "entr_reverse_legendary", + cost = 20, + blueprint_compat = true, + eternal_compat = true, + pos = {x=2, y=4}, + soul_pos = {x = 1, y = 4}, + atlas = "ruby_atlas", + demicoloncompat=true, + entr_credits = { + art = {"HexaCryonic"} + }, + loc_vars = function(self, info_queue, card) + info_queue[#info_queue+1] = G.P_CENTERS.j_entr_sunny_joker + return { + vars = { + card.ability.asc_mod + }, + } + end, + add_to_deck = function(self, card, from_debuff) + if not from_debuff then + SMODS.add_card{ + area = G.jokers, + key = "j_entr_sunny_joker" + } + end + end, + pronouns = "she_her", +} + +local nokharg = { + order = 410, + object_type = "Joker", + key = "nokharg", + dependencies = { + items = { + "set_entr_inversions", + "set_entr_actives" + } + }, + rarity = "entr_reverse_legendary", + cost = 20, + blueprint_compat = true, + eternal_compat = true, + pos = {x=0, y=1}, + soul_pos = {x = 1, y = 0}, + atlas = "grahkon_atlas", + demicoloncompat=true, + entr_credits = { + art = {"Lil. Mr. Slipstream"} + }, + config = { + blind_size = 1, + blind_size_mod = 0.1 + }, + loc_vars = function(self, info_queue, card) + info_queue[#info_queue+1] = {key = 'e_negative_playing_card', set = 'Edition', config = {extra = 1}} + return { + vars = { + card.ability.blind_size, + card.ability.blind_size_mod + } + } + end, + can_use = function(self, card) + local cards = Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select) + return #cards > 0 + end, + use = function(self, card) + Entropy.FlipThen(Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.select), function(c) + c:set_edition("e_negative") + SMODS.scale_card(card, { + ref_table = card.ability, + ref_value = "blind_size", + scalar_value = "blind_size_mod" + }) + end) + end, + calculate = function(self, card, context) + if (context.setting_blind and not context.blueprint and not card.getting_sliced) or context.forcetrigger then + G.GAME.blind.chips = G.GAME.blind.chips * card.ability.blind_size + G.GAME.blind.chip_text = number_format(G.GAME.blind.chips) + G.HUD_blind:recalculate() + end + end, + pronouns = "he_him", +} + return { items = { oekrep, @@ -389,6 +782,12 @@ return { teluobirt, oinac, kciroy, + 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/misc/achievements.lua b/items/misc/achievements.lua index a83038c3..c6f41d54 100644 --- a/items/misc/achievements.lua +++ b/items/misc/achievements.lua @@ -140,23 +140,23 @@ if (SMODS.Mods["Cryptid"] or {}).can_load then end end, } - - local acheros = { - object_type = "Achievement", - key = "acheros", - order = 999, - bypass_all_unlocked = true, - atlas = "entr_achievements", - pos = {x=1,y=1}, - hidden_text = true, - unlock_condition = function(self, args) - if args.type == "beat_ee" then - return true - end - end, - } end +local acheros = { + object_type = "Achievement", + key = "acheros", + order = 999, + bypass_all_unlocked = true, + atlas = "entr_achievements", + pos = {x=1,y=1}, + hidden_text = true, + unlock_condition = function(self, args) + if args.type == "beat_ee" then + return true + end + end, +} + return { items = { here_comes_the_sun, diff --git a/items/misc/atlases.lua b/items/misc/atlases.lua index fe01e021..7f412910 100644 --- a/items/misc/atlases.lua +++ b/items/misc/atlases.lua @@ -145,6 +145,12 @@ SMODS.Atlas { px = 71, py = 95 } +SMODS.Atlas { + key = 'grahkon_atlas', + path = 'grahkon.png', + px = 71, + py = 95 +} SMODS.Atlas { key = "modicon", path = "entr_icon.png", @@ -233,7 +239,6 @@ SMODS.Atlas { py = 95 } - SMODS.Atlas { key = 'consumables2', path = 'second_consumables.png', @@ -273,4 +278,20 @@ SMODS.Atlas { path = 'prismatic_shard.png', px = 71, py = 95 -} \ No newline at end of file +} + +SMODS.Atlas { + key = 'crossmod_tags', + path = 'crossmod/crossmod_tags.png', + px = 34, + py = 34 +} + +if (SMODS.Mods.vallkarri or {}).can_load then + SMODS.Atlas { + key = "aes", + path = "crossmod/valk_aesthetics.png", + px = 71, + py = 95, + } +end \ No newline at end of file diff --git a/items/misc/blind_tokens.lua b/items/misc/blind_tokens.lua index 53bfadd4..9ee502a0 100644 --- a/items/misc/blind_tokens.lua +++ b/items/misc/blind_tokens.lua @@ -129,10 +129,15 @@ function Entropy.RegisterBlinds() entr_credits = v.entr_credits, cry_credits = v.cry_credits, set_sprites = function(self, card, front) - card.children.center.sprite_pos = {x=self.blpos.x or 0, y=self.blpos.y or 0} - card.children.center.atlas = G.ANIMATION_ATLAS[self.blatlas] or G.ANIMATION_ATLAS["blind_chips"] - card.children.center:reset() - card.children.center.atlas = G.ANIMATION_ATLAS[self.blatlas] or G.ANIMATION_ATLAS["blind_chips"] + if self.blatlas and G.ANIMATION_ATLAS[self.blatlas] and self.blatlas ~= "blind_chips" then + card.children.center.sprite_pos = {x=self.blpos.x or 0, y=self.blpos.y or 0} + card.children.center.atlas = G.ANIMATION_ATLAS[self.blatlas] + card.children.center:reset() + card.children.center.atlas = G.ANIMATION_ATLAS[self.blatlas] + else + card.children.center.atlas = G.ANIMATION_ATLAS["blind_chips"] + card.children.center:set_sprite_pos({x=self.blpos.x or 0, y=self.blpos.y or 0}) + end end, set_badges = function(self, card, badges) if v.original_mod then badges[#badges+1] = create_badge(v.original_mod.name, v.original_mod.badge_colour, G.C.WHITE, 1 ) end diff --git a/items/misc/blinds.lua b/items/misc/blinds.lua index e6ac8d1d..e10426f7 100644 --- a/items/misc/blinds.lua +++ b/items/misc/blinds.lua @@ -17,7 +17,7 @@ local sun = { min = 3, max = 10, showdown = true, - } + }, } local baracuda ={ @@ -48,7 +48,7 @@ local baracuda ={ then return {remove=true} end - end + end, } local dawn = { @@ -91,7 +91,7 @@ local dawn = { disable = function(self) G.hand:change_size(-self.config.extra.hand_size) G.FUNCS.draw_from_deck_to_hand(-self.config.extra.hand_size) - end + end, } local orchard = { @@ -157,12 +157,12 @@ 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) 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] end - if G.hand.cards[i+1] and pseudorandom("citrine") < (Entropy.IsEE() and 0.2 or 0.5) 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] @@ -203,6 +203,12 @@ local comet = { -- bl_mf_psychic_dx = true, -- bl_mf_hook_dx = true, -- } + +SMODS.Shader({ + key="entropic_vortex", + path="splash.fs" +}) + local phase1 = { dependencies = { items = { @@ -210,11 +216,11 @@ local phase1 = { } }, object_type = "Blind", - order = 663, + order = 6663, key = "endless_entropy_phase_one", pos = { x = 0, y = 6 }, atlas = "blinds", - boss_colour = HEX("6d1414"), + boss_colour = HEX("000000"), mult=2, no_ee = true, dollars = 8, @@ -244,6 +250,35 @@ local phase1 = { })) end end, + set_blind = function() + 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}) + 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.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 + end } local phase2 = { @@ -253,11 +288,11 @@ local phase2 = { } }, object_type = "Blind", - order = 664, + order = 6664, key = "endless_entropy_phase_three", pos = { x = 0, y = 7 }, atlas = "blinds", - boss_colour = HEX("6d1414"), + boss_colour = HEX("000000"), mult=3, no_ee = true, dollars = 8, @@ -274,8 +309,34 @@ local phase2 = { collection_loc_vars = function(self) return { vars = { localize("entr_nadir_placeholder") } } end, - setting_blind = function() - G.GAME.round_resets.lost = false + set_blind = function() + 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}) + 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.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 end } @@ -286,11 +347,11 @@ local phase3 = { } }, object_type = "Blind", - order = 665, + order = 6665, key = "endless_entropy_phase_two", pos = { x = 0, y = 8 }, atlas = "blinds", - boss_colour = HEX("6d1414"), + boss_colour = HEX("000000"), mult=1, no_ee = true, dollars = 8, @@ -299,9 +360,6 @@ local phase3 = { max = 32, }, no_disable=true, - exponent = { - 1, 1.25 - }, in_pool = function() return false end, next_phase = "bl_entr_endless_entropy_phase_four", calculate = function(self, blind, context) @@ -315,10 +373,88 @@ local phase3 = { math.max(0, G.GAME.round_resets.discards + G.GAME.round_bonus.discards) - G.GAME.current_round.discards_left ) G.FUNCS.draw_from_discard_to_deck() + G.jokers:load(G.GAME.EE_JOKERS) + G.GAME.hands = copy_table(G.GAME.EE_HANDS) + G.GAME.EE_HANDS = nil + G.GAME.EE_JOKERS = nil end end, set_blind = function() - G.GAME.blind.chips = G.GAME.blind.chips ^ 1.25 + Entropy.ee_taunt("entr_tq_ee_half") + G.GAME.EE_JOKERS = G.jokers:save() + G.GAME.EE_HANDS = copy_table(G.GAME.hands) + for i, v in pairs(G.GAME.hands) do + v.mult = v.s_mult + v.chips = v.s_chips + v.level = 1 + G.GAME.hands[i] = v + end + G.E_MANAGER:add_event(Event{ + func = function() + for i, v in pairs(G.jokers.cards) do + local c = v + G.E_MANAGER:add_event(Event{ + trigger = "after", + delay = 0.15 * G.SETTINGS.GAMESPEED, + func = function() + c:juice_up() + c.debuff = true + play_sound("multhit1") + return true + end + }) + end + G.E_MANAGER:add_event(Event{ + trigger = "after", + delay = 0.4 * G.SETTINGS.GAMESPEED, + func = function() + for i, v in pairs(G.jokers.cards) do + v:start_dissolve() + end + play_sound("glass6") + return true + end + }) + G.E_MANAGER:add_event(Event{ + trigger = "after", + func = function() + save_run() + return true + end + }) + return true + end + }) + G.GAME.blind.chips = 10000 + G.GAME.blind.chip_text = number_format(G.GAME.blind.chips) + G.HUD_blind:recalculate() + 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}) + 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.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 end } @@ -329,11 +465,11 @@ local phase4 = { } }, object_type = "Blind", - order = 666, + order = 6666, key = "endless_entropy_phase_four", pos = { x = 0, y = 9 }, atlas = "blinds", - boss_colour = HEX("6d1414"), + boss_colour = HEX("000000"), mult=1, no_ee = true, dollars = 8, @@ -343,7 +479,7 @@ local phase4 = { max = 32, }, exponent = { - 1, 2.5 + 1, 1.5 }, in_pool = function() return false end, calculate = function(self, blind, context) @@ -355,7 +491,6 @@ local phase4 = { end end, set_blind = function(self, reset, silent) - G.GAME.blind.chips = G.GAME.blind.chips ^ 2.5 for k, _ in pairs(Entropy.GetEEBlinds()) do s = G.P_BLINDS[k] if s.set_blind then @@ -444,6 +579,33 @@ local phase4 = { end end end + 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}) + 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.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 end, defeat = function(self, silent) for k, _ in pairs(Entropy.GetEEBlinds()) do @@ -460,6 +622,20 @@ local phase4 = { end G.GAME.EEBuildup = false check_for_unlock({ type = "beat_ee" }) + + G.GAME.EE_R = true + G.E_MANAGER:add_event(Event{ + blocking = false, + blockable = false, + func = function() + if not G.GAME.EE_FADE or not G.SPLASH_EE then return end + if G.GAME.EE_FADE <= 0 and G.SPLASH_EE then + G.SPLASH_EE:remove() + G.SPLASH_EE = nil + return true + end + end + }) end, press_play = function(self) for k, _ in pairs(Entropy.GetEEBlinds()) do @@ -785,7 +961,7 @@ local alabaster = { G.jokers.cards[i].config.cry_multiply = (G.jokers.cards[i].config.cry_multiply or 1) * 0.95 end end - end + end, } local highlight_ref = Card.highlight @@ -813,6 +989,69 @@ if not (SMODS.Mods["Cryptid"] or {}).can_load then end 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 + ease_background_colour{new_colour = HEX("5f5f5f"), contrast = 3} + else + return ease_bg_cref(state, blind_override) + end +end + +local ease_bg_c_ref = ease_background_colour +function ease_background_colour(tbl,...) + if G.GAME.EEBuildup and not Entropy.IsEE() then + ease_bg_c_ref{new_colour = HEX("5f5f5f"), contrast = 3} + else + return ease_bg_c_ref(tbl,...) + end +end + +SMODS.Shader({ + key="brimstone", + path="brimstone.fs" +}) + +SMODS.Shader({ + key="brimstone_badge", + path="brimstone_badge.fs" +}) + +local void = { + dependencies = { + items = { + "set_entr_inversions" + } + }, + object_type = "Blind", + order = 6660, + key = "void", + pos = { x = 0, y = 14 }, + atlas = "blinds", + boss_colour = HEX("494949"), + mult=1, + dollars = 0, + no_collection = true, + in_pool = function(self) return false end +} + +local rr = { + dependencies = { + items = { + "set_entr_inversions" + } + }, + object_type = "Blind", + order = 4200, + key = "red", + pos = { x = 0, y = 0 }, + atlas = "blinds", + boss_colour = HEX("FF0000"), + mult=1, + dollars = 3, + in_pool = function(self) return false end +} + return { items = { sun, @@ -825,6 +1064,8 @@ return { phase3, phase4, endless_entropy, - alabaster + alabaster, + void, + rr } } \ No newline at end of file diff --git a/items/misc/boosters.lua b/items/misc/boosters.lua index 88390467..8f61e5a3 100644 --- a/items/misc/boosters.lua +++ b/items/misc/boosters.lua @@ -5,7 +5,7 @@ local pack = { } }, object_type = "Booster", - order = -1003, + order = -1006, key = "twisted_pack_normal", set = "Booster", config = { extra = 3, choose = 1 }, @@ -27,7 +27,6 @@ local pack = { get_weight = function() return 0.5 * (G.GAME.entr_alt and 2 or 1) end, - hidden = true, kind = "Inverted", create_card = function (self, card, i) return create_inverted_card() @@ -46,7 +45,15 @@ local pack = { G.consumeables:emplace(ccard) end, }, + entr_credits = {art = {"LFMoth"}} } + +local pack2 = copy_table(pack) +pack2.pos.y = 1 +pack2.entr_credits = {art = {"Lil. Mr. Slipstream"}} +pack2.key = "twisted_pack_normal_2" +pack2.order = -1005 + local jumbo = { dependencies = { items = { @@ -54,7 +61,7 @@ local jumbo = { } }, object_type = "Booster", - order = -1002, + order = -1004, key = "twisted_pack_jumbo", set = "Booster", config = { extra = 5, choose = 1 }, @@ -73,7 +80,6 @@ local jumbo = { group_key = "k_inverted_pack", cost = 6, draw_hand = true, - hidden = true, kind = "Inverted", get_weight = function() return 0.3 * (G.GAME.entr_alt and 2.25 or 1) @@ -95,7 +101,14 @@ local jumbo = { G.consumeables:emplace(ccard) end, }, + entr_credits = {art = {"Lil. Mr. Slipstream"}} } +local jumbo2 = copy_table(jumbo) +jumbo2.pos.y = 1 +jumbo2.entr_credits = {art = {"Binary"}} +jumbo2.key = "twisted_pack_jumbo_2" +jumbo2.order = -1003 + local mega = { dependencies = { items = { @@ -103,7 +116,7 @@ local mega = { } }, object_type = "Booster", - order = -1001, + order = -1002, key = "twisted_pack_mega", set = "Booster", config = { extra = 5, choose = 2 }, @@ -125,7 +138,6 @@ local mega = { get_weight = function() return 0.2 * (G.GAME.entr_alt and 2.5 or 1) end, - hidden = true, kind = "Inverted", create_card = function (self, card, i) return create_inverted_card() @@ -144,7 +156,12 @@ local mega = { G.consumeables:emplace(ccard) end, }, + entr_credits = {art = {"Lil. Mr. Slipstream"}} } +local mega2 = copy_table(mega) +mega2.pos.y = 1 +mega2.key = "twisted_pack_mega_2" +mega2.order = -1001 function Entropy.get_rare_inversion(seed) local pool = {} @@ -254,8 +271,11 @@ local voucher = { return { items = { pack, + pack2, jumbo, + jumbo2, mega, + mega2, voucher } } \ No newline at end of file diff --git a/items/misc/challenges.lua b/items/misc/challenges.lua index d619ae8a..be834715 100644 --- a/items/misc/challenges.lua +++ b/items/misc/challenges.lua @@ -78,13 +78,36 @@ 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 -end - -local set_abilityref = Card.set_ability -function Card:set_ability(center, initial, delay) - set_abilityref(self, center, initial, delay) - if (G.GAME.modifiers.entr_reverse_redeo or G.GAME.ReverseRedeo) and self.config.center.key == "j_cry_redeo" then - self.ability.extra.ante_reduction = -1 + if G.SPLASH_EE and not Entropy.IsEE() then + G.SPLASH_EE:remove() + G.SPLASH_EE = nil + end + if Entropy.IsEE() 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 + G.E_MANAGER:add_event(Event{ + trigger = "after", + blocking = false, + 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 = { + {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 end @@ -237,12 +260,136 @@ local hyperaccelerated_bongcloud_opening = { }, } +local paycheck_to_paycheck = { + object_type = "Challenge", + key = "paycheck_to_paycheck", + order = 4, + custom = { + {id = 'no_reward'}, + {id = 'no_extra_hand_money'}, + }, + jokers = { + { id = "j_entr_tenner", stickers = { "entr_aleph" } }, + { id = "j_credit_card", stickers = { "entr_aleph" } }, + { id = "j_entr_debit_card", stickers = { "entr_aleph" } }, + }, + consumeables = { + { id = "c_entr_strength", stickers = { "eternal" } }, + { id = "c_entr_dreams", stickers = { "eternal" } }, + }, + deck = { + type = "Challenge Deck", + }, +} + + +local variety_content = { + object_type = "Challenge", + key = "variety_content", + order = 5, + jokers = { + { id = "j_entr_spiral_of_ants", stickers = { "entr_aleph" } }, + { id = "j_entr_hash_miner", stickers = { "entr_aleph" } }, + { id = "j_obelisk", stickers = { "entr_aleph" } }, + { id = "j_entr_overpump", stickers = { "entr_aleph" } }, + { id = "j_entr_antipattern", stickers = { "entr_aleph" } }, + }, + consumeables = { + { id = "c_temperance", edition = "negative" }, + { id = "c_entr_statue" }, + { id = "c_entr_mason" }, + }, + deck = { + type = "Challenge Deck", + }, +} + + +local riffle_shuffle = { + object_type = "Challenge", + key = "riffle_shuffle", + order = 5, + jokers = { + { id = "j_entr_meridian", stickers = { "entr_aleph" } }, + { id = "j_entr_broadcast", stickers = { "entr_aleph" } }, + { id = "j_entr_roulette", stickers = { "entr_aleph" } }, + { id = "j_entr_crimson_flask", stickers = { "entr_aleph", "entr_pure" }, edition = "entr_lowres" }, + }, + consumeables = { + { id = "c_entr_ingwaz" }, + { id = "c_entr_loyalty" }, + }, + deck = { + type = "Challenge Deck", + }, +} + +local phantom_hand_syndrome = { + object_type = "Challenge", + key = "phantom_hand_syndrome", + order = 6, + rules = { + modifiers = { + {id = "discards", value = -32}, + } + }, + jokers = { + { id = "j_entr_jack_off", stickers = { "entr_aleph" } }, + { id = "j_entr_nucleotide", stickers = { "entr_aleph" } }, + { id = "j_castle", stickers = { "entr_aleph" } }, + { id = "j_selzer" }, + }, + consumeables = { + { id = "c_medium" }, + { id = "c_medium" }, + }, + deck = { + type = "Challenge Deck", + }, +} + +local eco_friendly = { + object_type = "Challenge", + key = "eco_friendly", + order = 7, + rules = { + custom = { + {id = 'no_reward'}, + {id = 'no_extra_hand_money'}, + {id = 'no_interest'} + }, + modifiers = { + {id = "dollars", value = 20}, + } + }, + jokers = { + { id = "j_entr_solar_panel", stickers = { "entr_aleph" } }, + { id = "j_entr_car_battery", stickers = { "entr_aleph" } }, + { id = "j_entr_recycling_bin", stickers = { "entr_aleph" } }, + }, + consumeables = { + { id = "c_entr_comet", stickers = { "eternal" } }, + { id = "c_entr_comet", stickers = { "eternal" } }, + { id = "c_entr_comet" }, + }, + vouchers = { + { id = "v_crystal_ball" }, + }, + deck = { + type = "Challenge Deck", + }, +} return { items = { lifelight, vesuvius, hyperaccelerated_bongcloud_opening, + paycheck_to_paycheck, + variety_content, + riffle_shuffle, + phantom_hand_syndrome, + eco_friendly, (SMODS.Mods["Cryptid"] or {}).can_load and hyperbolic_chamber or nil } } diff --git a/items/misc/consumable_types.lua b/items/misc/consumable_types.lua index 786ee5e5..93805c39 100644 --- a/items/misc/consumable_types.lua +++ b/items/misc/consumable_types.lua @@ -106,7 +106,7 @@ if SMODS.Mods.Cryptid and SMODS.Mods.Cryptid.can_load then shop_rate = 0.0, loc_txt = {}, default = "c_entr_memory_leak", - can_be_pulled = true, + can_be_pulled = "b_pull", }) SMODS.UndiscoveredSprite({ key = "Command", @@ -166,4 +166,22 @@ SMODS.UndiscoveredSprite({ pos = { x = 999, y = 999 }, px = 71, py = 95, +}) + +SMODS.ObjectType({ + key = "Food", + default = "c_gros_michel", + cards = {}, + inject = function(self) + SMODS.ObjectType.inject(self) + self:inject_card(G.P_CENTERS.j_gros_michel) + self:inject_card(G.P_CENTERS.j_egg) + self:inject_card(G.P_CENTERS.j_ice_cream) + self:inject_card(G.P_CENTERS.j_cavendish) + self:inject_card(G.P_CENTERS.j_turtle_bean) + self:inject_card(G.P_CENTERS.j_diet_cola) + self:inject_card(G.P_CENTERS.j_popcorn) + self:inject_card(G.P_CENTERS.j_ramen) + self:inject_card(G.P_CENTERS.j_selzer) + end, }) \ No newline at end of file diff --git a/items/misc/content_sets.lua b/items/misc/content_sets.lua index 2b4c9697..f9135dd2 100644 --- a/items/misc/content_sets.lua +++ b/items/misc/content_sets.lua @@ -35,7 +35,7 @@ SMODS.ContentSet({ cry_order = 2, }) -if SMODS.Mods.Cryptid and SMODS.Mods.Cryptid.can_load then +if (SMODS.Mods["Cryptid"] or SMODS.Mods["vallkarri"] or {}).can_load then SMODS.ContentSet({ key = "entropics", atlas = "exotic_jokers", @@ -86,4 +86,11 @@ SMODS.ContentSet({ atlas = "rune_atlas", pos = { x = 4, y = 1 }, --jera cry_order = 9, +}) + +SMODS.ContentSet({ + key = "actives", + atlas = "jokers", + pos = { x = 3, y = 11 }, + cry_order = 10, }) \ No newline at end of file diff --git a/items/misc/decks.lua b/items/misc/decks.lua index 9dfe4cc8..f4bbac76 100644 --- a/items/misc/decks.lua +++ b/items/misc/decks.lua @@ -13,6 +13,11 @@ local twisted = { atlas = "decks", apply = function() G.GAME.modifiers.entr_twisted = true + 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} + 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 } @@ -91,7 +96,10 @@ local ambisinister = { G.GAME.starting_params.joker_slots = G.GAME.starting_params.joker_slots + 3 Entropy.last_csl = nil Entropy.last_slots = nil - end + end, + entr_credits = { + idea = {"cassknows"} + }, } local butterfly = { @@ -107,7 +115,8 @@ local butterfly = { pos = { x = 4, y = 0 }, atlas = "decks", loc_vars = function() - return {vars = {G.GAME.probabilities.normal or 1}} + local n, d = SMODS.get_probability_vars(card, 1, 2, "entr_butterfly") + return {vars = {n, d}} end } @@ -123,6 +132,10 @@ local gemstone = { key = "gemstone", pos = { x = 6, y = 0 }, atlas = "decks", + loc_vars = function() + local n, d = SMODS.get_probability_vars(card, 1, 3, "entr_gemstone") + return {vars = {n, d1}} + end, calculate = function(self, back, context) if context.using_consumeable and context.consumeable.config.center.set ~= "Rune" then G.GAME.gemstone_amount = (G.GAME.gemstone_amount or 0) + 1 @@ -141,7 +154,7 @@ local gemstone = { end }) return { - message = "+1 "..localize("k_rune") + message = localize("k_plus_rune") } else return { @@ -151,6 +164,130 @@ local gemstone = { end end } +local update_ref = Card.update +function Card:update(dt, ...) + if self.ability.glitched_crown then + self.last_dt = self.last_dt or 0 + if not self.glitched_dt then + local soul_layer + for i, v in pairs(self.ability.glitched_crown) do + if G.P_CENTERS[v].soul_pos then soul_layer = true end + end + if soul_layer and not self.children.floating_sprite then + local _center = G.P_CENTERS[self.ability.glitched_crown[1]] + self.children.floating_sprite = Sprite(self.T.x, self.T.y, self.T.w, self.T.h, G.ASSET_ATLAS[_center[G.SETTINGS.colourblind_option and 'hc_atlas' or 'lc_atlas'] or _center.atlas or _center.set], self.config.center.soul_pos or {x=9999,y=9999}) + self.children.floating_sprite.role.draw_major = self + self.children.floating_sprite.states.hover.can = false + self.children.floating_sprite.states.click.can = false + end + end + self.glitched_dt = (self.glitched_dt or 0) + (G.TIMERS.REAL - self.last_dt) * 2.5 * (Entropy.config.corrupted_speed/100) + self.last_dt = G.TIMERS.REAL + if self.glitched_dt > 3 / #self.ability.glitched_crown then + self.glitched_dt = 0 + self.glitched_index = 1 + (self.glitched_index or 1) + if self.glitched_index > #self.ability.glitched_crown then self.glitched_index = 1 end + local _center = G.P_CENTERS[self.ability.glitched_crown[self.glitched_index]] + self.children.center.atlas = G.ASSET_ATLAS[(_center.atlas or (_center.set == 'Joker' or _center.consumeable or _center.set == 'Voucher') and _center.set) or 'centers'] + self.children.center:set_sprite_pos(_center.pos) + if self.children.floating_sprite then + self.children.floating_sprite.atlas = G.ASSET_ATLAS[_center[G.SETTINGS.colourblind_option and 'hc_atlas' or 'lc_atlas'] or _center.atlas or _center.set] + self.children.floating_sprite:set_sprite_pos(_center.soul_pos or {x=9999,y=9999}) + end + if self.states.hover.is then + self:stop_hover() + self:hover() + end + end + end + return update_ref(self, dt, ...) +end + +local generate_UIBox_ability_tableref = Card.generate_UIBox_ability_table +function Card:generate_UIBox_ability_table(vars_only) + if self.ability.glitched_crown and G.P_CENTERS[self.ability.glitched_crown[self.glitched_index]] then + local a = self.ability + local conf = self.config.center + local center = G.P_CENTERS[self.ability.glitched_crown[self.glitched_index]] + self.ability = center.config + self.config.center = center + self.ability.name = center.name + self.ability.set = center.set + local ret = generate_UIBox_ability_tableref(self, vars_only) + self.ability = a + self.config.center = conf + return ret + else + return generate_UIBox_ability_tableref(self, vars_only) + end +end + +local get_type_colourref = get_type_colour +function get_type_colour(_c, card) + if Entropy.IsEE() and card.debuff then + return Entropy.reverse_legendary_gradient + end + if card.ability and card.ability.glitched_crown and G.P_CENTERS[card.ability.glitched_crown[card.glitched_index]] then + return get_type_colourref(G.P_CENTERS[card.ability.glitched_crown[card.glitched_index]], card) + end + return get_type_colourref(_c, card) +end + +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 + e.config.colour = G.C.RED + e.config.button = 'use_card' + else + e.config.colour = G.C.UI.BACKGROUND_INACTIVE + e.config.button = nil + end + else + can_use_ref(e) + end +end + +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 + e.UIBox.states.visible = false + e.config.colour = G.C.UI.BACKGROUND_INACTIVE + e.config.button = nil + else + if e.config.ref_table.highlighted then + e.UIBox.states.visible = true + end + e.config.colour = G.C.SECONDARY_SET.Voucher + e.config.button = 'buy_from_shop' + end + else + buy_and_use_ref(e) + end +end + +local corrupted = { + object_type = "Back", + order = 7006, + dependencies = { + items = { + "set_entr_decks" + } + }, + config = { }, + key = "corrupted", + pos = { x = 7, y = 0 }, + atlas = "decks", + apply = function() + G.GAME.modifiers.glitched_items = (G.GAME.modifiers.glitched_items or 2) + 1 + end, + entr_credits = { + art = {"LFMoth"} + } +} if CardSleeves then CardSleeves.Sleeve { @@ -159,6 +296,11 @@ if CardSleeves then pos = { x = 0, y = 0 }, apply = function() G.GAME.modifiers.entr_twisted = true + 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} + G.ARGS.spin.real = (G.SETTINGS.reduced_motion and 0 or 1)*(G.GAME.entr_alt and 0.3 or -0.3) end } CardSleeves.Sleeve { @@ -220,9 +362,10 @@ if CardSleeves then apply = function() G.GAME.starting_params.joker_slots = G.GAME.starting_params.joker_slots - 2 end, - loc_vars = function() - return {vars = {G.GAME.probabilities.normal or 1}} - end + loc_vars = function() + local n, d = SMODS.get_probability_vars(card, 1, 2, "entr_butterfly") + return {vars = {n, d}} + end } CardSleeves.Sleeve { @@ -247,7 +390,7 @@ if CardSleeves then end }) return { - message = "+1 "..localize("k_rune") + message = localize("k_plus_rune") } else return { @@ -255,8 +398,21 @@ if CardSleeves then } end end + end, + loc_vars = function() + local n, d = SMODS.get_probability_vars(card, 1, 3, "entr_gemstone") + return {vars = {n, d}} end } + + CardSleeves.Sleeve { + key = "corrupted", + atlas = "sleeves", + pos = { x = 7, y = 0 }, + apply = function() + G.GAME.modifiers.glitched_items = (G.GAME.modifiers.glitched_items or 0) + 2 + end, + } end return { @@ -267,6 +423,7 @@ return { destiny, ambisinister, butterfly, - gemstone + gemstone, + corrupted } } \ No newline at end of file diff --git a/items/misc/editions.lua b/items/misc/editions.lua index a0c5c509..a5aaedcf 100644 --- a/items/misc/editions.lua +++ b/items/misc/editions.lua @@ -21,7 +21,7 @@ local solar = { "set_entr_misc" } }, - extra_cost = 10, + extra_cost = 6, in_shop = true, weight = 0.4, badge_color = HEX("fca849"), @@ -52,7 +52,7 @@ local solar = { end, entr_credits = { custom={key="shader",text="cassknows"} - } + }, } @@ -79,7 +79,7 @@ local fractured ={ "set_entr_misc" } }, - extra_cost = 10, + extra_cost = 8, in_shop = true, weight = 0.2, badge_color = HEX("fca849"), @@ -113,8 +113,9 @@ local fractured ={ end end, entr_credits = { - custom={key="shader",text="cassknows"} - } + custom={key="shader",text="cassknows"}, + idea = {"cassknows"} + }, } SMODS.Shader({ key="sunny", @@ -141,6 +142,7 @@ local sunny = { }, in_shop = true, weight = 0.8, + extra_cost = 2, badge_color = HEX("fca849"), disable_base_shader=true, loc_vars = function(self,q,card) @@ -195,7 +197,7 @@ local freaky = { "set_entr_misc" } }, - extra_cost = 18, + extra_cost = 6, in_shop = true, weight = 0.5, badge_color = HEX("fca849"), @@ -225,8 +227,9 @@ local freaky = { end end, entr_credits = { - custom={key="shader",text="cassknows"} - } + custom={key="shader",text="cassknows"}, + idea = {"cassknows"} + }, } if AurinkoAddons then @@ -301,7 +304,7 @@ local neon = { vol = 0.4, }, config = { - cost_fac = 0.5 + cost_fac = 0.9 }, dependencies = { items = { @@ -313,21 +316,21 @@ local neon = { badge_color = HEX("fca849"), disable_base_shader=true, loc_vars = function(self,q,card) - return {vars={card and card.edition and card.edition.cost_fac or 0.5}} + return {vars={card and card.edition and card.edition.cost_fac or 0.9}} end, - calculate = function(self, card, context) - - end, entr_credits = { - custom={key="shader",text="cassknows"} - } + custom={key="shader",text="cassknows"}, + idea = {"cassknows"} + }, } local set_cost_ref = Card.set_cost function Card:set_cost() set_cost_ref(self) - if self.edition and self.edition.key == "e_entr_neon" then - self.cost = self.cost * self.edition.cost_fac + 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" then + self.cost = self.cost * v.edition.cost_fac + end end if Entropy.has_rune("rune_entr_avarice") then local cost = 0 @@ -340,6 +343,18 @@ function Card:set_cost() if G.GAME.modifiers.entr_platinum and self.config.center.set == "Joker" then self.cost = math.floor(self.cost * G.GAME.modifiers.entr_platinum) end + if self.config.center.key == "j_entr_recursive_joker" and not self.ability.cost_set then + self.ability.cost_set = true + self.sell_cost = self.cost + self.sell_cost_label = self.facing == 'back' and '?' or number_format(self.sell_cost) + end + if next(SMODS.find_card("j_entr_kitchenjokers")) and self:is_food() then + local val = 1 + for i, v in pairs(SMODS.find_card("j_entr_kitchenjokers")) do + val = val * v.ability.off_perc + end + self.cost = self.cost * val + end end @@ -384,17 +399,20 @@ local lowres = { end end, on_apply = function(card) - Cryptid.manipulate(card, { - value = 0.25 - }, nil, true) + if not card.edition or not card.edition.lowres then + Cryptid.manipulate(card, { + value = 0.25 + }, nil, true) + end end, on_remove = function(card) Cryptid.manipulate(card, { value = 1 }) Cryptid.manipulate(card) end, entr_credits = { - custom={key="shader",text="cassknows"} - } + custom={key="shader",text="cassknows"}, + idea = {"cassknows"} + }, } SMODS.Shader({ @@ -465,8 +483,9 @@ local kaleidoscopic = { end end, entr_credits = { - custom={key="shader",text="cassknows"} - } + custom={key="shader",text="cassknows"}, + idea = {"cassknows"} + }, } return { diff --git a/items/misc/enhancements.lua b/items/misc/enhancements.lua index 4b2f8fad..940909a2 100644 --- a/items/misc/enhancements.lua +++ b/items/misc/enhancements.lua @@ -32,16 +32,10 @@ local flesh = { card:start_dissolve() SMODS.calculate_context({remove_playing_cards = true, removed={card}}) end - if context.forcetrigger then - card.ability.temporary2 = true - card:remove_from_deck() - card:start_dissolve() - SMODS.calculate_context({remove_playing_cards = true, removed={card}}) - end end, entr_credits = { art = {"Lil. Mr. Slipstream"} - } + }, } local disavowed = { dependencies = { @@ -58,6 +52,9 @@ local disavowed = { no_doe = true, set_ability = function(self,card) card.ability.disavow = true + end, + in_pool = function() + return false end } @@ -161,7 +158,13 @@ local dark = { xchips = card.ability.xchips } end + if context.forcetrigger then + return { + xchips = 1.5 + } + end end, + demicoloncompat = true } local ceramic = { @@ -192,16 +195,24 @@ local ceramic = { and not SMODS.is_eternal(card) and not (card.will_shatter or card.destroyed or card.shattered) and not card.activated 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({ trigger = "immediate", func = function() + G.GAME.consumeable_buffer = 0 SMODS.add_card{ area=G.consumeables, set = "Consumeables", key_append = "entr_ceramic" } card:juice_up(0.9, 0.9) - card:shatter() + if next(SMODS.find_card("j_entr_kintsugi")) then + card:flip() + card:set_ability(G.P_CENTERS.m_gold) + card:flip() + else + card:shatter() + end card.ability.temporary2 = true return true end, @@ -211,7 +222,13 @@ local ceramic = { trigger = "immediate", func = function() card:juice_up(0.9, 0.9) - card:shatter() + if next(SMODS.find_card("j_entr_kintsugi")) then + card:flip() + card:set_ability(G.P_CENTERS.m_gold) + card:flip() + else + card:shatter() + end card.ability.temporary2 = true return true end, @@ -221,9 +238,11 @@ local ceramic = { end if context.destroying_card and context.destroying_card == card and not card.activated 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({ trigger = "immediate", func = function() + G.GAME.consumeable_buffer = 0 SMODS.add_card{ area=G.consumeables, set = "Consumeables", @@ -243,9 +262,11 @@ local ceramic = { end if check 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({ trigger = "immediate", func = function() + G.GAME.consumeable_buffer = 0 SMODS.add_card{ area=G.consumeables, set = "Consumeables", @@ -259,10 +280,24 @@ local ceramic = { card.activated = true end end - end, + if context.forcetrigger then + G.E_MANAGER:add_event(Event({ + trigger = "immediate", + func = function() + SMODS.add_card{ + area=G.consumeables, + set = "Consumeables", + key_append = "entr_ceramic" + } + return true + end + })) + end + end, entr_credits = { art = {"gudusername_53951"} - } + }, + demicoloncompat = true } local is_suitref = Card.is_suit @@ -315,6 +350,232 @@ local kiln = { self:use(card) end } + +local comet = { + key = "comet", + set = "Tarot", + atlas = "consumables2", + object_type = "Consumable", + order = -1000, + dependencies = { + items = { + "set_entr_misc", + "m_entr_radiant" + } + }, + config = { + select = 1 + }, + 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) + 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) + return num > 0 and num <= card.ability.select + end, + loc_vars = function(self, q, card) + q[#q+1] = G.P_CENTERS.m_entr_radiant + return { + vars = { + card.ability.select + } + } + end, + demicoloncompat = true, + force_use = function(self, card) + self:use(card) + end +} + +local radiant = { + dependencies = { + items = { + "set_entr_misc" + } + }, + order = 10000+6, + object_type = "Enhancement", + key = "radiant", + atlas = "enhancements", + pos = { x = 2, y = 1 }, + config = { + extra = { + asc_pow = 0.25 + }, + }, + in_pool = function() + return true + end, + loc_vars = function(self, info_queue, card) + return { + vars = { + card.ability.extra.asc_pow + } + } + end, + calculate = function(self, card, context) + if context.cardarea == G.play and context.main_scoring then + return { + plus_asc = card.ability.extra.asc_pow + } + end + end, + entr_credits = { + art = {"Lil. Mr. Slipstream"} + } +} + +local ethereal = { + dependencies = { + items = { + "set_entr_misc" + } + }, + order = 10000+7, + object_type = "Enhancement", + key = "ethereal", + atlas = "enhancements", + pos = { x = 0, y = 2 }, + no_doe = true, + upgrade_order = 9997, + no_code = true, + in_pool = function() + return false + end, + calculate = function(self, card, context) + if context.card_modified and context.other_card == card 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({ + trigger = "immediate", + func = function() + G.GAME.consumeable_buffer = 0 + SMODS.add_card{ + area=G.consumeables, + set = "Spectral", + key_append = "entr_ethereal" + } + return true + end + })) + return { + message = localize("k_plus_spectral") + } + end + end + end, + entr_credits = { + art = {"Lil. Mr. Slipstream"} + } +} + +local samsara = { + dependencies = { + items = { + "set_entr_inversions", + "m_entr_ethereal" + } + }, + order = 10000+8, + object_type = "Enhancement", + key = "samsara", + atlas = "enhancements", + pos = { x = 1, y = 2 }, + no_doe = true, + upgrade_order = 9998, + no_code = true, + in_pool = function() + return false + end, + config = { + sam_xchips = 1, + sam_xchips_mod = 0.75 + }, + inversion = "m_entr_ethereal", + loc_vars = function(self, q, card) + return { + vars = { + card.ability.sam_xchips, + card.ability.sam_xchips_mod + } + } + end, + calculate = function(self, card, context) + if context.main_scoring and context.cardarea == G.play then + return { + xchips = card.ability.sam_xchips + } + end + if context.card_modified and context.other_card == card then + card.delay_dissolve = true + G.E_MANAGER:add_event(Event{ + func = function() + SMODS.destroy_cards(card) + return true + end + }) + end + if context.remove_playing_cards and not card.die then + local cont + for i, v in pairs(context.removed) do + if v == card then + cont = true + end + end + if not cont then return end + card.die = true + local link = card.ability.link + card.delay_dissolve = false + card.ability.link = nil + local copy = copy_card(card) + G.E_MANAGER:add_event(Event{ + trigger = "after", + blocking = false, + func = function() + copy.die = nil + copy.dissolve = nil + copy.getting_sliced = nil + copy.ability.temporary = nil + copy.ability.temporary2 = nil + copy.ability.link = link + return true + end + }) + SMODS.scale_card(copy, { + ref_table = copy.ability, + ref_value = "sam_xchips", + scalar_value = "sam_xchips_mod", + no_message = true + }) + copy:add_to_deck() + G.hand:emplace(copy) + table.insert(G.playing_cards, copy) + card_eval_status_text( + copy, + "extra", + nil, + nil, + nil, + { message = localize({ + type = "variable", + key = "a_xchips", + vars = { card.ability.sam_xchips + card.ability.sam_xchips_mod }, + }), colour = G.C.BLUE } + ) + return {} + end + end, + entr_credits = { + art = {"Lil. Mr. Slipstream"} + } +} + return { items = { flesh, @@ -322,6 +583,11 @@ return { prismatic, dark, ceramic, - kiln + kiln, + radiant, + comet, + + ethereal, + samsara } } \ No newline at end of file diff --git a/items/misc/other.lua b/items/misc/other.lua index 9c4d2020..901269e8 100644 --- a/items/misc/other.lua +++ b/items/misc/other.lua @@ -78,7 +78,7 @@ SMODS.Sticker:take_ownership("eternal", { G.shared_stickers[self.key]:draw_shader("dissolve", nil, nil, notilt, card.children.center) end end, -}) +}, true) SMODS.Sticker:take_ownership("cry_absolute", { no_collection = true, @@ -90,6 +90,8 @@ SMODS.PokerHandPart { func = function(hand) local eligible_cards = {} local stones = 0 + 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 @@ -102,8 +104,11 @@ SMODS.PokerHandPart { 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 - if stones >= 5 then return {} end + if stones >= 5 or all_pure then return {} end local num = 5 if #eligible_cards >= num then return { eligible_cards } @@ -114,10 +119,10 @@ SMODS.PokerHandPart { SMODS.PokerHand{ key = "entr_derivative", - l_chips = 50, + l_chips = 30, l_mult = 3, - chips = 160, - mult = 16, + chips = 80, + mult = 7, visible = false, example = { { "entr_nilsuit_K", true }, @@ -131,7 +136,12 @@ SMODS.PokerHand{ return { SMODS.merge_lists(parts.entr_derivative_part) } end return {} - end + end, + dependencies = { + items = { + "c_entr_wormhole" + } + } } local wormhole = { @@ -174,7 +184,7 @@ local wormhole = { } function Entropy.l_chipsmult(hand, card, l_chips, l_mult) - update_hand_text({delay = 0}, {handname = hand, 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)}) + 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') @@ -209,7 +219,7 @@ function Entropy.l_chipsmult(hand, card, l_chips, l_mult) end function Entropy.xl_chips(hand, card, l_chips) - update_hand_text({delay = 0}, {handname = hand, 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)}) + 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') @@ -234,7 +244,7 @@ function Entropy.xl_chips(hand, card, l_chips) end function Entropy.xl_mult(hand, card, l_mult) - update_hand_text({delay = 0}, {handname = hand, 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)}) + 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') @@ -318,7 +328,7 @@ local theia = { aurinko = true, config = { l_chips = 5, - l_mult = 0.5, + l_mult = 0.25, }, loc_vars = function(self, q, card) return { @@ -478,6 +488,31 @@ local sputnik = { can_use = function() return true end } +SMODS.Atlas{ + key = "rubyhearts_lc", + px = 71, + py = 95, + path = "RubyDeck.png", +} + +SMODS.Atlas{ + key = "rubyhearts_hc", + px = 71, + py = 95, + path = "RubyDeck2.png", +} + +SMODS.DeckSkin{ + key = "ruby_hearts", + suit = "Hearts", + ranks = {'2', '3', '4', '5', '6', '7', '8', '9', '10', 'Jack', 'Queen', 'King','Ace'}, + lc_atlas = 'entr_rubyhearts_lc', + hc_atlas = 'entr_rubyhearts_hc', + posStyle = 'deck', + loc_txt = { + ['en-us'] = "Ruby" + }, +} return { items = { diff --git a/items/misc/quips.lua b/items/misc/quips.lua index e70a8f4a..0d5856fe 100644 --- a/items/misc/quips.lua +++ b/items/misc/quips.lua @@ -1,48 +1,52 @@ -if SMODS.JimboQuip then - for i=1,10 do - SMODS.JimboQuip{ - key = "lq_ee_"..tostring(i), - type = 'ee_loss', - extra = {center = "j_entr_eecc"}, - filter = function(quip, type) - if type == "ee_loss" then return true, {override_base_checks = true} end - end - } - end - - for i=1,7 do - SMODS.JimboQuip{ - key = "wq_ee_"..tostring(i), - type = 'ee_win', - extra = {center = "j_entr_eecc"}, - filter = function(quip, type) - if type == "ee_win" then return true, {override_base_checks = true} end - end - } - end +for i=1,10 do + SMODS.JimboQuip{ + key = "lq_ee_"..tostring(i), + type = 'ee_loss', + extra = {center = "j_entr_eecc"}, + filter = function(quip, type) + if type == "ee_loss" then return true, {override_base_checks = true} end + end + } +end +for i=1,7 do SMODS.JimboQuip{ - key = "lq_ee_revived", - type = 'ee_revived', + key = "wq_ee_"..tostring(i), + type = 'ee_win', extra = {center = "j_entr_eecc"}, filter = function(quip, type) - if type == "ee_revived" then return true, {override_base_checks = true} end + if type == "ee_win" then return true, {override_base_checks = true} end end } +end - for i=1,4 do - SMODS.JimboQuip{ - key = "lq_"..tostring(i), - type = 'loss', - extra = {center = "j_entr_surreal_joker"}, - } - end - for i=1,4 do - SMODS.JimboQuip{ - key = "wq_"..tostring(i), - type = 'win', - extra = {center = "j_entr_surreal_joker"}, - } +SMODS.JimboQuip{ + key = "lq_ee_revived", + type = 'ee_revived', + extra = {center = "j_entr_eecc"}, + filter = function(quip, type) + if type == "ee_revived" then return true, {override_base_checks = true} end end +} + +for i=1,4 do + SMODS.JimboQuip{ + key = "lq_"..tostring(i), + type = 'loss', + extra = {center = "j_entr_surreal_joker"}, + } end +for i=1,4 do + SMODS.JimboQuip{ + key = "wq_"..tostring(i), + type = 'win', + extra = {center = "j_entr_surreal_joker"}, + } +end + +SMODS.JimboQuip{ + key = "tq_ee_half", + type = 'ee_taunt', + extra = {center = "j_entr_eecc"}, +} \ No newline at end of file diff --git a/items/misc/runes.lua b/items/misc/runes.lua index e90445c2..2a271519 100644 --- a/items/misc/runes.lua +++ b/items/misc/runes.lua @@ -446,7 +446,8 @@ local fehu_indicator = { mult = 1 end Entropy.FlipThen(G.jokers.cards, function(card) - card.sell_cost = card.sell_cost + context.card.sell_cost * mult + card.ability.extra_value = (card.ability.extra_value or 0) + context.card.sell_cost * mult + card:set_cost() end) end, } @@ -539,7 +540,12 @@ local ansuz_indicator = { end } -local raido = Entropy.create_rune("raido", {x=4,y=0}, "rune_entr_raido", 6005) +local raido = Entropy.create_rune("raido", {x=4,y=0}, "rune_entr_raido", 6005, nil, function(self, q, card) + local n, d = SMODS.get_probability_vars(card, G.GAME.providence and 2 or 1, 2, "entr_raido") + return { + n, d + } +end) local raido_indicator = { object_type = "RuneTag", order = 7005, @@ -550,13 +556,21 @@ local raido_indicator = { dependencies = {items = {"set_entr_runes"}}, calculate = function(self, rune, context) if context.entr_ante_change then + local change = (G.GAME.providence or SMODS.pseudorandom_probability(rube, 'entr_raido', 1, 2)) and 0 or nil return { - ante_mod = G.GAME.providence and -context.entr_ante_change or 0, - func = function() - return true - end, + ante_mod = change, + remove = true } end + end, + loc_vars = function(self, queue, rune) + local n, d = SMODS.get_probability_vars(rune, G.GAME.providence and 2 or 1, 2, "entr_raido") + return { + vars = { + n, d + }, + key = Entropy.providence_ui_active(rune) and"rune_entr_raido_providence" or "rune_entr_raido" + } end } @@ -839,17 +853,13 @@ local ihwaz_indicator = { return { func = function() if G.GAME.providence then - local edition = Entropy.pseudorandom_element(G.P_CENTER_POOLS.Edition, pseudoseed("entropy"),function(e) - return G.GAME.banned_keys[e.key] or e.no_doe - end).key + local edition = SMODS.poll_edition({guaranteed = true, key = "entr_ihwaz"}) local enhancement_type = "Enhanced" local enhancement = pseudorandom_element(G.P_CENTER_POOLS[enhancement_type], pseudoseed("ihwaz")).key while G.P_CENTERS[enhancement].no_doe or G.GAME.banned_keys[enhancement] do enhancement = pseudorandom_element(G.P_CENTER_POOLS[enhancement_type], pseudoseed("ihwaz")).key end - local seal = Entropy.pseudorandom_element(G.P_CENTER_POOLS.Seal, pseudoseed("ihwaz"),function(e) - return G.GAME.banned_keys[e.key] or e.no_doe - end).key + local seal = SMODS.poll_seal{guaranteed = true, key = "ihwaz"} card:flip() card:set_edition(edition) card:set_ability(G.P_CENTERS[enhancement]) @@ -918,10 +928,10 @@ local algiz_indicator = { atlas = "rune_indicators", dependencies = {items = {"set_entr_runes"}}, calculate = function(self, rune, context) - if context.game_over then + if context.game_over and to_big(G.GAME.dollars -G.GAME.bankrupt_at) > to_big(G.GAME.providence and 5 or 10) then return { func = function() - ease_dollars(G.GAME.providence and 10 or 5) + ease_dollars(G.GAME.providence and -5 or -10) end, saved = "k_saved_algiz" } @@ -1047,6 +1057,14 @@ local ehwaz_indicator = { calculate = function(self, rune, context) if context.skip_blind then local card = context.removed and context.removed[1] or context.destroy_card + local bl = ({Boss = "Big", Big = "Small"})[G.GAME.blind_on_deck] + local o = G.GAME.round_resets.blind_states[bl == "Big" and "Small" or "Big"] + G.GAME.RedBlindStates = { + [bl == "Big" and "Small" or "Big"] = o, + [bl] = "Skipped", + Boss = "Upcoming" + } + G.GAME.no_saved = true return { rune_break = true, func = function() @@ -1059,8 +1077,10 @@ local ehwaz_indicator = { trigger = "after", blocking = false, func = function() + G.GAME.blind:set_blind(G.P_BLINDS[G.GAME.round_resets.blind_choices[bl]]) G.STATE = G.STATES.ROUND_EVAL G.STATE_COMPLETE = false + G.GAME.no_saved = nil return true end, })) @@ -1099,6 +1119,7 @@ local mannaz_indicator = { dependencies = {items = {"set_entr_runes"}}, calculate = function(self, rune, context) if context.post_open_booster then + G.GAME.mannaz_draw = true if rune.num_triggered then return { func = function() @@ -1212,16 +1233,18 @@ local othila_indicator = { end } -local oss = Entropy.create_rune("oss", {x=3,y=3}, "rune_entr_oss", 6025, nil, nil, true, {x=4,y=3}) +local oss = Entropy.create_rune("oss", {x=3,y=3}, "rune_entr_oss", 6025, {art = {"Lil. Mr. Slipstream"}}, nil, true, {x=4,y=3}) local oss_indicator = { object_type = "RuneTag", order = 7025, key = "oss", atlas = "rune_atlas", pos = {x=3,y=3}, + soul_pos = {x = 4, y = 3}, atlas = "rune_indicators", dependencies = {items = {"set_entr_runes"}}, hidden = true, + no_select = true, calculate = function(self, rune, context) if context.post_open_booster then if rune.triggered then @@ -1271,4 +1294,4 @@ return { othila, othila_indicator, oss, oss_indicator } -} \ No newline at end of file +} \ No newline at end of file diff --git a/items/misc/seals.lua b/items/misc/seals.lua index aaef6c99..bf1d526d 100644 --- a/items/misc/seals.lua +++ b/items/misc/seals.lua @@ -12,8 +12,8 @@ local crimson = { badge_colour = HEX("8a0050"), calculate = function(self, card, context) if (context.cardarea == G.play or context.cardarea == G.hand) and not context.crimson_trigger then - for i, v in ipairs(G.play.cards) do - if G.play.cards[i+1] == card or G.play.cards[i-1] == card then + for i, v in ipairs(card.area.cards) do + if card.area.cards[i+1] == card or card.area.cards[i-1] == card then context.crimson_trigger = true local eval, post = eval_card(v, context) local effects = {eval} @@ -55,29 +55,9 @@ local sapphire = { pos = {x=1,y=0}, badge_colour = HEX("8653ff"), calculate = function(self, card, context) - if context.main_scoring and context.cardarea == G.play then - local text, loc_disp_text, poker_hands, scoring_hand, disp_text = - G.FUNCS.get_poker_hand_info(G.play.cards) - local pkey = "regulus" - for i, v in pairs(Entropy.ReversePlanets) do - if v.name == text then pkey = v.new_key end - end - local key = "c_entr_"..pkey - G.E_MANAGER:add_event(Event({ - func = function() - if G.consumeables.config.card_count < G.consumeables.config.card_limit then - local c = create_card("Consumables", G.consumeables, nil, nil, nil, nil, key) - c:add_to_deck() - G.consumeables:emplace(c) - end - return true - end - })) - end - if context.forcetrigger then - local c = create_card("Consumables", G.consumeables, nil, nil, nil, nil, key) - c:add_to_deck() - G.consumeables:emplace(c) + if (context.playing_card_end_of_round and context.cardarea == G.hand) or context.forcetrigger then + Entropy.ReversePlanetUse(G.GAME.last_hand_played, card, 0.25) + return { message = localize('k_level_up_ex'), colour = G.C.PURPLE } end end, } @@ -186,9 +166,28 @@ local pink = { calculate = function(self, card, context) if context.pre_discard and context.cardarea == G.hand and card.highlighted then if not SMODS.is_eternal(card) then - card.ability.temporary2 = true - card:remove_from_deck() - card:start_dissolve() + local link = card.ability.link + if link then + local cards = {card} + for i, v in pairs(G.hand.cards) do + if v.ability.link == link then + cards[#cards+1] = v + end + end + for i, v in pairs(G.discard.cards) do + if v.ability.link == link then + cards[#cards+1] = v + end + end + for i, v in pairs(G.deck.cards) do + if v.ability.link == link then + cards[#cards+1] = v + end + end + SMODS.destroy_cards(cards, nil) + else + SMODS.destroy_cards(card, nil) + end end G.E_MANAGER:add_event(Event({ func = function() @@ -328,7 +327,7 @@ local ornate = { }) card.delay_dissolve = true return { - message = "+1 "..localize("k_rune"), + message = localize("k_plus_rune"), colour = G.C.PURPLE, } end @@ -353,7 +352,7 @@ local ornate = { }) card.delay_dissolve = true return { - message = "+1 "..localize("k_rune"), + message = localize("k_plus_rune"), colour = G.C.PURPLE, } end @@ -420,7 +419,7 @@ local amber = { }) card.delay_dissolve = true return { - message = "+1 "..localize("k_pact"), + message = localize("k_plus_pact"), colour = G.C.RED, } end diff --git a/items/misc/sounds.lua b/items/misc/sounds.lua index aa8a3540..f7bbc4ff 100644 --- a/items/misc/sounds.lua +++ b/items/misc/sounds.lua @@ -55,11 +55,13 @@ SMODS.Sound({ }) SMODS.Sound({ - key = "music_dread", - path = "music_dread.ogg", - select_music_track = function() - if not G.screenwipe and G.STATE == G.STATES.SMODS_BOOSTER_OPENED and SMODS.OPENED_BOOSTER and string.find(SMODS.OPENED_BOOSTER.config.center.key, "twisted", 0, true) ~= nil then - return 1339 - end - end + key = "polaroid", + path = "polaroid.ogg", + volume = 1.4 }) + +SMODS.Sound({ + key = "bounce", + path = "bounce.ogg", + volume = 1.4 +}) \ No newline at end of file diff --git a/items/misc/spectrals.lua b/items/misc/spectrals.lua index 9fa0353a..d5b4cd8c 100644 --- a/items/misc/spectrals.lua +++ b/items/misc/spectrals.lua @@ -14,7 +14,7 @@ local flipside = { 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) + return Entropy.Inversion(card) or card.config.center.key == "c_entr_flipside" end) return #cards > 0 and #cards <= card.ability.select end, @@ -24,10 +24,36 @@ local flipside = { return Entropy.Inversion(card) end) Entropy.FlipThen(cards, function(card) - card.ability.fromflipside = true - card:set_ability(G.P_CENTERS[Entropy.Inversion(card)]) - card.ability.fromflipside = false - SMODS.calculate_context({entr_consumable_inverted = true, card = 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 + end + card.ability.fromflipside = false + SMODS.calculate_context({entr_consumable_inverted = true, card = card}) + end end) end, loc_vars = function(self, q, card) @@ -37,7 +63,11 @@ local flipside = { } } end, - can_be_pulled = true + can_be_pulled = true, + demicoloncompat = true, + force_use = function(self, card) + self:use(card) + end } local shatter = { @@ -46,7 +76,7 @@ local shatter = { order = 37, object_type = "Consumable", - config = {limit = 2}, + config = {limit = 1, csl = 1}, atlas = "consumables", pos = {x=5,y=8}, dependencies = { @@ -55,9 +85,10 @@ local shatter = { } }, use = function(self, card, area, copier) - Entropy.FlipThen(G.hand.highlighted, function(card) + Entropy.FlipThen(Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.limit), function(card) card:set_edition("e_entr_fractured") end) + Entropy.ChangeFullCSL(-card.ability.csl) end, can_use = function(self, card) local num = #Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.limit) @@ -66,12 +97,18 @@ local shatter = { loc_vars = function(self, q, card) q[#q+1] = G.P_CENTERS.e_entr_fractured return {vars={ - card.ability.limit + card.ability.limit, + card.ability.csl }} end, entr_credits = { + idea = {"cassknows"}, art = {"cassknows"} - } + }, + demicoloncompat = true, + force_use = function(self, card) + self:use(card) + end } local destiny = { @@ -90,40 +127,48 @@ local destiny = { }, use = function(self, card, area, copier) local remove = {} - for i, v in pairs(G.hand.highlighted) do + local highlighted = Entropy.GetHighlightedCards({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 - v:start_dissolve() - v.ability.temporary2 = true + if not SMODS.is_eternal(v) then + v:start_dissolve() + v.ability.temporary2 = true + end remove[#remove+1]=v else Entropy.DiscardSpecific({v}) end end if #remove > 0 then SMODS.calculate_context({remove_playing_cards = true, removed=remove}) end - add_joker(Entropy.GetRecipe(G.hand.highlighted)) - if Entropy.DeckOrSleeve("crafting") then - if not (card.ability.overflow_amount) then - local card2 = copy_card(card) - card2.ability.cry_absolute = true - card2:add_to_deck() - G.consumeables:emplace(card2) - card2:set_edition("e_negative") - end - end + add_joker(Entropy.GetRecipe(highlighted)) + end, + keep_on_use = function(self, card) + return Entropy.DeckOrSleeve("crafting") end, can_use = function(self, card) - return G.hand and #G.hand.highlighted == 5 + local highlighted = Entropy.GetHighlightedCards({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) + if G.hand and #highlighted == 5 then + q[#q+1] = jok and G.P_CENTERS[jok] or nil + end + return {vars={ - G.hand and #G.hand.highlighted == 5 and localize({type = "name_text", set = "Joker", key = Entropy.GetRecipe(G.hand.highlighted)}) or "none" + G.hand and #highlighted == 5 and localize({type = "name_text", set = "Joker", key = jok}) or "none" }} end, no_doe = true, in_pool = function() return not Entropy.DeckOrSleeve("crafting") end, - weight = 0 + weight = 0, + demicoloncompat = true, + force_use = function(self, card) + self:use(card) + end } local lust = { @@ -141,7 +186,7 @@ local lust = { } }, use = function(self, card, area, copier) - Entropy.FlipThen(G.hand.highlighted, function(card) + Entropy.FlipThen(Entropy.GetHighlightedCards({G.hand}, card, 1, card.ability.limit), function(card) card:set_edition("e_entr_freaky") end) end, @@ -157,7 +202,11 @@ local lust = { end, entr_credits = { art = {"missingnumber"} - } + }, + demicoloncompat = true, + force_use = function(self, card) + self:use(card) + end } local ref = Cryptid.reload_localization function Cryptid.reload_localization() @@ -250,6 +299,10 @@ local null = { card.ability.create }} end, + demicoloncompat = true, + force_use = function(self, card) + self:use(card) + end } local antithesis = { @@ -275,6 +328,13 @@ local antithesis = { can_use = function(self, card) return G.jokers and #G.jokers.cards > 0 end, + entr_credits = { + idea = {"cassknows"} + }, + demicoloncompat = true, + force_use = function(self, card) + self:use(card) + end } local enchant = { @@ -314,6 +374,39 @@ local enchant = { end } +local manifest = { + dependencies = { + items = { + "set_entr_spectrals", + } + }, + object_type = "Consumable", + order = 41, + key = "manifest", + set = "Spectral", + + atlas = "consumables", + pos = {x=2,y=7}, + use = function() + add_tag(Tag(Entropy.AscendedTags[G.GAME.round_resets.blind_tags.Small] or G.GAME.round_resets.blind_tags.Small)) + add_tag(Tag(Entropy.AscendedTags[G.GAME.round_resets.blind_tags.Big] or G.GAME.round_resets.blind_tags.Big)) + end, + can_use = function(self, card) + return true + end, + loc_vars = function(self, q, card) + if G.GAME.round_resets and G.GAME.round_resets.blind_tags then + q[#q+1] = G.P_TAGS[Entropy.AscendedTags[G.GAME.round_resets.blind_tags.Small] or G.GAME.round_resets.blind_tags.Small] + q[#q+1] = G.P_TAGS[Entropy.AscendedTags[G.GAME.round_resets.blind_tags.Big] or G.GAME.round_resets.blind_tags.Big] + end + end, + entr_credits = entr_credits, + demicoloncompat = true, + force_use = function(self, card) + self:use(card) + end +} + return { items = { flipside, @@ -322,6 +415,7 @@ return { lust, null, antithesis, - enchant + enchant, + manifest } } \ No newline at end of file diff --git a/items/misc/tags.lua b/items/misc/tags.lua index ae9bf512..e2e27c2c 100644 --- a/items/misc/tags.lua +++ b/items/misc/tags.lua @@ -47,7 +47,6 @@ local neon = { config = { type = "store_joker_modify", edition = "entr_neon" }, loc_vars = function(self, info_queue, tag) info_queue[#info_queue + 1] = G.P_CENTERS.e_entr_neon - return { vars = {} } end, apply = function(self, tag, context) if context.type == "store_joker_modify" then @@ -89,7 +88,6 @@ local lowres = { config = { type = "store_joker_modify", edition = "entr_lowres" }, loc_vars = function(self, info_queue, tag) info_queue[#info_queue + 1] = G.P_CENTERS.e_entr_lowres - return { vars = {} } end, apply = function(self, tag, context) if context.type == "store_joker_modify" then @@ -136,7 +134,6 @@ local sunny = { config = { type = "store_joker_modify", edition = "entr_sunny" }, loc_vars = function(self, info_queue, tag) info_queue[#info_queue + 1] = G.P_CENTERS.e_entr_sunny - return { vars = {} } end, apply = function(self, tag, context) if context.type == "store_joker_modify" then @@ -181,7 +178,6 @@ local solar = { config = { type = "store_joker_modify", edition = "entr_solar" }, loc_vars = function(self, info_queue, tag) info_queue[#info_queue + 1] = G.P_CENTERS.e_entr_solar - return { vars = {} } end, apply = function(self, tag, context) if context.type == "store_joker_modify" then @@ -229,7 +225,6 @@ local fractured = { config = { type = "store_joker_modify", edition = "entr_fractured" }, loc_vars = function(self, info_queue, tag) info_queue[#info_queue + 1] = G.P_CENTERS.e_entr_fractured - return { vars = {} } end, apply = function(self, tag, context) if context.type == "store_joker_modify" then @@ -275,7 +270,6 @@ local freaky = { config = { type = "store_joker_modify", edition = "entr_freaky" }, loc_vars = function(self, info_queue, tag) info_queue[#info_queue + 1] = G.P_CENTERS.e_entr_freaky - return { vars = {} } end, apply = function(self, tag, context) if context.type == "store_joker_modify" then @@ -317,7 +311,6 @@ local kaleidoscopic = { config = { type = "store_joker_modify", edition = "entr_kaleidoscopic" }, loc_vars = function(self, info_queue, tag) info_queue[#info_queue + 1] = G.P_CENTERS.e_entr_kaleidoscopic - return { vars = {} } end, apply = function(self, tag, context) if context.type == "store_joker_modify" then @@ -414,7 +407,7 @@ SMODS.Atlas { config = { type = "tag_add", num = 4 }, in_pool = function() return false end or nil, loc_vars = function(self, info_queue, tag) - return { vars = { tag.ability.num or "?" } } + return { vars = { tag.ability and tag.ability.num or "?" } } end, config = { num = 4 @@ -432,9 +425,6 @@ SMODS.Atlas { local lock = tag.ID G.CONTROLLER.locks[lock] = true tag:yep("+", G.C.RED, function() - if context.tag.ability and context.tag.ability.orbital_hand then - G.orbital_hand = context.tag.ability.orbital_hand - end for i = 1, to_number(tag.ability.num) do local tag = Tag(context.tag.key) if context.tag.key == "tag_cry_rework" then @@ -443,7 +433,6 @@ SMODS.Atlas { end add_tag(tag) end - G.orbital_hand = nil G.CONTROLLER.locks[lock] = nil return true end) @@ -453,7 +442,7 @@ SMODS.Atlas { end, shiny_atlas = "entr_shiny_asc_tags", set_ability = function(self, tag) - tag.ability.num = math.floor(pseudorandom("ascendant_copying")*4+4) + tag.ability.num = math.floor(pseudorandom("ascendant_copying")*3+4) end } @@ -541,9 +530,7 @@ local saint = { tag:yep("+", G.C.GREEN, function() card:start_materialize() card.ability.couponed = true - card:set_edition(Entropy.pseudorandom_element(G.P_CENTER_POOLS.Edition, pseudoseed("entr_saint"),function(e) - return G.GAME.banned_keys[e.key] or e.no_doe - end).key) + card:set_edition(SMODS.poll_edition({guaranteed = true, key = "entr_saint"})) card:set_cost() return true end) @@ -654,7 +641,7 @@ local cat_asc = { key = "ascendant_cat", name = "entr-Ascendant-Cat Tag", loc_vars = function(self, info_queue, tag) - return { vars = { tag.ability.level or 1 } } + return { vars = { tag.ability and tag.ability.level or 1 } } end, level_func = function(level,one,tag) tag.ability.level2 = (tag.ability.level2 or 0) + 1 @@ -666,6 +653,7 @@ local cat_asc = { tag.get_edition = function(tag) return G.P_CENTER_POOLS.Edition[(tag.ability.level2%#G.P_CENTER_POOLS.Edition)+1] end + tag.hover_sound = function() return 'cry_meow'..math.random(4) end end, in_pool = function() return false end, shiny_atlas = "entr_shiny_asc_tags", @@ -686,7 +674,7 @@ local dog_asc = { key = "ascendant_dog", name = "entr-Ascendant-Dog Tag", loc_vars = function(self, info_queue, tag) - return { vars = { tag.ability.level or 1 } } + return { vars = { tag.ability and tag.ability.level or 1 } } end, level_func = function(level,one,tag) tag.ability.level2 = (tag.ability.level2 or 0) + 1 @@ -718,8 +706,6 @@ local canvas = { pos = {x=4,y=3}, config = { type = "store_joker_create" }, in_pool = function() return false end or nil, - loc_vars = function(self, info_queue, tag) - end, apply = function(self, tag, context) if context.type == "store_joker_create" then local card @@ -760,7 +746,6 @@ local unbounded = { info_queue[#info_queue + 1] = G.P_CENTERS.p_spectral_normal_1 info_queue[#info_queue + 1] = { set = "Spectral", key = "c_cry_pointer" } info_queue[#info_queue + 1] = G.P_CENTERS.c_entr_beyond - return { vars = {} } end, apply = function(self, tag, context) if context.type == "new_blind_choice" then @@ -900,7 +885,6 @@ local ejoker = { in_pool = function() return false end or nil, loc_vars = function(self, info_queue) info_queue[#info_queue + 1] = G.P_CENTERS.p_buffoon_mega_1 - return { vars = {} } end, apply = function(self, tag, context) if context.type == "new_blind_choice" then @@ -917,9 +901,7 @@ local ejoker = { G.P_CENTERS[key], { bypass_discovery_center = true, bypass_discovery_ui = true } ) - card:set_edition(Entropy.pseudorandom_element(G.P_CENTER_POOLS.Edition, pseudoseed("entr_saint"),function(e) - return G.GAME.banned_keys[e.key] or e.no_doe - end).key) + card:set_edition(SMODS.poll_edition({guaranteed = true, key = "entr_ejoker"})) card.cost = 0 card.from_tag = true G.FUNCS.use_card({ config = { ref_table = card } }) @@ -956,12 +938,12 @@ local universal = { config = { type = "immediate" }, in_pool = function() return false end or nil, loc_vars = function(self, info_queue,tag) - return { vars = {tag.ability.hand and localize(tag.ability.hand,'poker_hands') or "[poker hand]"} } + return { vars = {tag.ability and tag.ability.hand and localize(tag.ability.hand,'poker_hands') or "[poker hand]"} } end, apply = function(self, tag, context) if context.type == "immediate" then tag:yep("+", G.C.GOLD, function() - G.GAME.hands[tag.ability.hand].AscensionPower = (G.GAME.hands[tag.ability.hand].AscensionPower or 0) + 6 + G.GAME.hands[tag.ability.hand].AscensionPower = (G.GAME.hands[tag.ability.hand].AscensionPower or 0) + 3 return true end) tag.triggered = true @@ -1000,7 +982,6 @@ local ebundle = { info_queue[#info_queue + 1] = { set = "Tag", key = "tag_cry_console" } info_queue[#info_queue + 1] = { set = "Tag", key = "tag_entr_ascendant_twisted" } info_queue[#info_queue + 1] = { set = "Tag", key = "tag_cry_bundle" } - return { vars = {} } end, apply = function(self, tag, context) if context.type == "new_blind_choice" then @@ -1012,9 +993,9 @@ local ebundle = { local _tag = Tag("tag_" .. v, true) _tag.ability.shiny = Cryptid.is_shiny() add_tag(_tag) + _tag.ability.no_asc = true if i == 1 then tag.triggered = true - _tag:apply_to_run({ type = "new_blind_choice" }) end end G.CONTROLLER.locks[lock] = nil @@ -1043,7 +1024,6 @@ local twisted = { in_pool = function() return false end or nil, loc_vars = function(self, info_queue) info_queue[#info_queue + 1] = G.P_CENTERS.p_entr_twisted_pack_mega - return { vars = {} } end, apply = function(self, tag, context) if context.type == "new_blind_choice" then @@ -1098,7 +1078,7 @@ local stock = { end, apply = function(self, tag, context) if context.type == "immediate" then - ease_dollars(G.GAME.dollars * 1.5) + ease_dollars(G.GAME.dollars) tag:yep("+", G.C.GOLD, function() return true end) @@ -1123,9 +1103,6 @@ local blind = { pos = {x=4,y=4}, config = { type = "new_blind_choice" }, in_pool = function() return false end or nil, - loc_vars = function(self, info_queue) - return { vars = {} } - end, apply = function(self, tag, context) if context.type == "new_blind_choice" then local lock = tag.ID @@ -1225,7 +1202,6 @@ local reference = { in_pool = function() return false end or nil, loc_vars = function(self, info_queue) info_queue[#info_queue + 1] = G.P_CENTERS.p_entr_reference - return { vars = {} } end, apply = function(self, tag, context) if context.type == "new_blind_choice" then @@ -1598,7 +1574,7 @@ return { credit, topup, not (SMODS.Mods["Cryptid"] or {}).can_load and {} or better_topup, - booster, + not (SMODS.Mods["Cryptid"] or {}).can_load and {} or booster, effarcire, sunny_asc, fractured_asc, diff --git a/items/misc/vouchers.lua b/items/misc/vouchers.lua index e7122239..4fa11e2a 100644 --- a/items/misc/vouchers.lua +++ b/items/misc/vouchers.lua @@ -74,7 +74,7 @@ local providence = { key = "providence", atlas = "vouchers", pos = {x=1, y=1}, - requires = {"v_entr_marked"}, + requires = {"v_entr_diviner"}, redeem = function(self, card) G.GAME.providence = true end, diff --git a/lib/ascended.lua b/lib/ascended.lua new file mode 100644 index 00000000..99af38b2 --- /dev/null +++ b/lib/ascended.lua @@ -0,0 +1,215 @@ +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 + +function Cryptid.calculate_ascension_power(hand_name, hand_cards, hand_scoring_cards, tether, bonus) + bonus = bonus or 0 + local starting = 0 + if Cryptid.enabled("set_cry_poker_hand_stuff") ~= true and (SMODS.Mods["Cryptid"] or {}).can_load then + return 0 + end + if hand_name then + -- Get Starting Ascension power from Poker Hands + if hand_cards then + local check = Cryptid.hand_ascension_numbers(hand_name, tether) + if check then + starting = (tether and #hand_cards or #hand_scoring_cards) - check + end + if Entropy.BlindIs("bl_entr_scarlet_sun") then + starting = #hand_cards + end + end + -- Extra starting calculation for Declare hands + if G.GAME.hands[hand_name] and G.GAME.hands[hand_name].declare_cards then + local total = 0 + for i, v in pairs(G.GAME.hands[hand_name].declare_cards or {}) do + local how_many_fit = 0 + local suit, rank + for i2, v2 in pairs(hand_cards) do + if not v2.marked then + if SMODS.has_no_rank(v2) and v.rank == "rankless" or v2:get_id() == v.rank then + rank = true + end + if v2:is_suit(v.suit) or (v.suit == "suitless" and SMODS.has_no_suit(v2)) or not v.suit then + suit = true + end + if not (suit and rank) then + suit = false + rank = false + end + if suit and rank then + how_many_fit = how_many_fit + 1 + v2.marked = true + end + end + end + if not rank or not suit then + how_many_fit = 0 + end + total = total + how_many_fit + end + for i2, v2 in pairs(hand_cards) do + v2.marked = nil + end + starting = starting + (total - #hand_scoring_cards) + end + end + -- Get Ascension power from Exploit + if G.GAME.cry_exploit_override then + bonus = bonus + 1 + end + -- Get Ascension Power From Sol (Observatory effect) + if G.GAME.used_vouchers.v_observatory and next(find_joker("cry-sunplanet")) then + if #find_joker("cry-sunplanet") == 1 then + bonus = bonus + 1 + else + bonus = bonus + Cryptid.nuke_decimals(Cryptid.funny_log(2, #find_joker("cry-sunplanet") + 1), 2) + end + end + local final = math.max(0, starting + bonus) + -- Round to 1 if final value is less than 1 but greater than 0 + if final > 0 and final < 1 then + final = 1 + end + if not (SMODS.Mods["Cryptid"] or {}).can_load and not next(SMODS.find_card("j_entr_hexa")) and not Entropy.BlindIs("bl_entr_scarlet_sun") then + final = 0 + end + 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_axeh")) then + for i, v in pairs(SMODS.find_card("j_entr_axeh")) do + final = final * v.ability.asc_mod + end + 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) + end + return final +end +function Cryptid.hand_ascension_numbers(hand_name, tether) + tether = tether or Entropy.BlindIs("bl_entr_scarlet_sun") + Cryptid.ascension_numbers = Cryptid.ascension_numbers or {} + if Cryptid.ascension_numbers[hand_name] and type(Cryptid.ascension_numbers[hand_name]) == "function" then + return Cryptid.ascension_numbers[hand_name](hand_name, tether) + end + if hand_name == "High Card" then + return tether and 1 or nil + elseif hand_name == "Pair" then + return tether and 2 or nil + elseif hand_name == "Two Pair" then + return 4 + elseif hand_name == "Three of a Kind" then + return tether and 3 or nil + elseif hand_name == "Straight" or hand_name == "Flush" or hand_name == "Straight Flush" then + return next(SMODS.find_card("j_four_fingers")) and Cryptid.gameset() ~= "modest" and 4 or 5 + elseif + hand_name == "Full House" + or hand_name == "Five of a Kind" + or hand_name == "Flush House" + or hand_name == "cry_Bulwark" + or hand_name == "Flush Five" + or hand_name == "bunc_Spectrum" + or hand_name == "bunc_Straight Spectrum" + or hand_name == "bunc_Spectrum House" + or hand_name == "bunc_Spectrum Five" + then + return 5 + elseif hand_name == "Four of a Kind" then + return tether and 4 or nil + elseif hand_name == "cry_Clusterfuck" or hand_name == "cry_UltPair" then + return 8 + elseif hand_name == "cry_WholeDeck" then + return 52 + elseif hand_name == "cry_Declare0" then + return G.GAME.hands.cry_Declare0 + and G.GAME.hands.cry_Declare0.declare_cards + and #G.GAME.hands.cry_Declare0.declare_cards + elseif hand_name == "cry_Declare1" then + return G.GAME.hands.cry_Declare1 + and G.GAME.hands.cry_Declare1.declare_cards + and #G.GAME.hands.cry_Declare1.declare_cards + elseif hand_name == "cry_Declare2" then + return G.GAME.hands.cry_Declare2 + and G.GAME.hands.cry_Declare2.declare_cards + and #G.GAME.hands.cry_Declare2.declare_cards + elseif + hand_name == "spa_Spectrum" + or hand_name == "spa_Straight_Spectrum" + or hand_name == "spa_Spectrum_House" + or hand_name == "spa_Spectrum_Five" + or hand_name == "spa_Flush_Spectrum" + or hand_name == "spa_Straight_Flush_Spectrum" + or hand_name == "spa_Flush_Spectrum_House" + or hand_name == "spa_Flush_Spectrum_Five" + then + return SpectrumAPI + and SpectrumAPI.configuration.misc.four_fingers_spectrums + and next(SMODS.find_card("j_four_fingers")) + and Cryptid.gameset() ~= "modest" + and 4 + or 5 + end + return nil +end diff --git a/lib/config.lua b/lib/config.lua index 41efc45f..c3cf85a5 100644 --- a/lib/config.lua +++ b/lib/config.lua @@ -33,6 +33,12 @@ local entrConfigTab = function() 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, @@ -80,6 +86,15 @@ local entrConfigTab = function() callback = function() end, }) + 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 = { @@ -122,14 +137,43 @@ function Entropy.generate_credits_nodes(table, type) }, } for i, v in pairs(table) do + local cards_with_credit = {} + for _, v in pairs(G.P_CENTERS) do + if v.entr_credits then + for i2, v2 in pairs(v.entr_credits) do + for i3, v3 in pairs(v2) do + if v3 == i then + cards_with_credit[#cards_with_credit+1] = v + goto continue + end + end + end + end + ::continue:: + end + G.FUNCS["entr_credit_"..i] = function(e) + G.SETTINGS.paused = true + G.E_MANAGER:add_event(Event{ + trigger = "after", + func = function() + G.only_display_credit = i + return true + end + }) + G.FUNCS.overlay_menu { + definition = SMODS.card_collection_UIBox(cards_with_credit, { 5, 5, 5 }), + config = {back_func = "exit_entr_overlay"} + } + end code_nodes[#code_nodes + 1] = { n = G.UIT.R, - config = { align = "cm" }, + config = { align = "cm"}, nodes = { { n = G.UIT.O, config = { + button = #cards_with_credit > 0 and "entr_credit_"..i or nil, object = DynaText({ string = i, colours = { G.C.WHITE }, @@ -143,6 +187,12 @@ function Entropy.generate_credits_nodes(table, type) end return { n = G.UIT.C, config = { align = "tm", padding = 0 }, nodes = code_nodes } end +local overlay_ref = G.FUNCS.overlay_menu +G.FUNCS.overlay_menu = function(...) + local ret = overlay_ref(...) + G.only_display_credit = nil + return ret +end local entropyTabs = function() return { @@ -203,7 +253,9 @@ local entropyTabs = function() }, } local credits = { - art = {}, + art = { + ["pangaea47"] = true + }, idea = {}, code = { ["lord.ruby"]=true, @@ -215,9 +267,11 @@ local entropyTabs = function() ["wingedcatgirl"]=true, ["Lily Felli"]=true, ["gemstonez"]=true, - ["triple6lexi"]=true + ["triple6lexi"]=true, + ["Athebyne"] = true, + ["InvalidOS"] = true, }, - music = {gemstonez=true, MilkyP = true} + music = {gemstonez=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 diff --git a/lib/fixes.lua b/lib/fixes.lua index b76d4d19..2c02f04b 100644 --- a/lib/fixes.lua +++ b/lib/fixes.lua @@ -57,7 +57,7 @@ G.FUNCS.flame_handler = function(e) 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 type(_F.intensity) == "table" then + if Entropy.is_big(_F.intensity) then if _F.intensity > to_big(85) then _F.intensity = 85 else @@ -413,4 +413,21 @@ local mod_chips_ref = mod_chips function mod_chips(_chips) if _chips then return mod_chips_ref(_chips) end return 1 +end + +local copy_tableref = copy_table +function copy_table(tbl, iter, ...) + iter = iter or 100 + if iter > 0 then + return copy_tableref(tbl, iter - 1, ...) + end +end + +local get_areas_ref = SMODS.get_card_areas +function SMODS.get_card_areas(...) + local ret = get_areas_ref(...) + for i, v in pairs(ret) do + v.cards = v.cards or {} + end + return ret end \ No newline at end of file diff --git a/lib/hooks.lua b/lib/hooks.lua index 3eb0de40..46601199 100644 --- a/lib/hooks.lua +++ b/lib/hooks.lua @@ -1,3 +1,5 @@ +is_number = is_number or function(x) return type(x) == "number" end + local card_drawref = Card.draw function Card:draw(layer) local ref = card_drawref(self, layer) @@ -139,7 +141,7 @@ function end_round() if card.ability.debuff_timer <= 0 then card.ability.debuff_timer = nil card.ability.debuff_timer_max = nil - card.debuff = false + card:set_debuff(false) card_eval_status_text( card, "extra", @@ -196,6 +198,36 @@ create_UIBox_your_collection_seals = function() }) end +local set_sealref = Card.set_seal +function Card:set_seal(seal, ...) + set_sealref(self, seal, ...) + SMODS.calculate_context({card_modified = true, other_card = self}) + local link = self and self.ability and self.ability.link + if link then + for i, v in pairs(G.hand.cards) do + if v.ability.link == link then + set_sealref(v, seal, ...) + SMODS.calculate_context({card_modified = true, other_card = v}) + v.ability.link = link + end + end + for i, v in pairs(G.discard.cards) do + if v.ability.link == link then + set_sealref(v, seal, ...) + SMODS.calculate_context({card_modified = true, other_card = v}) + v.ability.link = link + end + end + for i, v in pairs(G.deck.cards) do + if v.ability.link == link then + set_sealref(v, seal, ...) + SMODS.calculate_context({card_modified = true, other_card = v}) + v.ability.link = link + end + end + end +end + local set_abilityref = Card.set_ability function Card:set_ability(center, initial, delay) local link = self and self.ability and self.ability.link @@ -234,20 +266,24 @@ end local set_editionref = Card.set_edition function Card:set_edition(...) set_editionref(self, ...) + SMODS.calculate_context({card_modified = true, other_card = self}) if self.ability.link then for i, v in pairs(G.hand.cards) do if v.ability.link == self.ability.link then set_editionref(v, ...) + SMODS.calculate_context({card_modified = true, other_card = v}) end end for i, v in pairs(G.discard.cards) do if v.ability.link == self.ability.link then set_editionref(v, ...) + SMODS.calculate_context({card_modified = true, other_card = v}) end end for i, v in pairs(G.deck.cards) do if v.ability.link == self.ability.link then set_editionref(v, ...) + SMODS.calculate_context({card_modified = true, other_card = v}) end end end @@ -256,6 +292,32 @@ function Card:set_edition(...) end end +local set_base_ref = Card.set_base +function Card:set_base(...) + set_base_ref(self, ...) + SMODS.calculate_context({card_modified = true, other_card = self}) + if self.ability and self.ability.link and G.hand then + for i, v in pairs(G.hand.cards) do + if v.ability.link == self.ability.link then + set_base_ref(v, ...) + SMODS.calculate_context({card_modified = true, other_card = v}) + end + end + for i, v in pairs(G.discard.cards) do + if v.ability.link == self.ability.link then + set_base_ref(v, ...) + SMODS.calculate_context({card_modified = true, other_card = v}) + end + end + for i, v in pairs(G.deck.cards) do + if v.ability.link == self.ability.link then + set_base_ref(v, ...) + SMODS.calculate_context({card_modified = true, other_card = v}) + end + end + end +end + local ref = Card.get_other_side_dummy function Card:get_other_side_dummy() local val = ref(self) @@ -273,29 +335,35 @@ function Card:start_dissolve(...) if self.ability.link then for i, v in pairs(G.hand.cards) do if v.ability.link == self.ability.link then + SMODS.calculate_context({remove_playing_cards = true, removed={v}}) start_dissolveref(v, ...) v.ability.temporary2 = true end end for i, v in pairs(G.discard.cards) do if v.ability.link == self.ability.link then + SMODS.calculate_context({remove_playing_cards = true, removed={v}}) start_dissolveref(v, ...) v.ability.temporary2 = true end end for i, v in pairs(G.deck.cards) do if v.ability.link == self.ability.link then + SMODS.calculate_context({remove_playing_cards = true, removed={v}}) start_dissolveref(v, ...) v.ability.temporary2 = true end end end + if self.config.center_key == "j_entr_prismatic_shard" and G.GAME.pool_flags then + G.GAME.pool_flags.prismatic_shard_gone = true + end end local smcmb = SMODS.create_mod_badges function SMODS.create_mod_badges(obj, badges) smcmb(obj, badges) - if not SMODS.config.no_mod_badges and obj and obj.entr_credits then + if not SMODS.config.no_mod_badges and obj and obj.original_mod and obj.original_mod.id == "entr" then local function calc_scale_fac(text) local size = 0.9 local font = G.LANG.font @@ -310,20 +378,22 @@ function SMODS.create_mod_badges(obj, badges) local scale_fac = calced_text_width > max_text_width and max_text_width / calced_text_width or 1 return scale_fac end - if obj.entr_credits.art or obj.entr_credits.code or obj.entr_credits.idea or obj.entr_credits.custom then + if not obj.entr_credit or (obj.entr_credits.art or obj.entr_credits.code or obj.entr_credits.idea or obj.entr_credits.custom) then local scale_fac = {} local min_scale_fac = 1 - local strings = { Entropy.display_name } + local strings = G.only_display_credit and {} or {Entropy.display_name} for _, v in ipairs({ "idea", "art", "code" }) do - if obj.entr_credits[v] then + if obj.entr_credits and obj.entr_credits[v] then if type(obj.entr_credits[v]) == "string" then obj.entr_credits[v] = {obj.entr_credits[v]} end for i = 1, #obj.entr_credits[v] do - strings[#strings + 1] = - localize({ type = "variable", key = "cry_" .. v, vars = { obj.entr_credits[v][i] } })[1] + if not G.only_display_credit or G.only_display_credit == obj.entr_credits[v][i] then + strings[#strings + 1] = + localize({ type = "variable", key = "cry_" .. v, vars = { obj.entr_credits[v][i] } })[1] + end end end end - if obj.entr_credits.custom then + if obj.entr_credits and obj.entr_credits.custom then strings[#strings + 1] = localize({ type="variable", key = obj.entr_credits.custom.key, vars = { obj.entr_credits.custom.text } }) end for i = 1, #strings do @@ -336,6 +406,9 @@ function SMODS.create_mod_badges(obj, badges) string = strings[i], } end + if #strings == 0 then + strings = {Entropy.display_name} + end local entr_badge = { n = G.UIT.R, config = { align = "cm" }, @@ -350,6 +423,7 @@ function SMODS.create_mod_badges(obj, badges) minh = 0.36, emboss = 0.05, padding = 0.03 * 0.9, + shader = "entr_brimstone_badge" }, nodes = { { n = G.UIT.B, config = { h = 0.1, w = 0.03 } }, @@ -611,11 +685,16 @@ G.FUNCS.buy_deckorsleeve = function(e) 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 + G.jokers:handle_card_limit(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 @@ -629,6 +708,8 @@ G.FUNCS.buy_deckorsleeve = function(e) if i == "joker_slot" then G.jokers:handle_card_limit(v) end if i == "hand_size" then G.hand:handle_card_limit(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 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_entr_doc" or c1.config.center.key == "sleeve_entr_doc" then @@ -809,7 +890,7 @@ 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 + 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.GREEN e.config.button = "use_joker" @@ -983,7 +1064,7 @@ function G.UIDEF.use_and_sell_buttons(card) }}, }} end - if (card.area == G.jokers and G.jokers and card.config.center.use) and not card.debuff then + 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}}, @@ -1152,7 +1233,7 @@ function G.UIDEF.use_and_sell_buttons(card) }}, }} end - if card.config.center.use and card.area == G.pack_cards and G.pack_cards and not card.config.center.no_select and ((SMODS.ConsumableTypes[card.config.center.set] and SMODS.ConsumableTypes[card.config.center.set].can_be_pulled or card.config.center.can_be_pulled) or (not SMODS.OPENED_BOOSTER or not SMODS.OPENED_BOOSTER.draw_hand and card.children.front)) and (card.ability.consumeable) then + if Entropy.needs_use_button(card) and card.config.center.use 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 }, @@ -1179,7 +1260,7 @@ function G.UIDEF.use_and_sell_buttons(card) { n = G.UIT.T, config = { - text = card.ability.set == "Command" and localize("b_pull") or localize("b_select"), + text = Entropy.needs_pull_button(card), colour = G.C.UI.TEXT_LIGHT, scale = 0.55, shadow = true, @@ -1224,6 +1305,44 @@ function G.UIDEF.use_and_sell_buttons(card) -- 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 @@ -1236,7 +1355,7 @@ G.FUNCS.sell_card = function(e) card2:add_to_deck() card2.ability.superego = nil card2.ability.superego_copies = nil - card2.debuff = false + card2:set_debuff(false) card2.sell_cost = 0 e.config.ref_table.area:emplace(card2) end @@ -1291,13 +1410,16 @@ function SMODS.calculate_individual_effect(effect, scored_card, key, amount, fro end if (key == 'asc') or (key == 'asc_mod') or key == "x_asc" then local e = card_eval_status_text - local orig = to_big((G.GAME.asc_power_hand or 0) + G.GAME.current_round.current_hand.cry_asc_num) - G.GAME.asc_power_hand = to_big((G.GAME.asc_power_hand or 1) + G.GAME.current_round.current_hand.cry_asc_num) * to_big(amount) - if G.GAME.current_round.current_hand.cry_asc_num == 0 then G.GAME.current_round.current_hand.cry_asc_num = 1 end - local text = G.GAME.asc_power_hand + for i, v in pairs(SMODS.find_card("j_entr_axeh")) do + amount = amount * v.ability.asc_mod + end + local orig = to_big((G.GAME.asc_power_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)) G.E_MANAGER:add_event(Event({ func = function() - G.GAME.current_round.current_hand.cry_asc_num_text = (to_big(text) < to_big(0) and " (" or " (+") .. (to_big(text)) .. ")" + 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 })) @@ -1312,12 +1434,16 @@ function SMODS.calculate_individual_effect(effect, scored_card, key, amount, fro end if (key == 'plus_asc') or (key == 'plusasc_mod') then local e = card_eval_status_text - local orig = to_big((G.GAME.asc_power_hand or 0) + G.GAME.current_round.current_hand.cry_asc_num) - G.GAME.asc_power_hand = to_big((G.GAME.asc_power_hand or 0) + G.GAME.current_round.current_hand.cry_asc_num) + to_big(amount) - local text = G.GAME.asc_power_hand + for i, v in pairs(SMODS.find_card("j_entr_axeh")) do + amount = amount * v.ability.asc_mod + end + local orig = to_big((G.GAME.asc_power_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)) G.E_MANAGER:add_event(Event({ func = function() - G.GAME.current_round.current_hand.cry_asc_num_text = (to_big(text) < to_big(0) and " (" or " (+") .. (to_big(text)) .. ")" + 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 })) @@ -1332,12 +1458,16 @@ function SMODS.calculate_individual_effect(effect, scored_card, key, amount, fro end if (key == 'exp_asc') or (key == 'exp_asc_mod') then local e = card_eval_status_text - local orig = to_big((G.GAME.asc_power_hand or 0) + G.GAME.current_round.current_hand.cry_asc_num) - G.GAME.asc_power_hand = to_big((G.GAME.asc_power_hand or 0) + G.GAME.current_round.current_hand.cry_asc_num) ^ to_big(amount) - local text = G.GAME.asc_power_hand + for i, v in pairs(SMODS.find_card("j_entr_axeh")) do + amount = amount * v.ability.asc_mod + end + local orig = to_big((G.GAME.asc_power_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)) G.E_MANAGER:add_event(Event({ func = function() - G.GAME.current_round.current_hand.cry_asc_num_text = (to_big(text) < to_big(0) and " (" or " (+") .. (to_big(text)) .. ")" + 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 })) @@ -1351,13 +1481,17 @@ function SMODS.calculate_individual_effect(effect, scored_card, key, amount, fro 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 orig = to_big((G.GAME.asc_power_hand or 0) + G.GAME.current_round.current_hand.cry_asc_num) - G.GAME.asc_power_hand = to_big((G.GAME.asc_power_hand or 0) + G.GAME.current_round.current_hand.cry_asc_num):arrow(amount[1], amount[2]) - local text = G.GAME.asc_power_hand + local orig = to_big((G.GAME.asc_power_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)) G.E_MANAGER:add_event(Event({ func = function() - G.GAME.current_round.current_hand.cry_asc_num_text = (to_big(text) < to_big(0) and " (" or " (+") .. (to_big(text)) .. ")" + 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 })) @@ -1391,16 +1525,27 @@ end local entr_define_dt = 0 local entr_antireal_dt = 0 local entr_xekanos_dt = 0 +local entr_grahkon_dt = 0 local bdt = 0 local entr_prismatic_dt = 0 local update_ref = Game.update Entropy.last_csl = nil Entropy.last_slots = nil local cdt = 0 +local eedt = 0 +local p_s = false + +Entropy.ee_faces[#Entropy.ee_faces+1] = {pos = {y = 11, x = 0}} +Entropy.ee_faces[#Entropy.ee_faces+1] = {pos = {y = 12, x = 0}} +Entropy.ee_faces[#Entropy.ee_faces+1] = {pos = {y = 13, x = 0}} + function Game:update(dt) if entr_xekanos_dt > 0.05 then entr_xekanos_dt = 0 end + if entr_grahkon_dt > 0.1 then + entr_grahkon_dt = 0 + end if bdt > 0.15 then bdt = 0 end @@ -1428,6 +1573,11 @@ function Game:update(dt) if pointerobj.pos.x > 10 then pointerobj.pos.x = 0 end + local crimsonobj = G.P_CENTERS.j_entr_blooming_crimson + crimsonobj.pos.x = crimsonobj.pos.x + 1 + if crimsonobj.pos.x > 7 then + crimsonobj.pos.x = 0 + end end entr_antireal_dt = entr_antireal_dt + dt if G.P_CENTERS and G.P_CENTERS.j_entr_antireal and entr_antireal_dt > 0.05 then @@ -1444,6 +1594,7 @@ function Game:update(dt) end end entr_xekanos_dt = entr_xekanos_dt + 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 @@ -1472,6 +1623,39 @@ function Game:update(dt) 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")) + then + G.GAME.EE_FADE = G.GAME.EE_FADE or 0 + G.GAME.EE_FADE = G.GAME.EE_FADE + dt * 0.5 + eedt = eedt - dt + if eedt <= 0 then + p_s = not p_s + if p_s then + local atlas = "entr_blinds" + G.GAME.blind.children.animatedSprite:set_sprite_pos(G.GAME.blind.config.blind.pos) + G.GAME.blind.children.animatedSprite.atlas = G.ANIMATION_ATLAS[atlas] + G.GAME.blind.children.animatedSprite:reset() + eedt = 0.8 + math.random() * 0.7 + else + local elem = pseudorandom_element(Entropy.ee_faces, pseudoseed("asdkljasdkjlasdk;j")) + atlas = elem.atlas or "entr_blinds" + G.GAME.blind.children.animatedSprite:set_sprite_pos(elem.pos) + G.GAME.blind.children.animatedSprite.atlas = G.ANIMATION_ATLAS[atlas] + G.GAME.blind.children.animatedSprite:reset() + eedt = math.random() * 0.4 + 0.1 + end + end + end + if G.GAME.EE_R then + if G.GAME.EE_FADE > 10 then + G.GAME.EE_FADE = 10 + end + G.GAME.EE_FADE = G.GAME.EE_FADE - dt * 3 + end end local card_drawref = Card.draw @@ -1493,40 +1677,40 @@ function Card:draw(layer) v.children.floating_sprite:set_sprite_pos({x=1, y=3}) end end + if self.config.center.key == "j_entr_grahkon" or self.config.center.key == "j_entr_nokharg" then + if entr_grahkon_dt > 0.1 then + local v = self + local obj = {pos = v.children.floating_sprite.sprite_pos} + obj.pos.x = obj.pos.x + 1 + if obj.pos.x > 5 then + obj.pos.x = 1 + obj.pos.y = obj.pos.y + 1 + end + if obj.pos.y > 3 then + obj.pos.y = 0 + obj.pos.x = 1 + end + v.children.floating_sprite:set_sprite_pos(obj.pos) + end + end if bdt >= 0.15 and self.config.center.set == "CBlind" then local obj = {pos = self.children.center.sprite_pos} obj.pos.x = obj.pos.x + 1 - if obj.pos.x >= self.children.center.atlas.frames or 21 then + if to_number(obj.pos.x) >= to_number(self.children.center.atlas.frames or 21) then obj.pos.x = 0 end end return card_drawref(self, layer) end -local create_ref = create_card -function create_card(_type, area, legendary, _rarity, skip_materialize, soulable, forced_key, key_append, ...) - local card = create_ref(_type, area, legendary, _rarity, skip_materialize, soulable, forced_key, key_append, ...) - if card and card.ability and card.ability.name == "entr-solarflare" then - card:set_edition("e_entr_solar", true, nil, true) - end - if card and card.ability and card.ability.name == "entr-trapezium_cluster" then - card:set_edition("e_entr_fractured", true, nil, true) - end - if card and card.ability and card.ability.name == "entr-eden" then - card:set_edition("e_entr_sunny", true, nil, true) - end - if card and card.ability and card.ability.name == "entr-ridiculus_absens" then - card:set_edition("e_cry_glitched", true, nil, true) - card.ability.cry_prob = 1 - card.ability.extra.odds = 2 - end - return card -end - local ref = level_up_hand function level_up_hand(card, hand, instant, amount, ...) if next(SMODS.find_card("j_entr_strawberry_pie")) and hand ~= "High Card" then - hand = "High Card" + for i, v in pairs(SMODS.find_card("j_entr_strawberry_pie")) do + if SMODS.pseudorandom_probability(v, v.ability.num, v.ability.denom, "entr_strawberry") then + hand = "High Card" + end + end end local val = ref(card,hand,instant,amount, ...) return val @@ -1612,11 +1796,50 @@ function create_card(_type, area, legendary, _rarity, skip_materialize, soulable end end local card = ref(_type, area, legendary, _rarity, skip_materialize, soulable, forced_key, key_append, dont_calculate, ...) + if card and card.ability and card.ability.name == "entr-solarflare" then + card:set_edition("e_entr_solar", true, nil, true) + end + if card and card.ability and card.ability.name == "entr-trapezium_cluster" then + card:set_edition("e_entr_fractured", true, nil, true) + end + if card and card.ability and card.ability.name == "entr-eden" then + card:set_edition("e_entr_sunny", true, nil, true) + end + if card and card.ability and card.ability.name == "entr-ridiculus_absens" then + card:set_edition("e_cry_glitched", true, nil, true) + 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"))) and not forced_key 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 pseudorandom("crafting") < 0.5 then + card:set_ability(SMODS.poll_enhancement({guaranteed = true, key = "entr_crafting"})) + end + end + if card and card.ability and card.ability.consumeable then + for i, a in pairs(SMODS.get_card_areas('jokers')) do + for _, c in pairs(a.cards) do + if c.config.center.calculate then + local ret = c.config.center:calculate(c, { + get_consumable_type = true, + set = card.config.center.set, + hidden = card.config.center.hidden + }) + 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)) + break + end + end + end + end + end + if next(SMODS.find_card("j_entr_kitchenjokers")) and card:is_food() then + card:set_edition("e_entr_lowres") + end return card end @@ -1638,6 +1861,72 @@ function SMODS.calculate_context(context, return_table) 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 @@ -1701,13 +1990,10 @@ function Cryptid.ascend(num, curr2) -- edit this function at your leisure (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(50) then + if to_big(curr2 or 0) > to_big(40) then num2 = num2 + diff ^ 0.3 end curr2 = num2 - if Entropy.BlindIs(G.GAME.blind, "bl_entr_scarlet_sun") and not G.GAME.blind.disabled then - curr2 = curr2 * (Entropy.IsEE() and -0.25 or -1) - end if next(SMODS.find_card("j_entr_helios")) then local curr = 1 for i, v in pairs(G.jokers.cards) do @@ -1724,7 +2010,7 @@ end local pokerhandinforef = G.FUNCS.get_poker_hand_info function G.FUNCS.get_poker_hand_info(_cards) G.GAME.current_round.current_hand.cry_asc_num = 0 - if next(SMODS.find_card("j_entr_helios")) or (Entropy.BlindIs(G.GAME.blind, "bl_entr_scarlet_sun") and not G.GAME.blind.disabled) then G.GAME.used_vouchers.v_cry_hyperspacetether = true end + 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) if text and G.GAME.badarg and G.GAME.badarg[text] and text ~= "NULL" then G.boss_throw_hand = true @@ -1779,12 +2065,14 @@ function ease_ante(mod) for i, v in pairs(G.GAME.runes or {}) do if G.P_RUNES[v.key].calculate then local ret = G.P_RUNES[v.key]:calculate(v, {entr_ante_change = mod}) - if ret and ret.ante_mod then + if ret then v:yep("+", G.C.PURPLE, function() return true end) - mod = ret.ante_mod - break; + if ret.ante_mod then + mod = ret.ante_mod + break + end end end end @@ -1798,9 +2086,87 @@ function Card:is_jolly() return is_jollyref(self) end +local AscendantTags = { + tag_uncommon="tag_entr_ascendant_rare", + tag_rare= (SMODS.Mods["Cryptid"] or {}).can_load and "tag_entr_ascendant_epic" or "tag_entr_ascendant_rare", + tag_negative="tag_entr_ascendant_negative", + tag_foil="tag_entr_ascendant_foil", + tag_holo="tag_entr_ascendant_holo", + tag_polychrome="tag_entr_ascendant_poly", + tag_investment="tag_entr_ascendant_stock", + tag_voucher="tag_entr_ascendant_voucher", + tag_boss="tag_entr_ascendant_blind", + tag_standard="tag_entr_ascendant_twisted", + tag_charm="tag_entr_ascendant_twisted", + tag_meteor="tag_entr_ascendant_twisted", + tag_buffoon="tag_entr_ascendant_ejoker", + tag_handy="tag_entr_ascendant_stock", + tag_garbage="tag_entr_ascendant_stock", + tag_ethereal="tag_entr_ascendant_twisted", + tag_coupon="tag_entr_ascendant_credit", + tag_double="tag_entr_ascendant_copying", + tag_juggle="tag_entr_ascendant_effarcire", + tag_d_six="tag_entr_ascendant_credit", + tag_top_up="tag_entr_ascendant_topup", + tag_skip="tag_entr_ascendant_stock", + tag_economy="tag_entr_ascendant_stock", + tag_orbital="tag_entr_ascendant_universal", + tag_cry_epic="tag_entr_ascendant_epic", + tag_cry_glitched="tag_entr_ascendant_glitched", + tag_cry_mosaic="tag_entr_ascendant_mosaic", + tag_cry_oversat="tag_entr_ascendant_oversat", + tag_cry_glass="tag_entr_ascendant_glass", + tag_cry_gold="tag_entr_ascendant_gold", + tag_cry_blur="tag_entr_ascendant_blurry", + tag_cry_astral="tag_entr_ascendant_astral", + tag_cry_m="tag_entr_ascendant_m", + tag_cry_double_m="tag_entr_ascendant_m", + tag_cry_cat="tag_entr_ascendant_cat", + tag_cry_gambler="tag_entr_ascendant_unbounded", + tag_cry_empowered="tag_entr_ascendant_unbounded", + tag_cry_better_voucher="tag_entr_ascendant_better_voucher", + tag_cry_memory="tag_entr_ascendant_copying", + tag_cry_better_top_up="tag_entr_ascendant_better_topup", + tag_cry_bundle="tag_entr_ascendant_ebundle", + tag_cry_gourmand="tag_entr_ascendant_saint", + tag_cry_triple="tag_entr_ascendant_copying", + tag_cry_quadruple="tag_entr_ascendant_copying", + tag_cry_quintuple="tag_entr_ascendant_copying", + tag_cry_scope="tag_entr_ascendant_infdiscard", + tag_cry_schematic="tag_entr_ascendant_canvas", + tag_cry_loss="tag_entr_ascendant_reference", + tag_cry_banana="tag_entr_ascendant_cavendish", + tag_cry_booster="tag_entr_ascendant_booster", + tag_cry_console="tag_entr_ascendant_twisted", + tag_entr_dog="tag_entr_ascendant_dog", + tag_entr_solar="tag_entr_ascendant_solar", + tag_entr_ascendant_rare=(SMODS.Mods["Cryptid"] or {}).can_load and "tag_entr_ascendant_epic" or nil, + tag_entr_ascendant_epic="tag_entr_ascendant_legendary", + --tag_entr_ascendant_legendary="tag_entr_ascendant_exotic", + --tag_entr_ascendant_exotic="tag_entr_ascendant_entropic", + tag_entr_sunny = "tag_entr_ascendant_sunny", + tag_entr_freaky = "tag_entr_ascendant_freaky", + tag_entr_fractured = "tag_entr_ascendant_fractured", + tag_valk_kitty = "tag_entr_ascendant_kitty", + tag_valk_negativeeternal = "tag_entr_negative_eternal", + + tag_entr_fractured = "tag_entr_ascendant_fractured", + tag_entr_freaky = "tag_entr_ascendant_freaky", + tag_entr_kaleidoscopic = "tag_entr_ascendant_kaleidoscopic", + tag_entr_neon = "tag_entr_ascendant_neon", + tag_entr_lowres = "tag_entr_ascendant_lowres", + tag_entr_arcane = "tag_entr_ascendant_arcane" +} +for i, v in pairs(AscendantTags) do Entropy.AscendedTags[i]=v end local ref = Tag.init function Tag:init(_tag, for_collection, _blind_type, ...) + if next(SMODS.find_card("j_entr_ruby")) and not for_collection then + local roll = pseudorandom("ruby_asc") + if roll < 0.15 and Entropy.AscendedTags[_tag] then + _tag = Entropy.AscendedTags[_tag] + end + end if next(SMODS.find_card("j_entr_exousia")) and Entropy.AscendedTags[_tag] and not for_collection then _tag = Entropy.AscendedTags[_tag] local procs = 1 @@ -1821,32 +2187,6 @@ local TrumpCardAllow = { ["Tarot"] = true, ["Code"] = true } -local matref = Card.set_ability -function Card:set_ability(center, initial, delay_sprites) - G.GAME.entropy = G.GAME.entropy or 0 - if G.SETTINGS.paused then - matref(self, center, initial, delay_sprites) - else - if self.config and self.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 self.area or not self.area.config.collection) and Entropy.Inversion(center) then - matref(self, G.P_CENTERS[Entropy.Inversion(center)], initial, delay_sprites) - elseif self.config and self.config.center - and pseudorandom("trump_card") < 0.10 and G.GAME.TrumpCard and G.STATE == G.STATES.SMODS_BOOSTER_OPENED - and TrumpCardAllow[center.set] and (not self.area or not self.area.config.collection) then - matref(self, G.P_CENTERS["c_entr_flipside"], initial, delay_sprites) - elseif self.config and self.config.center and self.config.center.set == "Booster" - and pseudorandom("supersede") < 0.20 and G.GAME.Supersede and G.STATE == G.STATES.SHOP and (not self.area or not self.area.config.collection) then - local type = (center.cost == 6 and "jumbo") or (center.cost == 8 and "mega") or "normal" - matref(self, G.P_CENTERS["p_entr_twisted_pack_"..type], initial, delay_sprites) - elseif self.config and self.config.center and self.config.center.set == "Booster" - and to_big(pseudorandom("doc")) < to_big(1-(0.995^(G.GAME.entropy/2))) and G.STATE == G.STATES.SHOP and (not self.area or not self.area.config.collection) and Entropy.DeckOrSleeve("doc") then - local type = (center.cost == 6 and "jumbo_1") or (center.cost == 8 and "mega_1") or "normal_"..pseudorandom_element({1,2},pseudoseed("doc")) - matref(self, G.P_CENTERS["p_spectral_"..type], initial, delay_sprites) - else - matref(self, center, initial, delay_sprites) - end - end -end G.FUNCS.has_inversion = function(e) if G.GAME.last_inversion and G.GAME.last_inversion.key ~= "c_entr_master" then @@ -1865,23 +2205,44 @@ G.FUNCS.has_inversion = function(e) end local ref = G.FUNCS.use_card G.FUNCS.use_card = function(e, mute, nosave) + local twis = G.GAME.modifiers.entr_twisted + G.GAME.modifiers.entr_twisted = nil local card = e.config.ref_table card.ability.bypass_aleph = true ref(e, mute, nosave) - if Entropy.is_inverted(card.config.center) and not card.config.center.hidden then - G.GAME.last_inversion = { - key = card.config.center.key, - set = card.config.center.set - } - end - if card.config.center.set == "Fraud" and (card.config.center.key ~= "c_entr_prophecy" or not G.GAME.last_fraud) then - G.GAME.last_fraud = { - key = card.config.center.key, - set = card.config.center.set - } + G.GAME.modifiers.entr_twisted = twis + G.E_MANAGER:add_event(Event{ + trigger = "after", + delay = 2, + blocking = false, + blockable = true, + func = function() + if Entropy.is_inverted(card.config.center) and not card.config.center.hidden then + G.GAME.last_inversion = { + key = card.config.center.key, + set = card.config.center.set + } + elseif not card.config.center.hidden and next(SMODS.find_card("j_entr_enlightenment")) then + G.GAME.last_tarot_planet = card.config.center.key + end + if card.config.center.set == "Fraud" and (card.config.center.key ~= "c_entr_prophecy" or not G.GAME.last_fraud) then + G.GAME.last_fraud = { + key = card.config.center.key, + set = card.config.center.set + } + end + G.GAME.entr_used_cards = G.GAME.entr_used_cards or {} + G.GAME.entr_used_cards[card.config.center.key] = (G.GAME.entr_used_cards[card.config.center.key] or 0) + 1 + return true + 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, {}) + break + end end - G.GAME.entr_used_cards = G.GAME.entr_used_cards or {} - G.GAME.entr_used_cards[card.config.center.key] = (G.GAME.entr_used_cards[card.config.center.key] or 0) + 1 end local main_ref = evaluate_play_main @@ -1918,16 +2279,12 @@ end local set_abilityref = Card.set_ability function Card:set_ability(center, f, s) if type(center) == "string" then center = G.P_CENTERS[center] end + if center and center.set == "Joker" and G.GAME.magic_skin_prob and pseudorandom("entr_magic_skin") < G.GAME.magic_skin_prob then + set_abilityref(self, G.P_CENTERS.j_entr_magic_skin, initial, delay_sprites) + return + end if (self.config and self.config.center and self.config.center.key ~= "m_entr_disavowed" and (not self.entr_aleph or self.ability.bypass_aleph)) or G.SETTINGS.paused then - if center and Entropy.Inversion(center) and not G.SETTINGS.paused and (G.GAME.modifiers.entr_twisted or center.set == "Planet" and G.GAME.entr_princess) and not self.multiuse and (not self.ability or not self.ability.fromflipside) then - if Entropy.allow_spawning(center) and Entropy.allow_spawning(G.P_CENTERS[Entropy.Inversion(center)]) then - set_abilityref(self, G.P_CENTERS[Entropy.Inversion(center)] or center, f, s) - else - set_abilityref(self, Entropy.GetPooledCenter(G.P_CENTERS[Entropy.Inversion(center)].set), f, s) - end - else - set_abilityref(self, center, f, s) - end + set_abilityref(self, center, f, s) else if not self.entr_aleph and not G.SETTINGS.paused then set_abilityref(self, G.P_CENTERS.m_entr_disavowed, f, s) @@ -1935,6 +2292,12 @@ function Card:set_ability(center, f, s) set_abilityref(self, self.config.center, f, s) end end + if (G.GAME.modifiers.entr_reverse_redeo or G.GAME.ReverseRedeo) and self.config.center.key == "j_cry_redeo" then + self.ability.extra.ante_reduction = -1 + end + if self.ability.consumeable and Entropy.has_rune("rune_entr_gluttony") then + self.ability.eternal = true + end end local set_abilityref = Card.set_ability @@ -1955,6 +2318,10 @@ end local use_cardref = G.FUNCS.use_card G.FUNCS.use_card = function(e, mute, nosave) local card = e.config.ref_table + if card.ability.glitched_crown then + 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 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 @@ -2190,7 +2557,10 @@ function create_UIBox_blind_select() 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} end end if G.GAME.modifiers.zenith then @@ -2408,6 +2778,7 @@ function add_tag(_tag, ...) else add_tagref(_tag, ...) end + G.GAME.last_tag = _tag.key end local disable_ref = Blind.disable @@ -2430,28 +2801,19 @@ function Game:update(dt) upd(self, dt) cdt = cdt + dt if cdt > 0.01 then - if G.jokers and G.GAME.blind and G.GAME.blind.config.blind.key == "bl_entr_endless_entropy_phase_two" then - local dtmod = math.min(G.SETTINGS.GAMESPEED, 4)/2+0.5 - ee2dt = ee2dt + dt*dtmod - if ee2dt > 1 then - for i, v in pairs(G.jokers.cards) do - if not Card.no(G.jokers.cards[i], "immutable", true) then - Cryptid.manipulate(G.jokers.cards[i], { value=0.975 }) - end - end - ee2dt = ee2dt - 1 - end - end if G.jokers and G.GAME.blind and G.GAME.blind.config.blind.key == "bl_entr_endless_entropy_phase_three" then G.HUD_blind:get_UIE_by_ID("score_at_least").config.text = localize("ph_blind_score_less_than") for i, v in pairs(G.jokers.cards) do - v.debuff = false + v:set_debuff(false) end for i = 1, math.ceil(math.max(G.jokers.config.card_limit, #G.jokers.cards)/5) do if G.jokers.cards[i] then G.jokers.cards[i].debuff = true end end + end + if G.jokers and G.GAME.blind and (G.GAME.blind.config.blind.key == "bl_entr_endless_entropy_phase_two" or G.GAME.blind.config.blind.key == "bl_entr_endless_entropy_phase_four") then + G.HUD_blind:get_UIE_by_ID("score_at_least").config.text = localize("ph_blind_score_at_least") end cdt = 0 end @@ -2542,76 +2904,6 @@ function Blind:defeat(s) dft(self, s) end -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) - local hand_table = { - ["High Card"] = G.GAME.used_vouchers.v_cry_hyperspacetether and 1 or nil, - ["Pair"] = G.GAME.used_vouchers.v_cry_hyperspacetether and 2 or nil, - ["Two Pair"] = 4, - ["Three of a Kind"] = G.GAME.used_vouchers.v_cry_hyperspacetether and 3 or nil, - ["Straight"] = next(SMODS.find_card("j_four_fingers")) and Cryptid.gameset() ~= "modest" and 4 or 5, - ["Flush"] = next(SMODS.find_card("j_four_fingers")) and Cryptid.gameset() ~= "modest" and 4 or 5, - ["Full House"] = 5, - ["Four of a Kind"] = G.GAME.used_vouchers.v_cry_hyperspacetether and 4 or nil, - ["Straight Flush"] = next(SMODS.find_card("j_four_fingers")) and Cryptid.gameset() ~= "modest" and 4 or 5, --debatable - ["cry_Bulwark"] = 5, - ["Five of a Kind"] = 5, - ["Flush House"] = 5, - ["Flush Five"] = 5, - ["cry_Clusterfuck"] = 8, - ["cry_UltPair"] = 8, - ["cry_WholeDeck"] = 52, - } - -- if Entropy.CheckTranscendence(_cards) ~= "None" or (G.GAME.hands[text] and G.GAME.hands[text].TranscensionPower) then - -- ease_colour(G.C.UI_CHIPS, copy_table(HEX("84e1ff")), 0.3) - -- ease_colour(G.C.UI_MULT, copy_table(HEX("84e1ff")), 0.3) - -- else - if hand_table[text] and next(scoring_hand) and #scoring_hand > hand_table[text] and G.GAME.Overflow 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) - elseif G.GAME.hands[text] and G.GAME.hands[text].AscensionPower then - 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) - else - ease_colour(G.C.GOLD, copy_table(HEX("EABA44")), 0.3) - end - if G.GAME.hands[text] and G.GAME.hands[text].AscensionPower then - G.GAME.current_round.current_hand.cry_asc_num = G.GAME.current_round.current_hand.cry_asc_num + G.GAME.hands[text].AscensionPower - end - G.GAME.current_round.current_hand.cry_asc_num = (G.GAME.current_round.current_hand.cry_asc_num or 0) * (1+(G.GAME.nemesisnumber or 0)) - if Entropy.BlindIs(G.GAME.blind, "bl_entr_scarlet_sun") and not G.GAME.blind.disabled then - G.GAME.current_round.current_hand.cry_asc_num = G.GAME.current_round.current_hand.cry_asc_num * (Entropy.IsEE() and -0.25 or -1) - end - -- if Entropy.CheckTranscendence(_cards) ~= "None" then - -- G.GAME.current_round.current_hand.entr_trans_num_text = "Transcendant " - -- G.GAME.TRANSCENDENT = true - -- 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 - if to_big(G.GAME.current_round.current_hand.cry_asc_num) ~= to_big(0) then - if to_big(G.GAME.current_round.current_hand.cry_asc_num) > to_big(0) then - G.GAME.current_round.current_hand.cry_asc_num_text = " (+"..G.GAME.current_round.current_hand.cry_asc_num..")" - else - G.GAME.current_round.current_hand.cry_asc_num_text = " ("..G.GAME.current_round.current_hand.cry_asc_num..")" - end - else - G.GAME.current_round.current_hand.cry_asc_num_text = "" - end - -- if Entropy.CheckTranscendence(_cards) == "None" then - -- G.GAME.current_round.current_hand.entr_trans_num_text = "" - -- end - if Entropy.BlindIs(G.GAME.blind, "bl_entr_scarlet_sun") and not G.GAME.blind.disabled then - G.GAME.current_round.current_hand.cry_asc_num = G.GAME.current_round.current_hand.cry_asc_num * (Entropy.IsEE() and -0.25 or -1) - end - return text, loc_disp_text, poker_hands, scoring_hand, disp_text -end - - local ref = update_hand_text function update_hand_text(config, vals) @@ -2642,18 +2934,6 @@ function update_hand_text(config, vals) end ref(config, vals) end - -local create_ref = create_card -function create_card(_type, area, legendary, _rarity, skip_materialize, soulable, forced_key, key_append, ...) - local card = create_ref(_type, area, legendary, _rarity, skip_materialize, soulable, forced_key, key_append, ...) - if card and card.config and card.config.center and card.config.center.key == "c_base" and Entropy.DeckOrSleeve("crafting") then - if pseudorandom("crafting") < 0.5 then - card:set_ability(pseudorandom_element(G.P_CENTER_POOLS.Enhanced, pseudoseed("crafting"))) - end - end - return card -end - function Entropy.GetRecipeResult(val,jokerrares,seed) local rare = 1 local cost=0 @@ -2956,12 +3236,16 @@ function CardArea:emplace(card, location, stay_flipped) if self == G.consumeables then calculate_runes({consumable_emplaced = true, consumeable=card}) end + if card.ability.glitched_crown and self.config.type ~= "shop" then + card:set_ability(G.P_CENTERS[card.ability.glitched_crown[card.glitched_index]]) + card.ability.glitched_crown = nil + end end local end_roundref = end_round function end_round() 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 (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 to_big(G.GAME.chips) > to_big(G.GAME.blind.chips) 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({ @@ -2983,16 +3267,6 @@ function end_round() else end_roundref() end - if G.GAME.earl_hands then - G.GAME.round_resets.hands = G.GAME.round_resets.hands + G.GAME.earl_hands - ease_hands_played(G.GAME.earl_hands) - G.GAME.earl_hands = nil - end - if G.GAME.earl_discards then - G.GAME.round_resets.discards = G.GAME.round_resets.discards + G.GAME.earl_discards - ease_discard(G.GAME.earl_discards) - G.GAME.earl_discards = nil - end if G.GAME.candle_hand_size then G.hand:handle_card_limit(-G.GAME.candle_hand_size) G.GAME.candle_hand_size = nil @@ -3173,7 +3447,7 @@ G.FUNCS.draw_from_deck_to_hand = function(e) if actual > 0 then for i = 1, actual do local card = SMODS.create_card{ - key = Entropy.pseudorandom_element(G.P_CENTER_POOLS.Enhanced, pseudoseed("pandora"), function(e) return e.no_doe or G.GAME.banned_keys[e.key] end).key, + key = SMODS.poll_enhancement({guaranteed = true, key = "entr_pandora"}), set = "Enhanced", area = G.hand } @@ -3362,14 +3636,21 @@ function CardArea:parse_highlighted() parse_ref(self) local text,disp_text,poker_hands = G.FUNCS.get_poker_hand_info(self.highlighted) if G.GAME.hands[text] and G.GAME.hands[text].operator then - G.GAME.old_operator = G.GAME.current_scoring_calculation_key or "multiply" + 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) G.GAME.old_operator = nil + else + SMODS.set_scoring_calculation("multiply") end end +local set_scoring_calculation_funcref = G.FUNCS.SMODS_scoring_calculation_function +G.FUNCS.SMODS_scoring_calculation_function = function(e) + if e then set_scoring_calculation_funcref(e) end +end + local ref = SMODS.set_scoring_calculation function SMODS.set_scoring_calculation(key, ...) G.GAME.current_scoring_calculation_key = key @@ -3409,9 +3690,15 @@ G.FUNCS.evaluate_play = function(e) end function Entropy.GetDummy(center, area, self) - local abil = copy_table(center.config) + local abil = copy_table(center.config) or {} abil.consumeable = copy_table(abil) abil.name = center.name or center.key + local eligible_editionless_jokers = {} + for i, v in pairs(G.jokers.cards) do + if not v.edition then + eligible_editionless_jokers[#eligible_editionless_jokers+1] = v + end + end local tbl = { ability = abil, config = { @@ -3434,9 +3721,16 @@ function Entropy.GetDummy(center, area, self) local ret = Card.use_consumeable(self, ...) self.bypass_echo = nil end, + can_use_consumeable = function(self, ...) + return Card.can_use_consumeable(self, ...) + end, 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 } for i, v in pairs(self) do if type(v) == "function" and i ~= "flip_side" then @@ -3521,7 +3815,7 @@ SMODS.Booster:take_ownership_by_kind('Celestial', { if G.GAME.entr_diviner then if pseudorandom("entr_generate_rune") < 0.06 then rune = true end end - if rune then + if rune and (i ~= 1 or not G.GAME.used_vouchers.v_telescope) then return create_card("Rune", G.pack_cards, nil, nil, true, true, nil, "spe") end local _card @@ -3551,6 +3845,9 @@ SMODS.Booster:take_ownership_by_kind('Celestial', { local get_probability_varsref = SMODS.get_probability_vars function SMODS.get_probability_vars(trigger_obj, base_numerator, base_denominator, identifier, from_roll) + if trigger_obj and trigger_obj.config and trigger_obj.config.center and not Entropy.probability_cards[trigger_obj.config.center.key] then + Entropy.probability_cards[trigger_obj.config.center.key] = true + end local numerator, denominator = get_probability_varsref(trigger_obj, base_numerator, base_denominator, identifier, from_roll) if type(numerator) == "string" or numerator == nil then numerator = 1 end if type(denominator) == "string" or denominator == nil then denominator = 1 end @@ -3588,11 +3885,37 @@ function SMODS.pseudorandom_probability(trigger_obj, seed, base_numerator, base_ local res = probability_ref(trigger_obj, seed, base_numerator, base_denominator, identifier) if res then return res end end + if next(SMODS.find_card("j_entr_heimartai")) and not next(SMODS.find_card("j_entr_d0")) then + local res = probability_ref(trigger_obj, seed, base_numerator, base_denominator, identifier) + local rolls = 1 + while not res do + res = probability_ref(trigger_obj, seed, base_numerator, base_denominator, identifier) + card_eval_status_text( + trigger_obj, + "extra", + nil, + nil, + nil, + { message = not res and localize("k_again_ex") or "Success!", colour = G.C.GREEN } + ) + rolls = rolls + 1 + end + for i, v in pairs(SMODS.find_card("j_entr_heimartai")) do + SMODS.scale_card(v, { + ref_table = v.ability, + ref_value = "echips", + scalar_table = {val = rolls / base_denominator}, + scalar_value = "val" + }) + end + return res + end return probability_ref(trigger_obj, seed, base_numerator, base_denominator, identifier) 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 next(SMODS.find_card("j_entr_opal")) and not bypass then return false end @@ -3600,6 +3923,18 @@ function SMODS.has_no_suit(card, bypass) return has_no_suitref(card) 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 + 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 + return in_scoringref(card, ...) +end + local get_idref = Card.get_id function Card:get_id(...) local id = get_idref(self, ...) @@ -3611,20 +3946,23 @@ end local rate_ref = Cryptid.interest_rate function Cryptid.interest_rate() - local rate = Entropy.has_rune("rune_entr_loyalty") and 4 + local rate = Entropy.has_rune("rune_entr_loyalty") and math.max(5 - (Entropy.has_rune("rune_entr_loyalty").ability.count or 1), 1) if rate then return rate end return rate_ref and rate_ref() or G.GAME.modifiers.cry_interest_rate or 5 end local interest_ref = Cryptid.get_interest function Cryptid.get_interest(add_rows) + local cap = G.GAME.interest_cap + G.GAME.interest_cap = G.GAME.interest_cap +(G.GAME.companion_interest_cap or 0) if interest_ref then local interest = interest_ref(add_rows) + G.GAME.interest_cap = cap return interest else local rate = Cryptid.interest_rate() local interest = math.min(math.floor(G.GAME.dollars / rate), G.GAME.interest_cap / 5) - interst = interest * G.GAME.interest_amount + interest = interest * G.GAME.interest_amount for _, a in pairs(SMODS.get_card_areas("jokers")) do for i, c in pairs(a.cards) do if c.config.center.cry_calc_interest then @@ -3632,6 +3970,7 @@ function Cryptid.get_interest(add_rows) end end end + G.GAME.interest_cap = cap return interest end end @@ -3656,11 +3995,26 @@ end local is_eternalref = SMODS.is_eternal function SMODS.is_eternal(c, ...) if c and c.ability and c.ability.entr_aleph then return true end - return is_eternalref(c, ...) + if c and (c.area == G.play or c.area == G.hand or c.area == G.deck) and (c.ability.eternal or c.ability.entr_aleph) then + return true + end + if c then + return is_eternalref(c, ...) + end end local open_ref = Card.open function Card:open(...) + if next(SMODS.find_card("j_entr_enlightenment")) then + if self.config.center.kind == "Inverted" then + G.GAME.last_inversion = { + key = self.config.center.key, + set = self.config.center.set + } + else + G.GAME.last_tarot_planet = self.config.center.key + end + end open_ref(self, ...) G.E_MANAGER:add_event(Event{ trigger = "after", @@ -3677,17 +4031,32 @@ function Card:open(...) return true end }) + if Entropy.DeckOrSleeve("crafting") then + G.hand.config.highlighted_limit = math.max(G.hand.config.highlighted_limit, 5) + end +end + +local new_round_ref = new_round +function new_round(...) + new_round_ref(...) + if Entropy.DeckOrSleeve("crafting") then + G.hand.config.highlighted_limit = math.max(G.hand.config.highlighted_limit, 5) + end end local copy_cardref = copy_card function copy_card(old, new, ...) + local tw = G.GAME.modifiers.entr_twisted + G.GAME.modifiers.entr_twisted = nil local copy = copy_cardref(old, new, ...) if G.deck and not G.SETTINGS.paused then SMODS.calculate_context{copying_card = true, original_card = old, new_card = copy} end - for i, v in pairs(G.play.cards) do + for i, v in pairs(G.play and G.play.cards or {}) do eval_card(v, {copying_card = true, original_card = old, new_card = copy}) 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 @@ -3781,3 +4150,325 @@ function Card:sell_card() end sell_card_stuff(self) end + +SMODS.Consumable:take_ownership("fool", { + loc_vars = function(self, info_queue, card) + local fool_c = G.GAME.last_tarot_planet and G.P_CENTERS[G.GAME.last_tarot_planet] or nil + local last_tarot_planet = fool_c and localize { type = 'name_text', key = fool_c.key, set = fool_c.set == "Booster" and "Other" or fool_c.set } or + localize('k_none') + + if last_tarot_planet == "ERROR" then + local nodes = {} + localize{type = 'name', set = "Other", key = fool_c.key, nodes = nodes} + if not nodes[1] then + localize{type = 'name', set = "Other", key = string.gsub(fool_c.key, "_[0-9]*$", ""), nodes = nodes} + end + last_tarot_planet = nodes[1][1].nodes[1].config.object.string + end + local colour = (not fool_c or fool_c.name == 'The Fool') and G.C.RED or G.C.GREEN + + if not (not fool_c or fool_c.name == 'The Fool') then + info_queue[#info_queue + 1] = fool_c + end + + local main_end = { + { + n = G.UIT.C, + config = { align = "bm", padding = 0.02 }, + nodes = { + { + n = G.UIT.C, + config = { align = "m", colour = colour, r = 0.05, padding = 0.05 }, + nodes = { + { n = G.UIT.T, config = { text = ' ' .. last_tarot_planet .. ' ', colour = G.C.UI.TEXT_LIGHT, scale = 0.3, shadow = true } }, + } + } + } + } + } + + return { vars = { last_tarot_planet }, main_end = main_end } + end, + use = function(self, card, area, copier) + G.E_MANAGER:add_event(Event({ + trigger = 'after', + delay = 0.4, + func = function() + if G.consumeables.config.card_limit > #G.consumeables.cards then + play_sound('timpani') + SMODS.add_card({ key = G.GAME.last_tarot_planet, area = G.consumeables }) + card:juice_up(0.3, 0.5) + end + return true + end + })) + delay(0.6) + end, + can_use = function(self, card) + local fac = card.area == G.consumeables and -1 or 0 + return G.consumeables.config.card_limit > #G.consumeables.cards + fac and G.GAME.last_tarot_planet and + G.GAME.last_tarot_planet ~= 'c_fool' + end +}, true) + +local calculate_objref = SMODS.eval_individual +function SMODS.eval_individual(individual, context) + if individual.object then + return calculate_objref(individual, context) + end +end + +if HotPotato then + function PissDrawer.Shop.main_shop() + -- Reroll button for unknown goddamn reason just stuck, so I'll unstuck it + G.E_MANAGER:add_event(Event({ + blocking = false, + no_delete = true, + func = function() + local reroll = G.shop and G.shop:get_UIE_by_ID('shop_reroll') + if reroll and reroll.UIBox then + reroll.UIBox:recalculate() + end + return true + end, + })) + return + {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={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}} + }}, + {n=G.UIT.R, config={align = "cm", maxw = 1.3}, nodes={ + {n=G.UIT.T, config={text = localize('b_next_round_2'), scale = 0.4, colour = G.C.WHITE, shadow = true}} + }} + }}, + }}, + (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 = { + {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}} + }}, + {n=G.UIT.R, config={align = "cm", maxw = 1.3}, nodes={ + not G.GAME.entr_alt and {n=G.UIT.T, config={text = localize('b_change_path_2'), scale = 0.4, colour = G.C.WHITE, shadow = true}} or nil + }} + }}, + }} 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={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}}, + }}, + {n=G.UIT.R, config={align = "cm", maxw = 1.3, minw = 1}, nodes={ + {n=G.UIT.T, config={text = localize('$'), scale = 0.7, colour = G.C.WHITE, shadow = true}}, + {n=G.UIT.T, config={ref_table = G.GAME.current_round, ref_value = 'reroll_cost', scale = 0.75, colour = G.C.WHITE, shadow = true}}, + }} + }} + }}, + }}, + {n=G.UIT.C, config={align = "cm", padding = 0.2, r=0.2, colour = G.C.L_BLACK, emboss = 0.05, minw = 8.0}, nodes={ + {n=G.UIT.O, config={object = G.shop_jokers}}, + }}, + {n=G.UIT.C, config = {align='cm', padding = 0.1}, nodes = { + {n=G.UIT.R, config={align = "cm", minw = 0.5, maxw = 0.7, minh = 0.8, r=0.15,colour = G.C.CLEAR, id = "show_plinko_button", button = 'open_plinko', shadow = true}, nodes = { + {n=G.UIT.O, config = {object = Sprite(0, 0, 0.9, 0.9, G.ASSET_ATLAS['hpot_pissdrawer_shop'], { x = 0, y = 0 }), shadow = true, hover = true, button_dist = 0.63}}, + }}, + + {n=G.UIT.R, config={align = "cm", minw = 0.5, maxw = 0.7, minh = 0.8, r=0.15,colour = G.C.CLEAR, id = "show_wheel_button", button = 'open_wheel', shadow = true}, nodes = { + {n=G.UIT.O, config = {object = Sprite(0, 0, 0.9, 0.9, G.ASSET_ATLAS['hpot_pissdrawer_shop'], { x = 1, y = 0 }), shadow = true, hover = true, button_dist = 0.63}}, + }}, + + {n=G.UIT.R, config={align = "cm", minw = 0.5, maxw = 0.7, minh = 0.8, r=0.15,colour = G.C.CLEAR, id = "show_nursery_button", button = 'open_nursery', shadow = true}, nodes = { + {n=G.UIT.O, config = {object = Sprite(0, 0, 0.9, 0.9, G.ASSET_ATLAS['hpot_pissdrawer_shop'], { x = 2, y = 0 }), shadow = true, hover = true, button_dist = 0.63}}, + }}, + }} + }}, + -- spacer + {n=G.UIT.R, config={minh = 0.1}}, + -- bottom shop row + {n=G.UIT.R, config={align = "cm", padding = 0.1}, nodes={ + {n=G.UIT.C, config={align = "cm", padding = 0.15, r=0.2, colour = G.C.L_BLACK, emboss = 0.05}, nodes={ + {n=G.UIT.C, config={align = "cm", padding = 0.2, r=0.2, colour = G.C.BLACK, maxh = G.shop_vouchers.T.h+0.4}, nodes={ + {n=G.UIT.T, config={text = localize{type = 'variable', key = 'ante_x_voucher', vars = {G.GAME.round_resets.ante}}, scale = 0.45, colour = G.C.L_BLACK, vert = true}}, + {n=G.UIT.O, config={object = G.shop_vouchers}}, + }}, + }}, + {n=G.UIT.C, config={align = "cm", padding = 0.15, r=0.2, colour = G.C.L_BLACK, emboss = 0.05}, nodes={ + {n=G.UIT.O, config={object = G.shop_booster}}, + }}, + }} + }} + end +end + +local smods_poll_edref = SMODS.poll_edition +function SMODS.poll_edition(args) + local unordered_options = args.options or get_current_pool("Edition", nil, nil, _key or 'edition_generic') + local _options = {} + for _, edition in ipairs(unordered_options) do + if G.P_CENTERS[edition] and not G.P_CENTERS[edition].no_doe and not G.GAME.banned_keys[edition] then + if G.P_CENTERS[edition].vanilla then + table.insert(_options, 1, edition) + else + table.insert(_options, edition) + end + end + end + args.options = _options + return smods_poll_edref(args) +end + +local poll_edref = poll_edition +function poll_edition(_key, _mod, _no_neg, _guaranteed, options) + if not options then + if _key == "wheel_of_fortune" or _key == "aura" then -- set base game edition polling + options = { 'e_negative', 'e_polychrome', 'e_holo', 'e_foil' } + end + end + local unordered_options = options or get_current_pool("Edition", nil, nil, _key or 'edition_generic') + local _options = {} + for _, edition in ipairs(unordered_options) do + if G.P_CENTERS[edition] and not G.P_CENTERS[edition].no_doe and not G.GAME.banned_keys[edition] then + if G.P_CENTERS[edition].vanilla then + table.insert(_options, 1, edition) + else + table.insert(_options, edition) + end + end + end + return poll_edref(_key, _mod, _no_neg, _guaranteed, _options) +end + +local gcp = get_current_pool +function get_current_pool(_type, _rarity, _legendary, _append, override_equilibrium_effect) + if next(SMODS.find_card("j_entr_kitchenjokers")) and _type == "Joker" then + for i, v in pairs(SMODS.find_card("j_entr_kitchenjokers")) do + if pseudorandom("kitchenjokers_check") < 0.25 then + _type = "Food" + break + end + end + end + local ret, ret2 = gcp(_type, _rarity, _legendary, _append, override_equilibrium_effect) + return ret, ret2 +end + +local calc_main_scoring = SMODS.calculate_main_scoring +function SMODS.calculate_main_scoring(context, scoring_hand) + 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 + if context.cardarea ~= G.play or (not next(SMODS.find_card('j_entr_rubber_ball')) and not next(fvc_cards)) 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 not G.rubber_cards or #G.rubber_cards.cards == 0 then + G.rubber_cards = {cards = Entropy.rubber_ball_scoring(scoring_hand)} + end + context.cardarea = G.rubber_cards + context.scoring_hand = G.rubber_cards.cards + calc_main_scoring(context, G.rubber_cards.cards) + context.cardarea = G.play + G.rubber_cards = nil + end + return +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()) +end + +function Entropy.ee_taunt(taunt) + local quip = taunt + local extra = { + center = SMODS.JimboQuips[taunt].extra.center + } + extra.x = 0 + extra.y = 5 + Jimbo = Card_Character(extra) + local spot = G.HUD:get_UIE_by_ID('hand_text_area') + spot.config.object = Jimbo + Jimbo.ui_object_updated = true + Jimbo:add_speech_bubble(quip, nil, {quip = true}, extra) + Jimbo:say_stuff((extra and extra.times) or 5, false, quip) + G.E_MANAGER:add_event(Event{ + trigger = "after", + blocking = false, + func = function() + if not Jimbo.talking then + G.E_MANAGER:add_event(Event{ + trigger = "after", + delay = 4, + func = function() + Jimbo:remove() + return true + end + }) + return true + end + end + }) +end + +function Entropy.is_number(x) + return type(x) == "number" or (type(x) == "table" and is_number(x)) or (is_big and is_big(x)) +end +function Entropy.is_big(x) + return (type(x) == "table" and is_number(x)) or (is_big and is_big(x)) +end + +function hotpot_horsechicot_market_section_init_cards() + G.GAME.shop.market_joker_max = G.GAME.shop.market_joker_max or 2 + if G.GAME.market_table then + G.market_jokers:load(G.GAME.market_table) + G.GAME.market_table = nil + else + if not G.GAME.market_filled then + G.GAME.market_filled = {} + for i = 1, G.GAME.shop.market_joker_max - #G.market_jokers.cards do + local new_shop_card + if G.GAME.modifiers.no_shop_jokers then + new_shop_card = SMODS.create_card { set = "BlackMarketJokerless", area = G.market_jokers, bypass_discovery_ui = true, bypass_discovery_center = true } + 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 + end + new_shop_card.ability.glitched_crown = gc + end + else + new_shop_card = SMODS.create_card { set = "BlackMarket", area = G.market_jokers, bypass_discovery_ui = true, bypass_discovery_center = true } + 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 + end + new_shop_card.ability.glitched_crown = gc + end + end + G.market_jokers:emplace(new_shop_card) + create_market_card_ui(new_shop_card) + new_shop_card:juice_up() + G.GAME.market_filled[#G.GAME.market_filled + 1] = new_shop_card.config.center.key + end + -- save_run() + else + for i, v in pairs(G.GAME.market_filled) do + local c = SMODS.create_card { + key = v, + bypass_discovery_ui = true, + bypass_discovery_center = true + } + create_market_card_ui(c) + G.market_jokers:emplace(c) + end + for i, v in pairs(G.market_jokers.cards) do + create_market_card_ui(v) + end + end + end + G.harvest_cost = G.harvest_cost or 0 +end \ No newline at end of file diff --git a/lib/loader.lua b/lib/loader.lua index f2d28318..84d5fda9 100644 --- a/lib/loader.lua +++ b/lib/loader.lua @@ -227,6 +227,33 @@ function SMODS.injectItems(...) "j_entr_d10", "j_entr_d12", "j_entr_d100", + "j_entr_girldinner", + "j_entr_gold_bar", + "j_entr_prayer_card", + "j_entr_petrichor", + "j_entr_otherworldly_joker", + "j_entr_error", + "j_entr_thirteen_of_stars", + "j_entr_prismatic_shard", + "j_entr_redkey", + "j_entr_deck_enlargement_pills", + "j_entr_black_rose_green_sun", + "j_entr_jack_off", + "j_entr_antipattern", + "j_entr_spiral_of_ants", + "j_entr_fork_bomb", + "j_entr_kintsugi", + "j_entr_blooming_crimson", + "j_entr_overpump", + "j_entr_shadow_crystal", + "j_entr_meridian", + "j_entr_kitchenjokers", + "j_entr_stand_arrow", + "j_entr_magic_skin", + "j_entr_lambda_calculus", + "j_entr_mark_of_the_beast", + "j_entr_dice_shard", + "j_entr_nostalgic_d6" } SMODS.ObjectType({ @@ -258,6 +285,18 @@ function SMODS.injectItems(...) }) SMODS.ObjectTypes.BlindTokens:inject() + G.P_CENTERS.c_entr_bl_entr_alabaster_anchor.entr_credits = {idea = {"cassknows"}} + G.P_CENTERS.c_entr_bl_entr_burgundy_baracuda.entr_credits = {idea = {"cassknows"}} + G.P_CENTERS.c_entr_bl_entr_citrine_comet.entr_credits = {idea = {"cassknows"}} + G.P_CENTERS.c_entr_bl_entr_diamond_dawn.entr_credits = {idea = {"cassknows"}} + G.P_CENTERS.c_entr_bl_entr_olive_orchard.entr_credits = {idea = {"cassknows"}} + + G.P_CENTERS.c_entr_bl_entr_styx.entr_credits = {idea = {"cassknows"}} + G.P_CENTERS.c_entr_bl_entr_choir.entr_credits = {idea = {"cassknows"}} + G.P_CENTERS.c_entr_bl_entr_pandora.entr_credits = {idea = {"cassknows"}} + G.P_CENTERS.c_entr_bl_entr_cassandra.entr_credits = {idea = {"cassknows"}} + G.P_CENTERS.c_entr_bl_entr_labyrinth.entr_credits = {idea = {"cassknows"}} + if MP then function MP.DECK.ban_card(card_id) if card_id:sub(1, 1) == "j" then @@ -283,6 +322,8 @@ function SMODS.injectItems(...) end end MP.DECK.ban_card("j_entr_xekanos") + MP.DECK.ban_card("j_entr_prayer_card") + MP.DECK.ban_card("c_entr_raido") end for i, v in pairs(G.P_CENTERS) do if v.inversion then @@ -309,7 +350,42 @@ function SMODS.injectItems(...) }) SMODS.ObjectTypes.Twisted:inject() SMODS.ObjectTypes.Sunny:inject() - + SMODS.ObjectType({ + key = "RedeemableBacks", + default = "b_red", + cards = {}, + inject = function(self) + local cards = { + "b_entr_twisted", + --"b_entr_destiny", + "b_entr_ambisinister", + "b_entr_butterfly", + "b_entr_gemstone", + "b_entr_corrupted", + HotPotato and "b_hpot_lime" or nil, + HotPotato and "b_hpot_ublockdeck" or nil, + HotPotato and "b_hpot_domn" or nil, + HotPotato and "b_hpot_window" or nil, + } + SMODS.ObjectType.inject(self) + for i, v in pairs(cards) do + self:inject_card(G.P_CENTERS[v]) + end + self:inject_card(G.P_CENTERS.b_red) + self:inject_card(G.P_CENTERS.b_blue) + self:inject_card(G.P_CENTERS.b_yellow) + self:inject_card(G.P_CENTERS.b_green) + self:inject_card(G.P_CENTERS.b_black) + self:inject_card(G.P_CENTERS.b_magic) + self:inject_card(G.P_CENTERS.b_nebula) + self:inject_card(G.P_CENTERS.b_ghost) + self:inject_card(G.P_CENTERS.b_zodiac) + self:inject_card(G.P_CENTERS.b_painted) + self:inject_card(G.P_CENTERS.b_anaglyph) + self:inject_card(G.P_CENTERS.b_plasma) + end, + }) + SMODS.ObjectTypes.RedeemableBacks:inject() G.entr_hooked = true SMODS.ObjectTypes.Dice:inject() if (SMODS.Mods["Cryptid"] or {}).can_load then diff --git a/lib/ui.lua b/lib/ui.lua index 8135de08..5bbb8948 100644 --- a/lib/ui.lua +++ b/lib/ui.lua @@ -15,7 +15,7 @@ function G.UIDEF.bought_decks() end for k, v in ipairs(keys_used) do if next(v) then - if #voucher_areas == 5 or #voucher_areas == 10 then + if #voucher_areas % 7 == 0 then table.insert(voucher_table_rows, {n=G.UIT.R, config={align = "cm", padding = 0, no_fill = true}, nodes=voucher_tables} ) @@ -230,7 +230,7 @@ G.FUNCS.dont_reroll_boss = function(e) G.E_MANAGER:add_event(Event({ trigger = "before", func = function() - play_sound("cry_forcetrigger", 1, 0.6) + play_sound((SMODS.Mods["Cryptid"] or {}).can_load and "cry_forcetrigger" or "cryl_forcetrigger", 1, 0.6) return true end, })) @@ -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 = G.GAME.entr_alt and G.C.ALTBG or G.C.BLIND['Small'], contrast = 1} + ease_background_colour{new_colour = Entropy.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") @@ -358,6 +358,7 @@ G.FUNCS.can_reserve_card = function(e) if #G.consumeables.cards < G.consumeables.config.card_limit + (Cryptid.safe_get(c1, "edition", "negative") and 1 or 0) + and Entropy.can_be_pulled(c1) then e.config.colour = G.C.GREEN e.config.button = "reserve_card" diff --git a/lib/utils.lua b/lib/utils.lua index 765be4bf..ef7a4b19 100644 --- a/lib/utils.lua +++ b/lib/utils.lua @@ -1,26 +1,57 @@ function Entropy.GetHighlightedCards(cardareas, ignorecard, min, max, blacklist) - if Cryptid.get_highlighted_cards then - return Cryptid.get_highlighted_cards(cardareas, ignorecard or {}, min or 1, max or 1, blacklist and function(card) + return Cryptid.get_highlighted_cards(cardareas, ignorecard or {}, min or 1, max or 1, blacklist and function(card) return not blacklist[card.config.center.key] - end) - else - local cards = {} - if ignorecard then ignorecard.checked = true end - blacklist = blacklist or {} - for i, area in pairs(cardareas) do - if area.cards then - for i2, card in ipairs(area.highlighted) do - if card ~= ignorecard and not blacklist[card.config.center.key] and card.highlighted 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 ignorecard then ignorecard.checked = false end - return cards - end + end) +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) @@ -35,17 +66,17 @@ end function Entropy.Inversion(card) if not card then return end - return Entropy.FlipsideInversions[card.key or card.config.center.key] + return Entropy.FlipsideInversions[card.key or (card.config and card.config.center and card.config.center.key) or ""] end function Entropy.is_inverted(card) if not card then return end - return Entropy.FlipsideInversions[card.key or card.config.center.key] and not Entropy.FlipsidePureInversions[card.key or card.config.center.key] + 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 ""] end function Entropy.inversion_queue(card, _c, first_pass) local info_queue = {} - if Entropy.Inversion(card) and first_pass and Entropy.show_flipside(card, _c) and Entropy.config.inversion_queues > 1 then + 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)] info_queue[#info_queue+1] = {key = "inversion_allowed", set = "Other", vars = {G.localization.descriptions[inversion.set][inversion.key].name}} @@ -365,7 +396,7 @@ 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 Entropy.EEWhitelist[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) @@ -668,7 +699,7 @@ function Entropy.HigherCardRank(card) 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 raFnk_suffix = 'Ace' + elseif rank_suffix == 14 then rank_suffix = 'Ace' end return ({ Queen = "King", @@ -737,7 +768,7 @@ function Entropy.GetJokerSumRarity(loc) local sum = Entropy.SumJokerPoints() local last_sum = 0 for i, v in pairs(Entropy.RarityPoints) do - if type(sum) == "table" then + if Entropy.is_big(sum) then if v > 12 and sum:gte(v-1) or sum:gte(v) then if v > last_sum then rarity = i @@ -783,8 +814,7 @@ end function Entropy.CanEeSpawn() if MP and MP.LOBBY and MP.LOBBY.code then return false end - return (SMODS.Mods["Cryptid"] or {}).can_load and Talisman - and Cryptid.enabled("bl_entr_endless_entropy_phase_one") + return Cryptid.enabled("bl_entr_endless_entropy_phase_one") and Cryptid.enabled("bl_entr_endless_entropy_phase_two") and Cryptid.enabled("bl_entr_endless_entropy_phase_three") and Cryptid.enabled("bl_entr_endless_entropy_phase_four") @@ -804,6 +834,7 @@ 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 if self.edition and self.edition.key == "e_entr_sunny" then return true end if self.config.center.pools and self.config.center.pools.Sunny == true then return true end return nil @@ -982,28 +1013,20 @@ Entropy.TMTrainerEffects["joker_choose_rarity"] = function(key) SMODS.add_card({ Entropy.TMTrainerEffects["edition"] = function(key) local element = pseudorandom_element(G.jokers.cards, pseudoseed(key)) Entropy.FlipThen({element}, function(card) - card:set_edition(Entropy.pseudorandom_element(G.P_CENTER_POOLS.Edition, pseudoseed("entropy"),function(e) - return G.GAME.banned_keys[e.key] or e.no_doe - end).key) + card:set_edition(SMODS.poll_edition({guaranteed = true, key = "entr_tmt_ed"})) end) end Entropy.TMTrainerEffects["ante"] = function(key) ease_ante(-pseudorandom(key)*0.1) end Entropy.TMTrainerEffects["consumable"] = function(key) SMODS.add_card({key = Cryptid.random_consumable("entr_segfault", nil, "c_entr_segfault").key, area = G.consumeables}) end Entropy.TMTrainerEffects["enhancement_play"] = function(key) - local enhancement = pseudorandom_element(G.P_CENTER_POOLS.Enhanced, pseudoseed("entropy")).key - while G.P_CENTERS[enhancement].no_doe or G.GAME.banned_keys[enhancement] do - enhancement = pseudorandom_element(G.P_CENTER_POOLS.Enhanced, pseudoseed("entropy")).key - end + 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) card:set_ability(G.P_CENTERS[enhancement]) end) end Entropy.TMTrainerEffects["enhancement_hand"] = function(key) - local enhancement = pseudorandom_element(G.P_CENTER_POOLS.Enhanced, pseudoseed("entropy")).key - while G.P_CENTERS[enhancement].no_doe or G.GAME.banned_keys[enhancement] do - enhancement = pseudorandom_element(G.P_CENTER_POOLS.Enhanced, pseudoseed("entropy")).key - end + 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) card:set_ability(G.P_CENTERS[enhancement]) @@ -1016,7 +1039,7 @@ Entropy.TMTrainerEffects["random"] = function(key, context ) if results then for i, v in pairs(results) do for i2, result in pairs(v) do - if type(result) == "number" or (type(result) == "table" and result.tetrate) then + if Entropy.is_number(result) then res[i2] = Entropy.StackEvalReturns(res[i2], result, i2) else res[i2] = result @@ -1136,7 +1159,7 @@ function Entropy.LevelSuit(suit, card, amt, chips_override) return true end })) - update_hand_text({ sound = "button", volume = 0.7, pitch = 0.9, delay = 0 }, { chips="+"..number_format((10 or chips_override)*amt), StatusText = true }) + update_hand_text({ sound = "button", volume = 0.7, pitch = 0.9, delay = 0 }, { chips="+"..number_format((chips_override or 10)*amt), StatusText = true }) G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.9, func = function() play_sound('tarot1') if card then card:juice_up(0.8, 0.5) end @@ -1698,6 +1721,7 @@ function Entropy.load_files(files) if type(result) == "table" and result.object_type then 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 Entropy.contents[result.object_type][#Entropy.contents[result.object_type]+1]=result end end @@ -1721,32 +1745,34 @@ function Entropy.find_runes(key) end function Entropy.show_flipside() - return next(SMODS.find_card("c_entr_flipside")) or next(SMODS.find_card("c_entr_dagaz")) or Entropy.has_rune("rune_entr_dagaz") + for i, v in pairs((G.pack_cards or {}).cards or {}) do + if ({ + c_entr_flipside = true, + c_entr_dagaz = true, + rune_entr_dagaz = true, + j_entr_shadow_crystal = true + })[v.config.center_key] then + return true + end + end + return next(SMODS.find_card("c_entr_flipside")) 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 = Entropy.pseudorandom_element(G.P_CENTER_POOLS.Edition, pseudoseed("entropy"),function(e) - return G.GAME.banned_keys[e.key] or e.no_doe - end).key + local edition = SMODS.poll_edition({guaranteed = true, key = "entr_ihwaz"}) card:set_edition(edition) card:juice_up() end if mtype == "Enhancement" then - local enhancement_type = "Enhanced" - local enhancement = pseudorandom_element(G.P_CENTER_POOLS[enhancement_type], pseudoseed(seed or "ihwaz")).key - while G.P_CENTERS[enhancement].no_doe or G.GAME.banned_keys[enhancement] do - enhancement = pseudorandom_element(G.P_CENTER_POOLS[enhancement_type], pseudoseed(seed or "ihwaz")).key - end + 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 = Entropy.pseudorandom_element(G.P_CENTER_POOLS.Seal, pseudoseed("ihwaz"),function(e) - return G.GAME.banned_keys[e.key] or e.no_doe - end).key + local seal = SMODS.poll_seal{guaranteed = true, key = seed or "ihwaz"} card:set_seal(seal) card:juice_up() end @@ -1875,9 +1901,11 @@ function Entropy.calculate_ratios(incl_vanilla, only_vanilla) 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 - total = total + 1 - if not rarities[v.rarity] then rarities[v.rarity] = 0 end - rarities[v.rarity] = rarities[v.rarity] + 1 + 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 @@ -1906,6 +1934,172 @@ function Entropy.allow_spawning(center) end function Entropy.get_reroll_height() - if HotPotato then return 1.04 end 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 + 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 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 +end + +function Entropy.rubber_ball_scoring(cards) + local index = 1 + local dir = 1 + local new_cards = {} + 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 + new_cards[#new_cards+1] = v + end + if next(SMODS.find_card("j_entr_rubber_ball")) then + while index > 0 and index <= #cards do + local add + for i, v in pairs(SMODS.find_card("j_entr_rubber_ball")) do + if not v.triggered and SMODS.pseudorandom_probability(v, 'rubber_ball', 1, v.ability.odds) then + dir = -dir + add = true + v.triggered = true + new_cards[#new_cards+1] = cards[index] + end + end + new_cards[#new_cards+1] = cards[index] + index = index + dir + end + for i, v in pairs(SMODS.find_card("j_entr_rubber_ball")) do + v.triggered = false + end + else + for i, v in pairs(cards) do + new_cards[#new_cards+1] = v + end + end + return new_cards +end + +function Entropy.post_create_card(card, from_booster) + 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 + 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[center.set] and (not card.area or not card.area.config.collection) then + card:set_ability(G.P_CENTERS["c_entr_flipside"]) + key = "c_entr_flipside" + set = "Spectral" + elseif card.config and card.config.center and card.config.center.set == "Booster" + and pseudorandom("supersede") < 0.20 and G.GAME.Supersede and G.STATE == G.STATES.SHOP and (not card.area or not card.area.config.collection) then + local type = (center.cost == 6 and "jumbo") or (center.cost == 8 and "mega") or "normal" + card:set_ability(G.P_CENTERS["p_entr_twisted_pack_"..type]) + + 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") + 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 = (center.cost == 6 and "jumbo_1") or (center.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])]) 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 + 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 + end + if from_booster then + G.E_MANAGER:add_event(Event({trigger = 'after', blockable = false, blocking = false, func = function() + card.ability.glitched_crown = gc + return true + end})) + else + card.ability.glitched_crown = gc + end + end +end \ No newline at end of file diff --git a/localization/en-us.lua b/localization/en-us.lua index 92c74859..3bfe5b57 100644 --- a/localization/en-us.lua +++ b/localization/en-us.lua @@ -28,7 +28,7 @@ local decs = { text = { "{X:blue,C:white}X#2#{} Chips when held in hand", "Increase by {X:blue,C:white}X#1#{} for each", - "{C:attention}unique{} suit in scoring hand" + "{C:attention}unique{} suit in played hand" } }, m_entr_ceramic = { @@ -39,7 +39,32 @@ local decs = { "When scored {C:red}destroy{} this card", "When destroyed create a {C:attention}random{} consumable" } - } + }, + m_entr_radiant = { + name = "Radiant Card", + text = { + "{C:gold}+#1#{} Ascension Power" + } + }, + + m_entr_ethereal = { + name = "Ethereal Card", + text = { + "Creates a {C:spectral}Spectral{}", + "card when modified", + "{C:inactive}(Must have room){}" + } + }, + + m_entr_samsara = { + name = "Samsara Card", + text = { + "{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})" + } + }, }, ["Content Set"] = { set_entr_inversions = { @@ -130,6 +155,14 @@ local decs = { "added by Entropy", }, }, + set_entr_actives = { + name = "Activated Jokers", + text = { + "{C:attention}Jokers{} that are", + "{C:attention}manually{} activated", + "added by Entropy" + }, + }, }, Joker = { --Crossmod Jokers @@ -321,7 +354,7 @@ local decs = { j_entr_exousia = { name = "Exousia", text = { - "{C:attention}Ascends{} all Tags", + "{C:entr_entropic}Ascends{} all Tags", "Gain {C:attention}#1#{} skip Tags when", "any Blind is selected" } @@ -347,7 +380,8 @@ local decs = { j_entr_strawberry_pie = { name = "Strawberry Pie", text = { - "Other hand level-ups are", + "{C:green}#1# in #2#{} chance for", + "Other hand level-ups to be", "redirected to {C:attention}High Card{}", } }, @@ -424,8 +458,9 @@ local decs = { text = { "When {C:attention}Blind{} is selected", "banish rightmost Joker", - "Joker to the left gains {C:attention}5%{}", - "of its sell value as {C:purple}xValues{}" + "Joker to the left gains {C:attention}#1#%{}", + "of its sell value as {C:purple}xValues{}", + "then decrease this value by {C:attention}#2#{}" } }, j_entr_rusty_shredder = { @@ -483,9 +518,10 @@ local decs = { j_entr_ruby = { name = "Ruby, Lord of Hope", text = { - "This Joker gains {X:mult,C:white}X#1#{} Mult", - "Whenever you Enter or Exit {C:attention}The Flipside{}", - "{C:inactive}(Currently {X:mult,C:white}X#2#{C:inactive} Mult){}" + "Gain a random {C:attention}Tag{}", + "every {C:attention}#1#{} {C:inactive}[#2#]{} Jokers bought.", + "Tags may randomly become", + "{C:entr_entropic}Ascended{}" } }, j_entr_slipstream = { @@ -621,7 +657,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:dark_edition,C:white}^#2#{}", + "then increase this Jokers chips by {X:blue,C:white}X#2#{}", "if any {c:attention}Food{} or {C:attention}Candy{} Jokers were destroyed" } }, @@ -757,7 +793,7 @@ local decs = { j_entr_caviar = { name = "Caviar", text = { - "{C:attention}Ascend{} the next {C:attention}#1#{}", + "{C:entr_entropic}Ascend{} the next {C:attention}#1#{}", "obtained Tags" }, }, @@ -855,7 +891,14 @@ local decs = { "Resets after reaching your {C:attention}last{} Joker" } }, - + j_entr_d0 = { + name = "D0", + text = { + "Multiplies all {C:attention}listed{}", + "{C:green,E:1}probabilities{} by {C:attention}0", + "{C:inactive}(ex. {C:green}1 in 3{C:inactive} -> {C:green}0 in 3{C:inactive})" + } + }, j_entr_d1 = { name = "D1", text = { @@ -1358,6 +1401,449 @@ local decs = { "{C:blue}+#2#{} Chips, or", "{C:gold}+#3#{} Ascension Power" }, + }, + j_entr_chameleon = { + name = "Chameleon", + text = { + "Scores as a", + "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})" + }, + }, + j_entr_redkey= { + name = "Red Key", + text = { + "Use this Joker to add an {C:attention}extra{} ", + "{C:red}Red Room{} Blind", + "gains {C:attention}#2#{} use#2# when defeating a Boss Blind", + "{C:inactive}(Currently {C:attention}#1#{C:inactive} use#1#)" + }, + }, + j_entr_polaroid = { + name = "Polaroid", + text = { + "Use this Joker to copy another {C:attention}Jokers{}", + "abilities until next used", + "gains {C:attention}#2#{} use#2# when defeating a Blind", + "{C:inactive}(Currently {C:attention}#1#{C:inactive} use#1#)" + }, + }, + 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", + }, + }, + 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{}", + "scoring card" + }, + }, + j_entr_captcha = { + name = "Captcha", + text = { + "Use this Joker to apply a random", + "{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", + "gains {C:attention}#2#{} use#2# when defeating a Blind", + "{C:inactive}(Currently {C:attention}#1#{C:inactive} use#1#)" + }, + }, + j_entr_deck_enlargement_pills = { + name = "Deck Enlargement Pills", + text = { + "After {C:attention}#1#{} {C:inactive}[#2#]{} Rounds", + "sell this card to", + "{C:attention}Apply{} a random {C:attention}Deck's{} Effects" + }, + }, + j_entr_photocopy = { + name = "Photocopy", + text = { + "The first card in {C:attention}Standard Packs{}", + "always has your most common", + "{C:attention}Suit{} and {C:attention}Rank{}" + }, + }, + + j_entr_hexa = { + name = "HexaCryonic, Witch of Light", + text = { + "Extra played cards provide", + "{C:gold}+3{} Ascension Power", + "{C:attention}+3{} Card Selection Limit" + }, + }, + j_entr_hexa_cryptid = { + name = "HexaCryonic, Knight of Mind", + text = { + "Extra played cards provide {X:gold,C:white}X3{}", + "as much Ascension Power", + "{C:attention}+#1#{} Card Selection Limit" + }, + }, + j_entr_grahkon = { + name = "First Guardian, Grahkon", + text = { + "{C:attention}-#1#{} Blind Size", + "Increases by {X:attention,C:white}X#2#{} when a ", + "playing card is destroyed. Use this Joker to", + "destroy {C:attention}#3#{} random card#3# in hand", + "gains {C:attention}#4#{} use#4# when defeating a Blind", + "{C:inactive}(Currently {C:attention}#5#{C:inactive} use#5#)" + }, + }, + j_entr_ybur = { + name = "Ybur", + text = { + "Prevents Death once per Ante", + "if no blinds were skipped", + "This Joker gains {X:dark_edition,C:white}^#2#{} Chips", + "when death is prevented", + "{C:inactive}(Currently: {X:dark_edition,C:white}^#1#{C:inactive} Chips, #3#)" + }, + }, + j_entr_zelavi = { + name = "Zelevai", + text = { + "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)" + }, + }, + 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" + }, + }, + j_entr_axeh = { + name = "CinoyrcAxeh", + text = { + "Creates a {C:attention}Sunny Joker{}", + "when obtained", + "{X:gold,C:white}X#1#{} to all sources", + "of Ascension Power" + }, + }, + j_entr_nokharg = { + name = "Nokharg", + text = { + "Use this Joker to turn selected", + "playing cards {C:dark_edition}Negative{}", + "and increase blind size by {C:attention}#2#{}", + "for each card selected", + "{C:inactive}(Currently {X:attention,C:white}X#1#{C:inactive} Blind Size)" + }, + }, + + j_entr_enlightenment = { + 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", + "{C:red}Twisted Packs{}" + }, + }, + j_entr_black_rose_green_sun = { + name = "Black Rose, Green Sun", + text = { + "{C:spades}Spades{} and {C:clubs}Clubs{}", + "held in hand give", + "{C:gold}+#1#{} Ascension Power" + }, + }, + + j_entr_heimartai = { + name = "Heimartai", + 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)" + }, + }, + j_entr_jack_off = { + name = "Jack-Off", + text = { + "Scored {C:attention}Jacks{} discard", + "a {C:attention}random{} card held", + "in hand" + }, + }, + j_entr_fast_food = { + name = "Fast Food", + text = { + "When {C:attention}Blind{} is selected", + "create a {C:attention}Perishable Food{} Joker", + "{C:inactive}(Must have room)" + }, + }, + j_entr_antipattern= { + 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)" + }, + }, + j_entr_spiral_of_ants = { + name = "Spiral of Ants", + text = { + "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)" + }, + }, + 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)" + }, + }, + j_entr_solar_panel = { + name = "Solar Panel", + text = { + "Discarded {C:attention}Sunny{} and {C:attention}Radiant{}", + "cards give {C:money}$#1#{}" + }, + }, + j_entr_kintsugi = { + name = "Kintsugi", + text = { + "{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", + "{X:mult,C:white}X#1#{} Mult,", + "{X:blue,C:white}X#2#{} Chips, or", + "{X:gold,C:white}X#3#{} Ascension Power" + }, + }, + j_entr_overpump = { + name = "Overpump", + text = { + "{X:mult,C:white}X#1#{} Mult on {C:attention}final{}", + "{C:attention}hand{} of round", + "Increases by {X:mult,C:white}X#2#{} for each", + "{C:attention}unique{} poker hand played this round" + }, + }, + j_entr_shadow_crystal = { + name = "Shadow Crystal", + text = { + "Consumables have a {C:green}#1# in #2#{} chance", + "to also trigger their {C:red}Inverted{} counterparts", + "{C:inactive}(If Possible, Hidden consumables excluded)" + }, + }, + j_entr_miracle_berry = { + name = "Miracle Berry", + text = { + "The next {C:attention}#1#{} consumables to", + "appear will be {C:spectral}Spectrals{}", + }, + }, + j_entr_meridian = { + name = "Meridian", + text = { + "Gives Mult based on", + "{C:attention}position{} in the Jokers tray", + "{C:inactive}(Currently {C:mult}+#1#{C:inactive} Mult)" + }, + }, + j_entr_mango = { + name = "Mango", + text = { + "Copy the {C:attention}first played{} card", + "of the next {C:attention}#1#{} hands", + "then draw it to {C:attention}hand{}" + }, + }, + j_entr_kitchenjokers = { + name = "Kitchen Joker", + text = { + "Food Jokers are {C:attention}more likely{}", + "to appear are {C:attention}X#1#{} as expensive", + "and are {C:dark_edition}Low-Res{}" + }, + }, + j_entr_hash_miner = { + name = "Hash Miner", + text = { + "{C:green}#1# in #2#{} chance to corrupt", + "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", + }, + }, + j_entr_dice_shard = { + name = "Dice Shard", + text = { + "Use this Joker to transform a Selected", + "{C:attention}Joker{} into the previous Joker", + "according to the collection order", + "gains {C:attention}#2#{} use#2# when defeating a Blind", + "{C:inactive}(Currently {C:attention}#1#{C:inactive} use#1#, #3#)" + }, + }, + j_entr_bell_curve = { + name = "Bell Curve", + text = { + "Retrigger all Played", + "cards other than the", + "{C:attention}First{} and {C:attention}Last" + }, + }, + j_entr_pineapple = { + name = "Pineapple", + text = { + "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" + }, + }, + j_entr_rubber_ball = { + name = "Rubber Ball", + text = { + "{C:green}#1# in #2#{} chance to", + "retrigger each scored card", + "then {C:red}reverse{} scoring {C:attention}order{}", + "when triggered" + }, + }, + j_entr_stand_arrow = { + name = "Stand Arrow", + text = { + "Use this Joker to {C:red}destroy{} a selected", + "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{}", + "gains {C:attention}#2#{} use#2# when defeating a Blind", + "{C:inactive}(Currently {C:attention}#1#{C:inactive} use#1#)" + }, + }, + j_entr_dancer = { + name = "Dancer", + text = { + "{C:attention}+#1#{} Card Selection Limit", + "{C:red}#2#{} Discards" + }, + }, + j_entr_kings_scepter = { + name = "King's Scepter", + text = { + "Destroy {C:attention}all{} played", + "{C:red}debuffed{} cards" + }, + }, + j_entr_monkeys_paw = { + name = "Monkey's Paw", + text = { + "Use this Joker to create", + "a random {C:attention}Eternal{} {C:red}Pact{}", + "{C:inactive}(Currently {C:attention}#1#{C:inactive} use#1#)" + }, + }, + j_entr_magic_skin = { + name = "Magic Skin", + text = { + "Use this Joker to create {C:attention}#3#{}", + "{C:dark_edition}Negative{} cards based on", + "the {C:attention}currently{} opened Booster Pack", + "gains {C:attention}#4#{} use#4# when defeating a Blind", + "{C:inactive,s:0.8}Has a higher chance to show up after each use", + "{C:inactive}(Currently {C:attention}#2#{}, {C:attention}#1#{C:inactive} use#1#)" + }, + }, + j_entr_lambda_calculus = { + name = "Lambda Calculus", + text = { + "Whenever another Joker {C:attention}triggers{}", + "add its {C:attention}values{} to this Jokers {C:blue}Chips{}", + "{C:red}Resets{} when this Joker triggers", + "{C:inactive}(Currently {C:blue}+#1#{C:inactive} Chips)" + }, + }, + j_entr_elderberries = { + name = "Elderberries", + text = { + "Forcibly use {C:attention}#1#{}", + "{C:spectral}Spectral{} cards", + "when sold" + }, + }, + j_entr_nostalgic_d6 = { + name = "Nostalgic D6", + text = { + "Use this Joker for {C:money}$#1#{}", + "to {C:attention}reroll{} a Booster Pack's", + "contents" + }, + }, + j_entr_blood_orange = { + name = "Blood Orange", + text = { + "Create an {C:red}Inverted{} Consumable", + "for the next {C:attention}#1#{}", + "Playing cards destroyed", + "{C:inactive}(Must have room)" + }, + }, + j_entr_false_vacuum_collapse = { + name = "False Vacuum Collapse", + text = { + "This Joker is played as the {C:attention}first{}", + "card of hand and {C:red}destroys{} the", + " {C:attention}second{} played card when scored", + "then returns" + }, + }, + j_entr_mark_of_the_beast = { + name = "Mark of The Beast", + text = { + "Each shop contains a", + "{C:red}Mega Twisted Pack{} at the cost", + "of {C:attention}1{} random card from", + "{C:attention}full deck{}" + }, }, }, Blind = { @@ -1367,6 +1853,12 @@ local decs = { "???" } }, + bl_entr_void = { + name = "???", + text = { + "???" + } + }, bl_entr_scarlet_sun = { name = "Scarlet Sun", text = { @@ -1412,7 +1904,7 @@ local decs = { text = { "All you know shall crumble,", "Dust to dust.", - "(Joker values decay over time)" + "(Jokers and hand levels removed)" } }, bl_entr_endless_entropy_phase_three = { @@ -1688,6 +2180,7 @@ local decs = { e_entr_neon = { name = "Neon", text = { + "Passively provides", "{C:attention}X#1#{} Shop Costs" }, }, @@ -1736,15 +2229,16 @@ local decs = { name = "Deck of Destiny", text = { "Jokers may no longer appear naturally", - "Start with an {C:dark_edition}Aleph, Negative{} Destiny", - "Cards have a higher chance to be Enhanced" + "Start with an {C:dark_edition}Aleph, Negative{} {T:c_entr_destiny}Destiny{}", + "Cards have a higher chance to be Enhanced", + "Start with {C:attention,T:v_magic_trick}Magic Trick{} amd {C:attention,T:v_illusion}Illusion{}" } }, b_entr_butterfly = { name = "Butterfly Deck", text = { "{C:attention}-2{} Joker Slots", - "Sold Jokers have a {C:green}#1# in 2{}", + "Sold Jokers have a {C:green}1 in 2{}", "chance to still trigger" } }, @@ -1760,12 +2254,19 @@ local decs = { b_entr_gemstone = { name = "Gemstone Deck", text = { - "Non Rune Consumables have a {C:green}1 in 3{}", + "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" } }, + b_entr_corrupted = { + name = "Corrupted Deck", + text = { + "{C:attention}Jokers{} and {C:attention}Consumables{}", + "Cycle between {C:attention}3{} options" + } + }, }, Sleeve = { sleeve_entr_twisted = { @@ -1806,27 +2307,35 @@ local decs = { name = "Sleeve of Fate", text = { "Jokers may no longer appear naturally", - "Start with an {C:dark_edition}Aleph, Negative{} Destiny", - "Cards have a higher chance to be Enhanced" + "Start with an {C:dark_edition}Aleph, Negative{} {T:c_entr_destiny}Destiny{}", + "Cards have a higher chance to be Enhanced", + "Start with {C:attention,T:v_magic_trick}Magic Trick{} amd {C:attention,T:v_illusion}Illusion{}" } }, sleeve_entr_butterfly = { name = "Butterfly Sleeve", text = { "{C:attention}-2{} Joker Slots", - "Sold Jokers have a {C:green}#1# in 2{}", + "Sold Jokers have a {C:green}1 in 2{}", "chance to still trigger" } }, sleeve_entr_gemstone = { name = "Gemstone Sleeve", text = { - "Non Rune Consumables have a {C:green}1 in 3{}", + "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" }, }, + sleeve_entr_corrupted = { + name = "Corrupted Sleeve", + text = { + "{C:attention}Jokers{} and {C:attention}Consumables{}", + "Cycle between {C:attention}2{} options" + } + }, }, Fraud = { c_entr_master = { @@ -1860,7 +2369,8 @@ local decs = { text = { "{C:attention}Sell{} and {C:attention}Destroy{}", "#1##1# selected card#1#", - "from the {C:attention}shop{}" + "from the {C:attention}shop{}", + "for {X:attention,C:white}X#2#{} their buy cost" } }, c_entr_servant = { @@ -1946,10 +2456,9 @@ local decs = { c_entr_earl = { name = "The Earl", text = { - "Lose all but {C:attention}1{}", - "Discard and Hand for the next round", - "Gain {C:money}Money{} based on how many taken", - "{C:inactive}(Currently: {C:money}$#1#{C:inactive})" + "For the next round", + "spare {C:blue}Hands{} give {C:money}$#1#{}", + "and spare {C:red}Discards{} give {C:money}$#2#{}" } }, c_entr_mason = { @@ -2085,6 +2594,58 @@ local decs = { "{C:blue}+#4#{} Chips" } }, + c_entr_wastes = { + name = "The Wastes", + text = { + "{S:0.8}({S:0.8,V:1}lvl.#1#{}{S:0.8,C:gold}#2#{}{S:0.8}){} Level up", + "{C:attention}Halberds", + "{C:blue}+#4#{} Chips" + } + }, + c_entr_inferno = { + name = "Inferno", + text = { + "Destroy {C:attention}all{} Selected Cards", + "lost {C:money}$#1#{} for every card", + "past {C:attention}2{}" + } + }, + c_entr_disturbance = { + name = "The Disturbance", + text = { + "Banish {C:attention}#1#{} selected card#1#", + "Without {C:attention}destroying{} them" + } + }, + c_entr_avarice = { + name = "Avarice", + text = { + "Immediately open {C:attention}#1#{} Standard Packs" + } + }, + c_entr_muse = { + name = "The Muse", + text = { + "{C:attention}Link together{} any", + "#1# selected cards" + } + }, + --Description feels awkwardly worded. + 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_entr_desert = { + name = "The Desert", + text = { + "{S:0.8}({S:0.8,V:1}lvl.#1#{}{S:0.8,C:gold}#2#{}{S:0.8}){} Level up", + "{C:attention}Fleurons", + "{C:blue}+#4#{} Chips" + } + }, c_entr_wastes = { name = "The Wastes", text = { @@ -2162,7 +2723,7 @@ local decs = { name = "Trump Card", text = { "{C:red}Flipside{} can appear in", - "{C:attention}Celestial{}, {C:attention}Arcana{}, and {C:attention}Program{} Packs", + "{C:attention}Celestial{} and {C:attention}Arcana{} Packs", }, }, v_entr_supersede = { @@ -2544,6 +3105,39 @@ local decs = { "{C:gold}+#4#{} Ascension Power" } }, + c_entr_starspectrum = { + name = "Vega", + text = { + "{S:0.8}({S:0.8,V:1}lvl.#1#{}{S:0.8,C:gold}#2#{}{S:0.8}){} Level up", + "{C:attention}#3#", + "{C:gold}+#4#{} Ascension Power" + } + }, + c_entr_starstraightspectrum = { + name = "Rigel", + text = { + "{S:0.8}({S:0.8,V:1}lvl.#1#{}{S:0.8,C:gold}#2#{}{S:0.8}){} Level up", + "{C:attention}#3#", + "{C:gold}+#4#{} Ascension Power" + } + }, + c_entr_starhousespectrum = { + name = "Eltanin", + text = { + "{S:0.8}({S:0.8,V:1}lvl.#1#{}{S:0.8,C:gold}#2#{}{S:0.8}){} Level up", + "{C:attention}#3#", + "{C:gold}+#4#{} Ascension Power" + } + }, + --least sure about the name of this one, feel free to change it to a different star + c_entr_starfivespectrum = { + name = "HD 33579", + text = { + "{S:0.8}({S:0.8,V:1}lvl.#1#{}{S:0.8,C:gold}#2#{}{S:0.8}){} Level up", + "{C:attention}#3#", + "{C:gold}+#4#{} Ascension Power" + } + }, c_entr_multiverse = { name = Cryptid_config.family_mode and "Multiverse" or "The Multiverse In Its Fucking Entirety", text = { @@ -2763,6 +3357,13 @@ local decs = { "Destroy all other held Jokers" } }, + c_entr_highway = { + name = "Highway", + text = { + "Destroy {C:red}all{} Jokers except {C:attention}one{}", + "then create an {C:entr_entropic,E:1}Entropic{} Joker" + } + }, c_entr_fervour={ name="Fervour", text={ @@ -2928,6 +3529,7 @@ local decs = { "convert the {C:attention}left{} Joker", "into the {C:attention}right{} Joker", "then {C:attention}strip{} its edition", + "and debuff it for {C:attention}#2#{} rounds" } }, c_entr_charm = { @@ -3057,7 +3659,6 @@ local decs = { name = "Pact of Serpents", text = { "Create a random {C:attention}Rare{} Consumable", - "{C:money}-$#1#{}", "{C:inactive}(May overflow){}" } }, @@ -3098,6 +3699,66 @@ local decs = { "to #1# selected card", } }, + + c_entr_idyll = { + name = "Idyll", + text = { + "Create a {C:attention}Copy{}", + "and an {C:entr_entropic}Ascended{}", + "variant of the last obtained {C:attention}Tag{}" + } + }, + }, + Aesthetic = { + c_entr_vintage = { + name = "Vintage", + text = { + "Enhance up to {C:attention}#1#{} selected", + "Joker with {C:attention}#2#{}", + } + }, + c_entr_retro = { + name = "Retro", + text = { + "Enhance up to {C:attention}#1#{} selected", + "Joker with {C:attention}#2#{}", + } + }, + c_entr_ytp = { + name = "YTP", + text = { + "Enhance up to {C:attention}#1#{} selected", + "Joker with {C:attention}#2#{}", + } + }, + c_entr_solarpunk = { + name = "Solarpunk", + text = { + "Enhance up to {C:attention}#1#{} selected", + "Joker with {C:attention}#2#{}", + } + }, + c_entr_breakcore = { + name = "Breakcore", + text = { + "Enhance up to {C:attention}#1#{} selected", + "Joker with {C:attention}#2#{}", + } + }, + c_entr_lewd = { + name = "Lewd", + text = { + "Enhance up to {C:attention}#1#{} selected", + "Joker with {C:attention}#2#{}", + } + }, + c_entr_disco = { + name = "Disco", + text = { + "Enhance up to {C:attention}#1#{} selected", + "Joker with {C:attention}#2#{}", + } + }, }, Transient = { c_entr_cage = { @@ -3271,7 +3932,15 @@ local decs = { "card#1# into a", "{C:attention}Ceramic Card{}" } - } + }, + c_entr_comet = { + name = "The Comet", + text = { + "Enhances {C:attention}#1#{} selected", + "card#1# into a", + "{C:attention}Radiant Card{}" + } + }, }, Spectral = { c_entr_flipside = { @@ -3294,6 +3963,7 @@ local decs = { text = { "Apply {C:dark_edition}Fractured{} to", "{C:attention}#1#{} selected cards in hand", + "{C:red}-#2#{} Card Selection Limit" } }, c_entr_lust = { @@ -3344,6 +4014,14 @@ local decs = { "card in your hand" } }, + c_entr_manifest = { + name = "Manifest", + text = { + "Create {C:entr_entropic}Ascended{}", + "variants of this antes", + "Skip Tags" + } + }, }, Stake = { stake_entr_copper = { @@ -3600,7 +4278,7 @@ local decs = { }, tag_entr_ascendant_universal = { name = "{C:gold}Universal Tag{}", - text = { "Level up {C:attention}#1#{}", "{C:gold}+6{} Ascension Power" }, + text = { "Level up {C:attention}#1#{}", "{C:gold}+3{} Ascension Power" }, }, tag_entr_ascendant_ebundle = { name = "{C:gold}Bundle Tag{}", @@ -3613,7 +4291,7 @@ local decs = { }, tag_entr_ascendant_stock = { name = "{C:gold}Stock Tag{}", - text = {"Multiplies your money by 2.5X", }, + text = {"Multiplies your money by 2X", }, }, tag_entr_ascendant_blind = { name = "{C:gold}Blind Tag{}", @@ -3674,6 +4352,15 @@ local decs = { "Obtain {C:attention}Two{} random {C:purple}Runes{}" }, }, + + tag_entr_ascendant_negative_eternal = { + name = "{C:gold}Negative Eternal Tag{}", + text = { "{C:attention}All{} shop items are","{C:dark_edition}Negative{} and {C:attention}Eternal{}" }, + }, + tag_entr_ascendant_kitty = { + name = "{C:gold}Kitty Tag{}", + text = { "Every {C:attention}Kitty Tag{} owned", "Gives {X:chips,C:white}X#1#{} Chips" }, + }, }, ["Rune Tag"] = { rune_entr_fehu = { @@ -3739,14 +4426,15 @@ local decs = { rune_entr_raido = { name = "Raido", text = { - "Prevents the next", + "{C:green}#1# in #2#{} chance", + "to prevent the next", "change of Ante", } }, rune_entr_raido_providence = { name = "Raido{C:purple}+{}", text = { - "{C:purple,E:1}Inverts{} the next", + "{C:purple,E:1}Prevents{} the next", "change of Ante", } }, @@ -3901,16 +4589,16 @@ local decs = { rune_entr_algiz = { name = "Algiz", text = { - "Prevents the next {C:red}Death{}", - "and grants {C:money}$5{} when this occurs" + "Costs {C:money}$10{} to", + "prevent the next {C:red}Death{}", } }, rune_entr_algiz_providence = { name = "Algiz{C:purple}+{}", text = { - "Prevents the next {C:red}Death{}", - "and grants {C:purple,E:1}$10{} when this occurs" + "Costs {C:purple,E:1}$5{} to", + "prevent the next {C:red}Death{}", } }, @@ -4279,13 +4967,13 @@ local decs = { } }, rune_entr_blood = { - name = "Blood of Blood", + name = "Mark of Blood", text = { "Marked by {C:red}Blood{}" } }, rune_entr_awakening = { - name = "Blood of Awakening", + name = "Mark of Awakening", text = { "Marked by {C:red}Awakening{}" } @@ -4364,6 +5052,7 @@ local decs = { c_entr_raido = { name = "Rune of Raido", text = { + "{C:green}#1# in #2#{} chance that", "The next {C:attention}change{} in", "Ante is prevented" } @@ -4372,7 +5061,7 @@ local decs = { name = "Rune of Raido{C:purple}+{}", text = { "The next {C:attention}change{} in", - "Ante is {C:purple,E:1}Inverted{}" + "Ante is {C:purple,E:1}prevented{}" } }, c_entr_kaunan = { @@ -4482,7 +5171,8 @@ local decs = { text = { "Create a {C:attention}copy{} of", "the next {C:attention}used{}", - "Consumable" + "Consumable", + "{C:inactive}(Rare Consumables excluded)" } }, c_entr_jera_providence = { @@ -4528,15 +5218,15 @@ local decs = { c_entr_algiz = { name = "Rune of Algiz", text = { - "Prevent the next {C:red}Death{}", - "and grant {C:money}$5{} when this occurs" + "Costs {C:money}$10{} to", + "prevent the next {C:red}Death{}", } }, c_entr_algiz_providence = { name = "Rune of Algiz{C:purple}+{}", text = { - "Prevent the next {C:red}Death{}", - "and grant {C:purple,E:1}$10{} when this occurs" + "Costs {C:purple,E:1}$5{} to", + "prevent the next {C:red}Death{}", } }, @@ -4863,7 +5553,73 @@ local decs = { } }, }, + mtx = { + c_entr_extrajoker = { + name = "Extra Jokers", + text = { + "{C:attention}+#1# Joker Slot{}", + "{C:purple}-c.#2#{}" + } + }, + c_entr_unstick = { + name = "Unstick", + text = { + "Remove ALL {C:attention}stickers{}", + "from your {C:attention}Jokers{}", + "{C:purple}-c.#1#{}" + } + }, + c_entr_extrahands = { + name = "Extra Hands", + text = { + "{C:blue}+#1# Hand{}", + "{C:purple}-c.#2#{}" + } + }, + c_entr_moneybundle = { + name = "Bundle of Dollars", + text = { + "{C:money}+$#1#{}", + "{C:purple}-c.#2#{}" + } + }, + c_entr_biggerpockets = { + name = "Bigger Pockets", + text = { + "{C:attention}+#1# Consumable Slot{}", + "{C:purple}-c.#2#{}" + } + }, + c_entr_deckfix = { + name = "Deckfix", + text = { + "Destroy up to {C:attention}#1#{}", + "selected cards", + "{C:purple}-c.#2#{}" + } + }, + c_entr_generousdonation = { + name = "Generous Donation", + text = { + "{C:purple}-c.#1#{}" + } + }, + }, Other = { + antipattern_pair = { + name = "Antipattern", + text = { + "Hands played after #1#: ", + "#2# #3# #4# #5# #6# #7#", + "#8# #9# #10# #11# #12#", + } + }, + cry_multiuse = { + name = "m", + text = { + "{C:inactive}Multiuse: ({V:1}#1#{C:inactive} remaining)", + }, + }, cry_banana_booster = { name = "Banana", text = { @@ -4907,7 +5663,7 @@ local decs = { } }, inversion_allowed = { - name = "Flipside", + name = "Inversion", text = { "Can be {C:red}Inverted{}", "into {C:red}#1#{}" @@ -4932,7 +5688,7 @@ local decs = { group_name = "Inverted Card", text={ "Choose {C:attention}#1#{} of up to", - "{C:attention}#2#{V:1} Inverted{} cards to", + "{C:attention}#2#{C:red} Inverted{} cards to", "be used immediately or taken", } }, @@ -4941,7 +5697,7 @@ local decs = { group_name = "Inverted Card", text={ "Choose {C:attention}#1#{} of up to", - "{C:attention}#2#{V:1} Inverted{} cards to", + "{C:attention}#2#{C:red} Inverted{} cards to", "be used immediately or taken", }, }, @@ -4950,7 +5706,34 @@ local decs = { group_name = "Inverted Card", text={ "Choose {C:attention}#1#{} of up to", - "{C:attention}#2#{V:1} Inverted{} cards to", + "{C:attention}#2#{C:red} Inverted{} cards to", + "be used immediately or taken", + }, + }, + p_entr_twisted_pack_normal_2 = { + name = "Twisted Pack", + group_name = "Inverted Card", + text={ + "Choose {C:attention}#1#{} of up to", + "{C:attention}#2#{C:red} Inverted{} cards to", + "be used immediately or taken", + } + }, + p_entr_twisted_pack_jumbo_2 = { + name = "Jumbo Twisted Pack", + group_name = "Inverted Card", + text={ + "Choose {C:attention}#1#{} of up to", + "{C:attention}#2#{C:red} Inverted{} cards to", + "be used immediately or taken", + }, + }, + p_entr_twisted_pack_mega_2 = { + name = "Mega Twisted Pack", + group_name = "Inverted Card", + text={ + "Choose {C:attention}#1#{} of up to", + "{C:attention}#2#{C:red} Inverted{} cards to", "be used immediately or taken", }, }, @@ -5158,11 +5941,10 @@ local decs = { entr_sapphire_seal = { name = "Sapphire Seal", text = { - "Create the {C:purple}Star{} card", - "for played hand if this", - "card is {C:attention}part{}", - "of the poker hand", - "{C:inactive}(Must have room){}" + "Give {C:attention}+0.25{} Ascension ", + "Power to the played hand", + "if {C:attention}held{} in hand", + "at end of round" } }, entr_silver_seal = { @@ -5285,6 +6067,36 @@ local decs = { "This Jokers 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 = { + 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" + } } }, Partner = { @@ -5402,7 +6214,7 @@ local decs = { 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: Ruby, Slipstream, Cassknows, or Crabus", + 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" }, @@ -5416,6 +6228,8 @@ local decs = { entr_nilrank = "Nil" }, dictionary = { + 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_2 = "Cards cannot be debuffed", @@ -5475,6 +6289,9 @@ local decs = { k_transient = "Transient", b_transient_cards = "Transient Cards", + k_mtx = "MTX", + b_mtx_cards = "MTX Cards", + k_inverted = "Inverted", k_inverted_pack = "Twisted Pack", k_voucher_pack = "Voucher Pack", @@ -5486,6 +6303,7 @@ local decs = { k_entr_faster_ante_scaling = "Scale Blind scores quicker if you have an Entropic Joker", k_entr_entropic_music = "Entropic Jokers (Joker in Greek by gemstonez)", k_entr_blind_tokens = "Enable Blind Tokens", + k_entr_profile_prefix = "Enable Custom Profiles for Entropy", k_credits = "Credits", k_code = "Code", k_idea = "Ideas", @@ -5540,7 +6358,7 @@ local decs = { entr_opened = "Opened!", entr_kiy_banished = "Banished.", - k_saved_heoric = "Not Heroic!", + k_saved_heroic = "Not Heroic!", k_saved_just = "Not Just!", b_on = "Enable", b_off = "Disable", @@ -5559,6 +6377,7 @@ local decs = { cry_notif_antireal_d3 = "used for streams and videos.", 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", @@ -5625,7 +6444,15 @@ local decs = { k_portal_reference = "The Part Where She Kills You", k_entropy_is_endless = "Entropy Is Endless", - k_switch_ex = "Switch!" + 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_switch_ex = "Switch!", + k_bounce_ex = "Bounce!" }, v_dictionary = { card_art = "Card Art: #1#", @@ -5694,7 +6521,12 @@ local decs = { c_entr_vesuvius = "Vesuvius", c_entr_hyperaccelerated_bongcloud_opening = "Hyperaccelerated Bongcloud Opening", c_entr_hyperbolic_chamber = "Hyperbolic Hell-Tier Chamber", - c_entr_daily = "Daily Challenge" + c_entr_daily = "Daily Challenge", + c_entr_paycheck_to_paycheck = "Paycheck to Paycheck", + c_entr_riffle_shuffle = "Riffle Shuffle", + c_entr_variety_content = "Variety Content", + c_entr_phantom_hand_syndrome = "Phantom Hand Syndrome", + c_entr_eco_friendly = "Eco-Friendly", }, v_text = { ch_c_entr_no_planets = { "No Planets in the Shop" }, @@ -5753,6 +6585,10 @@ local decs = { "think that would", "work?" }, + entr_tq_ee_half = { + "Is that", + "all you got?" + }, entr_wq_ee_1={ "Huh?", }, @@ -5799,10 +6635,10 @@ local decs = { "I was right to", "believe in you" }, - ente_wq_4 = { + entr_wq_4 = { "Good Job now do", "Iridium Stake" - } + }, } }, } @@ -5821,7 +6657,7 @@ for i, v in pairs(G.localization.descriptions.Blind) do local text = {} for i2, v2 in pairs(v.text or {}) do text[#text+1]=v2 end CBlind["c_entr_"..i] = { - name=(v.name or "Blind").." Token", + name=(type(v.name) ~= "table" and v.name or "Blind").." Token", text={ "Use to change the upcoming Blind", } diff --git a/lovely/ascended.toml b/lovely/ascended.toml index c6d52874..916cada5 100644 --- a/lovely/ascended.toml +++ b/lovely/ascended.toml @@ -53,7 +53,7 @@ G.GAME.hands[text].played_this_round = G.GAME.hands[text].played_this_round + 1 ''' position = "before" payload = ''' -if G.GAME.current_round.current_hand.cry_asc_num and (((type(G.GAME.current_round.current_hand.cry_asc_num) == "table" and G.GAME.current_round.current_hand.cry_asc_num:gt(to_big(G.GAME.cry_exploit_override and 1 or 0)) or G.GAME.current_round.current_hand.cry_asc_num > (G.GAME.cry_exploit_override and 1 or 0)))) then +if G.GAME.current_round.current_hand.cry_asc_num and to_big(G.GAME.current_round.current_hand.cry_asc_num) > to_big(G.GAME.cry_exploit_override and 1 or 0) then G.GAME.cry_asc_played = G.GAME.cry_asc_played and G.GAME.cry_asc_played+1 or 1 end ''' diff --git a/lovely/compat.toml b/lovely/compat.toml index 4d4d79f5..c0216ecf 100644 --- a/lovely/compat.toml +++ b/lovely/compat.toml @@ -222,8 +222,18 @@ match_indent = true [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''' -position = "before" +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 ''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''=[SMODS vallkarri "Items/helpers.lua"]''' +pattern = '''if tag.key == "tag_valk_kitty" then''' +position = "at" +payload = ''' +if tag.key == "tag_valk_kitty" or tag.key == "tag_entr_ascendant_kitty" then +''' match_indent = true \ No newline at end of file diff --git a/lovely/core.toml b/lovely/core.toml index 73c7a1e0..0a1709b3 100644 --- a/lovely/core.toml +++ b/lovely/core.toml @@ -10,6 +10,7 @@ pattern = '''function love.load()''' position = "before" payload = ''' Entropy = {} +Entropy.ee_faces = {} Entropy.AltBlinds = {} Entropy.FlipsideInversions = {} Entropy.FlipsidePureInversions = {} @@ -60,7 +61,8 @@ Entropy.BlindTokenBlacklist = { bl_entr_endless_entropy_phase_one = true, bl_entr_endless_entropy_phase_two = true, bl_entr_endless_entropy_phase_three = true, - bl_entr_endless_entropy_phase_four = true + bl_entr_endless_entropy_phase_four = true, + bl_entr_void = true } Entropy.References = {} Entropy.RarityPoints = { @@ -100,8 +102,13 @@ Entropy.EditionFactors = { ["e_cry_m"] = 1.45, ["e_entr_solar"] = 2.4, ["e_entr_sunny"] = 1.45, - ["e_entr_fractured"] = 2.4, - ["e_entr_freaky"] = 1.8, + ["e_entr_fractured"] = 3, + ["e_entr_freaky"] = 2.5, + ["e_entr_neon"] = 1.5, + ["e_entr_lowres"] = 2, + ["e_entr_kaleidoscopic"] = 2.5, + ["e_hpot_phantasmic"] = 2.25, + ["e_hpot_psychedelic"] = 2 } Entropy.SegFaultBlacklist = { entr_entropic = true, @@ -119,6 +126,7 @@ Entropy.RareInversions = { "c_entr_fervour", "c_entr_quasar", "c_entr_weld", + "c_entr_serpents" } Entropy.FixedRecipes = { c_basec_basec_basec_basec_base = "j_joker", @@ -127,13 +135,12 @@ Entropy.FixedRecipes = { m_cry_lightm_cry_lightm_cry_lightm_entr_fleshm_entr_flesh = "j_entr_dr_sunshine", m_cry_lightm_cry_lightm_cry_lightm_cry_lightm_gold = "j_entr_devilled_suns", c_basec_basec_basem_multm_mult = "j_jolly", - c_basec_basec_basem_steelm_steel = "j_steel_joker", m_bonusm_bonusm_bonusm_bonusm_bonus = "j_banner", m_multm_multm_multm_multm_mult = "j_misprint", m_wildm_wildm_wildm_wildm_wild = "j_ancient", m_glassm_glassm_glassm_glassm_glass = "j_glass", m_steelm_steelm_steelm_steelm_steel = "j_steel", - m_stonem_stonem_stonem_stonem_stone = "j_paved", + m_stonem_stonem_stonem_stonem_stone = Cryptid and "j_cry_paved" or "j_marble", m_goldm_goldm_goldm_goldm_gold = "j_ticket", m_luckym_luckym_luckym_luckym_lucky = "j_lucky_cat", m_entr_fleshm_entr_fleshm_entr_fleshm_entr_fleshm_entr_flesh = "j_entr_grotesque_joker", @@ -143,6 +150,7 @@ Entropy.FixedRecipes = { c_basec_basec_basec_basem_entr_disavowed = "j_entr_surreal_joker", c_basem_multm_multm_multm_mult = "j_entr_red_fourty", c_basem_bonusm_bonusm_multm_mult = "j_entr_purple_joker", + m_entr_radiantm_entr_radiantm_entr_radiantm_entr_radiantm_entr_radiant = "j_entr_sunny_joker" } Entropy.EnhancementPoints ={ m_entr_disavowed=0, @@ -151,17 +159,21 @@ Entropy.EnhancementPoints ={ m_mult=3.2, m_wild=4.1, m_lucky=4.2, - m_stone=5.1, - m_entr_flesh=5.2, - m_steel=6.1, - m_gold=6.2, - m_cry_echo=6.3, - m_glass=7.1, - m_cry_light=7.2, - m_entr_dark = 8, - m_cry_abstract=9.1, - m_entr_prismatic = 20, - m_entr_ceramic = 6.5 + m_stone=4.1, + m_entr_flesh=4.2, + m_steel=5.1, + m_gold=5.2, + m_cry_echo=5.3, + m_glass=5.5, + m_cry_light=6.2, + m_entr_dark = 6.1, + m_cry_abstract=7.1, + m_entr_prismatic = 15, + m_entr_ceramic = 5.5, + m_entr_radiant = 5.7, + m_hpot_lead = 5.15, + m_entr_ethereal = 8.5, + m_entr_samsara = 9 } Entropy.TMTrainerEffects = {} Entropy.TMTrainerScoring = {} @@ -201,7 +213,46 @@ match_indent = true target = "game.lua" pattern = 'Cryptid.profile_prefix = Jen and "J" or "M"' position = "after" -payload = 'Cryptid.profile_prefix = Cryptid.profile_prefix == "M" and "E" or Cryptid.profile_prefix.."E"' +payload = 'local pref = Entropy_config.profile_prefix and "E" or "M"; Cryptid.profile_prefix = Cryptid.profile_prefix == "M" and pref or Cryptid.profile_prefix..pref' +match_indent = true + +[[patches]] +[patches.pattern] +target = "game.lua" +pattern = 'self:load_profile(G.SETTINGS.profile or 1)' +position = "before" +payload = ''' +if not Cryptid then Cryptid = {profile_prefix = Entropy_config.profile_prefix and "E" or ""} end; +Cryptid.profile_prefix = Entropy_config.profile_prefix and "E" or "" +if type(G.SETTINGS.profile) ~= "string" or G.SETTINGS.profile:sub(1, #Cryptid.profile_prefix) ~= Cryptid.profile_prefix then + G.SETTINGS.profile = Cryptid.profile_prefix .. "1" +end +for i = 1, 3 do + G.PROFILES[Cryptid.profile_prefix .. i] = {} +end''' +match_indent = true + +[[patches]] +[patches.pattern] +target = "functions/button_callbacks.lua" +pattern = 'for i = 1, 3 do' +position = "after" +payload = 'if not Cryptid then Cryptid = {profile_prefix = (Entropy.config or Entropy_config).profile_prefix and "E" or ""} end; i = Cryptid.profile_prefix .. i' +match_indent = true + + + +[[patches]] +[patches.pattern] +target = "game.lua" +pattern = "local settings = get_compressed('settings.jkr')" +position = "after" +payload = '''Entropy_config = {profile_prefix = true} +local entr_conf = get_compressed("config/entr.jkr") +if entr_conf then + Entropy_config = STR_UNPACK(entr_conf) +end +''' match_indent = true @@ -262,26 +313,13 @@ if G.GAME.modifiers.ccd2 then local ptype = pseudorandom_element({ "Booster", "Voucher", - "Tarot", "Joker", - "Consumeable", - }, pseudoseed("segfault")) - if ptype == "Consumeable" then - key = G.P_CENTERS[Cryptid.random_consumable("entr_segfault", nil, "c_entr_segfault").key] - while key.no_doe or G.GAME.banned_keys[key.key] do - key = G.P_CENTERS[Cryptid.random_consumable("entr_segfault", nil, "c_entr_segfault").key] - end - key = key.key - else - key = pseudorandom_element(G.P_CENTERS, pseudoseed("segfault")) - local tries = 0 - while key.set ~= ptype or key.no_doe or G.GAME.banned_keys[key.key] do --i love when my key has keys - key = pseudorandom_element(G.P_CENTERS, pseudoseed("segfault")) - tries = tries + 1 - end - key = key.key - end - v:set_ability(G.P_CENTERS[key]) + "Consumeables", + "Consumeables", + }, pseudoseed("redefined")) + local center = Entropy.GetPooledCenter(ptype) + v:set_ability(center) + discover_card(center) end end ''' @@ -325,9 +363,14 @@ position = "after" payload = ''' elseif self.exponent[2] > 0 then local initial = to_big(get_blind_amount(G.GAME.round_resets.ante)*G.GAME.starting_params.ante_scaling) - initial = Big:create(initial) - initial = initial:arrow(self.exponent[1], self.exponent[2]) - self.chips = initial + if Big then + initial = Big:create(initial) + initial = initial:arrow(self.exponent[1], self.exponent[2]) + self.chips = initial + else + initial = initial ^ self.exponent[2] + self.chips = initial + end end ''' match_indent = true @@ -353,7 +396,11 @@ position = "after" payload = ''' if blind_choice.config.exponent then local initial = get_blind_amount(G.GAME.round_resets.ante)*G.GAME.starting_params.ante_scaling - initial = initial:arrow(blind_choice.config.exponent[1], blind_choice.config.exponent[2]) + if Big then + initial = initial:arrow(blind_choice.config.exponent[1], blind_choice.config.exponent[2]) + else + initial = initial ^ blind_choice.config.exponent[2] + end blind_amt = initial end ''' @@ -1340,7 +1387,11 @@ position = "after" payload = ''' if Entropy.DeckOrSleeve("butterfly") then for i = 1, Entropy.DeckOrSleeve("butterfly") do - t[#t+1] = G.butterfly_jokers + 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 + end + t[#t+1] = jok end end ''' @@ -1414,6 +1465,7 @@ pattern = ''' STATE = G.STATE, ACTION = G.action or nil, BLIND = G.GAME.blind:save(), + SCORING_CALC = G.GAME.current_scoring_calculation:save(), BACK = G.GAME.selected_back:save(), VERSION = G.VERSION } @@ -1436,6 +1488,7 @@ payload = ''' STATE = G.STATE, ACTION = G.action or nil, BLIND = G.GAME.blind:save(), + SCORING_CALC = G.GAME.current_scoring_calculation:save(), BACK = G.GAME.selected_back:save(), VERSION = G.VERSION } @@ -1529,11 +1582,6 @@ if self.ability.name == "The Hanged Man" then if SMODS.is_eternal(G.hand.highlighted[i]) then return false end end end -if self.ability.name == "Death" then - local rightmost = G.hand.highlighted[1] - for i=1, #G.hand.highlighted-1 do if G.hand.highlighted[i].T.x > rightmost.T.x then rightmost = G.hand.highlighted[i] end end - for i=1, #G.hand.highlighted do if SMODS.is_eternal(G.hand.highlighted[i]) and rightmost ~= G.hand.highlighted[i] then return false end end -end ''' match_indent = true @@ -1820,3 +1868,1135 @@ elseif G.GAME.round_resets.blind == G.P_BLINDS.bl_big then elseif G.GAME.blind_on_deck ~= "Red" then ''' match_indent = true + +[[patches]] +[patches.pattern] +target = 'game.lua' +pattern = ''' + if G.SPLASH_BACK then + if G.debug_background_toggle then + love.graphics.clear({0,1,0,1}) + else + love.graphics.push() + G.SPLASH_BACK:translate_container() + G.SPLASH_BACK:draw() + love.graphics.pop() + end + end +''' +position = 'after' +payload = ''' + if G.SPLASH_EE then + if G.debug_background_toggle then + + else + love.graphics.push() + G.SPLASH_EE:translate_container() + G.SPLASH_EE:draw() + love.graphics.pop() + end + end +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = 'functions/UI_definitions.lua' +pattern = ''' +if G.GAME.modifiers.no_blind_reward and G.GAME.modifiers.no_blind_reward[type] then _reward = nil end +''' +position = 'after' +payload = ''' +if (G.GAME.modifiers.no_blind_reward and G.GAME.modifiers.no_blind_reward[type]) or ((type == "Big" or type == "Small") and G.GAME.EEBuildup) then _reward = nil end +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''functions/common_events.lua''' +pattern = '''if main_end then''' +position = "before" +payload = ''' +if cfg and cfg.cry_multiuse then + local loc = {} + localize{type = 'other', key = 'cry_multiuse', nodes = loc, vars = {cfg.cry_multiuse, colours = {get_type_colour(cfg, card)}}} + desc_nodes[#desc_nodes+1] = loc[1] +end +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''functions/common_events.lua''' +pattern = '''if cfg and cfg.cry_multiuse then + local loc = {} + localize{type = 'other', key = 'cry_multiuse', nodes = loc, vars = {cfg.cry_multiuse}} + desc_nodes[#desc_nodes+1] = loc[1] +end''' +position = "at" +payload = ''' + +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = "functions/button_callbacks.lua" +pattern = '''if (prev_state == G.STATES.TAROT_PACK or prev_state == G.STATES.PLANET_PACK or''' +position = "before" +payload = ''' +if cry_muse and not (SMODS.Mods["Cryptid"] or {}).can_load then + 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} + }) + + delay(0.8) + if card.playing_card then + draw_card(G.play, G.hand, 1, 'up', true, card, nil, true) + elseif not G.GAME.modifiers.cry_beta then + if to_big(#G.consumeables.cards) < to_big(G.consumeables.config.card_limit) then + draw_card(G.play, G.consumeables, 1, 'up', true, card, nil, true) + else card:start_dissolve() + end + else + if to_big(#G.jokers.cards) < to_big(G.jokers.config.card_limit) then + draw_card(G.play, G.jokers, 1, 'up', true, card, nil, true) + else card:start_dissolve() + end + end +end +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = "functions/button_callbacks.lua" +pattern = '''if card.area and (not nc or card.area == G.pack_cards) then card.area:remove_card(card) end''' +position = "before" +payload = ''' +local cry_muse = false +if card.ability.cry_multiuse and not (card.ability.cry_multiuse <= 1) then + cry_muse = true + dont_dissolve = true +end +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = "functions/UI_definitions.lua" +pattern = '''if AUT.card_type == 'Joker' or (AUT.badges and AUT.badges.force_rarity) then card_type = SMODS.Rarity:get_rarity_badge(card.config.center.rarity) end''' +position = "at" +payload = ''' +if AUT.card_type == 'Joker' or (AUT.badges and AUT.badges.force_rarity) then + local rarity = card.ability.glitched_crown and G.P_CENTERS[card.ability.glitched_crown[card.glitched_index]] and G.P_CENTERS[card.ability.glitched_crown[card.glitched_index]].rarity or card.config.center.rarity + card_type = SMODS.Rarity:get_rarity_badge(rarity) +end +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = "functions/UI_definitions.lua" +pattern = '''local card = create_card(v.type, area, nil, nil, nil, nil, nil, 'sho')''' +position = "at" +payload = ''' +local card = create_card(v.type, area, nil, nil, nil, nil, nil, 'sho') +Entropy.post_create_card(card) +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = "card.lua" +pattern = '''pack_cards[i] = card''' +position = "after" +payload = ''' +Entropy.post_create_card(card, true) +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = "card.lua" +pattern = ''' +if self.ability.consumeable.mod_num >= #G.hand.highlighted and #G.hand.highlighted >= (self.ability.consumeable.min_highlighted or 1) then''' +position = "at" +payload = ''' + +if (self.ability.consumeable.max_highlighted or 9999) + (self.area == G.hand and 1 or 0) >= #G.hand.highlighted and #G.hand.highlighted - (self.area == G.hand and 1 or 0) >= (self.ability.consumeable.min_highlighted or 1) then +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = "card.lua" +pattern = ''' +local temp_pool = (self.ability.name == 'The Wheel of Fortune' and self.eligible_strength_jokers) or + ((self.ability.name == 'Ectoplasm' or self.ability.name == 'Hex') and self.eligible_editionless_jokers) or {}''' +position = "at" +payload = ''' + +local temp_pool = (self.ability.name == 'The Wheel of Fortune' and self.eligible_strength_jokers) or + (self.eligible_editionless_jokers) + +if not temp_pool then + temp_pool = {} + for i, v in pairs(G.jokers.cards) do + if not v.edition then + temp_pool[#temp_pool+1] = v + end + end +end +''' +match_indent = true + + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/game_object.lua"]''' +pattern = ''' +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 (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 +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/utils.lua"]''' +pattern = ''' +function SMODS.calculate_destroying_cards(context, cards_destroyed, scoring_hand) + for i,card in ipairs(context.cardarea.cards) do +''' +position = "at" +payload = ''' +function SMODS.calculate_destroying_cards(context, cards_destroyed, scoring_hand) + local cards = {} + for i,card in ipairs(context.cardarea.cards) do + if not SMODS.is_eternal(card) then + cards[#cards+1] = card + end + end + for i,card in ipairs(cards) do +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = "functions/state_events.lua" +pattern = '''if SMODS.has_enhancement(scoring_hand[i], 'm_glass') and scoring_hand[i]:can_calculate() and pseudorandom('glass') < G.GAME.probabilities.normal/(scoring_hand[i].ability.name == 'Glass Card' and scoring_hand[i].ability.extra or G.P_CENTERS.m_glass.config.extra) then''' +position = "at" +payload = ''' +if (SMODS.has_enhancement(scoring_hand[i], 'm_glass') + and not scoring_hand[i].debuff + and SMODS.pseudorandom_probability(scoring_hand[i], 'glass', 1, scoring_hand[i].ability.extra or G.P_CENTERS.m_glass.config.extra) + and not SMODS.is_eternal(scoring_hand[i]) then''' +match_indent = true + +[[patches]] +[patches.pattern] +target = "card.lua" +pattern = "if self.ability.name == 'The Wheel of Fortune' then" +position = "before" +payload = ''' +if self.ability.name == "The Hanged Man" then + for i = 1, #G.hand.highlighted do + if SMODS.is_eternal(G.hand.highlighted[i]) then return false end + end +end +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = "functions/common_events.lua" +pattern = ''' +function juice_card(card) + G.E_MANAGER:add_event(Event({ + trigger = 'immediate', + func = (function() card:juice_up(0.7);return true end) + })) +end +''' +position = "at" +payload = ''' +function juice_card(card) + G.E_MANAGER:add_event(Event({ + trigger = 'immediate', + func = (function() if card.juice_up then card:juice_up(0.7) end return true end) + })) +end +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = "card.lua" +pattern = ''' +local bonus_chips = self.ability.bonus + (self.ability.perma_bonus or 0) +''' +position = "at" +payload = ''' +self.ability.bonus = self.ability.bonus or 0 +self.ability.perma_h_x_chips = self.ability.perma_h_x_chips or 0 +self.ability.perma_x_chips = self.ability.perma_x_chips or 0 +self.ability.perma_x_mult = self.ability.perma_x_mult or 0 +self.ability.perma_h_x_mult = self.ability.perma_h_x_mult or 0 +local bonus_chips = self.ability.bonus + (self.ability.perma_bonus or 0) +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = "functions/UI_definitions.lua" +pattern = ''' +local banned_cards, banned_tags, banned_other = {}, {}, {} +''' +position = "after" +payload = ''' +local banned_cards, banned_tags, banned_other = {}, {}, {} + if challenge.restrictions and challenge.restrictions.banned_cards then + local banned = {} + for i, v in pairs(challenge.restrictions.banned_cards) do + if G.P_CENTERS[v.id] then + banned[#banned+1] = v + end + end + challenge.restrictions.banned_cards = banned + end +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/utils.lua"]''' +pattern = ''' +for _,v in ipairs(post) do effects[#effects+1] = v end +''' +position = "at" +payload = ''' +if not post then return end +for _,v in ipairs(post) do effects[#effects+1] = v end +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/utils.lua"]''' +pattern = ''' +if args and args.main_scoring and eval.individual then +''' +position = "at" +payload = ''' +if not post then return end +if args and args.main_scoring and eval and eval.individual then +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/utils.lua"]''' +pattern = ''' +if next(post) then SMODS.trigger_effects({post}, card) end +''' +position = "at" +payload = ''' +if not post then return end +if next(post) then SMODS.trigger_effects({post}, card) end +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/utils.lua"]''' +pattern = ''' +for _,v in ipairs(available_enhancements) do +''' +position = "at" +payload = ''' +local new_opts = {} +for _,v in ipairs(available_enhancements) do + if not (G.GAME.banned_keys[v.key] or v.no_doe) then + new_opts[#new_opts + 1] = v + end +end +if #new_opts == 0 then + new_opts[1] = "m_mult" +end +for _,v in ipairs(new_opts) do +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/utils.lua"]''' +pattern = ''' +local seal_poll = pseudorandom(pseudoseed(key or 'stdseal'..G.GAME.round_resets.ante)) +''' +position = "before" +payload = ''' +local new_opts = {} +for _,v in ipairs(available_seals) do + if not (G.GAME.banned_keys[v.key] or v.no_doe) then + new_opts[#new_opts + 1] = v + end +end +if #new_opts == 0 then + new_opts[1] = "Red" +end +available_seals = new_opts +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''functions/UI_definitions.lua''' +pattern = ''' + {n=G.UIT.C, config={align = "cr", padding = 0.01, r = 0.1, colour = G.C.CHIPS, minw = 1.1}, nodes={ + {n=G.UIT.T, config={text = 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 = "X", scale = 0.45, colour = G.C.MULT}}, + {n=G.UIT.C, config={align = "cl", padding = 0.01, r = 0.1, colour = G.C.MULT, minw = 1.1}, nodes={ + {n=G.UIT.B, config={w = 0.08,h = 0.01}}, + {n=G.UIT.T, config={text = number_format(G.GAME.hands[handname].mult, 1000000), scale = 0.45, colour = G.C.UI.TEXT_LIGHT}} + }} +''' +position = "at" +payload = ''' + {n=G.UIT.C, config={align = "cr", padding = 0.01, r = 0.1, colour = (G.GAME.badarg or {})[handname] and HEX("FF0000") or G.C.CHIPS, minw = 1.1}, nodes={ + {n=G.UIT.T, config={text = (G.GAME.badarg or {})[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 = "X", scale = 0.45, colour = (G.GAME.badarg or {})[handname] and HEX("FF0000") or G.C.MULT}}, + {n=G.UIT.C, config={align = "cl", padding = 0.01, r = 0.1, colour = (G.GAME.badarg or {})[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 or {})[handname] and "ARG" or number_format(G.GAME.hands[handname].mult, 1000000), scale = 0.45, colour = G.C.UI.TEXT_LIGHT}} + }} +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''functions/common_events.lua''' +pattern = ''' +local new_card = new_card or Card(other.T.x, other.T.y, G.CARD_W*(card_scale or 1), G.CARD_H*(card_scale or 1), G.P_CARDS.empty, G.P_CENTERS.c_base, {playing_card = playing_card, bypass_back = G.GAME.selected_back.pos}) +''' +position = "at" +payload = ''' +other.T = other.T or {x = 1, y = 1, w = 1, h = 1} +local new_card = new_card or Card(other.T.x, other.T.y, G.CARD_W*(card_scale or 1), G.CARD_H*(card_scale or 1), G.P_CARDS.empty, G.P_CENTERS.c_base, {playing_card = playing_card, bypass_back = G.GAME.selected_back.pos}) +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''functions/common_events.lua''' +pattern = ''' + 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 +''' +position = "at" +payload = ''' + if not extra or not extra.no_juice and card and card.juice_up then + card:juice_up(0.6, 0.1) + G.ROOM.jiggle = G.ROOM.jiggle + 0.7 + end +''' +match_indent = true + + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/game_object.lua"]''' +pattern = ''' +if center.set ~= self.key then SMODS.insert_pool(G.P_CENTER_POOLS[self.key], center) end +''' +position = "before" +payload = ''' +if not center then return end +''' +match_indent = true + + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/utils.lua"]''' +pattern = ''' +if G.GAME.blind then t[#t + 1] = { object = G.GAME.blind, scored_card = G.GAME.blind.children.animatedSprite } end +''' +position = "at" +payload = ''' +if G.GAME.blind and G.GAME.blind.children then t[#t + 1] = { object = G.GAME.blind, scored_card = G.GAME.blind.children.animatedSprite } end +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''=[SMODS Multiplayer "compatibility/TheOrder.lua"]''' +pattern = ''' +SMODS.Booster:take_ownership_by_kind("Standard", { + create_card = function(self, card, i) + local s_append = "" -- MP.get_booster_append(card) + local b_append = MP.ante_based() .. s_append + + local _edition = poll_edition("standard_edition" .. b_append, 2, true) + local _seal = SMODS.poll_seal({ mod = 10, key = "stdseal" .. b_append }) + + return { + set = (pseudorandom(pseudoseed("stdset" .. b_append)) > 0.6) and "Enhanced" or "Base", + edition = _edition, + seal = _seal, + area = G.pack_cards, + skip_materialize = true, + soulable = true, + key_append = "sta" .. s_append, + } + end, +}, true) +''' +position = "at" +payload = ''' +SMODS.Booster:take_ownership_by_kind("Standard", { + create_card = function(self, card, i) + local s_append = "" -- MP.get_booster_append(card) + local b_append = MP.ante_based() .. s_append + + local _edition = poll_edition("standard_edition" .. b_append, 2, true) + local _seal = SMODS.poll_seal({ mod = 10, key = "stdseal" .. b_append }) + local most_common + if next(SMODS.find_card("j_entr_photocopy")) and i == 1 then + most_common = Entropy.most_common_card() + end + local key + if pseudorandom("entr_rare_standard") < 0.003 or Entropy.has_rune("rune_entr_oss") then + if Entropy.has_rune("rune_entr_oss") then + Entropy.has_rune("rune_entr_oss").triggered = true + end + calculate_runes({generate_rare_consumable = true}) + key = "m_entr_ethereal" + end + return { + set = not key and (pseudorandom(pseudoseed("stdset" .. b_append)) > 0.6) and "Enhanced" or "Base" or nil, + edition = _edition, + seal = _seal, + area = G.pack_cards, + skip_materialize = true, + soulable = true, + key_append = "sta" .. s_append, + rank = most_common and most_common.id or nil, + suit = most_common and most_common.suit or nil, + enhancement = key, + } + end, +}, true) +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''game.lua''' +pattern = ''' +if _ch.consumeables then + for k, v in ipairs(_ch.consumeables) do + G.E_MANAGER:add_event(Event({ + func = function() + add_joker(v.id, nil, k ~= 1) + return true + end + })) + end +end +''' +position = "at" +payload = ''' +if _ch.consumeables then + for k, v in ipairs(_ch.consumeables) do + G.E_MANAGER:add_event(Event({ + func = function() + local _joker = add_joker(v.id, v.edition, k ~= 1) + if v.stickers then + for i, _v in ipairs(v.stickers) do + SMODS.Stickers[_v]:apply(_joker, true) + end + end + if v.eternal then _joker:set_eternal(true) end + if v.pinned then _joker.pinned = true end + if v.rental then _joker:set_rental(true) end + return true + end + })) + end +end +''' +match_indent = true + + +[[patches]] +[patches.pattern] +target = '''functions/state_events.lua''' +pattern = ''' +for i=1, highlighted_count do +''' +position = "at" +payload = ''' +G.E_MANAGER:add_event(Event{ + trigger = "after", + blocking = false, + func = function() + for i, v in pairs(G.discard.cards) do + v.already_discarded = nil + end + for i, v in pairs(G.hand.cards) do + v.already_discarded = nil + end + return true + end +}) +for i=1, highlighted_count do + if not G.hand.highlighted[i] or G.hand.highlighted[i].already_discarded then break end + G.hand.highlighted[i].already_discarded = true +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/utils.lua"]''' +pattern = ''' +local _, eff = next(reps[j]) +''' +position = "before" +payload = ''' +if not reps[j] then break end +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''tag.lua''' +pattern = ''' +if self.name == 'Orbital Tag' then +''' +position = "after" +payload = ''' +if not self.ability.orbital_hand or self.ability.orbital_hand == "[poker hand]" then + self.ability.orbital_hand = "High Card" +end +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/utils.lua"]''' +pattern = ''' +local in_scoring = scoring_hand and SMODS.in_scoring(card, context.scoring_hand) +''' +position = "at" +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 + in_scoring = true +end +if G.rubber_cards and scoring_hand [_] == scoring_hand [_-1] then + card_eval_status_text( + card, + "extra", + nil, + nil, + nil, + { message = localize("k_bounce_ex"), sound = "entr_bounce" } + ) +end +''' +match_indent = true +times = 1 + +[[patches]] +[patches.pattern] +target = '''functions/state_events''' +pattern = ''' + for i=1, #scoring_hand do + --Highlight all the cards used in scoring and play a sound indicating highlight + highlight_card(scoring_hand[i],(i-0.999)/5,'up') + end +''' +position = "at" +payload = ''' + for i=1, #scoring_hand do + --Highlight all the cards used in scoring and play a sound indicating highlight + local area = context.scoring_hand + if scoring_hand[i].area == G.play and G.rubber_cards then area = G.rubber_cards.cards end + local in_scoring = scoring_hand and SMODS.in_scoring(card, area) + if in_scoring then + highlight_card(scoring_hand[i],(i-0.999)/5,'up') + end + end +''' +match_indent = true + + +[[patches]] +[patches.pattern] +target = '''functions/common_events.lua''' +pattern = ''' +config.saved and +{n=G.UIT.C, config={padding = 0.05, align = 'cm'}, nodes={ +''' +position = "at" +payload = ''' +config.saved and G.GAME.saved_text and not G.GAME.no_saved and +{n=G.UIT.C, config={padding = 0.05, align = 'cm'}, nodes={ +''' +match_indent = true + + +[[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" +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) +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 +end +''' +position = "at" +payload = ''' +if center.consumeable then + self.ability.consumeable = center.config +else + self.ability.consumeable = nil +end +''' +match_indent = true + +[[patches]] +[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.max_highlighted then +''' +position = "at" +payload = ''' +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 +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/card_draw.lua"]''' +pattern = ''' +if self.debuff then + self.children.center:draw_shader('debuff', 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('debuff', nil, self.ARGS.send_to_shader) + end +end +''' +position = "at" +payload = ''' +if self.debuff then + if Entropy.IsEE() 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) + end + if self.children.floating_sprite then + if type(self.config.center.soul_pos.draw) == 'function' then + self.config.center.soul_pos.draw(self, scale_mod, rotate_mod) + elseif self.children.floating_sprite then + if self.ability.name == 'Hologram' then + self.hover_tilt = self.hover_tilt*1.5 + self.children.floating_sprite:draw_shader('hologram', nil, self.ARGS.send_to_shader, nil, self.children.center, 2*scale_mod, 2*rotate_mod) + self.hover_tilt = self.hover_tilt/1.5 + 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 + end + if self.edition then + local edition = G.P_CENTERS[self.edition.key] + if edition.apply_to_float and self.children.floating_sprite then + self.children.floating_sprite:draw_shader(edition.shader, nil, nil, nil, self.children.center, scale_mod, rotate_mod) + end + end + end + else + self.children.center:draw_shader('debuff', 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('debuff', nil, self.ARGS.send_to_shader) + end + end +end +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = "card.lua" +pattern = "card.T.x = self.T.x" +position = "before" +payload = ''' +local edi = self.edition or {} +if edi.type then + if card.ability.name ~= "cry-meteor" + and card.ability.name ~= "cry-exoplanet" + and card.ability.name ~= "cry-stardust" then + card:set_edition({[edi.type] = true}) + end +end +local stickers = {'eternal', 'perishable', 'rental', 'banana'} +for _, v in ipairs(stickers) do + if self.ability[v] then + card.ability[v] = self.ability[v] + end +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 Talisman and not Talisman.config_file.disable_anims 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 Talisman and not Talisman.config_file.disable_anims and (not context or not context.no_sound) then +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''card.lua''' +pattern = "eligible_card:set_edition(edition, true)" +position = "at" +payload = ''' +if eligible_card then eligible_card:set_edition(edition, true) end +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/utils.lua"]''' +pattern = ''' +if next(effects) then + SMODS.calculate_card_areas('jokers', context, effects, { main_scoring = true }) + SMODS.calculate_card_areas('individual', context, effects, { main_scoring = true }) +end +''' +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 + end + SMODS.calculate_card_areas('jokers', context, effects, { main_scoring = true }) + SMODS.calculate_card_areas('individual', context, effects, { main_scoring = true }) +end +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = 'functions/UI_definitions.lua' +pattern = ''' + local t = create_UIBox_generic_options({padding = 0,contents ={ + {n=G.UIT.R, config={align = "cm", padding = 0, draw_layer = 1, minw = 4}, nodes={ + create_tabs( + {tabs = { + { + label = 1, + chosen = G.focused_profile == 1, + tab_definition_function = G.UIDEF.profile_option, + tab_definition_function_args = 1 + }, + { + label = 2, + chosen = G.focused_profile == 2, + tab_definition_function = G.UIDEF.profile_option, + tab_definition_function_args = 2 + }, + { + label = 3, + chosen = G.focused_profile == 3, + tab_definition_function = G.UIDEF.profile_option, + tab_definition_function_args = 3 + } + }, +''' +position = "at" +payload = ''' +if not Cryptid then Cryptid = {profile_prefix = Entropy.config.profile_prefix and "E" or ""} end; + local t = create_UIBox_generic_options({padding = 0,contents ={ + {n=G.UIT.R, config={align = "cm", padding = 0, draw_layer = 1, minw = 4}, nodes={ + create_tabs( + {tabs = { + { + label = Cryptid.profile_prefix..1, + chosen = G.focused_profile == Cryptid.profile_prefix..1, + tab_definition_function = G.UIDEF.profile_option, + tab_definition_function_args = Cryptid.profile_prefix..1 + }, + { + label = Cryptid.profile_prefix..2, + chosen = G.focused_profile == Cryptid.profile_prefix..2, + tab_definition_function = G.UIDEF.profile_option, + tab_definition_function_args = Cryptid.profile_prefix..2 + }, + { + label = Cryptid.profile_prefix..3, + chosen = G.focused_profile == Cryptid.profile_prefix..3, + tab_definition_function = G.UIDEF.profile_option, + tab_definition_function_args = Cryptid.profile_prefix..3 + } + }, +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = 'functions/UI_definitions.lua' +pattern = ''' +{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})}}, +''' +position = 'at' +payload = ''' +{n=G.UIT.O, config={object = DynaText({string = {{prefix = not card.ability.beast_mark and localize('$') or nil, ref_table = not card.ability.beast_mark and card or {cost = "1 Card"}, ref_value = 'cost'}}, colours = {card.ability.beast_mark and G.C.RED or G.C.MONEY},shadow = true, silent = true, bump = true,pop_in = 0, scale = 0.5})}}, +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = 'card.lua' +pattern = ''' +if self.cost > 0 then + G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.2, func = function() +''' +position = 'at' +payload = ''' +if self.ability.beast_mark then + local cards = {} + for i, v in pairs(G.playing_cards) do if not SMODS.is_eternal(v) then cards[#cards+1] = v end end + pseudoshuffle(cards, "entr_beast_mark") + local card = cards[1] + card.area:remove_card(card) + G.hand:emplace(card) + delay(1) + G.E_MANAGER:add_event(Event{ + func = function() + --G.hand.cards[1]:flip() + return true + end + }) + delay(1) + SMODS.destroy_cards(card) + delay(2) + G.E_MANAGER:add_event(Event{ + func = function() + if SMODS.Centers[(booster_obj or {}).key] and booster_obj then + G.STATE = G.STATES.SMODS_BOOSTER_OPENED + SMODS.OPENED_BOOSTER = self + end + return true + end + }) +elseif self.cost > 0 then + G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.2, func = function() +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = 'card.lua' +pattern = ''' +if booster_obj and SMODS.Centers[booster_obj.key] then + G.STATE = G.STATES.SMODS_BOOSTER_OPENED + SMODS.OPENED_BOOSTER = self +end +''' +position = 'at' +payload = ''' +if not self.ability.beast_mark then + if booster_obj and SMODS.Centers[booster_obj.key] then + G.STATE = G.STATES.SMODS_BOOSTER_OPENED + SMODS.OPENED_BOOSTER = self + end +end +''' +match_indent = true + + +[[patches]] +[patches.pattern] +target = 'functions/UI_definitions.lua' +pattern = ''' +if card.opening then return true end +''' +position = 'after' +payload = ''' +local free_pack = SMODS.find_card('v_ortalab_anti_inv') +''' +match_indent = true + +[[patches]] +[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 +''' +position = 'after' +payload = ''' +self.ability.consumeable.mod_num = self.ability.consumeable.mod_num or 0 +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = 'functions/state_events.lua' +pattern = ''' +if next(_eval) then + _eval.individual.juice_card = _area.scored_card +''' +position = 'at' +payload = ''' +if next(_eval or {}) then + _eval.individual.juice_card = _area.scored_card +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = 'tag.lua' +pattern = ''' +self.HUD_tag.states.visible = false +''' +position = 'at' +payload = ''' +if self.HUD_tag then self.HUD_tag.states.visible = false end +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = 'tag.lua' +pattern = ''' +self.HUD_tag:remove() +''' +position = 'at' +payload = ''' +if self.HUD_tag then self.HUD_tag:remove() end +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/utils.lua"]''' +pattern = ''' +G.HUD:get_UIE_by_ID('hand_operator_container').UIBox:recalculate() +''' +position = 'at' +payload = ''' +if G.HUD:get_UIE_by_ID('hand_operator_container') and G.HUD:get_UIE_by_ID('hand_operator_container').UIBox then + G.HUD:get_UIE_by_ID('hand_operator_container').UIBox:recalculate() +end +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/utils.lua"]''' +pattern = ''' +{n=G.UIT.R, config={align = "cm", colour = mod.badge_colour or G.C.GREEN, r = 0.1, minw = 2, minh = 0.36, emboss = 0.05, padding = 0.03*size}, nodes={ +''' +position = 'at' +payload = ''' +{n=G.UIT.R, config={align = "cm", colour = mod.badge_colour or G.C.GREEN, shader = shader, r = 0.1, minw = 2, minh = 0.36, emboss = 0.05, padding = 0.03*size}, nodes={ +''' +match_indent = true + +[[patches]] +[patches.pattern] +target = '''=[SMODS _ "src/utils.lua"]''' +pattern = ''' +for i, mod in ipairs(mods) do + local mod_name = mod.display_name +''' +position = 'after' +payload = ''' +local shader +if mod.id == "entr" then shader = "entr_brimstone_badge" end +''' +match_indent = true \ No newline at end of file diff --git a/lovely/perma_bonus.toml b/lovely/perma_bonus.toml new file mode 100644 index 00000000..bb942d7e --- /dev/null +++ b/lovely/perma_bonus.toml @@ -0,0 +1,107 @@ +[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 03434bf4..a87045ec 100644 --- a/lovely/reverse_codes.toml +++ b/lovely/reverse_codes.toml @@ -72,14 +72,24 @@ for i, v in pairs(Entropy.find_runes("rune_entr_uruz")) do end G.GAME.InterferencePayoutMod = nil if G.GAME.RedBlindStates then - for i, v in pairs(G.GAME.RedBlindStates) do G.GAME.round_resets.blind_states[i] = v end - G.GAME.RedBlindStates = nil - G.GAME.round_resets.blind_states['Red'] = nil + G.E_MANAGER:add_event(Event{ + func = function() + for i, v in pairs(G.GAME.RedBlindStates) do G.GAME.round_resets.blind_states[i] = v end + G.GAME.RedBlindStates = nil + G.GAME.round_resets.blind_states['Red'] = nil + return true + end + }) end if G.GAME.round_resets.blind_states.Boss == "Defeated" then G.GAME.round_resets.blind_choices.Small = "bl_small" G.GAME.round_resets.blind_choices.Big = "bl_big" end +if G.GAME.earl_modifiers then + G.GAME.modifiers.money_per_discard = G.GAME.earl_modifiers.discard + G.GAME.modifiers.money_per_hand = G.GAME.earl_modifiers.hand + G.GAME.earl_modifiers = nil +end ''' match_indent = true diff --git a/lovely/uibox_shader.toml b/lovely/uibox_shader.toml new file mode 100644 index 00000000..e2bf4813 --- /dev/null +++ b/lovely/uibox_shader.toml @@ -0,0 +1,127 @@ +[manifest] +version = "2.0.0" +dump_lua = true +priority = 1 + +# UI Element Shader Patch by InvalidOS +# v2.0.2a +# play lemniscate (when it releases) (it is not released yet) + +## hacky method of preventing repeat patches +## _draw() +[[patches]] +[patches.pattern] +target = "engine/ui.lua" +pattern = '''-- don't duplicate the line + love.graphics.polygon((_type == 'line' or _type == 'line_emboss') and 'line' or "fill", self.pixellated_rect[_type].vertices)''' +position = "at" +payload = '''-- [ THE PATCH WAS USED UP ]''' # haha funny deltarune reference +match_indent = true + +## UIBox shaders +## UIElement:draw_pixellated_rect() +[[patches]] +[patches.pattern] +target = "engine/ui.lua" +pattern = '''love.graphics.polygon((_type == 'line' or _type == 'line_emboss') and 'line' or "fill", self.pixellated_rect[_type].vertices)''' +position = "at" +payload = ''' + local function _draw() + -- for those copying this patch: DO NOT REMOVE THE COMMENT BELOW + -- don't duplicate the line + love.graphics.polygon((_type == 'line' or _type == 'line_emboss') and 'line' or "fill", self.pixellated_rect[_type].vertices) + end + + local function _draw_layer(shader, send) + local args = { + G.TIMERS.REAL/28, + G.TIMERS.REAL + } + + if shader == "none" or shader == "dissolve" then + _draw() + return + elseif send then + for k, v in ipairs(send) do + local val = v.val or (v.func and v.func(self)) + + -- thanks talisman + if Talisman and type(val) == "table" and is_number(val) then + if val > to_big(1e300) then + val = 1e300 + else + val = val:tonumber() + end + end + + G.SHADERS[shader]:send(v.name, val) + end + elseif shader == "vortex" then + G.SHADERS['vortex']:send('vortex_amt', G.TIMERS.REAL - (G.vortex_time or 0)) + else + local key = SMODS.Shaders[shader].original_key + local tile_scale = G.TILESCALE*G.TILESIZE*G.CANV_SCALE + + -- actually supported + G.SHADERS[shader]:send(key, args) + G.SHADERS[shader]:send("uibox_size", {self.VT.w * tile_scale, self.VT.h * tile_scale}) + G.SHADERS[shader]:send("uibox_pos", {self.VT.x * tile_scale, self.VT.y * tile_scale}) + -- G.SHADERS[shader]:send("screen_scale", G.TILESCALE*G.TILESIZE*G.CANV_SCALE) + + -- placeholder values + -- G.SHADERS[shader]:send("time",123.33412*(12.5123152)%3000) -- if you use this in a shader this is equal to 1543.1953843546 + -- G.SHADERS[shader]:send('mouse_screen_pos', {0,0}) + -- G.SHADERS[shader]:send('hovering', 0) + -- G.SHADERS[shader]:send("shadow", false) + + -- i might add support for dissolving ui elements later because it'd be funny + -- G.SHADERS[shader]:send("dissolve", 0) + -- G.SHADERS[shader]:send("burn_colour_1", G.C.CLEAR) + -- G.SHADERS[shader]:send("burn_colour_2", G.C.CLEAR) + end + + love.graphics.setShader(G.SHADERS[shader], G.SHADERS[shader]) + _draw() + love.graphics.setShader() + end + + if self.config.shader then + -- simple single shader + if type(self.config.shader) == "string" then + _draw_layer(self.config.shader) + + -- more complex shader calls + elseif type(self.config.shader) == "table" then + -- one shader pass with a custom send + if self.config.shader.shader then + _draw_layer(self.config.shader.shader, self.config.shader.send) + + -- list of shaders + elseif #shader > 0 then + for _, v in ipairs(self.config.shader) do + if type(v) == "string" then + _draw_layer(v.shader) + elseif type(v) == "table" then + _draw_layer(v.shader, v.send) + end + end + end + end + + -- no shader + else + _draw() + end +''' +match_indent = true + +## restore +## _draw() +[[patches]] +[patches.pattern] +target = "engine/ui.lua" +pattern = '''-- [ THE PATCH WAS USED UP ]''' +position = "at" +payload = '''-- don't duplicate the line +love.graphics.polygon((_type == 'line' or _type == 'line_emboss') and 'line' or "fill", self.pixellated_rect[_type].vertices)''' +match_indent = true \ No newline at end of file diff --git a/manifest.json b/manifest.json index dd0ff34f..54966028 100644 --- a/manifest.json +++ b/manifest.json @@ -1,7 +1,7 @@ { "name": "Entropy", "id": "entr", - "version": "1.0.0b", + "version": "1.1.0", "website_url": "https://github.com/lord-ruby/Entropy/tree/main", "description": "A chaotic Balatro mod. Adds inverted consumables as well as various other miscelaneous mechanics.", "prefix": "entr", @@ -10,7 +10,7 @@ "priority": 666, "badge_colour": "FE0001", "dependencies": [ - "Steamodded (>=1.0.0~BETA-0827)", + "Steamodded (>=1.0.0~BETA-0101c)", "Cryptlib" ], "conflicts": [