Damage type: Difference between revisions

m →Technical information: this should go here. bit field is more a accurate term for this than bit string (since it's a C# enum that uses [FlagsAttribute])
Qwertyxp2000 (talk | contribs)
 
(6 intermediate revisions by 4 users not shown)
Line 174: Line 174:
|{{y}}
|{{y}}
|
|
*Also deals more damage to Bloons haunted by [[Corvus (BTD6)|Corvus]].
*Also deals more damage to Bloons affected by [[Corvus (BTD6)|Corvus]]' Haunt, [[Herald of Everfrost]]'s Snowstorm Roar, or {{BTD6|Silas}}'s Rime.
*Also deals more damage to Bloons affected by [[Herald of Everfrost]]'s Snowstorm Roar or {{BTD6|Silas}}'s Rime.
*Also adds more heat than normal projectiles to [[Blastapopoulos (BTD6)|Blastapopoulos]] (though most projectiles that deal Frigid-type damage have special interactions with Blastapopoulos's heat).
*Also adds more heat than normal projectiles to [[Blastapopoulos (BTD6)|Blastapopoulos]] (though most projectiles that deal Frigid-type damage have special interactions with Blastapopoulos's heat).
|-
|-
Line 243: Line 242:
!Cold
!Cold
|Ice Monkey, Engineer Monkey
|Ice Monkey, Engineer Monkey
|
|-
|-
!Glacier
!Glacier
|Ice Monkey, Silas
|Ice Monkey
|Silas
|-
|-
!Frigid
!Frigid
|Mermonkey, Skywarden, Druid, Silas
|Mermonkey, Skywarden, Druid
|Silas
|-
|-
!Energy
!Energy
Line 275: Line 277:


====Technical information====
====Technical information====
Internally, damage and Bloons in ''BTD6'' use [[wp:Bit field|bit fields]] to represent immunities. Damage uses a variable named <code>immuneBloonProperties</code> that lists the Bloon properties that are immune to it, while Bloons use a variable named <code>bloonProperties</code> that lists which properties it has the immunities of. Every damage type maps to a specific set of bits in <code>immuneBloonProperties</code>. The game files serialize these bit fields as 32-bit integers.
Internally, damage and Bloons in ''BTD6'' use [[wp:Bit field|bit fields]] to represent immunities. Damage uses a variable named <code>immuneBloonProperties</code> that lists the Bloon properties that are immune to it, while Bloons use a variable named <code>bloonProperties</code> that lists which properties it has the immunities of. Every damage type maps to a specific set of bits in <code>immuneBloonProperties</code>; the vanilla game never uses combinations of <code>immuneBloonProperties</code> that do not have a corresponding damage type. The game files serialize these bit fields as 32-bit integers.


Prior to version 52.0, Plasma and Energy were equivalent to integer values of 8 and 9, making the former functionally identical to the current Fire type.
Plasma and Energy were equivalent to {{hover|8|0b00001000}} and {{hover|9|0b00001001}} prior to version 52.0, which made the former functionally identical to the Fire type. Acid was equivalent to {{hover|0|0b00000000}} prior to version 53.0, which made it functionally identical to the Normal type.
{|class="wikitable inline"
{|class="wikitable inline"
|+Bloon properties
|+Bloon properties
Line 317: Line 319:
|}
|}
{|class="wikitable inline"
{|class="wikitable inline"
|+Damage type values
|+Damage types
!Type
!Type
!Integer value
!Value
|-
|-
|Normal
|Normal
|0
|{{hover|0|0b00000000}}
|-
|-
|Shatter
|Shatter
|1
|{{hover|1|0b00000001}}
|-
|-
|Explosion
|Explosion
|2
|{{hover|2|0b00000010}}
|-
|-
|Glacier
|Glacier
|4
|{{hover|4|0b00000100}}
|-
|-
|Cold
|Cold
|5
|{{hover|5|0b00000101}}
|-
|-
|Fire
|Fire
|8
|{{hover|8|0b00001000}}
|-
|-
|Frigid
|Frigid
|12
|{{hover|12|0b00001100}}
|-
|-
|Sharp
|Sharp
|17
|{{hover|17|0b00100001}}
|-
|-
|Acid
|Acid
|64
|{{hover|64|0b10000000}}
|-
|-
|Plasma
|Plasma
|72
|{{hover|72|0b10001000}}
|-
|-
|Energy
|Energy
|73
|{{hover|73|0b10001001}}
|}
|}
Some attacks have a property that prevents targeting Bloons with specific immunity unless the attacks can damage them. For example, [[Psi (BTD6)|Psi]]'s level 6 and 11 upgrades allow targeting of [[Lead Bloon (BTD6)|Lead Bloon]]s and [[Purple Bloon (BTD6)|Purple Bloon]]s, respectively, and before those levels needs a buff such as [[Monkey Intelligence Bureau (BTD6)|Monkey Intelligence Bureau]] or certain [[Relic Knowledge]] (i.e. [[Alchemist Touch]] and [[Royal Treatment]], respectively) to target them. Frozen immunity is the only immunity that has no external buff that lets a non-targeting attack bypass the immunity.


===''Bloons TD Battles 2''===
===''Bloons TD Battles 2''===