Compare commits

...

1 commit
1.5.18 ... main

4 changed files with 89 additions and 56 deletions

View file

@ -17,5 +17,5 @@
"conflicts": [
"Jen"
],
"version": "1.5.18"
"version": "1.5.19"
}

View file

@ -149,7 +149,7 @@ back {
end,
}
local rain_world_jokers = {
Jane.rain_world_jokers = {
"j_jane_monk",
"j_jane_survivor",
"j_jane_hunter",
@ -161,12 +161,6 @@ local rain_world_jokers = {
"j_jane_rot",
}
local is_rain_world_joker = {}
for _, v in pairs(rain_world_jokers) do
is_rain_world_joker[v] = true
end
local function add_rain_world_joker()
if not G.jokers then
return
@ -174,13 +168,14 @@ local function add_rain_world_joker()
local unobtained = {}
for _, v in pairs(rain_world_jokers) do
for _, v in pairs(Jane.rain_world_jokers) do
if not next(SMODS.find_card(v, true)) then
unobtained[#unobtained + 1] = v
end
end
local chosen = pseudorandom_element(next(unobtained) and unobtained or rain_world_jokers, pseudoseed("karma_deck"))
local chosen = pseudorandom_element(next(unobtained) and unobtained or Jane.rain_world_jokers,
pseudoseed("karma_deck"))
local card = create_card("Joker", G.jokers, nil, nil, nil, nil, chosen, "karma_deck_next")
card:add_to_deck()
card:start_materialize()
@ -194,65 +189,24 @@ back {
loc_txt = {
name = "Karma Deck",
text = {
"Start with a {C:legendary}Rain World Joker",
"Create another when",
"{C:attention}Boss Blind {}is defeated",
"Start with a",
"{C:legendary}Rain World Joker",
},
},
alt_loc_txt = {
name = "Ascension Sleeve",
text = {
"Start with all {C:legendary}Rain World Jokers {}instead",
"Destroy a random {C:legendary}Rain World Joker {}when",
"{C:attention}Boss Blind {}is defeated, or {C:red}lose",
"Create a {C:legendary}Rain World Joker",
"when {C:attention}Boss Blind {}is defeated",
},
},
alt_apply = function(_)
for _, v in ipairs(rain_world_jokers) do
Jane.q(function()
local card = create_card("Joker", G.jokers, nil, nil, nil, nil, v, "karma_deck_next")
card:add_to_deck()
card:start_materialize()
G.jokers:emplace(card)
play_sound("timpani")
end, 0.2)
end
Jane.q(add_rain_world_joker)
end,
apply = function(_)
Jane.q(add_rain_world_joker)
end,
alt_calculate = function(_, _, context)
local function l()
if G.STAGE == G.STAGES.RUN then
G.STATE = G.STATES.GAME_OVER
G.STATE_COMPLETE = false
end
end
if not Jane.is_end_of_ante(context) then
return
end
local destructible_jokers = {}
for _, v in pairs(G.jokers.cards) do
if is_rain_world_joker[v.config.center.key] and not ((v.ability or {}).eternal or (v.ability or {}).cry_absolute) then
destructible_jokers[#destructible_jokers + 1] = v
end
end
if not next(destructible_jokers) then
return l()
end
local chosen = pseudorandom_element(destructible_jokers, pseudoseed("karma_deck"))
if chosen then
chosen.getting_sliced = true
chosen:start_dissolve()
end
end,
calculate = function(_, _, context)
if Jane.is_end_of_ante(context) then
add_rain_world_joker()
end

78
src/challenge.lua Normal file
View file

@ -0,0 +1,78 @@
local is_rain_world_joker = {}
for _, v in pairs(Jane.rain_world_jokers) do
is_rain_world_joker[v] = true
end
SMODS.Challenge {
key = "downpour",
loc_txt = {
name = "Downpour",
},
rules = {custom = {
{id = "jane_downpour1"},
{id = "jane_downpour2"},
{id = "jane_downpour3"},
{id = "jane_downpour4"},
}},
apply = function(_)
G.GAME.win_ante = 16
for _, v in ipairs(Jane.rain_world_jokers) do
Jane.q(function()
local card = create_card("Joker", G.jokers, nil, nil, nil, nil, v, "karma_deck_next")
card:add_to_deck()
card:start_materialize()
G.jokers:emplace(card)
play_sound("timpani")
end, 0.2)
end
end,
calculate = function(_, context)
local function l()
if G.STAGE == G.STAGES.RUN then
G.STATE = G.STATES.GAME_OVER
G.STATE_COMPLETE = false
end
end
if not Jane.is_end_of_ante(context) then
return
end
local destructible_jokers = {}
for _, v in pairs(G.jokers.cards) do
if is_rain_world_joker[v.config.center.key] and not ((v.ability or {}).eternal or (v.ability or {}).cry_absolute) then
destructible_jokers[#destructible_jokers + 1] = v
end
end
if not next(destructible_jokers) then
return l()
end
local chosen = pseudorandom_element(destructible_jokers, pseudoseed("karma_deck"))
if chosen then
chosen.getting_sliced = true
chosen:start_dissolve()
end
end,
}
G.localization.misc.v_text["ch_c_jane_downpour1"] = {
"Start with all {C:legendary}Rain World Jokers",
}
G.localization.misc.v_text["ch_c_jane_downpour2"] = {
"Destroy a random {C:legendary}Rain World Joker {}when",
}
G.localization.misc.v_text["ch_c_jane_downpour3"] = {
"{C:attention}Boss Blind {}is defeated, or {C:red}lose",
}
G.localization.misc.v_text["ch_c_jane_downpour4"] = {
"Win on {C:attention}Ante 16",
}

View file

@ -313,6 +313,7 @@ for _, v in ipairs({
"back",
"blind",
"booster",
"challenge",
"edition",
"joker",
"slugcat",