Skip to content

Commit 98634f5

Browse files
authored
Merge pull request #460 from DigitalDetective47/AntePreview
Add support for Next Ante Preview
2 parents f7b2cc2 + 40af52e commit 98634f5

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

lib/cross-mod.lua

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,36 @@ if (SMODS.Mods["malverk"] or {}).can_load then
103103
},
104104
})
105105
end
106+
107+
--Make extra modifiers display on the Next Ante Preview
108+
if (SMODS.Mods["AntePreview"] or {}).can_load then
109+
local predict_hook = predict_next_ante
110+
function predict_next_ante()
111+
local small = "bl_small"
112+
local big = "bl_big"
113+
if G.GAME.modifiers.cry_big_boss_rate and pseudorandom('cry_big_boss') < G.GAME.modifiers.cry_big_boss_rate then
114+
big = get_new_boss()
115+
elseif G.GAME.modifiers.cry_rush_hour_ii then
116+
small = get_new_boss()
117+
big = get_new_boss()
118+
end
119+
local predictions = predict_hook()
120+
if G.GAME.modifiers.cry_no_tags then
121+
for _, pred in pairs(predictions) do
122+
pred.tag = nil
123+
end
124+
end
125+
predictions.Small.blind = small
126+
predictions.Big.blind = big
127+
if G.P_BLINDS[predictions.Small.blind].boss then
128+
G.GAME.bosses_used[predictions.Small.blind] = G.GAME.bosses_used[predictions.Small.blind] - 1
129+
end
130+
if G.P_BLINDS[predictions.Big.blind].boss then
131+
G.GAME.bosses_used[predictions.Big.blind] = G.GAME.bosses_used[predictions.Big.blind] - 1
132+
end
133+
if G.GAME.modifiers.cry_no_small_blind then
134+
predictions.Small = nil
135+
end
136+
return predictions
137+
end
138+
end

0 commit comments

Comments
 (0)