Skip to content

Commit 55ed84b

Browse files
Merge pull request #160 from survovoaneend/dev
Dev to main for 0.6.0b
2 parents 19363a1 + db5a36c commit 55ed84b

File tree

13 files changed

+454
-216
lines changed

13 files changed

+454
-216
lines changed

Items/Blinds/Pit/the_rains.lua

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ local the_rains = {
2525
end
2626

2727
if context.before and G.hand.cards and not temp then
28-
for _, v in pairs(G.hand.cards) do
29-
if G.play.cards[i].config.center ~= G.P_CENTERS.c_base then
28+
for i = 1, #G.play.cards do
29+
if G.play.cards[i].config.center ~= G.P_CENTERS.c_base or G.play.cards[i].edition ~= nil or G.play.cards[i].seal ~= nil then
3030
blind.triggered = true
3131
break
3232
end
@@ -44,16 +44,22 @@ local the_rains = {
4444
G.E_MANAGER:add_event(Event({
4545
trigger = 'after',
4646
func = (function()
47-
play_sound("tarot2")
47+
local removed_edition = false
48+
blind:wiggle()
4849
for i = 1, #G.play.cards do
4950
G.play.cards[i]:set_seal(nil, nil, true)
50-
G.play.cards[i]:set_edition(nil, true)
51+
if G.play.cards[i].edition ~= nil then
52+
removed_edition = true
53+
end
54+
G.play.cards[i]:set_edition(nil, true, true)
5155
G.play.cards[i]:juice_up()
5256
end
57+
if removed_edition then
58+
play_sound('whoosh2', 1.2, 0.6)
59+
end
5360
return true
5461
end)
5562
}))
56-
blind:wiggle()
5763
blind.triggered = false
5864
end
5965
end

Items/Jokers/banana_man.lua

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,32 @@ local banana_man = {
3939
end
4040
end
4141
if context.after and context.cardarea == G.jokers and not context.blueprint then
42+
43+
local message_colour = G.C.FILTER
44+
if context.blueprint_card then
45+
local blueprint_card = context.blueprint_card
46+
if blueprint_card.ability.name == "Brainstorm" then
47+
message_colour = G.C.RED
48+
elseif blueprint_card.ability.name == "Blueprint" then
49+
message_colour = G.C.BLUE
50+
end
51+
end
52+
4253
for i = 1, #G.jokers.cards do
43-
if SMODS.pseudorandom_probability(card, 'banana_man', 1, card.ability.extra.odds) and not SMODS.is_eternal(G.jokers.cards[i]) then
44-
G.E_MANAGER:add_event(Event({
45-
func = function()
46-
if G.jokers.cards[i] then
47-
G.jokers.cards[i]:start_dissolve()
54+
if not SMODS.is_eternal(G.jokers.cards[i]) then
55+
if SMODS.pseudorandom_probability(card, 'banana_man', 1, card.ability.extra.odds) then
56+
G.E_MANAGER:add_event(Event({
57+
func = function()
58+
if G.jokers.cards[i] then
59+
SMODS.destroy_cards(G.jokers.cards[i])
60+
end
61+
return true
4862
end
49-
return true
50-
end
51-
}))
52-
card_eval_status_text(G.jokers.cards[i], 'extra', nil, nil, nil, {message = localize('k_extinct_ex'),colour = G.C.FILTER})
53-
elseif not SMODS.is_eternal(G.jokers.cards[i]) then
54-
card_eval_status_text(G.jokers.cards[i], 'extra', nil, nil, nil, {message = localize('k_safe_ex'),colour = G.C.FILTER})
63+
}))
64+
card_eval_status_text(G.jokers.cards[i], 'extra', nil, nil, nil, {message = localize('k_extinct_ex'),colour = message_colour})
65+
else
66+
card_eval_status_text(G.jokers.cards[i], 'extra', nil, nil, nil, {message = localize('k_safe_ex'),colour = message_colour})
67+
end
5568
end
5669
end
5770
end

Items/Jokers/handsome_joker.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@
22

33
local handsome_joker_calc_mult = function(xmult_mod)
44
local handsome_card = G.GAME.current_round.jest_handsome_joker_card
5-
local mult = 0
5+
local matching_cards = 0
66
if G.playing_cards then
77
for _, deck_card in ipairs(G.playing_cards) do
88
if deck_card:get_id() == handsome_card.id then
99
if SMODS.has_enhancement(deck_card, handsome_card.enhancement) then
10-
mult = mult + 1
10+
matching_cards = matching_cards + 1
1111
end
1212
end
1313
end
1414
end
15-
return (mult < 1 and 1) or mult * xmult_mod
15+
return (matching_cards < 1 and 1) or (1 + matching_cards * xmult_mod)
1616
end
1717

1818
local handsome_joker = {
@@ -58,7 +58,7 @@ local handsome_joker = {
5858
end,
5959

6060
calculate = function(self, card, context)
61-
local xmult = 1 + handsome_joker_calc_mult(card.ability.extra.xmult_mod)
61+
local xmult = handsome_joker_calc_mult(card.ability.extra.xmult_mod)
6262
if context.joker_main then
6363
return {
6464
xmult = xmult,

Items/Jokers/ijoker_co.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,14 @@ local ijoker_co = {
2828
calculate = function(self, card, context)
2929
if context.starting_shop then
3030
for i = 1, card.ability.extra.tags do
31-
local price = pseudorandom('aij_ijoker_co', 5, 10)
3231
local tag = get_next_tag_key()
32+
local is_gold = G.P_TAGS[tag].config.aij and G.P_TAGS[tag].config.aij.upgrade
33+
local price = is_gold and pseudorandom('aij_ijoker_co', 12, 16) or pseudorandom('aij_ijoker_co', 5, 10)
3334
All_in_Jest.add_tag_to_shop(tag, price)
3435
end
3536
end
3637
end
3738

3839
}
40+
3941
return { name = {"Jokers"}, items = {ijoker_co} }

Items/Jokers/jerko.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ local jerko = {
4343
calculate = function(self, card, context)
4444
if context.repetition_only or (context.retrigger_joker_check) then
4545
local retriggers = pseudorandom('jerko', card.ability.extra.min, card.ability.extra.max)
46-
if context.other_card == card then
46+
if context.other_card == card and retriggers > 0 then
4747
return {
4848
repetitions = retriggers,
4949
card = card,

Items/Jokers/pellucid_joker.lua

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,42 +12,41 @@ local pellucid_joker = {
1212
cost = 6,
1313
unlocked = true,
1414
discovered = false,
15-
blueprint_compat = false,
15+
blueprint_compat = true,
1616
eternal_compat = true,
1717

1818
loc_vars = function(self, info_queue, card)
1919

2020
end,
2121

2222
calculate = function(self, card, context)
23-
24-
end
25-
26-
}
27-
local start_dissolve_ref = Card.start_dissolve
28-
function Card:start_dissolve(dissolve_colours, silent, dissolve_time_fac, no_juice)
29-
local ref = start_dissolve_ref(self, dissolve_colours, silent, dissolve_time_fac, no_juice)
30-
if G.jokers and self.ability.set == 'Joker' and self.edition ~= nil then
31-
local has_pellucid_joker = SMODS.find_card("j_aij_pellucid_joker")
32-
if has_pellucid_joker then
33-
for k, v in pairs(has_pellucid_joker) do
34-
local _card = create_playing_card({
35-
front = pseudorandom_element(G.P_CARDS, pseudoseed('pellucid_joker')),
36-
center = G.P_CENTERS.c_base}, v, true, nil, {G.C.SECONDARY_SET.Enhanced}, true)
37-
_card:set_edition(self.edition)
38-
_card:start_materialize()
23+
if context.jest_destroying_or_selling_joker and context.jest_destroyed_joker.edition ~= nil then
24+
local juice_card = context.blueprint_card or card
3925
G.E_MANAGER:add_event(Event({
40-
trigger = 'after',
41-
delay = 0.3,
4226
func = function()
43-
G.deck:emplace(_card)
44-
G.deck.config.card_limit = G.deck.config.card_limit + 1
27+
juice_card:juice_up()
28+
local new_card = create_playing_card({
29+
front = pseudorandom_element(G.P_CARDS, pseudoseed('pellucid_joker')),
30+
center = G.P_CENTERS.c_base}, juice_card, true, nil, {G.C.SECONDARY_SET.Enhanced}, true)
31+
new_card:set_edition(context.jest_destroyed_joker.edition)
32+
new_card:start_materialize()
33+
G.E_MANAGER:add_event(Event({
34+
trigger = 'after',
35+
delay = 0.3,
36+
func = function()
37+
G.deck:emplace(new_card)
38+
G.deck.config.card_limit = G.deck.config.card_limit + 1
39+
return true
40+
end})
41+
)
42+
playing_card_joker_effects({new_card})
4543
return true
46-
end}))
47-
playing_card_joker_effects({_card})
44+
end})
45+
)
46+
return nil, true
4847
end
4948
end
50-
end
51-
return ref
52-
end
49+
50+
}
51+
5352
return { name = {"Jokers"}, items = {pellucid_joker} }

Items/Jokers/pierrot.lua

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,22 @@ local pierrot = {
2020
end,
2121

2222
calculate = function(self, card, context)
23-
if context.individual and context.cardarea == G.hand and not context.end_of_round and context.other_card:get_id() <= 10 then
24-
if context.other_card.debuff then
25-
return {
26-
message = localize('k_debuffed'),
27-
colour = G.C.RED
28-
}
29-
else
30-
return {
31-
chips = context.other_card:get_chip_bonus()
32-
}
23+
if context.individual and context.cardarea == G.hand and not context.end_of_round then
24+
local val = context.other_card:get_chip_bonus()
25+
local id = context.other_card:get_id()
26+
local rank = SMODS.Ranks[context.other_card.base.value]
27+
local is_numbered_card = rank and string.find(rank.key, "%d*%d?%d+") ~= nil
28+
if context.other_card and is_numbered_card and to_big(val) > to_big(0) and (to_big(id) > to_big(0)) then
29+
if context.other_card.debuff then
30+
return {
31+
message = localize('k_debuffed'),
32+
colour = G.C.RED,
33+
}
34+
else
35+
return {
36+
h_chips = val
37+
}
38+
end
3339
end
3440
end
3541
end

Items/Jokers/the_mycologists.lua

Lines changed: 58 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,62 @@
11
local the_mycologists = {
2-
object_type = "Joker",
3-
order = 47,
4-
5-
key = "the_mycologists",
6-
config = {
7-
poker_hand = "Pair",
8-
added = false
9-
},
10-
rarity = 3,
11-
pos = { x = 18, y = 1 },
12-
atlas = 'joker_atlas',
13-
cost = 8,
14-
unlocked = true,
15-
discovered = false,
16-
blueprint_compat = true,
17-
eternal_compat = true,
18-
19-
loc_vars = function(self, info_queue, card)
20-
return { vars = {localize(card.ability.poker_hand, 'poker_hands')}}
21-
end,
22-
23-
calculate = function(self, card, context)
24-
if context.final_scoring_step then
25-
if context.scoring_name == card.ability.poker_hand and #context.full_hand == 2 then
26-
local cards = G.play.cards
27-
if card.ability.added == false then
28-
card.ability.added = true
29-
G.E_MANAGER:add_event(Event({
30-
trigger = 'after',
31-
delay = 0.1,
32-
func = function()
33-
cards[1].ability.perma_bonus = cards[1].ability.perma_bonus + (cards[2].base.nominal + cards[2].ability.perma_bonus)
34-
cards[1]:set_ability(cards[2].config.center)
35-
if cards[2].edition ~= nil then
36-
cards[1]:set_edition(cards[2].edition)
37-
end
38-
cards[2]:start_dissolve()
39-
return true end }))
40-
end
2+
object_type = "Joker",
3+
order = 47,
4+
5+
key = "the_mycologists",
6+
config = {
7+
poker_hand = "Pair",
8+
-- added = false
9+
},
10+
rarity = 3,
11+
pos = { x = 18, y = 1 },
12+
atlas = 'joker_atlas',
13+
cost = 8,
14+
unlocked = true,
15+
discovered = false,
16+
blueprint_compat = false,
17+
eternal_compat = true,
18+
19+
loc_vars = function(self, info_queue, card)
20+
return { vars = { localize(card.ability.poker_hand, 'poker_hands') } }
21+
end,
22+
23+
calculate = function(self, card, context)
24+
if context.all_in_jest and context.all_in_jest.before_after and not context.blueprint then
25+
if context.scoring_name == card.ability.poker_hand and #context.full_hand == 2 then
26+
local cards = G.play.cards
27+
-- if card.ability.added == false then
28+
-- card.ability.added = true
29+
G.E_MANAGER:add_event(Event({
30+
trigger = 'after',
31+
delay = 0.1,
32+
func = function()
33+
cards[1].ability.perma_bonus = cards[1].ability.perma_bonus + (cards[2].base.nominal + cards[2].ability.perma_bonus)
34+
if cards[2].config.center ~= G.P_CENTERS.c_base then
35+
cards[1]:set_ability(cards[2].config.center)
36+
end
37+
if cards[2].edition ~= nil then
38+
cards[1]:set_edition(cards[2].edition, true, true)
39+
end
40+
SMODS.destroy_cards(cards[2], nil, true)
41+
return true
4142
end
42-
end
43-
if not context.blueprint and context.destroying_card and #context.full_hand == 2 then
44-
local cards = G.play.cards
45-
if context.destroying_card == cards[2] and card.ability.added == true then
46-
return {remove = true}
47-
end
48-
end
49-
if context.hand_drawn then
50-
card.ability.added = false
51-
end
43+
}))
44+
return {
45+
message = localize("k_aij_two_into_one_ex"),
46+
sound = 'slice1'
47+
}
48+
-- end
49+
end
5250
end
51+
-- if not context.blueprint and context.destroying_card and #context.full_hand == 2 then
52+
-- local cards = G.play.cards
53+
-- if context.destroying_card == cards[2] and card.ability.added == true then
54+
-- return { remove = true }
55+
-- end
56+
-- end
57+
-- if context.hand_drawn then
58+
-- card.ability.added = false
59+
-- end
60+
end
5361
}
54-
return { name = {"Jokers"}, items = {the_mycologists} }
62+
return { name = { "Jokers" }, items = { the_mycologists } }

Items/Tag/chaos.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ local chaos = {
8989
par.config.object:recalculate()
9090
G.blind_select_opts.boss.parent = par
9191
G.blind_select_opts.boss.alignment.offset.y = 0
92+
play_sound('other1')
9293
elseif effect == "open_booster" then
9394
local boosters = {}
9495
for k, v in pairs(G.P_CENTERS) do

0 commit comments

Comments
 (0)