Add more feedback
This commit is contained in:
parent
cec718d97a
commit
4f8902411b
7 changed files with 119 additions and 54 deletions
BIN
assets/sounds/kick.ogg
Normal file
BIN
assets/sounds/kick.ogg
Normal file
Binary file not shown.
|
|
@ -215,7 +215,8 @@ return {
|
||||||
text = {
|
text = {
|
||||||
"Creates a random {C:attention}Tag",
|
"Creates a random {C:attention}Tag",
|
||||||
"at the end of the {C:attention}Ante",
|
"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",
|
c_Roland_Pastries = "Sweet Pastries",
|
||||||
},
|
},
|
||||||
v_dictionary = {
|
v_dictionary = {
|
||||||
|
b_Roland_bye = "Bye!",
|
||||||
b_Roland_comma = ", ",
|
b_Roland_comma = ", ",
|
||||||
b_Roland_entering_shop = "Entering shop!",
|
b_Roland_entering_shop = "Entering shop!",
|
||||||
b_Roland_of = " of ",
|
|
||||||
b_Roland_most_common_card = "(Rank)",
|
b_Roland_most_common_card = "(Rank)",
|
||||||
b_Roland_na = "N/A",
|
b_Roland_na = "N/A",
|
||||||
|
b_Roland_of = " of ",
|
||||||
},
|
},
|
||||||
labels = {
|
labels = {
|
||||||
roland_glass_seal = "Glass Seal",
|
roland_glass_seal = "Glass Seal",
|
||||||
|
|
|
||||||
23
src/back.lua
23
src/back.lua
|
|
@ -87,7 +87,7 @@ back {
|
||||||
apply = function(_, _)
|
apply = function(_, _)
|
||||||
G.GAME.modifiers.Roland_blossom_deck = true
|
G.GAME.modifiers.Roland_blossom_deck = true
|
||||||
end,
|
end,
|
||||||
calculate = function(self, _, context)
|
calculate = function(self, card, context)
|
||||||
if not context.setting_blind then
|
if not context.setting_blind then
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
@ -106,8 +106,10 @@ back {
|
||||||
q {
|
q {
|
||||||
delay = 0.4,
|
delay = 0.4,
|
||||||
func = function()
|
func = function()
|
||||||
|
SMODS.calculate_effect({message = localize("ph_boss_disabled")}, card)
|
||||||
G.GAME.blind:wiggle()
|
G.GAME.blind:wiggle()
|
||||||
play_sound "timpani"
|
play_sound "timpani"
|
||||||
|
delay(0.4)
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
@ -134,7 +136,22 @@ back {
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
calculate = function(_, _, context)
|
calculate = function(_, card, context)
|
||||||
local _ = context.starting_shop and ease_dollars(-G.GAME.dollars)
|
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,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,11 @@ SMODS.Atlas {
|
||||||
atlas_table = "ANIMATION_ATLAS",
|
atlas_table = "ANIMATION_ATLAS",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SMODS.Sound {
|
||||||
|
key = "kick",
|
||||||
|
path = "kick.ogg",
|
||||||
|
}
|
||||||
|
|
||||||
local function common_rank()
|
local function common_rank()
|
||||||
local tally = {}
|
local tally = {}
|
||||||
local to_name = {}
|
local to_name = {}
|
||||||
|
|
@ -72,11 +77,11 @@ blind {
|
||||||
boss_colour = HEX "0291fb",
|
boss_colour = HEX "0291fb",
|
||||||
pronouns = "she_her",
|
pronouns = "she_her",
|
||||||
config = {draw = 5},
|
config = {draw = 5},
|
||||||
defeat = function(self)
|
defeat = function()
|
||||||
self.disabled = false
|
G.GAME.Roland_nimble_disabled = nil
|
||||||
end,
|
end,
|
||||||
disable = function(self)
|
disable = function()
|
||||||
self.disabled = true
|
G.GAME.Roland_nimble_disabled = true
|
||||||
end,
|
end,
|
||||||
drawn_to_hand = function(self)
|
drawn_to_hand = function(self)
|
||||||
local function force_hand()
|
local function force_hand()
|
||||||
|
|
@ -89,15 +94,16 @@ blind {
|
||||||
end)
|
end)
|
||||||
|
|
||||||
G.FUNCS.play_cards_from_highlighted(nil)
|
G.FUNCS.play_cards_from_highlighted(nil)
|
||||||
|
self:disable()
|
||||||
end
|
end
|
||||||
|
|
||||||
if not self.disabled then
|
if not G.GAME.Roland_nimble_disabled then
|
||||||
self.disabled = true
|
G.GAME.Roland_nimble_disabled = true
|
||||||
q {func = force_hand, blocking = false}
|
q {func = force_hand, blocking = false}
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
set_blind = function(self)
|
set_blind = function()
|
||||||
self.disabled = false
|
G.GAME.Roland_nimble_disabled = nil
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -107,6 +113,7 @@ blind {
|
||||||
boss_colour = HEX "b18480",
|
boss_colour = HEX "b18480",
|
||||||
pronouns = "he_they",
|
pronouns = "he_they",
|
||||||
disable = function()
|
disable = function()
|
||||||
|
-- Ensures that this runs after 'set_blind' since it also gets added to queue.
|
||||||
q(function()
|
q(function()
|
||||||
local count = #G.discard.cards
|
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)
|
draw_card(G.hand, G.discard, i / count * 100, "down", false, copy, nil, nil, true)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
b:wiggle()
|
||||||
b.triggered = true
|
b.triggered = true
|
||||||
playing_card_joker_effects(cards_added)
|
playing_card_joker_effects(cards_added)
|
||||||
end,
|
end,
|
||||||
|
|
@ -196,8 +204,16 @@ local orig_update = Game.update
|
||||||
function Game.update(...)
|
function Game.update(...)
|
||||||
orig_update(...)
|
orig_update(...)
|
||||||
local orig = G.GAME.probabilities
|
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
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
@ -247,7 +263,7 @@ blind {
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local needs_text_change = false
|
local needs_text_change
|
||||||
|
|
||||||
local function process(card_area)
|
local function process(card_area)
|
||||||
f(card_area.cards):foreach(function(v)
|
f(card_area.cards):foreach(function(v)
|
||||||
|
|
@ -280,12 +296,13 @@ blind {
|
||||||
boss_colour = HEX "000000",
|
boss_colour = HEX "000000",
|
||||||
pronouns = "any_all",
|
pronouns = "any_all",
|
||||||
defeat = function()
|
defeat = function()
|
||||||
G.GAME.modifiers.Roland_equinox = false
|
G.GAME.modifiers.Roland_equinox = nil
|
||||||
end,
|
end,
|
||||||
disable = function()
|
disable = function()
|
||||||
G.GAME.modifiers.Roland_equinox = false
|
G.GAME.modifiers.Roland_equinox = nil
|
||||||
end,
|
end,
|
||||||
set_blind = function()
|
set_blind = function()
|
||||||
|
play_sound("Roland_kick", 1, 0.7)
|
||||||
G.GAME.modifiers.Roland_equinox = true
|
G.GAME.modifiers.Roland_equinox = true
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -266,12 +266,18 @@ joker {
|
||||||
return {xmult = card.ability.extra.xmult}
|
return {xmult = card.ability.extra.xmult}
|
||||||
end
|
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()
|
q(function()
|
||||||
G.hand_text_area.blind_chips:juice_up()
|
G.hand_text_area.blind_chips:juice_up()
|
||||||
G.hand_text_area.game_chips:juice_up()
|
G.hand_text_area.game_chips:juice_up()
|
||||||
play_sound("tarot1")
|
|
||||||
card:start_dissolve()
|
card:start_dissolve()
|
||||||
|
play_sound("tarot1")
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
|
|
@ -297,14 +303,14 @@ joker {
|
||||||
joker {
|
joker {
|
||||||
key = "hexagon",
|
key = "hexagon",
|
||||||
pronouns = "it_its",
|
pronouns = "it_its",
|
||||||
config = {extra = {money = 6}},
|
config = {extra = {price = 6}},
|
||||||
cost = 6,
|
cost = 6,
|
||||||
rarity = 1,
|
rarity = 1,
|
||||||
eternal_compat = true,
|
eternal_compat = true,
|
||||||
blueprint_compat = true,
|
blueprint_compat = true,
|
||||||
perishable_compat = true,
|
perishable_compat = true,
|
||||||
loc_vars = function(_, _, card)
|
loc_vars = function(_, _, card)
|
||||||
return {vars = {card.ability.extra.money}}
|
return {vars = {card.ability.extra.price}}
|
||||||
end,
|
end,
|
||||||
calculate = function(_, card, context)
|
calculate = function(_, card, context)
|
||||||
if not context.joker_main or
|
if not context.joker_main or
|
||||||
|
|
@ -312,7 +318,9 @@ joker {
|
||||||
return
|
return
|
||||||
end
|
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,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -337,6 +345,7 @@ joker {
|
||||||
context.cardarea == "unscored" and
|
context.cardarea == "unscored" and
|
||||||
context.scoring_name == "Four of a Kind" then
|
context.scoring_name == "Four of a Kind" then
|
||||||
card.ability.extra.mult = card.ability.extra.mult + context.other_card.base.nominal
|
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
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
@ -350,7 +359,7 @@ joker {
|
||||||
eternal_compat = true,
|
eternal_compat = true,
|
||||||
blueprint_compat = true,
|
blueprint_compat = true,
|
||||||
perishable_compat = true,
|
perishable_compat = true,
|
||||||
calculate = function(_, _, context)
|
calculate = function(_, card, context)
|
||||||
if not context.individual or
|
if not context.individual or
|
||||||
context.cardarea ~= "unscored" or
|
context.cardarea ~= "unscored" or
|
||||||
context.scoring_name ~= "Four of a Kind" then
|
context.scoring_name ~= "Four of a Kind" then
|
||||||
|
|
@ -358,7 +367,9 @@ joker {
|
||||||
end
|
end
|
||||||
|
|
||||||
q(function()
|
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.playing_card = (G.playing_card or 0) + 1
|
||||||
G.deck.config.card_limit = G.deck.config.card_limit + 1
|
G.deck.config.card_limit = G.deck.config.card_limit + 1
|
||||||
local copy = copy_card(v, nil, nil, G.playing_card)
|
local copy = copy_card(v, nil, nil, G.playing_card)
|
||||||
|
|
@ -366,8 +377,9 @@ joker {
|
||||||
G.hand:emplace(copy)
|
G.hand:emplace(copy)
|
||||||
copy:start_materialize()
|
copy:start_materialize()
|
||||||
table.insert(G.playing_cards, copy)
|
table.insert(G.playing_cards, copy)
|
||||||
return copy
|
playing_card_joker_effects({copy})
|
||||||
end):into())
|
card:juice_up()
|
||||||
|
end)
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
@ -479,7 +491,15 @@ joker {
|
||||||
return context.joker_main and {card = card, xmult = self.xmult()} or nil
|
return context.joker_main and {card = card, xmult = self.xmult()} or nil
|
||||||
end,
|
end,
|
||||||
xmult = function()
|
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,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -507,10 +527,14 @@ joker {
|
||||||
return {numerator = extra.probability}
|
return {numerator = extra.probability}
|
||||||
end
|
end
|
||||||
|
|
||||||
if context.blind_defeated then
|
if context.end_of_round and extra.probability ~= extra.delta then
|
||||||
extra.probability = extra.delta
|
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
|
extra.probability = extra.probability + extra.delta
|
||||||
|
return {message = localize "k_upgrade_ex", colour = G.C.GREEN}
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
45
src/seal.lua
45
src/seal.lua
|
|
@ -14,6 +14,23 @@ SMODS.Seal {
|
||||||
badge_colour = HEX "a6a6a6",
|
badge_colour = HEX "a6a6a6",
|
||||||
pronouns = "he_him",
|
pronouns = "he_him",
|
||||||
calculate = function(_, card, context)
|
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
|
if context.setting_blind or context.starting_shop then
|
||||||
card.Roland_glass = nil
|
card.Roland_glass = nil
|
||||||
end
|
end
|
||||||
|
|
@ -22,30 +39,18 @@ SMODS.Seal {
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
if G.STATE == G.STATES.DRAW_TO_HAND and card == context.other_card then
|
if context.hand_drawn and f(context.hand_drawn):any(function(v)
|
||||||
card.Roland_glass = true
|
return v == card
|
||||||
|
end) then
|
||||||
return q(function()
|
q(function()
|
||||||
card:shatter()
|
card:shatter()
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
SMODS.calculate_context({remove_playing_cards = true, removed = {card}})
|
||||||
end
|
end
|
||||||
|
|
||||||
if not context.ante_end then
|
if context.ante_end then
|
||||||
return
|
proc()
|
||||||
end
|
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,
|
end,
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,6 @@ local spectral = (function()
|
||||||
end
|
end
|
||||||
end)()
|
end)()
|
||||||
|
|
||||||
SMODS.Sound {
|
|
||||||
key = "void",
|
|
||||||
path = "void.ogg",
|
|
||||||
}
|
|
||||||
|
|
||||||
SMODS.Atlas {
|
SMODS.Atlas {
|
||||||
px = 71,
|
px = 71,
|
||||||
py = 95,
|
py = 95,
|
||||||
|
|
@ -26,6 +21,11 @@ SMODS.Atlas {
|
||||||
path = "spectral.png",
|
path = "spectral.png",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SMODS.Sound {
|
||||||
|
key = "void",
|
||||||
|
path = "void.ogg",
|
||||||
|
}
|
||||||
|
|
||||||
spectral {
|
spectral {
|
||||||
key = "afterimage",
|
key = "afterimage",
|
||||||
pronouns = "he_they",
|
pronouns = "he_they",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue