Skip to content

Commit bf9d5c8

Browse files
committed
move seed functionality to new apis
1 parent 1a9a97c commit bf9d5c8

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

lib/calculate.lua

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,7 @@ function eval_card(card, context)
1414
if card.will_shatter then
1515
return {}, {}
1616
end
17-
-- Store old probability for later reference
18-
local ggpn = G.GAME.probabilities.normal
19-
if card.ability.cry_rigged then
20-
G.GAME.probabilities.normal = 1e9
21-
end
2217
local ret, post = ec(card, context)
23-
if card.ability.cry_rigged then
24-
G.GAME.probabilities.normal = ggpn
25-
end
2618
return ret, post
2719
end
2820

@@ -367,12 +359,6 @@ function Card:cry_double_scale_calc(orig_ability, in_context_scaling)
367359
local obj = G.jokers.cards[i].config.center
368360
-- found one!
369361
if obj.cry_scale_mod and type(obj.cry_scale_mod) == "function" then
370-
-- rig the probabilities in case that matters for the joker's scaling function
371-
local ggpn = G.GAME.probabilities.normal
372-
if G.jokers.cards[i].ability.cry_rigged then
373-
G.GAME.probabilities.normal = 1e9
374-
end
375-
376362
-- 'o' will be the new factor that the joker should scale by next time
377363
local o = obj:cry_scale_mod(
378364
G.jokers.cards[i],
@@ -383,11 +369,6 @@ function Card:cry_double_scale_calc(orig_ability, in_context_scaling)
383369
new_scale_base
384370
)
385371

386-
-- return probabilities to normal
387-
if G.jokers.cards[i].ability.cry_rigged then
388-
G.GAME.probabilities.normal = ggpn
389-
end
390-
391372
-- the function returned a value, do the scale setting with it
392373
if o then
393374
-- set the scale factor field to 'o'
@@ -421,18 +402,11 @@ function Card:cry_double_scale_calc(orig_ability, in_context_scaling)
421402
-- now, let's check for repetitions on the scale-affecting jokers
422403
local reps = {}
423404
for j = 1, #G.jokers.cards do
424-
local ggpn = G.GAME.probabilities.normal
425-
if G.jokers.cards[j].ability.cry_rigged then
426-
G.GAME.probabilities.normal = 1e9
427-
end
428405
-- check if another joker is retriggering our scale-affecting joker
429406
local check = cj(
430407
G.jokers.cards[j],
431408
{ retrigger_joker_check = true, other_card = G.jokers.cards[i] }
432409
)
433-
if G.jokers.cards[j].ability.cry_rigged then
434-
G.GAME.probabilities.normal = ggpn
435-
end
436410
-- keep track of which joker retriggers the scale-joker
437411
if type(check) == "table" then
438412
reps[j] = check and check.repetitions and check or 0
@@ -460,11 +434,6 @@ function Card:cry_double_scale_calc(orig_ability, in_context_scaling)
460434
if (type(rep) == "table") and rep.repetitions and (rep.repetitions > 0) then
461435
for r = 1, rep.repetitions do
462436
card_eval_status_text(rep.card, "jokers", nil, nil, nil, rep)
463-
-- now, same thing as before, apply the scale-joker
464-
local ggpn = G.GAME.probabilities.normal
465-
if G.jokers.cards[i].ability.cry_rigged then
466-
G.GAME.probabilities.normal = 1e9
467-
end
468437
local o = obj:cry_scale_mod(
469438
G.jokers.cards[i],
470439
self,
@@ -473,10 +442,6 @@ function Card:cry_double_scale_calc(orig_ability, in_context_scaling)
473442
orig_scale_base,
474443
new_scale_base
475444
)
476-
if G.jokers.cards[i].ability.cry_rigged then
477-
G.GAME.probabilities.normal = ggpn
478-
end
479-
480445
if o then
481446
if #dbl_info.scaler[info_i] == 2 then
482447
if

0 commit comments

Comments
 (0)