Difference between revisions of "Damage"
m (→Search Tab) |
|||
Line 76: | Line 76: | ||
===Search Tab=== | ===Search Tab=== | ||
*'''[[Area (CEffectDamage)|Area (Array)]]''' | *'''[[Area (CEffectDamage)|Area (Array)]]''' | ||
− | **'''[[Area (CEffectDamage)|Arc]]''' | + | **'''[[Area (CEffectDamage)#Arc|Arc]]''' |
− | **'''[[Area (CEffectDamage)|Bonus]]''' | + | **'''[[Area (CEffectDamage)#Bonus|Bonus]]''' |
− | **'''[[Area (CEffectDamage)|Fraction]]''' | + | **'''[[Area (CEffectDamage)#Fraction|Fraction]]''' |
− | **'''[[Area (CEffectDamage)|Maximum Count]]''' | + | **'''[[Area (CEffectDamage)#Maximum Count|Maximum Count]]''' |
− | **'''[[Area (CEffectDamage)|Radius]]''' | + | **'''[[Area (CEffectDamage)#Radius|Radius]]''' |
− | **'''[[Area (CEffectDamage)|Radius Bonus]]''' | + | **'''[[Area (CEffectDamage)#Radius Bonus|Radius Bonus]]''' |
− | **'''[[Area (CEffectDamage)|Validator]]''' | + | **'''[[Area (CEffectDamage)#Validator|Validator]]''' |
*'''[[Exclude (CEffectDamage)|Exclude (Array)]]''' | *'''[[Exclude (CEffectDamage)|Exclude (Array)]]''' | ||
− | **'''[[Exclude (CEffectDamage)|Effect]]''' | + | **'''[[Exclude (CEffectDamage)#Effect|Effect]]''' |
− | **'''[[Exclude (CEffectDamage)|Value]]''' | + | **'''[[Exclude (CEffectDamage)#Value|Value]]''' |
*'''[[Include (CEffectDamage)|Include (Array)]]''' | *'''[[Include (CEffectDamage)|Include (Array)]]''' | ||
− | **'''[[Include (CEffectDamage)|Effect]]''' | + | **'''[[Include (CEffectDamage)#Effect|Effect]]''' |
− | **'''[[Include (CEffectDamage)|Value]]''' | + | **'''[[Include (CEffectDamage)#Value|Value]]''' |
*'''[[Maximum Count (CEffectDamage)|Maximum Count]]''' | *'''[[Maximum Count (CEffectDamage)|Maximum Count]]''' | ||
*'''[[Minimum Count (CEffectDamage)|Minimum Count]]''' | *'''[[Minimum Count (CEffectDamage)|Minimum Count]]''' | ||
Line 94: | Line 94: | ||
*'''[[Search Filter (CEffectDamage)|Search Filter]]''' | *'''[[Search Filter (CEffectDamage)|Search Filter]]''' | ||
*'''[[Search Flags (CEffectDamage)|Search Flags]]''' | *'''[[Search Flags (CEffectDamage)|Search Flags]]''' | ||
+ | |||
===Effect Tab=== | ===Effect Tab=== | ||
===Target Tab=== | ===Target Tab=== |
Revision as of 23:08, 23 November 2010
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
The Damage effect contains many extra data fields that control how the damage is dealt and what effects it has on both the target and the source. The most important ones are listed below with descriptions of their purposes. The list is ordered by tab and in alphabetical order within each tab.
Combat Tab
Search Tab
- Area (Array)
- Exclude (Array)
- Include (Array)
- Maximum Count
- Minimum Count
- Minimum Count Error
- Search Filter
- Search Flags