Browse Source

Restore vanilla Diablo behavior for elemental damage on weapons

pull/4946/head
staphen 4 years ago committed by Anders Jenbo
parent
commit
74fc3d7ffc
  1. 7
      Source/player.cpp

7
Source/player.cpp

@ -867,7 +867,7 @@ bool PlrHitMonst(int pnum, int m, bool adjacentDamage = false)
return false;
}
if ((player._pIFlags & ISPL_FIREDAM) != 0 && (player._pIFlags & ISPL_LIGHTDAM) != 0) {
if (gbIsHellfire && (player._pIFlags & ISPL_FIREDAM) != 0 && (player._pIFlags & ISPL_LIGHTDAM) != 0) {
int midam = player._pIFMinDam + GenerateRnd(player._pIFMaxDam - player._pIFMinDam);
AddMissile(player.position.tile, player.position.temp, player._pdir, MIS_SPECARROW, TARGET_MONSTERS, pnum, midam, 0);
}
@ -1137,10 +1137,11 @@ bool DoAttack(int pnum)
}
}
if ((player._pIFlags & ISPL_FIREDAM) == 0 || (player._pIFlags & ISPL_LIGHTDAM) == 0) {
if (!gbIsHellfire || (player._pIFlags & ISPL_FIREDAM) == 0 || (player._pIFlags & ISPL_LIGHTDAM) == 0) {
if ((player._pIFlags & ISPL_FIREDAM) != 0) {
AddMissile(position, { 1, 0 }, Direction::South, MIS_WEAPEXP, TARGET_MONSTERS, pnum, 0, 0);
} else if ((player._pIFlags & ISPL_LIGHTDAM) != 0) {
}
if ((player._pIFlags & ISPL_LIGHTDAM) != 0) {
AddMissile(position, { 2, 0 }, Direction::South, MIS_WEAPEXP, TARGET_MONSTERS, pnum, 0, 0);
}
}

Loading…
Cancel
Save