Skip to content

Commit 33bf712

Browse files
Merge pull request #190 from survovoaneend/dev
Dev
2 parents 27f49b0 + 3cd9be0 commit 33bf712

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+578
-557
lines changed

Items/Blinds/Boss/the_gift.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ local the_gift = {
33
key = 'the_gift',
44

55
boss = {
6-
min = 3
6+
min = 6
77
},
88
mult = 2,
99
boss_colour = HEX("c75d5d"),

Items/Blinds/Boss/the_storm.lua

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ local the_storm = {
77
mult = 2,
88
boss_colour = HEX("b48b52"),
99
atlas = 'blinds',
10-
pos = { X = 0, y = 53},
10+
pos = { X = 0, y = 53 },
1111
order = 37,
1212
dollars = 5,
1313

@@ -18,23 +18,18 @@ local the_storm = {
1818
return
1919
end
2020
if context.after and context.full_hand and context.scoring_hand and not temp then
21-
local total_cards = {}
22-
for i = 1, #context.full_hand do
23-
local scoring = false
24-
for j = 1, #context.scoring_hand do
25-
if context.full_hand[i] == context.scoring_hand[j] then
26-
scoring = true
27-
end
21+
if #context.scoring_hand >= 3 then
22+
local cards_to_destroy = {}
23+
for i = 1, #context.full_hand do
24+
cards_to_destroy[#cards_to_destroy + 1] = context.full_hand[i]
2825
end
29-
if not scoring then
30-
total_cards[#total_cards+1] = context.full_hand[i]
26+
if #cards_to_destroy > 0 then
27+
blind:wiggle()
28+
SMODS.destroy_cards(cards_to_destroy)
3129
end
3230
end
33-
if #total_cards > 0 then
34-
SMODS.destroy_cards(total_cards)
35-
end
3631
end
3732
end
3833

3934
}
40-
return { name = {"Blinds"}, items = {the_storm} }
35+
return { name = { "Blinds" }, items = { the_storm } }
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
2+
3+
local asteroid_tag_celestial = {
4+
object_type = "Booster",
5+
no_collection = true,
6+
key = 'asteroid_tag_celestial',
7+
pos = {x=0, y=1},
8+
cost = 0,
9+
weight = 0,
10+
config = { extra = 3, choose = 1 },
11+
loc_vars = function(self, info_queue, card)
12+
return { vars = {card.ability.choose, card.ability.extra}, key = "p_celestial_normal" }
13+
end,
14+
ease_background_colour = function(self)
15+
ease_background_colour_blind(G.STATES.PLANET_PACK)
16+
end,
17+
particles = function(self)
18+
G.booster_pack_stars = Particles(1, 1, 0,0, {
19+
timer = 0.07,
20+
scale = 0.1,
21+
initialize = true,
22+
lifespan = 15,
23+
speed = 0.1,
24+
padding = -4,
25+
attach = G.ROOM_ATTACH,
26+
colours = {G.C.WHITE, HEX('a7d6e0'), HEX('fddca0')},
27+
fill = true
28+
})
29+
G.booster_pack_meteors = Particles(1, 1, 0,0, {
30+
timer = 2,
31+
scale = 0.05,
32+
lifespan = 1.5,
33+
speed = 4,
34+
attach = G.ROOM_ATTACH,
35+
colours = {G.C.WHITE},
36+
fill = true
37+
})
38+
end,
39+
create_card = function(self, card, i)
40+
local tmp_key = 'c_black_hole'
41+
if i == 1 then
42+
tmp_key = 'c_black_hole'
43+
elseif i == 2 then
44+
tmp_key = 'c_aij_gravastar'
45+
elseif i == 3 then
46+
tmp_key = 'c_aij_pulsar'
47+
end
48+
return {set = "Spectral", area = G.pack_cards, skip_materialize = true, soulable = true, key = tmp_key}
49+
end,
50+
group_key = "k_celestial_pack",
51+
}
52+
53+
return { name = {"Boosters"}, items = { asteroid_tag_celestial } }
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
2+
3+
local timelost_guess_the_jest = {
4+
object_type = "Booster",
5+
no_collection = true,
6+
key = 'timelost_guess_the_jest',
7+
atlas = 'booster_atlas',
8+
pos = { x = 0, y = 0 },
9+
cost = 0,
10+
weight = 0,
11+
config = { extra = 5, choose = 1 },
12+
loc_vars = function(self, info_queue, card)
13+
return { vars = {card.ability.choose, card.ability.extra}, key = "p_aij_guess_the_jest" }
14+
end,
15+
ease_background_colour = function(self)
16+
ease_background_colour_blind(G.STATES.SPECTRAL_PACK)
17+
end,
18+
particles = function(self)
19+
G.booster_pack_sparkles = Particles(1, 1, 0,0, {
20+
timer = 0.015, scale = 0.1, initialize = true, lifespan = 3, speed = 0.2,
21+
padding = -1, attach = G.ROOM_ATTACH, colours = {G.C.WHITE, lighten(G.C.GOLD, 0.2)}, fill = true
22+
})
23+
G.booster_pack_sparkles.fade_alpha = 1
24+
G.booster_pack_sparkles:fade(1, 0)
25+
end,
26+
create_card = function(self, card, i)
27+
local card_params = {
28+
set = "Joker",
29+
legendary = true,
30+
area = G.pack_cards,
31+
skip_materialize = true,
32+
soulable = false,
33+
key_append = "leg_guess" ,
34+
no_edition = true,
35+
}
36+
local _card = SMODS.create_card(card_params)
37+
if _card then
38+
_card.ability = _card.ability or {}
39+
_card.ability.from_guess_the_jest = true
40+
_card.ability.background = tostring(math.random(1,4))
41+
for k, v in pairs(G.shared_stickers) do
42+
if _card.ability[k] then
43+
_card.ability[k] = false
44+
end
45+
end
46+
_card.ability.perishable = true
47+
_card.ability.perish_tally = G.GAME.perishable_rounds or 5
48+
end
49+
return _card
50+
end,
51+
group_key = "k_aij_guess_the_jest",
52+
}
53+
54+
return { name = {"Boosters"}, items = {timelost_guess_the_jest} }

Items/Consumables/Planets/dark_star.lua

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ local dark_star = {
1414
atlas = 'consumable_atlas',
1515
loc_vars = function(self, info_queue, card)
1616
return {
17-
vars = {
18-
19-
},
17+
vars = { },
2018
}
2119
end,
2220
can_use = function(self, card)
@@ -32,7 +30,11 @@ local dark_star = {
3230
local hands_to_upgrade = {}
3331
for _, k in ipairs(G.handlist) do
3432
if G.GAME.hands[k].played == 0 then
35-
table.insert(hands_to_upgrade, k)
33+
if not G.GAME.hands[k].visible then
34+
level_up_hand(card, k, true)
35+
else
36+
table.insert(hands_to_upgrade, k)
37+
end
3638
end
3739
end
3840
level_up_hand(card, hands_to_upgrade)

Items/Consumables/Spectrals/reshape.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ local reshape = {
5454
end
5555
end
5656
end
57+
G.jokers.cards[i]:set_edition(nil, true, true)
5758
copy_card(selected_joker, G.jokers.cards[i], nil, nil, true)
5859
G.jokers.cards[i]:set_edition(original_edition, true, true)
5960
for k, v in pairs(original_stickers) do

Items/Consumables/Spectrals/shade.lua

Lines changed: 37 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
local shade_spectral = {
22
object_type = "Consumable",
3-
key = 'shade',
4-
set = 'Spectral',
5-
pos = { x = 4, y = 4 },
6-
cost = 4,
7-
unlocked = true,
8-
discovered = false,
3+
key = 'shade',
4+
set = 'Spectral',
5+
pos = { x = 4, y = 4 },
6+
cost = 4,
7+
unlocked = true,
8+
discovered = false,
99
order = 1,
10-
config ={},
11-
atlas = 'consumable_atlas',
10+
config = { extra = 1 },
11+
atlas = 'consumable_atlas',
1212
loc_vars = function(self, info_queue, card)
1313
if All_in_Jest.config and All_in_Jest.config.no_copy_neg then
1414
info_queue[#info_queue+1] = {key = 'e_negative_playing_card', set = 'Edition', config = {extra = G.P_CENTERS['e_negative'].config.card_limit} }
1515
else
1616
info_queue[#info_queue+1] = G.P_CENTERS.e_aij_negative_playing_card
1717
end
18-
end,
18+
return {vars = { card.ability.extra }}
19+
end,
1920
can_use = function(self, card)
2021
if G.hand and G.hand.cards and #G.hand.cards > 0 then
2122
for k, v in ipairs(G.hand.cards) do
@@ -27,24 +28,37 @@ local shade_spectral = {
2728
return false
2829
end
2930
end,
30-
use = function(self, card, area, copier)
31-
local cards = {}
32-
for k, v in ipairs(G.hand.cards) do
33-
if not v.edition then cards[#cards + 1] = v end
34-
end
35-
local selected_card = pseudorandom_element(cards, pseudoseed('shade_card'))
31+
use = function(self, card, area, copier)
3632
G.E_MANAGER:add_event(Event({
3733
trigger = 'after',
3834
delay = 0.4,
3935
func = function()
40-
card:juice_up(0.3, 0.5)
41-
play_sound('negative', 1.5, 0.4)
42-
selected_card:set_edition({negative = true}, true)
43-
G.FUNCS.draw_from_deck_to_hand(math.min(1, (G.hand.config.card_limit + 1) - #G.hand.cards))
44-
-- G.hand:handle_card_limit()
45-
-- if G.deck and #G.deck.cards > 0 then
46-
-- draw_card(G.deck, G.hand, nil, 'up', nil, nil)
47-
-- end
36+
local activations = 0
37+
local i = 0
38+
local valid_cards_remain = true
39+
while activations < card.ability.extra and valid_cards_remain do
40+
sendDebugMessage(i, "AIJ")
41+
local selected_card = pseudorandom_element(G.hand.cards, pseudoseed('shade_card' .. i))
42+
if not selected_card.edition then
43+
card:juice_up(0.3, 0.5)
44+
play_sound('negative', 1.5, 0.4)
45+
selected_card:set_edition({negative = true}, true)
46+
-- G.FUNCS.draw_from_deck_to_hand(math.min(1, (G.hand.config.card_limit + 1) - #G.hand.cards))
47+
activations = activations + 1
48+
end
49+
50+
valid_cards_remain = false
51+
if G.hand and G.hand.cards and #G.hand.cards > 0 then
52+
for _, v in ipairs(G.hand.cards) do
53+
if not v.edition then
54+
valid_cards_remain = true
55+
break
56+
end
57+
end
58+
end
59+
60+
i = i + 1
61+
end
4862
return true
4963
end
5064
}))

Items/Consumables/Tarots/Other/broken_fate.lua

Lines changed: 45 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
local function contains_number(table, exclusions)
2+
for k, v in pairs(table) do
3+
if exclusions and exclusions[k] ~= nil and (exclusions[k] == true or exclusions[k] == v) then
4+
else
5+
if type(v) == "number" and v ~= 0 then
6+
return true
7+
elseif type(v) == "table" and contains_number(v, exclusions) then
8+
return true
9+
end
10+
end
11+
end
12+
return false
13+
end
14+
115
local broken_fate = {
216
object_type = "Consumable",
317
key = 'broken_fate',
@@ -18,8 +32,12 @@ local broken_fate = {
1832
can_use = function(self, card, area, copier)
1933
if G.consumeables and #G.consumeables.cards > 0 then
2034
local leftmost_card = G.consumeables.cards[1]
21-
leftmost_card = leftmost_card == card and G.consumeables.cards[2] or leftmost_card
22-
return leftmost_card.config.center.key ~= "c_aij_broken_fate"
35+
-- Check for Ankh and Hex explicitly, as they have unused variables that make it seem like they are compatible
36+
return (
37+
leftmost_card.config.center.key ~= "c_aij_broken_fate" and
38+
contains_number(leftmost_card.ability, { card_limit = true, h_x_chips = 1, x_chips = 1, h_x_mult = 1, x_mult = 1, hands_played_at_create = true, order = true }) and
39+
leftmost_card.config.center.dongtong_compat ~= false
40+
)
2341
end
2442
end,
2543
use = function(self, card)
@@ -29,18 +47,34 @@ local broken_fate = {
2947
return true end }))
3048
delay(0.2)
3149

50+
-- Define the target for clarity
51+
local target = G.consumeables.cards[1]
52+
53+
-- SNAPSHOT LOGIC:
54+
if target.aij_original_ability then
55+
target.ability = copy_table(target.aij_original_ability)
56+
else
57+
target.aij_original_ability = copy_table(target.ability)
58+
end
59+
3260
local ran_amount = 0.75 + (pseudorandom('aij_broken_fate', 0, math.floor(((2.5 - 0.75) / 0.05) + 0.5)) * 0.05)
3361
local string = "X" .. tostring(ran_amount)
34-
G.consumeables.cards[1].ability.consumeable = copy_table(G.consumeables.cards[1].ability.consumeable)
35-
jest_ability_calculate(G.consumeables.cards[1], "*", ran_amount, nil, nil, true, false, "ability")
36-
card_eval_status_text(G.consumeables.cards[1], 'extra', nil, nil, nil, { message = string, colour = G.C.FILTER })
62+
63+
jest_ability_calculate(target, "*", ran_amount, { card_limit = true, h_x_chips = 1, x_chips = 1, h_x_mult = 1, x_mult = 1, hands_played_at_create = true, order = true }, nil, true, false, "ability")
64+
65+
card_eval_status_text(target, 'extra', nil, nil, nil, { message = string, colour = G.C.FILTER })
3766
delay(0.2)
3867
end,
39-
in_pool = function(self, args)
40-
if G.consumeables and #G.consumeables.cards > 0 then
41-
return true
42-
end
43-
return false
44-
end,
4568
}
69+
70+
-- Set some vanilla consumables to be incompatible
71+
-- These have variables that look like they make it compatible, but actually aren't
72+
-- Some of these (the seals) should be refactored to work as expected
73+
G.P_CENTERS["c_ankh"].dongtong_compat = false
74+
G.P_CENTERS["c_hex"].dongtong_compat = false
75+
G.P_CENTERS["c_talisman"].dongtong_compat = false
76+
G.P_CENTERS["c_trance"].dongtong_compat = false
77+
G.P_CENTERS["c_medium"].dongtong_compat = false
78+
G.P_CENTERS["c_deja_vu"].dongtong_compat = false
79+
4680
return { name = { "Tarots" }, items = { broken_fate } }

0 commit comments

Comments
 (0)