You can apply damage immunities using
EffectDamageImmunityIncrease(). For example, you could add this snippet in the creature's OnSpawn script to make it 50% immune to piercing and 50% vulnerable to bludgeoning:
// Create the effects to apply
effect eDamageImmunityIncrease = EffectDamageImmunityIncrease(DAMAGE_TYPE_PIERCING, 50);
effect eDamageImmunityDecrease = EffectDamageImmunityDecrease(DAMAGE_TYPE_BLUDGEONING, 50);
// Link the effects together.
effect eLink = EffectLinkEffects(eDamageImmunityIncrease, eDamageImmunityDecrease);
// Make the effect undispellable and apply it to the object.
ApplyEffectToObject(DURATION_TYPE_PERMANENT, SupernaturalEffect(eLink), OBJECT_SELF);
Modifié par Squatting Monk, 30 septembre 2013 - 12:02 .