Difference between revisions of "Damage"
m |
|||
(11 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
The Damage [[Effect]] (''CEffectDamage'') is the primary effect type used to apply damage to a target unit or units. As such, it is one of the most commonly-used effects in almost any map featuring combat, and even in maps that don't. | The Damage [[Effect]] (''CEffectDamage'') is the primary effect type used to apply damage to a target unit or units. As such, it is one of the most commonly-used effects in almost any map featuring combat, and even in maps that don't. | ||
− | + | =Using the Damage Effect= | |
The most basic function of the Damage Effect is, unsurprisingly, to deal damage. Common uses for it include: | The most basic function of the Damage Effect is, unsurprisingly, to deal damage. Common uses for it include: | ||
*Dealing damage to a target. | *Dealing damage to a target. | ||
Line 7: | Line 7: | ||
*Instantly killing targets and hallucinations. | *Instantly killing targets and hallucinations. | ||
− | Because damage is such an integral feature of StarCraft | + | Because damage is such an integral feature of [[StarCraft II]], the mechanics that govern how damage is dealt and handled are necessarily complex. In the most basic scenario, when a source applies a damage effect on a target, the target's [[life]] or [[shields]] is immediately reduced by an amount equal to the amount specified by the damage effect used. If the target's life drops below 0 as a result of the damage, it will die and the source will receive credit for the kill. |
− | + | ==Damage Modifiers== | |
In practice, many more factors come into play between the application of the damage effect and the reduction of the target's life or shields. The most important of these factors are those that act to modify the ''amount'' of damage dealt. These factors can be separated into two general categories: those that are directly controlled by the damage effect itself ('''internal''' modifiers) and those controlled by external objects ('''external''' modifiers). | In practice, many more factors come into play between the application of the damage effect and the reduction of the target's life or shields. The most important of these factors are those that act to modify the ''amount'' of damage dealt. These factors can be separated into two general categories: those that are directly controlled by the damage effect itself ('''internal''' modifiers) and those controlled by external objects ('''external''' modifiers). | ||
Line 26: | Line 26: | ||
::<nowiki>*</nowiki>Damage Effects can determine how much of their damage is reduced per point of armor, so this modifier is partly internal as well. | ::<nowiki>*</nowiki>Damage Effects can determine how much of their damage is reduced per point of armor, so this modifier is partly internal as well. | ||
− | + | ===Target Attribute Bonuses=== | |
− | Each Damage Effect may specify its own modifiers to apply to the amount of damage dealt based on the target's attribute flags. The damage effect may specify a flat adjustment and/or a multiplier for each attribute. These modifiers can be either positive (increase the amount of damage dealt) or negative (decrease the amount of damage dealt). If the target has its attribute flag enabled for a certain attribute, then the appropriate attribute modifier will be applied. If multiple attribute modifiers apply to a single target (for example when a damage effect that does +5 vs. Mechanical and -10 vs. Massive is applied on a target that has both the Mechanical and Massive flags enabled), the damage effect resolves the situation according to what is specified in its [[ | + | Each Damage Effect may specify its own modifiers to apply to the amount of damage dealt based on the target's attribute flags. The damage effect may specify a flat adjustment and/or a multiplier for each attribute. These modifiers can be either positive (increase the amount of damage dealt) or negative (decrease the amount of damage dealt). If the target has its attribute flag enabled for a certain attribute, then the appropriate attribute modifier will be applied. If multiple attribute modifiers apply to a single target (for example when a damage effect that does +5 vs. Mechanical and -10 vs. Massive is applied on a target that has both the Mechanical and Massive flags enabled), the damage effect resolves the situation according to what is specified in its [[Total (CEffectDamage)|''Total'' field]]. |
− | + | ===Shield Bonuses=== | |
Shield bonus modifiers work much like attribute modifiers. The principal difference is that shield modifiers are applied when damage is dealt to [[shields]] rather than to [[life]]. Like attribute modifiers, there is both a flat modifier and a multiplier that may be adjusted independently. | Shield bonus modifiers work much like attribute modifiers. The principal difference is that shield modifiers are applied when damage is dealt to [[shields]] rather than to [[life]]. Like attribute modifiers, there is both a flat modifier and a multiplier that may be adjusted independently. | ||
− | + | ===Target Vital Bonuses=== | |
Target Vital Bonuses are bonuses to damage dependent on the target's vitals: [[life]], [[shields]], and [[energy]]. Two sets of vital bonuses are specified by Damage Effects. One set calculates bonuses based on the target's ''current'' vitals while the second set calculates bonuses based on the target's ''maximum'' vitals. For both sets, the bonus value that is specified in the Damage Effect for a certain vital will be multiplied by the target's appropriate (current or maximum) vital and the result will be added to the damage amount dealt. An example of an ability that uses target vital bonuses is the High Templar's Feedback ability, which deals damage based on the target's current energy. | Target Vital Bonuses are bonuses to damage dependent on the target's vitals: [[life]], [[shields]], and [[energy]]. Two sets of vital bonuses are specified by Damage Effects. One set calculates bonuses based on the target's ''current'' vitals while the second set calculates bonuses based on the target's ''maximum'' vitals. For both sets, the bonus value that is specified in the Damage Effect for a certain vital will be multiplied by the target's appropriate (current or maximum) vital and the result will be added to the damage amount dealt. An example of an ability that uses target vital bonuses is the High Templar's Feedback ability, which deals damage based on the target's current energy. | ||
− | + | ===Target Armor=== | |
− | A target's [[armor]] can reduce the amount of damage that is dealt to it by an amount proportional to the number of points of armor. The exact amount reduced per point of armor depends on the | + | A target's [[armor]] can reduce the amount of damage that is dealt to it by an amount proportional to the number of points of armor. The exact amount reduced per point of armor depends on the [[Armor Reduction (CEffectDamage)|''Armor Reduction'' field]] of the Damage Effect that is dealing the damage. In general, armor is one of the last modifiers to be applied to damage. |
− | + | ===Behavior Damage Bonuses=== | |
A Damage Effect may have its damage modified by behaviors on its source unit. For more information on how these modifications work, visit the [[behaviors|behaviors page]]. | A Damage Effect may have its damage modified by behaviors on its source unit. For more information on how these modifications work, visit the [[behaviors|behaviors page]]. | ||
− | + | ===Behavior Damage Responses=== | |
A Damage Effect may have its damage modified by damage responses specified by behaviors on either the source or the target unit. For more information on how damage responses work, visit the [[behaviors|behaviors page]]. | A Damage Effect may have its damage modified by damage responses specified by behaviors on either the source or the target unit. For more information on how damage responses work, visit the [[behaviors|behaviors page]]. | ||
− | + | ===Global Minimum Damage Cap=== | |
There exists a cap on the minimum amount of damage that must be dealt when a damage effect is applied. If, after all damage modifiers have been considered, the amount of damage dealt is reduced below this minimum value, the damage amount will automatically be increased to match the minimum value. The default minimum value is 0.5. This value can be changed in the ''Gameplay Data'' tab in the Data Editor. | There exists a cap on the minimum amount of damage that must be dealt when a damage effect is applied. If, after all damage modifiers have been considered, the amount of damage dealt is reduced below this minimum value, the damage amount will automatically be increased to match the minimum value. The default minimum value is 0.5. This value can be changed in the ''Gameplay Data'' tab in the Data Editor. | ||
− | + | ==Damage Types== | |
There are four main damage types supported by the Data Editor: | There are four main damage types supported by the Data Editor: | ||
Line 57: | Line 57: | ||
Each Damage Effect must specify exactly one type as the type of damage that it deals. These damage types have no effect on the damage dealt by a Damage Effect by themselves but will affect how other objects respond to the damage. For example, [[behaviors]] are capable of applying separate damage modifiers for each damage type. Only Damage Effects that deal the appropriate type of damage will be affected by those modifiers. The type of damage dealt by a Damage Effect is ''only'' dependent on the type it specifies and not on the ultimate source of the damage. For example, a melee [[weapon]] can deal ranged-type damage, a single-target [[ability]] can deal splash-type damage, etc. | Each Damage Effect must specify exactly one type as the type of damage that it deals. These damage types have no effect on the damage dealt by a Damage Effect by themselves but will affect how other objects respond to the damage. For example, [[behaviors]] are capable of applying separate damage modifiers for each damage type. Only Damage Effects that deal the appropriate type of damage will be affected by those modifiers. The type of damage dealt by a Damage Effect is ''only'' dependent on the type it specifies and not on the ultimate source of the damage. For example, a melee [[weapon]] can deal ranged-type damage, a single-target [[ability]] can deal splash-type damage, etc. | ||
− | + | ==Instant-Kill Effects== | |
− | Damage Effects can be used to instantly kill targets, regardless of what damage modifiers would normally apply to the damage. To do this, the ''Kill'' flag must be enabled in the Damage Effect's [[ | + | Damage Effects can be used to instantly kill targets, regardless of what damage modifiers would normally apply to the damage. To do this, the ''Kill'' flag must be enabled in the Damage Effect's [[Flags (CEffectDamage)|''Flags'' field]]. One example of a use for this would be to kill units with timed lives when their timers expire (e.g. Broodlings, Auto-Turrets). |
− | A similar effect may be achieved only for targets that are Hallucinations by enabling the [[ | + | A similar effect may be achieved only for targets that are Hallucinations by enabling the [[Kill Hallucination (CEffectDamage)|''Kill Hallucination'' flag]]. If this flag is enabled (but not the ''Kill'' flag) the Damage Effect will instantly kill hallucinations but not normal units. |
− | + | =Fields= | |
− | + | This section contains a list of all important member fields of CEffectDamage that are not inherited from CEffect. | |
− | + | ==Combat Tab== | |
− | + | *'''[[Amount (CEffectDamage)|Amount]]''' | |
− | + | *'''[[Armor Reduction (CEffectDamage)|Armor Reduction]]''' | |
− | + | *'''[[Attribute Bonus (CEffectDamage)|Attribute Bonus (Array)]]''' | |
− | + | *'''[[Attribute Factor (CEffectDamage)|Attribute Factor (Array)]]''' | |
− | + | *'''[[Shield Bonus (CEffectDamage)|Shield Bonus]]''' | |
− | '''Amount''' | + | *'''[[Shield Factor (CEffectDamage)|Shield Factor]]''' |
− | |||
− | |||
− | |||
− | |||
− | '''Armor Reduction''' | ||
− | |||
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | | | ||
− | |||
− | |||
− | |||
− | |||
− | + | ==Search Tab== | |
− | + | *'''[[Area (CEffectDamage)|Area (Array)]]''' | |
− | + | **'''[[Area (CEffectDamage)#Arc|Arc]]''' | |
− | + | **'''[[Area (CEffectDamage)#Bonus|Bonus]]''' | |
− | + | **'''[[Area (CEffectDamage)#Fraction|Fraction]]''' | |
− | + | **'''[[Area (CEffectDamage)#Maximum Count|Maximum Count]]''' | |
− | '''Area | + | **'''[[Area (CEffectDamage)#Radius|Radius]]''' |
− | + | **'''[[Area (CEffectDamage)#Radius Bonus|Radius Bonus]]''' | |
− | + | **'''[[Area (CEffectDamage)#Validator|Validator]]''' | |
− | | | + | *'''[[Exclude (CEffectDamage)|Exclude (Array)]]''' |
− | + | **'''[[Exclude (CEffectDamage)#Effect|Effect]]''' | |
− | ''' | + | **'''[[Exclude (CEffectDamage)#Value|Value]]''' |
− | + | *'''[[Include (CEffectDamage)|Include (Array)]]''' | |
− | + | **'''[[Include (CEffectDamage)#Effect|Effect]]''' | |
− | + | **'''[[Include (CEffectDamage)#Value|Value]]''' | |
− | | | + | *'''[[Maximum Count (CEffectDamage)|Maximum Count]]''' |
− | + | *'''[[Minimum Count (CEffectDamage)|Minimum Count]]''' | |
− | + | *'''[[Minimum Count Error (CEffectDamage)|Minimum Count Error]]''' | |
− | + | *'''[[Search Filter (CEffectDamage)|Search Filter]]''' | |
− | + | *'''[[Search Flags (CEffectDamage)|Search Flags]]''' | |
− | + | ||
− | '''Fraction''' | + | ==Effect Tab== |
− | + | *'''[[Death (CEffectDamage)|Death]]''' | |
− | + | *'''[[Flags (CEffectDamage)|Flags (Array)]]''' | |
− | + | *'''[[Kill Hallucination (CEffectDamage)|Kill Hallucination]]''' | |
− | + | *'''[[Kind (CEffectDamage)|Kind]]''' | |
− | '''Maximum Count''' | + | *'''[[Leech Fraction (CEffectDamage)|Leech Fraction (Array)]]''' |
− | + | *'''[[Random (CEffectDamage)|Random]]''' | |
− | + | *'''[[Recycle Count (CEffectDamage)|Recycle Count]]''' | |
− | + | *'''[[Response Flags (CEffectDamage)|Response Flags (Array)]]''' | |
− | + | *'''[[Total (CEffectDamage)|Total]]''' | |
− | ''' | + | *'''[[Visibility (CEffectDamage)|Visibility]]''' |
− | + | *'''[[Vital Bonus (CEffectDamage)|Vital Bonus (Array)]]''' | |
− | + | *'''[[Vital Fraction Current (CEffectDamage)|Vital Fraction Current (Array)]]''' | |
− | + | *'''[[Vital Fraction Maximum (CEffectDamage)|Vital Fraction Maximum (Array)]]''' | |
− | | | + | ==Target Tab== |
− | + | ==UI Tab== | |
− | + | ||
− | + | [[Category:StarCraft II]][[Category:Data Editor]][[Category:Reference]] | |
− | |||
− | |||
− | '''Validator''' | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | '''Effect''' | ||
− | |||
− | |||
− | |||
− | |||
− | ''' | ||
− | |||
− | |||
− | |||
− | *'' | ||
− | *'' | ||
− | *'' | ||
− | *'' | ||
− | | | ||
− | |||
− | ''' | ||
− | | | ||
− | |||
− | |||
− | |||
− | ''' | ||
− | |||
− | |||
− | |||
− | |||
− | ''' | ||
− | |||
− | |||
− | *'' | ||
− | *'' | ||
− | *'' | ||
− | *'' | ||
− | *'' | ||
− | | | ||
− | |||
− | ''' | ||
− | |||
− | |||
− | |||
− | |||
− | ''' | ||
− | |||
− | |||
− | |||
− | |||
− | ''' | ||
− | | | ||
− | |||
− | |||
− | |||
− | ''' | ||
− | | | ||
− | |||
− | |||
− | |||
− | ''' | ||
− | | | ||
− | |||
− | |||
− | *'' | ||
− | *'' | ||
− | *'' | ||
− | |||
− | |||
− | |||
− |
Latest revision as of 21:29, 8 April 2012
The Damage Effect (CEffectDamage) is the primary effect type used to apply damage to a target unit or units. As such, it is one of the most commonly-used effects in almost any map featuring combat, and even in maps that don't.
Using the Damage Effect
The most basic function of the Damage Effect is, unsurprisingly, to deal damage. Common uses for it include:
- Dealing damage to a target.
- Dealing area of effect damage around a target.
- Instantly killing targets and hallucinations.
Because damage is such an integral feature of StarCraft II, the mechanics that govern how damage is dealt and handled are necessarily complex. In the most basic scenario, when a source applies a damage effect on a target, the target's life or shields is immediately reduced by an amount equal to the amount specified by the damage effect used. If the target's life drops below 0 as a result of the damage, it will die and the source will receive credit for the kill.
Damage Modifiers
In practice, many more factors come into play between the application of the damage effect and the reduction of the target's life or shields. The most important of these factors are those that act to modify the amount of damage dealt. These factors can be separated into two general categories: those that are directly controlled by the damage effect itself (internal modifiers) and those controlled by external objects (external modifiers).
- Internal Modifiers
- Target Attribute Bonuses
- Shield Bonuses
- Target Vital Bonuses
- External Modifiers
- *Damage Effects can determine how much of their damage is reduced per point of armor, so this modifier is partly internal as well.
Target Attribute Bonuses
Each Damage Effect may specify its own modifiers to apply to the amount of damage dealt based on the target's attribute flags. The damage effect may specify a flat adjustment and/or a multiplier for each attribute. These modifiers can be either positive (increase the amount of damage dealt) or negative (decrease the amount of damage dealt). If the target has its attribute flag enabled for a certain attribute, then the appropriate attribute modifier will be applied. If multiple attribute modifiers apply to a single target (for example when a damage effect that does +5 vs. Mechanical and -10 vs. Massive is applied on a target that has both the Mechanical and Massive flags enabled), the damage effect resolves the situation according to what is specified in its Total field.
Shield Bonuses
Shield bonus modifiers work much like attribute modifiers. The principal difference is that shield modifiers are applied when damage is dealt to shields rather than to life. Like attribute modifiers, there is both a flat modifier and a multiplier that may be adjusted independently.
Target Vital Bonuses
Target Vital Bonuses are bonuses to damage dependent on the target's vitals: life, shields, and energy. Two sets of vital bonuses are specified by Damage Effects. One set calculates bonuses based on the target's current vitals while the second set calculates bonuses based on the target's maximum vitals. For both sets, the bonus value that is specified in the Damage Effect for a certain vital will be multiplied by the target's appropriate (current or maximum) vital and the result will be added to the damage amount dealt. An example of an ability that uses target vital bonuses is the High Templar's Feedback ability, which deals damage based on the target's current energy.
Target Armor
A target's armor can reduce the amount of damage that is dealt to it by an amount proportional to the number of points of armor. The exact amount reduced per point of armor depends on the Armor Reduction field of the Damage Effect that is dealing the damage. In general, armor is one of the last modifiers to be applied to damage.
Behavior Damage Bonuses
A Damage Effect may have its damage modified by behaviors on its source unit. For more information on how these modifications work, visit the behaviors page.
Behavior Damage Responses
A Damage Effect may have its damage modified by damage responses specified by behaviors on either the source or the target unit. For more information on how damage responses work, visit the behaviors page.
Global Minimum Damage Cap
There exists a cap on the minimum amount of damage that must be dealt when a damage effect is applied. If, after all damage modifiers have been considered, the amount of damage dealt is reduced below this minimum value, the damage amount will automatically be increased to match the minimum value. The default minimum value is 0.5. This value can be changed in the Gameplay Data tab in the Data Editor.
Damage Types
There are four main damage types supported by the Data Editor:
- Melee
- Ranged
- Spell
- Splash
Each Damage Effect must specify exactly one type as the type of damage that it deals. These damage types have no effect on the damage dealt by a Damage Effect by themselves but will affect how other objects respond to the damage. For example, behaviors are capable of applying separate damage modifiers for each damage type. Only Damage Effects that deal the appropriate type of damage will be affected by those modifiers. The type of damage dealt by a Damage Effect is only dependent on the type it specifies and not on the ultimate source of the damage. For example, a melee weapon can deal ranged-type damage, a single-target ability can deal splash-type damage, etc.
Instant-Kill Effects
Damage Effects can be used to instantly kill targets, regardless of what damage modifiers would normally apply to the damage. To do this, the Kill flag must be enabled in the Damage Effect's Flags field. One example of a use for this would be to kill units with timed lives when their timers expire (e.g. Broodlings, Auto-Turrets).
A similar effect may be achieved only for targets that are Hallucinations by enabling the Kill Hallucination flag. If this flag is enabled (but not the Kill flag) the Damage Effect will instantly kill hallucinations but not normal units.
Fields
This section contains a list of all important member fields of CEffectDamage that are not inherited from CEffect.
Combat Tab
Search Tab
- Area (Array)
- Exclude (Array)
- Include (Array)
- Maximum Count
- Minimum Count
- Minimum Count Error
- Search Filter
- Search Flags
Effect Tab
- Death
- Flags (Array)
- Kill Hallucination
- Kind
- Leech Fraction (Array)
- Random
- Recycle Count
- Response Flags (Array)
- Total
- Visibility
- Vital Bonus (Array)
- Vital Fraction Current (Array)
- Vital Fraction Maximum (Array)