Skip to content

Commit af48fde

Browse files
authored
Merge pull request #81 from lord-ruby/dev
Fix various crashes and bugs
2 parents 343438a + 663f5f0 commit af48fde

File tree

7 files changed

+27
-32
lines changed

7 files changed

+27
-32
lines changed

assets/1x/jokers.png

76.9 KB
Loading

assets/2x/jokers.png

289 KB
Loading

items/jokers/misc_jokers.lua

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5370,26 +5370,21 @@ local antipattern = {
53705370
pos = {x = 4, y = 12},
53715371
atlas = "jokers",
53725372
loc_vars = function(self, q, card)
5373+
local hands_after_last_played = {}
53735374
local hands = {}
5374-
for i, v in pairs(G.handlist) do
5375-
hands[#hands+1] = {}
5376-
end
5377-
for i, v in pairs(card.ability.hand_pairs) do
5378-
hands[v[1]] = hands[v[1]] or {}
5379-
hands[v[1]][#hands[v[1]]+1] = v[2]
5380-
end
5381-
for i, v in pairs(hands) do
5382-
local vars = {localize(i, "poker_hands")}
5383-
if #v > 0 then
5384-
for i, v2 in pairs(v) do
5385-
vars[#vars+1] = localize(v2, "poker_hands")
5386-
end
5387-
for i = #vars, 12 do
5388-
vars[#vars+1] = ""
5389-
end
5390-
q[#q+1] = {set = "Other", key = "antipattern_pair", vars = vars}
5375+
for i = 1, 13 do hands_after_last_played[i] = "" end
5376+
local last_played = card.ability.last_hand
5377+
for _,hand_pair in ipairs(card.ability.hand_pairs) do
5378+
-- hand_pair[1] is last-played, hand_pair[2] is currently-played
5379+
if hand_pair[1] == last_played then
5380+
hands[#hands+1] = localize(hand_pair[2], "poker_hands")
53915381
end
53925382
end
5383+
for i, v in pairs(hands) do hands_after_last_played[i+1] = v end
5384+
if card.ability.last_hand ~= "" then
5385+
hands_after_last_played[1] = localize(card.ability.last_hand, "poker_hands")
5386+
q[#q+1] = {set = "Other", key = "antipattern_pair", vars = hands_after_last_played}
5387+
end
53935388
return {
53945389
vars = {
53955390
card.ability.xchips_mod,
@@ -6264,7 +6259,7 @@ local dancer = {
62646259
end,
62656260
entr_credits = {
62666261
idea = {"cassknows"},
6267-
art = {"candycanearter"}
6262+
art = {"Lil. Mr. Slipstream"}
62686263
}
62696264
}
62706265

items/misc/blinds.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1068,4 +1068,4 @@ return {
10681068
void,
10691069
rr
10701070
}
1071-
}
1071+
}

lib/hooks.lua

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2182,12 +2182,6 @@ function Tag:init(_tag, for_collection, _blind_type, ...)
21822182
return ret
21832183
end
21842184

2185-
local TrumpCardAllow = {
2186-
["Planet"] = true,
2187-
["Tarot"] = true,
2188-
["Code"] = true
2189-
}
2190-
21912185
G.FUNCS.has_inversion = function(e)
21922186
if G.GAME.last_inversion and G.GAME.last_inversion.key ~= "c_entr_master" then
21932187
e.config.colour = mix_colours(G.C.GREEN, G.C.JOKER_GREY, 0.8)
@@ -4471,4 +4465,4 @@ function hotpot_horsechicot_market_section_init_cards()
44714465
end
44724466
end
44734467
G.harvest_cost = G.harvest_cost or 0
4474-
end
4468+
end

lib/utils.lua

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2042,6 +2042,12 @@ function Entropy.rubber_ball_scoring(cards)
20422042
return new_cards
20432043
end
20442044

2045+
local TrumpCardAllow = {
2046+
["Planet"] = true,
2047+
["Tarot"] = true,
2048+
["Code"] = true
2049+
}
2050+
20452051
function Entropy.post_create_card(card, from_booster)
20462052
if G.SETTINGS.paused then return end
20472053
local set = card.config.center.set
@@ -2055,20 +2061,20 @@ function Entropy.post_create_card(card, from_booster)
20552061
set = c.set
20562062
elseif card.config and card.config.center
20572063
and pseudorandom("trump_card") < 0.10 and G.GAME.TrumpCard and G.STATE == G.STATES.SMODS_BOOSTER_OPENED
2058-
and TrumpCardAllow[center.set] and (not card.area or not card.area.config.collection) then
2064+
and TrumpCardAllow[set] and (not card.area or not card.area.config.collection) then
20592065
card:set_ability(G.P_CENTERS["c_entr_flipside"])
20602066
key = "c_entr_flipside"
20612067
set = "Spectral"
20622068
elseif card.config and card.config.center and card.config.center.set == "Booster"
20632069
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
2064-
local type = (center.cost == 6 and "jumbo") or (center.cost == 8 and "mega") or "normal"
2070+
local type = (G.P_CENTERS[key].cost == 6 and "jumbo") or (G.P_CENTERS[key].cost == 8 and "mega") or "normal"
20652071
card:set_ability(G.P_CENTERS["p_entr_twisted_pack_"..type])
20662072

20672073
key = "p_entr_twisted_pack_"..type
20682074
set = "Booster"
20692075
elseif card.config and card.config.center and card.config.center.set == "Booster" and Entropy.DeckOrSleeve("doc")
20702076
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
2071-
local type = (center.cost == 6 and "jumbo_1") or (center.cost == 8 and "mega_1") or "normal_"..pseudorandom_element({1,2},pseudoseed("doc"))
2077+
local type = (G.P_CENTERS[key].cost == 6 and "jumbo_1") or (G.P_CENTERS[key].cost == 8 and "mega_1") or "normal_"..pseudorandom_element({1,2},pseudoseed("doc"))
20722078
card:set_ability(G.P_CENTERS["p_spectral_"..type])
20732079
key = "p_spectral_"..type
20742080
set = "Booster"
@@ -2102,4 +2108,4 @@ function Entropy.post_create_card(card, from_booster)
21022108
card.ability.glitched_crown = gc
21032109
end
21042110
end
2105-
end
2111+
end

localization/en-us.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2605,8 +2605,8 @@ local decs = {
26052605
c_entr_inferno = {
26062606
name = "Inferno",
26072607
text = {
2608-
"Destroy {C:attention}all{} Selected Cards",
2609-
"lost {C:money}$#1#{} for every card",
2608+
"Destroy {C:attention}all{} selected cards",
2609+
"Lose {C:money}$#1#{} for every card",
26102610
"past {C:attention}2{}"
26112611
}
26122612
},

0 commit comments

Comments
 (0)