-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathenhancements.lua
More file actions
54 lines (51 loc) · 1.48 KB
/
Copy pathenhancements.lua
File metadata and controls
54 lines (51 loc) · 1.48 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
SMODS.Atlas {
key = "wafflemod_enhancementAtlas",
path = "enhancements.png",
px = 71,
py = 95,
}
SMODS.Shader {
key = "monochrome",
path = "monochrome.fs"
}
-- Monochrome
SMODS.Enhancement {
key = "monochrome",
atlas = "wafflemod_enhancementAtlas",
pos = { x = 1, y = 0 },
no_suit = true,
config = { extra = {
retriggers = 1
} },
loc_vars = function(self, info_queue, card)
return { vars = { card.ability.extra.retriggers } }
end,
calculate = function(self, card, context)
if context.repetition then
return {
repetitions = card.ability.extra.retriggers,
}
end
end,
}
SMODS.DrawStep { -- Done in a drawstep so it happens after the normal-colored front layer
key = "monochrome_shader_step",
order = 21,
func = function (card, layer)
if SMODS.has_enhancement(card, "m_wafflemod_monochrome") and card.children and card.children.front then
card.children.front:draw_shader('wafflemod_monochrome', nil, card.ARGS.send_to_shader)
end
end,
conditions = {
facing = 'front'
}
}
-- Scribbled
SMODS.Enhancement {
key = "scribbled",
atlas = "wafflemod_enhancementAtlas"
}
local card_is_face_ref = Card.is_face
function Card:is_face(from_boss)
return card_is_face_ref(self, from_boss) or SMODS.has_enhancement(self, "m_wafflemod_scribbled")
end