Template:Jam occurrence leaderboard/tiecalc: Difference between revisions
From VNDev Wiki
split from main template |
m default for rank |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<!-- Calculates the correct rank number by comparing to prior items --> | <!-- Calculates the correct rank number by comparing to prior items --> | ||
{{#ifexpr: {{{rank}}} = 1 | 1 | | {{#ifexpr: {{{rank|1}}} = 1 | 1 | | ||
{{#ifexpr: {{Jam occurrence leaderboard/prop | date={{{date|}}} | vnOnly={{{vnOnly|}}} | for={{{for}}} | offset={{#expr: {{{rank}}}-1}} }} | {{#ifexpr: {{Jam occurrence leaderboard/prop | date={{{date|}}} | vnOnly={{{vnOnly|}}} | for={{{for}}} | offset={{#expr: {{{rank|1}}}-1}} }} | ||
= {{Jam occurrence leaderboard/prop | date={{{date|}}} | vnOnly={{{vnOnly|}}} | for={{{for}}} | offset={{#expr: {{{rank}}}-2}} }} | = {{Jam occurrence leaderboard/prop | date={{{date|}}} | vnOnly={{{vnOnly|}}} | for={{{for}}} | offset={{#expr: {{{rank|1}}}-2}} }} | ||
| <!--At least two way tie; now test for three way tie--> | | <!--At least two way tie; now test for three way tie--> | ||
{{#ifexpr: {{Jam occurrence leaderboard/prop | date={{{date|}}} | vnOnly={{{vnOnly|}}} | for={{{for}}} | offset={{#expr: {{{rank}}}-1}} }} | {{#ifexpr: {{Jam occurrence leaderboard/prop | date={{{date|}}} | vnOnly={{{vnOnly|}}} | for={{{for}}} | offset={{#expr: {{{rank|1}}}-1}} }} | ||
= {{Jam occurrence leaderboard/prop | date={{{date|}}} | vnOnly={{{vnOnly|}}} | for={{{for}}} | offset={{#expr: {{{rank}}}-3}} }} | = {{Jam occurrence leaderboard/prop | date={{{date|}}} | vnOnly={{{vnOnly|}}} | for={{{for}}} | offset={{#expr: {{{rank|1}}}-3}} }} | ||
| {{#expr: {{{rank}}}-2}} (tie) | | {{#ifeq: {{{format|}}} | number | {{#expr: {{{rank|1}}}-2}} | {{#expr: {{{rank|1}}}-2}} (tie)}} | ||
| {{#expr: {{{rank}}}-1}} (tie) | | {{#ifeq: {{{format|}}} | number | {{#expr: {{{rank|1}}}-1}} | {{#expr: {{{rank|1}}}-1}} (tie)}} | ||
}} <!--end if for three-way tie--> | }} <!--end if for three-way tie--> | ||
| <!--Not a tie or is first instance of a tie. Now test if tied with next item.--> | | <!--Not a tie or is first instance of a tie. Now test if tied with next item.--> | ||
{{#ifexpr: {{Jam occurrence leaderboard/prop | date={{{date|}}} | vnOnly={{{vnOnly|}}} | for={{{for}}} | offset={{#expr: {{{rank}}}-1}} }} | {{#ifexpr: {{Jam occurrence leaderboard/prop | date={{{date|}}} | vnOnly={{{vnOnly|}}} | for={{{for}}} | offset={{#expr: {{{rank|1}}}-1}} }} | ||
= {{Jam occurrence leaderboard/prop | date={{{date|}}} | vnOnly={{{vnOnly|}}} | for={{{for}}} | offset={{{rank}}} }} | = {{Jam occurrence leaderboard/prop | date={{{date|}}} | vnOnly={{{vnOnly|}}} | for={{{for}}} | offset={{{rank|1}}} }} | ||
| {{{rank}}} (tie) | | {{#ifeq: {{{format|}}} | number | {{{rank|1}}} | {{{rank|1}}} (tie)}} | ||
| {{{rank}}} | | {{#ifeq: {{{format|}}} | number | {{{rank|1}}} | {{{rank|1}}} }} | ||
}} <!--end if for first item of tie--> | }} <!--end if for first item of tie--> | ||
}} <!--end if for two-way tie--> | }} <!--end if for two-way tie--> | ||
}} <!--end if for rank is 1--> | }} <!--end if for rank is 1--> |
Latest revision as of 09:02, 25 January 2025
1