Soviet5lo / SlashTHEM

Super Lotsa Added Stuff Hack - The Heavily Extended Mod: A variant of Slash'EM that adds a bunch of content.
30 stars 9 forks source link

flash_hits_mon doesn't work properly with NEPHI_PHOTOGRAPHY defined #30

Open Soviet5lo opened 3 years ago

Soviet5lo commented 3 years ago

This one has been around for a while for the photography patch and is the main reason why it isn't enabled by default.

Intended behavior: 'Z'apping an expensive camera towards a monster will blind it based on how far away it is. Chance of monster also being frightened.

Actual behavior: 'Z'apping an expensive camera towards a monster will blind it for approx 1 turn, no matter how close or far the monster is. Monsters are never frightened by this.

Upon closer inspection it seems "tmp" in flash_hits_mon gets corrupted when photography is enabled.

With photography disabled "tmp" tends to be sane numbers (9, 17, etc) results. With it enabled "tmp" is always a very high value even if you're standing next to a monster. Because of this, "amt" will always be 1. It's probably something incredibly stupid I'm missing somewhere, but I don't immediately see it.