Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ArtBox.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"main_file": "ArtBox.lua",
"priority": 0,
"badge_colour": "14b3ad",
"version": "0.5.0",
"version": "0.7.0",
"dependencies": [
"Steamodded (>=1.0.0~BETA-0808a)"
"Steamodded (>=1.0.0~BETA-0827c)"
]
}
195 changes: 137 additions & 58 deletions ArtBox.lua

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion artsandcrafts/art_art_block.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SMODS.Consumable ({
cost = 4,
unlocked = true,
discovered = true,
config = {mod_conv = "m_artb_stained", max_highlighted = 2},
config = {mod_conv = "m_artb_stained", max_highlighted = 1},
effect = 'Enhance',
loc_vars = function(self, info_queue)
info_queue[#info_queue + 1] = G.P_CENTERS[self.config.mod_conv]
Expand Down
53 changes: 53 additions & 0 deletions artsandcrafts/art_mystery_box.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
SMODS.Consumable({
object_type = "Consumable",
atlas = 'arts_atlas',
key = 'art_mystery_box',
set = 'art',
name = 'Mystery Box',
pos = { x = 2, y = 2 },
cost = 4,
unlocked = true,
discovered = true,

use = function(self, card, area)

while #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit do
G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
local random_roll = pseudorandom("box")

if random_roll<0.05 then
G.E_MANAGER:add_event(Event({
func = function()
ArtBox.create_collectable(poll_edition('mystery', nil, true, true))
G.GAME.consumeable_buffer = 0
return true
end
}))
elseif random_roll<0.3 then
G.E_MANAGER:add_event(Event({
func = function()
local valid_keys = {}
for _, seal_center in pairs(G.P_CENTER_POOLS["Seal"]) do
valid_keys[#valid_keys + 1] = seal_center.key
end
ArtBox.create_collectable(pseudorandom_element(valid_keys, pseudoseed("mystery")))
G.GAME.consumeable_buffer = 0
return true
end
}))
else
G.E_MANAGER:add_event(Event({
func = function()
ArtBox.create_collectable(SMODS.poll_enhancement({guaranteed = true, key = 'mystery'}))
G.GAME.consumeable_buffer = 0
return true
end
}))
end
end
end,

can_use = function(self, card, area)
return true
end
})
18 changes: 18 additions & 0 deletions artsandcrafts/art_pottery.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
SMODS.Consumable ({
object_type = "Consumable",
atlas = 'arts_atlas',
key = 'art_pottery',
set = 'art',
pos = { x = 3, y = 2 },
cost = 4,
unlocked = true,
discovered = true,
config = {mod_conv = "m_artb_clay", max_highlighted = 2},
effect = 'Enhance',
loc_vars = function(self, info_queue)
info_queue[#info_queue + 1] = G.P_CENTERS[self.config.mod_conv]

return { vars = { self.config.max_highlighted } }
end,

})
43 changes: 43 additions & 0 deletions artsandcrafts/art_still_life.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
SMODS.Consumable ({
object_type = "Consumable",
atlas = 'arts_atlas',
key = 'art_still_life',
set = 'art',
name = 'Still Life',
config = {
mod_conv = "c_artb_gros_michel_collectable",
},
pos = { x = 1, y = 2 },
cost = 4,
unlocked = true,
discovered = true,
can_use = function(self, card)
return true
end,
loc_vars = function(self, info_queue, card)
info_queue[#info_queue + 1] = G.P_CENTERS[self.config.mod_conv]
return {
vars = {
G.GAME.probabilities.normal
}
}
end,

use = function(self, card, area)
if #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit or next(SMODS.find_card('c_artb_gros_michel_collectable', count_debuffed)) then
G.E_MANAGER:add_event(Event({trigger = 'after', delay = 0.4, func = function()
if pseudorandom("still_life") < 0.05 then
local new_card = create_card("collectable", G.consumables, nil, nil, nil, nil, 'c_artb_cavendish_collectable')
new_card:add_to_deck()
G.consumeables:emplace(new_card)
else
local new_card = create_card("collectable", G.consumables, nil, nil, nil, nil, 'c_artb_gros_michel_collectable')
new_card:add_to_deck()
G.consumeables:emplace(new_card)
end
return true end }))
end
end


})
Binary file modified assets/1x/artsandcrafts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/1x/collabs/inscryption_face_cards_hc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/1x/collabs/inscryption_face_cards_lc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/1x/collectable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/1x/collectable_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/1x/enhancers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/1x/jokers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/2x/artsandcrafts.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/2x/collabs/inscryption_face_cards_hc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/2x/collabs/inscryption_face_cards_lc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/2x/collectable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/2x/collectable_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/2x/enhancers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/2x/jokers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
59 changes: 59 additions & 0 deletions collectable/cavendish_collectable.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
SMODS.Consumable({
key = 'cavendish_collectable',
set = 'collectable',
atlas = 'collectable_atlas',
pos = {x=4, y=12},
soul_pos = {x=4, y=13},
discovered = true,
config = {
extra = {
xmult = 2,
xmult_add = 1,
}
},
keep_on_use = function(self, card)
return false
end,
cost = 2,
can_use = function(self, card)
return false
end,

loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.xmult, card.ability.extra.xmult_add } }
end,

add_to_deck = function(self, card, from_debuff)
if next(SMODS.find_card('c_artb_cavendish_collectable', count_debuffed)) then
G.E_MANAGER:add_event(Event({
func = function()
play_sound('coin1')
card:start_dissolve()
G.consumeables:remove_card(card)
return true end
}))
else
First=true
end

end,

remove_from_deck = function(self, card, from_debuff)
for i = 1, #G.consumeables.cards do
local _card = G.consumeables.cards[i]
if _card.config.center.key == 'c_artb_cavendish_collectable' then
_card.ability.extra.xmult = _card.ability.extra.xmult + card.ability.extra.xmult_add
card_eval_status_text(_card, 'extra', nil, nil, nil,
{ message = localize { type = 'variable', key = 'a_xmult', vars = { _card.ability.extra.xmult } } })
end
end
end,

calculate = function(self, card, context)
if context.joker_main then
return {
x_mult = card.ability.extra.xmult
}
end
end
})
59 changes: 59 additions & 0 deletions collectable/gros_michel_collectable.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
SMODS.Consumable({
key = 'gros_michel_collectable',
set = 'collectable',
atlas = 'collectable_atlas',
pos = {x=3, y=12},
soul_pos = {x=3, y=13},
discovered = true,
config = {
extra = {
mult = 4,
mult_add = 4,
}
},
keep_on_use = function(self, card)
return false
end,
cost = 2,
can_use = function(self, card)
return false
end,

loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.mult, card.ability.extra.mult_add } }
end,

add_to_deck = function(self, card, from_debuff)
if next(SMODS.find_card('c_artb_gros_michel_collectable', count_debuffed)) then
G.E_MANAGER:add_event(Event({
func = function()
play_sound('coin1')
card:start_dissolve()
G.consumeables:remove_card(card)
return true end
}))
else
First=true
end

end,

remove_from_deck = function(self, card, from_debuff)
for i = 1, #G.consumeables.cards do
local _card = G.consumeables.cards[i]
if _card.config.center.key == 'c_artb_gros_michel_collectable' then
_card.ability.extra.mult = _card.ability.extra.mult + card.ability.extra.mult_add
card_eval_status_text(_card, 'extra', nil, nil, nil,
{ message = localize { type = 'variable', key = 'a_mult', vars = { card.ability.extra.mult_add } } })
end
end
end,

calculate = function(self, card, context)
if context.joker_main then
return {
mult = card.ability.extra.mult,
}
end
end
})
3 changes: 2 additions & 1 deletion config.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
return {
collectable_shine = false,
menu = true
menu = true,
null_hand = true
}
67 changes: 67 additions & 0 deletions jokers/card_binder.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
SMODS.Joker {
key = "card_binder",
config = {
extra = {
bonus_hs=4,
active=false,
}
},
rarity = 1,
pos = { x = 1, y = 6},
atlas = 'joker_atlas',
cost = 4,
unlocked = true,
discovered = true,
blueprint_compat = false,
eternal_compat = true,
perishable_compat = true,

loc_vars = function(self, info_queue, card)
return {
vars = {
card.ability.extra.bonus_hs,
}
}
end,

add_to_deck = function(self, card, from_debuff)
if not G.GAME.blind.in_blind and card.ability.extra.active==false then
card.ability.extra.active=true
G.hand:change_size(card.ability.extra.bonus_hs)
card:juice_up()
end
end,

remove_from_deck = function(self, card, from_debuff)
if card.ability.extra.active==true then
card.ability.extra.active=false
G.hand:change_size(-card.ability.extra.bonus_hs)
card:juice_up()
end
end,

calculate = function(self, card, context)
if context.setting_blind and card.ability.extra.active==true and not context.blueprint then
card.ability.extra.active=false
G.hand:change_size(-card.ability.extra.bonus_hs)
card:juice_up()
end

if context.end_of_round and card.ability.extra.active==false and context.game_over == false and context.main_eval and not context.blueprint then
card.ability.extra.active=true
G.hand:change_size(card.ability.extra.bonus_hs)
card:juice_up()
end
end,

draw = function(self, card, layer)
if (layer == 'card' or layer == 'both') then
if card.ability.extra.active==true then
card.children.center:set_sprite_pos({ x = 2, y = 6})
else
card.children.center:set_sprite_pos({ x = 1, y = 6})
end

end
end
}
2 changes: 1 addition & 1 deletion jokers/energy_drink.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ SMODS.Joker {
unlocked = true,
discovered = true,
blueprint_compat = true,
eternal_compat = true,
eternal_compat = false,
perishable_compat = false,

loc_vars = function(self, info_queue, card)
Expand Down
46 changes: 46 additions & 0 deletions jokers/heist.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
SMODS.Joker {
key = "heist",
unlocked = true,
discovered = true,
atlas = 'joker_atlas',
blueprint_compat = true,
rarity = 3,
cost = 8,
pos = { x = 4, y = 5 },
config = {
extra = {
}
},

loc_vars = function(self, info_queue, card)
return {
vars = {
card.sell_cost*3
}
}
end,
calculate = function(self, card, context)
if context.joker_main then
return {
mult = card.sell_cost*3
}
end

if context.setting_blind then
if not context.blueprint and G.jokers.cards[#G.jokers.cards] ~= card then
for v, joker in ipairs(G.jokers.cards) do
if joker == card then
card.ability.extra_value= card.ability.extra_value + G.jokers.cards[v + 1].sell_cost
card:set_cost()

G.jokers.cards[v + 1].ability.extra_value = G.jokers.cards[v + 1].ability.extra_value - G.jokers.cards[v + 1].sell_cost
G.jokers.cards[v + 1]:set_cost()

SMODS.calculate_effect({ extra = { message = localize('artb_stolen'), colour = G.C.MONEY } }, G.jokers.cards[v + 1])
SMODS.calculate_effect({ extra = { message = localize('k_val_up'), colour = G.C.MONEY } }, card)
end
end
end
end
end
}
Loading