WARFRAME Wiki
WARFRAME Wiki
(Removing mw.log())
(Using class="healthtable" for p.healthtable())
Line 84: Line 84:
 
local htt = DamageData["total"][ht]
 
local htt = DamageData["total"][ht]
 
local body = {
 
local body = {
'{| align="right" style="width:33.333%; text-align:center; font-family:\'Roboto\'; "\n',
+
'{| class="healthtable" align="right" style="width:33.333%; text-align:center; font-family:\'Roboto\'; "\n',
 
'! ! border="1" colspan="2" style="border-style: solid; border-color: #000000; background-color: #000000; " | ',
 
'! ! border="1" colspan="2" style="border-style: solid; border-color: #000000; background-color: #000000; " | ',
 
'[[Damage/', ht,'|<span style = "color: #FFFFFF; ">', ht,'</span>]]',
 
'[[Damage/', ht,'|<span style = "color: #FFFFFF; ">', ht,'</span>]]',

Revision as of 04:00, 31 July 2021


DamageTypes contains all the damage types used in WARFRAME, their health/armor class advantages, and status effects.

On this Wiki, DamageTypes is used in:

Usage

Direct Invocation

{{#invoke:DamageType|function|input1|input2|...}}

Template

{{d|type name}}

{{d/img|type name}}

{{#invoke:DamageType|damagetable|type name}}

{{#invoke:DamageType|healthtable|type name}}

Icons

Against navbox table background


Against wikitable table background
DmgImpactSmall64 Impact DmgPunctureSmall64 Puncture DmgSlashSmall64 Slash

DmgColdSmall64 Cold DmgElectricitySmall64 Electricity DmgFireSmall64 Heat DmgToxinSmall64 Toxin
DmgBlastSmall64 Blast DmgCorrosiveSmall64 Corrosive DmgGasSmall64 Gas DmgMagneticSmall64 Magnetic DmgRadiationSmall64 Radiation DmgViralSmall64 Viral
DmgTauSmall64 Tau DmgTrueSmall64 True DmgVoidSmall64 Void
DmgImpairSmall64 Impair Knockdown b Knockdown Lifted b Lifted Ragdoll b Ragdoll RollingDroneAvatar Stagger

Tenno Shield Tenno Armor Tenno Flesh

Cloned Flesh Ferrite Armor Alloy Armor Machinery
Shield Proto Shield Flesh Robotic
Infested Infested Flesh Fossilized Infested Sinew

Test DmgImpactSmall64 Impact DmgPunctureSmall64 Puncture DmgSlashSmall64 Slash

DmgColdSmall64 Cold DmgElectricitySmall64 Electricity DmgFireSmall64 Heat DmgToxinSmall64 Toxin
DmgBlastSmall64 Blast DmgCorrosiveSmall64 Corrosive DmgGasSmall64 Gas DmgMagneticSmall64 Magnetic DmgRadiationSmall64 Radiation DmgViralSmall64 Viral
DmgTauSmall64 Tau DmgTrueSmall64 True DmgVoidSmall64 Void
DmgImpairSmall64 Impair Knockdown b Knockdown Lifted b Lifted Ragdoll b Ragdoll RollingDroneAvatar Stagger

Test Tenno Shield Tenno Armor Tenno Flesh

Cloned Flesh Ferrite Armor Alloy Armor Machinery
Shield Proto Shield Flesh Robotic
Infested Infested Flesh Fossilized Infested Sinew


Against infobox background

Against T:AbilityU10.3 background
SlashDashModx256 SlashDash130xWhite
1
EnergyOrb25
Slash Dash

Dash between enemies while slashing with the Exalted Blade.


Introduced in Vanilla (2012-10-25)

AbilityStrengthBuff Strength:N/A
AbilityDurationBuff Duration:N/A
AbilityRangeBuff Range:N/A

Misc: DmgImpactSmall64 Impact DmgPunctureSmall64 Puncture DmgSlashSmall64 Slash
DmgColdSmall64 Cold DmgElectricitySmall64 Electricity DmgFireSmall64 Heat DmgToxinSmall64 Toxin
DmgBlastSmall64 Blast DmgCorrosiveSmall64 Corrosive DmgGasSmall64 Gas DmgMagneticSmall64 Magnetic DmgRadiationSmall64 Radiation DmgViralSmall64 Viral
DmgTauSmall64 Tau DmgTrueSmall64 True DmgVoidSmall64 Void
DmgImpairSmall64 Impair Knockdown b Knockdown Lifted b Lifted Ragdoll b Ragdoll RollingDroneAvatar Stagger

Tenno Shield Tenno Armor Tenno Flesh
Cloned Flesh Ferrite Armor Alloy Armor Machinery
Shield Proto Shield Flesh Robotic
Infested Infested Flesh Fossilized Infested Sinew

Expand/Collapse


Against emodtable table header background
DmgImpactSmall64 Impact DmgPunctureSmall64 Puncture DmgSlashSmall64 Slash

DmgColdSmall64 Cold DmgElectricitySmall64 Electricity DmgFireSmall64 Heat DmgToxinSmall64 Toxin
DmgBlastSmall64 Blast DmgCorrosiveSmall64 Corrosive DmgGasSmall64 Gas DmgMagneticSmall64 Magnetic DmgRadiationSmall64 Radiation DmgViralSmall64 Viral
DmgTauSmall64 Tau DmgTrueSmall64 True DmgVoidSmall64 Void
DmgImpairSmall64 Impair Knockdown b Knockdown Lifted b Lifted Ragdoll b Ragdoll RollingDroneAvatar Stagger

Tenno Shield Tenno Armor Tenno Flesh

Cloned Flesh Ferrite Armor Alloy Armor Machinery
Shield Proto Shield Flesh Robotic
Infested Infested Flesh Fossilized Infested Sinew

Test


Against T:Codex background

Documentation

Package items

Other items

healthtable(dt) (function)
Builds a damage type modifier table for a damage type.
Parameter: dt Damage type (string)
Returns: A table of damage type modifiers of a damage type in wikitext (string)
healthtable(ht) (function)
Builds a damage type modifier table for a health or armor type.
Parameter: ht Health or armor type (string)
Returns: A table of damage type modifiers of health or armor type in wikitext (string)
tabbertable(faction) (function)
Builds a damage type modifier table for all health and armor types associated with a particular faction. (WIP)
Parameter: faction Faction name (string)
Returns: A table of damage type modifiers of health and armor types of a particular faction in wikitext (string)

Created with Docbunto

See Also

Code


--- '''DamageTypes''' contains all the damage types used in [[WARFRAME]], their health/armor class advantages, and status effects.<br/>
--  
--  On this Wiki, DamageTypes is used in:
--  * [[Module:Tooltips/data]]
--  * [[Module:Tooltips/tip]]
--  * [[Damage]] and its subpages
--  
--  @module     damagetypes
--  @alias      p
--  @author     [[User:Flaicher|Flaicher]]
--  @author     [[User:Gigamicro|Gigamicro]]
--  @image      DamageModBundleIcon.png
--  @require    [[Module:DamageTypes/data]]
--  @require    [[Module:Icon]]
--  @require    [[Module:String]]
--  @require    [[Module:Tooltips]]
--  @release    stable
--  <nowiki>

local p = {}

local DamageData = mw.loadData([[Module:DamageTypes/data]])
-- local Icon = require([[Module:Icon]])--Faction
--local String = require([[Module:String]])--titleCase
local function titleCase(s)
    return ({s:gsub('(%S)(%S*)', function(h,t) return h:upper()..t:lower() end)})[1]
end
local Tooltips = require [[Module:Tooltips]]--getIcon

--- Builds a damage type modifier table for a damage type.
--  @function       healthtable
--  @param          {string} dt Damage type
--  @return         {string} A table of damage type modifiers of a damage type in wikitext
function p.damagetable(frame)
    local dt = titleCase(frame.args and (frame.args[1] or frame.args) or frame)
    local dtb = DamageData["Types"][dt]
    local dtt = DamageData["total"][dt]
    local pc = Tooltips.getIcon(dt,'DamageTypes')
    body = {'{| class="healthtable" style="width:100%; text-align:center; margin: 1em auto 1em auto; font-family:\'Roboto\'; color:#1A1A1A;"',insert=table.insert}
    for i,v in ipairs(DamageData["dictionary"]["FactionOrder"]) do
        body:insert(table.concat{
            '\n! style="background-color: ',
            DamageData["dictionary"]["Factions"][v][2][1],--header color
            ';" | ', 
            --Icon.Faction{args={v,'text'}},
            '[[File:',mw.loadData[[Module:Icon/data]].Factions[v].icon[1],'|x20px|link=',v,']][[',v,']]',
            ' Health',
            '\n! style="background-color: ',
            DamageData["dictionary"]["Factions"][v][2][1],
            ';" | ',
            pc,
            ' Modifier',
        })
    end--faction headers
    
    local count = 0
    for _,v in ipairs(DamageData["dictionary"]["Types"]) do --
        count=count%3+1
        if count==1 then body:insert '\n|-' end
        local val = dtt[v[1]]
        local style = '\n| style="background-color: '..(DamageData["dictionary"]["Factions"][v[2]][2][2]..';" | ')
        body:insert(style)
        body:insert(Tooltips.getIcon(v[1], 'DamageTypes'))
        body:insert(style)
        if val then body:insert(table.concat{
            '<span style="color:', 
            val>0 and 'green;">+' or val<0 and 'red;">' or 'gray;" title="Bypasses">', 
            val==0 and 'N/A' or val, 
            val==0 and '' or '%', 
            '</span>'
        }) end
    end
    body:insert '\n|}'
    return table.concat(body)
end

--- Builds a damage type modifier table for a health or armor type.
--  @function       healthtable
--  @param          {string} ht Health or armor type
--  @return         {string} A table of damage type modifiers of health or armor type in wikitext
function p.healthtable(frame)
    local ht = titleCase(frame.args and (frame.args[1] or frame.args) or frame)
    local htb = DamageData["Health"][ht]
    local htt = DamageData["total"][ht]
    local body = {
        '{| class="healthtable" align="right" style="width:33.333%; text-align:center; font-family:\'Roboto\'; "\n',
        '! ! border="1" colspan="2" style="border-style: solid; border-color: #000000; background-color: #000000; " | ',
        '[[Damage/', ht,'|<span style = "color: #FFFFFF; ">', ht,'</span>]]',
        insert=table.insert
    }
    for _,v in ipairs(DamageData["dictionary"]["Health"]) do
        local val = htt[v[1]]
        body:insert(('\n|-\n| style="background-color: hsl(%s, %s%%);" | %s\n| style="background-color: hsl(%s, %s%%);" | ')
            :format(
                htb.Color, v[2], 
                Tooltips.getIcon(v[1],'DamageTypes'), 
                htb.Color, v[2]
            )
        )
        if val then
            body:insert(('<span style="color:%%s">%s</span>'):format(val==0 and 'N / A' or '%+d%%'):format(val>0 and 'green' or val==0 and 'gray' or 'red',val))
        end
    end
    body:insert '\n|}'
    return table.concat(body)
end

--- Builds a damage type modifier table for all health and armor types associated with a particular faction. (WIP)
--  @function       tabbertable
--  @param          {string} faction Faction name
--  @return         {string} A table of damage type modifiers of health and armor types of a particular faction in wikitext
function p.tabbertable(frame)
    local faction = titleCase(frame.args and (frame.args[1] or frame.args) or frame or 'All')
    return faction == 'All' and [=[
{| class="wikitable" style="width:100%;text-align:center;"
! colspan="3" style="width:10px;" | Damage Type
![[Damage/Flesh|Flesh]]
![[Damage/Cloned Flesh|Cloned]]
![[Damage/Fossilized|Fossil]]
![[Damage/Infested|Infested]]
![[Damage/Infested Flesh|{{nowrap|I. Flesh}}]]
![[Damage/Infested Sinew|Sinew]]
![[Damage/Machinery|Machine]]
![[Damage/Robotic|Robotic]]
![[Damage/Object|Object]]
![[Damage/Shield|Shield]]
![[Damage/Proto Shield|Proto]]
![[Damage/Ferrite Armor|Ferrite]]
![[Damage/Alloy Armor|Alloy]]
!Status
|-
| rowspan="3" style="border-bottom: 4px solid #777777;" |<div class="text_rotate-270">Physical<br />Damage</div>
| colspan="2" | {{Icon|Proc|Impact|text}}
| {{text|red|-25%}}
| {{text|red|-25%}}
|
|
|
|
| {{text|green|+25%}}
|
|
| {{text|green|+50%}}
| {{text|green|+15%}}
|
|
| <sup>1)2)</sup>Stagger
|-
| colspan="2" | {{Icon|Proc|Puncture|text}}
|
|
|
|
|
| {{text|green|+25%}}
|
| {{text|green|+25%}}
|
| {{text|red|-20%}}
| {{text|red|-50%}}
| {{text|green|+50%}}
| {{text|green|+15%}}
| –Damage
|- style="border-bottom: 4px solid #777777;"
| colspan="2" | {{Icon|Proc|Slash|text}}
| {{text|green|+25%}}
| {{text|green|+25%}}
| {{text|green|+15%}}
| {{text|green|+25%}}
| {{text|green|+50%}}
|
|
| {{text|red|-25%}}
|
|
|
| {{text|red|-15%}}
| {{text|red|-50%}}
| Bleed
|-
| rowspan="4" style="border-bottom: 4px solid #777777;"|<div class="text_rotate-270">Elemental<br />Damage</div>
| colspan="2" | {{Icon|Proc|Cold|text}}
|
|
| {{text|red|-25%}}
|
| {{text|red|-50%}}
| {{text|green|+25%}}
|
|
|
| {{text|green|+50%}}
|
|
| {{text|green|+25%}}
| Slowdown
|-
| colspan="2" | {{Icon|Proc|Electricity|text}}
|
|
|
|
|
|
| {{text|green|+50%}}
| {{text|green|+50%}}
|
|
|
|
| {{text|red|-50%}}
| Tesla Chain<br /><sup>1)2)</sup>Stun
|-
| colspan="2" | {{Icon|Proc|Heat|text}}
|
| {{text|green|+25%}}
|
| {{text|green|+25%}}
| {{text|green|+50%}}
|
|
|
|
|
| {{text|red|-50%}}
|
|
| Burn DoT<br /><sup>1)2)3)</sup>Panic
|- style="border-bottom: 4px solid #777777;"
| colspan="2" | {{Icon|Proc|Toxin|text}}
| {{text|green|+50%}}
|
| {{text|red|-50%}}
|
|
|
| {{text|red|-25%}}
| {{text|red|-25%}}
|
| <sup>4)</sup>{{text|grey|N/A}}
| <sup>4)</sup>{{text|grey|N/A}}
| 
|
| Poison DoT
|-
| rowspan="6" style="border-bottom: 4px solid #777777;"|<div class="text_rotate-270">Combined<br />Elements</div>
| {{Icon|Proc|Blast|text}}
| {{Icon|Proc|Heat|text}}<br />
{{Icon|Proc|Cold|text}}
|
|
| {{text|green|+50%}}
|
|
| {{text|red|-50%}}
| {{text|green|+75%}}
|
|
|
|
| {{text|red|-25%}}
|
| <sup>1)2)</sup>–Accuracy
|-
| {{nowrap|{{Icon|Proc|Corrosive|text}}}}
| {{nowrap|{{Icon|Proc|Electric|text}}}}<br />
{{Icon|Proc|Toxin|text}}
|
|
| {{text|green|+75%}}
|
|
|
|
|
|
|
| {{text|red|-50%}}
| {{text|green|+75%}}
|
| –Armor
|-
| {{Icon|Proc|Gas|text}}
| {{Icon|Proc|Heat|text}}<br />
{{Icon|Proc|Toxin|text}}
| {{text|red|-25%}}
| {{text|red|-50%}}
|
| {{text|green|+75%}}
| {{text|green|+50%}}
|
|
|
|
|
|
|
|
| Gas Cloud
|-
| {{nowrap|{{Icon|Proc|Magnetic|text}}}}
| {{Icon|Proc|Cold|text}}<br />
{{nowrap|{{Icon|Proc|Electric|text}}}}
|
|
|
|
|
|
|
|
|
| {{text|green|+75%}}
| {{text|green|+75%}}
|
| {{text|red|-50%}}
| Amplified damage to shields<br />Stops shield regen
|-
| {{nowrap|{{Icon|Proc|Radiation|text}}}}
| {{Icon|Proc|Heat|text}}<br />
{{nowrap|{{Icon|Proc|Electric|text}}}}
|
|
| {{text|red|-75%}}
| {{text|red|-50%}}
|
| {{text|green|+50%}}
|
| {{text|green|+25%}}
|
| {{text|red|-25%}}
|
|
| {{text|green|+75%}}
| <sup>1)</sup>Friendly Fire<br />More damage to allies
|- style="border-bottom: 4px solid #777777;"
| {{Icon|Proc|Viral|text}}
| {{Icon|Proc|Cold|text}}<br />
{{Icon|Proc|Toxin|text}}
| {{text|green|+50%}}
| {{text|green|+75%}}
|
| {{text|red|-50%}}
|
|
| {{text|red|-25%}}
|
|
|
|
|
|
| Amplified damage to health
|-
| rowspan="2" |<div class="text_rotate-270">Unique Types</div>
| colspan="2" | {{Icon|Proc|True|text}}
|
|
|
|
|
|
|
|
|
|
|
|<sup>4)</sup>{{text|grey|N/A}}
|<sup>4)</sup>{{text|grey|N/A}}
| -
|-
| colspan="2" | {{Icon|Proc|Void|text}}
|
|
|
|
|
|
|
|
|
|
|
|
|
| Bullet Attract
|}

