132
次編輯
小無編輯摘要 |
NegativeTriu(對話 | 貢獻) (增加统计购买曲子获得的以太之滴,以及最大数量的以太之滴) |
||
(未顯示同一使用者於中間所作的 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 | 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 | ||
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 | ||
次編輯