🌟現在、鉄壁 鉄壁ヘッドショットには対応済みです。
鉄壁HSは通常HSと同じダメージになります。LMG及びDMR、チャージライフル、ハンマーポイント弾を除き、すべてのダメージ値が一致していることを確認しています。

「モジュール:DamageTables」の版間の差分

提供:Apex Data
ナビゲーションに移動 検索に移動
(リロード時間の短縮率の初期値を変更)
(鉄壁のための2次的なダメージを追加したため、鉄壁の完璧な表を非表示にする実装を追加)
 
(同じ利用者による、間の27版が非表示)
1行目: 1行目:
local p = {}
local p = {}
local cfg = mw.loadData('Module:DamageTables/configuration')
local cfg   = mw.loadData('Module:DamageTables/configuration')
local Hopup = mw.loadData('Module:Stat/Hopup')


local aw = require('Module:Utility/Library')
local aw = require('Module:Utility/Library')
17行目: 18行目:
charged = 1,
charged = 1,
rps = 0,
rps = 0,
raise = 0,
}
}


local copiedValues = {
local copiedValues = {
mincount = 0,
maxcount = 250,
damagemin = 1000,
damagemin = 1000,
damagemax = 0,
damagemax = 0,
29行目: 33行目:
legmin = 0,
legmin = 0,
mulmin = 0.85,
mulmin = 0.85,
mulmax = 1.05,
mulmax = 1,
skullpiercer = 1,
skullpiercer = 1,
rpsratio1 = 0,
rpsratio1 = 0,
rpsratio2 = 0,
rpsratio2 = 0,
rpsratio3 = 0,
rpsratio3 = 0,
raise = 0,
reload = 0,
reload = 0,
reloadratio2 = 0,
reloadratio1 = 0.963,
reloadratio3 = 0,
reloadratio2 = 0.933,
reloadratio3 = 0.9,
extmag0 = 0,
extmag0 = 0,
extmag1 = 0,
extmag1 = 0,
51行目: 55行目:


local copiedStringValues = {
local copiedStringValues = {
skullpiercerrarity = 'legendary',
skullpiercerrarity = Hopup.skullpiercer_rifling.rarity,
lang = 'ja',
lang = 'ja',
}
}
94行目: 98行目:
builder
builder
:append('</div>\n')
:append('</div>\n')
:append('<div class="group-container">\n')
:append('<div class="group-container">')
end
end
124行目: 128行目:
args2.caption = ampedCover
args2.caption = ampedCover
else
else
args2.caption = string.format('%s%s%s', name, ctx.cfg.separator, ampedCover)
args2.caption = string.format('%s%s%s', ampedCover, ctx.cfg.separator, name)
end
end
args2.amped = true
args2.amped = true
131行目: 135行目:
end
end


local maxcount = 5
local function appendGroupsTables(builder, args, idx, ctx, opts)
local firstOpts = aw.shallowCopy(opts)
firstOpts.notCreateNewGroup = true
appendGroupTables(builder, ctx.res.normal, args, idx, 1, ctx, firstOpts)
-- Low Profile
if ctx.lowprofile > 1 then
appendGroupTables(builder, ctx.res.lowprofile, args, idx, ctx.lowprofile, ctx, opts)
end
 
-- Fortified
if not args.shieldinfo.sameHeadshotDamageToNormalOnFortified and ctx.fortified < 1 then
appendGroupTables(builder, ctx.res.fortified, args, idx, ctx.fortified, ctx, opts)
end
end
 
local maxcount = 8
local empty = {}
local empty = {}


144行目: 164行目:
cfg = cfg,
cfg = cfg,
res = res,
res = res,
lowprofile = 1,
fortified = 1,
}
}
156行目: 178行目:
-- load shield info
-- load shield info
args.shieldpreset = args.shieldpreset or 'removelowprofile'
args.hammerpointrarity = args.hammerpointrarity or Hopup.hammerpoint_rounds.rarity
args.disruptorrarity  = args.disruptorrarity  or Hopup.disruptor_rounds.rarity
args.shieldpreset     = args.shieldpreset     or 'reinforcehelmets'
local shieldinfo = require('Module:Stat/Shield')[args.shieldpreset]
local shieldinfo = require('Module:Stat/Shield')[args.shieldpreset]
args.shieldinfo = shieldinfo
args.shieldinfo = shieldinfo
-- overwrite lowprofile & fortified to context
ctx.lowprofile = aw.getAsNumber(args.lowprofile or shieldinfo.lowprofile)
ctx.fortified = aw.getAsNumber(args.fortified or shieldinfo.fortified)
args.mulmax = math.max(1, ctx.lowprofile)
args.mulmin = math.min(1, ctx.fortified)
-- fix arguments
-- fix arguments
170行目: 200行目:
-- build node
-- build node
local paragraphText = string.rep('=', aw.getAsNumber(args.level, 2) - 1)
local superGroup = false
local firstEnabled = not (args.firstskip or false)
local builder = require('Module:Utility/StringBuilder').new()
local builder = require('Module:Utility/StringBuilder').new()
builder:append('<div class="group-container">\n')
if firstEnabled then
local collapsible = aw.getAsBoolean(args.collapsible1, false)
appendGroupTables(builder, args.name1 or res.normal, args, 1, 1, ctx, { notCreateNewGroup = true })
local rarity      = args.rarity1 or ''
if args.passthrough < 1 then
local currentSuperGroup = collapsible or rarity ~= ''
local caption
if currentSuperGroup then
builder
:append('<div class="groups-container')
:appendIf(collapsible, ' mw-collapsible mw-collapsed')
:appendIf(rarity ~= '', ' disp-rarity-' .. rarity)
:append('" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}">\n')
end
if args.name1 then
if args.name1 then
caption = string.format('%s%s' .. cfg.caption_format, args.name1, cfg.separator, res.piercing_shots, args.passthrough)
builder:append(string.format('%s== %s ==%s\n', paragraphText, args.name1, paragraphText))
else
end
caption = string.format(cfg.caption_format, res.piercing_shots, args.passthrough)
builder:append('<div class="group-container">')
appendGroupsTables(builder, args, 1, ctx, empty)
-- Piercing Shots
if args.passthrough < 1 then
builder
:append('\n</div>\n')
:append('<div class="groups-container mw-collapsible mw-collapsed" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}">\n')
:append(string.format('%s=== %s (x%s) ===%s\n', paragraphText, res.piercing_shots, args.passthrough, paragraphText))
:append('<div class="mw-collapsible-content"><div class="group-container">\n')
appendGroupsTables(builder, args, 1, ctx, { usePassthrough = true })
builder:append('\n</div></div>\n')
end
end
appendGroupTables(builder, caption, args, 1, 1, ctx, { notCreateNewGroup = not args.amped, usePassthrough = true })
superGroup = currentSuperGroup
end
end
-- from twice to 'maxcount' times
for i = 2, maxcount do
for i = 2, maxcount do
local varname = string.format('name%d', i)
local varname = string.format('name%d', i)
if args[varname] then
if args[varname] then
appendGroupTables(builder, args[varname], args, i, 1, ctx, empty)
local collapsible = aw.getAsBoolean(args[string.format('collapsible%d', i)], false)
local rarity      = args[string.format('rarity%d', i)] or ''
local currentSuperGroup = collapsible or rarity ~= ''
builder
:appendIf(superGroup, '\n</div></div>')
:appendIf(firstEnabled, '\n</div>')
if currentSuperGroup then
builder
:append('<div class="groups-container')
:appendIf(collapsible, ' mw-collapsible mw-collapsed')
:appendIf(rarity ~= '', ' disp-rarity-' .. rarity)
:append('" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}">')
end
builder
:append(string.format('\n%s== %s ==%s\n', paragraphText, args[varname], paragraphText))
:appendIf(currentSuperGroup, collapsible and '<div class="mw-collapsible-content">' or '<div>')
:append('<div class="group-container">')
appendGroupsTables(builder, args, i, ctx, empty)
-- Piercing Shots
if args.passthrough < 1 then
if args.passthrough < 1 then
local caption = string.format('%s%s' .. cfg.caption_format, args[varname], cfg.separator, res.piercing_shots, args.passthrough)
builder
appendGroupTables(builder, caption, args, i, 1, ctx, { notCreateNewGroup = not args.amped, usePassthrough = true })
:append('\n</div>\n')
:append('<div class="groups-container mw-collapsible mw-collapsed" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}">\n')
:append(string.format('%s=== %s (x%s) ===%s\n', paragraphText, res.piercing_shots, args.passthrough, paragraphText))
:append('<div class="mw-collapsible-content"><div class="group-container">\n')
appendGroupsTables(builder, args, i, ctx, { usePassthrough = true })
builder:append('\n</div></div>\n')
end
end
superGroup = currentSuperGroup
firstEnabled = true
end
end
end
end
-- Disruptor Rounds
if args.disruptor > 1 then
if args.disruptor > 1 then
local caption = string.format('%s <span class="text-rarity text-rarity-epic">ディスラプター弾 (x%s)</span>', iu.hopup('disruptor_rounds'), args.disruptor)
local label = string.format(
appendGroupTables(builder, caption, args, 1, 1, ctx, { useDisruptor = true })
'%s <span class="text-rarity text-rarity-%s">%s (x%s)</span>',
end
iu.hopup('disruptor_rounds', { rarity = args.disruptorrarity }),
if args.hammerpoint > 1 then
args.disruptorrarity,
local caption = string.format('%s <span class="text-rarity text-rarity-epic">ハンマーポイント弾 (x%s)</span>', iu.hopup('hammerpoint_rounds'), args.hammerpoint)
args.nameD or 'ディスラプター弾',
appendGroupTables(builder, caption, args, 1, 1, ctx, { useHammerpoint = true })
args.disruptor)
end
-- low profile
local lowprofile = args.lowprofile or shieldinfo.lowprofile
if lowprofile > 1 then
builder
builder
:append('</div>\n')
:appendIf(superGroup, '\n</div></div>')
:append(string.format(cfg.passive_park, res.lowprofile))
:appendIf(firstEnabled, '\n</div>')
:append('<div class="group-container">\n')
:append('<div class="groups-container')
:appendIf(args.collapsibleD, ' mw-collapsible mw-collapsed')
local caption
:append(string.format(' disp-rarity-%s" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}">\n%s== %s ==%s\n', args.disruptorrarity, paragraphText, label, paragraphText))
if args.name1 then
:append(args.collapsibleD and '<div class="mw-collapsible-content">' or '<div>')
caption = string.format('%s%s%s', res.lowprofile, cfg.separator, args.name1)
:append('<div class="group-container">')
else
appendGroupsTables(builder, args, 'D', ctx, { useDisruptor = true })
caption = res.lowprofile
end
superGroup = true
appendGroupTables(builder, caption, args, 1, lowprofile, ctx, { notCreateNewGroup = true })
firstEnabled = true
if args.passthrough < 1 then
local caption
if args.name1 then
caption = string.format('%s%s%s%s' .. cfg.caption_format, res.lowprofile, cfg.separator, args.name1, cfg.separator, res.piercing_shots, args.passthrough)
else
caption = string.format('%s%s' .. cfg.caption_format, res.lowprofile, cfg.separator, res.piercing_shots, args.passthrough)
end
appendGroupTables(builder, caption, args, 1, lowprofile, ctx, { notCreateNewGroup = not args.amped, usePassthrough = true })
end
for i = 2, maxcount do
local varname = string.format('name%d', i)
if args[varname] then
local caption = string.format('%s%s%s', res.lowprofile, cfg.separator, args[varname])
appendGroupTables(builder, caption, args, i, lowprofile, ctx, empty)
if args.passthrough < 1 then
local caption = string.format('%s%s%s%s' .. cfg.caption_format, res.lowprofile, cfg.separator, args[varname], cfg.separator, res.piercing_shots, args.passthrough)
appendGroupTables(builder, caption, args, i, lowprofile, ctx, { notCreateNewGroup = not args.amped, usePassthrough = true })
end
end
end
if args.disruptor > 1 then
local caption = string.format('小柄+%s <span class="text-rarity text-rarity-epic">ディスラプター弾 (x%s)</span>', iu.hopup('disruptor_rounds'), args.disruptor)
appendGroupTables(builder, caption, args, 1, lowprofile, ctx, { useDisruptor = true })
end
if args.hammerpoint > 1 then
local caption = string.format('小柄+%s <span class="text-rarity text-rarity-epic">ハンマーポイント弾 (x%s)</span>', iu.hopup('hammerpoint_rounds'), args.hammerpoint)
appendGroupTables(builder, caption, args, 1, lowprofile, ctx, { useHammerpoint = true })
end
end
end
-- fortified
-- Hammerpoint Rounds
local fortified = args.fortified or shieldinfo.fortified
if args.hammerpoint > 1 then
if fortified < 1 then
local label = string.format(
'%s <span class="text-rarity text-rarity-%s">%s (x%s)</span>',
iu.hopup('hammerpoint_rounds', { rarity = args.hammerpointrarity }),
args.hammerpointrarity,
args.nameH or 'ハンマーポイント弾',
args.hammerpoint)
builder
builder
:append('</div>\n')
:appendIf(superGroup, '\n</div></div>')
:append(string.format(cfg.passive_park, res.fortified))
:appendIf(firstEnabled, '\n</div>')
:append('<div class="group-container">\n')
:append('<div class="groups-container')
:appendIf(args.collapsibleH, ' mw-collapsible mw-collapsed')
local caption
:append(string.format(' disp-rarity-%s" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}">\n%s== %s ==%s\n', args.hammerpointrarity, paragraphText, label, paragraphText))
if args.name1 then
:append(args.collapsibleH and '<div class="mw-collapsible-content">' or '<div>')
caption = string.format('%s%s%s', res.fortified, cfg.separator, args.name1)
:append('<div class="group-container">')
else
appendGroupsTables(builder, args, 'H', ctx, { useHammerpoint = true })
caption = res.fortified
end
superGroup = true
appendGroupTables(builder, caption, args, 1, fortified, ctx, { notCreateNewGroup = true })
firstEnabled = true
if args.passthrough < 1 then
local caption
if args.name1 then
caption = string.format('%s%s%s%s' .. cfg.caption_format, res.fortified, cfg.separator, args.name1, cfg.separator, res.piercing_shots, args.passthrough)
else
caption = string.format('%s%s' .. cfg.caption_format, res.fortified, cfg.separator, res.piercing_shots, args.passthrough)
end
appendGroupTables(builder, caption, args, 1, fortified, ctx, { notCreateNewGroup = not args.amped, usePassthrough = true })
end
for i = 2, maxcount do
local varname = string.format('name%d', i)
if args[varname] then
local caption = string.format('%s%s%s', res.fortified, cfg.separator, args[varname])
appendGroupTables(builder, caption, args, i, fortified, ctx, empty)
if args.passthrough < 1 then
local caption = string.format('%s%s%s%s' .. cfg.caption_format, res.fortified, cfg.separator, args[varname], cfg.separator, res.piercing_shots, args.passthrough)
appendGroupTables(builder, caption, args, i, fortified, ctx, { notCreateNewGroup = not args.amped, usePassthrough = true })
end
end
end
if args.disruptor > 1 then
local caption = string.format('鉄壁+%s <span class="text-rarity text-rarity-epic">ディスラプター弾 (x%s)</span>', iu.hopup('disruptor_rounds'), args.disruptor)
appendGroupTables(builder, caption, args, 1, fortified, ctx, { useDisruptor = true })
end
if args.hammerpoint > 1 then
local caption = string.format('鉄壁+%s <span class="text-rarity text-rarity-epic">ハンマーポイント弾 (x%s)</span>', iu.hopup('hammerpoint_rounds'), args.hammerpoint)
appendGroupTables(builder, caption, args, 1, fortified, ctx, { useHammerpoint = true })
end
end
end
-- close tag
-- close tag
builder:append('</div>')
builder
:appendIf(superGroup, '\n</div></div>')
:appendIf(firstEnabled, '\n</div>')
return tostring(builder)
return tostring(builder)

