Buff Maxie, Downshift Artificier, Nerf Hunter and Gourmand
This commit is contained in:
parent
d3629c857e
commit
f3381d1046
4 changed files with 149 additions and 89 deletions
|
|
@ -11,11 +11,13 @@
|
|||
"badge_colour": "3c3cff",
|
||||
"priority": 114,
|
||||
"dependencies": [
|
||||
"Steamodded (>=1.0.0~ALPHA-1304a)",
|
||||
"Bakery (>=0.1.26~*)"
|
||||
"Steamodded (>=1.0.0~BETA-1606b)",
|
||||
"Lovely (>=0.6)",
|
||||
"Bakery (>=3.2.0~*)",
|
||||
"Roland (>=2.8.0~*)"
|
||||
],
|
||||
"conflicts": [
|
||||
"Jen"
|
||||
],
|
||||
"version": "1.7.10"
|
||||
"version": "1.7.11"
|
||||
}
|
||||
|
|
@ -152,7 +152,6 @@ back {
|
|||
local rain_world_jokers = {
|
||||
"j_jane_monk",
|
||||
"j_jane_survivor",
|
||||
"j_jane_artificer",
|
||||
"j_jane_spearmaster",
|
||||
"j_jane_rivulet",
|
||||
"j_jane_saint",
|
||||
|
|
|
|||
|
|
@ -293,14 +293,19 @@ SMODS.Joker {
|
|||
},
|
||||
}
|
||||
end,
|
||||
calculate = function(_, card, context)
|
||||
calculate = function(self, card, context)
|
||||
local _ = context.starting_shop and self:add_to_deck(card, false)
|
||||
end,
|
||||
add_to_deck = function(_, card, from_debuff)
|
||||
if from_debuff then
|
||||
return
|
||||
end
|
||||
|
||||
local min = math.min(card.ability.extra.choices, maxie_limit)
|
||||
card.ability.extra.choices = min
|
||||
|
||||
if context.starting_shop then
|
||||
for _ = 1, min do
|
||||
SMODS.add_booster_to_shop()
|
||||
end
|
||||
for _ = 1, min do
|
||||
SMODS.add_booster_to_shop()
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
|
@ -630,7 +635,7 @@ SMODS.Joker {
|
|||
name = "Betmma",
|
||||
text = {
|
||||
operator_prefix .. "+" .. operator .. "#1#{C:mult} Mult{} for every",
|
||||
"{C:attention}unique Voucher redeemed",
|
||||
"{C:attention}" .. (Cryptid and "Unique " or "") .. "Voucher{} redeemed",
|
||||
"{C:inactive}(Currently " .. operator_prefix .. operator .. "#2#{C:inactive})",
|
||||
},
|
||||
},
|
||||
|
|
|
|||
212
src/slugcat.lua
212
src/slugcat.lua
|
|
@ -125,9 +125,9 @@ SMODS.Joker {
|
|||
name = "The Survivor",
|
||||
text = {
|
||||
"All cards held in hand",
|
||||
"{C:attention}contribute to scoring" .. (Cryptid and " {}and" or ""),
|
||||
Cryptid and "are all considered as" or nil,
|
||||
Cryptid and "the {C:attention}first played card" or nil,
|
||||
"also {C:attention}score" .. (Cryptid and " {}and" or ""),
|
||||
Cryptid and "considered as the" or nil,
|
||||
Cryptid and "{C:attention}first {}played card" or nil,
|
||||
},
|
||||
},
|
||||
pos = {x = 0, y = 0},
|
||||
|
|
@ -144,11 +144,10 @@ SMODS.Joker {
|
|||
loc_txt = {
|
||||
name = "The Hunter",
|
||||
text = {
|
||||
"{C:blue}Provides infinite hands",
|
||||
"{C:red,s,E:1}Succumbs to the Rot {}and creates",
|
||||
(Cryptid and "an {C:spectral}Empowered Tag" or "a {C:dark_edition}Negative {C:spectral}Soul") .. " {}after #1#",
|
||||
"When {C:attention}sold#2#{}, turns#3#",
|
||||
"#4#{C:red}The Rot{} without rewards",
|
||||
"{E:1}Succumbs to the",
|
||||
"{X:black,C:white,E:1}Rot{}, creating",
|
||||
(Cryptid and "an {C:spectral}Empowered Tag" or "a {C:dark_edition}Negative {C:spectral}Soul"),
|
||||
"after #1#",
|
||||
},
|
||||
},
|
||||
config = {extra = {rounds_left = hunter[1]}},
|
||||
|
|
@ -164,6 +163,7 @@ SMODS.Joker {
|
|||
return " round" .. ((math.abs(amount) > 1 or math.abs(amount) == 0) and "s" or "")
|
||||
end
|
||||
|
||||
info_queue[#info_queue + 1] = G.P_CENTERS.j_jane_rot
|
||||
info_queue[#info_queue + 1] = Cryptid and G.P_CENTERS.c_cry_empowered or G.P_CENTERS.c_soul
|
||||
local rounds_left = card.ability.extra.rounds_left
|
||||
local sold = rounds_left - hunter[5]
|
||||
|
|
@ -218,72 +218,51 @@ SMODS.Joker {
|
|||
spawn_rot()
|
||||
end
|
||||
|
||||
if context.blueprint then
|
||||
if context.blueprint or
|
||||
context.individual or
|
||||
context.repetition or
|
||||
context.retrigger_joker or
|
||||
not context.end_of_round then
|
||||
return
|
||||
end
|
||||
|
||||
if context.selling_self and card.ability.extra.rounds_left <= hunter[5] then
|
||||
spawn_rot()
|
||||
elseif not context.individual and not context.repetition and not context.retrigger_joker then
|
||||
if G.GAME.round_resets.hands <= 0 then
|
||||
G.GAME.round_resets.hands = 1
|
||||
card.ability.extra.rounds_left = card.ability.extra.rounds_left - 1
|
||||
local rl = card.ability.extra.rounds_left
|
||||
Jane.card_status_text(card, tostring(card.ability.extra.rounds_left), nil, nil, G.C.RED, nil, nil, nil, nil,
|
||||
nil, "generic1")
|
||||
|
||||
if rl > hunter[2] then
|
||||
card:juice_up(0.6, 0.1)
|
||||
elseif rl > hunter[3] then
|
||||
if rl == hunter[2] then
|
||||
Jane.play_sound("jane_gore1")
|
||||
end
|
||||
|
||||
if not card.hunter_prep then
|
||||
card.hunter_prep = true
|
||||
|
||||
Jane.q(function()
|
||||
card.hunter_prep = nil
|
||||
|
||||
if G.GAME.current_round.hands_left < G.GAME.round_resets.hands then
|
||||
ease_hands_played(G.GAME.round_resets.hands - G.GAME.current_round.hands_left)
|
||||
end
|
||||
end)
|
||||
card:juice_up(0.6, 0.1)
|
||||
elseif rl > hunter[4] then
|
||||
if rl == hunter[3] then
|
||||
Jane.play_sound("jane_gore3")
|
||||
end
|
||||
|
||||
if not context.end_of_round then
|
||||
return
|
||||
card:juice_up(0.6, 0.1)
|
||||
elseif rl > hunter[5] then
|
||||
if rl == hunter[4] then
|
||||
Jane.play_sound("jane_gore8")
|
||||
end
|
||||
|
||||
card.hunter_prep = nil
|
||||
card.ability.extra.rounds_left = card.ability.extra.rounds_left - 1
|
||||
local rl = card.ability.extra.rounds_left
|
||||
Jane.card_status_text(card, tostring(card.ability.extra.rounds_left), nil, nil, G.C.RED, nil, nil, nil, nil,
|
||||
nil, "generic1")
|
||||
|
||||
if rl > hunter[2] then
|
||||
card:juice_up(0.6, 0.1)
|
||||
elseif rl > hunter[3] then
|
||||
if rl == hunter[2] then
|
||||
Jane.play_sound("jane_gore1")
|
||||
end
|
||||
|
||||
card:juice_up(0.6, 0.1)
|
||||
elseif rl > hunter[4] then
|
||||
if rl == hunter[3] then
|
||||
Jane.play_sound("jane_gore3")
|
||||
end
|
||||
|
||||
card:juice_up(0.6, 0.1)
|
||||
elseif rl > hunter[5] then
|
||||
if rl == hunter[4] then
|
||||
Jane.play_sound("jane_gore8")
|
||||
end
|
||||
|
||||
card:juice_up(0.6, 0.1)
|
||||
Jane.play_sound("jane_warning_heartbeat")
|
||||
elseif rl > 0 then
|
||||
if rl == hunter[5] then
|
||||
Jane.play_sound("jane_gore4")
|
||||
end
|
||||
|
||||
card:juice_up(1.8, 0.3)
|
||||
Jane.play_sound("jane_warning_heartbeat")
|
||||
else
|
||||
card:juice_up(2, 0.8)
|
||||
Jane.play_sound("jane_warning_heartbeat")
|
||||
Jane.q(die, 0)
|
||||
card:juice_up(0.6, 0.1)
|
||||
Jane.play_sound("jane_warning_heartbeat")
|
||||
elseif rl > 0 then
|
||||
if rl == hunter[5] then
|
||||
Jane.play_sound("jane_gore4")
|
||||
end
|
||||
|
||||
card:juice_up(1.8, 0.3)
|
||||
Jane.play_sound("jane_warning_heartbeat")
|
||||
else
|
||||
card:juice_up(2, 0.8)
|
||||
Jane.play_sound("jane_warning_heartbeat")
|
||||
Jane.q(die, 0)
|
||||
end
|
||||
end,
|
||||
}
|
||||
|
|
@ -295,15 +274,15 @@ SMODS.Joker {
|
|||
name = "The Gourmand",
|
||||
text = {
|
||||
"Values on {C:attention}consumables",
|
||||
"are {C:attention}multiplied{} by {C:attention}#1#",
|
||||
"when they are created",
|
||||
"are {C:attention}" .. (Cryptid and "multiplied" or "added") .. "{} by {C:attention}#1#" .. (Cryptid and "" or "{} when"),
|
||||
(Cryptid and "when " or "") .. "they are created",
|
||||
"{C:inactive}(If possible)",
|
||||
},
|
||||
},
|
||||
loc_vars = function(_, _, center)
|
||||
return {vars = {center.ability.modifier}}
|
||||
end,
|
||||
config = {modifier = 2},
|
||||
config = {modifier = Cryptid and 2 or 1},
|
||||
pos = {x = 0, y = 0},
|
||||
soul_pos = {x = 1, y = 0},
|
||||
blueprint_compat = false,
|
||||
|
|
@ -311,6 +290,51 @@ SMODS.Joker {
|
|||
rarity = 3,
|
||||
}
|
||||
|
||||
local function add_to_consumable_ability_by(n)
|
||||
local f = SMODS.Mods.Roland.qol[1]
|
||||
|
||||
local function new(v)
|
||||
return type(v) == "number" and v + n or type(v) == "table" and f(v):map(new):table() or v
|
||||
end
|
||||
|
||||
---@param card Card
|
||||
return function(card)
|
||||
local ability = card.ability or {}
|
||||
|
||||
local function go(key)
|
||||
---@type { [string]: number }|number
|
||||
local value = ability[key]
|
||||
--print(key)
|
||||
if not value then
|
||||
return
|
||||
end
|
||||
|
||||
if type(value) == "number" then
|
||||
ability[key] = value + n
|
||||
return
|
||||
end
|
||||
|
||||
if type(value) ~= "table" then
|
||||
return
|
||||
end
|
||||
|
||||
local new_value = f(value):map(new):table()
|
||||
|
||||
f(new_value):each(function(v, k)
|
||||
ability[k] = v
|
||||
end)
|
||||
|
||||
ability[key] = new_value
|
||||
end
|
||||
|
||||
local center_key = (card.config or {}).center_key
|
||||
|
||||
if center_key and center_key:sub(1, 2) == "c_" then
|
||||
f {"extra", "consumeable"}:each(go)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
local orig_set_ability = Card.set_ability
|
||||
|
||||
---@diagnostic disable-next-line: duplicate-set-field
|
||||
|
|
@ -321,13 +345,23 @@ function Card:set_ability(center, initial, delay_sprites)
|
|||
self.gc and
|
||||
self:gc().key ~= "c_base" and
|
||||
string.sub(self:gc().key, 1, 2) == "c_" then
|
||||
local mod = 1
|
||||
if Cryptid then
|
||||
local mod = 1
|
||||
|
||||
for _, v in pairs(SMODS.find_card("j_jane_gourmand")) do
|
||||
mod = mod * v.ability.modifier
|
||||
for _, v in pairs(SMODS.find_card("j_jane_gourmand")) do
|
||||
mod = mod * v.ability.modifier
|
||||
end
|
||||
|
||||
Jane.misprintize(self, {min = mod, max = mod}, nil, true)
|
||||
else
|
||||
local mod = 0
|
||||
|
||||
for _, v in pairs(SMODS.find_card("j_jane_gourmand")) do
|
||||
mod = mod + v.ability.modifier
|
||||
end
|
||||
|
||||
add_to_consumable_ability_by(mod)(self)
|
||||
end
|
||||
|
||||
Jane.misprintize(self, {min = mod, max = mod}, nil, true)
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -337,20 +371,27 @@ SMODS.Joker {
|
|||
loc_txt = {
|
||||
name = "The Artificer",
|
||||
text = {
|
||||
"Grants the {C:green}ability{} to {C:red}destroy",
|
||||
"Use to {C:red}destroy",
|
||||
"selected {C:attention}playing cards",
|
||||
not Cryptid and "{C:red,E:1}Self-destructs" or nil,
|
||||
not Cryptid and "after {C:attention}#1# #2#" or nil,
|
||||
},
|
||||
},
|
||||
pos = {x = 0, y = 0},
|
||||
soul_pos = {x = 1, y = 0},
|
||||
config = {extra = {uses = 2}},
|
||||
blueprint_compat = false,
|
||||
cost = Cryptid and 50 or 20,
|
||||
rarity = exotic,
|
||||
rarity = Cryptid and exotic or 3,
|
||||
loc_vars = function(_, _, card)
|
||||
local uses = card.ability.extra.uses
|
||||
return {vars = {uses, uses == 1 and "use" or "uses"}}
|
||||
end,
|
||||
Bakery_use_button_text = function(_, _) return "DESTROY" end,
|
||||
Bakery_can_use = function(_, card)
|
||||
return not card.debuff and Jane.can_use() and next(G.hand.highlighted)
|
||||
end,
|
||||
Bakery_use_joker = function(_, _)
|
||||
Bakery_use_joker = function(_, card)
|
||||
for _, v in pairs(SMODS.find_card("j_jane_oxy")) do
|
||||
Jane.oxy(v, G.hand.highlighted)
|
||||
end
|
||||
|
|
@ -358,6 +399,17 @@ SMODS.Joker {
|
|||
for _, v in pairs(G.hand.highlighted) do
|
||||
v:start_dissolve()
|
||||
end
|
||||
|
||||
if Cryptid then
|
||||
return
|
||||
end
|
||||
|
||||
card.ability.extra.uses = card.ability.extra.uses - 1
|
||||
local _ = card.ability.extra.uses <= 0 and card:start_dissolve()
|
||||
|
||||
local _ = card.ability.extra.uses == 1 and juice_card_until(card, function()
|
||||
return card.area == G.jokers
|
||||
end, true)
|
||||
end,
|
||||
}
|
||||
|
||||
|
|
@ -369,9 +421,11 @@ SMODS.Joker {
|
|||
loc_txt = {
|
||||
name = "The Spearmaster",
|
||||
text = {
|
||||
"You can choose {C:attention}any number of cards",
|
||||
"after opening {C:attention}any Booster Pack",
|
||||
"{C:attention}Booster Packs{} have {C:green}+#1#{} additional cards",
|
||||
"You can choose {C:attention}any",
|
||||
"number of cards",
|
||||
"in {C:attention}Booster Packs",
|
||||
"{C:attention}Booster Packs{} have",
|
||||
"{C:green}+#1#{} additional cards",
|
||||
},
|
||||
},
|
||||
config = {extra = {choices = 1}},
|
||||
|
|
@ -462,7 +516,7 @@ SMODS.Joker {
|
|||
name = "The Rivulet",
|
||||
text = {
|
||||
"Non-{C:dark_edition}editioned{} cards are",
|
||||
"{C:attention}given a random {C:dark_edition}Edition",
|
||||
"given a random {C:dark_edition}Edition",
|
||||
},
|
||||
},
|
||||
pos = {x = 0, y = 0},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue