Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added assets/1x/j_sandbox_oops2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/1x/tag_rare.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/2x/j_sandbox_oops2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/2x/tag_rare.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 17 additions & 8 deletions core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ function MP.reset_game_states()
ante_key = tostring(math.random()),
antes_keyed = {},
prevent_eval = false,
round_ended = false,
duplicate_end = false,
misprint_display = "",
spent_total = 0,
spent_before_shop = 0,
Expand All @@ -139,22 +141,22 @@ function MP.reset_game_states()
pizza_discards = 0,
wait_for_enemys_furthest_blind = false,
disable_live_and_timer_hud = false,
timers_forgiven = 0,
stats = {
reroll_count = 0,
reroll_cost_total = 0,
-- Add more stats here in the future
},
}

MP.LOBBY.ready_text = localize("b_ready")
MP.LOBBY.ready_to_start = false
Comment on lines -149 to -150
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kept as requested in commit 49ce21e.

end

MP.reset_game_states()

MP.LOBBY.username = MP.UTILS.get_username()
MP.LOBBY.blind_col = MP.UTILS.get_blind_col()

MP.LOBBY.config.weekly = MP.UTILS.get_weekly()

if not SMODS.current_mod.lovely then
G.E_MANAGER:add_event(Event({
no_delete = true,
Expand Down Expand Up @@ -185,6 +187,16 @@ SMODS.Atlas({

MP.load_mp_dir("compatibility")

MP.load_mp_file("networking/action_handlers.lua")

MP.load_mp_dir("ui/components") -- Gamemodes and rulesets need these

MP.load_mp_dir("rulesets")
if MP.LOBBY.config.weekly then -- this could be a function but why bother
MP.load_mp_file("rulesets/weeklies/"..MP.LOBBY.config.weekly..".lua")
end
MP.load_mp_dir("gamemodes")

MP.load_mp_dir("objects/editions")
MP.load_mp_dir("objects/enhancements")
MP.load_mp_dir("objects/stickers")
Expand All @@ -193,18 +205,15 @@ MP.load_mp_dir("objects/decks")
MP.load_mp_dir("objects/jokers")
MP.load_mp_dir("objects/consumables")
MP.load_mp_dir("objects/challenges")
MP.load_mp_dir("networking")
MP.load_mp_dir("gamemodes")
MP.load_mp_dir("rulesets")
MP.load_mp_dir("function_overrides")
Comment on lines -196 to -199
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kept as requested in commit 49ce21e.

MP.apply_rulesets()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Kept as requested in commit 49ce21e.


MP.load_mp_dir("ui")
MP.load_mp_dir("ui/generic")
MP.load_mp_dir("ui/game")
MP.load_mp_dir("ui/lobby")
MP.load_mp_dir("ui/main_menu")

MP.load_mp_dir("function_overrides")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed MP.reset_lobby_config() function as requested in commit 49ce21e.


MP.load_mp_file("misc/disable_restart.lua")
MP.load_mp_file("misc/mod_hash.lua")

Expand Down
13 changes: 13 additions & 0 deletions gamemodes/_gamemodes.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,19 @@ MP.Gamemode = SMODS.GameObject:extend({
required_params = {
"key",
"get_blinds_by_ante", -- Define custom logic for determining Small, Big, and Boss Blind based on the ante number.
"banned_jokers",
"banned_consumables",
"banned_vouchers",
"banned_enhancements",
"banned_tags",
"banned_blinds",
"reworked_jokers",
"reworked_consumables",
"reworked_vouchers",
"reworked_enhancements",
"reworked_tags",
"reworked_blinds",
"create_info_menu"
},
class_prefix = "gamemode",
inject = function(self)
Expand Down
226 changes: 215 additions & 11 deletions gamemodes/attrition.lua
Original file line number Diff line number Diff line change
@@ -1,13 +1,217 @@
MP.Gamemode({
key = "attrition",
get_blinds_by_ante = function(self, ante, choices)
if ante >= MP.LOBBY.config.pvp_start_round then
if not MP.LOBBY.config.normal_bosses then
return choices.Small, choices.Big, "bl_mp_nemesis"
else
G.GAME.round_resets.pvp_blind_choices.Boss = true
end
end
return choices.Small, choices.Big , choices.Boss
end,
key = "attrition",
get_blinds_by_ante = function(self, ante)
if ante >= MP.LOBBY.config.pvp_start_round then
if not MP.LOBBY.config.normal_bosses then
return nil, nil, "bl_mp_nemesis"
else
G.GAME.round_resets.pvp_blind_choices.Boss = true
end
end
return nil, nil, nil
end,
banned_jokers = {
"j_mr_bones",
"j_luchador",
"j_matador",
"j_chicot",
},
banned_consumables = {},
banned_vouchers = {
"v_hieroglyph",
"v_petroglyph",
"v_directors_cut",
"v_retcon",
},
banned_enhancements = {},
banned_tags = {
"tag_boss"
},
banned_blinds = {
"bl_wall",
"bl_final_vessel"
},
reworked_jokers = {},
reworked_consumables = {},
reworked_vouchers = {},
reworked_enhancements = {},
reworked_tags = {},
reworked_blinds = {},
create_info_menu = function()
return {
{
n = G.UIT.R,
config = {
align = "tm"
},
nodes = {
{
n = G.UIT.T,
config = {
text = MP.UTILS.wrapText(localize("k_attrition_description"), 70),
scale = 0.6,
colour = G.C.UI.TEXT_LIGHT,
}
},
},
},
{
n = G.UIT.R,
config = {
minw = 0.2,
minh = 0.2
}
},
{
n = G.UIT.R,
config = {
align = "cm",
padding = 0.3
},
nodes = {
{
n = G.UIT.C,
config = {
align = "cm"
},
nodes = {
{
n = G.UIT.R,
config = {
align = "cm"
},
nodes = {
MP.UI.BackgroundGrouping(localize({ type = "variable", key = "k_ante_number", vars = { "1" }}), {
{
n = G.UIT.O,
config = {
object = MP.UI.BlindChip.small()
}
},
{
n = G.UIT.C,
config = {
minw = 0.2,
minh = 0.2
}
},
{
n = G.UIT.O,
config = {
object = MP.UI.BlindChip.big()
}
},
{
n = G.UIT.C,
config = {
minw = 0.2,
minh = 0.2
}
},
{
n = G.UIT.O,
config = {
object = MP.UI.BlindChip.random()
}
},
}, {text_scale = 0.6}),
}
},
{
n = G.UIT.R,
config = {
minw = 0.2,
minh = 0.2
}
},
{
n = G.UIT.R,
config = {
align = "cm"
},
nodes = {
MP.UI.BackgroundGrouping(localize({ type = "variable", key = "k_ante_min", vars = { "2" }}), {
{
n = G.UIT.O,
config = {
object = MP.UI.BlindChip.small()
}
},
{
n = G.UIT.C,
config = {
minw = 0.2,
minh = 0.2
}
},
{
n = G.UIT.O,
config = {
object = MP.UI.BlindChip.big()
}
},
{
n = G.UIT.C,
config = {
minw = 0.2,
minh = 0.2
}
},
{
n = G.UIT.O,
config = {
object = MP.UI.BlindChip.nemesis()
}
},
}, {text_scale = 0.6}),
}
},
},
},
{
n = G.UIT.C,
config = {
align = "cm"
},
nodes = {
{
n = G.UIT.R,
config = {
align = "cm"
},
nodes = {
MP.UI.BackgroundGrouping(localize("k_lives"), {
{
n = G.UIT.T,
config = {
text = "4",
scale = 1.5,
colour = G.C.UI.TEXT_LIGHT,
}
},
}, {text_scale = 0.6}),
}
},
}
}
},
},
{
n = G.UIT.R,
config = {
align = "bm"
},
nodes = {
{
n = G.UIT.T,
config = {
text = localize("k_values_are_modifiable"),
scale = 0.4,
colour = G.C.UI.TEXT_LIGHT,
}
},
},
},
}
end
}):inject()
Loading
Loading