Add void card

This commit is contained in:
Emik 2025-03-21 02:22:00 +01:00
parent 0aaa6cc74e
commit db57347fc0
Signed by untrusted user who does not match committer: emik
GPG key ID: 09CDFF9E5703688D
15 changed files with 107 additions and 23 deletions

6
.vscode/settings.json vendored Normal file
View file

@ -0,0 +1,6 @@
{
"Lua.diagnostics.globals": [
"Jen",
"Jane"
]
}

BIN
assets/1x/Void.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

BIN
assets/2x/Void.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
assets/sounds/void.ogg Normal file

Binary file not shown.

View file

@ -1,7 +1,7 @@
return {
descriptions = {
Joker = {
j_Roland_Escapey = {
j_Roland_escapey = {
name = "Escapey",
text = {
"Destroy {C:attention}tags{} and {C:attention}non-selected",
@ -33,6 +33,15 @@ return {
},
}
},
Spectral = {
c_Roland_void = {
name = "Void",
text = {
"{C:red}Destroys {C:attention}all {}owned",
"{C:attention}playing cards",
}
}
}
},
misc = {
challenge_names = {

View file

@ -1,15 +1,15 @@
{
"priority": 0,
"priority": -2,
"id": "Roland",
"name": "Roland",
"prefix": "Roland",
"author": ["Emik"],
"version": "0.1.1",
"version": "1.0.0",
"badge_colour": "8BE9FD",
"main_file": "src/main.lua",
"badge_text_colour": "44475A",
"display_name": "Roland (Emik)",
"description": "Adds the most important joker, as well as a handful of challenges.",
"description": "Adds the most important joker, a wild spectral, and a small handful of challenges.",
"provides": [],
"conflicts": [],
"dependencies": [

1
refs/BalatroBakery Symbolic link
View file

@ -0,0 +1 @@
../../BalatroBakery/src/

1
refs/Cryptid Symbolic link
View file

@ -0,0 +1 @@
../../Cryptid/

1
refs/Talisman Symbolic link
View file

@ -0,0 +1 @@
../../Talisman/

1
refs/dump Symbolic link
View file

@ -0,0 +1 @@
../../lovely/dump/

1
refs/lsp_def Symbolic link
View file

@ -0,0 +1 @@
../../smods/lsp_def/

View file

@ -7,20 +7,23 @@ SMODS.Challenge {
restrictions = jokerful
}
if Jen then
if Jen or Jane then
local deck = Jen and "b_jen_nitro" or "b_jane_nitro"
local card = Jen and "j_jen_saint" or "b_jane_nitro"
SMODS.Challenge {
key = "Ascension",
deck = {type = "b_jen_nitro"},
deck = {type = deck},
rules = {custom = {{id = "Roland_Saint"}, {id = "Roland_Accelerated"}}},
jokers = {{id = "j_jen_saint", eternal = true}},
jokers = {{id = card, eternal = true}},
}
SMODS.Challenge {
key = "Soaring",
deck = {type = "b_jen_nitro"},
deck = {type = deck},
sleeve = "sleeve_cry_equilibrium_sleeve",
rules = {custom = {{id = "Roland_Saint"}, {id = "Roland_Accelerated"}}},
jokers = {{id = "j_jen_saint", eternal = true}},
jokers = {{id = card, eternal = true}},
}
SMODS.Challenge {

View file

@ -1,4 +1,12 @@
---@diagnostic disable: missing-parameter
local function can_use()
return not ((G.play and #G.play.cards > 0 or
G.CONTROLLER.locked or
(G.GAME.STOP_USE and G.GAME.STOP_USE > 0)) and
G.STATE ~= G.STATES.HAND_PLAYED and
G.STATE ~= G.STATES.DRAW_TO_HAND and
G.STATE ~= G.STATES.PLAY_TAROT)
end
local function common_hand()
return (G.GAME or {}).current_round and F.reduce(
G.GAME.hands,
@ -24,23 +32,21 @@ local function is_mergeable_with(it)
end
SMODS.Atlas {
key = "Escapey",
path = "Escapey.png",
px = 71,
py = 95
py = 95,
key = "escapey",
path = "escapey.png",
}
SMODS.Joker {
key = "Escapey",
atlas = "Escapey",
key = "escapey",
atlas = "escapey",
pos = {x = 0, y = 0},
sinis = {x = 2, y = 0},
soul_pos = {x = 1, y = 0},
config = {extra = {level_up_by = 1}},
cost = 8,
rarity = 3,
unlocked = true,
discovered = true,
eternal_compat = true,
perishable_compat = true,
blueprint_compat = false,
@ -65,7 +71,7 @@ SMODS.Joker {
}}
end,
Bakery_can_use = function(_, card)
return not card.debuff and (
return not card.debuff and can_use() and (
#G.GAME.tags ~= 0 or
F.any(G.consumeables.cards, destructible) or
F.any(F.filter(G.jokers.cards, is_mergeable_with(card)))
@ -129,14 +135,13 @@ SMODS.Joker {
end
if hand == "all" or hand == "allhands" or hand == "all_hands" then
update(localize("k_all_hands"), "...", "...", "", notify)
update(localize("k_all_hands"), "...", "...", "")
elseif G.GAME.hands[hand or "NO_HAND_SPECIFIED"] then
update(
localize(hand, "poker_hands"),
G.GAME.hands[hand].chips,
G.GAME.hands[hand].mult,
G.GAME.hands[hand].level,
notify
G.GAME.hands[hand].level
)
end

View file

@ -1,10 +1,11 @@
assert(SMODS.load_file("src/LuaFunctional/functional.lua"))()
assert(SMODS.load_file("src/challenge.lua"))()
assert(SMODS.load_file("src/spectral.lua"))()
assert(SMODS.load_file("src/joker.lua"))()
SMODS.Atlas {
path = "Icon.png",
key = "modicon",
px = 256,
py = 256,
key = "modicon",
path = "icon.png",
}

55
src/spectral.lua Normal file
View file

@ -0,0 +1,55 @@
SMODS.Sound({key = 'void', path = 'void.ogg'})
local function can_use()
return not ((G.play and #G.play.cards > 0 or
G.CONTROLLER.locked or
(G.GAME.STOP_USE and G.GAME.STOP_USE > 0)) and
G.STATE ~= G.STATES.HAND_PLAYED and
G.STATE ~= G.STATES.DRAW_TO_HAND and
G.STATE ~= G.STATES.PLAY_TAROT)
end
SMODS.Atlas {
px = 71,
py = 95,
key = "void",
path = "void.png"
}
SMODS.Consumable {
key = "void",
set = "Spectral",
pos = {x = 0, y = 0},
cost = 6,
atlas = "void",
can_use = function(_, _)
return #G.playing_cards > 1 and can_use()
end,
use = function(_, _, _, _)
local function calculate_joker(v)
v:calculate_joker({remove_playing_cards = true, removed = G.playing_cards})
end
local function destroy(v)
if v.area then
v.area:remove_card(v)
end
v.rhm = false
v:start_dissolve()
end
play_sound("Roland_void", 1, 0.7)
G.E_MANAGER:add_event(Event({
delay = 0.27,
timer = 'REAL',
trigger = 'after',
func = function()
F.foreach(G.playing_cards, destroy)
F.foreach(G.jokers.cards, calculate_joker)
return true
end
}))
end
}