Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions content/vman2002.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
-- Emki Plush (YES)
--TODO do Kitty Seal / Kitty Stickers work with Splash??????????
--answer NO they dont(?)
--TODO replace math.random
--TODO see other todos within this file

-- Developer name - Replace 'template' with your display name
Expand Down Expand Up @@ -90,6 +89,11 @@ vman.ranks = {
["8"] = 8,
["9"] = 9
}
vman.randseed = function(str)
G.GAME.stocking_vman2002_rand = G.GAME.stocking_vman2002_rand or {}
G.GAME.stocking_vman2002_rand[str] = ((G.GAME.stocking_vman2002_rand[str] or 0) + 1) % 6e9 --nice
return pseudoseed(str) + G.GAME.stocking_vman2002_rand[str]
end

-- Wrapped Present Template
-- key defaults to 'display_name_stocking_present'
Expand Down Expand Up @@ -172,7 +176,7 @@ local kittyseal = SMODS.Seal{
context.before
and context.cardarea == G.play
and card.config.center.set == "Enhanced"
and SMODS.pseudorandom_probability(card, pseudoseed('stocking_VMan_2002_kittyseal'), 1, card.ability.seal.extra.odds, "stocking_VMan_2002_kittyseal")
and SMODS.pseudorandom_probability(card, vman.randseed('kittyseal_prob'), 1, card.ability.seal.extra.odds, "stocking_VMan_2002_kittyseal")
then
if scoredCards(context, card) then
local candidates = {}
Expand All @@ -186,7 +190,7 @@ local kittyseal = SMODS.Seal{
end
if #candidates == 0 then return --[[ print("Kitty seal no candidates") ]] end
--print("Kitty seal success")
local target = candidates[math.random(#candidates)]
local target = pseudorandom_element(candidates, vman.randseed("kittyseal"))
target:set_ability(G.P_CENTERS[card.config.center.key], nil, true)
target:juice_up()
return {
Expand Down Expand Up @@ -320,7 +324,8 @@ local mysterystar = StockingStuffer.Present({
local card
while i > 0 do
i = i - 1
card = table.remove(candidates, math.random(#candidates))
card, k = pseudorandom_element(candidates, vman.randseed("star"))
table.remove(candidates, k)
card:set_edition("e_negative")
end
end,
Expand Down