2022年5月24日 (火) 12:41時点における最新版

このモジュールについての説明文ページを モジュール:DamageTables/doc に作成できます

local p = {}
local cfg   = mw.loadData('Module:DamageTables/configuration')
local Hopup = mw.loadData('Module:Stat/Hopup')

local aw = require('Module:Utility/Library')
local iu = require('Module:Utility/Image')
local inu = require('Module:Utility/ImageWithName')
local DamageTable = require('Module:DamageTable')
local getArgs -- lazily initialized

local indexableValues = {
	damage = 20,
	beamdamage = 0,
	ticks = 0,
	pellet = 1,
	head = 2,
	leg = 0.8,
	charged = 1,
	rps = 0,
	raise = 0,
}

local copiedValues = {
	mincount = 0,
	maxcount = 250,
	damagemin = 1000,
	damagemax = 0,
	beamdamagemin = 0,
	beamdamagemax = 0,
	pelletmin = 0,
	pelletmax = 0,
	headmax = -1,
	legmin = 0,
	mulmin = 0.85,
	mulmax = 1,
	skullpiercer = 1,
	rpsratio1 = 0,
	rpsratio2 = 0,
	rpsratio3 = 0,
	reload = 0,
	reloadratio1 = 0.963,
	reloadratio2 = 0.933,
	reloadratio3 = 0.9,
	extmag0 = 0,
	extmag1 = 0,
	extmag2 = 0,
	extmag3 = 0,
}

