Skip to content

Commit 06497e4

Browse files
Combine hooks
1 parent 3c3b852 commit 06497e4

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

items/spooky.lua

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1290,16 +1290,6 @@ local rotten_egg = {
12901290
},
12911291
}
12921292
end,
1293-
init = function()
1294-
local set_costref = Card.set_cost
1295-
function Card:set_cost(...)
1296-
local c = set_costref(self, ...)
1297-
if G.GAME.cry_rotten_amount then
1298-
self.sell_cost = G.GAME.cry_rotten_amount
1299-
self.sell_cost_label = self.facing == "back" and "?" or number_format(self.sell_cost)
1300-
end
1301-
end
1302-
end,
13031293
}
13041294

13051295
local spookydeck = {

lib/overrides.lua

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,6 @@ end
505505
local sc = Card.set_cost
506506
function Card:set_cost()
507507
-- Makes the edition cost increase usually present not apply if this variable is true
508-
-- Used for some of the Jen's almanac edition decks because having the price increase apply was "unfun"
509508
if self.edition and G.GAME.modifiers.cry_no_edition_price then
510509
local m = Cryptid.deep_copy(self.edition)
511510
self.edition = nil
@@ -550,6 +549,10 @@ function Card:set_cost()
550549
if self.config and self.config.center and self.config.center.rarity == "cry_cursed" then
551550
self.sell_cost = 0
552551
self.sell_cost_label = 0
552+
--Rotten Egg
553+
elseif G.GAME.cry_rotten_amount then
554+
self.sell_cost = G.GAME.cry_rotten_amount
555+
self.sell_cost_label = self.facing == "back" and "?" or number_format(self.sell_cost)
553556
end
554557
end
555558

0 commit comments

Comments
 (0)