Clamp Maxie, The Monk, The Spearmaster, and Shadows to 25

This commit is contained in:
Emik 2025-04-10 00:29:47 +02:00
parent 80b7cd1d47
commit 5582920601
Signed by untrusted user who does not match committer: emik
GPG key ID: 09CDFF9E5703688D
4 changed files with 42 additions and 23 deletions

View file

@ -17,5 +17,5 @@
"conflicts": [
"Jen"
],
"version": "1.1.2"
"version": "1.1.3"
}

View file

@ -128,6 +128,8 @@ local maxie_quotes = {
},
}
local maxie_limit = 25
SMODS.Joker {
key = "maxie",
atlas = "janemaxie",
@ -155,8 +157,11 @@ SMODS.Joker {
}
end,
calculate = function(_, card, context)
local min = math.min(card.ability.extra.choices, maxie_limit)
card.ability.extra.choices = min
if context.starting_shop then
for _ = 1, card.ability.extra.choices do
for _ = 1, min do
SMODS.add_booster_to_shop()
end
end
@ -498,7 +503,7 @@ SMODS.Joker {
"{C:inactive}(Currently {X:dark_edition,C:chips}" .. operator .. "#2#{C:inactive})",
},
},
config = {big_num_scaler = true, extra = {tet = Cryptid and 0.1 or 0.25}},
config = {extra = {tet = Cryptid and 0.1 or 0.25}},
pos = {x = 0, y = 0},
soul_pos = {x = 1, y = 0},
blueprint_compat = true,
@ -632,20 +637,21 @@ SMODS.Joker {
},
pos = {x = 0, y = 0},
soul_pos = {x = 1, y = 0},
config = {extra = {base = 2}},
rarity = exotic,
blueprint_compat = true,
cost = Cryptid and 50 or 20,
loc_vars = function(_, _, _)
return {vars = {2 ^ food_jokers_count()}}
loc_vars = function(_, _, card)
return {vars = {card.ability.extra.base ^ food_jokers_count()}}
end,
calculate = function(_, _, context)
calculate = function(_, card, context)
local count = food_jokers_count()
if context.joker_main and count > 0 then
return {
colour = G.C.DARK_EDITION,
message = operator .. 2 ^ count .. " Mult",
[Cryptid and "e_mult" or "x_mult"] = 2 ^ count,
message = operator .. card.ability.extra.base ^ count .. " Mult",
[Cryptid and "e_mult" or "x_mult"] = card.ability.extra.base ^ count,
}, true
end
end,

View file

@ -34,6 +34,8 @@ SMODS.Rarity {
badge_colour = G.C.JOKER_GREY,
}
local monk_limit = 25
SMODS.Joker {
key = "monk",
atlas = "janemonk",
@ -74,11 +76,14 @@ SMODS.Joker {
return
end
local min = math.min(card.ability.extra.retriggers, monk_limit)
card.ability.extra.retriggers = min
return {
message = localize("k_again_ex"),
repetitions = card.ability.extra.retriggers,
colour = G.C.ORANGE,
card = card,
repetitions = min,
colour = G.C.ORANGE,
message = localize("k_again_ex"),
}, true
end,
}
@ -331,6 +336,8 @@ SMODS.Joker {
end,
}
local spearmaster_limit = 25
SMODS.Joker {
key = "spearmaster",
atlas = "janespearmaster",
@ -342,10 +349,13 @@ SMODS.Joker {
"{C:attention}Booster Packs{} have {C:green}+#1#{} additional cards",
},
},
loc_vars = function(_, _, center)
return {vars = {center.ability.extra.extrachoices}}
config = {extra = {choices = 1}},
loc_vars = function(_, _, card)
return {vars = {card.ability.extra.choices}}
end,
calculate = function(_, card, _)
card.ability.extra.choices = math.min(card.ability.extra.choices, spearmaster_limit)
end,
config = {extra = {extrachoices = 1}},
pos = {x = 0, y = 0},
soul_pos = {x = 1, y = 0},
cost = Cryptid and 12 or 20,
@ -361,7 +371,7 @@ function Card:open()
if next(spearmasters) then
for _, v in pairs(spearmasters) do
orig = orig + v.ability.extra.extrachoices
orig = orig + v.ability.extra.choices
end
self.config.choose = math.floor(orig)

View file

@ -31,7 +31,7 @@ local function conjure(card, number)
end
end
local function createfulldeck(enhancement, edition, amount, emplacement)
local function create_full_deck(enhancement, edition, amount, emplacement)
local cards = {}
for _, v in pairs(G.P_CARDS) do
@ -241,6 +241,8 @@ SMODS.Consumable {
end,
}
local shadows_limit = 25
SMODS.Consumable {
key = "shadows",
set = "Spectral",
@ -256,12 +258,12 @@ SMODS.Consumable {
config = {extra = {shadows = 2}},
pos = {x = 3, y = 4},
cost = 4,
loc_vars = function(_, _, center)
return {vars = {((center.ability or {}).extra or {}).shadows or 2}}
loc_vars = function(_, _, card)
return {vars = {math.min(((card.ability or {}).extra or {}).shadows or 2, shadows_limit)}}
end,
can_use = Jane.can_use,
use = function(_, card, _, _)
for _ = 1, card.ability.extra.shadows do
for _ = 1, math.min(card.ability.extra.shadows, shadows_limit) do
local joker = create_card("Joker", G.jokers, nil, nil, nil, nil, nil, "phantom")
joker:set_edition({negative = true})
joker.ability.eternal = false
@ -284,7 +286,7 @@ SMODS.Consumable {
end
end,
bulk_use = function(_, card, _, _, number)
for _ = 1, card.ability.extra.shadows * number do
for _ = 1, math.min(card.ability.extra.shadows, 25) * number do
local joker = create_card("Joker", G.jokers, nil, nil, nil, nil, nil, "phantom")
joker.no_forced_edition = true
joker:set_edition({negative = true})
@ -303,8 +305,9 @@ SMODS.Consumable {
G.jokers.cards[i].extra_cost = 0
G.jokers.cards[i].cost = 0
G.jokers.cards[i].sell_cost = 0
G.jokers.cards[i].sell_cost_label = G.jokers.cards[i].facing == "back" and "?" or G.jokers.cards[i]
.sell_cost
G.jokers.cards[i].sell_cost_label = G.jokers.cards[i].facing == "back" and "?" or
G.jokers.cards[i].sell_cost
end
end,
}
@ -344,6 +347,6 @@ SMODS.Consumable {
end
realdelay(1)
createfulldeck()
create_full_deck()
end,
}