Add new blind: The Nimble

This commit is contained in:
Emik 2025-03-25 15:47:59 +01:00
parent 570de2f0cd
commit 4ca5c81801
Signed by untrusted user who does not match committer: emik
GPG key ID: 09CDFF9E5703688D
21 changed files with 90 additions and 31 deletions

Binary file not shown.

BIN
assets/1x/blind.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

View file

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

View file

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 67 KiB

View file

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 181 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

BIN
assets/2x/blind.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
assets/2x/escapey.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

BIN
assets/2x/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

BIN
assets/2x/void.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

1
assets/upscale.bat Normal file
View file

@ -0,0 +1 @@
for /F %%x in ('dir /B/D 1x') do magick 1x\%%x -scale 200%% 2x\%%x

6
assets/upscale.sh Executable file
View file

@ -0,0 +1,6 @@
#!/bin/sh
for file in 1x/*.png; do
filename=$(basename "$file")
output_file="2x/${filename}"
magick "$file" -filter point -resize 200% "$output_file"
done

View file

@ -1,5 +1,14 @@
return {
descriptions = {
Blind = {
bl_Roland_nimble = {
name = "The Nimble",
text = {
"The first {C:attention}5 cards",
"drawn are {C:attention}played",
}
},
},
Joker = {
j_Roland_escapey = {
name = "Escapey",

View file

@ -4,7 +4,7 @@
"name": "Roland",
"prefix": "Roland",
"author": ["Emik"],
"version": "1.0.2",
"version": "1.1.0",
"badge_colour": "8BE9FD",
"main_file": "src/main.lua",
"badge_text_colour": "44475A",

40
src/blind.lua Normal file
View file

@ -0,0 +1,40 @@
SMODS.Atlas {
px = 34,
py = 34,
frames = 21,
key = "blind",
path = "blind.png",
atlas_table = "ANIMATION_ATLAS",
}
SMODS.Blind {
key = "nimble",
boss = {min = 1, max = 10, no_orb = true, hardcore = true},
boss_colour = HEX("8be9fd"),
atlas = "blind",
pos = {x = 0, y = 0},
mult = 2,
dollars = 5,
disable = function(self)
self.disabled = true
end,
drawn_to_hand = function(self)
local function force_hand()
for i, v in ipairs(G.hand.cards) do
if i > 5 then
break
end
G.hand:add_to_highlighted(v, true)
end
G.FUNCS.play_cards_from_highlighted(nil)
return true
end
if not self.disabled then
self.disabled = true
G.E_MANAGER:add_event(Event({func = force_hand}))
end
end,
}

View file

@ -54,8 +54,8 @@ SMODS.Joker {
local loc_self = G.localization.descriptions.Joker.j_Roland_escapey
local quotes = loc_self.quotes
local merge = G.jokers and F.count(F.filter(G.jokers.cards, is_mergeable_with(card))) > 1 and loc_self.merge or {}
local normal = (merge[1] or (Jen or Jane or {}).sinister) and {} or pseudorandom_element(quotes.normal, pseudoseed("EscapeyQuotes"))
local scared = (merge[1] or not (Jen or Jane or {}).sinister) and {} or pseudorandom_element(quotes.scared, pseudoseed("EscapeyQuotes"))
local normal = (merge[1] or (Jen or Jane or {}).sinister) and {} or pseudorandom_element(quotes.normal, pseudoseed("EscapeyQuotes")) or {}
local scared = (merge[1] or not (Jen or Jane or {}).sinister) and {} or pseudorandom_element(quotes.scared, pseudoseed("EscapeyQuotes")) or {}
return {vars = {
card.ability.extra.level_up_by,

View file

@ -1,6 +1,7 @@
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/blind.lua"))()
assert(SMODS.load_file("src/joker.lua"))()
SMODS.Atlas {

View file

@ -1,4 +1,4 @@
SMODS.Sound({key = 'void', path = 'void.ogg'})
SMODS.Sound({key = "void", path = "void.ogg"})
local function can_use()
return not ((G.play and #G.play.cards > 0 or
@ -10,22 +10,22 @@ local function can_use()
end
SMODS.Atlas {
px = 71,
py = 95,
key = "void",
path = "void.png"
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(_, _, _, _)
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 destructible(v)
return not v.ability or not (v.ability.eternal or v.ability.cry_absolute)
end
@ -39,23 +39,25 @@ SMODS.Consumable {
v:start_dissolve()
end
local function void()
local cards = F.filter(G.playing_cards, destructible)
local function calculate_joker(v)
v:calculate_joker({remove_playing_cards = true, removed = cards})
end
F.foreach(cards, destroy)
F.foreach(G.jokers.cards, calculate_joker)
return true
end
play_sound("Roland_void", 1, 0.7)
G.E_MANAGER:add_event(Event({
delay = 0.27,
timer = 'REAL',
trigger = 'after',
func = function()
local cards = F.filter(G.playing_cards, destructible)
local function calculate_joker(v)
v:calculate_joker({remove_playing_cards = true, removed = cards})
end
F.foreach(cards, destroy)
F.foreach(G.jokers.cards, calculate_joker)
return true
end
timer = "REAL",
trigger = "after",
func = void
}))
end
end
}