モジュール:Sports table/WL PK

モジュールの解説[表示] [編集] [履歴] [キャッシュを破棄]

スポーツなどにおける順位表を作成するためのモジュール「モジュール:Sports table」のうち、「勝利/敗戦」に加え、「延長戦での勝/負」「PK戦(あるいはシュートアウトなど)での勝/負」に通常の勝敗と別の重み付けを与えるとき、あるいはタイブレーク数を表示させるときに用いるスタイルサブモジュールです。

使い方[編集]

基本的なコマンドは{{#invoke:Sports table|main|style=WL PK}}で、これにいくつかのオプションを追記して表を作成します。チーム名には当該モジュール内でのみ通用する、アルファベット3文字程度の略称を設定する必要があります。勝ち点と得失点差は自動計算されます(勝ち点に制御を加えることも可能。後述)。

オプションは「モジュール:Sports table/WDL」「モジュール:Sports table/WDL OT」とほぼ同じですが、デフォルト値が一部異なります(太字が異なる部分)。

勝ち点の自動計算に用いるオプション
勝敗方法 勝利 引分 敗戦 延長戦勝利 延長線敗戦 PK戦勝利 PK戦敗戦
列の表示/非表示の指定 (必ず表示) |show_draw=no (必ず表示) |showOTwin=no |showOTloss=no |showPKwin=yes |showPKloss=yes
勝ち点の設定 |winpoints=3 |drawpoints=1 |losspoints=0 |OTwinpoints=1 |OTlosspoints=0 |PKwinpoints=2 |PKlosspoints=1

表示例[編集]

{{#invoke:sports table|main|style=WL PK
|showPKwin=no
|showPKloss=yes
|PKlosspoints=1
|res_col_header=Q

|team1=ANT|name_ANT={{Fb team Antlers}}
|team2=GRA|name_GRA={{Fb team Grampus 8}}
|team3=FLÜ|name_FLÜ={{Fb team Flugels}}
|team4=JÚB|name_JÚB={{fb team Jubilo}}
|team5=REY|name_REY={{Fb team Reysol}}

|win_ANT=21|loss_ANT=6|PKloss_ANT=3|gf_ANT=61|ga_ANT=34
|win_GRA=21|loss_GRA=9|PKloss_GRA=0|gf_GRA=63|ga_GRA=39
|win_FLÜ=21|loss_FLÜ=9|PKloss_FLÜ=0|gf_FLÜ=58|ga_FLÜ=44
|win_JÚB=20|loss_JÚB=8|PKloss_JÚB=2|gf_JÚB=53|ga_JÚB=38
|win_REY=20|loss_REY=10|PKloss_REY=0|gf_REY=67|ga_REY=52

|col_C=green1|text_C=サントリーカップ進出
|result1=C
|update=complete|source=[https://data.j-league.or.jp/SFRT01/?competitionSectionIdLabel=最新節&competitionIdLabel=Jリーグ&yearIdLabel=1996年&yearId=1996&competitionId=36&competitionSectionId=0&search=search J.LEAGUE Data Site]
}}
チーム PK負 出場権
1 鹿島アントラーズ 30 21 3 6 61 34 +27 66 サントリーカップ進出
2 名古屋グランパスエイト 30 21 0 9 63 39 +24 63
3 横浜フリューゲルス 30 21 0 9 58 44 +14 63
4 ジュビロ磐田 30 20 2 8 53 38 +15 62
5 柏レイソル 30 20 0 10 67 52 +15 60

-- Style for football tables
local pp = {}
local pmod = require('Module:Sports table/WDL OT')

function pp.header(t,Args,p_sub,pos_label,group_col,VTE_text,full_table,results_header_txt)
	Args['show_draw'] = Args['show_draw'] or 'no'
	Args['showOTwin'] = Args['showOTwin'] or 'no'
	Args['showOTloss'] = Args['showOTloss'] or 'no'
	Args['showPKwin'] = Args['showPKwin'] or 'yes'
	Args['showPKloss'] = Args['showPKloss'] or 'yes'
	Args['PKwinpoints'] = Args['PKwinpoints'] or 2
	Args['PKlosspoints'] = Args['PKlosspoints'] or 1
	return pmod.header(t,Args,p_sub,pos_label,group_col,VTE_text,full_table,results_header_txt)
end

function pp.row(frame,t,Args,p_sub,notes_exist,hth_id_list,full_table,rand_val,team_list,team_code_ii,ii_start,ii_end,ii_fw,bg_col,N_teams,ii,ii_show)
	Args['show_draw'] = Args['show_draw'] or 'no'
	Args['showOTwin'] = Args['showOTwin'] or 'no'
	Args['showOTloss'] = Args['showOTloss'] or 'no'
	Args['showPKwin'] = Args['showPKwin'] or 'yes'
	Args['showPKloss'] = Args['showPKloss'] or 'yes'
	Args['PKwinpoints'] = Args['PKwinpoints'] or 2
	Args['PKlosspoints'] = Args['PKlosspoints'] or 1
	return pmod.row(frame,t,Args,p_sub,notes_exist,hth_id_list,full_table,rand_val,team_list,team_code_ii,ii_start,ii_end,ii_fw,bg_col,N_teams,ii,ii_show)
end

function pp.status(Args)
	Args['show_draw'] = Args['show_draw'] or 'no'
	Args['showOTwin'] = Args['showOTwin'] or 'no'
	Args['showOTloss'] = Args['showOTloss'] or 'no'
	Args['showPKwin'] = Args['showPKwin'] or 'yes'
	Args['showPKloss'] = Args['showPKloss'] or 'yes'
	Args['PKwinpoints'] = Args['PKwinpoints'] or 2
	Args['PKlosspoints'] = Args['PKlosspoints'] or 1
	return pmod.status(Args)
end

return pp