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

「モジュール:StatTable/Damage」の版間の差分

提供:Apex Data
ナビゲーションに移動 検索に移動
(軸描画に伴う追加クラスの指定)
(ダメージグラフを胴体の単一値から脚~頭までの可変グラフに変更)
1行目: 1行目:
local aw        = require('Module:Utility/Library')
local aw        = require('Module:Utility/Library')
local apex      = require('Module:Utility/ApexLibrary')
local iu        = require('Module:Utility/Image')
local iu        = require('Module:Utility/Image')
local tableutil = require('Module:Utility/TableUtil/Apex')
local tableutil = require('Module:Utility/TableUtil/Apex')
8行目: 9行目:
__debug__enableAllHopup = false,
__debug__enableAllHopup = false,
en = {
en = {
bodyshot                    = 'Body',
damage                      = 'Damage',
damage                      = 'Damage',
graph                      = 'Graph',
graph                      = 'Graph',
headshot                    = 'Head',
headlvl1                    = 'Head w/Lvl1',
headlvl2                    = 'Head w/Lvl2',
headlvl3                    = 'Head w/Lvl3',
hopup                      = 'Hop-Up',
hopup                      = 'Hop-Up',
legsshot                    = 'Legs',
maxcharge                  = 'Max charge',
maxcharge                  = 'Max charge',
mincharge                  = 'Min charge',
mincharge                  = 'Min charge',
22行目: 29行目:
},
},
ja = {
ja = {
bodyshot                    = '胴',
damage                      = 'ダメージ',
damage                      = 'ダメージ',
graph                      = 'グラフ',
graph                      = 'グラフ',
headshot                    = '頭',
headlvl1                    = '頭 (Lv.1)',
headlvl2                    = '頭 (Lv.2)',
headlvl3                    = '頭 (Lv.3)',
hopup                      = 'ホップアップ',
hopup                      = 'ホップアップ',
legsshot                    = '脚',
maxcharge                  = '最大溜め',
maxcharge                  = '最大溜め',
mincharge                  = '最小溜め',
mincharge                  = '最小溜め',
36行目: 49行目:
},
},
}
}
local function addData(dataset, data, base, stat, p, fn)
p = p or 1
local lvl1 = apex.calcHeadshotMultiplier(stat.headshot, apex.HEAD_HLMLV1)
local lvl2 = apex.calcHeadshotMultiplier(stat.headshot, apex.HEAD_HLMLV2)
local lvl3 = apex.calcHeadshotMultiplier(stat.headshot, apex.HEAD_HLMLV3)
if fn then
data.damage    = fn(base, 1) * p
data.headDamage = fn(apex.calcPartDamage(base, stat.headshot), stat.headshot) * p
data.lvl1Damage = fn(apex.calcPartDamage(base, lvl1), lvl1) * p
data.lvl2Damage = fn(apex.calcPartDamage(base, lvl2), lvl2) * p
data.lvl3Damage = fn(apex.calcPartDamage(base, lvl3), lvl3) * p
data.legsDamage = fn(apex.calcPartDamage(base, stat.legshot), stat.legshot) * p
else
data.damage    = base * p
data.headDamage = apex.calcPartDamage(base, stat.headshot) * p
data.lvl1Damage = apex.calcPartDamage(base, lvl1) * p
data.lvl2Damage = apex.calcPartDamage(base, lvl2) * p
data.lvl3Damage = apex.calcPartDamage(base, lvl3) * p
data.legsDamage = apex.calcPartDamage(base, stat.legshot) * p
end
table.insert(dataset, data)
end


