Module:Sandbox/Hubianzhen/BTD6 rewards: Difference between revisions
Hubianzhen (talk | contribs) mNo edit summary |
Hubianzhen (talk | contribs) No edit summary |
||
| Line 94: | Line 94: | ||
local mid = tonumber(string.sub(value, delimiter + 2, delimiter + 2)) | local mid = tonumber(string.sub(value, delimiter + 2, delimiter + 2)) | ||
local btm = tonumber(string.sub(value, delimiter + 3, delimiter + 3)) | local btm = tonumber(string.sub(value, delimiter + 3, delimiter + 3)) | ||
local tower = insta_towers[string.sub(value, 1, delimiter - 1)] | |||
--[[ If both paths equal, the order is: | --[[ If both paths equal, the order is: | ||
| Line 103: | Line 104: | ||
]]-- | ]]-- | ||
if mid >= top and mid >= btm then | if mid >= top and mid >= btm and tower ~= 'MonkeyBuccaneer' then | ||
top, btm = 0, 0 | top, btm = 0, 0 | ||
elseif top >= mid and top >= btm then | elseif top >= mid and top >= btm and tower ~= 'DartMonkey' then | ||
mid, btm = 0, 0 | mid, btm = 0, 0 | ||
else | |||
top, mid = 0, 0 | |||
end | end | ||
return string.format('[[File:BTD6 %s%s%s%s]] %s-%s-%s', | return string.format('[[File:BTD6 %s%s%s%s]] %s-%s-%s', | ||
tostring(top), tostring(mid), tostring(btm), | tostring(top), tostring(mid), tostring(btm), tower, | ||
string.sub(value, delimiter + 1, delimiter + 1), string.sub(value, delimiter + 2, delimiter + 2), string.sub(value, delimiter + 3, delimiter + 3) | string.sub(value, delimiter + 1, delimiter + 1), string.sub(value, delimiter + 2, delimiter + 2), string.sub(value, delimiter + 3, delimiter + 3) | ||
) | ) | ||