Skip to content

Commit f78548d

Browse files
committed
some spectral stuff
1 parent 8ce3cee commit f78548d

File tree

6 files changed

+33
-10
lines changed

6 files changed

+33
-10
lines changed

items/misc.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1827,8 +1827,8 @@ local glass_edition = {
18271827
loc_vars = function(self, info_queue, card)
18281828
return {
18291829
vars = {
1830-
cry_prob(card.ability.cry_prob, card.ability.extra.odds, card.ability.cry_rigged),
1831-
card.ability.extra.odds,
1830+
cry_prob(card.ability.cry_prob, card.ability.odds, card.ability.cry_rigged),
1831+
card.ability.odds,
18321832
card and card.edition and card.edition.x_mult or self.config.x_mult,
18331833
},
18341834
}
@@ -1846,7 +1846,7 @@ local glass_edition = {
18461846
if
18471847
not card.ability.eternal
18481848
and pseudorandom("cry_fragile_destroy")
1849-
< cry_prob(card.ability.cry_prob, card.ability.extra.odds, card.ability.cry_rigged) / card.ability.extra.odds
1849+
< cry_prob(card.ability.cry_prob, card.ability.odds, card.ability.cry_rigged) / card.ability.odds
18501850
then
18511851
-- this event call might need to be pushed later to make more sense
18521852
G.E_MANAGER:add_event(Event({

items/misc_joker.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4017,7 +4017,7 @@ local rnjoker = {
40174017
cards = { context.other_card }
40184018
end
40194019
for i2, j2 in ipairs(cards) do
4020-
if j2:is_face() then
4020+
if type(j2) == "table" and j2:is_face() then
40214021
cond_passed = true
40224022
times_passed = times_passed + 1
40234023
end

items/spectral.lua

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,14 +241,23 @@ local hammerspace = {
241241
name = "cry-Hammerspace",
242242
key = "hammerspace",
243243
pos = { x = 4, y = 3 },
244-
config = {},
244+
config = { extra = 2 },
245245
cost = 4,
246246
order = 453,
247247
atlas = "atlasnotjokers",
248+
loc_vars = function(self, _, card)
249+
return {
250+
vars = {
251+
number_format(card.ability.extra),
252+
number_format(G.GAME.hammerspace_mod_price)
253+
}
254+
}
255+
end
248256
can_use = function(self, card)
249257
return #G.hand.cards > 0
250258
end,
251259
use = function(self, card, area, copier)
260+
G.GAME.hammerspace_mod_price = (G.GAME.hammerspace_mod_price or 0) + card.ability.extra
252261
local used_consumable = copier or card
253262
check_for_unlock({ cry_used_consumable = "c_cry_hammerspace" })
254263
G.E_MANAGER:add_event(Event({
@@ -458,17 +467,25 @@ local replica = {
458467
name = "cry-Replica",
459468
key = "replica",
460469
pos = { x = 1, y = 1 },
461-
config = {},
470+
config = { extra = 1 },
462471
cost = 4,
463472
order = 455,
464473
atlas = "atlasnotjokers",
474+
loc_vars = function(self, _, card)
475+
return {
476+
vars = {
477+
number_format(card.ability.extra)
478+
}
479+
}
480+
end,
465481
can_use = function(self, card)
466482
return #G.hand.cards > 0
467483
end,
468484
use = function(self, card, area, copier)
469485
local used_consumable = copier or card
470486
check_for_unlock({ cry_used_consumable = "c_cry_replica" })
471487
local chosen_card = pseudorandom_element(G.hand.cards, pseudoseed("cry_replica_choice"))
488+
G.hand.config.card_limit = G.hand.config.card_limit - card.ability.extra
472489
G.E_MANAGER:add_event(Event({
473490
trigger = "after",
474491
delay = 0.4,

lib/misprintize.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ function Cryptid.manipulate(card, args)
428428
end
429429
end
430430
elseif (type(v) == "table" and v.tetrate) or type(v) == "number" then
431-
if to_big(card.ability[i]) > to_big(v) then
431+
if to_big(card.ability[i] or 0) > to_big(v or 0) then
432432
card.ability[i] = Cryptid.sanity_check(v, Cryptid.is_card_big(card))
433433
end
434434
end

lib/overrides.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,9 @@ function Card:set_cost()
495495
if self.ability.set == "Planet" and G.GAME.used_vouchers.v_cry_pacclimator then
496496
self.cost = 0
497497
end
498-
498+
if self.ability.consumeable and G.GAME.hammerspace_mod_price then
499+
self.cost = self.cost + G.GAME.hammerspace_mod_price
500+
end
499501
--Makes Cursed Jokers always sell for $0
500502
if self.config and self.config.center and self.config.center.rarity == "cry_cursed" then
501503
self.sell_cost = 0

localization/en-us.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1526,8 +1526,9 @@ return {
15261526
text = {
15271527
"When a {C:attention}Booster Pack{} is opened,",
15281528
"{C:green}#1# in #2#{} chance to create",
1529-
"a random {C:dark_edition}Negative{} card",
1530-
"corresponding to its {C:attention}type{}",
1529+
"a random card corresponding",
1530+
"to its {C:attention}type{}",
1531+
"{C:inactive}(Must have room){}"
15311532
},
15321533
},
15331534
j_cry_discreet = {
@@ -3422,6 +3423,8 @@ return {
34223423
"Apply random {C:attention}consumables{}",
34233424
"as if they were {C:dark_edition}Enhancements{}",
34243425
"to cards held in hand",
3426+
"Consumables cost {C:attention}$#1#{} more",
3427+
"{C:inactive}(Currently {C:attention}$#2#{C:inactive}){}"
34253428
},
34263429
},
34273430
c_cry_lock = {
@@ -3448,6 +3451,7 @@ return {
34483451
"held in hand",
34493452
"to a {C:attention}random{}",
34503453
"card held in hand",
3454+
"{C:red}-#1#{} hand size"
34513455
},
34523456
},
34533457
c_cry_ritual = {

0 commit comments

Comments
 (0)