-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmisc.lua
More file actions
99 lines (94 loc) · 2.66 KB
/
Copy pathmisc.lua
File metadata and controls
99 lines (94 loc) · 2.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
--[[
For various calls that don't need their own file
]]--
--Shonen Rarity
SMODS.Rarity{
key = "shonen",
default_weight = .01,
badge_colour = HEX("FA6230"),
pools = {["Joker"] = true},
get_weight = function(self, weight, object_type)
return weight
end,
}
--Shonen Booster
SMODS.Booster{
name = "Jump Pack",
key = "jumppack_normal_1",
kind = "Joker",
atlas = "ShonenBooster",
pos = { x = 0, y = 0 },
config = { extra = 2, choose = 1 },
cost = 4,
order = 1,
weight = .15,
unlocked = true,
discovered = true,
create_card = function(self, card)
if shonen_joke.config.shon_rare_rarity then
local pool = get_current_pool("Joker", 3)
local shonen_jokers = {}
for i = 1, #pool do
if string.sub(pool[i], 1, 7) == 'j_shon_' then
shonen_jokers[#shonen_jokers+1] = pool[i]
end
end
local shonen_joker = pseudorandom_element(shonen_jokers, pseudoseed('shonen'..G.GAME.round_resets.ante))
return {set = "Joker", area = G.pack_cards, skip_materialize = true, key = shonen_joker or 'j_shon_roboco'}
else
return {set = "Joker", area = G.pack_cards, skip_materialize = true, rarity = 'shon_shonen'}
end
end,
loc_vars = function(self, info_queue, card)
return { vars = { self.config.choose, card.ability.extra} }
end,
group_key = "k_shon_jump_pack",
}
--custom color for Shonen Jokers
local shonencolors = loc_colour
function loc_colour(_c, _default)
if not G.ARGS.LOC_COLOURS then
shonencolors()
end
G.ARGS.LOC_COLOURS["shonen"] = HEX("FA6230")
return shonencolors(_c, _default)
end
--called to ensure crashes don't happen
loc_colour()
--Shonen Tag
SMODS.Tag {
object_type = "Tag",
atlas = "ShonenTag",
pos = { x = 0, y = 0 },
config = { type = "new_blind_choice" },
key = "shonen_tag",
min_ante = 2,
discovered = true,
loc_vars = function(self, info_queue)
info_queue[#info_queue + 1] = { set = "Other", key = "p_shon_jumppack_normal_1", specific_vars = { 1, 2,} }
return { vars = {} }
end,
apply = function(self, tag, context)
if context and context.type == "new_blind_choice" then
tag:yep("+", G.ARGS.LOC_COLOURS.shonen, function()
local key = "p_shon_jumppack_normal_1"
local card = Card(
G.play.T.x + G.play.T.w / 2 - G.CARD_W * 1.27 / 2,
G.play.T.y + G.play.T.h / 2 - G.CARD_H * 1.27 / 2,
G.CARD_W * 1.27,
G.CARD_H * 1.27,
G.P_CARDS.empty,
G.P_CENTERS[key],
{ bypass_discovery_center = true, bypass_discovery_ui = true }
)
card.cost = 0
card.from_tag = true
G.FUNCS.use_card({ config = { ref_table = card } })
card:start_materialize()
return true
end)
tag.triggered = true
return true
end
end,
}