Template:ItemTemplate: Difference between revisions

From Caves of Qud Wiki
Jump to navigation Jump to search
(added empsensitive as a boolean. only shows up if = yes. made usesslots default to wornon if usesslots is not specified)
(fix to "Other Properties" - don't generate a blank field when twohanded, metal, or lightprojectile are explicitly set to "no")
Line 72: Line 72:
{{#if: {{{usesslots|}}}| {{infobox row|Uses Slots|{{{usesslots|{{{wornon|}}}}}} }} }}
{{#if: {{{usesslots|}}}| {{infobox row|Uses Slots|{{{usesslots|{{{wornon|}}}}}} }} }}
<!--Check if the object is two handed, made out of metal, or have light projectiles(tag name = Light). any extra details can be added in extra-->
<!--Check if the object is two handed, made out of metal, or have light projectiles(tag name = Light). any extra details can be added in extra-->
{{#if: {{{extra|}}}{{{twohanded|}}}{{{metal|}}}{{{lightprojectile|}}}{{{reflect|}}} | {{infobox row|Other Properties|{{#ifeq: {{{twohanded|}}}| yes | <p>Two Handed</p>| }}{{#ifeq: {{{metal|}}} | yes |<p>Metal</p>| }}{{#ifeq: {{{lightprojectile|}}} | yes |<p>Light Projectiles</p>}}{{#if:{{{reflect|}}}|<p>Reflects {{{reflect}}}% of damage, rounded up</p>}}{{#if: {{{extra|}}}|<p>{{{extra}}}</p>}} }} }}
{{#if: {{{extra|}}}{{#ifeq:{{{twohanded|}}}|yes|yes|}}{{#ifeq:{{{metal|}}}|yes|yes|}}{{#ifeq:{{{lightprojectile|}}}|yes|yes|}}{{{reflect|}}} | {{infobox row|Other Properties|{{#ifeq: {{{twohanded|}}}| yes | <p>Two Handed</p>| }}{{#ifeq: {{{metal|}}} | yes |<p>Metal</p>| }}{{#ifeq: {{{lightprojectile|}}} | yes |<p>Light Projectiles</p>}}{{#if:{{{reflect|}}}|<p>Reflects {{{reflect}}}% of damage, rounded up</p>}}{{#if: {{{extra|}}}|<p>{{{extra}}}</p>}} }} }}
<!--Makes the attributes box show up if *any* of the attributes are filled out-->
<!--Makes the attributes box show up if *any* of the attributes are filled out-->
{{#if: {{{strength|}}}{{{agility|}}}{{{toughness|}}}{{{intelligence|}}}{{{willpower|}}}{{{ego|}}} |
{{#if: {{{strength|}}}{{{agility|}}}{{{toughness|}}}{{{intelligence|}}}{{{willpower|}}}{{{ego|}}} |

Revision as of 17:33, 25 July 2019

This template defines the table "Items". This table has not been created yet. Template:ItemTemplate/doc