local p = {}
local p = {}
50行目: 87行目:
local baseData = {
local baseData = {
ammo      = stat.ammo,
ammo      = stat.ammo,
damage    = baseDamage,
name      = name,
name      = name,
shortname = stat.localization['Japanese_Short'],
shortname = stat.localization['Japanese_Short'],
66行目: 102行目:
tickData.option = res.tick
tickData.option = res.tick
end
end
table.insert(dataset, tickData)
addData(dataset, tickData, baseDamage, stat.damage, nil, function(val, mul)
return val + apex.calcPartDamage(stat.damage.beam.base, mul) * t
end)
end
end
73行目: 111行目:
for p = 1, stat.pellet do
for p = 1, stat.pellet do
local pelletData = aw.shallowCopy(baseData)
local pelletData = aw.shallowCopy(baseData)
pelletData.damage = baseDamage * p
if p > 1 then
if p > 1 then
pelletData.option = string.format(res.pelletsFormat, p)
pelletData.option = string.format(res.pelletsFormat, p)
79行目: 116行目:
pelletData.option = res.pellet
pelletData.option = res.pellet
end
end
table.insert(dataset, pelletData)
addData(dataset, pelletData, baseDamage, stat.damage, p)
-- ハンマーポイント弾 (モザンビーク)
-- ハンマーポイント弾 (モザンビーク)
if (configuration.__debug__enableAllHopup or Hopup.hammerpoint_rounds.enabled) and aw.isNumberAndGreaterThanX(stat.damage.hammerpoint_rounds, 1) then
if (configuration.__debug__enableAllHopup or Hopup.hammerpoint_rounds.enabled) and aw.isNumberAndGreaterThanX(stat.damage.hammerpoint_rounds, 1) then
local pelletUnshieldedData = aw.shallowCopy(pelletData)
local pelletUnshieldedData = aw.shallowCopy(pelletData)
pelletUnshieldedData.damage = math.floor(stat.damage.hammerpoint_rounds * baseDamage) * p
pelletUnshieldedData.hopup  = { 'hammerpoint_rounds' }
pelletUnshieldedData.hopup  = { 'hammerpoint_rounds' }
table.insert(dataset, pelletUnshieldedData)
addData(dataset, pelletUnshieldedData, math.floor(stat.damage.hammerpoint_rounds * baseDamage), stat.damage, p)
end
end
end  
end  
96行目: 132行目:
local minChargeData = aw.shallowCopy(baseData)
local minChargeData = aw.shallowCopy(baseData)
minChargeData.option = res.mincharge
minChargeData.option = res.mincharge
table.insert(dataset, minChargeData)
addData(dataset, minChargeData, baseDamage, stat.damage)
local maxChargeData = aw.shallowCopy(baseData)
local maxChargeData = aw.shallowCopy(baseData)
maxChargeData.damage = stat.damage.charged
maxChargeData.option = res.maxcharge
maxChargeData.option = res.maxcharge
table.insert(dataset, maxChargeData)
addData(dataset, maxChargeData, stat.damage.charged, stat.damage)
-- チャージが無効の場合の通常出力
-- チャージが無効の場合の通常出力
else
else
table.insert(dataset, baseData)
addData(dataset, baseData, baseDamage, stat.damage)
end
end
112行目: 147行目:
local ampedData = aw.shallowCopy(baseData)
local ampedData = aw.shallowCopy(baseData)
ampedData.ammo  = ampedData.ammo .. '_amped'
ampedData.ammo  = ampedData.ammo .. '_amped'
ampedData.damage = stat.damage.amped
ampedData.option = iu.item('シールドセル') .. ' <span class="text-desktoponly">増幅モード</span>'
ampedData.option = iu.item('シールドセル') .. ' <span class="text-desktoponly">増幅モード</span>'
table.insert(dataset, ampedData)
addData(dataset, ampedData, stat.damage.amped, stat.damage)
end
end
120行目: 154行目:
if (configuration.__debug__enableAllHopup or Hopup.selectfire_receiver.enabled) and stat.selectfire_receiver and stat.selectfire_receiver.damage and aw.isNumberAndGreaterThanX(stat.selectfire_receiver.damage.base, baseDamage) then
if (configuration.__debug__enableAllHopup or Hopup.selectfire_receiver.enabled) and stat.selectfire_receiver and stat.selectfire_receiver.damage and aw.isNumberAndGreaterThanX(stat.selectfire_receiver.damage.base, baseDamage) then
local selectfireReceiverData = aw.shallowCopy(baseData)
local selectfireReceiverData = aw.shallowCopy(baseData)
selectfireReceiverData.damage = stat.selectfire_receiver.damage.base
selectfireReceiverData.hopup = { 'selectfire_receiver' }
selectfireReceiverData.hopup = { 'selectfire_receiver' }
addData(dataset, selectfireReceiverData, stat.selectfire_receiver.damage.base, stat.selectfire_receiver.damage)
table.insert(dataset, selectfireReceiverData)
end
end
128行目: 161行目:
if (configuration.__debug__enableAllHopup or Hopup.hammerpoint_rounds.enabled) and aw.isNumberAndGreaterThanX(stat.damage.hammerpoint_rounds, 1) then
if (configuration.__debug__enableAllHopup or Hopup.hammerpoint_rounds.enabled) and aw.isNumberAndGreaterThanX(stat.damage.hammerpoint_rounds, 1) then
local hammerpointRoundsData = aw.shallowCopy(baseData)
local hammerpointRoundsData = aw.shallowCopy(baseData)
hammerpointRoundsData.damage = math.floor(stat.damage.hammerpoint_rounds * baseDamage)
hammerpointRoundsData.hopup = { 'hammerpoint_rounds' }
hammerpointRoundsData.hopup  = { 'hammerpoint_rounds' }
addData(dataset, hammerpointRoundsData, math.floor(stat.damage.hammerpoint_rounds * baseDamage), stat.damage)
table.insert(dataset, hammerpointRoundsData)
end
end
136行目: 168行目:
if (configuration.__debug__enableAllHopup or Hopup.disruptor_rounds.enabled or special) and aw.isNumberAndGreaterThanX(stat.damage.disruptor_rounds, 1) then
if (configuration.__debug__enableAllHopup or Hopup.disruptor_rounds.enabled or special) and aw.isNumberAndGreaterThanX(stat.damage.disruptor_rounds, 1) then
local disruptorRoundsData = aw.shallowCopy(baseData)
local disruptorRoundsData = aw.shallowCopy(baseData)
disruptorRoundsData.damage = math.floor(stat.damage.disruptor_rounds * baseDamage)
disruptorRoundsData.hopup  = { 'disruptor_rounds' }
disruptorRoundsData.hopup  = { 'disruptor_rounds' }
table.insert(dataset, disruptorRoundsData)
addData(dataset, disruptorRoundsData, baseDamage, stat.damage, nil, function(val)
return apex.calcDisruptorDamage(val, stat.damage.disruptor_rounds)
end)
end
end
144行目: 177行目:
if (configuration.__debug__enableAllHopup or Hopup.anvil_receiver.enabled) and stat.anvil_receiver and aw.isNumberAndGreaterThanX(stat.anvil_receiver.damage.base, baseDamage) then
if (configuration.__debug__enableAllHopup or Hopup.anvil_receiver.enabled) and stat.anvil_receiver and aw.isNumberAndGreaterThanX(stat.anvil_receiver.damage.base, baseDamage) then
local anvilReceiverData = aw.shallowCopy(baseData)
local anvilReceiverData = aw.shallowCopy(baseData)
anvilReceiverData.damage = stat.anvil_receiver.damage.base
anvilReceiverData.hopup = { 'anvil_receiver' }
anvilReceiverData.hopup = { 'anvil_receiver' }
addData(dataset, anvilReceiverData, stat.anvil_receiver.damage.base, stat.anvil_receiver.damage)
table.insert(dataset, anvilReceiverData)
end
end
154行目: 186行目:
for p = 1, stat.shatter_caps.pellet do
for p = 1, stat.shatter_caps.pellet do
local shatterCapsMinChargeData = aw.shallowCopy(baseData)
local shatterCapsMinChargeData = aw.shallowCopy(baseData)
shatterCapsMinChargeData.damage = stat.shatter_caps.damage.base * p
if p > 1 then
if p > 1 then
shatterCapsMinChargeData.option = string.format(res.pelletsWithAdditionalFormat, res.mincharge, p)
shatterCapsMinChargeData.option = string.format(res.pelletsWithAdditionalFormat, res.mincharge, p)
161行目: 192行目:
end
end
shatterCapsMinChargeData.hopup = { 'shatter_caps' }
shatterCapsMinChargeData.hopup = { 'shatter_caps' }
table.insert(dataset, shatterCapsMinChargeData)
addData(dataset, shatterCapsMinChargeData, stat.shatter_caps.damage.base, stat.shatter_caps.damage, p)
local shatterCapsMaxChargeData = aw.shallowCopy(shatterCapsMinChargeData)
local shatterCapsMaxChargeData = aw.shallowCopy(shatterCapsMinChargeData)
shatterCapsMaxChargeData.damage = stat.shatter_caps.damage.charged * p
if p > 1 then
if p > 1 then
shatterCapsMaxChargeData.option = string.format(res.pelletsWithAdditionalFormat, res.maxcharge, p)
shatterCapsMaxChargeData.option = string.format(res.pelletsWithAdditionalFormat, res.maxcharge, p)
170行目: 200行目:
shatterCapsMaxChargeData.option = string.format(res.pelletWithAdditional, res.maxcharge)
shatterCapsMaxChargeData.option = string.format(res.pelletWithAdditional, res.maxcharge)
end
end
table.insert(dataset, shatterCapsMaxChargeData)
addData(dataset, shatterCapsMaxChargeData, stat.shatter_caps.damage.charged, stat.shatter_caps.damage, p)
end
end
else
else
for p = 1, stat.shatter_caps.pellet do
for p = 1, stat.shatter_caps.pellet do
local shatterCapsData = aw.shallowCopy(baseData)
local shatterCapsData = aw.shallowCopy(baseData)
shatterCapsData.damage = stat.shatter_caps.damage.base * p
if p > 1 then
if p > 1 then
shatterCapsData.option = string.format(res.pelletsFormat, p)
shatterCapsData.option = string.format(res.pelletsFormat, p)
182行目: 211行目:
end
end
shatterCapsData.hopup = { 'shatter_caps' }
shatterCapsData.hopup = { 'shatter_caps' }
table.insert(dataset, shatterCapsData)
addData(dataset, shatterCapsData, stat.shatter_caps.damage.base, stat.shatter_caps.damage, p)
end
end
end
end
209行目: 238行目:
headerColspan  = 0,
headerColspan  = 0,
}),
}),
tableutil.LineValueCell.new(res.damage, 'damage', {
tableutil.ValueCell.new(res.legsshot, 'legsDamage', {
cellClass  = 'st-mobile-graph st-mobile-textshadow st-mobile-last',
footerClass = 'st-mobile-graph st-mobile-last',
headerClass = 'st-mobile-graph st-mobile-last',
headerStyle = {
headerStyle = {
['min-width'] = '75px',
['min-width'] = '40px',
['max-width'] = '4em',
},
}),
tableutil.LineValueCell.new(res.bodyshot, 'damage', {
startIndex  = 'legsDamage',
endIndex    = 'lvl1Damage',
cellClass  = 'st-mobile-graph st-mobile-textshadow',
footerClass = 'st-mobile-graph',
headerClass = 'st-mobile-graph',
headerStyle = {
['min-width'] = '80px',
['max-width'] = '8em',
['max-width'] = '8em',
},
},
maximumValue = 150,
preferredGridCount = 3,
preferredGridCount = 3,
}),
tableutil.ValueCell.new(res.headlvl1, 'lvl1Damage', {
headerStyle = {
['min-width'] = '40px',
['max-width'] = '4em',
},
}),
}),
tableutil.LineCell.new(res.graph, 'damage', {
tableutil.LineCell.new(res.graph, 'damage', {
startIndex  = 'legsDamage',
endIndex    = 'headDamage',
cellClass  = 'st-desktop-graph',
cellClass  = 'st-desktop-graph',
footerClass = 'st-desktop-graph',
footerClass = 'st-desktop-graph',
226行目: 272行目:
['min-width'] = '160px',
['min-width'] = '160px',
},
},
maximumValue = 150,
}),
}),
}
}

