Skip to content

Commit 6bbc0d9

Browse files
committed
smods.is_eternal related changes
1 parent 785aa64 commit 6bbc0d9

File tree

15 files changed

+43
-43
lines changed

15 files changed

+43
-43
lines changed

items/blind.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -663,11 +663,11 @@ local scorch = {
663663
and (context.cardarea == G.play or context.cardarea == "unscored")
664664
and not G.GAME.blind.disabled
665665
then
666-
return { remove = not context.destroy_card.ability.eternal }
666+
return { remove = not SMODS.is_eternal(context.destroying_card) }
667667
end
668668
if context.discard and not G.GAME.blind.disabled then
669669
for i, card in ipairs(G.hand.highlighted) do
670-
return { remove = not card.ability.eternal }
670+
return { remove = not SMODS.is_eternal(card) }
671671
end
672672
end
673673
end,
@@ -1083,7 +1083,7 @@ local vermillion_virus = {
10831083
local idx
10841084
--Check for eligible cards (not eternal and not immune)
10851085
for i = 1, #G.jokers.cards do
1086-
if not G.jokers.cards[i].config.center.immune_to_vermillion and not G.jokers.cards[i].ability.eternal then
1086+
if not G.jokers.cards[i].config.center.immune_to_vermillion and not SMODS.is_eternal(G.jokers.cards[i]) then
10871087
eligible_cards[#eligible_cards + 1] = G.jokers.cards[i]
10881088
end
10891089
end

items/code.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1223,7 +1223,7 @@ local rework = {
12231223
return card.ability.set == "Joker"
12241224
end)
12251225
return #cards == 1
1226-
and not cards[1].ability.eternal
1226+
and not SMODS.is_eternal(cards[1])
12271227
and cards[1].ability.name
12281228
~= ("cry-meteor" or "cry-exoplanet" or "cry-stardust" or "cry_cursed" or ("Diet Cola" or Card.get_gameset(
12291229
card
@@ -1385,7 +1385,7 @@ local merge = {
13851385
if
13861386
#hand ~= 1
13871387
or #consumeables ~= 1
1388-
or consumeables[1].ability.eternal
1388+
or SMODS.is_eternal(consumeables[1])
13891389
or consumeables[1].ability.set == "Unique"
13901390
then
13911391
return false
@@ -1488,7 +1488,7 @@ local commit = {
14881488
return card.ability.set == "Joker" and not card.getting_sliced
14891489
end)
14901490
return #jokers == 1
1491-
and not jokers[1].ability.eternal
1491+
and not SMODS.is_eternal(jokers[1])
14921492
and not (type(jokers[1].config.center.rarity) == "number" and jokers[1].config.center.rarity >= 5)
14931493
end,
14941494
use = function(self, card, area, copier)
@@ -5029,7 +5029,7 @@ local cut = {
50295029
if
50305030
G.consumeables.cards[i].ability.set == "Code"
50315031
and not G.consumeables.cards[i].getting_sliced
5032-
and not G.consumeables.cards[i].ability.eternal
5032+
and not SMODS.is_eternal(G.consumeables.cards[i])
50335033
then
50345034
destructable_codecard[#destructable_codecard + 1] = G.consumeables.cards[i]
50355035
end

items/epic.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1455,7 +1455,7 @@ local curse_sob = {
14551455
check_for_unlock = function(self, args)
14561456
if Cryptid.safe_get(G, "jokers") then
14571457
for i = 1, #G.jokers.cards do
1458-
if G.jokers.cards[i].config.center.key == "j_obelisk" and G.jokers.cards[i].ability.eternal then
1458+
if G.jokers.cards[i].config.center.key == "j_obelisk" and SMODS.is_eternal(G.jokers.cards[i]) then
14591459
unlock_card(self)
14601460
end
14611461
end
@@ -2034,7 +2034,7 @@ local fleshpanopticon = {
20342034
return true
20352035
end,
20362036
}))
2037-
if not card.ability.eternal then
2037+
if not SMODS.is_eternal(card) then
20382038
G.E_MANAGER:add_event(Event({
20392039
func = function()
20402040
play_sound("tarot1")

items/exotic.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ local gateway = {
2323
use = function(self, card, area, copier)
2424
local deletable_jokers = {}
2525
for k, v in pairs(G.jokers.cards) do
26-
if not v.ability.eternal then
26+
if not SMODS.is_eternal(v) then
2727
deletable_jokers[#deletable_jokers + 1] = v
2828
end
2929
end
@@ -904,7 +904,7 @@ local stella_mortis = {
904904
if
905905
G.consumeables.cards[i].ability.set == "Planet"
906906
and not G.consumeables.cards[i].getting_sliced
907-
and not G.consumeables.cards[i].ability.eternal
907+
and not SMODS.is_eternal(G.consumeables.cards[i])
908908
then
909909
destructable_planet[#destructable_planet + 1] = G.consumeables.cards[i]
910910
end

items/m.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1657,7 +1657,7 @@ local macabre = {
16571657
and not v:is_jolly()
16581658
and v.config.center.key ~= "j_cry_mprime"
16591659
and not (
1660-
v.ability.eternal
1660+
SMODS.is_eternal(v)
16611661
or v.getting_sliced
16621662
or Cryptid.safe_get(v.config.center, "pools", "M")
16631663
)

items/misc.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ local abstract = {
236236
context.cardarea == G.hand
237237
and context.before
238238
and not card.ability.extra.marked
239-
and not card.ability.eternal
239+
and not SMODS.is_eternal(card)
240240
and not card.ability.extra.survive --this presvents repitition of shatter chance by shutting it out once it confirms to "survive"
241241
and SMODS.pseudorandom_probability(
242242
card,
@@ -268,7 +268,7 @@ local abstract = {
268268
and context.cardarea == G.hand
269269
and card.ability.extra.marked
270270
and not context.repetition
271-
and not card.ability.eternal
271+
and not SMODS.is_eternal(card)
272272
and not (card.will_shatter or card.destroyed or card.shattered)
273273
then
274274
G.E_MANAGER:add_event(Event({
@@ -689,7 +689,7 @@ local baneful1 = {
689689
if G.jokers and G.jokers.cards then
690690
for i = #G.jokers.cards, 1, -1 do
691691
if
692-
not (G.jokers.cards[i].ability.eternal or G.jokers.cards[i].config.center.rarity == "cry_cursed")
692+
not (SMODS.is_eternal(G.jokers.cards[i]) or G.jokers.cards[i].config.center.rarity == "cry_cursed")
693693
then
694694
return false
695695
end
@@ -1869,7 +1869,7 @@ local glass_edition = {
18691869
and context.other_card == card --animation-wise this looks weird sometimes
18701870
then
18711871
if
1872-
not card.ability.eternal
1872+
not SMODS.is_eternal(card)
18731873
and not (
18741874
pseudorandom(pseudoseed("cry_fragile"))
18751875
> ((self.config.shatter_chance - 1) / self.config.shatter_chance)
@@ -1899,7 +1899,7 @@ local glass_edition = {
18991899
end
19001900
if context.main_scoring and context.cardarea == G.play then
19011901
if
1902-
not card.ability.eternal
1902+
not SMODS.is_eternal(card)
19031903
and (
19041904
pseudorandom(pseudoseed("cry_fragile"))
19051905
> ((self.config.shatter_chance - 1) / self.config.shatter_chance)

items/misc_joker.lua

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ local queensgambit = {
433433
return true
434434
end,
435435
}))
436-
return { remove = not context.destroying_card.ability.eternal }
436+
return { remove = not SMODS.is_eternal(context.destroying_card) }
437437
end
438438
end
439439
if context.forcetrigger then
@@ -1823,7 +1823,7 @@ local sus = {
18231823
if is_impostor(v) then
18241824
table.insert(king_of_hearts_cards, v)
18251825
end
1826-
if not v.ability.eternal and not (v.sus and #king_of_hearts_cards == 0) and not is_impostor(v) then
1826+
if not SMODS.is_eternal(v) and not (v.sus and #king_of_hearts_cards == 0) and not is_impostor(v) then
18271827
table.insert(destroyed_cards, v)
18281828
end
18291829
end
@@ -2898,7 +2898,7 @@ local unjust_dagger = {
28982898
and not (context.blueprint_card or self).getting_sliced
28992899
and my_pos
29002900
and G.jokers.cards[my_pos - 1]
2901-
and not G.jokers.cards[my_pos - 1].ability.eternal
2901+
and not SMODS.is_eternal(G.jokers.cards[my_pos-1])
29022902
and not G.jokers.cards[my_pos - 1].getting_sliced
29032903
then
29042904
local sliced_card = G.jokers.cards[my_pos - 1]
@@ -3015,7 +3015,7 @@ local monkey_dagger = {
30153015
and not (context.blueprint_card or self).getting_sliced
30163016
and my_pos
30173017
and G.jokers.cards[my_pos - 1]
3018-
and not G.jokers.cards[my_pos - 1].ability.eternal
3018+
and not SMODS.is_eternal(G.jokers.cards[my_pos-1])
30193019
and not G.jokers.cards[my_pos - 1].getting_sliced
30203020
then
30213021
local sliced_card = G.jokers.cards[my_pos - 1]
@@ -3132,7 +3132,7 @@ local pirate_dagger = {
31323132
and not (context.blueprint_card or self).getting_sliced
31333133
and my_pos
31343134
and G.jokers.cards[my_pos + 1]
3135-
and not G.jokers.cards[my_pos + 1].ability.eternal
3135+
and not SMODS.is_eternal(G.jokers.cards[my_pos - 1])
31363136
and not G.jokers.cards[my_pos + 1].getting_sliced
31373137
then
31383138
local sliced_card = G.jokers.cards[my_pos + 1]
@@ -9656,7 +9656,7 @@ local arsonist = {
96569656
if context.destroying_card then
96579657
local eval = evaluate_poker_hand(context.full_hand)
96589658
if next(eval["Full House"]) then
9659-
return not context.destroying_card.ability.eternal
9659+
return not SMODS.is_eternal(context.destroying_card)
96609660
end
96619661
end
96629662
end,
@@ -9875,7 +9875,7 @@ local huntingseason = { -- If played hand contains three cards, destroy the midd
98759875
and not context.blueprint
98769876
and not context.retrigger_joker
98779877
then
9878-
return { remove = not context.destroy_card.ability.eternal }
9878+
return { remove = not SMODS.is_eternal(context.destroy_card) }
98799879
end
98809880
end,
98819881
cry_credits = {

items/spectral.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ local trade = {
324324
can_use = function(self, card)
325325
local usable_count = 0
326326
for _, v in pairs(G.vouchers.cards) do
327-
if not v.ability.eternal then
327+
if not SMODS.is_eternal(v) then
328328
usable_count = usable_count + 1
329329
end
330330
end
@@ -350,7 +350,7 @@ local trade = {
350350
end
351351
end
352352
end
353-
if v.ability.eternal then
353+
if SMODS.is_eternal(v) then
354354
can_use = false
355355
end
356356
if can_use then
@@ -492,7 +492,7 @@ local replica = {
492492
}))
493493
end
494494
for i = 1, #G.hand.cards do
495-
if not G.hand.cards[i].ability.eternal then
495+
if not SMODS.is_eternal(G.hand.cards[i]) then
496496
G.E_MANAGER:add_event(Event({
497497
func = function()
498498
copy_card(chosen_card, G.hand.cards[i])

items/spooky.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -759,7 +759,7 @@ local flickering = {
759759
return { vars = { 5, card.ability.flick_tally or 5 } }
760760
end,
761761
apply = function(self, card, val)
762-
if not card.ability.eternal or G.GAME.modifiers.cry_sticker_sheet then
762+
if not SMODS.is_eternal(card) or G.GAME.modifiers.cry_sticker_sheet then
763763
card.ability[self.key] = val
764764
if card.ability[self.key] then
765765
card.ability.flick_tally = 5
@@ -1118,7 +1118,7 @@ local ghost = {
11181118
card:start_dissolve()
11191119
for i = 1, #G.jokers.cards do
11201120
if G.jokers.cards[i].ability.cry_possessed then
1121-
if G.jokers.cards[i].ability.eternal then
1121+
if SMODS.is_eternal(G.jokers.cards[i]) then
11221122
G.jokers.cards[i].ability.cry_possessed = nil
11231123
else
11241124
G.jokers.cards[i]:start_dissolve()
@@ -1389,7 +1389,7 @@ local candy_dagger = {
13891389
and not (context.blueprint_card or self).getting_sliced
13901390
and my_pos
13911391
and G.jokers.cards[my_pos + 1]
1392-
and not G.jokers.cards[my_pos + 1].ability.eternal
1392+
and not SMODS.is_eternal(G.jokers.cards[my_pos + 1])
13931393
and not G.jokers.cards[my_pos + 1].getting_sliced
13941394
then
13951395
local sliced_card = G.jokers.cards[my_pos + 1]

items/stake.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@ return {
363363
local temp_hand = {}
364364
local hasHand = false
365365
for k, v in ipairs(G.hand.cards) do
366-
if not v.ability.eternal then
366+
if not SMODS.is_eternal(v) then
367367
temp_hand[#temp_hand + 1] = v
368368
hasHand = true
369369
end

0 commit comments

Comments
 (0)