跳到内容

Module:Tool:修订间差异

添加612字节 、​ 2021年10月16日 (星期六)
增加统计购买曲子获得的以太之滴,以及最大数量的以太之滴
无编辑摘要
(增加统计购买曲子获得的以太之滴,以及最大数量的以太之滴)
(未显示同一用户的1个中间版本)
第10行: 第10行:
function p.Etherdrop(frame)
function p.Etherdrop(frame)
local text=mw.getCurrentFrame():expandTemplate{ title = ':世界模式' }
local text=mw.getCurrentFrame():expandTemplate{ title = ':世界模式' }
if frame.args.type~=limit then text=string.match(text,"额外章:活动([%s%S]*)第1章:失落的世界") end
if frame.args.type=="limit" then text=string.match(text,"额外章:活动([%s%S]-)第1章:失落的世界")
else text=string.match(text,"([%s%S]-)各章节阶梯和奖励情况示意%(Nintendo Switch版%)") end
local match=string.gmatch (text,"(%d?%d) 以太之滴")
local match=string.gmatch (text,"(%d?%d) 以太之滴")
local result=0
local result=0
第20行: 第21行:
result=result+number
result=result+number
end
end
return result-6
result=result-6 --这里删掉因为sia常驻而多统计的6个
text=mw.getCurrentFrame():expandTemplate{ title = ':曲包列表' }
match=string.gmatch(text,"(%d)00记忆源点/整曲包")
local mmr=0
while true
do
number=match()
if number==nil then break end
mmr=mmr+number
end
match=string.gmatch(text,"单曲包\n|(%d?%d)")
number=match()
mmr=mmr+number-1 --这里减去guardina
if frame.args.type=="purchase" then return mmr
elseif frame.args.type=="max" then return result+mmr
else return result
end
end
end


126

个编辑