VersusRacialTypeEffect(effect, int)
Set eEffect to be versus nRacialType.
Parameters
- eEffect
- Effect to alter
- nRacialType
- A race to affect, RACIAL_TYPE_* constants or a line in racialtypes.2da
Description
Returns an effect modified in such a way as to be versus a specific race of creature only. Uses the RACIAL_TYPE_* constants to define the race to use.
Only a limited set of effects can be affected by this.
Remarks
This is a pretty handy function when creating spell effects or special items to be used against (or by) a certain race of creature. Notice that it expects the RACIAL_TYPE_ constants as a parameter. If you wanted it to affect Elves only, you would set the parameter to RACIAL_TYPE_ELF. If you wanted it to affect all Giant type creatures, you set the parameter to RACIAL_TYPE_GIANT.
You must apply this before the effect is linked to others with EffectLinkEffects.
Effect Breakdown
This will have an effect on these effect types (this will be expanded as more are found). To retrieve the racial type the effect is against using GetEffectInteger or see any mechanical changes, check the given effect page for more details since the integer may be different each time. It will be set to RACIAL_TYPE_INVALID if this is not used.
- EffectACIncrease
- EffectACDecrease
- EffectAttackIncrease
- EffectAttackDecrease
- EffectConcealment
- EffectDamageIncrease
- EffectDamageDecrease
- EffectInvisibility
- EffectImmunity
- EffectSanctuary / EffectEthereal
- EffectSavingThrowIncrease
- EffectSavingThrowDecrease
- EffectSkillIncrease
- EffectSkillDecrease
Ones that this does not work on are essentially everything else, this includes several effects that Bioware themselves use this on, alas (eg: EffectSpellResistanceIncrease).
Version
1.22
Example
void main()
{
effect eBonusToApply = EffectDamageIncrease(20, DAMAGE_TYPE_MAGICAL);
eBonusToApply = VersusRacialTypeEffect(eBonusToApply, RACIAL_TYPE_DRAGON);
object oTargetOfSpell = GetSpellTargetObject();
ApplyEffectToObject(DURATION_TYPE_INSTANT, eBonusToApply, oTargetOfSpell);
}
See Also
functions: | VersusTrapEffect |
constants: |
author: John Shuell