Add 3 new jokers
|
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 69 KiB |
|
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 1 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
|
Before Width: | Height: | Size: 611 B After Width: | Height: | Size: 611 B |
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 1.4 KiB |
|
|
@ -130,6 +130,14 @@ return {
|
||||||
"of every consumable",
|
"of every consumable",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
j_Roland_blight = {
|
||||||
|
name = "Blight",
|
||||||
|
text = {
|
||||||
|
"Third played card",
|
||||||
|
"gives {X:red,C:white}X#1#{} Mult",
|
||||||
|
"if it is {C:dark_edition}Frozen",
|
||||||
|
},
|
||||||
|
},
|
||||||
j_Roland_bulldozer = {
|
j_Roland_bulldozer = {
|
||||||
name = "Bulldozer",
|
name = "Bulldozer",
|
||||||
text = {
|
text = {
|
||||||
|
|
@ -232,6 +240,19 @@ return {
|
||||||
"least {C:attention}#2# suits",
|
"least {C:attention}#2# suits",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
j_Roland_snowsquall = {
|
||||||
|
name = "Snowsquall",
|
||||||
|
text = {
|
||||||
|
"This Joker gains",
|
||||||
|
"{C:mult}+#1# {}Mult for every",
|
||||||
|
"played {C:dark_edition}Frozen {}card",
|
||||||
|
"{C:inactive}(Currently {C:red}+#2#{C:inactive} Mult)",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
j_Roland_stubborn = {
|
||||||
|
name = "Stubborn",
|
||||||
|
text = {"{X:mult,C:white}X#1#{} Mult", "Moves before", "hand is played"},
|
||||||
|
},
|
||||||
j_Roland_suitable = {
|
j_Roland_suitable = {
|
||||||
name = "Suitable",
|
name = "Suitable",
|
||||||
text = {"{V:1}#1# {}are {C:attention}Wild", "Suit changes", "every round"},
|
text = {"{V:1}#1# {}are {C:attention}Wild", "Suit changes", "every round"},
|
||||||
|
|
|
||||||
|
|
@ -721,7 +721,93 @@ joker {
|
||||||
end):values():table()
|
end):values():table()
|
||||||
)
|
)
|
||||||
end,
|
end,
|
||||||
in_pool = function()
|
}
|
||||||
return not not f(G.playing_cards):concat(G.jokers.cards):any(is_frozen)
|
|
||||||
|
joker {
|
||||||
|
key = "snowsquall",
|
||||||
|
pronouns = "they_them",
|
||||||
|
config = {extra = {mult_gain = 1, mult = 0}},
|
||||||
|
attributes = {"mult", "scaling", "hand_type"},
|
||||||
|
cost = 6,
|
||||||
|
rarity = 2,
|
||||||
|
eternal_compat = true,
|
||||||
|
blueprint_compat = true,
|
||||||
|
perishable_compat = false,
|
||||||
|
loc_vars = function(_, info_queue, card)
|
||||||
|
table.insert(info_queue, G.P_CENTERS.e_Roland_frozen)
|
||||||
|
local extra = card.ability.extra
|
||||||
|
return {vars = {extra.mult_gain, extra.mult}}
|
||||||
|
end,
|
||||||
|
calculate = function(_, card, context)
|
||||||
|
local extra = card.ability.extra
|
||||||
|
|
||||||
|
if context.joker_main or context.forcetrigger then
|
||||||
|
return {mult = extra.mult}
|
||||||
|
end
|
||||||
|
|
||||||
|
if context.blueprint or
|
||||||
|
not context.individual or
|
||||||
|
context.cardarea ~= G.play or
|
||||||
|
not is_frozen(context.other_card) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
extra.mult = extra.mult + extra.mult_gain
|
||||||
|
return {message = localize "k_upgrade_ex", colour = G.C.RED, message_card = card}
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
joker {
|
||||||
|
key = "stubborn",
|
||||||
|
pronouns = "he_they",
|
||||||
|
config = {extra = {xmult = 3}},
|
||||||
|
attributes = {"xmult"},
|
||||||
|
cost = 9,
|
||||||
|
rarity = 3,
|
||||||
|
eternal_compat = true,
|
||||||
|
blueprint_compat = true,
|
||||||
|
perishable_compat = false,
|
||||||
|
loc_vars = function(_, _, card)
|
||||||
|
return {vars = {card.ability.extra.xmult}}
|
||||||
|
end,
|
||||||
|
calculate = function(_, card, context)
|
||||||
|
if context.joker_main or context.forcetrigger then
|
||||||
|
return {card = card, xmult = card.ability.extra.xmult}
|
||||||
|
end
|
||||||
|
|
||||||
|
if not context.press_play then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local keys = f(card.area.cards):where(f().nq(card)):keys():table()
|
||||||
|
local k = pseudorandom_element(keys, pseudoseed "Roland_stubborn") or card.rank
|
||||||
|
|
||||||
|
card.area.cards[k], card.area.cards[card.rank] =
|
||||||
|
card.area.cards[card.rank], card.area.cards[k]
|
||||||
|
end,
|
||||||
|
}
|
||||||
|
|
||||||
|
joker {
|
||||||
|
key = "blight",
|
||||||
|
pronouns = "he_him",
|
||||||
|
config = {extra = {xmult = 2}},
|
||||||
|
attributes = {"xmult"},
|
||||||
|
cost = 4,
|
||||||
|
rarity = 1,
|
||||||
|
eternal_compat = true,
|
||||||
|
blueprint_compat = true,
|
||||||
|
perishable_compat = false,
|
||||||
|
loc_vars = function(_, info_queue, card)
|
||||||
|
table.insert(info_queue, G.P_CENTERS.e_Roland_frozen)
|
||||||
|
return {vars = {card.ability.extra.xmult}}
|
||||||
|
end,
|
||||||
|
calculate = function(_, card, context)
|
||||||
|
local target = (context.scoring_hand or {})[3]
|
||||||
|
|
||||||
|
return context.individual and
|
||||||
|
context.cardarea == G.play and
|
||||||
|
context.other_card == target and
|
||||||
|
is_frozen(context.other_card) and
|
||||||
|
{xmult = card.ability.extra.xmult} or nil
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,29 +24,34 @@ local none
|
||||||
---@return fun(tbl: table<K, V>, key: K): K, V
|
---@return fun(tbl: table<K, V>, key: K): K, V
|
||||||
---@return K
|
---@return K
|
||||||
---@return V
|
---@return V
|
||||||
|
---@nodiscard
|
||||||
local function autopairs(tbl, fpairs)
|
local function autopairs(tbl, fpairs)
|
||||||
return (fpairs or tbl[#tbl] and ipairs or pairs)(tbl)
|
return (fpairs or tbl[#tbl] and ipairs or pairs)(tbl)
|
||||||
end
|
end
|
||||||
|
|
||||||
---@param any any
|
---@param any any
|
||||||
---@return boolean
|
---@return boolean
|
||||||
|
---@nodiscard
|
||||||
local function is_f(any)
|
local function is_f(any)
|
||||||
return type(any) == "table" and any.from == f.from and any.new == f.new
|
return type(any) == "table" and any.from == f.from and any.new == f.new
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Always returns nil.
|
--- Always returns nil.
|
||||||
---@return nil
|
---@return nil
|
||||||
|
---@nodiscard
|
||||||
function f.noop()
|
function f.noop()
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Always returns false.
|
--- Always returns false.
|
||||||
---@return false
|
---@return false
|
||||||
|
---@nodiscard
|
||||||
function f.fals()
|
function f.fals()
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Always returns true.
|
--- Always returns true.
|
||||||
---@return true
|
---@return true
|
||||||
|
---@nodiscard
|
||||||
function f.tru()
|
function f.tru()
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
@ -55,10 +60,29 @@ end
|
||||||
---@generic T
|
---@generic T
|
||||||
---@param ... T
|
---@param ... T
|
||||||
---@return T
|
---@return T
|
||||||
|
---@nodiscard
|
||||||
function f.id(...)
|
function f.id(...)
|
||||||
return ...
|
return ...
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---@generic T
|
||||||
|
---@param value T
|
||||||
|
---@return fun(T): boolean
|
||||||
|
function f.eq(value)
|
||||||
|
return function(v)
|
||||||
|
return value == v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
---@generic T
|
||||||
|
---@param value T
|
||||||
|
---@return fun(T): boolean
|
||||||
|
function f.nq(value)
|
||||||
|
return function(v)
|
||||||
|
return value ~= v
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
---@generic T
|
---@generic T
|
||||||
---@param v T
|
---@param v T
|
||||||
---@return fun(): T
|
---@return fun(): T
|
||||||
|
|
@ -491,6 +515,15 @@ function f:count(func)
|
||||||
return ret
|
return ret
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---@generic K, V, T
|
||||||
|
---@param self F|{ [K]: V }
|
||||||
|
---@param _ `T`
|
||||||
|
---@return F|{ [K]: `T` }
|
||||||
|
---@nodiscard
|
||||||
|
function f:pun(_)
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
---@generic K, V
|
---@generic K, V
|
||||||
---@param self F|{ [K]: V }
|
---@param self F|{ [K]: V }
|
||||||
---@return string
|
---@return string
|
||||||
|
|
|
||||||