Skip to content

Commit e96aaf4

Browse files
committed
fix xasc when asc is 0
1 parent a6da74f commit e96aaf4

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

Entropy.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ if SMODS and SMODS.calculate_individual_effect then
8282
if (key == 'asc') or (key == 'asc_mod') then
8383
local e = card_eval_status_text
8484
local orig = to_big((G.GAME.asc_power_hand or 0) + G.GAME.current_round.current_hand.cry_asc_num)
85-
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)
85+
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)
8686
if G.GAME.current_round.current_hand.cry_asc_num == 0 then G.GAME.current_round.current_hand.cry_asc_num = 1 end
8787
G.GAME.current_round.current_hand.cry_asc_num_text = " (+" .. (to_big(G.GAME.asc_power_hand)) .. ")"
8888
card_eval_status_text = function() end

items/inversions/define.lua

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ local define = {
4343
G.CHOOSE_CARD:align_to_major()
4444
end,
4545
can_use = function(self, card)
46-
return GetSelectedCards() > 1 and GetSelectedCards() < 3 and GetSelectedCard() and GetSelectedCard().config.center.key ~= "j_entr_ruby"
46+
local num = Entropy.GetHighlightedCards({G.hand, G.pack_cards, G.jokers, G.consumeables, G.shop_jokers, G.shop_booster, G.shop_vouchers}, {c_entr_define=true})
47+
return num > 0 and num <= 1
4748
end,
4849
loc_vars = function(self, q, card)
4950
return {
@@ -166,7 +167,7 @@ end
166167
Cryptid.aliases["define"] = "#define"
167168
G.FUNCS.define_apply = function()
168169
local current_card
169-
local card = Entropy.GetHighlightedCard()
170+
local card = Entropy.GetHighlightedCard({G.hand, G.pack_cards, G.jokers, G.consumeables, G.shop_jokers, G.shop_booster, G.shop_vouchers}, {c_entr_define=true})
170171
local entered_card = G.ENTERED_CARD
171172

172173
G.PREVIOUS_ENTERED_CARD = G.ENTERED_CARD

items/inversions/reverseLegendaries.lua

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,20 @@ local oekrep = {
6262

6363
local add_ref = CardArea.emplace
6464
function CardArea:emplace(card, location, stay_flipped)
65-
add_ref(self, card, location, stay_flipped)
65+
6666
if self == G.hand and G.hand and G.GAME.h_side_mult and G.GAME.h_side_mult ~= 1 then
6767
G.hand.config.card_limit = G.hand.config.card_limit + 1 - 1/(G.GAME.h_side_mult)
6868
if G.hand.config.card_limit - #G.hand.cards >= 4 then
6969
G.FUNCS.draw_from_deck_to_hand(1)
7070
end
7171
end
72+
if G.consumeables and self == G.consumeables and card and card.config.center.set == "Joker" then
73+
add_ref(G.jokers, card, location, stay_flipped)
74+
elseif G.jokers and self == G.jokers and card and card.ability.consumeable then
75+
add_ref(G.consumeables, card, location, stay_flipped)
76+
else
77+
add_ref(self, card, location, stay_flipped)
78+
end
7279
end
7380
local remove_ref = CardArea.remove_card
7481
function CardArea:remove_card(card, discarded_only)

0 commit comments

Comments
 (0)