Make fusable escapey a setting (false by default, nerf)
This commit is contained in:
parent
49a24ea636
commit
a466a8f032
7 changed files with 54 additions and 56 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
return {
|
return {
|
||||||
equinox_assist = false,
|
equinox_assist = false,
|
||||||
|
fusable_escapey = false,
|
||||||
harsh_ante_scaling = true,
|
harsh_ante_scaling = true,
|
||||||
illusion_seal = true,
|
illusion_seal = true,
|
||||||
no_highlight_limit = true,
|
no_highlight_limit = true,
|
||||||
|
|
|
||||||
|
|
@ -376,6 +376,7 @@ return {
|
||||||
b_Roland_fuse = "FUSE",
|
b_Roland_fuse = "FUSE",
|
||||||
b_Roland_debug_export = "Import funky.lua",
|
b_Roland_debug_export = "Import funky.lua",
|
||||||
b_Roland_equinox_assist = "Assist: Only hide text (Equinox)",
|
b_Roland_equinox_assist = "Assist: Only hide text (Equinox)",
|
||||||
|
b_Roland_fusable_escapey = "Fusable Escapey (overpowered)",
|
||||||
b_Roland_harsh_ante_scaling = "Harsh ante scaling (Ante 40+)",
|
b_Roland_harsh_ante_scaling = "Harsh ante scaling (Ante 40+)",
|
||||||
b_Roland_illusion_seal = "Allow seals from Illusion voucher",
|
b_Roland_illusion_seal = "Allow seals from Illusion voucher",
|
||||||
b_Roland_most_common_card = "(Rank)",
|
b_Roland_most_common_card = "(Rank)",
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
"author": [
|
"author": [
|
||||||
"Emik"
|
"Emik"
|
||||||
],
|
],
|
||||||
"version": "2.0.4",
|
"version": "2.0.5",
|
||||||
"badge_colour": "8BE9FD",
|
"badge_colour": "8BE9FD",
|
||||||
"main_file": "src/main.lua",
|
"main_file": "src/main.lua",
|
||||||
"badge_text_colour": "44475A",
|
"badge_text_colour": "44475A",
|
||||||
|
|
|
||||||
|
|
@ -34,16 +34,15 @@ local back = (function()
|
||||||
return false
|
return false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
local sleeve = (_G["CardSleeves"] or {}).Sleeve
|
||||||
SMODS.Back(tbl)
|
SMODS.Back(tbl)
|
||||||
x = x + 1
|
x = x + 1
|
||||||
|
|
||||||
---@diagnostic disable-next-line: undefined-global
|
if not sleeve then
|
||||||
if not CardSleeves then
|
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
---@diagnostic disable-next-line: undefined-global
|
sleeve {
|
||||||
CardSleeves.Sleeve {
|
|
||||||
key = key,
|
key = key,
|
||||||
pos = tbl.pos,
|
pos = tbl.pos,
|
||||||
atlas = "back",
|
atlas = "back",
|
||||||
|
|
|
||||||
|
|
@ -37,10 +37,15 @@ end
|
||||||
|
|
||||||
local function is_mergeable_with(x)
|
local function is_mergeable_with(x)
|
||||||
return function(y)
|
return function(y)
|
||||||
return x.rank ~= y.rank and y.label == "j_Roland_escapey" and not (y.ability or {}).eternal
|
return x.rank ~= y.rank and
|
||||||
|
y.label == "j_Roland_escapey" and
|
||||||
|
not (y.ability or {}).eternal
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
---@param hand? string|true
|
||||||
|
---@param by integer
|
||||||
|
---@param card Card
|
||||||
local function level_up(hand, by, card)
|
local function level_up(hand, by, card)
|
||||||
local function update(handname, chips, mult, level, pitch)
|
local function update(handname, chips, mult, level, pitch)
|
||||||
update_hand_text(
|
update_hand_text(
|
||||||
|
|
@ -56,11 +61,11 @@ local function level_up(hand, by, card)
|
||||||
hand = hand or "NO_HAND_SPECIFIED"
|
hand = hand or "NO_HAND_SPECIFIED"
|
||||||
local hand_obj = G.GAME.hands[hand]
|
local hand_obj = G.GAME.hands[hand]
|
||||||
|
|
||||||
if hand == "all" or hand == "allhands" or hand == "all_hands" then
|
if hand == true then
|
||||||
update(localize "k_all_hands", "...", "...", "")
|
update(localize "k_all_hands", "...", "...", "")
|
||||||
|
|
||||||
f(G.GAME.hands):keys():each(function(k)
|
f(G.GAME.hands):where "visible":keys():each(function(k)
|
||||||
level_up_hand(card, k, nil, by)
|
level_up_hand(card, k, true, by)
|
||||||
end)
|
end)
|
||||||
elseif hand_obj then
|
elseif hand_obj then
|
||||||
update(localize(hand, "poker_hands"), hand_obj.chips, hand_obj.mult, hand_obj.level)
|
update(localize(hand, "poker_hands"), hand_obj.chips, hand_obj.mult, hand_obj.level)
|
||||||
|
|
@ -89,15 +94,12 @@ joker {
|
||||||
blueprint_compat = false,
|
blueprint_compat = false,
|
||||||
perishable_compat = true,
|
perishable_compat = true,
|
||||||
loc_vars = function(_, _, card)
|
loc_vars = function(_, _, card)
|
||||||
local loc_self = G.localization.descriptions.Joker.j_Roland_escapey
|
local sinister = (_G["Jen"] or _G["pwx"] or {}).sinister or G.escapey_sinister
|
||||||
|
local loc = G.localization.descriptions.Joker.j_Roland_escapey
|
||||||
|
local quotes = loc.quotes
|
||||||
|
|
||||||
---@diagnostic disable-next-line: undefined-global
|
local merge = (G.jokers and f(G.jokers.cards):any(is_mergeable_with(card)))
|
||||||
local sinister = (Jen or {}).sinister or G.escapey_sinister
|
and loc.merge or {}
|
||||||
local quotes = loc_self.quotes
|
|
||||||
|
|
||||||
local merge = G.jokers
|
|
||||||
and f(G.jokers.cards):any(is_mergeable_with(card))
|
|
||||||
and loc_self.merge or {}
|
|
||||||
|
|
||||||
local normal = (merge[1] or sinister) and "" or
|
local normal = (merge[1] or sinister) and "" or
|
||||||
pseudorandom_element(quotes.normal, pseudoseed "EscapeyQuotes") or ""
|
pseudorandom_element(quotes.normal, pseudoseed "EscapeyQuotes") or ""
|
||||||
|
|
@ -111,17 +113,13 @@ joker {
|
||||||
normal,
|
normal,
|
||||||
scared,
|
scared,
|
||||||
merge[1] or "",
|
merge[1] or "",
|
||||||
merge[1] and loc_self.name or "",
|
merge[1] and loc.name or "",
|
||||||
merge[2] or "",
|
merge[2] or "",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
Bakery_can_use = function(_, card)
|
Bakery_can_use = function(self, card)
|
||||||
return not card.debuff and u() and (
|
return not card.debuff and u() and (self.exchangable() or self.fusable(card))
|
||||||
#G.GAME.tags ~= 0 or
|
|
||||||
f(G.consumeables.cards):any(destructible) or
|
|
||||||
f(G.jokers.cards):any(is_mergeable_with(card))
|
|
||||||
)
|
|
||||||
end,
|
end,
|
||||||
Bakery_use_button_text = function(_, card)
|
Bakery_use_button_text = function(_, card)
|
||||||
return localize {
|
return localize {
|
||||||
|
|
@ -143,11 +141,7 @@ joker {
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local consumables = f(G.consumeables.cards):where(destructible):table()
|
if not self.exchangable() then
|
||||||
local consumable_count = #consumables
|
|
||||||
local tag_count = #G.GAME.tags
|
|
||||||
|
|
||||||
if consumable_count == 0 and tag_count == 0 then
|
|
||||||
local level_sum, sell_sum = 0, 0
|
local level_sum, sell_sum = 0, 0
|
||||||
local any_carbon = is_carbon(card)
|
local any_carbon = is_carbon(card)
|
||||||
|
|
||||||
|
|
@ -166,30 +160,34 @@ joker {
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local function fast_delete(v)
|
local function fast_delete(tag)
|
||||||
return function()
|
return function()
|
||||||
attention_text {
|
attention_text {
|
||||||
scale = 0.7,
|
scale = 0.7,
|
||||||
align = "cm",
|
align = "cm",
|
||||||
text = "ESC",
|
text = "ESC",
|
||||||
cover = v.HUD_tag,
|
cover = tag.HUD_tag,
|
||||||
colour = G.C.WHITE,
|
colour = G.C.WHITE,
|
||||||
cover_colour = G.C.BLACK,
|
cover_colour = G.C.BLACK,
|
||||||
hold = 0.3 / G.SETTINGS.GAMESPEED,
|
hold = 0.3 / G.SETTINGS.GAMESPEED,
|
||||||
}
|
}
|
||||||
|
|
||||||
play_sound("cancel", 1.66, 0.5)
|
play_sound("cancel", 1.66, 0.5)
|
||||||
v.HUD_tag.states.visible = false
|
tag.HUD_tag.states.visible = false
|
||||||
v:remove()
|
tag:remove()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
local destroyed = 0
|
local destroyed = 0
|
||||||
|
|
||||||
if consumable_count == 0 then
|
f(G.consumeables.cards):where(destructible):each(function(v)
|
||||||
local threshold = 30
|
v:start_dissolve({HEX "57ecabff"}, nil, 1.6)
|
||||||
local delay = #G.GAME.tags >= threshold and 0 or 1 / #G.GAME.tags
|
destroyed = destroyed + 1
|
||||||
local trigger = #G.GAME.tags >= threshold and "immediate" or "before"
|
end)
|
||||||
|
|
||||||
|
if destroyed == 0 then
|
||||||
|
local delay = #G.GAME.tags >= self.tag_threshold and 0 or 1 / #G.GAME.tags
|
||||||
|
local trigger = #G.GAME.tags >= self.tag_threshold and "immediate" or "before"
|
||||||
|
|
||||||
f(G.GAME.tags):each(function(v)
|
f(G.GAME.tags):each(function(v)
|
||||||
q {
|
q {
|
||||||
|
|
@ -199,29 +197,33 @@ joker {
|
||||||
func = fast_delete(v),
|
func = fast_delete(v),
|
||||||
}
|
}
|
||||||
|
|
||||||
destroyed = destroyed + 1
|
|
||||||
end)
|
|
||||||
else
|
|
||||||
f(consumables):each(function(v)
|
|
||||||
v:start_dissolve({HEX "57ecabff"}, nil, 1.6)
|
|
||||||
destroyed = destroyed + 1
|
destroyed = destroyed + 1
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
self.proc(card, destroyed)
|
self.proc(card, destroyed)
|
||||||
end,
|
end,
|
||||||
|
exchangable = function()
|
||||||
|
return next(G.GAME.tags) or f(G.consumeables.cards):any(destructible)
|
||||||
|
end,
|
||||||
|
---@param card Card
|
||||||
|
fusable = function(card)
|
||||||
|
return SMODS.Mods.Roland.config.fusable_escapey and
|
||||||
|
f(G.jokers.cards):any(is_mergeable_with(card))
|
||||||
|
end,
|
||||||
---@param card Card
|
---@param card Card
|
||||||
---@param times? integer
|
---@param times? integer
|
||||||
proc = function(card, times)
|
proc = function(card, times)
|
||||||
local hands = f(G.GAME.hands):where "visible":keys():table()
|
local hands = f(G.GAME.hands):where "visible":keys():table()
|
||||||
pseudoshuffle(hands, pseudoseed "RolandEscapey")
|
|
||||||
local levels = card.ability.extra.hands * (times or 1)
|
local levels = card.ability.extra.hands * (times or 1)
|
||||||
level_up("all", math.floor(levels / #hands), card)
|
pseudoshuffle(hands, pseudoseed "RolandEscapey")
|
||||||
|
level_up(true, math.floor(levels / #hands), card)
|
||||||
|
|
||||||
f(hands):take(levels % #hands):each(function(v)
|
f(hands):take(levels % #hands):each(function(v)
|
||||||
level_up(v, 1, card)
|
level_up(v, 1, card)
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
|
tag_threshold = 30,
|
||||||
}
|
}
|
||||||
|
|
||||||
joker {
|
joker {
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,7 @@ function SMODS.current_mod.config_tab()
|
||||||
toggle "no_wild_debuff",
|
toggle "no_wild_debuff",
|
||||||
toggle "no_highlight_limit",
|
toggle "no_highlight_limit",
|
||||||
_G["Talisman"] and toggle "harsh_ante_scaling",
|
_G["Talisman"] and toggle "harsh_ante_scaling",
|
||||||
|
toggle "fusable_escapey",
|
||||||
toggle "equinox_assist",
|
toggle "equinox_assist",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ local orig_copy_card = copy_card
|
||||||
|
|
||||||
---@diagnostic disable-next-line: duplicate-set-field
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
function CardArea:can_highlight(...)
|
function CardArea:can_highlight(...)
|
||||||
if self ~= G.consumeables and not SMODS.Mods.Roland.config.no_highlight_limit then
|
if self ~= G.consumeables or not SMODS.Mods.Roland.config.no_highlight_limit then
|
||||||
return orig_can_highlight(self, ...)
|
return orig_can_highlight(self, ...)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -30,13 +30,9 @@ end
|
||||||
|
|
||||||
---@diagnostic disable-next-line: duplicate-set-field
|
---@diagnostic disable-next-line: duplicate-set-field
|
||||||
function Card:highlight(is_highlighted, ...)
|
function Card:highlight(is_highlighted, ...)
|
||||||
if not SMODS.Mods.Roland.config.no_highlight_limit then
|
|
||||||
return orig_highlight(self, is_highlighted, ...)
|
|
||||||
end
|
|
||||||
|
|
||||||
self.highlighted = is_highlighted
|
self.highlighted = is_highlighted
|
||||||
|
|
||||||
if not G.CONTROLLER.HID.controller then
|
if not G.CONTROLLER.HID.controller or not SMODS.Mods.Roland.config.no_highlight_limit then
|
||||||
return orig_highlight(self, is_highlighted, ...)
|
return orig_highlight(self, is_highlighted, ...)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
@ -83,7 +79,8 @@ function copy_card(other, new_card, ...)
|
||||||
if new_card and new_card.edition and new_card.edition.key == "e_negative" then
|
if new_card and new_card.edition and new_card.edition.key == "e_negative" then
|
||||||
--- Fixes an issue where using 'c_death' will make negative
|
--- Fixes an issue where using 'c_death' will make negative
|
||||||
--- cards do the inverse of what they're supposed to do.
|
--- cards do the inverse of what they're supposed to do.
|
||||||
new_card.ability.card_limit = math.max(new_card.ability.card_limit, 1)
|
local ability = new_card.ability
|
||||||
|
ability.card_limit = math.max(ability.card_limit, 1)
|
||||||
end
|
end
|
||||||
|
|
||||||
return ret
|
return ret
|
||||||
|
|
@ -107,11 +104,8 @@ function create_card_for_shop(...)
|
||||||
---@type Card
|
---@type Card
|
||||||
local ret = orig_create_card_for_shop(...)
|
local ret = orig_create_card_for_shop(...)
|
||||||
|
|
||||||
if not SMODS.Mods.Roland.config.illusion_seal then
|
if not SMODS.Mods.Roland.config.illusion_seal or
|
||||||
return ret
|
not G.GAME.used_vouchers.v_illusion or
|
||||||
end
|
|
||||||
|
|
||||||
if not G.GAME.used_vouchers.v_illusion or
|
|
||||||
not ({Default = true, Enhanced = true})[(((ret or {}).config or {}).center or {}).set] or
|
not ({Default = true, Enhanced = true})[(((ret or {}).config or {}).center or {}).set] or
|
||||||
pseudorandom(pseudoseed "Roland_illusion") <= 0.8 then
|
pseudorandom(pseudoseed "Roland_illusion") <= 0.8 then
|
||||||
return ret
|
return ret
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue