Difference between revisions of "Template:InfectedPowers"

From ShadowHaven Reloaded
Jump to navigation Jump to search
(Undo revision 103217 by Bulldogc (talk))
Tag: Undo
Line 1: Line 1:
<includeonly>{{#expr:floor(((({{#time:Y |now + 61 years}} * 12) + {{#time:m |now + 61 years}}) - (({{{Year}}} * 12) + {{{Month}}}) - ({{#ifexpr:{{#time:d |now + 61 years}} < {{{Day}}} | 1 | 0}}))/2) + 1 }}
<includeonly>{{#expr:floor(((({{#time:Y |now + 61 years}} * 12) + {{#time:m |now + 61 years}}) - (({{{Year}}} * 12) + {{{Month}}}) - ({{#ifexpr:{{#time:d |now + 61 years}} < {{{Day}}} | 1 | 0}}))/2) + 1 - {{{Owned|0}}} }}
</includeonly>
</includeonly>
<noinclude>
<noinclude>
Line 18: Line 18:
|Day=16
|Day=16
|Year=2082
|Year=2082
|Owned=1
|}}
|}}
</pre>
</pre>
Line 25: Line 26:
|Day=16
|Day=16
|Year=2082
|Year=2082
|Owned=1
|}}
|}}



Revision as of 13:11, 16 December 2022


Usage

This template allows you to put in a character's infected date and will calculate the number of infected optional powers that the character qualifies to buy.

  • All entries including Month must be in numeric format.
  • Year must be the full, 4 digit year.

So, if you enter this:

{{InfectedPowers|
|Month=12
|Day=16
|Year=2082
|Owned=1
|}}

The template will return the number of infected powers that the character qualifies for. 17



The date fields are mandatory, the Bought field can be left at 0 or updated when you buy an optional power.