2021年8月21日 (土) 15:05時点における版

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

local aw        = require('Module:Utility/Library')
local apex      = require('Module:Utility/ApexLibrary')
local iu        = require('Module:Utility/Image')
local tableutil = require('Module:Utility/TableUtil/Apex')
local Hopup     = mw.loadData('Module:Stat/Hopup')
local getArgs  -- lazily initialized

local configuration = {
	__debug__enableAllHopup = false,
	en = {
		bodyshot                    = 'Body',
		damage                      = 'Damage',
		graph                       = 'Graph',
		headshot                    = 'Head',
		headlvl1                    = 'Head w/Lvl1',
		headlvl2                    = 'Head w/Lvl2',
		headlvl3                    = 'Head w/Lvl3',
		hopup                       = 'Hop-Up',
		legsshot                    = 'Legs',
		maxcharge                   = 'Max charge',
		mincharge                   = 'Min charge',
		pellet                      = '1 pellet',
		pelletsFormat               = '%d pellets',
		pelletWithAdditional        = '%s | 1 pellet',
		pelletsWithAdditionalFormat = '%s | %d pellets',
		tick                        = '1 tick',
		ticksFormat                 = '%d ticks',
		weaponname                  = 'Weapon name',
	},
	ja = {
		bodyshot                    = '胴',
		damage                      = 'ダメージ',
		graph                       = 'グラフ',
		headshot                    = '頭',
		headlvl1                    = '頭 (Lv.1)',
		headlvl2                    = '頭 (Lv.2)',
		headlvl3                    = '頭 (Lv.3)',
		hopup                       = 'ホップアップ',
		legsshot                    = '脚',
		maxcharge                   = '最大溜め',
		mincharge                   = '最小溜め',
		pellet                      = '1&thinsp;片',
		pelletsFormat               = '%d&thinsp;片',
		pelletWithAdditional        = '%s・1&thinsp;片',
		pelletsWithAdditionalFormat = '%s・%d&thinsp;片',
		tick                        = '1&thinsp;チック',
		ticksFormat                 = '%d&thinsp;チック',
		weaponname                  = '武器名',
	},
}

