This repository was archived by the owner on May 22, 2024. It is now read-only.
forked from AuroraKy/CelesteCardCollection
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjokers.lua
126 lines (108 loc) · 4.2 KB
/
jokers.lua
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
--- STEAMODDED HEADER
--- SECONDARY MOD FILE
----------------------------------------------
------------MOD CODE -------------------------
--- Descriptions ---
local loc_seeker = {
["name"] = "Seeker",
["text"] = {
[1] = "If {C:attention}Blind{} is selected with",
[2] = "{C:money}$4{} or less, create a",
[3] = "{C:tarot}Hanged Man{}"
}
}
local loc_feather = {
["name"] = "Feather",
["text"] = {
[1] = "{X:mult,C:white} X2 {} Mult when",
[2] = "{C:attention}0{} discards",
[3] = "remaining"
}
}
local loc_bird = {
["name"] = "Bird",
["text"] = {
[1] = "Whenever a {C:planet}Planet{} card",
[2] = "is used, draw {C:attention}3{} cards",
}
}
-- Seeker Start
-- SMODS.Joker:new(name, slug, config, spritePos, loc_txt, rarity, cost, unlocked, discovered, blueprint_compat, eternal_compat)
local joker_seeker = SMODS.Joker:new("Seeker", "seeker", {} , {
x = 1,
y = 0
}, loc_seeker, 2, 6, true, true, true, true, "", "b_cccjokers")
joker_seeker:register()
SMODS.Jokers.j_seeker.set_ability = function(self, context)
sendDebugMessage("Hello !", 'MyLogger')
end
SMODS.Jokers.j_seeker.tooltip = function(self, info_queue)
info_queue[#info_queue+1] = G.P_CENTERS.c_hanged_man
end
SMODS.Jokers.j_seeker.calculate = function(self, context)
if context.setting_blind and #G.consumeables.cards + G.GAME.consumeable_buffer < G.consumeables.config.card_limit then
if G.GAME.dollars <= 4 then
G.GAME.consumeable_buffer = G.GAME.consumeable_buffer + 1
return {
G.E_MANAGER:add_event(Event({
func = (function()
G.E_MANAGER:add_event(Event({
func = function()
local card = create_card('Tarot', G.consumeables, nil, nil, nil, nil, 'c_hanged_man', 'see')
card:add_to_deck()
G.consumeables:emplace(card)
G.GAME.consumeable_buffer = 0
return true
end}))
card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = localize('k_plus_tarot'), colour = G.C.PURPLE})
return true
end)}))}
end
end
end
-- Feather Start
local joker_feather = SMODS.Joker:new("Feather", "feather", { atlas="b_cccjokers" }, {
x = 0,
y = 0
}, loc_feather, 2, 6, true, true, true, true, "", "b_cccjokers")
joker_feather:register()
SMODS.Jokers.j_feather.set_ability = function(self, context)
sendDebugMessage("Hello !", 'MyLogger')
end
SMODS.Jokers.j_feather.calculate = function(self, context)
if SMODS.end_calculate_context(context) then
if G.GAME.current_round.discards_left == 0 then
return {
message = localize{type='variable',key='a_xmult',vars={2}},
Xmult_mod = 2
}
end
end
end
-- Bird Start
local joker_bird = SMODS.Joker:new("Bird", "bird", { atlas="b_cccjokers" }, {
x = 2,
y = 0
}, loc_bird, 3, 8, true, true, true, true, "", "b_cccjokers")
joker_bird:register()
SMODS.Jokers.j_bird.set_ability = function(self, context)
sendDebugMessage("Hello !", 'MyLogger')
end
SMODS.Jokers.j_bird.calculate = function(self, context)
if context.using_consumeable then
if context.consumeable.ability.set == 'Planet' then
if G.STATE == G.STATES.TAROT_PACK or G.STATE == G.STATES.SPECTRAL_PACK or G.STATES.DRAW_TO_HAND then
return {
G.E_MANAGER:add_event(Event({
func = function()
card_eval_status_text(context.blueprint_card or self, 'extra', nil, nil, nil, {message = "+3 Cards", colour = G.C.FILTER})
G.FUNCS.draw_from_deck_to_hand(3)
return true
end}))}
end
end
end
end
sendDebugMessage("[CCC] Jokers loaded")
----------------------------------------------
------------MOD CODE END----------------------