Skip to content

Commit d0ec5b0

Browse files
authored
Merge pull request #276 from Toneblock/main
legacy small world, oracle deck, voucher desync fix
2 parents d27f640 + 80c6f85 commit d0ec5b0

File tree

12 files changed

+98
-89
lines changed

12 files changed

+98
-89
lines changed

assets/1x/decks.png

4.65 KB
Loading

assets/2x/decks.png

6.23 KB
Loading

compatibility/TheOrder.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,6 @@ function get_next_voucher_key(_from_tag)
268268
it = it + 1
269269
center = pseudorandom_element(culled, pseudoseed("Voucher0"))
270270
end
271-
272271
return center
273272
end
274273
return nextvoucherkey(_from_tag)

core.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ function MP.reset_lobby_config(persist_ruleset_and_gamemode)
119119
timer_forgiveness = 0,
120120
forced_config = false,
121121
preview_disabled = false,
122+
legacy_smallworld = false,
122123
}
123124
end
124125
MP.reset_lobby_config()

localization/en-us.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -205,14 +205,13 @@ return {
205205
"{C:attention}2{} copies of {C:tarot,T:c_hanged_man}The Hanged Man",
206206
},
207207
},
208-
b_mp_sibyl = {
209-
name = "Sibyl Deck",
208+
b_mp_oracle = {
209+
name = "Oracle Deck",
210210
text = {
211-
"{C:planet}Planets{}, {C:attention}playing cards{}, and",
212-
"{C:spectral}Spectral Packs{} will not appear",
213211
"Start run with {C:spectral,T:c_medium}Medium",
214-
"The only {C:spectral}Spectral{} card",
215-
"is {C:spectral,T:c_medium}Medium",
212+
"and {C:attention,T:v_clearance_sale}Clearance Sale",
213+
"Balance is capped",
214+
"at {C:money}$50",
216215
},
217216
},
218217
b_mp_violet = {
@@ -288,6 +287,7 @@ return {
288287
b_opts_timer = "Enable Timer",
289288
b_opts_disable_preview = "Disable Score Preview",
290289
b_opts_the_order = "Enable The Order",
290+
b_opts_legacy_smallworld = "Legacy Small World mechanics",
291291
b_reset = "Reset",
292292
b_set_custom_seed = "Set Custom Seed",
293293
b_mp_kofi_button = "Supporting me on Ko-fi",

localization/it.lua

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,8 @@ return {
7979
text = {
8080
"Quando la tua {X:purple,C:white}Nemesi{} vende",
8181
"una carta, guadagna {C:mult}+#1#{} Molt.",
82-
"Si aggiorna quando viene","selezionato il {C:attention}Buio PvP",
82+
"Si aggiorna quando viene",
83+
"selezionato il {C:attention}Buio PvP",
8384
"{C:inactive}(Attualmente {C:mult}+#2#{C:inactive} Molt)",
8485
},
8586
},
@@ -124,7 +125,7 @@ return {
124125
"tuo {C:attention}mazzo completo {C:inactive}(massimo {C:money}$4{}{C:inactive})",
125126
"poi {C:money}$#1#{} per ogni {C:attention}9",
126127
"in più alla fine del round",
127-
"{C:inactive}(Attualmente {C:money}$#2#{C:inactive})", --linea in più
128+
"{C:inactive}(Attualmente {C:money}$#2#{C:inactive})", --linea in più
128129
},
129130
},
130131
j_mp_bloodstone = {
@@ -290,7 +291,7 @@ return {
290291
b_opts_normal_bosses = "Attiva l'effetto del buio Boss nei round PvP",
291292
b_opts_timer = "Abilita Timer",
292293
b_opts_disable_preview = "Disabilita l'anteprima del punteggio",
293-
b_opts_the_order = "Abilita il Jolly \"L'ordine\"",
294+
b_opts_the_order = 'Abilita il Jolly "L\'ordine"',
294295
b_reset = "Reset",
295296
b_set_custom_seed = "Imposta seed specifico",
296297
b_mp_kofi_button = "supporta il creatore su Ko-fi",
@@ -300,7 +301,7 @@ return {
300301
b_players = "Giocatori",
301302
b_lobby_info = "Info Lobby",
302303
b_continue_singleplayer = "Continua in Giocatore singolo",
303-
b_the_order_integration = "Abilita il Jolly \"L'ordine\"",
304+
b_the_order_integration = 'Abilita il Jolly "L\'ordine"',
304305
b_preview_integration = "Abilita l'anteprima del punteggio",
305306
b_view_nemesis_deck = "Guarda mazzo",
306307
b_toggle_jokers = "Mostra Jolly Nemesi",
@@ -343,7 +344,7 @@ return {
343344
k_set_name = "Imposta il tuo nome utente nel menu principale! (Mods > Multiplayer > Configurazione)",
344345
k_mod_hash_warning = "I giocatori hanno mod diverse o versioni di mod diverse! Questo può causare errori!",
345346
k_steamodded_warning = "I giocatori hanno diverse versioni di Steamodded installate. Questo può causare ai semi di cambiare.",
346-
k_warning_unlock_profile = "ATTENZIONE! Stai giocando con un profilo non totalmente sbloccato!\nSe questa partita è classificata/torneo, per favore crea un nuovo profilo e premi \"Sblocca tutto\" nelle impostazioni del profilo",
347+
k_warning_unlock_profile = 'ATTENZIONE! Stai giocando con un profilo non totalmente sbloccato!\nSe questa partita è classificata/torneo, per favore crea un nuovo profilo e premi "Sblocca tutto" nelle impostazioni del profilo',
347348
k_warning_nemesis_unlock = "ATTENZIONE! Il tuo avversario sta giocando con un profilo non totalmente sbloccato!\nPer favore se questa partita è classificata/torneo AVVISALO ADESSO!",
348349
k_warning_no_order = "Un giocatore ha l'opzione (Abilita il Jolly \"L'ordine\") abilitata, mentre l'altro no. Questo renderà i vostri seed diversi.",
349350
k_warning_cheating1 = "È probabile che il tuo avversario stia barando.",
@@ -382,9 +383,9 @@ return {
382383
k_vanilla = "Vanilla",
383384
k_vanilla_description = "Le regole vanilla rimuovono tutto il contenuto Multigiocatore,\npermettendoti di giocare il gioco com'era originariamente pensato.\n\nQueste regole includono alcune modifiche Multigiocatore\ncome il timer che può essere disabilitato nelle opzioni della Lobby",
384385
k_blitz = "Blitz",
385-
k_blitz_description = "Le regole Blitz includono carte e caratteristiche che incitano ad \nusare il tempo come una risorsa.\n\nAlcune carte sono bilanciate per adattarle al Multigiocatore:\n- \"Scheda non valida\" è modificata\n- \"Giustizia\" è rimossa\n- Le \"Carte di vetro\" sono modificate\n\n(Guarda la scheda dei ban e delle aggiunte/modifiche per più info)",
386+
k_blitz_description = 'Le regole Blitz includono carte e caratteristiche che incitano ad \nusare il tempo come una risorsa.\n\nAlcune carte sono bilanciate per adattarle al Multigiocatore:\n- "Scheda non valida" è modificata\n- "Giustizia" è rimossa\n- Le "Carte di vetro" sono modificate\n\n(Guarda la scheda dei ban e delle aggiunte/modifiche per più info)',
386387
k_traditional = "Tradizionale",
387-
k_traditional_description = "Le regole tradizionali rimuovono le carte del Multigiocatore\nche trattano il tempo come una risorsa,\npermettendoti un gioco ancora più metodico.\n\nAlcune carte sono bilanciate per adattarle al Multigiocatore:\n- \"Scheda non valida\" è modificata\n- \"Giustizia\" è rimossa\n- Le \"Carte di vetro\" sono modificate\n\n(Guarda la scheda dei ban e delle aggiunte/modifiche per più info)",
388+
k_traditional_description = 'Le regole tradizionali rimuovono le carte del Multigiocatore\nche trattano il tempo come una risorsa,\npermettendoti un gioco ancora più metodico.\n\nAlcune carte sono bilanciate per adattarle al Multigiocatore:\n- "Scheda non valida" è modificata\n- "Giustizia" è rimossa\n- Le "Carte di vetro" sono modificate\n\n(Guarda la scheda dei ban e delle aggiunte/modifiche per più info)',
388389
k_majorleague = "Lega Maggiore",
389390
k_majorleague_description = "Queste sono le regole ufficiali per la Lega Maggiore di\nBalatro Multigiocatore.\n\nQueste regole sono identiche a quelle Vanilla con alcune eccezioni:\n- L'opzione (Abilita il Jolly \"L'ordine\") è disabilitata\n- Il timer è impostato su 180 secondi\n- La prima volta che il timer arriva a 0 non perderai una vita",
390391
k_minorleague = "Lega Minore",
@@ -424,8 +425,8 @@ return {
424425
k_sync_locally = "Sincronizza localmente (riavvia il gioco)",
425426
k_bans = "Ban",
426427
k_reworks = "Aggiunte/Modifiche",
427-
k_ruleset_disabled_the_order_required = "\"L'ordine\" è necessario",
428-
k_ruleset_disabled_the_order_banned = "\"L'ordine\" è bandito",
428+
k_ruleset_disabled_the_order_required = '"L\'ordine" è necessario',
429+
k_ruleset_disabled_the_order_banned = '"L\'ordine" è bandito',
429430
k_ruleset_not_found = "Regole sconosciute",
430431
k_tutorial_not_complete = "Devi completare il tutorial prima di poter giocare il Multigiocatore",
431432
k_created_by = "Creato da",
@@ -457,9 +458,9 @@ return {
457458
k_ruleset_disabled_smods_version = "Versione SMODS #1# necessaria",
458459
k_failed_to_join_lobby = "Errore nel connettersi alla lobby: #1#",
459460
k_ante_number = "Ante #1#",
460-
k_ante_range = "Ante #1#-#2#", --Per esempio, "Ante 1-2"
461-
k_ante_min = "Ante #1#+", --Per esempio, "Ante 2+"
462-
k_credits_list = "#1# e altri ancora!", --#1# viene rimpiazzato con una lista di nomi
461+
k_ante_range = "Ante #1#-#2#", --Per esempio, "Ante 1-2"
462+
k_ante_min = "Ante #1#+", --Per esempio, "Ante 2+"
463+
k_credits_list = "#1# e altri ancora!", --#1# viene rimpiazzato con una lista di nomi
463464
},
464465
v_text = {
465466
ch_c_hanging_chad_rework = { "{C:attention}Scheda non valida{} è {C:dark_edition}modificata" },

lovely/misc.toml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ match_indent = true
100100
target = "back.lua"
101101
pattern = '''local card = create_card('Tarot', G.consumeables, nil, nil, nil, nil, v, 'deck')'''
102102
position = "at"
103-
payload = '''local card = create_card(G.P_CENTERS[v].set, G.consumeables, nil, nil, nil, nil, v, 'deck')'''
103+
payload = '''local card = create_card(MP.legacy_smallworld() and 'Tarot' or G.P_CENTERS[v].set, G.consumeables, nil, nil, nil, nil, v, 'deck')'''
104104
match_indent = true
105105

106106
# STEAMODDED BUG - fix seeing double
@@ -147,4 +147,16 @@ for i = 1, #hand do
147147
end
148148
end
149149
end'''
150+
match_indent = true
151+
152+
# i was the one who pred this line, i guess it became a problem
153+
[[patches]]
154+
[patches.pattern]
155+
target = "functions/misc_functions.lua"
156+
pattern = '''if G.SETTINGS.paused and key ~= 'to_do' then return math.random() end'''
157+
position = "at"
158+
payload = '''
159+
-- disabled by Multiplayer because of voucher rng calls while paused
160+
-- if G.SETTINGS.paused and key ~= 'to_do' then return math.random() end
161+
'''
150162
match_indent = true

objects/decks/AA_oracle.lua

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
SMODS.Back({
2+
key = "oracle",
3+
config = { vouchers = { "v_clearance_sale" }, consumables = { "c_medium" } },
4+
atlas = "mp_decks",
5+
pos = { x = 1, y = 1 },
6+
apply = function(self)
7+
G.GAME.modifiers.oracle_max = 50
8+
end,
9+
})
10+
11+
-- billionth create card hook ever
12+
local ease_dollars_ref = ease_dollars
13+
function ease_dollars(mod, instant)
14+
if G.GAME.modifiers.oracle_max then
15+
local lmod = (G.GAME.dollar_buffer or 0) > 0 and mod or 0 -- this whole thing is really uncomfortable but seems to work
16+
local dollars = G.GAME.dollars + ((G.GAME.dollar_buffer or 0) - lmod)
17+
if mod >= 0 and dollars >= G.GAME.modifiers.oracle_max then -- recreate the function for max anim
18+
local function _mod()
19+
local dollar_UI = G.HUD:get_UIE_by_ID("dollar_text_UI")
20+
dollar_UI.config.object:update()
21+
G.HUD:recalculate()
22+
attention_text({
23+
text = "MAX",
24+
scale = 0.8,
25+
hold = 0.7,
26+
cover = dollar_UI.parent,
27+
cover_colour = G.C.RED,
28+
align = "cm",
29+
})
30+
play_sound("timpani", 0.9, 0.7) -- timpani spam makes good sfx
31+
play_sound("timpani", 1.2, 0.7)
32+
end
33+
if instant then
34+
_mod()
35+
else
36+
G.E_MANAGER:add_event(Event({
37+
trigger = "immediate",
38+
func = function()
39+
_mod()
40+
return true
41+
end,
42+
}))
43+
end
44+
return
45+
else
46+
mod = math.min(mod, G.GAME.modifiers.oracle_max - dollars)
47+
end
48+
end
49+
return ease_dollars_ref(mod, instant)
50+
end

objects/decks/AA_sibyl.lua

Lines changed: 0 additions & 61 deletions
This file was deleted.

objects/decks/BB_gradient.lua

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -114,11 +114,7 @@ end
114114
local calculate_joker_ref = Card.calculate_joker
115115
function Card:calculate_joker(context)
116116
if not context.blueprint then -- very important because bloopy recursively calls this
117-
if
118-
G.GAME.modifiers.mp_gradient
119-
and (context.other_card or passkey(self))
120-
and not blacklist(self)
121-
then
117+
if G.GAME.modifiers.mp_gradient and (context.other_card or passkey(self)) and not blacklist(self) then
122118
for i = 1, 3 do
123119
G.MP_GRADIENT = -i + 2
124120
for i, card in ipairs(G.playing_cards) do -- it's actually insane that this doesn't blow up the game??? this is being run thousands of times wastefully

0 commit comments

Comments
 (0)