VersusAlignmentEffect(effect, int, int)
Set eEffect to be versus a specific alignment.
Parameters
- eEffect
- Effect to alter
- nLawChaos
- ALIGNMENT_LAWFUL/ALIGNMENT_CHAOTIC/ALIGNMENT_ALL (Default: ALIGNMENT_ALL)
- nGoodEvil
- ALIGNMENT_GOOD/ALIGNMENT_EVIL/ALIGNMENT_ALL (Default: ALIGNMENT_ALL)
Description
Returns an effect modified in such a way as to be versus a specific alignment only. Uses the ALIGNMENT_ constants to define which scales to use.
Remarks
This is a pretty handy function when creating spell effects or special items to be used against (or by) a certain alignment or group of alignments. Notice that it expects two ALIGNMENT_ constants as parameters. If you wanted it to affect Chaotic Evil alignments only, you would set the first alignment parameter to ALIGNMENT_CHAOTIC and the second parameter to ALIGNMENT_EVIL. If you wanted it to affect all GOOD aligned creatures, you set the first parameter to ALIGNMENT_ALL (since it does not matter if they are chaotic or lawful for this effect) and the second parameter to ALIGNMENT_GOOD.
This should be used before an effect is linked with EffectLinkEffects.
Effect Breakdown
This will have an effect on these effect types (this will be expanded as more are found). To retrieve the alignment the effect is against using GetEffectInteger or see any mechanical changes, check the given effect page for more details:
- 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, such as EffectSpellResistanceIncrease and EffectDamageShield which are used in Aura versus Alignment, for instance.
Version
1.22
Example
// boosting his Dodge ability against all types of attacks only if
// the target is Chaotic Evil in alignment
void main(){
effect eBonusToApply = EffectACIncrease(1, AC_DODGE_BONUS, AC_VS_DAMAGE_TYPE_ALL);
eBonusToApply = VersusAlignmentEffect(eBonusToApply, ALIGNMENT_CHAOTIC, ALIGNMENT_EVIL);
object oTargetOfSpell = GetSpellTargetObject();
ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eBonusToApply, oTargetOfSpell, 60.0);
}
See Also
functions: | VersusTrapEffect |
constants: |
author: John Shuell, editor: Jeremy Spilinek