local function addData(dataset, data, base, stat, p, fn)
	p = p or 1
	
	local lvl1 = apex.calcHeadshotMultiplier(stat.headshot, apex.HEAD_HLMLV1)
	local lvl2 = apex.calcHeadshotMultiplier(stat.headshot, apex.HEAD_HLMLV2)
	local lvl3 = apex.calcHeadshotMultiplier(stat.headshot, apex.HEAD_HLMLV3)
	if fn then
		data.damage     = fn(base, 1) * p
		data.headDamage = fn(apex.calcPartDamage(base, stat.headshot), stat.headshot) * p
		data.lvl1Damage = fn(apex.calcPartDamage(base, lvl1), lvl1) * p
		data.lvl2Damage = fn(apex.calcPartDamage(base, lvl2), lvl2) * p
		data.lvl3Damage = fn(apex.calcPartDamage(base, lvl3), lvl3) * p
		data.legsDamage = fn(apex.calcPartDamage(base, stat.legshot), stat.legshot) * p
	else
		data.damage     = base * p
		data.headDamage = apex.calcPartDamage(base, stat.headshot) * p
		data.lvl1Damage = apex.calcPartDamage(base, lvl1) * p
		data.lvl2Damage = apex.calcPartDamage(base, lvl2) * p
		data.lvl3Damage = apex.calcPartDamage(base, lvl3) * p
		data.legsDamage = apex.calcPartDamage(base, stat.legshot) * p
	end
	table.insert(dataset, data)
