Compare commits

..

No commits in common. "main" and "1.5.18" have entirely different histories.
main ... 1.5.18

4 changed files with 56 additions and 89 deletions

View file

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

View file

@ -149,7 +149,7 @@ back {
end, end,
} }
Jane.rain_world_jokers = { local rain_world_jokers = {
"j_jane_monk", "j_jane_monk",
"j_jane_survivor", "j_jane_survivor",
"j_jane_hunter", "j_jane_hunter",
@ -161,6 +161,12 @@ Jane.rain_world_jokers = {
"j_jane_rot", "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() local function add_rain_world_joker()
if not G.jokers then if not G.jokers then
return return
@ -168,14 +174,13 @@ local function add_rain_world_joker()
local unobtained = {} local unobtained = {}
for _, v in pairs(Jane.rain_world_jokers) do for _, v in pairs(rain_world_jokers) do
if not next(SMODS.find_card(v, true)) then if not next(SMODS.find_card(v, true)) then
unobtained[#unobtained + 1] = v unobtained[#unobtained + 1] = v
end end
end end
local chosen = pseudorandom_element(next(unobtained) and unobtained or Jane.rain_world_jokers, local chosen = pseudorandom_element(next(unobtained) and unobtained or rain_world_jokers, pseudoseed("karma_deck"))
pseudoseed("karma_deck"))
local card = create_card("Joker", G.jokers, nil, nil, nil, nil, chosen, "karma_deck_next") local card = create_card("Joker", G.jokers, nil, nil, nil, nil, chosen, "karma_deck_next")
card:add_to_deck() card:add_to_deck()
card:start_materialize() card:start_materialize()
@ -189,24 +194,65 @@ back {
loc_txt = { loc_txt = {
name = "Karma Deck", name = "Karma Deck",
text = { text = {
"Start with a", "Start with a {C:legendary}Rain World Joker",
"{C:legendary}Rain World Joker", "Create another when",
"{C:attention}Boss Blind {}is defeated",
}, },
}, },
alt_loc_txt = { alt_loc_txt = {
name = "Ascension Sleeve", name = "Ascension Sleeve",
text = { text = {
"Create a {C:legendary}Rain World Joker", "Start with all {C:legendary}Rain World Jokers {}instead",
"when {C:attention}Boss Blind {}is defeated", "Destroy a random {C:legendary}Rain World Joker {}when",
"{C:attention}Boss Blind {}is defeated, or {C:red}lose",
}, },
}, },
alt_apply = function(_) alt_apply = function(_)
Jane.q(add_rain_world_joker) 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
end, end,
apply = function(_) apply = function(_)
Jane.q(add_rain_world_joker) Jane.q(add_rain_world_joker)
end, end,
alt_calculate = function(_, _, context) 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 if Jane.is_end_of_ante(context) then
add_rain_world_joker() add_rain_world_joker()
end end

View file

@ -1,78 +0,0 @@
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,7 +313,6 @@ for _, v in ipairs({
"back", "back",
"blind", "blind",
"booster", "booster",
"challenge",
"edition", "edition",
"joker", "joker",
"slugcat", "slugcat",