Template:Creature mutation: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
mNo edit summary
(added third argument that takes ego. if cargo finds that the mutation is a mental mutation, will add modifier accordingly)
Line 1: Line 1:
<noinclude>{{#cargo_declare:_table=CreatureMutations|Mutation=Page|MutationLevel=Integer}}</noinclude><includeonly>{{#cargo_store:_table=CreatureMutations|Mutation={{{1|}}}|MutationLevel={{{2|0}}}}}
<noinclude>{{#cargo_declare:_table=CreatureMutations|Mutation=Page|MutationLevel=Integer}}</noinclude><includeonly>{{#cargo_store:_table=CreatureMutations|Mutation={{{1|}}}|MutationLevel={{{2|0}}}}}
[[{{{1|}}}]] {{#ifeq: {{{2|}}}|0||({{{2|1}}})}}</includeonly><noinclude>[[Category:Templates]]  
[[{{{1|}}}]] {{#ifeq: {{{2|}}}|0||{{#ifeq: {{#cargo_query:table=Mutations|fields=Type|where=_pageName={{{1|}}}}}|yes|{{#vardefine:mod|{{modifier|{{{3|16}}}}}}}{{#ifexpr: {{#var:mod}} > 0|{{#vardefine:color|+&amp;G}}|{{#ifexpr: {{#var:mod}} < 0|{{#vardefine:color|-&amp;r}}|{{#vardefine:color|+&amp;y}}}}}}{{qud text|({{{2|1}}}{{{#var:color}}}{{#var:mod}})}} |({{{2|1}}})}}}}
 
</includeonly><noinclude>[[Category:Templates]]  


Template for use in [[Template:Character]] only.  
Template for use in [[Template:Character]] only.  

Revision as of 19:11, 26 July 2019

This template defines the table "CreatureMutations". View table.

Template for use in Template:Character only.

The first argument is the mutation name, and the second is the mutation level (defaults to 0). If mutation level is 0, the mutation level will not be shown (used for 1 pt mutations):

{{creature mutation|Burrowing Claws|3}}

Burrowing Claws (3)