Aller au contenu

Photo

Immune to certain weapons types


  • Veuillez vous connecter pour répondre
2 réponses à ce sujet

#1
Surek

Surek
  • Members
  • 94 messages
 I’m not sure if this is in the right place. But maybe I’m
missing something, is there a way to make a creature immune to certain weapon
types such as slashing, bludgeoning, piercing? If so how would I go about doing
this?

#2
MagicalMaster

MagicalMaster
  • Members
  • 2 003 messages
Simplest way is to give them an item with 100% immunity to that damage type. Or 50% or 25% or whatever you'd like.

#3
Squatting Monk

Squatting Monk
  • Members
  • 446 messages
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 .