Aller au contenu

Photo

ItemPropertyDamageReduction - confused


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

#1
Orion7486

Orion7486
  • Members
  • 161 messages
Hi all, I'm trying to script this function onto an item.  I'd like this to work so damage is reduced by 2, if character is struck by a good character.  The notes for this function have it written out as this:
  ItemPropertyDamageReduction(int nAmount, int nDRSubType, int nLimit=0, int nDRType=DR_TYPE_MAGICBONUS);

I have it written out as:
   ItemPropertyDamageReduction(2,4,0,5);
The two represents the amount of damage reduced.
The 4 represents the DRSubType of alignment(Good).
The 0 represents infinite, the effect doesn't disappear.
The 5 represents the DRType, which is DR_TYPE_ALIGNMENT.

The notes aren't all that clear to me.  For anyone that has worked with this function, does what I have look like it will do what I intend?
Thanks for any help.

#2
The Fred

The Fred
  • Members
  • 2 516 messages
No, that should make it so that only good weapons will bypass the damage reduction. I'm also not sure whether being held by a good character constitutes a "good" weapon; there are no itemproperties for it, and the only effect I know of capable of setting an alignment is the monk's Ki Strike (Lawful).

#3
Orion7486

Orion7486
  • Members
  • 161 messages
Oh, I must be completely misreading the purpose of the function. I didn't know it had to be placed on a weapon. I had placed it on an amulet for one to wear as protection against good characters.

#4
The Fred

The Fred
  • Members
  • 2 516 messages
No, that's right. Damage Reduction is an effect which reduces the damage you take, protecting you. If you put this on an amulet, it will work as intended. In PnP, various weapons are, I think, counted as "good" or "lawful", etc, bypassing certain damage reductions. However, in NWN2, I know monk fists are counted as lawful beyond whatever level it is, but I don't know if anything else even counts - there's certainly no property which you can put on the weapon. I don't think (though I could be wrong) that DR X/good actually provides damage reduction bypassed by good characters, only by good weapons. However, I do know that the "piercing" (the bit after the slash) is what's required to ignore the DR.

So, if someone has DR 10/good, all physical damage except that from a good source will be reduced by 10.

#5
Orion7486

Orion7486
  • Members
  • 161 messages
Thanks for the insight.