Add new Karma Deck; moving old to Ascension Sleeve; moving old to challenge
This commit is contained in:
parent
8e44deab99
commit
6ff684ed79
4 changed files with 89 additions and 56 deletions
|
|
@ -17,5 +17,5 @@
|
||||||
"conflicts": [
|
"conflicts": [
|
||||||
"Jen"
|
"Jen"
|
||||||
],
|
],
|
||||||
"version": "1.5.18"
|
"version": "1.5.19"
|
||||||
}
|
}
|
||||||
64
src/back.lua
64
src/back.lua
|
|
@ -149,7 +149,7 @@ back {
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
local rain_world_jokers = {
|
Jane.rain_world_jokers = {
|
||||||
"j_jane_monk",
|
"j_jane_monk",
|
||||||
"j_jane_survivor",
|
"j_jane_survivor",
|
||||||
"j_jane_hunter",
|
"j_jane_hunter",
|
||||||
|
|
@ -161,12 +161,6 @@ local 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
|
||||||
|
|
@ -174,13 +168,14 @@ local function add_rain_world_joker()
|
||||||
|
|
||||||
local unobtained = {}
|
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
|
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 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")
|
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()
|
||||||
|
|
@ -194,65 +189,24 @@ back {
|
||||||
loc_txt = {
|
loc_txt = {
|
||||||
name = "Karma Deck",
|
name = "Karma Deck",
|
||||||
text = {
|
text = {
|
||||||
"Start with a {C:legendary}Rain World Joker",
|
"Start with a",
|
||||||
"Create another when",
|
"{C:legendary}Rain World Joker",
|
||||||
"{C:attention}Boss Blind {}is defeated",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
alt_loc_txt = {
|
alt_loc_txt = {
|
||||||
name = "Ascension Sleeve",
|
name = "Ascension Sleeve",
|
||||||
text = {
|
text = {
|
||||||
"Start with all {C:legendary}Rain World Jokers {}instead",
|
"Create a {C:legendary}Rain World Joker",
|
||||||
"Destroy a random {C:legendary}Rain World Joker {}when",
|
"when {C:attention}Boss Blind {}is defeated",
|
||||||
"{C:attention}Boss Blind {}is defeated, or {C:red}lose",
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
alt_apply = function(_)
|
alt_apply = function(_)
|
||||||
for _, v in ipairs(rain_world_jokers) do
|
Jane.q(add_rain_world_joker)
|
||||||
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
|
||||||
|
|
|
||||||
78
src/challenge.lua
Normal file
78
src/challenge.lua
Normal 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",
|
||||||
|
}
|
||||||
|
|
@ -313,6 +313,7 @@ for _, v in ipairs({
|
||||||
"back",
|
"back",
|
||||||
"blind",
|
"blind",
|
||||||
"booster",
|
"booster",
|
||||||
|
"challenge",
|
||||||
"edition",
|
"edition",
|
||||||
"joker",
|
"joker",
|
||||||
"slugcat",
|
"slugcat",
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue