Add void card
This commit is contained in:
parent
0aaa6cc74e
commit
db57347fc0
15 changed files with 107 additions and 23 deletions
6
.vscode/settings.json
vendored
Normal file
6
.vscode/settings.json
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"Lua.diagnostics.globals": [
|
||||||
|
"Jen",
|
||||||
|
"Jane"
|
||||||
|
]
|
||||||
|
}
|
||||||
BIN
assets/1x/Void.png
Normal file
BIN
assets/1x/Void.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 10 KiB |
BIN
assets/2x/Void.png
Normal file
BIN
assets/2x/Void.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 13 KiB |
BIN
assets/sounds/void.ogg
Normal file
BIN
assets/sounds/void.ogg
Normal file
Binary file not shown.
|
|
@ -1,7 +1,7 @@
|
||||||
return {
|
return {
|
||||||
descriptions = {
|
descriptions = {
|
||||||
Joker = {
|
Joker = {
|
||||||
j_Roland_Escapey = {
|
j_Roland_escapey = {
|
||||||
name = "Escapey",
|
name = "Escapey",
|
||||||
text = {
|
text = {
|
||||||
"Destroy {C:attention}tags{} and {C:attention}non-selected",
|
"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 = {
|
misc = {
|
||||||
challenge_names = {
|
challenge_names = {
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,15 @@
|
||||||
{
|
{
|
||||||
"priority": 0,
|
"priority": -2,
|
||||||
"id": "Roland",
|
"id": "Roland",
|
||||||
"name": "Roland",
|
"name": "Roland",
|
||||||
"prefix": "Roland",
|
"prefix": "Roland",
|
||||||
"author": ["Emik"],
|
"author": ["Emik"],
|
||||||
"version": "0.1.1",
|
"version": "1.0.0",
|
||||||
"badge_colour": "8BE9FD",
|
"badge_colour": "8BE9FD",
|
||||||
"main_file": "src/main.lua",
|
"main_file": "src/main.lua",
|
||||||
"badge_text_colour": "44475A",
|
"badge_text_colour": "44475A",
|
||||||
"display_name": "Roland (Emik)",
|
"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": [],
|
"provides": [],
|
||||||
"conflicts": [],
|
"conflicts": [],
|
||||||
"dependencies": [
|
"dependencies": [
|
||||||
|
|
|
||||||
1
refs/BalatroBakery
Symbolic link
1
refs/BalatroBakery
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
../../BalatroBakery/src/
|
||||||
1
refs/Cryptid
Symbolic link
1
refs/Cryptid
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
../../Cryptid/
|
||||||
1
refs/Talisman
Symbolic link
1
refs/Talisman
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
../../Talisman/
|
||||||
1
refs/dump
Symbolic link
1
refs/dump
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
../../lovely/dump/
|
||||||
1
refs/lsp_def
Symbolic link
1
refs/lsp_def
Symbolic link
|
|
@ -0,0 +1 @@
|
||||||
|
../../smods/lsp_def/
|
||||||
|
|
@ -7,20 +7,23 @@ SMODS.Challenge {
|
||||||
restrictions = jokerful
|
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 {
|
SMODS.Challenge {
|
||||||
key = "Ascension",
|
key = "Ascension",
|
||||||
deck = {type = "b_jen_nitro"},
|
deck = {type = deck},
|
||||||
rules = {custom = {{id = "Roland_Saint"}, {id = "Roland_Accelerated"}}},
|
rules = {custom = {{id = "Roland_Saint"}, {id = "Roland_Accelerated"}}},
|
||||||
jokers = {{id = "j_jen_saint", eternal = true}},
|
jokers = {{id = card, eternal = true}},
|
||||||
}
|
}
|
||||||
|
|
||||||
SMODS.Challenge {
|
SMODS.Challenge {
|
||||||
key = "Soaring",
|
key = "Soaring",
|
||||||
deck = {type = "b_jen_nitro"},
|
deck = {type = deck},
|
||||||
sleeve = "sleeve_cry_equilibrium_sleeve",
|
sleeve = "sleeve_cry_equilibrium_sleeve",
|
||||||
rules = {custom = {{id = "Roland_Saint"}, {id = "Roland_Accelerated"}}},
|
rules = {custom = {{id = "Roland_Saint"}, {id = "Roland_Accelerated"}}},
|
||||||
jokers = {{id = "j_jen_saint", eternal = true}},
|
jokers = {{id = card, eternal = true}},
|
||||||
}
|
}
|
||||||
|
|
||||||
SMODS.Challenge {
|
SMODS.Challenge {
|
||||||
|
|
|
||||||
|
|
@ -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()
|
local function common_hand()
|
||||||
return (G.GAME or {}).current_round and F.reduce(
|
return (G.GAME or {}).current_round and F.reduce(
|
||||||
G.GAME.hands,
|
G.GAME.hands,
|
||||||
|
|
@ -24,23 +32,21 @@ local function is_mergeable_with(it)
|
||||||
end
|
end
|
||||||
|
|
||||||
SMODS.Atlas {
|
SMODS.Atlas {
|
||||||
key = "Escapey",
|
|
||||||
path = "Escapey.png",
|
|
||||||
px = 71,
|
px = 71,
|
||||||
py = 95
|
py = 95,
|
||||||
|
key = "escapey",
|
||||||
|
path = "escapey.png",
|
||||||
}
|
}
|
||||||
|
|
||||||
SMODS.Joker {
|
SMODS.Joker {
|
||||||
key = "Escapey",
|
key = "escapey",
|
||||||
atlas = "Escapey",
|
atlas = "escapey",
|
||||||
pos = {x = 0, y = 0},
|
pos = {x = 0, y = 0},
|
||||||
sinis = {x = 2, y = 0},
|
sinis = {x = 2, y = 0},
|
||||||
soul_pos = {x = 1, y = 0},
|
soul_pos = {x = 1, y = 0},
|
||||||
config = {extra = {level_up_by = 1}},
|
config = {extra = {level_up_by = 1}},
|
||||||
cost = 8,
|
cost = 8,
|
||||||
rarity = 3,
|
rarity = 3,
|
||||||
unlocked = true,
|
|
||||||
discovered = true,
|
|
||||||
eternal_compat = true,
|
eternal_compat = true,
|
||||||
perishable_compat = true,
|
perishable_compat = true,
|
||||||
blueprint_compat = false,
|
blueprint_compat = false,
|
||||||
|
|
@ -65,7 +71,7 @@ SMODS.Joker {
|
||||||
}}
|
}}
|
||||||
end,
|
end,
|
||||||
Bakery_can_use = function(_, card)
|
Bakery_can_use = function(_, card)
|
||||||
return not card.debuff and (
|
return not card.debuff and can_use() and (
|
||||||
#G.GAME.tags ~= 0 or
|
#G.GAME.tags ~= 0 or
|
||||||
F.any(G.consumeables.cards, destructible) or
|
F.any(G.consumeables.cards, destructible) or
|
||||||
F.any(F.filter(G.jokers.cards, is_mergeable_with(card)))
|
F.any(F.filter(G.jokers.cards, is_mergeable_with(card)))
|
||||||
|
|
@ -129,14 +135,13 @@ SMODS.Joker {
|
||||||
end
|
end
|
||||||
|
|
||||||
if hand == "all" or hand == "allhands" or hand == "all_hands" then
|
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
|
elseif G.GAME.hands[hand or "NO_HAND_SPECIFIED"] then
|
||||||
update(
|
update(
|
||||||
localize(hand, "poker_hands"),
|
localize(hand, "poker_hands"),
|
||||||
G.GAME.hands[hand].chips,
|
G.GAME.hands[hand].chips,
|
||||||
G.GAME.hands[hand].mult,
|
G.GAME.hands[hand].mult,
|
||||||
G.GAME.hands[hand].level,
|
G.GAME.hands[hand].level
|
||||||
notify
|
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
assert(SMODS.load_file("src/LuaFunctional/functional.lua"))()
|
assert(SMODS.load_file("src/LuaFunctional/functional.lua"))()
|
||||||
assert(SMODS.load_file("src/challenge.lua"))()
|
assert(SMODS.load_file("src/challenge.lua"))()
|
||||||
|
assert(SMODS.load_file("src/spectral.lua"))()
|
||||||
assert(SMODS.load_file("src/joker.lua"))()
|
assert(SMODS.load_file("src/joker.lua"))()
|
||||||
|
|
||||||
SMODS.Atlas {
|
SMODS.Atlas {
|
||||||
path = "Icon.png",
|
|
||||||
key = "modicon",
|
|
||||||
px = 256,
|
px = 256,
|
||||||
py = 256,
|
py = 256,
|
||||||
|
key = "modicon",
|
||||||
|
path = "icon.png",
|
||||||
}
|
}
|
||||||
|
|
|
||||||
55
src/spectral.lua
Normal file
55
src/spectral.lua
Normal 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
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue