# HG changeset patch # User Grumpy7 # Date 1378594984 -7200 # Node ID a0cd6465ae0d53c86762aebb94d419f0ab80178e # Parent 1f3f01d393004a7064fca624b4eb3b7ea61729d2 Player::CalculateIncommingDamage, liches shouldn't be immune to damage if above 200 resistance to it diff -r 1f3f01d39300 -r a0cd6465ae0d Player.cpp --- a/Player.cpp Sun Sep 08 00:35:03 2013 +0200 +++ b/Player.cpp Sun Sep 08 01:03:04 2013 +0200 @@ -1349,7 +1349,7 @@ } //----- (0048C6F6) -------------------------------------------------------- -bool Party::AddItemToParty(ItemGen *pItem) +bool Party::AddItemToParty(ItemGen *pItem) //TODO move to party.cpp { unsigned int v2; // eax@1 char *v5; // eax@8 @@ -1912,21 +1912,23 @@ signed int res_rand_divider; // ebx@2 int armor_skill; // eax@29 + + if ( classType == PLAYER_CLASS_LICH && (dmg_type == CHARACTER_ATTRIBUTE_RESIST_MIND || dmg_type == CHARACTER_ATTRIBUTE_RESIST_BODY || dmg_type == CHARACTER_ATTRIBUTE_RESIST_SPIRIT )) //TODO: determine if spirit resistance should be handled by body res. modifier + return 0; + resist_value = 0; switch(dmg_type) { case DMGT_FIRE: resist_value = GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_FIRE); break; case DMGT_ELECTR: resist_value = GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_AIR); break; case DMGT_COLD: resist_value = GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_WATER); break; - case DMGT_EARTH: resist_value = GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH); break; + case DMGT_EARTH: resist_value = GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_EARTH); break; case DMGT_SPIRIT: resist_value = GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_SPIRIT);break; case DMGT_MIND: resist_value = GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_MIND); break; case DMGT_BODY: resist_value = GetActualResistance(CHARACTER_ATTRIBUTE_RESIST_BODY); break; } - if ( classType == PLAYER_CLASS_LICH && resist_value >= 200 ) - return 0; player_luck = GetActualLuck(); res_rand_divider = GetParameterBonus(player_luck) + resist_value + 30;