implement wild card multiplier
(demo machines don't use it) for 'n' wilds that contribute to a win, multiply the line win * n * wild multiplier valuemaster
parent
ac1476379c
commit
c77990865c
|
@ -221,6 +221,8 @@ winning combination is in your machine, that doesn't also contain any symbols
|
|||
in the wild_doesnt_match table (three or five [777]'s in the Golden 7's
|
||||
example machines).
|
||||
|
||||
If a wild multiplier is in effect, it'll be applied to the final value for a
|
||||
given match.
|
||||
|
||||
DISCLAIMER:
|
||||
===========
|
||||
|
|
|
@ -110,11 +110,13 @@ function minislots.check_win(spin, def, maxlines)
|
|||
|
||||
for payline,paylineoffsets in ipairs(def.lines) do
|
||||
local highestwin = nil
|
||||
local wildcount = 0
|
||||
if payline > maxlines then break end
|
||||
paylinecontent[payline] = {}
|
||||
for _,m in ipairs(def.matches) do
|
||||
|
||||
local matchwin = true
|
||||
local wc = 0
|
||||
for reel = 1, def.constants.numreels do
|
||||
local row = paylineoffsets[reel]+2
|
||||
if not m[reel+1] or type(m[reel+1]) == "string" then
|
||||
|
@ -128,6 +130,7 @@ function minislots.check_win(spin, def, maxlines)
|
|||
matchwin = false
|
||||
break
|
||||
end
|
||||
if spin[row][reel][2] == "wild" then wc = wc + 1 end
|
||||
else
|
||||
local sublistmatch = false
|
||||
for e in ipairs(m[reel+1]) do
|
||||
|
@ -139,15 +142,21 @@ function minislots.check_win(spin, def, maxlines)
|
|||
sublistmatch = true
|
||||
end
|
||||
end
|
||||
if not sublistmatch then matchwin = false break end
|
||||
if not sublistmatch then
|
||||
matchwin = false
|
||||
break
|
||||
end
|
||||
if spin[row][reel][2] == "wild" then wc = wc + 1 end
|
||||
end
|
||||
end
|
||||
|
||||
if matchwin then
|
||||
wildcount = wc
|
||||
highestwin = m[1]
|
||||
end
|
||||
end
|
||||
if highestwin then
|
||||
if wildcount > 0 then highestwin = highestwin * wildcount * def.wild_multiplier end
|
||||
table.insert(allwins, { payline = payline, value = highestwin, symbols = paylinecontent[payline]})
|
||||
end
|
||||
end
|
||||
|
|
|
@ -115,6 +115,9 @@ minislots.register_machine({
|
|||
wild_doesnt_match = {
|
||||
jackpot = true
|
||||
},
|
||||
wild_multiplier = 1, -- For every wild that contributes to a line win, multiply win by this
|
||||
-- (so one wild mult. by this, two mult. by twice this, etc)
|
||||
|
||||
geometry = { -- all measures are in Minetest formspec "inventory slots" units
|
||||
|
||||
base_user_interface_width = 13, -- width of the user interface
|
||||
|
|
|
@ -146,6 +146,9 @@ minislots.register_machine({
|
|||
wild_doesnt_match = {
|
||||
jackpot = true
|
||||
},
|
||||
wild_multiplier = 1, -- For every wild that contributes to a line win, multiply win by this
|
||||
-- (so one wild mult. by this, two mult. by twice this, etc)
|
||||
|
||||
geometry = { -- all measures are in Minetest formspec "inventory slots" units
|
||||
|
||||
base_user_interface_width = 14.667, -- width of the user interface
|
||||
|
|
Loading…
Reference in New Issue