Skip to content

Commit d9df255

Browse files
committed
fix enhancement tarot forcetrigger
1 parent 5026616 commit d9df255

File tree

5 files changed

+8
-36
lines changed

5 files changed

+8
-36
lines changed

items/code.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2609,7 +2609,6 @@ local assemble = {
26092609
trigger = "after",
26102610
func = function()
26112611
local text = G.FUNCS.get_poker_hand_info(G.play.cards)
2612-
print(text)
26132612
upgrade_hand = G.GAME.hands[text]
26142613
or (G.PROFILES[G.SETTINGS.profile].cry_none and G.GAME.hands["cry_None"])
26152614
upgrade_hand.mult = upgrade_hand.mult + #G.jokers.cards

items/misc.lua

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@ local eclipse = {
8080
return { vars = { card and card.ability.max_highlighted or self.config.max_highlighted } }
8181
end,
8282
demicoloncompat = true,
83-
force_use = function(self, card, area)
84-
card:use_consumeable(area)
85-
end,
8683
}
8784
-- Light (Enhancement)
8885
-- When triggered with 5 other cards, gain 0.2 Xmult
@@ -174,9 +171,6 @@ local seraph = {
174171
return { vars = { card and card.ability.max_highlighted or self.config.max_highlighted } }
175172
end,
176173
demicoloncompat = true,
177-
force_use = function(self, card, area)
178-
card:use_consumeable(area)
179-
end,
180174
}
181175
-- Abstract (Enhancement)
182176
-- Has its own rank/suit
@@ -309,9 +303,6 @@ local instability = {
309303
return { vars = { card and card.ability.max_highlighted or self.config.max_highlighted } }
310304
end,
311305
demicoloncompat = true,
312-
force_use = function(self, card, area)
313-
card:use_consumeable(area)
314-
end,
315306
}
316307

317308
-- Blessing

lib/forcetrigger.lua

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -937,17 +937,19 @@ function Cryptid.forcetrigger(card, context)
937937
elseif card.ability.consumeable and Cryptid.forcetriggerConsumableCheck(card) then
938938
G.cry_force_use = true
939939
if
940-
(card.ability.consumeable.max_highlighted or card.ability.name == "Aura")
941-
and not card.config.center.original_mod
940+
(card.ability.consumeable.max_highlighted
941+
or card.ability.name == "Aura") and not card.config.center.bulk_use
942942
then --Cards that require cards in hand to be selected
943943
local _cards = {}
944944
local targets = {}
945945

946946
--Get all cards that we can target
947947
for k, v in ipairs(G.hand.cards) do
948948
if
949-
not ((card.ability.name == "Aura") and (v.edition or v.will_be_editioned))
950-
and not v.will_be_destroyed
949+
not (
950+
(card.ability.name == "Aura")
951+
and (v.edition or v.will_be_editioned)
952+
) and not v.will_be_destroyed
951953
then
952954
_cards[#_cards + 1] = v
953955
end
@@ -1002,9 +1004,7 @@ function Cryptid.forcetrigger(card, context)
10021004
local ggpn = G.GAME.probabilities.normal
10031005
G.GAME.probabilities.normal = 1e9
10041006

1005-
if not card.config.center.force_use then
1006-
card:use_consumeable()
1007-
else
1007+
if not card.config.center.force_use then card:use_consumeable() else
10081008
card.config.center:force_use(card, card.area)
10091009
end
10101010

lib/misc.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -969,7 +969,7 @@ function Cryptid.get_highlighted_cards(areas, ignore, min, max, blacklist, seed)
969969
for i, v in pairs(cards) do
970970
v.f_use_order = i
971971
end
972-
pseudoshuffle(cards, pseudoseed("forccehighlight" or seed))
972+
pseudoshuffle(cards, pseudoseed("forcehighlight" or seed))
973973
local actual = {}
974974
for i = 1, max do
975975
if cards[i] and not cards[i].checked and actual ~= ignore then

lovely/misc.toml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -683,22 +683,4 @@ payload = '''
683683
local safe_seal = type(other.ability.seal) == "table" and other.ability.seal or {}
684684
for k, v in pairs(safe_seal) do
685685
'''
686-
match_indent = true
687-
688-
689-
[[patches]]
690-
[patches.pattern]
691-
target = "card.lua"
692-
pattern = '''
693-
for i=1, #G.hand.highlighted do
694-
G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.1,func = function() G.hand.highlighted[i]:set_ability(G.P_CENTERS[self.ability.consumeable.mod_conv]);return true end }))
695-
end
696-
'''
697-
position = "at"
698-
payload = '''
699-
local cards = Cryptid.get_highlighted_cards({G.hand}, self, 1, self.ability.max_highlighted)
700-
for i=1, #cards do
701-
G.E_MANAGER:add_event(Event({trigger = 'after',delay = 0.1,func = function() cards[i]:set_ability(G.P_CENTERS[self.ability.consumeable.mod_conv]);return true end }))
702-
end
703-
'''
704686
match_indent = true

0 commit comments

Comments
 (0)