end

local p = {}
function p._main(args)
	args = args or {}
	
	local lang  = args.lang or 'ja'
	local res   = configuration[lang]
	local stats = mw.loadData('Module:Stat/Weapon')
	
	local dataset = {}
	for name, stat in pairs(stats) do
		local baseDamage = stat.damage.base
		local baseData = {
			ammo      = stat.ammo,
			name      = name,
			shortname = stat.localization['Japanese_Short'],
		}
		local special = aw.stringstarts(stat.ammo, 'special_')
		
		-- チャージビーム (チャージライフル)
		if stat.damage.beam then
			for t = 0, stat.damage.beam.ticks do
				local tickData = aw.shallowCopy(baseData)
				tickData.damage = baseDamage + stat.damage.beam.base * t
				if t ~= 1 then
					tickData.option = string.format(res.ticksFormat, t)
				else
					tickData.option = res.tick
				end
				addData(dataset, tickData, baseDamage, stat.damage, nil, function(val, mul)
					return val + apex.calcPartDamage(stat.damage.beam.base, mul) * t
				end)
			end
		
		-- 散弾 (ショットガン・トリプルテイク)
		elseif aw.isNumberAndGreaterThanX(stat.pellet, 1) then
			for p = 1, stat.pellet do
				local pelletData = aw.shallowCopy(baseData)
				if p > 1 then
					pelletData.option = string.format(res.pelletsFormat, p)
				else
					pelletData.option = res.pellet
				end
				addData(dataset, pelletData, baseDamage, stat.damage, p)
				
				-- ハンマーポイント弾 (モザンビーク)
				if (configuration.__debug__enableAllHopup or Hopup.hammerpoint_rounds.enabled) and aw.isNumberAndGreaterThanX(stat.damage.hammerpoint_rounds, 1) then
					local pelletUnshieldedData = aw.shallowCopy(pelletData)
					pelletUnshieldedData.hopup  = { 'hammerpoint_rounds' }
					addData(dataset, pelletUnshieldedData, math.floor(stat.damage.hammerpoint_rounds * baseDamage), stat.damage, p)
				end
			end 
		
		-- それ以外
		else
			-- チャージ (30-30リピーター・ボセックコンパウンドボウ)
			if aw.isNumberAndGreaterThanX(stat.damage.charged, baseDamage) then
				local minChargeData = aw.shallowCopy(baseData)
				minChargeData.option = res.mincharge
				addData(dataset, minChargeData, baseDamage, stat.damage)
				
				local maxChargeData = aw.shallowCopy(baseData)
				maxChargeData.option = res.maxcharge
				addData(dataset, maxChargeData, stat.damage.charged, stat.damage)
			
			-- チャージが無効の場合の通常出力
			else
				addData(dataset, baseData, baseDamage, stat.damage)
			end
			
			-- 増幅モード (センチネル)
			if aw.isNumberAndGreaterThanX(stat.damage.amped, baseDamage) then
				local ampedData = aw.shallowCopy(baseData)
				ampedData.ammo   = ampedData.ammo .. '_amped'
				ampedData.option = iu.item('シールドセル') .. ' <span class="text-desktoponly">増幅モード</span>'
				addData(dataset, ampedData, stat.damage.amped, stat.damage)
			end
			
			-- セレクトファイアレシーバー (ハボックライフル)
			if (configuration.__debug__enableAllHopup or Hopup.selectfire_receiver.enabled) and stat.selectfire_receiver and stat.selectfire_receiver.damage and aw.isNumberAndGreaterThanX(stat.selectfire_receiver.damage.base, baseDamage) then
				local selectfireReceiverData = aw.shallowCopy(baseData)
				selectfireReceiverData.hopup = { 'selectfire_receiver' }
				addData(dataset, selectfireReceiverData, stat.selectfire_receiver.damage.base, stat.selectfire_receiver.damage)
			end
				
			-- ハンマーポイント弾 (P2020)
			if (configuration.__debug__enableAllHopup or Hopup.hammerpoint_rounds.enabled) and aw.isNumberAndGreaterThanX(stat.damage.hammerpoint_rounds, 1) then
				local hammerpointRoundsData = aw.shallowCopy(baseData)
				hammerpointRoundsData.hopup = { 'hammerpoint_rounds' }
				addData(dataset, hammerpointRoundsData, math.floor(stat.damage.hammerpoint_rounds * baseDamage), stat.damage)
			end
			
			-- ディスラプター弾 (オルタネーター・RE-45オート)
			if (configuration.__debug__enableAllHopup or Hopup.disruptor_rounds.enabled or special) and aw.isNumberAndGreaterThanX(stat.damage.disruptor_rounds, 1) then
				local disruptorRoundsData = aw.shallowCopy(baseData)
				disruptorRoundsData.hopup  = { 'disruptor_rounds' }
				addData(dataset, disruptorRoundsData, baseDamage, stat.damage, nil, function(val)
					return apex.calcDisruptorDamage(val, stat.damage.disruptor_rounds)
				end)
			end
				
			-- アンビルレシーバー (VK-47フラットライン・R-301カービン)
			if (configuration.__debug__enableAllHopup or Hopup.anvil_receiver.enabled) and stat.anvil_receiver and aw.isNumberAndGreaterThanX(stat.anvil_receiver.damage.base, baseDamage) then
				local anvilReceiverData = aw.shallowCopy(baseData)
				anvilReceiverData.hopup = { 'anvil_receiver' }
				addData(dataset, anvilReceiverData, stat.anvil_receiver.damage.base, stat.anvil_receiver.damage)
			end
				
			-- シャッターキャップ (30-30リピーター・ボセックコンパウンドボウ)
			if (configuration.__debug__enableAllHopup or Hopup.shatter_caps.enabled) and stat.shatter_caps and aw.isNumberAndGreaterThanX(stat.shatter_caps.damage.base, 1) and aw.isNumberAndGreaterThanX(stat.shatter_caps.pellet, 1) then
				if aw.isNumberAndGreaterThanX(stat.shatter_caps.damage.charged, stat.shatter_caps.damage.base) then
					for p = 1, stat.shatter_caps.pellet do
						local shatterCapsMinChargeData = aw.shallowCopy(baseData)
						if p > 1 then
							shatterCapsMinChargeData.option = string.format(res.pelletsWithAdditionalFormat, res.mincharge, p)
						else
							shatterCapsMinChargeData.option = string.format(res.pelletWithAdditional, res.mincharge)
						end
						shatterCapsMinChargeData.hopup = { 'shatter_caps' }
						addData(dataset, shatterCapsMinChargeData, stat.shatter_caps.damage.base, stat.shatter_caps.damage, p)
						
						local shatterCapsMaxChargeData = aw.shallowCopy(shatterCapsMinChargeData)
						if p > 1 then
							shatterCapsMaxChargeData.option = string.format(res.pelletsWithAdditionalFormat, res.maxcharge, p)
						else
							shatterCapsMaxChargeData.option = string.format(res.pelletWithAdditional, res.maxcharge)
						end
						addData(dataset, shatterCapsMaxChargeData, stat.shatter_caps.damage.charged, stat.shatter_caps.damage, p)
					end
				else
					for p = 1, stat.shatter_caps.pellet do
						local shatterCapsData = aw.shallowCopy(baseData)
						if p > 1 then
							shatterCapsData.option = string.format(res.pelletsFormat, p)
						else
							shatterCapsData.option = res.pellet
						end
						shatterCapsData.hopup = { 'shatter_caps' }
						addData(dataset, shatterCapsData, stat.shatter_caps.damage.base, stat.shatter_caps.damage, p)
					end
				end
			end
		end
	end
	
	local metadata = {
		tableutil.RankCell.new('', 'damage', true),
		tableutil.AmmoCell.new('', 'ammo', {
			attributes     = { align = 'center' },
			headerStyle    = { width = '36px' },
		}),
		tableutil.WeaponNameCell.new(res.weaponname, 'name', {
			ammoIndex      = 'ammo',
			attributes     = { align = 'left' },
			cellClass      = 'st-dashed-right st-mobile-none-right st-mobile-padding0-right',
			headerColspan  = 2,
			optionIndex    = 'option',
			shortnameIndex = 'shortname',
		}),
		tableutil.HopupCell.new(res.hopup, 'hopup', {
			attributes     = { align = 'left' },
			cellClass      = 'st-dashed-left st-mobile-none-left st-mobile-padding0-left',
			headerClass    = 'st-dashed-left st-mobile-none-left st-mobile-padding0-left',
			headerColspan  = 0,
		}),
		tableutil.ValueCell.new(res.legsshot, 'legsDamage', {
			headerStyle = {
				['min-width'] = '40px',
				['max-width'] = '4em',
			},
		}),
		tableutil.LineValueCell.new(res.bodyshot, 'damage', {
			startIndex  = 'legsDamage',
			endIndex    = 'lvl1Damage',
			cellClass   = 'st-mobile-graph st-mobile-textshadow',
			footerClass = 'st-mobile-graph',
			headerClass = 'st-mobile-graph',
			headerStyle = {
				['min-width'] = '80px',
				['max-width'] = '8em',
			},
			maximumValue = 150,
			preferredGridCount = 3,
		}),
		tableutil.ValueCell.new(res.headlvl1, 'lvl1Damage', {
			headerStyle = {
				['min-width'] = '40px',
				['max-width'] = '4em',
			},
		}),
		tableutil.LineCell.new(res.graph, 'damage', {
			startIndex  = 'legsDamage',
			endIndex    = 'headDamage',
			cellClass   = 'st-desktop-graph',
			footerClass = 'st-desktop-graph',
			headerClass = 'st-desktop-graph',
			headerStyle = {
				['min-width'] = '160px',
			},
			maximumValue = 150,
		}),
	}
	local node = tableutil.createTable(dataset, metadata, opts)
	return tostring(node)
end

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

return p