Skip to content

Commit a73ff98

Browse files
authored
Fix abstract card crash
Fixed abstract cards crashing the game when rolling to destroy them in `Card:calculate_abstract_break()`; this was caused by the function inappropriately trying to reference the nonexistent variable `card` instead of `self`.
1 parent 8021898 commit a73ff98

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

items/misc.lua

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2564,11 +2564,12 @@ return {
25642564
if self.config.center_key == "m_cry_abstract" and not self.ability.extra.marked then
25652565
if
25662566
SMODS.pseudorandom_probability(
2567-
card,
2567+
self,
25682568
"cry_abstract_destroy2",
25692569
1,
2570-
card and card.ability and card.ability.extra and card.ability.extra.odds_after_round or 4,
2571-
"Abstract Card"
2570+
self.ability and self.ability.extra and self.ability.extra.odds_after_round
2571+
or self.config.extra.odds_after_round
2572+
or 4
25722573
)
25732574
then
25742575
self.ability.extra.marked = true

0 commit comments

Comments
 (0)