Skip to content

Commit b484607

Browse files
Merge pull request #741 from icyethics/patch-1
CCD readability sprite
2 parents b8723cd + 2664072 commit b484607

File tree

6 files changed

+23
-0
lines changed

6 files changed

+23
-0
lines changed
3.17 KB
Binary file not shown.

assets/1x/intercept_sprite.png

318 Bytes
Loading
4.44 KB
Binary file not shown.

assets/2x/intercept_sprite.png

514 Bytes
Loading

lib/content.lua

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -790,6 +790,14 @@ SMODS.Atlas({
790790
px = 73,
791791
py = 95,
792792
})
793+
794+
-- CCD Clarifier Sprite
795+
SMODS.Atlas({
796+
key = "cry_clarifier",
797+
path = "intercept_sprite.png",
798+
px = 71,
799+
py = 95,
800+
})
793801
SMODS.Atlas({
794802
key = "glowingSleeve",
795803
path = "sleeve_cry_glowing.png",

lib/ui.lua

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,21 @@ SMODS.DrawStep({
228228
})
229229
SMODS.draw_ignore_keys.floating_sprite2 = true
230230

231+
-- CCD Drawstep
232+
local interceptorSprite = nil
233+
SMODS.DrawStep({
234+
key = "ccd_interceptor",
235+
order = -5,
236+
func = function(self)
237+
local card_type = self.ability.set or "None"
238+
if card_type ~= 'Default' and card_type ~= 'Enhanced' and self.playing_card then
239+
interceptorSprite = interceptorSprite or Sprite(0, 0, G.CARD_W, G.CARD_H, G.ASSET_ATLAS["cry_clarifier"], { x = 0, y = 0 })
240+
interceptorSprite.role.draw_major = self
241+
interceptorSprite:draw_shader('dissolve', nil, nil, nil, self.children.center)
242+
end
243+
end
244+
})
245+
231246
-- Make hover UI collidable - so we can detect collision and display tooltips
232247
local m = Card.move
233248
function Card:move(dt)

0 commit comments

Comments
 (0)