Template:CR: Difference between revisions

From Epic Path
Jump to navigation Jump to search
(Created page with "<noinclude> Outputs the CR of a monster (e.g. 11). Only useful inside the Monster template. Call as follows: <pre> {{CR}} </pre> '''Parameters (all are optional):''' * '''(u...")
 
No edit summary
Line 15: Line 15:
* <nowiki>{{CR|n = 2|op = mult}}</nowiki> - outputs double the normal CR value for the monster.
* <nowiki>{{CR|n = 2|op = mult}}</nowiki> - outputs double the normal CR value for the monster.


</noinclude><includeonly>
</noinclude><includeonly>{{#expr:
{{#expr:
   {{#ifexpr: ({{#var:CR}} + {{{1|0}}}) < 1 | 1 |  
   {{#ifexpr: ({{#var:CR}} + {{{1|0}}}) < 1 | 1 |  
       {{#ifexpr: ({{#var:CR}} + {{{1|0}}}) > 44 | 44 |  
       {{#ifexpr: ({{#var:CR}} + {{{1|0}}}) > 44 | 44 |  
Line 23: Line 22:
       }}
       }}
   }}
   }}
}}
  {{#ifexpr:{{{n|}}}|
{{#ifexpr:{{{n|}}}|
      {{#switch:{{{op|}}} |mult=*|div=/|#default=+
  {{#switch:{{{op|}}} |mult=*|div=/|#default=+
      }}{{{n}}}|
  }}{{{n}}}|
  }} round 0
}} round 0
}}</includeonly>
</includeonly>

Revision as of 14:44, 14 December 2017

Outputs the CR of a monster (e.g. 11). Only useful inside the Monster template. Call as follows:

{{CR}}

Parameters (all are optional):

  • (unnamed) = modify CR with a positive or negative number. -2 lowers CR by two before outputting value.
  • n = modify numeric value with a positive or negative number. "n=-2" lowers skill DC by 2 before outputting the value.
  • op = modify the operand. Values are "op=mult" and "op=div", allowing you to multiply or divide by parameter n's value. Default is addition (with negative numbers subtracting).

Examples:

  • {{CR|-2}} - outputs the monster's CR as though it was two levels lower than actual.
  • {{CR|n = 2|op = mult}} - outputs double the normal CR value for the monster.