local copiedBooleanValues = {
	round = false,
	amped = false,
	forcegunshield = false,
}

local copiedStringValues = {
	skullpiercerrarity = Hopup.skullpiercer_rifling.rarity,
	lang = 'ja',
}

local function rebuildArguments(base, idx, mul)
	local ret = {}
	
	-- 再構築する変数
	for key, value in pairs(indexableValues) do
		local temp = aw.getAsNumber(base[key .. idx], -1)
		if temp < 0 then
			temp = aw.getAsNumber(base[key], -1)
			
			if temp < 0 then
				temp = value
			end
		end
		
		ret[key] = temp
	end
	
	-- コピーする変数
	for key, value in pairs(copiedValues) do
		local temp = aw.getAsNumber(base[key], -1)
		if temp < 0 then
			temp = value
		end
		ret[key] = temp
	end
	for key, value in pairs(copiedBooleanValues) do
		ret[key] = aw.getAsBoolean(base[key], value)
	end
	for key, value in pairs(copiedStringValues) do
		ret[key] = base[key] or value
	end
	
	return ret
end

local function appendGroupTables(builder, name, args, idx, mul, ctx, opts)
	if not opts.notCreateNewGroup then
		builder
			:append('</div>\n')
			:append('<div class="group-container">')
	end
	
	local args2 = rebuildArguments(args, idx, mul)
	args2.amped = false
	args2.caption = name
	args2.mul = mul
	args2.shieldinfo = args.shieldinfo
	if opts.useDisruptor then
		args2.disruptor      = args.disruptor
	else
		args2.disruptorsup   = args.disruptor
	end
	if opts.useHammerpoint then
		args2.hammerpoint    = args.hammerpoint
	else
		args2.hammerpointsup = args.hammerpoint
	end
	if opts.usePassthrough then
		args2.passthrough    = args.passthrough
	else
		args2.passthroughsup = args.passthrough
	end
	builder:append(DamageTable._main(args2, ctx.frame))
	
	if args.amped then
		local ampedCover = inu.tactical('amped_cover', { lang = ctx.lang })
		if name == ctx.res.normal then
			args2.caption = ampedCover
		else
			args2.caption = string.format('%s%s%s', ampedCover, ctx.cfg.separator, name)
		end
		args2.amped = true
		builder:append(DamageTable._main(args2, frame))
	end
