Difference between revisions of "Template:Event points table row"

From mtgpq wiki
Jump to: navigation, search
Line 46: Line 46:
 
|base_3=15
 
|base_3=15
 
|bonus_3=10
 
|bonus_3=10
 +
}}
 +
 +
{{Event points table row
 +
|event=Terrors in the Shadows
 +
|charges=3
 +
|start_hour=13
 +
|total_hours=70
 +
|base_1=25
 +
|bonus_1=20
 
}}
 
}}
  
Line 59: Line 68:
 
     + IF(subnodes > 2: floor((subnodes - 3 + charges / subnodes) * base_3)
 
     + IF(subnodes > 2: floor((subnodes - 3 + charges / subnodes) * base_3)
 
--> {{#expr:
 
--> {{#expr:
(({{#if:{{Event data: {{{event}}}|7}}|{{Event data: {{{event}}}|7}} - 1 + }}{{{charges}}}) / {{Event data: {{{event}}}|7}}) * {{{base_1}}}
+
floor(({{Event data: {{{event}}}|7}} - 1 + {{{charges}}}) / {{Event data: {{{event}}}|7}}) * {{{base_1}}}
{{#ifexpr: {{#if:{{Event data: {{{event}}}|7}}|1|0}}|{{#if:{{Event data: {{{event}}}|7}} > 1|
+
{{#ifexpr: {{Event data: {{{event}}}|7}} > 1|
+ floor(({{Event data: {{{event}}}|7}} - 2 + {{{charges}}}) / {{Event data: {{{event}}}|7}}) * {{{base_2}}}}}}}
+
+ floor(({{Event data: {{{event}}}|7}} - 2 + {{{charges}}}) / {{Event data: {{{event}}}|7}}) * {{{base_2}}}}}
{{#ifexpr: {{#if:{{Event data: {{{event}}}|7}}|1|0}}|{{#if:{{Event data: {{{event}}}|7}} > 2|
+
{{#ifexpr: {{Event data: {{{event}}}|7}} > 2|
+ floor(({{Event data: {{{event}}}|7}} - 3 + {{{charges}}}) / {{Event data: {{{event}}}|7}}) * {{{base_3}}}}} }}}}
+
+ floor(({{Event data: {{{event}}}|7}} - 3 + {{{charges}}}) / {{Event data: {{{event}}}|7}}) * {{{base_3}}}}}
 +
}}
 
| <!-- Bonus points:
 
| <!-- Bonus points:
 
     floor((subnodes - 1 + charges) / subnodes) * bonus_1
 
     floor((subnodes - 1 + charges) / subnodes) * bonus_1
Line 69: Line 79:
 
     + IF(subnodes > 2: floor((subnodes - 3 + charges / subnodes) * bonus_3)
 
     + IF(subnodes > 2: floor((subnodes - 3 + charges / subnodes) * bonus_3)
 
--> {{#expr:
 
--> {{#expr:
floor(({{#if:{{Event data: {{{event}}}|7}}|{{Event data: {{{event}}}|7}} - 1 + }}{{{charges}}}) / {{Event data: {{{event}}}|7}})
+
floor(({{Event data: {{{event}}}|7}} - 1 + {{{charges}}}) / {{Event data: {{{event}}}|7}})
 
* {{{bonus_1}}}
 
* {{{bonus_1}}}
{{#ifexpr: {{#if:{{Event data: {{{event}}}|7}}|1|0}}|{{#if:{{Event data: {{{event}}}|7}} > 1|
+
{{#ifexpr: {{Event data: {{{event}}}|7}} > 1|
 
+ floor(({{Event data: {{{event}}}|7}} - 2 + {{{charges}}}) / {{Event data: {{{event}}}|7}})
 
+ floor(({{Event data: {{{event}}}|7}} - 2 + {{{charges}}}) / {{Event data: {{{event}}}|7}})
* {{{bonus_2}}}}}}}
+
* {{{bonus_2}}}}}
{{#ifexpr: {{#if:{{Event data: {{{event}}}|7}}|1|0}}|{{#if:{{Event data: {{{event}}}|7}} > 2|
+
{{#ifexpr: {{Event data: {{{event}}}|7}} > 2|
 
+ floor(({{Event data: {{{event}}}|7}} - 3 + {{{charges}}}) / {{Event data: {{{event}}}|7}})
 
+ floor(({{Event data: {{{event}}}|7}} - 3 + {{{charges}}}) / {{Event data: {{{event}}}|7}})
* {{{bonus_3}}}}}}}
+
* {{{bonus_3}}}}}
 
}}
 
}}
 
| <!-- Total points:
 
| <!-- Total points:
Line 83: Line 93:
 
     + IF(subnodes > 2: floor((subnodes - 3 + charges / subnodes) * (base_3 + bonus_3))
 
     + IF(subnodes > 2: floor((subnodes - 3 + charges / subnodes) * (base_3 + bonus_3))
 
--> {{#expr:
 
--> {{#expr:
floor(({{#if:{{Event data: {{{event}}}|7}}|{{Event data: {{{event}}}|7}} - 1 + }}{{{charges}}}) / {{Event data: {{{event}}}|7}})
+
floor(({{Event data: {{{event}}}|7}} - 1 + {{{charges}}}) / {{Event data: {{{event}}}|7}})
 
* ({{{base_1}}} + {{{bonus_1}}})
 
* ({{{base_1}}} + {{{bonus_1}}})
{{#ifexpr: {{#if:{{Event data: {{{event}}}|7}}|1|0}}|{{#if:{{Event data: {{{event}}}|7}} > 1|
+
{{#ifexpr: {{Event data: {{{event}}}|7}} > 1|
 
+ floor(({{Event data: {{{event}}}|7}} - 2 + {{{charges}}}) / {{Event data: {{{event}}}|7}})
 
+ floor(({{Event data: {{{event}}}|7}} - 2 + {{{charges}}}) / {{Event data: {{{event}}}|7}})
* ({{{base_2}}} + {{{bonus_2}}})}}}}
+
* ({{{base_2}}} + {{{bonus_2}}})}}
{{#ifexpr: {{#if:{{Event data: {{{event}}}|7}}|1|0}}|{{#if:{{Event data: {{{event}}}|7}} > 2|
+
{{#ifexpr: {{Event data: {{{event}}}|7}} > 2|
 
+ floor(({{Event data: {{{event}}}|7}} - 3 + {{{charges}}}) / {{Event data: {{{event}}}|7}})
 
+ floor(({{Event data: {{{event}}}|7}} - 3 + {{{charges}}}) / {{Event data: {{{event}}}|7}})
* ({{{base_3}}} + {{{bonus_3}}})}}}}
+
* ({{{base_3}}} + {{{bonus_3}}})}}
 
}}
 
}}
 
| <!-- Hours elapsed:  (charges - charges_initial) * recharge_time
 
| <!-- Hours elapsed:  (charges - charges_initial) * recharge_time

Revision as of 06:08, 1 March 2019

Usage

Generates a row of a Template:Event points table.

Parameters are:

  • event: The name of the event. This is used to extract information about charges from the event's data template.
  • charges: The number of charges for which to generate a row of the table.
  • start_hour: The hour (0-23) on which event starts, in PDT
  • total_hours: The total number of hours from the start time to the end time. For events with unpredictable end times, like boss health events, this controls how many rows of the table to show, and does not indicate the actual end time.
  • base_1: The number of base points scorable on the first round of sub-nodes.
  • bonus_1: The number of bonus points scorable on the first round of sub-nodes.
  • base_2: The number of base points scorable on the second round of sub-nodes. Must be present if there are at least 2 sub-nodes.
  • bonus_2: The number of bonus points scorable on the second round of sub-nodes. Must be present if there are at least 2 sub-nodes.
  • base_3: The number of base points scorable on the third round of sub-nodes. Must be present if there are at least 3 sub-nodes.
  • bonus_3: The number of bonus points scorable on the third round of sub-nodes. Must be present if there are at least 3 sub-nodes.


Example

The following shorthand:

{{Event points table row
|event=A World Reborn
|charges=3
|start_hour=13
|total_hours=70
|base_1=15
|bonus_1=10
|base_2=15
|bonus_2=10
|base_3=15
|bonus_3=10
}}

Produces:

|- | 3 | 45 | 30 | 75 | +8 Hrs | 9:00 PM


|- | 3 (Initial charges) | 75 | 60 | 135 | -START- | 1:00 PM