</div>

*'''Flesh: '''Possessed by all [[Corpus]] humanoids, including humanoid [[Corpus]] bosses, [[Warframe]]s, [[Specter (Tenno)]], [[Specter (Enemy)]] and [[Stalker]]. It is most damaged by the [[Infested]] faction.
*'''Cloned Flesh: '''Possessed by all humanoid [[Grineer]] and [[Corrupted]] of Grineer origin, including [[Corrupted Vor]], all [[Grineer#Archwing|Grineer Archwing]] enemies and [[Locust Drone]].
*'''Infested Flesh:''' Possessed by [[Undying Flyer]]s, [[Volatile Runner]]s, [[Mutalist Osprey]], and [[Crawler]]-type enemies.
*'''Infested:''' Possessed by [[Juggernaut]]s, [[Charger]]s, [[Runner]]s, [[Leaping Thrasher]]s, [[Leaper]]s, and [[Deimos Therid]]s.
*'''Infested Sinew:''' An Infested armor class possessed by the [[Hemocyte]], most [[Deimos]] Infested enemies, and some Zealot enemies such as the [[Zealot Herald]].
*'''Fossilized:''' Possessed by [[Ancient Disruptor]]s, [[Ancient Healer]]s, [[Toxic Ancient]]s, [[Swarm-Mutalist MOA]]s, [[Tar-Mutalist MOA]]s, [[Boiler]]s, [[Brood Mother]]s, [[Phorid]], [[Lephantis]], and [[Jordas Golem]].
*'''Object: '''Possessed by [[Arc Trap]], [[Explosive Barrel]], [[Fan]], [[Grate]], [[Heat Generator]], [[Infested Tumor]], [[Mining Machine]], [[Sensor Bar]] and [[Storage Containers]].
*'''Alloy Armor: '''Possessed by [[Elite Lancer]]s, [[Eviscerator]]s, [[Bombard]]s, [[Napalm]]s, Grineer bosses, [[Corrupted Vor]], [[Corrupted Lancer]]s, [[Robotic]] [[Corpus]] bosses, [[Warframe]]s and [[Stalker]]. It is most damaged by the [[Corpus]] faction.
*'''Ferrite Armor: '''Possessed by [[Lancer]]s, [[Trooper]]s, [[Seeker]]s, [[Heavy Gunner]]s, [[Commander]]s, all Grineer Archwing enemies, [[Corvette]], [[Frigate]], [[Carrier (Enemy)]], [[Gox]], Locust Drone, all Grineer melee units, [[Corrupted Heavy Gunner]]s, humanoid Corpus bosses, [[Specter (Tenno)]], [[Specter (Enemy)]] and {{WF|Rhino}}'s {{A|Iron Skin}}.
*'''Shield:''' Possessed by all regular Corpus units (except Locust Drone), [[Regulator]]s, [[Grineer]] bosses, [[Orokin Drone]]s, [[Corrupted Crewman]], [[Corrupted Vor]], [[Warframe]]s, [[Specter (Tenno)]], [[Specter (Enemy)]]. It is most damaged by the [[Grineer]] faction.
*'''Proto Shield:''' Possessed by all Corpus bosses, including [[Zanuka]] and [[Zanuka Hunter]], [[Corpus Tech]]s ,[[Nullifier Crewman]], [[Corrupted Nullifier]] and [[Stalker]].
*'''Machinery: '''Possessed by [[Roller]]s, [[Regulator]]s and [[Latcher]]s.
*'''Robotic: '''Possessed by all [[Corpus]] proxies (except Locust Drone), including proxy bosses like [[Ambulas]] and [[Zanuka]].

<sup>1) Does not affect [[Boss]]es. | 2) Does not affect [[Roller]]s, [[Regulator]]s, [[Latcher]]s or [[Osprey]]. | 3) Does not affect [[MOA]]s. | 4) The damage associated bypasses these secondary protections.</sup>
]=]
end
    
return p

--=p.healthtable 'Flesh'