Skip to content

Commit

Permalink
🐛 [hellfire] Sparkling Shrine deals a random amount of damage
Browse files Browse the repository at this point in the history
If cast by traps flash would look in memory a bit before the monster
array for what value to use as damage, no one knows what might have been
there waiting so could deal anything form -254 to 254 damage.

Fixes #1500
  • Loading branch information
AJenbo committed Apr 12, 2021
1 parent f0080a6 commit 3e61cb8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Source/missiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2506,8 +2506,8 @@ void AddFlash(Sint32 mi, Sint32 sx, Sint32 sy, Sint32 dx, Sint32 dy, Sint32 midi
{
int i;

if (mienemy == TARGET_MONSTERS) {
if (id != -1) {
if (id != -1) {
if (mienemy == TARGET_MONSTERS) {
missile[mi]._midam = 0;
for (i = 0; i <= plr[id]._pLevel; i++) {
missile[mi]._midam += random_(55, 20) + 1;
Expand All @@ -2518,10 +2518,10 @@ void AddFlash(Sint32 mi, Sint32 sx, Sint32 sy, Sint32 dx, Sint32 dy, Sint32 midi
missile[mi]._midam += missile[mi]._midam >> 1;
UseMana(id, SPL_FLASH);
} else {
missile[mi]._midam = currlevel >> 1;
missile[mi]._midam = monster[id].mLevel << 1;
}
} else {
missile[mi]._midam = monster[id].mLevel << 1;
missile[mi]._midam = currlevel >> 1;
}
missile[mi]._mirange = 19;
}
Expand Down

0 comments on commit 3e61cb8

Please sign in to comment.