diff --git a/items/altpath/blinds.lua b/items/altpath/blinds.lua index 3e35a5e4..b6d4a551 100644 --- a/items/altpath/blinds.lua +++ b/items/altpath/blinds.lua @@ -1287,6 +1287,7 @@ local omega = { func = function() G.GAME.blind.chips = G.GAME.blind.chips * 2 G.GAME.blind:juice_up() + G.HUD_blind:recalculate() return true end })) diff --git a/items/inversions/reverse_runes.lua b/items/inversions/reverse_runes.lua index a9d2ac53..75880ed9 100644 --- a/items/inversions/reverse_runes.lua +++ b/items/inversions/reverse_runes.lua @@ -845,22 +845,8 @@ G.FUNCS.play_cards_from_highlighted = function(e) if text == "entr_derivative" and next(SMODS.find_card("j_entr_antiderivative")) then check_for_unlock({type = "anti_derivative"}) end + G.GAME.asc_power_hand = 0 play_ref(e) - G.E_MANAGER:add_event(Event{ - trigger = "after", - blocking = false, - func = function() - G.E_MANAGER:add_event(Event{ - trigger = "after", - blocking = false, - func = function() - G.GAME.asc_power_hand = 0 - return true - end - }) - return true - end - }) end local strength_indicator = Entropy.create_mark("strength", 7065, {x = 0, y = 6}) diff --git a/lib/config.lua b/lib/config.lua index 51e9581f..58a46aae 100644 --- a/lib/config.lua +++ b/lib/config.lua @@ -243,5 +243,4 @@ local entropyTabs = function() }, } end -SMODS.current_mod.extra_tabs = entropyTabs -SMODS.scale_card = SMODS.scale_card or function() end \ No newline at end of file +SMODS.current_mod.extra_tabs = entropyTabs \ No newline at end of file diff --git a/lib/fixes.lua b/lib/fixes.lua index 261c8d1f..539fc004 100644 --- a/lib/fixes.lua +++ b/lib/fixes.lua @@ -401,4 +401,16 @@ SMODS.Booster:take_ownership("p_cry_code_mega_1", { end return create_card("Code", G.pack_cards, nil, nil, true, true, nil, "cry_program_1") end -}, true) \ No newline at end of file +}, true) + +local mod_mult_ref = mod_mult +function mod_mult(_mult) + if _mult then return mod_mult_ref(_mult) end + return 1 +end + +local mod_chips_ref = mod_chips +function mod_chips(_chips) + if _chips then return mod_mult_ref(_chips) end + return 1 +end \ No newline at end of file diff --git a/lib/hooks.lua b/lib/hooks.lua index 145b27d6..5cfffac1 100644 --- a/lib/hooks.lua +++ b/lib/hooks.lua @@ -170,7 +170,7 @@ function end_round() end G.E_MANAGER:add_event(Event({ trigger = 'immediate', - func = (function() G.GAME.current_round.current_hand.cry_asc_num = 0;G.GAME.current_round.current_hand.cry_asc_num_text = '';return true end) + func = (function() G.GAME.asc_power_hand = 0; G.GAME.current_round.current_hand.cry_asc_num = 0;G.GAME.current_round.current_hand.cry_asc_num_text = '';return true end) })) end @@ -1294,9 +1294,10 @@ function SMODS.calculate_individual_effect(effect, scored_card, key, amount, fro 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 G.E_MANAGER:add_event(Event({ func = function() - G.GAME.current_round.current_hand.cry_asc_num_text = (to_big(G.GAME.asc_power_hand) < to_big(0) and " (" or " (+") .. (to_big(G.GAME.asc_power_hand)) .. ")" + G.GAME.current_round.current_hand.cry_asc_num_text = (to_big(text) < to_big(0) and " (" or " (+") .. (to_big(text)) .. ")" return true end })) @@ -1313,9 +1314,10 @@ function SMODS.calculate_individual_effect(effect, scored_card, key, amount, fro 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 G.E_MANAGER:add_event(Event({ func = function() - G.GAME.current_round.current_hand.cry_asc_num_text = (to_big(G.GAME.asc_power_hand) < to_big(0) and " (" or " (+") .. (to_big(G.GAME.asc_power_hand)) .. ")" + G.GAME.current_round.current_hand.cry_asc_num_text = (to_big(text) < to_big(0) and " (" or " (+") .. (to_big(text)) .. ")" return true end })) @@ -1332,14 +1334,13 @@ function SMODS.calculate_individual_effect(effect, scored_card, key, amount, fro 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) - if G.GAME.asc_power_hand ~= 0 then - G.E_MANAGER:add_event(Event({ - func = function() - G.GAME.current_round.current_hand.cry_asc_num_text = (to_big(G.GAME.asc_power_hand) < to_big(0) and " (" or " (+") .. (to_big(G.GAME.asc_power_hand)) .. ")" - return true - end - })) - end + local text = 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)) .. ")" + return true + end + })) card_eval_status_text = function() end scie(effect, scored_card, "Xmult_mod", Cryptid.ascend(1, G.GAME.asc_power_hand - orig), false) scie(effect, scored_card, "Xchip_mod", Cryptid.ascend(1, G.GAME.asc_power_hand - orig), false) @@ -1353,14 +1354,13 @@ function SMODS.calculate_individual_effect(effect, scored_card, key, amount, fro 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]) - if G.GAME.asc_power_hand ~= 0 then - G.E_MANAGER:add_event(Event({ - func = function() - G.GAME.current_round.current_hand.cry_asc_num_text = (to_big(G.GAME.asc_power_hand) < to_big(0) and " (" or " (+") .. (to_big(G.GAME.asc_power_hand)) .. ")" - return true - end - })) - end + local text = 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)) .. ")" + return true + end + })) card_eval_status_text = function() end scie(effect, scored_card, "Xmult_mod", Cryptid.ascend(1, G.GAME.asc_power_hand - orig), false) scie(effect, scored_card, "Xchip_mod", Cryptid.ascend(1, G.GAME.asc_power_hand - orig), false) @@ -3354,6 +3354,7 @@ end local parse_ref = CardArea.parse_highlighted function CardArea:parse_highlighted() + G.GAME.asc_power_hand = 0 parse_ref(self) local text,disp_text,poker_hands = G.FUNCS.get_poker_hand_info(self.highlighted) if G.GAME.hands[text] and G.GAME.hands[text].operator then diff --git a/manifest.json b/manifest.json index 0d94456b..b0b7802e 100644 --- a/manifest.json +++ b/manifest.json @@ -10,7 +10,7 @@ "priority": 666, "badge_colour": "FE0001", "dependencies": [ - "Steamodded", + "Steamodded (>=1.0.0~BETA-0827)", "Cryptlib" ], "conflicts": [