end

local function appendGroupsTables(builder, args, idx, ctx, opts)
	local firstOpts = aw.shallowCopy(opts)
	firstOpts.notCreateNewGroup = true
	appendGroupTables(builder, ctx.res.normal, args, idx, 1, ctx, firstOpts)
	
	-- Low Profile
	if ctx.lowprofile > 1 then
		appendGroupTables(builder, ctx.res.lowprofile, args, idx, ctx.lowprofile, ctx, opts)
	end

	-- Fortified
	if not args.shieldinfo.sameHeadshotDamageToNormalOnFortified and ctx.fortified < 1 then
		appendGroupTables(builder, ctx.res.fortified, args, idx, ctx.fortified, ctx, opts)
	end
end

local maxcount = 8
local empty = {}

function p._main(args, frame)
	-- load resources
	local lang = args.lang or 'ja'
	args.lang = lang
	local res = cfg[lang]
	local ctx = {
		frame = frame,
		lang = lang,
		cfg = cfg,
		res = res,
		lowprofile = 1,
		fortified = 1,
	}
	
	-- init value
	local initValues = {
		lowprofile = -1,
		fortified = -1,
		disruptor = 1,
		hammerpoint = 1,
		passthrough = 1,
	}
	
	-- load shield info
	args.hammerpointrarity = args.hammerpointrarity or Hopup.hammerpoint_rounds.rarity
	args.disruptorrarity   = args.disruptorrarity   or Hopup.disruptor_rounds.rarity
	args.shieldpreset      = args.shieldpreset      or 'reinforcehelmets'
	local shieldinfo = require('Module:Stat/Shield')[args.shieldpreset]
	args.shieldinfo = shieldinfo
	
	-- overwrite lowprofile & fortified to context
	ctx.lowprofile = aw.getAsNumber(args.lowprofile or shieldinfo.lowprofile)
	ctx.fortified = aw.getAsNumber(args.fortified or shieldinfo.fortified)
	args.mulmax = math.max(1, ctx.lowprofile)
	args.mulmin = math.min(1, ctx.fortified)
	
	-- fix arguments
	for key, value in pairs(initValues) do
		args[key] = aw.getAsNumber(args[key], value)
		if args[key] == -1 then
			args[key] = nil
		end
	end
	args.amped = aw.getAsBoolean(args.amped, shieldinfo.ampedCover)
	
	-- build node
	local paragraphText = string.rep('=', aw.getAsNumber(args.level, 2) - 1)
	local superGroup = false
	local firstEnabled = not (args.firstskip or false)
	local builder = require('Module:Utility/StringBuilder').new()
	if firstEnabled then
		local collapsible = aw.getAsBoolean(args.collapsible1, false)
		local rarity      = args.rarity1 or ''
		local currentSuperGroup = collapsible or rarity ~= ''
		if currentSuperGroup then
			builder
				:append('<div class="groups-container')
				:appendIf(collapsible, ' mw-collapsible mw-collapsed')
				:appendIf(rarity ~= '', ' disp-rarity-' .. rarity)
				:append('" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}">\n')
		end
		if args.name1 then
			builder:append(string.format('%s== %s ==%s\n', paragraphText, args.name1, paragraphText))
		end
		builder:append('<div class="group-container">')
		appendGroupsTables(builder, args, 1, ctx, empty)
		
		-- Piercing Shots
		if args.passthrough < 1 then
			builder
				:append('\n</div>\n')
				:append('<div class="groups-container mw-collapsible mw-collapsed" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}">\n')
				:append(string.format('%s=== %s (x%s) ===%s\n', paragraphText, res.piercing_shots, args.passthrough, paragraphText))
				:append('<div class="mw-collapsible-content"><div class="group-container">\n')
			appendGroupsTables(builder, args, 1, ctx, { usePassthrough = true })
			builder:append('\n</div></div>\n')
		end
		
		superGroup = currentSuperGroup
	end
	
	-- from twice to 'maxcount' times
	for i = 2, maxcount do
		local varname = string.format('name%d', i)
		if args[varname] then
			local collapsible = aw.getAsBoolean(args[string.format('collapsible%d', i)], false)
			local rarity      = args[string.format('rarity%d', i)] or ''
			local currentSuperGroup = collapsible or rarity ~= ''
			builder
				:appendIf(superGroup, '\n</div></div>')
				:appendIf(firstEnabled, '\n</div>')
			if currentSuperGroup then
				builder
					:append('<div class="groups-container')
					:appendIf(collapsible, ' mw-collapsible mw-collapsed')
					:appendIf(rarity ~= '', ' disp-rarity-' .. rarity)
					:append('" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}">')
			end
			builder
				:append(string.format('\n%s== %s ==%s\n', paragraphText, args[varname], paragraphText))
				:appendIf(currentSuperGroup, collapsible and '<div class="mw-collapsible-content">' or '<div>')
				:append('<div class="group-container">')
			appendGroupsTables(builder, args, i, ctx, empty)
			
			-- Piercing Shots
			if args.passthrough < 1 then
				builder
					:append('\n</div>\n')
					:append('<div class="groups-container mw-collapsible mw-collapsed" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}">\n')
					:append(string.format('%s=== %s (x%s) ===%s\n', paragraphText, res.piercing_shots, args.passthrough, paragraphText))
					:append('<div class="mw-collapsible-content"><div class="group-container">\n')
				appendGroupsTables(builder, args, i, ctx, { usePassthrough = true })
				builder:append('\n</div></div>\n')
			end
			
			superGroup = currentSuperGroup
			firstEnabled = true
		end
	end
	
	-- Disruptor Rounds
	if args.disruptor > 1 then
		local label = string.format(
			'%s <span class="text-rarity text-rarity-%s">%s (x%s)</span>',
			iu.hopup('disruptor_rounds', { rarity = args.disruptorrarity }),
			args.disruptorrarity,
			args.nameD or 'ディスラプター弾',
			args.disruptor)
		builder
			:appendIf(superGroup, '\n</div></div>')
			:appendIf(firstEnabled, '\n</div>')
			:append('<div class="groups-container')
			:appendIf(args.collapsibleD, ' mw-collapsible mw-collapsed')
			:append(string.format(' disp-rarity-%s" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}">\n%s== %s ==%s\n', args.disruptorrarity, paragraphText, label, paragraphText))
			:append(args.collapsibleD and '<div class="mw-collapsible-content">' or '<div>')
			:append('<div class="group-container">')
		appendGroupsTables(builder, args, 'D', ctx, { useDisruptor = true })
			
		superGroup = true
		firstEnabled = true
	end
	
	-- Hammerpoint Rounds
	if args.hammerpoint > 1 then
		local label = string.format(
			'%s <span class="text-rarity text-rarity-%s">%s (x%s)</span>',
			iu.hopup('hammerpoint_rounds', { rarity = args.hammerpointrarity }),
			args.hammerpointrarity,
			args.nameH or 'ハンマーポイント弾',
			args.hammerpoint)
		builder
			:appendIf(superGroup, '\n</div></div>')
			:appendIf(firstEnabled, '\n</div>')
			:append('<div class="groups-container')
			:appendIf(args.collapsibleH, ' mw-collapsible mw-collapsed')
			:append(string.format(' disp-rarity-%s" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}">\n%s== %s ==%s\n', args.hammerpointrarity, paragraphText, label, paragraphText))
			:append(args.collapsibleH and '<div class="mw-collapsible-content">' or '<div>')
			:append('<div class="group-container">')
		appendGroupsTables(builder, args, 'H', ctx, { useHammerpoint = true })
			
		superGroup = true
		firstEnabled = true
	end
	
	-- close tag
	builder
		:appendIf(superGroup, '\n</div></div>')
		:appendIf(firstEnabled, '\n</div>')
	
	return tostring(builder)
end

function p.main(frame)
	if not getArgs then
		getArgs = require('Module:Arguments').getArgs
	end
	args = getArgs(frame)
	
	return p._main(args, frame)
end

return p