Skip to content

Commit 99f7ac5

Browse files
Fix telescope not working
1 parent ee23f3e commit 99f7ac5

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

items/voucher.lua

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,30 @@ local satellite_uplink = { -- Code T2; Code cards may appear in any of the Celes
371371
SMODS.Booster:take_ownership_by_kind("Celestial", {
372372
create_card = function(self, card, i)
373373
local _card
374-
if G.GAME.used_vouchers.v_cry_satellite_uplink and pseudorandom("satellite_uplink") > 0.8 then
374+
if G.GAME.used_vouchers.v_telescope and i == 1 then
375+
local _planet, _hand, _tally = nil, nil, 0
376+
for k, v in ipairs(G.handlist) do
377+
if G.GAME.hands[v].visible and G.GAME.hands[v].played > _tally then
378+
_hand = v
379+
_tally = G.GAME.hands[v].played
380+
end
381+
end
382+
if _hand then
383+
for k, v in pairs(G.P_CENTER_POOLS.Planet) do
384+
if v.config.hand_type == _hand then
385+
_planet = v.key
386+
end
387+
end
388+
end
389+
_card = {
390+
set = "Planet",
391+
area = G.pack_cards,
392+
skip_materialize = true,
393+
soulable = true,
394+
key = _planet,
395+
key_append = "pl1",
396+
}
397+
elseif G.GAME.used_vouchers.v_cry_satellite_uplink and pseudorandom("satellite_uplink") > 0.8 then
375398
_card = {
376399
set = "Code",
377400
area = G.pack_cards,

0 commit comments

Comments
 (0)