Skip to content

Commit

Permalink
Merge branch 'main' into unscuff-enhancement-calc
Browse files Browse the repository at this point in the history
  • Loading branch information
Aurelius7309 authored Dec 28, 2024
2 parents 69c62e3 + 8f494f8 commit 7e4f6ae
Show file tree
Hide file tree
Showing 26 changed files with 2,360 additions and 2,292 deletions.
46 changes: 23 additions & 23 deletions example_mods/Mods/AbsoluteDeck.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,30 @@
------------MOD CODE -------------------------

SMODS.Back{
name = "Absolute Deck",
key = "absolute",
pos = {x = 0, y = 3},
config = {polyglass = true},
loc_txt = {
name = "Absolute Deck",
text ={
"Start with a Deck",
"full of {C:attention,T:e_polychrome}Poly{}{C:red,T:m_glass}glass{} cards"
},
name = "Absolute Deck",
key = "absolute",
pos = {x = 0, y = 3},
config = {polyglass = true},
loc_txt = {
name = "Absolute Deck",
text ={
"Start with a Deck",
"full of {C:attention,T:e_polychrome}Poly{}{C:red,T:m_glass}glass{} cards"
},
},
apply = function()
G.E_MANAGER:add_event(Event({
func = function()
for i = #G.playing_cards, 1, -1 do
G.playing_cards[i]:set_ability(G.P_CENTERS.m_glass)
G.playing_cards[i]:set_edition({
polychrome = true
}, true, true)
end
return true
end
}))
end
apply = function()
G.E_MANAGER:add_event(Event({
func = function()
for i = #G.playing_cards, 1, -1 do
G.playing_cards[i]:set_ability(G.P_CENTERS.m_glass)
G.playing_cards[i]:set_edition({
polychrome = true
}, true, true)
end
return true
end
}))
end
}

----------------------------------------------
Expand Down
38 changes: 19 additions & 19 deletions example_mods/Mods/DeckOf4s.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@
------------MOD CODE -------------------------

SMODS.Back{
name = "Deck of fours",
key = "fours",
pos = {x = 1, y = 3},
config = {only_one_rank = '4'},
loc_txt = {
name ="Deck of fours",
text={
"Start with a Deck",
"full of {C:attention}Fours{}",
},
name = "Deck of fours",
key = "fours",
pos = {x = 1, y = 3},
config = {only_one_rank = '4'},
loc_txt = {
name ="Deck of fours",
text={
"Start with a Deck",
"full of {C:attention}Fours{}",
},
},
apply = function(self)
G.E_MANAGER:add_event(Event({
func = function()
apply = function(self)
G.E_MANAGER:add_event(Event({
func = function()
for _, card in ipairs(G.playing_cards) do
assert(SMODS.change_base(card, nil, self.config.only_one_rank))
end
return true
end
}))
end
assert(SMODS.change_base(card, nil, self.config.only_one_rank))
end
return true
end
}))
end
}

----------------------------------------------
Expand Down
24 changes: 12 additions & 12 deletions example_mods/Mods/EscapeExitButton.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@
------------MOD CODE -------------------------

function G.FUNCS.exit_button(arg_736_0)
G.SETTINGS.paused = true
G.SETTINGS.paused = true

love.event.quit()
love.event.quit()
end

local createOptionsRef = create_UIBox_options
function create_UIBox_options()
contents = createOptionsRef()
local exit_button = UIBox_button({
minw = 5,
button = "exit_button",
label = {
"Exit Game"
}
})
table.insert(contents.nodes[1].nodes[1].nodes[1].nodes, #contents.nodes[1].nodes[1].nodes[1].nodes + 1, exit_button)
return contents
contents = createOptionsRef()
local exit_button = UIBox_button({
minw = 5,
button = "exit_button",
label = {
"Exit Game"
}
})
table.insert(contents.nodes[1].nodes[1].nodes[1].nodes, #contents.nodes[1].nodes[1].nodes[1].nodes + 1, exit_button)
return contents
end

----------------------------------------------
Expand Down
30 changes: 15 additions & 15 deletions example_mods/Mods/LabyrinthDeck.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,21 @@
------------MOD CODE -------------------------

SMODS.Back{
name = "Labyrinth Deck",
key = "labyrinth",
pos = {x = 0, y = 4},
config = {hands = -3, discards = 5},
loc_txt = {
name = "Labyrinth Deck",
text = {
"{C:red}+#1#{} discards",
"{C:blue}#2#{} hands",
"every round"
}
},
loc_vars = function(self)
return { vars = { self.config.discards, self.config.hands }}
end
name = "Labyrinth Deck",
key = "labyrinth",
pos = {x = 0, y = 4},
config = {hands = -3, discards = 5},
loc_txt = {
name = "Labyrinth Deck",
text = {
"{C:red}+#1#{} discards",
"{C:blue}#2#{} hands",
"every round"
}
},
loc_vars = function(self)
return { vars = { self.config.discards, self.config.hands }}
end
}

----------------------------------------------
Expand Down
166 changes: 83 additions & 83 deletions example_mods/Mods/UltimateRandom.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
------------MOD CODE -------------------------

function randomSelect(table)
for i = 1, 5 do
math.random()
end
for i = 1, 5 do
math.random()
end
if #table == 0 then
return nil -- Table is empty
end
Expand All @@ -20,89 +20,89 @@ function randomSelect(table)
end

SMODS.Back{
name = "Ultimate Random",
key = "ultimate",
pos = {x = 4, y = 3},
config = {random = true},
loc_txt = {
name = "Ultimate Random",
text ={
"Start with a Deck",
"full of",
"{C:attention}Random{} cards"
}
name = "Ultimate Random",
key = "ultimate",
pos = {x = 4, y = 3},
config = {random = true},
loc_txt = {
name = "Ultimate Random",
text ={
"Start with a Deck",
"full of",
"{C:attention}Random{} cards"
}
},
apply = function()
G.E_MANAGER:add_event(Event({
func = function()
local trandom_m = {
G.P_CENTERS.m_stone,
G.P_CENTERS.m_steel,
G.P_CENTERS.m_glass,
G.P_CENTERS.m_gold,
G.P_CENTERS.m_bonus,
G.P_CENTERS.m_mult,
G.P_CENTERS.m_wild,
G.P_CENTERS.m_lucky,
"NOTHING"
}
local trandom_e = {
{foil = true},
{holo = true},
{polychrome = true},
"NOTHING"
}
local trandom_r = {
"A",
"K",
"Q",
"J",
"T",
"9",
"8",
"7",
"6",
"5",
"4",
"3",
"2"
}
local trandom_s = {
"C",
"D",
"H",
"S"
}
local trandom_g = {
"Red",
"Blue",
"Gold",
"Purple",
"NOTHING"
}
for i = #G.playing_cards, 1, -1 do
local random_m = randomSelect(trandom_m)
local random_e = randomSelect(trandom_e)
local random_r = randomSelect(trandom_r)
local random_s = randomSelect(trandom_s)
local random_g = randomSelect(trandom_g)
apply = function()
G.E_MANAGER:add_event(Event({
func = function()
local trandom_m = {
G.P_CENTERS.m_stone,
G.P_CENTERS.m_steel,
G.P_CENTERS.m_glass,
G.P_CENTERS.m_gold,
G.P_CENTERS.m_bonus,
G.P_CENTERS.m_mult,
G.P_CENTERS.m_wild,
G.P_CENTERS.m_lucky,
"NOTHING"
}
local trandom_e = {
{foil = true},
{holo = true},
{polychrome = true},
"NOTHING"
}
local trandom_r = {
"A",
"K",
"Q",
"J",
"T",
"9",
"8",
"7",
"6",
"5",
"4",
"3",
"2"
}
local trandom_s = {
"C",
"D",
"H",
"S"
}
local trandom_g = {
"Red",
"Blue",
"Gold",
"Purple",
"NOTHING"
}
for i = #G.playing_cards, 1, -1 do
local random_m = randomSelect(trandom_m)
local random_e = randomSelect(trandom_e)
local random_r = randomSelect(trandom_r)
local random_s = randomSelect(trandom_s)
local random_g = randomSelect(trandom_g)

G.playing_cards[i]:set_base(G.P_CARDS[random_s .. "_" .. random_r])
if random_m ~= "NOTHING" then
G.playing_cards[i]:set_ability(random_m)
end
if random_e ~= "NOTHING" then
G.playing_cards[i]:set_edition(random_e, true, true)
end
if random_g ~= "NOTHING" then
G.playing_cards[i]:set_seal(random_g, true, true)
end
end
G.playing_cards[i]:set_base(G.P_CARDS[random_s .. "_" .. random_r])
if random_m ~= "NOTHING" then
G.playing_cards[i]:set_ability(random_m)
end
if random_e ~= "NOTHING" then
G.playing_cards[i]:set_edition(random_e, true, true)
end
if random_g ~= "NOTHING" then
G.playing_cards[i]:set_seal(random_g, true, true)
end
end

return true
end
}))
end
return true
end
}))
end
}

----------------------------------------------
Expand Down
Loading

0 comments on commit 7e4f6ae

Please sign in to comment.