Template:Ability card: Difference between revisions

From Deadlock Wiki
Jump to navigation Jump to search
Tag: New redirect
 
Removed redirect to User:Cronos/Sandbox card
Tag: Removed redirect
Line 1: Line 1:
#REDIRECT [[User:Cronos/Sandbox card]]
<includeonly>{{anchor|{{{ability_name|}}}}}<!--
 
These values can be used in the ability_details section to reference a value in the table.
 
-->{{#vardefine:{{{ability_name}}} image|{{{ability_image|}}} }}<!--
-->{{#vardefine:{{{ability_name}}} ammo|{{{ammo|}}} }}<!--
-->{{#vardefine:{{{ability_name}}} ammo_drain|{{{ammo_drain|}}} }}<!--
-->{{#vardefine:{{{ability_name}}} cooldown|{{{cooldown|}}} }}<!--
-->{{#vardefine:{{{ability_name}}} damage|{{{damage_falloff_range|}}} }}<!--
-->{{#vardefine:{{{ability_name}}} spread|{{{spread|}}} }}<!--
-->{{#vardefine:{{{ability_name}}} heal|{{{heal|}}} }}<!--
-->{{#vardefine:{{{ability_name}}} damage_mod|{{{damage_mod|}}} }}<!--
-->{{#vardefine:{{{ability_name}}} mspeed|{{{mspeed|}}} }}<!--
-->{{#vardefine:{{{ability_name}}} pspeed|{{{pspeed|}}} }}<!--
-->{{#vardefine:{{{ability_name}}} pradius|{{{pradius|}}} }}<!--
-->{{#vardefine:{{{ability_name}}} cast_time|{{{cast_time|}}} }}<!--
-->{{#vardefine:{{{ability_name}}} duration|{{{duration|}}} }}<!--
-->{{#vardefine:{{{ability_name}}} fire_rate|{{{fire_rate|}}} }}<!--
-->{{#vardefine:{{{ability_name}}} health|{{{health|}}} }}<!--
-->{{#vardefine:{{{ability_name}}} pellets|{{{pellets|}}} }}<!--
-->{{#vardefine:{{{ability_name}}} range|{{{range|}}} }}<!--
-->{{#vardefine:{{{ability_name}}} reload_time|{{{reload_time|}}} }}<!--
-->{{#vardefine:{{{ability_name}}} shot_type|{{{shot_type|}}} }}<!--
-->{{#vardefine:{{{ability_name}}} key_alternative|{{{key_alternative|}}} }}<!--
-->{{#vardefine:{{{ability_name}}} key|{{{key|
{{#if:{{#pos:{{lc:{{{ability_type|}}}}}|ultimate}}|ultimate
|{{#if:{{#pos:{{lc:{{{ability_type|}}}}}|weapon}}
|{{#if:{{#pos:{{lc:{{{ability_type|}}}}}|primary}}|primary fire
  |{{#if:{{#pos:{{lc:{{{ability_type|}}}}}|secondary}}|secondary fire|primary fire}}
  }}
}}
}} }}} }}<!-- Infer ultimate key for ultimates and mouse buttons for primary/secondary weapons
 
--><div style="display:flex; flex-direction:column;"><!-- Show video under box
--><div class="ability_details_main" style="display: flex; flex-wrap: wrap; align-items: flex-start;"><!-- Allows notes to be on the side of the infobox if there is space.
  --><div class="ability_box" style="flex:0 1 450px; margin-right:15px; border-radius: 10px 10px 20px 20px;"><!--
 
  --><div class="abilityHeader" style="font-weight:bold; font-size:140%; border-radius: 10px 10px 0px 0px; border:1px solid {{Color|wiki1}}; border-bottom: 1px solid white; padding:3px 5px; background:rgba(0,0,0,0.4);"><!--Begin box header
    -->{{{ability_name|No Name}}}<!--
    --><div style="float:right;"><!--
        -->{{#if:{{#var:{{{ability_name}}} key_alternative}}|<div class="abilityIcons" style="display:inline-block; font-size:60%; margin-right:5px; color:#0f0f0f; padding-left:0.59em; padding-right:0.59em; text-align:center; background-color:rgba(255,255,255,1); border-radius: 2px;">{{Tooltip|{{key|{{#var:{{{ability_name}}} key_alternative}}}}|Access Key}}</div>}}<!--Key Alternative, Utilizes the same template of key.
    -->{{#if:{{#var:{{{ability_name}}} key}}|<div class="abilityIcons" style="display:inline-block; margin-left:5px; color:#f06414; padding-left:0.2em; padding-right:0.25em; text-align:center; background-color:rgba(8,27,43,0.3);">{{Tooltip|{{key|{{#var:{{{ability_name}}} key}}}}|Hotkey}}</div>}}<!--Key
    --></div><!--
  --></div><!-- End box header
 
  --><div class="summaryInfoAndImage" style="display:inline-flex; background:rgba(0,0,0,0.15); width:100%"><!--Begin summary info and image
    --><div style="display:flex; flex-direction:column;  margin:5px 5px;"><!--
    --><div class="abilityImage" style="display:inline-block; width:128px; height:128px;"><!--
      --><div style="position:absolute;"><!--
        -->[[File:hero-ability-circle.svg|128x128px|link=]]<!--
      --></div><!--
      --><div style="width:100%; height:100%; display:flex; flex-direction:column; justify-content:center;"><!--
        -->[[File:{{#if:{{{ability_image|}}}|{{{ability_image}}}|Placeholder_ability_icon.png}}|link=|100x100px|middle|center]]<!--
      --></div><!--
    --></div><!--
    --><div style="width:128px; text-align:center;"><!--
      -->{{#if:{{{cooldown|}}}|{{#ifeq:{{{ability_type|Ability}}}|Ability|{{Tooltip|{{{cooldown|?}}}|Ability cooldown}}}}}}<!--
    --></div><!--Show ability cooldown
    --></div><!--
    --><div style="display:flex; flex-direction:column; width:100%;"><!--Begin summary info
    --><div style="display:inline-flex"><!--
      -->|<!--
        --><div style="display:flex; justify-content:center; column-gap:4px; padding-top:5px; padding-bottom:5px;"><!-- Begin interactions
        --><div class="abilityImage" style="display:inline-block; width:32px; height:32px;"><!--
          --><div style="position:absolute;"><!--
          -->{{#ifeq: {{lc:{{{ignores_barrier|}}}}}|partial|<!--
            --><div style="position:absolute; left:26px; top:16px; color:#cccccc; font-family:sans-serif;">'''!'''</div><!--
          -->}}<!--
          -->[[File:hero-ability-circle.svg|32x32px|link=|{{#ifeq: {{lc:{{{ignores_barrier|}}}}}|partial|Partially blocked|Blocked}} by barriers.]]<!--
          --></div><!--
          --><div style="width:100%; height:100%; display:flex; flex-direction:column; justify-content:center; {{#switch: {{lc:{{{ignores_barrier|}}}}}|yes|1=opacity:0.3;|#default=}}"><!--
          -->[[File:Ability-winston3.png|link=|25x25px|middle|center|Ignores barriers.]]<!--
          --></div><!--
        --></div><!--
        --><div class="abilityImage" style="display:inline-block; width:32px; height:32px;"><!--
          --><div style="position:absolute;"><!--
          -->{{#ifeq: {{lc:{{{ignores_matrix|}}}}}|partial|<!--
            --><div style="position:absolute; left:26px; top:16px; color:#cccccc; font-family:sans-serif;">'''!'''</div><!--
          -->}}<!--
          -->[[File:hero-ability-circle.svg|32x32px|link=|{{#ifeq: {{lc:{{{ignores_matrix|}}}}}|partial|Partially blocked|Blocked}} by Defense Matrix/Kinetic Grasp.]]<!--
          --></div><!--
          --><div style="width:100%; height:100%; display:flex; flex-direction:column; justify-content:center; {{#switch: {{lc:{{{ignores_matrix|}}}}}|yes|1=opacity:0.3;|#default=}}"><!--
          -->[[File:Ability-dva3.png|link=|25x25px|middle|center|Ignores Defense Matrix/Kinetic Grasp.]]<!--
          --></div><!--
        --></div><!--
        --><div class="abilityImage" style="display:inline-block; width:32px; height:32px;"><!--
          --><div style="position:absolute;"><!--
          -->{{#ifeq: {{lc:{{{ignores_deflect|}}}}}|partial|<!--
            --><div style="position:absolute; left:26px; top:16px; color:#cccccc; font-family:sans-serif;">'''!'''</div><!--
          -->}}<!--
          -->[[File:hero-ability-circle.svg|32x32px|link=|{{#ifeq: {{lc:{{{ignores_deflect|}}}}}|partial|Partially blocked|Blocked}} by Deflect/Javelin Spin.]]<!--
          --></div><!--
          --><div style="width:100%; height:100%; display:flex; flex-direction:column; justify-content:center; {{#switch: {{lc:{{{ignores_deflect|}}}}}|yes|1=opacity:0.3;|#default=}}"><!--
          -->[[File:Ability-genji2.png|link=|25x25px|middle|center|Ignores Deflect/Javelin Spin.]]<!--
          --></div><!--
        --></div><!--
        --><div class="abilityImage" style="display:inline-block; width:32px; height:32px;"><!--
          --><div style="position:absolute;"><!--
          -->{{#ifeq: {{lc:{{{ignores_boost|}}}}}|partial|<!--
            --><div style="position:absolute; left:26px; top:16px; color:#cccccc; font-family:sans-serif;">'''!'''</div><!--
          -->}}<!--
          -->[[File:hero-ability-circle.svg|32x32px|link=|{{#ifeq: {{lc:{{{ignores_boost|}}}}}|partial|Partially affected|Affected}} by damage boosts.]]<!--
          --></div><!--
          --><div style="width:100%; height:100%; display:flex; flex-direction:column; justify-content:center; {{#switch: {{lc:{{{ignores_boost|}}}}}|yes|1=opacity:0.3;|#default=}}"><!--
          -->[[File:Ability-ana4.png|link=|25x25px|middle|center|Ignores damage boosts.]]<!--
          --></div><!--
        --></div><!--
        --><div class="abilityImage" style="display:inline-block; width:32px; height:32px;"><!--
          --><div style="position:absolute;"><!--
          -->{{#ifeq: {{lc:{{{ignores_window|}}}}}|partial|<!--
            --><div style="position:absolute; left:26px; top:16px; color:#cccccc; font-family:sans-serif;">'''!'''</div><!--
          -->}}<!--
          -->[[File:hero-ability-circle.svg|32x32px|link=|{{#ifeq: {{lc:{{{ignores_window|}}}}}|partial|Partially affected|Affected}} by Amplification Matrix.]]<!--
          --></div><!--
          --><div style="width:100%; height:100%; display:flex; flex-direction:column; justify-content:center; {{#switch: {{lc:{{{ignores_window|}}}}}|yes|1=opacity:0.3;|#default=}}"><!--
          -->[[File:Baptiste-ability4.png|link=|25x25px|middle|center|Ignores Amplification Matrix.]]<!--
          --></div><!--
        --></div><!--
        --></div><!-- End interactions
      -->}}<!--
      --></div><!--
    --></div><!--
    --><div style="padding-right: 5px; vertical-align:top; font-size:85%;"><!--
      -->'' {{{official_description|}}} ''<!--
    --></div><!--
    --></div><!--End summary info
  --></div><!--End summary info and icon
 
  --><div style="padding:5px; padding-left: 10px; padding-right: 10px; padding-bottom: 5px;"><!-- START main content
    -->{{#if:{{{damage|}}}|{{Ability details/Data row|name={{lang|en={{tt|Damage|Single value: No damage falloff based on distance. Two values: Damage at close range and damage at maximum damage falloff.}}|zh-hans={{tt|伤害|一个数据:伤害不会因距离不同而改变。两个数据:伤害随距离变远而减弱}}}}|value={{{damage}}} }} }}<!--
    -->{{#if:{{{headshot|}}}|{{Ability details/Data row|name={{lang|en=Headshot|zh-hans=爆头}}|value={{{headshot}}} }} }}<!--
    -->{{#if:{{{heal|}}}|{{Ability details/Data row|name={{lang|en=Healing|zh-hans=治疗量}}|value={{{heal}}} }} }}<!--
    -->{{#if:{{{fire_rate|}}}|{{Ability details/Data row|name={{lang|en=Rate of fire|zh-hans=射速}}|value={{{fire_rate}}} }} }}<!--
    -->{{#if:{{{pellets|}}}|{{Ability details/Data row|name={{lang|en=Bullets per shot|zh-hans=子弹数量}}|value={{{pellets}}} }} }}<!--
    -->{{#if:{{{ammo_drain|}}}|{{Ability details/Data row|name={{lang|en=Ammo per shot|zh-hans=弹药用法}}|value={{{ammo_drain}}} }} }}<!--
    -->{{#if:{{{ammo|}}}|{{Ability details/Data row|name={{lang|en=Ammo|zh-hans=弹药}}|value={{{ammo}}} }} }}<!--
    -->{{#if:{{{reload_time|}}}|{{Ability details/Data row|name={{lang|en=Reload time|zh-hans=重装所需时间}}|value={{#replace:{{#replace:{{{reload_time}}}| seconds |{{lang|en=seconds|zh-hans=秒}}}}| second |{{lang|en=second|zh-hans=秒}}}} }} }}<!--
    -->{{#if:{{{health|}}}|{{Ability details/Data row|name={{lang|en=Health|zh-hans=生命值}}|value={{{health}}} }} }}<!--
    -->{{#if:{{{damage_mod|}}}|{{Ability details/Data row|name={{lang|en=Dmg. modification|zh-hans=Dmg. modification}}|value={{{damage_mod}}} }} }}<!--
    -->{{#if:{{{healing_mod|}}}|{{Ability details/Data row|name={{lang|en=Healing modification|zh-hans=Healing modification}}|value={{{healing_mod}}} }} }}<!--
    -->{{#if:{{{cast_time|}}}|{{Ability details/Data row|name={{lang|en={{tt|Cast time|Time before ability starts to take effect after activation and recovery time after ability finishes casting.}}}}|value={{{cast_time}}} }} }}<!--
    -->{{#if:{{{duration|}}}|{{Ability details/Data row|name={{lang|en=Duration|zh-hans=持续时间}}|value={{#replace:{{#replace:{{{duration}}}| seconds |{{lang|en=seconds|zh-hans=秒}}}}| second |{{lang|en=second|zh-hans=秒}} }} }} }}<!--
    -->{{#if:{{{range|}}}|{{Ability details/Data row|name={{lang|en=Max. range|zh-hans=最大距离}}|value={{{range}}} }} }}<!--
    -->{{#if:{{{radius|}}}|{{Ability details/Data row|name={{lang|en=Area of effect}}|value={{{radius}}} }} }}<!--
    -->{{#if:{{{spread|}}}|{{Ability details/Data row|name={{lang|en={{tt|Spread angle|Inaccuracy of the weapon, or angle of area-of-effect abilities (if applicable).}}}}|value={{{spread}}} }} }}<!--
    -->{{#if:{{{mspeed|}}}|{{Ability details/Data row|name={{lang|en=Move. speed|zh-hans=Movement speed}}|value={{{mspeed}}} }} }}<!--
    -->{{#if:{{{pspeed|}}}|{{Ability details/Data row|name={{lang|en=Projectile speed|zh-hans=Projectile speed}}|value={{{pspeed}}} }} }}<!--
    -->{{#if:{{{pradius|}}}|{{Ability details/Data row|name={{lang|en=Projectile radius|zh-hans=Projectile radius}}|value={{{pradius}}} }} }}<!--
    -->{{#ifeq: {{lc: {{{ability_type}}} }} |ability||{{#if:{{{cooldown|}}}|{{Ability details/Data row|name={{lang|en=Cooldown|zh-hans=冷却时间}}|value={{#replace:{{#replace:{{{cooldown}}}| seconds |{{lang|en=seconds|zh-hans=秒}}}}| second |{{lang|en=second|zh-hans=秒}} }} }} }} }}<!-- ifeq statement to show cooldown only for non-abilities, as abilities already list cooldown under icon
    -->{{#if:{{{old_description|}}}|<!--
    --><div style="vertical-align:bottom; font-size:85%; border-top: 1px solid white; margin-top:5px;"><!--
      -->'' {{{old_description|}}} ''<!--
    --></div><!--
    -->}}<!--
    -->{{#if:{{{ability_video_file|}}}|<!--
--><div class="collapsible-section" style="display:block; max-width:450px;"><!--
--><div class="mw-collapsible mw-collapsed" style="overflow:auto; font-weight: bold;"><!--
    --><div>''{{lang|en=Example Video:|zh-hans=饰品}}''</div><!--
    --><div class="mw-collapsible-content"><!--
    -->[[File:{{{ability_video_file}}}|link=|450px]]<!--
    --></div><!--
--></div><!--
--></div><!--
    -->}}<!--
  --></div><!--END main content
  --></div><!--
 
  --><div style="flex:1 1 450px; word-wrap:break-word; margin-top:7px"><!--
    -->{{#tag: tabber|<!-- details tabber start
    -->{{#if: {{{ability_details|}}}|{{!}}-{{!}} {{lang|en=Details|zh-hans=详情}}=<!-- closed nowiki tag on next line to prevent line break from being parsed, so the list displays properly
      --><div style="margin: 0.5em 0;"><nowiki/>
 
<div class="mobileonly">'''Ability details:'''</div>     
{{{ability_details}}}<!-- also it is necessary to have an extra line break before the parameters or the second tab ignores the margins for some weird reason
      --></div><!--
    -->}}<!--
    -->{{#if: {{{coop_details|}}}|{{!}}-{{!}} Co-op=<!--
      --><div style="margin: 0.5em 0;"><nowiki/>
 
<div class="mobileonly">'''Co-op details:'''</div>
{{{coop_details}}}<!--
      --></div><!--
    -->}}<!--
    -->}}<!-- details tabber end
  --></div><!--
--></div><!--
-->{{#if:{{{ability_video|}}}|<!--
  --><div class="collapsible-section" style="display:block; max-width:450px;"><!--
  --><div class="mw-collapsible mw-collapsed" style="overflow:auto;"><!--
    --><div>''{{lang|en=Example Video|zh-hans=饰品}}''</div><!--
    --><div class="mw-collapsible-content"><!--
    -->{{#ev:youtube|{{{ability_video}}} }}<!--
    --></div><!--
  --></div><!--
  --></div><!--
-->}}<!--
--></div><!--
--><br><!-- store to cargo if in main namespace in en wiki, unless structure is defined wrapper or hidden. Set to 'forceCargo' to enable storing cargo on other namespaces and languages
-->{{#switch: {{{structure|}}}
|#default=
{{if lang
|non-en=[[Category:Infobox uses on non-English pages]]
|en={{#ifeq: {{NAMESPACE}}|{{ns:0}}|
{{#cargo_store:_table=Abilities
| ability_name={{{ability_name|}}}
| ability_image={{{ability_image|}}}
| official_description={{{official_description|}}}
| ability_type={{{ability_type|}}}
| health={{{health|}}}
| shot_type={{{shot_type|}}}
| damage={{{damage|}}}
| damage_falloff_range={{{damage_falloff_range|}}}
| spread={{{spread|}}}
| pspeed={{{pspeed|}}}
| pradius={{{pradius|}}}
| heal={{{heal|}}}
| damage_mod={{{damage_mod|}}}
| healing_mod={{{healing_mod|}}}
| mspeed={{{mspeed|}}}
| range_distance={{{range|}}}
| radius={{{radius|}}}
| pellets={{{pellets|}}}
| fire_rate={{{fire_rate|}}}
| ammo={{{ammo|}}}
| ammo_drain={{{ammo_drain|}}}
| reload_time={{{reload_time|}}}
| cast_time={{{cast_time|}}}
| cooldown={{{cooldown|}}}
| duration={{{duration|}}}
| headshot={{{headshot|}}} <!-- ✓/✕ -->
| ability_video={{{ability_video|}}}
| ability_video_file={{{ability_video_file|}}}
| ability_details={{{ability_details|}}}
| ult_req={{{ult_req|}}}
| ignores_barrier={{{ignores_barrier|}}}
| ignores_matrix={{{ignores_matrix|}}}
| ignores_deflect={{{ignores_deflect|}}}
| ignores_boost={{{ignores_boost|}}}
| ignores_window={{{ignores_window|}}}
| ability_key={{{key|}}}
}}
}}
}}
|wrapper=
|hidden=
|forceCargo=
{{if lang
|non-en=[[Category:Infobox uses on non-English pages]]
}}
{{#cargo_store:_table=Abilities
| ability_name={{{ability_name|}}}
| ability_image={{{ability_image|}}}
| official_description={{{official_description|}}}
| ability_type={{{ability_type|}}}
| health={{{health|}}}
| shot_type={{{shot_type|}}}
| damage={{{damage|}}}
| damage_falloff_range={{{damage_falloff_range|}}}
| spread={{{spread|}}}
| pspeed={{{pspeed|}}}
| pradius={{{pradius|}}}
| heal={{{heal|}}}
| damage_mod={{{damage_mod|}}}
| healing_mod={{{healing_mod|}}}
| mspeed={{{mspeed|}}}
| range_distance={{{range|}}}
| radius={{{radius|}}}
| pellets={{{pellets|}}}
| fire_rate={{{fire_rate|}}}
| ammo={{{ammo|}}}
| ammo_drain={{{ammo_drain|}}}
| reload_time={{{reload_time|}}}
| cast_time={{{cast_time|}}}
| cooldown={{{cooldown|}}}
| duration={{{duration|}}}
| headshot={{{headshot|}}} <!-- ✓/✕ -->
| ability_video={{{ability_video|}}}
| ability_video_file={{{ability_video_file|}}}
| ability_details={{{ability_details|}}}
| ult_req={{{ult_req|}}}
| ignores_barrier={{{ignores_barrier|}}}
| ignores_matrix={{{ignores_matrix|}}}
| ignores_deflect={{{ignores_deflect|}}}
| ignores_boost={{{ignores_boost|}}}
| ignores_window={{{ignores_window|}}}
| ability_key={{{key|}}}
}}
 
}}</includeonly><noinclude><!--
 
cargo setup
 
-->{{#cargo_declare:_table=Abilities
| ability_name=String
| ability_image=String
| official_description=Text
| ability_type=String
| health=String
| shot_type=Text
| damage=String
| damage_falloff_range=String
| spread=String
| pspeed=String
| pradius=String
| heal=String
| damage_mod=String
| healing_mod=String
| mspeed=String
| range_distance=String
| radius=String
| pellets=String
| fire_rate=String
| ammo=String
| ammo_drain=String
| reload_time=String
| cast_time=String
| cooldown=String
| duration=String
| headshot=String <!-- ✓/✕ -->
| ult_req=String
| ability_video=String
| ability_video_file=String
| ability_details=Text
| ignores_barrier=String
| ignores_matrix=String
| ignores_deflect=String
| ignores_boost=String
| ignores_window=String
| ability_key=String
}}
 
{{doc}}
 
[[Category:Infobox templates]]
</noinclude>

Revision as of 17:34, 24 August 2024

{{#cargo_declare:_table=Abilities | ability_name=String | ability_image=String | official_description=Text | ability_type=String | health=String | shot_type=Text | damage=String | damage_falloff_range=String | spread=String | pspeed=String | pradius=String | heal=String | damage_mod=String | healing_mod=String | mspeed=String | range_distance=String | radius=String | pellets=String | fire_rate=String | ammo=String | ammo_drain=String | reload_time=String | cast_time=String | cooldown=String | duration=String | headshot=String | ult_req=String | ability_video=String | ability_video_file=String | ability_details=Text | ignores_barrier=String | ignores_matrix=String | ignores_deflect=String | ignores_boost=String | ignores_window=String | ability_key=String }}

Template:Doc