Add more feedback

This commit is contained in:
Emik 2026-02-11 18:27:43 +01:00
parent cec718d97a
commit 4f8902411b
Signed by: emik
GPG key ID: 6B0CD72A5E503BDF
7 changed files with 119 additions and 54 deletions

BIN
assets/sounds/kick.ogg Normal file

Binary file not shown.

View file

@ -215,7 +215,8 @@ return {
text = {
"Creates a random {C:attention}Tag",
"at the end of the {C:attention}Ante",
"{C:red,E:1}Self destructs{} if {C:attention}drawn",
"{C:red,E:1}Shatters{} if drawn",
"during any {C:attention}Blind",
},
},
},
@ -293,11 +294,12 @@ return {
c_Roland_Pastries = "Sweet Pastries",
},
v_dictionary = {
b_Roland_bye = "Bye!",
b_Roland_comma = ", ",
b_Roland_entering_shop = "Entering shop!",
b_Roland_of = " of ",
b_Roland_most_common_card = "(Rank)",
b_Roland_na = "N/A",
b_Roland_of = " of ",
},
labels = {
roland_glass_seal = "Glass Seal",

View file

@ -87,7 +87,7 @@ back {
apply = function(_, _)
G.GAME.modifiers.Roland_blossom_deck = true
end,
calculate = function(self, _, context)
calculate = function(self, card, context)
if not context.setting_blind then
return
end
@ -106,8 +106,10 @@ back {
q {
delay = 0.4,
func = function()
SMODS.calculate_effect({message = localize("ph_boss_disabled")}, card)
G.GAME.blind:wiggle()
play_sound "timpani"
delay(0.4)
end,
}
end
@ -134,7 +136,22 @@ back {
end
end)
end,
calculate = function(_, _, context)
local _ = context.starting_shop and ease_dollars(-G.GAME.dollars)
calculate = function(_, card, context)
if not context.starting_shop then
return
end
ease_dollars(-G.GAME.dollars)
attention_text({
text = localize("k_nope_ex"),
scale = 1.3,
hold = 1.4,
major = card,
backdrop_colour = G.C.MONEY,
align = "cm",
offset = {x = 0, y = 0},
silent = true,
})
end,
}

View file

@ -21,6 +21,11 @@ SMODS.Atlas {
atlas_table = "ANIMATION_ATLAS",
}
SMODS.Sound {
key = "kick",
path = "kick.ogg",
}
local function common_rank()
local tally = {}
local to_name = {}
@ -72,11 +77,11 @@ blind {
boss_colour = HEX "0291fb",
pronouns = "she_her",
config = {draw = 5},
defeat = function(self)
self.disabled = false
defeat = function()
G.GAME.Roland_nimble_disabled = nil
end,
disable = function(self)
self.disabled = true
disable = function()
G.GAME.Roland_nimble_disabled = true
end,
drawn_to_hand = function(self)
local function force_hand()
@ -89,15 +94,16 @@ blind {
end)
G.FUNCS.play_cards_from_highlighted(nil)
self:disable()
end
if not self.disabled then
self.disabled = true
if not G.GAME.Roland_nimble_disabled then
G.GAME.Roland_nimble_disabled = true
q {func = force_hand, blocking = false}
end
end,
set_blind = function(self)
self.disabled = false
set_blind = function()
G.GAME.Roland_nimble_disabled = nil
end,
}
@ -107,6 +113,7 @@ blind {
boss_colour = HEX "b18480",
pronouns = "he_they",
disable = function()
-- Ensures that this runs after 'set_blind' since it also gets added to queue.
q(function()
local count = #G.discard.cards
@ -162,6 +169,7 @@ blind {
draw_card(G.hand, G.discard, i / count * 100, "down", false, copy, nil, nil, true)
end)
b:wiggle()
b.triggered = true
playing_card_joker_effects(cards_added)
end,
@ -196,8 +204,16 @@ local orig_update = Game.update
function Game.update(...)
orig_update(...)
local orig = G.GAME.probabilities
local improbable = G.GAME.modifiers.Roland_improbable
if not G.GAME.modifiers.Roland_improbable or getmetatable(orig) then
-- Normally unreachable since we set it to nil ourselves,
-- but other mods may want to use this modifier.
if improbable == false then
disable_improbable()
return
end
if not improbable or getmetatable(orig) then
return
end
@ -247,7 +263,7 @@ blind {
return
end
local needs_text_change = false
local needs_text_change
local function process(card_area)
f(card_area.cards):foreach(function(v)
@ -280,12 +296,13 @@ blind {
boss_colour = HEX "000000",
pronouns = "any_all",
defeat = function()
G.GAME.modifiers.Roland_equinox = false
G.GAME.modifiers.Roland_equinox = nil
end,
disable = function()
G.GAME.modifiers.Roland_equinox = false
G.GAME.modifiers.Roland_equinox = nil
end,
set_blind = function()
play_sound("Roland_kick", 1, 0.7)
G.GAME.modifiers.Roland_equinox = true
end,
}

View file

@ -266,12 +266,18 @@ joker {
return {xmult = card.ability.extra.xmult}
end
if context.blind_defeated and G.GAME.chips / card.ability.extra.requirement < G.GAME.blind.chips then
if not card.getting_sliced and
context.end_of_round and
G.GAME.chips / card.ability.extra.requirement < G.GAME.blind.chips then
card.getting_sliced = true
local message = localize {type = "variable", key = "b_Roland_bye"}
SMODS.calculate_effect({message = message, colour = G.C.RED}, card)
q(function()
G.hand_text_area.blind_chips:juice_up()
G.hand_text_area.game_chips:juice_up()
play_sound("tarot1")
card:start_dissolve()
play_sound("tarot1")
end)
end
end,
@ -297,14 +303,14 @@ joker {
joker {
key = "hexagon",
pronouns = "it_its",
config = {extra = {money = 6}},
config = {extra = {price = 6}},
cost = 6,
rarity = 1,
eternal_compat = true,
blueprint_compat = true,
perishable_compat = true,
loc_vars = function(_, _, card)
return {vars = {card.ability.extra.money}}
return {vars = {card.ability.extra.price}}
end,
calculate = function(_, card, context)
if not context.joker_main or
@ -312,7 +318,9 @@ joker {
return
end
card.sell_cost = card.sell_cost + card.ability.extra.money
card.ability.extra_value = card.ability.extra_value + card.ability.extra.price
card:set_cost()
return {message = localize "k_val_up", colour = G.C.MONEY}
end,
}
@ -337,6 +345,7 @@ joker {
context.cardarea == "unscored" and
context.scoring_name == "Four of a Kind" then
card.ability.extra.mult = card.ability.extra.mult + context.other_card.base.nominal
return {message = localize "k_upgrade_ex", colour = G.C.RED, message_card = card}
end
end,
}
@ -350,7 +359,7 @@ joker {
eternal_compat = true,
blueprint_compat = true,
perishable_compat = true,
calculate = function(_, _, context)
calculate = function(_, card, context)
if not context.individual or
context.cardarea ~= "unscored" or
context.scoring_name ~= "Four of a Kind" then
@ -358,7 +367,9 @@ joker {
end
q(function()
playing_card_joker_effects(f(G.play):take(#G.play):map(function(v)
f(G.play.cards):filter(function(v)
return not v.highlighted
end):foreach(function(v)
G.playing_card = (G.playing_card or 0) + 1
G.deck.config.card_limit = G.deck.config.card_limit + 1
local copy = copy_card(v, nil, nil, G.playing_card)
@ -366,8 +377,9 @@ joker {
G.hand:emplace(copy)
copy:start_materialize()
table.insert(G.playing_cards, copy)
return copy
end):into())
playing_card_joker_effects({copy})
card:juice_up()
end)
end)
end,
}
@ -479,7 +491,15 @@ joker {
return context.joker_main and {card = card, xmult = self.xmult()} or nil
end,
xmult = function()
return ((G.GAME or {}).blind or {}).mult or 1
local function mult(id)
local next = {Select = true, Upcoming = true}
local states = G.GAME.round_resets.blind_states
local choices = G.GAME.round_resets.blind_choices
return next[states[id]] and G.P_BLINDS[choices[id]].mult
end
local m = ((G.GAME or {}).blind or {}).mult
return m and m ~= 0 and m or mult "Small" or mult "Big" or mult "Boss" or 1
end,
}
@ -507,10 +527,14 @@ joker {
return {numerator = extra.probability}
end
if context.blind_defeated then
if context.end_of_round and extra.probability ~= extra.delta then
extra.probability = extra.delta
elseif context.after then
return {message = localize "k_reset", colour = G.C.RED}
end
if context.after then
extra.probability = extra.probability + extra.delta
return {message = localize "k_upgrade_ex", colour = G.C.GREEN}
end
end,
}

View file

@ -14,6 +14,23 @@ SMODS.Seal {
badge_colour = HEX "a6a6a6",
pronouns = "he_him",
calculate = function(_, card, context)
local function proc()
card.Roland_glass = true
local tag = Tag(get_next_tag_key "Roland_glass")
if tag.name == "Orbital Tag" then
tag.ability.orbital_hand = pseudorandom_element(
f(G.GAME.hands):filter(function(v)
return v.visible
end):keys():into(),
pseudoseed "Roland_glass"
)
end
add_tag(tag)
play_sound "other1"
end
if context.setting_blind or context.starting_shop then
card.Roland_glass = nil
end
@ -22,30 +39,18 @@ SMODS.Seal {
return
end
if G.STATE == G.STATES.DRAW_TO_HAND and card == context.other_card then
card.Roland_glass = true
return q(function()
if context.hand_drawn and f(context.hand_drawn):any(function(v)
return v == card
end) then
q(function()
card:shatter()
end)
SMODS.calculate_context({remove_playing_cards = true, removed = {card}})
end
if not context.ante_end then
return
if context.ante_end then
proc()
end
card.Roland_glass = true
local tag = Tag(get_next_tag_key "Roland_glass")
if tag.name == "Orbital Tag" then
tag.ability.orbital_hand = pseudorandom_element(
f(G.GAME.hands):filter(function(v)
return v.visible
end):keys():into(),
pseudoseed "Roland_glass"
)
end
add_tag(tag)
end,
}

View file

@ -14,11 +14,6 @@ local spectral = (function()
end
end)()
SMODS.Sound {
key = "void",
path = "void.ogg",
}
SMODS.Atlas {
px = 71,
py = 95,
@ -26,6 +21,11 @@ SMODS.Atlas {
path = "spectral.png",
}
SMODS.Sound {
key = "void",
path = "void.ogg",
}
spectral {
key = "afterimage",
pronouns = "he_they",