Use terse syntax

This commit is contained in:
Emik 2026-02-13 22:42:12 +01:00
parent 6279ccc7a8
commit a0950797e3
Signed by: emik
GPG key ID: 6B0CD72A5E503BDF
2 changed files with 5 additions and 18 deletions

View file

@ -1,10 +1,7 @@
local f, q = unpack(... or require "src.functional") local f, q = unpack(... or require "src.functional")
local function save(ret) local function save(ret)
q(function() q(save_run)
save_run()
end)
return ret return ret
end end

View file

@ -124,11 +124,7 @@ joker {
} }
end, end,
calculate = function(_, _, context) calculate = function(_, _, context)
if type(G.escapey_debugger) == "function" then local _ = type(G.escapey_debugger) == "function" and G.escapey_debugger(f(context):keys():conjoin(", "))
G.escapey_debugger(f(context):reduce("", function(acc, _, next)
return acc .. ", " .. next
end):sub(2))
end
end, end,
Bakery_can_use = function(_, card) Bakery_can_use = function(_, card)
return not card.debuff and u() and ( return not card.debuff and u() and (
@ -214,9 +210,7 @@ joker {
end) end)
end end
local hands = f(G.GAME.hands):filter(function(v, _) local hands = f(G.GAME.hands):filter(f "visible"):keys():into()
return v.visible
end):keys():into()
pseudoshuffle(hands, pseudoseed "RolandEscapey") pseudoshuffle(hands, pseudoseed "RolandEscapey")
local levels = destroyed * card.ability.extra.hands local levels = destroyed * card.ability.extra.hands
@ -379,10 +373,7 @@ joker {
card.getting_sliced = true card.getting_sliced = true
q(function() q(function()
local scored_cards = f(G.play.cards):filter(function(v) local scored_cards = f(G.play.cards):filter(f "highlighted"):into()
return v.highlighted
end):into()
local copied = {} local copied = {}
for _ = 1, extra.times do for _ = 1, extra.times do
@ -442,8 +433,7 @@ joker {
} }
end, end,
calculate = function(_, _, context) calculate = function(_, _, context)
local _ = context.selling_self and local _ = context.selling_self and draw_card(G.deck, G.hand, 100, "up", false, G.deck.cards[1])
draw_card(G.deck, G.hand, 100, "up", false, G.deck.cards[1])
end, end,
} }