Template:Drop Rate

From Phantasy Star Universe Clementine
Revision as of 15:34, 20 December 2023 by Mika (talk | contribs) (Created page with "<includeonly> {{#ifexpr: {{{tickets}}} < 1 |0 |1/{{#ifexpr: {{{tickets}}} > {{{max tickets}}} |1 |{{#expr: trunc {{#expr: {{{max tickets|100000}}}/{{{tickets}}}}}}}}}}}</in...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Purpose

Shortcut template for converting any ticket amount into a drop rate. All decimals in the output are truncated.

Parameter List

{{Drop Rate
|tickets       <!-- An integer amount for how many tickets an item has. If it is larger than the max ticket amount, it will be set to the max ticket amount. -->
|max tickets   <!-- An integer amount for the remaining ticket amount of a roll source. -->
}}

Examples

1 Ticket, 100k Max Tickets

{{Drop Rate|tickets=1|max tickets=100000}}

1/100000

15 Tickets, 100k Max Tickets

{{Drop Rate|tickets=15|max tickets=100000}}

1/6666

1 Ticket, 1 Max Ticket

{{Drop Rate|tickets=1|max tickets=1}}

1/1

100 Tickets, 1 Max Ticket

{{Drop Rate|tickets=100|max tickets=1}}

1/1

0 Tickets, 1 Max Ticket

{{Drop Rate|tickets=0|max tickets=1}}

0